/* Hold app + admin portal — Tide components. Colors come only from tide-tokens.css,
   so both themes (Deep / Shallows, following the OS) work everywhere. */

*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; }
body {
  background: var(--ground); color: var(--ink); min-height: 100dvh;
  font: 400 16px/1.5 var(--font-sans); -webkit-font-smoothing: antialiased; overflow-x: clip;
}
[hidden], .hidden { display: none !important; }
a { color: var(--sea-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--sea); color: var(--on-sea); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Atmosphere */
.atmos { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.atmos i { position: absolute; border-radius: 50%; filter: blur(var(--blur-tide)); }
.atmos i:nth-child(1) { width: 70vmax; height: 70vmax; left: -30vmax; top: -40vmax; background: var(--tide-a); opacity: .35; animation: a-drift 30s ease-in-out infinite; }
.atmos i:nth-child(2) { width: 60vmax; height: 60vmax; right: -34vmax; bottom: -30vmax; background: var(--tide-b); opacity: .22; animation: a-drift 36s ease-in-out infinite reverse; }
@keyframes a-drift { 50% { transform: translate(8vw, 6vh) scale(1.1); } }

/* Shell */
.shell { max-width: 600px; margin: 0 auto; padding: calc(env(safe-area-inset-top, 0px) + 8px) max(16px, env(safe-area-inset-right, 0px)) calc(96px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px)); }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 56px; }
.topbar .logo { height: 24px; width: auto; display: block; }
.topbar .by { font-size: 11.5px; font-weight: 600; color: var(--ink-subtle); white-space: nowrap; margin: 3px auto 0 -2px; }
.who { font-size: 13px; color: var(--ink-subtle); text-align: right; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.title { margin: 18px 0 4px; font-size: 30px; font-weight: 300; letter-spacing: -.025em; line-height: 1.15; text-wrap: balance; }
.lead { margin: 0 0 16px; color: var(--ink-muted); font-size: 15px; }
.h { margin: 26px 0 10px; font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-subtle); }
.muted { color: var(--ink-muted); font-size: 14px; }
.subtle { color: var(--ink-subtle); font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); font-size: 13px; }

/* Glass card */
.card { position: relative; margin-top: 12px; padding: 18px; border-radius: var(--radius-lg); background: var(--glass); border: 1px solid var(--line);
  box-shadow: var(--shadow-float); backdrop-filter: blur(var(--blur-glass)) saturate(130%); -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(130%); }
.card > b:first-child, .card .ct { display: block; font-size: 17px; font-weight: 600; letter-spacing: -.01em; }
.card.attention { border-color: color-mix(in srgb, var(--mist) 55%, transparent); background: linear-gradient(160deg, var(--mist-soft), var(--glass) 60%); }
.card.welcome { border-color: color-mix(in srgb, var(--sea) 45%, transparent); background: linear-gradient(160deg, var(--sea-soft), var(--glass) 60%); }

/* Forms */
label { display: block; margin: 14px 0 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; min-height: 50px; padding: 0 16px; border-radius: var(--radius-md); border: 1px solid var(--line-strong);
  background: color-mix(in srgb, var(--ground) 50%, transparent); color: var(--ink); font-size: 16px;
  transition: border-color var(--dur-quick), box-shadow var(--dur-quick);
}
textarea { min-height: 84px; padding: 12px 16px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--ink-subtle); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 4px var(--sea-soft); }
select { appearance: none; padding-right: 40px; background-image: linear-gradient(45deg, transparent 50%, var(--ink-muted) 50%), linear-gradient(135deg, var(--ink-muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 52%, calc(100% - 16px) 52%; background-size: 6px 6px; background-repeat: no-repeat; }
input[type="checkbox"] { width: 22px; height: 22px; min-height: 0; padding: 0; accent-color: var(--sea); }
.warn { margin-top: 6px; font-size: 13px; color: var(--ember-text); display: flex; gap: 6px; align-items: flex-start; }
.err { color: var(--danger); font-size: 14px; }
.row { display: flex; gap: 10px; } .row > * { flex: 1; min-width: 0; }

/* Buttons */
button, a.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 22px;
  border-radius: var(--radius-pill); border: 1px solid transparent; background: var(--sea); color: var(--on-sea);
  font-weight: 700; font-size: 16px; letter-spacing: -.005em; cursor: pointer; text-decoration: none;
  box-shadow: var(--shadow-glow-sea); transition: transform var(--dur-quick) var(--ease-settle), background var(--dur-quick), box-shadow var(--dur-settle);
}
button:active, a.btn:active { transform: scale(.97); }
button:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }
button.secondary, a.btn.secondary { background: var(--glass); color: var(--ink); border-color: var(--line-strong); box-shadow: none; font-weight: 600; }
button.secondary:hover { background: var(--glass-strong); }
button.danger { background: transparent; color: var(--danger); border-color: color-mix(in srgb, var(--danger) 50%, transparent); box-shadow: none; font-weight: 600; }
button.ember { background: var(--ember); color: var(--on-ember); box-shadow: var(--shadow-glow-ember); }
button.small, .acts > button, .acts > a.btn { min-height: 44px; padding: 0 16px; font-size: 15px; width: auto; }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.acts > * { flex: 1 1 auto; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }

/* Pills & badges */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.ok, .pill.sea { background: var(--sea-soft); color: var(--sea-text); }
.pill.warn { background: var(--warning-soft); color: var(--warning); }
.pill.bad { background: var(--danger-soft); color: var(--danger); }
.pill.mist { background: var(--mist-soft); color: var(--mist-text); }
.pill.ember { background: var(--ember-soft); color: var(--ember-text); }
.pill.plain { background: var(--glass-strong); color: var(--ink-muted); }
.pill.live::before { animation: blink 1.6s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 600; color: var(--ink-muted); vertical-align: 1px; }

/* Lists */
ul.list { list-style: none; margin: 0; padding: 0; }
ul.list > li { padding: 14px 2px; border-top: 1px solid var(--line); }
ul.list > li:first-child { border-top: 0; }
ul.list.cards > li { margin-top: 10px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--glass); }
.li-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.li-row > div { min-width: 0; }

/* Bottom tabs */
nav.tabs { position: fixed; left: 50%; translate: -50% 0; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 20; display: flex; gap: 2px; padding: 6px;
  width: min(560px, calc(100% - 24px)); border-radius: 26px; background: color-mix(in srgb, var(--raised) 78%, transparent); border: 1px solid var(--line);
  backdrop-filter: blur(var(--blur-glass)) saturate(150%); -webkit-backdrop-filter: blur(var(--blur-glass)) saturate(150%); box-shadow: var(--shadow-float); }
nav.tabs button { flex: 1; min-height: 56px; padding: 0 4px; flex-direction: column; gap: 3px; border-radius: 20px; background: transparent; color: var(--ink-subtle);
  box-shadow: none; font-size: 11.5px; font-weight: 700; letter-spacing: .01em; }
nav.tabs button .icon { width: 22px; height: 22px; }
nav.tabs button[aria-current="true"] { color: var(--ink); background: var(--glass-strong); }
nav.tabs button[aria-current="true"] .icon { color: var(--sea-text); }

/* Line picker */
.lines { display: grid; gap: 8px; margin-top: 6px; }
.line-opt { position: relative; display: block; margin: 0; }
.line-opt input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.line-opt span { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid var(--line-strong); font-weight: 600; font-size: 15px;
  transition: border-color var(--dur-quick), background var(--dur-quick); }
.line-opt small { display: block; font-weight: 500; font-size: 13px; color: var(--ink-subtle); }
.line-opt input:checked + span { border-color: var(--sea); background: var(--sea-soft); }
.line-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 2px; }
.line-opt input:disabled + span { opacity: .55; }

/* Live hold */
.live-card { text-align: center; padding: 26px 18px 20px; }
.orb-stage { position: relative; display: grid; place-items: center; height: 220px; margin: 6px 0 4px; }
.orb { width: 168px; aspect-ratio: 1; background: radial-gradient(circle at 35% 30%, var(--orb-core), var(--sea) 42%, var(--tide-b) 100%);
  box-shadow: 0 0 90px color-mix(in srgb, var(--sea) 45%, transparent); animation: breathe var(--dur-breathe) ease-in-out infinite; }
