:root {
  --bg: #f4f1ea;
  --bg2: #ebe6db;
  --card: #ffffff;
  --ink: #1d2433;
  --ink2: #4b5468;
  --muted: #7a8296;
  --line: #e2ddd2;
  --accent: #e5532d;
  --accent2: #ff6b3d;
  --accent-soft: #ffe7de;
  --blue: #2f6fd6;
  --ok: #1f9d6a;
  --warn: #c9821b;
  --paper: #fffdf8;
  --shadow: 0 1px 2px rgba(29, 36, 51, .06), 0 8px 24px rgba(29, 36, 51, .07);
  --radius: 18px;
  --font: "Noto Sans JP", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic UI", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #11141b;
    --bg2: #171b25;
    --card: #1b2030;
    --ink: #eef0f5;
    --ink2: #c3c8d4;
    --muted: #8d95a8;
    --line: #2a3043;
    --accent-soft: #3a2219;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(229, 83, 45, .10), transparent 60%),
    radial-gradient(900px 400px at -10% 0%, rgba(47, 111, 214, .08), transparent 60%),
    var(--bg);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}
button, input { font: inherit; color: inherit; }
a { color: var(--blue); }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; background: var(--bg2); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }

/* ---------- 上の帯 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; cursor: pointer; }
.brand-mark { width: 32px; height: 32px; color: var(--accent); display: block; }
.brand-mark svg { width: 100%; height: 100%; display: block; }
.brand-text { font-weight: 800; font-size: 1.12rem; letter-spacing: .06em; }
.brand-text small { font-weight: 500; font-size: .62rem; color: var(--muted); margin-left: 6px; letter-spacing: 0; border: 1px solid var(--line); border-radius: 999px; padding: 0 6px; vertical-align: 3px; }
.rank-chip {
  font-weight: 700; font-size: .85rem; padding: 4px 12px; border-radius: 999px;
  background: var(--ink); color: var(--bg);
}

main { max-width: 760px; margin: 0 auto; padding: 8px 16px 32px; }

/* ---------- 共通の部品 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 20px;
  margin: 16px 0;
}
.badge {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .04em;
  padding: 2px 10px; border-radius: 999px; background: var(--accent-soft); color: var(--accent);
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--card); color: var(--ink);
  font-weight: 700; cursor: pointer; text-decoration: none;
  transition: transform .08s ease, box-shadow .2s ease, background .2s ease;
}
.btn:hover { box-shadow: 0 4px 14px rgba(29, 36, 51, .10); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: default; }
.btn.primary { background: linear-gradient(135deg, var(--accent2), var(--accent)); color: #fff; border-color: transparent; box-shadow: 0 6px 18px rgba(229, 83, 45, .28); }
.btn.big { min-height: 52px; padding: 10px 26px; font-size: 1.05rem; border-radius: 14px; }
.btn.ghost { background: transparent; }
.btn.x { background: #0f1419; color: #fff; border-color: #0f1419; }
.btn.done { background: var(--bg2); color: var(--ink2); box-shadow: none; }

/* ---------- 道場（トップ） ---------- */
.hero { padding: 28px 2px 4px; }
.eyebrow { margin: 0 0 6px; color: var(--accent); font-weight: 700; font-size: .86rem; letter-spacing: .08em; }
.hero h1 { margin: 0; font-size: clamp(1.9rem, 7vw, 2.8rem); line-height: 1.25; letter-spacing: .02em; font-weight: 900; }
.hero h1 em { font-style: normal; background: linear-gradient(transparent 62%, rgba(255, 107, 61, .35) 62%); }
.lead { color: var(--ink2); margin: 12px 0 0; }

.daily { position: relative; overflow: hidden; background: linear-gradient(140deg, var(--card) 55%, var(--accent-soft)); }
.daily::after {
  content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px;
  border: 22px solid rgba(255, 107, 61, .12); border-radius: 28px; transform: rotate(18deg);
}
.daily-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.daily-no { font-weight: 900; font-size: 1.1rem; }
.daily-date { color: var(--muted); font-size: .9rem; }
.daily h2 { margin: 8px 0 0; font-size: 1.45rem; }
.daily p { margin: 2px 0 14px; }
.daily-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; position: relative; z-index: 1; }
.streak { font-weight: 700; color: var(--accent); }

