/* device.avenpa.com — a remote in the hand.
   Layout: one column on a phone (the device's black screen, or its body in dots, then the keys: the round call key between two rockers, the moves, a line to say);
   from 900px the screen sits left like a TV and the keys right. The screen is always black with grey eyes (Lumi's signature); everything else is grey.
   The screen has the device's own shape (240×320 stands up, 128×64 lies down; a mono OLED shows its own pixels): a tall one beside the keys
   on a wide window, a wide one above them.
   Keys are raised shapes on the remote's body, not boxed rows; settings are plain rows on the page with hairlines. */
:root {
  --bg: #ebebed;          /* the remote's body */
  --key: #f9f9fa;         /* a key */
  --key-2: #e0e0e4;       /* a key held down */
  --well: #dfdfe3;        /* sunk: the groove round the middle key, a field */
  --fg: #19191c; --fg-2: #44444c; --fg-3: #62626b; /* 5.1:1 on --bg (#6c6c76 was 4.4, under 4.5: 12-03 check) */ --faint: #9a9aa4;
  --line: rgb(0 0 0 / 9%);
  --hi: #19191c; --ink: #fafafa;   /* the one filled key: listening, the main button */
  --lift: inset 0 1px 0 rgb(255 255 255 / 95%), 0 1px 2px rgb(0 0 0 / 9%), 0 6px 14px -8px rgb(0 0 0 / 22%);
  --sink: inset 0 1px 3px rgb(0 0 0 / 12%);
  --knob: #fff;
  --bezel: #fbfbfc; --bezel-edge: rgb(0 0 0 / 10%); --bezel-hi: rgb(255 255 255 / 100%);
  --scr: #000; --eye: #b4b9bf; --scr-fg: #c9ccd0; --scr-dim: #7d8288;
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Segoe UI Variable Text", "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
  --fs-xs: 12.5px; --fs-s: 13.5px; --fs-m: 16px; --fs-l: 20px; --fs-xl: 26px;   /* five sizes, nothing else */
  --r-field: 14px; --r-card: 18px; --r-stage: 26px;   /* three corners: a field, a card, the black stage (a pill is round: half its height) */
  --edge: rgb(0 0 0 / 14%);   /* the outline of a choice not picked */
  --danger: #e5484d; --danger-tx: #d93d42;
  --pad: min(176px, 46vw);
  --scr-max: clamp(220px, 36dvh, 340px);  /* the tallest a standing screen gets: the keys still fit under it */
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111113; --key: #1f1f23; --key-2: #2d2d32; --well: #17171a;
    --fg: #f4f4f5; --fg-2: #d4d4d8; --fg-3: #a1a1aa; --faint: #6f6f79;
    --line: rgb(255 255 255 / 8%);
    --hi: #f4f4f5; --ink: #111113; --knob: #d4d4d8;
    --lift: inset 0 1px 0 rgb(255 255 255 / 6%), 0 1px 2px rgb(0 0 0 / 55%), 0 8px 18px -10px rgb(0 0 0 / 80%);
    --sink: inset 0 1px 3px rgb(0 0 0 / 60%);
    --bezel: #2a2a2f; --bezel-edge: rgb(255 255 255 / 9%); --bezel-hi: rgb(255 255 255 / 14%);
    --edge: rgb(255 255 255 / 14%); --danger-tx: #ff6b70;   /* red words read on black (4.5:1) */
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--fg); font: var(--fs-m)/1.5 var(--sans); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent;
  word-break: keep-all; overflow-wrap: break-word; } /* Korean breaks between words ("않아/요" was split), a long address still wraps */
body { padding: max(10px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(16px, env(safe-area-inset-left, 0px)); }
button, input, select { font: inherit; color: inherit; }
button { margin: 0; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; }
a { color: inherit; }
h1, h2, p { margin: 0; }
[hidden] { display: none !important; }
svg.i { flex: none; width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; }
.app { max-width: 460px; margin: 0 auto; padding-bottom: 12px; }
/* a page comes in, it doesn't blink in; the first load waits with a quiet ring (shown only if it takes a moment) */
.app > main { animation: rise-in .32s var(--ease) both; }
.su .sbox > *, .su .sfoot > * { animation: rise-in .28s var(--ease) both; } /* each question of the setup */
@keyframes rise-in { from { opacity: 0; transform: translateY(6px); } }
.app:empty::after { content: ""; position: fixed; left: 50%; top: 46%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--fg-3);
  animation: spin 1s linear infinite, appear .2s .45s both; }
@keyframes appear { from { opacity: 0; } }

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; gap: 4px; height: 54px; } /* 10px under the page's top (the name sat on the top edge, 11-28) */
@media (min-width: 900px) { body { padding-top: max(22px, env(safe-area-inset-top, 0px)); } }
.bar .title { flex: 1; min-width: 0; font-size: var(--fs-l); font-weight: 650; letter-spacing: -.02em; }
.ib { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; color: var(--fg-2); transition: background .2s; }
@media (hover: hover) { .ib:hover { background: var(--line); } } /* a phone keeps :hover after a tap: the grey circle stayed on 말한 것 (11-28) */
.ib.log { margin-left: auto; } .ib.log + .ib { margin-left: 0; }
.ib:first-child { margin-left: -10px; } .ib:last-child { margin-left: auto; margin-right: -8px; }
.who { display: flex; align-items: center; gap: 6px; min-width: 0; height: 44px; margin-left: -4px; padding: 0 10px 0 4px; border-radius: 22px; transition: background .2s; }
@media (hover: hover) { .who:hover { background: var(--line); } }
.who .name { overflow: hidden; font-size: var(--fs-l); font-weight: 650; letter-spacing: -.02em; white-space: nowrap; text-overflow: ellipsis; }
.who svg.i { width: 18px; height: 18px; color: var(--fg-3); }

/* ---------- the device's screen ---------- */
.screen { position: relative; aspect-ratio: 2 / 1; width: min(100%, calc(var(--scr-max) * var(--arn, 2))); margin-inline: auto; border-radius: 26px; background: var(--scr); overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none;
  box-shadow: 0 1px 0 rgb(255 255 255 / 6%) inset, 0 14px 30px -18px rgb(0 0 0 / 60%); }
.screen canvas { display: block; width: 100%; height: 100%; transition: opacity .5s; }
.screen.mono canvas, .thumb.mono canvas { image-rendering: pixelated; }
.screen.off canvas { opacity: .45; }
.chip { position: absolute; top: 14px; left: 14px; display: flex; align-items: center; gap: 8px; height: 28px; padding: 0 12px 0 10px; border-radius: 14px; background: rgb(255 255 255 / 8%); color: var(--scr-fg); font-size: var(--fs-xs); font-weight: 500; }
.chip { transition: opacity .3s; } .chip.quiet { opacity: 0; } /* plain "on" is said once, by the name above; the screen shows only what it is doing */
.dot { flex: none; width: 7px; height: 7px; border-radius: 50%; background: var(--scr-fg); }
.screen.off .dot { background: none; box-shadow: inset 0 0 0 1.5px var(--scr-dim); }
.screen.busy .dot { animation: pulse 1.3s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; transform: scale(.8); } }
.cap { position: absolute; left: 50%; bottom: 14px; width: max-content; max-width: calc(100% - 32px); margin: 0; padding: 6px 14px; border-radius: 15px; background: rgb(0 0 0 / 80%); color: var(--scr-fg); font-size: var(--fs-s); line-height: 1.45; text-align: center; text-wrap: balance;
  opacity: 0; transform: translate(-50%, 4px); transition: opacity .35s, transform .35s var(--ease); pointer-events: none; } /* on a dark backing: on a wide-short screen the eyes reach the bottom */
