/* Pinku Ninja design system.
 *
 * Plain CSS, mobile-first. Tokens are custom properties on :root; the dark set is
 * applied by html[data-theme="dark"] (set before first paint by index.html and
 * kept in sync by prefs.rs), with a prefers-color-scheme fallback when no script
 * has run. Breakpoints: 720px (tables become tables, sheets become sidebars),
 * 1024px (the sidebar shell replaces the phone top bar + tab bar).
 */

/* ------------------------------------------------------------------ tokens */
:root {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Noto Sans Mono CJK JP", monospace;

  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f2f4f7;
  --surface-3: #e9edf2;
  --border: #e3e7ed;
  --border-strong: #cfd5de;
  --text: #171b22;
  --text-2: #586172;
  --text-3: #8b94a3;
  --accent: #d6336c;
  --accent-hover: #c2255c;
  --accent-text: #b8235a;
  --accent-soft: #fcebf2;
  --on-accent: #ffffff;
  --success: #2b8a3e;
  --success-soft: #e6f4ea;
  --warning: #b35c00;
  --warning-soft: #fff3e0;
  --danger: #d02d2d;
  --danger-soft: #fdecec;
  --info: #1971c2;
  --info-soft: #e7f1fb;
  --purple: #7048e8;
  --purple-soft: #f0ebff;
  --c-blue: #4263eb;
  --c-green: #2fb344;
  --c-red: #d63939;
  --c-neutral: #c9cdd3;
  --track: #e9ecef;
  --focus: 0 0 0 3px rgba(214, 51, 108, .28);
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 32px -8px rgba(16, 24, 40, .18), 0 4px 8px -4px rgba(16, 24, 40, .08);
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;
  --sidebar-w: 248px;
  --topbar-h: 52px;
  --tabbar-h: 58px;
  --gutter: 16px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e1015;
  --surface: #161920;
  --surface-2: #1c2028;
  --surface-3: #252a34;
  --border: #272c36;
  --border-strong: #363c48;
  --text: #e8eaee;
  --text-2: #a4acb9;
  --text-3: #6e7787;
  --accent: #f06595;
  --accent-hover: #f783ac;
  --accent-text: #f783ac;
  --accent-soft: rgba(240, 101, 149, .14);
  --on-accent: #1a0a10;
  --success: #51cf66;
  --success-soft: rgba(81, 207, 102, .13);
  --warning: #ffa94d;
  --warning-soft: rgba(255, 169, 77, .13);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, .13);
  --info: #4dabf7;
  --info-soft: rgba(77, 171, 247, .13);
  --purple: #9775fa;
  --purple-soft: rgba(151, 117, 250, .15);
  --c-blue: #5c7cfa;
  --c-green: #40c057;
  --c-red: #fa5252;
  --c-neutral: #6b7280;
  --track: rgba(255, 255, 255, .08);
  --focus: 0 0 0 3px rgba(240, 101, 149, .35);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 3px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 40px -8px rgba(0, 0, 0, .6), 0 4px 10px -4px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

/* No script yet (or blocked): follow the OS. */
@media (prefers-color-scheme: dark) {
  html:not([data-theme]) {
    --bg: #0e1015; --surface: #161920; --surface-2: #1c2028; --surface-3: #252a34;
    --border: #272c36; --border-strong: #363c48; --text: #e8eaee; --text-2: #a4acb9; --text-3: #6e7787;
    --accent: #f06595; --accent-text: #f783ac; --accent-soft: rgba(240, 101, 149, .14); --on-accent: #1a0a10;
    color-scheme: dark;
  }
}

/* ------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "palt" 0;
}
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
img { max-width: 100%; display: block; }
code {
  font-family: var(--mono); font-size: .86em; padding: .08em .35em;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px;
  overflow-wrap: anywhere;
}
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 .6em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.num, .stat-value, td.num, th.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.nowrap { white-space: nowrap; }
.small { font-size: 12.5px; }
.pos { color: var(--danger); font-weight: 600; }
.neg { color: var(--success); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; z-index: 2000; background: var(--surface); padding: 8px 12px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.icon { display: inline-flex; flex: none; line-height: 0; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; }
.sg-stack { display: flex; flex-direction: column; gap: 14px; }
.big-num { font-size: 20px; font-weight: 600; margin: 0; }

/* ------------------------------------------------------------------- shell */
.app { min-height: 100dvh; }

