/* Glide: styles. The landscape is the background of every screen; the UI is
   either frosted glass over it (title, flight) or a sheet of warm paper. */

@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Instrument Serif'; src: url('fonts/instrument-serif-italic.woff2') format('woff2'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Nunito'; src: url('fonts/nunito-var-latin.woff2') format('woff2'); font-weight: 300 900; font-style: normal; font-display: swap; }

:root {
  --paper: #fbf4e6;
  --paper-2: #f3e8d2;
  --ink: #2c2733;
  --ink-2: #5d5566;
  --line: rgba(44, 39, 51, .12);
  --apricot: #f0a35e;
  --apricot-2: #e2874a;
  --gold: #f6d58e;
  --dusk: #2a2238;
  --glass: rgba(34, 28, 46, .34);
  --glass-line: rgba(255, 244, 222, .22);
  --cream: #fff6e6;
  --display: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --ui: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #e9b984; color: var(--cream); font: 16px/1.45 var(--ui); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overscroll-behavior: none; touch-action: none; }
body { background: linear-gradient(#5d7fb8, #f1c48e 70%, #c99a6c); user-select: none; -webkit-user-select: none; }
button, input, a { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

#gl { position: fixed; inset: 0; width: 100%; height: 100%; display: block; }
/* A soft vignette and a warm wash at the top for the title text to sit on. */
#shade { position: fixed; inset: 0; pointer-events: none; background:
  radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(30, 18, 30, .28) 100%); }
body.on-title #shade { background:
  linear-gradient(rgba(36, 26, 52, .38), transparent 34%, transparent 62%, rgba(36, 22, 34, .42)),
  radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(30, 18, 30, .3) 100%); }
#touch { position: fixed; inset: 0; touch-action: none; }
body.booting .screen { opacity: 0; }

.screen { position: fixed; inset: 0; transition: opacity .5s var(--ease); pointer-events: none; }
.screen > * { pointer-events: auto; }
.ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- title ---------- */

#title { display: flex; flex-direction: column; justify-content: flex-start; padding: calc(var(--sat) + 6vh) calc(var(--sar) + 20px) calc(var(--sab) + 14px) calc(var(--sal) + 20px); }
.title-top { text-align: center; pointer-events: none; }
.logo { margin: 0; font: italic 400 clamp(84px, 26vw, 156px)/.9 var(--display); letter-spacing: -.02em; color: var(--cream);
  text-shadow: 0 2px 30px rgba(255, 196, 120, .45), 0 1px 2px rgba(60, 30, 20, .35); }
.tagline { margin: 6px 0 0; font: 400 clamp(19px, 5vw, 24px)/1.2 var(--display); color: rgba(255, 246, 230, .92); text-shadow: 0 1px 12px rgba(60, 30, 40, .4); }
.modes { display: grid; gap: 10px; width: 100%; max-width: 420px; margin: auto auto 0; }
.mode { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 18px; border: 1px solid var(--glass-line); border-radius: 20px; background: var(--glass);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); text-align: left; color: var(--cream); box-shadow: 0 8px 30px rgba(30, 16, 40, .18);
  transition: transform .2s var(--ease), background .2s; }
