/* 世界観（2026-10-23 色の強さを直す）: 秋晴れの運動会の紅白綱引き（palette は ../world.json）。地は秋空の水色、紅組の陣地は紅の中間色、白組の陣地は明るい空色。
   地は彩度 42〜48%・明度 70〜82%。強い紅・黄は題字・ボタン・旗・結び目の小さな面だけ。一番後ろ（枠の外）の色は共通のまま触らない */
:root{--red:#a72536;--redt:#7c1d2a;--redi:#fff8ee;--flag:#c92c41;--wht:#bed4e4;--pink:#e3b0b7;--paper:#a6c6dd;--cloth:#95b7d0;--line:#608ba9;--ink:#19242e;--sub:#2d4153;--knot:#e8bf3c;
  --rope-img:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24'%3E%3Crect width='24' height='24' fill='%23c9a46a'/%3E%3Cpath d='M0 24L24 0M-6 6L6-6M18 30L30 18' stroke='%238e6c3e' stroke-width='7'/%3E%3C/svg%3E");
}
html,body{margin:0;height:100%;overflow:hidden}

/* ボタン・帯・結果・小さなウィンドウの色は shell.home の theme（--ui-red など）で渡す。作品の CSS ではボタンを上書きしない */
.rb{--ui-paper:var(--paper);--ui-soft:var(--line)}
/* 遊んでいる最中の帯: 空色の布（2026-10-24 意味の分からない紅白の縞はやめた） */
.rb .sh-bar{background:var(--cloth);border-bottom:2px solid var(--line)}
.rb .sh-result{--ui-shade:rgba(166,198,221,.96);--ui-chip:rgba(124,29,42,.16)}
body{color:var(--ink);font-family:"Zen Kaku Gothic New",sans-serif}

.rb{background:var(--paper);touch-action:none;-webkit-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent;-webkit-touch-callout:none}
.rb .zm{zoom:1.7}
.rb .ls .zm{zoom:1.45}

/* 紅白の背景（紅組は紅の中間色、白組は明るい空色）と麻の綱 */
.rb .half{position:absolute}
.rb .half.a{background:var(--pink)}
.rb .half.b{background:var(--wht)}
.rb .pt .half{left:0;right:0;height:50%}
.rb .pt .half.a{top:0}.rb .pt .half.b{bottom:0}
.rb .ls .half{top:0;bottom:0;width:50%}
.rb .ls .half.a{left:0}.rb .ls .half.b{right:0}
.rb .deco{position:absolute;background:var(--rope-img)}
.rb .pt .deco{left:620px;width:16px;top:0;bottom:0}
.rb .ls .deco{top:620px;height:16px;left:0;right:0}

/* 相手を探す画面の枠 */
.rb .rb-center{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}
.rb .note{margin:6px 0 0;font-size:16px;opacity:.75}
.rb .subl{margin:0;font-size:14px}
.rb .subl+.note{margin-top:6px}
/* 探している間の動き: 結び目の色の四角 3 つが順に跳ねる（止まった画面にしない） */
.rb .rb-seek{display:flex;justify-content:center;gap:8px;margin-top:10px}
.rb .rb-seek i{width:12px;height:12px;background:var(--knot);border:2px solid var(--ink);animation:rbseek .9s ease-in-out infinite}
.rb .rb-seek i:nth-child(2){animation-delay:.15s}.rb .rb-seek i:nth-child(3){animation-delay:.3s}
@keyframes rbseek{0%,60%,100%{transform:translateY(0)}30%{transform:translateY(-8px)}}

/* ホーム（共通の shell.home）の絵: CPU 同士のデモ。本番の場を縮めて入れる。操作は受け付けない */
.rb .sh-art{background:var(--cloth)}
/* 場（陣地・綱・結び目）・デモ・遊び方の図の CSS は field.js（部屋の説明画面でも同じ物を使うため） */
/* 下の段（遊び方・設定・記録・詳しく）は狭い所で折り返す */
.rb .sh-foot{flex-wrap:wrap}
/* 本命は［ひとりで遊ぶ］。10 秒勝負は副の色のまま一回り小さくして、優先の差を見せる */
.rb .sh-solo .ui-btn.sub{font-size:22px;padding:12px 24px;align-self:center}
/* 人数はオンラインの枠の中の一行。別の帯に見えないよう地・枠・余白を付けない */
.rb .sh-online .rb-cnt{margin:0;padding:0;background:none;border:0;font-size:16px;color:var(--ui-sub)}