.brand { display: inline-flex; align-items: center; gap: 9px; color: var(--text); font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; display: inline-grid; place-items: center;
  background: linear-gradient(140deg, #2a1220, #1a2234); font-size: 17px; line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 0 0 2px var(--accent-soft);
}
.brand-mark.lg { width: 44px; height: 44px; font-size: 25px; border-radius: 12px; }
.brand-dim { color: var(--accent-text); font-weight: 600; }

/* Phone top bar */
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter); padding-top: env(safe-area-inset-top, 0px);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-actions { display: flex; align-items: center; gap: 6px; }

.main { min-width: 0; outline: none; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 8px); }
.content { padding: 14px var(--gutter) 24px; max-width: 1480px; margin: 0 auto; }
.footer { text-align: center; color: var(--text-3); font-size: 12px; padding: 4px var(--gutter) 22px; }

/* Phone bottom tab bar */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 45;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-top: 1px solid var(--border);
}
.tabbar-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--text-3); font: inherit; font-size: 11px; font-weight: 550; background: none; border: 0;
  cursor: pointer; min-height: 44px; position: relative;
}
.tabbar-item:hover { text-decoration: none; color: var(--text-2); }
.tabbar-item.active { color: var(--accent-text); }
.tabbar-item.active::before {
  content: ""; position: absolute; top: 0; width: 28px; height: 2.5px; border-radius: 0 0 3px 3px; background: var(--accent);
}

/* Phone slide-out drawer */
.drawer-scrim, .sheet-scrim {
  position: fixed; inset: 0; z-index: 60; background: rgba(8, 10, 14, .45);
  opacity: 0; pointer-events: none; transition: opacity .2s ease;
}
.drawer-scrim.open, .sheet-scrim.open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; z-index: 61; top: 0; bottom: 0; right: 0; width: min(340px, 88vw);
  background: var(--surface); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  transform: translateX(105%); visibility: hidden;
  transition: transform .24s cubic-bezier(.3, .7, .2, 1), visibility 0s linear .24s;
  padding-top: env(safe-area-inset-top, 0px); padding-bottom: var(--safe-b);
}
.drawer.open { transform: none; visibility: visible; transition-delay: 0s; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 6px 16px; }
.drawer .nav-scroll { flex: 1; overflow-y: auto; padding: 4px 10px; }
.drawer-prefs { border-top: 1px solid var(--border); padding: 12px 16px 16px; }

/* Desktop sidebar (hidden on phones) */
.sidebar { display: none; }
.nav-group { padding: 4px 0 8px; }
.nav-title {
  display: flex; align-items: center; gap: 6px; padding: 8px 10px 4px;
  font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3);
}
.nav-admin-tag { font-size: 9.5px; letter-spacing: .04em; padding: 0 5px; border-radius: 4px; background: var(--info-soft); color: var(--info); }
.nav-link {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px;
  color: var(--text-2); font-weight: 550;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--accent-soft); color: var(--accent-text); }
.nav-link.active .icon { color: var(--accent); }

@media (min-width: 1024px) {
  .app {
    display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
    background: linear-gradient(to right, var(--surface) calc(var(--sidebar-w) - 1px), var(--border) 0, var(--border) var(--sidebar-w), transparent 0);
  }
  .topbar, .tabbar, .drawer, .drawer-scrim { display: none; }
  .sidebar {
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100dvh;
    background: var(--surface); border-right: 1px solid var(--border);
  }
  .sidebar .brand { padding: 16px 18px 10px; }
  .sidebar .nav-scroll { flex: 1; overflow-y: auto; padding: 2px 10px 10px; scrollbar-width: thin; }
  .nav-link { min-height: 34px; }
  .sidebar-foot { border-top: 1px solid var(--border); padding: 12px 12px 12px; display: flex; flex-direction: column; gap: 10px; }
  .main { padding-bottom: 0; display: flex; flex-direction: column; min-height: 100dvh; }
  .content { padding: 22px 28px 28px; width: 100%; flex: 1; }
}

/* Preferences block */
.prefs { display: flex; flex-direction: column; gap: 8px; }
.pref-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidebar .seg-btn { padding: 0 7px; min-width: 28px; }
.pref-label { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12.5px; font-weight: 550; }
.pref-label .icon { color: var(--text-3); }

/* Thin top progress bar (#pn-progress) */
.progress-bar {
  position: fixed; top: 0; left: 0; right: 0; height: 2.5px; z-index: 1090; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--accent), transparent); background-size: 50% 100%;
  opacity: 0; transition: opacity .2s;
}
.progress-bar.on { opacity: 1; animation: pn-slide 1.1s linear infinite; }
@keyframes pn-slide { from { background-position: -50% 0; } to { background-position: 150% 0; } }

