/* QuotaVPN phone UI.
   Tokens are the desktop app's own (desktop/ui-next/src/index.css): charcoal
   surface ladder, silver hairlines, one royal-blue accent, green only while a
   session is actually live, amber only for a caveat, red only for a failure.
   Layout is new: one stage on Home, one reading on Speed, one list everywhere
   else. Phone rules that never change: the layout never mirrors for Arabic
   (only the text direction does), every target is at least 44px, nothing is
   wider than the viewport. */

@font-face {
  font-family: "Cairo";
  src: url("fonts/cairo-ar.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFC;
}
@font-face {
  font-family: "Cairo";
  src: url("fonts/cairo-la.woff2") format("woff2");
  font-weight: 200 1000;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --bg0: #08090a;
  --bg1: #0b0c0e;
  --panel: #0f1113;
  --panel-hi: #14171a;
  --field: #14171a;
  --line: rgb(255 255 255 / 0.07);
  --line-strong: rgb(255 255 255 / 0.13);
  --txt: #f3f5f7;
  --txt2: #a3aab3;
  --txt3: #858c97;
  --accent: #2c5fd8;
  --accent-hi: #3d7bff;
  --accent-strong: #7fa6ff;
  --accent-bg: rgb(44 95 216 / 0.13);
  --accent-line: rgb(44 95 216 / 0.38);
  --green: #5fb08c;
  --green-bg: rgb(95 176 140 / 0.12);
  --green-line: rgb(95 176 140 / 0.34);
  --amber: #c99b5c;
  --amber-bg: rgb(201 155 92 / 0.12);
  --amber-line: rgb(201 155 92 / 0.34);
  --red: #d0797f;
  --red-bg: rgb(208 121 127 / 0.12);
  --red-line: rgb(208 121 127 / 0.34);
  --r-lg: 20px;
  --r-card: 16px;
  --r-md: 12px;
  --r-in: 8px;
  --ease: cubic-bezier(0.2, 0.9, 0.25, 1);
  --tab-h: 54px;
  /* The bottom strip is reserved even when the platform reports no inset: a
     bar drawn under the gesture pill is worse than an empty strip. */
  --inset-b: max(34px, env(safe-area-inset-bottom, 0px));
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: max(env(safe-area-inset-top, 0px), 26px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg0);
  color: var(--txt);
  font-family: "Cairo", system-ui, -apple-system, Roboto, "Segoe UI", Tahoma, sans-serif;
  font-size: 14px;
  /* Cairo sits high in its line box: 1.6 keeps every glyph inside the box. */
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  touch-action: manipulation;
}
/* Arabic: the text reads right to left, the layout does not mirror. */
[lang="ar"] body, [lang="ar"] button, [lang="ar"] input { text-align: right; }
/* Arabic strings that carry a Latin word (IP, WireGuard, Hysteria2) take their
   base direction from their own first strong character, so the Latin fragment
   lands at the reading end. This is text direction only: `direction` on the
   layout boxes is untouched, so nothing mirrors. */
[lang="ar"] main *,
[lang="ar"] .tabbar *,
[lang="ar"] .toast *,
[lang="ar"] .sheet * { unicode-bidi: plaintext; }
[lang="ar"] .state, [lang="ar"] .dial-cap, [lang="ar"] .tabbar button,
[lang="ar"] .b, [lang="ar"] .sstat, [lang="ar"] .read { text-align: center; }
button, input { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
button:disabled { cursor: default; }
svg { display: block; }
h1, h2, p { margin: 0; }
::selection { background: var(--accent-bg); }

main {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding-bottom: calc(var(--tab-h) + var(--inset-b));
  min-height: 0;
}

/* ---------------------------------------------------------------- views */
.view { display: none; flex: 1; min-height: 0; flex-direction: column; }
.view.on { display: flex; }
.body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px calc(24px + var(--safe-b));
}
.head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: calc(8px + var(--safe-t)) 16px 8px;
}
.head .title { font-size: 21px; font-weight: 650; letter-spacing: -0.01em; }
.head .sub {
  flex: 1;
  min-width: 0;
  text-align: end;
  font-size: 12px;
  color: var(--txt3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-inline-start: 2px;
}
.head .title + .sub { flex: 1; }
.head .title:first-child { flex: 1; }
.mark { width: 26px; height: 26px; border-radius: 7px; }
.wordmark { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.ver { font-size: 12px; color: var(--txt3); margin-inline-start: auto; }
.icon-btn {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--txt2);
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { background: rgb(255 255 255 / 0.06); }
.icon-btn.spin svg { animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.text-btn {
  min-height: 44px;
  padding: 0 4px;
  font-size: 13px;
  color: var(--accent-strong);
}
.text-btn.armed { color: var(--red); }
.chev { width: 16px; height: 16px; flex: 0 0 auto; color: var(--txt3); }

/* ---------------------------------------------------------------- home */
#view-connect { overflow: hidden; }
.stage {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  /* One group, centred: the state over the control it describes, and the exit
     reading under it. The air divides evenly above and below, so the stage
     reads as placed rather than stretched. */
  justify-content: center;
  padding: 8px 24px calc(12px + var(--safe-b));
  text-align: center;
}
.stage-top { display: flex; flex-direction: column; align-items: center; gap: 10px; max-width: 100%; margin-bottom: 26px; }
.state {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--txt);
  transition: color 180ms var(--ease);
}
/* Green only while a session is actually live. */
.stage.live .state { color: var(--green); }
.stage.busy .state { color: var(--amber); }
.stage.fail .state { color: var(--red); }
.route {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  max-width: 100%;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  color: var(--txt2);
  transition: box-shadow 140ms var(--ease);
}
.route:active { box-shadow: inset 0 0 0 1px var(--line-strong); }
.route .r-pkg { color: var(--txt); font-weight: 600; }
.route .r-dom { color: var(--txt2); max-width: 42vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.route .r-tr { color: var(--txt3); }
.route .r-tr.warn { color: var(--amber); }
.route .r-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); flex: 0 0 auto; }
.session {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--txt2);
}
.session .s-time { color: var(--txt); font-weight: 600; }
.session .s-v { display: inline-flex; align-items: center; gap: 4px; }
.session i { font-style: normal; color: var(--txt3); font-size: 12px; }
.session .s-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--line-strong); }
.note { font-size: 12px; color: var(--txt3); max-width: 78vw; }

