/* device.avenpa.com — a remote in the hand.
   Layout: one column on a phone (the device's black screen, its faces, then the keys: a round pad 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.
   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: #6c6c76; --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;
  --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: 28px;
  --pad: min(176px, 46vw);
  --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%);
    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; }
body { padding: 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; }

/* ---------- top bar ---------- */
.bar { display: flex; align-items: center; gap: 4px; height: 54px; }
.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; }
.ib:hover { background: var(--line); }
.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; }
.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; 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.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; }
.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); }

/* ---------- faces: a strip that scrolls sideways ---------- */
.faces { display: flex; gap: 10px; margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))); padding: 4px max(16px, env(safe-area-inset-left, 0px)) 6px; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; overscroll-behavior-x: contain; }
.faces::-webkit-scrollbar { display: none; }
.face { flex: none; display: grid; justify-items: center; gap: 5px; width: 64px; scroll-snap-align: start; color: var(--fg-3); font-size: var(--fs-xs); transition: color .2s; }
.face canvas { display: block; width: 64px; height: 40px; border-radius: 12px; background: var(--scr); box-shadow: var(--lift); transition: transform .15s var(--ease), box-shadow .2s; }
.face:hover { color: var(--fg); }
.face:active canvas { transform: scale(.94); }
.face.sent { color: var(--fg); } .face.sent canvas { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--fg-3); }

/* ---------- 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, .remote.off .faces { 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: var(--pad); aspect-ratio: 1; border-radius: 50%; background: var(--key); box-shadow: var(--lift); }
.pad::before { content: ""; position: absolute; inset: 25%; border-radius: 50%; background: var(--well); box-shadow: var(--sink); }
.dir { position: absolute; display: grid; place-items: center; width: 31%; height: 31%; border-radius: 50%; color: var(--fg-2); transition: background .15s, color .15s; }
.dir svg.i { width: 22px; height: 22px; }
.dir.up { top: 1.5%; left: 34.5%; } .dir.down { bottom: 1.5%; left: 34.5%; } .dir.left { left: 1.5%; top: 34.5%; } .dir.right { right: 1.5%; top: 34.5%; }
.dir.down svg { transform: rotate(180deg); } .dir.left svg { transform: rotate(-90deg); } .dir.right svg { transform: rotate(90deg); }
.dir.on, .dir:active { background: var(--key-2); color: var(--fg); }
.call { position: absolute; inset: 29%; 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: 24px; height: 24px; }
.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: 11px; font-weight: 600; letter-spacing: .02em; }
.rock .lab svg.i { width: 18px; height: 18px; }
.moves { display: grid; grid-template-columns: repeat(4, minmax(0, 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: 10px; min-height: 58px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.row > .l { flex: 1; min-width: 0; } .row > .l small { display: block; color: var(--fg-3); font-size: var(--fs-s); }
.row > .v { max-width: 58%; color: var(--fg-3); font-size: var(--fs-s); text-align: right; overflow-wrap: anywhere; }
.row input.name { flex: 1; min-width: 0; height: 44px; padding: 0; border: 0; background: none; outline: 0; font-size: var(--fs-m); text-align: right; color: var(--fg-2); }
.row input.name:focus { color: var(--fg); }
.row .pen { flex: none; display: grid; place-items: center; width: 32px; height: 32px; margin-right: -6px; 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.sure { background: var(--hi); color: var(--ink); }
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); }
.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; }
.hero h1 { margin-top: 26px; font-size: var(--fs-xl); font-weight: 700; letter-spacing: -.03em; line-height: 1.25; text-wrap: balance; }
.hero .lede { margin-top: 10px; color: var(--fg-2); line-height: 1.6; text-wrap: pretty; }
.sub { margin-top: 6px; color: var(--fg-3); font-size: var(--fs-s); }
.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(--faint); text-decoration: none; } .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; height: 32px; padding: 0 13px 0 10px; border-radius: 16px; background: var(--key); box-shadow: var(--lift); color: var(--fg-2); font-size: var(--fs-s); }
.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: 16px; 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: 14px; 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: 16px; 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); }
.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; }
.dev:hover { background: var(--line); }
.dev canvas { flex: none; width: 66px; height: 42px; border-radius: 12px; background: var(--scr); }
.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 span { flex: 1; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.acct a, .acct button { padding: 6px 8px; border-radius: 8px; color: var(--fg-2); text-decoration: none; } .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; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 22px; background: var(--hi); color: var(--ink); font-size: var(--fs-s); font-weight: 600; text-align: center;
  opacity: 0; transform: translate(-50%, 10px); transition: opacity .25s, transform .3s var(--ease); pointer-events: none; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

@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.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 .face { width: 72px; } .app.wide .face canvas { width: 72px; height: 46px; }
  .app.wide .faces { margin: 0; padding-inline: 2px; flex-wrap: wrap; overflow: visible; }
  .app.wide .keys { padding-top: 12px; gap: 22px; }
  :root { --pad: 210px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