/* ------------------------------------------------------------- page head */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin: 2px 0 16px; }
.page-head-text { min-width: 0; }
.pretitle { font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); margin-bottom: 2px; }
.page-title { font-size: 22px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.page-sub { color: var(--text-2); margin: 4px 0 0; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
@media (min-width: 1024px) { .page-title { font-size: 24px; } }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 36px; padding: 0 14px; border-radius: var(--radius-sm);
  font: inherit; font-weight: 600; font-size: 13.5px; line-height: 1; white-space: nowrap;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-sm); cursor: pointer; transition: background .12s, border-color .12s, color .12s;
  text-decoration: none;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 40%, var(--border-strong)); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-2); color: var(--text); }
.btn-sm { min-height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn-lg { min-height: 44px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.sm { width: 28px; min-height: 28px; }
.link-btn { background: none; border: 0; padding: 4px 6px; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--accent-text); cursor: pointer; }
@media (max-width: 1023px) { .btn { min-height: 40px; } .btn-sm { min-height: 34px; } .btn-icon { width: 40px; } }

/* ---------------------------------------------------------------- inputs */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.input {
  width: 100%; min-height: 38px; padding: 0 11px; border-radius: var(--radius-sm);
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface);
  border: 1px solid var(--border-strong); transition: border-color .12s, box-shadow .12s;
}
select.input {
  appearance: none; -webkit-appearance: none; padding-right: 30px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b94a3' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
.input::placeholder { color: var(--text-3); }
.input-sm { min-height: 32px; font-size: 13px; width: auto; }
@media (min-width: 720px) { .input { font-size: 14px; } }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.checks { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.checks.col { flex-direction: column; gap: 2px; }
.check { display: inline-flex; align-items: center; gap: 8px; min-height: 32px; cursor: pointer; color: var(--text); }
.check input { width: 17px; height: 17px; accent-color: var(--accent); margin: 0; }

/* Segmented control */
.seg { display: inline-flex; padding: 2px; gap: 2px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.seg-btn {
  min-height: 26px; min-width: 32px; padding: 0 9px; border: 0; border-radius: 6px; background: transparent;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text-2); cursor: pointer;
}
.seg-btn:hover { color: var(--text); }
.seg-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
html[data-theme="dark"] .seg-btn.active { background: var(--surface-3); }
@media (max-width: 1023px) { .seg-btn { min-height: 34px; min-width: 40px; } }

/* Search box */
.search { position: relative; display: flex; align-items: center; }
.search > .icon { position: absolute; left: 11px; color: var(--text-3); pointer-events: none; }
.search-input {
  width: 100%; min-height: 38px; padding: 0 12px 0 34px; border-radius: var(--radius-sm);
  font: inherit; font-size: 16px; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
}
.search-input:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
@media (min-width: 720px) { .search-input { font-size: 14px; } }

/* ----------------------------------------------------------------- cards */
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); min-width: 0; overflow: hidden;
}
.card + .card, .card + .grid-2, .grid-2 + .card, .grid-2 + .grid-2, .grid-3 + .grid-2, .stat-grid + .card, .stat-grid + .grid-2,
.alert + .card, .alert + .grid-2, .alert + .stat-grid { margin-top: 14px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 13px 16px 0; }
.card-title { font-size: 14.5px; font-weight: 650; }
.card-sub { font-size: 12.5px; color: var(--text-2); margin-top: 1px; }
.card-actions { display: flex; gap: 6px; flex: none; }
.card-body { padding: 13px 16px 15px; }
.card-body.flush { padding: 10px 0 0; }
.card-head + .card-body.flush { padding-top: 12px; }
.card-foot { border-top: 1px solid var(--border); padding: 10px 16px; }
.grid-2, .grid-3 { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ stat tiles */
.stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stat-grid { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; } }
.stat {
  position: relative; display: flex; flex-direction: column; gap: 3px; min-width: 0;
  padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); color: var(--text); overflow: hidden;
}
a.stat-link:hover { text-decoration: none; border-color: var(--border-strong); }
.stat-label { font-size: 12px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-value { font-size: 22px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.stat-foot { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 12px; min-height: 18px; }
.stat-delta { font-weight: 650; color: var(--text-2); }
.stat-delta.up { color: var(--success); }
.stat-delta.down { color: var(--danger); }
.stat-hint { color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.stat-spark { margin: 4px -14px -12px; }
.stat-spark .spark { display: block; width: 100%; }
@media (min-width: 900px) { .stat-value { font-size: 26px; } }

/* ------------------------------------------------------ badges and chips */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px; border-radius: 999px;
  font-size: 11.5px; font-weight: 650; line-height: 1; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border);
}
.badge.accent { background: var(--accent-soft); color: var(--accent-text); border-color: transparent; }
.badge.success { background: var(--success-soft); color: var(--success); border-color: transparent; }
.badge.warning { background: var(--warning-soft); color: var(--warning); border-color: transparent; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.badge.info { background: var(--info-soft); color: var(--info); border-color: transparent; }
.badge.purple { background: var(--purple-soft); color: var(--purple); border-color: transparent; }
.badge.solid.accent { background: var(--accent); color: var(--on-accent); }
.src {
  display: inline-grid; place-items: center; height: 18px; min-width: 30px; padding: 0 5px; border-radius: 5px;
  font-size: 10.5px; font-weight: 750; letter-spacing: .03em; line-height: 1; flex: none;
}
.src-yo { background: color-mix(in srgb, var(--c-blue) 14%, transparent); color: var(--c-blue); }
.src-both { background: color-mix(in srgb, var(--c-green) 16%, transparent); color: var(--success); }
.src-ch { background: var(--surface-3); color: var(--text-2); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 11px; border-radius: 999px;
  font-size: 13px; font-weight: 550; color: var(--text); background: var(--surface); border: 1px solid var(--border-strong);
  white-space: nowrap; cursor: default;
}
a.chip { cursor: pointer; }
a.chip:hover { text-decoration: none; background: var(--surface-2); }
.chip.active { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 45%, transparent); color: var(--accent-text); }
.chip-count { font-size: 11.5px; color: var(--text-3); font-weight: 600; }
.chip.active .chip-count { color: inherit; opacity: .75; }
.chip-x {
  display: inline-grid; place-items: center; width: 20px; height: 20px; margin-right: -5px; border-radius: 50%;
  border: 0; background: transparent; color: inherit; cursor: pointer; opacity: .7;
}
.chip-x:hover { opacity: 1; background: color-mix(in srgb, currentColor 14%, transparent); }
.chip.applied { background: var(--accent-soft); border-color: transparent; color: var(--accent-text); padding-right: 8px; }
.chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 12px; }
.chip-scroll { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
@media (max-width: 1023px) { .chip-scroll { margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); } .chip-scroll .chip { flex: none; } }
.chip-scroll::-webkit-scrollbar { display: none; }
.count-badge {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent); font-size: 11px; font-weight: 700;
}

