/* 焼いてパンケーキ style.css — 構造は docs/design.md */
:root {
  --c-ink: #3b2f2f; --c-ink-sub: #7a675c; --c-paper: #fffdf7; --c-cream: #fff3d8; --c-line: #e6d6bd;
  --c-red: #e8413b; --c-red-deep: #b8302c; --c-pink: #f27d8c; --c-pink-deep: #c9566a;
  --c-gold: #ffc83d; --c-gold-deep: #d99a00; --c-mint: #8fd9c3; --c-mint-deep: #4fa892;
  --c-maple: #d27a22; --c-maple-deep: #9a4e12; --c-golden: #eaa346; --c-burnt: #5a2e15;
  --c-blue: #4a5fc4; --c-blue-deep: #2c3a86;
  --c-bg-out: #f6a9b4; --c-bg-out-2: #fbc0c8;
  --font-base: "Hiragino Maru Gothic ProN", "Hiragino Maru Gothic Pro", "BIZ UDPGothic", "Hiragino Sans", "Yu Gothic UI", "Meiryo", system-ui, sans-serif;
  --font-num: "Arial Rounded MT Bold", "Hiragino Maru Gothic ProN", "SF Pro Rounded", ui-rounded, system-ui, sans-serif;
  --radius-s: 10px; --radius-m: 18px; --radius-l: 28px; --btn-depth: 6px; --dur-mid: .25s;
  --safe-top: env(safe-area-inset-top, 0px); --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px); --safe-left: env(safe-area-inset-left, 0px);
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden; overscroll-behavior: none; touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent;
  font-family: var(--font-base); color: var(--c-ink); background: var(--c-bg-out);
}
button { font: inherit; color: inherit; touch-action: manipulation; }
[hidden] { display: none !important; }

/* ---------- 土台（PC はいちごミルクのしま模様の中央に縦長） ---------- */
.app {
  position: fixed; inset: 0; overflow: hidden;
  background: repeating-linear-gradient(90deg, var(--c-bg-out) 0 36px, var(--c-bg-out-2) 36px 72px);
}
.stage {
  position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%);
  width: min(100%, 62vh); width: min(100%, 62dvh); overflow: hidden;
  background: linear-gradient(#fff4e2 0 30%, #cdeee2 30% 60%, #e0a868 60% 100%);
}
@media (max-width: 480px) { .stage { width: 100%; } }
@media (min-width: 481px) { .stage { border-left: 4px solid var(--c-ink); border-right: 4px solid var(--c-ink); } }

.screen {
  position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-top)) calc(16px + var(--safe-right)) calc(16px + var(--safe-bottom)) calc(16px + var(--safe-left));
  overflow-y: auto; touch-action: pan-y;
}
.screen.is-active { display: flex; animation: screen-in var(--dur-mid) ease both; }
@keyframes screen-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.bg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; pointer-events: none; }

.card {
  background: var(--c-paper); border: 4px solid var(--c-ink); border-radius: var(--radius-l);
  box-shadow: 0 8px 0 var(--c-ink); padding: 20px 22px;
}

