@charset "UTF-8";
/* ころがる王冠 v2 — 太い線・セル塗りの絵に合わせた、紙と木と金の画面。スマホ（360×640）でも文字は14px以上。 */
:root{--ink:#2b1d14;--paper:#fff6e0;--paper2:#f3e2bd;--kraft:#e9c98f;--wood:#7a4a24;--wood2:#4a2d14;--gold:#f2b632;--gold2:#ffd968;--red:#d9483f;--blue:#3b7fd6;--teal:#2aa19a;--line:#2b1d14;--shadow:0 4px 0 #2b1d14;--safe:env(safe-area-inset-bottom,0px);font-family:"Hiragino Maru Gothic ProN","Hiragino Sans","Yu Gothic UI","Yu Gothic",Meiryo,sans-serif;color:var(--ink);background:#2b1d14;font-synthesis:none;font-size:15px}
*{box-sizing:border-box}
body{margin:0;background:#2b1d14;-webkit-text-size-adjust:100%}
button,input,select,textarea{font:inherit}
button,a{touch-action:manipulation}
button{cursor:pointer;color:inherit}
button:disabled{cursor:default;opacity:.45}
a{color:inherit}
:focus-visible{outline:3px solid #ff9d1c;outline-offset:3px}
.icon,button svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;flex:none;vertical-align:middle}
.icon-defs,.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0)}
button:active:not(:disabled){transform:translateY(2px)}
#app{min-height:100svh}
/* ---- ボタン ---- */
.btn{border:3px solid var(--line);border-radius:14px;background:linear-gradient(#fffaf0,#f1dfb6);box-shadow:var(--shadow);padding:10px 16px;font-weight:900;font-size:15px;display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:48px;text-decoration:none;line-height:1.3;transition:filter .12s}
.btn:hover:not(:disabled){filter:brightness(1.06)}
.btn.primary{background:linear-gradient(#ffe58a,#f5b72e);color:#3a230e}
.btn.blue{background:linear-gradient(#5aa7ee,#2c6fc4);color:#fff;text-shadow:0 2px 0 #1d3f73}
.btn.danger{background:linear-gradient(#e7675a,#b83a33);color:#fff}
.btn.line{background:linear-gradient(#5fd17b,#2fae55);color:#fff}
.btn.small{min-height:44px;padding:8px 12px;font-size:14px}
.btn.selected{background:linear-gradient(#bfe3ff,#86c3f2)}
.tool-btn{background:#fff3d6;color:var(--ink);border:2px solid var(--line);border-radius:10px;min-width:44px;min-height:44px;padding:8px;display:grid;place-items:center}
.tool-btn.active{background:var(--gold2)}
/* ---- タイトル ---- */
.title-screen{min-height:100svh;overflow:hidden;position:relative;display:flex;justify-content:center;align-items:center;background:#e9c98f}
.title-art{position:absolute;inset:0;background:url('title.webp') center/cover no-repeat;animation:reveal .7s ease}
.title-art:after{content:"";position:absolute;inset:0;background:radial-gradient(ellipse at 50% 40%,#2b1d1400 30%,#2b1d1488 100%)}
.title-copy{text-align:center;position:relative;z-index:1;width:min(560px,92%);padding:24px 0 84px}
.eyebrow{font-weight:900;letter-spacing:.2em;font-size:15px;color:#fff;text-shadow:0 2px 0 var(--line),0 0 8px #000a;margin:0 0 8px}
.game-logo{font-size:clamp(56px,8vw,104px);line-height:1.05;margin:0;color:#fff4d0;letter-spacing:-.04em;transform:rotate(-4deg);font-weight:1000;-webkit-text-stroke:3px var(--line);paint-order:stroke;text-shadow:0 6px 0 var(--line),0 10px 14px #0007}
.game-logo span{display:block;font-size:1.22em;color:var(--gold2)}
.title-tagline{color:#fff;font-weight:900;text-shadow:0 2px 0 var(--line);font-size:17px;letter-spacing:.12em;margin:22px 0 4px}
.title-menu{display:flex;flex-direction:column;align-items:stretch;gap:10px;margin:18px auto 0;width:min(340px,100%)}
.title-menu>.btn{font-size:18px}
.title-secondary{display:flex;gap:10px}
.title-secondary .btn{flex:1;font-size:15px;padding:10px 6px}
.title-note{font-size:14px;line-height:1.7;color:#fff;text-shadow:0 1px 0 var(--line),0 0 6px #000;margin:16px 0 0}
.title-footer{position:absolute;bottom:10px;left:12px;right:12px;display:flex;justify-content:space-between;align-items:center;gap:10px;font-size:14px;color:#fff;text-shadow:0 1px 3px #000}
.title-footer a{padding:10px 12px;background:#2b1d14b0;border-radius:10px;text-decoration:none}
.credits-link{background:none;border:0;color:#fff;text-decoration:underline;font-size:14px;padding:10px 4px;min-height:44px}
.loading{color:#fff;text-shadow:0 1px 3px #000;font-weight:800;font-size:15px}
/* ---- モーダル ---- */
.modal-backdrop{position:fixed;inset:0;background:#1d120ab8;backdrop-filter:blur(4px);z-index:100;display:flex;align-items:center;justify-content:center;padding:12px;animation:reveal .16s ease}
.modal{width:min(640px,100%);max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;background:var(--paper);border:4px solid var(--line);border-radius:20px;box-shadow:0 8px 0 var(--line),0 20px 60px #0008;padding:20px 16px;position:relative}
.modal.wide{width:min(900px,100%)}
.modal h2{margin:0 48px 8px 0;font-size:22px;line-height:1.35}
.modal h3{margin:20px 0 8px;font-size:17px}
.modal p{font-size:15px;line-height:1.75;margin:8px 0}
.muted{color:#6b5640;font-size:14px}
.modal .muted{font-size:14px}
.close-btn{position:absolute;right:10px;top:10px;background:#fff;border:3px solid var(--line);border-radius:50%;width:44px;height:44px;padding:8px;display:grid;place-items:center;z-index:2}
.form-field{display:block;font-size:15px;font-weight:900;margin:14px 0 6px}
.text-input,select{width:100%;border:3px solid var(--line);background:#fffdf6;padding:10px 12px;border-radius:12px;min-height:48px;color:var(--ink);font-size:16px}
.code-input{letter-spacing:.2em;font-family:ui-monospace,Consolas,monospace;text-transform:uppercase}
.row{display:flex;gap:10px}
.row>*{flex:1;min-width:0}
.check-line{display:flex;gap:10px;align-items:flex-start;font-size:15px;line-height:1.6;margin:14px 0;font-weight:700}
.check-line input{width:22px;height:22px;flex:none;margin-top:2px}
.job-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:6px}
.job-card{border:3px solid var(--line);border-radius:14px;background:#fffdf3;padding:4px 2px 8px;min-width:0;text-align:center}
.job-card.selected{background:var(--gold2);box-shadow:0 0 0 3px #fff inset}
.job-card strong{display:block;font-size:15px}
.job-card .hero{height:76px}
.job-desc{background:var(--paper2);border:2px solid #d9bf8c;border-radius:12px;padding:10px 12px;margin:10px 0;font-size:14px;line-height:1.7}
.mode-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.mode-card{text-align:left;padding:10px;background:#fffdf3;border:3px solid var(--line);border-radius:12px;font-size:15px;font-weight:900;min-height:64px}
.mode-card.selected{background:#cfe8ff}
.mode-card small{display:block;margin-top:4px;font-size:14px;font-weight:600;color:#6b5640}
.form-actions{display:flex;justify-content:flex-end;flex-wrap:wrap;gap:10px;margin-top:20px}
.error-text{color:#b42d24;font-weight:800;font-size:15px}
.save-list{display:flex;flex-direction:column;gap:8px}
.save-item{display:flex;justify-content:space-between;text-align:left;width:100%;padding:12px}
.save-item small{font-size:14px;display:block;margin-top:4px;color:#6b5640;font-weight:600}
.save-item.old{border:2px dashed #b9a07a;border-radius:12px;color:#6b5640}
.empty-message{padding:20px;text-align:center;color:#6b5640;font-size:15px}
/* ---- 立ち絵（届いた絵 / 今のシート） ---- */
.hero{position:relative;width:100%;height:100%;display:flex;align-items:flex-end;justify-content:center;container-type:size}
.hero-img{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 5px 0 #2b1d1440)}
.hero-fig{position:relative;display:inline-flex;align-items:flex-end;height:min(100cqh,150cqw);width:min(66.67cqh,100cqw);flex:none}
.hero-fig>.hero-img{height:100%;width:100%;max-width:100%;max-height:100%;object-fit:contain}
.hero-fig>.look{width:68%;top:-3%}
.hero-fig>.look-afro{top:-6%;width:74%}
.hero-fig>.look-mustache{top:12%;width:46%}
.hero-fig>.look-doodle{top:8%;width:56%}
.hero-fig>.look-bunny{top:-16%;width:58%}
.hero-fig[style]>.look-img{left:calc(var(--cx)*1%);transform:translateX(-50%)}
.hero-fig[style]>.look-img.look-afro{width:calc(var(--hw)*1.55%);top:calc((var(--eye) - 4 - var(--hw)*0.92)*1%)}
.hero-fig[style]>.look-img.look-mustache{width:calc(var(--hw)*.62%);top:calc((var(--mouth) - var(--hw)*0.07)*1%)}
.hero-fig[style]>.look-img.look-doodle{width:calc(var(--hw)*.8%);top:calc((var(--eye) + 3)*1%);opacity:.9}
.hero-fig[style]>.look-img.look-bunny{width:calc(var(--hw)*1.15%);top:calc((var(--top) + 5 - var(--hw)*0.73)*1%)}
.hero.mini .look{display:none}
.look-badge{position:absolute;left:30px;bottom:-2px;width:26px;height:26px;border-radius:50%;background:#fff;border:2px solid var(--line);display:grid;place-items:center;overflow:hidden;z-index:2}
.look-badge img{width:90%;height:90%;object-fit:contain}
.look-badge svg{width:110%;height:110%}
.pchip-face,.rank-face{position:relative}
.prank-preview .hero,.prank-show .hero,.profile-head .hero{padding-top:30px;box-sizing:border-box}
.rank-face{overflow:visible!important}.rank-face>.hero{border-radius:50%;overflow:hidden}
.rank-face .look-badge{left:26px;bottom:-4px}
.hero-art{background-image:url('heroes.webp');background-size:200% 200%;background-repeat:no-repeat;width:min(100cqw,100cqh);height:min(100cqw,100cqh);flex:none}
.hero-art.advanced{background-image:url('advanced.webp')}
.hero-art.art0{background-position:0 0}.hero-art.art1{background-position:100% 0}.hero-art.art2{background-position:0 100%}.hero-art.art3{background-position:100% 100%}
.look{position:absolute;left:50%;top:0;width:62%;transform:translateX(-50%);pointer-events:none;filter:drop-shadow(0 2px 0 #0004)}
.look-afro{top:-6%;width:72%}
.look-img{width:60%;object-fit:contain}.look-img.look-afro{top:-8%;width:74%}.look-img.look-mustache{top:20%;width:30%}.look-img.look-doodle{top:14%;width:40%}.look-img.look-bunny{top:-14%;width:56%}
.hero.mini .look-afro{top:-22%;width:110%}
.wheel-stop{pointer-events:auto;min-width:180px;font-size:20px;margin-top:8px}
.battle-sum{background:var(--paper);border:4px solid var(--line);border-radius:18px;padding:10px 14px;box-shadow:0 6px 0 var(--line);text-align:center;width:min(92vw,420px);animation:pop .25s ease}
.bs-title{margin:0;font-weight:900;font-size:15px;color:#8a5a20}
.bs-row{display:flex;align-items:center;justify-content:space-between;gap:6px}
.bs-face{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center}
.bs-face .hero,.bs-face .foe{height:110px}
.bs-face b{font-size:15px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.bs-face span{font-size:15px;font-weight:900;color:#b42d24}
.bs-vs{font-size:28px;font-weight:1000;font-style:italic;color:var(--gold2);-webkit-text-stroke:2px var(--line);paint-order:stroke}
.bs-res{margin:4px 0 0;font-size:20px;font-weight:1000}
.bs-res.lose{color:#6b5640}
.hero.mini{overflow:hidden;border-radius:50%}
.hero.mini .hero-fig{position:absolute;top:0;left:50%;transform:translateX(-50%);height:240%;width:auto;max-width:none}
.hero.mini .hero-fig.pc{height:190%;top:4%}
.hero.mini .hero-fig>.hero-img{max-width:none;max-height:none;width:auto;height:100%}
.battle-actor .hero{padding-top:16%;box-sizing:border-box}
.hero.mini .hero-fig>.look-afro{top:-4%;width:90%}
.hero.mini .hero-art{position:absolute;top:-4%;left:50%;transform:translateX(-50%);height:160%;width:160%}
.hero.mini .look{width:80%}
.foe{position:relative;width:100%;height:100%;display:flex;align-items:flex-end;justify-content:center;container-type:size}
.foe img{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 6px 0 #2b1d1440)}
.foe-badge{position:absolute;right:8%;top:8%;background:#fff;border:3px solid var(--line);border-radius:50%;width:40px;height:40px;display:grid;place-items:center}
.monster-art{background:url('monsters.webp') no-repeat;background-size:300% 200%;height:min(100cqh,150cqw);width:min(66.6cqh,100cqw);flex:none}
.monster-art.art0{background-position:0 0}.monster-art.art1{background-position:50% 0}.monster-art.art2{background-position:100% 0}.monster-art.art3{background-position:0 100%}.monster-art.art4{background-position:50% 100%}.monster-art.art5{background-position:100% 100%}
.boss-art{background-image:url('bosses-spaced.webp');background-size:300% 300%;background-repeat:no-repeat;width:min(100cqw,100cqh);height:min(100cqw,100cqh);flex:none}
.boss-art.art0{background-position:0 0}.boss-art.art1{background-position:50% 0}.boss-art.art2{background-position:100% 0}.boss-art.art3{background-position:0 50%}.boss-art.art4{background-position:50% 50%}.boss-art.art5{background-position:100% 50%}.boss-art.art6{background-position:0 100%}.boss-art.art7{background-position:50% 100%}
.npc-img{max-height:100%;max-width:100%;object-fit:contain}
.npc-fallback{width:100%;height:100%;display:grid;place-items:center;background:radial-gradient(#ffe58a,#f2b632);border:3px solid var(--line);border-radius:50%}
.npc-fallback .icon{width:56%;height:56%;color:var(--wood2)}
/* ---- 集合・招待カード ---- */
.lobby{min-height:100svh;background:linear-gradient(#2b1d14c0,#2b1d14e0),url('world.webp') center/cover;display:flex;align-items:center;justify-content:center;padding:16px}
.lobby-panel{width:min(880px,100%);text-align:center;color:#fff}
.lobby-panel h1{font-size:28px;margin:6px 0 14px;text-shadow:0 3px 0 #000}
.invite-card{display:flex;background:var(--paper);color:var(--ink);border:4px solid var(--line);border-radius:20px;box-shadow:0 6px 0 #000;overflow:hidden;text-align:left;max-width:620px;margin:0 auto}
.invite-art{flex:0 0 38%;background:center/cover no-repeat;border-right:4px solid var(--line);min-height:180px}
.invite-body{padding:14px 16px;flex:1;min-width:0}
.invite-from{font-weight:900;font-size:17px;margin:0}
.invite-mode{font-size:15px;margin:4px 0 8px;color:#6b5640}
.invite-label{font-size:14px;margin:0;font-weight:800}
.invite-code{display:block;letter-spacing:.18em;font-size:30px;font-weight:1000;margin:2px 0 10px;font-family:ui-monospace,Consolas,monospace}
.invite-actions{display:flex;gap:8px;flex-wrap:wrap}
.invite-actions .btn{flex:1 1 auto}
.invite-note{font-size:14px;color:#6b5640;margin:8px 0 0}
.lobby-seats{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:16px 0}
.lobby-seat{background:var(--paper);color:var(--ink);border:3px solid var(--line);border-radius:16px;padding:8px 6px;box-shadow:0 4px 0 #000;display:flex;flex-direction:column;align-items:center;gap:4px}
.lobby-seat .hero{height:110px}
.lobby-seat.empty{background:#ffffff14;color:#f3e2bd;border:3px dashed #f3e2bd88;justify-content:center;min-height:180px;box-shadow:none}
.lobby-seat.empty .icon{width:40px;height:40px}
.seat-index{border-radius:8px;color:#fff;padding:2px 8px;font-size:14px;font-weight:900}
.lobby-seat strong{font-size:16px}
.lobby-seat small,.lobby-seat span{font-size:14px}
.lobby-start{min-width:260px;font-size:19px}
.lobby-info{font-size:14px;color:#f3e2bd;line-height:1.7}
.lobby-back{border:0;background:none;color:#fff;font-size:15px;text-decoration:underline;margin:12px auto;padding:12px;min-height:44px}
/* ---- ゲーム画面 ---- */
.game-shell{height:100dvh;min-height:520px;display:flex;flex-direction:column;overflow:hidden;background:#3a2716}
.g-top{flex:none;display:flex;align-items:center;gap:8px;padding:4px 8px;background:linear-gradient(#8a5a30,#6a4020);border-bottom:3px solid var(--line);color:#fff4d0;min-height:52px;z-index:12}
.brand-small{font-weight:1000;font-size:18px;white-space:nowrap;display:flex;align-items:center;gap:4px;text-shadow:0 2px 0 var(--line)}
.brand-small .icon{color:var(--gold2)}
.day-pill{background:#fff4d0;color:var(--ink);border:2px solid var(--line);border-radius:10px;padding:2px 10px;line-height:1.2;display:flex;flex-direction:column;align-items:center;min-width:76px}
.day-pill b{font-size:16px}.day-pill span{font-size:14px}
.g-objective{font-size:14px;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.watchers{display:flex;align-items:center;gap:3px;font-size:14px;background:#0003;border-radius:8px;padding:4px 8px}
.watchers .icon{width:18px;height:18px}
.connection{font-size:14px;color:#c9f0c8;white-space:nowrap}
.connection.bad{color:#ffd080}
.top-tools{display:flex;gap:6px;margin-left:auto}
.g-players{flex:none;display:grid;grid-template-columns:repeat(4,1fr);gap:6px;padding:6px 8px;background:#5a3a1e;border-bottom:3px solid var(--line);z-index:11}
.pchip{display:flex;align-items:center;gap:6px;text-align:left;background:var(--paper);border:3px solid var(--line);border-radius:12px;padding:3px 8px 3px 3px;min-height:52px;min-width:0;position:relative;box-shadow:inset 6px 0 0 var(--pc)}
.pchip.current{background:#fff0a8;box-shadow:inset 6px 0 0 var(--pc),0 0 0 3px #ffd968,0 0 14px #ffd968}
.pchip.resting{opacity:.7}
.pchip-face{flex:none;width:42px;height:42px;margin-left:5px;border-radius:50%;background:#fff;border:2px solid var(--line);overflow:hidden}
.pchip-face .hero{width:100%;height:100%}
.pchip-body{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
.pchip-name{font-size:14px;font-weight:900;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pchip-no{color:var(--pc);margin-right:3px}
.pchip-gold{font-size:14px;font-weight:900;color:#7a4a10;display:flex;justify-content:space-between;gap:4px;white-space:nowrap}
.pchip-gold em{font-style:normal;color:#6b5640}
.hp-track{height:7px;border:2px solid var(--line);background:#d8cbb0;border-radius:6px;overflow:hidden;display:block}
.hp-track i{display:block;height:100%;width:var(--hp);background:linear-gradient(#8fd877,#3f9b55);transition:width .5s}
.hp-track.low i{background:#e0574e}
.g-stage{flex:1;position:relative;overflow:hidden;isolation:isolate;background:#d8b77a;min-height:0}
.board-svg{position:absolute;inset:0;width:100%;height:100%;touch-action:none;user-select:none;background:#cfae6f}
.board-svg text{font-family:inherit}
.route-shadow{fill:none;stroke:#2b1d14;stroke-width:12;stroke-linecap:round;stroke-opacity:.55}
.route-line{fill:none;stroke:#fff3cf;stroke-width:6;stroke-linecap:round;stroke-dasharray:1 0}
.route-shadow.locked,.route-line.locked{opacity:.18}
.fog{fill:#2b1d14;opacity:.42}
.region-label{fill:#fff8e3;font-size:17px;font-weight:1000;paint-order:stroke;stroke:#2b1d14;stroke-width:5px;pointer-events:none}
.region-label.locked{fill:#e6d5b0}
.node{cursor:pointer;outline:none}
.node-body{stroke:#2b1d14;stroke-width:3}
.node-icon{fill:none;stroke:#2b1d14;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;pointer-events:none}
.node-halo{fill:transparent}
.node.reachable .node-halo{fill:#fff36a;stroke:#fff;stroke-width:3;animation:nodeglow .8s infinite alternate}
.node.locked{opacity:.4}
.node.occupied .node-body{stroke:#d9483f;stroke-width:4}
.node .occ{fill:#fff;font-size:16px;font-weight:1000;paint-order:stroke;stroke:#d9483f;stroke-width:5px}
.node .cleared{fill:#fff;font-size:18px;font-weight:1000;paint-order:stroke;stroke:#2b1d14;stroke-width:4px;pointer-events:none}
.town-lv text{fill:#fff;font-size:12px;font-weight:1000;pointer-events:none}
.town-lv circle{stroke:#2b1d14;stroke-width:2}
.node.flagged{animation:flag .6s ease 2}
.node.raided{animation:raid .35s ease 3}
.node:focus-visible .node-body{stroke:#ff9d1c;stroke-width:5}
.pawn{pointer-events:none;filter:drop-shadow(0 3px 0 #2b1d1490)}
.pawn.active .pawn-body{animation:pawn-bob 1.1s ease-in-out infinite}
.pawn.warping{opacity:.15;transition:opacity .2s}
.pawn-ring{fill:#fff8;stroke-width:3.5}
.pawn-label{font-size:14px;font-weight:1000;paint-order:stroke;stroke:#fff;stroke-width:4px}
.turn-banner{position:absolute;top:8px;left:50%;transform:translateX(-50%);background:var(--paper);border:3px solid var(--line);color:var(--ink);border-radius:30px;padding:6px 18px;text-align:center;z-index:6;max-width:70%;font-size:15px;font-weight:1000;box-shadow:0 3px 0 var(--line);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.map-controls{position:absolute;right:8px;top:8px;display:flex;flex-direction:column;gap:6px;z-index:7}
.map-controls button{border:3px solid var(--line);box-shadow:0 3px 0 var(--line);border-radius:12px;background:var(--paper);width:44px;height:44px;font-size:20px;font-weight:1000;display:grid;place-items:center;padding:0}
.g-dock{z-index:10;flex:none;position:relative;background:linear-gradient(#fff6e0,#f0dcb0);border-top:4px solid var(--line);padding:10px 12px calc(12px + var(--safe));display:flex;gap:14px;align-items:center;max-height:44dvh;overflow-y:auto;overscroll-behavior:contain}
.dock-story{flex:1;min-width:200px;max-width:460px}
.dock-kicker{font-size:14px;letter-spacing:.06em;color:#8a5a20;font-weight:900}
.dock-story h2{margin:2px 0;font-size:19px;line-height:1.35}
.dock-story p{font-size:14px;line-height:1.6;margin:2px 0;color:#5a4630}
.dock-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;justify-content:flex-end;flex:1}
.action-big{min-height:64px;min-width:150px;font-size:19px;border-radius:16px}
.action-big svg{width:28px;height:28px}
.sub-action{flex-direction:column;gap:2px;min-height:64px;min-width:68px;font-size:14px;padding:6px 10px}
.waiting-orb{width:40px;height:40px;border:5px solid #d9c49a;border-top-color:var(--wood);border-radius:50%;animation:spin 1.1s linear infinite;display:inline-block;margin:6px 10px}
.dice-value{width:58px;height:58px;border:4px solid var(--line);box-shadow:var(--shadow);background:#fff;border-radius:14px;display:grid;place-items:center;font-size:32px;font-weight:1000;transform:rotate(-7deg);flex:none}
.dest-list{display:flex;gap:8px;max-width:600px;overflow-x:auto;padding:4px 2px 8px;flex:1;min-width:0}
.dest-btn{min-width:118px;font-size:15px;white-space:nowrap;flex-direction:column;gap:2px;padding:6px 10px;min-height:66px;flex:none}
.dest-btn small{font-size:14px;color:#6b5640;font-weight:700}
.chip{display:inline-block;font-size:14px;padding:3px 8px;border-radius:8px;background:#efe0bf;border:2px solid #c9ad78;color:#6b4a1c;margin:2px;font-weight:800}
.chip.bad{background:#ffd9d4;border-color:#d9483f;color:#8f1f18}
.battle-commands{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:min(560px,100%)}
.command{padding:8px 10px;min-height:62px;justify-content:flex-start;text-align:left;font-size:16px;gap:8px}
.command small{display:block;font-size:14px;margin-top:2px;font-weight:600;line-height:1.35}
.command svg{width:26px;height:26px}
.c-attack{background:linear-gradient(#ffe7d2,#f3c08f)}.c-strike{background:linear-gradient(#ffd3a1,#f39a3e)}.c-magic{background:linear-gradient(#dbeaff,#a9cdf4)}.c-skill{background:linear-gradient(#e9f6d6,#c0e09a)}
.c-guard{background:linear-gradient(#e9eef6,#c3d0e2)}.c-ward{background:linear-gradient(#e6dcff,#c4b3f0)}.c-counter{background:linear-gradient(#ffe0de,#f2a49c)}.c-escape,.c-surrender{background:linear-gradient(#f4f1e8,#dcd4c0)}
/* ---- 戦闘 ---- */
.battle-on .g-players,.ended .g-players{display:none}
.ended .g-dock{padding-top:6px;padding-bottom:calc(6px + var(--safe))}
.ended .g-dock .dock-story p{display:none}
.battle-scene{position:absolute;inset:0;z-index:9;overflow:hidden;background:#8cc3d6 var(--bg) center/cover no-repeat}
.battle-scene:before{content:"";position:absolute;inset:0;background:linear-gradient(#2b1d1430,transparent 35%,#2b1d1440)}
.battle-scene.shake{animation:shake .32s}
.battle-scene.crit-flash:after{content:"";position:absolute;inset:0;background:#fff;animation:flash .35s;z-index:20;pointer-events:none}
.battle-heading{position:absolute;top:8px;left:50%;transform:translateX(-50%);color:#fff4d0;background:#2b1d14e8;border:3px solid var(--gold);border-radius:20px;padding:4px 18px;font-size:15px;font-weight:900;white-space:nowrap;z-index:6}
.battle-plate{position:absolute;top:48px;left:8px;width:calc(50% - 14px);max-width:320px;background:var(--paper);border:3px solid var(--line);border-radius:14px;padding:6px 10px;z-index:5;box-shadow:0 3px 0 var(--line)}
.battle-plate.right{left:auto;right:8px}
.battle-plate strong{font-size:15px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.battle-plate .hp-line{font-size:14px;display:flex;justify-content:space-between;margin:2px 0;font-weight:800}
.battle-plate .hp-track{height:10px}
.plate-sub{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:14px;margin-top:3px;font-weight:700}
.battle-role{font-size:14px;display:inline-block;background:var(--red);color:#fff;border-radius:8px;padding:1px 8px;font-weight:900}
.battle-role.defend{background:var(--blue)}
.gauge{display:inline-flex;gap:3px;align-items:center}
.gauge i{width:14px;height:14px;border-radius:50%;border:2px solid var(--line);background:#fff}
.gauge i.on{background:radial-gradient(#fff6a0,#f39a3e)}
.battle-actor{position:absolute;width:min(40vw,300px);height:min(calc(100% - 150px),320px);bottom:6%;left:4%;z-index:3;animation:battle-idle 2.4s ease-in-out infinite}
.battle-actor.right{left:auto;right:4%;animation-delay:-1.2s}
.battle-actor.left .hero-fig,.battle-actor.left .hero-art{transform:scaleX(-1)}
.battle-actor.boss{width:min(48vw,380px);height:min(calc(100% - 140px),380px)}
.battle-actor.striking{animation:lunge .4s}
.battle-actor.right.striking{animation:lunge-r .4s}
.battle-actor.hit{animation:hit .42s}
.battle-vs{position:absolute;left:50%;top:52%;transform:translate(-50%,-50%) rotate(-9deg);font-size:46px;font-style:italic;font-weight:1000;color:var(--gold2);-webkit-text-stroke:3px var(--line);paint-order:stroke;opacity:.92;z-index:4}
.battle-last{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);background:#2b1d14ee;color:#fff4d0;border:3px solid var(--gold);border-radius:12px;padding:6px 14px;font-size:15px;z-index:8;width:min(92%,640px);text-align:center;line-height:1.5}
.damage-number{position:absolute;top:18%;left:50%;transform:translateX(-50%);font-size:60px;font-weight:1000;color:#fff;-webkit-text-stroke:4px #b8261c;paint-order:stroke;z-index:12;animation:dmg .9s ease-out forwards;pointer-events:none}
.damage-number.crit{font-size:80px;color:#ffe65a}
.damage-number.heal{-webkit-text-stroke-color:#2c8a4b}
.damage-number.miss{font-size:40px;-webkit-text-stroke-color:#3b5f8f}
/* ---- 演出（先攻コイン・手の公開・帯・止まったマス・ルーレット・王様） ---- */
#fx-root{position:fixed;inset:0;z-index:60;pointer-events:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px}
.fx-playing .g-dock{filter:saturate(.7)}
.fx-playing .g-stage:after{content:"画面を押すと早送り";position:absolute;left:8px;bottom:8px;z-index:40;background:#2b1d14d0;color:#fff4d0;font-size:14px;font-weight:800;padding:4px 10px;border-radius:10px;pointer-events:none}
.coin-wrap{display:flex;flex-direction:column;align-items:center;gap:10px}
.coin{width:120px;height:120px;border-radius:50%;background:radial-gradient(#fff3a8,#f2b632 60%,#b5781a);border:5px solid var(--line);display:grid;place-items:center;font-size:48px;font-weight:1000;color:var(--wood2);box-shadow:0 6px 0 var(--line)}
.coin.spin{animation:coin .7s linear}
.coin-text{background:var(--paper);border:3px solid var(--line);border-radius:14px;padding:6px 16px;font-weight:900;font-size:16px;margin:0}
.coin-text.big{font-size:22px;background:var(--gold2)}
.reveal{display:flex;align-items:center;gap:10px}
.rcard{background:var(--paper);border:4px solid var(--line);border-radius:14px;padding:12px 16px;font-size:24px;font-weight:1000;box-shadow:0 5px 0 var(--line);animation:flip .35s ease}
.rcard.r-attack,.rcard.r-strike,.rcard.r-magic,.rcard.r-skill{background:#ffd8b8}
.rcard.r-guard,.rcard.r-ward,.rcard.r-counter,.rcard.r-escape,.rcard.r-surrender{background:#cfe0ff}
.rvs{font-size:24px;font-weight:1000;color:#fff;-webkit-text-stroke:2px var(--line);paint-order:stroke}
.fx-banner{background:var(--paper);border:4px solid var(--line);border-radius:18px;padding:10px 22px;text-align:center;box-shadow:0 6px 0 var(--line);animation:pop .3s ease;max-width:92vw}
.fx-banner b{display:block;font-size:24px;line-height:1.3}
.fx-banner span{display:block;font-size:16px;font-weight:800;margin-top:2px}
.fx-banner.turn{background:var(--gold2)}.fx-banner.win{background:#ffe58a}.fx-banner.lose{background:#d9d2c4}.fx-banner.level{background:#c8f0a8}.fx-banner.town{background:#ffe0a8}.fx-banner.gold{background:#fff0a0}.fx-banner.week{background:#cfe8ff}.fx-banner.raid{background:#ffc4bc}.fx-banner.shard{background:linear-gradient(#fff6b0,#f2b632)}.fx-banner.item{background:#e6dcff}
.land-card{display:flex;align-items:center;gap:12px;background:var(--paper);border:4px solid var(--line);border-radius:18px;padding:10px 16px;box-shadow:0 6px 0 var(--line);animation:pop .3s ease;max-width:92vw}
.land-card b{display:block;font-size:20px}
.land-card span{display:block;font-size:16px;font-weight:700;margin-top:2px}
.lc-img{width:110px;height:110px;object-fit:cover;border-radius:12px;border:3px solid var(--line)}
.lc-icon{width:72px;height:72px}
.lc-svg{width:64px;height:64px;display:grid;place-items:center;background:var(--gold2);border:3px solid var(--line);border-radius:50%}
.lc-svg .icon{width:36px;height:36px}
.roll-overlay{position:fixed;inset:0;z-index:70;padding:12px;background:#2b1d1440;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;pointer-events:none}
.wheels{display:flex;gap:14px}
.wheel-box{position:relative;width:min(56vw,34vh,220px);aspect-ratio:1;margin-top:18px}
.wheels.two .wheel-box{width:min(40vw,28vh,180px)}
.wheel{width:100%;height:100%;filter:drop-shadow(0 6px 0 #2b1d14)}
.wheel.spinning{animation:spin .45s linear infinite}
.wheel-num{font-size:30px;font-weight:1000;fill:#fff;paint-order:stroke;stroke:#2b1d14;stroke-width:5px}
.wheel-pin{position:absolute;top:-8px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:14px solid transparent;border-right:14px solid transparent;border-top:26px solid var(--red);z-index:2;filter:drop-shadow(0 2px 0 #2b1d14)}
.roll-result{font-size:56px;line-height:1;font-weight:1000;color:#fff;-webkit-text-stroke:4px var(--line);paint-order:stroke;opacity:0;min-height:56px}
.roll-result.show{opacity:1;animation:pop .3s ease}
.king-say{display:flex;align-items:flex-end;gap:8px;max-width:min(94vw,600px)}
.king-face{flex:none;width:96px;height:120px;display:flex;align-items:flex-end}
.king-bubble{background:var(--paper);border:4px solid var(--line);border-radius:18px;padding:10px 14px;box-shadow:0 5px 0 var(--line);animation:pop .3s ease}
.king-bubble b{display:block;font-size:19px}
.king-bubble span{display:block;font-size:16px;line-height:1.6;margin-top:3px}
.prank-show{background:var(--paper);border:4px solid var(--line);border-radius:18px;padding:10px 16px;box-shadow:0 6px 0 var(--line);text-align:center;width:min(90vw,340px);animation:pop .3s ease}
.prank-show .hero{height:180px}
.prank-show p{font-size:16px;font-weight:800;margin:6px 0 0;line-height:1.6}
.storm-flash{animation:storm .25s ease 4}
/* ---- 章・市場・道具・順位 ---- */
.chapter-art{height:min(36vh,280px);margin:-20px -16px 12px;background:#d8b77a center/cover no-repeat;border-bottom:4px solid var(--line);position:relative;border-radius:16px 16px 0 0}
.chapter-boss{position:absolute;right:6%;bottom:4%;height:82%;width:40%}
.chapter-no{position:absolute;left:12px;bottom:10px;background:var(--paper);border:3px solid var(--line);border-radius:10px;padding:2px 10px;font-weight:1000;font-size:15px}
.story-wrap{display:flex;gap:12px;align-items:flex-start}
.story-wrap .king-face{width:84px;height:110px}
.story-dialogue{flex:1;min-width:0}
.story-region{font-size:14px;font-weight:900;color:#8a5a20;margin:0!important}
.story-dialogue p{font-size:15px;line-height:1.85}
.story-tip{background:var(--paper2);border:2px solid #d9bf8c;border-radius:12px;padding:10px 12px;font-size:14px;line-height:1.7;margin-top:10px}
.node-preview{display:flex;align-items:center;gap:14px;background:var(--paper2);padding:12px;border-radius:14px;margin:10px 0;border:2px solid #d9bf8c}
.node-preview img,.node-preview .icon{width:52px;height:52px}
.node-preview p{margin:2px 0;font-size:14px}
.node-preview h3{margin:0}
.inventory-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:8px}
.item-card{border:3px solid var(--line);background:#fffdf3;border-radius:14px;padding:10px;display:flex;gap:10px;text-align:left;align-items:center;justify-content:flex-start;min-height:72px;box-shadow:0 3px 0 var(--line);font-weight:400}
.item-card.owned{opacity:.8;box-shadow:none}
.item-card strong{font-size:15px}
.item-card small{display:block;font-size:14px;line-height:1.5;font-weight:600;color:#6b5640;margin-top:2px}
.item-card em{font-style:normal;color:#9a5a10}
.item-symbol{display:grid;place-items:center;background:var(--paper2);border:2px solid #d9bf8c;border-radius:12px;width:48px;height:48px;flex:none;overflow:hidden}
.item-symbol.big{width:64px;height:64px}
.item-symbol .hero{width:100%;height:100%}
.item-img{width:100%;height:100%;object-fit:contain}
.shop-head{display:flex;align-items:center;gap:12px}
.shop-head>img,.shop-head>.npc-fallback{width:84px;height:110px;flex:none}
.shop-head>.npc-fallback{width:72px;height:72px}
.shop-head h2{margin-bottom:2px}
.prank-preview{text-align:center;background:var(--paper2);border-radius:14px;padding:8px;border:2px solid #d9bf8c}
.prank-preview .hero{height:160px}
.prank-preview strong{font-size:18px}
.choice-row{display:flex;flex-wrap:wrap;gap:8px}
.choice-row .btn{flex:1 1 30%;min-width:96px}
.rank-list{list-style:none;margin:12px 0;padding:0}
.rank-row{display:flex;align-items:center;gap:8px;border-bottom:2px dashed #d9bf8c;padding:8px 2px}
.rank-num{font-size:22px;color:#9a6a10;font-weight:1000;width:24px;text-align:center}
.rank-face{width:46px;height:46px;flex:none;border:2px solid var(--line);border-radius:50%;background:#fff;overflow:hidden}
.rank-info{flex:1;min-width:0}
.rank-info strong{font-size:15px}
.rank-info small{display:block;font-size:14px;color:#6b5640;font-weight:600}
.worth-bar{display:flex;height:10px;border-radius:5px;overflow:hidden;background:#eadcbc;margin-top:4px;border:1px solid #c9ad78}
.worth-bar i,.legend i{display:inline-block;height:100%}
.wb-gold{background:#f2b632}.wb-towns{background:#3f9b66}.wb-equip{background:#3b7fd6}.wb-items{background:#b07ad6}.wb-renown{background:#d9483f}
.legend{font-size:14px;display:flex;flex-wrap:wrap;gap:6px 12px;align-items:center}
.legend span{white-space:nowrap}
.legend i{width:14px;height:14px;border-radius:3px;vertical-align:-2px;margin-right:3px}
.rank-worth{font-size:16px;font-weight:1000;color:#7a4a10;white-space:nowrap}
.rank-worth small{font-size:14px}
.profile-head{display:flex;align-items:center;gap:12px}
.profile-head .hero{width:120px;height:150px;flex:none}
.profile-head h2{margin:0}
.profile-head p{margin:4px 0}
.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:10px}
.stat{background:var(--paper2);border-radius:10px;padding:8px 4px;text-align:center;font-size:14px;border:2px solid #d9bf8c}
.stat strong{display:block;font-size:18px;margin-top:2px}
.profile-towns{font-size:14px!important;line-height:1.8!important}
.log-list{list-style:none;padding:0;margin:10px 0;max-height:60vh;overflow:auto}
.log-list li{font-size:14px;line-height:1.7;padding:7px 4px;border-bottom:1px dashed #d9bf8c}
.log-list time{display:inline-block;font-size:14px;padding:0 6px;background:#efe0bf;border-radius:6px;margin-right:6px}
.log-list li.victory,.log-list li.chapter{color:#9a6a10;font-weight:900}
.log-list li.defeat,.log-list li.raid{color:#b42d24}
.settings-line{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:2px dashed #d9bf8c;font-size:15px}
.settings-line input[type=range]{width:150px;height:32px}
.help-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.help-step{padding:10px 12px;border-radius:12px;background:var(--paper2);border:2px solid #d9bf8c}
.help-step b{display:block;margin-bottom:4px;font-size:15px}
.help-step p{font-size:14px!important;margin:0!important}
.tp-table-wrap{overflow-x:auto}
.help-table{border-collapse:collapse;width:100%;font-size:14px;margin:8px 0;min-width:300px}
.help-table th,.help-table td{padding:8px 6px;border-bottom:2px solid #d9bf8c;text-align:left}
.help-table th{background:#efe0bf}
.audio-credits p{font-size:14px!important}
/* ---- 結果 ---- */
.result-scene{position:absolute;inset:0;z-index:20;background:linear-gradient(#2b1d14a8,#2b1d14e8),var(--end) center/cover no-repeat;display:flex;flex-direction:column;align-items:center;overflow:auto;padding:16px 12px 24px;color:#fff4d0}
.result-scene .eyebrow{font-size:14px}
.crowning{position:relative;width:min(200px,30vh);height:min(220px,32vh);flex:none}
.falling-crown{position:absolute;left:50%;top:-6px;transform:translateX(-50%);color:var(--gold2);animation:crown-fall 1.2s cubic-bezier(.3,1.4,.6,1) both}
.falling-crown .icon{width:64px;height:64px;stroke:#2b1d14;stroke-width:2;fill:#ffd968}
.result-scene h1{font-size:clamp(26px,5vw,44px);margin:6px 0;text-shadow:0 3px 0 #000;text-align:center}
.result-sub{font-size:15px;margin:0 0 6px}
.stamp-award{background:var(--gold2);color:var(--ink);border:3px solid var(--line);border-radius:12px;padding:4px 14px;font-weight:1000;font-size:16px;margin:4px 0}
.result-scene .rank-list{background:var(--paper);color:var(--ink);width:min(520px,100%);padding:2px 12px;border:4px solid var(--line);border-radius:16px;margin:8px 0}
.awards{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin:4px 0 10px;max-width:560px}
.award{background:var(--paper);color:var(--ink);border:3px solid var(--line);border-radius:12px;padding:4px 10px;font-size:14px;font-weight:800}
.award b{color:#9a5a10;margin-right:6px}
.result-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}
.confetti{position:absolute;top:-15px;width:10px;height:15px;opacity:.9;animation:confetti 5s linear infinite;pointer-events:none}
.hotseat-cover{position:absolute;inset:0;z-index:35;display:flex;align-items:center;justify-content:center;background:#2b1d14f2;color:#fff;text-align:center;padding:16px}
.hotseat-cover .hero{width:160px;height:180px;margin:0 auto}
.hotseat-cover h2{font-size:24px}
.hotseat-cover p{font-size:15px;line-height:1.7}
#toast{position:fixed;z-index:200;bottom:calc(16px + var(--safe));left:50%;transform:translate(-50%,15px);opacity:0;transition:.2s;background:#2b1d14f2;color:#fff4d0;border:3px solid var(--gold);border-radius:12px;padding:10px 18px;max-width:92vw;font-size:15px;pointer-events:none;text-align:center}
#toast.show{opacity:1;transform:translate(-50%,0)}
.noscript{position:fixed;inset:20%;background:#fff;padding:24px;z-index:300;font-size:16px}
.no-motion *,.no-motion *:before,.no-motion *:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}
@keyframes reveal{from{opacity:0}to{opacity:1}}
@keyframes spin{to{transform:rotate(360deg)}}
@keyframes pawn-bob{50%{transform:translateY(-4px)}}
@keyframes nodeglow{to{opacity:.55}}
@keyframes battle-idle{50%{translate:0 -6px}}
@keyframes hit{20%,60%{translate:-12px 0;filter:brightness(2.2)}40%,80%{translate:12px 0}100%{translate:0 0}}
@keyframes lunge{45%{translate:70px -10px}}
@keyframes lunge-r{45%{translate:-70px -10px}}
@keyframes shake{20%{translate:-6px 3px}40%{translate:6px -3px}60%{translate:-4px 2px}80%{translate:4px -2px}}
@keyframes dmg{0%{opacity:0;translate:0 15px;scale:.6}25%{opacity:1;scale:1.2}60%{opacity:1;scale:1}100%{opacity:0;translate:0 -60px}}
@keyframes flash{0%,100%{opacity:0}30%{opacity:.85}}
@keyframes pop{0%{transform:scale(.6);opacity:0}70%{transform:scale(1.06);opacity:1}100%{transform:scale(1)}}
@keyframes flip{0%{transform:rotateY(90deg)}100%{transform:rotateY(0)}}
@keyframes coin{to{transform:rotateY(1080deg)}}
@keyframes flag{50%{transform:scale(1.4)}}
@keyframes raid{25%{translate:-3px 0}75%{translate:3px 0}}
@keyframes storm{50%{filter:brightness(2) saturate(.3)}}
@keyframes crown-fall{0%{transform:translate(-50%,-120px) rotate(-20deg);opacity:0}100%{transform:translate(-50%,0) rotate(0);opacity:1}}
@keyframes confetti{0%{translate:0 -50px;rotate:0}100%{translate:60px 110vh;rotate:760deg}}
/* ---- 画面の大きさ ---- */
@media(max-width:899px){
 .brand-small span{display:none}
 .connection{display:none}
 .g-players{grid-template-columns:1fr 1fr;gap:5px;padding:5px 6px}
 .pchip{min-height:48px}
 .pchip-face{width:38px;height:38px}
 .g-dock{display:block;padding:8px 10px calc(10px + var(--safe))}
 .dock-story{max-width:none;min-width:0;margin-bottom:8px}
 .dock-actions{justify-content:stretch;flex-wrap:wrap}
 .dock-actions>.btn{flex:1 1 auto}
 .action-big{min-width:0;flex:2 1 160px!important}
 .dest-list{width:100%;max-width:none;flex:1 1 100%}
 .battle-commands{width:100%}
}
@media(max-width:640px){
 .g-top{gap:6px;padding:4px 6px;min-height:50px}
 .g-objective{display:none}
 .top-tools{gap:4px}
 .top-tools .sound-tool{display:none}
 .day-pill{min-width:70px;padding:1px 6px}
 .job-card .hero{height:64px}
 .job-card strong{font-size:14px}
 .lobby-seats{grid-template-columns:1fr 1fr}
 .lobby-seat .hero{height:86px}
 .invite-card{flex-direction:column}
 .invite-art{flex:none;height:110px;min-height:0;border-right:0;border-bottom:4px solid var(--line)}
 .inventory-grid{grid-template-columns:1fr}
 .help-grid{grid-template-columns:1fr}
 .battle-plate{top:44px;padding:4px 8px}
 .battle-actor{width:46vw;height:calc(100% - 140px);bottom:4%;left:1%}
 .battle-actor.right{right:1%}
 .battle-actor.boss{width:54vw;height:calc(100% - 130px)}
 .battle-vs{font-size:34px}
 .damage-number{font-size:46px}
 .damage-number.crit{font-size:60px}
 .command{min-height:58px;font-size:15px;padding:6px 8px;gap:6px}
 .command svg{width:22px;height:22px}
 .dock-story h2{font-size:18px}
 .stats-grid{grid-template-columns:repeat(3,1fr)}
 .profile-head .hero{width:96px;height:120px}
 .fx-banner b{font-size:21px}
 .rcard{font-size:20px;padding:10px 12px}
 .king-face{width:76px;height:96px}
 .title-menu>.btn{font-size:17px}
 .modal h2{font-size:20px}
}
@media(max-height:560px) and (min-width:641px){
 .g-players{grid-template-columns:repeat(4,1fr)}
 .g-dock{max-height:46dvh}
 .title-copy{padding:10px 0 60px}
 .game-logo{font-size:52px}
 .title-tagline{margin:10px 0 0}
 .title-note{display:none}
}
@media(max-height:820px) and (min-width:641px){
 .title-copy{padding:10px 0 64px}
 .game-logo{font-size:64px}
 .title-tagline{margin:12px 0 2px}
 .title-menu{gap:8px;margin-top:12px}
 .title-note{margin-top:8px}
}
@media(max-height:720px) and (max-width:640px){
 .title-copy{padding:14px 0 70px}
 .eyebrow{margin-bottom:4px}
 .game-logo{font-size:48px}
 .title-tagline{margin:12px 0 2px;font-size:15px}
 .title-menu{gap:7px;margin-top:10px}
 .title-menu>.btn{min-height:46px;padding:8px 12px;font-size:16px}
 .title-secondary{gap:7px}
 .title-secondary .btn{min-height:44px;padding:6px}
 .title-note{margin-top:8px;line-height:1.5}
}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}}
/* ---- 2.0.1 盤を大きく（ユーザー 10/14 夜「肝心のゲーム画面が小さすぎる」）: 札は盤の上に重ね、操作欄は場面ごとに薄く、情報は引き出しへ ---- */
.g-top{min-height:46px;padding:3px 8px}
.info-tool{width:auto;padding:4px 10px;gap:4px;display:flex;align-items:center;font-weight:900;font-size:15px}
.g-stage .g-players{position:absolute;top:6px;left:6px;right:6px;z-index:8;background:none;border:0;padding:0;pointer-events:none;gap:6px}
.g-stage .g-players .pchip{pointer-events:auto;background:#fff6e0ee;box-shadow:inset 6px 0 0 var(--pc),0 3px 0 #2b1d1460}
.g-stage .g-players .pchip.current{background:#fff0a8f2}
.pchip-face{position:relative;overflow:visible}
.pchip-face>.hero{border-radius:50%;overflow:hidden}
.g-unit{font-style:normal}
.pchip-rank{position:absolute;right:-6px;bottom:-5px;min-width:20px;height:20px;border-radius:10px;background:var(--line);color:#fff4d0;font-size:14px;line-height:20px;text-align:center;padding:0 4px;z-index:3}
.turn-banner{top:auto;bottom:10px;left:10px;transform:none;font-size:14px;padding:4px 12px;max-width:52%}
.map-controls{top:auto;bottom:8px;right:8px;flex-direction:row;gap:6px}
.map-controls button{width:44px;height:44px;background:#fff6e0e6}
.g-dock{padding:8px 12px calc(8px + var(--safe));gap:10px}
.g-dock .dock-story h2{font-size:18px}
.ph-ready .dock-story p,.ph-move .dock-story p,.ph-wait .dock-story p,.ph-watch .dock-story p{display:none}
.modal.m-info .info-tabs{display:flex;gap:8px;margin:6px 0 4px}
.modal.m-info .info-tabs .btn{flex:1}
.info-people{display:flex;flex-wrap:wrap;gap:6px}
.info-people .btn{flex:1 1 45%}
.battle-scene .battle-actor{bottom:3%}
.battle-on .map-controls,.battle-on .turn-banner{display:none}
@media(min-width:900px){
 .g-stage .g-players{left:8px;right:auto;width:min(900px,62%)}
 .g-dock{min-height:0}
}
@media(max-width:899px){
 .g-stage .g-players{grid-template-columns:repeat(4,1fr);gap:4px;top:4px;left:4px;right:4px}
 .g-stage .g-players .pchip{min-height:40px;padding:2px 6px 2px 2px;gap:4px;border-width:2px;border-radius:10px;box-shadow:inset 4px 0 0 var(--pc),0 2px 0 #2b1d1460}
 .g-stage .g-players .pchip.current{box-shadow:inset 4px 0 0 var(--pc),0 0 0 2px #ffd968}
 .g-stage .g-players .pchip-face{width:32px;height:32px;margin-left:3px}
 .g-stage .g-players .pchip-name{display:none}
 .g-stage .g-players .pchip-gold em{display:none}
 .g-stage .g-players .hp-track{height:5px;border-width:1px}
 .g-stage .g-players .look-badge{display:none}
 .g-dock{display:block;padding:6px 8px calc(6px + var(--safe));max-height:42dvh}
 .g-dock .dock-kicker{display:none}
 .g-dock .dock-story{margin-bottom:5px}
 .g-dock .dock-story h2{font-size:16px;margin:0}
 .g-dock .dock-story p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;margin:2px 0 0}
 .ph-ready .dock-story p,.ph-move .dock-story p,.ph-wait .dock-story p,.ph-watch .dock-story p,.ph-battle .dock-story p{display:none}
 .action-big{min-height:52px;font-size:18px}
 .sub-action{min-height:52px;min-width:60px;padding:4px 8px}
 .dock-actions{gap:6px}
 .dest-btn{min-height:54px;padding:4px 8px}
 .dice-value{width:48px;height:48px;font-size:26px}
 .battle-commands{gap:6px}
 .command{min-height:50px;padding:4px 8px}
 .waiting-orb{width:30px;height:30px;margin:2px 10px}
 .battle-heading{top:4px;font-size:14px;padding:2px 12px}
 .battle-plate{top:32px;padding:3px 8px}
 .battle-actor{height:calc(100% - 118px)}
 .battle-actor.boss{height:calc(100% - 108px)}
}
@media(max-width:380px){
 .g-stage .g-players .pchip-gold{font-size:14px;letter-spacing:-.02em}
 .g-stage .g-players .pchip{padding-right:3px}
 .g-stage .g-players .g-unit{display:none}
}
@media(max-width:640px){
 .modal-backdrop:has(.m-info){align-items:flex-end;padding:0}
 .modal.m-info{border-radius:20px 20px 0 0;max-height:78dvh;width:100%}
 .info-tool span{display:none}
}
/* SNDFIX1015 観戦の音の案内 */
.snd-hint{position:absolute;left:50%;top:auto;bottom:62px;transform:translateX(-50%);z-index:12;display:flex;align-items:center;gap:8px;background:#2b1d14e8;color:#fff4d0;border:3px solid var(--gold);border-radius:30px;padding:10px 18px;font-size:16px;font-weight:900;min-height:48px;box-shadow:0 4px 0 #000}
.snd-hint .icon{width:24px;height:24px}
/* ---- 2.0.3 タイトルの絵を主役に（ユーザー 10/15 06:50「後ろの画像が見えないのはもったいない」）。暗い幕を外し、文字とボタンは絵の外か空いた所へ ---- */
.title-art:after{background:none}
.title-screen{flex-direction:column;justify-content:flex-start;background:#2b1d14}
.title-art{animation:none}
@media(min-aspect-ratio:1/1){
 .title-art{background-size:cover;background-position:50% 38%}
 .title-art:after{background:linear-gradient(90deg,#2b1d14b0 0,#2b1d1400 34%),linear-gradient(0deg,#2b1d14d8 0,#2b1d1400 26%)}
 .title-copy{position:absolute;inset:auto 0 50px 0;width:auto;padding:0 16px;display:flex;flex-direction:column;align-items:center}
 .title-copy .eyebrow,.title-copy .game-logo,.title-copy .title-tagline{position:fixed;left:22px;text-align:left}
 .title-copy .eyebrow{top:14px;font-size:15px}
 .title-copy .game-logo{top:36px;font-size:54px;transform:rotate(-3deg);transform-origin:left top}
 .title-copy .game-logo span{display:inline;font-size:1.15em;margin-left:.1em}
 .title-copy .title-tagline{top:104px;font-size:16px;margin:0}
 .title-menu{flex-direction:row;flex-wrap:wrap;justify-content:center;width:min(1080px,100%);gap:8px;margin:0}
 .title-menu>.btn{flex:1 1 180px;font-size:16px;min-height:48px}
 .title-secondary{display:contents}
 .title-secondary .btn{flex:1 1 120px;font-size:15px}
 .title-note{display:none}
}
@media(max-aspect-ratio:1/1){
 .title-art{position:relative;inset:auto;flex:none;width:100%;height:clamp(66.6vw,calc(100svh - 545px),76vw);background-size:cover;background-position:50% 45%}
 .title-footer{z-index:2}
 .title-copy:has(.title-menu>button:nth-of-type(3)) .title-note{display:none}
 .title-art:after{background:linear-gradient(0deg,#2b1d14 0,#2b1d1400 18%)}
 .title-copy{position:relative;width:min(560px,94%);margin:0 auto;padding:6px 0 64px}
 .title-copy .eyebrow{font-size:14px;margin:0 0 2px}
 .title-copy .game-logo{font-size:44px;transform:rotate(-2deg)}
 .title-copy .game-logo span{display:inline;font-size:1.12em;margin-left:.08em}
 .title-tagline{margin:8px 0 2px;font-size:15px}
 .title-menu{margin-top:8px;gap:8px}
 .title-note{margin-top:8px}
}
@media(max-aspect-ratio:1/1) and (max-height:700px){
 .title-copy{padding-bottom:58px}
 .title-copy .eyebrow{display:none}
 .title-copy .game-logo{font-size:38px}
 .title-tagline{margin:4px 0 0;font-size:14px}
 .title-menu{margin-top:6px;gap:6px}
 .title-menu>.btn{min-height:46px;padding:6px 12px}
 .title-secondary{gap:6px}
 .title-secondary .btn{min-height:44px;padding:4px 6px}
 .title-note{display:none}
}
/* ---- 2.0.4 CRV204_1015 タイトル: 横向きの低い画面はボタンを1段にまとめて主人公の口元を空ける／縦に長いスマホは絵を伸ばして下の余白を埋める（絵は見せたまま） ---- */
@media(min-aspect-ratio:1/1) and (max-height:500px){
 .title-menu{gap:6px}
 .title-menu>.btn,.title-secondary .btn{flex:1 1 auto;min-height:44px;padding:6px 12px;font-size:15px;white-space:nowrap}
}
@media(max-aspect-ratio:1/1){
 .title-art{flex:1 0 auto;max-height:84vw}
 .title-copy{margin-block:auto}
}
/* 横向きの低い画面（高さ520px未満）: 盤面を画面の高さに収め、ルーレット・道具・地図の段を画面の中に出す（前からの不具合。min-height:520px で下にはみ出していた） */
@media(max-height:519px){
 .game-shell{min-height:0}
}
@media(max-aspect-ratio:1/1) and (min-height:780px){
 .title-copy .game-logo{font-size:50px}
 .title-menu{gap:10px;margin-top:14px}
 .title-menu>.btn{min-height:54px}
 .title-secondary{gap:10px}
 .title-secondary .btn{min-height:50px}
 .title-note{margin-top:14px}
}