/* ------------------------------------------------------------ data table */
.dt-wrap { width: 100%; overflow-x: auto; }
.dt { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.dt th {
  text-align: left; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-3); padding: 8px 12px; border-bottom: 1px solid var(--border); white-space: nowrap;
  background: var(--surface);
}
.dt th.num, .dt td.num { text-align: right; }
.dt td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.dt tbody tr:last-child td { border-bottom: 0; }
.dt tbody tr:hover td { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.dt th:first-child, .dt td:first-child { padding-left: 16px; }
.dt th:last-child, .dt td:last-child { padding-right: 16px; }
.th-sort { display: inline-flex; align-items: center; gap: 3px; color: inherit; }
.th-sort:hover { color: var(--text); text-decoration: none; }
.th-sort.sorted { color: var(--accent-text); }
.th-sort.asc .icon { transform: rotate(180deg); }
.cell-title { display: flex; align-items: center; gap: 7px; min-width: 0; }
.strong-link { color: var(--text); font-weight: 600; }
.strong-link:hover { color: var(--accent-text); }
.cell-sub { color: var(--text-3); font-size: 12px; }

@media (max-width: 719.98px) {
  .dt-wrap { overflow: visible; }
  .dt, .dt tbody, .dt tr, .dt td { display: block; width: 100%; }
  .dt thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .dt tr { padding: 10px 16px 11px; border-bottom: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; }
  .dt tbody tr:last-child { border-bottom: 0; }
  .dt tbody tr:hover td { background: none; }
  .dt td, .dt td:first-child, .dt td:last-child { padding: 0; border: 0; text-align: left !important; min-width: 0; }
  .dt td::before {
    content: attr(data-label); display: block; font-size: 10.5px; font-weight: 650; text-transform: uppercase;
    letter-spacing: .05em; color: var(--text-3); margin-bottom: 1px;
  }
  .dt td.dt-primary { grid-column: 1 / -1; font-size: 14.5px; margin-bottom: 2px; }
  .dt td.dt-primary::before { display: none; }
}

/* ---------------------------------------------------------------- filters */
.with-filters { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.filter-panel {
  position: fixed; z-index: 61; left: 0; right: 0; bottom: 0; max-height: 86dvh;
  display: flex; flex-direction: column; background: var(--surface);
  border-radius: 16px 16px 0 0; box-shadow: var(--shadow-lg);
  transform: translateY(105%); visibility: hidden;
  transition: transform .26s cubic-bezier(.3, .7, .2, 1), visibility 0s linear .26s;
  padding-bottom: var(--safe-b);
}
.filter-panel.open { transform: none; visibility: visible; transition-delay: 0s; }
.sheet-handle { width: 38px; height: 4px; border-radius: 4px; background: var(--border-strong); margin: 8px auto 0; }
.filter-panel-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px 6px 16px; }
.filter-title { font-size: 15px; font-weight: 700; }
.filter-panel-body { overflow-y: auto; padding: 0 16px 8px; overscroll-behavior: contain; }
.filter-panel-foot { padding: 10px 16px 12px; border-top: 1px solid var(--border); }
.fgroup { border: 0; margin: 0; padding: 12px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.fgroup:last-child { border-bottom: 0; }
.fgroup-label { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 650; color: var(--text-2); text-transform: uppercase; letter-spacing: .05em; }
.fgroup-hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.results-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.results-count { color: var(--text-2); }
.results-count strong { color: var(--text); }
.sort-select { margin-left: auto; }
.filter-toggle .count-badge { margin-left: 2px; }

@media (min-width: 900px) {
  .with-filters { grid-template-columns: 264px minmax(0, 1fr); }
  .sheet-scrim, .sheet-handle, .sheet-only, .filter-toggle { display: none !important; }
  .filter-panel {
    position: sticky; top: 16px; z-index: auto; transform: none; visibility: visible; max-height: calc(100dvh - 32px);
    border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); transition: none;
  }
  .filter-panel-head { padding: 12px 16px 2px; }
}

/* ------------------------------------------------------------- pagination */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.pager-total { color: var(--text-2); font-size: 13px; }
.pager-links { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.pager-btn {
  display: inline-grid; place-items: center; min-width: 34px; height: 34px; padding: 0 8px; border-radius: 8px;
  color: var(--text-2); font-weight: 600; font-size: 13px; border: 1px solid transparent;
}
.pager-btn:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.pager-btn.current { background: var(--accent-soft); color: var(--accent-text); }
.pager-btn.disabled { opacity: .35; pointer-events: none; }
.pager-gap { color: var(--text-3); padding: 0 2px; }
@media (max-width: 719.98px) { .pager-btn { min-width: 40px; height: 40px; } .pager-total { width: 100%; } .pager-links { margin: 0 auto; } }
.load-more { display: flex; justify-content: center; padding: 14px 0 4px; }

/* -------------------------------------------------------------------- tabs */
.tabs {
  display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--border);
  padding: 0 10px; margin-top: -10px;
}
.tabs::-webkit-scrollbar { display: none; }
.card > .card-body.flush > .tabs { margin-top: -10px; }
.tab {
  position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 12px;
  border: 0; background: none; font: inherit; font-weight: 600; font-size: 13.5px; color: var(--text-2);
  white-space: nowrap; cursor: pointer;
}
.tab:hover { color: var(--text); text-decoration: none; }
.tab.active { color: var(--text); }
.tab.active::after { content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent); }
.tab-count { font-size: 11px; color: var(--text-3); background: var(--surface-2); border-radius: 999px; padding: 1px 6px; }