.dial { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.dial-btn {
  position: relative;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--txt2);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: color 200ms var(--ease), box-shadow 220ms var(--ease), background-color 200ms var(--ease), transform 120ms var(--ease);
}
.dial-btn svg { width: 64px; height: 64px; }
.dial-btn:active { transform: scale(0.975); }
.dial-btn:disabled { opacity: 0.7; }
.stage.live .dial-btn {
  color: var(--green);
  background: var(--green-bg);
  box-shadow: inset 0 0 0 1px var(--green-line), 0 0 0 8px rgb(95 176 140 / 0.06);
}
.stage.busy .dial-btn { color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-line); }
.stage.fail .dial-btn { color: var(--red); box-shadow: inset 0 0 0 1px var(--red-line); }
.dial-cap { font-size: 14px; font-weight: 600; color: var(--txt); }
.stage.live .dial-cap { color: var(--green); }

.exit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 44px;
  max-width: 100%;
  margin-top: 30px;
}
.exit-k { font-size: 12px; color: var(--txt3); letter-spacing: 0.02em; }
.exit-v { display: inline-flex; align-items: baseline; gap: 8px; max-width: 100%; }
.exit-v b { font-size: 13px; font-weight: 600; color: var(--txt2); }
.exit-sep { font-size: 12px; color: var(--txt3); }
.exit-p { font-size: 12px; color: var(--txt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- tabbar */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  align-items: stretch;
  height: calc(var(--tab-h) + var(--inset-b));
  padding: 0 6px var(--inset-b);
  background: var(--bg1);
  border-top: 1px solid var(--line);
}
.tabbar button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--txt3);
  font-size: 12px;
  transition: color 140ms var(--ease);
}
.tabbar button svg { width: 22px; height: 22px; }
.tabbar button.on { color: var(--txt); }
.tabbar button.on svg { color: var(--accent-strong); }
.tabbar button span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- shared controls */
.primary, .second {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 52px;
  border-radius: var(--r-md);
  font-size: 15px;
  font-weight: 650;
  transition: transform 120ms var(--ease), background-color 140ms var(--ease), opacity 140ms var(--ease);
}
.primary { background: var(--accent); color: #fff; }
.primary:active { transform: scale(0.985); }
.primary:disabled { opacity: 0.55; }
.second { background: var(--panel); color: var(--txt); box-shadow: inset 0 0 0 1px var(--line-strong); }
.chip {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--txt2);
  box-shadow: inset 0 0 0 1px var(--line-strong);
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.chip:active { background: rgb(255 255 255 / 0.05); }
.chip.brand { color: var(--accent-strong); box-shadow: inset 0 0 0 1px var(--accent-line); }
.seg {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
}
.seg button {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0 8px;
  border-radius: 9px;
  font-size: 13px;
  color: var(--txt3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 140ms var(--ease), color 140ms var(--ease);
}
.seg button.on { background: var(--accent-bg); color: var(--txt); box-shadow: inset 0 0 0 1px var(--accent-line); }
.seg.small { flex: 0 0 auto; }
.seg.small button { min-width: 56px; }
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 12px;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
}
.search .s-ico { width: 17px; height: 17px; color: var(--txt3); flex: 0 0 auto; }
.search input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: none;
  background: none;
  font-size: 14px;
  color: var(--txt);
}
.search input::placeholder { color: var(--txt3); }
.empty { padding: 24px 4px; font-size: 13px; color: var(--txt3); text-align: center; }