.orb.mist { background: radial-gradient(circle at 35% 30%, var(--orb-core), var(--mist) 50%, var(--tide-b)); animation-duration: 3s; }
.orb.ember { background: radial-gradient(circle at 35% 30%, var(--orb-core), var(--ember) 60%); box-shadow: 0 0 90px color-mix(in srgb, var(--ember) 50%, transparent); animation-duration: 2.4s; }
@keyframes breathe { 0%, 100% { transform: scale(.86); border-radius: 48% 52% 55% 45% / 50% 45% 55% 50%; } 50% { transform: scale(1); border-radius: 55% 45% 48% 52% / 45% 55% 45% 55%; } }
.orb-stage .big { position: absolute; font-size: 46px; font-weight: 200; letter-spacing: -.045em; font-variant-numeric: tabular-nums; color: var(--on-sea); }
.state { display: inline-flex; margin-bottom: 4px; }
.wave { display: flex; align-items: center; justify-content: center; gap: 4px; height: 30px; margin: 4px 0 6px; }
.wave i { width: 3px; height: 6px; border-radius: 3px; background: var(--sea); opacity: .85; animation: wv 1.4s ease-in-out infinite; }
.wave i:nth-child(odd) { animation-delay: -.3s; } .wave i:nth-child(3n) { animation-delay: -.7s; } .wave i:nth-child(4n) { animation-delay: -1s; }
@keyframes wv { 50% { height: 24px; } }
.rail { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 14px 0 4px; }
.rail span { height: 4px; border-radius: 4px; background: var(--line-strong); transition: background var(--dur-settle); }
.rail span.on { background: var(--sea); }
.rail span.now { background: linear-gradient(90deg, var(--sea), var(--sea-soft)); background-size: 200% 100%; animation: flow 1.8s linear infinite; }
@keyframes flow { to { background-position: -200% 0; } }
.rail-labels { display: grid; grid-template-columns: repeat(4, 1fr); font-size: 11.5px; color: var(--ink-subtle); font-weight: 600; }

.rail-labels em { display: block; min-height: 15px; font-style: normal; font-family: var(--font-mono); font-size: 11px; font-weight: 400; color: var(--ink-subtle); }
.live-client { margin-top: 4px; font-size: 19px; font-weight: 650; letter-spacing: -.01em; overflow-wrap: anywhere; }
.live-line { margin-top: 2px; font-size: 13.5px; color: var(--ink-muted); }
.live-line .mono { color: var(--ink-subtle); white-space: nowrap; }
.live-now { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; margin: 12px auto 2px; padding: 8px 14px; border-radius: var(--radius-pill);
  background: var(--glass-strong); border: 1px solid var(--line); font-size: 14px; color: var(--ink); text-align: left; }
.live-now:empty { display: none; }
.live-now::before { content: ""; flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--sea); animation: blink 1.6s ease-in-out infinite; }
.live-now.done::before { animation: none; background: var(--ink-subtle); }
.path { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 14px; }
.step-chip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 6px 5px 12px; border-radius: var(--radius-pill); background: var(--glass); border: 1px solid var(--line-strong);
  font-size: 13px; color: var(--ink-muted); animation: settle var(--dur-settle) var(--ease-settle) both; }
.step-chip .key, .tl-d .key { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 6px; border-radius: 8px; background: var(--sea-soft); color: var(--sea-text);
  font-family: var(--font-mono); font-size: 13px; font-weight: 600; }
.path .arrow { align-self: center; color: var(--ink-subtle); font-size: 13px; }
.live-end { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.live-end .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; margin: 10px 0 0; font-size: 14px; }
.facts dt { color: var(--ink-subtle); } .facts dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }

/* Timeline */
.timeline li { display: grid; grid-template-columns: 76px minmax(0, 1fr) minmax(0, auto); align-items: start; gap: 12px; font-size: 14px; animation: settle var(--dur-settle) var(--ease-settle) both; }
.timeline .t { color: var(--ink-subtle); font-family: var(--font-mono); font-size: 12.5px; padding-top: 1px; }
.timeline .tl-w .n { margin-left: 6px; color: var(--ink-subtle); font-size: 12.5px; }
.tl-d { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 6px; max-width: 290px; text-align: right; font-size: 13px; color: var(--ink-muted); }
.tl-d .q { font-style: italic; color: var(--ink-subtle); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tl-d .opt-s { display: inline-flex; align-items: center; gap: 5px; }
.tl-d .key.mist { background: var(--mist-soft); color: var(--mist-text); }
.tl-d .tag { padding: 2px 8px; border-radius: var(--radius-pill); background: var(--glass-strong); color: var(--ink-muted); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tl-d .tag.ok { background: var(--sea-soft); color: var(--sea-text); } .tl-d .tag.warn { background: var(--warning-soft); color: var(--warning); }
.timeline li.hi .tl-w { font-weight: 650; }
@media (max-width: 520px) {
  .timeline li { grid-template-columns: 64px minmax(0, 1fr); }
  .tl-d { grid-column: 2; justify-content: flex-start; text-align: left; max-width: none; }
}
@keyframes settle { from { opacity: 0; transform: translateY(10px); } }

/* Menu choice */
.opt { justify-content: flex-start; text-align: left; margin-top: 8px; background: var(--glass); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; font-weight: 600; padding: 10px 14px; border-radius: var(--radius-md); }
.opt .k { flex: none; width: 34px; height: 34px; border-radius: 11px; background: var(--mist-soft); color: var(--mist-text); display: grid; place-items: center; font-weight: 800; }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.keypad button { background: var(--glass); color: var(--ink); border: 1px solid var(--line); box-shadow: none; font-size: 22px; font-weight: 400; border-radius: var(--radius-md); }
details > summary { cursor: pointer; color: var(--ink-muted); font-size: 14px; font-weight: 600; }

/* Chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 4px; scrollbar-width: none; }
.chip { flex: none; width: auto; min-height: 38px; padding: 0 14px; border-radius: var(--radius-pill); background: var(--glass); color: var(--ink-muted); border: 1px solid var(--line-strong); box-shadow: none; font-weight: 600; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--sea-soft); color: var(--ink); border-color: var(--sea); }
.chip.add { color: var(--sea-text); border-style: dashed; }

/* Handoff overlay */
.overlay { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px)); background: color-mix(in srgb, var(--ground) 88%, transparent);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); animation: fade var(--dur-settle) var(--ease-settle); }
@keyframes fade { from { opacity: 0; } }
.arrive { position: relative; width: 168px; aspect-ratio: 1; margin-bottom: 18px; }
.arrive .core { position: absolute; inset: 36px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, var(--orb-core), var(--ember) 62%); box-shadow: var(--shadow-glow-ember); }
.arrive .ripple { position: absolute; inset: 0; border-radius: 50%; border: 1.5px solid var(--ember); animation: ripple var(--dur-arrive) var(--ease-settle) infinite; }
.arrive .ripple:nth-child(2) { animation-delay: .8s; } .arrive .ripple:nth-child(3) { animation-delay: 1.6s; }
@keyframes ripple { from { transform: scale(.45); opacity: .9; } to { transform: scale(1.7); opacity: 0; } }
.arrive.ok .ripple { display: none; }
.arrive.ok .core { background: radial-gradient(circle at 35% 30%, var(--orb-core), var(--sea) 60%); box-shadow: var(--shadow-glow-sea); }
.arrive .glyph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--on-ember); }
.arrive.ok .glyph { color: var(--on-sea); }
.arrive .glyph .icon { width: 40px; height: 40px; stroke-width: 2; }
.overlay h1 { margin: 0; font-size: 30px; font-weight: 300; letter-spacing: -.025em; }

/* Toast */
.toast { position: fixed; left: 50%; translate: -50% 0; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); z-index: 60; width: min(520px, calc(100% - 32px));
  padding: 14px 18px; border-radius: var(--radius-md); background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow-float); font-size: 15px;
  animation: settle var(--dur-settle) var(--ease-settle); }

/* Gate screens (sign-in, terms) */
.gate { max-width: 460px; margin: 0 auto; padding-top: 6vh; }
.gate .mark { width: 64px; height: 64px; margin-bottom: 18px; }
.terms-box { max-height: 38vh; overflow: auto; padding: 14px 16px; border-radius: var(--radius-md); background: color-mix(in srgb, var(--ground) 50%, transparent); border: 1px solid var(--line); font-size: 14px; color: var(--ink-muted); }
.terms-box h3 { margin: 12px 0 4px; font-size: 14px; color: var(--ink); } .terms-box p { margin: 0 0 8px; }
.check-row { display: flex; gap: 12px; align-items: flex-start; margin: 16px 0; font-size: 15px; font-weight: 500; }
.check-row input { margin-top: 1px; flex: none; }

.ct-phone { font-variant-numeric: tabular-nums; }

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