.cap.on { opacity: 1; transform: translate(-50%, 0); }
.cap.dim { color: var(--scr-dim); } .cap.me { color: var(--scr-dim); font-style: normal; }
.cap.hush { opacity: 0; }
.osd { position: absolute; left: 50%; bottom: 16px; display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 14px; border-radius: 18px; background: rgb(30 30 33 / 94%); color: var(--scr-fg); font-size: var(--fs-s); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap;
  opacity: 0; transform: translate(-50%, 6px); transition: opacity .2s, transform .3s var(--ease); pointer-events: none; }
.osd.on { opacity: 1; transform: translate(-50%, 0); }
.osd svg.i { width: 18px; height: 18px; }
.osd .bars { display: flex; gap: 3px; } .osd .bars i { width: 5px; height: 14px; border-radius: 2px; background: rgb(255 255 255 / 16%); } .osd .bars i.on { background: var(--scr-fg); }


/* ---------- the keys ---------- */
.remote { display: flex; flex-direction: column; gap: 12px; }
.tv, .keys { display: flex; flex-direction: column; gap: 12px; }
.keys { transition: opacity .3s; }
.remote.off .keys { opacity: .38; pointer-events: none; }
.deck { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; justify-items: center; padding: 2px 0; }
.pad { position: relative; width: calc(var(--pad) * .7); aspect-ratio: 1; border-radius: 50%; background: var(--well); box-shadow: var(--sink); } /* the call key in its groove (the arrow keys round it went, 11-22) */
.call { position: absolute; inset: 8%; display: grid; place-content: center; justify-items: center; gap: 2px; border-radius: 50%; background: var(--key); box-shadow: var(--lift); color: var(--fg); font-size: var(--fs-xs); font-weight: 600; transition: background .25s, color .25s, transform .15s var(--ease); }
.call svg.i { width: 26px; height: 26px; }
.call span { font-size: var(--fs-s); }
.call:active { transform: scale(.95); }
.call.wait { color: var(--fg-3); }
.call.live, .call.busy { background: var(--hi); color: var(--ink); }
.call.live::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; box-shadow: 0 0 0 2px var(--fg-3); animation: ring 1.6s var(--ease) infinite; }
@keyframes ring { from { opacity: .9; transform: scale(.94); } to { opacity: 0; transform: scale(1.22); } }
.rock { display: grid; grid-template-rows: 1fr auto 1fr; width: 58px; height: calc(var(--pad) * .82); border-radius: 30px; background: var(--key); box-shadow: var(--lift); color: var(--fg-2); }
.rock > button { display: grid; place-items: center; transition: background .15s, color .15s; }
.rock > button:first-child { border-radius: 30px 30px 8px 8px; } .rock > button:last-child { border-radius: 8px 8px 30px 30px; }
.rock > button:active { background: var(--key-2); color: var(--fg); }
.rock .lab { display: grid; justify-items: center; gap: 3px; color: var(--faint); font-size: var(--fs-xs); font-weight: 600; }
.rock .lab svg.i { width: 18px; height: 18px; }
.rock .lv { font-weight: 600; }
.rock .lv.n { color: var(--fg-2); font-size: var(--fs-s); font-variant-numeric: tabular-nums; letter-spacing: 0; } /* the level, once the device said it */
.moves { display: grid; grid-template-columns: repeat(auto-fit, minmax(84px, 1fr)); gap: 8px; }
.key { display: grid; place-items: center; height: 44px; padding: 0 8px; border-radius: 16px; background: var(--key); box-shadow: var(--lift); color: var(--fg-2); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; transition: background .15s, transform .15s var(--ease); }
.key:active { background: var(--key-2); transform: scale(.97); }
.say { display: flex; align-items: center; gap: 8px; height: 52px; padding: 5px 5px 5px 18px; border-radius: 26px; background: var(--key); box-shadow: var(--lift); }
.say input { flex: 1; min-width: 0; height: 100%; padding: 0; border: 0; background: none; outline: 0; font-size: var(--fs-m); }
.say input::placeholder { color: var(--faint); }
.send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--hi); color: var(--ink); transition: opacity .2s, transform .15s var(--ease); }
.send:disabled { opacity: .25; cursor: default; }
.send:active:not(:disabled) { transform: scale(.93); }
.say:focus-within { box-shadow: var(--lift), 0 0 0 2px var(--fg-3); }

