:root { color-scheme: light; font-family: 'Malgun Gothic','Apple SD Gothic Neo',sans-serif; color: #263b3c; background: #f0f3ee; font-size: 17px; }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
.top { min-height: 72px; padding: 0 max(24px,5vw); display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #fffefa; border-bottom: 1px solid #d1ded9; font-weight: 700; }
.top a { min-height: 48px; display: flex; align-items: center; color: #285764; }
main { width: min(1120px,100%); margin: auto; padding: 48px 26px 70px; }
h1,h2,h3,p { margin-top: 0; }
h1 { font-size: clamp(2rem,4vw,3rem); line-height: 1.2; }
h2 { font-size: 1.4rem; }
p { line-height: 1.65; }
.eyebrow { color: #874b31; font-weight: 700; }
.lead { font-size: 1.2rem; font-weight: 700; line-height: 1.6; }
.intro { min-height: 510px; display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.intro-art { width: 100%; max-width: 450px; justify-self: center; }
fieldset { border: 0; padding: 0; margin: 1.5rem 0; }
legend { font-weight: 700; margin-bottom: .6rem; }
label { display: block; margin: .5rem 0; line-height: 1.5; }
input[type='radio'] { width: 20px; height: 20px; vertical-align: middle; accent-color: #315d66; }
button,summary { font: inherit; }
button { min-height: 48px; padding: .7rem 1rem; border: 2px solid #4c7072; border-radius: .55rem; color: #244b51; background: #fffefa; font-weight: 700; cursor: pointer; }
button.primary { color: #fff; background: #315c65; border-color: #315c65; }
button:disabled { opacity: .55; cursor: default; }
button[aria-pressed='true'] { border: 4px solid #94501f; background: #fff0d9; }
button:focus-visible,summary:focus-visible,input:focus-visible,a:focus-visible { outline: 3px solid #9a4c23; outline-offset: 3px; }
.heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
details { margin-bottom: 1rem; padding: .7rem 1rem; background: #e0eeec; border-radius: .7rem; }
summary { min-height: 44px; padding: .55rem 0; font-weight: 700; cursor: pointer; }
.workspace { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1rem; align-items: start; }
.panel { padding: 1.4rem; border: 1px solid #cddcda; background: #fffefa; border-radius: 1rem; }
.board { display: grid; grid-template-columns: repeat(5,1fr); gap: 4px; width: min(100%,310px); padding: 6px; background: #d8e6e2; border-radius: .5rem; }
.cell { position: relative; display: flex; align-items: center; justify-content: center; aspect-ratio: 1; min-width: 0; background: #fffefa; border: 1px solid #a1b8ae; border-radius: .25rem; }
.rail { background: #dae6e7; }
.wall { background: repeating-linear-gradient(135deg,#879b95 0,#879b95 5px,#d2ddd6 5px,#d2ddd6 10px); }
.anchor { font-size: .8rem; font-weight: 800; color: #663d30; }
.goal { position: absolute; top: 4px; left: 5px; min-width: 22px; height: 22px; text-align: center; border: 2px solid #315b61; border-radius: 50%; color: #244b51; background: #fffefa; font-size: .8rem; font-weight: 800; line-height: 18px; }
.goal.visited { background: #d4ead5; }
.goal.active-goal { border-width: 3px; }
.ball { width: 34%; aspect-ratio: 1; border-radius: 50%; background: #ce8052; border: 3px solid #75462d; }
.position { margin-top: .8rem; font-weight: 700; }
.preview { padding: .7rem; border-radius: .5rem; background: #e6f0eb; }
.choices,.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.status { margin: 1rem 0; padding: .8rem 1rem; background: #e0ece7; border-radius: .6rem; min-height: 3rem; }
.result { max-width: 720px; margin: 2rem auto; }
.result button { margin: .3rem; }
footer { border-top: 1px solid #cddcda; padding: 1.5rem max(24px,5vw); color: #435c55; font-size: .9rem; }
@media (max-width: 760px) { main { padding: 32px 16px 48px; } .intro,.workspace { grid-template-columns: 1fr; } .intro { gap: 1rem; } .intro-art { max-width: 320px; } .heading { flex-wrap: wrap; } .panel { padding: 1rem; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
dialog { max-width: min(90vw, 480px); border: 1px solid #789689; border-radius: .8rem; padding: 2rem; color: #263c32; }
dialog::backdrop { background: rgb(20 40 30 / 65%); }

/* 판 선택 화면 목록 링크 */
#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; }
