500;600;700&family=Noto+Serif+JP:wght@500;600;700;800&display=swap');
:root{--ink:#24362f;--green:#224d3c;--leaf:#47775c;--gold:#b18a40;--paper:#f7f6f0;--muted:#7c847b;--line:#e3e6dc;--orange:#c9864a;font-family:'Noto Sans JP',sans-serif;color:var(--ink);background:var(--paper);font-synthesis:none}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer;color:inherit}button:disabled{cursor:not-allowed;opacity:.46}button:focus-visible,a:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #d7a849;outline-offset:4px}button,a{-webkit-tap-highlight-color:transparent}button{transition:background .15s,transform .15s}button:hover:not(:disabled){filter:brightness(.97)}button:active:not(:disabled){transform:translateY(1px)}a{color:var(--green)}.serif,h1,h2,h3{font-family:'Noto Serif JP',serif}.shell{max-width:1680px;min-height:100vh;margin:auto;padding-left:82px}.rail{position:fixed;top:0;left:0;bottom:0;width:82px;background:var(--green);z-index:5;display:flex;align-items:center;flex-direction:column;color:#eaf0e7;padding:28px 10px;gap:26px}.brand-piece{clip-path:polygon(50% 0,94% 20%,100% 100%,0 100%,6% 20%);width:39px;height:46px;background:#e7d4a5;color:var(--green);font-family:serif;font-size:28px;text-align:center;line-height:52px}.rail hr{border:0;border-top:1px solid #ffffff20;width:30px;margin:0}.rail button{border:0;background:none;color:#d6e0d4;width:58px;padding:10px 0;border-radius:10px;display:grid;gap:6px;font-size:10px}.rail button.active{background:#ffffff15;color:#f1da9f}.ico{width:22px;height:22px;vertical-align:middle;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}.rail .ico{margin:auto}.rail .bottom{margin-top:auto}.topbar{display:flex;align-items:center;justify-content:space-between;padding:24px 38px 20px;border-bottom:1px solid var(--line);background:#fcfcf8;gap:16px}.wordmark{font-family:'Noto Serif JP',serif;font-size:27px;font-weight:800;letter-spacing:.13em}.wordmark small{font-family:'Noto Sans JP',sans-serif;display:block;font-size:8px;letter-spacing:.28em;color:var(--muted);margin-top:3px}.topmeta{display:flex;gap:22px;align-items:center;font-size:11px;color:var(--muted)}.save-dot{display:inline-block;width:6px;height:6px;background:#6f9b70;border-radius:50%;margin-right:7px}.ghost{background:transparent;border:1px solid var(--line);border-radius:7px;padding:9px 13px;font-size:11px}.workspace{padding:28px 38px 20px;max-width:1460px;margin:auto}.pagehead{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-bottom:25px}.eyebrow{font-size:9px;letter-spacing:.2em;color:var(--gold);font-weight:700;margin-bottom:7px}h1{font-size:25px;letter-spacing:.08em;margin:0;font-weight:700}.subtitle{font-size:11px;color:var(--muted);margin:8px 0 0}.season{display:flex;gap:14px;align-items:center;font-size:11px}.season-num{font-family:Georgia,serif;font-size:35px;color:var(--green)}.season-num small{font-family:sans-serif;font-size:11px;color:var(--muted)}.stage-label{border-left:1px solid #d2d7ca;padding-left:14px;line-height:1.8}.content-grid{display:grid;grid-template-columns:264px minmax(0,1fr);gap:24px}.panel{background:#fff;border:1px solid var(--line);border-radius:12px}.pupil-card{overflow:hidden}.pupil-name{padding:23px 22px 14px;display:flex;justify-content:space-between;align-items:center}.pupil-name h2{font-size:24px;margin:0 0 5px;letter-spacing:.1em}.pupil-name p{font-size:10px;color:var(--muted);margin:0}.name-icon{width:38px;height:38px;border-radius:50%;background:#f3f0e6;display:grid;place-items:center;color:var(--gold)}.portrait{height:170px;background:#edf2e7;overflow:hidden;position:relative}.portrait:before{content:'';position:absolute;border:1px solid #d7dfcc;border-radius:50%;width:150px;height:150px;left:57px;top:28px}.portrait svg{width:100%;height:205px;position:relative}.portrait .tag{position:absolute;left:16px;bottom:12px;background:#ffffffd9;border-radius:20px;padding:5px 9px;color:#5b7255;font-size:9px;z-index:1}.pupil-inner{padding:18px 22px}.meter-label{display:flex;justify-content:space-between;font-size:10px;margin-bottom:7px}.meter-label b{font-weight:500}.meter-label small{color:var(--muted)}.meter{height:6px;border-radius:5px;background:#ecefe7;overflow:hidden;margin-bottom:16px}.meter span{display:block;height:100%;background:#6b9370;border-radius:5px;transition:width .3s}.meter.orange span{background:#d1a663}.mood{display:flex;justify-content:space-between;font-size:10px;border-bottom:1px solid var(--line);padding-bottom:15px}.mood b{font-weight:500;color:var(--leaf)}.stats{display:grid;gap:13px;margin:18px 0}.stat{display:grid;grid-template-columns:50px 22px 1fr 23px;gap:7px;font-size:10px;align-items:center}.grade{font-family:Georgia,serif;font-size:18px;color:var(--gold);font-weight:700}.stat-track{height:4px;border-radius:5px;background:#eef0e8;overflow:hidden}.stat-track span{display:block;background:#648269;height:100%;width:20%}.stat-value{text-align:right;color:var(--muted);font-size:9px}.skill{font-size:9px;background:#f5f1e6;border:1px solid #ede4cf;padding:6px 8px;border-radius:5px;color:#957336;display:inline-block;margin:3px 4px 0 0}.opening{font-size:10px;color:var(--muted);display:flex;justify-content:space-between;margin-top:18px;padding-top:14px;border-top:1px solid var(--line)}.opening b{color:var(--ink);font-weight:500}.next-goal{padding:19px 21px;margin-top:14px;background:#edf1e7;border:1px solid #e1e7d7;border-radius:10px}.next-goal .small-label{font-size:9px;color:var(--leaf);letter-spacing:.1em}.next-goal h3{font-size:14px;margin:10px 0 8px}.next-goal p{font-size:10px;color:#77816e;margin:0;line-height:1.8}.main-column{min-width:0}.scene{height:320px;position:relative;overflow:hidden;background:#e7e9db;border-radius:12px}.dojo{height:100%;width:100%;position:absolute;inset:0}.scene-text{position:absolute;top:28px;left:30px;z-index:1}.scene-text .eyebrow{color:#65836b}.scene-text h2{font-size:26px;line-height:1.8;margin:10px 0;color:#274b39;letter-spacing:.12em;font-weight:600}.scene-text .scene-caption{font-size:10px;color:#6f8171;letter-spacing:.08em}.scene-badge{position:absolute;right:20px;top:19px;background:#ffffffb3;border:1px solid #ffffff99;padding:8px 12px;border-radius:30px;font-size:9px;display:flex;gap:7px;align-items:center}.bubble{position:absolute;bottom:19px;left:24px;right:24px;display:flex;gap:14px;align-items:center;background:#fffffff0;border:1px solid #e3e8da;padding:14px 17px;border-radius:9px;z-index:2;box-shadow:0 3px 12px #2b493a06}.bubble .speaker{font-size:10px;font-weight:700;color:var(--green);white-space:nowrap;border-right:1px solid var(--line);padding-right:14px}.bubble p{font-size:11px;line-height:1.8;margin:0}.section-title{display:flex;align-items:center;justify-content:space-between;margin:25px 0 13px;gap:8px}.section-title h2{font-size:16px;letter-spacing:.07em;margin:0}.section-title span{font-size:10px;color:var(--muted)}.train-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}.training{position:relative;text-align:left;background:#fff;border:1px solid var(--line);border-radius:9px;padding:16px 16px 13px;min-height:116px;overflow:hidden}.training .action-top{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.action-icon{color:var(--leaf);background:#f0f4ec;width:32px;height:32px;display:grid;place-items:center;border-radius:8px}.action-no{font-family:Georgia,serif;font-size:11px;color:#c5cbbd}.training h3{font-family:'Noto Sans JP',sans-serif;font-size:12px;font-weight:600;margin:0 0 6px}.training p{font-size:9px;color:var(--muted);margin:0;line-height:1.8}.action-effect{display:flex;justify-content:space-between;margin-top:11px;gap:6px;font-size:9px;color:var(--leaf)}.cost{color:#9a8b70}.training.rest{background:#f2f5ee}.training:hover:not(:disabled){border-color:#9cab91;box-shadow:0 3px 10px #243b2c08}.training.selected{border-color:var(--leaf)}.journal{padding:4px 20px}.journal-item{display:flex;gap:15px;align-items:flex-start;padding:13px 0;border-bottom:1px solid #edf0e7;font-size:10px;line-height:1.9}.journal-item:last-child{border:0}.journal-date{min-width:37px;font-size:9px;color:#8a9587}.journal-item p{margin:0}.journal-item b{color:var(--leaf);font-weight:500}.empty{padding:18px 0;color:var(--muted);font-size:11px;line-height:2}.footer{display:flex;justify-content:space-between;font-size:9px;color:#98a18f;padding:25px 0 8px;gap:15px}.footer button{padding:0;border:0;background:none;color:#7b8c78;text-decoration:underline;font-size:9px}.primary{background:var(--green);color:#fff;border:1px solid var(--green);border-radius:7px;padding:13px 22px;font-size:12px;letter-spacing:.03em}.secondary{background:#f7f7ef;border:1px solid #dfe5d8;border-radius:7px;padding:13px 20px;font-size:12px}.ready-card{padding:29px;background:#fff;border:1px solid var(--line);border-radius:12px;margin-top:18px}.ready-card h2{font-size:22px;margin:8px 0 12px}.ready-card p{font-size:12px;line-height:2;color:#75806f}.ready-card .primary{margin-top:10px}.stage-path{display:flex;gap:7px;margin-top:22px}.path-step{height:4px;background:#e0e6d9;flex:1;border-radius:3px}.path-step.done{background:#789472}.path-step.current{background:#b79c59}.event-card{padding:28px;background:#fbf8ee;border:1px solid #e9dfc4;border-radius:12px;margin-top:18px}.event-card h2{font-size:21px;line-height:1.7;margin:8px 0 12px}.event-card p{font-size:12px;color:#7b7d6d;line-height:2}.event-choices{display:grid;gap:9px;margin-top:20px}.event-choices button{text-align:left;border:1px solid #dedcc8;background:#fff;border-radius:8px;padding:15px;font-size:12px}.event-choices small{display:block;font-size:10px;color:#8b947c;margin-top:6px}.match-layout{display:grid;grid-template-columns:minmax(0,1fr) 220px;gap:20px}.match-board-wrap{padding:20px;background:#f0eadb;border:1px solid #e0d6bc;border-radius:12px}.versus{display:flex;justify-content:space-between;align-items:center;font-size:11px;margin-bottom:13px;gap:10px}.versus b{font-family:'Noto Serif JP',serif;font-size:16px}.versus small{display:block;font-size:9px;color:var(--muted);margin-bottom:6px}.board-coords{display:grid;grid-template-columns:repeat(9,1fr);padding:0 6px;margin:7px 0;font-size:9px;text-align:center;color:#9b865e}.board{aspect-ratio:1;display:grid;grid-template-columns:repeat(9,1fr);border-left:1px solid #9a8058;border-top:1px solid #9a8058;background:#dcb976;padding:0}.square{border:0;border-right:1px solid #9a8058;border-bottom:1px solid #9a8058;background:#e4c68c;padding:3px;display:grid;place-items:center;min-width:0;position:relative;aspect-ratio:1;border-radius:0}.square:nth-child(3n){background:#e7c992}.piece{height:92%;width:85%;clip-path:polygon(50% 0,93% 21%,100% 100%,0 100%,7% 21%);background:#f8dda4;box-shadow:inset 0 -3px 0 #b28745;display:grid;place-items:center;font-family:'Noto Serif JP',serif;font-size:clamp(15px,2.1vw,26px);line-height:1;padding-top:4px;color:#312e25;font-weight:700}.piece.enemy{transform:rotate(180deg)}.piece.promoted{color:#ad4832}.square.last{background:#d9d896}.square.selected{background:#85b18b}.square.target:after{content:'';width:12px;height:12px;border-radius:50%;background:#24523ec0;position:absolute;box-shadow:0 0 0 4px #ffffff50}.square.target .piece{opacity:.6}.hand{display:flex;gap:6px;align-items:center;min-height:35px;flex-wrap:wrap;font-size:10px}.hand button{border:1px solid #d6c49e;background:#fcf3dc;border-radius:4px;padding:4px 7px;font-family:serif;font-size:14px}.hand button.selected{outline:2px solid var(--leaf)}.hand small{font-family:sans-serif;font-size:9px;color:#8e805f;margin-left:4px}.board-note{margin:12px 0 0;font-size:10px;line-height:1.8;color:#877a60}.match-controls{padding:20px;height:fit-content}.match-controls h3{font-size:15px;margin:0 0 14px}.match-status{font-size:11px;line-height:1.9;color:var(--muted);min-height:63px}.match-controls button{width:100%;margin-top:9px}.match-controls select{width:100%;margin:15px 0 8px;padding:8px;border:1px solid var(--line);border-radius:6px;background:#fff;font-size:11px}.move-list{margin-top:18px;max-height:170px;overflow-y:auto;font-size:10px;line-height:2.2;border-top:1px solid var(--line);padding-top:10px}.move-list p{margin:0;color:#768471}.move-list strong{color:var(--ink);font-weight:500}.match-title{font-size:20px;margin:0 0 19px}.match-help{font-size:10px;color:var(--muted);line-height:2;margin:15px 0}.result-card{text-align:center;padding:38px 30px}.result-seal{width:74px;height:86px;clip-path:polygon(50% 0,94% 20%,100% 100%,0 100%,6% 20%);background:#eee2bd;color:#957c3f;display:grid;place-items:center;font-family:serif;font-size:37px;margin:0 auto 20px}.result-card h2{font-size:26px;margin:10px 0}.result-card p{font-size:12px;line-height:2;color:#7a8674}.result-buttons{display:flex;justify-content:center;gap:10px;flex-wrap:wrap;margin:24px 0 0}.record-row{display:flex;align-items:center;gap:18px;padding:20px 0;border-bottom:1px solid var(--line);font-size:12px}.record-row .record-win{font-size:20px;font-family:serif;color:var(--gold)}.record-row small{display:block;color:var(--muted);font-size:10px;margin-top:6px}.record-row:last-child{border:0}.records-panel{padding:8px 25px}.data-actions{display:flex;flex-wrap:wrap;gap:9px;margin-top:25px}dialog{border:1px solid var(--line);border-radius:15px;max-width:480px;width:calc(100% - 32px);padding:29px;color:var(--ink);box-shadow:0 25px 90px #14342630}dialog::backdrop{background:#1f352a60;backdrop-filter:blur(3px)}dialog h2{margin:0 0 17px;font-size:22px}dialog p{font-size:12px;line-height:2;color:#77816f}dialog label{display:block;font-size:11px;margin:19px 0 7px}dialog input,dialog select{width:100%;padding:12px;border:1px solid #d9e0d2;border-radius:7px;background:#fbfcf8}dialog .buttons{display:flex;justify-content:flex-end;gap:9px;margin-top:25px}dialog ul{font-size:12px;line-height:2.2;padding-left:20px}dialog .close{float:right;border:0;background:transparent;font-size:22px;color:#8a9583;padding:0 4px}#toast{position:fixed;bottom:25px;left:calc(50% + 41px);transform:translate(-50%,20px);opacity:0;pointer-events:none;z-index:20;background:#254b3f;color:white;padding:14px 22px;border-radius:9px;box-shadow:0 8px 25px #193b2a24;transition:.2s;font-size:12px;max-width:calc(100vw - 32px);line-height:1.8}#toast.show{transform:translate(-50%,0);opacity:1}.saves-warning{color:#ac6e35;font-size:10px;margin-top:10px}.mobile-only{display:none}@media(min-width:1500px){.rail{left:calc((100vw - 1680px)/2);min-left:0}}@media(min-width:1500px) and (max-width:1680px){.rail{left:0}}@media(max-width:1100px){.workspace{padding:24px}.topbar{padding:21px 24px}.content-grid{grid-template-columns:230px minmax(0,1fr);gap:18px}.pupil-inner{padding:17px}.scene-text h2{font-size:22px}.scene-text{left:22px}.training{padding:13px}.match-layout{grid-template-columns:1fr}.match-controls{display:grid;grid-template-columns:1fr 1fr;gap:7px 12px}.match-controls h3,.match-status,.match-help,.move-list{grid-column:1/-1}.match-controls button{margin:0}.match-controls select{margin:0}.match-status{min-height:0}.topmeta{gap:12px}.save-copy{display:none}}@media(max-width:820px){.shell{padding-left:0;padding-bottom:70px}.rail{top:auto;bottom:0;left:0;width:100%;height:65px;padding:4px 25px;flex-direction:row;justify-content:space-around;gap:10px}.rail hr,.rail .brand-piece{display:none}.rail .bottom{margin-top:0}.rail button{padding:6px;width:60px;font-size:9px;gap:3px}.rail .ico{width:19px;height:19px}.topbar{padding:17px 20px}.wordmark{font-size:23px}.workspace{padding:22px 18px}.pagehead{margin-bottom:19px}h1{font-size:21px}.content-grid{grid-template-columns:1fr}.pupil-card{display:grid;grid-template-columns:145px 1fr}.pupil-name{padding:17px 15px 10px}.pupil-name h2{font-size:22px}.pupil-name .name-icon{display:none}.portrait{height:130px;grid-row:2;grid-column:1;border-radius:0 0 0 11px}.portrait svg{height:160px}.portrait:before{left:0;top:10px;width:140px;height:140px}.portrait .tag{left:9px;font-size:8px}.pupil-inner{grid-column:2;grid-row:1/3;padding:17px;border-left:1px solid var(--line)}.stats{gap:7px;margin:12px 0}.stat{font-size:9px;grid-template-columns:43px 17px 1fr 20px;gap:5px}.grade{font-size:15px}.mood{padding-bottom:9px;font-size:9px}.meter{margin-bottom:9px}.opening{margin-top:9px;padding-top:8px;font-size:9px}.skill{font-size:8px;padding:3px 5px}.next-goal{display:none}.scene{height:300px}.scene-text h2{font-size:24px}.scene-badge{top:17px;right:15px;font-size:8px}.scene-text{top:22px}.training{min-height:115px}.footer{padding-bottom:5px}.season-num{font-size:29px}.topmeta .ghost{font-size:10px;padding:8px 10px}.subtitle{font-size:10px}.match-layout{grid-template-columns:minmax(0,1fr) 215px}.match-controls{display:block}.match-controls button{margin-top:9px}.match-controls select{margin-top:15px}.piece{font-size:clamp(15px,3vw,24px)}#toast{left:50%;bottom:80px}.training h3{font-size:11px}}@media(max-width:600px){.workspace{padding:20px 14px}.pagehead{gap:8px}.stage-label{font-size:9px;padding-left:10px}.season{gap:9px}.season-num{font-size:26px}.scene{height:300px}.scene-text h2{font-size:21px}.scene-text .scene-caption{font-size:9px}.scene-badge{display:none}.scene-text{left:20px}.bubble{left:12px;right:12px;bottom:13px;padding:11px 12px;gap:10px}.bubble p{font-size:10px}.bubble .speaker{font-size:9px;padding-right:10px}.train-grid{gap:8px}.training{padding:12px 11px}.training .action-top{margin-bottom:9px}.action-no{display:none}.training p{font-size:8px}.action-effect{font-size:8px;display:block;margin-top:8px;line-height:1.7}.cost{display:block}.section-title{margin-top:21px}.section-title span{font-size:9px}.journal{padding:1px 15px}.journal-item{gap:9px}.match-layout{grid-template-columns:1fr}.match-controls{display:grid}.match-controls button,.match-controls select{margin:0}.match-board-wrap{padding:15px}.piece{font-size:clamp(17px,5vw,25px)}.board-note{font-size:9px}.pupil-card{grid-template-columns:125px 1fr}.portrait svg{height:155px}.pupil-inner{padding:14px}.stat{grid-template-columns:43px 15px 1fr 17px}.footer{font-size:8px;line-height:1.8}.scene .dojo{width:130%;left:-18%}.result-card{padding:28px 18px}.result-card h2{font-size:23px}.event-card{padding:22px}.event-card h2{font-size:19px}.match-controls{padding:17px}.topmeta{gap:8px}.topmeta .save-status{display:none}.topbar{padding:16px 17px}.training .action-icon{width:28px;height:28px}.training .ico{width:19px;height:19px}}@media(prefers-reduced-motion:reduce){*{transition:none!important;animation:none!important}}
.square:disabled{opacity:1;cursor:default}.square:hover:not(:disabled){filter:none;background:#d2c78a}

/* Large game screen: warm dojo, bright controls, horizontal abilities. */
:root{--ink:#493423;--green:#9c5c2d;--leaf:#aa7139;--gold:#d99b28;--paper:#f8edda;--muted:#a08560;--line:#e3cfab;background:#f8edda}
body{background:repeating-linear-gradient(90deg,#fff8ec22 0 2px,transparent 2px 6px)}
.game-shell{max-width:1500px;margin:auto;padding:0 30px}.game-header{display:flex;justify-content:space-between;align-items:center;height:98px;padding:6px 5px 9px;gap:20px}.game-logo{padding:0;border:0;background:none;display:flex;align-items:center;gap:16px}.game-logo>span{font-size:43px;letter-spacing:-.05em;line-height:1.15;font-weight:900;color:#edac22;-webkit-text-stroke:1px #663a1c;paint-order:stroke fill;text-shadow:0 3px 0 #fff8dd,0 5px 0 #d6b477;transform:rotate(-3deg)}.game-logo>span>span{color:#e96556}.game-logo small{font-size:12px;color:#ab8050;font-weight:700;letter-spacing:.05em}.game-nav{display:flex;gap:9px}.game-nav button{display:flex;gap:7px;align-items:center;border:2px solid #e3caa1;background:#fffaf0;box-shadow:0 3px 0 #dcc199;border-radius:25px;padding:8px 15px;font-size:13px;font-weight:700}.game-nav .ico{width:20px;height:20px;color:#b38548}.game-nav button.active{background:#ffe7a0;border-color:#d7ab5d}.game-main{padding-bottom:8px}
.game-hud{display:grid;grid-template-columns:155px 1fr;gap:16px;margin-bottom:12px}.turn-counter{position:relative;background:#fffdf4;border:3px solid #e4a22f;border-radius:14px;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:7px;padding-top:24px;min-height:105px;box-shadow:0 4px 0 #d7bb8b}.turn-counter>span{position:absolute;top:0;left:0;right:0;background:#ffcb46;text-align:center;font-weight:900;font-size:18px;line-height:29px;color:#63401c}.turn-counter strong{font-weight:900;font-size:38px;line-height:1.5}.turn-counter small{font-size:17px;font-weight:800}.goal-and-energy{display:flex;flex-direction:column;justify-content:space-between;gap:10px}.goal-banner{display:flex;background:#fffdf4;border:2px solid #e9d4ad;border-radius:11px;overflow:hidden;min-height:49px;align-items:center;box-shadow:0 3px 0 #e4d1ac}.goal-banner>b{display:grid;place-items:center;padding:8px 18px;align-self:stretch;background:#ed9651;color:white;font-size:21px;font-weight:900;min-width:90px;text-shadow:1px 1px 0 #bb6a2d}.goal-banner>strong{font-size:clamp(20px,2.1vw,28px);font-weight:900;padding:4px 18px;line-height:1.5}.energy-row{display:flex;gap:12px;align-items:center;padding:2px 4px}.energy-row>b{font-size:22px;font-weight:900;white-space:nowrap}.energy-meter{height:25px;border:3px solid #fff9ee;border-radius:9px;background:#d3c8b7;box-shadow:0 0 0 1px #baaa8d;flex:1;max-width:700px;overflow:hidden}.energy-meter>span{display:block;height:100%;background:linear-gradient(#ffbc6b,#ef8655);border-radius:6px;transition:width .25s}.energy-meter.low>span{background:#db655b}.energy-row>strong{font-size:18px;white-space:nowrap}.energy-row>strong small{font-size:12px;color:#9b8262}.mood-chip{padding:5px 11px;font-size:14px;background:#fff3d5;border:2px solid #edce8c;white-space:nowrap;border-radius:8px;font-weight:800;color:#bc7636}
.ability-board{display:grid;grid-template-columns:repeat(5,1fr) 1.5fr;background:#fffdf7;border:3px solid #e1c99e;border-radius:12px;overflow:hidden;box-shadow:0 4px 0 #d8bd8d;margin-bottom:15px}.ability{border-right:1px solid #e3d5bb;text-align:center;position:relative}.ability>b,.favorite-opening>b{display:block;background:#3b95cf;color:#fff;font-size:16px;font-weight:800;padding:6px;white-space:nowrap;text-shadow:1px 1px 0 #2778b0}.ability:nth-child(2)>b{background:#4187c6}.ability:nth-child(3)>b{background:#488dce}.ability:nth-child(4)>b{background:#687fc0}.ability:nth-child(5)>b{background:#8d7bc1}.ability>div{display:flex;align-items:baseline;justify-content:center;gap:8px;line-height:1.1;padding:8px 4px 9px}.ability>div>strong{font-family:Arial,sans-serif;font-size:35px;font-weight:900;color:#705331;-webkit-text-stroke:1px #705331;paint-order:stroke fill;text-shadow:0 2px #e8d6b5}.ability>div>span{font-size:12px;color:#a28b6a}.ability>i{display:block;position:absolute;bottom:0;left:10px;right:10px;height:4px;background:#ede4d2;border-radius:8px;overflow:hidden}.ability>i>span{display:block;background:#d2a95f;height:100%}.favorite-opening{text-align:center;display:flex;flex-direction:column}.favorite-opening>b{background:#dc6b62}.favorite-opening>strong{display:grid;place-items:center;flex:1;font-size:24px;font-weight:900;padding:9px 6px;white-space:nowrap}
.game-content{border:3px solid #c49558;border-radius:15px;background:#fff6e3;overflow:hidden;box-shadow:0 6px 0 #e0c59b}.dojo-stage{position:relative;min-height:460px;height:calc(100dvh - 365px);max-height:640px;isolation:isolate;overflow:hidden}.dojo-backdrop{position:absolute;inset:0;width:100%;height:100%;z-index:-2}.stage-character{position:absolute;right:6%;bottom:129px;height:calc(100% - 155px);max-height:380px;min-height:270px;width:30%;display:flex;justify-content:center;align-items:flex-end}.standing-pupil{height:100%;width:auto;max-width:100%;filter:drop-shadow(1px 3px 0 #9f773322)}.pupil-tag{position:absolute;bottom:-1px;left:50%;transform:translateX(-50%);padding:4px 20px;border:2px solid #b98b4f;background:#fffbeb;border-radius:9px;min-width:100px;font-weight:900;font-size:20px;box-shadow:0 3px 0 #bd955c;z-index:2;white-space:nowrap}.pupil-tag:active:not(:disabled){transform:translate(-50%,2px)}.pupil-tag small{color:#b89a70;font-size:12px}.speech-bubble{position:absolute;left:5%;top:7%;width:49%;background:#fffdf4;border:3px solid #d9ba84;border-radius:24px;padding:22px 28px;box-shadow:0 5px 0 #a27d4030}.speech-bubble:before{content:'';position:absolute;right:-22px;top:35px;border-left:23px solid #d9ba84;border-top:14px solid transparent;border-bottom:14px solid transparent}.speech-bubble:after{content:'';position:absolute;right:-17px;top:38px;border-left:20px solid #fffdf4;border-top:11px solid transparent;border-bottom:11px solid transparent}.speech-bubble>span{display:block;color:#b88544;font-size:14px;font-weight:800;margin-bottom:8px}.speech-bubble p{font-weight:800;font-size:clamp(20px,2.1vw,27px);line-height:1.6;margin:0}.stage-note{position:absolute;left:5.2%;top:45%;width:48%;color:#7b5735}.chapter-tag{display:inline-block;background:#b4854b;color:#fff6e8;border-radius:5px;padding:4px 10px;font-size:12px;font-weight:700}.stage-note h2{font-family:inherit;font-size:21px;margin:9px 0 7px;font-weight:900}.stage-note p{font-size:13px;line-height:1.8;margin:0;max-width:430px}.unlocked-skills{margin-top:10px;display:flex;gap:5px;flex-wrap:wrap}.unlocked-skills>span{background:#fff4cb;border:1px solid #caae6e;color:#a67e2f;padding:3px 8px;border-radius:5px;font-size:11px;font-weight:700}
.training-dock{position:absolute;bottom:16px;left:3%;right:3%;display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:14px;z-index:3}.training-orb{padding:0;border:0;background:transparent;position:relative;min-width:0}.orb-face{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;aspect-ratio:1.25;max-height:126px;min-height:94px;width:100%;border-radius:50%;background:radial-gradient(ellipse at 38% 22%,#fffce2 0%,#fff3a1 23%,#fbd15a 61%,#e9aa39 100%);border:3px solid #dca838;box-shadow:inset 0 3px 0 #fffdea,0 5px 0 #b48b42,0 7px 8px #80663435;transition:.15s;color:#6c431d}.orb-face .ico{height:25px;width:25px;color:#b17d2f}.orb-face strong{font-size:clamp(17px,1.8vw,24px);font-weight:900;letter-spacing:-.06em;text-shadow:0 2px 0 #fff7c3;white-space:nowrap}.training-orb:hover:not(:disabled) .orb-face{transform:translateY(-5px);filter:brightness(1.05)}.orb-effect{display:block;margin-top:8px;font-size:11px;font-weight:700;color:#6d522b;white-space:nowrap}.orb-cost{display:block;font-size:10px;color:#93723c;margin-top:1px;font-weight:600}.training-orb.rest .orb-face{background:radial-gradient(ellipse at 38% 22%,#fff 0%,#e9e9ff 25%,#b8b3ee 65%,#9a8cd4 100%);border-color:#a197ca;box-shadow:inset 0 3px 0 #fff,0 5px 0 #8076ac,0 7px 8px #80663435;color:#64577b}.training-orb.rest .ico{color:#8c7caa}.training-orb:disabled{filter:grayscale(.85);opacity:.65}
.stage-event{position:absolute;left:5%;top:7%;width:54%;background:#fffaf0;border:3px solid #d7b278;border-radius:18px;box-shadow:0 6px 0 #a37b4740;padding:23px 27px;z-index:4}.event-ribbon{font-size:14px;display:inline-block;padding:5px 12px;color:#fff;background:#e7885c;font-weight:900;border-radius:5px;margin-bottom:13px}.stage-event h2{font-family:inherit;font-size:26px;font-weight:900;line-height:1.45;margin:0 0 12px}.stage-event p{font-size:14px;line-height:1.9;margin:0 0 12px}.event-choices{display:grid;gap:10px;margin-top:17px}.event-choices button{text-align:left;padding:13px 16px;border:2px solid #dfc388;border-radius:10px;background:linear-gradient(#fff7d3,#ffe8a0);box-shadow:0 3px 0 #d1b379;font-size:15px;font-weight:800}.event-choices small{display:block;color:#a58148;font-size:11px;font-weight:500;margin-top:5px}.with-event .stage-character{bottom:25px;height:86%;max-height:425px}.primary,.secondary{border-radius:10px;padding:13px 20px;font-size:15px;font-weight:800;border:2px solid #d7a54b;background:linear-gradient(#ffde77,#f7bf42);color:#6c471d;box-shadow:0 4px 0 #bc8c3e}.secondary{background:linear-gradient(#fffef5,#f9edd2);border-color:#dfc695;box-shadow:0 4px 0 #ccb58e}.start-button{font-size:23px;padding:15px 29px;min-width:220px;margin-top:10px;border-width:3px}.tournament-event h2{font-size:34px;line-height:1.5}.game-footer{display:flex;justify-content:space-between;align-items:center;padding:15px 3px 7px;font-size:10px;color:#ad926d;gap:10px}.game-footer button{font-size:10px;background:none;border:0;text-decoration:underline;color:#a88d68;padding:0}.footer-day{margin-left:20px}.game-content:not(:has(.dojo-stage)){padding:25px}.panel{background:#fffcf4;border:2px solid #e0c69b}.result-card h2{font-family:inherit;font-weight:800}.result-card p{font-size:14px}.result-seal{background:#f4d17a;color:#9d642c}.result-buttons{gap:12px}.match-layout{grid-template-columns:minmax(0,1fr) 265px;max-width:1030px;margin:auto;gap:23px}.match-board-wrap{background:#f5e1b8;border:2px solid #c3985b;max-width:660px}.match-title{font-family:inherit;font-size:23px;font-weight:800}.match-controls h3{font-family:inherit;font-size:18px}.match-status{font-size:13px}.match-controls select{font-size:14px}.match-help{font-size:11px}.match-controls .primary,.match-controls .secondary{font-size:14px}.square.selected{background:#8fbad8}.square.last{background:#f6b26b}.square.target:after{background:#276caa}.square:hover:not(:disabled){background:#f8d693}.piece{font-size:clamp(20px,2.4vw,32px)}.board-note{font-size:11px}.game-content .section-title h2{font-family:inherit}.journal-item{font-size:12px}.empty{font-size:13px}.hand button.selected{outline-color:#3789c9}dialog{background:#fff9e9;border:3px solid #ddb97c}dialog::backdrop{background:#4c341766}dialog h2{font-family:inherit;font-weight:800}dialog p{font-size:13px}dialog input,dialog select{font-size:14px;border-color:#dfc697}#toast{left:50%;background:#fff9e4;border:3px solid #e7b74e;color:#7f5629;font-weight:800;font-size:14px;box-shadow:0 5px 0 #b08c4940}
@media(min-width:1400px){.dojo-stage{min-height:515px}.stage-character{min-height:340px;bottom:140px}.orb-face{max-height:143px}.training-dock{bottom:20px}.stage-note{top:44%}}
@media(max-width:1050px){.game-shell{padding:0 20px}.game-logo small{display:none}.game-logo>span{font-size:38px}.game-header{height:87px}.game-nav button{padding:8px 12px;font-size:12px}.game-hud{grid-template-columns:130px 1fr;gap:12px}.turn-counter>span{font-size:15px}.turn-counter strong{font-size:30px}.turn-counter small{font-size:14px}.energy-row>b{font-size:19px}.mood-chip{font-size:12px}.ability>b,.favorite-opening>b{font-size:14px}.ability>div>strong{font-size:31px}.favorite-opening>strong{font-size:21px}.dojo-stage{min-height:445px}.stage-character{bottom:130px;min-height:265px;right:4%;width:33%}.orb-face{min-height:85px}.orb-face strong{font-size:19px}.orb-face .ico{height:21px}.training-dock{gap:11px}.orb-effect{font-size:9px}.speech-bubble{padding:18px 22px}.stage-note{top:43%}.stage-note h2{font-size:19px}.stage-note p{font-size:12px}.match-layout{grid-template-columns:minmax(0,1fr) 230px;gap:18px}.game-content:not(:has(.dojo-stage)){padding:19px}.match-controls{padding:16px}.stage-event{width:56%;padding:20px}.stage-event h2{font-size:23px}.stage-event p{font-size:13px}.tournament-event h2{font-size:29px}}
@media(max-width:760px){.game-shell{padding:0 12px}.game-header{height:79px;gap:10px}.game-logo>span{font-size:34px}.game-nav{gap:6px}.game-nav button{padding:7px 10px;border-radius:12px;display:grid;justify-items:center;gap:2px;font-size:10px}.game-nav .ico{width:18px;height:18px}.game-hud{grid-template-columns:108px 1fr;margin-bottom:10px;gap:10px}.turn-counter{min-height:95px;border-radius:11px;padding-top:23px}.turn-counter>span{font-size:13px;line-height:26px}.turn-counter strong{font-size:26px}.turn-counter small{font-size:11px}.goal-banner{min-height:41px;border-radius:9px}.goal-banner>b{font-size:17px;min-width:62px;padding:7px 12px}.goal-banner>strong{font-size:18px;padding:4px 10px}.energy-row{gap:7px}.energy-row>b{font-size:16px}.energy-meter{height:21px;border-width:2px}.energy-row>strong{font-size:15px}.energy-row>strong small{font-size:10px}.mood-chip{padding:4px 6px;font-size:10px;border-width:1px}.ability-board{grid-template-columns:repeat(5,1fr) 1.25fr;border-width:2px;margin-bottom:12px}.ability>b,.favorite-opening>b{font-size:12px;padding:6px 2px}.ability>div{gap:4px}.ability>div>strong{font-size:27px}.ability>div>span{font-size:9px}.favorite-opening>strong{font-size:17px}.dojo-stage{height:calc(100dvh - 319px);min-height:435px;max-height:none}.stage-character{min-height:250px;bottom:130px;width:36%;right:3%}.speech-bubble{left:4%;top:6%;width:54%;padding:18px}.speech-bubble p{font-size:19px}.stage-note{left:4%;width:54%;top:44%}.stage-note h2{font-size:17px}.stage-note p{font-size:11px}.chapter-tag{font-size:10px}.training-dock{gap:8px;left:2.5%;right:2.5%;bottom:15px}.orb-face{min-height:76px;aspect-ratio:1.05;border-width:2px}.orb-face strong{font-size:15px}.orb-face .ico{width:18px;height:18px}.orb-effect{font-size:8px;letter-spacing:-.04em}.orb-cost{font-size:9px}.pupil-tag{font-size:16px;padding:3px 15px;min-width:80px}.match-layout{grid-template-columns:1fr;max-width:580px}.match-board-wrap{padding:13px}.match-controls{display:grid;grid-template-columns:1fr 1fr;gap:8px 13px}.match-controls h3,.match-status,.match-help,.move-list{grid-column:1/-1}.match-status{min-height:0}.match-controls button{margin-top:0}.match-controls select{margin:0}.match-controls .match-help{margin:6px 0 0}.game-content:not(:has(.dojo-stage)){padding:17px}.piece{font-size:clamp(22px,4.2vw,31px)}.stage-event{left:4%;top:6%;width:57%;padding:17px}.stage-event h2{font-size:22px}.stage-event p{font-size:12px}.event-choices button{font-size:13px;padding:10px}.event-choices small{font-size:10px}.with-event .stage-character{bottom:18px;min-height:290px;width:35%}.event-ribbon{font-size:12px;margin-bottom:10px}.start-button{min-width:0;width:100%;font-size:19px;padding:12px}.tournament-event h2{font-size:28px}.game-footer{padding-top:12px;font-size:9px}.game-footer button{font-size:9px}.footer-day{margin-left:12px}}
@media(max-width:480px){.game-shell{padding:0 8px}.game-header{height:70px;gap:6px;padding:5px 2px 8px}.game-logo>span{font-size:28px}.game-nav{gap:5px}.game-nav button{font-size:9px;padding:6px 7px;min-width:37px;border-width:1px}.game-nav .ico{width:16px;height:16px}.game-hud{grid-template-columns:80px 1fr;gap:8px}.turn-counter{border-width:2px;min-height:89px;gap:3px;padding-top:20px}.turn-counter>span{font-size:12px;line-height:23px}.turn-counter strong{font-size:24px}.turn-counter small{font-size:10px}.goal-banner{min-height:39px}.goal-banner>b{min-width:43px;font-size:14px;padding:6px}.goal-banner>strong{font-size:15px;padding:4px 7px}.energy-row{gap:6px;flex-wrap:wrap;padding:0 2px}.energy-row>b{font-size:14px}.energy-meter{height:20px;flex-basis:100px}.energy-row>strong{font-size:13px}.energy-row>strong small{font-size:9px}.mood-chip{display:none}.ability-board{grid-template-columns:repeat(5,1fr);margin-bottom:10px;overflow:visible;position:relative;border-radius:9px}.ability:first-child{border-radius:7px 0 0 7px;overflow:hidden}.ability:nth-child(5){border-right:0;border-radius:0 7px 7px 0;overflow:hidden}.ability>b{font-size:11px;padding:5px 1px}.ability>div{gap:4px;padding:7px 3px 8px}.ability>div>strong{font-size:25px}.ability>div>span{font-size:9px}.favorite-opening{position:absolute;right:10px;top:calc(100% + 20px);z-index:5;border:2px solid #ce9b69;border-radius:8px;overflow:hidden;min-width:100px;box-shadow:0 3px 0 #ad8a5533}.favorite-opening>b{font-size:10px;padding:4px;background:#d97866}.favorite-opening>strong{font-size:16px;background:#fffbeb;padding:6px 9px}.game-content{border-width:2px;border-radius:12px}.dojo-stage{min-height:560px;height:calc(100dvh - 290px)}.dojo-backdrop{width:180%;left:-75%}.stage-character{height:265px;min-height:0;width:51%;right:0;bottom:210px}.standing-pupil{max-width:none}.speech-bubble{top:25px;left:4%;width:55%;padding:13px 14px;border-width:2px;border-radius:17px}.speech-bubble>span{font-size:11px;margin-bottom:6px}.speech-bubble p{font-size:17px;line-height:1.65}.speech-bubble:before{right:-17px;top:24px;border-left-width:17px;border-top-width:11px;border-bottom-width:11px}.speech-bubble:after{right:-13px;top:26px;border-left-width:15px;border-top-width:9px;border-bottom-width:9px}.stage-note{left:4%;top:181px;width:44%}.stage-note h2{font-size:15px;line-height:1.5;margin:9px 0}.stage-note p{font-size:10px;line-height:1.7}.chapter-tag{font-size:9px;padding:4px 6px}.unlocked-skills{gap:3px;margin-top:7px}.unlocked-skills>span{font-size:8px;padding:3px 4px}.pupil-tag{font-size:15px;bottom:0;padding:3px 12px;min-width:77px}.training-dock{grid-template-columns:repeat(3,1fr);gap:9px 13px;bottom:14px;left:5%;right:5%}.orb-face{min-height:66px;max-height:70px;aspect-ratio:1.7;border-radius:45%;gap:1px;box-shadow:inset 0 2px 0 #fffdea,0 4px 0 #b48b42,0 6px 6px #80663425}.orb-face .ico{width:16px;height:16px}.orb-face strong{font-size:16px}.orb-effect{font-size:8px;margin-top:5px;line-height:1.5}.orb-cost{font-size:8px;line-height:1.5}.with-event{min-height:620px;height:auto}.with-event .stage-character{height:230px;width:52%;bottom:9px;right:0;min-height:0;z-index:2}.stage-event{top:16px;left:4%;width:92%;padding:17px 18px;border-width:2px}.stage-event h2{font-size:22px;margin-bottom:9px}.stage-event p{font-size:12px;line-height:1.8;margin-bottom:10px}.event-choices{gap:9px;margin-top:14px}.event-choices button{font-size:13px}.event-choices small{font-size:10px}.tournament-event{width:74%;top:16px;z-index:4}.tournament-event h2{font-size:27px}.tournament-event p{font-size:12px}.tournament-event .start-button{font-size:18px;padding:12px}.dojo-stage:has(.tournament-event){min-height:525px}.dojo-stage:has(.tournament-event) .stage-character{height:240px;bottom:9px;width:53%}.footer-day{margin-left:7px;font-size:8px}.game-footer{font-size:8px;align-items:flex-start}.game-footer button{font-size:8px;white-space:nowrap}.game-content:not(:has(.dojo-stage)){padding:12px}.match-title{font-size:18px;margin-bottom:13px}.versus b{font-size:16px}.versus{font-size:11px}.versus small{font-size:10px}.piece{font-size:clamp(17px,5vw,23px)}.match-board-wrap{padding:10px}.square{padding:2px}.board-note{font-size:10px}.match-controls{padding:16px}.match-controls h3{font-size:18px}.match-controls .primary,.match-controls .secondary{font-size:12px;padding:12px 8px}.result-card{padding:20px 10px}.result-card h2{font-size:23px;line-height:1.6}.result-card p{font-size:13px}.result-buttons{gap:10px}.primary,.secondary{font-size:13px;padding:12px 17px}.record-row{font-size:13px;gap:11px}.record-row small{font-size:10px}.records-panel{padding:4px 13px}.data-actions{gap:10px}.journal{padding:0 13px}.journal-item{font-size:11px;gap:10px}.journal-date{font-size:9px;min-width:36px}.section-title h2{font-size:18px}dialog{padding:22px}dialog h2{font-size:23px}dialog p{font-size:12px}dialog ol{font-size:12px!important}dialog input,dialog select{font-size:13px}#toast{font-size:12px;width:max-content;text-align:center;bottom:12px;padding:11px 17px;max-width:calc(100vw - 20px)}}
@media(min-width:761px){.game-header{height:79px}.game-hud{margin-bottom:10px}.turn-counter{min-height:86px}.goal-banner{min-height:42px}.goal-banner>b{padding:4px 18px;font-size:19px}.goal-banner>strong{font-size:24px}.goal-and-energy{gap:7px}.energy-meter{height:22px}.energy-row>b{font-size:20px}.ability-board{margin-bottom:12px}.ability>b,.favorite-opening>b{padding:5px;font-size:14px}.ability>div{padding:5px 4px 7px}.ability>div>strong{font-size:30px}.favorite-opening>strong{font-size:22px;padding:5px}.dojo-stage{height:calc(100dvh - 303px);min-height:390px;max-height:630px}.stage-character{height:calc(100% - 130px);min-height:250px;max-height:470px;bottom:121px;right:5%;width:31%}.training-dock{bottom:12px}.orb-face{max-height:110px;min-height:85px}.orb-face strong{font-size:22px}.orb-effect{margin-top:7px;font-size:10px}.orb-cost{font-size:9px}.stage-note{top:45%}.stage-note p{display:none}.stage-note h2{font-size:18px}.speech-bubble{top:7%;padding:18px 25px}.speech-bubble p{font-size:24px}.game-footer{padding:12px 3px 5px}.with-event .stage-character{height:89%;bottom:12px;max-height:480px}.stage-event{top:5%;padding:19px 25px}.stage-event h2{font-size:24px}.tournament-event h2{font-size:29px}}
@media(min-width:761px) and (max-width:1050px){.speech-bubble p{font-size:21px}.orb-face strong{font-size:18px}.orb-effect{font-size:9px}.orb-cost{font-size:8px}.stage-note{top:43%}.stage-event h2{font-size:22px}.stage-event p{font-size:12px}.event-choices button{font-size:13px;padding:11px 14px}.event-choices small{font-size:10px}}
@media(min-width:761px){.pupil-tag{bottom:auto;top:7px;left:8%;transform:translateX(-50%);font-size:16px;min-width:75px;padding:4px 14px}.stage-note h2{display:none}.stage-note{top:51%}}
@media(max-width:480px){.game-main:has(.with-event) .favorite-opening,.game-main:not(:has(.dojo-stage)) .favorite-opening{display:none}}