.mode:hover { background: rgba(44, 36, 58, .44); }
.mode:active { transform: scale(.98); }
.mode .ic { width: 30px; height: 30px; color: var(--gold); }
.mode-txt { display: flex; flex-direction: column; min-width: 0; }
.mode-name { font: 400 25px/1.1 var(--display); }
.mode-sub { font-size: 14px; color: rgba(255, 244, 224, .78); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#btn-free { background: linear-gradient(135deg, rgba(240, 163, 94, .72), rgba(214, 120, 84, .62)); border-color: rgba(255, 230, 190, .45); }
#btn-free .ic { color: var(--cream); }
.title-foot { display: flex; align-items: center; justify-content: space-between; max-width: 420px; width: 100%; margin: 12px auto 0; }
.version { font-size: 13px; letter-spacing: .04em; color: rgba(255, 244, 224, .8); text-shadow: 0 1px 6px rgba(40, 20, 30, .5); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: inherit; }
.title-foot .icon-btn { background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.glass { background: var(--glass); border: 1px solid var(--glass-line) !important; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* Wide and short (a phone on its side): menu on the left, the flight on the right. */
@media (min-aspect-ratio: 4/3) and (max-height: 560px) {
  #title { justify-content: center; align-items: flex-start; padding-top: calc(var(--sat) + 14px); }
  .title-top { text-align: left; }
  .logo { font-size: clamp(64px, 16vh, 110px); }
  .modes { margin: 14px 0 0; max-width: 360px; gap: 8px; }
  .mode { min-height: 54px; padding: 6px 16px; }
  .title-foot { margin: 8px 0 0; max-width: 360px; }
}
@media (min-width: 900px) and (min-height: 600px) {
  .modes { grid-template-columns: repeat(3, 1fr); max-width: 860px; }
  .mode { min-height: 78px; }
  .title-foot { max-width: 860px; }
}

/* ---------- flight ---------- */

.hud-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: calc(var(--sat) + 12px) calc(var(--sar) + 14px) 0 calc(var(--sal) + 16px); pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-stats { text-shadow: 0 1px 10px rgba(30, 18, 34, .55), 0 0 2px rgba(30, 18, 34, .4); pointer-events: none; }
.hud-big { font: 400 44px/1 var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.hud-small { display: flex; align-items: center; gap: 10px; margin-top: 4px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; color: rgba(255, 246, 230, .92); }
.vario { display: inline-block; min-width: 54px; font-weight: 700; }
.vario.up { color: #ffe6a3; }
.vario.down { color: rgba(255, 246, 230, .6); }
.hud-btns { display: flex; gap: 8px; }
.hud-btns .icon-btn { width: 48px; height: 48px; }
.hud-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; text-shadow: none; }
.hud-chips:empty { display: none; }
.hud-clock { position: absolute; left: 50%; top: calc(var(--sat) + 22px); transform: translateX(-50%); font: 400 28px/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: .01em; color: rgba(255, 246, 230, .94); text-shadow: 0 1px 10px rgba(30, 18, 34, .55), 0 0 2px rgba(30, 18, 34, .4); pointer-events: none; }
.hud-clock[hidden] { display: none; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 11px 0 8px; border-radius: 15px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.chip .ic { width: 18px; height: 18px; color: var(--gold); }
.ring-arrow { position: absolute; left: 0; top: 0; width: 44px; height: 44px; margin: -22px 0 0 -22px; display: flex; align-items: center; justify-content: center; color: var(--gold); filter: drop-shadow(0 1px 6px rgba(30, 18, 34, .6)); pointer-events: none; }
.ring-arrow .ic { width: 34px; height: 34px; fill: rgba(246, 213, 142, .85); stroke: rgba(80, 50, 20, .5); stroke-width: 1; }
.ring-arrow.lift { color: var(--cream); }
.ring-arrow.lift .ic { fill: rgba(255, 246, 226, .9); stroke: rgba(70, 60, 90, .45); }
.chip.climb .ic { color: var(--cream); }
.pause-help { display: flex; flex-direction: column; gap: 2px; padding: 4px 14px; border-radius: 16px; background: rgba(44, 39, 51, .05); }
.stall { position: absolute; left: 50%; top: 30%; transform: translateX(-50%); font: italic 400 30px/1 var(--display); color: var(--cream); text-shadow: 0 1px 14px rgba(120, 40, 30, .7); opacity: 0; transition: opacity .2s; pointer-events: none; }
.stall.show { opacity: 1; }
.hud-bottom { position: absolute; left: 0; right: 0; bottom: calc(var(--sab) + 22px); display: flex; justify-content: center; pointer-events: none; padding: 0 16px; }
.hud-hint { margin: 0; padding: 8px 16px; border-radius: 18px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); font-size: 15px; font-weight: 600; text-align: center; opacity: 0; transform: translateY(8px); transition: opacity .4s, transform .4s var(--ease); max-width: 100%; }
.hud-hint.show { opacity: 1; transform: none; }
.ready { position: absolute; left: 50%; bottom: calc(var(--sab) + 28px); transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 220px; max-width: calc(100% - 32px); padding: 14px 26px; border-radius: 26px;
  border: 1px solid rgba(255, 230, 190, .5); background: linear-gradient(135deg, rgba(240, 163, 94, .78), rgba(214, 120, 84, .7)); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); color: var(--cream); box-shadow: 0 10px 40px rgba(60, 20, 30, .28); animation: breathe 2.6s ease-in-out infinite; }
.ready[hidden] { display: none; }
.ready-main { font: italic 400 30px/1.1 var(--display); }
.ready-sub { font-size: 14px; font-weight: 600; opacity: .9; }
@keyframes breathe { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.035); } }

/* ---------- photo mode ---------- */

#photo { pointer-events: none; }
.photo-bar { position: absolute; left: 50%; bottom: calc(var(--sab) + 16px); transform: translateX(-50%); width: min(520px, calc(100% - 24px)); display: flex; flex-direction: column; gap: 10px; padding: 12px 16px; border-radius: 24px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.photo-light { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; }
.photo-light input { flex: 1; min-width: 0; }
.photo-btns { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.photo-btns .btn { min-width: 0; flex: 0 1 auto; color: var(--cream); border-color: var(--glass-line); }
.shutter { width: 66px; height: 66px; border-radius: 50%; border: 3px solid var(--cream); background: transparent; padding: 4px; flex: none; }
.shutter span { display: block; width: 100%; height: 100%; border-radius: 50%; background: var(--cream); transition: transform .15s; }
.shutter:active span { transform: scale(.88); }
.photo-hint { position: absolute; top: calc(var(--sat) + 16px); left: 0; right: 0; margin: 0; text-align: center; font-weight: 600; font-size: 14px; text-shadow: 0 1px 8px rgba(30, 18, 34, .6); pointer-events: none; }
body.snap .screen, body.snap #shade { opacity: 0 !important; }

/* ---------- buttons and controls ---------- */

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 24px; border: 1px solid var(--line); background: transparent; color: var(--ink); font-weight: 700; font-size: 16px; text-decoration: none; transition: transform .15s, background .2s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: linear-gradient(135deg, var(--apricot), var(--apricot-2)); border-color: transparent; color: #fff; box-shadow: 0 6px 18px rgba(226, 135, 74, .35); }
.btn.ghost:hover { background: rgba(44, 39, 51, .05); }
.btn.danger { color: #b0412e; }
.btn.primary.danger { background: #c4553f; color: #fff; }
.btn.small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn .ic { width: 20px; height: 20px; }

/* ---------- sheets: warm paper ---------- */

.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(28, 18, 30, .35); opacity: 0; transition: opacity .25s; }
.scrim.show { opacity: 1; }
.sheet { position: fixed; left: 50%; bottom: 0; z-index: 30; width: min(560px, 100%); max-height: calc(100% - var(--sat) - 12px); overflow: hidden; display: flex; flex-direction: column; gap: 12px;
  padding: 18px calc(20px + var(--sar)) calc(20px + var(--sab)) calc(20px + var(--sal)); border-radius: 26px 26px 0 0; color: var(--ink);
  background: radial-gradient(140% 80% at 20% 0%, #fffaf0, var(--paper) 60%, var(--paper-2)); box-shadow: 0 -10px 50px rgba(30, 16, 30, .3);
  transform: translate(-50%, 104%); transition: transform .38s var(--ease); }
.sheet::before { content: ''; position: absolute; top: 8px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: rgba(44, 39, 51, .16); }
.sheet.show { transform: translate(-50%, 0); }
.sheet.tall { height: 88vh; height: 88dvh; }
.sheet h2 { margin: 0; font: 400 32px/1.1 var(--display); color: var(--ink); }
.sheet h3 { margin: 22px 0 8px; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--apricot-2); font-weight: 800; }
.sheet p { margin: 0; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 46px; }
.sheet-head .icon-btn { color: var(--ink-2); flex: none; }
.sheet-scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; touch-action: pan-y; margin: 0 -8px; padding: 0 8px 12px; flex: 1; overscroll-behavior: contain; }
.sheet-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; margin-top: 6px; }
.sheet-actions .btn { flex: 1 1 auto; min-width: 0; }
.sheet-actions .btn.primary { flex: 2 1 auto; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.lede { color: var(--ink-2); font-size: 16px; }
.eyebrow { font-size: 13px; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--apricot-2); }
.note { color: var(--ink-2); font-size: 14px; }
.badge { align-self: flex-start; padding: 4px 12px; border-radius: 14px; background: var(--gold); color: #5a3a10; font-weight: 800; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.badge[hidden] { display: none; }
.result-big { font: 400 56px/1 var(--display) !important; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.result-big small { font-size: .45em; color: var(--ink-2); margin-left: 4px; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 8px; }
#result-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
#result-stats .stat { padding: 7px 10px; }
#result-stats .stat b { font-size: 22px; }
.result-actions { flex-wrap: nowrap; }
.result-actions .btn { padding: 0 16px; }
.result-actions .btn.round { flex: none; width: 48px; padding: 0; }
.result-actions .btn[hidden] { display: none; }
.stat { padding: 10px 12px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); min-width: 0; }
.stat b { display: block; font: 400 24px/1.1 var(--display); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat span { font-size: 12px; font-weight: 700; color: var(--ink-2); text-transform: uppercase; letter-spacing: .06em; }
.field label { display: block; font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 6px; }
.seed-row { display: flex; gap: 8px; }
.seed-row input { flex: 1; min-width: 0; height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--line); background: #fffdf8; color: var(--ink); font-size: 16px; font-weight: 600; user-select: text; -webkit-user-select: text; }
.seed-row .icon-btn { background: #fffdf8; border: 1px solid var(--line); border-radius: 14px; width: 48px; height: 48px; color: var(--ink); flex: none; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.row label, .row > span { font-weight: 700; min-width: 0; }
.row small { display: block; font-weight: 500; color: var(--ink-2); font-size: 13px; }
.row output { font-weight: 700; color: var(--ink-2); }
input[type=range] { width: 100%; height: 44px; accent-color: var(--apricot-2); background: transparent; touch-action: pan-x; }
.seg { display: inline-flex; padding: 2px; border-radius: 16px; background: rgba(44, 39, 51, .07); flex: none; }
.seg button { min-height: 44px; min-width: 64px; padding: 0 12px; border: 0; border-radius: 13px; background: transparent; font-weight: 700; color: var(--ink-2); }
.seg button[aria-checked=true] { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(44, 39, 51, .15); }
.toggle { appearance: none; -webkit-appearance: none; width: 52px; height: 44px; margin: 0; padding: 6px 0; border-radius: 22px / 16px; background: rgba(44, 39, 51, .2); background-clip: content-box; position: relative; flex: none; transition: background .2s; }
.toggle::after { content: ''; position: absolute; top: 9px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease); }
.toggle:checked { background: var(--apricot-2); background-clip: content-box; }
.toggle:checked::after { transform: translateX(20px); }
/* ---------- options ---------- */

.opt-tabs { display: flex; gap: 4px; overflow-x: auto; margin: -4px -8px 0; padding: 0 8px 2px; scrollbar-width: none; flex: none; }
.opt-tabs::-webkit-scrollbar { display: none; }
.opt-tabs a { flex: none; display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; border-radius: 22px; color: var(--ink-2); font-weight: 700; font-size: 13px; text-decoration: none; background: rgba(44, 39, 51, .05); }
.opt-tabs a:active { background: rgba(44, 39, 51, .1); }
.opt-sec { padding-bottom: 6px; border-bottom: 1px solid var(--line); scroll-margin-top: 4px; }
.opt-sec:last-child { border-bottom: 0; }
.opt-sec h3:first-child { margin-top: 14px; }
.field-label { font-weight: 700; margin: 10px 0 6px; }
#opt-style-note { margin: 8px 0 2px; }
.seg.wide { display: flex; width: 100%; }
.seg.wide button { flex: 1 1 0; min-width: 0; padding: 0 6px; font-size: 14px; line-height: 1.1; }
.slider { margin-top: 4px; }
.slider .row { min-height: 36px; }
.slider input[type=range] { margin-top: -4px; }
.row label small, .row > span small { display: block; }
.opt-toggle { gap: 10px; }
.opt-toggle label { flex: 1 1 auto; }
.diag { flex: none; width: 56px; height: 40px; }
.diag svg { width: 56px; height: 40px; overflow: visible; }
.dg-arrow { fill: none; stroke: var(--apricot-2); stroke-width: 2.2; stroke-linecap: round; marker-end: none; }
.pv-wing { fill: #fffaf0; stroke: #7d6a4c; stroke-width: 1.6; stroke-linejoin: round; }
.pv-keel, .pv-keel-fill { fill: #e6d8bd; stroke: #9a8768; stroke-width: 1.2; stroke-linejoin: round; }
.pv-ground { stroke: rgba(44, 39, 51, .22); stroke-width: 2; stroke-dasharray: 4 4; }
.preview { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; align-items: center; margin: 12px 0 4px; padding: 10px; border-radius: 18px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); }
.opt-pad { position: relative; height: 112px; border-radius: 14px; background: radial-gradient(circle, #fff9ee 0, #f1e3c9 100%); border: 1px dashed rgba(226, 135, 74, .55); display: flex; align-items: center; justify-content: center; touch-action: none; cursor: grab; overflow: hidden; }
.opt-pad span { font-size: 13px; font-weight: 700; color: var(--ink-2); text-align: center; padding: 0 8px; pointer-events: none; }
.opt-pad .stick-knob { display: none; }
.opt-pad.stick-mode .stick-knob { display: block; position: absolute; left: 50%; top: 50%; width: 36px; height: 36px; margin: -18px; }
.preview-planes { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.preview-planes svg { width: 100%; height: 50px; overflow: visible; }
.pv { display: flex; flex-direction: column; align-items: center; }
.pv span { font-size: 11px; font-weight: 700; color: var(--ink-2); letter-spacing: .04em; text-transform: uppercase; }
.pv-text { grid-column: 1 / -1; margin: 0; text-align: center; font-weight: 700; font-size: 14px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.btn-pair { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.btn-pair .btn { flex: 1 1 140px; min-width: 0; }
.keylist { display: grid; gap: 6px; }
.keyrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 48px; }
.keyrow span { font-weight: 700; min-width: 0; }
.keyrow .keybtn { min-width: 112px; min-height: 44px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line); background: #fffdf8; font-weight: 800; font-size: 14px; color: var(--ink); }
.keyrow .keybtn.listening { border-color: var(--apricot-2); color: var(--apricot-2); background: #fff3e6; }
.key-msg { min-height: 20px; margin: 6px 0; font-size: 14px; font-weight: 700; color: #a8452f; }
.key-msg.ok { color: #2f7d4a; }
.wide-btn { width: 100%; margin-top: 6px; }
#opt-keys-default { width: 100%; }

/* The on-screen thumb stick */
.stick { position: absolute; bottom: calc(var(--sab) + 26px); right: calc(var(--sar) + 22px); width: 132px; height: 132px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 246, 230, .1), rgba(255, 246, 230, .22)); border: 1.5px solid rgba(255, 246, 230, .45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); touch-action: none; pointer-events: auto; }
body.stick-left .stick { right: auto; left: calc(var(--sal) + 22px); }
.stick-knob { position: absolute; left: 50%; top: 50%; width: 54px; height: 54px; margin: -27px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, #f3c58f); box-shadow: 0 3px 12px rgba(60, 30, 20, .3); pointer-events: none; }
body.stick-mode .ready { bottom: calc(var(--sab) + 182px); }
body.no-hud .hud-stats, body.no-hud .hud-clock { visibility: hidden; }
body.reduce-motion .sheet, body.reduce-motion .scrim, body.reduce-motion .toast, body.reduce-motion .mode, body.reduce-motion .hud-hint, body.reduce-motion .screen { transition: none !important; }
body.reduce-motion .ready { animation: none; }
.about-ver { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; margin-top: 14px; border-radius: 16px; background: rgba(255, 255, 255, .55); border: 1px solid var(--line); }
.about-ver > div:first-child { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; }
.about-upd { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.howto { margin: 0; padding-left: 20px; color: var(--ink-2); }
.howto li { margin: 6px 0; }
.howto strong { color: var(--ink); }
.changelog .rel { margin: 10px 0; }
.changelog .rel b { font-weight: 800; }
.changelog .rel span { color: var(--ink-2); font-size: 13px; margin-left: 6px; }
.changelog ul { margin: 4px 0 0; padding-left: 20px; color: var(--ink-2); }
.links a { color: var(--apricot-2); font-weight: 700; }
.bubble { position: relative; width: 150px; height: 150px; margin: 6px auto; border-radius: 50%; background: radial-gradient(circle, #fffdf6, #efe2c8); border: 1px solid var(--line); }
.bubble-ring { position: absolute; inset: 50px; border-radius: 50%; border: 2px dashed rgba(226, 135, 74, .55); }
.bubble-dot { position: absolute; left: 50%; top: 50%; width: 34px; height: 34px; margin: -17px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #fff, var(--apricot)); box-shadow: 0 2px 6px rgba(120, 60, 20, .35); }
.card-img { width: 100%; max-height: 52vh; object-fit: contain; border-radius: 6px; box-shadow: 0 6px 24px rgba(40, 20, 30, .25); background: #eee; }
.album { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.album button { padding: 0; border: 0; background: none; border-radius: 6px; overflow: hidden; box-shadow: 0 3px 12px rgba(40, 20, 30, .2); }
.album img { display: block; width: 100%; height: auto; }
.album-empty { color: var(--ink-2); }

@media (min-width: 700px) and (min-height: 560px) {
  .sheet { bottom: 50%; border-radius: 26px; transform: translate(-50%, 60%) scale(.96); opacity: 0; transition: transform .32s var(--ease), opacity .25s; }
  .sheet.show { transform: translate(-50%, 50%) scale(1); opacity: 1; }
  .sheet.tall { height: min(86vh, 780px); }
  .sheet::before { display: none; }
}

.toast { position: fixed; left: 50%; bottom: calc(var(--sab) + 90px); z-index: 50; transform: translate(-50%, 16px); opacity: 0; transition: opacity .25s, transform .25s var(--ease); pointer-events: none;
  max-width: calc(100% - 32px); padding: 10px 18px; border-radius: 18px; background: rgba(34, 26, 44, .82); color: var(--cream); font-weight: 600; font-size: 15px; text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.noscript { position: fixed; inset: 40% 20px auto; text-align: center; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .sheet, .scrim, .toast, .btn, .mode, .hud-hint, .screen, .toggle::after { transition: none !important; }
  .ready { animation: none; }
}