/* Start */
.start-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 18px 0 4px; }
.start-head .title { margin: 0; }
.start-card { display: flex; flex-direction: column; gap: 12px; padding: 18px 16px; }
#holdPart, #selfPart, #topicPart { display: flex; flex-direction: column; gap: 12px; }
.lbl { display: block; margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-subtle); }
.hint { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--ink-subtle); }
.center { text-align: center; align-self: center; }
.sep { width: 100%; height: 1px; margin: 2px 0; border: 0; background: var(--line); }
.field-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.field-h .count { font-family: var(--font-mono); font-size: 12px; color: var(--ink-subtle); }
.field-h .count.full { color: var(--warning); }
.no-id { color: var(--ember-text); font-weight: 650; }
/* Calling row */
.target { display: flex; justify-content: flex-start; align-items: center; gap: 12px; min-height: 0; padding: 12px; border-radius: var(--radius-md); background: var(--glass-strong); border: 1px solid var(--line-strong);
  color: var(--ink); box-shadow: none; font-weight: 400; text-align: left; }
.target:hover { border-color: color-mix(in srgb, var(--sea) 55%, transparent); }
.t-ico { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 13px; background: var(--glass-strong); color: var(--ink-muted); font-size: 13px; }
.t-ico.hold { background: var(--sea-soft); color: var(--sea-text); }
.t-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t-main b { font-size: 15.5px; font-weight: 700; line-height: 1.3; }
.t-main .mono { color: var(--ink-muted); }
.t-change { flex: none; font-size: 13.5px; font-weight: 700; color: var(--sea-text); }
.quick { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -2px -16px 0; padding: 0 16px; }
.quick .chip { min-height: 36px; padding: 0 13px; font-size: 13.5px; }
.chip .star, .prow .star { color: var(--warning); margin-right: 2px; }
.chip.zero { opacity: .45; }
/* Self-call */
.info-box { display: flex; gap: 12px; padding: 14px; border-radius: var(--radius-md); background: var(--mist-soft); border: 1px solid color-mix(in srgb, var(--mist) 35%, transparent); }
.info-box .icon { color: var(--mist-text); margin-top: 1px; }
.info-box b { display: block; font-size: 14.5px; margin-bottom: 4px; }
.info-box span { font-size: 13px; color: var(--ink-muted); line-height: 1.45; }
a.btn.outline { background: transparent; color: var(--ink); border: 1.5px solid var(--sea); box-shadow: none; min-height: 54px; }
a.btn.outline .icon { color: var(--sea-text); }
.linkish.center { margin: 0 auto; }
/* Call options */
details.options { margin-top: 12px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--line); }
details.options > summary { list-style: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--ink); }
details.options > summary::-webkit-details-marker { display: none; }
details.options .o-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
details.options .o-main b { font-size: 14px; }
details.options .chev { width: 18px; height: 18px; color: var(--ink-subtle); transition: transform var(--dur-quick); }
details.options[open] .chev { transform: rotate(90deg); }
details.options .o-body { padding: 0 14px 14px; }
details.options .o-body .linkish { margin: 10px 0 0; padding: 0; }
/* Picker sheet */
dialog.sheet.picker { display: none; flex-direction: column; gap: 10px; height: min(760px, calc(100dvh - 32px)); padding: 16px 16px 8px; }
dialog.sheet.picker[open] { display: flex; }
.picker .chips { padding: 0 0 2px; }
.picker .chip { min-height: 34px; padding: 0 12px; font-size: 13px; }
.pick-list { flex: 1; overflow: auto; margin: 0 -16px; padding: 0 16px 16px; overscroll-behavior: contain; }
.pg-h { margin: 14px 0 6px; }
.pg-h:first-child { margin-top: 4px; }
.pgroup { border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
.prow { display: flex; justify-content: flex-start; align-items: center; gap: 10px; width: 100%; min-height: 0; padding: 11px 12px; border-radius: 0; background: transparent; border: 0;
  color: var(--ink); box-shadow: none; text-align: left; font-weight: 400; }
.prow + .prow { border-top: 1px solid var(--line); }
.prow:hover { background: var(--glass-strong); }
.prow.on { background: var(--sea-soft); }
.prow:active { transform: none; }
.pmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pmain b { font-size: 14.5px; font-weight: 650; line-height: 1.3; }
.psub { font-size: 12.5px; color: var(--ink-subtle); line-height: 1.4; }
.psub .mono { color: var(--ink-muted); font-size: 12.5px; white-space: nowrap; }
.pico { flex: none; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--glass-strong); color: var(--ink); }
.pico .icon { width: 18px; height: 18px; }
.prow.dial { margin-top: 14px; border: 1px dashed var(--line-strong); border-radius: var(--radius-md); }
.pmore { display: block; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.pnote { margin: 12px 2px 0; }
.pnote .linkish { display: inline; margin: 0; padding: 0; font-size: 12.5px; }
.tag { flex: none; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--glass-strong); color: var(--ink-muted); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.tag.sea { background: var(--sea-soft); color: var(--sea-text); }
mark { background: color-mix(in srgb, var(--warning) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
#ctSearchNote { margin: 2px 0 4px; } #ctSearchNote .linkish { display: inline; margin: 0; padding: 0; font-size: 12.5px; }
.step-h { display: flex; align-items: center; gap: 10px; margin: 22px 0 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.step-h:first-child { margin-top: 0; }
.step-h .n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--sea-soft); color: var(--sea-text); font-size: 12.5px; font-weight: 800; flex: none; }
.step-h .count { margin-left: auto; font-family: var(--font-mono); font-size: 12px; font-weight: 400; color: var(--ink-subtle); }
.step-h .count.full { color: var(--warning); }
.linkish { margin-left: auto; width: auto; min-height: 0; padding: 4px 2px; background: none; border: 0; box-shadow: none; color: var(--sea-text); font-size: 14px; font-weight: 600; }
.topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.topic { display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 3px; min-height: 64px; padding: 10px 12px; text-align: left;
  border-radius: var(--radius-md); background: color-mix(in srgb, var(--ground) 40%, transparent); color: var(--ink); border: 1px solid var(--line-strong); box-shadow: none; font-weight: 400;
  transition: border-color var(--dur-settle), background var(--dur-settle), transform .12s; }
.topic:hover:not(:disabled) { border-color: color-mix(in srgb, var(--sea) 55%, transparent); }
.topic:active:not(:disabled) { transform: scale(.985); }
.topic.on { border-color: var(--sea); background: linear-gradient(160deg, var(--sea-soft), transparent 75%); box-shadow: 0 0 0 3px var(--sea-soft); }
.topic:disabled { opacity: .5; }
.topic .tt { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14.5px; font-weight: 700; line-height: 1.25; }
.topic .tb { display: flex; gap: 4px; justify-content: flex-end; flex-wrap: wrap; }
.topic .ts { font-size: 12px; color: var(--ink-subtle); line-height: 1.35; }
.kbadge { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 7px; background: var(--mist-soft); color: var(--mist-text); font-family: var(--font-mono); font-size: 12px; font-weight: 600; }
.tbadge { padding: 2px 7px; border-radius: var(--radius-pill); background: var(--sea-soft); color: var(--sea-text); font-size: 11px; font-weight: 700; white-space: nowrap; }
.tbadge.usual { background: var(--glass-strong); color: var(--ink-muted); }
.more-lines { margin-top: 12px; } .more-lines .topics { margin-top: 10px; }
.recent { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.recent .chip, .rate-row .chip { min-height: 32px; padding: 0 12px; font-size: 13px; }
.setup-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.schip { padding: 5px 10px; border-radius: var(--radius-pill); background: var(--glass-strong); border: 1px solid var(--line); font-size: 12.5px; color: var(--ink-muted); }
.inline-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.inline-field label { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-muted); }
select.compact { width: auto; min-height: 38px; padding: 0 34px 0 12px; font-size: 14px; }
.start-btn { margin-top: 4px; min-height: 56px; font-size: 17px; }
.start-note { margin-top: -4px; text-align: center; }
.start-card .check-row { margin: 0; font-size: 14px; color: var(--ink-muted); }
/* History */
.hist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-top: 18px; }
#histFilter .chip { min-height: 34px; padding: 0 12px; font-size: 13px; }
.h.day { margin: 18px 0 6px; }
ul.hist { list-style: none; margin: 0; padding: 0; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--line); overflow: hidden; }
ul.hist li + li { border-top: 1px solid var(--line); }
.hrow { display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; width: 100%; min-height: 0; padding: 12px 12px 12px 14px;
  border-radius: 0; background: transparent; color: var(--ink); border: 0; box-shadow: none; text-align: left; font-weight: 400; }
