/* The app: sign in, tutorial, plans, home + history, and the in-flight transcriber. */
html, body { height: 100%; }
body { overscroll-behavior: none; }
.view { min-height: 100%; }
.view.enter { animation: view-in .6s var(--ease-out) both; }
@keyframes view-in { from { opacity: 0; transform: translateY(10px) scale(.995); } }

/* boot splash */
.boot { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg); z-index: 100; transition: opacity .5s var(--ease); }
.boot.done { opacity: 0; pointer-events: none; }
.boot img { width: 56px; height: 56px; border-radius: 14px; animation: breathe 1.6s var(--ease) infinite; }
@keyframes breathe { 50% { transform: scale(.92); opacity: .7; } }

.logo-pic img { display: block; height: 38px; width: auto; }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 32px 16px; position: relative; overflow: hidden; }
.auth::before {
  content: ""; position: absolute; inset: -30%; z-index: -1;
  background: radial-gradient(40% 35% at 30% 20%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 70%),
              radial-gradient(35% 30% at 75% 75%, color-mix(in srgb, var(--accent-2) 16%, transparent), transparent 70%);
  animation: drift 18s var(--ease) infinite alternate;
}
@keyframes drift { to { transform: translate(4%, -3%) rotate(6deg); } }
.auth-card {
  width: 100%; max-width: 420px; background: color-mix(in srgb, var(--surface) 88%, transparent); border-radius: var(--r-xl);
  padding: 36px 28px 28px; box-shadow: var(--shadow-float); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(30px) saturate(160%); backdrop-filter: blur(30px) saturate(160%);
  animation: pop-in .7s var(--spring);
}
.auth-top { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 24px; }
.auth-top a { display: block; }
.auth-top img { height: 54px; width: auto; display: block; }
.auth-title { margin: 0; font: 700 26px/1.15 var(--display); letter-spacing: -.03em; text-align: center; }
.auth-sub { margin: -4px 0 0; color: var(--muted); text-align: center; font-size: 15px; }
.auth .seg { margin-bottom: 22px; }
.auth .form .btn { margin-top: 6px; padding: 14px; font-size: 16px; }
.auth-foot { margin: 18px 0 0; text-align: center; font-size: 13px; color: var(--faint); }
.pane { animation: rise .45s var(--ease-out); }
.pw-hint { font-size: 12px; color: var(--faint); margin-top: -6px; }

/* ---------------------------------------------------------------- tutorial */
.tutorial { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 24px 16px calc(24px + env(safe-area-inset-bottom)); }
.tut-skip { align-self: flex-end; }
.tut-stage { flex: 1; width: 100%; max-width: 520px; display: grid; align-items: center; position: relative; }
.tut-slide { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; text-align: center; opacity: 0; pointer-events: none; transform: translateX(40px); transition: opacity .5s var(--ease), transform .7s var(--spring); }
.tut-slide.on { opacity: 1; pointer-events: auto; transform: none; }
.tut-slide.past { transform: translateX(-40px); }
.tut-art {
  width: min(320px, 80vw); aspect-ratio: 1.15; border-radius: 32px; margin-bottom: 34px; position: relative; overflow: hidden;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 14%, var(--surface)), var(--surface));
  box-shadow: var(--shadow-lift); border: 1px solid var(--line); display: grid; place-items: center;
}
.tut-slide h2 { margin: 0 0 10px; font: 700 30px/1.12 var(--display); letter-spacing: -.032em; }
.tut-slide p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.5; max-width: 420px; }
.tut-dots { display: flex; gap: 8px; margin: 28px 0 22px; }
.tut-dots i { width: 7px; height: 7px; border-radius: 4px; background: var(--surface3); transition: width .5s var(--spring), background .3s; }
.tut-dots i.on { width: 24px; background: var(--fg); }
.tut-nav { display: flex; gap: 10px; width: 100%; max-width: 360px; }
.tut-nav .btn { flex: 1; }