/* ------------------------------------------------- skeletons and states */
.skel {
  background: linear-gradient(90deg, var(--surface-2) 0%, var(--surface-3) 40%, var(--surface-2) 80%);
  background-size: 300% 100%; animation: pn-shimmer 1.4s ease-in-out infinite; border-radius: 6px;
}
@keyframes pn-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.skel-line { height: 11px; margin: 7px 0; }
.skel-line.lg { height: 22px; margin-top: 9px; }
.skel-block { width: 100%; }
.skel-table { padding: 2px 0; }
.skel-row { display: grid; grid-template-columns: 2fr repeat(auto-fit, minmax(0, 1fr)); grid-auto-flow: column; gap: 16px; padding: 8px 16px; border-bottom: 1px solid var(--border); }
.skel-row:last-child { border-bottom: 0; }
.skel-cell { min-width: 0; }
@media (max-width: 719.98px) { .skel-row { grid-auto-flow: row; grid-template-columns: 1fr 1fr; gap: 0 14px; } .skel-cell:first-child { grid-column: 1 / -1; } }
.spinner {
  display: inline-block; width: 20px; height: 20px; border-radius: 50%;
  border: 2.5px solid var(--border-strong); border-top-color: var(--accent); animation: pn-spin .7s linear infinite;
}
.spinner.sm { width: 15px; height: 15px; border-width: 2px; }
.spinner.on-accent { border-color: rgba(255, 255, 255, .35); border-top-color: var(--on-accent); }
@keyframes pn-spin { to { transform: rotate(360deg); } }
.state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 20px; }
.state-icon {
  width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; margin-bottom: 12px;
  background: var(--surface-2); color: var(--text-3);
}
.state.error .state-icon { background: var(--danger-soft); color: var(--danger); }
.state-title { font-weight: 650; font-size: 15px; }
.state-body { color: var(--text-2); margin: 4px 0 0; max-width: 46ch; }
.state-action { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }

