/* レース対戦（相撲）：土俵の土の茶と、藍、金。アプリの丸いカード・LINE Seed JP に合わせる（競馬の race.css と同じ作り） */
:root{--ink:#221a14;--deep:#1b1512;--turf:#8a5a2b;--gold:#e8c45a;--accent:#d07a3a;--red:#e0523a;--indigo:#2f3b4f;--card:rgba(255,253,248,.95);--glass:rgba(20,14,10,.68);
  --sat:env(safe-area-inset-top,0px);--sab:env(safe-area-inset-bottom,0px);--sal:env(safe-area-inset-left,0px);--sar:env(safe-area-inset-right,0px)}
*{box-sizing:border-box}
[hidden]{display:none!important}
html,body{height:100%;margin:0}
body{overflow:hidden;color:var(--ink);font-family:"LINE Seed JP","Hiragino Sans","Noto Sans JP",sans-serif;line-height:1.6;
  background:repeating-linear-gradient(135deg,rgba(255,255,255,.03) 0 2px,transparent 2px 14px),linear-gradient(180deg,rgba(20,14,10,.5),rgba(20,14,10,.9)),var(--deep);
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none}
button{font:inherit;color:inherit}
#view{position:fixed;inset:0;width:100%;height:100%;display:block;outline:none}
/* 準備・結果の画面では3Dの上に稽古場の写真（あれば）と影 */
.r-backdrop{position:fixed;inset:0;pointer-events:none;opacity:0;transition:opacity .4s;
  background:repeating-linear-gradient(135deg,rgba(255,255,255,.035) 0 2px,transparent 2px 16px),radial-gradient(120% 90% at 30% 20%,rgba(20,14,10,.2),rgba(20,14,10,.8))}
body.is-setup .r-backdrop{opacity:1;background:repeating-linear-gradient(135deg,rgba(255,255,255,.035) 0 2px,transparent 2px 16px),linear-gradient(180deg,rgba(20,14,10,.35),rgba(20,14,10,.75)),url(../media/game/keikoba.jpg) center/cover no-repeat}
body.is-result .r-backdrop{opacity:1}

.r-loading{position:fixed;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:#fff;font-weight:700;z-index:20;text-shadow:0 2px 8px rgba(0,0,0,.6);
  background:repeating-linear-gradient(135deg,rgba(255,255,255,.035) 0 2px,transparent 2px 14px),linear-gradient(180deg,rgba(20,14,10,.35),rgba(20,14,10,.85)),var(--deep) url(../media/game/sumo-loading.jpg) center/cover no-repeat}