/* tutorial illustrations */
.art-flight { display: flex; flex-direction: column; gap: 10px; width: 78%; }
.art-flight .af-field { background: var(--surface); border-radius: 12px; padding: 12px 14px; font-size: 14px; text-align: left; box-shadow: var(--shadow); }
.art-flight .af-field small { display: block; color: var(--faint); font-size: 11px; margin-bottom: 2px; }
.art-flight .af-btn { background: var(--accent); color: #fff; border-radius: 980px; padding: 10px; font-size: 14px; font-weight: 600; text-align: center; animation: nudge 2.4s var(--ease) infinite; }
@keyframes nudge { 0%, 70%, 100% { transform: none; } 80% { transform: scale(.96); } }
.art-mic { position: relative; width: 110px; height: 110px; display: grid; place-items: center; }
.art-mic .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--red); opacity: 0; animation: ping 2s var(--ease-out) infinite; }
.art-mic .ring:nth-child(2) { animation-delay: .65s; }
.art-mic .ring:nth-child(3) { animation-delay: 1.3s; }
@keyframes ping { 0% { transform: scale(.6); opacity: .7; } 100% { transform: scale(1.5); opacity: 0; } }
.art-mic .core { width: 72px; height: 72px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; box-shadow: 0 10px 30px color-mix(in srgb, var(--red) 40%, transparent); }
.art-mic .core svg { width: 30px; height: 30px; }
.art-alert { width: 84%; background: var(--surface); border-radius: 18px; padding: 14px 16px; text-align: left; box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 40%, transparent), var(--shadow-lift); animation: alert-glow 1.6s var(--ease) infinite alternate; }
@keyframes alert-glow { to { box-shadow: 0 0 0 5px var(--accent-soft), var(--shadow-lift); } }
.art-alert b { display: block; font-size: 11px; letter-spacing: .06em; color: var(--accent); margin-bottom: 4px; }
.art-alert span { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.3; }
.art-controls { display: flex; gap: 14px; align-items: center; }
.art-controls div { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow-lift); }
.art-controls div.big { width: 76px; height: 76px; background: var(--fg); color: var(--bg); }
.art-controls .lbl2 { position: absolute; bottom: 18px; left: 0; right: 0; font-size: 12px; color: var(--muted); }
.art-history { width: 80%; display: flex; flex-direction: column; gap: 8px; }
.art-history div { background: var(--surface); border-radius: 14px; padding: 10px 14px; text-align: left; font-size: 13px; box-shadow: var(--shadow); animation: rise .8s var(--ease-out) both; }
.art-history div:nth-child(2) { animation-delay: .15s; }
.art-history div:nth-child(3) { animation-delay: .3s; }
.art-history b { display: block; font-size: 14px; }

/* ---------------------------------------------------------------- plans */
.plans { min-height: 100dvh; padding: 24px 16px calc(40px + env(safe-area-inset-bottom)); }
.plans-inner { max-width: 1040px; margin: 0 auto; }
.plans-top { display: flex; align-items: center; justify-content: space-between; min-height: 44px; }
.plans-head { text-align: center; margin: 28px 0 36px; }
.plans-head h1 { margin: 0 0 10px; font: 700 clamp(30px, 5vw, 44px)/1.08 var(--display); letter-spacing: -.035em; }
.plans-head p { margin: 0; color: var(--muted); font-size: 17px; }
.plan-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.plan {
  position: relative; text-align: left; border: 0; border-radius: var(--r-lg); padding: 26px 24px 24px; background: var(--surface);
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); display: flex; flex-direction: column; gap: 6px;
  transition: transform .5s var(--spring), box-shadow .35s var(--ease);
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--line); }
.plan.sel { box-shadow: var(--shadow-lift), inset 0 0 0 2px var(--accent); }
.plan:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.plan .ribbon { position: absolute; top: 18px; right: 18px; }
.plan h3 { margin: 0; font: 600 21px/1.2 var(--display); letter-spacing: -.02em; }
.plan .tag { color: var(--muted); font-size: 14px; min-height: 2.6em; }
.plan .price { display: flex; align-items: baseline; gap: 4px; margin: 12px 0 2px; }
.plan .price b { font: 700 46px/1 var(--display); letter-spacing: -.04em; }
.plan .price span { color: var(--muted); font-size: 15px; }
.plan .price s { color: var(--muted); font-size: 20px; font-weight: 500; margin-right: 6px; }
.plan ul { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 9px; font-size: 14.5px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li svg { width: 18px; height: 18px; color: var(--green); stroke-width: 2.2; margin-top: 1px; }
.plan .radio { position: absolute; top: 24px; right: 22px; width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px var(--line-strong); transition: all .3s var(--spring); }
.plan.sel .radio { box-shadow: inset 0 0 0 7px var(--accent); }
.plan .ribbon + .radio { top: 54px; }
.plans-cta { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 34px; }
.plans-cta .btn { min-width: 280px; }
.plans-note { font-size: 13px; color: var(--faint); text-align: center; max-width: 520px; }

/* ---------------------------------------------------------------- top nav (home) */
.topnav {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 20px 10px; min-height: 60px;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.topnav .logo-pic { flex: 1; min-width: 0; }
.flights-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 980px; border: 0;
  background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 600; color: var(--fg);
  transition: transform .4s var(--spring);
}
.flights-pill:hover { transform: scale(1.03); }
.flights-pill svg { width: 16px; height: 16px; color: var(--accent); }
.flights-pill.low svg { color: var(--amber); }
.flights-pill.out svg { color: var(--red); }
.avatar-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 13px; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); letter-spacing: .02em;
  transition: transform .4s var(--spring);
}
.avatar-btn:hover { transform: scale(1.06); }

