/* ============================================================
   Studio — Photo Ops field companion · design tokens + components
   ============================================================ */

:root {
  /* fonts (UI font is overridden live by the font tweak) */
  --ui-font: "Hanken Grotesk", system-ui, sans-serif;
  --mono-font: "Spline Sans Mono", ui-monospace, monospace;

  /* warm-neutral light palette */
  --bg:         oklch(0.987 0.004 85);
  --bg-sunken:  oklch(0.962 0.005 85);
  --surface:    oklch(1 0 0);
  --surface-2:  oklch(0.972 0.004 85);
  --text:       oklch(0.235 0.008 75);
  --text-2:     oklch(0.50 0.008 75);
  --text-3:     oklch(0.66 0.006 75);
  --line:       oklch(0.915 0.004 85);
  --line-2:     oklch(0.955 0.004 85);

  /* accent (live overridden by tweak) */
  --accent:      oklch(0.55 0.12 264);
  --accent-ink:  oklch(0.99 0 0);
  --accent-soft: color-mix(in oklab, var(--accent) 12%, var(--surface));
  --accent-line: color-mix(in oklab, var(--accent) 22%, var(--line));

  /* semantic */
  --danger: oklch(0.585 0.15 28);
  --warn:   oklch(0.72 0.11 75);
  --ok:     oklch(0.60 0.10 158);
  --info:   var(--accent);

  --danger-soft: color-mix(in oklab, var(--danger) 13%, var(--surface));
  --warn-soft:   color-mix(in oklab, var(--warn) 16%, var(--surface));
  --ok-soft:     color-mix(in oklab, var(--ok) 14%, var(--surface));

  --shadow-card: 0 1px 2px rgba(40,38,34,0.04), 0 2px 8px rgba(40,38,34,0.04);
  --shadow-pop:  0 8px 24px rgba(30,28,24,0.14), 0 2px 6px rgba(30,28,24,0.08);
  --shadow-fab:  0 6px 18px color-mix(in oklab, var(--accent) 40%, transparent);

  --r-card: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --page-pad-x: 20px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --page-top: calc(max(18px, var(--safe-top)) + 22px);
  --tabbar-bottom: max(10px, var(--safe-bottom));
  --tabbar-space: calc(68px + var(--tabbar-bottom));
  --vv-bottom-offset: 0px;
  --app-height: 100%;
}

[data-theme="dark"] {
  --bg:         oklch(0.175 0.005 75);
  --bg-sunken:  oklch(0.145 0.005 75);
  --surface:    oklch(0.225 0.006 75);
  --surface-2:  oklch(0.265 0.006 75);
  --text:       oklch(0.955 0.004 85);
  --text-2:     oklch(0.74 0.006 85);
  --text-3:     oklch(0.58 0.006 85);
  --line:       oklch(0.30 0.006 75);
  --line-2:     oklch(0.255 0.006 75);

  --accent-ink:  oklch(0.16 0.01 264);
  --accent-soft: color-mix(in oklab, var(--accent) 22%, var(--surface));
  --accent-line: color-mix(in oklab, var(--accent) 32%, var(--line));

  --shadow-card: 0 1px 2px rgba(0,0,0,0.3), 0 2px 10px rgba(0,0,0,0.25);
  --shadow-pop:  0 10px 30px rgba(0,0,0,0.5);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

.admin-v2-gate {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  background: var(--bg-sunken);
  color: var(--text);
  font-family: var(--ui-font);
  text-align: center;
}
.admin-v2-gate__mark {
  width: 58px;
  height: 58px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: var(--accent-ink);
}
.admin-v2-gate h1 {
  margin: 6px 0 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 760;
}
.admin-v2-gate p {
  width: min(100%, 480px);
  max-width: 480px;
  margin: 0;
  color: var(--text-2);
  font-size: 14px;
  overflow-wrap: anywhere;
}
.admin-v2-gate__actions {
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
}

.app-root {
  height: var(--app-height, 100%);
  min-height: var(--app-height, 100%);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  background: var(--bg);
  color: var(--text);
  font-family: var(--ui-font);
  font-size: 16px;
  line-height: 1.4;
  overflow: hidden;
}

/* ---- scroll region ---- */
.scroll {
  flex: 1;
  width: 100%;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none;
}
.scroll::-webkit-scrollbar { display: none; }
.pad-top { padding-top: var(--page-top); }
.pad-bottom { padding-bottom: calc(var(--tabbar-space) + 24px); }

/* ---- type helpers ---- */
.mono { font-family: var(--mono-font); font-feature-settings: "tnum" 1; letter-spacing: 0; }
.t-eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0; text-transform: uppercase; color: var(--text-3); }
.t-h1 { font-size: 30px; font-weight: 700; letter-spacing: 0; line-height: 1.14; }
.t-h2 { font-size: 21px; font-weight: 700; letter-spacing: 0; }
.t-h3 { font-size: 17px; font-weight: 650; letter-spacing: 0; }
.t-body { font-size: 15px; }
.t-sm { font-size: 13.5px; }
.t-xs { font-size: 12px; }
.dim { color: var(--text-2); }
.dimmer { color: var(--text-3); }
.tnum { font-variant-numeric: tabular-nums; }
.ellip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- screen header ---- */
.screen-head { padding: 8px var(--page-pad-x) 14px; }
.screen-head .row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; min-width: 0; }
.screen-head .row > * { min-width: 0; }
.head-date { color: var(--text-2); font-size: 14px; font-weight: 500; margin-bottom: 3px; }