/* ---------- pages: settings, add, sign in ---------- */
.page { display: flex; flex-direction: column; }
.sec { margin-top: 26px; }
.sec > h2 { margin: 0 0 4px; color: var(--fg-3); font-size: var(--fs-s); font-weight: 600; }
.row { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.row > .l { flex: 1; min-width: 0; } .row > .l small { display: block; margin-top: 2px; color: var(--fg-3); font-size: var(--fs-s); line-height: 1.45; }
.row > .v { max-width: 58%; color: var(--fg-3); font-size: var(--fs-s); text-align: right; overflow-wrap: anywhere; }
/* a word to type in a row: a field you can see (the part names read as fixed values, 11-23) */
.row input.name { flex: 0 1 56%; min-width: 0; height: 42px; padding: 0 14px; border: 0; border-radius: var(--r-field); background: var(--well); box-shadow: var(--sink); outline: 0; font-size: var(--fs-m); color: var(--fg); }
.row input.name::placeholder { color: var(--faint); }
.row input.name:focus { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); }
.row .pen { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin: 0 -6px 0 -8px; color: var(--faint); }
.row .pen svg.i { width: 17px; height: 17px; }
.note { margin: 10px 0 0; color: var(--fg-3); font-size: var(--fs-s); line-height: 1.55; }
.pill { flex: none; display: inline-grid; place-items: center; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--key); box-shadow: var(--lift); color: var(--fg-2); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; transition: background .15s; }
.pill:active { background: var(--key-2); }
.pill.danger { background: none; box-shadow: inset 0 0 0 1.5px rgb(229 72 77 / 42%); color: var(--danger-tx); } /* apart from Run beside it, the same shape */
.pill.danger:active { background: rgb(229 72 77 / 12%); }
.pill.danger.sure { background: var(--danger); box-shadow: none; color: #fff; }
a.pill { text-decoration: none; }
/* on or off: a switch, its state by where its knob is and its colour, said in words for a reader (11-23 panel: a pill saying "켜짐" read as a key to press) */
.sw { flex: none; position: relative; width: 52px; height: 32px; padding: 0; border-radius: 16px; background: var(--key-2); box-shadow: inset 0 0 0 1.5px var(--line); transition: background .2s; cursor: pointer; }
.sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--fg-3); transition: transform .25s var(--ease), background .2s; }
.sw.on { background: var(--hi); box-shadow: none; } .sw.on::after { transform: translateX(20px); background: var(--ink); }
.sw-st { flex: none; min-width: 2.2em; color: var(--fg-3); font-size: var(--fs-s); text-align: right; } .sw-st.on { color: var(--fg-2); }
select.part { flex: none; max-width: 44%; height: 38px; padding: 0 30px 0 14px; border: 0; border-radius: 19px; background: var(--well) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat right 12px center; -webkit-appearance: none; appearance: none; font-size: var(--fs-s); font-weight: 600; text-overflow: ellipsis; cursor: pointer; }
.slide { flex-wrap: wrap; }
.slide .l { display: flex; justify-content: space-between; } .slide .l small { display: inline; font-variant-numeric: tabular-nums; }
.slide input[type=range] { -webkit-appearance: none; appearance: none; flex-basis: 100%; height: 30px; margin: 0; background: none; cursor: pointer; --p: 50%; }
.slide input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--fg-2) var(--p), var(--well) var(--p)); }
.slide input[type=range]::-moz-range-track { height: 6px; border-radius: 3px; background: linear-gradient(to right, var(--fg-2) var(--p), var(--well) var(--p)); }
.slide input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -10px; border-radius: 50%; background: var(--knob); box-shadow: var(--lift), 0 0 0 1px var(--line); }
.slide input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border: 0; border-radius: 50%; background: var(--knob); box-shadow: var(--lift); }
/* settings: one short list, as in a bought device's app (11-27; the 11-22 categories as tabs are gone) */
.setpage { padding-top: 2px; }
.setpage > .sec:first-child { margin-top: 6px; }
.setpage > details.ways > summary { color: var(--fg-2); font-size: var(--fs-m); font-weight: 500; }
.btn { display: grid; place-items: center; width: 100%; height: 54px; margin-top: 22px; border-radius: 27px; background: var(--hi); color: var(--ink); font-size: var(--fs-m); font-weight: 650; text-decoration: none; transition: opacity .2s, transform .15s var(--ease); }
.btn:active { transform: scale(.98); } .btn:disabled { opacity: .4; cursor: default; }
.btn.soft { background: var(--key); color: var(--fg); box-shadow: var(--lift); }
.hero { display: flex; flex-direction: column; padding-top: 8px; }
.hero .screen { aspect-ratio: 16 / 11; }
.v-pair .screen { --scr-max: clamp(150px, 26dvh, 260px); } /* the device that asks, in its own shape, small enough that Add shows without scrolling */
.hero h1 { margin-top: 26px; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.03em; line-height: 1.3; text-wrap: balance; }
.hero > h1:first-child { margin-top: 14px; } /* a page that starts with its heading: not a gap under the bar */
.hero .lede { margin-top: 10px; color: var(--fg-2); line-height: 1.6; text-wrap: pretty; }
.sub { margin-top: 8px; color: var(--fg-3); font-size: var(--fs-s); line-height: 1.55; text-wrap: pretty; }
.sub:empty { display: none; }
.agree { display: flex; align-items: flex-start; gap: 10px; margin-top: 22px; color: var(--fg-2); font-size: var(--fs-s); line-height: 1.55; cursor: pointer; }
.agree a { text-decoration: underline; text-underline-offset: 3px; }
.agree input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--hi); }
.agree.need { animation: shake .4s; } .agree.need span { color: var(--fg); font-weight: 600; }
@keyframes shake { 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.foot { display: flex; justify-content: center; gap: 4px; margin-top: 26px; font-size: var(--fs-s); }
.foot a, .foot button { padding: 8px 10px; border-radius: 8px; color: var(--fg-3); text-decoration: none; } /* --faint was 2.3:1 on white (12-03 check): links people need to read */ @media (hover: hover) { .foot a:hover, .foot button:hover { color: var(--fg); } }
.specs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.spec { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding: 5px 13px; border-radius: 16px; background: var(--well); color: var(--fg-2); font-size: var(--fs-s); line-height: 1.35; } /* a fact, flat: not a key to press */
.spec:has(svg) { padding-left: 10px; }
.spec svg.i { width: 16px; height: 16px; color: var(--fg-3); }
.field { display: block; margin-top: 22px; }
.field > span { display: block; margin-bottom: 8px; color: var(--fg-3); font-size: var(--fs-s); font-weight: 600; }
.field input { width: 100%; height: 52px; padding: 0 16px; border: 0; border-radius: var(--r-field); background: var(--well); box-shadow: var(--sink); outline: 0; font-size: var(--fs-m); }
.field input:focus { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); }
.where { margin-top: 18px; color: var(--fg-3); font-size: var(--fs-s); line-height: 1.6; }
.where b { color: var(--fg-2); font-weight: 600; }
.steps { display: grid; gap: 14px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { display: flex; align-items: baseline; gap: 12px; color: var(--fg-2); line-height: 1.5; counter-increment: s; }
.steps li::before { content: counter(s); flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--key); box-shadow: var(--lift); color: var(--fg-3); font-size: var(--fs-xs); font-weight: 700; transform: translateY(-1px); }
.qrart { display: block; width: 100%; height: auto; }
.code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.code input { width: 100%; height: 58px; padding: 0; border: 0; border-radius: var(--r-field); background: var(--well); box-shadow: var(--sink); outline: 0; font-size: 24px; font-weight: 650; text-align: center; font-variant-numeric: tabular-nums; caret-color: var(--fg-3); }
.code input:focus { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); }
.addr { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding: 6px 6px 6px 16px; border-radius: var(--r-field); background: var(--well); box-shadow: var(--sink); }
.addr code { flex: 1; min-width: 0; overflow-wrap: anywhere; font: 600 var(--fs-s)/1.4 ui-monospace, "JetBrains Mono", monospace; color: var(--fg-2); }
/* the add page's xiaozhi way: steps with the address, a picture of its setup page and the digits inside them */
.sec.xz > h2 { margin-top: 30px; } .sec.xz .steps { margin-top: 14px; } .sec.xz .steps li > div { flex: 1; min-width: 0; }
.sec.xz .steps .addr, .sec.xz .steps .code { margin-top: 10px; }
.xzshot { display: block; width: 100%; max-width: 340px; height: auto; margin-top: 12px; border-radius: 14px; box-shadow: var(--lift); }
.wait-line { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--fg-3); font-size: var(--fs-s); }
.wait-line i { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--fg-3); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- the device switcher ---------- */
.sheet { width: min(420px, calc(100vw - 24px)); max-height: min(80dvh, 640px); margin: auto; padding: 8px 0 12px; border: 0; border-radius: 26px; background: var(--bg); color: var(--fg); box-shadow: 0 0 0 1px var(--line), 0 30px 70px -20px rgb(0 0 0 / 55%); }
.sheet::backdrop { background: rgb(0 0 0 / 35%); }
.sheet[open] { animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.sheet h2 { padding: 14px 22px 6px; font-size: var(--fs-l); font-weight: 650; letter-spacing: -.02em; }
.dev { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 72px; padding: 10px 22px; text-align: left; transition: background .15s; }
@media (hover: hover) { .dev:hover { background: var(--line); } }
.dev .cell { flex: none; display: grid; place-items: center; width: 70px; height: 44px; }
.dev .thumb { display: block; width: 66px; height: 42px; border-radius: 10px; background: var(--scr); overflow: hidden; } /* sized to the device's screen in app.js */
.dev .thumb canvas { display: block; width: 100%; height: 100%; }
.dev .l { flex: 1; min-width: 0; } .dev .l b { display: block; overflow: hidden; font-weight: 600; white-space: nowrap; text-overflow: ellipsis; } .dev .l small { color: var(--fg-3); font-size: var(--fs-s); }
.dev .add { display: grid; place-items: center; width: 66px; height: 42px; border-radius: 12px; background: var(--key); box-shadow: var(--lift); color: var(--fg-2); }
.dev svg.ck { width: 18px; height: 18px; color: var(--fg); }
.acct { display: flex; align-items: center; gap: 8px; margin: 8px 22px 0; padding-top: 12px; border-top: 1px solid var(--line); color: var(--fg-3); font-size: var(--fs-s); }
.acct { flex-wrap: wrap; row-gap: 2px; } .acct span { flex: 1 0 100%; min-width: 0; padding: 0 8px 4px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; } /* the address on its own line, whole (it was cut beside three links) */
.acct a, .acct button { padding: 6px 8px; border-radius: 8px; color: var(--fg-2); text-decoration: none; } @media (hover: hover) { .acct a:hover, .acct button:hover { background: var(--line); } }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 10; width: max-content; max-width: calc(100vw - 32px); text-wrap: balance; padding: 12px 18px; border-radius: 22px; background: var(--hi); color: var(--ink); font-size: var(--fs-s); font-weight: 600; line-height: 1.45; text-align: center; box-shadow: 0 12px 30px -12px rgb(0 0 0 / 55%);
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .25s, transform .3s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#app.v-remote ~ .toast { top: calc(10px + env(safe-area-inset-top, 0px)); bottom: auto; transform: translate(-50%, -10px); } /* the remote: over its name, not over the keys under the thumb */
#app.v-remote ~ .toast.on { transform: translate(-50%, 0); }

@media (max-width: 899px) { .remote.moving { --scr-max: clamp(190px, calc(36dvh - 46px), 300px); } } /* the moves row too: the screen gives up its height, the remote still fits */
@media (max-width: 600px) {
  .sheet { width: 100%; max-width: none; margin: auto 0 0; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); border-radius: 26px 26px 0 0; }
  .sheet[open] { animation: rise .32s var(--ease); }
  @keyframes rise { from { transform: translateY(40px); opacity: .4; } }
}
@media (min-width: 900px) {
  .app.v-set { max-width: 640px; }
  .setpage { padding-top: 14px; }
  .app.wide { max-width: 1060px; }
  .app.wide .remote { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, 400px); gap: 20px 48px; align-items: start; }
  .app.wide .screen { aspect-ratio: 4 / 3; border-radius: 34px; }
  .app.wide .keys { padding-top: 12px; gap: 22px; }
  :root { --pad: 210px; --scr-max: min(64vh, 560px); }
  /* a standing (or square) screen: it on the left at full height, the keys beside it */
  .app.wide.tall { --scr-max: min(64vh, 560px, calc((100vw - 436px) / var(--arn))); max-width: calc(var(--scr-max) * var(--arn) + 64px + 430px); } /* never wider than the window; the name above lines up with the screen */
  .app.wide .remote.tall { grid-template-columns: auto minmax(340px, 430px); grid-template-areas: "scr ." "scr keys" "scr ."; grid-template-rows: 1fr auto 1fr; justify-content: space-between; gap: 0 64px; }
  .app.wide .remote.tall .tv { display: contents; }
  .app.wide .remote.tall .screen { grid-area: scr; width: calc(var(--scr-max) * var(--arn)); }
  .app.wide .remote.tall .keys { grid-area: keys; padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---- /install: USB install (install.js) ---- */
.ins .ins-stage { display: flex; flex-direction: column; }
.ins-boards { display: grid; gap: 10px; margin-top: 22px; max-height: min(56vh, 520px); overflow-y: auto; padding: 4px; }
.ins-boards > [hidden] { display: none; }
.ins-find { width: 100%; min-height: 48px; margin-top: 18px; padding: 0 16px; border-radius: var(--r-card); border: 0; background: var(--key); box-shadow: var(--lift); color: var(--fg); font: inherit; }
.ins-board { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; min-height: 62px; padding: 12px 16px; border-radius: var(--r-card); background: var(--key); box-shadow: var(--lift); color: var(--fg); text-align: left; cursor: pointer; transition: box-shadow .2s var(--ease), background .2s var(--ease); }
.ins-board b { font-size: var(--fs-m); font-weight: 650; }
.ins-board small { color: var(--fg-3); font-size: var(--fs-s); }
.ins-board:active { background: var(--key-2); }
.ins-board.on { box-shadow: var(--lift), 0 0 0 2px var(--hi); }
.ins-langrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; margin: 6px 0 2px; padding: 0 2px; }
.ins-langrow small { color: var(--fg-2); font-size: var(--fs-s); }
.ins-board:focus-visible, .ins-skip:focus-visible { outline: 2px solid var(--fg-3); outline-offset: 2px; }
.ins-alt { display: flex; flex-direction: column; align-items: center; gap: 2px; margin-top: 10px; }
.ins-skip { display: inline-block; min-height: 44px; padding: 10px 8px; color: var(--fg-3); font-size: var(--fs-s); text-decoration: underline; text-underline-offset: 3px; text-align: center; background: none; cursor: pointer; }
.ins progress { width: 100%; height: 10px; margin-top: 16px; border: 0; border-radius: 5px; overflow: hidden; background: var(--well); box-shadow: var(--sink); appearance: none; }
.ins progress::-webkit-progress-bar { background: var(--well); }
.ins progress::-webkit-progress-value { background: var(--hi); border-radius: 5px; transition: width .3s var(--ease); }
.ins progress::-moz-progress-bar { background: var(--hi); border-radius: 5px; }
.ins-hint { margin: 14px 0 0; padding: 12px 14px; border-radius: var(--r-field); background: var(--well); color: var(--fg-2); font-size: var(--fs-s); line-height: 1.55; }
.ins .lede.err { color: var(--fg); }
.ins-lic { align-self: center; margin-top: 30px; padding: 10px; color: var(--fg-3); font-size: var(--fs-xs); text-decoration: none; }
.ins-entry { margin-top: 12px; }
.hero > .ins-entry { margin-top: 22px; } .hero > details.ways { margin-top: 0; } .hero > .ins-entry + details.ways { margin-top: 18px; }
.hero > details.ways > summary { color: var(--fg); font-size: var(--fs-m); font-weight: 500; } .hero > details.ways .sec { margin-top: 4px; } .hero > details.ways .btn { margin-top: 14px; }
.ins-wifi .btn { margin-top: 26px; }
.ins-wifi [hidden] { display: none; }
.ins-nets { display: grid; gap: 8px; margin-top: 22px; max-height: min(46vh, 430px); overflow-y: auto; padding: 4px; }
.ins-net { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 52px; padding: 10px 16px; border-radius: var(--r-card); background: var(--key); box-shadow: var(--lift); color: var(--fg); font: inherit; text-align: left; cursor: pointer; transition: box-shadow .2s var(--ease), background .2s var(--ease); }
.ins-net:active { background: var(--key-2); }
.ins-net[aria-checked="true"] { box-shadow: var(--lift), 0 0 0 2px var(--hi); }
.ins-net:focus-visible { outline: 2px solid var(--fg-3); outline-offset: 2px; }
.ins-net .n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--fs-m); }
.ins-net.other { color: var(--fg-2); font-size: var(--fs-s); }
.ins-net .bars, .ins-net .lock { flex: none; display: inline-flex; width: 18px; height: 18px; color: var(--fg-3); }
.ins-net svg { width: 18px; height: 18px; fill: currentColor; }
.ins-net .bars[data-q="1"] rect:nth-child(n+2), .ins-net .bars[data-q="2"] rect:nth-child(3) { opacity: .25; }
.ins-24 { margin-top: 10px; }
.ins-code { margin-top: 22px; } .ins-code .btn { margin-top: 16px; }
.ins-code input { width: 100%; height: 60px; border: 0; border-radius: var(--r-field); background: var(--well); box-shadow: var(--sink); outline: 0; color: inherit; text-align: center; letter-spacing: .32em; font: 600 24px/1 ui-monospace, "JetBrains Mono", monospace; }
.ins-code input:focus { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); }
@media (prefers-reduced-motion: reduce) { .ins progress::-webkit-progress-value, .ins-board, .ins-net { transition: none; } }

