/* PLAYORA 방탈출 */
:root {
  --ink: #2a211c; --ink-2: #5b4d42; --ink-3: #8c7d70;
  --paper: #f6efe0; --paper-2: #ece2cc; --paper-3: #ddd0b4; --line: #d9ccb2; --white: #fffaf0;
  --night: #1b1612; --night-2: #2a231d; --night-3: #3a3029; --on-night: #f3e9d6; --on-night-2: #c9b9a2;
  --brass: #c99a3e; --brass-d: #9c7426; --brass-ink: #2a1d05;
  --ok: #4f8a4a; --bad: #b8432b;
  --page: #f3eee4; --page-ink: #2a221c; --page-2: #6a5c50; --page-line: #ded5c4;
  --f-body: "IBM Plex Sans KR", "Pretendard", system-ui, -apple-system, "Malgun Gothic", "Apple SD Gothic Neo", sans-serif;
  --f-disp: "Hahmlet", "Nanum Myeongjo", "Batang", serif;
  --f-hand: "Gaegu", "Nanum Pen Script", cursive;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px;
  --r1: 8px; --r2: 12px; --r3: 16px; --r4: 22px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}
@supports (color: oklch(0 0 0)) {
  :root {
    --ink: oklch(0.26 0.02 55); --ink-2: oklch(0.44 0.03 60); --ink-3: oklch(0.6 0.03 65);
    --paper: oklch(0.955 0.02 85); --paper-2: oklch(0.915 0.03 83); --paper-3: oklch(0.86 0.04 82); --line: oklch(0.85 0.035 80);
    --night: oklch(0.2 0.015 55); --night-2: oklch(0.255 0.018 55); --night-3: oklch(0.31 0.02 55);
    --brass: oklch(0.71 0.12 80); --brass-d: oklch(0.58 0.11 78);
    --page: oklch(0.95 0.012 85); --page-line: oklch(0.88 0.02 80);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; background: var(--page); color: var(--page-ink); font: 400 16px/1.7 var(--f-body); word-break: keep-all; overflow-wrap: anywhere; }
button { font: inherit; color: inherit; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
a { color: inherit; }
[hidden] { display: none !important; }

/* ---------------------------------------------------------------- 페이지 머리 */
.mast { display: flex; align-items: baseline; gap: var(--s4); padding: var(--s3) clamp(var(--s4), 3vw, var(--s6)); border-bottom: 1px solid var(--page-line); }
.mast-brand { text-decoration: none; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.mast-brand b { font-weight: 700; letter-spacing: 0.1em; color: var(--page-ink); margin-right: 6px; }
.mast-more { margin-left: auto; font-size: 14px; color: var(--page-2); white-space: nowrap; }
.head { max-width: 1240px; margin: 0 auto; padding: var(--s4) clamp(var(--s3), 3vw, var(--s6)) var(--s3); display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--s2) var(--s4); }
.head h1 { margin: 0; font: 700 clamp(30px, 4vw, 44px)/1.1 var(--f-disp); color: var(--ink); letter-spacing: -0.01em; }
.head p { margin: 0; color: var(--page-2); font-size: 15px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 0 clamp(0px, 2vw, var(--s5)); }

/* ---------------------------------------------------------------- 게임 틀 */
.es { position: relative; width: 100%; height: clamp(560px, calc(100svh - 132px), 860px); background: var(--night); color: var(--ink); overflow: hidden; border-radius: var(--r2); isolation: isolate;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; font: 400 14px/1.45 var(--f-body); }
@media (max-width: 640px) { .es { border-radius: 0; height: calc(100svh - 96px); min-height: 560px; } .head { padding-top: var(--s3); } .head p { display: none; } }
html.embed, html.embed body { height: 100%; overflow: hidden; background: var(--night); }
html.embed .mast, html.embed .head, html.embed .about, html.embed .foot { display: none !important; }
html.embed .wrap { padding: 0; max-width: none; }
html.embed .es { position: fixed; inset: 0; width: auto; height: auto; min-height: 0; border-radius: 0; }
.es:fullscreen { border-radius: 0; }
.es button:focus-visible, .es input:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.nojs { padding: var(--s6); text-align: center; color: var(--on-night); }
.es > canvas { position: absolute; inset: 0; display: block; touch-action: none; }
.es svg { width: 22px; height: 22px; flex: none; }

/* 위 막대 */
.hud { position: absolute; z-index: 5; top: 0; left: 0; right: var(--invw); display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); padding: var(--s2); pointer-events: none; }
.es.port .hud { right: 0; height: var(--hudh); align-items: center; padding: 6px var(--s2); background: var(--night); border-bottom: 1px solid var(--night-3); }
.es:not(.playing) .hud, .es:not(.playing) .inv, .es:not(.playing) .nav, .es:not(.playing) .backb, .es:not(.playing) .navbar { display: none !important; }
.hud-l, .hud-r { display: flex; align-items: center; gap: 6px; pointer-events: auto; min-width: 0; }
.hud-l { flex: 1 1 auto; }
.hud-r { flex: none; }
.chip { display: inline-flex; align-items: baseline; gap: 8px; height: 38px; padding: 0 14px; border-radius: 19px; background: rgba(27, 22, 18, 0.82); color: var(--on-night); white-space: nowrap; min-width: 0; align-items: center; }
.chip.rchip { overflow: hidden; }
.chip.rchip b { font: 700 15px/1 var(--f-disp); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip.rchip span { font-size: 13px; color: var(--on-night-2); overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.chip.time { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; flex: none; }
.chip.time.over { color: #f2b27a; }
.ib { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(27, 22, 18, 0.82); color: var(--on-night); display: inline-flex; align-items: center; justify-content: center; padding: 0; flex: none; font-weight: 700; font-size: 18px; }
.ib:hover { background: rgba(58, 48, 41, 0.95); }
.ib.hintb { background: var(--brass); color: var(--brass-ink); }
.ib.hintb:hover { background: var(--brass-d); color: #fff; }
.es.port .chip, .es.port .ib:not(.hintb) { background: var(--night-2); }
.es.narrow .chip.rchip b { display: none; }
.es.narrow .chip.rchip span { color: var(--on-night); font-weight: 600; font-size: 14px; }
.es.narrow #bHome { display: none; }
.es.narrow .hud-r { gap: 4px; }
.es.narrow .ib { width: 40px; height: 40px; }
.es.narrow .chip { padding: 0 10px; height: 36px; }
.es.narrow #bMus { display: none; }

/* 장면 이동 */
.nav { position: absolute; z-index: 4; top: calc(var(--sy) + var(--sh) / 2 - 28px); width: 48px; height: 56px; border: 0; border-radius: 14px; background: rgba(27, 22, 18, 0.62); color: var(--on-night); display: flex; align-items: center; justify-content: center; padding: 0; }
.nav svg { width: 28px; height: 28px; }
.nav:hover { background: rgba(27, 22, 18, 0.85); }
.nav.l { left: calc(var(--sx) + 8px); }
.nav.r { left: calc(var(--sx) + var(--sw) - 56px); }
.backb { position: absolute; z-index: 4; left: calc(var(--sx) + var(--sw) / 2 - 62px); top: calc(var(--sy) + var(--sh) - 54px); width: 124px; height: 44px; border: 0; border-radius: 22px; background: rgba(27, 22, 18, 0.78); color: var(--on-night); display: flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; font-size: 15px; }
.backb:hover { background: rgba(27, 22, 18, 0.95); }
.navbar { position: absolute; z-index: 4; left: 0; right: 0; bottom: var(--invh); height: var(--navh); display: flex; gap: 6px; padding: 4px var(--s2); background: var(--night); }
.nb { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; border: 0; border-radius: 12px; background: var(--night-2); color: var(--on-night); font-weight: 600; font-size: 14px; padding: 0 8px; min-width: 0; }
.nb.back { background: var(--night-3); }
.nb:active { background: var(--night-3); }

/* 말풍선 */
.say { position: absolute; z-index: 6; left: calc(var(--sx) + var(--sw) / 2); top: calc(var(--sy) + var(--sh) - 64px); transform: translate(-50%, -100%) translateY(8px); width: max-content; max-width: min(560px, calc(var(--sw) - 24px)); padding: 10px 16px; border-radius: 14px; background: rgba(27, 22, 18, 0.9); color: var(--on-night); font-size: 15px; line-height: 1.5; text-align: center; white-space: normal; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.3s var(--ease); }
.say.on { opacity: 1; transform: translate(-50%, -100%); }
.es.port .say { top: calc(var(--sy) + var(--sh) - 8px); }
.es.zoomed.land .say { top: calc(var(--sy) + var(--sh) - 64px); }

/* 물건 칸 */
.inv { position: absolute; z-index: 5; display: flex; background: var(--night); color: var(--on-night); }
.es.land .inv { top: 0; right: 0; bottom: 0; width: var(--invw); flex-direction: column; border-left: 1px solid var(--night-3); padding: var(--s2) 6px; gap: 6px; }
.es.port .inv { left: 0; right: 0; bottom: 0; height: var(--invh); flex-direction: row; align-items: center; border-top: 1px solid var(--night-3); padding: 6px var(--s2) calc(6px + env(safe-area-inset-bottom, 0px)); gap: var(--s2); }
.inv-h { display: flex; flex-direction: column; align-items: stretch; gap: 6px; flex: none; }
.inv-h b { font-size: 12px; font-weight: 600; color: var(--on-night-2); text-align: center; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; white-space: normal; min-height: 2.6em; }
.es.port .inv-h { width: 72px; }
.es.port .inv-h b { min-height: 0; -webkit-line-clamp: 1; }
.lookb { display: flex; align-items: center; justify-content: center; gap: 4px; height: 40px; border: 0; border-radius: 10px; background: var(--night-3); color: var(--on-night); font-size: 13px; font-weight: 600; padding: 0 6px; }
.lookb svg { width: 18px; height: 18px; }
.lookb:disabled { opacity: 0.4; }
.lookb:not(:disabled) { background: var(--brass); color: var(--brass-ink); }
.slots { flex: 1 1 auto; min-height: 0; min-width: 0; display: flex; gap: 6px; touch-action: none; overflow: hidden; }
.es.land .slots { flex-direction: column; align-items: center; overflow-y: auto; scrollbar-width: none; }
.es.port .slots { flex-direction: row; align-items: center; }
.slot { position: relative; flex: none; width: 66px; height: 66px; padding: 4px; border-radius: 14px; border: 2px solid var(--night-3); background: var(--paper-2); touch-action: none; }
.es.land:not(.short) .slot { width: 72px; height: 72px; }
.es.port .slot { flex: 0 1 62px; width: 62px; height: 62px; min-width: 46px; }
.slot img { width: 100%; height: 100%; display: block; pointer-events: none; }
.slot.on { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(201, 154, 62, 0.45); background: var(--white); }
.inv-empty { margin: 0; font-size: 12px; color: var(--on-night-2); text-align: center; line-height: 1.4; }
.es.port .inv-empty { text-align: left; }
.dragghost { position: absolute; z-index: 30; width: 60px; height: 60px; pointer-events: none; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.45)); }
.dragghost img { width: 100%; height: 100%; }
.es.dragging, .es.dragging * { cursor: grabbing !important; }

/* 처음 화면: 탈출 수첩 */
.title { position: absolute; inset: 0; z-index: 8; overflow-y: auto; scrollbar-width: thin; overscroll-behavior: contain; touch-action: pan-y; background: var(--night); color: var(--on-night); -webkit-user-select: none; user-select: none; }
.t-in { max-width: 860px; margin: 0 auto; padding: var(--s5) var(--s5) var(--s6) clamp(var(--s4), 6vw, var(--s7)); }
.t-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s4); }
.t-head .kick { margin: 0; font-size: 13px; letter-spacing: 0.12em; color: var(--brass); font-weight: 600; }
.t-head h2 { margin: 2px 0 6px; font: 700 clamp(30px, 5vw, 44px)/1.1 var(--f-disp); color: var(--on-night); }
.t-head .lead { margin: 0; max-width: 34em; color: var(--on-night-2); font-size: 15px; }
.t-tools { display: flex; gap: 6px; flex: none; }
.t-tools .ib { background: var(--night-2); }
.tally { margin: var(--s4) 0 var(--s2); font-size: 14px; color: var(--on-night-2); font-variant-numeric: tabular-nums; }
.rooms { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.room { position: relative; width: 100%; display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; align-items: center; gap: var(--s4); padding: 10px var(--s4) 10px 10px; border: 0; border-radius: var(--r3); background: var(--paper); color: var(--ink); text-align: left; white-space: normal; box-shadow: 0 2px 0 rgba(0, 0, 0, 0.3); overflow: hidden; }
.room:hover:not(.locked) { background: var(--white); }
.room .thumb { width: 132px; height: 84px; object-fit: cover; border-radius: 10px; display: block; }
.room.locked { background: var(--night-2); color: var(--on-night-2); box-shadow: none; cursor: default; }
.room.locked .thumb { filter: grayscale(0.85) brightness(0.45); }
.rt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rt .no { font: 700 13px/1 var(--f-body); color: var(--brass-d); }
.room.locked .rt .no { color: var(--on-night-2); }
.rt b { font: 700 19px/1.25 var(--f-disp); }
.rt .lv { font-size: 13px; color: var(--ink-3); }
.room.locked .rt .lv { color: var(--on-night-2); }
.rs { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.rs .best { font-size: 12.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.rs .go { display: inline-flex; align-items: center; gap: 4px; height: 34px; padding: 0 14px; border-radius: 17px; background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; }
.rs .go svg { width: 16px; height: 16px; }
.room.locked .go { background: transparent; color: var(--on-night-2); border: 1px solid var(--night-3); }
.room.clear .go { background: var(--paper-3); color: var(--ink); }
.stamp { position: absolute; left: 82px; top: 52px; transform: rotate(-12deg); padding: 2px 8px; border: 2px solid var(--bad); border-radius: 6px; color: var(--bad); font: 700 13px/1.3 var(--f-disp); background: rgba(255, 250, 240, 0.85); letter-spacing: 0.1em; }
.stars { display: inline-flex; gap: 2px; }
.stars .st { display: inline-flex; color: var(--paper-3); }
.stars .st svg { width: 20px; height: 20px; }
.stars .st.on { color: var(--brass); }
.t-foot { margin: var(--s5) 0 0; font-size: 13px; color: var(--on-night-2); }
.es.narrow .room { grid-template-columns: 88px minmax(0, 1fr); grid-template-rows: auto auto; gap: 4px var(--s3); padding: 8px var(--s3) 10px 8px; }
.es.narrow .room .thumb { width: 88px; height: 70px; grid-row: 1 / 3; }
.es.narrow .rs { grid-column: 2; flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.es.narrow .stamp { left: 40px; top: 50px; }
.es.narrow .t-head { flex-direction: column-reverse; }
.es.narrow .t-in { padding: var(--s4) var(--s3) var(--s5); }
.es.short .t-in { padding-top: var(--s3); }
.es.short .t-head .lead { display: none; }

/* 처음 안내 */
.coach { position: absolute; z-index: 7; top: calc(var(--sy) + 58px); left: calc(var(--sx) + var(--sw) / 2); transform: translateX(-50%); width: min(420px, calc(var(--sw) - 24px)); padding: var(--s3) var(--s4); border-radius: var(--r3); background: var(--paper); color: var(--ink); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4); }
.es.port .coach { top: calc(var(--sy) + 10px); }
.coach-t b { font: 700 15px/1.3 var(--f-disp); color: var(--brass-d); }
.coach-t p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; }
.coach-b { display: flex; justify-content: flex-end; gap: 6px; margin-top: var(--s2); }
.pulse { animation: pulse 1.2s var(--ease) infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(201, 154, 62, 0.9); } 70% { box-shadow: 0 0 0 12px rgba(201, 154, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(201, 154, 62, 0); } }

/* 단추 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 0 18px; border-radius: 22px; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); font-weight: 700; font-size: 15px; }
.btn svg { width: 18px; height: 18px; }
.btn:hover:not(:disabled) { background: var(--white); }
.btn.pri { background: var(--ink); color: var(--paper); }
.btn.pri:hover { background: var(--night-3); }
.btn.warn { border-color: var(--bad); color: var(--bad); }
.btn.sm { min-height: 36px; padding: 0 14px; font-size: 14px; border-width: 1.5px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn:disabled { opacity: 0.45; }

/* 작은 창 */
.modal { position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: var(--s3); background: rgba(15, 11, 8, 0.62); }
.card { position: relative; width: min(440px, 100%); max-height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: var(--s4) var(--s5) var(--s4); border-radius: var(--r4); background: var(--paper); color: var(--ink); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45); animation: pop 0.28s var(--ease); touch-action: pan-y; }
.card.wide { width: min(600px, 100%); }
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.card.shake { animation: shake 0.4s; }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(4px); } }
.ch { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s3); }
.ch h2 { margin: 0; font: 700 21px/1.3 var(--f-disp); }
.ch .sub { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-3); }
.es .card .ch .ib { background: var(--paper-2); color: var(--ink); flex: none; }
.es .card .ch .ib:hover { background: var(--paper-3); }
.cb { display: flex; flex-wrap: wrap; gap: var(--s2); justify-content: flex-end; margin-top: var(--s4); }
.cb.col { flex-direction: column; align-items: stretch; }
.lead { color: var(--ink-2); font-size: 15px; }
.story { margin: var(--s3) 0; font-size: 15.5px; line-height: 1.75; color: var(--ink); }
.meta { margin: var(--s2) 0; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ihead .no { display: block; font-size: 13px; letter-spacing: 0.08em; color: var(--brass-d); font-weight: 700; }
.ihead h2 { margin: 2px 0 0; font: 700 26px/1.25 var(--f-disp); }
.card.intro, .card.clear, .card.final { width: min(500px, 100%); }
.card.clear .stars { margin: var(--s3) 0 var(--s2); gap: 8px; }
.card.clear .stars .st svg { width: 40px; height: 40px; }
.card.clear .stars .st.pop { animation: starpop 0.5s var(--ease); }
@keyframes starpop { 0% { transform: scale(0.4); } 60% { transform: scale(1.25); } 100% { transform: none; } }
.why { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--ink-3); }
.why li { display: flex; align-items: center; gap: 6px; }
.why svg { width: 16px; height: 16px; color: var(--paper-3); }
.why li.ok { color: var(--ink); }
.why li.ok svg { color: var(--brass); }
.final { list-style: none; padding: 0; margin: var(--s3) 0; display: flex; flex-direction: column; gap: 6px; }
.final li { display: flex; justify-content: space-between; align-items: center; gap: var(--s3); padding: 6px 10px; border-radius: 10px; background: var(--paper-2); font-weight: 600; font-size: 14.5px; }
.toast { position: absolute; z-index: 25; left: 50%; top: 64px; transform: translate(-50%, -8px); max-width: min(480px, calc(100% - 24px)); padding: 9px 16px; border-radius: 18px; background: rgba(27, 22, 18, 0.92); color: var(--on-night); font-size: 14px; text-align: center; opacity: 0; pointer-events: none; transition: opacity 0.2s, transform 0.25s var(--ease); white-space: normal; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 글 읽기 */
.paper { padding: var(--s4) var(--s4) var(--s3); border-radius: 6px; background: #fbf5e4; border: 1px solid #e4d6b4; box-shadow: inset 0 0 0 6px rgba(255, 255, 255, 0.35); }
.paper p { margin: 0; font-size: 16px; line-height: 1.65; }
.paper.hand p { font: 700 22px/1.45 var(--f-hand); color: #2f3f5a; }
.paper.chalk { background: #2f4a3f; border-color: #6b4f33; border-width: 8px; box-shadow: none; }
.paper.chalk p { font: 700 22px/1.5 var(--f-hand); color: #eef2ec; }
.paper .doodle { margin-top: var(--s3); color: #f6d48a !important; transform: rotate(-2deg); }
.noteart { width: 100%; height: auto; display: block; margin-bottom: var(--s3); border-radius: 6px; }

/* 자세히 보기 */
.insp { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: 12px; overflow: hidden; background: #2b211b; }
.insp canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.facehs { position: absolute; inset: 0; }
.fhs { position: absolute; border: 0; background: transparent; border-radius: 12px; padding: 0; }
.fhs:hover { box-shadow: inset 0 0 0 3px rgba(255, 226, 140, 0.7); }
.desc { margin: var(--s3) 0 0; font-size: 15px; color: var(--ink-2); min-height: 3em; }

/* 자물쇠·퍼즐 */
.pzb { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.pzmsg { min-height: 1.6em; margin-top: var(--s2); text-align: center; font-size: 14.5px; font-weight: 600; color: var(--ok); }
.pzmsg.bad { color: var(--bad); }
.card.solved .pzb { animation: glow 0.9s var(--ease); }
@keyframes glow { 0% { filter: brightness(1); } 40% { filter: brightness(1.25) saturate(1.2); } 100% { filter: brightness(1); } }
.wheels { display: flex; gap: var(--s3); justify-content: center; flex-wrap: wrap; }
.whl { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.wb { width: 56px; height: 44px; border: 0; border-radius: 12px; background: var(--paper-2); color: var(--ink); display: flex; align-items: center; justify-content: center; padding: 0; }
.wb:active { background: var(--paper-3); }
.wv { width: 64px; height: 72px; border-radius: 12px; background: var(--white); border: 3px solid var(--ink); display: flex; align-items: center; justify-content: center; font: 700 36px/1 var(--f-disp); font-variant-numeric: tabular-nums; }
.wv.col { border-color: var(--wc); box-shadow: inset 0 0 0 4px var(--wc); }
.wv img { width: 52px; height: 52px; }
.wv svg { width: 38px; height: 38px; }
.wl { font-size: 14px; font-weight: 700; color: var(--ink-2); }
.wl.sm { font-size: 12.5px; font-weight: 600; }
.kp { display: flex; flex-direction: column; align-items: center; gap: var(--s3); }
.kpd { display: flex; gap: 8px; padding: 10px 14px; border-radius: 12px; background: #1d2a24; }
.kpd i { width: 34px; height: 44px; border-radius: 8px; background: #2b3d35; display: flex; align-items: center; justify-content: center; font: 700 26px/1 var(--f-body); font-style: normal; color: #7ff0b8; }
.kpk { display: grid; grid-template-columns: repeat(3, 64px); gap: 8px; }
.key { height: 52px; border: 0; border-radius: 12px; background: var(--paper-2); font: 700 22px/1 var(--f-body); color: var(--ink); }
.key.del, .key.ok { font-size: 15px; }
.key.ok { background: var(--ink); color: var(--paper); }
.key:active { background: var(--paper-3); }
.tubes { display: flex; gap: var(--s3); justify-content: center; }
.tube { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 8px 6px; border-radius: 14px; border: 3px solid transparent; background: var(--paper-2); white-space: normal; width: 96px; }
.tube.on { border-color: var(--ink); background: var(--white); }
.es.narrow .tubes { gap: 8px; }
.es.narrow .tube { width: 84px; }
.tube canvas { width: 40px; height: 100px; }
.stk { padding: 2px 10px; border-radius: 8px; color: #fff; font-weight: 700; font-size: 13px; text-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.tl { font-size: 12.5px; color: var(--ink-2); text-align: center; line-height: 1.3; min-height: 2.6em; }
.drops { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.drop { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: 22px; border: 2px solid var(--ink); background: var(--white); font-weight: 700; font-size: 14px; }
.drop i { width: 16px; height: 16px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--dc); }
.drop.empty { border-style: dashed; }
.snd { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.sb { display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; border-radius: 14px; background: var(--paper-2); padding: 6px 4px; }
.sb.bottle { width: 72px; }
.sb.bottle canvas { width: 54px; height: 102px; }
.sb b { font-size: 15px; }
.sb.robo { width: 86px; padding: 10px 4px 6px; }
.sb.robo i { width: 56px; height: 56px; border-radius: 50%; background: var(--rc); box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.25); }
.sb.hit { animation: hit 0.3s var(--ease); }
@keyframes hit { 50% { transform: translateY(4px) scale(0.96); } }
.dots { display: flex; gap: 8px; }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--paper-3); }
.dots i.on { background: var(--ok); }
.guide { margin: 0; font-size: 14px; font-weight: 700; color: var(--brass-d); }
.board { position: relative; border-radius: 12px; overflow: hidden; touch-action: none; }
.board canvas { display: block; }
.bhs { position: absolute; inset: 0; }
.cellb { position: absolute; width: 33.333%; height: 33.333%; border: 0; background: transparent; padding: 0; border-radius: 8px; }
.cellb:hover { box-shadow: inset 0 0 0 3px rgba(255, 226, 140, 0.55); }
.cellb.guide { box-shadow: inset 0 0 0 5px #ffd23a; animation: pulse 1.2s var(--ease) infinite; }
.sws { display: flex; gap: 8px; justify-content: center; padding: 14px; border-radius: 14px; background: #3a3f44; }
.sw { width: 48px; display: flex; flex-direction: column; align-items: center; gap: 6px; border: 0; background: transparent; color: #e8ece9; padding: 0; }
.sw .lev { position: relative; width: 40px; height: 110px; border-radius: 8px; background: #2b3034; display: block; }
.sw .lev i { position: absolute; left: 5px; right: 5px; height: 46px; bottom: 6px; border-radius: 6px; background: #d9564a; transition: bottom 0.15s var(--ease); }
.sw.up .lev i { bottom: 58px; background: #7fc97a; }
.sw.guide .lev { box-shadow: 0 0 0 4px #ffd23a; }
.sw b { font-size: 14px; }
.tele { display: flex; flex-direction: column; align-items: center; gap: var(--s2); }
.tbs { display: flex; gap: var(--s2); }
.tbs .btn { min-width: 112px; }
.scope { border-radius: 50%; overflow: hidden; }
.scope canvas { width: 100%; height: 100%; display: block; }
.tcap { margin: 0; font-weight: 700; color: var(--ink-2); }

/* 힌트·메뉴 */
.hints { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.hints li { display: flex; gap: 10px; align-items: baseline; padding: 10px 12px; border-radius: 12px; background: var(--paper-2); font-size: 15px; line-height: 1.55; }
.hints li b { flex: none; font-size: 13px; padding: 1px 8px; border-radius: 8px; background: var(--paper-3); }
.hints li.t3 b { background: var(--bad); color: #fff; }
.hints li.empty { color: var(--ink-3); }
.hnote { margin: var(--s2) 0 0; font-size: 13.5px; color: var(--bad); }
.set { display: flex; flex-direction: column; gap: 2px; padding: 4px 12px; border-radius: 14px; background: var(--white); border: 1px solid var(--line); }
.set-r { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); min-height: 48px; font-weight: 600; }
.set-r input[type=range] { flex: 1; max-width: 200px; accent-color: var(--brass-d); height: 32px; }
.tg { width: 54px; height: 32px; border-radius: 16px; border: 0; background: var(--paper-3); position: relative; padding: 0; flex: none; }
.tg i { position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); transition: transform 0.2s var(--ease); }
.tg.on { background: var(--ok); }
.tg.on i { transform: translateX(22px); }
.howto { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; font-size: 14.5px; line-height: 1.6; }
.howto b { color: var(--brass-d); margin-right: 4px; }

.es.narrow .wheels { gap: 8px; }
.es.narrow .wb { width: 52px; }
.es.narrow .wv { width: 56px; height: 64px; font-size: 32px; }
.es.narrow .wv img { width: 44px; height: 44px; }
.es.narrow .sws { gap: 4px; padding: 10px 8px; }
.es.narrow .sw { width: 40px; }
.es.narrow .sw .lev { width: 34px; }
.es.short .card { padding: var(--s3) var(--s4); }
.es.short .ch { margin-bottom: var(--s2); }
.es.short .story { font-size: 14.5px; margin: var(--s2) 0; }
.es.short .wv { height: 60px; }
.es.short .wb { height: 38px; }
.es.short .kpk { grid-template-columns: repeat(3, 58px); gap: 6px; }
.es.short .key { height: 40px; }
.es.short .kp { flex-direction: row; align-items: center; }
.es.short .sw .lev { height: 86px; }
.es.short .sw .lev i { height: 36px; }
.es.short .sw.up .lev i { bottom: 44px; }
.es.short .tube canvas { height: 70px; }
.es.short .sb.bottle canvas { height: 76px; width: 40px; }

@media (prefers-reduced-motion: reduce) { .es *, .es *::before, .es *::after { animation: none !important; transition: none !important; } }

/* ---------------------------------------------------------------- 소개 글 */
.about { max-width: 1240px; margin: 0 auto; padding: var(--s6) clamp(var(--s4), 3vw, var(--s6)) var(--s7); display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: var(--s6); align-items: start; }
.about-main { min-width: 0; max-width: 46em; }
.about h2 { margin: var(--s6) 0 var(--s3); font: 700 clamp(22px, 2.6vw, 28px)/1.3 var(--f-disp); color: var(--ink); }
.about h2:first-child { margin-top: 0; }
.about h3 { margin: var(--s5) 0 var(--s2); font: 700 18px/1.35 var(--f-disp); color: var(--ink-2); }
.about p, .about li, .about dd { color: #3b3029; }
.about ol, .about ul { padding-left: 1.3em; }
.about li { margin: 6px 0; }
.about dl { margin: 0; }
.about dt { font-weight: 700; margin-top: var(--s4); }
.about dd { margin: 4px 0 0; }
.about .more { margin-top: var(--s6); font-size: 14px; line-height: 1.9; color: var(--page-2); }
.about .more a { color: var(--page-2); }
.about-side { position: sticky; top: var(--s4); display: flex; flex-direction: column; gap: var(--s2); }
.about-side h3 { margin: var(--s3) 0 0; }
.keytab { width: 100%; border-collapse: collapse; font-size: 13.5px; background: var(--white); border-radius: var(--r2); overflow: hidden; }
.keytab th, .keytab td { text-align: left; padding: 7px 10px; border-bottom: 1px solid var(--page-line); vertical-align: top; }
.keytab th { width: 42%; font-weight: 600; color: var(--page-ink); }
.keytab td { color: var(--page-2); }
.keytab tr:last-child th, .keytab tr:last-child td { border-bottom: 0; }
.wide-tab { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: var(--s2) 0; }
.wide-tab th, .wide-tab td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--page-line); }
.wide-tab thead th { color: var(--page-2); font-weight: 600; border-bottom: 2px solid var(--page-line); }
.tab-scroll { overflow-x: auto; }
@media (max-width: 900px) { .about { grid-template-columns: 1fr; } .about-side { position: static; } }
.foot { border-top: 1px solid var(--page-line); padding: var(--s5) clamp(var(--s4), 3vw, var(--s6)) var(--s6); max-width: 1240px; margin: 0 auto; font-size: 13.5px; color: var(--page-2); }
.foot a { margin-right: var(--s4); white-space: nowrap; }
.foot p { margin: var(--s3) 0 0; line-height: 1.7; }