/* ---- card ---- */
.card {
  min-width: 0;
  max-width: 100%;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  box-shadow: var(--shadow-card);
}
.sched-note { margin: -4px 0 12px; }
.sched-gap { margin-bottom: 10px; }
.sched-top { margin-top: 12px; }
.card-flat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-card); }
.section { width: 100%; min-width: 0; max-width: 100%; padding: 0 var(--page-pad-x); }
.section + .section { margin-top: 22px; }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; margin: 0 4px 10px; }
.section-title > * { min-width: 0; }

/* ---- pills / chips ---- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 26px; padding: 0 10px; border-radius: 999px;
  font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--text-2);
  border: 1px solid var(--line);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis;
}
.pill .dot { width: 7px; height: 7px; border-radius: 999px; background: currentColor; }
.pill.accent { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.pill.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in oklab, var(--danger) 25%, var(--line)); }
.pill.warn   { background: var(--warn-soft); color: color-mix(in oklab, var(--warn) 75%, var(--text)); border-color: color-mix(in oklab, var(--warn) 30%, var(--line)); }
.pill.ok     { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in oklab, var(--ok) 25%, var(--line)); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 44px; padding: 0 14px; border-radius: 999px;
  font-size: 14px; font-weight: 550; cursor: pointer;
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--line); transition: all .14s ease;
  flex-shrink: 0;
}
.chip[data-on="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.chip-row {
  display: flex; gap: 8px; overflow-x: auto;
  padding: 2px var(--page-pad-x);
  scroll-padding-inline: var(--page-pad-x);
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 28px), transparent 100%);
}
.chip-row::-webkit-scrollbar { display: none; }

/* ---- status dot ---- */
.sdot { width: 9px; height: 9px; border-radius: 999px; flex-shrink: 0; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 14px; border: none; cursor: pointer;
  min-width: 0; max-width: 100%;
  font-family: var(--ui-font); font-size: 16px; font-weight: 650; letter-spacing: 0;
  background: var(--text); color: var(--bg); transition: transform .1s ease, opacity .14s ease;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.btn:active { transform: scale(0.975); }
.btn.accent { background: var(--accent); color: var(--accent-ink); }
.btn.ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn.block { width: 100%; }
.btn.sm { height: 44px; font-size: 14.5px; border-radius: 11px; padding: 0 14px; }

.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  transition: background .14s ease, transform .1s ease;
}
.icon-btn:active { transform: scale(0.94); }

/* contact action buttons (call/text/email) */
.contact-actions { display: grid; grid-template-columns: repeat(4,1fr); gap: 10px; }
.contact-btn {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 0; border-radius: 16px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text);
  font-size: 13px; font-weight: 600; transition: transform .1s ease;
}
.contact-btn:active { transform: scale(0.96); }
.contact-btn .ci { color: var(--accent); }

/* ---- list rows ---- */
.row-list { display: flex; flex-direction: column; }
.lrow {
  display: flex; align-items: center; gap: 13px;
  padding: 14px 16px; cursor: pointer; position: relative;
  background: var(--surface);
  min-width: 0;
}
.lrow > * { min-width: 0; }
.lrow > .mono-av,
.lrow > .icon-btn,
.lrow > .btn { flex-shrink: 0; }
.lrow + .lrow::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; background: var(--line-2);
}
.lrow:active { background: var(--surface-2); }

