/* 게임의 시각 계층. 기존 styles.css의 폼/접근성/레이아웃 기본값 위에 적용합니다. */
:root{--ink:#493e51;--muted:#857665;--purple:#80629e;--purple-dark:#5f457c;--paper:#fff6df;--line:#ddccab;--bg:#f0e6cf;--shadow:0 5px 0 #c8b894,0 12px 22px #6551380e}
body{background-color:var(--bg);background-image:radial-gradient(#9b835b16 .7px,transparent .7px),linear-gradient(120deg,#f7edd7,#e8dfc9);background-size:6px 6px,100% 100%}button{transition:transform .16s,box-shadow .16s,filter .16s}button:enabled:hover{filter:brightness(1.035)}button:enabled:active{transform:translateY(3px)}.game-icon{width:38px;height:38px;display:inline-block;vertical-align:middle;flex-shrink:0}.castle-art{display:block;width:100%;height:auto;overflow:visible}.topbar{height:78px;background:#fff5decf;border-bottom:2px solid #cfbf9d;box-shadow:0 3px 0 #fff5db;position:relative;z-index:3;padding:0 3%}.brand-icon{background:#e5d9ef;border:2px solid #bfa8cb;box-shadow:0 3px 0 #bfa8cb;border-radius:15px}.brand-icon .game-icon{width:39px;height:39px}.brand{color:#584465;letter-spacing:-.8px}.brand small{color:#998467}.local-tag{background:#e8dec6;color:#807153;border:1px dashed #bba580;border-radius:5px;font-size:12px}.header-right .secondary{background:#fff7e7}.layout{max-width:1780px;padding:28px 3% 36px}.paper{background:#fff7e5;border:2px solid #d8c5a3;box-shadow:var(--shadow);border-radius:18px}.primary,.dark{border:2px solid #604977;background:linear-gradient(#a48abc,#816299);box-shadow:0 4px 0 #5f496e,inset 0 1px #d4c4e3;color:#fff8e4;border-radius:12px}.primary:hover{background:linear-gradient(#ac93c5,#876aa2)}.dark{background:linear-gradient(#6e8572,#4f6f5d);border-color:#49634b;box-shadow:0 4px 0 #3b563e,inset 0 1px #acbe9d}.secondary{background:linear-gradient(#fff9e8,#eee0bf);border:2px solid #c6b18b;box-shadow:0 3px 0 #b8a17b;border-radius:10px}.secondary:hover{background:#fff6dd}.danger{background:#f4d9c9;border:2px solid #c99b87;box-shadow:0 3px 0 #b48673;color:#8c554d}.eyebrow{color:#8c705b;letter-spacing:1.4px}.page-heading h1{color:#584462}.page-heading p{color:#8b7864}.text-button{color:#775783}.icon-button{background:#ede1c8;border:1px solid #c5b18f}.mini-button{border:1px solid #b6a185;background:#fff5dc;box-shadow:0 2px 0 #c9b290;color:#786050}.form-panel{background:repeating-linear-gradient(0deg,#fff7e7,#fff7e7 31px,#b89b6906 32px);border:2px solid #cdb997;box-shadow:0 6px 0 #c1aa83,0 16px 35px #72594112;position:relative}.form-panel:before{content:'✦';display:block;position:absolute;right:25px;top:-22px;width:48px;height:48px;line-height:44px;text-align:center;background:#dfc3a6;border:3px double #9a725c;color:#8c6554;border-radius:50%;font-size:24px;transform:rotate(12deg)}input:not([type=radio]),select{background:#fffbed;border:2px solid #d5c4a5;color:#594b51}.radio{background:#f3e9d3;border-color:#d7c5a4}.radio:has(input:checked){background:#e9dff0;border-color:#bca4ca}.setup-story{padding:25px;background:#e0e7cf;border-radius:45% 38% 35% 40%;border-bottom:8px solid #b9c29e}.setup-story .eyebrow,.setup-story h1,.setup-story p{padding-left:25px}.setup-story img{mix-blend-mode:multiply;border-radius:40px;max-height:260px;object-fit:cover}.setup{gap:5%;max-width:1300px}.entry-code{background:#ffedb9;border:2px dashed #bba06a;border-radius:9px;position:relative;box-shadow:5px 6px 0 #bd986529;transform:rotate(2deg);padding:12px 30px;min-width:230px}.entry-code:before,.entry-code:after{content:'';position:absolute;top:50%;width:20px;height:20px;background:var(--bg);border-radius:50%;border:1px solid #d1bb90}.entry-code:before{left:-12px}.entry-code:after{right:-12px}.ticket-stamp{display:block;font-size:10px;letter-spacing:1.5px;border-bottom:1px solid #cbb074;padding-bottom:6px;margin-bottom:5px;color:#9b7e41}.entry-code strong{color:#7a593b}.notice{background:#e7dded;border:2px solid #c5b0d0;box-shadow:0 3px 0 #b4a1c0}.toolbar{padding:14px 17px;background:#e4d5b6;border:1px solid #cdbb98;border-radius:15px;box-shadow:inset 0 2px 0 #f8eccf}.toolbar button{min-height:48px}.toolbar-group{gap:10px}.toolbar .text-button{font-size:13px}.unassigned{background:#e5dfca;border-style:dashed}.unassigned h2{color:#7d7059}.unassigned-list .player-card{min-width:190px}.table-wrap{background:#fff5df;border-color:#ceb892}.table-wrap caption{color:#715846}thead th{background:#e9dfc8;color:#7c6856}th,td{border-bottom-color:#ddcfb4}tbody th>span{font-size:19px}.results-title .trophy .game-icon{width:90px;height:90px}.awards article{background:#fdf0ce;border-color:#cfb88b;box-shadow:0 5px 0 #c3aa7f}.awards article>span .game-icon{width:70px;height:70px}.results-title h1{color:#6f547e}.results-title .eyebrow{color:#9a7741}.awards h2{color:#735c65}.results .table-wrap{margin-top:35px}.join-screen{padding-top:45px}.join-screen>h1{color:#67516f}.step>b{background:#dfc3ac;border:1px solid #ad8b76;color:#77513c}.code-input{background:#fff6d8!important}.count{background:#d2c1dc;border-radius:50%;padding:3px 10px;color:#694c7d}
/* 첫 화면: 메뉴 카드 대신 게임판 위의 시작 선택지 */
.home.tabletop-world{display:block;position:relative;max-width:none;min-height:calc(100vh - 128px);padding:55px 20px 35px;overflow:hidden;background:linear-gradient(#dcece6 0%,#e7eee0 54%,#d1dcb7 55%,#c7d0a5 100%);isolation:isolate}.home-copy{position:relative;z-index:2;text-align:center;max-width:780px;margin:auto;padding:0 50px}.home-crest .game-icon{width:80px;height:80px;filter:drop-shadow(0 5px 0 #bdae7d55)}.home .eyebrow{color:#71836d;margin:0 0 3px;font-size:13px;letter-spacing:3px}.home-copy h1{font-size:clamp(50px,5.5vw,78px);letter-spacing:-4px;line-height:1.2;margin:5px 0 18px;color:#544162;text-shadow:0 3px 0 #fff7df,0 5px 0 #d1c6b0}.home-copy h1 em{color:#7f6394;background:none}.home .intro{color:#65715e;font-size:17px;line-height:1.9;margin-bottom:32px;font-weight:600}.role-options{max-width:610px;margin:auto;display:grid;grid-template-columns:1fr 1fr;gap:20px}.role-card{min-height:115px;border-radius:16px;padding:19px 20px;gap:10px;position:relative}.role-card:before{content:'';position:absolute;inset:5px;border:1px dashed #ffffff63;border-radius:10px;pointer-events:none}.role-card.teacher{background:linear-gradient(#a68db8,#806792);border:3px solid #655074;box-shadow:0 7px 0 #63506e,0 14px 20px #6050551c}.role-card.student{background:linear-gradient(#ffe5a1,#f1c976);border:3px solid #b89150;box-shadow:0 7px 0 #ab8547,0 14px 20px #6050551c;color:#6b5334}.role-card strong{font-size:24px}.role-card small{font-size:15px;opacity:1}.role-symbol{background:transparent!important;width:50px;height:60px}.role-symbol .game-icon{width:52px;height:52px}.role-card b{font-size:23px}.home-links{justify-content:center;margin-top:30px}.home-links .text-button{color:#6b557c;background:#fff7e0c4;border:1px solid #c1bc9e;border-radius:100px;padding:10px 20px;box-shadow:0 3px 0 #b5b991}.home .local-note{font-size:12px;color:#6d775d;margin-top:17px}.world-scenery{position:absolute;inset:0;z-index:-1;pointer-events:none}.world-cloud{position:absolute;width:160px;height:42px;background:#fff9e8;box-shadow:0 5px 0 #a0b9ac22;border-radius:50px}.world-cloud:before,.world-cloud:after{content:'';position:absolute;background:inherit;border-radius:50%;width:75px;height:75px;bottom:4px;left:25px}.world-cloud:after{width:60px;height:60px;left:85px}.cloud-one{left:7%;top:18%;transform:rotate(-4deg)}.cloud-two{right:5%;top:12%;transform:scale(.75)}.cloud-three{right:23%;top:37%;transform:scale(.4);opacity:.6}.world-hill{position:absolute;border-radius:50% 50% 0 0;border-top:3px solid #cad6a5;width:55%;height:260px;bottom:0}.hill-back{background:#b7c49a;left:-22%;height:350px;transform:rotate(13deg)}.hill-front{background:#c4cca1;right:-26%;height:410px;transform:rotate(-16deg)}.world-path{position:absolute;left:3%;right:3%;bottom:-190px;height:440px;border:65px solid #f3e4b7;border-radius:50%;box-shadow:0 0 0 3px #b7ad82,inset 0 0 0 3px #b7ad82;transform:rotate(-8deg)}.world-path:after{content:'';position:absolute;inset:-55px;border:3px dashed #c6b58c;border-radius:50%}.world-castle{position:absolute;width:240px;filter:drop-shadow(0 8px 0 #8e916421)}.world-one{left:1%;bottom:14%}.world-two{right:0;bottom:12%;width:250px}.world-three{right:18%;bottom:-33px;width:160px}.world-token{position:absolute;filter:drop-shadow(0 4px 0 #99855433)}.world-token .game-icon{width:62px;height:62px}.token-one{left:22%;bottom:9%;transform:rotate(-17deg)}.token-two{right:12%;top:39%;transform:rotate(13deg)}.token-three{left:11%;top:39%;color:#bb99bb;transform:rotate(-12deg)}.world-label{display:block;position:relative;margin:35px auto 0;width:max-content;background:#e7dcb6;padding:7px 24px;border:1px solid #b8aa7d;border-radius:5px;font-size:12px;color:#8a7652;transform:rotate(-2deg)}footer{background:#e7dcc1;border-top:1px solid #caba97;color:#8d7c5f;padding:15px 3%}
/* 모둠 영토와 게임 말 */
.team-grid{gap:24px;grid-template-columns:repeat(4,minmax(0,1fr));align-items:start;padding:12px 0 18px}.territory{position:relative;background:radial-gradient(ellipse at 50% 27%,#f0efd9,#d5dfbd 53%,#bbcba1);border:3px solid color-mix(in srgb,var(--team) 45%,#a6a881);border-bottom-width:8px;border-radius:38px 38px 55px 55px;padding:18px 16px 12px;box-shadow:0 7px 0 #a898702b,0 14px 20px #6e67440b;overflow:hidden}.territory:before{content:'';position:absolute;inset:7px;border:1px dashed #fff9dfb3;border-radius:30px 30px 42px 42px;pointer-events:none}.territory .team-title{position:relative;z-index:1;gap:7px;margin-bottom:0;background:#fff1d4;border:1px solid #c4ad86;border-bottom:3px solid #c3ad89;border-radius:8px;padding:8px}.team-title h2{font-size:18px;color:var(--team)}.team-title small{color:#8a745c}.team-title .team-emblem{width:28px;font-size:23px}.team-title .mini-button{min-height:44px;font-size:12px;padding:6px}.territory-land{height:155px;position:relative;margin:0 -10px}.territory-castle{position:absolute;width:175px;left:50%;transform:translateX(-50%);z-index:1;top:0}.territory-path{position:absolute;width:190px;height:60px;left:50%;bottom:0;transform:translateX(-50%);border-radius:50%;border:12px dashed #f9ecc7;box-shadow:0 0 0 1px #acb18a}.territory .members{position:relative;display:grid;grid-template-columns:1fr 1fr;gap:10px;min-height:100px;z-index:1;padding:8px 0}.player-card{border:0;background:transparent;display:flex;justify-content:center;flex-direction:column;gap:3px;padding:0;margin-bottom:0;position:relative;text-align:center}.pawn-token{display:block;color:var(--team,#a18aae);height:48px}.pawn-token .game-icon{width:47px;height:47px}.player-name{font-size:14px;font-weight:700;line-height:1.3;background:#fff5dccf;padding:5px 11px;border:1px solid #cdb995;border-radius:7px;min-width:65px;max-width:100%;overflow-wrap:anywhere;box-shadow:0 2px 0 #b8a981}.player-card small{font-size:10px;color:#8b7765}.player-card select{min-height:44px;font-size:12px;width:100%;margin-top:6px;padding:5px;border:1px solid #adbb93;background:#edf0db}.empty-team{grid-column:1/-1;margin:22px 0 0;font-size:13px}.territory>.text-button{display:block;margin:auto;font-size:12px;color:#70825b;position:relative}.territory>.full{position:relative;margin-top:10px}.unassigned .player-card,.move-list .player-card{flex-direction:row;background:#fbf0d7;border:1px solid #cdbb96;border-radius:12px;padding:8px;text-align:left;gap:10px}.unassigned .player-name,.move-list .player-name{box-shadow:none;background:none;border:0;min-width:70px}.unassigned .player-card select,.move-list .player-card select{min-width:110px;width:auto;margin:0}.move-list .player-card{margin-bottom:9px}.move-list{padding:3px}.lobby-layout .toolbar{margin-bottom:15px}
/* 미니 경기판 + 한 장의 도전 카드 */
.game-layout{padding-top:16px}.game-heading h1{font-size:23px}.game-heading{margin-bottom:12px}.game-heading .eyebrow{font-size:11px}.timer{background:#fbedcd;border:2px solid #cfb78d;border-radius:40px;padding:7px 19px;box-shadow:0 3px 0 #c8b08b}.timer strong{color:#78546f;font-size:28px}.timer small{color:#90734f}.mini-arena{display:grid;grid-template-columns:repeat(var(--team-count),minmax(0,1fr));gap:13px;background:#d9dfbf;border:2px solid #b6bd97;border-bottom:5px solid #a3ac85;border-radius:19px;padding:9px 14px 7px;margin:0 0 19px;position:relative}.mini-arena:before{content:'';position:absolute;left:20px;right:20px;top:54%;height:12px;border-top:7px dashed #f7edcf;pointer-events:none}.team-status{display:flex;gap:8px;align-items:center;position:relative;background:transparent;border:0;padding:0 10px;border-radius:10px;min-height:69px}.team-status.mine{background:#fff4d5b3;border:1px solid #bfac82}.team-status>div{display:block}.mini-castle{width:79px;flex-shrink:0}.mini-details{min-width:0;flex:1}.mini-details>strong{color:var(--team);font-size:16px;display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;text-shadow:0 1px #fff9df}.mini-details .hp-row{display:flex;gap:9px;justify-content:flex-start;font-size:14px;font-weight:700;margin-top:5px;color:#795768}.mini-details .hp-row>span:last-child{color:#527d83}.my-badge{position:absolute;right:3px;top:-9px;background:#9a7fac;color:#fff7df;border:1px solid #725880;font-size:10px;padding:1px 7px;border-radius:4px}.mini-arena:has(>.team-status:nth-child(6)) .mini-castle{width:49px}.mini-arena:has(>.team-status:nth-child(6)) .team-status{padding:0 3px;gap:3px}.mini-arena:has(>.team-status:nth-child(6)) .mini-details>strong{font-size:13px}.mini-arena:has(>.team-status:nth-child(9)){grid-template-columns:repeat(6,minmax(0,1fr))}.play-columns{grid-template-columns:minmax(0,1.9fr) minmax(290px,1fr);gap:24px}.challenge-card{position:relative;isolation:isolate;background:linear-gradient(110deg,#fff9e6,#fff3d8);border:3px solid #d2b88d;border-radius:21px;box-shadow:0 6px 0 #c4a67b,0 12px 24px #715b3410;padding:20px 30px 18px;min-width:0}.challenge-card:before{content:'';position:absolute;inset:8px;border:1px solid #e0cda8;border-radius:13px;pointer-events:none;z-index:-1}.challenge-card:after{content:'';position:absolute;inset:0;border-radius:inherit;background-image:radial-gradient(#b3955126 .65px,transparent .65px);background-size:5px 5px;opacity:.25;z-index:-1;pointer-events:none}.card-corner{position:absolute;bottom:10px;color:#c4a669;font-size:17px}.corner-left{left:12px}.corner-right{right:12px}.question-meta{color:#aa9270;font-size:12px}.question-meta .eyebrow{color:#9c825d;font-size:10px;letter-spacing:2px}.question-caption{font-size:21px;letter-spacing:1px;color:#896f50;margin:13px 0 0;font-weight:800}.equation{font-size:65px;margin:18px 0 24px;gap:35px;color:#574565;text-shadow:0 2px #fffdf5}.multiply,.equals{color:#b6a589;font-size:39px}.question-mark{background:#e9dfec;border:2px dashed #bc9fc7;box-shadow:inset 0 2px 5px #ae8cba19;border-radius:15px;color:#9274a8;width:80px;height:95px;font-size:45px}.answers{gap:17px;max-width:640px;margin:auto}.answer{background:linear-gradient(#fffbee,#f1e4c4);border:2px solid #c6b18a;border-radius:13px;box-shadow:0 5px 0 #b6a17c;min-height:95px;font-size:30px;color:#675375;transition:transform .15s,background .15s}.answer:before{content:'';position:absolute;inset:5px;border:1px solid #decdac;border-radius:8px;pointer-events:none}.answer-number{background:#e8d9bb;border-radius:50%;width:18px;height:18px;line-height:18px;color:#9b825c;font-size:10px;left:8px;top:8px}.answer:hover:enabled{background:#ede2f3;border-color:#ab8bb7;transform:translateY(-3px);box-shadow:0 8px 0 #9e83aa}.answer.correct{background:#e4edcb;border-color:#9aaa74;color:#55724a;box-shadow:0 5px 0 #7f9564}.answer.incorrect{background:#f3dfca;border-color:#cda588;box-shadow:0 5px 0 #b5957b;color:#8d6954}.question-hint{font-size:13px;color:#a28b66;margin:18px 0 0}.feedback{margin:17px auto 0;max-width:680px;padding:9px 12px;border:1px solid #b4c08f;background:#e5eccf!important;color:#627b4a!important;border-radius:10px}.feedback.retry{background:#f1e5cd!important;border-color:#d4b789;color:#91704d!important}.feedback strong{font-size:16px}.feedback span{font-size:12px}.feedback button{min-height:44px}.board-side{background:#d9dfbf;border:2px solid #b5bb97;border-bottom:6px solid #a2ab84;border-radius:28px;padding:16px 13px 11px}.board-heading{font-size:16px;color:#74815f}.board-heading span{color:#97a17f}.board-tip{color:#829069;font-size:12px}.action-bar{margin-top:20px;display:flex;align-items:stretch;gap:20px;padding:0;background:none;border:0;box-shadow:none}.energy{position:relative;min-width:177px;padding:10px 14px;justify-content:center;background:linear-gradient(#ffedb6,#edd596);border:2px solid #c4a86b;border-bottom:6px solid #ae9058;box-shadow:inset 0 0 0 4px #fff0bb;border-radius:15px;gap:8px}.energy .game-icon{width:44px;height:44px}.energy small{font-size:12px;color:#947444}.energy strong{font-size:34px;color:#7a5749}.energy strong b{font:inherit}.energy strong small{color:#a88953}.action-buttons{grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.action-button{background:linear-gradient(#f1e6f6,#ddcbe8);border:2px solid #baa1c7;border-bottom:6px solid #9e82ad;border-radius:13px;box-shadow:inset 0 0 0 3px #f5edf7;min-height:101px;padding:10px 12px;gap:11px;position:relative}.action-button.defend{background:linear-gradient(#e6f3e9,#c7e1d6);border-color:#9cbdac;border-bottom-color:#7f9d8e;box-shadow:inset 0 0 0 3px #eaf6ec}.action-button.strong{background:linear-gradient(#fff0c5,#f0d69c);border-color:#c5ad74;border-bottom-color:#b19558;box-shadow:inset 0 0 0 3px #fff3d2}.action-button.repair{background:linear-gradient(#fbe5d6,#eacbb7);border-color:#c7a792;border-bottom-color:#aa8b75;box-shadow:inset 0 0 0 3px #fff0e2}.action-icon .game-icon{width:42px;height:42px}.action-button strong{font-size:16px;color:#725677}.action-button.defend strong{color:#587b69}.action-button.strong strong{color:#947841}.action-button.repair strong{color:#977159}.action-button small.action-cost{font-size:14px;font-weight:700;margin-top:4px;color:#84724e}.action-button small.action-reason{font-size:11px;color:#9b8775;margin-top:3px}.action-button:disabled{opacity:.72;filter:saturate(.6);box-shadow:inset 0 0 0 3px #ffffff35}.action-button:disabled .action-reason{color:#705f54}.balance-note{color:#998968;font-size:11px;text-align:center;margin-top:10px}.pause-banner{background:#7d6788;border:2px solid #594563;box-shadow:0 4px 0 #594563;color:#fff5da}
/* 타원형 경기장: 요새가 주인공인 넓은 보드 */
.board{background:radial-gradient(ellipse at center,#c7d7a7 0%,#d9e3bf 60%,#b7c899 61%,#bdcc9e 70%,transparent 71%);border-radius:35%;min-height:290px;height:310px;overflow:visible;isolation:isolate}.arena-inset{position:absolute;inset:6% 5%;border:2px solid #9eb383;border-radius:50%;box-shadow:0 6px 0 #9eac7a33,inset 0 0 0 10px #e9eed0}.board-path{inset:17% 11%;border:19px solid #eee0b9;border-radius:50%;box-shadow:0 0 0 2px #b5aa7f,inset 0 0 0 2px #b5aa7f;opacity:1}.path-tiles{position:absolute;inset:0;pointer-events:none}.path-tiles>span{position:absolute;display:grid;place-items:center;width:23px;height:24px;background:#f7eccc;border:1px solid #b8aa81;border-radius:5px;box-shadow:0 2px 0 #b8aa81;color:#c5a05d;font-size:13px}.board-center{z-index:0;width:38%;opacity:.6}.board-center .game-icon{width:40px;height:40px}.board-center small{color:#81945e;font-size:11px}.fort{width:108px;min-width:0;max-width:none;padding:0;line-height:1.3;z-index:2}.fort-illustration{position:relative}.fort-illustration>.castle-art{position:relative;width:100%;height:auto;z-index:1;filter:drop-shadow(0 4px 0 #84946333)}.fort strong{background:#fff0ce;color:var(--team);border:1px solid #c7ae88;border-bottom:3px solid #b69d77;box-shadow:0 3px 6px #5b5d3310;border-radius:6px;font-size:12px;padding:4px 6px;max-width:none;overflow:visible;white-space:normal;word-break:keep-all;text-wrap:balance}.fort-stats{display:flex;justify-content:center;gap:7px;margin-top:4px;background:#f9f0d8ec;border:1px solid #c4b58e;border-radius:20px;padding:3px 7px;font-size:12px;font-weight:800;color:#975e66;white-space:nowrap}.fort-stats>span:last-child{color:#55858c}.fort.shielded{background:none;box-shadow:none}.magic-dome{position:absolute;inset:-6% -5% 3%;border-radius:60% 60% 38% 38%;opacity:0;border:3px solid #a4d9db;box-shadow:inset 6px 2px 17px #f1ffffa1,0 0 14px #9edcdd6e;background:linear-gradient(120deg,#d9ffff66,#a3d2e32e);z-index:2;pointer-events:none}.shielded .magic-dome{opacity:1}.resting .castle-art{filter:grayscale(.5);opacity:.55}.board-side .fort{width:96px}.board-side .fort strong{font-size:10px;padding:2px 3px}.board-side .fort-stats{font-size:10px;padding:2px 4px;gap:5px}.board-side .board[data-count="2"] .fort,.board-side .board[data-count="3"] .fort{width:105px}.board-side .board.many-kingdoms .fort{width:65px}.board-side .board.many-kingdoms .fort strong{font-size:9px}.board-side .path-tiles>span{width:17px;height:19px;font-size:11px}.teacher-columns{grid-template-columns:minmax(0,3.1fr) minmax(250px,1fr);gap:25px;align-items:stretch}.board-panel{background:#d5debb;border:3px solid #adb78d;border-bottom:9px solid #929e75;border-radius:35px;padding:22px 25px;box-shadow:0 6px 0 #c7b58d,0 15px 25px #6e63451a;position:relative}.board.large{height:560px;min-height:480px}.large .fort{width:158px}.large .fort strong{font-size:16px;padding:5px 10px}.large .fort-stats{font-size:16px;padding:4px 12px;gap:13px}.large .board-center .game-icon{width:48px;height:48px}.large .board-center small{font-size:12px}.large .path-tiles>span{width:38px;height:34px;font-size:19px;border-width:2px;border-bottom-width:4px}.large .board-path{border-width:30px}.large.many-kingdoms{height:680px}.large.many-kingdoms .fort{width:135px}.large.many-kingdoms .fort strong{font-size:14px}.large.many-kingdoms .fort-stats{font-size:14px}.board[data-count="10"],.board[data-count="11"],.board[data-count="12"]{min-height:800px}.board.many-kingdoms[data-count="12"] .fort{width:116px}.board-side .board[data-count="10"],.board-side .board[data-count="11"],.board-side .board[data-count="12"]{min-height:390px}.arena-message{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);background:#fff6dccf;border:2px solid #b8a3bb;border-radius:15px;padding:13px 19px;max-width:65%;width:max-content;text-align:center;font-size:15px;font-weight:700;color:#74597c;box-shadow:0 5px 0 #b9a4b442;opacity:0;z-index:6;pointer-events:none;transition:opacity .2s}.arena-message.visible{opacity:1}.arena-message:after{content:'';position:absolute;bottom:-10px;left:48%;width:16px;height:16px;background:#fff6dc;border-right:2px solid #b8a3bb;border-bottom:2px solid #b8a3bb;transform:rotate(45deg)}.board-side .arena-message{font-size:12px;padding:10px;max-width:85%}.live-feed{background:repeating-linear-gradient(#fff3d9 0 37px,#dfcba83d 38px 39px);border:2px solid #ceb791;border-radius:5px 15px 17px 8px;box-shadow:3px 6px 0 #bfaa86;padding:22px;position:relative}.live-feed:before{content:'';position:absolute;top:-10px;left:35%;width:70px;height:25px;transform:rotate(-4deg);background:#d9c5a393;border-left:2px dashed #c0ad8c;border-right:2px dashed #c0ad8c}.live-feed h2{font-size:19px;color:#856743;margin:5px 0 13px}.live-pill{background:#dfdfbd;border-color:#b4b78d;color:#8b8d64}.live-feed>div{max-height:450px}.live-feed>div p{font-size:14px;line-height:1.8;border-color:#d2bda052;padding:12px 0;color:#8c785e}.live-feed>div p:first-child{color:#6e5679;font-weight:700}.live-feed>div span{color:#ba944f}.live-feed .muted{font-size:12px;line-height:1.8;color:#ad9676}.target-card{background:radial-gradient(ellipse at 50% 30%,#eff0d6,#d5dfb8);border:2px solid #b0b791;border-bottom:6px solid #94a078;border-radius:25px;padding:12px 18px}.target-castle{display:block;max-width:180px;margin:auto auto 7px}.target-card strong{background:#fff1d1;border:1px solid #c9b28c;border-bottom:3px solid #b49b72;color:var(--team);border-radius:7px;padding:7px}.target-card small{font-size:16px;color:#80725a}.target-card:enabled:hover{transform:translateY(-3px)}dialog{background:#fff4da;border:3px solid #c3a67e;box-shadow:0 8px 0 #9e815c,0 30px 90px #30231c55}dialog::backdrop{background:#46403470;backdrop-filter:blur(4px)}dialog h2{color:#725479}.switch-student{background:#eee2c9;border:1px solid #cbbb9c;border-bottom:3px solid #bfac8a}.avatar{background:#dbc7e5;color:#795585;border:1px solid #b39ac1}.swatch span{border-color:#fff1d6}.swatch input:checked+span{box-shadow:0 0 0 3px #9676a8}#toast{background:#685576;color:#fff4d7;border:2px solid #b9a4c0;box-shadow:0 5px 0 #51405c}
/* 애니메이션은 표시만 변경합니다. 점수와 비용은 기존 엔진이 처리합니다. */
.travel-token{position:fixed;left:0;top:0;width:40px;height:40px;z-index:9999;pointer-events:none;filter:drop-shadow(0 0 10px #ffe583)}.travel-token .game-icon{width:100%;height:100%}.repair-spark{position:absolute;bottom:35%;color:#ffe48c;text-shadow:0 0 7px #fff6c3;font-size:25px;pointer-events:none;z-index:6}.reward-label{position:absolute;top:38%;left:50%;transform:translate(-50%,-50%);padding:10px 20px;border:2px solid #ddba5d;background:#fff0bb;border-radius:30px;box-shadow:0 5px 18px #baa15233;color:#9e7435;font-size:21px;font-weight:900;white-space:nowrap;pointer-events:none;animation:reward-rise 1.4s both;z-index:10}.answer-glow{animation:card-glow .7s ease-out}.gentle-shake{animation:gentle-shake .35s}.energy-pop{animation:energy-pop .5s}.stat-changed{animation:number-pop .75s}.shield-pulse .magic-dome{animation:dome-pulse 1.1s}.shield-pulse[data-mini-fort]{animation:card-glow 1s}@keyframes card-glow{0%,100%{filter:brightness(1)}40%{filter:brightness(1.15);box-shadow:0 0 35px #ffdf7b,0 6px 0 #c4a67b}}@keyframes reward-rise{0%{opacity:0;translate:0 12px;scale:.8}25%,70%{opacity:1;scale:1}100%{opacity:0;translate:0 -35px}}@keyframes gentle-shake{0%,100%{translate:0 0}25%{translate:-5px 0}75%{translate:5px 0}}@keyframes energy-pop{40%{scale:1.05;filter:brightness(1.15)}}@keyframes number-pop{35%{scale:1.25;color:#b07fbd;text-shadow:0 0 10px #ffe37b}100%{scale:1}}@keyframes dome-pulse{0%{opacity:0;scale:.7}50%{opacity:1;scale:1.08}100%{opacity:1;scale:1}}
@media(min-width:1450px){.game-layout .play-columns{grid-template-columns:minmax(0,2fr) minmax(380px,1fr)}.game-layout .equation{font-size:76px;margin:22px 0 26px}.game-layout .question-caption{font-size:24px}.game-layout .answer{font-size:36px;min-height:107px}.game-layout .answers{max-width:790px}.game-layout .board{min-height:350px}.game-layout .board-side .fort{width:117px}.team-grid{gap:30px}.territory-land{height:180px}.territory-castle{width:205px}.territory .members{grid-template-columns:repeat(3,1fr)}}
@media(max-width:1200px){.home-copy{max-width:720px}.world-one{width:185px;left:-3%}.world-two{width:185px;right:-3%}.world-three{width:120px}.role-options{max-width:550px}.role-card{padding:16px;gap:8px}.team-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:25px}.territory .members{grid-template-columns:repeat(3,1fr)}.territory-land{height:160px}.territory-castle{width:185px}.territory .team-title{padding:7px 13px}.team-title h2{font-size:21px}.territory .player-card select{width:100%}.teacher-columns{grid-template-columns:minmax(0,1fr) 245px;gap:19px}.board-panel{padding:20px 12px}.board.large{height:530px}.large .fort{width:137px}.large .fort strong{font-size:14px}.large .fort-stats{font-size:14px;gap:8px}.large.many-kingdoms{height:640px}.large.many-kingdoms .fort{width:116px}.live-feed{padding:20px 15px}.live-feed>div p{font-size:13px}.play-columns{grid-template-columns:minmax(0,1.9fr) minmax(275px,1fr);gap:17px}.action-bar{gap:12px}.energy{min-width:150px;padding:8px 10px;gap:7px}.energy small{font-size:11px}.energy strong{font-size:30px}.energy .game-icon{width:36px;height:36px}.action-buttons{gap:10px}.action-button{padding:8px;gap:7px;min-height:97px}.action-button strong{font-size:14px}.action-button small.action-cost{font-size:12px}.action-button small.action-reason{font-size:10px}.action-icon .game-icon{width:32px;height:32px}.challenge-card{padding:17px 20px}.equation{font-size:60px;gap:30px;margin:18px 0 21px}.mini-castle{width:65px}.mini-details>strong{font-size:14px}.team-status{gap:4px;padding:0 5px}.mini-details .hp-row{font-size:13px;gap:8px}.mini-arena{gap:7px;padding:7px 10px}.mini-arena:has(>.team-status:nth-child(6)){grid-template-columns:repeat(4,minmax(0,1fr))}.board-side .fort{width:90px}.board-side .board.many-kingdoms .fort{width:65px}.board-side .board-center small{font-size:10px}.question-caption{font-size:20px}.question-hint{font-size:12px}.answer{font-size:30px}.question-meta{font-size:10px}.feedback strong{font-size:14px}.feedback span{font-size:11px}}
@media(min-width:761px) and (max-height:850px){.topbar{height:66px}.game-layout{padding-top:12px;padding-bottom:12px}.game-heading h1{font-size:20px;margin-bottom:0}.game-heading .eyebrow{font-size:10px;margin-bottom:2px}.timer{padding:5px 15px}.timer strong{font-size:26px}.mini-arena{margin-bottom:15px}.team-status{min-height:57px}.mini-castle{width:65px}.question-caption{margin-top:9px;font-size:19px}.challenge-card{padding:15px 20px}.equation{font-size:57px;margin:14px 0 20px}.question-mark{height:85px;width:73px}.answer{min-height:88px;font-size:29px}.question-hint{margin-top:17px;font-size:12px}.board-side .board{min-height:265px}.feedback{margin-top:15px;padding:7px 10px}.action-bar{margin-top:18px}.action-button{min-height:90px}.balance-note{margin-top:8px}.home.tabletop-world{padding-top:30px}.home-crest .game-icon{width:65px;height:65px}.home .intro{margin-bottom:27px}.home .home-links{margin-top:25px}.home .world-label{margin-top:25px}}
@media(max-width:760px){.topbar{min-height:72px;height:auto;padding:12px 4%}.brand small{display:none}.brand{font-size:18px}.brand-icon .game-icon{width:31px;height:31px}.layout{padding:22px 4% 30px}.home.tabletop-world{padding:34px 10px 30px;min-height:calc(100vh - 110px)}.home-copy{padding:0 18px}.home-copy h1{font-size:48px;letter-spacing:-3px}.home-crest .game-icon{width:66px;height:66px}.home .intro{font-size:14px;margin-bottom:24px}.home .role-options{gap:13px;max-width:470px}.home .role-card{padding:13px 12px;gap:6px;min-height:103px}.role-card strong{font-size:21px}.role-card small{font-size:12px}.role-symbol{width:35px}.role-symbol .game-icon{width:36px;height:36px}.role-card b{display:none}.home .home-links{gap:10px;flex-wrap:wrap;margin-top:25px}.home-links .text-button{font-size:12px;padding:8px 13px}.home .local-note{font-size:10px}.world-one{width:125px;bottom:0;left:-20px}.world-two{width:135px;bottom:0;right:-22px}.world-three{display:none}.world-token .game-icon{width:38px;height:38px}.token-three{display:none}.token-two{right:1%;top:22%}.token-one{bottom:5%;left:27%}.world-path{bottom:-290px;left:-40%;right:-40%}.world-label{font-size:9px;margin-top:45px!important;padding:5px 12px}.cloud-one{left:-70px;top:20%;scale:.65}.cloud-two{right:-70px;top:10%}.cloud-three{display:none}.setup-story{border-radius:30px;padding:20px}.setup-story .eyebrow,.setup-story h1,.setup-story p{padding:0}.setup-story p{margin:0}.page-heading h1{font-size:21px}.entry-code{min-width:140px;padding:8px 14px}.ticket-stamp{font-size:8px;letter-spacing:0}.entry-code strong{font-size:25px}.entry-code small{font-size:10px}.team-grid{gap:17px;grid-template-columns:1fr}.territory{padding:16px;border-radius:30px}.territory .members{grid-template-columns:repeat(3,minmax(0,1fr))}.territory .team-title{padding:8px 12px}.territory .team-title h2{font-size:21px}.territory-land{height:148px}.territory-castle{width:176px}.toolbar{padding:12px;gap:13px}.toolbar-group{gap:9px}.toolbar button{font-size:12px}.mini-arena{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px;padding:9px}.mini-castle{width:57px!important}.mini-details>strong{font-size:13px!important}.team-status{min-height:60px;gap:5px!important}.mini-details .hp-row{font-size:12px;gap:8px}.mini-arena .my-badge{font-size:8px;top:-6px}.play-columns{grid-template-columns:1fr}.board-side{display:none}.challenge-card{padding:18px 16px}.question-meta{font-size:10px}.question-caption{font-size:18px;margin:18px 0 0}.equation{font-size:51px;gap:22px;margin:22px 0}.question-mark{width:60px;height:79px;font-size:40px}.multiply,.equals{font-size:30px}.answer{font-size:27px;min-height:92px;padding:14px 6px}.answers{gap:10px}.answer-number{font-size:9px;left:5px;top:5px;width:14px;height:14px;line-height:14px}.question-hint{font-size:11px;margin-top:18px}.action-bar{flex-direction:column;gap:14px}.energy{min-height:72px;gap:12px}.energy>div{display:flex;align-items:center;gap:15px}.energy strong{display:block}.energy small{font-size:14px}.energy strong small{font-size:12px}.action-buttons{grid-template-columns:repeat(2,minmax(0,1fr));gap:13px}.action-button{min-height:106px;gap:10px}.action-button strong{font-size:15px}.action-button small.action-cost{font-size:13px}.action-button small.action-reason{font-size:10px}.action-icon .game-icon{width:37px;height:37px}.balance-note{font-size:10px}.feedback{padding:10px}.feedback strong{font-size:13px}.feedback span{font-size:10px}.feedback button{font-size:12px;padding:8px}.teacher-columns{grid-template-columns:1fr}.board-panel{padding:20px 5px}.board.large{height:450px;min-height:450px}.large .fort{width:113px}.large .fort strong{font-size:12px}.large .fort-stats{font-size:12px;gap:8px;padding:3px}.large.many-kingdoms{height:690px}.large.many-kingdoms .fort{width:90px}.large.many-kingdoms .fort strong{font-size:11px}.large.many-kingdoms .fort-stats{font-size:11px;gap:5px}.large .path-tiles>span{width:23px;height:27px;font-size:12px}.large .board-path{border-width:22px}.large .board-center .game-icon{width:35px;height:35px}.board-center small{display:none}.arena-message{font-size:12px;padding:11px;max-width:85%}.live-feed{margin-top:4px}.live-feed>div{max-height:240px}.large[data-count="10"],.large[data-count="11"],.large[data-count="12"]{min-height:950px}.board.many-kingdoms[data-count="12"] .fort{width:87px}.awards article>span .game-icon{width:51px;height:51px}.target-castle{max-width:145px}.target-card{padding:10px}.target-card strong{font-size:14px}.target-card small{font-size:14px}.results-title .trophy .game-icon{width:72px;height:72px}.results-title h1{font-size:28px}}
@media(prefers-reduced-motion:reduce){.travel-token,.repair-spark{display:none}.reward-label{animation:none;position:static;display:block;transform:none;margin:8px auto;width:max-content;font-size:15px}.stat-changed{color:#9774a7}}
@media(min-width:761px) and (max-height:850px){.board-side .board{height:auto;min-height:245px}.game-layout .equation{font-size:51px;margin:11px 0 16px}.game-layout .answer{min-height:82px;font-size:28px}.game-layout .question-mark{height:75px}.game-layout .question-hint{margin-top:14px}.game-layout .feedback{margin-top:13px}.game-layout .feedback .primary{min-height:44px}.game-layout .question-caption{margin-top:7px}.game-layout .board-side{padding:12px 11px 9px}}
.large.many-kingdoms{height:740px}.large.many-kingdoms .fort{width:125px}
@media(max-width:1200px){.large.many-kingdoms .fort{width:108px}.large.many-kingdoms .fort-stats{font-size:13px}}
@media(max-width:760px){.large.many-kingdoms{height:850px}.large.many-kingdoms .fort{width:88px}.large.many-kingdoms .fort-stats{font-size:11px}}
@media(min-width:761px) and (max-height:850px){.game-layout .challenge-card{padding:12px 20px}.game-layout .equation{font-size:46px;margin:8px 0 14px}.game-layout .question-mark{height:70px}.game-layout .answer{min-height:76px;font-size:26px;padding:8px}.game-layout .feedback .fraction{font-size:13px}.game-layout .feedback{margin-top:10px;padding:6px 10px}.game-layout .question-caption{font-size:18px;margin-top:5px}.game-layout .action-bar{margin-top:14px}.game-layout .action-button{min-height:83px}.game-layout .board-side .board{min-height:230px}.game-layout .question-hint{margin-top:13px}}