.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); font-size: 13.5px;
}
.alert > .icon { margin-top: 1px; color: var(--text-2); }
.alert-text { min-width: 0; }
.alert.info { background: var(--info-soft); border-color: transparent; }
.alert.info > .icon { color: var(--info); }
.alert.warning { background: var(--warning-soft); border-color: transparent; }
.alert.warning > .icon { color: var(--warning); }
.alert.danger { background: var(--danger-soft); border-color: transparent; }
.alert.danger > .icon { color: var(--danger); }
.alert.success { background: var(--success-soft); border-color: transparent; }
.alert.success > .icon { color: var(--success); }
.alert code { background: color-mix(in srgb, var(--surface) 60%, transparent); }
.alert + .alert { margin-top: 0; }
.page-head + .alert { margin-bottom: 14px; }

/* ------------------------------------------------------------------- toast */
.toast-stack {
  position: fixed; z-index: 1100; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); width: min(440px, calc(100vw - 24px));
  display: flex; flex-direction: column; gap: 8px; pointer-events: none;
}
@media (min-width: 1024px) { .toast-stack { left: auto; right: 20px; transform: none; bottom: 20px; } }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 14px;
  background: var(--text); color: var(--bg); border-radius: 10px; box-shadow: var(--shadow-lg);
  animation: pn-rise .2s ease-out; font-weight: 550;
}
.toast .btn-ghost { color: inherit; opacity: .7; }
.toast .btn-ghost:hover { background: rgba(127, 127, 127, .2); opacity: 1; color: inherit; }
.toast.success > .icon { color: #69db7c; }
.toast.danger > .icon { color: #ff8787; }
html[data-theme="dark"] .toast.success > .icon { color: var(--success); }
.toast-text { flex: 1; min-width: 0; }
@keyframes pn-rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1080; background: rgba(0, 0, 0, .85);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
  padding: 16px; animation: pn-fade .15s ease-out; cursor: zoom-out;
}
.lightbox img { max-width: 96vw; max-height: 88vh; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); }
.lightbox-cap { background: #7048e8; color: #fff; padding: 4px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600; }
.lightbox-x {
  position: absolute; top: calc(env(safe-area-inset-top, 0px) + 10px); right: 10px; width: 44px; height: 44px; border-radius: 50%;
  border: 0; background: rgba(255, 255, 255, .12); color: #fff; display: grid; place-items: center; cursor: pointer;
}
@keyframes pn-fade { from { opacity: 0; } to { opacity: 1; } }
.zoomable {
  position: relative; padding: 0; border: 0; background: var(--surface-2); border-radius: var(--radius-sm);
  overflow: hidden; cursor: zoom-in; display: block; width: 100%;
}
.zoomable img { width: 100%; height: 100%; object-fit: cover; }
.zoom-hint {
  position: absolute; right: 6px; bottom: 6px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0, 0, 0, .45); color: #fff; opacity: 0; transition: opacity .15s;
}
.zoomable:hover .zoom-hint, .zoomable:focus-visible .zoom-hint { opacity: 1; }
.photo-strip { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 560px) { .photo-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.photo { aspect-ratio: 3 / 4; }

/* --------------------------------------------------------------- tooltips */
.tip { position: relative; display: inline-flex; vertical-align: middle; }
.tip-trigger { display: inline-flex; align-items: center; padding: 0; border: 0; background: none; color: var(--text-3); cursor: help; font: inherit; }
.tip-trigger:hover { color: var(--text-2); }
.tip-bubble {
  position: absolute; z-index: 70; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%) translateY(4px);
  width: max-content; max-width: min(280px, 80vw); padding: 7px 10px; border-radius: 8px;
  background: var(--text); color: var(--bg); font-size: 12.5px; font-weight: 500; line-height: 1.4; text-align: left;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden; transition: opacity .12s, transform .12s; pointer-events: none;
}
.tip-bubble::after {
  content: ""; position: absolute; top: 100%; left: 50%; margin-left: -5px;
  border: 5px solid transparent; border-top-color: var(--text);
}
@media (hover: hover) { .tip:hover .tip-bubble { opacity: 1; visibility: visible; transform: translateX(-50%); } }
.tip:focus-within .tip-bubble, .tip.open .tip-bubble { opacity: 1; visibility: visible; transform: translateX(-50%); }