/* ---------------------------------------------------------------- home */
.home-main { max-width: 980px; margin: 0 auto; padding: 28px 20px calc(48px + env(safe-area-inset-bottom)); }
.hello h1 { margin: 0; font: 700 clamp(30px, 5vw, 40px)/1.1 var(--display); letter-spacing: -.035em; }
.hello p { margin: 6px 0 0; color: var(--muted); font-size: 16px; }
.start-card {
  position: relative; overflow: hidden; margin-top: 26px; border-radius: var(--r-xl); padding: 28px; color: #fff;
  background: linear-gradient(135deg, #0A84FF 0%, #5E5CE6 60%, #8E44AD 100%);
  box-shadow: 0 20px 50px -18px rgba(94, 92, 230, .55); display: flex; align-items: center; gap: 22px;
}
.start-card::after {
  content: ""; position: absolute; width: 380px; height: 380px; right: -120px; top: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .28), transparent 65%); pointer-events: none;
}
.start-card .sc-text { flex: 1; min-width: 0; position: relative; z-index: 1; }
.start-card h2 { margin: 0 0 6px; font: 700 26px/1.15 var(--display); letter-spacing: -.03em; }
.start-card p { margin: 0; opacity: .85; font-size: 15px; }
.start-card .btn { background: #fff; color: #1D1D1F; position: relative; z-index: 1; padding: 14px 24px; font-weight: 600; }
.start-card .btn svg { width: 18px; height: 18px; }
.start-card .sc-plane { position: absolute; right: 22%; bottom: -18px; width: 120px; height: 120px; opacity: .12; stroke: #fff; stroke-width: 1.2; transform: rotate(-20deg); }
.start-card.locked { background: linear-gradient(135deg, #3A3A3C, #1C1C1E); box-shadow: var(--shadow-lift); }
@media (max-width: 600px) { .start-card { flex-direction: column; align-items: stretch; text-align: left; } .start-card .btn { width: 100%; } }

.resume-card {
  margin-top: 16px; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px color-mix(in srgb, var(--red) 30%, transparent);
  animation: rise .6s var(--ease-out);
}
.resume-card .live-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 var(--red); animation: live 1.8s var(--ease) infinite; flex: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--red) 50%, transparent); } 100% { box-shadow: 0 0 0 10px transparent; } }
.resume-card .rc-text { flex: 1; min-width: 0; }
.resume-card b { display: block; font-size: 16px; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resume-card span { font-size: 13px; color: var(--muted); }

.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 40px 0 14px; }
.section-head h2 { margin: 0; font: 700 22px/1.2 var(--display); letter-spacing: -.025em; }
.history { display: grid; gap: 10px; }
.flight-card {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; border: 0; padding: 16px 18px; border-radius: 18px;
  background: var(--surface); box-shadow: var(--shadow); transition: transform .45s var(--spring), box-shadow .3s var(--ease);
}
.flight-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.flight-card:active { transform: scale(.99); }
.fc-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.fc-icon svg { width: 22px; height: 22px; }
.fc-main { flex: 1; min-width: 0; }
.fc-main b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 13px; color: var(--muted); margin-top: 2px; }
.fc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.fc-right .chev { width: 16px; height: 16px; color: var(--faint); }
.history-empty { text-align: center; padding: 48px 20px; border-radius: var(--r-lg); background: var(--surface); color: var(--muted); }
.history-empty .big-icon { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); color: var(--faint); }
.history-empty h3 { margin: 0 0 4px; color: var(--fg); font-size: 18px; letter-spacing: -.02em; }
.history-empty p { margin: 0; font-size: 14.5px; }
.more-row { display: flex; justify-content: center; margin-top: 14px; }

