/* =============================================================================
   grogu · app.css — 앱 레이아웃(무대 · 대화 · 대화상자). 얼굴 SVG 안쪽 스타일은 css/grogu.css(얼굴 담당).
   모바일 우선: 위 = 별이 반짝이는 사막의 밤(오리지널 CSS/SVG) + 얼굴, 아래 = 대화. 900px 이상: 얼굴 크게 왼쪽 · 대화 오른쪽.
   글자 크기는 rem — 사용자가 브라우저 기본 글자 크기를 키우면 함께 커진다.
   ========================================================================== */
:root {
  --night1: #141032; --night2: #2a2152; --dusk: #6d4072; --glow: #f2a47e;
  --paper: #fff9f0; --paper2: #fff3e2; --ink: #3b2b20; --muted: #8a7565; --line: #e6d2b8;
  --leaf: #6fa857; --leaf-d: #3f6e2c; --leaf-l: #edf7e4; --leaf-b: #cfe6bd;
  --peach: #ffe4cf; --rose: #b23a5a;
  --font: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}
:lang(ja) { --font: "Hiragino Maru Gothic ProN", "Hiragino Sans", "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", system-ui, sans-serif; }
:lang(ko) { --font: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
:lang(zh-Hans) { --font: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:lang(zh-Hant) { --font: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
:lang(th) { --font: "Leelawadee UI", "Thonburi", "Noto Sans Thai", system-ui, sans-serif; }
:lang(ko) body { word-break: keep-all; }

* { box-sizing: border-box; }
html, body { margin: 0; }
/* 첫 화면 = 대화 앱(100dvh). 그 아래 정적 설명(section.seo)은 페이지를 스크롤해야 보인다 → 세로 스크롤은 열고 가로만 막는다 */
body {
  background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 1rem; line-height: 1.5;
  -webkit-tap-highlight-color: transparent; -webkit-text-size-adjust: 100%; overflow-x: hidden;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }

/* ── 레이아웃 ── */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; width: 100%; }

/* ── 무대(밤하늘 · 사막 · 얼굴) ── */
.stage {
  position: relative; flex: 0 0 auto; height: clamp(250px, 45dvh, 470px); overflow: hidden; isolation: isolate;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(180deg, var(--night1) 0%, var(--night2) 42%, var(--dusk) 70%, var(--glow) 100%);
}
.sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.stars { position: absolute; inset: 0; }
.star { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: #fff; opacity: .7; animation: twinkle 3s ease-in-out infinite; }
.star.big { width: 3px; height: 3px; box-shadow: 0 0 6px 1px rgba(255, 255, 255, .7); }
@keyframes twinkle { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.moon {
  position: absolute; right: 11%; top: 13%; width: 46px; height: 46px; border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fffbe9, #f6deb0 58%, #e9bd84);
  box-shadow: 0 0 34px 10px rgba(255, 222, 170, .32);
}
.moon.small { right: 23%; top: 27%; width: 17px; height: 17px; opacity: .85; box-shadow: 0 0 16px 4px rgba(255, 222, 170, .25); }
.shoot {
  position: absolute; top: 10%; left: -12%; width: 90px; height: 2px; border-radius: 2px; opacity: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff);
  animation: shoot 12s linear 3s infinite;
}
@keyframes shoot {
  0% { opacity: 0; transform: translate(0, 0) rotate(14deg); }
  1.5% { opacity: 1; }
  7% { opacity: 0; transform: translate(62vw, 16vh) rotate(14deg); }
  100% { opacity: 0; transform: translate(62vw, 16vh) rotate(14deg); }
}
.dunes { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 30%; display: block; }

.top {
  position: absolute; z-index: 5; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 0;
}
.top h1 {
  margin: 0; min-width: 0; font-size: .875rem; font-weight: 800; color: #fff7ea; letter-spacing: .02em;
  background: rgba(16, 12, 44, .38); padding: 6px 13px; border-radius: 999px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.icon-btn {
  flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff7ea; background: rgba(16, 12, 44, .42);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.icon-btn:hover { background: rgba(16, 12, 44, .6); }
.icon-btn:focus-visible, .chip:focus-visible, .send:focus-visible, .btn:focus-visible { outline: 3px solid #ffd27a; outline-offset: 2px; }

/* 얼굴 — 그림(SVG)은 상자 밖으로도 그려진다(귀 끝 · 입자 · 로브 아래쪽). 그려지는 범위는 무대(overflow:hidden)가 정한다. */
.face {
  position: absolute; z-index: 2; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(94%, 540px); height: 90%; cursor: pointer; outline: none; touch-action: manipulation;
}
.face:focus-visible { outline: 3px dashed rgba(255, 255, 255, .55); outline-offset: -8px; border-radius: 26px; }
.face > svg { display: block; width: 100%; height: 100%; }
.stage.intro .face { animation: popup 1.15s cubic-bezier(.2, 1.35, .4, 1) both; }
@keyframes popup { from { transform: translate(-50%, 85%); } to { transform: translate(-50%, 0); } }

/* 옹알이 말풍선 — 자리는 app.js(placeSay)가 머리 왼쪽 위에 붙인다. 아래는 얼굴이 없을 때의 기본 자리.
   꼬리는 오른쪽 아래에서 머리 쪽을 가리킨다. 작은 가나(ぁ · っ) 앞에서 줄이 끊기지 않게 line-break: strict. */
.say {
  position: absolute; z-index: 4; top: calc(max(10px, env(safe-area-inset-top)) + 46px); left: 4%; max-width: 38%; margin: 0; padding: 7px 14px;
  background: #fff; color: var(--leaf-d); border-radius: 18px; font-weight: 800; font-size: clamp(1.125rem, 5vw, 1.625rem); line-height: 1.25;
  box-shadow: 0 8px 20px rgba(0, 0, 0, .2); opacity: 0; pointer-events: none;
  line-break: strict; overflow-wrap: break-word; text-wrap: balance; transform-origin: 85% 110%;
}
.say::after {
  content: ""; position: absolute; right: 16px; bottom: -12px; width: 0; height: 0;
  border-style: solid; border-width: 13px 0 0 15px; border-color: #fff transparent transparent transparent;
}
/* 머리 위에 자리가 없는 짧은 화면(가로 폰): 그림 왼쪽에 놓고 꼬리는 오른쪽 가운데에서 그로구 쪽으로 */
.say.side { transform-origin: 110% 50%; }
.say.side::after { right: -12px; bottom: calc(50% - 9px); border-width: 9px 0 9px 13px; border-color: transparent transparent transparent #fff; }
.say.on { animation: sayPop 2.8s ease both; }
@keyframes sayPop {
  0% { opacity: 0; transform: scale(.55) rotate(-6deg); }
  9% { opacity: 1; transform: scale(1.08) rotate(-2deg); }
  15% { transform: scale(1) rotate(-2deg); }
  84% { opacity: 1; transform: translateY(0) rotate(-2deg); }
  100% { opacity: 0; transform: translateY(-10px) rotate(-2deg); }
}
@keyframes sayFade { 0% { opacity: 0; } 9% { opacity: 1; } 84% { opacity: 1; } 100% { opacity: 0; } }

/* ── 대화 ── */
.chat { position: relative; flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; background: var(--paper); }
.log { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 14px 16px 8px; overscroll-behavior: contain; scroll-behavior: smooth; }
.intro-card {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 16px; font-size: .75rem; line-height: 1.55; color: var(--muted);
  background: var(--paper2); border: 1px dashed #e8cca8;
}
.intro-card p { margin: 0 0 3px; }
.intro-card p:last-child { margin: 0; }
.notice { position: sticky; top: -6px; z-index: 2; margin: 0 0 10px; padding: 6px 10px; box-shadow: 0 4px 10px rgba(255, 249, 240, .9); border-radius: 12px; font-size: .75rem; line-height: 1.45; background: #edf6e4; color: var(--leaf-d); border: 1px solid var(--leaf-b); }
.msgs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 86%; padding: 10px 14px; border-radius: 20px; overflow-wrap: anywhere; }
.msg.u { align-self: flex-end; background: var(--peach); color: #5a3a24; border-bottom-right-radius: 6px; animation: inR .28s ease both; }
.msg.g { align-self: flex-start; background: var(--leaf-l); border: 1.5px solid var(--leaf-b); border-bottom-left-radius: 6px; animation: inL .34s ease both; }
.msg.g .snd { margin: 0; font-size: 1.4375rem; font-weight: 800; line-height: 1.25; color: var(--leaf-d); letter-spacing: .02em; line-break: strict; overflow-wrap: break-word; }
.msg.g .act { margin: 3px 0 6px; font-size: .8125rem; font-style: italic; color: #75866a; }
/* 한·중·일·태국어에는 진짜 이탤릭 글꼴이 없어 글자가 비스듬히 찌그러진다 → 바로 세우고 괄호로 「행동」을 표시 */
:lang(ja) .msg.g .act, :lang(zh-Hans) .msg.g .act, :lang(zh-Hant) .msg.g .act, :lang(ko) .msg.g .act, :lang(th) .msg.g .act { font-style: normal; }
:lang(ja) .msg.g .act::before, :lang(zh-Hans) .msg.g .act::before, :lang(zh-Hant) .msg.g .act::before { content: "（"; }
:lang(ja) .msg.g .act::after, :lang(zh-Hans) .msg.g .act::after, :lang(zh-Hant) .msg.g .act::after { content: "）"; }
:lang(ko) .msg.g .act::before, :lang(th) .msg.g .act::before { content: "("; }
:lang(ko) .msg.g .act::after, :lang(th) .msg.g .act::after { content: ")"; }
.msg.g .feel { margin: 0; font-size: .9375rem; color: var(--ink); }
.msg.g .tag {
  display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 999px; vertical-align: 1px;
  font-size: .6875rem; font-weight: 700; font-style: normal; color: #fff; background: var(--leaf);
}
.msg.sys { align-self: center; max-width: 92%; padding: 2px 8px; font-size: .75rem; text-align: center; color: var(--muted); }
.msg.typing { display: flex; gap: 5px; align-items: center; padding: 14px 16px; }
.msg.typing span { width: 8px; height: 8px; border-radius: 50%; background: var(--leaf); animation: dot 1s ease-in-out infinite; }
.msg.typing span:nth-child(2) { animation-delay: .15s; }
.msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .4; } 50% { transform: translateY(-5px); opacity: 1; } }
@keyframes inL { from { opacity: 0; transform: translateX(-10px) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes inR { from { opacity: 0; transform: translateX(10px) scale(.96); } to { opacity: 1; transform: none; } }
.help { align-self: stretch; padding: 12px 14px; border-radius: 18px; font-size: .875rem; background: #fff; border: 2px solid #f2b3c1; }
.help p { margin: 0 0 6px; }
.help p:last-child { margin: 0; }
.help-t { font-weight: 800; color: var(--rose); }
.help a { color: var(--rose); font-weight: 700; }
.help-em { font-size: .75rem; color: var(--muted); }

.chips { flex: 0 0 auto; display: flex; gap: 8px; overflow-x: auto; padding: 8px 16px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; padding: 7px 13px; border-radius: 999px; cursor: pointer;
  font-size: .875rem; white-space: nowrap; color: var(--ink); background: #fff; border: 1.5px solid var(--line);
  transition: transform .12s ease, background .12s ease;
}
.chip:hover { background: var(--leaf-l); border-color: var(--leaf-b); }
.chip:active { transform: scale(.95); }
.chip .ico { font-size: .9375rem; line-height: 1; }
.composer { flex: 0 0 auto; display: flex; gap: 8px; padding: 6px 16px; }
.composer input {
  flex: 1 1 auto; min-width: 0; padding: 12px 16px; border-radius: 999px; font-size: max(1rem, 16px); outline: none;
  background: #fff; color: var(--ink); border: 2px solid var(--line);
}
.composer input:focus { border-color: var(--leaf); box-shadow: 0 0 0 4px rgba(111, 168, 87, .16); }
.send {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  display: grid; place-items: center; color: #fff; background: var(--leaf); box-shadow: 0 4px 10px rgba(63, 110, 44, .3);
}
.send:hover { background: #5f9748; }
.send:active { transform: scale(.94); }
.foot { flex: 0 0 auto; padding: 2px 14px max(8px, env(safe-area-inset-bottom)); font-size: .6875rem; text-align: center; color: var(--muted); }
.foot a { color: var(--muted); }

/* ── 정적 설명(SEO 절) — 앱 아래 · JS 없이 읽힘. 앱을 가리지 않게 첫 화면 밖에서 시작한다 ── */
.seo { padding: 30px 18px calc(36px + env(safe-area-inset-bottom)); background: var(--paper2); border-top: 1px dashed #e8cca8; }
.seo-in { max-width: 760px; margin: 0 auto; }
.seo h2 { margin: 0 0 10px; font-size: 1.25rem; line-height: 1.35; color: var(--leaf-d); }
.seo h3 { margin: 24px 0 8px; font-size: 1.0625rem; color: var(--ink); }
.seo h4 { margin: 16px 0 4px; font-size: .9375rem; color: var(--ink); }
.seo p, .seo li { margin: 0; font-size: .9375rem; line-height: 1.75; color: #5a4535; }
.seo .how { margin: 0; padding-left: 1.4em; }
.seo .how li { margin: 0 0 6px; }
.seo .how li::marker { font-weight: 800; color: var(--leaf); }
.seo .faq h4::before { content: "Q. "; color: var(--leaf); }
.seo .fine { margin-top: 26px; font-size: .75rem; line-height: 1.6; color: var(--muted); }
.seo .fine + .fine { margin-top: 6px; }
.seo a { color: var(--muted); }

/* ── 대화상자 ── */
dialog.dlg {
  width: min(92vw, 380px); max-height: 88vh; padding: 0; border: 0; border-radius: 26px; overflow: visible;
  background: var(--paper); color: var(--ink); box-shadow: 0 24px 60px rgba(10, 6, 30, .4);
}
dialog.dlg::backdrop { background: rgba(16, 12, 44, .5); }
/* 이름(귀여운 대화상자): 그로구가 「이름 알고 싶어」 하는 얼굴이 어둡게 묻히지 않게 배경을 옅게 */
dialog.dlg.cute::backdrop { background: rgba(16, 12, 44, .28); }
dialog.dlg[open] { animation: dlgIn .42s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes dlgIn { from { opacity: 0; transform: translateY(40px) scale(.92); } to { opacity: 1; transform: none; } }
.dlg form, .dlg .in { padding: 22px 20px 18px; }
.dlg .badge {
  width: 52px; height: 52px; margin: -48px auto 8px; border-radius: 50%; display: grid; place-items: center;
  font-size: 1.625rem; font-weight: 900; color: #fff; background: var(--leaf); border: 4px solid var(--paper);
  box-shadow: 0 6px 14px rgba(63, 110, 44, .35); animation: bob 1.6s ease-in-out infinite;
}
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-6deg); } 50% { transform: translateY(-4px) rotate(6deg); } }
.dlg h2 { margin: 0 0 6px; font-size: 1.25rem; text-align: center; }
.cute p { text-align: center; }
.dlg p { margin: 0 0 12px; font-size: .875rem; color: #6a5545; }
.dlg p.err { color: #b04545; font-weight: 700; }
.dlg input[type="text"], .dlg input[type="password"], .dlg select {
  width: 100%; padding: 11px 14px; border-radius: 14px; font-size: max(1rem, 16px); outline: none; background: #fff; border: 2px solid var(--line);
}
.dlg input:focus, .dlg select:focus { border-color: var(--leaf); }
.dlg p.mode { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: -4px 0 14px; font-size: .8125rem; }
.dlg .mode b { padding: 2px 10px; border-radius: 999px; font-size: .8125rem; color: var(--muted); background: var(--paper2); border: 1.5px solid var(--line); }
.dlg .mode b[data-mode="ai"] { color: #fff; background: var(--leaf); border-color: var(--leaf); }
.field .hint { display: block; margin-top: 6px; font-size: .75rem; line-height: 1.5; color: var(--muted); }
.field.pass { margin-top: 14px; }
.dlg-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dlg-head h2 { margin: 0; text-align: left; }
.x { width: 38px; height: 38px; border-radius: 50%; border: 0; cursor: pointer; font-size: 1.375rem; line-height: 1; color: var(--muted); background: var(--paper2); }
.field { display: block; margin: 0 0 14px; }
.field > span { display: block; margin-bottom: 6px; font-size: .8125rem; font-weight: 700; }
.switch { position: relative; display: flex; align-items: center; gap: 12px; margin: 4px 0 6px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .knob { flex: 0 0 auto; position: relative; width: 48px; height: 28px; border-radius: 999px; background: #dccab3; transition: background .2s; }
.switch .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); transition: transform .2s; }
.switch input:checked + .knob { background: var(--leaf); }
.switch input:checked + .knob::after { transform: translateX(20px); }
.switch input:focus-visible + .knob { outline: 3px solid #ffd27a; outline-offset: 2px; }
.sw-text { display: flex; flex-direction: column; font-size: .875rem; font-weight: 700; }
.sw-text small { font-size: .75rem; font-weight: 400; color: var(--muted); }
.row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 14px; }
.cute .row { justify-content: center; }
.btn { display: inline-block; padding: 10px 18px; border-radius: 999px; border: 0; cursor: pointer; font-size: .9375rem; font-weight: 700; text-decoration: none; }
.btn.primary { color: #fff; background: var(--leaf); box-shadow: 0 4px 10px rgba(63, 110, 44, .28); }
.btn.primary:hover { background: #5f9748; }
.btn.ghost { color: var(--muted); background: transparent; }
.btn.danger { color: #b04545; background: #fff; border: 2px solid #f0b8b8; }
.btn.danger[data-armed] { color: #fff; background: #b04545; border-color: #b04545; }

.toast {
  position: fixed; z-index: 50; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  max-width: 90vw; padding: 10px 16px; border-radius: 999px; font-size: .875rem; color: #fff; background: rgba(40, 30, 60, .92);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ── 404 ── */
.nf-page { overflow: auto; }
.nf { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.nf-stage { height: clamp(240px, 48dvh, 460px); }
.nf-card { width: min(100%, 560px); margin: 0 auto; padding: 22px 18px 30px; text-align: center; }
.nf-card h1 { margin: 0 0 8px; font-size: 1.5rem; }
.nf-card p { margin: 0 0 14px; }
.nf-card .fine { font-size: .75rem; color: var(--muted); }

/* ── 짧은 화면(모바일 키보드가 올라옴 · 가로 폰 · 크게 확대): 무대를 줄여 대화가 보이게 · 바닥글은 숨김(같은 고지는 대화 맨 위 카드에) ── */
@media (max-width: 899px) and (max-height: 600px) {
  .stage { height: clamp(150px, 36dvh, 470px); border-radius: 0 0 22px 22px; }
  .foot { display: none; }
  .chips { padding-top: 6px; }
  .say { font-size: clamp(1rem, 4.4vw, 1.375rem); }
  .say.side { font-size: clamp(.9375rem, 4vw, 1.25rem); padding: 6px 12px; }
}

/* ── 데스크톱: 얼굴 크게 왼쪽 · 대화 오른쪽 ── */
@media (min-width: 900px) {
  body { background: radial-gradient(1100px 700px at 25% 15%, #2d2458 0%, #171236 60%, #100c28 100%); }
  .app { flex-direction: row; gap: 20px; padding: 20px; max-width: 1360px; margin: 0 auto; }
  .stage { flex: 1 1 auto; height: auto; border-radius: 34px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
  .face { width: min(90%, 680px); height: 88%; }
  .say { top: 28%; left: auto; right: calc(50% + 150px); max-width: min(30%, 320px); font-size: 1.875rem; }
  .top h1 { font-size: 1rem; }
  .chat { flex: 0 0 440px; border-radius: 30px; overflow: hidden; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
  .chips { flex-wrap: wrap; overflow: visible; }
  .toast { bottom: 40px; }
  .nf-page { background: var(--paper); }
  /* 설명 절: 어두운 배경 위 가운데 종이 카드(읽기 좋은 폭 · 둥근 모서리) */
  .seo { padding: 6px 20px 60px; background: none; border-top: 0; }
  .seo-in { max-width: 920px; padding: 32px 44px 28px; border-radius: 30px; background: var(--paper); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
  /* 이름 대화상자는 대화 열 위에(가운데에 뜨면 그로구 얼굴의 오른쪽 절반 · 턱에 댄 손을 가린다) */
  dialog.dlg.cute { margin: auto max(50px, calc((100vw - 1360px) / 2 + 50px)) auto auto; }
}
/* 큰 화면(1600px 이상): 무대를 넓히고 얼굴을 크게(위쪽이 빈 하늘로 남지 않게) */
@media (min-width: 1600px) {
  .app { max-width: 1560px; }
  .face { width: min(94%, 900px); height: 92%; }
  dialog.dlg.cute { margin: auto max(50px, calc((100vw - 1560px) / 2 + 50px)) auto auto; }
}

@media (prefers-reduced-motion: reduce) {
  .star, .shoot, .dlg .badge { animation: none !important; }
  .stage.intro .face, dialog.dlg[open], .msg { animation: none !important; }
  .say.on { animation: sayFade 2.8s ease both; }
  .log { scroll-behavior: auto; }
}