/* ------------------------------------------------------------------ menus */
.menu { position: relative; display: inline-flex; }
.menu-trigger { display: inline-flex; align-items: center; gap: 8px; padding: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; border-radius: 8px; min-height: 36px; }
.menu-catch { position: fixed; inset: 0; z-index: 80; }
.menu-pop {
  position: absolute; z-index: 81; top: calc(100% + 6px); left: 0; min-width: 210px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg);
  animation: pn-rise .12s ease-out;
}
.menu-pop.right { left: auto; right: 0; }
.menu-pop.up { top: auto; bottom: calc(100% + 6px); }
.menu-head { padding: 7px 10px 6px; font-size: 12px; font-weight: 650; color: var(--text-3); }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; min-height: 36px; padding: 0 10px; border-radius: 7px;
  border: 0; background: none; font: inherit; font-weight: 550; color: var(--text); text-align: left; cursor: pointer;
}
.menu-item:hover { background: var(--surface-2); text-decoration: none; }
.menu-item.danger { color: var(--danger); }
.menu-item .icon { color: var(--text-3); }
.menu-sep { height: 1px; background: var(--border); margin: 4px 2px; }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, var(--accent), #845ef7); color: #fff; font-weight: 700; font-size: 13px;
}
.sidebar-foot .menu { width: 100%; }
.sidebar-foot .menu-trigger { width: 100%; padding: 4px 6px; }
.sidebar-foot .menu-trigger:hover { background: var(--surface-2); }
.sidebar-foot .menu-pop { left: 0; right: 0; }
.acct-name { font-weight: 600; flex: 1; text-align: left; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ------------------------------------------------------------------ charts */
.chart-block { margin: 0; min-width: 0; }
.chart-label { font-size: 12.5px; font-weight: 650; color: var(--text-2); margin-bottom: 6px; }
.chart { display: block; width: 100%; overflow: visible; }
.chart .axis { stroke: var(--border-strong); stroke-width: 1; }
.chart .grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
/* HTML overlays on a stretched SVG plot: axis labels and lone-point markers */
.chart-plot { position: relative; }
.chart-ytick { position: absolute; left: 0; transform: translateY(-100%); padding: 0 3px 1px 0; font-size: 10.5px; line-height: 1.2;
  color: var(--text-3); background: var(--surface); border-radius: 2px; pointer-events: none; font-variant-numeric: tabular-nums; }
.chart-pt { position: absolute; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 1.5px var(--surface); }
.chart-xaxis { position: relative; height: 15px; margin-top: 2px; font-size: 10.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.chart-xtick { position: absolute; top: 0; white-space: nowrap; }
.chart-xtick.first { left: 0; }
.chart-xtick.last { right: 0; }
.chart-xtick.mid { transform: translateX(-50%); display: none; }
@media (min-width: 720px) { .chart-xtick.mid { display: inline; } }
.chart-legend, .legend-row { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--text-2); margin-top: 6px; }
.chart-legend strong, .legend-row strong { color: var(--text); font-variant-numeric: tabular-nums; }
.chart-legend .push { margin-left: auto; color: var(--text-3); }
.legend-row { font-size: 12.5px; margin-top: 10px; }
.swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: 0; }
.chart-empty { color: var(--text-3); font-size: 13px; padding: 18px 0; }
.spark { width: 100%; }
.stackbar { display: flex; height: 14px; border-radius: 4px; overflow: hidden; min-width: 120px; background: var(--track); }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; margin-bottom: 3px; }
.hbar-label a { color: var(--text); font-weight: 550; }
.hbar-val { color: var(--text-2); font-weight: 600; }
.hbar-track { height: 7px; border-radius: 4px; background: var(--track); overflow: hidden; }
.hbar-fill { height: 100%; border-radius: 4px; }
.bar-labels { display: grid; text-align: center; font-size: 11px; color: var(--text-3); margin-top: 4px; }