/* flight detail (history, read only) */
.fd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 6px 0 18px; }
.fd-stats div { background: var(--surface); border-radius: var(--r); padding: 12px 14px; }
.fd-stats b { display: block; font: 600 20px/1.2 var(--display); letter-spacing: -.02em; }
.fd-stats span { font-size: 12px; color: var(--muted); }
.fd-list .card-tx { box-shadow: none; }

/* ---------------------------------------------------------------- in flight */
.main {
  height: 100dvh; display: flex; flex-direction: column; max-width: 760px; margin: 0 auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
}
.bar {
  display: flex; align-items: center; gap: 4px; padding: 8px 10px 8px 6px; min-height: 58px;
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.bar-title { flex: 1; min-width: 0; padding-left: 4px; }
.bar-title b { display: block; font-size: 16px; font-weight: 600; letter-spacing: -.015em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-title span { font: 12.5px var(--mono); color: var(--muted); }
.bar .icon-btn { color: var(--muted); }
.bar .icon-btn:hover { color: var(--fg); }
.sub { display: flex; align-items: center; gap: 8px; padding: 14px 20px 12px; min-width: 0; }
.status-pill {
  display: flex; align-items: center; gap: 8px; flex-shrink: 1; min-width: 0; max-width: 62%;
  padding: 6px 14px 6px 12px; background: var(--surface); border-radius: 980px; font-size: 13px; color: var(--muted); box-shadow: var(--shadow);
}
.status-pill span:last-child { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex: none; transition: background .3s; }
.watch { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.watch::-webkit-scrollbar { display: none; }
.pill { flex: none; display: inline-block; padding: 6px 12px; border-radius: 980px; font-size: 12.5px; font-weight: 500; border: 0; white-space: nowrap; background: none; transition: background .2s; }
.pill.cs { color: var(--accent); background: var(--accent-soft); font-weight: 600; letter-spacing: .02em; }
.pill.add { color: var(--accent); }
.pill.add:hover { background: var(--accent-soft); }

.alert, .call-card { border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); border: 1px solid var(--line); }
.alert { margin: 0 16px 12px; padding: 14px 10px 18px 20px; border-color: color-mix(in srgb, var(--accent) 35%, transparent); animation: pop-in .45s var(--spring); }
.alert.flash { animation: flash .3s var(--ease) 10 alternate; }
@keyframes flash { to { background: color-mix(in srgb, var(--accent) 16%, var(--surface)); box-shadow: 0 0 0 4px var(--accent-soft); } }
.alert-top { display: flex; align-items: center; gap: 8px; color: var(--accent); min-height: 28px; }
.alert-bell { width: 15px; height: 15px; stroke-width: 2; }
.alert-title { flex: 1; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
.alert-time { font: 12px var(--mono); color: var(--faint); }
.alert-top .icon-btn { color: var(--faint); }
.alert-text { font-size: 24px; font-weight: 600; line-height: 1.25; letter-spacing: -.022em; padding: 6px 10px 0 0; overflow-wrap: anywhere; }
.cs-mark { color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 0 5px; margin: 0 -1px; font-weight: 700; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.call-card { padding: 12px 20px 16px; margin-bottom: 10px; animation: rise .5s var(--ease-out); }
.call-card .alert-text { font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: -.015em; padding: 4px 0 0; }

.content { position: relative; flex: 1; min-height: 0; }
.list { height: 100%; overflow-y: auto; padding: 2px 16px 20px; scrollbar-width: none; }
.list::-webkit-scrollbar { display: none; }
.card-tx { background: var(--surface); border-radius: 18px; padding: 12px 18px 14px; margin-bottom: 12px; box-shadow: var(--shadow); }
.card-tx.new { animation: tx-in .55s var(--spring); }
@keyframes tx-in { from { opacity: 0; transform: translateY(-10px) scale(.98); } }
.card-tx.live { box-shadow: 0 0 0 1px var(--line), var(--shadow); }
.card-tx.live .tx-text { color: var(--muted); }
.tx-top { display: flex; align-items: center; gap: 8px; }
.tx-time { font: 12px var(--mono); color: var(--faint); }
.tx-live { display: flex; align-items: center; gap: 7px; color: var(--red); font-size: 12px; font-weight: 600; }
.tx-live .dot { background: var(--red); animation: blink 1.2s var(--ease) infinite; }
@keyframes blink { 50% { opacity: .25; } }
.tx-spacer { flex: 1; }
.tx-conf { color: var(--faint); font-size: 12px; font-variant-numeric: tabular-nums; }
.tx-text { font-size: 17px; line-height: 1.45; letter-spacing: -.015em; padding-top: 4px; overflow-wrap: anywhere; }
.tx-raw { font-size: 13px; color: var(--muted); padding-top: 6px; line-height: 1.4; }
.tx-para { margin: 0; }
.tx-text .tx-para + .tx-para { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.tx-raw .tx-para + .tx-para { margin-top: 6px; }

.hl-emergency { color: var(--hl-emergency); background: color-mix(in srgb, var(--hl-emergency) 14%, transparent); font-weight: 700; border-radius: 4px; padding: 0 2px; }
.hl-instruction { color: var(--hl-instruction); }
.hl-procedure { color: var(--hl-procedure); }
.hl-callsign { color: var(--hl-callsign); }
.hl-value { color: var(--hl-value); }
.hl-place { color: var(--hl-place); }
.hl-weather { color: var(--hl-weather); }
.hl-phonetic { color: var(--hl-phonetic); }

.empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 0 40px 20px; pointer-events: none; }
.empty-icon { width: 64px; height: 64px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; color: var(--faint); margin-bottom: 20px; }
.empty-icon svg { width: 28px; height: 28px; stroke-width: 1.5; }
.empty h2 { margin: 0; font-size: 21px; font-weight: 600; letter-spacing: -.022em; }
.empty p { margin: 8px 0 0; color: var(--muted); font-size: 15px; line-height: 1.47; max-width: 340px; }

/* paused veil over the transcript */
.paused-veil { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 55%, transparent); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: fade .35s var(--ease); z-index: 2; }
.paused-veil div { text-align: center; }
.paused-veil b { display: block; font: 700 28px/1.2 var(--display); letter-spacing: -.03em; }
.paused-veil span { color: var(--muted); font-size: 14px; }

/* dock: pause · mic · end */
.dock {
  display: flex; flex-direction: column; align-items: center;
  padding: 10px 0 calc(12px + env(safe-area-inset-bottom));
  background: var(--glass); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-top: 1px solid var(--line);
}
.dock-row { display: flex; align-items: center; justify-content: center; gap: 28px; }
.dock-side { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: none; padding: 0; color: var(--fg); font-size: 11.5px; font-weight: 500; width: 64px; }
.dock-side .ds-icon { width: 50px; height: 50px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transition: transform .35s var(--spring), background .25s; }
.dock-side:hover .ds-icon { transform: scale(1.05); }
.dock-side:active .ds-icon { transform: scale(.93); }
.dock-side.end .ds-icon { background: var(--red-soft); color: var(--red); box-shadow: none; }
.dock-side.on .ds-icon { background: var(--amber-soft); color: color-mix(in srgb, var(--amber) 80%, var(--fg)); box-shadow: none; }
.mic { position: relative; width: 84px; height: 84px; border: 0; background: none; padding: 0; border-radius: 50%; }
.mic-core {
  position: absolute; inset: 10px; border-radius: 50%; background: var(--mic); color: var(--on-mic);
  display: grid; place-items: center; box-shadow: 0 6px 18px rgba(0, 0, 0, .2);
  transition: background .3s var(--ease), transform .4s var(--spring);
}
.mic:hover .mic-core { transform: scale(1.05); }
.mic:active .mic-core { transform: scale(.94); }
.mic-glyph { width: 26px !important; height: 26px !important; stroke-width: 1.8; }
.mic-stop { display: none; width: 20px; height: 20px; border-radius: 5px; background: #fff; }
.mic-halo { position: absolute; inset: 0; border-radius: 50%; background: var(--red); opacity: 0; transform: scale(.75); transition: transform 80ms linear, opacity .3s; }
.mic.on .mic-core { background: var(--red); color: #fff; }
.mic.on .mic-glyph { display: none; }
.mic.on .mic-stop { display: block; }
.mic.on .mic-halo { opacity: .16; }
.mic-hint { margin-top: 4px; font-size: 12.5px; color: var(--muted); }

.pane-title, .calls-list, .calls-empty { display: none; }
@media (min-width: 700px) {
  .main {
    max-width: 1440px; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto 1fr auto;
    grid-template-areas: "bar bar" "sub sub" "calls chat" "dock dock";
  }
  .bar { grid-area: bar; padding-left: 14px; padding-right: 18px; }
  .sub { grid-area: sub; padding: 18px 28px 6px; }
  .dock { grid-area: dock; }
  .calls { grid-area: calls; min-height: 0; overflow-y: auto; padding: 0 14px 20px 28px; scrollbar-width: none; }
  .calls::-webkit-scrollbar { display: none; }
  .content { grid-area: chat; display: flex; flex-direction: column; }
  .content .list { flex: 1; min-height: 0; height: auto; padding: 2px 28px 20px 14px; }
  .content .empty { top: 60px; }
  .pane-title { display: block; margin: 0; padding: 14px 4px; font: 600 28px/1.15 var(--display); letter-spacing: -.028em; color: var(--fg); }
  .content .pane-head { padding-right: 28px; }
  .content .pane-title { padding-left: 18px; }
  .content .pad-open-btn { display: inline-flex; }
  .bar .pad-bar-btn { display: none; }
  .bar .wx-bar-btn { display: none; }
  .main.pad-open .bar .wx-bar-btn { display: inline-grid; }
  .main.pad-open { grid-template-columns: minmax(260px, .75fr) minmax(0, 1.25fr); }
  .main .scribble { grid-area: chat; padding: 0 28px 16px 14px; }
  .calls .alert { margin: 0 0 12px; }
  .calls-list { display: block; }
  .calls-empty { display: block; margin: 48px 24px 0; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.47; }
}

/* ---------------------------------------------------------------- settings */
.account { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.account .avatar-btn { width: 48px; height: 48px; font-size: 16px; cursor: default; }
.account-text { flex: 1; min-width: 0; }
.account-text div { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-text .nm { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.plan-box { display: flex; align-items: center; gap: 14px; padding: 16px; }
.plan-box .pb-ring { --p: 0; width: 54px; height: 54px; border-radius: 50%; flex: none; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface2) 0); transition: --p 1s var(--ease-out); }
.plan-box .pb-ring span { width: 42px; height: 42px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; font-size: 14px; font-weight: 700; }
.plan-box .pb-text { flex: 1; min-width: 0; }
.plan-box .pb-text b { display: block; font-size: 17px; letter-spacing: -.02em; }
.plan-box .pb-text span { font-size: 13px; color: var(--muted); }
.input-row { display: flex; gap: 8px; padding-top: 12px; }
.add-btn { flex: none; width: 46px; border: 0; border-radius: 12px; background: var(--accent); color: var(--on-accent); display: grid; place-items: center; transition: transform .3s var(--spring); }
.add-btn:active { transform: scale(.92); }
.chips { padding-top: 12px; }
input[type="range"] { width: 100%; accent-color: var(--accent); margin: 12px 0 2px; }
.range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
select.field { margin-top: 8px; }
.legend { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 8px; }
.legend span { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.legend i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
.footnote { text-align: center; color: var(--faint); font-size: 12px; margin-top: 28px; }
.receipts { display: flex; flex-direction: column; }
.receipt-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border: 0; background: none; text-align: left; width: 100%; font-size: 14.5px; }
.receipt-row + .receipt-row { border-top: 1px solid var(--line); }
.receipt-row .grow { flex: 1; min-width: 0; }

/* new flight sheet */
.nf-body { padding: 4px 20px calc(28px + env(safe-area-inset-bottom)); }
.nf-body .form { gap: 18px; }
.nf-hint { font-size: 12.5px; color: var(--faint); margin: -8px 0 0; }

/* links to the policy pages */
a.nav-row { text-decoration: none; }
.legal-note { font-size: 12px; color: var(--faint); text-align: center; margin: 4px 0 0; line-height: 1.45; }
.legal-note a, .plans-note a { color: var(--accent); text-decoration: none; }

/* ---------------------------------------------------------------- scribble pad */
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pad-open-btn { display: none; flex: none; }
.pad-open-btn svg { width: 17px; height: 17px; }
.bar .pad-bar-btn.on { color: var(--accent); background: var(--accent-soft); }
.main.pad-open .content { display: none; }

.scribble { position: relative; flex: 1; min-height: 0; min-width: 0; display: flex; flex-direction: column; gap: 8px; padding: 0 12px 10px; animation: rise .45s var(--ease-out); }
.pad-head { display: flex; align-items: center; gap: 6px; padding-top: 8px; min-width: 0; }
.pad-back { position: relative; flex: none; }
.pad-back svg { width: 17px; height: 17px; }
.pad-badge {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--red); color: #fff; font-size: 11px; font-weight: 700; line-height: 19px; text-align: center; animation: pop-in .4s var(--spring);
}
.pad-title {
  flex: 1; min-width: 60px; border: 0; background: transparent; padding: 7px 8px; border-radius: 10px;
  font: 600 16px/1.2 var(--font); letter-spacing: -.015em; color: var(--fg); text-overflow: ellipsis;
}
.pad-title:hover, .pad-title:focus { background: var(--surface); outline: none; box-shadow: inset 0 0 0 1px var(--line); }
.pad-status { flex: none; font-size: 12px; color: var(--faint); white-space: nowrap; }
.pad-status.ok { color: var(--green); }
.pad-status.err { color: var(--red); }
.pad-status.busy { color: var(--amber); }
.pad-sheets { position: relative; }
.pad-count {
  position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent); font-size: 10px; font-weight: 700; line-height: 16px; text-align: center;
}
.pad-head .btn.primary svg { width: 16px; height: 16px; }

.pad-tools {
  display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 2px 1px;
  -webkit-overflow-scrolling: touch;
}
.pad-tools::-webkit-scrollbar { display: none; }
.pad-group { display: flex; align-items: center; gap: 2px; flex: none; padding: 3px; border-radius: 14px; background: var(--surface); box-shadow: var(--shadow), inset 0 0 0 1px var(--line); }
.pad-tool, .pad-swatch, .pad-size {
  width: 40px; height: 40px; border: 0; border-radius: 11px; background: transparent; color: var(--fg); padding: 0;
  display: grid; place-items: center; transition: background .2s var(--ease), transform .3s var(--spring), color .2s;
}
.pad-tool:hover, .pad-swatch:hover, .pad-size:hover { background: var(--surface2); }
.pad-tool:active, .pad-swatch:active, .pad-size:active { transform: scale(.9); }
.pad-tool:disabled { opacity: .3; pointer-events: none; }
.pad-tool.on { background: var(--accent-soft); color: var(--accent); }
.pad-tool svg { width: 21px; height: 21px; }
.pad-swatch i { width: 22px; height: 22px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(127, 127, 127, .35); transition: transform .3s var(--spring), box-shadow .2s; }
.pad-swatch.on i { transform: scale(1.08); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
.pad-size i { border-radius: 50%; background: var(--fg); opacity: .45; transition: opacity .2s; }
.pad-size.on { background: var(--surface2); }
.pad-size.on i { opacity: 1; }

.pad-surface {
  position: relative; flex: 1; min-height: 220px; border-radius: 18px; overflow: hidden; background: #FFFEFA;
  box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--line);
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.pad-surface canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#padLive { touch-action: none; cursor: crosshair; }
.pad-hint {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); margin: 0; width: min(320px, 80%);
  text-align: center; font-size: 14px; line-height: 1.5; color: rgba(60, 60, 67, .55); pointer-events: none;
}
.pad-surface.dark .pad-hint { color: rgba(235, 235, 245, .45); }

@media (max-width: 699px) {
  .scribble { padding: 0 10px 8px; }
  .pad-back-label { display: none; }
  .pad-status { display: none; }
  .pad-tool, .pad-swatch, .pad-size { width: 38px; height: 38px; }
}

/* saved sheets (pad's sheet list, and flight history) */
.note-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; text-align: left; }
.note-thumb {
  display: flex; flex-direction: column; gap: 2px; border: 0; padding: 8px; border-radius: 16px; background: var(--surface); text-align: left;
  box-shadow: var(--shadow), inset 0 0 0 1px var(--line); transition: transform .4s var(--spring), box-shadow .3s var(--ease);
}
.note-thumb:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift), inset 0 0 0 1px var(--line); }
.note-thumb.on { box-shadow: var(--shadow), inset 0 0 0 2px var(--accent); }
.note-thumb img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: top; border-radius: 10px; background: var(--surface2); margin-bottom: 6px; }
.note-thumb b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-thumb span { font-size: 12px; color: var(--muted); }
.fd-notes .group-title:first-child { margin-top: 4px; }
.fd-notes .note-grid { margin-bottom: 4px; }
.modal-card .note-grid { max-height: 55vh; overflow-y: auto; padding: 4px; margin: 0 -4px; }
.note-view { max-height: 62vh; overflow: auto; border-radius: 14px; background: var(--surface2); }
.note-view img { display: block; width: 100%; height: auto; }