/* ---------------------------------------------------------------- speed */
.sp-body { display: flex; flex-direction: column; gap: 16px; }
.read { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 0 2px; }
.read-num { display: flex; align-items: baseline; gap: 8px; }
.read-num b { font-size: 56px; font-weight: 650; letter-spacing: -0.035em; color: var(--txt); }
.read-num span { font-size: 16px; color: var(--txt2); }
.read-cap { font-size: 13px; color: var(--txt2); }
.read-peak { font-size: 12px; color: var(--txt3); }
.dest {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 3px 10px;
  grid-auto-rows: max-content;
  align-items: start;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: start;
  min-height: 64px;
}
.dest.flat { min-height: 56px; }
.dest .k { grid-column: 1; font-size: 12px; line-height: 1.3; color: var(--txt3); }
.dest .v { grid-column: 1 / -1; display: flex; align-items: center; gap: 6px; min-width: 0; }
.dest .v .chev { margin-inline-start: auto; }
.dest .v b { font-size: 14px; font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest .s { grid-column: 1 / -1; font-size: 12px; line-height: 1.3; color: var(--txt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dest.flat .v { grid-column: 1 / -1; font-size: 14px; font-weight: 600; color: var(--txt); }
.cells {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--r-md);
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--line);
}
.sstat {
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 2px;
  line-height: 1.25;
  background: var(--panel);
  transition: background-color 140ms var(--ease);
}
.sstat:active { background: var(--panel-hi); }
.sstat i { font-style: normal; font-size: 12px; line-height: 1.25; color: var(--txt3); }
.sstat b { font-size: 16px; font-weight: 650; color: var(--txt); }
.sstat span { font-size: 12px; line-height: 1.25; color: var(--txt3); }
.sstat:disabled { opacity: 0.55; }
.hint { min-height: 18px; font-size: 12px; color: var(--txt3); text-align: center; }
.run { display: flex; flex-direction: column; gap: 8px; }
.run .primary { height: auto; min-height: 52px; padding: 12px 16px; line-height: 1.2; }
.rowlink {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 14px;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  text-align: start;
}
.rowlink .rl-t { font-size: 14px; font-weight: 600; color: var(--txt); }
.rowlink .rl-s { flex: 1; min-width: 0; font-size: 12px; color: var(--txt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------------------------------------------------------- history */
.best {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border-radius: var(--r-card);
  background: var(--line);
  box-shadow: inset 0 0 0 1px var(--line);
  margin-bottom: 14px;
}
.best .b {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 12px 4px;
  background: var(--panel);
}
.best .b span { font-size: 12px; color: var(--txt3); }
.best .b b { font-size: 16px; font-weight: 650; color: var(--txt); }
.best .b i { font-style: normal; font-size: 12px; color: var(--txt3); }
.hist-day { padding: 14px 2px 8px; font-size: 12px; color: var(--txt3); }
.hist-list { display: flex; flex-direction: column; }
.hrow {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 8px 2px 8px 0;
  border-bottom: 1px solid var(--line);
}
.hrow:last-child { border-bottom: 0; }
.hrow .h-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.hrow .h-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.hrow .h-time { font-size: 13px; font-weight: 600; color: var(--txt); }
.hrow .h-tgt { font-size: 12px; color: var(--txt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow .h-fig { display: flex; align-items: baseline; gap: 4px; }
.hrow .h-fig b { font-size: 16px; font-weight: 650; color: var(--txt); }
.hrow .h-fig i { font-style: normal; font-size: 12px; color: var(--txt3); }
.hrow .h-sub { font-size: 12px; color: var(--txt3); }
.hrow .h-del {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-in);
  color: var(--txt3);
}
.hrow .h-del svg { width: 18px; height: 18px; }
.hrow .h-del.armed { color: var(--red); background: var(--red-bg); box-shadow: inset 0 0 0 1px var(--red-line); }

/* ---------------------------------------------------------------- apps */
.apps-body { display: flex; flex-direction: column; gap: 12px; }
.apps-line { font-size: 12px; color: var(--txt2); min-height: 18px; }
.apps-list { display: flex; flex-direction: column; }
.opt {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 56px;
  padding: 8px 2px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
.opt:last-child { border-bottom: 0; }
.opt .meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.opt .t { font-size: 14px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .sub { font-size: 12px; color: var(--txt3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt .check {
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-strong);
  color: transparent;
}
.opt .check svg { width: 13px; height: 13px; }
.opt[aria-selected="true"] .check { background: var(--accent-bg); box-shadow: inset 0 0 0 1px var(--accent-line); color: var(--accent-strong); }
.apps-list.mode-all .opt .check { opacity: 0.35; }

/* ---------------------------------------------------------------- settings */
.set-body { display: flex; flex-direction: column; gap: 14px; }
.group {
  display: flex;
  flex-direction: column;
  border-radius: var(--r-card);
  background: var(--panel);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.group .row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  text-align: start;
}
.group .row:last-child { border-bottom: 0; }
.row.flat { min-height: 44px; font-size: 13px; color: var(--txt2); }
.row.flat b { margin-inline-start: auto; font-size: 13px; font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.row.tap:active { background: var(--panel-hi); }
.row.tap .chev { margin-inline-start: 2px; }
.row-k { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-k b { font-size: 14px; font-weight: 600; color: var(--txt); }
.row-k i { font-style: normal; font-size: 12px; color: var(--txt3); }
.foot { padding: 4px 2px 8px; font-size: 12px; color: var(--txt3); text-align: center; }

/* ---------------------------------------------------------------- toast */
.toast {
  position: fixed;
  left: 12px;
  right: 12px;
  top: calc(8px + var(--safe-t));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 8px 8px 8px 14px;
  border-radius: var(--r-md);
  background: var(--panel-hi);
  box-shadow: 0 14px 34px rgb(0 0 0 / 0.55), inset 0 0 0 1px var(--line-strong);
}
.toast.err { box-shadow: 0 14px 34px rgb(0 0 0 / 0.55), inset 0 0 0 1px var(--red-line); }
.toast.updb { box-shadow: 0 14px 34px rgb(0 0 0 / 0.55), inset 0 0 0 1px var(--accent-line); }
.toast-i { flex: 0 0 auto; font-size: 14px; color: var(--red); }
.toast.updb .toast-i { color: var(--accent-strong); }
.toast-t { flex: 1; min-width: 0; font-size: 13px; color: var(--txt); }
.toast-x {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-in);
  font-size: 20px;
  line-height: 1;
  color: var(--txt3);
}

/* ---------------------------------------------------------------- sheet */
.sheet-back { position: fixed; inset: 0; z-index: 50; background: rgb(0 0 0 / 0.55); }
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 51;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
  max-height: calc(var(--vvh, 100vh) * 0.86);
  padding-bottom: var(--safe-b);
  background: var(--panel);
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  box-shadow: 0 -1px 0 var(--line-strong), 0 -24px 60px rgb(0 0 0 / 0.6);
  transform: translateY(102%);
  transition: transform 240ms var(--ease);
}
.sheet.open { transform: translateY(0); }
.sheet-grip { width: 36px; height: 4px; border-radius: 999px; background: var(--line-strong); margin: 8px auto 0; flex: 0 0 auto; }
.sheet-head { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 16px; flex: 0 0 auto; }
.sheet-title { flex: 1; min-width: 0; font-size: 16px; font-weight: 650; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-search { margin: 0 16px 8px; flex: 0 0 auto; }
.sheet-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 16px calc(16px + var(--safe-b));
}
.sheet-list .grp { padding: 14px 2px 4px; font-size: 12px; color: var(--txt3); }
.sheet-list .grp:first-child { padding-top: 4px; }
.sheet-list .opt { min-height: 56px; }
.sheet-form { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 4px; }
.sheet-form input {
  min-height: 52px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-md);
  background: var(--field);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 15px;
  color: var(--txt);
  outline: none;
}
.sheet-form input:focus { box-shadow: inset 0 0 0 1px var(--accent-line); }

@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
  .icon-btn.spin svg { animation: none; }
  .dial-btn, .primary { transition: none; }
}