/* ---------- 11-22 design round: the device has a body; the name says what it is; fewer keys sit centred ---------- */
.v-remote .screen, .v-pair .screen { margin-block: 11px;   /* the body round the screen: the plastic is a ring, so nothing in the layout changes */
  box-shadow: 0 0 0 9px var(--bezel), 0 0 0 10px var(--bezel-edge), inset 0 0 0 1px rgb(255 255 255 / 5%), 0 1px 0 10px var(--bezel-hi), 0 22px 34px -16px rgb(0 0 0 / 45%); }
.v-remote .screen.off { box-shadow: 0 0 0 9px var(--bezel), 0 0 0 10px var(--bezel-edge), 0 1px 0 10px var(--bezel-hi), 0 10px 18px -14px rgb(0 0 0 / 40%); }
.who { height: 50px; text-align: left; }
.who .nm { display: grid; justify-items: start; gap: 1px; text-align: left; min-width: 0; line-height: 1.2; }
.who .top { display: flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; }
.who .sub { overflow: hidden; color: var(--fg-3); font-size: var(--fs-xs); font-weight: 500; letter-spacing: 0; white-space: nowrap; text-overflow: ellipsis; }
.who .sub.on::before { content: ""; display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--fg-2); vertical-align: 1px; }
.deck.duo { grid-template-columns: auto auto; justify-content: center; column-gap: 30px; }
@media (min-width: 900px) { .app.wide .remote { margin-top: 10px; align-items: center; min-height: calc(100dvh - 130px); } .app.wide .remote.tall { align-items: stretch; } }
@media (max-width: 899px) { .v-remote .remote { --scr-max: clamp(180px, calc(100dvh - 394px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)), 340px); } }
/* the stage takes what the keys leave (bar 54 + keys ~280 + its ring 22 + 12 under them ≈ 384): on most phones it is as wide as the page, and the whole remote still fits */

