:root { color-scheme: light; font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; color: #293a32; background: #f9faf5; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:focus-visible, a:focus-visible, input:focus-visible, [tabindex='0']:focus-visible { outline: 3px solid #795077; outline-offset: 3px; }
.skip-link { position: absolute; top: -80px; left: 12px; z-index: 5; padding: 12px; background: #fff; color: #3f2547; }
.skip-link:focus { top: 8px; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 max(6vw,24px); border-bottom: 1px solid #e0e9df; background: #fffefa; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { width: 24px; height: 24px; border: 2px solid #4b6c56; border-radius: 7px; background: radial-gradient(circle,#4b6c56 0 4px,transparent 5px); }
.topbar a { min-height: 44px; display: flex; align-items: center; color: #315c46; font-size: 15px; font-weight: 700; text-underline-offset: 4px; }
.page { max-width: 1240px; margin: 0 auto; padding: 54px 28px 76px; }
.intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 50px; align-items: center; min-height: 570px; }
.eyebrow, .panel-kicker { color: #3a5f49; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: clamp(30px,4vw,50px); line-height: 1.25; letter-spacing: -.04em; margin: 15px 0 22px; }
h2 { font-size: 22px; line-height: 1.4; }
h3 { font-size: 17px; line-height: 1.4; }
.lead { font-size: 20px; line-height: 1.7; font-weight: 700; }
.intro-note, .subtitle, .guide, .finish-note { color: #475e50; line-height: 1.7; }
.intro-note { margin-top: 16px; }
fieldset { border: 0; padding: 0; margin: 27px 0 24px; }
legend { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.settings { display: flex; flex-wrap: wrap; gap: 10px; }
.settings label { min-height: 48px; display: flex; align-items: center; gap: 8px; padding: 10px 13px; border: 1px solid #a8bea9; border-radius: 9px; background: #fffefa; cursor: pointer; font-weight: 700; }
input[type='radio'] { width: 19px; height: 19px; accent-color: #426b50; }
.button { min-height: 50px; padding: 12px 20px; border: 1px solid transparent; border-radius: 9px; font-size: 16px; font-weight: 800; }
.primary { background: #365f46; color: #fff; }
.secondary { background: #fffefa; color: #2e5740; border-color: #96ad9a; }
.outline { background: transparent; color: #2e5740; border-color: #87a58e; }
.intro-art { border-radius: 22px; background: #e8efe6; min-height: 390px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px; }
.intro-art svg { display: block; width: 100%; max-height: 360px; }
.intro-art span { color: #3b5e49; font-size: 15px; font-weight: 800; padding-bottom: 8px; }
.game-heading { display: flex; justify-content: space-between; align-items: end; gap: 24px; margin-bottom: 28px; }
.game-heading h1 { font-size: 32px; margin: 10px 0 8px; }
.subtitle { font-size: 18px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) minmax(300px,1fr); gap: 18px; align-items: start; }
.edit-card, .stage-card, .complete { background: #fffefa; border: 1px solid #dbe8dc; border-radius: 16px; padding: 25px; }
.edit-card h2, .stage-card h2 { margin: 7px 0 10px; }
.guide { font-size: 16px; }
.frame-list { display: grid; gap: 8px; margin: 18px 0; }
.frame-button { display: flex; align-items: start; flex-direction: column; gap: 4px; min-height: 60px; padding: 10px 13px; color: #31583e; background: #fffefa; border: 1px solid #9fb6a4; border-radius: 9px; text-align: left; }
.frame-button span { line-height: 1.5; font-size: 14px; }
.frame-button[aria-pressed='true'] { border: 2px solid #365f46; background: #edf5e9; }
.pose-controls { display: grid; gap: 12px; margin-bottom: 16px; }
.pose-group { border: 1px solid #d6e3d5; background: #f7f9f3; border-radius: 11px; padding: 15px; }
.pose-group h3 { margin-bottom: 10px; }
.pose-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.pose-button { min-width: 74px; min-height: 48px; padding: 9px 12px; color: #31583e; background: #fffefa; border: 1px solid #9fb6a4; border-radius: 8px; font-weight: 800; }
.pose-button[aria-pressed='true'] { color: #fff; background: #365f46; border-color: #365f46; }
.work-area { display: grid; gap: 14px; }
.actors { min-height: 220px; display: flex; align-items: end; justify-content: center; gap: 8px; margin: 18px 0 10px; padding: 14px; border-radius: 12px; background: #eef5eb; }
.actor { flex: 1; max-width: 160px; text-align: center; }
.actor svg { display: block; width: 100%; height: 160px; overflow: visible; }
.actor[data-pose='unset'] svg { opacity: .45; }
.actor-state { color: #2d503b; font-size: 14px; font-weight: 800; line-height: 1.5; }
.arm { transform-origin: 0 0; transition: transform .35s ease-in-out; }
.actor[data-pose='side'] .left-arm { transform: rotate(60deg); }
.actor[data-pose='side'] .right-arm { transform: rotate(-60deg); }
.actor[data-pose='up'] .left-arm { transform: rotate(130deg); }
.actor[data-pose='up'] .right-arm { transform: rotate(-130deg); }
.stage-card.paused .arm { transition: none; }
.stage-description { color: #2d503b; line-height: 1.7; font-weight: 700; margin: 10px 0; }
.playback { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.progress-text { color: #3a5c43; line-height: 1.7; font-weight: 700; }
.status { min-height: 28px; color: #31563e; font-weight: 800; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.text-button { min-height: 48px; padding: 10px; border: 0; background: transparent; color: #31563e; text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.complete { max-width: 760px; margin: 20px auto; }
.complete h1 { font-size: 32px; }
.complete > p { line-height: 1.7; }
.result-summary { padding: 18px; margin: 20px 0; color: #293f31; background: #eff6eb; border-radius: 10px; font-size: 17px; line-height: 1.8; }
.stopped { max-width: 580px; min-height: 490px; margin: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.stopped h1 { font-size: 32px; }
.stopped > p { line-height: 1.7; }
.stopped .button { margin-top: 24px; }
.finish-note { margin-top: 20px; font-size: 14px; }
.finish-mark { width: 54px; height: 54px; border: 3px solid #63846d; border-radius: 10px; margin-bottom: 25px; background: radial-gradient(circle,#8fb29a 0 9px,transparent 10px); }
footer { display: flex; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 22px 28px; color: #4e6355; font-size: 14px; border-top: 1px solid #e0ebdf; }
dialog { width: min(420px,calc(100% - 32px)); border: 1px solid #b0c5b4; border-radius: 16px; padding: 0; color: #29382f; background: #fffefa; }
dialog::backdrop { background: rgba(28,42,32,.45); }
.dialog-content { padding: 30px; }
.dialog-content h2 { margin: 10px 0; }
.dialog-content p { line-height: 1.7; }
.dialog-content .button { margin-top: 22px; }
@media (max-width: 760px) { .topbar { height: 64px; padding: 0 18px; } .page { padding: 34px 18px 48px; } .intro, .layout { grid-template-columns: 1fr; } .intro { gap: 25px; min-height: 0; } .intro-art { min-height: 270px; } .intro-art svg { max-height: 280px; } .game-heading { align-items: start; flex-direction: column; } .edit-card, .stage-card, .complete { padding: 19px; } footer { padding: 18px; } }
@media (max-width: 380px) { .actors { padding: 10px; } .actor svg { height: 130px; } .actions .primary { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }

/* 판 선택 화면 목록 링크 */
#hub-link, #hub { color: #174f74; display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; font-weight: 700; }
#hub-link[hidden], #hub[hidden] { display: none; }

/* 기억해서 따라 하기 */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#memory-host { margin: 0 0 18px; }
.memory-scenes { display: flex; flex-wrap: wrap; gap: 10px; }
.memory-scene { margin: 0; flex: 1 1 140px; text-align: center; }
.memory-scene .actors { min-height: 0; margin: 0 0 6px; padding: 8px; }
.memory-scene .actor svg { height: 110px; }
.memory-scene figcaption { color: #2d503b; font-size: 14px; font-weight: 800; line-height: 1.5; }