.r-loading small{font-size:12px;opacity:.85}
.r-spin{width:42px;height:42px;border-radius:50%;border:4px solid rgba(255,255,255,.25);border-top-color:var(--gold);animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* カード・ボタン */
.r-card{background:var(--card);border-radius:18px;box-shadow:0 18px 50px rgba(0,0,0,.35)}
.r-btn{display:inline-flex;align-items:center;justify-content:center;min-height:48px;padding:0 22px;border-radius:99px;border:0;background:#f0e8de;color:var(--ink);font-weight:800;font-size:16px;cursor:pointer}
.r-btn:focus-visible,.r-chip:focus-visible,.r-seg button:focus-visible{outline:3px solid var(--gold);outline-offset:2px}
.r-primary{background:linear-gradient(180deg,#a8703a,#7a4a20);color:#fff;box-shadow:0 4px 14px rgba(122,74,32,.4)}
.r-btns{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:12px}
.r-note{margin:6px 0 0;font-size:12px;opacity:.72;line-height:1.5}
.r-chip{min-height:36px;padding:0 14px;border-radius:99px;border:0;background:rgba(138,90,43,.13);font-weight:700;font-size:13px;cursor:pointer}
.r-err{margin:6px 0 0;color:#b8361f;font-size:13px;font-weight:700;line-height:1.5}
.r-err:empty{display:none}

/* 準備 */
.r-setup{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:calc(10px + var(--sat)) calc(12px + var(--sar)) calc(10px + var(--sab)) calc(12px + var(--sal))}
.r-setup-card{width:min(900px,100%);max-height:100%;display:flex;flex-direction:column;overflow:hidden}
.r-setup-head{display:flex;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px 10px;padding:12px 16px 8px;border-bottom:1px solid rgba(0,0,0,.06)}
.r-setup-head>div{flex:1 1 150px;min-width:0} /* 狭い画面では見出しを150px以上残し、ボタン類は次の行（右寄せ）へ送る（1文字ずつ縦に折れないように） */
.r-setup-head small{font-size:11px;font-weight:700;letter-spacing:.18em;color:var(--turf)}
.r-setup-head h1{margin:0;font-size:19px;line-height:1.3;font-weight:800}
.r-back{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:50%;background:rgba(0,0,0,.06);text-decoration:none;font-size:26px;line-height:1;color:inherit}
.r-setup-grid{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;touch-action:pan-y;display:grid;grid-template-columns:1fr 1fr;gap:4px 18px;padding:8px 16px}
.r-col{min-width:0}
fieldset{border:0;margin:0 0 8px;padding:0;min-width:0}
legend{font-weight:800;font-size:14px;padding:0;margin-bottom:4px}
legend small{font-weight:700;font-size:12px;color:var(--turf);margin-left:6px}
.r-seg{display:flex;flex-wrap:wrap;gap:6px}
.r-seg button{min-height:40px;padding:0 12px;border-radius:12px;border:2px solid transparent;background:#fff;box-shadow:0 1px 4px rgba(0,0,0,.08);font-weight:700;font-size:14px;cursor:pointer}
.r-seg button.on{border-color:var(--turf);background:#f7eee3;color:#5a3610}
.r-seg-s button{min-height:36px;padding:0 10px;font-size:13px}
.r-row{display:flex;align-items:center;gap:10px;margin:6px 0}
.r-row>span{flex:none;width:4.2em;font-size:13px;font-weight:700;opacity:.8}
.r-field{display:flex;align-items:center;gap:10px}
.r-field span{flex:none;width:4.2em;font-size:13px;font-weight:700;opacity:.8}
.r-field input{flex:1;min-width:0;min-height:40px;border-radius:12px;border:2px solid #e2d6c8;padding:0 12px;font:inherit;font-size:16px;font-weight:700;background:#fff;-webkit-user-select:text;user-select:text}
.r-field input:focus{outline:none;border-color:var(--turf)}
.r-swatches{display:flex;flex-wrap:wrap;gap:6px}
.r-swatches button{width:30px;height:30px;border-radius:50%;border:3px solid #fff;box-shadow:0 0 0 1px rgba(0,0,0,.15);cursor:pointer;padding:0}
.r-swatches button.on{box-shadow:0 0 0 3px var(--turf)}
.r-stat{display:grid;grid-template-columns:4.2em 1fr 5.6em;align-items:center;gap:8px;margin:2px 0}
.r-stat span{font-size:13px;font-weight:700;opacity:.8}
.r-stat b{text-align:right;font-variant-numeric:tabular-nums;font-size:13px}
.r-stat input{width:100%;accent-color:var(--turf);touch-action:pan-x}
.r-toggle{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;min-height:36px;cursor:pointer}
.r-toggle input{width:20px;height:20px;accent-color:var(--turf)}
.r-setup-foot{padding:8px 16px 12px;border-top:1px solid rgba(0,0,0,.06);display:flex;justify-content:flex-end;align-items:center;gap:10px}
.r-setup-foot .r-err{flex:1;margin:0}
.r-setup-foot .r-btn{min-width:200px;font-size:18px}

/* 取組中の表示 */
.r-hud{position:fixed;inset:0;pointer-events:none;color:#fff;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.r-hud button{pointer-events:auto}
.b-panel{position:absolute;top:calc(8px + var(--sat));width:min(250px,30vw);background:var(--glass);border-radius:14px;padding:5px 10px 7px}
.b-me{left:calc(10px + var(--sal))}
.b-op{right:calc(10px + var(--sar));text-align:right}
.b-name{font-size:16px;font-weight:800;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.b-name .you{display:inline-block;margin-left:5px;padding:0 5px;border-radius:5px;background:#d65c34;color:#fff;font-size:13px;font-weight:800;vertical-align:1px;line-height:1.35}
.cpu{display:inline-block;margin-left:5px;padding:0 5px;border-radius:5px;background:#5b6b64;color:#fff;font-size:13px;font-weight:800;letter-spacing:.06em;vertical-align:1px;line-height:1.35;text-shadow:none}
.ghost{display:inline-block;margin-left:5px;padding:0 5px;border-radius:5px;background:#6a5bb0;color:#fff;font-size:13px;font-weight:800;vertical-align:1px;line-height:1.35}
.b-gauge{display:grid;grid-template-columns:3.3em 1fr auto;align-items:center;gap:6px;margin-top:3px}
.b-op .b-gauge{direction:rtl}
.b-gauge span{font-size:13px;font-weight:800;opacity:.9;direction:ltr}
.b-gauge small{font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;min-width:2.8em;direction:ltr}
.b-gauge i{display:block;height:9px;border-radius:99px;background:rgba(255,255,255,.18);overflow:hidden}
.b-gauge em{display:block;height:100%;width:100%;border-radius:99px;background:#7fd46a;transition:width .12s}
.b-edge em{background:linear-gradient(90deg,#e0523a,#e8b04a 30%,#d8c7a8)}
.b-edge em.warn{animation:blink .35s steps(2) infinite}
@keyframes blink{50%{opacity:.35}}
.b-center{position:absolute;left:50%;top:calc(6px + var(--sat));transform:translateX(-50%);display:flex;flex-direction:column;align-items:center;gap:4px}
.b-clock{display:flex;align-items:baseline;gap:6px;background:var(--glass);border-radius:12px;padding:0 12px}
.b-clock small{font-size:13px;font-weight:800;color:var(--gold);letter-spacing:.08em}
.b-clock b{font-size:20px;font-variant-numeric:tabular-nums;line-height:1.35}
.b-hands{background:var(--glass);border-radius:12px;padding:2px 8px 4px;text-align:center}
.b-hands canvas{display:block;width:150px;height:75px;margin:0 auto}
.b-hands p{margin:0;font-size:10.5px;font-weight:700;line-height:1.35;white-space:nowrap}
.b-hands p b{font-weight:800}
.b-tools{position:absolute;right:calc(10px + var(--sar));top:calc(92px + var(--sat));display:flex;gap:6px}
.r-mini{min-width:44px;min-height:38px;border-radius:12px;border:0;background:var(--glass);color:#fff;font-weight:800;font-size:13px;cursor:pointer;padding:0 8px}
.b-edgewarn{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);font-size:min(26px,7vh);font-weight:800;color:#ff6a4a;text-shadow:0 0 14px rgba(255,60,30,.6),0 2px 6px rgba(0,0,0,.8);animation:blink .5s steps(2) infinite;letter-spacing:.06em;opacity:.9}
/* 腰の安定（重心）のゲージ：土俵際の距離は押し合いのバーにまとめたので出さない */
.b-panel .b-edge{display:none}
.b-gauge{grid-template-columns:auto 1fr}
.b-gauge i{height:11px}
/* 押し合いのバー：左端＝あなたの側の俵・右端＝相手の側の俵。白い印がどちらの俵に近いか、矢印がいま押している向き */
.b-tug{display:flex;align-items:center;gap:4px;width:min(300px,34vw);background:var(--glass);border-radius:99px;padding:4px 8px}
.b-tug .t-track{position:relative;flex:1;height:10px;border-radius:99px;background:linear-gradient(90deg,#8fa3b8,#6c7f94);overflow:visible}
.b-tug .t-me-fill{position:absolute;left:0;top:0;bottom:0;width:50%;border-radius:99px 0 0 99px;background:linear-gradient(90deg,#ff7a3d,#ffa25e)}
.b-tug .t-mark{position:absolute;top:-4px;bottom:-4px;left:50%;width:4px;margin-left:-2px;border-radius:2px;background:#fff;box-shadow:0 0 6px rgba(0,0,0,.6)}
.b-tug .t-mark u{position:absolute;top:50%;width:0;height:0;margin-top:-6px;border:6px solid transparent;opacity:0;transition:opacity .15s}
.b-tug .t-mark u.r{left:6px;border-left:9px solid #fff;border-right:0}
.b-tug .t-mark u.l{right:6px;border-right:9px solid #fff;border-left:0}
.b-tug .t-end{width:6px;height:16px;border-radius:3px;background:#d8c38f;box-shadow:inset 0 0 0 1px rgba(80,60,30,.5)}
.b-tug .t-end.warn{background:#ff5a3c;box-shadow:0 0 8px #ff5a3c;animation:blink .35s steps(2) infinite}
/* 土俵際の色（画面のふち）：あなたが俵なら赤、相手が俵ならうすい金 */
.b-danger{position:absolute;inset:0;pointer-events:none;opacity:0;transition:opacity .12s}
.b-danger.me{background:radial-gradient(ellipse at center,rgba(255,40,20,0) 52%,rgba(220,30,10,.55) 100%)}
.b-danger.op{background:radial-gradient(ellipse at center,rgba(255,210,90,0) 58%,rgba(255,200,80,.35) 100%)}
.r-msg{position:absolute;left:50%;top:34%;transform:translate(-50%,-50%);font-size:22px;font-weight:800;white-space:nowrap;opacity:0;transition:opacity .25s;background:var(--glass);padding:6px 18px;border-radius:99px}
.r-msg.on{opacity:1}
.r-keys{position:absolute;left:50%;bottom:calc(8px + var(--sab));transform:translateX(-50%);font-size:11px;font-weight:700;opacity:.82;background:var(--glass);padding:3px 12px;border-radius:99px;white-space:nowrap}
body.is-touch .r-keys{display:none}
body.is-intro .r-hud,body.is-result .r-hud,body.is-replay .r-hud{opacity:0;pointer-events:none}
body.is-intro .r-hud *,body.is-result .r-hud *,body.is-replay .r-hud *{pointer-events:none}

/* 仕切り：呼吸と立ち合い */
.b-breath{position:absolute;left:50%;bottom:calc(44px + var(--sab));transform:translateX(-50%);width:min(360px,46vw);background:var(--glass);border-radius:14px;padding:4px 12px 5px;text-align:center}
.b-breath span{font-size:11px;font-weight:800}
.b-breath i{position:relative;display:block;height:12px;border-radius:99px;background:rgba(255,255,255,.16);overflow:hidden;margin:2px 0}
.b-breath em{display:block;height:100%;width:0;border-radius:99px;background:linear-gradient(90deg,#6aa8ff,#e8c45a)}
.b-breath .zone{position:absolute;right:0;top:0;bottom:0;width:15%;border-left:2px solid #fff;background:rgba(255,255,255,.18)}
.b-breath u{position:absolute;top:-2px;bottom:-2px;width:3px;margin-left:-1px;background:#ff8a64;border-radius:2px}
.b-breath small{font-size:10px;opacity:.85}
.b-breath.ready em{background:linear-gradient(90deg,#e8c45a,#fff2b0)}
.b-charge{position:absolute;left:50%;top:58%;transform:translate(-50%,-50%);width:150px;height:150px;border-radius:50%;border:5px solid rgba(255,255,255,.85);background:radial-gradient(circle at 35% 30%,#d79a5c,#7a4a20);color:#fff;font-size:26px;font-weight:800;box-shadow:0 8px 26px rgba(0,0,0,.45);pointer-events:auto;touch-action:none;opacity:.8}
.b-charge.ready{opacity:1;animation:pulse .45s ease-in-out infinite alternate;background:radial-gradient(circle at 35% 30%,#ffcf7a,#c0662a)}
.b-charge.hit{transform:translate(-50%,-50%) scale(.93)}
@keyframes pulse{to{transform:translate(-50%,-50%) scale(1.07)}}

/* スマホの操作：左右の手の面・まん中のスティックと「引く」 */
.b-touch{display:none}
body.is-touch .b-touch{display:block}
.b-pad{position:absolute;bottom:calc(10px + var(--sab));width:min(250px,29vw);height:min(150px,40vh);border-radius:22px;background:rgba(20,14,10,.3);border:2px dashed rgba(255,255,255,.28);pointer-events:auto;touch-action:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;text-align:center;transition:background .15s,border-color .15s}
.b-pad-l{left:calc(10px + var(--sal))}
.b-pad-r{right:calc(10px + var(--sar))}
.b-pad b{font-size:15px;font-weight:800}
.b-pad::before{content:attr(data-state);font-size:13px;font-weight:800;color:var(--gold);min-height:1.2em}
.b-pad small{font-size:10px;font-weight:700;opacity:.75;line-height:1.35}
.b-pad.down{background:rgba(255,255,255,.12)}
.b-pad.holding{border-color:#7fd46a;background:rgba(127,212,106,.18)}
.b-pad.fx{animation:padfx .3s ease-out}
@keyframes padfx{from{box-shadow:0 0 0 0 rgba(255,255,255,.6)}to{box-shadow:0 0 0 14px rgba(255,255,255,0)}}
/* チャンス：つかめる側の手の面が金色に脈打つ */
.b-pad.chance{border:2px solid #ffe08a;animation:chance .35s ease-in-out infinite alternate}
@keyframes chance{from{background:rgba(255,224,138,.12);box-shadow:0 0 0 0 rgba(255,224,138,.6)}to{background:rgba(255,224,138,.34);box-shadow:0 0 22px 4px rgba(255,224,138,.55)}}
.b-mid{position:absolute;left:50%;bottom:calc(10px + var(--sab));transform:translateX(-50%);display:flex;align-items:flex-end;gap:12px;pointer-events:none}
.b-stick{position:relative;width:96px;height:96px;border-radius:50%;background:rgba(20,14,10,.35);border:2px solid rgba(255,255,255,.35);pointer-events:auto;touch-action:none}
.b-stick small{position:absolute;left:0;right:0;text-align:center;font-size:9px;font-weight:800;opacity:.8}
.b-stick .t{top:2px}.b-stick .b{bottom:2px}
.b-knob{position:absolute;left:50%;top:50%;width:40px;height:40px;margin:-20px 0 0 -20px;border-radius:50%;background:#fff;box-shadow:0 3px 10px rgba(0,0,0,.45);pointer-events:none}
.b-pull{width:70px;height:70px;border-radius:50%;border:3px solid rgba(255,255,255,.7);background:radial-gradient(circle at 35% 30%,#7aa0d8,#2f3b4f);color:#fff;font-weight:800;font-size:16px;pointer-events:auto;touch-action:none;box-shadow:0 4px 12px rgba(0,0,0,.4)}
.b-pull.hit{transform:scale(.92)}
body.is-touch .b-breath{bottom:calc(124px + var(--sab))}
body.is-touch .b-charge{top:52%}

.r-skip{position:fixed;right:calc(14px + var(--sar));bottom:calc(14px + var(--sab));min-height:44px;padding:0 18px;border-radius:99px;border:0;background:var(--glass);color:#fff;font-weight:800;cursor:pointer;z-index:5}
.b-replay{position:fixed;left:calc(12px + var(--sal));top:calc(10px + var(--sat));display:flex;align-items:center;gap:10px;color:#fff;font-weight:800;font-size:14px;background:var(--glass);padding:4px 6px 4px 12px;border-radius:99px;z-index:5;text-shadow:0 1px 3px rgba(0,0,0,.6)}
.b-replay b{color:#ff6a4a;letter-spacing:.12em}
.b-replay .r-chip{background:rgba(255,255,255,.18);color:#fff;min-height:34px}
/* 取組のあとのスローの「結果へ ›」は、ほかの競技（競馬の写真判定の「結果へ ›」・入場の「スキップ ›」）と同じ右下（2026-11-07 ユーザー「相撲は試合終了時にボタンが画面上部になるので、他と合わせて右下ボタンに」）。REPLAY の札は左上のまま */
.b-replay .b-replay-skip{text-shadow:none;font-size:15px}
body.is-replay::after{content:'';position:fixed;inset:0;pointer-events:none;box-shadow:inset 0 0 0 9999px rgba(0,0,0,0);border-top:7vh solid #000;border-bottom:7vh solid #000;opacity:.85}
.b-flash{position:fixed;left:50%;top:38%;transform:translate(-50%,-50%);font-size:min(64px,15vh);font-weight:800;color:var(--gold);text-shadow:0 4px 18px rgba(0,0,0,.7);pointer-events:none;white-space:nowrap;animation:pop .5s ease-out;z-index:4}
.b-flash.red{color:#ff6a4a}
.b-flash.white{color:#fff}
.b-flash.end{top:18%;font-size:min(52px,12vh)}
@keyframes pop{from{transform:translate(-50%,-50%) scale(.6);opacity:0}}
/* 技の瞬間の大きな文字（差した・上手を取った・引いた・はたき・投げ・残った）。少し傾けて勢いを出す */
.b-flash.b-call{top:30%;font-size:min(54px,13vh);letter-spacing:.04em;-webkit-text-stroke:1px rgba(40,20,10,.55);animation:callpop .42s cubic-bezier(.2,1.6,.4,1)}
.b-flash.b-call.me{color:#ffd24a;left:27%;top:40%}
.b-flash.b-call.op{color:#ff6a4a;left:73%;top:40%}
.b-flash.b-call.edge{color:#fff;font-size:min(46px,11vh)}
.b-flash.b-call.l{left:27%;top:40%}
.b-flash.b-call.r{left:73%;top:40%}
.b-flash.b-call.kimarite{top:24%;font-size:min(66px,15vh);color:#fff;text-shadow:0 0 22px rgba(255,190,80,.8),0 4px 14px rgba(0,0,0,.8)}
@keyframes callpop{from{transform:translate(-50%,-50%) scale(1.6) rotate(-4deg);opacity:0}60%{opacity:1}to{transform:translate(-50%,-50%) scale(1) rotate(-4deg)}}
.b-flash.b-call{transform:translate(-50%,-50%) rotate(-4deg)}

/* 結果・一時停止・ルール・説明 */
.r-overlay{position:fixed;inset:0;display:flex;align-items:center;justify-content:center;padding:calc(10px + var(--sat)) calc(12px + var(--sar)) calc(10px + var(--sab)) calc(12px + var(--sal));background:rgba(12,8,6,.35);z-index:10}
.r-small{padding:18px 22px;text-align:center}
.r-small h2{margin:0}
.b-result{width:min(600px,100%);max-height:100%;overflow-y:auto;padding:14px 18px;text-align:center;touch-action:pan-y}
.b-result h2{margin:0;font-size:22px}
.b-result h2.win{color:#b5651d}
.b-result h2.lose{color:#4b5560}
.b-kimarite-cap{margin:2px 0 0;font-size:13px;font-weight:800;letter-spacing:.3em;opacity:.6}
.b-kimarite{font-size:min(64px,14vh);font-weight:800;line-height:1.15;letter-spacing:.08em;color:#2a1a0e}
.b-kimg{display:block;width:min(150px,30vh);height:auto;aspect-ratio:1;margin:4px auto 0;border-radius:14px;background:#f4ecdc;box-shadow:0 2px 10px rgba(0,0,0,.12)}
.b-ktitle{margin:12px 0 2px;font-size:16px}
.b-kgallery{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px;margin-top:6px}
.b-kfig{margin:0;background:#fff;border-radius:12px;padding:6px;box-shadow:0 1px 4px rgba(0,0,0,.08)}
.b-kfig img,.b-kimg-none{display:block;width:100%;height:auto;aspect-ratio:1;border-radius:8px;background:#f4ecdc}
.b-kimg-none{height:0;padding:0;aspect-ratio:auto;background:none}
.b-kfig figcaption{display:flex;flex-direction:column;gap:1px;margin-top:4px;line-height:1.35}
.b-kfig b{font-size:14px}
.b-kfig span{font-size:11.5px;opacity:.8}
.b-kdesc{margin:0 0 2px;font-size:13px;font-weight:700;color:#7a4a20}
.b-who{margin:4px 0 0;font-size:15px}
.r-sub{margin:2px 0 0;text-align:center;font-size:13px;opacity:.75}
#result.is-win{background:linear-gradient(180deg,rgba(12,8,6,.2),rgba(12,8,6,.55)),url(../media/game/sumo-win.jpg) center/cover no-repeat}
.b-rules{width:min(620px,100%);max-height:100%;overflow-y:auto;padding:14px 20px;touch-action:pan-y}
.b-rules h2{margin:0 0 6px;font-size:20px;text-align:center}
.b-rules ol{margin:0;padding-left:1.4em;font-size:14px;line-height:1.6}
.b-rules li{margin:3px 0}
.r-tut{width:min(540px,100%);max-height:100%;overflow-y:auto;padding:16px 20px;touch-action:pan-y}
.r-tut-step h3{margin:0 0 6px;font-size:20px}
.r-tut-step p{margin:0;font-size:14.5px}
.r-tut-step .ill{display:flex;align-items:center;justify-content:center;gap:10px;min-height:84px;margin:0 0 10px;border-radius:14px;background:linear-gradient(180deg,#2b211a,#4a3424 55%,#b39370 56%,#9c7c5a);color:#fff;font-weight:800;font-size:15px;text-align:center;padding:6px 10px}
.r-tut-step .ill i{font-style:normal;display:inline-flex;align-items:center;justify-content:center;min-width:64px;min-height:40px;border-radius:12px;background:rgba(255,255,255,.15);border:2px dashed rgba(255,255,255,.4);padding:0 8px}
.r-tut-step .ill i.g{border:2px solid #ffe08a;background:rgba(255,224,138,.3)}
.r-tut-step .ill .tut-k{width:76px;height:76px;border-radius:10px;background:#f4ecdc}
/* 1枚＝絵・見出し・短い1行。長い説明は「くわしく」（bout-easy.css の .ez-more）の中 */
.r-tut-step .tut-short{font-size:17px;font-weight:800;line-height:1.45}
.r-tut-step .ez-more p{font-size:13.5px;line-height:1.6}
.r-tut-dots{display:flex;gap:6px;justify-content:center;margin-top:10px}
.r-tut-dots i{width:8px;height:8px;border-radius:50%;background:rgba(0,0,0,.18)}
.r-tut-dots i.on{background:var(--turf)}

/* 横持ちのスマホ（高さが低い） */
@media (max-height:460px),(max-width:700px){
  /* 準備の画面のプレオープンの帯は1行に（同じ内容は遊び方の画面の帯と、はじめの確認に出ている）。Xへの案内は残す */
  #setup .po-box{margin:4px 0;padding:6px 12px}
  #setup .po-box .po-sub:not(:last-child){display:none}
  #setup .po-box .po-sub{margin:0}
}
@media (max-height:460px){
  .r-tut{padding:10px 16px}
  .r-tut-step .ill{min-height:64px;margin-bottom:6px}
  .r-tut-step h3{font-size:18px;margin-bottom:2px}
  .r-tut .r-btns{margin-top:8px}
  .r-setup-grid{gap:0 14px;padding:6px 14px}
  .r-setup-head{padding:6px 12px 4px}
  .r-setup-head h1{font-size:16px}
  fieldset{margin-bottom:4px}
  .r-row{margin:3px 0}
  .r-seg button{min-height:34px}
  .r-setup-foot{padding:6px 12px 8px}
  .r-setup-foot .r-btn{min-height:42px}
  .b-panel{padding:3px 8px 5px}
  .b-name{font-size:14px}
  .b-hands canvas{width:120px;height:60px}
  .b-tug{padding:3px 7px}
  /* 技の瞬間の文字：小さめにして、上の左右（力士の頭より上・横）へ */
  .b-flash.b-call{font-size:min(30px,8vh)}
  .b-flash.b-call.me,.b-flash.b-call.op,.b-flash.b-call.l,.b-flash.b-call.r{top:31%}
  .b-flash.b-call.me,.b-flash.b-call.l{left:calc(17% + var(--sal))}
  .b-flash.b-call.op,.b-flash.b-call.r{left:calc(83% - var(--sar))}
  .b-flash.b-call.edge{font-size:min(36px,9vh)}
  .b-flash.b-call.kimarite{top:34%} /* 決まり手の文字が、左上の「決まり手をスローで」の札に重ならないように（2026-11-06） */
  .b-tools{top:auto;bottom:calc(166px + var(--sab))}
  .b-charge{width:120px;height:120px;font-size:22px}
  .b-kimarite{font-size:min(52px,15vh)}
  /* 横持ちの低い画面：決まり手の図を左、文字を右に */
  .b-result{display:grid;grid-template-columns:auto 1fr;column-gap:16px;align-items:center;width:min(720px,100%);text-align:left;padding:8px 16px}
  .b-result>*{grid-column:2}
  .b-result .b-kimg{grid-column:1;grid-row:1 / span 7;width:min(150px,40vh);margin:0}
  .b-result .r-btns{grid-column:1 / -1;margin-top:6px;justify-content:center}
  .b-result .r-sub{text-align:left}
  .b-result .r-note{margin-top:2px}
  .b-kimarite{font-size:min(46px,13vh)}
  body.is-touch .b-charge{top:38%}
  .b-result{padding:10px 16px}
  .b-result .r-btn{min-height:40px;padding:0 16px;font-size:14px}
}
@media (max-width:700px) and (orientation:portrait){
  .r-setup-grid{grid-template-columns:1fr}
  .b-panel{width:44vw}
  /* 上の帯：名前（〜62px）→ 切りかえのボタン（64〜108px。左右とも）→ 時計・押し合い・手の図（112px〜）。重ならないように */
  /* 上の札（名前・重心・土俵際。〜82px）の下に視点・ルール（86〜124px）、その下に時計・手の図（128px〜）。札とボタンが重ならないように（2026-11-06） */
  .b-tools,body.is-easy .b-tools:not(.b-tools-l){top:calc(86px + var(--sat));bottom:auto}
  .b-center{top:calc(128px + var(--sat))}
  .b-pad{width:40vw}
  .b-mid{bottom:calc(170px + var(--sab))}
  /* 技の瞬間の文字：画面の外へはみ出さないように、まん中にそろえて幅で大きさを決める */
  .b-flash.b-call{font-size:min(8vw,40px)}
  .b-flash.b-call.me,.b-flash.b-call.op,.b-flash.b-call.l,.b-flash.b-call.r{left:50%;top:31%}
  .b-flash,.b-flash.end{font-size:min(64px,13vw)}
  .b-flash.b-call.kimarite{font-size:min(66px,12vw)}
}
.b-rules .r-btns{position:sticky;bottom:-14px;margin:8px -20px -14px;padding:8px 0 10px;background:linear-gradient(180deg,rgba(255,253,248,0),rgba(255,253,248,.97) 30%)}
/* 見返し（結果の画面から：最初から見る／決まった瞬間をもう一度）の操作の帯。指で押しやすい高さ（44px） */
.b-rp{position:fixed;inset:0;pointer-events:none;z-index:6;color:#fff}
.b-rp[hidden]{display:none}
.b-rp-top{position:fixed;right:calc(12px + var(--sar));top:calc(10px + var(--sat));display:flex;gap:10px;align-items:baseline;padding:6px 12px;border-radius:10px;background:rgba(0,0,0,.55);font-variant-numeric:tabular-nums;font-weight:800}
.b-rp-top b{font-size:14px;color:#ff6a4a;letter-spacing:.06em}
.b-rp-bar{position:fixed;left:calc(8px + var(--sal));right:calc(8px + var(--sar));bottom:calc(8px + var(--sab));display:flex;align-items:center;gap:6px;padding:6px;border-radius:14px;background:rgba(20,14,10,.78);pointer-events:auto}
.b-rp-bar .r-mini{flex:0 0 auto;min-height:44px;padding:0 10px;white-space:nowrap;font-size:13px}
.b-rp-seek{flex:1 1 auto;min-width:70px;height:44px;accent-color:var(--gold)}
.b-rp-close{background:var(--gold)!important;color:#1b1b1b!important}
.r-btn:disabled{opacity:.45;cursor:default}
.b-rp-note:empty{display:none}
.b-result .b-rp-note{grid-column:1 / -1;text-align:center}
@media (max-width:720px){.b-rp-bar .r-mini{padding:0 7px;font-size:13px}}
/* 縦持ち：見返しの帯は2段（上に再生の位置、下にボタン。右の外へはみ出さない）（2026-11-06 スマホの点検） */
@media (max-width:700px) and (orientation:portrait){.b-rp-bar{flex-wrap:wrap;justify-content:center}.b-rp-seek{flex:1 1 100%;order:-1;height:36px}}
/* 結果の画面の注記は13px（2026-11-06 スマホの点検） */
#result .r-note{font-size:13px}

/* 幅420px以下（スマホ縦）：見出しは「‹」と同じ行に1行で、ボタン類はその下の行へ。下の「出走する」は横いっぱい・説明はその上 */
@media (max-width:420px){
  .r-setup-head>div{flex-basis:calc(100% - 56px)}
  .r-setup-head .r-chip,.r-setup-head .a-mute-head{min-height:34px;padding:0 10px;font-size:12px}
  .r-setup-head .sm-who .r-chip{line-height:34px}
  .r-setup-foot{flex-wrap:wrap}
  .r-setup-foot .r-note,.r-setup-foot .r-err{flex:1 1 100%}
  .r-setup-foot .r-note:empty,.r-setup-foot .r-err:empty{display:none}
  .r-setup-foot .r-btn{flex:1 1 100%;min-width:0}
  .r-field{flex-wrap:wrap;gap:2px 10px}
  .r-field span{width:auto;flex:1 1 100%}
}

/* ログイン中は能力を動かせない理由と厩舎への道（stats-lock.js） */
.r-lockstat{margin:6px 0 0;font-size:13px;font-weight:700;line-height:1.5}
.r-lockstat a{display:inline-block;margin-left:8px;white-space:nowrap}
#stats input:disabled{opacity:.55}
/* 指で押しやすく（2026-11-05 ペルソナレビュー B4）：準備の画面の選ぶボタン・まわしの色 */
@media (pointer:coarse){
  #setup .r-seg button,#setup .r-seg-s button{min-height:44px;min-width:44px}
  .r-swatches button{width:40px;height:40px}
  .r-setup-head .r-chip{min-height:44px}
}
/* 結果のボタン（2026-11-05 ペルソナレビュー B7）：スマホでは「もう一度」を1つだけ大きく先頭に。見返しの2つは2列、そのほかは小さく1列に並べる */
@media (pointer:coarse) and (max-width:900px){
  #result .r-btns{gap:6px}
  #result .r-btns .r-primary{order:-2;flex:1 1 100%;min-height:52px;font-size:18px}
  #result .r-btns #rpFullBtn,#result .r-btns #rpPhotoBtn,#result .r-btns #rpKimaBtn,#result .r-btns #replayBtn,#result .r-btns #replayFullBtn{order:-1;flex:1 1 40%;min-height:44px;padding:0 10px;font-size:13px}
  #result .r-btns .r-btn:not(.r-primary):not(#rpFullBtn):not(#rpPhotoBtn):not(#rpKimaBtn):not(#replayBtn):not(#replayFullBtn){flex:1 1 26%;min-height:44px;padding:0 8px;font-size:13px}
}
/* 相手の番付（10個）：スマホ縦では見出しを上に置き、ボタンを横いっぱいに並べる（6段→4〜5段。2026-11-05） */
@media (max-width:700px) and (orientation:portrait){
  #setup .r-row:has(#cpuSeg){flex-wrap:wrap;gap:4px 10px}
  #setup .r-row:has(#cpuSeg)>span{width:auto;flex:1 1 100%}
}

/* スマホ（タッチ）ではキーの名前を出さない（遊び方・説明の「（パソコンは ◯）」。2026-11-06） */
body.is-touch .r-pc-key{display:none}
@media (hover:none) and (pointer:coarse){.r-pc-key{display:none}} /* まだ一度も触っていない時（遊び方が最初に開く時）も、指で使う画面なら出さない */

/* 勝ちの戻し（2026-11-10） */
.r-win{margin:8px 0 0;padding:6px 10px;border-radius:10px;background:rgba(255,214,90,.18);font-size:14px;line-height:1.5}