.hrow:hover { background: var(--glass-strong); }
.hrow .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ink-subtle); }
.hrow .dot.ok { background: var(--sea); } .hrow .dot.bad { background: var(--danger); } .hrow .dot.warn { background: var(--warning); } .hrow .dot.mist { background: var(--mist); }
.hmain { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hmain b { font-size: 15px; font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hmain .subtle { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hend { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.hend .pill { font-size: 11.5px; padding: 3px 8px; }
.rate-hint { font-size: 11px; color: var(--ink-subtle); }
.hrow .chev { width: 16px; height: 16px; color: var(--ink-subtle); }
.empty { padding: 28px 16px; text-align: center; }

/* One past call */
.back { display: inline-flex; width: auto; min-height: 36px; margin-top: 14px; padding: 0 12px 0 6px; gap: 4px; background: none; border: 0; box-shadow: none; color: var(--ink-muted); font-weight: 600; }
.back .icon { transform: rotate(180deg); width: 18px; height: 18px; }
.orb.still { animation: none; border-radius: 50%; transform: scale(.86); }
.orb.still.dim { filter: saturate(.55) brightness(.85); }
.rate-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin-top: 12px; }
.rate-row:empty { display: none; }
.rate-row .chip.on { background: var(--sea-soft); color: var(--ink); border-color: var(--sea); }
.check-note { margin: 0; }
@media (max-width: 480px) {
  .hrow { grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; padding: 11px 12px; }
  .hrow .chev { display: none; }
  .hmain .subtle { white-space: normal; }
}

/* Shared page pieces (Contacts, Team, Settings) */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.page-head .title { margin: 0; }
.add-btn { display: inline-flex; gap: 6px; width: auto; min-height: 40px; padding: 0 14px; }
.add-btn .icon { width: 18px; height: 18px; }
.lead.small { margin: 6px 0 12px; font-size: 14px; }
.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; color: var(--ink-subtle); pointer-events: none; }
.search input { padding-left: 42px; }
.chips .chip .n { margin-left: 2px; font-weight: 500; color: var(--ink-subtle); font-size: 12px; }
.folder-acts { display: flex; gap: 16px; margin: 2px 0 4px; }
.danger-text { color: var(--danger) !important; }
.icon-btn { display: inline-grid; place-items: center; flex: none; width: 40px; height: 40px; min-height: 0; padding: 0; border-radius: 50%; background: var(--glass); border: 1px solid var(--line-strong); color: var(--ink); box-shadow: none; }
.icon-btn .icon { width: 18px; height: 18px; }
.avatar { display: inline-grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 50%; background: var(--sea-soft); color: var(--sea-text); font-weight: 800; font-size: 15px; }
.avatar.free { background: var(--glass-strong); color: var(--ink-subtle); }
ul.rows { list-style: none; margin: 0; padding: 0; }
ul.rows.card { padding: 0 14px; }
ul.rows > li { padding: 12px 0; }
ul.rows > li + li { border-top: 1px solid var(--line); }

/* Contacts */
.crow { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.cmain { display: flex; align-items: center; justify-content: flex-start; gap: 12px; min-width: 0; min-height: 0; padding: 0; background: none; border: 0; box-shadow: none; color: var(--ink); text-align: left; font-weight: 400; width: 100%; }
.cinfo { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.cinfo b { font-size: 15px; font-weight: 650; line-height: 1.3; }
.cinfo .star { color: var(--warning); margin-right: 4px; }
.csub { font-size: 12.5px; color: var(--ink-subtle); line-height: 1.4; }
.csub .mono { color: var(--ink-muted); white-space: nowrap; }
.cinfo .mono { color: var(--ink-muted); font-size: 13px; }
.cnote { font-size: 12.5px; color: var(--ink-subtle); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cacts { display: flex; align-items: center; gap: 8px; }
.hold-btn { width: auto; min-height: 36px; padding: 0 14px; font-size: 13.5px; }
.cmore { display: none; grid-column: 1 / -1; padding: 4px 0 2px; }
.cbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cbtns .chip { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; font-size: 13px; text-decoration: none; color: var(--ink); }
.cbtns .chip .icon { width: 15px; height: 15px; }
.star-chip.on { border-color: color-mix(in srgb, var(--warning) 60%, transparent); background: var(--warning-soft); }
.star-chip.on .icon { color: var(--warning); fill: currentColor; }
.icon-btn.call { color: var(--sea-text); }
.crow.open .cmore { display: block; }
.crow.open .cnote { display: none; }
.cmore p { margin: 0 0 6px; white-space: pre-wrap; font-size: 14px; }
.cmore .linkish { display: inline-flex; gap: 6px; margin-top: 8px; padding: 0; }
.cmore .linkish .icon { width: 16px; height: 16px; }
@media (max-width: 420px) { .hold-btn { padding: 0 12px; font-size: 13px; } }

/* Sheets (dialogs) */
dialog.sheet { width: min(520px, calc(100% - 24px)); max-height: calc(100dvh - 48px); overflow: auto; padding: 20px 18px; border-radius: var(--radius-lg);
  border: 1px solid var(--line-strong); background: var(--raised); color: var(--ink); box-shadow: var(--shadow-float); }
dialog.sheet::backdrop { background: color-mix(in srgb, var(--ground) 70%, transparent); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.sheet[open] { animation: settle var(--dur-settle) var(--ease-settle); }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sheet-head .icon-btn { width: 34px; height: 34px; }

/* Settings */
.profile { display: flex; align-items: center; gap: 14px; }
.profile .avatar { width: 46px; height: 46px; font-size: 18px; }
.profile b { display: block; font-size: 16px; overflow-wrap: anywhere; }
.set-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.set-line > div { min-width: 0; }
.set-line b { font-size: 16px; }
.set-line .pill { margin-right: 4px; vertical-align: 1px; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.set-row:first-of-type { border-top: 0; }
.set-row label { margin: 0; font-size: 14px; font-weight: 500; color: var(--ink-muted); }
.set-row select { min-height: 42px; font-size: 14.5px; }
@media (max-width: 440px) { .set-row { grid-template-columns: 1fr; gap: 6px; } }
ul.links > li > a, ul.links > li > button { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%; padding: 2px 0; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; background: none; border: 0; min-height: 0; box-shadow: none; text-align: left; }
ul.links > li > a .subtle { font-weight: 400; text-align: right; }
ul.links > li > button.linkish { margin: 0; }

/* Team */
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.stat { padding: 12px 14px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; font-weight: 300; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12.5px; color: var(--ink-subtle); }
.trow { display: flex; align-items: center; gap: 12px; }
.tinfo { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.tinfo b { font-size: 15px; font-weight: 650; }
.tinfo .badge { margin-left: 4px; }
.tinfo .subtle { font-size: 12.5px; }
.todo { font-size: 12.5px; color: var(--warning); }
.trow select.compact { flex: none; max-width: 44%; }
details.more { position: relative; flex: none; }
details.more > summary { list-style: none; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); color: var(--ink-muted); cursor: pointer; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary .icon { width: 18px; height: 18px; }
details.more .menu { position: absolute; right: 0; top: 42px; z-index: 5; display: flex; flex-direction: column; min-width: 210px; padding: 6px; border-radius: var(--radius-md);
  background: var(--raised); border: 1px solid var(--line-strong); box-shadow: var(--shadow-float); }
details.more .menu button { justify-content: flex-start; min-height: 40px; padding: 0 12px; border-radius: 10px; background: none; border: 0; box-shadow: none; color: var(--ink); font-weight: 500; font-size: 14px; }
details.more .menu button:hover { background: var(--glass-strong); }
@media (max-width: 480px) { .cmain { align-items: flex-start; } }

/* Directory v2: state bar, stars, state picker */
.state-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 4px 0 2px; padding: 10px 14px; border-radius: var(--radius-md); background: var(--glass); border: 1px solid var(--line); }
.state-bar .linkish { margin-left: 0; }
.state-bar select.compact { margin-left: auto; max-width: 100%; }
.icon-btn.star.on { color: var(--warning); border-color: color-mix(in srgb, var(--warning) 60%, transparent); background: var(--warning-soft); }
.icon-btn.star.on .icon { fill: currentColor; }
.avatar { font-size: 13px; letter-spacing: .02em; }
.state-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; max-height: 52dvh; overflow: auto; padding: 2px; }
.state-grid .st { display: flex; flex-direction: column; align-items: flex-start; gap: 0; min-height: 0; padding: 8px 10px; border-radius: 12px; background: var(--glass); border: 1px solid var(--line-strong); color: var(--ink); box-shadow: none; text-align: left; font-weight: 400; }
.state-grid .st b { font-size: 14px; } .state-grid .st span { font-size: 11.5px; color: var(--ink-subtle); line-height: 1.2; }
.state-grid .st[aria-pressed="true"] { border-color: var(--sea); background: var(--sea-soft); }
.state-grid .st[aria-pressed="true"] span { color: var(--ink-muted); }
@media (max-width: 480px) { .cacts { gap: 6px; } .cacts .icon-btn { width: 36px; height: 36px; } }