/* avatar / monogram */
.mono-av {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; letter-spacing: 0;
  background: var(--accent-soft); color: var(--accent);
}
.mono-av.sm { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
.mono-av.lg { width: 60px; height: 60px; border-radius: 18px; font-size: 22px; }
.mono-av.danger-soft { background: var(--danger-soft); color: var(--danger); }
.mono-av.ok-soft { background: var(--ok-soft); color: var(--ok); }

/* ---- swipe row ---- */
.swipe { position: relative; overflow: hidden; }
.swipe-track { position: relative; transition: transform .26s cubic-bezier(.22,1,.36,1); will-change: transform; touch-action: pan-y; }
.swipe-actions { position: absolute; top: 0; bottom: 0; right: 0; display: flex; }
.swipe-act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  width: 78px; color: #fff; font-size: 12px; font-weight: 650; border: none; cursor: pointer;
}
.swipe-act.ok { background: var(--ok); }
.swipe-act.accent { background: var(--accent); }
.swipe-act.warn { background: color-mix(in oklab, var(--warn) 80%, #000 6%); }

/* ---- checkpoint rail ---- */
.cp-rail { display: flex; align-items: stretch; gap: 0; min-width: 0; padding: 4px 2px; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
.cp-rail::-webkit-scrollbar { display: none; }
.cp {
  flex: 1 0 56px; min-width: 56px; display: flex; flex-direction: column; align-items: center; gap: 7px;
  cursor: pointer; position: relative; padding: 4px 2px;
}
.cp .cp-node {
  width: 30px; height: 30px; border-radius: 999px; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface); border: 2px solid var(--line); color: var(--text-3);
  transition: all .18s ease;
}
.cp[data-done="true"] .cp-node { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cp[data-pending="true"] .cp-node { border-color: var(--warn); border-style: dashed; color: var(--warn); }
.cp .cp-line { position: absolute; top: 18px; height: 2px; background: var(--line); left: -50%; right: 50%; z-index: 0; }
.cp:first-child .cp-line { display: none; }
.cp[data-done="true"] .cp-line, .cp[data-fill="true"] .cp-line { background: var(--accent); }
.cp .cp-lbl { font-size: 10.5px; font-weight: 600; text-align: center; color: var(--text-3); line-height: 1.15; }
.cp[data-done="true"] .cp-lbl { color: var(--text); }
.cp .cp-time { font-size: 9.5px; color: var(--text-3); }

/* ---- task row (tap to cycle) ---- */
.task { display: flex; align-items: center; gap: 12px; padding: 12px 4px; cursor: pointer; }
.task + .task { border-top: 1px solid var(--line-2); }
.task .tbox {
  width: 24px; height: 24px; border-radius: 8px; flex-shrink: 0;
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: transparent; transition: all .16s ease;
}
.task[data-st="doing"] .tbox { border-color: var(--warn); color: var(--warn); border-style: solid; }
.task[data-st="done"] .tbox { background: var(--ok); border-color: var(--ok); color: #fff; }
.task[data-st="done"] .tlabel { color: var(--text-3); text-decoration: line-through; text-decoration-color: var(--text-3); }
.tlabel { flex: 1; font-size: 15px; font-weight: 500; }

/* ---- bottom tab bar ---- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: var(--vv-bottom-offset, 0px); z-index: 40;
  min-height: var(--tabbar-space);
  padding: 6px 12px var(--tabbar-bottom);
  display: flex; align-items: center; justify-content: space-around;
  background: var(--bg);
  backdrop-filter: blur(18px) saturate(180%);
  -webkit-backdrop-filter: blur(18px) saturate(180%);
  border-top: 1px solid var(--line);
  box-shadow: 0 -12px 30px color-mix(in oklab, var(--bg) 76%, transparent);
  transform: translateZ(0);
  will-change: bottom, transform;
  transition: transform .18s ease, opacity .18s ease;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  flex: 1; cursor: pointer; color: var(--text-3); padding: 4px 0;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0;
  min-width: 0; min-height: 44px; justify-content: center;
}
.tab[data-on="true"] { color: var(--accent); }
.tab.create { flex: 0 0 auto; }
.tab span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fab {
  width: 52px; height: 52px; border-radius: 17px; margin-top: -14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: var(--shadow-fab); cursor: pointer; transition: transform .12s ease;
}
.fab:active { transform: scale(0.92) rotate(90deg); }

/* ---- sync banner ---- */
.sync-bar {
  display: flex; align-items: center; gap: 9px;
  margin: 0 var(--page-pad-x) 14px; padding: 9px 14px; border-radius: 12px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: var(--ok-soft); color: var(--ok);
  border: 1px solid color-mix(in oklab, var(--ok) 22%, var(--line));
}
.sync-bar[data-state="offline"] { background: var(--warn-soft); color: color-mix(in oklab, var(--warn) 72%, var(--text)); border-color: color-mix(in oklab, var(--warn) 30%, var(--line)); }
.sync-bar[data-state="syncing"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.sync-bar .grow { flex: 1; }
.sync-proof-btn {
  width: 44px; height: 44px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid currentColor; background: transparent; color: currentColor;
  opacity: .78; cursor: pointer;
}
.sync-proof-btn:disabled { opacity: .5; cursor: default; }
.queue-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 600; color: var(--warn); }
.pending-dot { width: 7px; height: 7px; border-radius: 999px; background: var(--warn); box-shadow: 0 0 0 0 color-mix(in oklab, var(--warn) 60%, transparent); animation: pulse 2s infinite; }
@keyframes pulse { 0%{box-shadow:0 0 0 0 color-mix(in oklab,var(--warn) 55%,transparent);} 70%{box-shadow:0 0 0 6px transparent;} 100%{box-shadow:0 0 0 0 transparent;} }
.spin { animation: spin 0.9s linear infinite; transform-origin: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---- bottom sheet ---- */
.sheet-scrim {
  position: absolute; inset: 0; z-index: 70; background: rgba(20,18,14,0.4);
  backdrop-filter: blur(2px); opacity: 0; animation: scrim .2s ease forwards;
}
@keyframes scrim { to { opacity: 1; } }
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 71;
  background: var(--bg); border-radius: 26px 26px 0 0;
  box-shadow: var(--shadow-pop); border-top: 1px solid var(--line);
  transform: translateY(100%); animation: sheetup .32s cubic-bezier(.22,1,.36,1) forwards;
  width: 100%; min-width: 0; max-height: 90%; display: flex; flex-direction: column; overflow: hidden;
  padding-bottom: calc(18px + var(--safe-bottom));
}
@keyframes sheetup { to { transform: translateY(0); } }
.sheet-grip { width: 40px; height: 5px; border-radius: 999px; background: var(--line); margin: 10px auto 4px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-width: 0; flex-shrink: 0; padding: 8px var(--page-pad-x) 12px; }
.sheet-head > div:first-child { min-width: 0; }
.sheet-head .icon-btn { flex-shrink: 0; }
.sheet-body {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: 0 var(--page-pad-x) 8px;
  scrollbar-width: none;
}
.sheet-body::-webkit-scrollbar { display: none; }

/* quick-create grid */
.qa-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qa-item {
  display: flex; flex-direction: column; gap: 10px; padding: 18px;
  border-radius: 18px; cursor: pointer; text-align: left;
  background: var(--surface); border: 1px solid var(--line);
  transition: transform .1s ease;
}
.qa-item:active { transform: scale(0.97); }
.qa-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); }

/* ---- form fields ---- */
.field { margin-bottom: 14px; }
.field-lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin: 0 0 6px 2px; }
.input, .textarea {
  width: 100%; min-width: 0; max-width: 100%; font-family: var(--ui-font); font-size: 16px; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 13px;
  padding: 13px 14px; outline: none; transition: border-color .14s ease;
}
.input > input,
.input > select { min-width: 0; max-width: 100%; }
.input:focus, .textarea:focus { border-color: var(--accent); }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.textarea { resize: none; min-height: 80px; line-height: 1.45; }
.seg { display: flex; gap: 6px; min-width: 0; max-width: 100%; background: var(--surface-2); border: 1px solid var(--line); border-radius: 13px; padding: 4px; }
.seg button {
  flex: 1; min-width: 0; min-height: 44px; border: none; background: transparent; cursor: pointer; border-radius: 9px;
  padding: 9px 4px; font-family: var(--ui-font); font-size: 14px; font-weight: 600; color: var(--text-2);
  transition: all .14s ease; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.seg button[data-on="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-card); }

/* time/preset selector */
.preset-row { display: flex; gap: 8px; flex-wrap: wrap; }
.preset {
  min-height: 44px; max-width: 100%; padding: 0 14px; border-radius: 11px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); color: var(--text-2);
  font-size: 14px; font-weight: 600; display: inline-flex; align-items: center; overflow: hidden; text-overflow: ellipsis;
}
.preset[data-on="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

/* hero "next up" card */
.hero {
  margin: 0 var(--page-pad-x); border-radius: var(--r-card); overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-card);
}
.hero-top { padding: 16px 18px 14px; display: flex; flex-direction: column; gap: 12px; }
.hero-strip {
  display: flex; align-items: stretch; border-top: 1px solid var(--line);
}
.hero-strip > div { flex: 1; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.hero-strip > div + div { border-left: 1px solid var(--line); }
.hero-strip .k { font-size: 11px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0; }
.hero-strip .v { font-size: 15px; font-weight: 650; }

/* tools screen */
.tool-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tool-metric {
  min-width: 0;
  min-height: 92px;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
}
.tool-metric:last-child:nth-child(odd) { grid-column: 1 / -1; }
.tool-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.tool-shortcut {
  min-width: 0;
  min-height: 92px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px;
  text-align: left;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-card);
  font-family: var(--ui-font);
  cursor: pointer;
}
.tool-shortcut:active { transform: scale(0.98); }
.tool-shortcut-title,
.tool-shortcut-sub {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tool-shortcut-title { font-size: 14.5px; font-weight: 700; }
.tool-shortcut-sub { margin-top: 2px; font-size: 12px; color: var(--text-3); }

.mobile-list-count {
  margin: 0 4px 9px;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 600;
}
.mobile-list-more { margin-top: 12px; }
.mobile-list-more .t-xs { margin-left: auto; }
.audit-editor {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  width: 100%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.audit-suggestion {
  align-self: flex-start;
  max-width: 100%;
}

/* image placeholder (striped) */
.imgph {
  background-image: repeating-linear-gradient(45deg, var(--line-2) 0 10px, transparent 10px 20px);
  background-color: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-family: var(--mono-font); font-size: 11px;
  border-radius: var(--r-md); border: 1px solid var(--line);
}

/* map placeholder */
.mapph {
  position: relative; border-radius: var(--r-card); overflow: hidden;
  border: 1px solid var(--line); background: var(--surface-2);
  background-image:
    linear-gradient(var(--line-2) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 28px 28px;
}

/* route stop list */
.route-stop { display: flex; gap: 14px; padding: 0 4px; }
.route-rail { display: flex; flex-direction: column; align-items: center; width: 24px; flex-shrink: 0; }
.route-pin { width: 24px; height: 24px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.route-pin.start { background: var(--text); color: var(--bg); }
.route-conn { flex: 1; width: 2px; background: var(--line); min-height: 22px; margin: 3px 0; }
.travel-leg { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); font-weight: 600; padding: 8px 0; }

/* toast */
.toast {
  position: absolute; left: 50%; bottom: 118px; transform: translateX(-50%) translateY(8px);
  z-index: 80; background: var(--text); color: var(--bg);
  width: max-content; max-width: calc(100% - 32px);
  padding: 11px 18px; border-radius: 13px; font-size: 14px; font-weight: 600;
  box-shadow: var(--shadow-pop); display: flex; align-items: center; gap: 9px;
  opacity: 0; animation: toastin .26s ease forwards; white-space: normal; overflow-wrap: anywhere; text-align: center;
}
@keyframes toastin { to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* slide-in detail route */
.route-view {
  position: absolute; inset: 0; z-index: 30; background: var(--bg);
  display: flex; flex-direction: column; min-width: 0; max-width: 100%; overflow: hidden;
  transform: translateX(100%); animation: slidein .3s cubic-bezier(.22,1,.36,1) forwards;
}
@keyframes slidein { to { transform: translateX(0); } }
.detail-nav {
  position: absolute; top: 0; left: 0; right: 0; z-index: 10;
  padding: calc(max(14px, var(--safe-top)) + 12px) 14px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: color-mix(in oklab, var(--bg) 72%, transparent);
  backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
}
.detail-nav.flat { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.route-view > .scroll { padding-top: calc(max(14px, var(--safe-top)) + 72px) !important; }

.divider { height: 1px; background: var(--line); margin: 0 20px; }
.spacer8 { height: 8px; } .spacer12 { height: 12px; } .spacer16 { height: 16px; } .spacer24 { height: 24px; }

.kv { display: flex; align-items: baseline; justify-content: space-between; padding: 11px 0; gap: 16px; }
.kv + .kv { border-top: 1px solid var(--line-2); }
.kv .k { color: var(--text-2); font-size: 14px; font-weight: 500; flex-shrink: 0; }
.kv .v { min-width: 0; font-size: 14.5px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.tap { cursor: pointer; transition: opacity .12s ease; } .tap:active { opacity: 0.6; }
.section-title > .tap {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 6px;
  margin: -8px -6px;
}

/* mini month calendar (mobile date picker) */
.minical { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; }
.minical-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.minical-title { font-weight: 700; font-size: 15px; }
.minical-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.minical-dow { margin-bottom: 4px; }
.minical-dowc { text-align: center; font-size: 11px; font-weight: 700; color: var(--text-3); text-transform: uppercase; padding: 2px 0; }
.minical-day {
  aspect-ratio: 1; border-radius: 10px; cursor: pointer;
  font-size: 14.5px; font-weight: 550; color: var(--text);
  display: flex; align-items: center; justify-content: center; transition: background .1s;
}
.minical-day[data-today="true"] { color: var(--accent); font-weight: 750; }
.minical-day[data-sel="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.minical-day[data-disabled="true"] { color: var(--text-3); opacity: 0.38; }
.minical-day:active:not([data-disabled="true"]) { background: var(--surface-2); }

.flex { display: flex; min-width: 0; } .between { justify-content: space-between; } .center { align-items: center; }
.wrap { flex-wrap: wrap; }
.gap6 { gap: 6px; } .gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.grow { flex: 1; min-width: 0; }
.wrap-anywhere { overflow-wrap: anywhere; }

html[data-keyboard-open="true"] .tabbar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(calc(100% + 16px));
}
html[data-keyboard-open="true"] .toast { bottom: 22px; }

@media (max-width: 360px) {
  .contact-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tool-shortcuts { grid-template-columns: 1fr; }
  .hero-strip > div { padding-inline: 10px; }
  .lrow .btn.sm { padding-inline: 11px; }
}

@media (max-width: 340px) {
  :root {
    --page-pad-x: 16px;
    --page-top: calc(max(12px, var(--safe-top)) + 14px);
    --tabbar-space: calc(62px + var(--tabbar-bottom));
    --r-card: 18px;
  }

  .t-h1 { font-size: 28px; line-height: 1.16; }
  .t-h2 { font-size: 20px; line-height: 1.15; }
  .t-h3 { font-size: 16px; line-height: 1.2; }
  .t-body { font-size: 14.5px; }

  .screen-head { padding-bottom: 12px; }
  .icon-btn { width: 42px; height: 42px; border-radius: 12px; }
  .btn { height: 46px; padding: 0 16px; border-radius: 13px; }
  .btn.sm { height: 44px; padding: 0 12px; font-size: 14px; }

  .lrow { gap: 11px; padding: 13px 14px; }
  .mono-av { width: 40px; height: 40px; border-radius: 12px; }
  .mono-av.sm { width: 34px; height: 34px; }

  .tabbar { padding-inline: 8px; }
  .tab { font-size: 10px; gap: 2px; }
  .tab svg { width: 22px; height: 22px; }
  .fab { width: 50px; height: 50px; border-radius: 16px; }
  .tool-metrics,
  .tool-shortcuts { gap: 8px; }
  .tool-metric { min-height: 86px; padding: 11px; gap: 9px; }
  .tool-shortcut { min-height: 86px; padding: 10px; gap: 9px; }
  .tool-shortcut .qa-ic { width: 36px; height: 36px; }
  .tool-shortcut-title { font-size: 13.5px; }

  .sync-bar { gap: 8px; padding: 8px 12px; font-size: 12.5px; }
  .sync-bar .grow + span { display: none; }
  .sync-proof-btn + span { display: none; }

  .hero-top { padding: 14px; gap: 11px; }
  .hero-strip > div { min-width: 0; padding: 10px 11px; }
  .hero-strip .k { font-size: 10.5px; }
  .hero-strip .v { font-size: 14px; line-height: 1.25; overflow-wrap: anywhere; }

  .sheet { border-radius: 22px 22px 0 0; }
  .sheet-head { padding-top: 6px; }
  .qa-grid { gap: 10px; }
  .qa-item { gap: 9px; min-height: 124px; padding: 14px; border-radius: 16px; }
  .qa-ic { width: 38px; height: 38px; border-radius: 12px; }
}