.rank-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rank-row p { margin: 0; }
.rank-name { font-size: 1.7rem; font-weight: 900; letter-spacing: .08em; }
.rank-pts { font-size: 1.5rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.rank-pts small, .score small { font-size: .8rem; margin-left: 2px; color: var(--muted); }
.bar { height: 10px; border-radius: 999px; background: var(--bg2); overflow: hidden; margin: 12px 0 6px; }
.bar span { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--accent2)); transition: width .6s ease; }
.rank-card .muted { margin: 0; }

.section-head h2 { margin: 28px 0 0; font-size: 1.25rem; }
.section-head p { margin: 2px 0 10px; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; line-height: 1.2;
  min-width: 74px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 700;
}
.tab small { font-weight: 500; color: var(--muted); font-size: .72rem; margin-top: 2px; }
.tab.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.tab.on small { color: inherit; opacity: .75; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.tile {
  display: flex; flex-direction: column; text-align: left; padding: 0; overflow: hidden;
  border: 1px solid var(--line); border-radius: 16px; background: var(--card); cursor: pointer;
  box-shadow: var(--shadow); transition: transform .12s ease, box-shadow .2s ease;
}
.tile:hover { transform: translateY(-2px); }
.tile-thumb { display: block; aspect-ratio: 4 / 3; background: var(--paper); border-bottom: 1px solid var(--line); padding: 6px; }
.tile-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.tile-body { display: flex; flex-direction: column; padding: 8px 12px 12px; gap: 1px; }
.tile-no { font-size: .72rem; color: var(--muted); font-weight: 700; }
.tile-title { font-weight: 700; font-size: .95rem; line-height: 1.4; }
.tile-res { font-size: .78rem; color: var(--muted); margin-top: 4px; }
.tile.solved .tile-res { color: var(--ok); font-weight: 700; }

.how h2 { margin-top: 0; }
.how ol { padding-left: 1.3em; margin: 0 0 14px; }
.how li { margin: 4px 0; }
.judge { width: 100%; border-collapse: collapse; font-size: .88rem; margin-bottom: 10px; }
.judge th, .judge td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--line); }
.judge th { color: var(--muted); font-weight: 600; font-size: .78rem; }
.judge td:last-child { font-variant-numeric: tabular-nums; }