/* learning its body: what moved, one tap */
.parts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.parts .key { height: 44px; padding: 0 4px; font-size: var(--fs-xs); white-space: normal; text-align: center; line-height: 1.2; }
.parts.motors:not(.guess) > .key:not(.soft):nth-last-child(3) { grid-column: 1 / -1; } /* "아무것도 안 움직였어요": the answer after the parts, the width of the grid */
.parts .key.soft { background: transparent; box-shadow: none; color: var(--fg-3); grid-column: 1 / -1; }
.parts .btn { grid-column: 1 / -1; margin-top: 4px; }
.parts.busy { opacity: .5; pointer-events: none; }
.moves .key.on { background: var(--key-2); }

/* the AI's five kinds, most likely first: how likely as a fill behind the name */
.ranks { display: grid; gap: 8px; margin-top: 16px; }
.rank { position: relative; display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0 18px; border-radius: var(--r-card); background: var(--key); box-shadow: var(--lift); overflow: hidden; color: var(--fg-2); font-size: var(--fs-m); font-weight: 600; text-align: left; }
.rank .fill { position: absolute; inset: 0 auto 0 0; background: var(--key-2); }
.rank .nm, .rank .pc { position: relative; } .rank .pc { color: var(--fg-3); font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.rank.top { color: var(--fg); box-shadow: var(--lift), 0 0 0 2px var(--fg-3); }
.rank:active { transform: scale(.985); }
.ranks .key.soft { background: transparent; box-shadow: none; color: var(--fg-3); }

/* moves: the ask, the AI's list (try, tick, name), the moves page */
.ask { grid-column: 1 / -1; padding: 16px 18px; border-radius: var(--r-card); background: var(--key); box-shadow: var(--lift); }
.ask b { display: block; font-size: var(--fs-m); } .ask p { margin-top: 6px; color: var(--fg-3); font-size: var(--fs-s); line-height: 1.55; }
.picks { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 16px; }
.pick, .cut-row { min-width: 0; }
.v-pair .hero:has(.picks) .screen, .v-pair .hero:has(.ranks) .screen { display: none; } /* a long list: the screen gives it the room */
.pick, .cut-row { padding: 12px 14px; border-radius: var(--r-card); background: var(--key); box-shadow: var(--lift); }
.pick .hd, .cut-row .hd { display: flex; align-items: center; gap: 10px; }
.pick input[type=checkbox] { flex: none; width: 20px; height: 20px; accent-color: var(--fg-2); }
.pick input.nm { flex: 1; min-width: 0; height: 36px; border: 0; background: none; outline: 0; font-size: var(--fs-m); font-weight: 600; color: var(--fg); }
.pick .tx, .cut-row > small { display: block; margin-top: 4px; color: var(--fg-3); font-size: var(--fs-xs); line-height: 1.45; overflow-wrap: anywhere; }
.pick .pill, .cut-row .pill { height: 36px; padding: 0 14px; font-size: var(--fs-s); }
.picks .btn { margin-top: 8px; } .picks .key.soft { background: transparent; box-shadow: none; color: var(--fg-3); }
.mv .cutlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 18px; }
.cut-row .hd b { flex: 1; min-width: 0; font-size: var(--fs-m); }
.cut-row .when { display: flex; gap: 8px; margin-top: 10px; }
.cut-row select, .cut-row input[type=time] { height: 40px; padding: 0 12px; border: 0; border-radius: 12px; background: var(--well); box-shadow: var(--sink); outline: 0; color: var(--fg-2); font-size: var(--fs-s); }
.cut-row select { flex: 1; min-width: 0; }
.mv .parts .say.mk { grid-column: 1 / -1; margin-top: 4px; }
.mv .parts .note { grid-column: 1 / -1; }

