/* Mac page, Ember (dark) / Daylight (light). Token names match the Figma variables `spasted / Ember` and
   apps/ios/Spasted/Theme.swift. Follows the system appearance.
   2026-10-14 redesign (Take「最強のUIを作ろう」, Figma 05 → "Mac web — directions", A): the space bar's twin sits at
   the bottom edge, right above the real one; what arrives rises out of it, what you send sinks into it. */
:root {
  --bg-top: #FFCFB3; --bg-bottom: #F1ECE6; --light-core: #FFB896; --light-glow: rgba(255,128,72,.6);
  --card: #FFFCF9; --rim: rgba(255,128,72,.55); --border: rgba(30,26,23,.08); --dash: rgba(30,26,23,.24);
  --text: #1E1A17; --muted: rgba(30,26,23,.54); --faint: rgba(30,26,23,.3);
  --control: rgba(30,26,23,.06); --control-on: #1E1A17; --control-on-text: #FFFCF9;
  --hot: #F2591C; --gone: #C9C0B8; --ok: #2F9E4F; --veil: rgba(241,236,230,.42);
  --key-top: #FFFDFA; --key-top2: #F4EDE6; --key-side: #DDD3C8; --key-edge: rgba(30,26,23,.10);
  --phone: #FFFCF9; --screen1: #FFE2D2; --screen2: #F7EFE9;
  --card-shadow: 0 30px 60px -30px rgba(120,64,30,.35), 0 2px 6px rgba(120,64,30,.06);
  --sans: -apple-system, "SF Pro Text", "Hiragino Sans", system-ui, sans-serif;
  --display: -apple-system, "SF Pro Display", "Hiragino Sans", system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #3B1A0E; --bg-bottom: #0B0909; --light-core: #FFD7BF; --light-glow: rgba(255,120,60,.55);
    --card: #17110F; --rim: rgba(255,190,150,.35); --border: rgba(255,255,255,.07); --dash: rgba(243,238,232,.26);
    --text: #F3EEE8; --muted: rgba(243,238,232,.5); --faint: rgba(243,238,232,.26);
    --control: rgba(255,255,255,.08); --control-on: #F3EEE8; --control-on-text: #17110F;
    --hot: #FF8A50; --gone: #5B534D; --ok: #7BD88F; --veil: rgba(5,4,4,.38);
    --key-top: #3A302B; --key-top2: #2A221E; --key-side: #120D0B; --key-edge: rgba(255,255,255,.10);
    --phone: #17110F; --screen1: #3E1E12; --screen2: #120D0B;
    --card-shadow: 0 30px 60px -30px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0; overflow: hidden; font: 16px/1.5 var(--sans); color: var(--text);
  background: radial-gradient(72% 52% at 50% 114%, var(--bg-top) 0%, color-mix(in srgb, var(--bg-top) 16%, var(--bg-bottom)) 48%, var(--bg-bottom) 100%) fixed, var(--bg-bottom);
}
body[data-light="dim"], body[data-light="off"], body[data-light="fail"] {
  background: radial-gradient(72% 44% at 50% 114%, color-mix(in srgb, var(--bg-top) 50%, var(--bg-bottom)) 0%, var(--bg-bottom) 60%) fixed, var(--bg-bottom);
}
button { font: inherit; color: inherit; cursor: pointer; }
button:focus-visible, a:focus-visible { outline: 2px solid var(--hot); outline-offset: 2px; }

/* ---- header: the logo, which phone is open, settings ---- */
.hdr { position: fixed; top: 0; left: 0; right: 0; height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px 0 32px; z-index: 10; }
.mark { display: flex; color: var(--text); }
.mark .logo { height: 18px; width: auto; display: block; }
.hdr .right { display: flex; align-items: center; gap: 10px; }
.peer { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 14px 0 12px; border-radius: 16px; background: var(--control); font: 600 13px var(--sans); white-space: nowrap; }
.peer i { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 22%, transparent); }
.peer.off { color: var(--muted); }
.peer.off i { background: var(--faint); box-shadow: none; }
.gear { width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: grid; place-items: center; }
.gear:hover { background: var(--control); }
.gear svg { fill: none; stroke: var(--text); stroke-width: 1.6; stroke-linejoin: round; opacity: .72; }