/* ---------------------------------------------------------- key / values */
.kv { margin: 0; display: flex; flex-direction: column; }
.kv-row { display: grid; grid-template-columns: minmax(96px, 36%) 1fr; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.kv-row:last-child { border-bottom: 0; }
.kv dt { color: var(--text-2); font-size: 13px; }
.kv dd { margin: 0; font-weight: 550; min-width: 0; overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- calendar */
.cal-months { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cal-label { font-weight: 650; font-size: 13px; margin-bottom: 6px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.cal-wd { font-size: 10.5px; font-weight: 650; color: var(--text-3); text-align: center; padding-bottom: 2px; }
.cal-day { min-height: 42px; border-radius: 6px; padding: 3px 4px; background: var(--surface-2); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cal-day.pad { background: transparent; }
.cal-day.work { background: var(--success-soft); }
.cal-day.off { background: var(--surface-3); }
.cal-num { font-size: 11px; font-weight: 650; color: var(--text-2); }
.cal-shift { font-size: 9.5px; line-height: 1.2; color: var(--success); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* -------------------------------------------------------- jp/en toggle */
.i18n-pending { text-decoration: underline dotted var(--text-3); text-underline-offset: 3px; }

/* ------------------------------------------------------------------- login */
.auth-page {
  min-height: 100dvh; display: grid; place-items: center; padding: 24px var(--gutter);
  background:
    radial-gradient(900px 500px at 15% -10%, color-mix(in srgb, var(--accent) 13%, transparent), transparent 70%),
    radial-gradient(700px 500px at 110% 110%, color-mix(in srgb, #845ef7 10%, transparent), transparent 70%),
    var(--bg);
}
.auth-wrap { width: min(400px, 100%); }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: 24px; font-weight: 750; letter-spacing: -.02em; margin-bottom: 22px; }
.auth-card { padding: 24px 22px 22px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow-lg); border-radius: var(--radius-lg); overflow: visible; }
.auth-title { font-size: 20px; font-weight: 700; }
.auth-sub { color: var(--text-2); margin: -8px 0 2px; }
.auth-card .input { min-height: 44px; }
.auth-card .btn { margin-top: 4px; }
.auth-next { color: var(--text-3); font-size: 12.5px; margin: 0; text-align: center; overflow-wrap: anywhere; }
.auth-foot { text-align: center; color: var(--text-3); font-size: 12px; margin-top: 18px; }

/* ------------------------------------------------------------- style guide */
.sg-toc { margin: -4px 0 18px; position: sticky; top: var(--topbar-h); z-index: 5; padding-top: 8px; padding-bottom: 8px; background: var(--bg); }
@media (min-width: 1024px) { .sg-toc { top: 0; padding-top: 10px; } }
.sg-section { margin-bottom: 30px; scroll-margin-top: 110px; }
.sg-head { margin-bottom: 10px; }
.sg-title { font-size: 16px; font-weight: 700; }
.sg-note { color: var(--text-2); margin: 2px 0 0; font-size: 13px; }
.sg-swatches { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); margin-bottom: 14px; }
.sg-swatch { display: flex; align-items: center; gap: 8px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; min-width: 0; }
.sg-swatch span { width: 28px; height: 28px; border-radius: 6px; flex: none; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .25); }
.sg-swatch code { border: 0; background: none; padding: 0; font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }
.sg-section > .card + .card, .sg-section > .grid-2 + .grid-2, .sg-section > .grid-3 + .grid-2,
.sg-section > .grid-2 + .row-wrap { margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ------------------------------------------- stats: gaijin tax section */
.gj-tiles { margin-bottom: 14px; }
.gj-tiles .stat-hint { white-space: normal; overflow: visible; text-overflow: clip; }
.gj-selects { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.gj-selects select, .gj-card .card-actions select { max-width: 220px; }
.gj-pad { padding: 0 16px 14px; }
@media (max-width: 719px) {
  .gj-card .card-head { flex-wrap: wrap; }
  .gj-card .card-actions { flex: 1 1 100%; }
  .gj-selects { justify-content: flex-start; }
}