/* ---------- ボタン（押すと沈む） ---------- */
.btn {
  --btn-bg: var(--c-pink); --btn-edge: var(--c-pink-deep); --btn-fg: #fff;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 56px; padding: 12px 28px; margin-bottom: var(--btn-depth);
  border: 3px solid var(--c-ink); border-radius: 999px; background: var(--btn-bg); color: var(--btn-fg);
  font-size: 20px; font-weight: 800; letter-spacing: .04em; cursor: pointer; white-space: nowrap;
  box-shadow: 0 var(--btn-depth) 0 var(--btn-edge), 0 var(--btn-depth) 0 3px var(--c-ink);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
}
.btn::after { content: ""; position: absolute; top: 5px; left: 18%; right: 18%; height: 6px; border-radius: 999px; background: rgba(255,255,255,.35); pointer-events: none; }
.btn:hover { filter: brightness(1.05); }
.btn:active, .btn.is-pressed { transform: translateY(var(--btn-depth)); box-shadow: 0 0 0 var(--btn-edge), 0 0 0 3px var(--c-ink); }
.btn:disabled { filter: grayscale(.8) opacity(.6); cursor: not-allowed; }
.btn--block { display: flex; width: 100%; }
.btn--maple { --btn-bg: var(--c-maple); --btn-edge: var(--c-maple-deep); }
.btn--mint { --btn-bg: var(--c-mint); --btn-edge: var(--c-mint-deep); --btn-fg: var(--c-ink); }
.btn--gold { --btn-bg: var(--c-gold); --btn-edge: var(--c-gold-deep); --btn-fg: var(--c-ink); }
.btn--ghost { --btn-bg: var(--c-paper); --btn-edge: var(--c-line); --btn-fg: var(--c-ink); }
.btn--small { min-height: 40px; padding: 6px 16px; font-size: 15px; --btn-depth: 4px; }

.icon-btn {
  position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 3px solid var(--c-ink); border-radius: 50%; background: var(--c-paper);
  font-size: 20px; font-weight: 900; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 0 var(--c-ink); transition: transform .08s ease, box-shadow .08s ease;
}
.icon-btn:active { transform: translateY(4px); box-shadow: 0 0 0 var(--c-ink); }
.icon-btn--pause::before { content: ""; width: 12px; height: 14px; border-left: 4px solid var(--c-ink); border-right: 4px solid var(--c-ink); }
.icon-btn--sound::before { content: "♪"; }
.icon-btn--sound.is-off { opacity: .55; }
.icon-btn--sound.is-off::after { content: ""; position: absolute; width: 26px; height: 3px; background: var(--c-red); transform: rotate(-45deg); border-radius: 2px; }
.icon-btn--help::before { content: "?"; }
.btn:focus-visible, .icon-btn:focus-visible, a:focus-visible { outline: 4px solid var(--c-gold); outline-offset: 4px; }

