/* 《우리 강아지 행복하개? 3D》 화면 위 UI 스타일 (3D 장면은 canvas#scene3d)
   - 색·글꼴 토큰은 classic(style.css)과 같은 계열
   - 버튼·대사창은 두꺼운 테두리 + 아래 그림자로 "눌리는" 닌텐도풍 질감 */
:root {
  --cream: #fff8ec;
  --paper: #fffdf6;
  --ink: #4a3426;
  --ink-soft: #7c6553;
  --wood: #c9935c;
  --wood-deep: #9d6a3c;
  --honey: #f2b54a;
  --honey-deep: #c58a2a;
  --butter: #ffe28f;
  --sky: #8ecbf2;
  --sky-deep: #3e85c8;
  --mint: #7fcf9b;
  --mint-deep: #3f9e63;
  --rose: #ef8a7c;
  --rose-deep: #c9655a;
  --bad: #d65a4a;
  --warn: #e39a2d;
  --font-display: 'Jua', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --font-body: 'Gowun Dodum', 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif;
  --dlg-h: 150px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: #f7e8cf;
  font-size: 15px;
  line-height: 1.55;
  overflow: hidden;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--sky-deep); outline-offset: 2px; }
kbd { font-family: var(--font-body); font-size: 0.72em; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, 0.12); margin-left: 4px; }
.fast *, .fast *::before, .fast *::after { transition-duration: 0s !important; animation-duration: 0.01s !important; }

#app { position: fixed; inset: 0; overflow: hidden; }

/* ---------- 버튼 ---------- */
.btn {
  --bg: #fff; --edge: #e2cfb0; --fg: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 46px; padding: 8px 20px;
  border: 3px solid var(--edge); border-radius: 999px;
  background: var(--bg); color: var(--fg);
  font-family: var(--font-display); font-size: 17px; text-decoration: none;
  box-shadow: 0 5px 0 var(--edge), 0 8px 16px rgba(110, 72, 34, 0.15);
  transition: transform 0.12s, box-shadow 0.12s, filter 0.15s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); filter: brightness(1.04); }