/* ---- stage ---- */
main { position: fixed; inset: 0; display: grid; place-items: center; }
main > section { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: center; text-align: center; }
.h { margin: 0; font: 600 40px/1.15 var(--display); letter-spacing: -.025em; text-wrap: balance; }
.s { margin: 0; font: 500 17px/1.5 var(--sans); color: var(--muted); }
.s b { color: var(--text); font-weight: 600; }
.wait { gap: 16px; transform: translateY(-46px); transition: opacity .25s, transform .4s; }

/* the picture: an iPhone (true proportions, island, buttons) tapping a keycap (top face + side) */
.scene { width: min(460px, 66vw); height: auto; overflow: visible; margin-bottom: 4px; }
.scene .kglow { fill: var(--light-glow); opacity: .7; animation: kglow 1.6s infinite; }
.scene .kside { fill: var(--key-side); }
.scene .ktop { fill: url(#ktopg); stroke: var(--key-edge); stroke-width: 1; }
.scene .k1 { stop-color: var(--key-top); } .scene .k2 { stop-color: var(--key-top2); }
.scene .kshine { stroke: var(--hot); stroke-width: 2.4; stroke-linecap: round; opacity: 0; animation: kshine 1.6s infinite; } /* the key lights when it's hit */
.scene .key { animation: keydown 1.6s infinite; }
.scene .phone { transform-box: view-box; transform-origin: 164px 160px; animation: tap 1.6s infinite; }
.scene .pbody { fill: var(--phone); stroke: var(--text); stroke-width: 2.2; }
.scene .s1 { stop-color: var(--screen1); } .scene .s2 { stop-color: var(--screen2); }
.scene .pisland, .scene .pbtn { fill: var(--text); }
.scene .pcard { fill: var(--card); stroke: var(--border); stroke-width: 1; }
.scene .pline { fill: none; stroke: var(--faint); stroke-width: 2.6; stroke-linecap: round; }
.scene .rip { fill: none; stroke: var(--hot); stroke-width: 2; opacity: 0; transform-box: fill-box; transform-origin: center; animation: rip 1.6s infinite; }
.scene .rip.r2 { animation-delay: .1s; }
.scene .sparks path { fill: none; stroke: var(--hot); stroke-width: 2.6; stroke-linecap: round; opacity: 0; animation: spark 1.6s infinite; }
/* not ready (offline, or not the front tab): the picture rests and fades. Ready again: it taps again */
body[data-light="off"] .scene, body[data-light="dim"] .scene { opacity: .45; transition: opacity .3s; }
body[data-light="off"] .scene *, body[data-light="dim"] .scene * { animation-play-state: paused !important; }
/* the beat (the iPhone app's): rest up → fall 0.15s → hit → hold → lift */
@keyframes tap { 0%,28% { transform: translateY(-34px) rotate(-4deg); animation-timing-function: cubic-bezier(.55,0,.9,.45); } 37.5% { transform: none; } 62.5% { transform: none; animation-timing-function: ease-in-out; } 100% { transform: translateY(-34px) rotate(-4deg); } }
@keyframes keydown { 0%,37% { transform: none; } 40% { transform: translateY(3px); } 56%,100% { transform: none; } }
@keyframes kglow { 0%,37% { opacity: .65; } 40% { opacity: 1; } 85%,100% { opacity: .65; } }
@keyframes kshine { 0%,37% { opacity: 0; } 39% { opacity: 1; } 75%,100% { opacity: 0; } }
@keyframes rip { 0%,37% { opacity: 0; transform: scale(.3); } 38.5% { opacity: .9; } 80%,100% { opacity: 0; transform: scale(2.6, 3.2); } }
@keyframes spark { 0%,37% { opacity: 0; } 39% { opacity: 1; } 58%,100% { opacity: 0; } }

/* ---- W-A2 / W-A3: it rises out of the space bar ---- */
.card { position: relative; border-radius: 28px; background: var(--card); border: 1px solid var(--border); border-bottom-color: var(--rim); box-shadow: var(--card-shadow); }
.arrived { gap: 26px; transform: translateY(-54px); animation: rise .75s cubic-bezier(.2,1.25,.4,1); }
@keyframes rise { from { transform: translateY(420px) scale(.8); opacity: 0; } 35% { opacity: 1; } to { transform: translateY(-54px); } }
.arrived .card { max-width: min(700px, 84vw); padding: 42px 48px 32px; text-align: left; }
.arrived .card pre, .staged pre { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font: 600 46px/1.15 var(--display); letter-spacing: -.024em; max-height: 38vh; overflow: hidden; }
.arrived .card img, .staged img { display: block; max-width: min(520px, 80vw); max-height: 42vh; border-radius: 21px; }
.arrived .card:has(img) { padding: 8px; }
.arrived .card:has(img) .from { padding: 8px 10px 4px; }
.from { margin: 22px 0 0; font: 500 14px var(--sans); color: var(--muted); }
.keys { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
kbd { width: 76px; height: 72px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(180deg, var(--key-top), var(--key-top2)); border: 1px solid var(--key-edge); box-shadow: 0 7px 0 var(--key-side), 0 18px 28px -14px rgba(0,0,0,.4); font: 600 30px var(--sans); color: var(--text); }
.arrived kbd.v { animation: pressv 2.4s .9s infinite; }
@keyframes pressv { 0%,30%,46%,100% { transform: none; box-shadow: 0 7px 0 var(--key-side), 0 18px 28px -14px rgba(0,0,0,.4); } 37% { transform: translateY(6px); box-shadow: 0 1px 0 var(--key-side), 0 8px 14px -10px rgba(0,0,0,.4); } }
.keys-say { margin: 0; font: 500 15px var(--sans); color: var(--muted); }

/* ---- Mac → phone: what you send sits on the space bar ---- */
.send { position: fixed; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 30px; padding: 0 24px 112px; }
.hint { display: flex; flex-direction: column; gap: 10px; font: 600 38px/1.15 var(--display); letter-spacing: -.024em; }
.hint small { font: 500 17px/1.5 var(--sans); color: var(--muted); letter-spacing: 0; }
.hint.sent::before { content: "✓"; align-self: center; width: 52px; height: 52px; margin-bottom: 8px; border-radius: 50%; background: #33D666; color: #000; display: grid; place-items: center; font: 800 26px/1 var(--sans); animation: pop .45s cubic-bezier(.2,1.6,.4,1); } /* F20's green check */
@keyframes pop { from { transform: scale(.4); opacity: 0; } }
#outbox { width: min(560px, 86vw); }
.drop { height: 210px; border-radius: 26px; border: 1.5px dashed var(--dash); background: color-mix(in srgb, var(--card) 45%, transparent); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.drop svg { fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.drop strong { font: 600 21px/1.25 var(--display); letter-spacing: -.015em; }
.drop span { font: 500 14px var(--sans); color: var(--muted); }
.drop.bad { border-color: var(--hot); }
.drop.bad svg { stroke: var(--hot); }
.staged { padding: 34px 40px 36px 72px; text-align: left; animation: float 3.2s ease-in-out infinite; }
.staged pre { font-size: 34px; line-height: 1.2; }
.staged:has(img) { padding: 8px; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -6px; } }
.staged.sink { transition: transform .6s cubic-bezier(.6,0,.4,1), opacity .5s; transform: translateY(260px) scale(.82); opacity: 0; }
.x { position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border: 0; border-radius: 50%; display: grid; place-items: center; background: var(--control); color: var(--text); font: 400 22px/1 var(--sans); z-index: 1; }

/* one line about what happened (W-A4 / W-B3 / W-B4 / W-C2) */
.say { position: fixed; left: 50%; top: 64%; transform: translateX(-50%); margin: 0; display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 22px; background: var(--control); font: 600 16px/1 var(--sans); white-space: nowrap; z-index: 5; }
.say.solid { background: var(--control-on); color: var(--control-on-text); top: 44%; }

/* ---- the space bar's twin, at the bottom edge (the real one is right below the screen) ---- */
.light { position: fixed; left: 50%; bottom: 0; width: min(600px, 58vw); height: 0; transform: translateX(-50%); pointer-events: none; z-index: 1; }
.light .bar { position: absolute; left: 4%; right: 4%; bottom: 10px; height: 26px; border-radius: 13px; background: var(--light-core); box-shadow: 0 0 46px 16px var(--light-glow), 0 0 220px 90px color-mix(in srgb, var(--light-glow) 32%, transparent); transition: transform .08s ease, filter .2s, background .2s, opacity .25s; animation: breathe 3.2s ease-in-out infinite; }
.light .glow { display: none; }
@keyframes breathe { 0%,100% { opacity: .8; } 50% { opacity: 1; } }
.spacekey { position: fixed; left: 50%; bottom: -26px; width: min(600px, 58vw); height: 80px; transform: translateX(-50%); z-index: 21; border-radius: 16px; background: linear-gradient(180deg, var(--key-top), var(--key-top2)); border: 1px solid var(--key-edge); box-shadow: inset 0 1px 0 color-mix(in srgb, white 10%, transparent), 0 -1px 0 color-mix(in srgb, var(--hot) 55%, transparent); transition: transform .08s ease, box-shadow .2s, opacity .25s; display: flex; justify-content: center; pointer-events: none; }
.spacekey::after { content: ""; position: absolute; left: 12%; right: 12%; top: -1px; height: 2px; border-radius: 1px; background: linear-gradient(90deg, transparent, var(--hot) 25%, var(--hot) 75%, transparent); opacity: .9; transition: opacity .2s, background .2s; }
.spacekey span { margin-top: 18px; font: 600 14px var(--sans); color: var(--muted); letter-spacing: .01em; }
body.press .spacekey { transform: translateX(-50%) translateY(7px); }
body.press .light .bar { transform: translateY(6px); filter: brightness(1.25); }
body[data-light="dim"] .light .bar { opacity: .35; animation: none; box-shadow: 0 0 30px 8px var(--light-glow); }
body[data-light="dim"] .spacekey::after { opacity: .25; }
body[data-light="fail"] .light .bar { background: var(--gone); box-shadow: none; animation: none; }
body[data-light="fail"] .spacekey::after { background: var(--gone); }
body[data-light="fail"] .spacekey { animation: keyshake .4s; }
@keyframes keyshake { 20%,60% { transform: translateX(calc(-50% - 8px)); } 40%,80% { transform: translateX(calc(-50% + 8px)); } }
body[data-light="off"] .light .bar { display: none; }
body[data-light="off"] .spacekey { background: transparent; border: 1.5px dashed var(--faint); box-shadow: none; }
body[data-light="off"] .spacekey::after { opacity: 0; }
/* the hit: rings run up out of the key */
.ring { position: fixed; left: 50%; bottom: -150px; width: 700px; height: 300px; border-radius: 50%; border: 3px solid var(--hot); transform: translateX(-50%) scale(.5); opacity: 0; pointer-events: none; z-index: 2; }
.ring.b { border-width: 2px; }
.ring.go { animation: ring 1.1s cubic-bezier(.1,.6,.3,1) both; }
.ring.b.go { animation-delay: .1s; }
@keyframes ring { 0% { opacity: 1; transform: translateX(-50%) scale(.5); } 100% { opacity: 0; transform: translateX(-50%) translateY(-360px) scale(1.5); } }

/* which way: a quiet line above the key (the Mac decides; ⌘V or a drop switches) */
.modes { position: fixed; left: 50%; bottom: 70px; transform: translateX(-50%); z-index: 4; }
.modes button { border: 0; background: none; padding: 6px 10px; border-radius: 10px; font: 500 13px var(--sans); color: var(--muted); white-space: nowrap; }
.modes button b { color: var(--text); font-weight: 600; }
.modes button:hover { background: var(--control); }

/* dragging over the window: the whole page is the target */
.dropzone { position: fixed; inset: 0; z-index: 25; display: grid; place-items: center; background: color-mix(in srgb, var(--bg-bottom) 72%, transparent); backdrop-filter: blur(8px); pointer-events: none; }
.dropzone > div { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 56px 80px; border-radius: 32px; border: 2px dashed var(--hot); background: color-mix(in srgb, var(--card) 70%, transparent); }
.dropzone strong { font: 600 30px var(--display); letter-spacing: -.02em; }
.dropzone span { font: 500 15px var(--sans); color: var(--muted); }

/* ---- W-C1: not the front tab. Dim a little; the key says what to do ---- */
.veil { position: fixed; inset: 0; background: var(--veil); cursor: pointer; z-index: 20; }

/* ---- footer: quiet links in the corners ---- */
/* Not Chrome: one quiet line under the header (mac.html #browserNote) */
.browser-note { position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 3; margin: 0; padding: 6px 14px; max-width: calc(100vw - 32px); border-radius: 999px; background: var(--control); color: var(--muted); font: 500 13px/1.4 var(--sans); text-align: center; }
.browser-note b { color: var(--text); font-weight: 600; }

.foot { position: fixed; left: 28px; right: 28px; bottom: 18px; display: flex; justify-content: space-between; z-index: 3; pointer-events: none; }
.foot span { display: flex; gap: 18px; align-items: center; pointer-events: auto; }
.foot a { font: 500 12px var(--sans); color: var(--faint); text-decoration: none; }
.foot a:hover { color: var(--muted); }
/* ADR-069: the Mac app is one click away. A small pill, so it reads without competing with the QR or the space bar */
.foot a.get { padding: 8px 14px; border-radius: 999px; background: var(--control); color: var(--text); font: 600 13px var(--sans); }
.foot a.get:hover { background: var(--control-on); color: var(--control-on-text); }
/* The left row (iPhone app · Mac app · Discord) is 342px and runs under the space key below ~1355px. There the text
   links stack above the pill, and the key gives way where even the pill would not fit (tools/e2e/mac-footer.mjs) */
@media (max-width: 1380px) {
  .foot { align-items: last baseline; }
  .foot span:first-child { flex-wrap: wrap; max-width: 200px; row-gap: 10px; }
  .foot a.get { order: 1; }
}
@media (min-width: 761px) and (max-width: 1105px) { .light, .spacekey { width: min(600px, 58vw, 100vw - 464px); } }

/* ---- ADR-051 pairing: the QR, framed like a camera finder ---- */
.pair { gap: 14px; transform: translateY(-40px); }
.pair .qr { position: relative; width: 220px; height: 220px; padding: 14px; border-radius: 24px; background: #fff; box-shadow: 0 0 0 1px var(--border), var(--card-shadow); margin-bottom: 18px; }
.pair .qr img { display: block; width: 100%; height: 100%; image-rendering: pixelated; }
/* Practical round: nobody at this Mac, so no code on screen (mac.js restQr) */
.pair .qr .rest { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; text-align: center; font: 500 13px/1.4 var(--sans); color: #8a8a8a; }
.pair.resting .qr .rest { display: flex; }
.pair.resting .qr img { visibility: hidden; }
.pair .qr .c { position: absolute; width: 30px; height: 30px; border: 3px solid var(--hot); }
.pair .qr .tl { left: -14px; top: -14px; border-right: 0; border-bottom: 0; border-top-left-radius: 14px; }
.pair .qr .tr { right: -14px; top: -14px; border-left: 0; border-bottom: 0; border-top-right-radius: 14px; }
.pair .qr .bl { left: -14px; bottom: -14px; border-right: 0; border-top: 0; border-bottom-left-radius: 14px; }
.pair .qr .br { right: -14px; bottom: -14px; border-left: 0; border-top: 0; border-bottom-right-radius: 14px; }
.pair .small { font-size: 13px; color: var(--faint); }

/* ---- W-D1 settings drawer ---- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 100%); overflow: auto; z-index: 30; background: var(--card); border-left: 1px solid var(--border); box-shadow: var(--card-shadow); padding: 30px; display: flex; flex-direction: column; gap: 22px; }
.dh { display: flex; justify-content: space-between; align-items: center; }
.dh h2 { margin: 0; font: 700 22px var(--display); }
.dh .x { position: static; }
.drawer h3 { margin: 0; font: 600 13px var(--sans); color: var(--muted); } /* F16: sentence case, iOS spacing */
#history { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow: auto; }
#history li { display: grid; grid-template-columns: 52px 18px 1fr; gap: 10px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--border); font: 500 15px/1.35 var(--sans); font-variant-numeric: tabular-nums; }
#history li.empty { display: block; color: var(--muted); border: 0; }
#history time { color: var(--muted); }
#history .ok { color: var(--ok); } #history .ng { color: var(--hot); }
.tg { display: flex; justify-content: space-between; align-items: center; font: 500 16px var(--sans); }
.tg input { appearance: none; width: 46px; height: 28px; border-radius: 14px; background: var(--control); position: relative; cursor: pointer; transition: background .2s; }
.tg input::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: left .2s; }
.tg input:checked { background: var(--hot); }
.tg input:checked::after { left: 21px; }
.tg-note { margin: -6px 0 4px; font: 500 13px/1.45 var(--sans); color: var(--muted); }
.promo { border-radius: 16px; background: var(--control); padding: 16px 18px; display: flex; flex-direction: column; gap: 6px; font: 500 14px/1.5 var(--sans); color: var(--muted); }
a.promo { text-decoration: none; }
.legal { display: flex; gap: 8px; margin: 4px 0 0; font: 500 12px var(--sans); color: var(--muted); }
.legal a { color: var(--muted); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
a.promo:hover b { text-decoration: underline; }
.promo b { color: var(--text); font: 600 15px var(--sans); display: inline-flex; align-items: center; gap: 8px; }
.promo .logo { width: 22px; height: 16px; display: block; } /* official Discord symbol, unaltered */

/* ---- shake (W-A4 / W-B4 / can't send) ---- */
.shake { animation: shake .4s; }
@keyframes shake { 20%,60% { transform: translateX(-10px) rotate(-1deg); } 40%,80% { transform: translateX(10px) rotate(1deg); } }

/* ---- dev panel (?debug) ---- */
#dev { position: fixed; right: 0; bottom: 0; z-index: 1000; max-width: 360px; max-height: 45vh; overflow: hidden; font: 11px/1.4 ui-monospace, monospace; background: rgba(0,0,0,.8); color: #0f0; padding: 6px; pointer-events: none; }
#dev table { border-collapse: collapse; }
#dev th { text-align: left; padding-right: 8px; font-weight: normal; color: #8f8; }
#dev pre { margin: 6px 0 0; white-space: pre-wrap; max-height: 12vh; overflow: hidden; font: inherit; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ADR-051: pairing (Figma "Pairing — QR once per Mac") */
.link { border: 0; background: none; padding: 0; font: 600 13px var(--sans); color: var(--muted); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.phones { list-style: none; margin: -10px 0 0; padding: 0; border-radius: 16px; background: var(--control); }
.phones li { display: flex; justify-content: space-between; align-items: center; padding: 14px 18px; font: 500 15px var(--sans); }
.phones li + li { border-top: 1px solid var(--border); }
.phones li.empty { color: var(--muted); }
.phones .link { text-decoration: none; }
.phones .who { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.phones .who b { font-weight: 500; }
.phones .who small { font: 400 12px var(--sans); color: var(--muted); }
.promo-btn { border: 0; border-radius: 14px; background: var(--control-on); color: var(--control-on-text); font: 600 15px var(--sans); padding: 12px 16px; cursor: pointer; margin-top: -8px; }
.namefield { display: flex; flex-direction: column; gap: 8px; font: 500 13px var(--sans); color: var(--muted); }
.namefield input { font: 500 15px var(--sans); color: var(--text); background: var(--control); border: 0; border-radius: 12px; padding: 12px 14px; outline: none; }
.namefield input:focus { box-shadow: 0 0 0 2px var(--hot); }

@media (max-width: 760px) { .hdr { padding: 0 14px 0 18px; } .h { font-size: 28px; } .hint { font-size: 28px; } .foot { display: none; } .scene { width: min(300px, 76vw); } .arrived .card pre { font-size: 32px; } }
@media (max-height: 640px) { .scene { width: 260px; } .wait { transform: translateY(-30px); } }

/* ---- just paired: the QR becomes the answer, in place; then the chip lights up ---- */
.pairdone { gap: 14px; transform: translateY(-40px); }
.okmark { width: 92px; height: 92px; margin-bottom: 14px; border-radius: 50%; background: #33D666; display: grid; place-items: center; box-shadow: 0 0 0 10px color-mix(in srgb, #33D666 16%, transparent); animation: okpop .55s cubic-bezier(.2,1.6,.4,1); }
.okmark path { fill: none; stroke: #000; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 24; stroke-dashoffset: 24; animation: okdraw .35s .18s ease-out forwards; }
.pairdone .h, .pairdone .s { animation: fadeup .45s .12s both; }
@keyframes okpop { from { transform: scale(.3); opacity: 0; } }
@keyframes okdraw { to { stroke-dashoffset: 0; } }
@keyframes fadeup { from { transform: translateY(8px); opacity: 0; } }
.peer.fresh { animation: chipin .7s cubic-bezier(.2,1.4,.4,1); box-shadow: 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent), 0 0 24px color-mix(in srgb, var(--ok) 30%, transparent); }
@keyframes chipin { from { transform: scale(.7); opacity: 0; } }
.notyou { border: 0; background: none; height: 32px; padding: 0 6px; font: 500 12px var(--sans); color: var(--muted); animation: fadeup .4s .3s both; }
.notyou:hover { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
