/* クレーンゲーム シミュレータ（試作）
   レイアウト: 1画面のアプリ。上にヘッダー、まん中に3Dの台、下に操作盤（①②の長押しボタン）。
   設定と記録は下から出るシート。 */
:root {
  --bg: #eef1f4;
  --surface: #ffffff;
  --ink: #1b2430;
  --muted: #5b6675;
  --line: #d5dbe2;
  --accent: #f2a33a;
  --accent-ink: #3a2200;
  --stage: #dde5ec;
  --good: #1e9e6a;
  --bad: #d2453b;
  --shadow: 0 1px 2px rgba(27, 36, 48, .08), 0 6px 20px rgba(27, 36, 48, .08);
  --font-display: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-body: system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
  --font-num: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #11161c; --surface: #19212a; --ink: #e7ecf1; --muted: #9aa6b3; --line: #2a3440;
    --accent: #f5b24e; --accent-ink: #2b1900; --stage: #0f151b; --good: #3cc98e; --bad: #f0675c;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #11161c; --surface: #19212a; --ink: #e7ecf1; --muted: #9aa6b3; --line: #2a3440;
  --accent: #f5b24e; --accent-ink: #2b1900; --stage: #0f151b; --good: #3cc98e; --bad: #f0675c;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
[hidden] { display: none !important; }

.app {
  height: 100%;
  display: grid;
  grid-template-rows: auto 1fr auto;
  max-width: var(--app-max, 720px);
  margin: 0 auto;
}

/* ヘッダー */
.bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-block: 10px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.stage-sel { font: inherit; font-size: 13px; padding: 4px 8px; }
.bar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 17px;
  letter-spacing: .02em;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chip-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 13px;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
}
.legal-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.legal-links .chip-btn { text-decoration: none; display: inline-block; }
.chip-btn:focus-visible, .seg button:focus-visible, .hold:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* 3Dの台 */
.stage {
  position: relative;
  min-height: 0;
  background: var(--stage);
  overflow: hidden;
  touch-action: none;
}
.stage canvas { display: block; width: 100%; height: 100%; }
.hud {
  position: absolute;
  left: max(12px, env(safe-area-inset-left, 0px));
  top: 10px;
  display: grid;
  gap: 4px;
  pointer-events: none;
}
.hud .t {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 13px;
  color: var(--ink);
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border-radius: 8px;
  padding: 3px 8px;
  width: max-content;
}
.views {
  position: absolute;
  right: max(12px, env(safe-area-inset-right, 0px));
  top: 10px;
}
.seg {
  display: inline-flex;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 2px;
}
.seg button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--surface); }
.ver {
  position: absolute;
  left: max(10px, env(safe-area-inset-left, 0px));
  bottom: 6px;
  font-family: var(--font-num);
  font-size: 10px;
  color: var(--muted);
  opacity: .55;
  pointer-events: auto;   /* 20回タップでスタミナ満タン */
  user-select: none; -webkit-user-select: none; touch-action: manipulation;
}
.result {
  position: absolute;
  left: 50%;
  bottom: 192px;   /* 台の上の①②ボタン（と下の文字）の上に出す */
  transform: translateX(-50%);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: 14px;
  padding: 8px 16px;
  text-align: center;
  pointer-events: none;
}
.result .big { font-family: var(--font-display); font-size: 20px; }
.result .big.good { color: var(--good); }
.result .big.bad { color: var(--bad); }
.result .off { font-family: var(--font-num); font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }

/* 操作盤 */
.deck {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding-block: 12px max(14px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  display: grid;
  gap: 10px;
}
/* 案内文は2行分の高さを取っておく（文が変わって折り返しが増減しても、台の大きさが変わらない） */
.status { color: var(--muted); font-size: 13px; line-height: 1.4; min-height: 2.8em; text-align: center; display: grid; align-items: center; }
.advice { font-size: 13px; line-height: 1.5; padding: 8px 12px; border-radius: 10px; background: var(--panel, rgba(127,127,127,.12)); color: var(--ink, inherit); }
/* ①②は1つのボタン（①を離すと同じ場所が②になる）。台の画面の下の真ん中に重ねて置く（台の描画は操作盤の上まで広がる） */
.holds {
  position: absolute;
  left: 50%;
  bottom: max(30px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 16px;   /* ボタンの下の厚み（影 6px）と、札が弾む分（3px）より広く空ける */
  z-index: 2;
  transition: opacity .35s ease;
}
.holds.gone { opacity: 0; pointer-events: none; }
/* 台の画面と操作盤の文字は、長押しやなぞりで範囲選択されないように（ボタンの札・案内・秒数など）。入力欄は除く */
.stage, .deck, .holds, .hold-cap { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.deck input, .deck textarea, .deck select { -webkit-user-select: auto; user-select: auto; }
.hold[hidden] { display: none; }
/* 実機のような丸い押しボタン: 銀の縁（ベゼル）に、つやのある色のドーム。①はピンク、②は水色 */
.hold {
  --c1: #ffd0e2; --c2: #ff4f93; --c3: #c2125a;
  position: relative;
  border: 0;
  border-radius: 50%;
  width: 104px;
  height: 104px;
  padding: 7px;
  font: inherit;
  cursor: pointer;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  background: linear-gradient(160deg, #ffffff 0%, #d9dde3 35%, #9aa1ab 70%, #eef0f3 100%);
  box-shadow: 0 6px 0 #6b717a, 0 10px 18px rgba(0, 0, 0, .35), inset 0 1px 1px #fff;
  transition: transform .05s, box-shadow .05s;
}
.hold.two { --c1: #cdf3ff; --c2: #22b5f0; --c3: #0a6fa8; }
.hold .dome {
  position: relative;
  display: grid;
  grid-template: 1fr / 1fr;   /* 矢印の絵と数字を同じ所に重ねる（数字は矢印の真ん中） */
  place-items: center;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 34%, var(--c1) 0%, var(--c2) 48%, var(--c3) 100%);
  box-shadow: inset 0 -6px 10px rgba(0, 0, 0, .28), inset 0 3px 4px rgba(255, 255, 255, .6), 0 0 0 2px rgba(0, 0, 0, .18);
  color: #fff;
}
/* 上のつや */
.hold .dome::before {
  content: '';
  position: absolute;
  left: 18%; right: 18%; top: 7%; height: 34%;
  border-radius: 50%;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .7), rgba(255, 255, 255, 0));
  pointer-events: none;
  z-index: 2;
}
/* 矢印の絵（SVG）: 濃い縁 → 白い縁 → ほんのり陰のある白い本体 → つやの線。向きは真上（②）か真横（①） */
.hold .a { grid-area: 1 / 1; position: relative; width: 92%; height: 92%; overflow: visible; filter: drop-shadow(0 2px 1.5px rgba(0, 0, 0, .35)); }
.hold .a path { stroke-linejoin: round; stroke-linecap: round; }
.hold .a .o { fill: none; stroke: var(--c3); stroke-width: 7; }
.hold .a .w { fill: none; stroke: #fff; stroke-width: 3.6; }
.hold .a .f { fill: url(#hold-arrow-fill); stroke: color-mix(in srgb, var(--c3) 35%, #fff); stroke-width: 0.8; }
.hold .a .hl { fill: none; stroke: rgba(255, 255, 255, .95); stroke-width: 1.6; }
/* 数字の絵（SVG）: 濃い色の丸に白い縁、白い太い線の数字。矢印が回っても数字は立ったまま */
.hold .n { grid-area: 1 / 1; position: relative; z-index: 1; width: 40%; height: 40%; overflow: visible; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .3)); }
.hold .n .nb { fill: var(--c3); stroke: #fff; stroke-width: 2.5; }
.hold .n .d { fill: none; stroke: #fff; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.hold .n .d2, .hold.two .n .d1 { display: none; }
.hold.two .n .d2 { display: inline; }
.hold.down { transform: translateY(5px); box-shadow: 0 1px 0 #6b717a, 0 3px 8px rgba(0, 0, 0, .3), inset 0 1px 1px #fff; }
/* 長押ししている間は、実機のように中から橙色に光る（①②どちらも） */
.hold.down, .hold.two.down { --c1: #fff4c2; --c2: #ffa21a; --c3: #d9480f; }
.hold.down .dome {
  background: radial-gradient(circle at 50% 45%, #fffbe6 0%, var(--c1) 22%, var(--c2) 60%, var(--c3) 100%);
  box-shadow: inset 0 0 14px rgba(255, 240, 180, .9), 0 0 0 2px rgba(0, 0, 0, .15), 0 0 18px 6px rgba(255, 150, 30, .75);
  overflow: hidden;
}
.hold.down { box-shadow: 0 1px 0 #6b717a, 0 0 26px 8px rgba(255, 140, 20, .55), inset 0 1px 1px #fff; }
.hold:disabled { cursor: default; }
.hold:disabled .dome { filter: grayscale(1) brightness(.92); opacity: .8; }
/* ボタンの下の案内の札: ゲームらしく、ボタンと同じ色の帯に白い太字（濃い縁取り）。秒数は右の小さな札 */
.hold-cap {
  --k1: #ff7ab0; --k2: #e0186a; --k3: #8f0b42;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 6px 4px 14px;
  border-radius: 999px;
  background: linear-gradient(to bottom, var(--k1), var(--k2));
  border: 2px solid #fff;
  box-shadow: 0 3px 0 var(--k3), 0 6px 12px rgba(0, 0, 0, .3);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: -1px -1px 0 var(--k3), 1px -1px 0 var(--k3), -1px 1px 0 var(--k3), 1px 1px 0 var(--k3), 0 2px 0 var(--k3);
}
.holds.two .hold-cap { --k1: #5fd3ff; --k2: #1590d6; --k3: #0a4f80; }
.hold-cap .l { font-weight: 900; }
.hold-cap .s {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  color: var(--k3);
  text-shadow: none;
  background: #fff;
  border-radius: 999px;
  padding: 1px 8px;
}
/* 押す前は札がふわっと弾む */
.holds.ready .hold-cap { animation: cap-bounce 1.1s ease-in-out infinite; }
@keyframes cap-bounce { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-3px) scale(1.04); } }
@media (prefers-reduced-motion: reduce) { .holds.ready .hold-cap { animation: none; } }
.tools { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }

/* シート（設定・記録） */
.sheet-back {
  position: fixed;
  inset: 0;
  background: rgba(10, 14, 20, .38);
  z-index: 20;
}
.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 78%;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 18px 18px 0 0;
  z-index: 21;
  max-width: 720px;
  margin: 0 auto;
  padding-block: 14px max(18px, env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  box-shadow: var(--shadow);
}
.sheet h2 {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.sheet h2 { position: sticky; top: -14px; background: var(--surface); padding-block: 4px; z-index: 1; }
.set-search {
  width: 100%; margin-top: 10px; padding: 9px 12px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-size: 14px;
}
/* 設定のカテゴリ: アイコンのタブ（スクロールしても上に残る） */
.cat-tabs {
  position: sticky; top: 26px; z-index: 1; background: var(--surface);
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px;
  margin-top: 10px; padding-block: 6px;
}
.cat-tab {
  position: relative; display: grid; justify-items: center; gap: 3px;
  padding: 7px 0 5px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--bg); color: var(--muted); font: inherit; font-size: 10.5px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.cat-tab svg { width: 24px; height: 24px; }
.cat-tab[aria-selected="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.cat-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cat-tabs.searching .cat-tab[aria-selected="true"] { background: var(--bg); border-color: var(--line); color: var(--muted); }
.cat-mod {
  position: absolute; top: 3px; right: 5px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: var(--bad, #d33); color: #fff; font-style: normal; font-size: 10px; line-height: 16px; text-align: center;
}
.cat-mod[hidden] { display: none; }
.group { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 11px 14px; font-size: 14px; font-weight: 700; user-select: none;
}
.group > summary::-webkit-details-marker { display: none; }
.group > summary::before { content: '\25B8'; color: var(--muted); font-size: 11px; transition: transform .15s; }
.group[open] > summary::before { transform: rotate(90deg); }
.group > summary .gname { flex: 1; }
.gmod { font-size: 11px; font-weight: 700; color: var(--accent-ink); background: var(--accent); border-radius: 999px; padding: 1px 8px; }
.field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 2px 10px;
  align-items: center;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
.field[hidden], .group[hidden] { display: none; }
.field .fl { display: grid; gap: 2px; min-width: 0; }
.field label { font-size: 14px; }
.field .hint { font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.field .v {
  font-family: var(--font-num); font-variant-numeric: tabular-nums; font-size: 13px; color: var(--muted);
  border: 0; background: none; padding: 4px 0 4px 8px; cursor: pointer; white-space: nowrap;
}
.field.mod .v { color: var(--ink); font-weight: 700; }
.field.mod { box-shadow: inset 3px 0 0 var(--accent); }
.field .dflt { grid-column: 1 / -1; font-size: 11px; color: var(--muted); }
.field input[type="range"] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); margin: 4px 0 0; }
.field .seg { justify-self: end; flex-wrap: wrap; justify-content: flex-end; }
.set-none { color: var(--muted); font-size: 13px; text-align: center; padding: 16px 0; }
.note { color: var(--muted); font-size: 12px; line-height: 1.6; margin: 10px 0 0; }

.records { display: grid; gap: 0; }
.rec {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding-block: 9px;
  border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
}
.rec .mark { font-family: var(--font-display); font-size: 15px; width: 1.6em; text-align: center; }
.rec .mark.good { color: var(--good); }
.rec .mark.bad { color: var(--muted); }
.rec .tm { font-family: var(--font-num); font-size: 13px; }
.rec .off { font-family: var(--font-num); font-size: 13px; color: var(--muted); }
.summary {
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  background: var(--bg);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
}
.empty { color: var(--muted); padding-block: 18px; text-align: center; font-size: 13px; }

@media (prefers-reduced-motion: reduce) {
  .hold { transition: none; }
}

/* 獲得の演出: 「GET!」が弾んで出る・画面が白く一瞬光る */
.flashfx { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
.flashfx.on { animation: flash .45s ease-out forwards; }
@keyframes flash { 0% { opacity: .75; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .flashfx.on { animation: none; } }

/* 視点ボタンの下にオートカメラ（切り替え） */
.views { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* メニュー（音量・画面サイズ） */
.menu-group { margin: 6px 0 16px; }
.lic-text { white-space: pre-wrap; word-break: break-word; font: 11px/1.55 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; color: #4a2400; background: #fffaf0; border-radius: 10px; padding: 10px; margin: 0; max-height: 70vh; overflow: auto; user-select: text; }
.menu-group h3 { font-size: 13px; margin: 0 0 8px; color: var(--muted); font-weight: 600; }
.menu-row { display: grid; grid-template-columns: 7.5em 1fr 2.5em; align-items: center; gap: 10px; margin: 8px 0; font-size: 14px; }
.menu-row input[type=range] { width: 100%; accent-color: var(--accent); }
.menu-row output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }

/* パブリック（筐体設定の「デバッグ / パブリック」）: 遊ぶ人向け。秒数・揺れ・外れの表示と、下の道具ボタンを隠す */
body.public .hud,
body.public .hold-cap .s,
body.public .result,   /* 結果の吹き出し（「景品が落ちた！獲得！」「◯のフックに掛かった！」「外れ」など）は全部出さない */
body.public .result .off,
body.public [data-view="top"],   /* 「上」の視点 */
body.public .tools,
body.public .deck { display: none !important; }   /* 案内文・道具ボタンの入った下の操作盤ごと出さない（そのぶん台の画面が広がる） */
body.public .hold-cap { padding-right: 14px; }

/* 名前の後ろの「β版」 */
.bar h1 .ver-tag { font-size: .62em; font-weight: 700; opacity: .7; letter-spacing: .02em; white-space: nowrap; }

/* スマホなど狭い画面: ページを画面（ウィンドウ）の幅に合わせる。ヘッダーが広すぎてページが画面より広くならないように */
html, body { max-width: 100%; overflow-x: hidden; }
.app { width: 100%; min-width: 0; }
.app > * { min-width: 0; }
.bar { flex-wrap: wrap; row-gap: 6px; }
.stage-sel { max-width: 46vw; }
.views { max-width: calc(100% - 24px); }
.views .seg { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) {
  /* 名前は1段目に、ステージとボタンは2段目に並べる */
  .bar h1 { flex: 1 1 100%; font-size: 16px; }
  .bar .chip-btn { font-size: 12px; padding: 5px 10px; }
  .bar .stage-sel { flex: 1 1 auto; }
  .seg button { padding: 4px 8px; }
}

/* 視点とオートカメラのボタン: アイコンと名前を並べた、ゲームらしい札。銀の縁に、つやのある紺の帯。
   選んでいるものは橙色に光る */
.views .seg { background: transparent; border: 0; padding: 0; gap: 6px; }
.views .seg .ic-btn {
  position: relative;
  display: inline-flex; align-items: center; gap: 4px;
  height: 34px;
  padding: 0 12px 0 8px;
  border: 2px solid #e7eaee;
  border-radius: 999px;
  cursor: pointer;
  color: #fff;
  font: inherit; font-size: 12px; font-weight: 900; letter-spacing: .02em; white-space: nowrap;
  background: linear-gradient(to bottom, #7aa3ff 0%, #2f5fd0 55%, #17377f 100%);
  box-shadow: 0 3px 0 #0e2456, 0 5px 10px rgba(0, 0, 0, .3), inset 0 1px 1px rgba(255, 255, 255, .6);
  text-shadow: 0 1px 0 rgba(0, 0, 0, .45);
  overflow: hidden;
}
.views .seg .ic-btn::after {   /* 上のつや */
  content: ''; position: absolute; left: 8%; right: 8%; top: 2px; height: 42%; border-radius: 999px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0)); pointer-events: none;
}
.views .seg .ic-btn[aria-pressed="true"] {
  color: #6b2204; text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  background: linear-gradient(to bottom, #fff1b8 0%, #ffb02e 55%, #e0570f 100%);
  box-shadow: 0 3px 0 #9a3508, 0 0 12px 3px rgba(255, 150, 30, .6), inset 0 1px 1px rgba(255, 255, 255, .8);
}
.views .seg .ic-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #0e2456, 0 2px 5px rgba(0, 0, 0, .3); }
.views .seg .ic-btn .ic {
  position: relative; z-index: 1; width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.3; stroke-linecap: round; stroke-linejoin: round;
}
.views .seg .ic-btn .lb { position: relative; z-index: 1; }
.views .seg .ic-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) { .views .seg .ic-btn { height: 30px; padding: 0 9px 0 6px; font-size: 11px; } .views .seg .ic-btn .ic { width: 16px; height: 16px; } }

/* 視点の札の並びの先頭のカメラ（押せない目印）。札は名前だけ */
.views .seg { align-items: center; }
.views .seg .ic-btn { padding: 0 12px; }
.views .seg .cam {
  width: 34px; height: 34px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(160deg, #ffffff 0%, #d9dde3 40%, #9aa1ab 75%, #eef0f3 100%);
  box-shadow: 0 2px 0 #6b717a, 0 4px 8px rgba(0, 0, 0, .28), inset 0 1px 1px #fff;
}
.views .seg .cam svg { width: 20px; height: 20px; fill: none; stroke: #17377f; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) { .views .seg .cam { width: 30px; height: 30px; } .views .seg .cam svg { width: 18px; height: 18px; } .views .seg .ic-btn { padding: 0 10px; } }

/* 1段目（カメラと視点の札）は、ひとつの枠（セクション）で包む */
.views .seg[aria-label="視点"] {
  gap: 5px;
  padding: 4px 6px 6px 4px;
  border-radius: 999px;
  background: linear-gradient(to bottom, rgba(20, 38, 84, .72), rgba(8, 18, 46, .78));
  border: 2px solid rgba(255, 255, 255, .8);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .3), inset 0 1px 0 rgba(255, 255, 255, .25);
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}

/* カメラの目印は押せるボタンに見えないよう、縁も影もない平らな絵だけにする */
.views .seg .cam { background: none; box-shadow: none; width: 26px; height: 26px; margin: 0 1px 0 4px; }
.views .seg .cam svg { stroke: rgba(255, 255, 255, .85); width: 20px; height: 20px; }
@media (max-width: 560px) { .views .seg .cam { width: 22px; height: 22px; } .views .seg .cam svg { width: 18px; height: 18px; } }

/* 先頭の見出し「視点」: 押せる絵に見えないよう文字だけ。後ろに区切り線 */
.views .seg .cam {
  width: auto; height: auto; display: inline-flex; align-items: center;
  padding: 0 8px 0 8px; margin: 0 2px 0 0;
  color: rgba(255, 255, 255, .8); font-size: 11px; font-weight: 700; letter-spacing: .12em; white-space: nowrap;
  border-right: 1px solid rgba(255, 255, 255, .35); border-radius: 0;
  pointer-events: none; cursor: default;
}
@media (max-width: 560px) { .views .seg .cam { width: auto; height: auto; font-size: 10px; padding: 0 6px; } }

/* 獲得後の「もう一度あそぶ」: ①②のボタンの所に出る、大きなゲームらしい札 */
.again {
  position: absolute; left: 50%; bottom: max(44px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 3;
  padding: 14px 30px;
  border: 3px solid #fff;
  border-radius: 999px;
  font: inherit; font-size: 20px; font-weight: 900; letter-spacing: .04em; white-space: nowrap;
  color: #fff; cursor: pointer;
  background: linear-gradient(to bottom, #ffd36b 0%, #ff8a1a 55%, #e0480f 100%);
  box-shadow: 0 6px 0 #9a3508, 0 10px 22px rgba(0, 0, 0, .35), inset 0 2px 2px rgba(255, 255, 255, .7);
  text-shadow: -2px -2px 0 #9a3508, 2px -2px 0 #9a3508, -2px 2px 0 #9a3508, 2px 2px 0 #9a3508, 0 3px 0 #9a3508;
  -webkit-user-select: none; user-select: none;
  animation: again-in .35s cubic-bezier(.2, 1.6, .4, 1) both, again-bounce 1.2s ease-in-out .35s infinite;
}
.again:active { transform: translateX(-50%) translateY(4px); box-shadow: 0 2px 0 #9a3508, 0 4px 10px rgba(0, 0, 0, .3); animation: none; }
@keyframes again-in { from { transform: translateX(-50%) scale(.4); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes again-bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .again { animation: none; } }

/* 視点の札: 選んでいても光らせない（青のまま）。押した瞬間だけ橙に光る */
.views .seg[aria-label="視点"] .ic-btn[aria-pressed="true"] {
  color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .45);
  background: linear-gradient(to bottom, #7aa3ff 0%, #2f5fd0 55%, #17377f 100%);
  box-shadow: 0 3px 0 #0e2456, 0 5px 10px rgba(0, 0, 0, .3), inset 0 1px 1px rgba(255, 255, 255, .6);
}
.views .seg[aria-label="視点"] .ic-btn.flash {
  color: #6b2204; text-shadow: 0 1px 0 rgba(255, 255, 255, .6);
  background: linear-gradient(to bottom, #fff1b8 0%, #ffb02e 55%, #e0570f 100%);
  box-shadow: 0 3px 0 #9a3508, 0 0 12px 3px rgba(255, 150, 30, .6), inset 0 1px 1px rgba(255, 255, 255, .8);
}

/* ===== 「GET!」: 大きく、ポップに。後ろで光の放射が回り、輪が広がり、1文字ずつ弾んで出て、星が飛び散る ===== */
.getfx { position: absolute; inset: 0; pointer-events: none; z-index: 5; opacity: 0; overflow: hidden; }
.getfx.on { animation: gf-show 2.8s linear forwards; }
@keyframes gf-show { 0% { opacity: 1; } 82% { opacity: 1; } 100% { opacity: 0; } }
.getfx .burst, .getfx .ring, .getfx .word { position: absolute; left: 50%; top: 40%; }
/* 光の放射（黄色と白の帯が回る） */
.getfx .burst {
  width: 170vmax; height: 170vmax; border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  background: repeating-conic-gradient(rgba(255, 214, 40, .55) 0deg 9deg, rgba(255, 255, 255, .0) 9deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 8%, rgba(0, 0, 0, .6) 28%, transparent 55%);
          mask: radial-gradient(circle, #000 8%, rgba(0, 0, 0, .6) 28%, transparent 55%);
}
.getfx.on .burst { animation: gf-burst 2.8s cubic-bezier(.2, .9, .3, 1) forwards; }
@keyframes gf-burst { 0% { transform: translate(-50%, -50%) scale(0) rotate(0); } 14% { transform: translate(-50%, -50%) scale(1) rotate(25deg); } 100% { transform: translate(-50%, -50%) scale(1.1) rotate(120deg); } }
/* 広がる光の輪 */
.getfx .ring { width: 40vmin; height: 40vmin; border-radius: 50%; border: 1.6vmin solid rgba(255, 255, 255, .9); box-shadow: 0 0 4vmin rgba(255, 200, 40, .9); transform: translate(-50%, -50%) scale(0); }
.getfx.on .ring { animation: gf-ring .7s ease-out forwards; }
@keyframes gf-ring { 0% { transform: translate(-50%, -50%) scale(.2); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; } }
/* 文字: 黄色→橙のグラデーションに白い太い縁、さらに濃い赤茶の縁と厚み */
.getfx .word {
  display: flex; gap: .02em; transform: translate(-50%, -50%);
  font-family: var(--font-display); font-weight: 900; line-height: 1; white-space: nowrap;
  font-size: clamp(96px, 32vw, 240px); letter-spacing: -.01em;
  filter: drop-shadow(.035em 0 0 #7a1d00) drop-shadow(-.035em 0 0 #7a1d00) drop-shadow(0 .035em 0 #7a1d00) drop-shadow(0 -.035em 0 #7a1d00) drop-shadow(0 .09em 0 #7a1d00) drop-shadow(0 .14em .08em rgba(0, 0, 0, .35));
}
.getfx .word span {
  display: inline-block; transform: scale(0);
  background: linear-gradient(to bottom, #fffbe0 0%, #ffe14d 30%, #ffb11a 62%, #ff6a00 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  -webkit-text-stroke: .035em #fff; paint-order: stroke fill;
}
.getfx.on .word span { animation: gf-letter .55s cubic-bezier(.2, 1.8, .4, 1) forwards, gf-float 1.1s ease-in-out .7s infinite; }
.getfx.on .word span:nth-child(2) { animation-delay: .07s, .77s; }
.getfx.on .word span:nth-child(3) { animation-delay: .14s, .84s; }
.getfx.on .word span:nth-child(4) { animation-delay: .21s, .91s; }
@keyframes gf-letter { 0% { transform: scale(0) rotate(-25deg); } 60% { transform: scale(1.3) rotate(8deg); } 80% { transform: scale(.92) rotate(-3deg); } 100% { transform: scale(1) rotate(0); } }
@keyframes gf-float { 0%, 100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-.06em) scale(1.04); } }
/* 飛び散る星 */
.getfx .stars i {
  position: absolute; left: 50%; top: 40%; font-style: normal; font-size: clamp(22px, 7vw, 54px); color: var(--c);
  text-shadow: 0 0 .3em rgba(255, 255, 255, .9), 0 .08em 0 rgba(0, 0, 0, .25); transform: translate(-50%, -50%) scale(0); opacity: 0;
}
.getfx.on .stars i { animation: gf-star 1.6s cubic-bezier(.15, .8, .3, 1) var(--d) forwards; }
@keyframes gf-star {
  0% { transform: translate(-50%, -50%) scale(.2) rotate(0); opacity: 1; }
  70% { opacity: 1; }
  100% { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) scale(1.2) rotate(200deg); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .getfx.on .burst, .getfx.on .ring, .getfx.on .stars i { animation: none; opacity: 0; }
  .getfx.on .word span { animation: none; transform: none; }
}

/* 視点・オートカメラの札: 色の段差（上のつやの帯）が出ないよう、つやの帯をやめて、なめらかな1色のグラデーションに */
.views .seg .ic-btn::after { content: none; }
.views .seg .ic-btn,
.views .seg[aria-label="視点"] .ic-btn[aria-pressed="true"] { background: linear-gradient(to bottom, #4d7cf0, #2148b4); }
.views .seg .ic-btn[aria-pressed="true"],
.views .seg[aria-label="視点"] .ic-btn.flash[class] { background: linear-gradient(to bottom, #ffc45a, #ef6a12); }

/* 「GET!」のあいだ、集中線の下で画面全体をグレーに沈めて、文字と光を引き立てる */
.getfx .dim { position: absolute; inset: 0; background: rgba(28, 30, 38, .58); opacity: 0; }
.getfx.on .dim { animation: gf-dim 2.8s ease-out forwards; }
@keyframes gf-dim { 0% { opacity: 0; } 8% { opacity: 1; } 80% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .getfx.on .dim { animation: none; opacity: .6; } }

/* レインボーフラッシュ: 虹色が回りながら画面を光らせる。点滅は1秒に3回まで（光の点滅で気分が悪くなりにくい速さ）。
   動きを減らす設定の端末では点滅させない */
.getfx .rainbow {
  position: absolute; inset: -75%;   /* 回っても四隅が欠けない大きさ */
  background: conic-gradient(from 0deg, #ff004c, #ff8a00, #ffe600, #2bff6a, #00d0ff, #5a5cff, #d400ff, #ff004c);
  mix-blend-mode: screen; opacity: 0; filter: saturate(1.4);
}
.getfx.on .rainbow { animation: gf-rainbow-spin 2.8s linear forwards, gf-rainbow-flash 2.8s ease-in-out forwards; }
@keyframes gf-rainbow-spin { from { transform: rotate(0deg) scale(1.1); } to { transform: rotate(540deg) scale(1.1); } }
@keyframes gf-rainbow-flash {
  0% { opacity: 0; } 6% { opacity: .75; } 18% { opacity: .2; } 30% { opacity: .75; } 42% { opacity: .2; }
  54% { opacity: .8; } 66% { opacity: .25; } 78% { opacity: .6; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .getfx.on .rainbow { animation: none; opacity: .25; } }

/* 「GET!」の文字: ファッション誌のような高級感のあるディドン体（Bodoni Moda）に、ギラギラの虹色。
   虹色が横へ流れ続け、その上を白い光の筋が斜めに走る。縁は金 */
.getfx .word {
  font-family: 'Bodoni Moda', 'Didot', 'Bodoni 72', 'Times New Roman', serif; font-weight: 900; letter-spacing: .02em;
  font-size: clamp(80px, 26vw, 210px);
  filter: drop-shadow(.03em 0 0 #7a5200) drop-shadow(-.03em 0 0 #7a5200) drop-shadow(0 .03em 0 #7a5200) drop-shadow(0 -.03em 0 #7a5200)
          drop-shadow(0 .07em 0 #3d2400) drop-shadow(0 0 .12em rgba(255, 230, 120, .9)) drop-shadow(0 .12em .08em rgba(0, 0, 0, .4));
}
.getfx .word span {
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0) 38%, rgba(255, 255, 255, .95) 47%, rgba(255, 255, 255, 0) 56%),
    linear-gradient(90deg, #ff004c, #ff8a00, #ffe600, #2bff6a, #00d0ff, #5a5cff, #d400ff, #ff004c);
  background-size: 260% 100%, 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-stroke: .03em #ffe9a8; paint-order: stroke fill;
}
.getfx.on .word span { animation: gf-letter .55s cubic-bezier(.2, 1.8, .4, 1) forwards, gf-float 1.1s ease-in-out .7s infinite, gf-glitter 1.3s linear infinite; }
.getfx.on .word span:nth-child(2) { animation-delay: .07s, .77s, -.15s; }
.getfx.on .word span:nth-child(3) { animation-delay: .14s, .84s, -.3s; }
.getfx.on .word span:nth-child(4) { animation-delay: .21s, .91s, -.45s; }
@keyframes gf-glitter { from { background-position: 160% 0, 0% 0; } to { background-position: -60% 0, 150% 0; } }
@media (prefers-reduced-motion: reduce) { .getfx.on .word span { animation: none; transform: none; } }

/* ===== 確定演出: 暗転 → 衝撃 → 長めの虹色の祝い（約5秒）===== */
.blackfx { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; z-index: 6; }
.blackfx.on { animation: fx-black .45s linear forwards; }
@keyframes fx-black { 0% { opacity: 0; } 10% { opacity: 1; } 78% { opacity: 1; } 100% { opacity: 0; } }
.getfx.on { animation-duration: 5s; }
.getfx.on .dim { animation-duration: 5s; }
.getfx.on .burst { animation-duration: 5s; }
.getfx.on .rainbow { animation-duration: 5s, 5s; animation-name: gf-rainbow-spin, gf-rainbow-flash5; }
/* 点滅は1秒に3回まで */
@keyframes gf-rainbow-flash5 {
  0% { opacity: 0; } 4% { opacity: .8; } 11% { opacity: .2; } 18% { opacity: .8; } 25% { opacity: .2; } 32% { opacity: .8; }
  39% { opacity: .25; } 52% { opacity: .85; } 62% { opacity: .3; } 72% { opacity: .8; } 84% { opacity: .4; } 100% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .blackfx.on { animation: none; } }

/* ===== フィーバー演出（参考: 虹色の全画面背景）=====
   画面を不透明な虹色で埋める。前半(0〜2.6秒)は中心から放射状に爆発、白く1回光ってから、
   後半は赤紫・水色・黄の羽根が回る渦巻き。白いキラキラは canvas で描く。
   灰色の暗幕・半透明の虹・黄色い放射は使わない */
.getfx .dim, .getfx .rainbow, .getfx .burst { display: none; }
.getfx.on, .getfx.on .ring { animation-duration: 5.8s; }
.getfx.on .ring { animation-duration: .7s; }
.getfx .fever { position: absolute; inset: 0; opacity: 0; overflow: hidden; }
.getfx.on .fever { animation: fv-show 5.8s linear forwards; }
@keyframes fv-show { 0% { opacity: 0; } 3% { opacity: 1; } 88% { opacity: 1; } 100% { opacity: 0; } }
.getfx .fever > * { position: absolute; }
/* 前半: 大きな虹色の面に、白い光の筋が放射する */
.getfx .fever .rad {
  left: 50%; top: 40%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax;
  background:
    radial-gradient(circle, rgba(255, 255, 255, .95) 0, rgba(255, 255, 255, .0) 9%),
    repeating-conic-gradient(rgba(255, 255, 255, .55) 0deg 1.2deg, rgba(255, 255, 255, 0) 1.2deg 7deg),
    conic-gradient(#ff1f6b, #ff8a00, #ffe600, #36ff6e, #00e1ff, #4a5cff, #e02bff, #ff1f6b);
}
.getfx.on .fever .rad { animation: fv-rad 5.8s linear forwards, fv-first 5.8s step-end forwards; }
@keyframes fv-rad { from { transform: scale(.7) rotate(0deg); } to { transform: scale(1.25) rotate(60deg); } }
/* 中心の色が緑と青に交互に（明るさはほぼ同じなので点滅にはならない） */
.getfx .fever .core {
  left: 50%; top: 40%; width: 120vmax; height: 120vmax; margin: -60vmax 0 0 -60vmax; border-radius: 50%;
  background: radial-gradient(circle, #fff 0, #c8ff3c 10%, #2bff9a 22%, rgba(0, 220, 255, .6) 36%, rgba(0, 220, 255, 0) 52%);
}
.getfx.on .fever .core { animation: fv-core .7s ease-in-out infinite alternate, fv-first 5.8s step-end forwards; }
@keyframes fv-core { from { filter: hue-rotate(0deg); transform: scale(.9); } to { filter: hue-rotate(110deg); transform: scale(1.1); } }
@keyframes fv-first { 0% { opacity: 1; } 45% { opacity: 0; } 100% { opacity: 0; } }
/* 後半: 渦巻き（赤紫・水色・黄の羽根）と、逆に回る白い光の筋 */
.getfx .fever .swirl, .getfx .fever .streak { left: 50%; top: 40%; width: 260vmax; height: 260vmax; margin: -130vmax 0 0 -130vmax; opacity: 0; }
.getfx .fever .swirl { background: repeating-conic-gradient(from 0deg, #ff2bd6 0deg, #ff2bd6 18deg, #22e6ff 40deg, #22e6ff 58deg, #fff04a 80deg, #fff04a 98deg, #ff2bd6 120deg); }
.getfx .fever .streak {
  background: repeating-conic-gradient(rgba(255, 255, 255, .7) 0deg 1.5deg, rgba(255, 255, 255, 0) 1.5deg 9deg);
  -webkit-mask: radial-gradient(circle, transparent 2%, #000 12%, #000 40%, transparent 60%);
          mask: radial-gradient(circle, transparent 2%, #000 12%, #000 40%, transparent 60%);
}
.getfx.on .fever .swirl { animation: fv-spin 3.2s linear infinite, fv-second 5.8s step-end forwards; }
.getfx.on .fever .streak { animation: fv-spin-r 2.2s linear infinite, fv-second 5.8s step-end forwards; }
@keyframes fv-spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes fv-spin-r { from { transform: rotate(0deg) scale(1.05); } to { transform: rotate(-360deg) scale(1.05); } }
@keyframes fv-second { 0% { opacity: 0; } 45% { opacity: 1; } 100% { opacity: 1; } }
/* 白飛び（2.6秒で1回だけ） */
.getfx .fever .white { inset: 0; background: #fff; opacity: 0; }
.getfx.on .fever .white { animation: fv-white 5.8s linear forwards; }
@keyframes fv-white { 0% { opacity: 0; } 40% { opacity: 0; } 45% { opacity: .95; } 53% { opacity: 0; } 100% { opacity: 0; } }
.getfx .fever .spark { inset: 0; width: 100%; height: 100%; }
/* 虹の上でも読めるよう、文字の縁を太く濃く */
.getfx .word span { -webkit-text-stroke: .05em #fff; }
.getfx .word {
  filter: drop-shadow(.04em 0 0 #2a0a4a) drop-shadow(-.04em 0 0 #2a0a4a) drop-shadow(0 .04em 0 #2a0a4a) drop-shadow(0 -.04em 0 #2a0a4a)
          drop-shadow(0 .08em 0 #14002a) drop-shadow(0 0 .14em rgba(255, 255, 255, .9)) drop-shadow(0 .14em .1em rgba(0, 0, 0, .45));
}
@media (prefers-reduced-motion: reduce) {
  .getfx.on .fever .rad, .getfx.on .fever .core, .getfx.on .fever .swirl, .getfx.on .fever .streak, .getfx.on .fever .white { animation: none; }
  .getfx.on .fever .swirl, .getfx.on .fever .streak, .getfx.on .fever .white { opacity: 0; }
}

/* 音（約8秒）に合わせて演出を8秒に。2.6秒で白く光って渦巻きへ（音が鳴り続けに変わるところ） */
.getfx.on { animation-duration: 8s; }
.getfx.on .fever { animation-duration: 8s; }
@keyframes fv-show { 0% { opacity: 0; } 2% { opacity: 1; } 92% { opacity: 1; } 100% { opacity: 0; } }
.getfx.on .fever .rad { animation-duration: 8s, 8s; }
.getfx.on .fever .core { animation-duration: .7s, 8s; }
.getfx.on .fever .swirl { animation-duration: 3.2s, 8s; }
.getfx.on .fever .streak { animation-duration: 2.2s, 8s; }
.getfx.on .fever .white { animation-duration: 8s; }
@keyframes fv-first { 0% { opacity: 1; } 32.5% { opacity: 0; } 100% { opacity: 0; } }
@keyframes fv-second { 0% { opacity: 0; } 32.5% { opacity: 1; } 100% { opacity: 1; } }
@keyframes fv-white { 0% { opacity: 0; } 29% { opacity: 0; } 32.5% { opacity: .95; } 38% { opacity: 0; } 100% { opacity: 0; } }

/* 「GET!」の出し方:「がちょ～ん」。遠くから一気に飛び出して画面からはみ出すほど大きくなり、
   ビヨンビヨンと伸び縮みを繰り返して落ち着く。後ろに残像が2枚ついてくる。文字は1つのかたまりで動く */
.getfx .word span { transform: none; }
.getfx.on .word span { animation: gf-glitter 1.3s linear infinite; }
.getfx.on .word { animation: gf-gachon 1.5s cubic-bezier(.3, .7, .4, 1) forwards, gf-gachon-float 1.6s ease-in-out 1.6s infinite; }
@keyframes gf-gachon {
  0%   { transform: translate(-50%, -50%) scale(.03) rotate(-8deg); }
  16%  { transform: translate(-50%, -50%) scale(3.4) rotate(4deg); }
  28%  { transform: translate(-50%, -50%) scale(.55) rotate(-3deg); }
  40%  { transform: translate(-50%, -50%) scale(1.9) rotate(2deg); }
  52%  { transform: translate(-50%, -50%) scale(.75) rotate(-1deg); }
  64%  { transform: translate(-50%, -50%) scale(1.35) rotate(0deg); }
  76%  { transform: translate(-50%, -50%) scale(.92); }
  88%  { transform: translate(-50%, -50%) scale(1.07); }
  100% { transform: translate(-50%, -50%) scale(1); }
}
@keyframes gf-gachon-float { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.05); } }
.getfx .word.echo { opacity: 0; }
.getfx.on .word.echo { animation: gf-gachon 1.5s cubic-bezier(.3, .7, .4, 1) forwards, gf-echo 1.5s linear forwards; }
.getfx.on .word.e1 { animation-delay: .05s, .05s; }
.getfx.on .word.e2 { animation-delay: .1s, .1s; }
@keyframes gf-echo { 0% { opacity: .5; } 70% { opacity: .35; } 100% { opacity: 0; } }
.getfx.on .word.e2 { --echo: .3; }
@media (prefers-reduced-motion: reduce) {
  .getfx.on .word, .getfx.on .word span { animation: none; transform: translate(-50%, -50%); }
  .getfx.on .word span { transform: none; }
  .getfx.on .word.echo { display: none; }
}

/* ===== ヘッダー: 角張ったサイバー調（黒地に回路パターン、水色と赤紫の光、角を斜めに切った札）=====
   色の設定（明るい/暗い）に関係なく、ヘッダーはいつも黒地 */
.bar {
  --cy: #00e5ff; --mg: #ff2fa8; --hd: #060a12;
  position: relative; isolation: isolate; color: #e9fbff;
  padding-top: max(10px, env(safe-area-inset-top, 0px)); padding-bottom: 18px;
  background:
    linear-gradient(90deg, rgba(0, 229, 255, .10), rgba(0, 229, 255, 0) 40%, rgba(255, 47, 168, 0) 70%, rgba(255, 47, 168, .12)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='64' viewBox='0 0 160 64'%3E%3Cg fill='none' stroke='%2300e5ff' stroke-width='1' stroke-opacity='.28'%3E%3Cpath d='M0 12H38L50 24H92L100 16H160'/%3E%3Cpath d='M0 44H22L32 54H70'/%3E%3Cpath d='M84 64V50L96 38H128L140 50H160'/%3E%3Cpath d='M58 0V10L66 18'/%3E%3Cpath d='M118 0V8L126 16V28'/%3E%3C/g%3E%3Cg fill='%2300e5ff' fill-opacity='.45'%3E%3Ccircle cx='70' cy='54' r='2'/%3E%3Ccircle cx='66' cy='18' r='1.6'/%3E%3Ccircle cx='126' cy='28' r='2'/%3E%3Crect x='36' y='10' width='4' height='4'/%3E%3Crect x='96' y='36' width='4' height='4'/%3E%3C/g%3E%3Cg fill='%23ff2fa8' fill-opacity='.5'%3E%3Crect x='140' y='48' width='4' height='4'/%3E%3Ccircle cx='22' cy='44' r='1.6'/%3E%3C/g%3E%3C/svg%3E") 0 0 / 160px 64px,
    linear-gradient(rgba(0, 229, 255, .07) 1px, transparent 1px) 0 0 / 16px 16px,
    linear-gradient(90deg, rgba(0, 229, 255, .07) 1px, transparent 1px) 0 0 / 16px 16px,
    var(--hd);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 34% 100%, calc(34% - 8px) calc(100% - 8px), 0 calc(100% - 8px));
}
/* 下の縁: 水色の線（途中で段が付く）と、右の赤紫の警告しま */
.bar::before {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 10px; z-index: -1; pointer-events: none;
  background:
    linear-gradient(var(--cy), var(--cy)) 0 calc(100% - 9px) / calc(34% - 8px) 1px no-repeat,
    linear-gradient(var(--cy), var(--cy)) 34% 100% / 66% 2px no-repeat,
    repeating-linear-gradient(-45deg, var(--mg) 0 4px, transparent 4px 8px) right 14px bottom 3px / 64px 4px no-repeat;
  filter: drop-shadow(0 0 3px rgba(0, 229, 255, .8));
}
/* 下の縁の小さな文字（飾り） */
.bar::after {
  content: "CRANE-SYS // UNIT.07 // ONLINE"; position: absolute; left: max(16px, env(safe-area-inset-left, 0px)); bottom: 7px;
  font: 700 8px/1 Orbitron, var(--font-num); letter-spacing: .22em; color: rgba(0, 229, 255, .7); pointer-events: none; transform: translateY(-3px);
}
.bar h1 {
  font-weight: 900; font-style: italic; letter-spacing: .06em; color: #fff;
  text-shadow: 0 0 6px rgba(0, 229, 255, .9), 0 0 14px rgba(0, 229, 255, .45), 1px 1px 0 #00616e;
  display: flex; align-items: center; gap: 8px; overflow: visible;
}
.bar h1 .ver-tag {
  font: italic 900 .62em/1 Orbitron, var(--font-num); letter-spacing: .12em; text-transform: uppercase; opacity: 1;
  color: #fff; text-shadow: none; padding: 4px 12px 4px 10px;
  background: linear-gradient(90deg, var(--mg), #b2147a);
  clip-path: polygon(6px 0, 100% 0, calc(100% - 6px) 100%, 0 100%);
}
/* 札（ボタン・ステージ選択）: 右上と左下の角を斜めに切り、左上に水色の三角 */
.bar .chip-btn {
  appearance: none; -webkit-appearance: none; border: 0; border-radius: 0; color: #dffbff;
  font-weight: 700; letter-spacing: .06em; padding: 6px 14px;
  background:
    linear-gradient(135deg, var(--cy) 0 6px, transparent 6px),
    linear-gradient(to bottom, #12243a, #0a1422);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .55), inset 0 -2px 0 rgba(0, 229, 255, .35);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
  transition: background-color .1s, color .1s;
}
.bar .chip-btn:hover { color: #fff; box-shadow: inset 0 0 0 1px var(--cy), inset 0 -2px 0 var(--cy), inset 0 0 12px rgba(0, 229, 255, .35); }
.bar .chip-btn:active { background: linear-gradient(135deg, var(--mg) 0 6px, transparent 6px), linear-gradient(to bottom, #3a0f2c, #1c0716); box-shadow: inset 0 0 0 1px var(--mg); }
.bar .stage-sel { padding-right: 26px; background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0H10L5 6Z' fill='%2300e5ff'/%3E%3C/svg%3E") right 9px center / 10px 6px no-repeat,
    linear-gradient(135deg, var(--cy) 0 6px, transparent 6px),
    linear-gradient(to bottom, #12243a, #0a1422); }
.bar .stage-sel option { background: #0a1422; color: #dffbff; }
@media (max-width: 560px) {
  .bar .chip-btn { padding: 5px 11px; }
  .bar::after { font-size: 7px; letter-spacing: .16em; }
}

/* ヘッダーの「物理v2」（オーナーだけ）: リンクもボタンと同じ見た目に */
#lnk-v2[aria-pressed="true"] { color: #fff; background: linear-gradient(135deg, var(--mg) 0 6px, transparent 6px), linear-gradient(to bottom, #5a1640, #2a0a1e); }
.bar a.chip-btn, #lnk-v2 { text-decoration: none; display: inline-flex; align-items: center; color: #ffd0ec; box-shadow: inset 0 0 0 1px rgba(255, 47, 168, .7), inset 0 -2px 0 rgba(255, 47, 168, .5); }

/* 獲得の演出: どこをタップしてもスキップ。その案内を台の画面の下に（押す物ではない） */
.getskip {
  position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 8; pointer-events: none;
  font: 800 14px/1 var(--font-display); letter-spacing: .08em; color: #fff; white-space: nowrap;
  padding: 9px 18px; border-radius: 999px;
  background: rgba(10, 14, 28, .6); box-shadow: 0 0 0 1px rgba(255, 255, 255, .4);
  -webkit-user-select: none; user-select: none; animation: getskip-blink 1.6s ease-in-out infinite;
}
.getskip[hidden] { display: none; }
@keyframes getskip-blink { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@media (prefers-reduced-motion: reduce) { .getskip { animation: none; } }

/* ミラクルゲット: GET! の上に斜めの札（黒と赤紫のしま、白い文字）。下半分の獲得カードと重ならないよう、文字の上に置く */
.getfx .abn {
  position: absolute; left: 50%; top: calc(40% - clamp(70px, 21vw, 160px)); z-index: 5; display: none;
  transform: translate(-50%, -50%) rotate(-6deg) scale(0);
  font: 900 clamp(20px, 6.4vw, 50px)/1 var(--font-display); letter-spacing: .08em; color: #fff; white-space: nowrap;
  padding: .32em .8em; border-radius: 4px;
  background: repeating-linear-gradient(-45deg, #14081c 0 12px, #2a0b30 12px 24px);
  box-shadow: 0 0 0 3px #ff2fa8, 0 0 22px rgba(255, 47, 168, .85), 0 6px 14px rgba(0, 0, 0, .5);
  text-shadow: 0 0 10px rgba(255, 47, 168, .9), 2px 2px 0 #000;
}
.getfx.abnormal .abn { display: block; }
.getfx.on.abnormal .abn { animation: gf-abn .5s cubic-bezier(.2, 1.8, .4, 1) .35s forwards; }
@keyframes gf-abn { 0% { transform: translate(-50%, -50%) rotate(-6deg) scale(0); } 70% { transform: translate(-50%, -50%) rotate(-6deg) scale(1.15); } 100% { transform: translate(-50%, -50%) rotate(-6deg) scale(1); } }
@media (prefers-reduced-motion: reduce) { .getfx.on.abnormal .abn { animation: none; transform: translate(-50%, -50%) rotate(-6deg); } }

/* 景品を選ぶ: ボタンとシート（絵つきのカードを並べる） */
.prize-btn { max-width: 11em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-prize { max-height: 86%; }
.prize-cats { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.prize-cats .chip-btn { font-size: 13px; padding: 5px 10px; }
.prize-cats .chip-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.prize-fit { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 10px; font-size: 13px; color: var(--ink); }
.prize-fit .hint { color: var(--muted); font-size: 12px; }
.prize-count { margin-top: 8px; font-size: 12px; color: var(--muted); }
.prize-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 8px; }
.pz-card {
  display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 4px 8px; min-width: 0;
  background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; color: var(--ink); font: inherit; cursor: pointer;
}
.pz-card:hover { border-color: var(--accent); }
.pz-card[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent) inset; background: var(--surface); }
.pz-card img, .pz-card .pz-noimg { width: 80px; height: 80px; object-fit: contain; display: grid; place-items: center; font-size: 36px; }
.pz-name { font-size: 12px; line-height: 1.3; text-align: center; overflow-wrap: anywhere; }
.pz-size { font-size: 10px; color: var(--muted); font-family: var(--font-num); }
.pz-copy { font-size: 10px; line-height: 1.35; color: var(--muted); text-align: center; overflow-wrap: anywhere; font-style: italic; }
.pz-price { font-size: 10.5px; font-weight: 700; font-family: var(--font-num); }

/* 獲得の演出の渦巻き: 回っても画面の四隅が欠けない最小の大きさに（以前の 260vmax は大きすぎて、スマホの GPU のメモリを使いすぎていた）。
   中心（横 50%・縦 40%）からいちばん遠い角までの距離の2倍 ≦ 100vw + 120vh */
.getfx .fever .swirl { width: calc(100vw + 120vh); height: calc(100vw + 120vh); margin: calc(-50vw - 60vh) 0 0 calc(-50vw - 60vh); }

/* となりの台へ（遊ぶ前だけ）: 隣の台のある側の画面の端にくっついた半円のつまみ。筐体になじむ白っぽい半透明。
   画面の外へ 8px はみ出させておき、隣の向きへぴょこぴょこ動いても端から離れない */
.move-btn {
  position: absolute; left: -8px; top: 44%; z-index: 7; display: grid; place-items: center;
  width: 54px; height: 84px; padding: 0 0 0 8px; border: 2px solid rgba(255, 255, 255, .85); border-left: 0;
  border-radius: 0 42px 42px 0; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(90deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .82));
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, .22), inset 0 -3px 0 rgba(0, 0, 0, .06);
  color: #2b3a55;
  transition: transform .12s ease, box-shadow .12s ease, opacity .35s ease, visibility 0s linear 0s;
  animation: mv-poke 1s ease-in-out infinite;
}
.move-btn.right { left: auto; right: -8px; padding: 0 8px 0 0; border-left: 2px solid rgba(255, 255, 255, .85); border-right: 0; border-radius: 42px 0 0 42px;
  background: linear-gradient(270deg, rgba(255, 255, 255, .62), rgba(255, 255, 255, .82)); animation-name: mv-poke-r; }
.move-btn.off { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .35s; }
.move-btn.taken:not(.off) { opacity: .45; filter: grayscale(1); }   /* 隣の台に人がいる・待機列がある（押すとわけを出す） */
.move-btn .mv-label { display: none; }   /* 文字は出さない（読み上げは aria-label） */
.move-btn .mv-arrow { font-size: 22px; line-height: 1; }
.move-btn:active { transform: scale(.94); box-shadow: 0 2px 8px rgba(0, 0, 0, .25); }
.move-btn:focus-visible { outline: 3px solid #ffe14d; outline-offset: 2px; }
@keyframes mv-poke { 0%, 100% { translate: 0 0; } 50% { translate: -5px 0; } }
@keyframes mv-poke-r { 0%, 100% { translate: 0 0; } 50% { translate: 5px 0; } }
@media (prefers-reduced-motion: reduce) { .move-btn { animation: none; } }

/* 獲得した景品のカード（ゲットの演出の下半分）: 黒いガラス調の板に光る縁と光の筋。下からせり上がって弾む */
.getfx .getcard {
  position: absolute; left: 50%; top: 70%; z-index: 4; width: min(88vw, 440px); box-sizing: border-box;
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 18px; overflow: hidden;
  transform: translate(-50%, -50%) translateY(40px) scale(.9); opacity: 0;
  background: linear-gradient(160deg, rgba(18, 14, 40, .92), rgba(10, 12, 26, .94));
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .85), 0 0 0 5px rgba(255, 43, 214, .55), 0 0 26px rgba(34, 230, 255, .65), 0 12px 30px rgba(0, 0, 0, .45);
}
.getfx .getcard[hidden] { display: none; }
.getfx.on .getcard { animation: gc-in .7s cubic-bezier(.2, 1.5, .4, 1) .9s forwards; }
@keyframes gc-in { 0% { opacity: 0; transform: translate(-50%, -50%) translateY(40px) scale(.9); } 100% { opacity: 1; transform: translate(-50%, -50%) translateY(0) scale(1); } }
.getfx .getcard::before { content: ''; position: absolute; inset: 3px; z-index: -1; border-radius: 15px; background: linear-gradient(160deg, rgba(20, 16, 44, .96), rgba(10, 12, 26, .97)); }
.getfx .getcard .gc-shine {   /* 斜めの光の筋が1回走る */
  position: absolute; top: -20%; bottom: -20%; width: 30%; left: -40%; transform: skewX(-20deg);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .45), rgba(255, 255, 255, 0));
}
.getfx.on .getcard .gc-shine { animation: gc-shine 1.1s ease-out 1.5s forwards; }
@keyframes gc-shine { to { left: 120%; } }
.getfx .getcard .gc-imgwrap {
  flex: 0 0 auto; width: 92px; height: 92px; border-radius: 14px; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 40%, #ffffff, #e8eef6 70%); box-shadow: inset 0 0 0 2px rgba(255, 214, 40, .9), 0 0 14px rgba(255, 214, 40, .6);
}
.getfx .getcard .gc-img { width: 84px; height: 84px; object-fit: contain; }
.getfx .getcard .gc-body { min-width: 0; display: flex; flex-direction: column; gap: 4px; text-align: left; }
.getfx .getcard .gc-tag {
  align-self: flex-start; padding: 2px 8px; border-radius: 999px; font: 900 11px/1.2 var(--font-display, system-ui), sans-serif; letter-spacing: .16em;
  color: #1a1030; background: linear-gradient(90deg, #ffe14d, #ff8a00);
}
.getfx .getcard .gc-name { font: 900 17px/1.25 system-ui, sans-serif; color: #fff; text-shadow: 0 0 8px rgba(34, 230, 255, .8); overflow-wrap: anywhere; }
.getfx .getcard .gc-copy { font: italic 600 12px/1.4 system-ui, sans-serif; color: #cfd8ff; overflow-wrap: anywhere; }
.getfx .getcard .gc-meta { font: 800 13px/1.2 system-ui, sans-serif; color: #ffe14d; }
@media (prefers-reduced-motion: reduce) {
  .getfx.on .getcard { animation: none; opacity: 1; transform: translate(-50%, -50%); }
  .getfx.on .getcard .gc-shine { animation: none; }
}

/* プレイする（遊ぶ前だけ。①のボタンの代わり）: 大きくて丸い、明るいポップなボタン。ふわふわ弾んで「押して」と誘う */
.play-btn {
  position: absolute; left: 50%; bottom: 34px; z-index: 6; translate: -50% 0;   /* ①のボタンがある所（画面の下の真ん中） */
  display: flex; align-items: center; justify-content: center; gap: 10px;
  min-width: 240px; padding: 16px 30px; white-space: nowrap; width: max-content; border: 4px solid #fff; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, #ffe45c, #ff9f1a 60%, #ff7a1a); color: #fff;
  box-shadow: 0 6px 0 #d4580a, 0 12px 24px rgba(0, 0, 0, .28);
  font: 900 24px/1 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; letter-spacing: .06em;
  text-shadow: 0 3px 0 rgba(160, 60, 0, .55);
  animation: pb-bounce 1.4s ease-in-out infinite;
}
.play-btn[hidden] { display: none; }
.play-btn:active { animation: none; transform: translateY(4px); box-shadow: 0 2px 0 #d4580a, 0 6px 14px rgba(0, 0, 0, .28); }
.play-btn:focus-visible { outline: 4px solid #7ef0c8; outline-offset: 4px; }
.play-btn .pb-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: #fff; color: #ff8a1a; font-size: 16px; text-shadow: none; padding-left: 3px; box-sizing: border-box; }
@keyframes pb-bounce { 0%, 100% { transform: translateY(0) scale(1); } 45% { transform: translateY(-6px) scale(1.03); } 60% { transform: translateY(0) scale(.98); } }
@media (prefers-reduced-motion: reduce) { .play-btn { animation: none; } }

/* つづける・やめる（1回遊び終わるたびに聞く）: 画面の下の真ん中に、白い丸い札と2つのポップなボタン */
.cont-ask {
  position: absolute; left: 50%; bottom: 26px; z-index: 8; translate: -50% 0; width: max-content; max-width: calc(100% - 24px);
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 18px 16px;
  background: #fff; border-radius: 24px; box-shadow: 0 6px 0 rgba(0, 0, 0, .12), 0 12px 28px rgba(0, 0, 0, .28);
  animation: ca-pop .35s cubic-bezier(.2, 1.6, .4, 1) both;
}
.cont-ask[hidden] { display: none; }
@keyframes ca-pop { from { transform: scale(.7); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.cont-ask .ca-q { font: 900 18px/1.2 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; color: #ff7a1a; letter-spacing: .04em; }
.cont-ask .ca-btns { display: flex; gap: 12px; }
.cont-ask button {
  min-width: 128px; padding: 13px 18px; border: 3px solid #fff; border-radius: 999px; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  font: 900 19px/1 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; color: #fff; letter-spacing: .04em; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.cont-ask .ca-yes { background: linear-gradient(180deg, #ffe45c, #ff9f1a 60%, #ff7a1a); box-shadow: 0 5px 0 #d4580a, 0 8px 16px rgba(0, 0, 0, .2); }
.cont-ask .ca-no { background: linear-gradient(180deg, #a9b6c8, #7f8ea6); box-shadow: 0 5px 0 #5d6b82, 0 8px 16px rgba(0, 0, 0, .2); }
.cont-ask button:active { transform: translateY(3px); }
.cont-ask button:focus-visible { outline: 3px solid #7ef0c8; outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { .cont-ask { animation: none; } }

/* 別の台へ（遊ぶ前だけ。右下）: 紫の丸いポップなボタン */
.other-btn {
  position: absolute; right: 10px; bottom: 96px; z-index: 7; display: flex; align-items: center; gap: 6px;
  padding: 11px 16px 11px 11px; border: 3px solid #fff; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, #c79bff, #8a52f0); color: #fff;
  box-shadow: 0 4px 0 #6233c4, 0 8px 16px rgba(0, 0, 0, .25);
  font: 900 16px/1 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; letter-spacing: .02em; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
/* 出し入れはふわっと（消えているあいだは押せない） */
.other-btn { transition: opacity .35s ease, visibility 0s linear 0s; }
.other-btn.off { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .35s ease, visibility 0s linear .35s; }
.other-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #6233c4, 0 4px 10px rgba(0, 0, 0, .25); }
.other-btn:focus-visible { outline: 3px solid #ffe14d; outline-offset: 3px; }
.other-btn .ob-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; color: #8a52f0; font-size: 18px; }
/* 別の台へ移るあいだ、画面を一瞬暗くする */
.other-fade { position: absolute; inset: 0; z-index: 9; background: #0b0d16; opacity: 0; pointer-events: none; transition: opacity .3s ease; }
.other-fade.on { opacity: 1; pointer-events: auto; }

/* 図鑑 */
.zukan-btn { white-space: nowrap; }
#zukan-count { font-family: var(--font-num, system-ui); font-size: .85em; opacity: .85; }
.zk-progress { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 10px; }
.zk-bar { height: 10px; border-radius: 999px; background: rgba(127, 127, 127, .25); overflow: hidden; }
.zk-bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #ffd23a, #ff7a1a); }
.zk-num { font-weight: 800; } .zk-num b { font-size: 1.3em; }
.zk-rs { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.zk-rs .zk-r { color: #d89a00; font-weight: 700; }
.zk-card { position: relative; cursor: default; }
.zk-card img { filter: brightness(0) opacity(.22); }
.zk-card.own img { filter: none; }
.zk-card .zk-stars, .pz-card .pz-stars { font-size: 11px; letter-spacing: 1px; color: #e0a800; }
.zk-card .zk-unknown { color: var(--muted); letter-spacing: .2em; }
.zk-card .zk-meta { font-size: 10px; color: var(--muted); text-align: center; }
.zk-card.own.r3 { box-shadow: inset 0 0 0 2px #ffcf3a, 0 0 10px rgba(255, 200, 40, .45); }
.zk-card.own.r2 { box-shadow: inset 0 0 0 2px #9fc6ff; }
/* 獲得カードの星と NEW! */
.getfx .getcard .gc-stars { font-size: 13px; letter-spacing: 2px; color: #ffd23a; text-shadow: 0 0 6px rgba(255, 200, 40, .8); }
.getfx .getcard .gc-tag.new { background: linear-gradient(90deg, #ff4f93, #ff2bd6); color: #fff; }

/* やめる（1回遊んだあと、①の横に並べる）: 灰色の丸いポップなボタン */
.quit-btn {
  position: absolute; left: calc(50% + 92px); bottom: max(46px, calc(env(safe-area-inset-bottom, 0px) + 16px)); z-index: 6;
  padding: 10px 18px; border: 3px solid #fff; border-radius: 999px; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent;
  background: linear-gradient(180deg, #a9b6c8, #7f8ea6); color: #fff;
  box-shadow: 0 4px 0 #5d6b82, 0 8px 16px rgba(0, 0, 0, .22);
  font: 900 16px/1 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; letter-spacing: .04em; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.quit-btn[hidden] { display: none; }
.quit-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #5d6b82, 0 4px 10px rgba(0, 0, 0, .22); }
.quit-btn:focus-visible { outline: 3px solid #7ef0c8; outline-offset: 3px; }

/* ===== ヘッダー → ハンバーガーメニュー（スマホでもPCでも同じ）。台の画面の左上のボタンで、左から引き出しが出る ===== */
.app { grid-template-rows: 1fr auto; }
.bar.nav {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 30; width: min(300px, 86vw); box-sizing: border-box;
  flex-direction: column; align-items: stretch; flex-wrap: nowrap; gap: 10px; overflow-y: auto;
  padding: max(16px, env(safe-area-inset-top, 0px)) 16px 44px max(16px, env(safe-area-inset-left, 0px));
  clip-path: none; box-shadow: 4px 0 0 rgba(0, 229, 255, .55), 10px 0 30px rgba(0, 0, 0, .5);
  transform: translateX(-110%); visibility: hidden; transition: transform .22s ease, visibility 0s .22s;
}
.bar.nav.open { transform: none; visibility: visible; transition: transform .22s ease; }
.bar.nav h1 { flex: none; flex-direction: column; align-items: flex-start; gap: 6px; font-size: 15px; margin: 4px 0 8px; padding-right: 36px; }
.bar.nav h1 .logo { width: 180px; height: auto; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }
.bar.nav .chip-btn, .bar.nav .stage-sel { flex: none; width: 100%; max-width: none; box-sizing: border-box; text-align: left; justify-content: flex-start; font-size: 14px; padding: 11px 14px; }
.bar.nav .stage-sel { padding-right: 30px; }
.nav-x {
  position: absolute; top: max(10px, env(safe-area-inset-top, 0px)); right: 10px; width: 36px; height: 36px;
  border: 0; background: transparent; color: #dffbff; font: 700 24px/1 sans-serif; cursor: pointer;
}
.nav-x:focus-visible, .hamb:focus-visible { outline: 2px solid #00e5ff; outline-offset: 2px; }
.nav-back { position: fixed; inset: 0; z-index: 29; background: rgba(4, 8, 16, .5); }
.hamb {
  position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); top: 10px; z-index: 3;
  width: 42px; height: 42px; padding: 0; border: 0; cursor: pointer;
  display: grid; place-content: center; gap: 5px;
  background: linear-gradient(135deg, #00e5ff 0 6px, transparent 6px), linear-gradient(to bottom, #12243a, #0a1422);
  box-shadow: inset 0 0 0 1px rgba(0, 229, 255, .6), inset 0 -2px 0 rgba(0, 229, 255, .35);
  clip-path: polygon(0 0, calc(100% - 8px) 0, 100% 8px, 100% 100%, 8px 100%, 0 calc(100% - 8px));
}
.hamb span { display: block; width: 20px; height: 2.5px; background: #dffbff; box-shadow: 0 0 4px rgba(0, 229, 255, .9); }
.hamb:active { background: linear-gradient(135deg, #ff2fa8 0 6px, transparent 6px), linear-gradient(to bottom, #3a0f2c, #1c0716); }
.hud { top: 60px; }   /* 左上はメニューのボタン */
/* ロゴの透かし: 台の画面の左下 */
.wm { position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); width: clamp(92px, 20vw, 150px); opacity: .5; pointer-events: none; z-index: 1; }
.wm .logo { display: block; width: 100%; height: auto; }

/* タイプ2: 8方向レバー（左）・持ち時間（真ん中）・降下ボタン（右）。①②のボタンと同じ所に置く */
.lever-pad {
  position: absolute; left: 50%; bottom: max(24px, env(safe-area-inset-bottom, 0px)); transform: translateX(-50%);
  display: flex; align-items: center; gap: 22px; z-index: 2; transition: opacity .35s ease;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
.lever-pad[hidden] { display: none; }
.lever-pad.gone { opacity: 0; pointer-events: none; }
/* レバー: 黒い台座に8方向のゲート、赤い玉の握り。倒した向きへ玉が動き、軸が伸びる */
.lever {
  position: relative; width: 118px; height: 118px; border-radius: 50%; touch-action: none; cursor: grab;
  background: radial-gradient(circle at 50% 40%, #3a3f48 0%, #1d2027 70%, #0d0f13 100%);
  box-shadow: 0 6px 0 #4a4f57, 0 10px 18px rgba(0, 0, 0, .35), inset 0 2px 3px rgba(255, 255, 255, .18), 0 0 0 5px #c9ced6;
}
.lever-gate {   /* 8方向の溝（八角形） */
  position: absolute; inset: 30%; background: #07080b;
  clip-path: polygon(30% 0, 70% 0, 100% 30%, 100% 70%, 70% 100%, 30% 100%, 0 70%, 0 30%);
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, .8);
}
.lever-shaft {   /* 軸: 支点（台座の真ん中）から頭まで。長さと傾きは JS で（まっすぐのときは点） */
  position: absolute; left: calc(50% - 6px); top: calc(50% - 6px); width: 12px; height: 12px; border-radius: 6px;
  background: radial-gradient(circle at 50% 6px, #fbfcfd 0 2px, transparent 5px), linear-gradient(to right, #6f757e, #eef0f3 42%, #b9bec6 60%, #5f656e);   /* 頭側の端（断面）にほんのりつや */
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .25);
}
.lever-gate::after {   /* 支点のゴムのカバー */
  content: ''; position: absolute; left: calc(50% - 11px); top: calc(50% - 11px); width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 45% 40%, #3a3d44, #111317 70%); box-shadow: 0 1px 2px rgba(0, 0, 0, .6);
}
.lever-knob {   /* 透明レジンの玉: 中にラメが封じ込められ、表面に強いつや */
  position: absolute; left: calc(50% - 31px); top: calc(50% - 31px); width: 62px; height: 62px; border-radius: 50%; overflow: hidden;
  background:
    radial-gradient(circle at 33% 27%, rgba(255, 255, 255, .98) 0 7%, rgba(255, 255, 255, .35) 12%, rgba(255, 255, 255, 0) 20%),
    radial-gradient(ellipse 40% 22% at 60% 80%, rgba(255, 255, 255, .45), rgba(255, 255, 255, 0) 70%),
    radial-gradient(circle at 50% 46%, rgba(225, 245, 255, .22) 0%, rgba(170, 215, 255, .32) 55%, rgba(110, 150, 230, .6) 100%);
  box-shadow: 0 6px 10px rgba(0, 0, 0, .45), inset 0 -6px 10px rgba(70, 110, 210, .45), inset 0 3px 6px rgba(255, 255, 255, .55), inset 0 0 0 1px rgba(255, 255, 255, .55);
  transition: transform .06s ease-out; pointer-events: none;
}
.lever-knob::before {   /* 封じ込めたラメ（金・桃・水色・白の粒） */
  content: ''; position: absolute; inset: 8%; border-radius: 50%;
  background:
    radial-gradient(circle at 30% 60%, #ffe27a 0 1.6px, transparent 2.4px), radial-gradient(circle at 68% 38%, #ff9ad0 0 1.4px, transparent 2.2px),
    radial-gradient(circle at 52% 72%, #8ff0ff 0 1.5px, transparent 2.3px), radial-gradient(circle at 42% 34%, #fff 0 1.2px, transparent 2px),
    radial-gradient(circle at 74% 64%, #ffe27a 0 1.2px, transparent 2px), radial-gradient(circle at 24% 42%, #c8a8ff 0 1.3px, transparent 2.1px),
    radial-gradient(circle at 60% 52%, #fff 0 1px, transparent 1.8px), radial-gradient(circle at 36% 78%, #ff9ad0 0 1.1px, transparent 1.9px),
    radial-gradient(circle at 82% 46%, #8ff0ff 0 1px, transparent 1.8px), radial-gradient(circle at 48% 20%, #ffe27a 0 1px, transparent 1.8px);
  animation: resin-glitter 2.4s ease-in-out infinite alternate;
}
.lever-knob::after {   /* きらっと光る星 */
  content: ''; position: absolute; left: 58%; top: 22%; width: 12px; height: 12px;
  background: conic-gradient(from 45deg, transparent 0 20%, #fff 25%, transparent 30% 45%, #fff 50%, transparent 55% 70%, #fff 75%, transparent 80% 95%, #fff 100%);
  -webkit-mask: radial-gradient(circle, #000 0 30%, transparent 70%); mask: radial-gradient(circle, #000 0 30%, transparent 70%);
  animation: resin-star 2.4s ease-in-out infinite;
}
@keyframes resin-glitter { from { opacity: .75; filter: hue-rotate(0deg) brightness(1); } to { opacity: 1; filter: hue-rotate(40deg) brightness(1.25); } }
@keyframes resin-star { 0%, 60%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 75% { opacity: 1; transform: scale(1.1) rotate(45deg); } }
@media (prefers-reduced-motion: reduce) { .lever-knob::before, .lever-knob::after { animation: none; } }
.lever.on { cursor: grabbing; }
.lever-time {
  display: grid; justify-items: center; min-width: 48px; color: #fff; text-shadow: 0 2px 4px rgba(0, 0, 0, .6);
  font-family: var(--font-num, inherit); font-variant-numeric: tabular-nums;
}
.lever-time .lt-n { font-size: 34px; font-weight: 900; line-height: 1; }
.lever-time .lt-u { font-size: 12px; font-weight: 700; opacity: .85; }
.lever-pad.hurry .lt-n { color: #ff5a6a; animation: lever-hurry .5s ease-in-out infinite alternate; }
@keyframes lever-hurry { to { transform: scale(1.15); } }
@media (prefers-reduced-motion: reduce) { .lever-pad.hurry .lt-n { animation: none; } }
/* ①②の台: ②を待つあいだの残り秒数（レバーの台と同じ見た目）。①②ボタンの右に */
.holds .btn-time { position: absolute; left: calc(100% + 14px); top: 18px; }
.holds .btn-time[hidden] { display: none; }
.btn-time.hurry .lt-n { color: #ff5a6a; animation: lever-hurry .5s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .btn-time.hurry .lt-n { animation: none; } }
/* 降下ボタン: ②と同じ水色の押しボタンに、白い「GO!」の絵（②の矢印と同じ縁取り） */
.drop-btn .a.go text { font-family: 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', 'Arial Rounded MT Bold', sans-serif; font-weight: 400; letter-spacing: -.5px; stroke-linejoin: round; }
.drop-btn .a.go .o, .drop-btn .a.go .w { fill: none; }
.drop-btn .a.go .o { stroke-width: 6; }
.drop-btn .a.go .w { stroke-width: 3.2; }

/* タイプ2: 「別の台へ」・左右へ移るボタンは、レバーと降下ボタン（高さ約130px）の上に */
.lever-mode .other-btn { bottom: 168px; }
/* 幅の狭い画面: ①②ボタンの横に並ぶと重なるので、ボタンの上へ */
@media (max-width: 520px) { #app:not(.lever-mode) .other-btn { bottom: 186px; } }

/* スマホ（指で操作する端末）では GET の演出を軽く: 見た目はほぼ同じで、毎フレームの描き直しと重ね合わせを減らす
   ・虹色の光: 下の画面と色を混ぜる（screen）のと彩度フィルターをやめ、回る1枚の板として重ねるだけ（色は少し鮮やかに描いておく）
   ・GET! の文字: 7重の影を2重に（残像の2枚は影なし）、虹色を流し続けるのをやめる（がちょ～んの動きはそのまま） */
@media (pointer: coarse) {
  .getfx .rainbow { mix-blend-mode: normal; filter: none; will-change: transform, opacity;
    background: conic-gradient(from 0deg, rgba(255, 0, 76, .55), rgba(255, 138, 0, .55), rgba(255, 230, 0, .55), rgba(43, 255, 106, .55), rgba(0, 208, 255, .55), rgba(90, 92, 255, .55), rgba(212, 0, 255, .55), rgba(255, 0, 76, .55)); }
  .getfx .word { filter: drop-shadow(0 .05em 0 #5a3a00) drop-shadow(0 0 .1em rgba(255, 230, 120, .8)); }
  .getfx.on .word span { animation: none; background-position: 50% 0, 30% 0; }   /* 虹色は流さず止めておく */
  .getfx .word { will-change: transform; }
  .getfx .word.echo { filter: none; }   /* 残像の2枚は影なし（半透明ですぐ消える） */
  .getfx .burst { will-change: transform, opacity; }
}

/* ===== 読み込み画面: ページを開いてから、台・物理・景品の文字がそろって落ち着くまで ===== */
.boot {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 38%, #1c2a52 0%, #0b1020 62%); color: #e9fbff;
  transition: opacity .5s ease, visibility 0s linear .5s;
}
.boot.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-in { display: grid; justify-items: center; gap: 14px; padding: 16px; }
/* 揺れるクレーンのつめと、つまんだ宝石 */
.boot-claw { position: relative; width: 90px; height: 120px; transform-origin: 50% 0; animation: boot-swing 1.6s ease-in-out infinite; }
.boot-claw i { position: absolute; display: block; }
.bc-line { left: 43px; top: 0; width: 4px; height: 44px; border-radius: 2px; background: #9aa6b3; }
.bc-head { left: 29px; top: 40px; width: 32px; height: 20px; border-radius: 8px 8px 6px 6px; background: linear-gradient(#7ff3ff, #00b8d4); box-shadow: 0 0 0 2px #0b1020; }
.bc-arm { top: 54px; width: 10px; height: 40px; border: 4px solid #00e5ff; border-top: 0; }
.bc-arm.l { left: 22px; border-right: 0; border-radius: 0 0 0 18px; transform: rotate(10deg); }
.bc-arm.r { left: 58px; border-left: 0; border-radius: 0 0 18px 0; transform: rotate(-10deg); }
.bc-gem { left: 33px; top: 80px; width: 24px; height: 24px; background: linear-gradient(135deg, #ffd0ec, #ff2fa8 45%, #a0105e); transform: rotate(45deg); border-radius: 4px; box-shadow: 0 0 14px rgba(255, 47, 168, .7); }
@keyframes boot-swing { 0%, 100% { transform: rotate(-9deg); } 50% { transform: rotate(9deg); } }
.boot-logo { display: grid; justify-items: center; line-height: 1.05; font-family: 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', sans-serif; transform: skewX(-8deg); }
.boot-logo .bl1 { font-size: 22px; color: #7ff3ff; letter-spacing: .06em; }
.boot-logo .bl2 { font-size: 34px; color: #fff; text-shadow: 0 3px 0 #ff2fa8; }
.boot-bar { width: min(220px, 60vw); height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.boot-bar i { display: block; height: 100%; width: 8%; border-radius: 3px; background: linear-gradient(90deg, #00e5ff, #ff2fa8); transition: width .4s ease; }
.boot-msg { font-size: 13px; color: #9fb3c8; min-height: 1.4em; }
@media (prefers-reduced-motion: reduce) { .boot-claw { animation: none; } }
.boot-bar { position: relative; }
.boot-bar::after {   /* 流れる光（読み込みが止まって見えないように） */
  content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent); animation: boot-shine 1.4s linear infinite;
}
@keyframes boot-shine { to { left: 100%; } }
@media (prefers-reduced-motion: reduce) { .boot-bar::after { animation: none; } }

/* ===== 視点のセクション: 画面の右端にぴったり付けた札（右側は角を丸めない）。「視点」の札で出し入れ ===== */
.views { right: 0; max-width: 100%; }
.views .seg[aria-label="視点"] {
  border-radius: 999px 0 0 999px; border-right: 0;
  padding-right: max(6px, env(safe-area-inset-right, 0px));
}
/* 「視点」の札は押せるボタン（出し入れ）。矢印で開閉の向きを示す */
.views .seg .cam {
  pointer-events: auto; cursor: pointer; background: none; border-top: 0; border-bottom: 0; border-left: 0;
  font-family: inherit; min-height: 30px; gap: 6px; -webkit-tap-highlight-color: transparent;
}
.views .seg .cam .vt { width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 6px solid rgba(255, 255, 255, .85); transition: transform .2s; }
.views.collapsed .seg .cam .vt { transform: rotate(180deg); }
.views .seg .cam:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.views.collapsed .seg[aria-label="視点"] .ic-btn { display: none; }
.views.collapsed .seg .cam { border-right: 0; }

/* 切り替え（オートカメラ・音・振動）: 視点の下に、絵だけのボタンを縦に並べる。画面の右端にぴったり付け、いつも出しておく */
.views .seg.toggles { flex-direction: column; align-items: flex-end; gap: 6px; padding: 0; background: none; border: 0; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.views .seg.toggles .ic-btn {
  width: calc(46px + env(safe-area-inset-right, 0px)); height: 42px; padding: 0 env(safe-area-inset-right, 0px) 0 0; justify-content: center;
  border-radius: 14px 0 0 14px; border-right: 0;
}
.views .seg.toggles .ic-btn .ti { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; position: relative; z-index: 1; }
.views .seg.toggles .ic-btn .ti .off { display: none; }
.views .seg.toggles .ic-btn[aria-pressed="false"] .ti .on { display: none; }
.views .seg.toggles .ic-btn[aria-pressed="false"] .ti .off { display: inline; }
.views .seg.toggles .ic-btn[aria-pressed="false"] .ti .ab { opacity: .45; }
@media (max-width: 560px) { .views .seg.toggles .ic-btn { height: 38px; width: calc(42px + env(safe-area-inset-right, 0px)); } .views .seg.toggles .ic-btn .ti { width: 22px; height: 22px; } }
/* 切り替えの絵の下の名前: ゲームらしい丸い書体を、白に紺の縁取りで */
.views .seg.toggles .ic-btn { flex-direction: column; gap: 1px; height: auto; min-height: 50px; padding-top: 4px; padding-bottom: 4px; width: calc(52px + env(safe-area-inset-right, 0px)); }
.views .seg.toggles .ic-btn .tl {
  position: relative; z-index: 1; display: block; text-align: center; white-space: nowrap;
  font: 400 10px/1.05 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', sans-serif; letter-spacing: 0; color: #fff;
  -webkit-text-stroke: 2.5px #0b1a44; paint-order: stroke fill; text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
}
.views .seg.toggles #btn-autozoom .tl { font-size: 8.5px; }
.views .seg.toggles .ic-btn[aria-pressed="true"] .tl { -webkit-text-stroke-color: #8a3a06; }
@media (max-width: 560px) { .views .seg.toggles .ic-btn { min-height: 46px; width: calc(50px + env(safe-area-inset-right, 0px)); } .views .seg.toggles .ic-btn .ti { width: 20px; height: 20px; } }

/* 音をオンにするときの注意 */
.snd-ask { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: rgba(6, 10, 22, .55); }
.snd-ask[hidden] { display: none; }
.snd-ask .sa-card {
  width: min(340px, 100%); display: grid; justify-items: center; gap: 8px; padding: 18px 18px 16px; text-align: center;
  background: #fff; color: #1d2433; border-radius: 22px; box-shadow: 0 6px 0 rgba(0, 0, 0, .12), 0 14px 30px rgba(0, 0, 0, .35);
  animation: ca-pop .3s cubic-bezier(.2, 1.6, .4, 1) both;
}
.snd-ask .sa-icon { font-size: 30px; line-height: 1; }
.snd-ask .sa-t { font-size: 19px; font-weight: 900; color: #e0570f; letter-spacing: .04em; }
.snd-ask .sa-p { margin: 0; font-size: 14px; line-height: 1.6; color: #3a4456; }
.snd-ask .sa-btns { display: flex; gap: 12px; margin-top: 6px; }
.snd-ask button {
  min-width: 112px; padding: 12px 16px; border: 3px solid #fff; border-radius: 999px; cursor: pointer; -webkit-tap-highlight-color: transparent;
  font: 900 17px/1 'Hiragino Maru Gothic ProN', system-ui, sans-serif; color: #fff; text-shadow: 0 2px 0 rgba(0, 0, 0, .2);
}
.snd-ask .sa-ok { background: linear-gradient(180deg, #ffe45c, #ff9f1a 60%, #ff7a1a); box-shadow: 0 5px 0 #d4580a, 0 8px 16px rgba(0, 0, 0, .2); }
.snd-ask .sa-no { background: linear-gradient(180deg, #a9b6c8, #7f8ea6); box-shadow: 0 5px 0 #5d6b82, 0 8px 16px rgba(0, 0, 0, .2); }
.snd-ask button:active { transform: translateY(3px); }
.snd-ask button:focus-visible { outline: 3px solid #7ef0c8; outline-offset: 3px; }

/* アドバイス（3回続けて取れなかったとき）: 台の画面の左下に、吹き出しの札で。押す物ではないので、×のほかはタップが下へ抜ける */
.misstip {
  position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); bottom: 26px; z-index: 3;
  display: flex; align-items: center; gap: 8px; max-width: min(260px, 44vw); box-sizing: border-box;
  padding: 8px 8px 8px 8px; border-radius: 16px;
  background: linear-gradient(to bottom, #fffdf3, #fff1c8);
  border: 2.5px solid #ff8a1f;
  box-shadow: 0 4px 0 #d9600a, 0 8px 16px rgba(0, 0, 0, .28);
  color: #4a2400; font-size: 12px; font-weight: 800; line-height: 1.45; letter-spacing: .02em;
  pointer-events: none; opacity: 0; visibility: hidden; transform-origin: 18px 100%;
  transform: translateY(10px) scale(.6) rotate(-4deg);
  transition: opacity .2s, transform .2s, visibility 0s .2s;
}
.misstip::after {   /* 吹き出しのしっぽ（左下） */
  content: ''; position: absolute; left: 16px; bottom: -9px; width: 12px; height: 12px;
  background: #fff1c8; border-right: 2.5px solid #ff8a1f; border-bottom: 2.5px solid #ff8a1f;
  transform: rotate(45deg) skew(8deg, 8deg); border-bottom-right-radius: 3px;
}
.misstip.on { opacity: 1; visibility: visible; transform: none; transition: none; animation: misstip-pop .55s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes misstip-pop {
  0% { opacity: 0; transform: translateY(10px) scale(.6) rotate(-4deg); }
  60% { opacity: 1; transform: translateY(-3px) scale(1.06) rotate(1.5deg); }
  100% { opacity: 1; transform: none; }
}
.misstip .adv-ic {
  flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #fff6a8, #ffc21a 55%, #ff9a1a);
  box-shadow: 0 2px 0 #c86a00, inset 0 -2px 0 rgba(0, 0, 0, .12);
  color: #fff; font-size: 17px; font-weight: 900; text-shadow: 0 1.5px 0 #b85a00;
  animation: misstip-wiggle 2.4s ease-in-out .6s infinite;
}
@keyframes misstip-wiggle { 0%, 80%, 100% { transform: none; } 85% { transform: rotate(-14deg) scale(1.08); } 92% { transform: rotate(10deg) scale(1.08); } }
.misstip .adv-t { flex: 1; }
.misstip .adv-x {
  flex: none; align-self: flex-start; pointer-events: auto; cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%; border: 0; padding: 0; margin: -2px -2px 0 0;
  display: grid; place-items: center; background: #ff8a1f; color: #fff;
  font: inherit; font-size: 12px; font-weight: 900; line-height: 1; box-shadow: 0 2px 0 #c2560a;
}
.misstip .adv-x:active { transform: translateY(2px); box-shadow: none; }
@media (prefers-reduced-motion: reduce) { .misstip.on, .misstip .adv-ic { animation: none; } .misstip { transition: none; } }

/* スタミナ（パブリックの画面だけ）: 左上のメニューボタンのとなりに、⚡ と数と残り時間のゲージ */
.stamina {
  position: absolute; left: calc(max(10px, env(safe-area-inset-left, 0px)) + 50px); top: 10px; z-index: 3;
  display: flex; align-items: center; gap: 6px; height: 42px; box-sizing: border-box;
  padding: 0 12px 0 5px; border-radius: 999px;
  background: linear-gradient(to bottom, #fffdf3, #fff1c8);
  border: 2.5px solid #ff8a1f; box-shadow: 0 3px 0 #d9600a, 0 6px 12px rgba(0, 0, 0, .25);
  color: #4a2400; pointer-events: none; -webkit-user-select: none; user-select: none;
}
.stamina[hidden] { display: none; }
.stamina .sta-ic {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 17px; line-height: 1;
  background: radial-gradient(circle at 35% 30%, #fff6a8, #ffc21a 55%, #ff9a1a); box-shadow: 0 2px 0 #c86a00, inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.stamina .sta-body { display: grid; gap: 3px; min-width: 92px; }
.stamina .sta-row { display: flex; align-items: baseline; gap: 2px; line-height: 1; }
.stamina .sta-n { font-size: 17px; font-weight: 900; font-variant-numeric: tabular-nums; }
.stamina .sta-max { font-size: 11px; font-weight: 800; opacity: .65; }
.stamina .sta-t { margin-left: auto; padding-left: 8px; font-size: 10.5px; font-weight: 800; font-variant-numeric: tabular-nums; color: #b8540a; }
.stamina.full .sta-t { color: #1a9a4a; letter-spacing: .06em; }
.stamina .sta-bar { height: 7px; border-radius: 999px; background: rgba(120, 60, 0, .18); overflow: hidden; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .15); }
.stamina .sta-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(to bottom, #9af06a, #2fbf4a); transition: width .4s cubic-bezier(.3, 1.4, .5, 1); }
.stamina.low .sta-bar i { background: linear-gradient(to bottom, #ffb36a, #ff6a1a); }
.stamina.empty { border-color: #e8262c; box-shadow: 0 3px 0 #a8141a, 0 6px 12px rgba(0, 0, 0, .25); }
.stamina.empty .sta-n { color: #e8262c; }
.stamina.use .sta-n, .stamina.gain .sta-n { display: inline-block; animation: sta-bump .45s cubic-bezier(.3, 1.6, .5, 1); }
.stamina.gain .sta-ic { animation: sta-glow .7s ease-out; }
@keyframes sta-bump { 0% { transform: scale(1); } 40% { transform: scale(1.45); } 100% { transform: scale(1); } }
@keyframes sta-glow { 0% { box-shadow: 0 0 0 0 rgba(255, 220, 60, .9), 0 2px 0 #c86a00; } 100% { box-shadow: 0 0 0 14px rgba(255, 220, 60, 0), 0 2px 0 #c86a00; } }
@media (max-width: 420px) { .stamina .sta-body { min-width: 74px; } .stamina { padding-right: 9px; } }

/* スタミナ切れの札: 台の画面の真ん中に */
.sta-empty {
  position: absolute; left: 50%; top: 42%; z-index: 9; translate: -50% -50%;
  width: min(78vw, 300px); box-sizing: border-box; padding: 16px 18px 16px; text-align: center;
  border-radius: 20px; background: linear-gradient(to bottom, #fffdf3, #fff1c8);
  border: 3px solid #ff8a1f; box-shadow: 0 5px 0 #d9600a, 0 14px 30px rgba(0, 0, 0, .4);
  color: #4a2400;
}
.sta-empty[hidden] { display: none; }
.sta-empty.pop { animation: misstip-pop .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.sta-empty .se-ic {
  width: 52px; height: 52px; margin: -42px auto 6px; border-radius: 50%; display: grid; place-items: center; font-size: 28px;
  background: radial-gradient(circle at 35% 30%, #fff6a8, #ffc21a 55%, #ff9a1a); box-shadow: 0 3px 0 #c86a00, 0 0 0 4px #fff;
  filter: grayscale(.35);
}
.sta-empty .se-h { font-size: 20px; font-weight: 900; color: #e8262c; letter-spacing: .04em; }
.sta-empty .se-t { margin-top: 8px; font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.sta-empty .se-s { margin-top: 3px; font-size: 11.5px; font-weight: 700; opacity: .7; font-variant-numeric: tabular-nums; }
.sta-empty .se-ok {
  margin-top: 12px; min-width: 120px; height: 40px; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 16px; font-weight: 900; color: #fff; letter-spacing: .08em;
  background: linear-gradient(to bottom, #ffb03a, #ff7a1a); box-shadow: 0 4px 0 #c2560a;
}
.sta-empty .se-ok:active { transform: translateY(3px); box-shadow: 0 1px 0 #c2560a; }
@media (prefers-reduced-motion: reduce) { .sta-empty.pop, .stamina.use .sta-n, .stamina.gain .sta-n, .stamina.gain .sta-ic { animation: none; } }

/* プレイヤー（パブリックの画面だけ）: 左上のメニューボタンのとなりに、レベル・名前・経験値のゲージ。押すと名前を変えられる */
.pcard {
  position: absolute; left: calc(max(10px, env(safe-area-inset-left, 0px)) + 50px); top: 10px; z-index: 3;
  display: flex; align-items: center; gap: 7px; height: 42px; box-sizing: border-box; min-width: 176px; max-width: min(250px, calc(100vw - 150px));
  padding: 0 12px 0 4px; border-radius: 999px; cursor: pointer; text-align: left; font: inherit; color: #fff;
  background: linear-gradient(to bottom, #6a5cff, #3b2bd0);
  border: 2.5px solid #fff; box-shadow: 0 3px 0 #2a1d9a, 0 6px 12px rgba(0, 0, 0, .25);
  -webkit-user-select: none; user-select: none;
}
.pcard[hidden] { display: none; }
.pcard:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a1d9a, 0 3px 8px rgba(0, 0, 0, .25); }
.pcard .pc-lv {
  flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-content: center; text-align: center; line-height: .9;
  background: radial-gradient(circle at 35% 30%, #fff6a8, #ffc21a 55%, #ff9a1a); color: #5a2a00; box-shadow: 0 2px 0 #c86a00, inset 0 -2px 0 rgba(0, 0, 0, .12);
}
.pcard .pc-lv small { font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.pcard .pc-lv b { font-size: 14px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pcard .pc-body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pcard .pc-name { font-size: 12.5px; font-weight: 900; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.pcard .pc-bar { display: block; height: 6px; border-radius: 999px; background: rgba(0, 0, 40, .35); overflow: hidden; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .3); }
.pcard .pc-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(to bottom, #8af4ff, #22b8f0); transition: width .5s cubic-bezier(.3, 1.4, .5, 1); }
.pcard .pc-next { font-size: 9.5px; font-weight: 800; line-height: 1; opacity: .9; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pcard .pc-plus {
  position: absolute; right: 8px; top: 100%; margin-top: 4px; font-size: 12px; font-weight: 900; color: #8af4ff; white-space: nowrap;
  text-shadow: 0 1px 0 #2a1d9a, 0 0 6px rgba(0, 0, 0, .5); opacity: 0; pointer-events: none;
}
.pcard .pc-plus.on { animation: pc-plus 1.4s ease-out both; }
@keyframes pc-plus { 0% { opacity: 0; transform: translateY(6px) scale(.8); } 15% { opacity: 1; transform: translateY(0) scale(1.1); } 70% { opacity: 1; transform: translateY(-2px); } 100% { opacity: 0; transform: translateY(-10px); } }
/* プレイヤーの札があるときは、スタミナはその右に横並び（プレイヤーの札は幅を決めておく） */
body.has-pcard .pcard { width: 184px; min-width: 0; max-width: none; }
body.has-pcard .stamina { left: calc(max(10px, env(safe-area-inset-left, 0px)) + 50px + 184px + 8px); }
/* 幅の狭い画面: 1段めは札とスタミナだけ（スタミナは右端）。視点は右の列（オートカメラの上）へ下ろす。札は残りの幅いっぱいに */
@media (max-width: 520px) {
  body.has-pcard .pcard { width: min(260px, calc(100vw - 186px)); }
  body.has-pcard .pcard .pc-next { font-size: 8.5px; }
  body.has-pcard .stamina { left: auto; right: max(10px, env(safe-area-inset-right, 0px)); padding-right: 8px; gap: 4px; }
  body.has-pcard .views { top: 58px; }
  body.has-pcard .stamina .sta-ic { width: 26px; height: 26px; font-size: 15px; }
  body.has-pcard .stamina .sta-body { min-width: 64px; }
  body.has-pcard .stamina .sta-t { font-size: 9.5px; padding-left: 4px; }
}

/* レベルアップの札 */
.lvup {
  position: absolute; left: 50%; top: 24%; z-index: 9; translate: -50% -50%; text-align: center; pointer-events: none;
  opacity: 0; visibility: hidden;
}
.lvup.on { visibility: visible; animation: lvup 3.2s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes lvup { 0% { opacity: 0; transform: scale(.4) rotate(-6deg); } 12% { opacity: 1; transform: scale(1.12) rotate(2deg); } 20% { transform: scale(1) rotate(0); } 85% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1.05) translateY(-10px); } }
.lvup .lu-h {
  font: 900 clamp(30px, 9vw, 52px)/1 'Orbitron', system-ui, sans-serif; letter-spacing: .04em; white-space: nowrap;
  background: linear-gradient(to bottom, #fff6a8, #ffc21a 50%, #ff7a1a); -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 1.5px #7a2a00; filter: drop-shadow(0 3px 0 #7a2a00) drop-shadow(0 6px 10px rgba(0, 0, 0, .4));
}
.lvup .lu-lv { margin-top: 4px; font: 900 22px/1 system-ui, sans-serif; color: #fff; text-shadow: 0 2px 0 #3b2bd0, 0 0 10px rgba(0, 0, 0, .5); }
.lvup .lu-s { margin-top: 8px; display: inline-block; padding: 5px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #4a2400; background: #fff1c8; box-shadow: 0 0 0 2px #ff8a1f; }

/* 名前を変える札（スタミナ切れの札と同じ見た目） */
.pname .pn-in {
  display: block; width: 100%; box-sizing: border-box; margin-top: 10px; height: 40px; padding: 0 12px;
  border: 2px solid #ff8a1f; border-radius: 12px; background: #fff; color: #4a2400; font: inherit; font-size: 16px; font-weight: 800; text-align: center;
}
.pname .pn-in:focus { outline: 3px solid rgba(255, 138, 31, .35); }
.pname .pn-btns { display: flex; gap: 10px; justify-content: center; }
/* 名前の札の下: 引き継ぎ */
.pname .pn-xfer { margin-top: 14px; padding-top: 12px; border-top: 2px dashed rgba(0, 0, 0, .12); display: grid; gap: 8px; }
.pname .pn-xfer[hidden], .pname .pn-xmsg[hidden] { display: none; }
.pname .pn-line { margin-top: 14px; padding-top: 12px; border-top: 2px dashed rgba(0, 0, 0, .12); display: grid; gap: 8px; }
.pname .pn-line[hidden], .pname .pn-line [hidden] { display: none; }
.pname .pn-line .pn-lin { background: #06c755; box-shadow: 0 2px 0 #04913e; }
.pname .pn-lst { font-size: 12.5px; font-weight: 800; color: #04733a; background: #e8f9ef; border-radius: 8px; padding: 8px; }
.pname .pn-xh { font-size: 13px; font-weight: 900; }
.pname .pn-xrow { display: flex; gap: 6px; }
.pname .pn-xin { flex: 1; min-width: 0; padding: 8px 10px; border: 2px solid #ddd; border-radius: 10px; font: 800 15px/1 system-ui, sans-serif; letter-spacing: .08em; text-transform: uppercase; }
.pname .pn-xb { padding: 8px 12px; border: 0; border-radius: 10px; background: #3aa0ff; color: #fff; font: 800 13px/1.2 system-ui, sans-serif; cursor: pointer; box-shadow: 0 2px 0 #1d6fd1; }
.pname .pn-xmsg { white-space: pre-line; font-size: 12.5px; font-weight: 800; color: #1d4f91; background: #eef6ff; border-radius: 8px; padding: 8px; user-select: text; -webkit-user-select: text; }
.pname .pn-btns .se-ok { min-width: 0; flex: 1; }
.pname .pn-btns .pn-no { background: linear-gradient(to bottom, #b8bcc6, #8a8f9c); box-shadow: 0 4px 0 #5f6470; }
@media (prefers-reduced-motion: reduce) { .lvup.on { animation: none; opacity: 1; } .pcard .pc-plus.on { animation: none; } }

/* スタミナのゲージは押せる（回復の方法を見る） */
.stamina { pointer-events: auto; cursor: pointer; font: inherit; color: #4a2400; text-align: left; }
.stamina:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9600a, 0 3px 8px rgba(0, 0, 0, .25); }
.sta-empty:not(.is-empty) .se-h { color: #4a2400; }
.sta-empty:not(.is-empty) .se-ic { filter: none; }

/* 広告を見て回復のボタン */
.sta-empty .se-ad {
  display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 48px; margin-top: 12px;
  border: 0; border-radius: 999px; cursor: pointer; font: inherit; color: #fff;
  background: linear-gradient(to bottom, #4fe07a, #1aa64a); box-shadow: 0 4px 0 #0e7a32, 0 0 0 3px #fff inset;
  animation: se-ad-glow 1.8s ease-in-out infinite;
}
.sta-empty .se-ad:active { transform: translateY(3px); box-shadow: 0 1px 0 #0e7a32, 0 0 0 3px #fff inset; }
.sta-empty .se-ad:disabled { cursor: default; filter: grayscale(1); opacity: .55; animation: none; }
.sta-empty .se-ad .sa-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #fff; color: #1aa64a; font-size: 11px; padding-left: 2px; box-sizing: border-box; }
.sta-empty .se-ad .sa-l { font-size: 15px; font-weight: 900; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(0, 0, 0, .25); }
.sta-empty .se-ad .sa-n { padding: 3px 8px; border-radius: 999px; background: #ffd23a; color: #5a2a00; font-size: 13px; font-weight: 900; }
.sta-empty .se-adleft { margin-top: 6px; font-size: 11px; font-weight: 700; opacity: .7; }
.sta-empty .se-ok { margin-top: 10px; height: 36px; font-size: 14px; background: linear-gradient(to bottom, #b8bcc6, #8a8f9c); box-shadow: 0 4px 0 #5f6470; }
@keyframes se-ad-glow { 0%, 100% { filter: brightness(1); } 50% { filter: brightness(1.12); } }

/* 仮の広告（テスト表示）: 台の画面いっぱいに */
.adfake { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; background: rgba(8, 10, 20, .88); }
.adfake .af-box { width: min(84vw, 320px); padding: 16px; border-radius: 16px; background: #1c2133; color: #fff; text-align: center; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15); }
.adfake .af-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; background: #ffd23a; color: #3a2a00; font-size: 11px; font-weight: 900; }
.adfake .af-art { margin: 14px 0 6px; font-size: 56px; line-height: 1; }
.adfake .af-msg { font-size: 13px; opacity: .8; }
.adfake .af-bar { height: 6px; margin-top: 14px; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.adfake .af-bar i { display: block; height: 100%; width: 0; background: #4fe07a; }
.adfake .af-sec { margin-top: 6px; font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.adfake .af-x { margin-top: 12px; min-width: 140px; height: 38px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 14px; font-weight: 900; color: #fff; background: #5a6070; }
.adfake .af-x.done { background: linear-gradient(to bottom, #4fe07a, #1aa64a); box-shadow: 0 3px 0 #0e7a32; }
@media (prefers-reduced-motion: reduce) { .sta-empty .se-ad { animation: none; } }

/* 週間ランキングのボタン（パブリックの画面だけ）: 左上のメニューボタンの下 */
.rankbtn {
  position: absolute; left: max(10px, env(safe-area-inset-left, 0px)); top: 58px; z-index: 3;
  width: 42px; height: 46px; padding: 3px 0 0; box-sizing: border-box; border: 2px solid #fff; border-radius: 12px; cursor: pointer;
  display: grid; justify-items: center; align-content: center; gap: 1px; font: inherit; color: #fff;
  background: linear-gradient(to bottom, #ff5ab0, #e0237e); box-shadow: 0 3px 0 #9a1050, 0 5px 10px rgba(0, 0, 0, .25);
}
.rankbtn[hidden] { display: none; }
.rankbtn:active { transform: translateY(2px); box-shadow: 0 1px 0 #9a1050; }
.rankbtn .rb-ic { font-size: 18px; line-height: 1; }
.rankbtn .rb-l { font-size: 7.5px; font-weight: 900; letter-spacing: -.02em; line-height: 1; white-space: nowrap; }

/* 週間ランキングの札 */
.wkcard .wc-title { font-size: 18px; font-weight: 900; color: #e0237e; letter-spacing: .04em; }
.wkcard .wc-me { margin-top: 10px; padding: 10px 8px; border-radius: 14px; background: rgba(224, 35, 126, .08); box-shadow: inset 0 0 0 2px rgba(224, 35, 126, .25); }
.wkcard .wc-soon { margin-top: 8px; font-size: 11.5px; font-weight: 700; opacity: .6; }
.wkcard .wc-who { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; }
.wkcard .wc-lv { padding: 2px 7px; border-radius: 999px; background: #3b2bd0; color: #fff; font-size: 11px; font-weight: 900; }
.wkcard .wc-name { font-size: 15px; font-weight: 900; max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wkcard .wc-edit { border: 0; border-radius: 999px; padding: 4px 9px; cursor: pointer; font: inherit; font-size: 11px; font-weight: 800; color: #b8540a; background: rgba(255, 138, 31, .16); }
.wkcard .wc-h { margin-top: 12px; font-size: 12px; font-weight: 800; opacity: .75; }
.wkcard .wc-big { display: flex; align-items: baseline; justify-content: center; gap: 3px; color: #e0237e; }
.wkcard .wc-big b { font-size: 36px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1.1; }
.wkcard .wc-big span { font-size: 15px; font-weight: 900; }
.wkcard .wc-left { font-size: 11px; font-weight: 700; opacity: .7; }
.wkcard .wc-rows { margin-top: 10px; display: grid; gap: 4px; text-align: left; }
.wkcard .wc-row { display: flex; justify-content: space-between; padding: 5px 10px; border-radius: 8px; background: rgba(255, 138, 31, .1); font-size: 12.5px; font-weight: 700; }
.wkcard .wc-row b { font-weight: 900; font-variant-numeric: tabular-nums; }

/* ===== ポップに統一: メニュー（引き出し）・メニューのボタン・読み込み画面を、スタミナやプレイヤーの札と同じ色と形に =====
   クリーム地・オレンジの太い縁・下に厚みの影・白い縁の丸いボタン。色: 橙 #ff8a1f / 桃 #e0237e / 紫 #3b2bd0 / 黄 #ffc21a / 茶 #4a2400 */
.bar {
  --pop-o: #ff8a1f; --pop-od: #d9600a; --pop-ink: #4a2400; --pop-cream: #fffdf3; --pop-cream2: #fff1c8;
  color: var(--pop-ink); clip-path: none;
  background:
    radial-gradient(circle, rgba(255, 138, 31, .16) 1.6px, transparent 2px) 0 0 / 18px 18px,
    linear-gradient(to bottom, var(--pop-cream), var(--pop-cream2));
}
.bar::before, .bar::after { content: none; }
.bar h1 { color: var(--pop-ink); text-shadow: none; font-style: normal; }
.bar h1 .ver-tag {
  font: 900 .62em/1 Orbitron, var(--font-num); letter-spacing: .1em; color: #fff; clip-path: none;
  padding: 5px 11px; border-radius: 999px; background: linear-gradient(to bottom, #ff5ab0, #e0237e); box-shadow: 0 2px 0 #9a1050;
}
.bar .chip-btn, .bar .stage-sel {
  clip-path: none; border-radius: 14px; color: var(--pop-ink); font-weight: 800; letter-spacing: .04em;
  border: 2.5px solid var(--pop-o); background: #fff; box-shadow: 0 3px 0 var(--pop-od);
  transition: transform .08s, box-shadow .08s, background-color .1s;
}
.bar .chip-btn:hover { color: var(--pop-ink); background: #fff8e6; box-shadow: 0 3px 0 var(--pop-od); }
.bar .chip-btn:active { transform: translateY(2px); background: #ffe9c2; box-shadow: 0 1px 0 var(--pop-od); }
.bar .stage-sel {
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1L6 6.5L11 1' fill='none' stroke='%23ff8a1f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 11px center / 12px 8px no-repeat,
    #fff;
}
.bar .stage-sel option { background: #fff; color: var(--pop-ink); }
#lnk-v2[aria-pressed="true"] { color: #fff; background: linear-gradient(to bottom, #ff5ab0, #e0237e); border-color: #fff; box-shadow: 0 3px 0 #9a1050; }
.bar a.chip-btn, #lnk-v2 { color: var(--pop-ink); box-shadow: 0 3px 0 var(--pop-od); }
.bar.nav {
  border-radius: 0 24px 24px 0; border-right: 3px solid var(--pop-o);
  box-shadow: 5px 0 0 var(--pop-od), 12px 0 30px rgba(0, 0, 0, .35);
}
.nav-x {
  width: 36px; height: 36px; border-radius: 50%; color: #fff; font: 900 20px/1 system-ui, sans-serif;
  background: var(--pop-o, #ff8a1f); box-shadow: 0 3px 0 var(--pop-od, #d9600a);
}
.nav-x:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9600a; }
.nav-x:focus-visible, .hamb:focus-visible, .bar .chip-btn:focus-visible, .bar .stage-sel:focus-visible { outline: 3px solid rgba(255, 138, 31, .5); outline-offset: 2px; }
.nav-back { background: rgba(40, 20, 0, .35); }
/* メニューのボタン: プレイヤーの札と同じ紫に白い縁、白い丸い3本線 */
.hamb {
  clip-path: none; border: 2.5px solid #fff; border-radius: 14px; box-sizing: border-box; gap: 4px;
  background: linear-gradient(to bottom, #6a5cff, #3b2bd0); box-shadow: 0 3px 0 #2a1d9a, 0 6px 12px rgba(0, 0, 0, .25);
}
.hamb span { width: 18px; height: 3px; border-radius: 2px; background: #fff; box-shadow: none; }
.hamb:active { transform: translateY(2px); background: linear-gradient(to bottom, #6a5cff, #3b2bd0); box-shadow: 0 1px 0 #2a1d9a; }

/* 読み込み画面: 紫から桃色の明るい背景に水玉。黄色いつめと桃色の宝石、白い縁の丸いロゴ、クリームのゲージ */
.boot {
  background:
    radial-gradient(circle, rgba(255, 255, 255, .14) 2px, transparent 2.5px) 0 0 / 22px 22px,
    radial-gradient(circle at 50% 36%, #8a7cff 0%, #5a3fe0 45%, #c2207a 110%);
  color: #fff;
}
.bc-line { background: #fff; box-shadow: 0 0 0 2px #3b2bd0; }
.bc-head { background: radial-gradient(circle at 35% 30%, #fff6a8, #ffc21a 55%, #ff9a1a); box-shadow: 0 0 0 2.5px #fff, 0 3px 0 2.5px #c86a00; }
.bc-arm { border-color: #fff; filter: drop-shadow(0 2px 0 #3b2bd0); }
.bc-gem { background: linear-gradient(135deg, #ffe0f0, #ff5ab0 45%, #c2207a); box-shadow: 0 0 0 2.5px #fff, 0 0 18px rgba(255, 220, 240, .8); }
.boot-logo { transform: rotate(-4deg); }
.boot-logo .bl1 { font-size: 22px; color: #fff; letter-spacing: .06em; text-shadow: 0 2px 0 #3b2bd0, 2px 0 0 #3b2bd0, -2px 0 0 #3b2bd0, 0 -2px 0 #3b2bd0; }
.boot-logo .bl2 {
  font-size: 36px; color: #ffd23a;
  text-shadow: 0 3px 0 #7a2a00, 3px 0 0 #7a2a00, -3px 0 0 #7a2a00, 0 -3px 0 #7a2a00, 2px 2px 0 #7a2a00, -2px 2px 0 #7a2a00, 2px -2px 0 #7a2a00, -2px -2px 0 #7a2a00, 0 7px 0 #3b2bd0;
}
.boot-bar { width: min(230px, 62vw); height: 12px; border-radius: 999px; background: #fff1c8; box-shadow: 0 0 0 2.5px #fff, 0 3px 0 2.5px #2a1d9a; }
.boot-bar i { border-radius: 999px; background: linear-gradient(to bottom, #ffe066, #ff8a1f); }
.boot-msg { color: #fff; font-weight: 800; text-shadow: 0 1px 0 rgba(42, 29, 154, .6); }

/* 読み込み画面（ポップに統一の続き）: 背景はメニューと同じクリーム地にオレンジの水玉。絵はロゴと同じリングとフック（チェーンが揺れる） */
.boot {
  background:
    radial-gradient(circle, rgba(255, 138, 31, .18) 2px, transparent 2.5px) 0 0 / 22px 22px,
    radial-gradient(circle at 50% 38%, #fffdf3 0%, #fff1c8 55%, #ffd98a 120%);
  color: #4a2400;
}
.boot-icon { width: 78px; height: 120px; overflow: visible; }
.boot-icon .bi-swing { transform-origin: 0 -2px; animation: boot-swing 1.6s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .boot-icon .bi-swing { animation: none; } }
.boot-logo .bl1 { text-shadow: 0 2px 0 #2a1d9a, 2px 0 0 #2a1d9a, -2px 0 0 #2a1d9a, 0 -2px 0 #2a1d9a, 1.5px 1.5px 0 #2a1d9a, -1.5px 1.5px 0 #2a1d9a, 1.5px -1.5px 0 #2a1d9a, -1.5px -1.5px 0 #2a1d9a; }
.boot-logo .bl2 { text-shadow: 0 3px 0 #7a2a00, 3px 0 0 #7a2a00, -3px 0 0 #7a2a00, 0 -3px 0 #7a2a00, 2px 2px 0 #7a2a00, -2px 2px 0 #7a2a00, 2px -2px 0 #7a2a00, -2px -2px 0 #7a2a00, 0 7px 0 #ff8a1f; }
.boot-bar { box-shadow: 0 0 0 2.5px #ff8a1f, 0 3px 0 2.5px #d9600a; background: #fff; }
.boot-msg { color: #7a3a00; text-shadow: none; }

/* ゲーム画面の左下のロゴ（文字だけ）。押す物ではない */
.wm.wm-logo { width: clamp(84px, 17vw, 140px); height: auto; opacity: .55; bottom: max(14px, env(safe-area-inset-bottom, 0px)); -webkit-user-select: none; user-select: none; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
/* アドバイスの札は、ロゴの上に出す */
.misstip { bottom: calc(clamp(110px, 24vw, 190px) * .615 + 26px); }
/* 幅の狭い画面: 左下だと①②ボタンにかかるので、ランキングの下（左上）に出す */
@media (max-width: 520px) { .misstip { bottom: auto; top: 112px; max-width: min(260px, 72vw); transform-origin: 18px 0; } .misstip::after { display: none; } }

/* 読み込み画面は動かさない（絵の揺れ・ゲージの流れる光をやめる） */
.boot-icon .bi-swing { animation: none; }
.boot-bar::after { content: none; animation: none; }
/* 読み込み画面のロゴ（Gemini で作った文字のロゴ） */
.boot-logo-img { display: block; width: min(340px, 78vw); height: auto; filter: drop-shadow(0 4px 8px rgba(120, 60, 0, .25)); -webkit-user-select: none; user-select: none; }

/* ===== プレイヤーの札のアイコン（LINE のプロフィール画像。なければ笑顔）と、その右下のレベル ===== */
.pcard .pc-av { position: relative; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff1c8; box-shadow: 0 0 0 2px #fff; }
.pcard .pc-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.pcard .pc-av img:not([hidden]) + .pc-av-def { display: none; }
.pcard .pc-av-def { font-size: 19px; line-height: 1; }
.pcard .pc-av .pc-lv { position: absolute; right: -8px; bottom: -5px; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1.5px #fff, 0 1px 0 #c86a00; }
.pcard .pc-av .pc-lv small { display: none; }
.pcard .pc-av .pc-lv b { font-size: 10.5px; }
.pcard .pc-body { margin-left: 4px; }

/* 台の画面から店へもどるボタン（ランキングの下） */
.storebtn { top: 110px; background: linear-gradient(to bottom, #4fc46a, #2a9a4a); box-shadow: 0 3px 0 #1a6a32, 0 5px 10px rgba(0, 0, 0, .25); }
.storebtn:active { box-shadow: 0 1px 0 #1a6a32; }

/* ===== 地図と店の画面（全画面） ===== */
.world {
  position: fixed; inset: 0; z-index: 60; display: grid; grid-template-rows: 1fr; color: #4a2400;
  background: radial-gradient(circle, rgba(255, 138, 31, .14) 2px, transparent 2.5px) 0 0 / 22px 22px, linear-gradient(to bottom, #fffdf3, #fff1c8);
  -webkit-user-select: none; user-select: none; overflow: hidden;
}
.world[hidden] { display: none; }
.w-head {
  display: flex; align-items: center; gap: 8px; padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px;
  background: #fff; border-bottom: 3px solid #ff8a1f; box-shadow: 0 3px 0 #d9600a; position: relative; z-index: 2;
}
.w-title { flex: 1; font-size: 17px; font-weight: 900; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.w-back { flex: none; border: 2.5px solid #ff8a1f; border-radius: 999px; background: #fff; color: #4a2400; font: inherit; font-size: 13px; font-weight: 900; padding: 5px 11px; cursor: pointer; box-shadow: 0 3px 0 #d9600a; }
.w-back:active { transform: translateY(2px); box-shadow: 0 1px 0 #d9600a; }
.w-me { flex: none; display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 900; }
.w-av { width: 30px; height: 30px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #fff1c8; box-shadow: 0 0 0 2px #ff8a1f; font-size: 18px; }
.w-av img { width: 100%; height: 100%; object-fit: cover; }
.w-lv { padding: 2px 7px; border-radius: 999px; background: #3b2bd0; color: #fff; }
.w-sta { padding: 2px 7px; border-radius: 999px; background: #fff1c8; box-shadow: inset 0 0 0 1.5px #ff8a1f; }

/* 地図・店の中: 幅 400 の論理の大きさ。--u = 幅の 1/400。縦はスクロール */
.w-scroll { position: relative; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; container-type: inline-size; width: 100%; overscroll-behavior: contain; }
.is-store .w-scroll { overflow-x: auto; }
.w-map, .w-floor { --u: min(100cqw / 400, 1.6px); position: relative; width: calc(400 * var(--u)); margin: 0 auto; }
.w-floor { flex: none; }
.wm-svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.wm-hint { position: absolute; translate: -50% -50%; white-space: nowrap; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .92); font-size: calc(11.5 * var(--u)); font-weight: 900; color: #7a3a00; box-shadow: 0 2px 0 rgba(0, 0, 0, .12); pointer-events: none; }

/* 店の建物（正面）: 看板（電球つき）・しましまの日よけ・窓にクレーンの台・自動ドア */
.w-shop { position: absolute; translate: -50% -50%; width: calc(124 * var(--u)); border: 0; padding: 0; background: none; cursor: pointer; font: inherit; color: inherit; display: grid; justify-items: center; filter: drop-shadow(0 calc(5 * var(--u)) 0 rgba(0, 0, 0, .18)); }
.w-shop:active { transform: translateY(2px); }
.ws-sign { position: relative; z-index: 1; padding: calc(5 * var(--u)) calc(9 * var(--u)); border-radius: calc(9 * var(--u)); background: var(--r); box-shadow: 0 0 0 calc(2.5 * var(--u)) #fff; margin-bottom: calc(-4 * var(--u)); }
.ws-bulbs { position: absolute; inset: calc(2 * var(--u)); border-radius: calc(7 * var(--u)); background: radial-gradient(circle, #fff6b0 0 34%, transparent 40%) 0 0 / calc(8 * var(--u)) calc(8 * var(--u)); -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(4 * var(--u)) no-repeat, linear-gradient(#000 0 0) bottom / 100% calc(4 * var(--u)) no-repeat; mask: linear-gradient(#000 0 0) top / 100% calc(4 * var(--u)) no-repeat, linear-gradient(#000 0 0) bottom / 100% calc(4 * var(--u)) no-repeat; animation: ws-blink 1.2s steps(2) infinite; }
@keyframes ws-blink { 50% { filter: brightness(.6); } }
.ws-name { position: relative; display: block; color: #fff; font-size: calc(12.5 * var(--u)); font-weight: 900; white-space: nowrap; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(0, 0, 0, .3); }
.ws-roof { width: calc(124 * var(--u)); height: calc(16 * var(--u)); background: repeating-linear-gradient(90deg, var(--c) 0 calc(12 * var(--u)), #fff calc(12 * var(--u)) calc(24 * var(--u))); border-radius: calc(4 * var(--u)) calc(4 * var(--u)) calc(10 * var(--u)) calc(10 * var(--u)); box-shadow: 0 calc(3 * var(--u)) 0 rgba(0, 0, 0, .15); position: relative; z-index: 1; }
.ws-body { width: calc(112 * var(--u)); height: calc(48 * var(--u)); background: linear-gradient(to bottom, #fffaf0, #efe6d2); border-radius: 0 0 calc(6 * var(--u)) calc(6 * var(--u)); display: flex; align-items: flex-end; justify-content: space-between; padding: 0 calc(6 * var(--u)); box-sizing: border-box; box-shadow: inset 0 calc(-4 * var(--u)) 0 rgba(0, 0, 0, .08); }
.ws-win { margin-bottom: calc(8 * var(--u)); width: calc(32 * var(--u)); height: calc(26 * var(--u)); border-radius: calc(3 * var(--u)); background: linear-gradient(135deg, #fff9d8, #ffe38a); box-shadow: inset 0 0 0 calc(2 * var(--u)) #6a6a72; display: flex; align-items: flex-end; justify-content: space-around; padding: 0 calc(3 * var(--u)); box-sizing: border-box; }
.ws-win i { width: calc(10 * var(--u)); height: calc(18 * var(--u)); border-radius: calc(2 * var(--u)) calc(2 * var(--u)) 0 0; background: linear-gradient(to bottom, var(--c) 0 25%, #bfe8ff 25% 70%, var(--c) 70%); }
.ws-door { width: calc(26 * var(--u)); height: calc(34 * var(--u)); border-radius: calc(3 * var(--u)) calc(3 * var(--u)) 0 0; background: linear-gradient(90deg, #a8dcf5 0 48%, #6a6a72 48% 52%, #a8dcf5 52%); box-shadow: inset 0 0 0 calc(2 * var(--u)) #6a6a72; }
.ws-tag { margin-top: calc(5 * var(--u)); padding: calc(3 * var(--u)) calc(9 * var(--u)); border-radius: 999px; background: #fff; font-size: calc(11.5 * var(--u)); font-weight: 900; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.ws-tag b { color: #ff9a1a; }
.w-shop.locked { filter: grayscale(.9) drop-shadow(0 calc(5 * var(--u)) 0 rgba(0, 0, 0, .18)); opacity: .8; }
.w-shop.locked .ws-bulbs { animation: none; filter: brightness(.5); }

/* 店の中の床: ゲームセンターらしい紺のカーペットに色の粒 */
.w-floor { cursor: pointer; overflow: hidden; background: #2b2f66 no-repeat 0 0 / 100% 100%; image-rendering: crisp-edges; image-rendering: pixelated; }
.w-floor > div, .w-floor > .w-mach { position: absolute; }
.wf-poster { display: flex; flex-direction: column; align-items: center; overflow: hidden; border-radius: calc(3 * var(--u)); background: linear-gradient(to bottom, #fff 0 70%, #ffe9f0); box-shadow: 0 0 0 calc(2 * var(--u)) #ff5a7a, 0 calc(2 * var(--u)) 0 calc(2 * var(--u)) rgba(0, 0, 0, .3); pointer-events: none; }
.wf-poster.p2 { background: linear-gradient(to bottom, #fff 0 70%, #e6f4ff); box-shadow: 0 0 0 calc(2 * var(--u)) #3aa0ff, 0 calc(2 * var(--u)) 0 calc(2 * var(--u)) rgba(0, 0, 0, .3); }
.wf-poster.p3 { background: linear-gradient(to bottom, #fffbe6 0 70%, #ffe9a8); box-shadow: 0 0 0 calc(2 * var(--u)) #ffb020, 0 calc(2 * var(--u)) 0 calc(2 * var(--u)) rgba(0, 0, 0, .3); }
.wp-tag { flex: none; width: 100%; text-align: center; font-size: calc(7.5 * var(--u)); font-weight: 900; line-height: 1.5; color: #fff; background: #ff5a7a; white-space: nowrap; }
.p2 .wp-tag { background: #3aa0ff; }
.p3 .wp-tag { background: #ffb020; color: #6a3000; }
.wf-poster img { flex: 1; min-height: 0; width: 86%; object-fit: contain; }
.wf-poster img:not([src]) { visibility: hidden; }
.wp-st { flex: none; font-size: calc(6.5 * var(--u)); line-height: 1.3; color: #ff9a1a; font-weight: 900; }
.wf-isign { position: absolute; translate: -50% -50%; z-index: 3; white-space: nowrap; padding: calc(2 * var(--u)) calc(10 * var(--u)); border-radius: 999px; background: #fff; color: #2b2f66; font-size: calc(11 * var(--u)); font-weight: 900; box-shadow: 0 0 0 calc(2 * var(--u)) var(--c, #ff8a1f), 0 calc(3 * var(--u)) 0 rgba(0, 0, 0, .35); pointer-events: none; }
.wf-bench, .wf-stool, .wf-plant, .wf-table, .wf-mat, .wf-door { background: no-repeat center / 100% 100%; image-rendering: crisp-edges; image-rendering: pixelated; filter: drop-shadow(0 calc(2 * var(--u)) 0 rgba(0, 0, 0, .35)); pointer-events: none; }
.wf-lab2 { translate: -50% -50%; white-space: nowrap; font-size: calc(10 * var(--u)); font-weight: 900; color: #fff; opacity: .85; pointer-events: none; }
.wf-lab2.ex { color: #fff; opacity: 1; z-index: 2; padding: 0 calc(5 * var(--u)); background: #2a2a32; font-size: calc(9.5 * var(--u)); letter-spacing: .08em; }

/* クレーンの台（上から見たドット絵）。景品の絵と★だけ HTML で重ねる */
.w-mach {
  translate: -50% -50%; width: calc(108 * var(--u)); height: calc(74 * var(--u)); border: 0; padding: 0; cursor: pointer; font: inherit; color: inherit;
  background: no-repeat 0 0 / 100% 100%; image-rendering: crisp-edges; image-rendering: pixelated; filter: drop-shadow(0 calc(3 * var(--u)) 0 rgba(0, 0, 0, .45));
}
.w-mach:active { transform: translateY(1px); }
.w-mach.sel { outline: calc(3 * var(--u)) solid #fff; outline-offset: calc(2 * var(--u)); }
.wmc-gl { position: absolute; }
.wmc-gl img { position: absolute; left: 50%; top: 55%; translate: -50% -50%; width: 78%; height: 78%; object-fit: contain; image-rendering: auto; }
.wmc-gl img:not([src]) { visibility: hidden; }
.wmc-rar { position: absolute; left: calc(1 * var(--u)); top: calc(1 * var(--u)); padding: 0 calc(3 * var(--u)); border-radius: calc(2 * var(--u)); background: #ffd23a; color: #7a3a00; font-size: calc(9 * var(--u)); font-weight: 900; line-height: 1.4; box-shadow: 0 0 0 1px #7a3a00; z-index: 2; }
.w-mach.r3 { animation: wm-glow 1.6s steps(2) infinite; }
@keyframes wm-glow { 50% { filter: drop-shadow(0 calc(3 * var(--u)) 0 rgba(0, 0, 0, .45)) drop-shadow(0 0 calc(5 * var(--u)) #ffd23a); } }

/* 自分（歩くアイコン） */
.w-floor > .w-avatar { position: absolute; translate: -50% -70%; width: calc(32 * var(--u)); height: calc(32 * var(--u)); min-width: 28px; min-height: 28px; pointer-events: none; z-index: 5; }
.w-av-face {
  position: absolute; inset: 0; border-radius: 50%; overflow: hidden; display: grid; place-items: center;
  background: #fff1c8; font-size: calc(20 * var(--u)); box-shadow: 0 0 0 3px #fff, 0 0 0 5.5px #ffd23a, 0 6px 8px rgba(0, 0, 0, .45);
}
.w-av-face img { width: 100%; height: 100%; object-fit: cover; }
/* アイコンの上のプレイヤー名 */
.w-av-name {
  position: absolute; left: 50%; bottom: calc(100% + 9px); translate: -50% 0; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; background: rgba(20, 22, 60, .85); color: #fff; font-size: 11px; font-weight: 900; line-height: 1.4; box-shadow: 0 0 0 1.5px #ffd23a;
}
.w-av-name:empty { display: none; }
.w-avatar.walk { animation: w-walk .32s ease-in-out infinite; }
@keyframes w-walk { 0%, 100% { margin-top: 0; } 50% { margin-top: -5px; } }

/* 店・台の札（画面の下から） */
.w-card {
  position: absolute; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px)); translate: -50% 0; z-index: 5;
  width: min(92vw, 360px); box-sizing: border-box; padding: 14px 16px; border-radius: 20px; text-align: center;
  background: linear-gradient(to bottom, #fffdf3, #fff1c8); border: 3px solid #ff8a1f; box-shadow: 0 5px 0 #d9600a, 0 14px 30px rgba(0, 0, 0, .3);
}
.w-card[hidden] { display: none; }
.w-card.pop { animation: misstip-pop .45s cubic-bezier(.3, 1.6, .5, 1) both; }
.wc-shop { display: inline-block; padding: 4px 14px; border-radius: 999px; background: var(--c); color: #fff; font-size: 17px; font-weight: 900; }
.wc-rows { margin-top: 10px; display: grid; gap: 4px; text-align: left; }
.wc-rows div { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; background: rgba(255, 138, 31, .1); font-size: 13px; font-weight: 700; }
.wc-lock { margin-top: 10px; font-size: 13px; font-weight: 800; color: #b8540a; }
.w-go { display: block; width: 100%; margin-top: 12px; height: 46px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-size: 16px; font-weight: 900; color: #fff; letter-spacing: .06em; background: linear-gradient(to bottom, #4fe07a, #1aa64a); box-shadow: 0 4px 0 #0e7a32; }
.w-go:active { transform: translateY(3px); box-shadow: 0 1px 0 #0e7a32; }
.w-close { margin-top: 8px; border: 0; background: none; color: #8a5a20; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }
.wm-kind { font-size: 12px; font-weight: 800; opacity: .7; margin-bottom: 8px; }
.wm-two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.wm-side { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 8px 6px; border-radius: 14px; background: #fff; box-shadow: inset 0 0 0 2px rgba(255, 138, 31, .35); }
.wm-sl { font-size: 12px; font-weight: 900; color: #fff; background: #ff8a1f; border-radius: 999px; padding: 1px 10px; }
.wm-side img { width: 64px; height: 64px; object-fit: contain; }
.wm-side .wm-name { font-size: 12.5px; text-align: center; min-height: 2.6em; }
.wm-side .w-go { height: 40px; font-size: 13px; letter-spacing: 0; margin-top: 6px; }
.wm-pz { display: flex; gap: 12px; align-items: center; text-align: left; }
.wm-pz img { width: 72px; height: 72px; object-fit: contain; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 2px rgba(255, 138, 31, .4); }
.wm-stars { color: #ff9a1a; font-size: 13px; font-weight: 900; }
.wm-name { font-size: 15px; font-weight: 900; line-height: 1.3; }
.wm-type { margin-top: 3px; font-size: 11.5px; font-weight: 700; opacity: .7; }
@media (prefers-reduced-motion: reduce) { .w-avatar.walk, .w-card.pop, .ws-bulbs, .w-mach.r3 { animation: none; } }

/* 地図・店の画面でも、プレイヤーの札・スタミナ・ランキング・左下のロゴ（と、その札）を前に出す */
body.world-on :is(.pcard, .stamina, #wkchip, .wm-logo) { z-index: 61; }
body.world-on :is(.sta-empty, .lvup, .adfake) { z-index: 62; }
/* メニューのボタンと、開いたメニュー・シートも地図・店より前に */
body.world-on .hamb { z-index: 61; }
body.world-on .nav-back { z-index: 63; }
body.world-on .bar.nav { z-index: 64; }
body.world-on .sheet-back { z-index: 65; }
body.world-on .sheet { z-index: 66; }
/* 地図の画面ではロゴを出さない */
body.world-map .wm-logo { display: none; }
body.wcard-on .wm-logo { opacity: 0; transition: opacity .2s; }
/* 地図・店の見出し（店の名前ともどる）は右上、ランキングと同じ高さ */
.world .w-head {
  position: absolute; z-index: 4; right: max(10px, env(safe-area-inset-right, 0px)); top: 58px; left: auto;
  display: flex; align-items: center; gap: 6px; padding: 0; background: none; border: 0; box-shadow: none; pointer-events: none;
}
.world .w-head > * { pointer-events: auto; }
.world .w-title { flex: none; padding: 6px 12px; border-radius: 999px; background: #fff; font-size: 13.5px; box-shadow: 0 0 0 2.5px #ff8a1f, 0 3px 0 2.5px #d9600a; max-width: 46vw; }

/* 店の中: 床は左上の札（プレイヤー・スタミナ・ランキング）の下から。まわりは床と同じ暗い色 */
.world.is-store { background: #1c1f48; }
.is-store .w-scroll { padding-top: 112px; box-sizing: border-box; }

/* 店を出るボタン（右下） */
.w-leave {
  position: absolute; z-index: 4; right: max(12px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px));
  border: 3px solid #fff; border-radius: 999px; padding: 9px 18px; cursor: pointer; font: inherit; font-size: 15px; font-weight: 900; letter-spacing: .04em; color: #fff;
  background: linear-gradient(to bottom, #ff9a3a, #ff6a1a); box-shadow: 0 4px 0 #c2460a, 0 8px 14px rgba(0, 0, 0, .35);
}
.w-leave:active { transform: translateY(3px); box-shadow: 0 1px 0 #c2460a; }
body.wcard-on .w-leave { display: none; }

/* 地図・店の画面では、メニュー・プレイヤーの札・スタミナ・ランキング・ロゴを画面の四隅に合わせる（台の画面の幅ではなく） */
body.world-on :is(.hamb, .pcard, .stamina, #wkchip, .wm-logo) { position: fixed; }

/* オンライン: ほかの人（自分より少し小さく、黄色ではなく白のふち）・プレイ中の札・地図の人数 */
.w-floor > .w-peer { z-index: 4; transform: scale(.88); }
.w-peer .w-av-face { box-shadow: 0 0 0 3px #fff, 0 0 0 5px #3aa0ff, 0 5px 7px rgba(0, 0, 0, .4); }
.w-peer .w-av-name { background: rgba(255, 255, 255, .92); color: #2b2f66; box-shadow: 0 0 0 1.5px #3aa0ff; white-space: pre; }
.w-av-play { position: absolute; left: 50%; top: calc(100% + 6px); translate: -50% 0; white-space: nowrap; padding: 1px 7px; border-radius: 999px; background: #ff5a7a; color: #fff; font-size: 10px; font-weight: 900; box-shadow: 0 0 0 1.5px #fff; }
.w-av-play[hidden] { display: none; }
.ws-ppl { margin-top: 3px; padding: 2px 8px; border-radius: 999px; background: #3aa0ff; color: #fff; font-size: calc(10.5 * var(--u)); font-weight: 900; white-space: nowrap; box-shadow: 0 2px 0 rgba(0, 0, 0, .15); }
.ws-ppl[hidden] { display: none; }
.w-go.busy { background: linear-gradient(to bottom, #c8ccd6, #9aa0ac); box-shadow: 0 4px 0 #6a707c; cursor: default; font-size: 12px; }

/* 地図のドット絵（町）と店の建物のドット絵 */
.wm-pix { position: absolute; inset: 0; width: 100%; height: 100%; display: block; image-rendering: crisp-edges; image-rendering: pixelated; -webkit-user-select: none; user-select: none; pointer-events: none; }
.ws-pic { display: block; width: calc(120 * var(--u)); height: calc(88 * var(--u)); background: no-repeat center / 100% 100%; image-rendering: crisp-edges; image-rendering: pixelated; }
.is-map .w-scroll { padding-top: 112px; box-sizing: border-box; }
.ws-tag { display: grid; justify-items: center; gap: 1px; line-height: 1.25; border-radius: calc(10 * var(--u)); }
.ws-tag .wt-d b { color: #ff9a1a; }
.ws-tag .wt-d i { font-style: normal; color: #d8d0c0; }
.ws-tag .wt-c { font-size: .92em; color: #7a3a00; }
.ws-tag .wt-c b { color: #e08a00; }

.world .w-head { flex-direction: column; align-items: flex-end; }
.w-net { padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 900; background: rgba(255, 255, 255, .92); color: #8a8f9c; box-shadow: 0 1px 0 rgba(0, 0, 0, .2); }
.w-net.on { color: #1aa64a; }
.w-net:empty { display: none; }

/* 観戦: 見る人の画面（操作のボタンは隠し、上に名前、下にスタンプと「観戦をやめる」） */
body.watching .holds, body.watching #lever-pad, body.watching .again { display: none !important; }
.watch-bar { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.watch-bar[hidden] { display: none; }
.watch-bar .wb-top {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 6px; max-width: calc(100% - 132px); box-sizing: border-box;
  padding: 6px 12px; border-radius: 999px; background: rgba(20, 22, 48, .82); color: #fff; border: 2px solid rgba(255, 255, 255, .7);
  font: 900 12px/1.2 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; white-space: nowrap;
}
.watch-bar .wb-name { overflow: hidden; text-overflow: ellipsis; }
.watch-bar .wb-eye { font-size: 16px; }
.watch-bar .wb-bot { position: absolute; left: 0; right: 0; bottom: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px; pointer-events: none; }
.watch-bar .wb-emo { display: flex; gap: 6px; pointer-events: auto; padding: 6px 8px; border-radius: 999px; background: rgba(255, 255, 255, .88); box-shadow: 0 4px 14px rgba(0, 0, 0, .25); }
.watch-bar .wb-emo button { width: 42px; height: 42px; border: 0; border-radius: 50%; background: #f1f2f8; font-size: 22px; line-height: 1; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.watch-bar .wb-emo button:active { transform: scale(.88); }
.watch-bar .wb-stop {
  pointer-events: auto; padding: 11px 20px; border: 3px solid #fff; border-radius: 999px; cursor: pointer;
  background: linear-gradient(180deg, #c79bff, #8a52f0); color: #fff; box-shadow: 0 4px 0 #6233c4, 0 8px 16px rgba(0, 0, 0, .25);
  font: 900 15px/1 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif;
}
.watch-bar .wb-stop:active { transform: translateY(3px); box-shadow: 0 1px 0 #6233c4, 0 4px 10px rgba(0, 0, 0, .25); }
/* 遊んでいる人の画面: 見ている人数 */
.watch-chip {
  position: absolute; top: 64px; left: 50%; transform: translateX(-50%); z-index: 7; pointer-events: none;
  padding: 6px 12px; border-radius: 999px; background: rgba(20, 22, 48, .78); color: #fff;
  font: 900 13px/1.2 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif;
}
.watch-chip[hidden] { display: none; }
.watch-chip { white-space: pre-line; text-align: center; }
/* 待機列: 並ぶボタン */
.w-go.queue { background: linear-gradient(180deg, #ffd36b, #f0a020); box-shadow: 0 3px 0 #b87410; margin-top: 6px; }
/* スタンプ: 下からふわっと上がって消える */
.emo-float { position: absolute; bottom: 120px; z-index: 9; pointer-events: none; display: flex; flex-direction: column; align-items: center; animation: emo-up 2.6s ease-out forwards; }
.emo-float .ef-e { font-size: 38px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); }
.emo-float .ef-n { margin-top: 2px; padding: 1px 6px; border-radius: 6px; background: rgba(0, 0, 0, .45); color: #fff; font: 700 11px/1.3 system-ui, sans-serif; max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes emo-up { 0% { transform: translateY(20px) scale(.6); opacity: 0; } 12% { transform: translateY(0) scale(1.1); opacity: 1; } 70% { opacity: 1; } 100% { transform: translateY(-220px) scale(1); opacity: 0; } }
/* 店の画面: 観戦ボタンと、短いお知らせ */
.w-go.watch { background: linear-gradient(180deg, #7fd0ff, #3a8fe0); box-shadow: 0 3px 0 #2a6cb0; }
.w-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); z-index: 70; padding: 10px 16px; border-radius: 12px; background: rgba(20, 22, 48, .9); color: #fff; font: 700 14px/1.4 system-ui, sans-serif; animation: emo-fade 3.2s ease forwards; }
@keyframes emo-fade { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }

/* 対戦（PK戦） */
body.vs-on .watch-chip, body.vs-on .watch-bar .wb-top { display: none !important; }
.w-go.vs { background: linear-gradient(180deg, #ff9a6b, #e8523a); box-shadow: 0 3px 0 #b33a26; }
.vs-rule { margin: 8px 4px 0; font: 600 13px/1.5 system-ui, sans-serif; color: #444; }
.vs-board {
  position: absolute; top: 60px; left: 50%; transform: translateX(-50%); z-index: 8; max-width: calc(100% - 120px); box-sizing: border-box;
  padding: 6px 8px 7px; border-radius: 12px; background: rgba(20, 22, 48, .86); color: #fff; border: 2px solid rgba(255, 255, 255, .7);
  font: 700 12px/1.2 system-ui, sans-serif; text-align: center;
}
.vs-board[hidden] { display: none; }
.vs-board .vb-turn { margin-bottom: 4px; font-weight: 900; font-size: 13px; }
.vs-board .vb-turn.me { color: #ffe14d; }
.vs-board .vb-quit { position: absolute; right: -6px; top: -10px; padding: 3px 8px; border: 2px solid #fff; border-radius: 999px; background: #6b6f86; color: #fff; font: 700 11px/1.2 system-ui, sans-serif; cursor: pointer; }
.vs-table { border-collapse: collapse; margin: 0 auto; }
.vs-table th { max-width: 6.5em; padding: 1px 6px 1px 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; font-weight: 700; }
.vs-table td { min-width: 17px; padding: 1px 1px; text-align: center; font-size: 13px; }
.vs-table td.no { font-size: 10px; opacity: .65; }
.vs-table td.cur { outline: 2px solid #ffe14d; border-radius: 4px; }
.vs-table td.tot { padding-left: 6px; font-weight: 900; font-size: 15px; color: #ffe14d; }
.vs-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; background: rgba(0, 0, 0, .45); }
.vs-modal[hidden] { display: none; }
.vs-modal .vm-card { width: min(340px, 90vw); padding: 18px 16px 14px; border-radius: 18px; background: #fff; color: #222; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); text-align: center; font: 600 14px/1.5 system-ui, sans-serif; }
.vs-modal .vm-title { font-weight: 900; font-size: 17px; margin-bottom: 8px; }
.vs-modal .vm-title.big { font-size: 26px; }
.vs-modal .vm-title.me { color: #e8523a; }
.vs-modal .vm-score { font-weight: 900; font-size: 16px; margin-bottom: 6px; }
.vs-modal .vm-text { margin: 6px 0; }
.vs-modal .vm-text.small { font-size: 12px; color: #666; }
.vs-modal .vs-table { color: #222; margin: 6px auto; }
.vs-modal .vs-table td.tot { color: #e8523a; }
.vs-modal .vm-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }
.vs-modal .vm-btns button { flex: 1; max-width: 150px; height: 44px; border: 0; border-radius: 999px; cursor: pointer; font: 900 15px/1 system-ui, sans-serif; color: #fff; }
.vs-modal .vm-ok { background: linear-gradient(180deg, #4fe07a, #1aa64a); box-shadow: 0 3px 0 #0e7a32; }
.vs-modal .vm-no { background: linear-gradient(180deg, #c8ccd6, #9aa0ac); box-shadow: 0 3px 0 #6a707c; }
.w-floor .w-peer { pointer-events: auto; cursor: pointer; }

/* ストック（全員共通）と入れ替えまでの時間 */
.w-slot { margin-top: 3px; padding: 2px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font: 700 11px/1.4 system-ui, sans-serif; white-space: nowrap; }
.wm-stock { margin-top: 4px; font: 800 12px/1.4 system-ui, sans-serif; color: #1a7a3a; }
.wm-stock.low { color: #d06a00; }
.wm-stock.out { color: #c0262d; }
.wm-stock .wm-lim { display: block; font-weight: 700; font-size: 11px; color: #7a4bd8; }
.wmc-gl.soldout::after {
  content: '売切'; position: absolute; inset: 22% 6%; display: grid; place-items: center; z-index: 3;
  background: rgba(192, 38, 45, .88); color: #fff; border-radius: calc(2 * var(--u));
  font: 900 calc(9 * var(--u))/1 system-ui, sans-serif; transform: rotate(-12deg);
}

.boot-diag { margin-top: 6px; font: 600 10px/1.35 ui-monospace, monospace; white-space: pre-line; opacity: .75; word-break: break-all; }

/* ゲージの長さは、数字や残り時間の文字の幅で変わらないよう決めておく */
.pcard .pc-bar { width: 100px; max-width: 100%; }
.stamina .sta-bar { width: 64px; }

/* ===== 絵の文字（artText）と絵のアイコン（artIcon）===== */
/* 縁取り --art-o・中の塗り --art-f・影 --art-sh は、置く場所ごとに決める */
svg.art { display: inline-block; vertical-align: middle; overflow: visible; }
svg.art .art-sh { fill: var(--art-sh, rgba(0, 0, 0, .28)); stroke: var(--art-sh, rgba(0, 0, 0, .28)); stroke-width: 150; stroke-linejoin: round; }
svg.art .art-o { fill: var(--art-o, #4a2400); stroke: var(--art-o, #4a2400); stroke-width: 150; stroke-linejoin: round; }
svg.art .art-f { fill: var(--art-f, url(#art-gw)); }
svg.art-ic { display: inline-block; width: 1.25em; height: 1.25em; vertical-align: middle; overflow: visible; }
svg.art-ic .ic-o { fill: var(--art-o, #4a2400); stroke: var(--art-o, #4a2400); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
svg.art-ic .ic-h { fill: none; stroke: rgba(255, 255, 255, .85); stroke-width: 1.4; stroke-linecap: round; }
svg.art-ic .ic-d { fill: #4a2400; }
svg.art-ic .ic-l { fill: none; stroke: #4a2400; stroke-width: 1.6; stroke-linecap: round; }
svg.art-ic .ic-c { fill: #ff7a7a; opacity: .75; }
svg.art-ic.ic-swap .ic-o, svg.art-ic.ic-back .ic-o { fill: none; stroke-width: 6; }
svg.art-ic .ic-s { fill: none; stroke: var(--art-s, #fff); stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.art-plain { font-family: 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; }

/* 置く場所ごとの色 */
.other-btn { --art-o: #4b1fa0; }
.other-btn .ob-icon { --art-o: #8a52f0; font-size: 15px; }
.other-btn .ob-label { font-size: 15px; line-height: 1; }
.move-btn { --art-o: #17377f; }
.move-btn .mv-arrow { font-size: 18px; }
.rankbtn { --art-o: #8a0d48; }
.rankbtn .rb-ic { font-size: 17px; }
.rankbtn .rb-l { font-size: 7px; }
.views { --art-o: #0e2456; }
.views .seg .ic-btn .lb, .views .seg.toggles .ic-btn .tl { -webkit-text-stroke: 0; text-shadow: none; }
.views .seg .ic-btn .lb { font-size: 12px; }
.views .seg.toggles .ic-btn .tl { font-size: 8.5px; line-height: 1.05; }
.views .seg.toggles #btn-autozoom .tl { font-size: 7.5px; }
.views .seg.toggles .ic-btn[aria-pressed="true"] { --art-o: #8a3a06; }
.views .seg .cam .vb-l { font-size: 10px; --art-o: #0e2456; }
.hold-cap { --art-o: var(--k3); text-shadow: none; }
.hold-cap .l { font-size: 13px; }
.stamina { --art-o: #fff; --art-sh: rgba(120, 60, 0, .25); }
.stamina .sta-ic { --art-o: #8a4a00; }
.stamina .sta-n { --art-f: url(#art-go); font-size: 16px; }
.stamina .sta-max { --art-f: #8a5a2a; opacity: 1; font-size: 10px; }
.stamina .sta-t { --art-f: url(#art-go); font-size: 9.5px; }
.stamina.full .sta-t { --art-f: url(#art-gg); }
.stamina.empty .sta-n { --art-f: #e8262c; }
.pcard { --art-o: #241690; }
.pcard .pc-next { font-size: 8.5px; }
.pcard .pc-lv { --art-o: #fff; --art-f: #5a2a00; --art-sh: rgba(120, 60, 0, .3); }
.pcard .pc-lv small { font-size: 7px; line-height: 1; }
.pcard .pc-lv b { font-size: 12px; line-height: 1; }
.pcard .pc-av-def { --art-o: #8a4a00; font-size: 22px; line-height: 1; }
.pcard .pc-plus { --art-f: url(#art-gw); --art-o: #1a6fa0; text-shadow: none; }
.getfx .getcard .gc-tag { --art-o: #7a3a00; }
.getfx .getcard .gc-tag.new { --art-o: #9a0d5a; }
/* だれの獲得か（観戦中・対戦の相手の番）: GET! の上に */
.getfx .gfx-who {
  position: absolute; left: 50%; top: calc(40% - clamp(48px, 16vw, 120px) - 40px); z-index: 4; white-space: nowrap;
  font-size: clamp(20px, 6.4vw, 34px); --art-o: #7a1d00; --art-sh: rgba(0, 0, 0, .35);
  transform: translate(-50%, -50%) scale(.6); opacity: 0;
}
.getfx .gfx-who[hidden] { display: none; }
.getfx.on .gfx-who { animation: gfx-who-in .5s cubic-bezier(.2, 1.6, .4, 1) .35s forwards; }
@keyframes gfx-who-in { to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .getfx.on .gfx-who { animation: none; opacity: 1; transform: translate(-50%, -50%); } }

/* ===== メニューから開く画面（景品・図鑑・記録・音と画面・設定）も、メニューと同じポップに =====
   クリーム地にオレンジの水玉、オレンジの太い縁と厚みの影、見出しはゲームの書体、ボタンは白い札にオレンジの縁 */
.sheet {
  --pop-o: #ff8a1f; --pop-od: #d9600a; --pop-ink: #4a2400; --pop-cream: #fffdf3; --pop-cream2: #fff1c8;
  --accent: #ff8a1f; --accent-ink: #fff; --line: rgba(255, 138, 31, .45); --muted: #9a6a3a; --ink: var(--pop-ink); --surface: var(--pop-cream); --bg: #fff;
  color: var(--pop-ink);
  background:
    radial-gradient(circle, rgba(255, 138, 31, .13) 1.6px, transparent 2px) 0 0 / 18px 18px,
    linear-gradient(to bottom, var(--pop-cream), var(--pop-cream2));
  border: 3px solid var(--pop-o); border-bottom: 0; border-radius: 24px 24px 0 0;
  box-shadow: 0 -4px 0 var(--pop-od), 0 -12px 30px rgba(0, 0, 0, .3);
}
.sheet h2 {
  font-family: 'Mochiy Pop One', 'Hiragino Maru Gothic ProN', system-ui, sans-serif; font-size: 18px; color: var(--pop-ink);
  background: var(--pop-cream); border-bottom: 2px dashed rgba(255, 138, 31, .35); padding-bottom: 8px;
}
.sheet h3 { color: #d9600a; font-weight: 900; letter-spacing: .04em; }
.sheet .note, .sheet .hint, .sheet .prize-count { color: #9a6a3a; }
.sheet .chip-btn {
  border-radius: 14px; color: var(--pop-ink); font-weight: 800; letter-spacing: .02em;
  border: 2.5px solid var(--pop-o); background: #fff; box-shadow: 0 3px 0 var(--pop-od);
  transition: transform .08s, box-shadow .08s, background-color .1s;
}
.sheet .chip-btn:hover { background: #fff8e6; color: var(--pop-ink); }
.sheet .chip-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--pop-od); }
.sheet .chip-btn[aria-pressed="true"], .sheet .prize-cats .chip-btn[aria-pressed="true"] { color: #fff; background: linear-gradient(to bottom, #ffb14a, #ff8a1f); border-color: #fff; box-shadow: 0 3px 0 var(--pop-od); }
.sheet h2 [data-close] { color: #fff; background: linear-gradient(to bottom, #ff5ab0, #e0237e); border-color: #fff; box-shadow: 0 3px 0 #9a1050; font-size: 13px; padding: 6px 14px; }
.sheet .seg { background: #fff; border: 2.5px solid var(--pop-o); box-shadow: 0 3px 0 var(--pop-od); border-radius: 14px; padding: 3px; }
.sheet .seg button { color: var(--pop-ink); font-weight: 800; border-radius: 10px; }
.sheet .seg button[aria-pressed="true"] { color: #fff; background: linear-gradient(to bottom, #ffb14a, #ff8a1f); }
.sheet .set-search { border: 2.5px solid var(--pop-o); border-radius: 14px; background: #fff; color: var(--pop-ink); box-shadow: inset 0 2px 0 rgba(0, 0, 0, .06); }
.sheet input[type="range"], .sheet input[type="checkbox"] { accent-color: #ff8a1f; }
.sheet .pz-card { background: #fff; border: 2.5px solid rgba(255, 138, 31, .55); border-radius: 16px; box-shadow: 0 3px 0 rgba(217, 96, 10, .35); color: var(--pop-ink); }
.sheet .pz-card:hover { border-color: var(--pop-o); }
.sheet .pz-card[aria-pressed="true"] { border-color: var(--pop-o); box-shadow: 0 0 0 2px var(--pop-o) inset, 0 3px 0 var(--pop-od); background: #fff8e6; }
.sheet .zk-card:not(.own) { background: rgba(255, 255, 255, .55); border-style: dashed; box-shadow: none; }
.sheet .zk-bar { background: rgba(120, 60, 0, .15); box-shadow: inset 0 1px 1px rgba(0, 0, 0, .15); }
.sheet .menu-group { background: #fff; border: 2.5px solid rgba(255, 138, 31, .55); border-radius: 16px; padding: 4px 14px 12px; margin-bottom: 12px; box-shadow: 0 3px 0 rgba(217, 96, 10, .3); }
.sheet .menu-row output { color: #d9600a; font-weight: 900; }
.sheet-back { background: rgba(40, 20, 0, .4); }