.cta { background: linear-gradient(135deg, #1d2433, #2b3550); color: #fff; border: 0; }
.cta h3 { margin: 2px 0 6px; font-size: 1.2rem; }
.cta p { color: #d5dae6; margin: 0 0 14px; font-size: .92rem; }
.cta .cta-eyebrow { color: var(--accent2); font-weight: 700; font-size: .8rem; letter-spacing: .06em; margin: 0; }
.cta-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cta .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .35); }

/* ---------- 対局 ---------- */
.play-head { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px 0 4px; }
.play-head .btn { min-height: 40px; padding: 6px 10px; }
.play-title { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; line-height: 1.35; }
.play-title strong { font-size: 1.05rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.badge.daily { background: var(--ink); color: var(--bg); }
.stars { color: var(--accent); font-size: .78rem; letter-spacing: .08em; }
.timer {
  font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.25rem;
  padding: 4px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line);
}
.prompt { font-weight: 700; font-size: 1.05rem; margin: 6px 0 10px; }

.sheet { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: #1d2433; }
.sheet-tools { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #ece6da; }
.sheet-tools .muted { color: #7a8296; }
.zoom { display: flex; gap: 6px; flex: 0 0 auto; }
.icon-btn {
  min-width: 40px; height: 36px; padding: 0 10px; border-radius: 10px; border: 1px solid #e2ddd2;
  background: #fff; color: #1d2433; font-weight: 700; cursor: pointer;
}
.sheet-view {
  overflow: auto; -webkit-overflow-scrolling: touch; max-height: min(68vh, 640px);
  background-image: linear-gradient(#f1ece1 1px, transparent 1px), linear-gradient(90deg, #f1ece1 1px, transparent 1px);
  background-size: 24px 24px;
}
.sheet-view img { display: block; width: 100%; max-width: none; height: auto; margin: 0 auto; user-select: none; }
.sheet-view img.fit { max-height: min(62vh, 600px); object-fit: contain; }
.sheet-note { margin: 0; padding: 6px 12px; font-size: .75rem; color: #7a8296; border-top: 1px solid #ece6da; }

.answer { margin: 16px 0 8px; }
.answer-box {
  display: flex; align-items: center; background: var(--card); border: 2px solid var(--line);
  border-radius: 16px; padding: 4px 6px 4px 16px; transition: border-color .2s ease, box-shadow .2s ease;
}
.answer-box:focus-within { border-color: var(--accent2); box-shadow: 0 0 0 4px rgba(255, 107, 61, .15); }
.answer-box input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 1.3rem; font-weight: 700; padding: 10px 0; font-variant-numeric: tabular-nums; }
.answer-box input::placeholder { font-weight: 400; font-size: 1rem; color: var(--muted); }
.unit { font-weight: 800; color: var(--muted); padding: 0 10px; }
.preview { min-height: 1.6em; margin: 6px 4px; color: var(--ink2); font-variant-numeric: tabular-nums; }
.preview.warn { color: var(--warn); font-weight: 700; }
.answer-actions { display: flex; justify-content: space-between; gap: 10px; }
.answer-actions .btn.primary { flex: 1; max-width: 280px; }
.hint { background: var(--accent-soft); border-radius: 12px; padding: 10px 14px; margin: 12px 0 0; }

/* ---------- 結果 ---------- */
.result { text-align: center; padding-top: 28px; }
.mark { font-size: 4.2rem; line-height: 1; font-weight: 900; }
.mark.ma { color: var(--ok); }
.mark.mb { color: var(--blue); }
.mark.mc { color: var(--warn); }
.mark.md { color: var(--muted); }
.res-label { margin: 6px 0 0; font-weight: 700; color: var(--ink2); }
.score { font-size: 3rem; font-weight: 900; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin: 4px 0 10px; }
.res-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; text-align: left; }
.res-grid div { background: var(--bg2); border-radius: 12px; padding: 10px 12px; }
.res-grid dt { font-size: .74rem; color: var(--muted); }
.res-grid dd { margin: 0; font-weight: 800; font-size: 1.12rem; font-variant-numeric: tabular-nums; }
.breakdown { margin: 12px 0 0; }
.rank-up { margin: 12px 0 0; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent2), var(--accent)); border-radius: 12px; padding: 10px; }
.share h2, .solution summary { margin: 0 0 10px; font-size: 1.1rem; font-weight: 800; }
.share-text {
  white-space: pre-wrap; word-break: break-all; margin: 0 0 12px; padding: 12px 14px;
  background: var(--bg2); border-radius: 12px; font-family: var(--font); font-size: .95rem; line-height: 1.6;
}
.share-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.share-actions .btn { flex: 1 1 140px; }
.solution summary { cursor: pointer; list-style: none; margin: 0; }
.solution summary::before { content: "▸ "; color: var(--accent); }
.solution[open] summary::before { content: "▾ "; }
.solution ol { padding-left: 1.3em; font-variant-numeric: tabular-nums; }
.sol-fig { margin: 8px 0 0; background: var(--paper); border-radius: 12px; border: 1px solid var(--line); padding: 6px; }
.sol-fig img { width: 100%; display: block; }
.result-actions { display: flex; gap: 10px; justify-content: space-between; margin: 8px 0 0; }
.result-actions .btn { flex: 1; }

.foot { text-align: center; padding: 24px 16px 40px; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }
.foot p { margin: 2px 0; }

@media (max-width: 420px) {
  main { padding: 4px 12px 24px; }
  .card { padding: 16px; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .tile-title { font-size: .86rem; }
  .play-head .btn { padding: 6px 8px; font-size: .9rem; }
  .answer-actions .btn.ghost { padding: 8px 10px; font-size: .88rem; }
  .score { font-size: 2.6rem; }
}

/* ---------- 上の帯の右（効果音・段位） ---------- */
.top-right { display: flex; align-items: center; gap: 8px; }
.snd-btn { width: 36px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: .95rem; line-height: 1; padding: 0; }

/* ---------- 60秒ラッシュの入口 ---------- */
.rush-card { position: relative; overflow: hidden; background: linear-gradient(140deg, #1d2433 0%, #2b3550 70%, #3a2a4a 100%); color: #fff; border: 0; }
.rush-card::after { content: "⚡"; position: absolute; right: 10px; top: -18px; font-size: 7.5rem; opacity: .12; transform: rotate(12deg); pointer-events: none; }
.rush-card h2 { margin: 8px 0 0; font-size: 1.45rem; color: #fff; }
.rush-card .muted { color: #c9cfdd; margin: 4px 0 14px; }
.rush-card .streak { color: #ffc83d; }
.badge.hot { background: #ffc83d; color: #1d2433; }

/* ---------- 60秒ラッシュ ---------- */
.rush-hud { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; padding: 10px 0 2px; }
.rush-hud .btn { min-height: 38px; padding: 4px 12px; }
.rush-time { height: 12px; border-radius: 999px; background: var(--bg2); overflow: hidden; }
.rush-time span { display: block; height: 100%; width: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--ok), #ffc83d); }
.rush-sec { font-weight: 900; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; font-size: 1.15rem; }
.rush-score { font-weight: 900; font-size: 1.25rem; font-variant-numeric: tabular-nums; padding: 2px 12px; border-radius: 12px; background: var(--card); border: 1px solid var(--line); }
.rush-score small { font-size: .72rem; color: var(--muted); margin-left: 2px; }
.rush.hurry .rush-time span { background: linear-gradient(90deg, #e5532d, #ff6b3d); animation: blink .5s ease-in-out infinite alternate; }
.rush.hurry .rush-sec { color: var(--accent); }
.rush-combo { min-height: 1.9em; text-align: center; font-weight: 900; color: var(--accent); font-size: 1.05rem; }
.rush-combo b { display: inline-block; padding: 0 8px; border-radius: 999px; background: var(--accent); color: #fff; }
.rush-combo.hot { font-size: 1.25rem; text-shadow: 0 0 18px rgba(255, 107, 61, .45); }

.rush { overflow-x: clip; }
.rush-stage { position: relative; min-height: 60vh; }
.rq { font-size: 1.15rem; font-weight: 700; margin: 2px 0 8px; text-align: center; }
.rq b { color: var(--accent); }
.rplan, .rside {
  background-color: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow);
  background-image: linear-gradient(rgba(120, 110, 90, .12) 1px, transparent 1px), linear-gradient(90deg, rgba(120, 110, 90, .12) 1px, transparent 1px);
  background-size: 22px 22px;
}
.rplan { padding: 6px; }
.rplan img { display: block; width: 100%; height: min(42vh, 380px); object-fit: contain; }
.rplan.small img { height: min(30vh, 280px); }
.ropts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.ropt, .rrow, .rside { cursor: pointer; font: inherit; color: var(--ink); transition: transform .08s ease, border-color .15s ease; }
.ropt {
  min-height: 62px; border-radius: 14px; border: 2px solid var(--line); background: var(--card);
  font-size: 1.45rem; font-weight: 900; font-variant-numeric: tabular-nums; box-shadow: var(--shadow);
}
.ropt small { font-size: .8rem; color: var(--muted); margin-left: 3px; font-weight: 700; }
.ropt:active, .rrow:active, .rside:active { transform: scale(.97); }
.rpair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rside { position: relative; padding: 6px 6px 34px; border-width: 2px; color: #1d2433; }
.rside img { display: block; width: 100%; height: min(46vh, 360px); object-fit: contain; }
.rtag { position: absolute; left: 8px; top: 6px; width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--bg); font-weight: 900; display: grid; place-items: center; }
.rarea { position: absolute; left: 0; right: 0; bottom: 6px; font-weight: 900; font-variant-numeric: tabular-nums; }
.rrows { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.rrow {
  display: grid; grid-template-columns: 2.2em 1fr auto; align-items: center; gap: 8px; text-align: left;
  min-height: 52px; padding: 8px 12px; border-radius: 12px; border: 2px solid var(--line); background: var(--card);
  font-variant-numeric: tabular-nums; box-shadow: var(--shadow);
}
.rk { font-weight: 900; color: var(--accent); }
.rf { font-weight: 600; }
.rv { font-weight: 900; }
.ropt.good, .rrow.good { border-color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--card)); }
.ropt.bad, .rrow.bad { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 14%, var(--card)); }
.rside.good { border-color: var(--ok); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok) 35%, transparent); }
.rside.bad { border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.rwhy { min-height: 1.6em; margin: 10px 2px 0; font-weight: 700; color: var(--accent); text-align: center; }
.rcount { position: absolute; inset: 0; display: grid; place-items: center; font-size: clamp(4rem, 22vw, 8rem); font-weight: 900; color: var(--accent); animation: countIn .6s ease-out both; }

/* 朱印・浮かぶ点数 */
.rstamp {
  position: absolute; left: 50%; top: 30%; width: 128px; height: 128px; margin: -64px 0 0 -64px; pointer-events: none; z-index: 5;
  display: grid; place-items: center; border-radius: 50%; border: 6px solid #d63a1f; color: #d63a1f;
  font-size: 2.3rem; font-weight: 900; line-height: 1; letter-spacing: .04em; background: rgba(255, 255, 255, .55); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .55), inset 0 0 0 5px #d63a1f;
  animation: stampIn .65s cubic-bezier(.2, 1.6, .4, 1) both;
}
.rfloat {
  position: absolute; left: 50%; top: 18%; transform: translateX(-50%); pointer-events: none; white-space: nowrap; z-index: 6;
  font-size: 1.6rem; font-weight: 900; color: var(--ok); text-shadow: 0 2px 0 var(--card); animation: floatUp .9s ease-out both;
}
.rfloat.big { font-size: 2.1rem; color: var(--accent); }

@keyframes stampIn {
  0% { transform: scale(2.4) rotate(-24deg); opacity: 0; }
  45% { transform: scale(.92) rotate(-10deg); opacity: 1; }
  70% { transform: scale(1.04) rotate(-12deg); opacity: 1; }
  100% { transform: scale(1) rotate(-12deg); opacity: 0; }
}
@keyframes floatUp { from { opacity: 0; transform: translate(-50%, 16px); } 20% { opacity: 1; } to { opacity: 0; transform: translate(-50%, -54px); } }
@keyframes countIn { from { transform: scale(1.8); opacity: 0; } 40% { opacity: 1; } to { transform: scale(1); opacity: 1; } }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }
@keyframes enter { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: none; } }
@keyframes blink { from { opacity: 1; } to { opacity: .55; } }
@keyframes markStamp {
  0% { transform: scale(2.6) rotate(-18deg); opacity: 0; }
  55% { transform: scale(.9) rotate(-6deg); opacity: 1; }
  100% { transform: scale(1) rotate(-8deg); opacity: 1; }
}
.shake { animation: shake .45s ease both; }
.pop { animation: pop .45s ease both; }
.enter { animation: enter .22s ease-out both; }
.mark.stamp { display: inline-block; animation: markStamp .5s cubic-bezier(.2, 1.5, .4, 1) both; }

/* ラッシュの結果 */
.rush-title { margin: 0 0 6px; font-size: 1.25rem; font-weight: 900; color: var(--accent); letter-spacing: .06em; }
.re-dots { margin: 4px 0 12px; font-size: 1.05rem; letter-spacing: .04em; word-break: break-all; }

.confetti { position: fixed; inset: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 60; }

@media (max-width: 420px) {
  .ropt { font-size: 1.25rem; min-height: 56px; }
  .rrow { grid-template-columns: 1.8em 1fr auto; padding: 8px 10px; font-size: .92rem; }
  .rush-hud { gap: 6px; }
}
/* 幅の狭い画面では A・B を縦に並べ、寸法の文字を大きく見せる（面積は右に出す） */
@media (max-width: 560px) {
  .rpair { grid-template-columns: 1fr; gap: 8px; }
  .rside { padding: 4px; display: grid; grid-template-columns: 1fr 5.6em; align-items: center; }
  .rside img { height: min(27vh, 230px); }
  .rarea { position: static; font-size: .95rem; }
}
@media (prefers-reduced-motion: reduce) {
  .shake, .pop, .enter, .mark.stamp, .rcount, .rstamp, .rfloat, .rush.hurry .rush-time span { animation-duration: .01s; animation-iteration-count: 1; }
}
