/* Lumi on a phone on the desk (public/desk/): the eyes on black, one line of words, a talk button. The black behind the eyes is Lumi's signature. */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; background: #000; color: #f2f2f2; font: 16px/1.45 "Pretendard Variable", Pretendard, -apple-system, "Segoe UI Variable Text", "Segoe UI", "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif; /* the ai page's own (public/fonts/pretendard): one face for Korean and English (12-02) */ -webkit-tap-highlight-color: transparent; }
body { overflow: hidden; overscroll-behavior: none; word-break: keep-all; overflow-wrap: break-word; } /* Korean breaks between words (the sheet's "켜/져요", 11-28) */
main { position: fixed; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; overflow: hidden; padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
  --ew: min(110vw, 96vh); } /* the eyes' width. A little wider than a phone held upright: the picture's sides are black, so only black is cut (a look aside still fits, 12-02) */
@supports (height: 1dvh) { main { --ew: min(110vw, 96dvh); } } /* the height that is there with the browser's bars showing */
#eyes { flex: none; width: var(--ew); aspect-ratio: 3 / 2; } /* sized by its width only, so it stays 3:2 as the picture is drawn: a height cap (max-height) squashed the eyes on a phone on its side, 1.87:1 (12-02) */
#cap { min-height: 3em; max-width: min(90vw, 760px); margin: calc(var(--ew) * -0.06) 24px 0; text-align: center; font-size: clamp(17px, 2.6vw, 26px); color: #d9d9d9; transition: opacity .4s; } /* up into the picture's empty bottom band */
main:not(.pairing)::before { content: ""; flex: none; height: 3em; margin-bottom: calc(var(--ew) * -0.06); font-size: clamp(17px, 2.6vw, 26px); } /* as tall as the words under the eyes, so the eyes are in the middle, not pushed up by them (12-02) */
@media (orientation: portrait) { main:not(.pairing) { padding-bottom: calc(48px + env(safe-area-inset-bottom)); } } /* a little above the middle: the talk key is under them */
#cap.you { color: #8a8a8a; }
.dim { color: #8a8a8a; font-size: 15px; }
#eyes { transition: opacity 1.5s; } .doze #eyes { opacity: .55; } .asleep #eyes { opacity: .3; } /* nobody about, or its night (keep.js): dimmer (an OLED screen spends less on dark), bright again when anyone is back */
/* adding it (11-28, the user: "연결 방식이 안 매끄럽고 UI가 빡빡"): the eyes, a title and one line, then the QR with its code, with room between them;
   scrolled rather than cut on a short screen (the code fell off a 1280x800 tablet and a phone on its side), side by side when the screen lies on its side */
main.pairing { justify-content: flex-start; overflow-y: auto; padding-top: max(28px, env(safe-area-inset-top)); padding-bottom: max(28px, env(safe-area-inset-bottom)); }
.pairing #eyes { width: min(38vw, 17vh); margin-top: auto; }
.pairing #cap { display: none; }
#pair { display: flex; flex-direction: column; align-items: center; width: 100%; max-width: 480px; margin-bottom: auto; padding: 0 28px; text-align: center; }
#pair .pw { display: contents; }
#pairT { order: 1; margin: 3vh 0 6px; font-size: 26px; font-weight: 700; line-height: 1.25; letter-spacing: -.01em; }
#pairS { order: 2; margin: 0; color: #b0b0b0; font-size: 16px; overflow-wrap: anywhere; }
#mine { order: 3; display: grid; justify-items: center; gap: 12px; margin-top: 3.4vh; }
#mineN { margin: 0; min-height: 1.45em; color: #d9d9d9; font-size: 17px; }
#mineN:empty { display: none; }
.agree { display: flex; gap: 12px; align-items: flex-start; max-width: 340px; padding: 12px 14px; border: 1px solid #2a2a2a; border-radius: 14px; text-align: left; color: #b0b0b0; font-size: 15px; line-height: 1.4; cursor: pointer; }
.agree input { margin-top: 0; }
.agree a { color: #e6e6e6; text-underline-offset: 3px; }
.agree.need { border-color: #ff8a7a; animation: nudge .32s; }
@keyframes nudge { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
#mine .btn { min-width: min(78vw, 300px); }
#other { order: 4; display: flex; flex-direction: column; align-items: center; margin-top: 3.4vh; }
#signin, #hereB { order: 5; margin-top: 8px; }
#pairNote { order: 6; margin: 2.2vh 0 0; font-size: 14px; }
#qr { background: #fff; padding: 14px; border-radius: 20px; line-height: 0; }
#qr svg { width: min(60vw, 32vh, 260px); height: auto; }
#code { margin: 18px 0 2px; font: 600 34px/1.2 ui-monospace, Menlo, monospace; letter-spacing: .12em; }
#codeN { margin: 0; font-size: 14px; }
.link { display: inline-block; min-height: 44px; padding: 12px 10px; border: 0; background: none; color: #a0a0a0; font-family: inherit; font-size: 15px; line-height: 1.3; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
@media (orientation: landscape) and (min-aspect-ratio: 5/4) {
  main.pairing { display: grid; grid-template-columns: minmax(0, 400px) auto; grid-template-rows: auto auto; column-gap: clamp(32px, 7vw, 110px); align-content: center; justify-content: center; align-items: center;
    padding: max(20px, env(safe-area-inset-top)) max(28px, env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(28px, env(safe-area-inset-left)); }
  .pairing #eyes { grid-column: 1; grid-row: 1; align-self: end; width: min(22vw, 24vh); margin: 0; }
  .pairing #pair { display: contents; }
  #pair .pw { display: block; grid-column: 1; grid-row: 2; align-self: start; text-align: left; }
  #pairT { margin-top: 16px; }
  .pw .link { margin-left: -10px; } /* its words in line with the title's (the padding is for the finger) */
  #mine { justify-items: start; }
  #mine .btn { min-width: min(34vw, 300px); }
  #pair #other { grid-column: 2; grid-row: 1 / span 2; margin: 0; }
  #qr svg { width: min(54vh, 34vw, 300px); }
}
#ring { position: fixed; z-index: 5; inset: auto 0 0 0; background: #111; border-top: 1px solid #262626; border-radius: 24px 24px 0 0; padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); text-align: center; }
#ring h2 { font-size: 26px; margin: 4px 0 18px; }
.row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn { appearance: none; border: 1px solid #333; background: #1a1a1a; color: #f2f2f2; font-family: inherit; font-size: 17px; font-weight: 600; line-height: 1.2; /* "font: 600 17px/1 inherit" was thrown out whole: the buttons were 13px (11-28); 1.2: two lines of a long name don't touch (12-01) */ min-height: 56px; padding: 0 24px; border-radius: 16px; cursor: pointer; }
.btn.pri { background: #d9d9d9; color: #000; border-color: #d9d9d9; }
.btn.warn { color: #ff8a7a; }
.btn:focus-visible, .mic:focus-visible, .more:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.mic { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); width: 76px; height: 76px; border-radius: 50%; border: 1px solid #333; background: #141414; display: grid; place-items: center; cursor: pointer; }
.mic svg { width: 32px; height: 32px; fill: none; stroke: #e6e6e6; stroke-width: 1.7; stroke-linecap: round; }
.mic.on { background: #e6e6e6; } .mic.on svg { stroke: #000; }
.mic.busy { opacity: .55; }
.more { position: fixed; top: calc(10px + env(safe-area-inset-top)); right: calc(10px + env(safe-area-inset-right)); width: 48px; height: 48px; border: 0; background: none; cursor: pointer; transition: opacity .6s; }
.more svg { width: 24px; fill: #8a8a8a; }
.idle .more, .idle .mic { opacity: .25; }
.dot { position: fixed; top: calc(26px + env(safe-area-inset-top)); left: calc(22px + env(safe-area-inset-left)); width: 8px; height: 8px; border-radius: 50%; background: #c96b5b; }
.dot.quiet { background: #6b7bc9; }
.start { position: fixed; z-index: 6; inset: 0; display: grid; place-content: end center; justify-items: center; gap: 12px; padding: 24px 24px max(11vh, calc(28px + env(safe-area-inset-bottom))); text-align: center; background: linear-gradient(transparent 60%, rgb(0 0 0 / 85%) 76%); } /* (60%: the eyes' bottom was dimmed once they were made bigger, 12-02) the eyes above, clear (blurred they were a grey smudge, 11-28), the key under them */
.start .btn { min-width: min(78vw, 300px); }
.starting .mic { visibility: hidden; } /* under the start key's words after it is added (11-28) */
.start .dim { margin: 0; overflow-wrap: anywhere; }
@media (max-height: 520px) and (orientation: landscape) { /* a phone on its side: the eyes made smaller and higher, the key under them (it sat on the eyes behind a dark veil, 11-28 audit) */
  .starting #eyes { width: min(var(--ew), 72vh); margin-bottom: 30vh; } main.starting::before { display: none; } /* 48vh tall */
  .start { gap: 6px; padding: 0 24px max(12px, env(safe-area-inset-bottom)); background: linear-gradient(transparent 60%, rgb(0 0 0 / 85%) 72%); }
  .start .btn { min-height: 50px; }
}
dialog { background: #111; color: #f2f2f2; border: 1px solid #262626; border-radius: 22px; padding: 22px; width: min(92vw, 460px); max-height: calc(100% - 24px); overscroll-behavior: contain; }
/* the title and the keys stay, the middle scrolls: on a small phone the sheet ran off the top and the bottom (iPhone SE, 12-02) */
dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
dialog form { flex: 0 1 auto; min-height: 0; grid-template-rows: auto minmax(0, 1fr) auto; }
dialog .cols { overflow-y: auto; margin: 0 -8px; padding: 0 8px 24px; -webkit-mask-image: linear-gradient(#000 calc(100% - 24px), transparent); mask-image: linear-gradient(#000 calc(100% - 24px), transparent); } /* room for the focus ring; words cut by the scroll fade out, the last line clears the fade */
main:has(dialog[open]) .mic { visibility: hidden; } /* it showed under the sheet's edge */
@media (orientation: portrait) and (max-height: 640px) { dialog { padding: 18px; } dialog h2 { margin-bottom: 6px; } .opt { min-height: 44px; } }
dialog::backdrop { background: rgb(0 0 0 / 60%); }
dialog h2 { margin: 0 0 14px; font-size: 21px; } dialog h3 { margin: 8px 0 0; font-size: 16px; }
dialog form { display: grid; gap: 10px; }
dialog ul { margin: 0; padding-left: 1.2em; }
.opt { display: flex; gap: 12px; align-items: center; min-height: 48px; }
.opt input, .agree input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border: 1.5px solid #8a8a8a; border-radius: 7px; background: transparent center / 16px no-repeat; cursor: pointer; transition: background-color .12s, border-color .12s; }
.opt input:checked, .agree input:checked { background-color: #d9d9d9; border-color: #d9d9d9; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 8.5l3 3 6-7' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.opt input:focus-visible, .agree input:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.link.left { justify-self: start; margin: -10px 0 -10px 36px; padding: 0; min-height: 44px; } /* under its option's words */
.cols, .col { display: grid; gap: 10px; align-content: start; }
.end { display: flex; gap: 10px; } .end .btn { flex: 1; padding: 0 10px; white-space: nowrap; } /* "Unlink phone" went to two lines (12-01) */
dialog .btn { min-height: 50px; padding: 0 16px; }
#lic { justify-self: start; min-height: 32px; padding: 4px 0; font-size: 14px; }
#teach { position: fixed; z-index: 5; inset: auto 0 0 0; background: #111; border-top: 1px solid #262626; border-radius: 24px 24px 0 0; padding: 22px 22px calc(22px + env(safe-area-inset-bottom)); text-align: center; } /* as a ring: the eyes above it, listening */
#teach h2 { font-size: 24px; margin: 4px 0 14px; }
#teach .dim { margin: 12px auto 4px; max-width: 34em; } #teach .dim:empty { display: none; }
.dots { display: flex; gap: 12px; justify-content: center; }
.dots i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid #8a8a8a; }
.dots i.on { background: #e6e6e6; border-color: #e6e6e6; }
.teaching .mic { visibility: hidden; }
@media (max-height: 520px) and (orientation: landscape) { /* a phone lying on its side: the talk button at the side, clear of the words */
  main { --ew: min(100vw - 2 * (100px + env(safe-area-inset-right)), 112vh); } /* clear of the talk key at the side */
  @supports (height: 1dvh) { main { --ew: min(100vw - 2 * (100px + env(safe-area-inset-right)), 112dvh); } }
  .mic { left: auto; right: calc(20px + env(safe-area-inset-right)); bottom: auto; top: 50%; transform: translateY(-50%); }
  #ring, #teach { inset: auto 10% 0 10%; }
  /* a ring on a phone on its side: in one band, the words left, the keys right, and the eyes above it (it covered their lower half, 12-02 run) */
  #ring { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 24px; align-items: center; text-align: left; padding: 12px 24px max(12px, env(safe-area-inset-bottom)); }
  #ringS { margin: 0; } #ring h2 { grid-column: 1; margin: 2px 0 0; font-size: 22px; } #ring .row { grid-column: 2; grid-row: 1 / span 2; flex-wrap: nowrap; }
  #ringR { grid-column: 1 / -1; margin: 6px 0 0; } #ringR:empty { display: none; }
  .ringing #eyes { width: min(var(--ew), 78vh); margin-bottom: 26vh; } .teaching #eyes { width: min(var(--ew), 69vh); margin-bottom: 36vh; } /* 52vh and 46vh tall */
  main.ringing::before, main.teaching::before { display: none; }
  #teach { padding-top: 14px; padding-bottom: max(10px, env(safe-area-inset-bottom)); } #teach h2 { margin-bottom: 8px; } /* clear of the eyes */
  dialog { width: min(94vw, 820px); padding: 16px 22px; max-height: calc(100% - 16px); } /* the settings in two columns: one ran off the screen (12-01) */
  dialog h2 { margin: 0; font-size: 19px; }
  .cols { grid-template-columns: 1fr 1fr; gap: 28px; } .end { gap: 28px; }
  .opt { min-height: 44px; } dialog h3 { margin: 6px 0 0; }
}
@media (prefers-reduced-motion: reduce) { #eyes, #cap, .more, .opt input, .agree input { transition: none; } .agree.need { animation: none; } }