.btn:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--edge); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-honey { --bg: var(--honey); --edge: var(--honey-deep); --fg: #4a2a08; }
.btn-rose { --bg: var(--rose); --edge: var(--rose-deep); --fg: #fff; }
.btn-ghost { --bg: rgba(255, 255, 255, 0.75); --edge: #d9c4a3; --fg: var(--ink-soft); }
.btn.big { min-height: 60px; font-size: 21px; padding: 10px 30px; flex-direction: column; gap: 0; }
.btn.big small { font-family: var(--font-body); font-size: 13px; opacity: 0.8; }

/* =========================================================
   3D 장면
   ========================================================= */
#scene3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; background: #f0dcbc; touch-action: none; }
/* 관찰 카메라: 살짝 바랜 필름 느낌 */
#scene3d.cctv { filter: sepia(0.28) saturate(0.75) contrast(1.06) brightness(0.96); }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 46%, transparent 60%, rgba(70, 40, 16, 0.28) 100%); }
#app[data-mode='cctv'] .vignette { background: radial-gradient(ellipse at center, transparent 50%, rgba(0, 0, 0, 0.55) 100%); }

.night { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity 0.4s; }
.night.on { opacity: 1; }
.night.ff { opacity: 0 !important; }
.night-card { font-family: var(--font-display); font-size: clamp(30px, 5vw, 56px); color: #fff8dc; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 0 24px rgba(0, 0, 0, 0.4); animation: popIn 0.4s ease-out; }
@keyframes popIn { from { opacity: 0; transform: scale(0.7); } to { opacity: 1; transform: none; } }
@keyframes bounceY { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }

/* 화면 위쪽 안내 칩 */
.hint { position: fixed; z-index: 42; left: 50%; top: 74px; transform: translateX(-50%); max-width: calc(100% - 24px); padding: 8px 16px; border-radius: 999px; text-align: center; font-family: var(--font-display); font-size: 16px; background: rgba(255, 253, 246, 0.92); box-shadow: 0 0 0 3px #fff, 0 8px 18px rgba(0, 0, 0, 0.18); }
.hint-btn { padding: 10px 20px; border: 3px solid #fff; border-radius: 999px; background: var(--honey); color: #4a2a08; font-family: var(--font-display); font-size: 17px; box-shadow: 0 5px 0 var(--honey-deep), 0 10px 20px rgba(0, 0, 0, 0.2); animation: bounceY 1s ease-in-out infinite; }

/* 실습(미니게임) 패널 */
.skill {
  position: fixed; z-index: 41; left: 50%; top: 72px; transform: translateX(-50%);
  width: min(560px, calc(100% - 24px)); padding: 12px 18px 14px; border-radius: 24px; text-align: center;
  background: rgba(255, 253, 246, 0.96); box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6b4b33, 0 14px 30px rgba(0, 0, 0, 0.25);
  animation: popIn 0.3s ease-out;
}
.sk-title { font-family: var(--font-display); font-size: 20px; color: #5a3a22; }
.sk-sub { font-family: var(--font-display); color: var(--ink-soft); margin: 4px 0; }
.sk-dots { display: flex; justify-content: center; gap: 8px; margin: 6px 0; }
.sk-dots i { width: 18px; height: 18px; border-radius: 50%; background: #efe4d2; box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1); }
.sk-dots i.hit { background: var(--mint-deep); box-shadow: 0 0 10px var(--mint); }
.sk-dots i.miss { background: var(--bad); }
.sk-lanes { display: flex; justify-content: center; gap: 10px; margin: 6px 0; }
.sk-lanes i { width: 46px; height: 12px; border-radius: 999px; background: #e7d6bb; }
.sk-lanes i.me { background: var(--sky-deep); box-shadow: 0 0 10px var(--sky); }
.sk-meter { position: relative; height: 18px; margin: 8px 10px; border-radius: 999px; background: #eee2cf; overflow: hidden; box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.12); }
.sk-meter i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px; background: var(--honey); transition: width 0.08s linear, background 0.2s; }
.sk-tension { display: flex; align-items: center; gap: 6px; font-family: var(--font-display); font-size: 13px; color: var(--ink-soft); }
.sk-tension .sk-meter { flex: 1; }
.sk-btns { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.sk-btns button { min-height: 44px; padding: 6px 16px; border: 3px solid #e2cfb0; border-radius: 999px; background: #fff; font-family: var(--font-display); font-size: 16px; box-shadow: 0 4px 0 #e2cfb0; touch-action: none; user-select: none; }
.sk-btns button.big { background: var(--honey); border-color: var(--honey-deep); box-shadow: 0 4px 0 var(--honey-deep); color: #4a2a08; }
.sk-btns button:active { transform: translateY(3px); box-shadow: none; }
.skill[data-result='perfect'] { box-shadow: 0 0 0 4px #fff, 0 0 0 8px #c58a2a, 0 0 40px #ffd34d; }
.skill[data-result='miss'] { animation: shakeX 0.35s; }

/* =========================================================
   HUD
   ========================================================= */
.hud {
  position: fixed; z-index: 30; top: 0; left: 0; right: 0;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: max(10px, env(safe-area-inset-top)) 14px 8px; pointer-events: none;
}
.hud > * { pointer-events: auto; }
.brand {
  display: inline-flex; align-items: center; gap: 8px; height: 42px; padding: 0 16px 0 10px;
  border: 3px solid #fff; border-radius: 999px; background: var(--honey); color: #4a2a08;
  font-family: var(--font-display); font-size: 17px; box-shadow: 0 4px 0 var(--honey-deep), 0 6px 14px rgba(0, 0, 0, 0.15);
}
.brand .paw { width: 24px; height: 24px; border-radius: 50%; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cg fill='%23c58a2a'%3E%3Cellipse cx='16' cy='20' rx='7.5' ry='6.5'/%3E%3Ccircle cx='7.5' cy='12' r='3.2'/%3E%3Ccircle cx='13' cy='7.5' r='3.2'/%3E%3Ccircle cx='19' cy='7.5' r='3.2'/%3E%3Ccircle cx='24.5' cy='12' r='3.2'/%3E%3C/g%3E%3C/svg%3E") center / 80% no-repeat; }
.steps { display: flex; gap: 4px; margin: 0; padding: 5px; list-style: none; background: rgba(255, 253, 246, 0.88); border-radius: 999px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12); }
.steps:empty { display: none; }
.steps li { display: flex; align-items: center; gap: 4px; padding: 3px 10px 3px 4px; border-radius: 999px; color: #a99583; font-family: var(--font-display); font-size: 13px; }
.st-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #efe4d2; font-size: 14px; }
.steps li.done { color: var(--mint-deep); }
.steps li.done .st-ico { background: #d6f1df; }
.steps li.now { background: var(--butter); color: #6a3f06; box-shadow: inset 0 -3px 0 rgba(197, 138, 42, 0.45); }
.steps li.now .st-ico { background: #fff; animation: bounceY 1.2s ease-in-out infinite; }
/* 게이지는 왼쪽 위에 세로로 쌓는다 (장면 가운데를 가리지 않게) */
.gauges { position: fixed; left: 14px; top: 68px; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.gauge {
  position: relative; display: flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px 0 6px;
  border-radius: 999px; background: rgba(255, 253, 246, 0.94); border: 3px solid #fff;
  box-shadow: 0 4px 0 #e5d3b5, 0 6px 12px rgba(0, 0, 0, 0.1); font-family: var(--font-display);
}
.g-ico { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #fff3e0; font-size: 14px; }
.g-lbl { font-size: 13px; color: var(--ink-soft); }
.g-track { position: relative; width: 74px; height: 12px; border-radius: 999px; background: #eee2cf; overflow: hidden; box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.1); }
.g-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 999px; transition: width 0.8s cubic-bezier(0.3, 1.2, 0.5, 1);
  background-image: repeating-linear-gradient(-45deg, rgba(255, 255, 255, 0.28) 0 6px, transparent 6px 12px); }
.g-bond .g-track i { background-color: #f57e93; }
.g-progress .g-track i { background-color: #f6b93b; }
.g-stress .g-track i { background-color: #6fb3e0; }
.g-val { min-width: 24px; text-align: right; font-size: 15px; }
.gauge.flash { animation: gaugeFlash 0.6s ease-out; }
@keyframes gaugeFlash { 30% { transform: scale(1.08); } }
.g-delta { position: absolute; right: 4px; top: -8px; font-size: 14px; padding: 0 7px; border-radius: 999px; color: #fff; animation: deltaUp 1.4s ease-out forwards; }
.g-delta.up { background: var(--mint-deep); }
.g-delta.down { background: var(--bad); }
@keyframes deltaUp { from { opacity: 0; translate: 0 6px; } 15%, 70% { opacity: 1; translate: 0 -6px; } to { opacity: 0; translate: 0 -16px; } }
.icon-btn { width: 42px; height: 42px; border-radius: 50%; border: 3px solid #fff; background: rgba(255, 253, 246, 0.94); font-size: 18px; box-shadow: 0 4px 0 #e5d3b5; }
.hud .icon-btn { margin-left: auto; }

/* =========================================================
   대사창 · 선택지 · 타이밍
   ========================================================= */
.dialog {
  position: fixed; z-index: 40; left: 50%; bottom: max(14px, env(safe-area-inset-bottom));
  width: min(960px, calc(100% - 24px)); transform: translateX(-50%);
  display: flex; align-items: flex-end; gap: 12px; animation: dlgIn 0.25s ease-out;
}
@keyframes dlgIn { from { opacity: 0; translate: 0 14px; } to { opacity: 1; translate: 0 0; } }
.portrait {
  flex: none; width: 128px; height: 146px; border-radius: 26px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, #e4f3fd, #a9d4f2); border: 4px solid #fff;
  box-shadow: 0 0 0 4px #6b4b33, 0 10px 24px rgba(0, 0, 0, 0.25);
}
.dialog:not([data-who='trainer']) .portrait { display: none; }
.portrait .p-all { animation: none; }
.dlg-box {
  position: relative; flex: 1; min-height: 116px; padding: 24px 28px 22px;
  background: var(--paper); border-radius: 28px; cursor: pointer;
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6b4b33, 0 14px 30px rgba(0, 0, 0, 0.28);
  font-size: clamp(16px, 1.9vw, 20px); line-height: 1.65;
}
.dlg-name {
  position: absolute; top: -20px; left: 24px; padding: 3px 18px; border-radius: 999px;
  background: var(--honey); color: #4a2a08; font-family: var(--font-display); font-size: 17px;
  border: 3px solid #fff; box-shadow: 0 4px 0 var(--honey-deep);
}
.dlg-name:empty { display: none; }
.dialog[data-who='me'] .dlg-name { background: var(--sky); color: #0f3a62; box-shadow: 0 4px 0 var(--sky-deep); }
.dialog[data-who='dog'] .dlg-name { background: var(--mint); color: #134a2b; box-shadow: 0 4px 0 var(--mint-deep); }
.dialog[data-who='sys'] .dlg-box { background: rgba(58, 40, 28, 0.92); color: #fff8ec; text-align: center; box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.85), 0 14px 30px rgba(0, 0, 0, 0.3); }
.dialog[data-who='me'] .dlg-text { color: #2c5c8a; }
.dlg-next { position: absolute; right: 22px; bottom: 10px; color: var(--honey-deep); font-size: 18px; opacity: 0; }
.dialog.waiting .dlg-next { opacity: 1; animation: bounceY 0.8s ease-in-out infinite; }
.dialog[data-who='sys'] .dlg-next { color: var(--butter); }
.dialog.asking .dlg-box { cursor: default; }

.choices {
  position: fixed; z-index: 41; left: 50%; bottom: calc(var(--dlg-h) + 32px);
  width: min(620px, calc(100% - 24px)); transform: translateX(-50%);
  display: none; flex-direction: column; gap: 10px;
}
.choices.show { display: flex; }
.choice {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 18px; text-align: left;
  border: 3px solid #fff; border-radius: 20px; background: var(--paper);
  font-size: clamp(15px, 1.7vw, 18px); box-shadow: 0 0 0 3px #6b4b33, 0 6px 0 3px #6b4b33;
  animation: choiceIn 0.3s ease-out backwards; transition: transform 0.12s, background 0.15s;
}
.choice:nth-child(2) { animation-delay: 0.06s; }
.choice:nth-child(3) { animation-delay: 0.12s; }
.choice:hover { background: var(--butter); transform: translateX(6px); }
.choice:active { transform: translateY(3px); }
.ch-key { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--honey); color: #4a2a08; font-family: var(--font-display); box-shadow: 0 3px 0 var(--honey-deep); }
@keyframes choiceIn { from { opacity: 0; translate: 0 12px; } to { opacity: 1; translate: 0 0; } }

@keyframes shakeX { 25% { translate: -8px 0; } 75% { translate: 8px 0; } }

.actions {
  position: fixed; z-index: 41; right: max(16px, calc(50% - 600px)); bottom: calc(var(--dlg-h) + 34px);
  display: none; flex-direction: column; gap: 12px;
}
.actions.show { display: flex; }
.act {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  width: 104px; height: 104px; border-radius: 30px; border: 4px solid #fff;
  background: var(--paper); font-family: var(--font-display); font-size: 16px;
  box-shadow: 0 0 0 3px #6b4b33, 0 7px 0 3px #6b4b33; transition: transform 0.12s;
}
.act span { font-size: 36px; line-height: 1.1; }
.act:hover { transform: translateY(-4px) rotate(-2deg); background: var(--butter); }
.act.did { background: #e2f5e8; }
.act.did::after { content: '✔'; position: absolute; translate: 34px -40px; color: var(--mint-deep); font-size: 20px; }
.act-end { background: var(--honey); animation: bounceY 1.2s ease-in-out infinite; }

/* =========================================================
   패널: 설문판 · 원인 보드 · 숙제 노트 · 결과 카드
   ========================================================= */
.panel { position: fixed; z-index: 35; animation: panelIn 0.35s cubic-bezier(0.3, 1.25, 0.5, 1); }
@keyframes panelIn { from { opacity: 0; translate: 0 30px; } to { opacity: 1; translate: 0 0; } }

/* 설문 클립보드 */
.panel.survey {
  left: 50%; top: 52%; transform: translate(-50%, -50%);
  width: min(640px, calc(100% - 36px)); max-height: calc(100% - 110px);
  display: flex; flex-direction: column;
  background: repeating-linear-gradient(transparent 0 31px, #eadfcd 31px 32px), var(--paper);
  border-radius: 14px; padding: 0 22px 16px;
  box-shadow: 0 0 0 14px var(--wood), 0 0 0 18px var(--wood-deep), 0 30px 60px rgba(60, 30, 10, 0.4);
}
.clip-top { display: flex; justify-content: center; margin-top: -24px; }
.clip-metal { display: block; width: 110px; height: 34px; border-radius: 10px; background: linear-gradient(#d2d8e0, #9aa3ad); border: 3px solid #8b94a1; box-shadow: inset 0 3px 0 rgba(255,255,255,.6); }
.sv-head { display: flex; justify-content: space-between; align-items: center; margin: -4px 0 4px; }
.sv-tag { font-family: var(--font-display); color: var(--rose-deep); font-size: 15px; padding: 2px 12px; border: 2px solid currentColor; border-radius: 8px; transform: rotate(-3deg); }
.sv-page { font-family: var(--font-display); color: var(--ink-soft); }
.sv-body { overflow-y: auto; padding: 4px 2px 8px; flex: 1; }
.sv-body h2 { font-family: var(--font-display); font-weight: normal; font-size: 26px; margin: 4px 0 8px; color: #5a3a22; }
.sv-sub { margin: -4px 0 10px; color: var(--ink-soft); }
.sv-label { font-family: var(--font-display); font-size: 16px; margin: 12px 0 6px; color: #6a4a30; }
.sv-field { display: flex; align-items: center; gap: 12px; font-family: var(--font-display); font-size: 16px; }
.sv-field input { flex: 1; max-width: 260px; padding: 9px 16px; border: 3px solid #e2cfb0; border-radius: 14px; background: #fff; font-size: 18px; }
.sv-field input:focus { outline: none; border-color: var(--honey); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 3px solid #e7d6bb; border-radius: 999px;
  background: #fff; font-size: 15px; box-shadow: 0 3px 0 #e7d6bb; transition: transform 0.1s;
}
.chip:hover { transform: translateY(-2px); }
.chip.on { background: var(--butter); border-color: var(--honey-deep); box-shadow: 0 3px 0 var(--honey-deep); font-weight: bold; }
.chip-dot { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.15); }
.prob-list { display: grid; gap: 10px; }
.prob {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; text-align: left;
  border: 3px solid #e7d6bb; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 #e7d6bb;
}
.prob.on { border-color: var(--rose-deep); background: #fff1ee; box-shadow: 0 4px 0 var(--rose-deep); }
.prob-ico { font-size: 30px; }
.prob-txt { flex: 1; display: flex; flex-direction: column; }
.prob-txt b { font-family: var(--font-display); font-weight: normal; font-size: 17px; }
.prob-txt small { color: var(--ink-soft); font-size: 13px; }
.prob-check { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 3px solid #e7d6bb; color: #fff; background: #fff; font-weight: bold; }
.prob.on .prob-check { background: var(--rose); border-color: var(--rose-deep); }
.sv-q + .sv-q { border-top: 2px dashed #eadfcd; }
.sv-sum { list-style: none; margin: 0; padding: 0; }
.sv-sum li { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 2px dashed #eadfcd; }
.sv-sum li span { color: var(--ink-soft); }
.sv-sum li b { text-align: right; font-family: var(--font-display); font-weight: normal; }
.sv-nav { display: flex; justify-content: space-between; gap: 10px; padding-top: 10px; }

/* 접수 도장 */
.panel.stamp-card { left: 50%; top: 45%; transform: translate(-50%, -50%); padding: 26px 40px; border-radius: 26px; background: var(--paper); text-align: center; box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6b4b33, 0 20px 40px rgba(0, 0, 0, 0.3); }
.stamp { display: inline-block; font-family: var(--font-display); font-size: 40px; color: var(--bad); border: 5px solid var(--bad); border-radius: 14px; padding: 4px 22px; transform: rotate(-8deg); animation: stamp 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
.stamp.small { font-size: 28px; padding: 0 18px; }
@keyframes stamp { from { opacity: 0; transform: scale(2) rotate(-14deg); } to { opacity: 1; transform: scale(1) rotate(-8deg); } }

/* 원인 분석 보드 (코르크판) */
.panel.board {
  right: 16px; top: 76px; width: min(420px, calc(100% - 24px)); padding: 18px 20px;
  background: #d9a86c radial-gradient(#c79254 1px, transparent 1.5px) 0 0 / 9px 9px;
  border-radius: 18px; box-shadow: 0 0 0 8px #8a5a30, 0 20px 40px rgba(0, 0, 0, 0.35);
}
.board-head { font-family: var(--font-display); font-size: 22px; color: #fff; text-shadow: 0 2px 0 #8a5a30; }
.board-sub { color: #fff6e4; margin-bottom: 8px; }
.causes { margin: 0; padding: 0; list-style: none; counter-reset: c; display: grid; gap: 10px; }
.causes li { counter-increment: c; position: relative; padding: 10px 14px 10px 44px; background: #fffbe8; border-radius: 6px; box-shadow: 0 4px 8px rgba(0, 0, 0, 0.18); transform: rotate(-0.8deg); animation: panelIn 0.4s backwards; }
.causes li:nth-child(even) { transform: rotate(0.9deg); background: #eef8ff; }
.causes li:nth-child(2) { animation-delay: 0.15s; } .causes li:nth-child(3) { animation-delay: 0.3s; } .causes li:nth-child(4) { animation-delay: 0.45s; }
.causes li::before { content: counter(c); position: absolute; left: 10px; top: 9px; width: 24px; height: 24px; border-radius: 50%; background: var(--rose); color: #fff; display: grid; place-items: center; font-family: var(--font-display); box-shadow: 0 2px 0 var(--rose-deep); }
.board-foot { margin-top: 12px; color: #fff; font-family: var(--font-display); }

/* 숙제 받기 카드 */
.panel.hw-card {
  left: 50%; top: 44%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 24px));
  padding: 20px 24px; border-radius: 22px; text-align: center;
  background: repeating-linear-gradient(transparent 0 29px, #eadfcd 29px 30px), var(--paper);
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6b4b33, 0 20px 40px rgba(0, 0, 0, 0.3);
}
.hw-card-head { font-family: var(--font-display); font-size: 20px; color: #5a3a22; }
.hw-days { display: flex; justify-content: center; align-items: baseline; gap: 4px; font-family: var(--font-display); color: var(--rose-deep); }
.hw-days b { font-size: 72px; font-weight: normal; line-height: 1.1; }
.hw-days span { font-size: 28px; }
.hw-sev { font-family: var(--font-display); color: var(--ink-soft); margin-bottom: 8px; }
.hw-tasks { text-align: left; margin: 0 0 14px; padding-left: 22px; display: grid; gap: 6px; }

/* 숙제 노트 */
.panel.notebook {
  right: 16px; top: 76px; bottom: 16px; width: min(440px, calc(100% - 24px));
  display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 16px 30px; overflow: auto;
  background: linear-gradient(90deg, transparent 18px, #f3b3a8 18px 20px, transparent 20px), var(--paper);
  border-radius: 20px; box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6b4b33, 0 20px 40px rgba(0, 0, 0, 0.3);
}
.nb-head { display: flex; justify-content: space-between; align-items: baseline; }
.nb-title { font-family: var(--font-display); font-size: 21px; color: #5a3a22; }
.nb-day { font-family: var(--font-display); color: var(--ink-soft); font-size: 17px; }
.nb-day b { font-size: 30px; color: var(--rose-deep); font-weight: normal; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.cal-d { position: relative; aspect-ratio: 1; border-radius: 10px; background: #f4ebdc; display: grid; place-items: center; font-family: var(--font-display); color: #b8a48c; }
.cal-d i { position: absolute; left: 5px; top: 2px; font-style: normal; font-size: 11px; }
.cal-d b { font-size: 20px; font-weight: normal; }
.cal-d.today { background: var(--butter); color: #6a3f06; box-shadow: inset 0 0 0 3px var(--honey-deep); animation: bounceY 1.4s ease-in-out infinite; }
.cal-d.done { background: #e2f5e8; }
.cal-d.done.d0 { background: #fde7e2; }
.cal-d.done.d3 { background: #fff1c4; }
.cal-d.stamp-in b { animation: stamp 0.3s ease-out; display: inline-block; }
.nb-sub { font-family: var(--font-display); font-size: 17px; margin-top: 4px; }
.tasks { display: grid; gap: 8px; }
.task { display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; border: 3px solid #e7d6bb; border-radius: 16px; background: #fff; box-shadow: 0 4px 0 #e7d6bb; transition: transform 0.1s; }
.task:hover { transform: translateX(4px); }
.task .box { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; border: 3px solid #d9c4a3; color: #fff; font-weight: bold; }
.task.on { border-color: var(--mint-deep); background: #effaf2; box-shadow: 0 4px 0 var(--mint-deep); }
.task.on .box { background: var(--mint-deep); border-color: var(--mint-deep); animation: stamp 0.25s ease-out; }
.nb-nav { margin-top: auto; display: flex; gap: 10px; justify-content: space-between; flex-wrap: wrap; padding-top: 6px; }
.nb-nav .btn { flex: 1; min-width: 150px; white-space: nowrap; font-size: 15px; padding: 8px 12px; }
.panel.ff .tasks, .panel.ff .nb-nav { opacity: 0.35; pointer-events: none; }

/* 최종 점검 결과 */
.panel.grade-card {
  right: 20px; top: 76px; width: min(380px, calc(100% - 24px));
  padding: 16px 22px; border-radius: 22px; background: var(--paper); text-align: center;
  box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6b4b33, 0 20px 40px rgba(0, 0, 0, 0.3);
}
.gc-head { font-family: var(--font-display); color: var(--ink-soft); }
.gc-stamp { display: inline-block; margin: 4px 0 8px; font-family: var(--font-display); font-size: 46px; padding: 0 22px; border: 5px solid; border-radius: 16px; transform: rotate(-6deg); animation: stamp 0.5s cubic-bezier(0.3, 1.5, 0.5, 1); }
.grade-card.great .gc-stamp { color: #d4881a; }
.grade-card.pass .gc-stamp { color: var(--mint-deep); }
.grade-card.retry .gc-stamp { color: var(--sky-deep); font-size: 36px; }
.sum-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.sum-list li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 2px dashed #eadfcd; }
.sum-list li span { color: var(--ink-soft); }
.sum-list li b { font-family: var(--font-display); font-weight: normal; }

/* 모달 */
.modal { position: fixed; z-index: 55; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(40, 24, 12, 0.5); animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-card { width: min(440px, 100%); max-height: calc(100% - 20px); overflow: auto; padding: 22px 24px; border-radius: 26px; background: var(--paper); text-align: center; box-shadow: 0 0 0 4px #fff, 0 0 0 8px #6b4b33, 0 24px 50px rgba(0, 0, 0, 0.4); animation: popIn 0.3s cubic-bezier(0.3, 1.4, 0.5, 1); }
.modal-card h3 { margin: 0 0 6px; font-family: var(--font-display); font-weight: normal; font-size: 24px; }
.modal-card > .btn { margin-top: 12px; }
.rate-list { display: grid; gap: 10px; margin: 12px 0 4px; }
.rate { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border: 3px solid #e7d6bb; border-radius: 18px; background: #fff; box-shadow: 0 4px 0 #e7d6bb; }
.rate b { font-family: var(--font-display); font-weight: normal; font-size: 18px; }
.rate small { color: var(--ink-soft); }
.rate:hover { background: var(--butter); border-color: var(--honey-deep); box-shadow: 0 4px 0 var(--honey-deep); }
.diary { padding: 10px 14px; margin: 12px 0 0; border-radius: 14px; background: #fff6df; text-align: left; }


/* =========================================================
   관찰 카메라 오버레이 (3D 장면 위)
   ========================================================= */
.cctv { position: fixed; inset: 0; z-index: 5; pointer-events: none; font-family: Consolas, 'Courier New', monospace; }
.cc-scan { position: absolute; inset: 0; background: repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.1) 0 2px, transparent 2px 4px), linear-gradient(rgba(255, 220, 160, 0.06), rgba(255, 220, 160, 0.06)); animation: flicker 3s steps(2) infinite; }
@keyframes flicker { 50% { opacity: 0.85; } }
.cc-corners i { position: absolute; width: 6vmin; aspect-ratio: 1; border: 3px solid rgba(255, 255, 255, 0.8); }
.cc-corners i:nth-child(1) { left: 3%; top: 13%; border-right: 0; border-bottom: 0; }
.cc-corners i:nth-child(2) { right: 3%; top: 13%; border-left: 0; border-bottom: 0; }
.cc-corners i:nth-child(3) { left: 3%; bottom: calc(var(--dlg-h) + 92px); border-right: 0; border-top: 0; }
.cc-corners i:nth-child(4) { right: 3%; bottom: calc(var(--dlg-h) + 92px); border-left: 0; border-top: 0; }
.cc-top, .cc-bottom { position: absolute; left: 4%; right: 4%; display: flex; align-items: center; gap: 10px; color: #fff; font-size: clamp(12px, 1.2vw, 16px); text-shadow: 0 1px 2px #000; }
.cc-top { top: 14%; }
.cc-bottom { bottom: calc(var(--dlg-h) + 100px); }
.cc-rec { display: flex; align-items: center; gap: 6px; color: #ff6b6b; font-weight: bold; }
.cc-rec b { width: 12px; height: 12px; border-radius: 50%; background: #ff3b3b; box-shadow: 0 0 8px #ff3b3b; animation: recBlink 1.1s steps(1) infinite; }
@keyframes recBlink { 50% { opacity: 0.15; } }
.cc-cam, .cc-time { padding: 2px 9px; border-radius: 6px; background: rgba(0, 0, 0, 0.5); }
.cc-time { margin-left: auto; letter-spacing: 1px; }
.cc-batt { display: inline-flex; gap: 2px; padding: 2px 3px; border: 2px solid #fff; border-radius: 3px; }
.cc-batt i { width: 6px; height: 9px; background: #7fe0a8; }
.cc-tone { margin-left: auto; padding: 1px 10px; border-radius: 999px; font-family: var(--font-display); }
.cc-tone.t-good { background: var(--mint-deep); } .cc-tone.t-ok { background: #4b6290; } .cc-tone.t-warn { background: var(--warn); } .cc-tone.t-bad { background: var(--bad); animation: gaugeFlash 1.2s infinite; }
.cc-cap {
  position: absolute; left: 50%; bottom: calc(var(--dlg-h) + 140px); transform: translateX(-50%); max-width: min(86%, 760px);
  padding: 6px 16px; border-radius: 10px; background: rgba(10, 16, 28, 0.78); color: #fff;
  font-family: var(--font-display); font-size: clamp(14px, 1.6vw, 20px); text-align: center; line-height: 1.4;
}
.cc-cap:empty { display: none; }
.cc-glitch { position: absolute; inset: 0; opacity: 0; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.45) 0 1px, rgba(0, 0, 0, 0.5) 1px 3px); }
.cc-glitch.go { animation: glitch 0.32s steps(4); }
@keyframes glitch { 0% { opacity: 1; translate: -10px 0; } 50% { opacity: 0.7; translate: 8px 0; } 100% { opacity: 0; translate: 0 0; } }
.cc-bar {
  position: absolute; left: 50%; bottom: calc(var(--dlg-h) + 30px); transform: translateX(-50%); width: min(960px, calc(100% - 24px));
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; pointer-events: auto;
  padding: 8px 10px; border-radius: 18px; background: rgba(16, 25, 42, 0.86); box-shadow: 0 0 0 2px #4b6290, 0 10px 24px rgba(0, 0, 0, 0.35);
}
.cc-cams { display: flex; gap: 6px; flex-wrap: wrap; }
.cc-cams button {
  position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px;
  border: 2px solid #3a4c70; border-radius: 12px; background: #1b2840; color: #9fb4d6; font-family: var(--font-display); font-size: 14px; box-shadow: 0 3px 0 #0a101b;
}
.cam-n { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #2b3b5c; font-size: 12px; }
.cc-cams button.on { background: #e9f4ff; color: #12304f; border-color: #8fd0ff; box-shadow: 0 3px 0 #4b6290, 0 0 14px rgba(143, 208, 255, 0.5); }
.cc-cams button.on .cam-n { background: var(--sky-deep); color: #fff; }
.cam-alert { display: none; font-style: normal; color: #ff7676; font-size: 12px; }
.cc-cams button.alert { border-color: #ff6b6b; animation: camAlert 0.7s steps(1) infinite; }
.cc-cams button.alert .cam-alert { display: inline; }
@keyframes camAlert { 50% { background: #4a1f28; } }
.cc-tools { display: flex; align-items: center; gap: 10px; }
.cc-count { color: #ffd56e; font-family: var(--font-display); }
.cc-catch { min-height: 40px; font-size: 16px; }

/* =========================================================
   전환 와이프 · 토스트 · 시작 화면 · 크레딧
   ========================================================= */
.wipe {
  position: fixed; z-index: 60; inset: 0; pointer-events: none; display: grid; place-items: center;
  background: var(--honey) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cg fill='%23ffffff' opacity='.22'%3E%3Cellipse cx='20' cy='24' rx='6' ry='5'/%3E%3Ccircle cx='13' cy='17' r='2.5'/%3E%3Ccircle cx='18' cy='13' r='2.5'/%3E%3Ccircle cx='23' cy='13' r='2.5'/%3E%3Ccircle cx='27' cy='17' r='2.5'/%3E%3Cellipse cx='48' cy='52' rx='6' ry='5'/%3E%3Ccircle cx='41' cy='45' r='2.5'/%3E%3Ccircle cx='46' cy='41' r='2.5'/%3E%3Ccircle cx='51' cy='41' r='2.5'/%3E%3Ccircle cx='55' cy='45' r='2.5'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 120px 120px;
  clip-path: circle(0% at 50% 50%);
}
.wipe.in { pointer-events: auto; animation: irisIn 0.5s ease-in forwards; }
.wipe.out { animation: irisOut 0.5s ease-out forwards; }
@keyframes irisIn { from { clip-path: circle(0% at 50% 50%); } to { clip-path: circle(75% at 50% 50%); } }
@keyframes irisOut { from { clip-path: circle(75% at 50% 50%); } to { clip-path: circle(0% at 50% 50%); } }
.wipe-card { text-align: center; color: #4a2a08; animation: popIn 0.4s 0.2s backwards; }
.wc-step { display: inline-block; padding: 2px 16px; border-radius: 999px; background: #fff; font-family: var(--font-display); font-size: 18px; color: var(--honey-deep); }
.wc-ico { font-size: 64px; line-height: 1.2; }
.wc-title { font-family: var(--font-display); font-size: clamp(34px, 6vw, 56px); color: #fff; text-shadow: 0 4px 0 var(--honey-deep); }

.toast {
  position: fixed; z-index: 58; top: 72px; right: 16px; max-width: min(380px, calc(100% - 32px));
  padding: 12px 16px; border-radius: 18px; background: rgba(255, 253, 246, 0.97);
  box-shadow: 0 0 0 3px #fff, 0 10px 26px rgba(0, 0, 0, 0.22); border-left: 6px solid var(--honey);
  opacity: 0; translate: 0 -14px; transition: opacity 0.3s, translate 0.3s; pointer-events: none;
}
.toast.show { opacity: 1; translate: 0 0; }
.toast b { display: block; font-family: var(--font-display); font-weight: normal; color: var(--honey-deep); }

.title-screen {
  position: fixed; z-index: 50; inset: 0; display: grid; place-items: center; padding: 16px; overflow: auto;
  background: radial-gradient(ellipse at 50% 40%, rgba(255, 248, 236, 0.6), rgba(247, 232, 207, 0.92));
  backdrop-filter: blur(3px);
}
.tt-card { width: min(620px, 100%); text-align: center; padding: 26px 24px 20px; border-radius: 34px; background: var(--paper); box-shadow: 0 0 0 5px #fff, 0 0 0 10px var(--honey-deep), 0 30px 60px rgba(90, 56, 24, 0.3); animation: popIn 0.5s cubic-bezier(0.3, 1.4, 0.5, 1); }
.tt-badge { display: inline-block; padding: 3px 14px; border-radius: 999px; background: var(--sky); color: #0f3a62; font-family: var(--font-display); font-size: 14px; }
.tt-logo { margin: 8px 0 0; font-family: var(--font-display); font-weight: normal; line-height: 1.05; color: #fff; display: flex; flex-direction: column; }
.tt-logo span:first-child { font-size: clamp(28px, 5vw, 40px); color: var(--honey-deep); -webkit-text-stroke: 0; }
.tt-logo span:last-child { font-size: clamp(48px, 10vw, 76px); text-shadow: 0 5px 0 var(--rose-deep), 0 0 0 #000; -webkit-text-stroke: 3px var(--rose-deep); paint-order: stroke fill; letter-spacing: 1px; }
.tt-art { display: flex; justify-content: center; gap: 4px; height: clamp(110px, 20vh, 170px); margin: 4px 0; }
.tt-art .dog { height: 100%; aspect-ratio: 1; }
.tt-art .dog svg { width: 100%; height: 100%; }
.tt-art .dog:last-child { transform: scale(0.82) translateY(10%); }
.tt-flow { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.tt-flow li { display: flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; background: #f6ecdb; font-family: var(--font-display); font-size: 13px; }
.tt-flow li + li::before { content: '›'; margin-right: 4px; color: #c9b08a; }
.tt-btns { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.tt-classic { display: inline-block; margin-top: 14px; color: var(--sky-deep); font-family: var(--font-display); text-decoration: none; }
.tt-note { margin: 8px 0 0; color: var(--ink-soft); font-size: 13px; }

.credits { position: fixed; z-index: 52; inset: 0; display: grid; grid-template-columns: 1fr minmax(300px, 420px); gap: 20px; align-items: center; padding: 70px 24px 24px; background: linear-gradient(160deg, rgba(42, 30, 64, 0.94), rgba(90, 50, 40, 0.94)); color: #fff8ec; animation: fadeIn 0.6s; }
.cr-roll { position: relative; height: 100%; overflow: hidden; mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); -webkit-mask-image: linear-gradient(transparent, #000 15%, #000 85%, transparent); }
.cr-inner { position: absolute; left: 0; right: 0; top: 100%; text-align: center; animation: roll 16s linear forwards; }
@keyframes roll { to { transform: translateY(calc(-100% - 60vh)); } }
.cr-row { display: flex; flex-direction: column; margin: 0 0 30px; }
.cr-row span { font-size: 15px; opacity: 0.7; }
.cr-row b { font-family: var(--font-display); font-weight: normal; font-size: 26px; }
.cr-row:first-child b, .cr-row:first-child span { font-family: var(--font-display); font-size: 40px; opacity: 1; color: var(--butter); }
.cr-note { max-width: 420px; margin: 40px auto 0; font-size: 14px; opacity: 0.75; }
.cr-card { padding: 18px 22px; border-radius: 26px; background: var(--paper); color: var(--ink); text-align: center; box-shadow: 0 0 0 4px #fff, 0 0 0 9px var(--honey-deep), 0 24px 50px rgba(0, 0, 0, 0.4); animation: popIn 0.6s 0.3s cubic-bezier(0.3, 1.4, 0.5, 1) backwards; }
.cr-dog { width: 130px; height: 130px; margin: -70px auto 0; }
.cr-dog svg { width: 100%; height: 100%; }
.cr-title { font-family: var(--font-display); font-size: 22px; }
.cr-grade { display: inline-block; margin: 6px 0 10px; padding: 0 18px; font-family: var(--font-display); font-size: 34px; color: var(--mint-deep); border: 4px solid; border-radius: 14px; transform: rotate(-5deg); }
.cr-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }

/* =========================================================
   반응형
   ========================================================= */
@media (max-width: 980px) {
  .steps li:not(.now) .st-lbl { display: none; }
  .g-lbl { display: none; }
  .g-track { width: 52px; }
}
@media (max-width: 720px) {
  body { font-size: 14px; }
  .brand-text { display: none; }
  .brand { padding: 0 6px; }
  .steps li .st-lbl { display: none; }
  .gauges { left: 0; right: 0; top: 58px; flex-direction: row; justify-content: center; }
  .gauge { height: 32px; padding: 0 8px 0 4px; }
  .g-track { width: 40px; }
  .portrait { width: 76px; height: 88px; border-radius: 18px; }
  .dlg-box { padding: 20px 18px 18px; min-height: 96px; font-size: 15px; }
  .panel.survey { top: 54%; max-height: calc(100% - 140px); padding: 0 14px 12px; box-shadow: 0 0 0 8px var(--wood), 0 0 0 11px var(--wood-deep), 0 20px 40px rgba(60, 30, 10, 0.4); }
  .panel.notebook { left: 12px; right: 12px; width: auto; top: auto; max-height: 64%; padding-bottom: 0; }
  .panel.notebook .nb-nav { position: sticky; bottom: 0; padding: 8px 0 12px; background: var(--paper); }
  .nb-nav .btn { min-width: 0; font-size: 14px; }
  .panel.board, .panel.grade-card { top: 110px; }
  .credits { grid-template-columns: 1fr; grid-template-rows: 30vh auto; overflow: auto; }
  .actions { left: 12px; right: 12px; flex-direction: row; justify-content: center; }
  .act { width: 76px; height: 76px; font-size: 13px; border-radius: 22px; }
  .panel.grade-card { left: 12px; right: 12px; width: auto; }
  .act span { font-size: 28px; }
  .cctv { padding-top: 112px; }
}
@media (prefers-reduced-motion: reduce) {
  .hint-btn, .cc-scan { animation: none !important; }
}


/* =========================================================
   3D 버전 추가: 초상 캔버스 · 수료증 · 자유 교감 버튼
   ========================================================= */
.portrait canvas { width: 100%; height: 100%; display: block; }
.act small { font-family: var(--font-body); font-size: 11px; color: var(--ink-soft); }
.act { position: relative; }
.cert { text-align: center; }
.cert-ribbon { font-size: 38px; line-height: 1; }
.cert-title { font-family: var(--font-display); font-size: 26px; color: #8a5a20; letter-spacing: 2px; }
.cert-body { margin: 6px 0; line-height: 1.7; }
.cert-sign { display: flex; justify-content: space-between; margin-top: 8px; font-family: var(--font-display); color: var(--ink-soft); }
.panel.grade-card.great, .panel.grade-card.pass { background: linear-gradient(#fffdf6, #fff6df); box-shadow: 0 0 0 4px #fff, 0 0 0 9px #d9a54a, 0 0 0 12px #fff, 0 20px 40px rgba(0, 0, 0, 0.3); }
.panel.cert-view { left: 50%; right: auto; top: 50%; transform: translate(-50%, -50%); width: min(420px, calc(100% - 24px)); }
.panel.cert-view .btn { margin-top: 10px; }
.cr-card .cert-title { font-size: 22px; }
@media (max-width: 720px) {
  .cc-top { top: 120px; }
  .skill { top: 104px; }
  .hint { top: 104px; }
}

/* =========================================================
   자유 이동: 조작 가이드 · 손짓 버튼 · 시점 전환 · 안내 화살표
   ========================================================= */
.view-btn { height: 42px; padding: 0 14px; border-radius: 999px; border: 3px solid #fff; background: rgba(255, 253, 246, 0.94); font-family: var(--font-display); font-size: 15px; box-shadow: 0 4px 0 #e5d3b5; }
.hud .view-btn { margin-left: auto; }
.hud .view-btn + .icon-btn { margin-left: 0; }
.controls {
  position: fixed; z-index: 30; left: 14px; bottom: 14px; max-width: min(560px, calc(100% - 28px));
  display: flex; flex-direction: column; gap: 6px; padding: 8px 12px; border-radius: 18px;
  background: rgba(40, 28, 18, 0.55); color: #fff8ec; backdrop-filter: blur(4px);
  font-size: 12.5px; box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.ct-keys b { display: inline-block; padding: 0 6px; margin-right: 2px; border-radius: 6px; background: rgba(255, 255, 255, 0.92); color: #4a3426; font-family: var(--font-display); font-weight: normal; }
.ct-keys i { opacity: 0.5; font-style: normal; }
.ct-gest { display: flex; gap: 6px; }
.ct-gest button { position: relative; width: 42px; height: 42px; border-radius: 14px; border: 2px solid #fff; background: rgba(255, 253, 246, 0.95); font-size: 20px; box-shadow: 0 3px 0 #c9b08a; }
.ct-gest button:active { transform: translateY(2px); box-shadow: none; }
.ct-gest small { position: absolute; right: 3px; bottom: 0; font-size: 10px; color: var(--ink-soft); }
/* 대사창·패널이 떠 있을 때는 가이드를 살짝 숨긴다 */
#app:has(.dialog:not([hidden])) .controls, #app:has(.panel:not([hidden])) .controls { opacity: 0.25; pointer-events: none; }
#app[data-mode='cctv'] .controls { display: none; }
.guide { position: fixed; z-index: 29; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; pointer-events: none; }
.gd-arrow { font-size: 34px; color: var(--honey); text-shadow: 0 3px 0 var(--honey-deep), 0 0 12px rgba(0, 0, 0, 0.35); animation: bounceY 0.9s ease-in-out infinite; }
.gd-label { margin-top: 2px; padding: 2px 10px; border-radius: 999px; background: rgba(255, 253, 246, 0.95); font-family: var(--font-display); font-size: 14px; box-shadow: 0 3px 0 #e5d3b5; white-space: nowrap; }
.guide.near .gd-label { background: var(--honey); color: #4a2a08; }
.guide.near .gd-label::after { content: ' · E로 열기'; }
.hint-btn.small { padding: 4px 12px; font-size: 14px; animation: none; margin-left: 6px; }
@media (max-width: 720px) {
  .ct-keys { display: none; }
  .view-btn { padding: 0 8px; font-size: 13px; }
}