/* ---------------------------------------------------------------- weather */
.pane-btns { display: flex; gap: 8px; flex: none; }
.wx { display: flex; flex-direction: column; gap: 14px; }
.wx-search { display: flex; gap: 8px; align-items: center; }
.wx-search .field { flex: 1; min-width: 0; text-transform: uppercase; height: 36px; padding: 0 12px; }
.wx-search .field::placeholder { text-transform: none; }
.wx-search .btn svg { width: 16px; height: 16px; }
.wx-out { min-height: 120px; }
.wx-loading, .wx-problem { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 140px; color: var(--muted); font-size: 14px; text-align: center; }
.wx-problem p { margin: 0; max-width: 360px; line-height: 1.45; }
.wx-problem svg { width: 30px; height: 30px; color: var(--faint); }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--surface3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.wx-card { display: flex; flex-direction: column; gap: 10px; }
.wx-top { display: flex; align-items: flex-start; gap: 12px; }
.wx-station { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wx-station b { font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.wx-station span { color: var(--muted); font-size: 13px; }
.wx-cat { font-weight: 700; flex: none; }
.wx-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.wx-grid > div { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--surface2); min-width: 0; }
.wx-grid span { font-size: 12px; color: var(--muted); }
.wx-grid b { font-size: 14.5px; font-weight: 600; overflow-wrap: anywhere; }
.wx-label { font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 4px; }
.wx-raw { margin: 0; padding: 10px 12px; border-radius: 12px; box-shadow: inset 0 0 0 1px var(--line); font: 500 13px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.wx-nearby { display: flex; flex-direction: column; gap: 4px; }
.wx-near { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; text-align: left; font-size: 13.5px; cursor: pointer; }
.wx-near:hover { background: var(--surface2); }
.wx-near .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.wx-source { margin: 0; font-size: 12px; color: var(--faint); line-height: 1.45; }
.wx-source a { color: var(--accent); text-decoration: none; }
@media (max-width: 420px) { .wx-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- feedback, review, donation */
.fb { display: flex; flex-direction: column; gap: 12px; text-align: left; }
.stars { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.stars-row { display: flex; gap: 6px; }
.star { width: 46px; height: 46px; display: grid; place-items: center; border: 0; border-radius: 12px; background: transparent; color: var(--surface3); cursor: pointer; transition: transform .15s var(--ease), color .15s; }
.stars .star svg { width: 34px; height: 34px; fill: currentColor; stroke: currentColor; stroke-width: 1.2; }
.star:active { transform: scale(.88); }
.star.on { color: #FFB800; }
.stars-word { font-size: 13px; color: var(--muted); min-height: 18px; }
.fb-label { display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; font-weight: 500; }
.fb-text { min-height: 76px; resize: vertical; padding: 10px 12px; }
.fb-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.fb-tag { padding: 7px 12px; border: 0; border-radius: 999px; background: var(--surface2); font-size: 13px; font-weight: 500; cursor: pointer; }
.fb-tag.on { background: var(--accent); color: var(--on-accent); }
.fb-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.4; cursor: pointer; }
.fb-consent input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.donate { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--red) 7%, var(--surface2)); }
.donate-head { display: flex; gap: 12px; align-items: flex-start; }
.donate-head > div { display: flex; flex-direction: column; gap: 3px; font-size: 13.5px; line-height: 1.4; }
.donate-head b { font-size: 15px; }
.donate-head span { color: var(--muted); }
.donate-icon { width: 36px; height: 36px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--red-soft); color: var(--red); }
.donate .donate-icon svg { width: 19px; height: 19px; fill: currentColor; }
.donate-amounts { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.donate-amounts .fb-tag { background: var(--surface); }
.donate-amounts .fb-tag.on { background: var(--accent); }
.donate-field { display: flex; align-items: center; gap: 4px; flex: 1; min-width: 120px; padding-left: 12px; border-radius: 999px; background: var(--surface); font-weight: 600; }
.donate-input.field { flex: 1; min-width: 0; height: 34px; border: 0; background: transparent; box-shadow: none; padding: 0 12px 0 0; }
.donate-go { width: 100%; }
.donate-note { margin: 0; text-align: center; }
.donate .form-error:empty { display: none; }