/* 遊び方・設定・記録・詳しく（shell.panel の中） */
.rb .rb-help p{margin:0 0 10px}
.rb .rb-det{display:flex;flex-direction:column;gap:10px;color:var(--ink)}
.rb .rb-dl{margin:0;font-size:18px;font-weight:700}
.rb .rb-recs .rb-dl{margin-top:14px}
.rb .rb-recs>.rb-dl:first-child{margin-top:0}
.rb .rb-cnt2{margin:4px 0 0;font-size:18px;font-weight:700;overflow-wrap:anywhere}
.rb .lst li span{min-width:0;overflow-wrap:anywhere}
.rb .rb-row{display:flex;gap:8px;flex-wrap:wrap}
/* CPU の強さ: 前回の強さは主なボタンの色（紅）に反転。「ふつう」はおすすめとして枠を太くし、小さく添え書き。
   ボタンの大きさは共通の ui-btn のまま（作品で縮めない）。入りきるよう 2 列に並べる */
.rb .rb-cpus{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.rb .rb-cpub{display:flex;flex-direction:column;align-items:center;line-height:1.15;white-space:nowrap}
.rb .rb-cpub small{font-size:12px;font-weight:700;color:var(--redt)}
.rb .rb-cpub.rec{border:3px solid var(--ink)}
.rb .rb-cpub.rec:not(.sel){background:var(--wht)}
.rb .rb-cpub.sel{background:var(--ui-red,var(--red));color:var(--ui-red-ink,var(--redi));border-color:var(--ink)}
.rb .rb-cpub.sel small{color:var(--ui-red-ink,var(--ink))}

/* 遊んでいる最中の帯（shell.bar）: 連打している間は「やめる」を押せなくする */

/* 結果（shell.result）に足す一行: 連勝・自己最高・自己ベストまでの差 */
.rb .rb-hook{margin:0;max-width:90%;font-size:20px;font-weight:700;color:var(--ink);line-height:1.5;text-align:center}
/* 結果のボタンが 3 つ並ぶと縦の枠に入らないので折り返す */
.rb .sh-result .sh-rb{flex-wrap:wrap;justify-content:center;max-width:94%}
.rb .sh-result ol{max-width:94%}

/* 記録 */
.rb .lst{margin:0;padding:0;list-style:none;font-size:18px}
.rb .lst li{display:flex;justify-content:space-between;padding:4px 0;border-bottom:1px solid #0001}
.rb .lst li b{font-family:var(--ui-display,"Yusei Magic"),sans-serif;font-weight:400}
.rb .lst li.me{color:var(--redt);font-weight:700}
.rb .rb-best{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.rb .rb-best div{display:flex;flex-direction:column;gap:2px;padding:10px 0;border-top:3px solid var(--ink)}
.rb .rb-best span{font-size:16px;font-weight:700}
.rb .rb-best b{font:400 44px/1.1 var(--ui-display,"Yusei Magic"),sans-serif;color:var(--redt)}
.rb .rb-best small{font:700 18px "Zen Kaku Gothic New",sans-serif;margin-left:6px;color:var(--ink)}
.rb .rb-tbl{width:100%;border-collapse:collapse;font-size:18px}
.rb .rb-tbl th{text-align:left;font-weight:700;padding:4px 0}
.rb .rb-tbl td{text-align:right;padding:4px 0 4px 10px;font-family:var(--ui-display,"Yusei Magic"),sans-serif;white-space:nowrap}
.rb .rb-tbl thead td{font:700 14px "Zen Kaku Gothic New",sans-serif;opacity:.75}
.rb .rb-tbl tbody tr{border-bottom:1px solid #0001}