/* ---------- タイトル ---------- */
.screen--title { gap: 12px; text-align: center; justify-content: safe center; }
.screen > a.back-to-games {
  position: absolute; top: calc(12px + var(--safe-top)); left: calc(12px + var(--safe-left)); z-index: 6;
  display: inline-flex; align-items: center; padding: 6px 12px 7px; font: 800 13px/1 var(--font-base); color: var(--c-ink); text-decoration: none;
  background: var(--c-paper); border: 3px solid var(--c-ink); border-radius: 999px; box-shadow: 0 3px 0 var(--c-ink);
}
.screen > a.back-to-games:active { transform: translateY(3px); box-shadow: none; }
.screen--title:has(> a.back-to-games:not([hidden])) { padding-top: calc(52px + var(--safe-top)); }
.screen--title > :not(.bg-canvas) { position: relative; z-index: 1; }
.logo { margin: 0; line-height: 1.05; }
.logo__sub { display: inline-block; padding: 4px 16px; margin-bottom: 8px; border: 3px solid var(--c-ink); border-radius: 999px; background: var(--c-paper); font-size: 15px; font-weight: 800; box-shadow: 0 3px 0 var(--c-ink); }
.logo__main {
  display: block; font-size: clamp(40px, 12.5vw, 68px); font-weight: 900; letter-spacing: .02em; white-space: nowrap; color: #fff;
  -webkit-text-stroke: 10px var(--c-ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--c-ink);
}
.logo__main + .logo__main { margin-top: -2px; }
.logo__main .is-maple { color: var(--c-maple); }
.logo__main .is-golden { color: var(--c-golden); }
.logo__main .is-pink { color: var(--c-pink); }
.logo__main .is-cream { color: #fff6d6; }
.title-art { width: min(280px, 78%, 32vh); aspect-ratio: 1; flex: 0 1 auto; min-height: 110px; animation: bob 2.4s ease-in-out infinite; }
.title-art canvas { width: 100%; height: 100%; display: block; }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
.title-best { display: inline-flex; gap: 8px; align-items: baseline; padding: 4px 16px; border: 3px solid var(--c-ink); border-radius: 999px; background: var(--c-cream); font-weight: 800; font-size: 14px; }
.title-best b { font: 900 22px var(--font-num); color: var(--c-maple); }
.title-actions { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.title-actions > .btn { min-width: 220px; font-size: 24px; }
.title-sub { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: center; }

/* ---------- モーダル（ルール・ポーズ） ---------- */
.modal {
  position: absolute; inset: 0; z-index: 30; display: none; align-items: center; justify-content: center;
  padding: calc(16px + var(--safe-top)) 16px calc(16px + var(--safe-bottom)); background: rgba(80, 40, 30, .5);
}
.modal.is-open { display: flex; animation: screen-in var(--dur-mid) ease both; }
.modal > .card { max-height: 100%; overflow-y: auto; touch-action: pan-y; }
.rules { width: min(400px, 100%); text-align: center; }
.rules__title, .sheet__title { margin: 0 0 12px; font-size: 22px; font-weight: 900; }
.rules__list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 10px; counter-reset: step; }
.rules__item {
  position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 10px; align-items: center; padding: 8px 10px 8px 14px;
  background: var(--c-cream); border: 3px solid var(--c-ink); border-radius: var(--radius-m); text-align: left;
}
.rules__item::before {
  counter-increment: step; content: counter(step); position: absolute; left: -10px; top: -10px; width: 26px; height: 26px; display: grid; place-items: center;
  border: 3px solid var(--c-ink); border-radius: 50%; background: var(--c-pink); color: #fff; font: 900 14px var(--font-num);
}
.rules__item canvas { width: 76px; height: 60px; display: block; }
.rules__item p { margin: 0; font-size: 14px; font-weight: 800; line-height: 1.5; word-break: auto-phrase; }
.rules__item b { color: var(--c-pink-deep); }
.rules__bake { display: flex; height: 14px; margin: 4px 0 0; border: 2.5px solid var(--c-ink); border-radius: 999px; overflow: hidden; }
.rules__bake i { flex: 1; } .rules__bake i:nth-child(1) { background: #fbf1d6; } .rules__bake i:nth-child(2) { background: var(--c-golden); flex: 1.2; } .rules__bake i:nth-child(3) { background: var(--c-burnt); }
.pause { width: min(320px, 100%); display: grid; gap: 10px; text-align: center; }

/* ---------- プレイ ---------- */
.screen--play { padding: 0; overflow: hidden; touch-action: none; }
.play-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; }
.hud {
  position: absolute; left: 0; right: 0; top: 0; z-index: 5; display: flex; align-items: center; gap: 6px;
  padding: calc(8px + var(--safe-top)) calc(8px + var(--safe-right)) 0 calc(8px + var(--safe-left)); pointer-events: none;
}
.hud > button { pointer-events: auto; flex: none; width: 40px; height: 40px; }
.hud__chip {
  display: inline-flex; align-items: center; gap: 4px; min-height: 38px; padding: 4px 12px; min-width: 0;
  border: 3px solid var(--c-ink); border-radius: 999px; background: var(--c-paper); box-shadow: 0 3px 0 var(--c-ink);
  font: 900 17px var(--font-num); white-space: nowrap;
}
.hud__chip small { font: 800 11px var(--font-base); color: var(--c-ink-sub); }
.hud__plate b { font-size: 20px; color: var(--c-pink-deep); }
.hud__plate .hud__plates { display: inline-flex; gap: 3px; margin-left: 4px; }
.hud__plates i { width: 12px; height: 6px; border-radius: 50%; background: var(--c-line); box-shadow: inset 0 0 0 1.5px var(--c-ink); }
.hud__plates i.is-done { background: var(--c-golden); }
.hud__plates i.is-now { background: #fff; box-shadow: inset 0 0 0 2px var(--c-pink-deep); }
.hud__score { margin-left: auto; }
.hud__score.is-up { animation: bump .35s ease; }
@keyframes bump { 40% { transform: scale(1.18); background: var(--c-gold); } }

/* ターン名＋残り投数（HUD の下の帯）。data-kind で色が変わる */
.turnbar {
  --tb: var(--c-golden);
  position: absolute; left: 50%; top: calc(56px + var(--safe-top)); z-index: 5; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; max-width: calc(100% - 16px); padding: 3px 6px 3px 12px;
  border: 3px solid var(--c-ink); border-radius: 999px; background: var(--c-paper); box-shadow: 0 3px 0 var(--c-ink);
  white-space: nowrap; pointer-events: none;
}
.turnbar[data-kind="fruit"] { --tb: var(--c-pink); }
.turnbar[data-kind="topping"] { --tb: var(--c-maple); }
.turnbar__name { font-size: 14px; font-weight: 900; }
.turnbar__name::before { content: ""; display: inline-block; width: 10px; height: 10px; margin-right: 6px; border-radius: 50%; background: var(--tb); box-shadow: 0 0 0 2px var(--c-ink); vertical-align: 1px; }
.throws { display: inline-flex; gap: 3px; padding: 3px 6px; border-radius: 999px; background: var(--c-cream); }
.throw { width: 16px; height: 16px; display: block; border-radius: 50%; background: var(--tb); box-shadow: inset 0 0 0 2px var(--c-ink); }
.turnbar[data-kind="pancake"] .throw { width: 20px; height: 10px; margin: 3px 0; border-radius: 50% / 50%; background: linear-gradient(var(--c-golden) 0 45%, #f8e2ad 45%); }
.turnbar[data-kind="topping"] .throw { border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; }
.turnbar[data-kind="topping"] .throw--cream { background: #fffefa; }
.throw.is-used { background: var(--c-line); opacity: .45; }
.throw.is-now { animation: nudge 1s ease-in-out infinite; }

/* 焼き加減メーター（パンケーキの番、鉄板の横）。style="--bake:.55" と .is-good / .is-burnt */
.bake-meter {
  position: absolute; right: calc(12px + var(--safe-right)); bottom: calc(16% + var(--safe-bottom)); z-index: 5;
  width: 22px; height: 120px; border: 3px solid var(--c-ink); border-radius: 999px; pointer-events: none; overflow: hidden;
  background: linear-gradient(to top, #fbf1d6 0 45%, var(--c-golden) 45% 72%, var(--c-burnt) 72% 100%); box-shadow: 0 3px 0 var(--c-ink);
}
.bake-meter::after {
  content: ""; position: absolute; left: -2px; right: -2px; height: 5px; bottom: calc(var(--bake, 0) * 100% - 2px);
  background: #fff; box-shadow: 0 0 0 2px var(--c-ink);
}
.bake-meter.is-good { animation: glow .6s ease-in-out infinite alternate; }
@keyframes glow { to { box-shadow: 0 3px 0 var(--c-ink), 0 0 0 5px rgba(255,200,61,.8); } }
.bake-meter.is-burnt { animation: shake .12s linear infinite; }
@keyframes shake { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }

/* つぎのフルーツ（フルーツの番、右下） */
.next {
  position: absolute; right: calc(10px + var(--safe-right)); bottom: calc(14px + var(--safe-bottom)); z-index: 5;
  display: flex; flex-direction: column; align-items: center; gap: 4px; pointer-events: none;
}
.next__label { padding: 1px 10px; border: 2.5px solid var(--c-ink); border-radius: 999px; background: var(--c-gold); font-size: 12px; font-weight: 900; }
.next__item { width: 48px; height: 48px; border: 3px solid var(--c-ink); border-radius: 50%; background: var(--c-paper); box-shadow: 0 3px 0 var(--c-ink); display: grid; place-items: center; }
.next__item canvas { width: 80% !important; height: 80% !important; display: block; }
.next__item.is-in { animation: slide-in .3s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes slide-in { from { transform: translateY(14px) scale(.6); opacity: 0; } }
.item-name {
  position: absolute; left: 50%; bottom: calc(10px + var(--safe-bottom)); z-index: 5; transform: translateX(-50%);
  padding: 3px 12px; border: 2.5px solid var(--c-ink); border-radius: 999px; background: var(--c-paper);
  font-size: 13px; font-weight: 900; white-space: nowrap; pointer-events: none;
}

/* ターン開始バナー（中央を横切るリボン）。data-kind で色 */
.turn-banner { position: absolute; left: 0; right: 0; top: 50%; z-index: 10; display: none; justify-content: center; pointer-events: none; transform: translateY(-50%); }
.turn-banner.is-open { display: flex; }
.turn-banner__box {
  --tb: var(--c-golden);
  position: relative; width: 100%; padding: 10px 16px 12px; text-align: center; background: var(--tb);
  border-top: 4px solid var(--c-ink); border-bottom: 4px solid var(--c-ink);
  background-image: repeating-linear-gradient(-45deg, rgba(255,255,255,.18) 0 14px, transparent 14px 28px);
  animation: banner 1.4s cubic-bezier(.2, 1.1, .3, 1) both;
}
.turn-banner[data-kind="fruit"] .turn-banner__box { --tb: var(--c-pink); }
.turn-banner[data-kind="topping"] .turn-banner__box { --tb: var(--c-maple); }
.turn-banner__plate { display: inline-block; padding: 2px 12px; border: 3px solid var(--c-ink); border-radius: 999px; background: var(--c-paper); font-size: 13px; font-weight: 900; }
.turn-banner__name { display: block; margin: 2px 0; font-size: clamp(30px, 10vw, 46px); font-weight: 900; color: #fff; -webkit-text-stroke: 8px var(--c-ink); paint-order: stroke fill; white-space: nowrap; }
.turn-banner__sub { font-size: 14px; font-weight: 900; color: var(--c-ink); }
@keyframes banner {
  0% { transform: translateX(-100%); opacity: 1; } 18%, 78% { transform: none; opacity: 1; } 100% { transform: translateX(100%); opacity: 0; }
}

/* 初回ヒント */
.hint {
  position: absolute; left: 50%; bottom: 30%; z-index: 6; transform: translateX(-50%); max-width: 90%; width: max-content;
  padding: 6px 14px; border: 3px solid var(--c-ink); border-radius: 16px; background: var(--c-paper); box-shadow: 0 3px 0 var(--c-ink);
  font-size: 14px; font-weight: 800; line-height: 1.35; text-align: center; pointer-events: none; word-break: auto-phrase;
  animation: hint-float 1.6s ease-in-out infinite;
}
.hint b { color: var(--c-pink-deep); }
.hint::after {
  content: ""; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; margin-left: -6px;
  background: var(--c-paper); border-right: 3px solid var(--c-ink); border-bottom: 3px solid var(--c-ink); transform: rotate(45deg);
}
@keyframes hint-float { 50% { transform: translate(-50%, -5px); } }

/* 一言（焼き加減◎ / ぽとっ / くずれた！）。JS が left/top を指定してもよい（既定は中央やや上） */
.callout {
  position: absolute; left: 50%; top: 30%; z-index: 9; transform: translate(-50%, -50%); text-align: center; line-height: 1.2;
  font-size: clamp(26px, 8vw, 40px); font-weight: 900; color: var(--c-gold); white-space: nowrap; pointer-events: none;
  -webkit-text-stroke: 8px var(--c-ink); paint-order: stroke fill; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both;
}
.callout small { display: block; font-size: .5em; -webkit-text-stroke-width: 6px; color: #fff; }
.callout.is-good { color: var(--c-golden); }
.callout.is-bad { color: #d6dde6; }
.callout.is-burnt { color: #8a5a3a; }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.3); } to { transform: translate(-50%, -50%) scale(1); } }

/* 採点ポップ（皿ごと、カシャッ→写真カード） */
.photo-pop { position: absolute; inset: 0; z-index: 12; display: none; align-items: center; justify-content: center; padding: 16px; pointer-events: none; }
.photo-pop.is-open { display: flex; }
.photo-pop::before { content: ""; position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash .45s ease-out both; }
@keyframes flash { 0% { opacity: .95; } 100% { opacity: 0; } }
.photo {
  position: relative; width: min(260px, 76%); padding: 10px 10px 12px; background: #fff; border: 4px solid var(--c-ink); border-radius: 8px;
  box-shadow: 0 8px 0 var(--c-ink); text-align: center; transform: rotate(-3deg); animation: photo-in .5s .15s cubic-bezier(.2, 1.5, .4, 1) both;
}
.photo::before { /* マスキングテープ */
  content: ""; position: absolute; left: 50%; top: -14px; width: 74px; height: 22px; margin-left: -37px; transform: rotate(4deg);
  background: rgba(143,217,195,.85); border: 2px solid rgba(59,47,47,.35);
}
@keyframes photo-in { from { transform: translateY(40px) rotate(8deg) scale(.6); opacity: 0; } }
.photo__img { aspect-ratio: 4 / 3; border: 3px solid var(--c-ink); border-radius: 4px; background: #fff4e2; overflow: hidden; }
.photo__img canvas { width: 100%; height: 100%; display: block; }
.photo__label { margin: 8px 0 0; font-size: 12px; font-weight: 800; color: var(--c-ink-sub); }
.photo__title { margin: 0; font-size: 20px; font-weight: 900; line-height: 1.25; word-break: auto-phrase; }
.photo__calc { display: flex; justify-content: center; align-items: baseline; gap: 6px; margin-top: 4px; font-size: 12px; font-weight: 800; color: var(--c-ink-sub); }
.photo__calc b { font: 900 16px var(--font-num); color: var(--c-ink); }
.photo__pts { font: 900 34px/1.1 var(--font-num); color: var(--c-pink); -webkit-text-stroke: 6px var(--c-ink); paint-order: stroke fill; }
.photo__pts small { font-size: .5em; }

/* ---------- 結果シート（3皿の完成品が主役） ---------- */
.result-sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20; max-height: 88%; overflow-y: auto; touch-action: pan-y;
  padding: 12px calc(12px + var(--safe-right)) calc(12px + var(--safe-bottom)) calc(12px + var(--safe-left));
  background: var(--c-paper); border-top: 4px solid var(--c-ink); border-radius: var(--radius-l) var(--radius-l) 0 0;
  box-shadow: 0 -6px 0 rgba(59,47,47,.25); text-align: center; animation: sheet-up .4s cubic-bezier(.2, 1.2, .4, 1) both;
}
@keyframes sheet-up { from { transform: translateY(100%); } }
.result-sheet::before { content: ""; display: block; width: 48px; height: 5px; margin: -4px auto 8px; border-radius: 3px; background: var(--c-line); }
.result { width: min(440px, 100%); margin: 0 auto; display: grid; gap: 8px; }
.result__plates {
  position: relative; aspect-ratio: 3 / 1.45; border: 4px solid var(--c-ink); border-radius: var(--radius-m); overflow: hidden;
  background: linear-gradient(#cdeee2 0 62%, #e0a868 62%);
}
.result__plates canvas { width: 100%; height: 100%; display: block; }
.result__cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: -2px; }
.result__col { padding: 3px 2px; border: 2.5px solid var(--c-ink); border-radius: var(--radius-s); background: var(--c-cream); min-width: 0; }
.result__col b { display: block; font: 900 18px/1.1 var(--font-num); }
.result__col small { display: block; font-size: 10.5px; font-weight: 800; color: var(--c-ink-sub); line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result__col.is-best { background: #fff1b8; }
.result__head { display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap; }
.result__title { margin: 0; font-size: 18px; font-weight: 900; line-height: 1.25; word-break: auto-phrase; }
.result__title small { display: block; font-size: 11px; font-weight: 800; color: var(--c-ink-sub); }
.result__score { font: 900 40px/1 var(--font-num); color: var(--c-pink); -webkit-text-stroke: 7px var(--c-ink); paint-order: stroke fill; }
.result__score small { font: 800 15px var(--font-base); color: var(--c-ink); -webkit-text-stroke: 0; margin-left: 2px; }
.result__stars { display: flex; gap: 4px; }
.star { width: 28px; height: 28px; background: var(--c-line); clip-path: polygon(50% 0, 63% 35%, 100% 38%, 71% 61%, 81% 100%, 50% 78%, 19% 100%, 29% 61%, 0 38%, 37% 35%); position: relative; }
.star.is-on { background: var(--c-ink); animation: star-in .45s cubic-bezier(.2, 1.8, .4, 1) both; }
.star.is-on::after { content: ""; position: absolute; inset: 4px; background: var(--c-gold); clip-path: inherit; }
.star.is-on:nth-child(2) { animation-delay: .15s; }
.star.is-on:nth-child(3) { animation-delay: .3s; }
@keyframes star-in { from { transform: scale(0) rotate(-90deg); } }
.result__meta { display: flex; justify-content: center; gap: 6px 12px; flex-wrap: wrap; font-size: 13px; font-weight: 800; color: var(--c-ink-sub); }
.result__meta b { font-family: var(--font-num); color: var(--c-ink); }
.result__new { display: inline-block; padding: 1px 10px; border: 2.5px solid var(--c-ink); border-radius: 999px; background: var(--c-gold); color: var(--c-ink); animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 50% { transform: scale(1.1); } }
.result__near { margin: 0; padding: 6px 10px; border-radius: var(--radius-s); background: #ffe6ea; font-size: 13px; font-weight: 800; line-height: 1.5; word-break: auto-phrase; }
.result__near b { color: var(--c-pink-deep); }
.result-actions { width: min(440px, 100%); margin: 10px auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: 6px 10px; }
.result-actions .btn--main { grid-column: 1 / -1; }
.result-actions .btn { padding-left: 12px; padding-right: 12px; }
@media (max-height: 700px) {
  .result { gap: 6px; } .result__plates { aspect-ratio: 3 / 1.2; }
  .result__score { font-size: 32px; } .result__title { font-size: 16px; } .star { width: 22px; height: 22px; }
  .result__col b { font-size: 15px; } .result__near { font-size: 12px; padding: 4px 8px; }
  .result-actions .btn { min-height: 40px; font-size: 15px; } .result-actions .btn--main { min-height: 48px; font-size: 19px; }
}
@media (max-width: 360px) { .result-actions .btn { font-size: 14px; } }

/* ---------- 横向き案内・トースト ---------- */
.rotate { position: fixed; inset: 0; z-index: 100; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: var(--c-pink-deep); color: #fff; font-size: 20px; font-weight: 900; text-align: center; padding: 16px; }
.rotate__phone { width: 48px; height: 82px; border: 5px solid #fff; border-radius: 12px; animation: tilt 1.8s ease-in-out infinite; }
@keyframes tilt { 0%, 20% { transform: rotate(90deg); } 60%, 100% { transform: rotate(0); } }
@media (orientation: landscape) and (max-height: 500px) { .rotate { display: flex; } }
.toast {
  position: absolute; left: 50%; bottom: calc(24px + var(--safe-bottom)); z-index: 60; transform: translateX(-50%);
  max-width: 94%; width: max-content; padding: 10px 18px; border: 3px solid #fff; border-radius: 22px; background: var(--c-ink); color: #fff;
  font-weight: 800; text-align: center; word-break: auto-phrase; pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .title-art, .hint, .throw.is-now, .bake-meter { animation: none !important; }
  .turn-banner__box { animation: none !important; }
  .photo, .photo-pop::before { animation: none !important; }
  .photo-pop::before { opacity: 0; }
}