/* the remote's shortcuts: a row that scrolls sideways (● records, + adds) */
.cuts { display: flex; gap: 8px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 2px max(16px, env(safe-area-inset-left, 0px)); overflow-x: auto; scrollbar-width: none; }
.deskqr { width: min(200px, 56vw); margin: 4px auto 14px; line-height: 0; } .deskqr svg { display: block; width: 100%; height: auto; border-radius: 14px; } /* ai.avenpa.com/desk for the Android phone to scan (11-28) */
.cuts::-webkit-scrollbar { display: none; }
.cuts > :first-child { margin-left: auto; } .cuts > :last-child { margin-right: auto; } /* in the middle under the keys while they fit (a phone has only + : it sat at the left, 11-28); scrolled from the left once they don't */
.cuts.more { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 56px), transparent); }
.cut { flex: none; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--key); box-shadow: var(--lift); color: var(--fg-2); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; }
.cut:active, .cut.on { background: var(--key-2); }
.cut.rec { color: var(--danger-tx); } .cut.rec.on { background: var(--danger); color: #fff; }
.cut.stop { background: var(--danger); box-shadow: none; color: #fff; } .cut.stop:active { background: #c93b40; } /* "전부 멈춤": first, always there when the board can */
.cut.limb { background: transparent; box-shadow: inset 0 0 0 1.5px var(--line); }
.cut.add { display: inline-flex; align-items: center; gap: 5px; padding: 0 16px 0 12px; color: var(--fg-3); } .cut.add svg.i { width: 17px; height: 17px; } /* a + with its word: alone it was a circle nobody could name (11-28) */
.cut.keep { background: var(--hi); color: var(--ink); animation: keepIn .35s var(--ease); } /* an instruction's move just done: pin it (first in the row, off its body) */
@keyframes keepIn { from { opacity: 0; transform: translateX(-8px); } }
.cut .pintag { margin-left: 7px; padding: 2px 7px; border-radius: 9px; background: var(--key-2); color: var(--fg-3); font-size: var(--fs-xs); font-weight: 600; } /* pinned to one move */
.recname { margin-top: -4px; }
@media (min-width: 900px) { .app.wide .cuts { margin: 0; flex-wrap: wrap; justify-content: center; overflow: visible; } .app.wide .cuts > * { margin-left: 0; margin-right: 0; } } /* wrapped: each line in the middle */

/* ---------- its body in dots (public/device/dots.js): on black, like its screen ---------- */
.screen.stage { cursor: grab; } .screen.stage:active { cursor: grabbing; }
.fig { position: relative; flex: none; background: #000; border-radius: 14px; overflow: hidden; cursor: pointer; }
.fig canvas { display: block; width: 100%; height: 100%; }
.fig.sm { width: 112px; aspect-ratio: 3 / 2; }
.said { min-width: 0; margin: 0; overflow: hidden; color: var(--fg-3); font-size: var(--fs-xs); white-space: nowrap; text-overflow: ellipsis; opacity: 0; transition: opacity .25s; }
.said.on { opacity: 1; }
.ki { flex: none; display: grid; place-items: center; color: var(--fg-3); } .ki svg.i { width: 22px; height: 22px; stroke-width: 1.6; }
.rank { justify-content: flex-start; gap: 12px; padding-left: 14px; } .rank .pc { margin-left: auto; } .rank .ki { position: relative; }
.parts.kinds .key.kindk { height: auto; padding: 14px 4px 12px; gap: 6px; } .parts.kinds .key.kindk .ki svg.i { width: 26px; height: 26px; }
.parts.guess { grid-template-columns: minmax(0, 1fr); } .parts.guess .btn { margin-top: 0; }
.pick, .cut-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; column-gap: 12px; padding: 10px; }
.pick .pr, .cut-row .pr { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; min-width: 0; } /* one column the width it is given (a name field would push it out) */
.pick .ft, .cut-row .ft { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; } .pick .ft .said, .cut-row .ft .said { flex: 1; }
.pick .fig[hidden] + .pr, .cut-row .fig[hidden] + .pr { grid-column: 1 / -1; }
.cut-row .when { grid-column: 1 / -1; }
.cut-row .hd b { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
details.ways { margin-top: 26px; border-top: 1px solid var(--line); }
details.ways > summary { display: flex; align-items: center; justify-content: space-between; min-height: 52px; color: var(--fg-3); font-size: var(--fs-s); font-weight: 600; cursor: pointer; list-style: none; }
details.ways > summary::-webkit-details-marker { display: none; }
details.ways > summary::after { content: "+"; font-size: 20px; font-weight: 400; } details.ways[open] > summary::after { content: "−"; }
details.ways .sec { margin-top: 18px; }
/* an instruction (지시): a new move made at its moment; on the remote a shortcut with a spark, on the moves page its own form and its words */
.cut.rule::before { content: "✦ "; color: var(--fg-3); font-weight: 400; }
.mv .parts .rule { grid-column: 1 / -1; display: grid; gap: 10px; margin: 0 0 6px; padding: 16px; border-radius: var(--r-card); background: var(--key); box-shadow: var(--lift); }
.mv .parts .rule > b { font-size: var(--fs-m); }
.mv .parts .rule .say { box-shadow: inset 0 0 0 1px var(--line); background: var(--bg); }
.mv .parts .rule .note { margin: 0; }
.rulewhen { display: flex; gap: 8px; }
.rulewhen select, .rulewhen input, .cut-row .when .whentx { height: 40px; min-width: 0; padding: 0 12px; border: 0; border-radius: 12px; background: var(--well); box-shadow: var(--sink); outline: 0; color: var(--fg-2); font-size: var(--fs-s); }
/* every pick-one list the same: a sunk field with one small arrow (the native arrow sat beside the drawn one, 11-23) */
.cut-row select, .rulewhen select { -webkit-appearance: none; appearance: none; padding-right: 32px; background: var(--well) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23888' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M3 4.5l3 3 3-3'/%3E%3C/svg%3E") no-repeat right 12px center; text-overflow: ellipsis; cursor: pointer; }
.cut-row select:focus-visible, .cut-row input:focus, .rulewhen select:focus-visible, .rulewhen input:focus { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); outline: 0; }
.rulewhen select { flex: 1; } .rulewhen input:not([type=time]), .cut-row .when .whentx { flex: 1.4; }
.cut-row small.ask { display: block; margin-top: 4px; padding: 0; border-radius: 0; background: none; box-shadow: none; color: var(--fg-3); font-size: var(--fs-xs); line-height: 1.45; overflow-wrap: anywhere; } /* words under its name, not the .ask card (they were boxed, 11-23) */
.cut-row small.ask.dim { margin-top: 0; opacity: .75; }
.cut-row small.ask:not(.dim) { color: var(--fg-2); font-size: var(--fs-s); }
.mv .parts .rule { grid-template-columns: minmax(0, 1fr); min-width: 0; } .mv .parts .rule > * { min-width: 0; } /* nothing past the phone's edge (11-22 panel: the form ran off it) */
.rulewhen select, .rulewhen input { min-width: 0; width: 100%; }
.ruleex { display: flex; flex-wrap: wrap; gap: 6px; } .ruleex .pill { height: auto; min-height: 34px; padding: 7px 13px; background: transparent; box-shadow: inset 0 0 0 1px var(--edge); color: var(--fg-3); font-size: var(--fs-xs); font-weight: 500; white-space: normal; text-align: left; line-height: 1.35; } /* examples to borrow: quieter than the keys */
.ruleex .pill:active { background: var(--line); color: var(--fg); }
.ruleex .pill { flex: 0 1 auto; max-width: 100%; } /* a long example wraps inside its pill (it ran off a 320px screen in English, 11-28) */
/* the moves page: a move that stays the same, apart from an instruction (11-23 panel) */
.mv .parts .fixed { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); min-width: 0; }
.mv .parts .fixed > b { grid-column: 1 / -1; font-size: var(--fs-m); }
.mv .parts .fixed > .note { margin: 0; }

/* ---------- 11-23 setup: one question a screen (setupView); chips, the voice, the photo, its figure ---------- */
.bar .count { flex: none; padding-right: 4px; color: var(--fg-3); font-size: var(--fs-s); font-variant-numeric: tabular-nums; }
.su { padding-top: 0; }
.su .prog { display: flex; gap: 4px; margin-top: 2px; }
.su .prog i { flex: 1; height: 4px; border-radius: 2px; background: var(--well); transition: background .25s; }
.su .prog i.on { background: var(--fg-2); }
.su h1 { margin-top: 24px; font-size: var(--fs-xl); }
/* the next key stays where the thumb found it: at the foot of the screen when the question is short, after it when long (it moved up and down by question, 11-23) */
.su { min-height: calc(100dvh - 66px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
.sbox { display: flex; flex-direction: column; }
.sfoot { display: flex; flex-direction: column; margin-top: auto; padding: 24px 0 8px; }
.sfoot > .btn:first-child { margin-top: 0; }
@media (min-width: 600px) { .su { min-height: 0; } .sfoot { padding-top: 28px; } } /* a big window: the key under the question, not at the window's foot */
.sfoot .key.soft, .sbox .key.soft { height: 48px; }
.sfoot .key.soft { background: transparent; box-shadow: none; color: var(--fg-3); }
.opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 16px; }
.opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.opts .key { height: 52px; padding: 0 10px; white-space: normal; line-height: 1.25; text-align: center; }
/* a choice: outlined until it is picked, then filled (rows of raised dark keys read as a wall of black boxes, 11-23); a raised key does something, an outlined one is picked */
.opts .key, .parts .key:not(.soft), .rank { background: transparent; box-shadow: inset 0 0 0 1.5px var(--edge); color: var(--fg-2); }
.opts .key:active, .parts .key:not(.soft):active, .rank:active { background: var(--line); }
.key.on, .opts .key.on { background: var(--hi); color: var(--ink); box-shadow: none; }
.key.on:active { background: var(--hi); }
.rank { box-shadow: none; outline: 1.5px solid var(--edge); outline-offset: -1.5px; } /* an outline: drawn over how-likely's fill, not under it */
.rank.top { color: var(--fg); outline: 2px solid var(--fg-2); outline-offset: -2px; }
.sec > .opts { margin-top: 8px; }
.quiet { display: flex; flex-direction: column; }
.quiet .times { display: flex; align-items: center; gap: 8px; margin-top: 10px; color: var(--fg-3); font-size: var(--fs-s); white-space: nowrap; }
.quiet .times:lang(ko) > input:nth-of-type(1) { order: 1; } .quiet .times:lang(ko) > span:nth-of-type(1) { order: 2; } /* Korean says the time first: "22:00 부터 07:00 까지" */
.quiet .times:lang(ko) > input:nth-of-type(2) { order: 3; } .quiet .times:lang(ko) > span:nth-of-type(2) { order: 4; }
.quiet .times input { flex: 1; min-width: 0; height: 44px; padding: 0 12px; border: 0; border-radius: var(--r-field); background: var(--well); box-shadow: var(--sink); outline: 0; color: var(--fg); }
@media (max-width: 379px) { /* a narrow phone: each time on its own line, whole ("10:00 PM" was cut to "10:00 PI") */
  .quiet .times:not([hidden]) { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; }
  .quiet .times:lang(ko) { grid-template-columns: minmax(0, 1fr) auto; }
}
.field textarea { width: 100%; min-height: 120px; padding: 14px 16px; border: 0; border-radius: var(--r-field); background: var(--well); box-shadow: var(--sink); outline: 0; font: inherit; color: inherit; line-height: 1.5; resize: vertical; }
.field textarea:focus { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); }
.field.tight { margin-top: 8px; } .field.tight textarea { min-height: 84px; }
.btn.mic { gap: 8px; margin-top: 12px; grid-auto-flow: column; justify-content: center; }
.btn.mic svg.i { width: 22px; height: 22px; }
.btn.mic.recording { background: var(--danger); color: #fff; box-shadow: none; animation: recpulse 1.4s ease-in-out infinite; }
@keyframes recpulse { 50% { opacity: .75; } }
.su .btn + .btn, .su .btn + .key { margin-top: 10px; }
/* the photo: its two ways side by side under it; with no photo yet taking one is the key and going on without it the quiet way, with one "다음" is */
.sbox:has(> .photo) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 10px; }
.sbox:has(> .photo) > .photo { grid-column: 1 / -1; }
.sbox:has(> .photo) > .btn { margin-top: 14px; }
.sbox > .photo.has ~ .btn:not(.soft) { background: var(--key); color: var(--fg); box-shadow: var(--lift); }
.su:has(.photo:not(.has)) .sfoot > .btn { height: 48px; background: transparent; box-shadow: none; color: var(--fg-3); font-size: var(--fs-s); font-weight: 600; }
/* waiting for the AI: a black stage where its figure will be, so nothing jumps when it comes */
.su .sbox > .wait-line:only-child { justify-content: center; aspect-ratio: 16 / 10; margin-top: 18px; border-radius: var(--r-stage); background: #000; color: var(--scr-dim); }
.su .sbox > .wait-line:only-child i { border-color: rgb(255 255 255 / 14%); border-top-color: var(--scr-fg); }
.photo { display: grid; place-items: center; aspect-ratio: 4 / 3; margin-top: 18px; border-radius: var(--r-stage); background: #000; overflow: hidden; color: var(--scr-dim); }
.photo svg.i { width: 44px; height: 44px; stroke-width: 1.4; }
.photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-more { grid-column: 1 / -1; display: flex; gap: 10px; align-items: center; margin-top: 12px; }
.photo-more img { width: 64px; height: 48px; object-fit: cover; border-radius: 10px; background: #000; cursor: pointer; }
.photo-more .btn { flex: 1; margin: 0; }
.fig.big { width: 100%; aspect-ratio: 16 / 10; margin-top: 18px; border-radius: var(--r-stage); cursor: default; }
.su .ranks { margin-top: 12px; }
.su .rank { height: 48px; }
h2.mini { margin: 22px 0 0; color: var(--fg-3); font-size: var(--fs-s); font-weight: 600; }
.su .specs { margin-top: 10px; }
.su .ask { margin-top: 16px; }
.su .say { margin-top: 10px; }
.ask > .say { margin-top: 12px; background: var(--well); box-shadow: var(--sink); } /* the AI's question and the answer to it in one card */
.ask > .say:focus-within { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); }
/* a segmented choice (pace), in a settings row */
.seg { flex: none; display: inline-flex; padding: 3px; border-radius: 19px; background: var(--well); box-shadow: var(--sink); }
.seg button { height: 32px; padding: 0 14px; border-radius: 16px; color: var(--fg-3); font-size: var(--fs-s); font-weight: 600; white-space: nowrap; transition: background .2s, color .2s; }
.seg button.on { background: var(--key); box-shadow: var(--lift); color: var(--fg); }
.sec .opts .key { height: 46px; }
@media (min-width: 900px) { .sec > .opts:not(.three), .sec .quiet > .opts { grid-template-columns: repeat(4, minmax(0, 1fr)); } } /* a wide pane: four a row, not two long bars */
/* the look result: the standard figure a tap away when the one drawn off the photo reads wrong (11-23) */
.bits { text-rendering: geometricPrecision; } .bit { white-space: nowrap; margin-right: .5em; } .bit:last-child { margin-right: 0; } /* the items of a status line (paintBits): each kept whole, a gap after each but the last, so a wrapped line starts flush and the box can be inline, block or flex (a list row's small is display:block, the header's sub is a one-line ellipsis box). geometricPrecision keeps a number and its % together (glyph advances are not rounded to whole pixels) */

/* what it said (the remote's list) */
.saidlog { margin: 0; padding: 4px 0 0; list-style: none; }
.saidlog li { display: flex; gap: 14px; padding: 9px 22px; line-height: 1.5; }
.saidlog time { flex: none; width: 3.2em; color: var(--fg-3); font-size: var(--fs-s); font-variant-numeric: tabular-nums; padding-top: .1em; }
.saidlog span { min-width: 0; overflow-wrap: anywhere; }
.saidlog li.ring span { font-weight: 600; }
.sheet .note.blank { padding: 4px 22px; } /* not "pad": that is the call key's round groove (11-28: "Nothing yet." was drawn as a circle) */

/* what it is saying: two lines above the input, the newest at the bottom. Not ".live": that is the call key listening (.call.live), which this
   box's opacity 0 hid while it listened (11-24 to 12-01: the key went blank as it was called) */
.saying { display: flex; align-items: flex-end; max-height: 0; margin: 0; padding: 0 16px; border: 0 solid transparent; overflow: hidden; border-radius: 16px; background: var(--well); color: var(--fg); font-size: var(--fs-s); line-height: 1.5; opacity: 0; transition: max-height .25s var(--ease), opacity .2s, margin .25s var(--ease), border-width .25s var(--ease); -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 .7em); mask-image: linear-gradient(to bottom, transparent 0, #000 .7em); }
.saying.on { max-height: 3em; margin: 0 0 10px; border-width: 10px 0; opacity: 1; } /* the border is the box's top and bottom space: what overflows is cut at the text, not in the space */
.saying span { display: block; width: 100%; overflow-wrap: anywhere; }

/* 기기 소개: where, who, what for in one box, small choices in a flow (the settings' first pane was three tall grids and a text box, 11-24: "설정 간추려") */
.grp { margin-top: 14px; } .grp:first-of-type { margin-top: 8px; }
.grp h3 { margin: 0 0 6px; color: var(--fg-3); font-size: var(--fs-s); font-weight: 500; }
.sec .opts.dense, .sec > .opts.dense { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin-top: 0; }
.sec .opts.dense .key { height: 38px; padding: 0 8px; font-size: var(--fs-s); }
@media (min-width: 900px) { .sec > .opts.dense:not(.three) { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); } }
@media (prefers-color-scheme: dark) { /* a field sunk into a near-black page: an edge, or the six code boxes were not there (11-28) */
  .code input, .field input, .field textarea, .row input.name, .quiet .times input, .addr { box-shadow: var(--sink), inset 0 0 0 1px var(--edge); }
  .code input:focus, .field input:focus, .row input.name:focus { box-shadow: var(--sink), 0 0 0 2px var(--fg-3); }
}
/* getting to know them (helloView, 11-28): its questions as the setup's; two times side by side, one wide chip, what to try saying under its eyes */
.hello .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hello .two .field input { padding: 0 12px; }
.hello .agree { margin-top: 16px; font-size: var(--fs-m); color: var(--fg-2); }
.hello .sbox > .note { margin-top: 14px; }
.hello .hello-scr { --scr-max: clamp(130px, 22dvh, 220px); margin-top: 22px; }
.hello .tries { margin: 18px 0 0; padding: 0; list-style: none; }
.hello .tries li { padding: 13px 16px; border-radius: var(--r-field); background: var(--well); color: var(--fg-2); font-size: var(--fs-m); }
.hello .tries li + li { margin-top: 8px; }

/* in the chat's sheet (11-28: public/bot.js openThing frames this page): the sheet is the remote's body; its X ends every bar */
html.in { --bg: #fff; } /* the sheet's own white (index.html --panel): its dialogs and rings on it */
@media (prefers-color-scheme: dark) { html.in { --bg: #17171a; } }
html.in, html.in body { background: transparent; }
html.in body { padding-top: 4px; }
@media (min-width: 900px) { html.in body { padding: 10px 32px 0; } html.in .app.wide .remote { min-height: calc(100dvh - 96px); } }
.ib.shut { margin-left: 2px; color: var(--fg-3); }
.bar .title + .ib.shut, .bar .count + .ib.shut { margin-left: 0; }
.sheet .pill.more { display: flex; width: calc(100% - 44px); height: 44px; margin: 14px 22px 4px; } /* what it said: the whole conversation is in the chat */
.pill.sure { background: var(--hi); color: var(--ink); box-shadow: none; }

/* a board's own tools in its settings (ownTools): keys in a wrap, a colour, the web Lumi's eye colours, a field and 실행, what an info key answered */
.tkeys { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tout { margin: 10px 0 0; padding: 12px 14px; border-radius: var(--r-field); background: var(--well); color: var(--fg-2); font: var(--fs-xs)/1.55 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.row.wrap { flex-wrap: wrap; } .row.wrap > .l { flex-basis: 100%; } .row.wrap .seg { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tcolor { flex: none; width: 44px; height: 34px; padding: 0; border: 0; border-radius: 10px; background: none; cursor: pointer; }
.tswatch { flex: none; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; max-width: 72%; }
.tsw { width: 28px; height: 28px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgb(0 0 0 / 12%); }
.tsw.on { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg); }
.tform .row > .l { min-width: 5.5em; } .tform .row input.name { flex: 0 1 46%; min-width: 0; } .tform .row input.name[type=time] { flex: 0 1 124px; }
.targ { display: flex; align-items: center; gap: 12px; padding: 6px 0; } .targ small { flex: 1; color: var(--fg-3); font-size: var(--fs-s); } .targ input.name, .targ select.part { flex: 0 1 56%; max-width: none; }
/* the add page (11-29): what a device is, then a spare phone or a board as two cards; the picked one's way under them */
.kinds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
@media (max-width: 460px) { .kinds { grid-template-columns: 1fr; gap: 8px; } .kinds .kind { flex-direction: row; align-items: center; min-height: 0; padding: 14px; } } /* a phone: three in a row would break every word */
.kind { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-height: 128px; padding: 16px 14px 14px; border-radius: var(--r-card); background: var(--key); box-shadow: var(--lift); color: var(--fg); text-align: left; transition: box-shadow .2s, transform .15s var(--ease); }
.kind:active { transform: scale(.98); }
.kind svg.i { width: 26px; height: 26px; color: var(--fg-2); }
.kind b { display: block; font-size: var(--fs-m); font-weight: 650; line-height: 1.35; word-break: keep-all; }
.kind small { display: block; margin-top: 4px; color: var(--fg-3); font-size: var(--fs-s); line-height: 1.45; word-break: keep-all; }
.kind[aria-pressed=true] { box-shadow: var(--lift), inset 0 0 0 2px var(--fg); }
.kind[aria-pressed=false] { opacity: .78; }
.kindpane { margin-top: 6px; }
.kindpane .steps li > div { flex: 1; min-width: 0; }
.kindpane .deskqr { margin: 12px 0 2px; width: min(168px, 46vw); }
.kindpane .code { margin-top: 10px; }
.kindpane > .btn.soft { margin-top: 26px; }
.kindpane > .kq { margin: 24px 0 0; color: var(--fg-2); font-weight: 600; }
.kindpane > .ins-entry { margin-top: 14px; } .kindpane > details.ways { margin-top: 0; } .kindpane > .ins-entry + details.ways { margin-top: 18px; }
.kindpane > details.ways > summary { color: var(--fg); font-size: var(--fs-m); font-weight: 500; } .kindpane > details.ways .sec { margin-top: 4px; } .kindpane > details.ways .btn { margin-top: 14px; }
.note.center { text-align: center; }
@media (max-width: 340px) { .kinds { grid-template-columns: minmax(0, 1fr); } .kind { min-height: 0; flex-direction: row; align-items: center; } }
.offtip { display: none; margin: 4px 0 0; color: var(--fg-3); font-size: var(--fs-s); line-height: 1.45; text-align: center; text-wrap: balance; } .remote.off .offtip { display: block; } /* off: how it comes back, under its sleeping eyes (11-29) */
