:root { color-scheme: light; font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; color: #27372e; background: #faf9f2; }
* { 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 #725074; 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 #e4e7d9; background: #fffefa; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { width: 23px; height: 23px; border: 2px solid #4b6b54; border-radius: 4px; background: repeating-linear-gradient(to bottom,transparent 0 4px,#4b6b54 4px 6px,transparent 6px 9px); }
.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: #3a5c43; 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: #4a5b4e; 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 #acbeaa; border-radius: 9px; background: #fffefa; cursor: pointer; font-weight: 700; }
input[type='radio'] { width: 19px; height: 19px; accent-color: #42684e; }
.button { min-height: 50px; padding: 12px 20px; border: 1px solid transparent; border-radius: 9px; font-size: 16px; font-weight: 800; }
.primary { background: #355d43; color: #fff; }
.secondary { background: #fffefa; color: #2c533a; border-color: #94ad9a; }
.outline { background: transparent; color: #2c533a; border-color: #87a58e; }
.intro-art { border-radius: 22px; background: #e9ede1; 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: #3b5e45; 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,1.12fr) minmax(300px,.88fr); gap: 18px; align-items: start; }
.ranking-card, .count-card, .past-card, .complete { background: #fffefa; border: 1px solid #dfe7d7; border-radius: 16px; padding: 25px; }
.ranking-card h2, .count-card h2 { margin: 7px 0 10px; }
.guide { font-size: 16px; }
.rankings { display: grid; gap: 12px; margin-top: 18px; }
.person-card { border: 1px solid #d6e2d0; background: #f7f9f2; border-radius: 11px; padding: 14px; }
.person-card h3 { color: #35583f; margin-bottom: 9px; }
.rank-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 7px; }
.rank-row { display: flex; align-items: center; gap: 6px; }
.rank-label { flex: 1; min-width: 0; line-height: 1.4; font-weight: 700; }
.move-button { flex: none; min-width: 54px; min-height: 48px; padding: 8px; color: #31563e; background: #fffefa; border: 1px solid #a3b7a3; border-radius: 8px; font-size: 14px; font-weight: 800; }
.work-area { display: grid; gap: 14px; }
.method { border-top: 1px solid #e0e9dc; margin-top: 18px; padding-top: 18px; }
.method > p:not(.result-text) { color: #4a5b4e; line-height: 1.6; margin: 7px 0 12px; }
.result-text { margin-top: 12px; padding: 13px; min-height: 52px; background: #f0f5e9; color: #294535; border-radius: 8px; font-weight: 700; line-height: 1.7; }
.past-card h2 { font-size: 18px; margin-bottom: 8px; }
.past-card p, .result-summary { font-size: 16px; line-height: 1.8; color: #293f31; }
.status { min-height: 28px; color: #31553d; 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: #31553d; 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; background: #f0f5e9; border-radius: 10px; }
.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 #587a5e; border-radius: 9px; margin-bottom: 25px; background: repeating-linear-gradient(to bottom,transparent 0 9px,#92ac91 9px 12px,transparent 12px 17px); }
footer { display: flex; justify-content: space-between; gap: 16px; max-width: 1240px; margin: 0 auto; padding: 22px 28px; color: #526354; font-size: 14px; border-top: 1px solid #e1e8da; }
dialog { width: min(420px,calc(100% - 32px)); border: 1px solid #b1c2ae; border-radius: 16px; padding: 0; color: #27372e; background: #fffefa; }
dialog::backdrop { background: rgba(28,40,30,.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; } .ranking-card, .count-card, .past-card, .complete { padding: 19px; } footer { padding: 18px; } }
@media (max-width: 380px) { .person-card { padding: 10px; } .move-button { min-width: 48px; padding: 5px; } .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; }

.practice { margin-top: 20px; } .practice summary { min-height: 48px; display: flex; align-items: center; cursor: pointer; font-weight: 800; color: #2c533a; }
#start-levels { margin-top: 24px; }
