:root { color-scheme: light; font-family: 'Malgun Gothic', 'Apple SD Gothic Neo', sans-serif; color: #25362f; background: #f8faf5; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .6; }
button:focus-visible, a:focus-visible, input:focus-visible, .result-summary:focus-visible { outline: 3px solid #784c6d; 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 #dfeae0; background: #fffefa; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { width: 23px; height: 23px; border: 2px solid #3c6a55; border-radius: 4px; background: repeating-linear-gradient(to bottom,transparent 0 4px,#3c6a55 4px 6px,transparent 6px 9px); }
#hub-link { min-height: 44px; display: inline-flex; align-items: center; color: #315c46; font-size: 15px; font-weight: 700; text-underline-offset: 4px; }
.page { max-width: 1220px; 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: #355f49; font-size: 15px; font-weight: 800; letter-spacing: .02em; }
h1, h2, p { margin: 0; }
h1 { font-size: clamp(30px,4vw,50px); line-height: 1.25; letter-spacing: -.04em; margin: 15px 0 22px; }
h2 { font-size: 23px; line-height: 1.35; }
.lead { font-size: 21px; line-height: 1.7; font-weight: 700; }
.intro-note, .subtitle, .guide, .finish-note { color: #435b4d; line-height: 1.75; }
.intro-note { margin-top: 16px; font-size: 17px; }
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 #a3bdad; border-radius: 9px; background: #fffefa; cursor: pointer; font-weight: 700; }
input[type='radio'] { width: 19px; height: 19px; accent-color: #3e7156; }
.button { min-height: 50px; padding: 12px 20px; border: 1px solid transparent; border-radius: 9px; font-size: 16px; font-weight: 800; }
.primary { background: #315f48; color: #fff; }
.secondary { background: #fffefa; color: #2a5940; border-color: #91b19c; }
.outline { background: transparent; color: #2a5940; border-color: #83a391; }
.intro-art { border-radius: 22px; background: #e4eee9; 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: #355f49; 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.2fr) minmax(300px,.8fr); gap: 18px; align-items: start; }
.editor-card, .preview-card, .complete-banner { background: #fffefa; border: 1px solid #d9e6db; border-radius: 16px; padding: 25px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.badge { flex: none; padding: 7px 10px; background: #edf4eb; border-radius: 20px; color: #315b44; font-size: 14px; font-weight: 800; }
.guide { font-size: 16px; }
.boundaries { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 22px 0; padding: 20px; background: #f5f8f0; border: 1px solid #dce9db; border-radius: 12px; }
.word { display: inline-block; font-size: 22px; font-weight: 800; line-height: 1.7; color: #253b2e; }
.boundary { min-width: 44px; min-height: 48px; padding: 7px 9px; color: #315b44; background: #fffefa; border: 2px dashed #87a997; border-radius: 8px; font-size: 14px; font-weight: 800; }
.boundary[aria-pressed='true'] { color: #fff; background: #315f48; border-style: solid; border-color: #315f48; }
.editor-card > .button { margin-top: 18px; }
.work-area { display: grid; gap: 14px; }
.preview-art { flex: none; width: 78px; height: 78px; border-radius: 12px; background: #eef5ea; }
.preview-art svg { width: 100%; height: 100%; }
.preview-lines { margin: 20px 0; padding: 20px 24px 20px 48px; border-radius: 10px; background: #f5f8f0; color: #243b2e; font-size: 22px; font-weight: 700; line-height: 1.8; overflow-wrap: anywhere; }
.preview-card > .button { margin-top: 18px; }
.status { min-height: 28px; color: #315b44; 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: #315b44; text-decoration: underline; text-underline-offset: 4px; font-weight: 700; }
.complete-banner { max-width: 750px; margin: 20px auto; }
.complete-banner h1 { font-size: 32px; }
.complete-banner > p { line-height: 1.7; }
.result-summary { padding: 18px; margin: 20px 0; background: #f1f7ee; border-radius: 10px; font-size: 18px; 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 #527963; border-radius: 9px; margin-bottom: 25px; background: repeating-linear-gradient(to bottom,transparent 0 9px,#779b85 9px 12px,transparent 12px 17px); }
footer { display: flex; justify-content: space-between; gap: 16px; max-width: 1220px; margin: 0 auto; padding: 22px 28px; color: #4e6256; font-size: 14px; border-top: 1px solid #dfebe0; }
dialog { width: min(420px,calc(100% - 32px)); border: 1px solid #acc5b3; border-radius: 16px; padding: 0; color: #25362f; background: #fffefa; }
dialog::backdrop { background: rgba(26,43,34,.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; } .editor-card, .preview-card, .complete-banner { padding: 19px; } footer { padding: 18px; } }
@media (max-width: 380px) { .boundaries { padding: 13px; gap: 6px; } .card-heading { flex-wrap: wrap; } .editor-card > .button, .preview-card > .button { width: 100%; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
