@font-face{font-family:Legions;src:local('Avenir Next'),local('Segoe UI');font-display:swap}*{box-sizing:border-box} :root{font-family:Legions,Arial,'PingFang SC','Microsoft YaHei',sans-serif;color:#193d4d;background:#eef1e8;font-synthesis:none;--ink:#193d4d;--muted:#637879;--gold:#dfb654;--blue:#287c9d;--red:#c85a47;--paper:#fffdf7;--line:#dae0d5}body{margin:0;min-width:300px;background:radial-gradient(ellipse at 90% 0,#fff7d7,transparent 50%),#eef1e8}button,input,select{font:inherit}button,a,select,input{-webkit-tap-highlight-color:transparent}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:default;opacity:.5}button:focus-visible,a:focus-visible,select:focus-visible,input:focus-visible{outline:3px solid #32abc3;outline-offset:3px}a{color:inherit}svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;flex-shrink:0}.svg-defs{position:absolute;width:0;height:0;overflow:hidden}.topbar{max-width:1440px;margin:auto;padding:20px 32px;display:flex;align-items:center;justify-content:space-between;gap:16px;position:relative;z-index:4}.brand{text-decoration:none;display:flex;align-items:center;gap:11px;font-size:23px;font-weight:800;letter-spacing:-.6px;white-space:nowrap}.brand-mark{width:44px;height:44px;background:var(--ink);border-radius:14px;display:grid;place-items:center;box-shadow:0 3px 0 #c5a15a;color:#f4d47b}.brand-mark svg{width:29px;height:29px}.topbar nav{display:flex;align-items:center;gap:8px}.quiet,.icon-button{border:1px solid transparent;background:transparent;color:var(--ink);min-height:44px;border-radius:13px;display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:10px 12px;font-size:15px;font-weight:700}.quiet:hover,.icon-button:hover{background:#e1e7dc}.icon-button{width:44px;padding:10px}.icon-button[aria-pressed=true]{background:#d9e8d9;color:#316f59}select{border:1px solid var(--line);background:#fffdf6;border-radius:12px;padding:11px 9px;max-width:130px;color:var(--ink);font-size:14px;min-height:44px}#app{max-width:1440px;margin:0 auto;padding:12px 32px 24px;min-height:75vh}.hero{display:grid;grid-template-columns:1fr 1.13fr;gap:38px;align-items:center;margin:18px 0 36px}.eyebrow{font-size:12px;letter-spacing:2px;font-weight:800;color:#6c8273;display:block;margin-bottom:17px}.hero h1{white-space:pre-line;font-size:clamp(36px,4.2vw,65px);line-height:1.06;letter-spacing:-2px;margin:0 0 21px;font-weight:850}.hero p{font-size:18px;line-height:1.65;color:var(--muted);max-width:510px;margin:0 0 25px}.button-row{display:flex;gap:12px;flex-wrap:wrap}.button{border:1px solid #d1dbd4;border-radius:14px;padding:14px 20px;min-height:50px;color:var(--ink);background:var(--paper);font-weight:750;display:inline-flex;gap:10px;align-items:center;justify-content:center;transition:transform .15s,box-shadow .15s;text-decoration:none}.button:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 5px 12px #173b4d12}.button:active:not(:disabled){transform:translateY(1px)}.button.primary{background:linear-gradient(#378eaa,#236d89);border-color:#1c627b;color:#fff;box-shadow:0 4px 0 #174c61,0 7px 15px #245d7725}.button.gold{background:linear-gradient(#f5d984,#e6bc59);border-color:#d4a344;box-shadow:0 4px 0 #bb8b37;color:#503f20}.button.danger{background:#fff0e9;border-color:#edc2b4;color:#a34b3c}.button.small{min-height:44px;padding:10px 15px;font-size:14px}.hero-art{position:relative;min-height:390px;overflow:hidden;border-radius:30px;background:#b5cf8d;box-shadow:0 20px 50px #173b4d24;border:7px solid #fff9e9;isolation:isolate;transform:rotate(1deg)}.hero-art:before{content:'';position:absolute;inset:0;background:url('./art/meadow-arena-v1.webp') center/cover}.hero-art:after{content:'';position:absolute;inset:45% 0 0;background:linear-gradient(transparent,#173b4dbd);z-index:-1}.hero-art .hero-caption{position:absolute;bottom:21px;left:25px;right:25px;color:#fff;display:flex;justify-content:space-between;align-items:center;font-weight:800;gap:10px;text-shadow:0 1px 4px #173b4d88}.hero-caption span{font-size:13px;padding:8px 13px;background:#fff9e9;color:var(--ink);border-radius:20px;text-shadow:none;white-space:nowrap}.hero-character{position:absolute;bottom:43px;width:42%;height:290px;background-image:url('./art/warrior-lineup-v1.webp');background-repeat:no-repeat;background-size:300% 200%;border-radius:45% 45% 40% 40%;box-shadow:0 8px 35px #213c3740;border:5px solid #fff3cc;transform:rotate(-5deg);left:10%}.hero-character.second{left:auto;right:8%;bottom:61px;transform:rotate(7deg);background-position:100% 100%;width:36%;height:250px}.mini-rules{display:flex;gap:24px;margin-top:28px;font-size:13px;color:var(--muted);line-height:1.5}.mini-rules b{display:block;font-size:22px;color:var(--ink)}.section-head{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:25px 0 17px}.section-head h2{font-size:24px;letter-spacing:-.6px;margin:0}.empty-state{border:1px dashed #b8c8bc;padding:26px;border-radius:20px;color:var(--muted);background:#fffdf760;font-size:16px;line-height:1.6}.room-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.room-card{background:var(--paper);border:1px solid var(--line);border-radius:20px;display:flex;overflow:hidden;flex-direction:column}.room-thumb{height:108px;background:center/cover}.room-content{padding:17px;display:flex;gap:12px;align-items:center;justify-content:space-between}.room-content h3{font-size:16px;margin:0 0 7px;overflow-wrap:anywhere}.room-content p{font-size:13px;color:var(--muted);margin:0}.room-card .button{flex-shrink:0}.panel{background:var(--paper);border:1px solid var(--line);border-radius:25px;box-shadow:0 8px 22px #183c4b09}.match-head{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px 0 20px}.duelists{display:flex;gap:20px;align-items:center;min-width:0}.duelist{display:flex;gap:11px;align-items:center;min-width:0}.duelist .player-name{font-size:16px;font-weight:800;max-width:200px;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.duelist small{display:block;color:var(--muted);font-size:12px;margin-top:5px}.crest{display:inline-grid;place-items:center;width:44px;height:49px;clip-path:polygon(0 0,100% 0,93% 70%,50% 100%,7% 70%);background:#2f7d9d;color:#fff3bd;flex-shrink:0;border-radius:8px 8px 0 0}.crest svg{width:26px;height:26px}.crest.c1{background:#4d8964}.crest.c2{background:#c77a4d}.crest.c3{background:#725b9e}.crest.c4{background:#c1574b}.crest.c5{background:#b59742}.duel-score{font-size:27px;white-space:nowrap;font-weight:850;color:var(--ink);letter-spacing:3px}.match-actions{display:flex;gap:8px;align-items:center}.round-label{font-size:14px;color:var(--muted);font-weight:700;white-space:nowrap}.quiz-layout{display:grid;grid-template-columns:minmax(0,1fr) 320px;gap:22px;align-items:start}.question-panel{padding:30px 35px}.question-meta{display:flex;align-items:center;gap:12px;flex-wrap:wrap;font-size:13px;color:var(--muted)}.tag{border:1px solid #d7e5d9;background:#eaf3e9;border-radius:20px;color:#3b7556;font-size:12px;padding:6px 10px;font-weight:750}.tag.hard{background:#fff1d4;border-color:#efd5a0;color:#947024}.question-title{font-size:clamp(23px,2.3vw,33px);letter-spacing:-.6px;line-height:1.3;margin:25px 0;min-height:86px}.answer-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}.answer{display:flex;align-items:center;gap:12px;text-align:left;min-height:75px;padding:14px 17px;border:2px solid #e0e6db;background:#fff;border-radius:15px;font-size:17px;color:var(--ink);font-weight:650;transition:background .15s,border-color .15s,transform .15s;overflow-wrap:anywhere}.answer span{flex-shrink:0;background:#edf1e9;color:#72857a;border-radius:8px;width:28px;height:30px;display:grid;place-items:center;font-size:13px}.answer:hover:not(:disabled){border-color:#58a0ad;transform:translateY(-2px)}.answer:disabled{opacity:1}.answer.pending{background:#e7f3f8;border-color:#3f8fac}.answer.correct{background:#e5f3df;border-color:#64a66b;color:#2e6744}.answer.wrong{background:#fbe8e0;border-color:#da846f;color:#aa523c}.answer.dim{color:#85928b;background:#f5f5f0}.answer-note{min-height:48px;font-size:14px;line-height:1.5;margin:18px 0 0;color:var(--muted)}.answer-note.good{color:#3a7e50}.answer-note.bad{color:#ac5942}.question-progress{display:flex;gap:8px;margin-top:22px}.question-progress span{height:6px;flex:1;border-radius:5px;background:#e3e8dd}.question-progress span.current{background:#ddb45b}.question-progress span.good{background:#72a578}.question-progress span.bad{background:#c58c7b}.timer-head{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:17px;font-size:14px;font-weight:700}.timer-head b{font-size:19px;color:var(--blue);font-variant-numeric:tabular-nums}.time-track{height:7px;background:#e1e8dc;overflow:hidden;border-radius:9px;margin-bottom:24px}.time-track i{display:block;height:100%;background:linear-gradient(90deg,#6aab9d,#d6b765);border-radius:9px;width:100%;transition:width .1s linear}.reward-card{overflow:hidden}.portrait{background-image:url('./art/warrior-lineup-v1.webp');background-repeat:no-repeat;background-size:300% 200%;background-position:0 0;aspect-ratio:1.05;position:relative}.portrait.p1{background-position:0 0}.portrait.p2{background-position:50% 0}.portrait.p3{background-position:100% 0}.portrait.p4{background-position:0 100%}.portrait.p5{background-position:50% 100%}.portrait.p6{background-position:100% 100%}.reward-card .reward-caption{padding:18px 22px}.reward-caption .eyebrow{font-size:10px;letter-spacing:1.2px;margin-bottom:9px}.reward-caption h3{font-size:21px;line-height:1.2;margin:0 0 9px}.reward-caption p{font-size:13px;color:var(--muted);margin:0 0 17px;line-height:1.5}.stats{display:flex;gap:12px;justify-content:space-between}.stat{font-size:12px;color:var(--muted);display:flex;flex-direction:column;gap:5px}.stat div{display:flex;gap:5px;align-items:center;color:var(--ink);font-size:21px;font-weight:800}.stat svg{width:17px;height:17px;color:#ba8b39}.army-strip{padding:19px 24px;margin-top:20px}.army-strip h3{font-size:14px;margin:0 0 12px;display:flex;justify-content:space-between;gap:10px}.army-icons{display:flex;gap:8px;min-height:48px;align-items:center}.army-icons .portrait{width:49px;height:55px;aspect-ratio:auto;border-radius:10px;border:2px solid #c0d2bc;flex-shrink:0}.army-icons .placeholder{border:1px dashed #c8d4c3;border-radius:10px;width:49px;height:55px;flex-shrink:0;background:#f2f4ed}.army-icons small{font-size:13px;color:var(--muted);line-height:1.5}.enemy-status{font-size:12px;margin-top:13px;color:var(--muted)}.quiz-note{font-size:13px;color:var(--muted);margin:18px 0;text-align:center}.waiting-panel{text-align:center;max-width:760px;margin:22px auto;padding:35px}.waiting-panel h1{font-size:30px;letter-spacing:-1px}.waiting-panel p{color:var(--muted);line-height:1.7;max-width:520px;margin:18px auto 25px}.room-code{display:block;font-size:40px;letter-spacing:7px;font-weight:850;margin:20px 0}.waiting-players{display:flex;justify-content:center;gap:40px;margin:30px 0}.waiting-player{display:grid;justify-items:center;gap:10px;min-width:120px}.waiting-player .crest{width:65px;height:73px}.waiting-player b{max-width:210px;overflow-wrap:anywhere}.waiting-player small{color:var(--muted)}.center-actions{display:flex;justify-content:center;gap:14px;flex-wrap:wrap}.countdown-panel{padding:32px;text-align:center;position:relative;isolation:isolate;min-height:440px;display:flex;align-items:center;justify-content:center;flex-direction:column;background:url('./art/meadow-arena-v1.webp') center/cover;overflow:hidden}.countdown-panel:before{content:'';position:absolute;inset:0;background:#fff9e9c9;z-index:-1}.countdown-panel h1{font-size:35px;margin:12px}.big-count{font-size:100px;font-weight:850;line-height:1.3}.battle-container{position:relative;border-radius:26px;overflow:hidden;border:6px solid #fff9eb;box-shadow:0 14px 35px #193d4d1f;background:#9fbe7c}.battle-stage{position:relative;aspect-ratio:16/9;width:100%;background:center/100% 100%;isolation:isolate}.battle-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}.battle-stage .fx-canvas{pointer-events:none;z-index:2}.arena-title{position:absolute;top:15px;left:15px;border-radius:20px;padding:7px 13px;background:#fff9e9e8;color:#45624d;font-size:12px;font-weight:750;z-index:3}.battle-bottom{display:flex;justify-content:space-between;align-items:center;padding:17px 23px;background:var(--paper);font-weight:800;font-size:15px}.battle-bottom span{font-size:13px;color:var(--muted);font-weight:500}.battle-summary{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin-top:17px}.battle-team{background:#fffdf7b3;border:1px solid #d8e1d2;border-radius:17px;padding:17px 20px;display:flex;align-items:center;gap:15px}.battle-team.enemy{border-color:#edcdbf}.battle-team .team-stats{flex:1;min-width:0}.team-stats b{display:block;font-size:15px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.team-stats progress{width:100%;height:9px;accent-color:#459cb3;display:block;margin-top:10px}.battle-team.enemy progress{accent-color:#d88466}.team-hp{font-variant-numeric:tabular-nums;font-size:14px;white-space:nowrap}.result-panel{padding:35px;text-align:center;max-width:850px;margin:20px auto}.result-panel .result-emblem{width:85px;height:85px;border-radius:50%;display:grid;place-items:center;background:#fff0c3;color:#b79134;margin:0 auto 17px;box-shadow:0 0 0 8px #f4e9d277}.result-emblem svg{width:43px;height:43px}.result-panel h1{font-size:37px;letter-spacing:-1px;margin:14px 0}.result-panel p{font-size:15px;color:var(--muted);line-height:1.7}.result-score{font-size:61px;font-weight:850;letter-spacing:9px;margin:16px 0}.rating-chip{display:inline-flex;align-items:center;gap:12px;background:#eaf0e4;padding:11px 20px;border-radius:30px;font-size:17px;font-weight:750;margin-bottom:15px}.rating-chip b{color:#31805a}.rating-chip.loss b{color:#b45b45}.round-history{display:flex;gap:12px;justify-content:center;margin:20px 0 25px;flex-wrap:wrap}.round-history div{border:1px solid var(--line);padding:10px 15px;border-radius:13px;background:#f7f8f1;font-size:13px;min-width:135px}.round-history strong{display:block;margin:8px 0 0;font-size:15px}dialog{border:1px solid #d6ddcd;border-radius:25px;background:var(--paper);color:var(--ink);padding:30px;width:min(580px,calc(100% - 28px));max-height:90dvh;box-shadow:0 25px 100px #152e3d55}dialog::backdrop{background:#152c3a85;backdrop-filter:blur(4px)}.modal-close{position:absolute;right:10px;top:10px}dialog h2{font-size:27px;letter-spacing:-.8px;margin:5px 35px 23px 0}dialog p{font-size:15px;line-height:1.65;color:var(--muted)}dialog .button-row{margin-top:23px}label.field{display:block;font-size:14px;font-weight:750;margin:20px 0 10px}input[type=text]{display:block;width:100%;min-height:48px;border:1px solid #c9d5c9;border-radius:12px;background:#fff;padding:12px 15px;color:var(--ink)}#roomCodeInput{text-transform:uppercase;letter-spacing:4px;font-size:23px}.arena-options{display:grid;grid-template-columns:1fr 1fr;gap:13px}.arena-option{border:3px solid transparent;border-radius:16px;padding:0;overflow:hidden;background:#edf1e5;color:var(--ink);font-size:14px;font-weight:700}.arena-option.selected{border-color:#358da0}.arena-option img{width:100%;aspect-ratio:1.6;object-fit:cover;display:block}.arena-option span{padding:12px;display:block}.check-field{display:flex;gap:10px;align-items:center;font-size:14px;margin-top:20px;min-height:44px}.check-field input{accent-color:#2c8298;width:20px;height:20px}.avatar-options{display:flex;flex-wrap:wrap;gap:12px;margin:12px 0 24px}.avatar-option{border:2px solid transparent;background:transparent;padding:5px;border-radius:12px}.avatar-option.selected{border-color:#2f8b9c}.profile-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-top:15px}.profile-stats div{padding:13px;background:#f0f3e9;border-radius:13px;font-size:12px;text-align:center;color:var(--muted)}.profile-stats b{display:block;font-size:23px;color:var(--ink);margin-bottom:7px}table{width:100%;border-collapse:collapse;font-size:14px}th{font-size:12px;color:var(--muted);text-align:left;padding:10px 5px}td{border-top:1px solid var(--line);padding:12px 5px;overflow-wrap:anywhere}td:last-child{text-align:right;font-weight:800;color:#9e762a}td .crest{width:26px;height:30px;margin-right:8px;vertical-align:middle}td .crest svg{width:16px;height:16px}.my-row{background:#e9f2e4}.help-step{display:grid;grid-template-columns:33px 1fr;gap:13px;margin:22px 0}.help-step>span{width:30px;height:30px;background:#f0dfb5;border-radius:9px;display:grid;place-items:center;font-weight:800}.help-step h3{font-size:17px;margin:3px 0 6px}.help-step p{margin:0;font-size:14px}.help-fine{border-top:1px solid var(--line);padding-top:15px;font-size:12px!important}.pause-layer{position:absolute;inset:0;background:#173d4dcc;z-index:5;display:grid;place-items:center;text-align:center;padding:20px;color:#fff9e6}.pause-layer h2{font-size:30px}.pause-layer p{max-width:450px;line-height:1.6}.pause-layer .button{margin-top:10px}.paused-wrap{position:relative}footer{max-width:1440px;padding:18px 32px 25px;margin:auto;display:flex;justify-content:space-between;font-size:11px;color:#7d8c80}#connection{position:sticky;top:0;z-index:8;background:#fff1cf;border-bottom:1px solid #dcc69b;text-align:center;padding:11px 20px;color:#805f25;font-size:14px}#toast{position:fixed;bottom:24px;left:50%;transform:translateX(-50%);max-width:min(560px,90vw);background:#193d4df2;color:#fff;border-radius:15px;padding:14px 21px;box-shadow:0 7px 30px #173c4c33;z-index:20;font-size:15px;line-height:1.5}#modalError{color:#b65744;font-size:14px;margin-bottom:0}.loading{display:grid;place-content:center;text-align:center;min-height:65vh;color:var(--muted);gap:20px}.spinner{width:45px;height:45px;border:4px solid #dae3d3;border-top-color:#b49a53;border-radius:50%;animation:spin 1s linear infinite;margin:auto}@keyframes spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.001ms!important;transition:none!important;scroll-behavior:auto!important}}
.portrait{background-image:none!important;overflow:hidden;background-color:#fffdf7;isolation:isolate}.portrait:before{content:'';position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);aspect-ratio:1.12;background-image:url('./art/warrior-lineup-v1.webp');background-repeat:no-repeat;background-size:300% auto;background-position:0 0;z-index:-1}.portrait.p2:before{background-position:50% 0}.portrait.p3:before{background-position:100% 0}.portrait.p4:before{aspect-ratio:.94;background-position:0 100%}.portrait.p5:before{aspect-ratio:.94;background-position:50% 100%}.portrait.p6:before{aspect-ratio:.94;background-position:100% 100%}.army-icons .portrait,.army-icons .placeholder{flex:0 1 49px;min-width:0}.hero-art .hero-character{position:absolute;border-radius:23px}.battle-summary{grid-template-columns:repeat(2,minmax(0,1fr))}.battle-team,.team-stats progress,.duelist>div{min-width:0}.duelist .player-name{max-width:100%}.battle-stage{height:clamp(300px,calc(100dvh - 355px),650px);aspect-ratio:auto;overflow:hidden}.battle-scenery{position:absolute;inset:0;background:center/100% 100%;transform-origin:center}
.battle-scenery{background-size:cover}
@media(min-width:1600px){.hero{margin-top:50px}.hero-art{min-height:460px}.hero-character{height:340px}.hero-character.second{height:300px}}
@media(max-width:1050px){.topbar{padding:16px 22px}.topbar nav .quiet span{display:none}.brand{font-size:21px}#app{padding:10px 22px 20px}.hero{gap:23px}.hero-art{min-height:340px}.hero-character{height:240px;left:5%}.hero-character.second{height:220px}.quiz-layout{grid-template-columns:minmax(0,1fr) 260px;gap:16px}.question-panel{padding:24px}.question-title{font-size:27px}.answer{font-size:15px;padding:13px;gap:9px}.reward-caption h3{font-size:18px}.reward-card .reward-caption{padding:17px}.duelist .player-name{max-width:150px}}
@media(max-width:720px){.topbar{padding:12px 14px;gap:8px;flex-wrap:wrap}.brand{font-size:20px}.brand-mark{width:37px;height:37px;border-radius:11px}.topbar nav{gap:1px}.topbar .quiet{padding:8px}.topbar .icon-button{width:37px;padding:7px}.topbar select{font-size:12px;padding:10px 5px;max-width:93px}.topbar #helpButton{display:none}#app{padding:6px 14px 15px;min-height:80vh}.hero{grid-template-columns:1fr;gap:28px;margin:15px 0 25px}.hero h1{font-size:43px;letter-spacing:-1.5px}.hero p{font-size:16px;line-height:1.6;margin-bottom:20px}.hero .eyebrow{font-size:10px;margin-bottom:13px}.hero-art{min-height:275px;order:2;transform:rotate(0);border-width:5px;border-radius:23px}.hero-character{height:205px;width:34%;left:14%;bottom:37px}.hero-character.second{height:185px;width:30%;right:14%;bottom:44px}.hero-caption{font-size:15px!important;left:17px!important;right:17px!important;bottom:16px!important}.hero-caption span{font-size:10px;padding:7px 9px}.mini-rules{margin-top:24px;gap:26px}.mini-rules b{font-size:20px}.hero .button{flex:1;padding:14px 12px;font-size:15px}.hero .button-row{gap:10px}.section-head h2{font-size:21px}.section-head .button{padding:9px 12px;font-size:13px}.room-grid{grid-template-columns:1fr}.room-card{display:grid;grid-template-columns:110px 1fr}.room-thumb{height:100%}.room-content{padding:17px 12px}.match-head{padding:8px 0 15px;flex-wrap:wrap;gap:12px}.duelists{gap:12px;width:100%;justify-content:space-between}.duelist{gap:7px;max-width:43%}.duelist .crest{width:34px;height:40px}.duelist .player-name{font-size:13px;max-width:110px}.duelist small{font-size:10px}.duel-score{font-size:23px;letter-spacing:1px}.round-label{font-size:12px}.match-actions{width:100%;justify-content:space-between}.match-actions .quiet{padding:8px;font-size:13px;min-height:40px}.quiz-layout{grid-template-columns:1fr;gap:13px}.question-panel{padding:19px;border-radius:21px}.question-title{font-size:24px;margin:18px 0;min-height:63px;line-height:1.3}.answer-grid{gap:9px}.answer{font-size:15px;min-height:74px;padding:12px 10px;gap:7px;border-radius:13px}.answer span{width:23px;height:26px;font-size:12px}.question-meta{font-size:12px;gap:9px}.tag{font-size:11px;padding:5px 9px}.answer-note{font-size:13px;min-height:40px;margin-top:14px}.question-progress{margin-top:14px}.reward-card{display:grid;grid-template-columns:114px minmax(0,1fr);border-radius:20px}.reward-card .portrait{height:100%;aspect-ratio:auto;min-height:170px}.reward-card .reward-caption{padding:15px 14px}.reward-caption h3{font-size:18px;margin-bottom:6px}.reward-caption .eyebrow{font-size:8px;letter-spacing:.8px;margin-bottom:7px}.reward-caption p{font-size:11px;margin-bottom:11px}.stats{gap:8px}.stat{font-size:10px}.stat div{font-size:19px;gap:4px}.stat svg{width:15px;height:15px}.timer-head{margin-bottom:11px;font-size:13px}.time-track{margin-bottom:15px}.quiz-sidebar{display:contents}.reward-card{grid-row:2}.army-strip{margin-top:0;padding:16px 19px;border-radius:20px}.quiz-note{font-size:11px;margin:13px 0}.army-icons{gap:6px}.army-icons .portrait,.army-icons .placeholder{width:42px;height:47px}.army-strip h3{font-size:12px}.battle-stage{aspect-ratio:1.12;background-size:cover}.battle-container{border-width:4px;border-radius:19px}.arena-title{font-size:10px;top:10px;left:10px}.battle-bottom{padding:13px;font-size:13px;gap:10px;flex-wrap:wrap}.battle-bottom span{font-size:11px}.battle-summary{gap:9px;margin-top:12px}.battle-team{padding:12px 10px;gap:7px}.battle-team .crest{display:none}.team-stats b{font-size:12px}.team-hp{font-size:11px}.waiting-panel{padding:23px 18px;margin:8px auto}.waiting-panel h1{font-size:25px}.waiting-panel p{font-size:14px}.room-code{font-size:31px;letter-spacing:5px}.waiting-players{gap:17px}.waiting-player{min-width:100px}.waiting-player b{max-width:125px;font-size:14px}.waiting-player .crest{width:54px;height:62px}.countdown-panel{min-height:430px;padding:20px}.countdown-panel h1{font-size:29px}.big-count{font-size:82px}.result-panel{padding:27px 18px;margin:8px auto}.result-panel h1{font-size:29px}.result-score{font-size:48px}.round-history{gap:8px}.round-history div{min-width:90px;padding:10px;font-size:11px}.round-history strong{font-size:13px}.result-panel p{font-size:13px}.rating-chip{font-size:14px;padding:10px 15px}.result-panel .result-emblem{width:67px;height:67px}.result-emblem svg{width:34px;height:34px}dialog{padding:25px 19px;border-radius:22px}dialog h2{font-size:24px}dialog p{font-size:14px}.arena-option span{font-size:12px;padding:11px 7px}.avatar-options{gap:7px}.avatar-option{padding:4px}.avatar-option .crest{width:36px;height:43px}.help-step{gap:9px}.help-step p{font-size:13px}.profile-stats{gap:7px}.profile-stats div{font-size:10px;padding:12px 5px}.profile-stats b{font-size:21px}footer{padding:14px;font-size:10px}#connection{font-size:12px;padding:9px 14px}.pause-layer h2{font-size:25px}.pause-layer p{font-size:14px}}
@media(max-width:370px){.topbar{padding:10px}.brand{font-size:18px}.topbar nav{margin-left:auto}.topbar #profileButton{display:none}.hero h1{font-size:38px}#app{padding:6px 10px 15px}.hero-character{left:10%;width:38%;height:200px}.hero-character.second{right:10%;width:34%}.question-panel{padding:16px}.answer{font-size:14px;gap:5px}.answer span{width:21px}.reward-card{grid-template-columns:96px minmax(0,1fr)}.reward-caption h3{font-size:16px}.stat{font-size:9px}.stat div{font-size:17px}.room-card{grid-template-columns:85px 1fr}}
@media(max-height:500px) and (min-width:700px){.topbar{padding:8px 20px}.hero{margin:10px 0}.battle-stage{aspect-ratio:2.3;height:auto}.match-head{padding:6px 0 12px}.question-title{min-height:0;margin:12px 0}.question-panel{padding:18px}.answer{min-height:55px}.reward-card .portrait{max-height:150px}.time-track{margin-bottom:10px}}
.answer-stats{display:block;margin-top:12px;color:var(--muted);font-size:13px}.recruit-stack{position:relative;flex:0 1 44px;min-width:0}.recruit-stack .portrait{width:100%;height:52px}.recruit-stack b{position:absolute;right:-4px;bottom:-3px;font-size:11px;line-height:18px;min-width:19px;border-radius:8px;text-align:center;background:#224a5a;color:#fff;border:1px solid #fff6d9;padding:0 3px}.army-icons{gap:7px;padding-bottom:4px}.team-legend{display:flex;justify-content:space-between;gap:12px;padding:12px 17px;background:#fffcf2}.team-badge{font-size:12px;font-weight:800;display:flex;gap:7px;align-items:center}.team-badge:before{content:'';display:block;width:13px;height:15px;background:#267ccb;clip-path:polygon(0 0,100% 0,90% 65%,50% 100%,10% 65%)}.team-badge.team-1:before{background:#df4a4f;clip-path:polygon(50% 0,100% 50%,50% 100%,0 50%)}.team-badge.team-0{color:#2464a1}.team-badge.team-1{color:#b54145}.battle-team.team-1{border-color:#edc1c0}.battle-team.team-1 progress{accent-color:#df4a4f}.battle-team.team-0 progress{accent-color:#267ccb}.team-stats small{display:block;color:var(--muted);font-size:11px;line-height:1.5;margin-top:7px}.battle-stage{aspect-ratio:1672/941;height:auto;max-height:none}.battle-scenery{background-size:100% 100%;transform:none!important}.question-title{animation:question-enter .14s ease-out}@keyframes question-enter{from{opacity:.4;transform:translateY(4px)}to{opacity:1;transform:translateY(0)}}
@media(max-width:720px){.team-legend{padding:10px;gap:9px}.team-badge{font-size:10px;gap:5px}.battle-stage{aspect-ratio:1672/941;height:auto}.battle-bottom{font-size:12px}.recruit-stack .portrait{height:46px}.team-stats small{font-size:10px}.battle-summary .team-hp{display:none}.battle-team{padding:11px 12px}.battle-summary{margin-top:10px}}

.art-loading{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:18px;background:#fffaf0e8;z-index:6;padding:25px;text-align:center;font-size:16px;color:#234e5e}.art-loading[hidden]{display:none}

.seo-content{max-width:1100px;margin:48px auto;padding:28px;color:#40564f;background:#fffcf1;border:1px solid #d9e0c9;border-radius:24px;font:16px/1.7 system-ui}.seo-content li{margin:.6em 0}.seo-content details{border-top:1px solid #d9e0c9;padding:14px 0}.seo-content summary{cursor:pointer;font-weight:650}.seo-content a{color:#276657}.in-room .seo-content{display:none}@media(max-width:600px){.seo-content{margin:24px 12px;padding:18px}}
.quiz-layout>*{min-width:0}.reward-caption,.stat{min-width:0}.stat{overflow-wrap:anywhere}@media(max-width:720px){.quiz-layout{grid-template-columns:minmax(0,1fr)}}

/* Viewport layout: game screens occupy the available iframe, long collections
   use explicit pages. No global scaling or overflow clipping of game controls. */
html{height:100%;overscroll-behavior:none}
body{height:100dvh;min-width:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:clip}
[hidden]{display:none!important}
body>.topbar{grid-row:1;width:100%;padding:8px 20px;min-height:56px;gap:10px;flex-wrap:nowrap}
#connection{grid-row:2;position:relative;padding:6px 12px;font-size:12px}
#app{grid-row:3;width:100%;min-height:0;min-width:0;padding:8px 20px;display:flex;flex-direction:column;gap:10px}
body>footer{grid-row:4;width:100%;padding:3px 20px;min-height:25px;align-items:center;gap:10px}
footer .game-info{padding:0 4px;min-height:24px;font-size:12px;margin-right:auto}
body>.seo-content{display:none}
.brand-mark{width:38px;height:38px}.brand{font-size:21px}
.topbar nav{margin-left:auto;min-width:0;gap:4px}.topbar #profileButton{display:inline-flex;order:10}
.topbar .quiet,.topbar .icon-button,.topbar select{min-height:40px}.topbar #helpButton{display:inline-flex}
.lobby-tabs{display:flex;gap:8px;flex:none}.lobby-tabs .button{min-height:38px;padding:8px 18px}
.hero{flex:1;min-height:0;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);gap:24px;margin:0;padding:4px 0}
.hero>div:first-child{min-width:0}.hero h1{font-size:clamp(28px,3.4vw,51px);margin:0 0 12px;line-height:1.08;letter-spacing:-1px}
.hero .eyebrow{margin:0 0 10px;font-size:11px}.hero p{font-size:16px;line-height:1.45;margin:0 0 17px}
.hero-art{height:100%;min-height:0;max-height:490px;transform:none;order:initial}.hero-character{height:72%;max-height:310px;width:36%;bottom:40px;left:9%}.hero-character.second{height:65%;max-height:290px;width:33%;right:9%;bottom:45px}
.hero .button-row{gap:9px}.hero .button{min-height:44px;padding:11px 14px;font-size:15px}.hero .mini-rules{margin-top:20px;gap:24px}.mini-rules b{font-size:23px}.hero .button-row:last-child{margin-top:12px!important}.hero .quiet{font-size:13px;padding:6px;min-height:38px}
.hero .quiet .crest{width:28px;height:32px}.hero-caption{font-size:14px!important}.hero-caption span{font-size:10px}
.rooms-panel{flex:1;min-height:0;display:flex;flex-direction:column;gap:12px}.section-head{margin:0;flex:none}.section-head h2{font-size:24px;margin:0}
#roomList{min-height:0;display:flex;flex-direction:column;gap:10px}.room-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;min-height:0}.room-card{min-width:0}.room-thumb{height:clamp(65px,17vh,150px)}.room-content{padding:12px;gap:10px}.room-content h3{font-size:17px}.room-content p{font-size:13px}.room-content>div{min-width:0}.room-content p{overflow-wrap:anywhere}
.room-pager{display:flex;align-items:center;justify-content:center;gap:14px}.empty-state{padding:25px;line-height:1.5}.loading{min-height:0;flex:1;gap:12px}.loading h1{font-size:26px}.loading p{margin:5px}
.match-head{flex:none;padding:0;gap:12px;min-height:44px;flex-wrap:nowrap}.match-actions{width:auto;gap:6px}.match-actions .quiet{padding:8px;min-height:38px;font-size:13px}.duelists{width:auto;flex:1;justify-content:flex-start;gap:14px;min-width:0}.duelist{min-width:0;max-width:40%;gap:8px}.duelist .crest{width:32px;height:36px}.duelist .player-name{font-size:14px;max-width:200px}.duelist small{font-size:10px}.duel-score{font-size:24px}.round-label{font-size:12px;white-space:nowrap}
.paused-wrap{flex:1;min-height:0;display:flex;flex-direction:column;gap:10px}.quiz-layout{flex:1;min-height:0;display:grid;grid-template-columns:minmax(0,1fr) minmax(220px,.34fr);gap:14px}.question-panel{padding:16px 20px;min-height:0;display:flex;flex-direction:column;border-radius:20px}.timer-head{margin-bottom:8px;font-size:13px}.timer-head b{font-size:19px}.time-track{margin-bottom:10px;flex:none}.question-meta{font-size:12px;gap:8px;flex:none}.tag{padding:4px 9px;font-size:11px}.question-title{font-size:clamp(21px,2.2vw,30px);line-height:1.25;min-height:0;margin:12px 0;flex:1;display:flex;align-items:center}.answer-grid{flex:none;gap:9px}.answer{padding:10px 12px;min-height:48px;font-size:16px;border-radius:13px;gap:8px;overflow-wrap:anywhere}.answer span{width:25px;height:27px;font-size:13px;flex-shrink:0}.answer-note{font-size:13px;line-height:1.35;min-height:34px;margin:10px 0 0}.question-progress{margin-top:6px;flex-wrap:wrap;gap:3px;max-height:18px;overflow:clip}.question-progress span{width:5px;height:5px}.answer-stats{font-size:12px;margin-top:6px}.quiz-note{display:none}
.quiz-sidebar{min-height:0;display:flex;flex-direction:column;gap:10px}.reward-card{min-height:0;display:flex;flex-direction:column;flex:1}.reward-card .portrait{min-height:0;aspect-ratio:auto;flex:1}.reward-card .reward-caption{padding:12px}.reward-caption .eyebrow{font-size:9px;margin:0 0 6px}.reward-caption h3{font-size:18px;margin:0 0 5px}.reward-caption p{font-size:12px;line-height:1.3;margin:0 0 10px}.stats{gap:6px}.stat{font-size:11px}.stat div{font-size:20px}.stat svg{width:15px;height:15px}.army-strip{margin:0;padding:12px;flex:none}.army-strip h3{font-size:12px;margin:0 0 8px}.army-icons{min-height:30px;padding:0;gap:5px}.army-icons .placeholder,.recruit-stack .portrait{height:34px}.army-icons .placeholder{width:30px}.recruit-stack b{font-size:10px;line-height:15px;min-width:16px}.enemy-status{font-size:11px;margin-top:7px}
.battle-container{flex:1;min-height:0;display:flex;flex-direction:column;border-width:4px}.team-legend{flex:none;padding:7px 12px}.team-badge{font-size:12px}#battleMount{flex:1;min-height:0;display:flex;justify-content:center;background:#46685e}.battle-stage{width:100%;height:100%;min-height:0;aspect-ratio:auto!important}.battle-bottom{flex:none;padding:7px 12px;font-size:13px}.battle-bottom span{font-size:12px}.battle-summary{flex:none;margin:0;gap:10px}.battle-team{padding:8px 12px;gap:10px}.team-stats small{font-size:10px;margin-top:3px}.team-stats progress{margin-top:5px}.team-hp{font-size:12px}
.waiting-panel,.result-panel,.countdown-panel{margin:0 auto;min-height:0;width:100%;flex:1;padding:15px 22px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px}.waiting-panel h1,.result-panel h1,.countdown-panel h1{margin:0;font-size:28px;line-height:1.15}.waiting-panel p,.result-panel p{font-size:14px;line-height:1.45;margin:0;max-width:620px}.waiting-panel .eyebrow,.result-panel .eyebrow,.countdown-panel .eyebrow{margin:0;font-size:11px}.room-code{font-size:30px;margin:2px 0;letter-spacing:5px}.waiting-players{margin:4px 0;gap:35px}.waiting-player{gap:4px;min-width:100px}.waiting-player .crest{width:42px;height:48px}.waiting-player b{font-size:14px;max-width:180px}.waiting-player small{font-size:12px}.center-actions{gap:10px}.center-actions .button{min-height:44px;padding:10px 17px}.big-count{font-size:75px;line-height:1.2}.result-panel .result-emblem{width:48px;height:48px;flex:none;margin:0 0 4px;box-shadow:0 0 0 4px #f4e9d277}.result-emblem svg{width:28px;height:28px}.result-score{font-size:42px;line-height:1.1;margin:0}.rating-chip{padding:7px 16px;margin:0;font-size:15px}.round-history{margin:3px 0;gap:8px;flex-wrap:nowrap}.round-history div{padding:7px 10px;min-width:85px;font-size:12px}.round-history strong{margin-top:4px;font-size:13px}
dialog{max-height:calc(100dvh - 20px);max-width:calc(100vw - 20px);padding:14px 18px;margin:auto;overflow:clip;border-radius:20px}#modalBody{display:flex;flex-direction:column;gap:8px;min-height:0}.modal-heading{flex:none;padding-right:24px}.modal-heading h2{font-size:23px;line-height:1.15;margin:2px 0 6px}.modal-pages{min-height:0}.modal-page{display:flex;flex-direction:column;gap:10px}.modal-page>p{margin:0;font-size:14px;line-height:1.45}.modal-page .field{margin:0;font-size:14px}.modal-page input[type=text]{min-height:44px;padding:10px 12px}.modal-actions{flex:none}.modal-actions .button-row{margin:0;gap:8px}.modal-actions .button{min-height:44px;padding:10px 15px}.modal-pager{display:flex;justify-content:space-between;align-items:center;gap:15px;padding-top:3px;flex:none}.modal-pager .button{min-height:38px;padding:7px 12px}.modal-pager span{font-size:13px}.help-step{margin:0;gap:10px}.help-step h3{font-size:17px;margin:0 0 6px}.help-step p{font-size:14px;line-height:1.45;margin:0}.help-fine{padding-top:9px}.arena-option img{max-height:150px}.arena-option span{padding:8px;font-size:13px}.check-field{margin:0;min-height:36px}.avatar-options{margin:0;gap:7px}.avatar-option{padding:3px}.avatar-option .crest{width:37px;height:43px}.profile-stats{margin:0}.profile-stats div{padding:10px 7px}.profile-stats b{font-size:21px;margin-bottom:4px}#modalError{font-size:13px;line-height:1.3;margin:8px 0 0}#modalError:empty{display:none}.modal-page td{padding:8px 5px}.modal-page th{padding:6px 5px}.info-section summary{font-weight:700}.info-section p{font-size:14px;line-height:1.45}.modal-page h1,.modal-page h2{font-size:23px;margin:0}.modal-page h3{font-size:17px;margin:0}
@media(max-width:720px){
 body>.topbar{padding:6px 10px;min-height:50px;gap:6px}.brand{font-size:18px;gap:6px}.brand-mark{width:32px;height:32px}.brand-mark svg{width:23px;height:23px}.topbar nav .quiet span{display:none}.topbar .quiet,.topbar .icon-button{padding:6px;width:34px;min-height:38px}.topbar select{min-height:38px;padding:7px 4px;font-size:12px;max-width:82px}.topbar nav{gap:0}.topbar #helpButton{display:inline-flex}
 #app{padding:5px 10px;gap:7px}body>footer{padding:2px 10px;font-size:10px;min-height:24px}.hero{gap:12px}.hero h1{font-size:30px}.hero p{font-size:14px}.hero .button-row{gap:7px}.hero .button{font-size:14px;flex:none;padding:10px 12px}.hero .mini-rules{margin-top:12px;gap:18px;font-size:11px}.mini-rules b{font-size:21px}.hero-art{border-radius:20px;border-width:4px}.hero-caption{left:10px!important;right:10px!important;bottom:10px!important;flex-wrap:wrap;gap:4px;font-size:12px!important}.hero-caption span{font-size:9px;padding:5px}.hero-character{height:65%;width:41%;left:4%;bottom:48px}.hero-character.second{height:60%;width:40%;right:4%;bottom:48px}
 .match-head{gap:6px;min-height:60px;flex-wrap:wrap}.duelists{width:100%;flex:auto;justify-content:space-between;gap:8px}.duelist{max-width:42%;gap:5px}.duelist .player-name{font-size:12px;max-width:130px}.duelist .crest{width:25px;height:28px}.duelist small{font-size:9px}.duel-score{font-size:20px}.match-actions{width:100%;justify-content:flex-end;min-height:28px}.round-label{margin-right:auto}.match-actions .quiet{font-size:12px;min-height:28px;padding:3px 7px}
 .quiz-layout{grid-template-columns:minmax(0,1fr) minmax(180px,.48fr);gap:9px}.question-panel{padding:12px}.question-title{font-size:22px;margin:10px 0}.answer{font-size:14px;padding:8px;min-height:46px}.answer-grid{gap:7px}.answer-note{font-size:12px;margin-top:7px;min-height:32px}.question-meta{font-size:11px;gap:7px}.reward-caption h3{font-size:16px}.reward-card .reward-caption{padding:9px}.army-strip{padding:9px}.stat{font-size:10px}.stat div{font-size:18px}.army-icons .placeholder,.recruit-stack .portrait{height:29px}.enemy-status{font-size:10px}
 .team-legend{padding:6px 8px}.team-badge{font-size:10px}.battle-summary{gap:6px}.battle-team{padding:7px 9px}.battle-team .crest{display:none}.team-stats b{font-size:12px}.battle-summary .team-hp{display:inline}.battle-bottom{padding:6px 9px}.waiting-panel,.result-panel,.countdown-panel{padding:12px;gap:9px}.waiting-panel h1,.result-panel h1{font-size:25px}.result-panel p,.waiting-panel p{font-size:13px}.waiting-player b{max-width:135px}.round-history div{font-size:11px;min-width:75px}.section-head h2{font-size:20px}
}
@media(max-width:580px){
 .brand #brandName{font-size:16px;max-width:110px;white-space:normal;line-height:1.05}.brand-mark{display:none}.topbar nav .quiet,.topbar .icon-button{width:32px}.topbar nav{gap:0}
 .hero{grid-template-columns:1fr;grid-template-rows:auto minmax(100px,1fr);gap:12px;align-items:stretch}.hero h1{font-size:30px;white-space:normal;margin-bottom:10px}.hero .eyebrow{font-size:9px;margin-bottom:8px}.hero p{font-size:14px;line-height:1.35;margin-bottom:13px}.hero-art{max-height:220px;order:2}.hero .mini-rules{display:flex;gap:20px;margin-top:12px}.hero .button-row:last-child{margin-top:5px!important}.hero .quiet{min-height:32px;font-size:12px}.hero-character{height:90%;max-height:180px;width:32%;left:14%;bottom:16px}.hero-character.second{height:85%;max-height:170px;width:30%;right:14%;bottom:18px}.hero-caption{z-index:3;background:#173b4d99;border-radius:12px;padding:5px!important;bottom:7px!important;font-size:11px!important}.hero-caption span{padding:3px;font-size:9px}
 .room-grid{grid-template-columns:1fr}.room-card{display:flex;flex-direction:column}.room-thumb{height:clamp(90px,24vh,170px)}.room-content{display:flex;padding:12px}.room-content .button{padding:9px}.rooms-panel{gap:12px}.section-head{gap:6px}.section-head h2{font-size:18px}.section-head .button{font-size:12px;padding:8px 10px;min-height:40px}
 .quiz-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto;gap:8px}.quiz-sidebar{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr);gap:7px;min-height:0}.reward-card{display:grid;grid-template-columns:43px minmax(0,1fr)}.reward-card .portrait{height:100%;min-height:0}.reward-card .reward-caption{padding:8px}.reward-caption .eyebrow{font-size:7px;letter-spacing:.2px;margin-bottom:4px}.reward-caption h3{font-size:13px;margin-bottom:6px}.reward-caption p{display:none}.stats{gap:3px}.stat{font-size:8px}.stat div{font-size:14px;gap:2px}.stat svg{width:11px;height:11px}.army-strip{padding:8px}.army-strip h3{font-size:10px;margin-bottom:6px}.army-icons{gap:3px;min-height:22px}.army-icons .placeholder,.recruit-stack .portrait{height:25px;width:100%}.enemy-status{font-size:9px;line-height:1.3;margin-top:6px}.recruit-stack b{font-size:8px;line-height:12px;min-width:12px;right:-2px}.question-title{font-size:21px;line-height:1.2;margin:8px 0}.question-panel{padding:11px 12px}.answer{font-size:14px;min-height:48px}.answer-note{font-size:12px;line-height:1.3;min-height:32px}.answer-stats{font-size:10px;margin-top:4px}.question-progress{margin-top:5px}.timer-head{font-size:12px;margin-bottom:6px}.timer-head b{font-size:18px}.time-track{margin-bottom:8px}.question-meta{font-size:10px;gap:6px}.question-meta .tag{font-size:10px;padding:3px 6px}.team-hp{font-size:10px}.battle-team{gap:5px}.waiting-players{gap:14px}.waiting-player b{max-width:115px}.waiting-panel .center-actions{gap:7px}.waiting-panel .center-actions .button{font-size:13px;padding:10px 12px}.result-panel .result-emblem{width:44px;height:44px}.result-panel h1{font-size:24px}.result-score{font-size:38px}.rating-chip{font-size:13px}.round-history{gap:5px}.round-history div{min-width:72px;padding:7px}.result-panel .center-actions .button{font-size:14px;padding:10px 14px}
}
@media(max-height:550px){
 body>.topbar{padding-top:4px;padding-bottom:4px;min-height:46px}.brand-mark{width:32px;height:32px}.brand{font-size:18px}.topbar nav .quiet,.topbar .icon-button,.topbar select{min-height:36px}.topbar nav .quiet span{display:none}#app{padding-top:4px;padding-bottom:4px;gap:6px}body>footer{padding-top:0;padding-bottom:0;min-height:22px}.lobby-tabs .button{min-height:34px;padding:6px 14px;font-size:13px}.hero{gap:20px}.hero h1{font-size:30px;margin-bottom:10px}.hero p{font-size:14px;line-height:1.35;margin-bottom:12px}.hero .eyebrow{font-size:9px;margin-bottom:7px}.hero .button{min-height:40px;padding:9px 12px;font-size:14px}.hero .mini-rules{margin-top:12px;gap:19px;font-size:11px}.mini-rules b{font-size:19px}.hero .quiet{min-height:32px;padding:4px}.hero .button-row:last-child{margin-top:7px!important}.hero-character{bottom:35px;height:75%}.hero-character.second{bottom:38px;height:70%}.room-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.room-thumb{height:75px}.room-content{padding:9px}.room-content h3{font-size:15px;margin:0 0 6px}.room-content p{margin:0;font-size:12px}.room-content .button{padding:7px 10px;font-size:12px;min-height:38px}
 .match-head{min-height:38px;padding:0;flex-wrap:nowrap}.duelists{width:auto;flex:1;gap:8px;justify-content:flex-start}.match-actions{width:auto;gap:5px;min-height:32px}.duelist .player-name{max-width:135px;font-size:12px}.duelist .crest{width:24px;height:27px}.duelist small{font-size:9px}.duel-score{font-size:20px}.match-actions .quiet{min-height:30px;padding:4px;font-size:12px}.round-label{font-size:11px}.paused-wrap{gap:6px}
 .question-panel{padding:9px 12px}.timer-head{margin:0 0 4px;font-size:11px}.timer-head b{font-size:16px}.time-track{margin-bottom:5px;height:5px}.question-meta{font-size:10px;gap:6px}.tag{font-size:10px;padding:2px 6px}.question-title{font-size:19px;line-height:1.2;margin:7px 0}.answer-grid{gap:6px}.answer{min-height:43px;padding:6px 8px;font-size:14px}.answer span{height:24px;width:23px;font-size:11px}.answer-note{font-size:11px;min-height:27px;margin:5px 0 0}.question-progress{margin-top:4px;max-height:12px}.answer-stats{font-size:10px;margin-top:3px}.quiz-layout{gap:10px;grid-template-columns:minmax(0,1fr) minmax(200px,.38fr);grid-template-rows:1fr}.quiz-sidebar{display:flex;flex-direction:column;gap:7px}.reward-card{display:grid;grid-template-columns:65px minmax(0,1fr);flex:1;align-items:stretch}.reward-card .portrait{height:100%;min-height:0}.reward-card .reward-caption{padding:9px}.reward-caption .eyebrow{font-size:8px;letter-spacing:.6px;margin-bottom:5px}.reward-caption h3{font-size:15px;margin-bottom:6px}.reward-caption p{font-size:11px;margin-bottom:8px}.stat{font-size:10px}.stat div{font-size:16px}.stat svg{width:13px;height:13px}.army-strip{padding:8px}.army-strip h3{font-size:11px;margin-bottom:5px}.army-icons{min-height:25px;gap:4px}.army-icons .placeholder,.recruit-stack .portrait{height:28px}.enemy-status{font-size:10px;margin-top:4px}.team-legend{padding:4px 10px}.team-badge{font-size:10px}.battle-bottom{padding:4px 10px}.battle-summary{gap:7px}.battle-team{padding:5px 10px}.team-stats b{font-size:11px}.team-stats small{font-size:9px}.team-stats progress{height:6px;margin-top:3px}
 .waiting-panel,.result-panel,.countdown-panel{padding:8px 14px;gap:5px}.waiting-panel h1,.result-panel h1,.countdown-panel h1{font-size:23px}.waiting-panel p,.result-panel p{font-size:12px;line-height:1.3}.waiting-players{margin:2px;gap:28px}.waiting-player{gap:2px}.waiting-player .crest{width:29px;height:34px}.waiting-player b{font-size:12px}.waiting-player small{font-size:10px}.room-code{font-size:25px;line-height:1.2;margin:0}.waiting-panel>.button{min-height:32px;padding:5px 12px;font-size:12px}.waiting-panel .center-actions .button{min-height:38px;padding:7px 13px;font-size:13px}.result-panel .result-emblem{display:none}.result-score{font-size:34px;line-height:1}.rating-chip{padding:5px 13px;font-size:13px}.round-history{margin:0}.round-history div{padding:5px 12px;font-size:11px}.round-history strong{margin-top:3px;font-size:12px}.result-panel .center-actions .button{min-height:38px;padding:8px 14px;font-size:13px}.big-count{font-size:70px}.countdown-panel p{margin:0;font-size:13px}.pause-layer{padding:12px}.pause-layer h2{font-size:23px;margin:4px}.pause-layer p{font-size:13px;line-height:1.3;margin:8px}.pause-layer .button{min-height:40px;margin:4px;padding:8px 14px}
 dialog{padding:11px 16px}.modal-heading h2{font-size:21px}.modal-page{gap:7px}.modal-page>p{font-size:13px;line-height:1.35}.help-step h3{font-size:16px}.help-step p{font-size:13px;line-height:1.35}.arena-option img{max-height:85px}.arena-option span{font-size:12px;padding:6px}.modal-actions .button{min-height:38px;padding:8px 13px;font-size:13px}.modal-pager .button{min-height:34px;padding:6px 12px;font-size:13px}.profile-stats div{padding:8px;font-size:11px}.profile-stats b{font-size:18px}
}
#battleMount{align-items:center}.battle-stage{flex:none;max-width:100%;max-height:100%}
@media(max-width:580px){
 .brand #brandName{max-width:80px;font-size:14px}.topbar nav .quiet,.topbar .icon-button{width:30px;padding:5px}.topbar select{max-width:78px}.hero .button-row>.button{flex:1;min-width:0;padding:10px 7px;font-size:13px}.hero .button-row:last-child{display:none}.hero .mini-rules{font-size:11px}
}
@media(max-width:580px) and (max-height:550px){
 .hero{grid-template-rows:1fr;position:relative;isolation:isolate;padding:10px}.hero:before{content:'';position:absolute;inset:0;border-radius:20px;background:linear-gradient(#fffdf7e8,#fffdf7e8),url('./art/meadow-arena-v1.webp') center/cover;z-index:-1}.hero-art{display:none}.hero h1{font-size:27px}.hero p{font-size:14px}.hero .mini-rules{margin-top:15px}.hero>div:first-child{display:flex;flex-direction:column;justify-content:center}.hero .eyebrow{font-size:9px}.hero .button-row .button svg{width:18px;height:18px}.room-grid{grid-template-columns:1fr}.quiz-layout{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}.quiz-sidebar{display:grid;grid-template-columns:1.15fr 1fr;gap:6px}.reward-card{grid-template-columns:32px minmax(0,1fr)}.reward-card .reward-caption{padding:5px}.reward-caption p{display:none}.reward-caption h3{font-size:12px;margin-bottom:3px}.reward-caption .eyebrow{font-size:6px;margin-bottom:3px;letter-spacing:0}.stat{font-size:7px}.stat div{font-size:12px}.stat svg{width:9px;height:9px}.army-strip{padding:5px}.army-strip h3{font-size:9px;margin-bottom:3px}.army-icons{min-height:18px;gap:3px}.army-icons .placeholder,.recruit-stack .portrait{height:18px}.enemy-status{font-size:8px;margin-top:3px}.question-panel{padding:8px 10px}.question-title{font-size:17px;line-height:1.2;margin:5px 0}.answer{font-size:12px;min-height:38px;padding:6px;gap:4px}.answer span{width:19px;height:22px;font-size:10px}.answer-note{font-size:10px;min-height:24px;margin-top:4px}.answer-stats{font-size:9px}.question-meta{font-size:9px}.question-meta .tag{font-size:9px}.timer-head b{font-size:15px}.match-head{flex-wrap:wrap;min-height:58px}.match-actions{width:100%;min-height:25px}.duelists{width:100%;justify-content:space-between}.match-actions .quiet{min-height:25px;padding:2px 5px}.waiting-panel{gap:4px}.waiting-panel p{font-size:12px}.waiting-player .crest{width:26px;height:31px}.waiting-player b{font-size:11px;max-width:108px}.waiting-players{gap:12px}.waiting-panel h1{font-size:21px}.waiting-panel .center-actions{gap:6px}.waiting-panel .center-actions .button{font-size:12px;padding:8px}
}
.stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr))}.stat div{white-space:nowrap;flex-wrap:nowrap}.quiz-sidebar>.reward-card{grid-row:auto}
@media(max-width:580px){.quiz-sidebar{align-items:stretch}.quiz-sidebar>.army-strip{grid-row:auto;min-width:0}.reward-card .reward-caption{min-width:0}.stat div{font-size:13px}.stat svg{width:10px;height:10px}}
.reward-info{padding:0;border:0;background:none;color:inherit;font:inherit;font-weight:inherit;text-align:left;display:inline-flex;align-items:center;gap:5px;max-width:100%}.reward-info svg{width:13px;height:13px;flex-shrink:0}.reward-info:focus-visible{outline-offset:2px}
.quiz-layout{align-items:stretch}
#battleMount{background-position:center;background-size:cover}
.question-title{flex:none;min-height:min-content}.question-panel{justify-content:space-between}.quiz-details{display:none;border:1px solid var(--line);background:#fffaf0;color:var(--ink);border-radius:9px;font-size:11px;padding:5px 7px;min-height:28px}.quiz-paging{display:none}.quiz-paged{grid-template-columns:1fr!important;grid-template-rows:minmax(0,1fr)!important}.quiz-paged .quiz-sidebar{display:none}.quiz-paged .quiz-details{display:block}.quiz-paged .quiz-paging{display:flex;justify-content:center;gap:10px;padding-top:7px}.quiz-paged .quiz-paging .button{min-height:40px;padding:8px 16px}.quiz-paged[data-view=question] .answer-grid,.quiz-paged[data-view=question] .answer-note{display:none}.quiz-paged[data-view=answers] .question-title{display:none}.quiz-paged .question-panel{justify-content:flex-start}.quiz-paged .question-title{flex:1;display:flex;align-items:center}.quiz-paged .answer-grid{flex:1;align-content:center}.quiz-paged .question-progress{margin-top:auto}.quiz-paged .answer{font-size:15px;min-height:46px}.quiz-paged .answer-note{font-size:12px;line-height:1.3;min-height:0}.quiz-paged .answer-stats{font-size:11px}.quiz-paged .question-title{font-size:19px;line-height:1.3}
@media(max-width:580px) and (max-height:550px){.quiz-details{display:block}.quiz-sidebar{display:none}.quiz-layout{grid-template-rows:1fr}.question-title{font-size:19px}.answer{font-size:14px;min-height:44px}.answer-note{font-size:11px;min-height:27px}.quiz-paged .answer{font-size:14px}.quiz-paged .question-title{font-size:19px}}
.quiz-paged[data-view=question] .answer-note{display:block}.quiz-paged[data-view^=answers] .question-title,.quiz-paged[data-view^=answers] .question-meta{display:none}.quiz-paged[data-view^=answers] .answer-grid{grid-template-columns:1fr}.quiz-paged[data-view=answers0] .answer:nth-child(n+3),.quiz-paged[data-view=answers1] .answer:nth-child(-n+2){display:none}.quiz-paged .quiz-paging .button{padding:8px 12px}.quiz-paged .question-progress{display:none}
.question-panel>.timer-head,.question-panel>.time-track,.question-panel>.question-meta,.question-panel>.answer-note,.question-panel>.answer-stats,.question-panel>.quiz-paging{flex-shrink:0}
.quiz-paged .answer-note{display:none!important}.quiz-paged[data-view=question] .answer-stats{display:none}.quiz-paged[data-view=question] .question-title{font-size:18px;line-height:1.2}.quiz-paged .quiz-paging{gap:7px;flex-shrink:0}.quiz-paged .quiz-paging .button{padding:8px 10px;font-size:13px}.quiz-paged .answer-stats{margin-top:8px}.quiz-paged .answer-grid{flex-shrink:0}

/* Shared native account/header is part of the same viewport contract. */
.hero>div:first-child>.button-row:last-child{display:none}
.topbar [data-igrodvor-account-slot]{order:11;min-width:0;flex:none;display:flex;align-items:center}.topbar [data-igrodvor-account-slot]:empty{display:none}
body[data-igrodvor-game=quizlegions] .topbar .igrodvor-home-link{min-width:0;flex-shrink:1}
body[data-igrodvor-game=quizlegions] .topbar .ig-account-link-header{position:static;inset:auto;z-index:auto}
@media(max-width:580px){
 body[data-igrodvor-game=quizlegions] .topbar .igrodvor-home-link{font-size:14px;gap:0;min-height:38px;margin-right:auto;letter-spacing:-.4px}
 body[data-igrodvor-game=quizlegions] .topbar .igrodvor-home-icon{display:none}
 body[data-igrodvor-game=quizlegions] .topbar nav{gap:0;flex-shrink:0}
 body[data-igrodvor-game=quizlegions] .topbar nav .quiet,body[data-igrodvor-game=quizlegions] .topbar .icon-button{width:28px;padding:4px}
 body[data-igrodvor-game=quizlegions] .topbar select{width:74px;max-width:74px;padding:7px 3px}
 body[data-igrodvor-game=quizlegions] .topbar .ig-account-link-header{width:30px;max-width:30px;height:36px;padding:2px;justify-content:center}
 body[data-igrodvor-game=quizlegions] .topbar .ig-account-link-header>span{display:none}
}
/* Short landscape phones: spend horizontal room on a single match toolbar,
   reserving the remaining height for the question and explicit page controls. */
@media(max-height:360px) and (min-width:500px){
 body>.topbar{min-height:42px;padding-top:3px;padding-bottom:3px}
 #app{gap:5px;padding-top:3px;padding-bottom:3px}
 .match-head{min-height:32px;flex-wrap:nowrap;gap:8px}
 .duelists{width:auto;flex:1;justify-content:flex-start;gap:8px;min-width:0}
 .duelist{max-width:42%;gap:5px}.duelist .player-name{max-width:100px;font-size:12px}
 .match-actions{width:auto;min-height:30px;gap:5px;flex:none}
 .match-actions .quiet{min-height:30px;padding:4px 6px}
 .round-label{margin-right:3px;font-size:11px}
 .question-panel{padding:7px 10px}
 .quiz-paged .quiz-paging{padding-top:4px;gap:7px}
 .quiz-paged .quiz-paging .button{min-height:36px;padding:7px 12px}
 .quiz-paged .answer-stats{margin-top:5px}
 .quiz-paged .answer{min-height:42px;padding:6px 8px}
 .quiz-paged .question-title{margin:5px 0;font-size:18px;line-height:1.2}
}
@media(max-height:360px) and (min-width:500px){
 .quiz-paged .question-panel{display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-rows:auto 5px auto minmax(0,1fr) auto;gap:5px 10px}
 .quiz-paged .timer-head{grid-column:1;grid-row:1;margin:0;min-width:0;gap:8px}
 .quiz-paged .timer-head>span{display:none}
 .quiz-paged .quiz-details{min-height:26px;padding:4px 7px;white-space:nowrap}
 .quiz-paged .quiz-paging{grid-column:2;grid-row:1;padding:0;align-self:center;justify-content:flex-end;gap:6px}
 .quiz-paged .quiz-paging .button{min-height:34px;padding:6px 10px}
 .quiz-paged .time-track{grid-column:1/-1;grid-row:2;height:5px;margin:0}
 .quiz-paged .question-meta{grid-column:1/-1;grid-row:3;margin:0}
 .quiz-paged .question-title,.quiz-paged .answer-grid{grid-column:1/-1;grid-row:4;margin:0}
 .quiz-paged .question-title{align-self:stretch;align-items:center}
 .quiz-paged .answer-grid{align-self:stretch;align-content:center}
 .quiz-paged .answer-stats{grid-column:1/-1;grid-row:5;margin:0}
}
@media(max-height:360px) and (min-width:500px){
 .quiz-paged .question-panel{padding-top:6px;padding-bottom:6px;row-gap:4px}
 .quiz-paged .quiz-paging .button{min-height:32px;padding-top:5px;padding-bottom:5px}
 /* A connection status shares the reserved footer, replacing its passive
    counters. It never overlays the game or the About action. */
 body:has(>#connection:not([hidden]))>#connection{grid-row:4;grid-column:1;align-self:center;justify-self:end;position:relative;z-index:1;width:calc(100% - 90px);margin-right:5px;padding:3px 7px;border:0;border-radius:8px;font-size:11px;line-height:1.25}
 body:has(>#connection:not([hidden]))>footer{grid-row:4;grid-column:1}
 body:has(>#connection:not([hidden]))>footer>span{visibility:hidden}
}
/* The shared rating controls also fit short landscape game frames. All ten
   original star buttons keep their values and touch areas in one available row. */
@media(max-height:360px) and (min-width:500px){
 .ig-rating-dialog[open]{padding-top:8px;padding-bottom:8px}
 .ig-rating-dialog .ig-rating-stars{grid-template-columns:repeat(10,minmax(0,1fr));max-width:550px}
 .ig-rating-dialog .ig-rating-actions{margin-top:8px}
}
@media(max-height:360px) and (min-width:500px){
 .result-panel:has(.round-history)>.eyebrow{display:none}
 .result-panel:has(.round-history){display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);grid-template-rows:auto auto auto;column-gap:14px;row-gap:6px;align-content:center;align-items:center;justify-items:center}
 .result-panel:has(.round-history)>h1{grid-column:1;grid-row:1;max-width:100%;overflow-wrap:anywhere}
 .result-panel:has(.round-history)>.result-score{grid-column:1;grid-row:2}
 .result-panel:has(.round-history)>.rating-chip{grid-column:1;grid-row:3;max-width:100%;min-width:0;gap:6px;padding:5px 10px}
 .result-panel:has(.round-history)>.round-history{grid-column:2;grid-row:1;width:100%;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
 .result-panel:has(.round-history)>.round-history>div{min-width:0;padding:6px 4px;overflow-wrap:anywhere}
 .result-panel:has(.round-history)>p{grid-column:2;grid-row:2;min-width:0;margin:0}
 .result-panel:has(.round-history)>.center-actions{grid-column:2;grid-row:3;gap:7px;flex-wrap:nowrap}
 .result-panel:has(.round-history)>.center-actions>.button{min-width:0;padding:8px 10px}
}
@media(max-height:300px) and (min-width:500px){
 .hero{padding:6px;gap:8px}
 .hero h1{margin-bottom:6px}
 .hero p{margin-bottom:8px}
 .hero .eyebrow{margin-bottom:4px}
 .hero .mini-rules{margin-top:8px}
}
@media(max-height:360px) and (min-width:500px){
 .hero .mini-rules{margin-top:0;align-items:baseline}
 .hero .mini-rules>div{display:flex;align-items:baseline;gap:7px;white-space:nowrap}
 .hero .mini-rules b{display:inline}
}
/* Waiting-room information uses the available landscape width rather than
   stacking the invite and both readiness controls beyond the game frame. */
@media(max-height:360px) and (min-width:500px){
 .waiting-panel{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1.1fr);grid-template-rows:auto auto minmax(0,1fr) auto;gap:5px 10px;align-content:center;align-items:center;justify-items:center}
 .waiting-panel>.eyebrow{grid-column:1/3;grid-row:1;max-width:100%}
 .waiting-panel>h1{grid-column:1/3;grid-row:2;max-width:100%;overflow-wrap:anywhere}
 .waiting-panel>p{grid-column:1/3;grid-row:3;min-width:0;margin:0}
 .waiting-panel>.room-code{grid-column:1;grid-row:4;max-width:100%;margin:0}
 .waiting-panel>button[data-action=copy]{grid-column:2;grid-row:4;min-width:0;padding:5px 10px}
 .waiting-panel>.waiting-players{grid-column:3;grid-row:1/4;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;width:100%;margin:0;min-width:0;align-items:start}
 .waiting-panel .waiting-player{min-width:0;width:100%;gap:3px}
 .waiting-panel .waiting-player b,.waiting-panel .waiting-player small{min-width:0;max-width:100%;overflow-wrap:anywhere;text-align:center}
 .waiting-panel>.center-actions{grid-column:3;grid-row:4;width:100%;min-width:0;gap:6px;flex-wrap:nowrap}
 .waiting-panel>.center-actions>.button{min-width:0;flex:1;padding:7px 6px}
}
@media(min-height:361px) and (max-height:550px){
 .waiting-panel{gap:4px}
}
