:root {
  --ink: #1d2b45;
  --snow: #f7fbff;
  --sky: #cfe3f3;
  --red: #e2483d;
  --blue: #3a7bd5;
  --ice: #8fd3ff;
  --gold: #ffc533;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--sky); color: var(--ink); overflow: hidden;
  font-family: 'M PLUS Rounded 1c', 'Hiragino Maru Gothic ProN', sans-serif; user-select: none; -webkit-user-select: none;
  -webkit-touch-callout: none; touch-action: none; overscroll-behavior: none; }
body.rot { position: fixed; top: 0; left: 0; transform-origin: 0 0; }
#view { position: fixed; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hidden { display: none !important; }

/* ---------- 試合中の表示 ---------- */
.hud { position: fixed; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start;
  padding: calc(env(safe-area-inset-top) + 10px) 12px 0; pointer-events: none; }
.card { display: flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.88);
  box-shadow: 0 3px 0 rgba(29,43,69,.15); font-weight: 900; font-size: 14px; }
.card.me .who { color: var(--red); }
.card.foe .who { color: var(--blue); }
.hearts { display: flex; gap: 4px; }
.hearts i { width: 16px; height: 16px; border-radius: 50%; background: var(--red); box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); transition: transform .2s, background .2s; }
.card.foe .hearts i { background: var(--blue); }
.hearts i.lost { background: #d5dde8 !important; transform: scale(.7); }
.timer { font-weight: 900; font-size: 22px; color: var(--ink); background: rgba(255,255,255,.88); padding: 4px 14px; border-radius: 12px;
  box-shadow: 0 3px 0 rgba(29,43,69,.15); font-variant-numeric: tabular-nums; }
.timer.hot { color: var(--red); }

.ammo { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 58px); transform: translateX(-50%); display: flex; gap: 8px; pointer-events: none; }
.ammo i { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.35); border: 2px dashed rgba(29,43,69,.25); }
.ammo i.soft { background: radial-gradient(circle at 35% 30%, #fff, #dfe9f4); border: 2px solid #fff; box-shadow: 0 2px 0 rgba(29,43,69,.25); }
.ammo i.next { transform: scale(1.15); }

.melt { position: fixed; left: 50%; top: calc(env(safe-area-inset-top) + 94px); transform: translateX(-50%); font-weight: 900; font-size: 13px;
  color: #fff; background: var(--red); padding: 3px 12px; border-radius: 999px; pointer-events: none; }

.banner { position: fixed; left: 0; right: 0; top: 38%; text-align: center; font-size: 56px; font-weight: 900; color: #fff;
  -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; text-shadow: 0 5px 0 var(--ink);
  pointer-events: none; opacity: 0; transform: scale(.6); transition: opacity .2s, transform .25s cubic-bezier(.3,1.6,.6,1); }
.banner.on { opacity: 1; transform: none; }
.banner.small { font-size: 34px; }
.banner.low { top: 78%; }

/* PCの操作表示 */
kbd { display: inline-block; min-width: 22px; padding: 1px 6px; margin: 0 2px; border-radius: 6px; background: #fff; border: 2px solid var(--ink);
  box-shadow: 0 2px 0 var(--ink); font: inherit; font-size: 11px; font-weight: 900; line-height: 16px; text-align: center; color: var(--ink); vertical-align: 1px; }
.pc-keys { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 6px; pointer-events: none;
  background: rgba(255,255,255,.72); padding: 10px 12px; border-radius: 16px; box-shadow: 0 4px 0 rgba(29,43,69,.15); }
.pc-keys > div { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 900; color: var(--ink); }
.pc-keys kbd { position: relative; overflow: hidden; min-width: 28px; transition: transform .06s; }
.pc-keys kbd.wide { min-width: 58px; }
.pc-keys kbd i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--p, 0%); background: var(--blue); }
.pc-keys kbd.mouse { width: 20px; min-width: 20px; height: 28px; padding: 0; border-radius: 10px 10px 12px 12px; background: #fff; }
.pc-keys kbd.mouse::before { content: ''; position: absolute; top: 0; width: 50%; height: 45%; border-bottom: 2px solid var(--ink); }
.pc-keys kbd.mouse.l::before { left: 0; border-right: 2px solid var(--ink); background: var(--red); }
.pc-keys kbd.mouse.r::before { right: 0; border-left: 2px solid var(--ink); background: var(--blue); }
.pc-keys .on kbd, .pc-keys kbd.on { transform: translateY(2px); box-shadow: 0 0 0 var(--ink); background: var(--gold); }
.pc-keys .on span { color: var(--red); }
.pc-pause { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); text-align: center; background: rgba(255,255,255,.92); color: var(--ink);
  padding: 18px 28px; border-radius: 20px; box-shadow: 0 6px 0 rgba(29,43,69,.18); pointer-events: none; }
.pc-pause b { display: block; font-size: 24px; font-weight: 900; }
.pc-pause small { display: block; margin-top: 4px; font-size: 12px; font-weight: 800; color: #44536e; }
body.touch .pc-only, body:not(.touch) .touch-only { display: none !important; }
.howto kbd { font-size: 11px; }
.howto small { font-size: 11px; color: #6a7891; }

/* 当てられたとき、画面に雪がべちゃっと付く */
.splat { position: fixed; inset: 0; pointer-events: none; opacity: 0; transition: opacity .9s ease-out; }
.splat.on { opacity: 1; transition: none; }
/* 当てられた方向：画面の端が白くにじむ（--a は前＝上からの角度） */
.hitdir { position: fixed; inset: 0; pointer-events: none; opacity: 0; }
.hitdir i { position: absolute; left: 50%; top: 50%; width: 140vmax; height: 140vmax; transform: translate(-50%, -50%) rotate(var(--a, 0rad));
  background: radial-gradient(ellipse 22% 14% at 50% 14%, rgba(255,255,255,.95), rgba(255,255,255,0)); }
.hitdir.on { animation: hd .9s ease-out forwards; }
@keyframes hd { 0% { opacity: 1; } 100% { opacity: 0; } }
/* 残り1発：自分の体力が点滅 */
.hearts.last i:not(.lost) { animation: last .7s ease-in-out infinite; }
@keyframes last { 50% { transform: scale(1.25); filter: brightness(1.3); } }
/* スタンプ */
/* 左上の「あなた」の札のすぐ右（親指の届く下のほうのボタンとぶつからない場所） */
.tbtn.stamp { left: calc(env(safe-area-inset-left) + 140px); top: calc(env(safe-area-inset-top) + 8px); width: 40px; height: 40px; font-size: 21px; background: rgba(255,255,255,.85); }
.stamp-menu { position: absolute; left: calc(env(safe-area-inset-left) + 12px); top: calc(env(safe-area-inset-top) + 56px); display: grid; grid-template-columns: repeat(3, auto); gap: 6px;
  background: rgba(255,255,255,.92); padding: 8px; border-radius: 16px; box-shadow: 0 4px 0 rgba(29,43,69,.15); z-index: 5; }
.stamp-menu button { border: 0; background: #eef3f9; border-radius: 12px; padding: 4px 8px; font: inherit; color: var(--ink); display: flex; flex-direction: column; align-items: center; touch-action: none; }
.stamp-menu span { font-size: 24px; line-height: 1.1; pointer-events: none; }
.stamp-menu small { font-size: 10px; font-weight: 900; pointer-events: none; }
.stamp-menu kbd { display: none; }
/* 決め手：白く光って、集中線が走る */
.finish { position: fixed; inset: 0; pointer-events: none; }
.finish i { position: absolute; inset: 0; opacity: 0; }
.finish .flash { background: radial-gradient(circle at 50% 50%, #fff 0%, rgba(255,255,255,.85) 35%, rgba(190,225,255,.5) 100%); }
.finish .lines { inset: -30%; background: repeating-conic-gradient(from 0deg, rgba(255,255,255,.95) 0deg 1.4deg, rgba(255,255,255,0) 1.4deg 7deg);
  -webkit-mask-image: radial-gradient(circle, transparent 0 22%, #000 48%); mask-image: radial-gradient(circle, transparent 0 22%, #000 48%); }
.finish.on .flash { animation: fin-flash .55s ease-out forwards; }
.finish.on .lines { animation: fin-lines .9s ease-out forwards; }
@keyframes fin-flash { 0% { opacity: 1; } 18% { opacity: .9; } 100% { opacity: 0; } }
@keyframes fin-lines { 0% { opacity: 0; transform: scale(1.25) rotate(0deg); } 8% { opacity: 1; } 65% { opacity: .9; } 100% { opacity: 0; transform: scale(1) rotate(6deg); } }
/* リプレイ中の表示 */
.replay-ui { position: fixed; left: 0; right: 0; top: calc(env(safe-area-inset-top) + 12px); display: flex; justify-content: space-between; padding: 0 calc(env(safe-area-inset-right) + 16px) 0 calc(env(safe-area-inset-left) + 16px); pointer-events: none; }
.rp-tag { font-weight: 900; font-size: 16px; color: #fff; background: rgba(226,72,61,.9); padding: 6px 14px; border-radius: 999px; animation: rp-blink 1.2s steps(2) infinite; }
@keyframes rp-blink { 50% { opacity: .55; } }
.rp-skip { pointer-events: auto; font: inherit; font-weight: 900; font-size: 15px; color: var(--ink); background: rgba(255,255,255,.9); border: 0; border-radius: 999px; padding: 8px 16px; box-shadow: 0 3px 0 rgba(29,43,69,.2); }

/* ---------- スマホの操作 ---------- */
.touch { position: fixed; inset: 0; }
.zone { position: absolute; top: 0; bottom: 0; touch-action: none; }
.zone.left { left: 0; width: 45%; }
.zone.right { right: 0; width: 55%; }
.stick { position: absolute; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 50%; background: rgba(255,255,255,.25);
  border: 3px solid rgba(255,255,255,.7); pointer-events: none; }
.stick .knob { position: absolute; left: 50%; top: 50%; width: 52px; height: 52px; margin: -26px 0 0 -26px; border-radius: 50%; background: rgba(255,255,255,.9);
  box-shadow: 0 3px 0 rgba(29,43,69,.25); }
.tbtn { position: absolute; border: 0; border-radius: 50%; font: inherit; font-weight: 900; color: var(--ink); touch-action: none;
  background: rgba(255,255,255,.9); box-shadow: 0 4px 0 rgba(29,43,69,.25); display: flex; align-items: center; justify-content: center; padding: 0; }
.tbtn span { position: relative; pointer-events: none; }
.tbtn.on { transform: translateY(3px); box-shadow: 0 1px 0 rgba(29,43,69,.25); }
.tbtn.throw { right: calc(env(safe-area-inset-right) + 22px); bottom: calc(env(safe-area-inset-bottom) + 34px); width: 96px; height: 96px; font-size: 18px;
  background: var(--red); color: #fff; }
.tbtn.throw small, .tbtn.lob small { display: block; font-size: 10px; line-height: 1.1; opacity: .85; }
.tbtn.lob { right: calc(env(safe-area-inset-right) + 128px); bottom: calc(env(safe-area-inset-bottom) + 40px); width: 80px; height: 80px; font-size: 16px;
  background: var(--blue); color: #fff; }
.tbtn.make { right: calc(env(safe-area-inset-right) + 224px); bottom: calc(env(safe-area-inset-bottom) + 22px); width: 72px; height: 72px; font-size: 16px; }
.tbtn.crouch { left: calc(env(safe-area-inset-left) + 26px); bottom: calc(env(safe-area-inset-bottom) + 150px); width: 68px; height: 68px; font-size: 13px;
  background: rgba(255,255,255,.75); }
.tbtn.crouch.on { background: var(--gold); transform: none; box-shadow: 0 4px 0 #c79400; }
.tbtn.lean { bottom: calc(env(safe-area-inset-bottom) + 146px); width: 60px; height: 60px; font-size: 16px; background: rgba(255,255,255,.75); }
.tbtn.lean.r { right: calc(env(safe-area-inset-right) + 40px); }
.tbtn.lean.l { right: calc(env(safe-area-inset-right) + 112px); }
.tbtn.lean small { display: block; font-size: 10px; line-height: 1; }
.tbtn.lean.on { background: var(--gold); transform: none; box-shadow: 0 4px 0 #c79400; }
.tbtn svg { position: absolute; inset: -6px; width: calc(100% + 12px); height: calc(100% + 12px); transform: rotate(-90deg); pointer-events: none; }
.ring-bg { fill: none; stroke: rgba(255,255,255,0); stroke-width: 7; }
.ring { fill: none; stroke: #fff; stroke-width: 7; stroke-linecap: round; stroke-dasharray: 276.5; stroke-dashoffset: 276.5; }

/* ---------- タイトル・結果 ---------- */
.panel { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(calc(var(--appW, 100vw) * .9), 380px);
  max-height: calc(var(--appH, 100dvh) - 24px); overflow-y: auto; padding: 26px 22px 20px; text-align: center; background: rgba(255,255,255,.92);
  border-radius: 24px; box-shadow: 0 8px 0 rgba(29,43,69,.18), 0 20px 50px rgba(29,43,69,.2); touch-action: pan-y; -webkit-overflow-scrolling: touch; }
.logo { font-size: 58px; font-weight: 900; line-height: 1; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 6px 0 var(--ink); letter-spacing: .04em; }
.logo small { display: block; font-size: 24px; margin-top: 6px; color: var(--red); -webkit-text-stroke: 2px var(--ink); text-shadow: 0 3px 0 var(--ink); letter-spacing: .3em; }
/* 横持ちで縦が短いときは、タイトルを左右2列にする */
/* 横持ちで高さが低いとき（回して表示しているときも）：JS が body に short を付ける */
body.short .panel.title { width: min(calc(var(--appW, 100vw) * .94), 760px); display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: center; padding: 18px 20px; }
body.short .panel.title .logo { font-size: 46px; }
body.short .panel.title .sub { margin: 10px 0 8px; }
body.short .panel.title .btn { padding: 11px 0; }
body.short .panel.title .howto { margin: 6px 0 0; font-size: 12px; }
body.short .panel.title .stage-pick { margin-top: 0; }
/* 結果：左に勝ち負けと点、右にボタン */
body.short #result { width: min(calc(var(--appW, 100vw) * .94), 680px); display: grid; grid-template-columns: 1fr 1fr; column-gap: 20px; align-items: center; padding: 16px 20px; }
body.short #result .r-head { grid-column: 1; grid-row: 1; }
body.short #result .r-score { grid-column: 1; grid-row: 2; }
body.short #result .r-sub { grid-column: 1; grid-row: 3; }
body.short #result .btn { grid-column: 2; margin-top: 8px; padding: 11px 0; }
body.short #result .r-promo { grid-column: 1 / -1; grid-row: 5; }
body.short #result .r-wait { grid-column: 1; grid-row: 4; }
body.short #result #btn-share { grid-row: 1; }
body.short #result #btn-replay { grid-row: 2; }
body.short #result #btn-again { grid-row: 3; }
body.short #result #btn-top { grid-row: 4; }
.stage-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 14px; }
.stage-pick button { border: 2px solid transparent; background: #eef3f9; border-radius: 12px; padding: 6px 8px; font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
.stage-pick button b { display: block; font-size: 13px; font-weight: 900; }
.stage-pick button small { display: block; font-size: 10px; font-weight: 800; color: #6a7891; }
.stage-pick button.on { background: #fff; border-color: var(--red); box-shadow: 0 2px 0 rgba(29,43,69,.18); }
.diff { display: flex; gap: 6px; background: #eef3f9; padding: 4px; border-radius: 14px; }
.diff button { flex: 1; border: 0; padding: 8px 0; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 900; color: #6a7891; background: transparent; cursor: pointer; }
.diff button.oni { color: #c0392b; }
.diff button.oni.on { background: #e2483d; color: #fff; }
.diff button.on { background: #fff; color: var(--ink); box-shadow: 0 2px 0 rgba(29,43,69,.18); }
.sub { font-size: 16px; font-weight: 800; margin: 16px 0 14px; }
.sub b { color: var(--red); font-size: 20px; }
.btn { display: block; width: 100%; margin-top: 10px; padding: 14px 0; font: inherit; font-size: 18px; font-weight: 900; color: #fff;
  background: var(--red); border: 0; border-radius: 16px; box-shadow: 0 5px 0 #a8302a; cursor: pointer; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #a8302a; }
.btn.ghost { background: #eef3f9; color: var(--ink); box-shadow: 0 5px 0 #c8d4e2; }
.btn.ghost:disabled { opacity: .55; cursor: default; }
.btn small { font-size: 12px; margin-left: 4px; }
.btn-row { display: flex; gap: 8px; }
.btn-row .btn { font-size: 15px; line-height: 1.25; padding: 8px 0; }
.o-spin { display: flex; justify-content: center; gap: 10px; margin: 18px 0 4px; }
.o-spin i { width: 18px; height: 18px; border-radius: 50%; background: #dfe9f4; box-shadow: inset 0 -3px 0 #c3d2e4; animation: o-bounce 1s ease-in-out infinite; }
.o-spin i:nth-child(2) { animation-delay: .15s; } .o-spin i:nth-child(3) { animation-delay: .3s; }
@keyframes o-bounce { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12px); } }
.o-time { margin: 4px 0 0; font-size: 20px; font-weight: 900; color: var(--ink); }
.btn.blue { background: var(--blue); box-shadow: 0 5px 0 #2a5a9e; }
.f-head { font-size: 22px; font-weight: 900; margin-bottom: 6px; }
.f-name { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 14px; font-weight: 900; }
.f-name input { flex: 1; min-width: 0; font: inherit; font-size: 15px; font-weight: 900; border: 3px solid #d6e0ec; border-radius: 12px; padding: 6px 10px; color: var(--ink); background: #fff; user-select: text; -webkit-user-select: text; }
.f-or { margin: 16px 0 6px; font-size: 13px; font-weight: 800; color: #6a7891; }
.f-join { display: flex; gap: 8px; align-items: stretch; }
.f-join input { flex: 1; min-width: 0; font: inherit; font-size: 24px; font-weight: 900; letter-spacing: .2em; text-align: center; border: 3px solid #d6e0ec;
  border-radius: 14px; padding: 6px; color: var(--ink); background: #fff; user-select: text; -webkit-user-select: text; }
.f-join .btn { width: 96px; margin-top: 0; }
.f-note { margin: 10px 0 0; font-size: 12px; font-weight: 800; color: #6a7891; }
.f-code { font-size: 56px; font-weight: 900; letter-spacing: .18em; color: var(--ink); margin: 4px 0; }
.f-status { min-height: 1.4em; margin: 12px 0 0; font-size: 14px; font-weight: 900; color: var(--red); }
.f-members { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 10px 0 2px; }
.f-members .mb, .rank span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 900; background: #eef3f9; border-radius: 999px; padding: 4px 10px 4px 6px; }
.f-members b, .rank b, .pm b { width: 14px; height: 14px; border-radius: 50%; display: inline-block; }
.btn:disabled { opacity: .5; }
.rank { display: flex; flex-direction: column; gap: 4px; align-items: center; font-size: 16px; }
.rank em { font-style: normal; color: var(--red); min-width: 1.2em; }
.pm { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 900; color: var(--ink); margin-left: 6px; letter-spacing: -1px; }
.pm.out { opacity: .55; }
.r-wait { font-size: 13px; font-weight: 900; color: var(--blue); margin-top: 6px; }
.btn.x { background: #111; box-shadow: 0 5px 0 #000; }
.howto { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; font-size: 13px; font-weight: 800; line-height: 1.6; color: #44536e; }
.howto li { padding: 6px 10px; background: #eef3f9; border-radius: 10px; margin-top: 6px; }
.howto b { color: var(--ink); }
.howto .hard { color: #2b8fd0; }
.r-head { font-size: 60px; font-weight: 900; color: #fff; -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); }
.r-head.win { color: var(--gold); }
.r-score { font-size: 40px; font-weight: 900; margin: 6px 0 2px; font-variant-numeric: tabular-nums; }
.r-score .me { color: var(--red); }
.r-score .foe { color: var(--blue); }
.r-sub { font-size: 14px; font-weight: 800; color: #5b6a85; margin-bottom: 8px; }

/* 縦持ちのとき：横にしてもらう */
.rotate { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
  background: rgba(207,227,243,.96); font-weight: 900; font-size: 18px; }
.rotate .phone { width: 46px; height: 80px; border: 5px solid var(--ink); border-radius: 10px; animation: turn 1.6s ease-in-out infinite; }
@keyframes turn { 0%, 20% { transform: rotate(0); } 60%, 100% { transform: rotate(-90deg); } }

/* 結果画面の「ほかのゲームも遊んでね」 */
.r-promo .promo-card { margin: 12px 0 0; }
body.short .r-promo .promo-card { margin-top: 8px; }
body.short .r-promo .promo-label { padding-top: 6px; }
body.short .r-promo .promo-body { padding: 4px 12px 8px; }
body.short .r-promo .promo-desc { display: none; }
body.short .r-promo img { height: 40px; width: 76px; }
body.short #result .btn { padding: 9px 0; margin-top: 6px; }

/* タイトル（10/28 整理）：左にロゴ、右に遊び方の選択 */
.t-side > .btn:first-child { margin-top: 14px; }
/* お知らせのベル（/news.js）。タイトルの間だけ右上に */
.sb-news { position: fixed; z-index: 6; top: 12px; right: max(12px, env(safe-area-inset-right)); width: 42px; height: 42px; border: 0; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; color: var(--ink); box-shadow: 0 4px 0 rgba(29, 43, 69, .18), 0 6px 16px rgba(0, 0, 0, .12); cursor: pointer; }
.sb-news svg { width: 22px; height: 22px; }
#title.hidden ~ .sb-news { display: none; }
.link-btn { display: block; margin: 12px auto 0; border: 0; background: none; font: inherit; font-size: 14px; font-weight: 900; color: #6a7891; text-decoration: underline; cursor: pointer; }
.pick-label { margin: 12px 0 6px; font-size: 13px; font-weight: 900; color: #6a7891; text-align: left; }
.setup .stage-pick { margin-top: 0; }
#f-stagepick { margin: 4px 0 8px; }
body.short .panel.title { grid-template-columns: 1fr 1.1fr; }
body.short .panel.title .t-side > .btn:first-child { margin-top: 0; }
body.short .panel.title .logo { font-size: 52px; }
/* 準備画面（横持ち）：左に強さとステージ、右にボタン */
body.short .panel.setup { width: min(calc(var(--appW, 100vw) * .94), 640px); display: grid; grid-template-columns: 1.6fr 1fr; column-gap: 18px; padding: 14px 18px; }
body.short .panel.setup .f-head { grid-column: 1 / -1; }
body.short .panel.setup > :not(.f-head):not(.btn) { grid-column: 1; }
body.short .panel.setup .btn { grid-column: 2; }
body.short .panel.setup #btn-start-com { grid-row: 2 / span 2; align-self: end; }
body.short .panel.setup #btn-setup-back { grid-row: 4 / span 2; align-self: start; }
body.short .panel.setup .pick-label { margin: 6px 0 4px; }
/* あそびかた（横持ち）：説明を2列に */
body.short #howto { width: min(calc(var(--appW, 100vw) * .94), 760px); padding: 14px 18px; }
body.short #howto .sub { margin: 4px 0 8px; }
body.short #howto .howto { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; }
body.short #howto .howto li { margin: 0; }
body.short #howto.panel .btn { margin-top: 10px; padding: 9px 0; }
/* ともだちの部屋（横持ち）：左に数字とステージ、右に顔ぶれと「はじめる」 */
body.short #friend { width: min(calc(var(--appW, 100vw) * .94), 760px); padding: 14px 18px; }
body.short #f-wait:not(.hidden) { display: grid; grid-template-columns: 1.15fr 1fr; column-gap: 18px; align-items: start; }
body.short #f-wait > * { grid-column: 1; }
body.short #f-wait .f-code { font-size: 40px; margin: 0; }
body.short #f-wait .f-note { margin-top: 4px; }
body.short #f-members { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
body.short #btn-start { grid-column: 2; grid-row: 3 / span 2; align-self: start; }
body.short #btn-invite { grid-column: 2; grid-row: 4 / span 2; align-self: end; }
body.short #friend .f-head { font-size: 18px; margin-bottom: 0; }
