/* 発音ラッシュ（Web）。始める前・結果は明るいパーク、遊ぶ間は暗いステージ（アプリの発音ラッシュと同じ世界観） */
:root {
  --pr-navy: #0f1630;
  --pr-navy2: #1a2450;
  --pr-ink: #1f2a37;
  --pr-sub: #5b6676;
  --pr-line: #e3e8ef;
  --pr-bg: #eef4fa;
  --pr-orange: #ff8a1f;
  --pr-orange-d: #d96a00;
  --pr-teal: #33e0c8;
  --pr-perfect: #ffc83d;
  --pr-great: #3fe0b0;
  --pr-good: #7ab8ff;
  --pr-miss: #ff5c8a;
  --pr-font: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", Meiryo, sans-serif;
  --pr-word: "Avenir Next", "Segoe UI", system-ui, -apple-system, "Hiragino Sans", "Noto Sans JP", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body.pr { margin: 0; background: var(--pr-bg); color: var(--pr-ink); font-family: var(--pr-font); line-height: 1.6; }
html.pr-playing, html.pr-playing body { overflow: hidden; overscroll-behavior: none; }
[hidden] { display: none !important; }
button { font-family: inherit; }
kbd { display: inline-block; min-width: 1.6em; padding: 1px 6px; border: 1px solid #c9d2de; border-bottom-width: 2px; border-radius: 6px; background: #fff; font: 700 12px/1.4 var(--pr-font); color: var(--pr-ink); text-align: center; }
.pr-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
:focus-visible { outline: 3px solid #ffb400; outline-offset: 2px; }

/* ================= ボタン ================= */
.pr-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 18px; border: 0; border-radius: 14px; cursor: pointer;
  font: 800 16px/1.3 var(--pr-font); text-decoration: none; transition: transform .08s, filter .15s;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.pr-btn:active { transform: translateY(2px); }
.pr-btn:hover { filter: brightness(1.05); }
.pr-btn--start { background: var(--pr-orange); color: #fff; box-shadow: 0 4px 0 var(--pr-orange-d); }
.pr-btn--start:disabled { background: #c9d2de; box-shadow: 0 4px 0 #aab4c2; cursor: default; filter: none; transform: none; }
.pr-btn--sub { background: #fff; color: var(--pr-ink); border: 2px solid var(--pr-line); }
.pr-btn--next { background: var(--pr-navy); color: #fff; box-shadow: 0 4px 0 #050914; }
.pr-btn--back { background: #fff; color: var(--pr-ink); border: 2px solid var(--pr-line); }
.pr-btn--app { justify-content: flex-start; background: #3fa9f5; color: #fff; box-shadow: 0 4px 0 #1f86d1; text-align: left; }
.pr-btn--app img { border-radius: 9px; flex: none; }
.pr-btn--app span { display: flex; flex-direction: column; }
.pr-btn--app small { font-size: 12px; font-weight: 600; opacity: .9; }

/* ================= 始める前 ================= */
.pr-pre, .pr-res { max-width: 1120px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-left)) 48px max(16px, env(safe-area-inset-right)); }
.pr-hero {
  position: relative; display: flex; align-items: center; gap: 16px; padding: 22px 20px; margin-bottom: 16px; overflow: hidden;
  border-radius: 20px; color: #fff;
  background:
    radial-gradient(120% 140% at 85% -20%, rgba(51, 224, 200, .45), transparent 55%),
    radial-gradient(90% 120% at 10% 120%, rgba(255, 138, 31, .35), transparent 60%),
    var(--pr-navy);
}
.pr-hero::after { /* 音の波（ステージの床の光） */
  content: ""; position: absolute; right: -10px; bottom: 0; width: 55%; height: 60%; opacity: .35; pointer-events: none;
  background: repeating-linear-gradient(90deg, var(--pr-teal) 0 4px, transparent 4px 12px);
  -webkit-mask: linear-gradient(to top, #000, transparent); mask: linear-gradient(to top, #000, transparent);
  clip-path: polygon(0 70%, 8% 40%, 16% 75%, 24% 20%, 32% 60%, 40% 35%, 48% 80%, 56% 10%, 64% 55%, 72% 30%, 80% 70%, 88% 45%, 100% 65%, 100% 100%, 0 100%);
}
.pr-hero__icon { width: 88px; height: 88px; border-radius: 20px; flex: none; position: relative; z-index: 1; box-shadow: 0 0 0 3px rgba(255,255,255,.15); }
.pr-hero__text { position: relative; z-index: 1; min-width: 0; }
.pr-hero__h { margin: 0; font-size: clamp(26px, 6vw, 36px); font-weight: 900; letter-spacing: .02em; line-height: 1.15; }
.pr-hero__catch { margin: 4px 0 0; font-size: clamp(16px, 3.6vw, 20px); font-weight: 800; color: var(--pr-teal); }
.pr-hero__sub { margin: 2px 0 0; font-size: 14px; opacity: .85; }

.pr-pre__grid { display: grid; gap: 16px; }
.pr-pre__main { display: grid; gap: 16px; align-content: start; min-width: 0; }
@media (min-width: 900px) { .pr-pre__grid { grid-template-columns: minmax(0, 1fr) 360px; align-items: start; } .pr-words { position: sticky; top: 68px; max-height: calc(100vh - 84px); overflow: auto; } }

.pr-card { background: #fff; border-radius: 18px; padding: 18px; box-shadow: 0 1px 0 var(--pr-line), 0 6px 20px rgba(15, 22, 48, .05); min-width: 0; }
.pr-h2 { margin: 0 0 12px; font-size: 17px; font-weight: 800; }
.pr-h2 span { font-size: 13px; font-weight: 700; color: var(--pr-sub); margin-left: 4px; }

.pr-course { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pr-course__name { flex: 1; min-width: 140px; display: flex; flex-direction: column; line-height: 1.3; text-align: center; }
.pr-course__name b { font-size: 18px; }
.pr-course__name span { font-size: 13px; color: var(--pr-sub); font-weight: 700; }
.pr-course__step { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; background: var(--pr-bg); color: var(--pr-ink); font-size: 26px; font-weight: 700; text-decoration: none; line-height: 1; }
.pr-course__step.is-off { opacity: .3; pointer-events: none; }
.pr-course__change { flex-basis: 100%; display: flex; align-items: center; justify-content: center; min-height: 44px; text-align: center; font-size: 13px; color: #1f86d1; font-weight: 700; }
.pr-record { display: flex; justify-content: center; align-items: center; gap: 12px; margin-top: 10px; font-size: 14px; color: var(--pr-sub); }
.pr-record b { color: var(--pr-ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.pr-stars i { font-style: normal; color: #d5dbe3; font-size: 20px; letter-spacing: 2px; }
.pr-stars i.is-on { color: var(--pr-perfect); text-shadow: 0 1px 0 #c98f00; }

.pr-start { margin-top: 16px; text-align: center; }
.pr-btn--start#btnStart { width: 100%; min-height: 64px; font-size: 22px; letter-spacing: .1em; }
.pr-start__note { margin: 8px 0 0; font-size: 13px; color: var(--pr-sub); }
.pr-warn { margin: 12px 0 0; padding: 12px 14px; border-radius: 12px; background: #fff1f4; color: #b0254d; font-size: 14px; font-weight: 600; }

.pr-ng { margin-top: 16px; padding: 16px; border-radius: 14px; background: #fff7ed; border: 2px solid #ffd2a6; }
.pr-ng__h { margin: 0 0 6px; font-size: 17px; color: #9a3d00; }
.pr-ng p { margin: 0 0 10px; font-size: 14px; }
.pr-ng__steps { margin: 0 0 12px; padding-left: 1.4em; font-size: 14px; font-weight: 600; }
.pr-ng .pr-btn { width: 100%; margin-top: 8px; }

.pr-opts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--pr-line); }
.pr-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--pr-bg); }
.pr-seg button { min-height: 44px; padding: 4px 12px; border: 0; border-radius: 9px; background: transparent; color: var(--pr-sub); font-size: 14px; font-weight: 700; cursor: pointer; }
.pr-seg button.is-on { background: #fff; color: var(--pr-ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pr-check { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; cursor: pointer; min-height: 44px; padding: 0 4px; }
.pr-snd { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; margin-top: 12px; padding: 0 16px; border: 2px solid var(--pr-line); border-radius: 12px; background: #fff; color: var(--pr-sub); font-size: 14px; font-weight: 700; cursor: pointer; }
.pr-snd[aria-pressed="false"] { color: #9aa3b5; }
.pr-snd[hidden] { display: none; }
/* 上のバーのコース名のリンク: 字は小さいまま、押せる範囲をバーのタイトル全体（高さ 44px）に広げる */
.pr .mtp-bar__title { position: relative; }
.pr #barCourse a { text-decoration: none; }
.pr #barCourse a::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 44px; transform: translateY(-50%); }
.pr-check.is-off { opacity: .45; cursor: default; }
.pr-check input { width: 18px; height: 18px; accent-color: var(--pr-orange); }
.pr-keys { margin: 12px 0 0; font-size: 13px; color: var(--pr-sub); text-align: center; }

/* 遊べる端末 */
.pr-dev__now { margin: 0 0 12px; font-size: 14px; }
.pr-dev__yes { color: #13865f; font-weight: 800; }
.pr-dev__no { color: #c2264f; font-weight: 800; }
.pr-dev__maybe { color: #9a6a00; font-weight: 700; font-size: 13px; }
.pr-dev__cols { display: grid; gap: 12px; }
@media (min-width: 560px) { .pr-dev__cols { grid-template-columns: 1fr 1fr; } }
.pr-dev__col { border-radius: 14px; padding: 12px 14px; }
.pr-dev__col--ok { background: #ecfbf5; }
.pr-dev__col--ng { background: #fff1f4; }
.pr-dev__col h3 { margin: 0 0 6px; font-size: 15px; }
.pr-dev__col--ok h3 { color: #13865f; }
.pr-dev__col--ng h3 { color: #c2264f; }
.pr-dev__col ul { margin: 0; padding: 0; list-style: none; }
.pr-dev__col li { position: relative; padding: 5px 0 5px 24px; font-size: 14px; font-weight: 600; line-height: 1.4; border-radius: 8px; }
.pr-dev__col li::before { position: absolute; left: 2px; top: 5px; font-weight: 900; }
.pr-dev__col--ok li::before { content: "○"; color: #13865f; }
.pr-dev__col--ok li.is-unsure::before { content: "△"; color: #b07d00; }
.pr-dev__col--ng li::before { content: "×"; color: #c2264f; }
.pr-dev__col li small { display: block; font-size: 12px; font-weight: 500; color: var(--pr-sub); }
.pr-dev__col li.is-now { background: rgba(255, 255, 255, .85); box-shadow: inset 3px 0 0 currentColor; padding-left: 28px; }
.pr-dev__col li.is-now::before { left: 8px; }
.pr-dev__foot { margin: 10px 0 0; font-size: 12px; color: var(--pr-sub); }

/* 遊び方（アプリの写真は相手の席が写る上の部分を切って、札の所だけ見せる） */
.pr-how__steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
@media (min-width: 640px) { .pr-how__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pr-how__steps li { display: flex; gap: 12px; align-items: flex-start; }
.pr-how__steps figure { margin: 0; flex: none; width: 96px; aspect-ratio: 300 / 330; overflow: hidden; border-radius: 12px; background: var(--pr-navy); }
.pr-how__steps figure img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; }
.pr-how__steps b { display: block; font-size: 15px; line-height: 1.4; }
.pr-how__steps p { margin: 4px 0 0; font-size: 13px; color: var(--pr-sub); }
.pr-how__noimg > div { padding: 12px 14px; border-radius: 12px; background: var(--pr-bg); width: 100%; }
.pr-keylist { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 14px 0 0; font-size: 14px; align-items: center; }
.pr-keylist dt { text-align: right; }
.pr-keylist dd { margin: 0; }

/* 単語一覧 */
.pr-wlist { margin: 0; padding: 0; list-style: none; }
.pr-wlist li { display: grid; grid-template-columns: 40px minmax(0, 1fr); grid-template-rows: auto auto; column-gap: 8px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--pr-line); }
.pr-wlist li:last-child { border-bottom: 0; }
.pr-wlist .pr-say { grid-row: 1 / 3; }
.pr-wlist__t { font: 800 17px/1.3 var(--pr-word); overflow-wrap: anywhere; }
.pr-wlist__ja { font-size: 13px; color: var(--pr-sub); line-height: 1.35; overflow-wrap: anywhere; }
.pr-wlist__loading { display: block !important; color: var(--pr-sub); font-size: 14px; border: 0 !important; }
.pr-say { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 0; border-radius: 12px; background: #e6f3fe; color: #1f86d1; cursor: pointer; flex: none; }
.pr-say svg { width: 22px; height: 22px; fill: currentColor; }
.pr-say.is-on { background: #3fa9f5; color: #fff; }

/* ================= 遊んでいる間（暗いステージ） ================= */
.pr-game {
  position: fixed; inset: 0; z-index: 60; display: flex; justify-content: center; gap: 24px;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  color: #fff; background: var(--pr-navy); overflow: hidden; touch-action: manipulation; overscroll-behavior: none; user-select: none; -webkit-user-select: none;
}
.pr-game__bg { position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(60% 45% at 50% 0%, rgba(51, 224, 200, .22), transparent 70%),
    radial-gradient(40% 35% at 15% 100%, rgba(122, 184, 255, .18), transparent 70%),
    radial-gradient(40% 35% at 85% 100%, rgba(255, 92, 138, .14), transparent 70%);
  transition: filter .4s; }
.pr-game.is-fever .pr-game__bg { animation: pr-fever 1.2s linear infinite; }
@keyframes pr-fever { 0% { filter: hue-rotate(0deg) brightness(1.3); } 100% { filter: hue-rotate(360deg) brightness(1.3); } }

.pr-stage { position: relative; z-index: 1; display: flex; flex-direction: column; width: 100%; max-width: 480px; min-height: 0; }
.pr-side { position: relative; z-index: 1; display: none; width: 220px; flex: none; padding-top: 70px; color: rgba(255,255,255,.85); }
@media (min-width: 1000px) { .pr-side { display: block; } }
.pr-side h3 { margin: 0 0 8px; font-size: 13px; font-weight: 800; color: rgba(255,255,255,.55); letter-spacing: .05em; }
.pr-side .pr-keylist { margin: 0 0 22px; color: #fff; }
.pr-side kbd { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.pr-mults { margin: 0 0 22px; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pr-mults li { padding: 6px 10px; border-radius: 10px; background: rgba(255,255,255,.06); font-size: 13px; font-variant-numeric: tabular-nums; }
.pr-mults b { margin-right: 6px; color: var(--pr-teal); }
.pr-hist { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.pr-hist li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 10px; border-radius: 10px; background: rgba(255,255,255,.06); font: 700 15px/1.3 var(--pr-word); animation: pr-slide .25s ease-out; }
.pr-hist li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes pr-slide { from { transform: translateX(-12px); opacity: 0; } }

/* 上の帯 */
.pr-hud { position: relative; display: flex; align-items: center; gap: 12px; height: 56px; flex: none; }
.pr-time { position: relative; width: 48px; height: 48px; flex: none; display: grid; place-items: center; font: 900 18px/1 var(--pr-font); font-variant-numeric: tabular-nums; }
.pr-time svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.pr-time circle { fill: rgba(255,255,255,.08); stroke: rgba(255,255,255,.15); stroke-width: 4; }
.pr-time .pr-time__arc { fill: none; stroke: var(--pr-teal); stroke-linecap: round; transition: stroke .3s; }
.pr-time.is-low .pr-time__arc { stroke: var(--pr-miss); }
.pr-time.is-low span { color: var(--pr-miss); animation: pr-beat 1s infinite; }
@keyframes pr-beat { 50% { transform: scale(1.15); } }
.pr-score { flex: 1; min-width: 0; }
.pr-score__n { font: 900 26px/1.1 var(--pr-font); font-variant-numeric: tabular-nums; }
.pr-score__n.is-pop { animation: pr-pop .25s ease-out; }
.pr-prog { position: relative; height: 6px; margin-top: 5px; border-radius: 3px; background: rgba(255,255,255,.12); }
.pr-prog i { position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 3px; background: linear-gradient(90deg, var(--pr-teal), var(--pr-perfect)); transition: width .3s; }
.pr-prog b { position: absolute; top: -2px; width: 2px; height: 10px; background: rgba(255,255,255,.5); }
.pr-prog em { position: absolute; top: -5px; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-top-color: #fff; }
.pr-pause { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 12px; background: rgba(255,255,255,.12); cursor: pointer; }
.pr-pause i { width: 5px; height: 16px; border-radius: 2px; background: #fff; }
.pr-late { position: absolute; right: 56px; top: 50px; padding: 4px 10px; border-radius: 10px; background: rgba(0,0,0,.55); font-size: 13px; white-space: nowrap; animation: pr-late 1.3s ease-out forwards; }
.pr-late b { margin-left: 6px; }
.pr-late.is-perfect b { color: var(--pr-perfect); } .pr-late.is-great b { color: var(--pr-great); } .pr-late.is-good b { color: var(--pr-good); }
@keyframes pr-late { 0% { opacity: 0; transform: translateY(6px); } 15%, 75% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }

/* 単語の札（ステージのスポットライト） */
.pr-cardwrap { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 6px 0; }
.pr-wcard {
  position: relative; width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center;
  padding: 12px 12px 14px; border-radius: 22px; background: linear-gradient(180deg, #202c5e, #151e44);
  box-shadow: 0 0 0 2px rgba(51, 224, 200, .55), 0 0 28px rgba(51, 224, 200, .25), 0 18px 40px rgba(0,0,0,.35);
}
.pr-wcard.is-in { animation: pr-in .22s cubic-bezier(.2, 1.2, .4, 1); }
.pr-wcard.is-hit { box-shadow: 0 0 0 3px var(--pr-great), 0 0 46px rgba(63, 224, 176, .6), 0 18px 40px rgba(0,0,0,.35); }
.pr-wcard.is-out { animation: pr-out .2s ease-in forwards; }
.pr-wcard.is-skip { animation: pr-skip .25s ease-in forwards; }
.pr-wcard.is-shake { animation: pr-shake .35s; box-shadow: 0 0 0 2px var(--pr-miss), 0 0 30px rgba(255, 92, 138, .35), 0 18px 40px rgba(0,0,0,.35); }
.pr-wcard.is-teach { box-shadow: 0 0 0 2px var(--pr-perfect), 0 0 30px rgba(255, 200, 61, .35), 0 18px 40px rgba(0,0,0,.35); }
@keyframes pr-in { from { transform: scale(.94); opacity: 0; } }
@keyframes pr-out { to { transform: translateX(40%) rotate(6deg); opacity: 0; } }
@keyframes pr-skip { to { transform: translateY(30px); opacity: 0; filter: grayscale(1); } }
@keyframes pr-shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
@keyframes pr-pop { 50% { transform: scale(1.12); } }

.pr-pic { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 40vh; border-radius: 14px; overflow: hidden; background: #fff; }
.pr-pic.is-noimg { aspect-ratio: auto; height: 0; max-height: none; }
.pr-pic.is-noimg:has(.pr-coach:not([hidden])) { height: auto; min-height: 150px; }
.pr-pic > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.pr-coach { position: absolute; inset: 0; display: flex; gap: 10px; align-items: center; padding: 10px; background: #fff; color: var(--pr-ink); }
.pr-pic.is-noimg .pr-coach { position: relative; }
.pr-coach.is-in { animation: pr-flip .3s ease-out; }
@keyframes pr-flip { from { transform: rotateY(90deg); } }
.pr-coach__mouth { margin: 0; flex: 0 0 42%; max-width: 160px; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #eaf7f5; }
.pr-coach__mouth img { display: block; width: 100%; height: 100%; }
.pr-coach__text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.pr-coach__tag { align-self: flex-start; padding: 1px 8px; border-radius: 8px; background: #e3f6f2; color: #0e7f6d; font-size: 11px; font-weight: 800; }
.pr-coach__tag.is-hard { background: #ffe3ea; color: #e2456b; }
.pr-coach__head { font-size: clamp(14px, 4vw, 18px); line-height: 1.3; }
.pr-coach__body { margin: 0; font-size: clamp(12px, 3.3vw, 14px); line-height: 1.45; color: #3c4757; }

.pr-judge { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; pointer-events: none; opacity: 0; }
.pr-judge b { display: block; font: 900 italic clamp(34px, 10vw, 52px)/1 var(--pr-word); letter-spacing: .02em; -webkit-text-stroke: 2px rgba(15, 22, 48, .85); paint-order: stroke fill; }
.pr-judge span { display: inline-block; margin-top: 4px; padding: 1px 10px; border-radius: 10px; background: rgba(15, 22, 48, .8); font: 800 16px/1.4 var(--pr-font); color: #fff; }
.pr-judge.is-show { animation: pr-judge .7s ease-out forwards; }
.pr-judge.is-perfect b { color: var(--pr-perfect); } .pr-judge.is-great b { color: var(--pr-great); } .pr-judge.is-good b { color: var(--pr-good); } .pr-judge.is-miss b { color: var(--pr-miss); }
@keyframes pr-judge { 0% { opacity: 0; transform: translateY(-50%) scale(1.6); } 20% { opacity: 1; transform: translateY(-50%) scale(1); } 75% { opacity: 1; } 100% { opacity: 0; transform: translateY(-70%); } }

.pr-word { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; margin-top: 12px; min-height: 52px; }
.pr-word__t { min-width: 0; font: 800 clamp(34px, 10vw, 48px)/1.1 var(--pr-word); text-align: center; overflow-wrap: anywhere; color: #fff; text-shadow: 0 0 18px rgba(51, 224, 200, .45); }
.pr-word__t.is-long { font-size: clamp(26px, 7.5vw, 36px); }
.pr-word__t.is-xlong { font-size: clamp(20px, 5.6vw, 28px); }
.pr-word__t mark { background: none; color: var(--pr-miss); text-decoration: underline 3px; text-underline-offset: 4px; }
.pr-listen { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; cursor: pointer; }
.pr-listen svg { width: 22px; height: 22px; fill: currentColor; }
.pr-listen.is-on { background: var(--pr-teal); color: var(--pr-navy); }
.pr-ja { margin-top: 4px; font-size: clamp(15px, 4.2vw, 19px); font-weight: 700; color: rgba(255,255,255,.8); text-align: center; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pr-ja.is-long { font-size: clamp(13px, 3.6vw, 16px); }
.pr-ja:empty { display: none; }

/* 聞こえた・マイク */
.pr-heard { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 34px; flex: none; }
.pr-heard__t { font-size: 15px; font-weight: 700; color: rgba(255,255,255,.75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 80%; }
.pr-heard__t.is-bad { color: #ffb3c7; }
.pr-mic { display: inline-flex; align-items: center; gap: 3px; height: 22px; flex: none; }
.pr-mic i { display: block; width: 4px; height: 22px; border-radius: 2px; background: var(--pr-teal); transform: scaleY(.25); transition: transform .06s; }
.pr-mic[data-state="prep"] i, .pr-mic[data-state="wait"] i { background: rgba(255,255,255,.35); }
.pr-mic.is-pulse[data-state="on"] i { animation: pr-eq 1s ease-in-out infinite; }
.pr-mic.is-pulse[data-state="on"] i:nth-child(2) { animation-delay: .15s; } .pr-mic.is-pulse[data-state="on"] i:nth-child(3) { animation-delay: .3s; } .pr-mic.is-pulse[data-state="on"] i:nth-child(4) { animation-delay: .45s; }
@keyframes pr-eq { 50% { transform: scaleY(.7); } }

.pr-combo { position: absolute; left: 0; top: 64px; display: flex; align-items: baseline; gap: 4px; opacity: 0; pointer-events: none; z-index: 2; }
.pr-combo.is-on { opacity: 1; }
.pr-combo b { font: 900 italic 30px/1 var(--pr-word); }
.pr-combo span { font-size: 12px; font-weight: 800; }
.pr-combo.c-green b { color: var(--pr-great); } .pr-combo.c-blue b { color: var(--pr-good); } .pr-combo.c-pink b { color: #ff8fb0; }
.pr-combo.c-rainbow b { background: linear-gradient(90deg, #ffc83d, #ff5c8a, #7ab8ff, #3fe0b0); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pr-combo.is-pop { animation: pr-pop .25s; }
.pr-stamp { position: absolute; left: 50%; top: 38%; z-index: 3; transform: translate(-50%, -50%); padding: 6px 18px; border-radius: 14px; background: #fff; color: var(--pr-navy); font: 900 clamp(22px, 7vw, 32px)/1.2 var(--pr-font); white-space: nowrap; opacity: 0; pointer-events: none; box-shadow: 0 6px 0 var(--pr-orange); }
.pr-stamp.is-show { animation: pr-stamp 1s ease-out forwards; }
.pr-stamp.is-fix { background: var(--pr-great); }
.pr-stamp.is-again { background: var(--pr-perfect); }
@keyframes pr-stamp { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.4) rotate(-8deg); } 18% { opacity: 1; transform: translate(-50%, -50%) scale(1.08) rotate(-4deg); } 30% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -64%) rotate(-4deg); } }

.pr-ctrl { display: flex; gap: 10px; flex: none; padding-top: 6px; }
.pr-btn--pass { flex: 1; min-height: 54px; background: rgba(255,255,255,.12); color: #fff; font-size: 18px; border: 2px solid rgba(255,255,255,.2); }
.pr-kbd { display: none; padding: 0 6px; border-radius: 6px; border: 1px solid rgba(255,255,255,.35); font-size: 12px; font-weight: 700; }
@media (hover: hover) and (pointer: fine) { .pr-kbd { display: inline-block; } }

.pr-count { position: absolute; inset: 0; z-index: 70; display: none; align-items: center; justify-content: center; background: rgba(5, 9, 20, .55); font: 900 clamp(72px, 24vw, 140px)/1 var(--pr-word); color: #fff; text-shadow: 0 0 30px rgba(51, 224, 200, .8); pointer-events: none; }
.pr-count.is-show { display: flex; }
.pr-count.is-go { font-size: clamp(40px, 12vw, 72px); font-family: var(--pr-font); color: var(--pr-perfect); }
.pr-count.is-anim { animation: pr-count .9s ease-out; }
@keyframes pr-count { 0% { transform: scale(1.8); opacity: 0; } 25% { transform: scale(1); opacity: 1; } }

.pr-pop { position: absolute; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(5, 9, 20, .7); }
.pr-pop__card { width: min(400px, 100%); padding: 22px 20px 18px; border-radius: 20px; background: #fff; color: var(--pr-ink); text-align: center; animation: pr-in .2s; }
.pr-pop__card h2 { margin: 0 0 8px; font-size: 20px; }
.pr-pop__card p { margin: 0 0 8px; font-size: 15px; }
.pr-pop__small { font-size: 13px !important; color: var(--pr-sub); }
.pr-pop__btns { display: flex; gap: 10px; margin-top: 14px; }
.pr-pop__btns .pr-btn { flex: 1; }

/* 横向きのスマホ（高さが足りない）: 絵を左、単語を右に並べる */
@media (max-height: 520px) and (orientation: landscape) {
  .pr-stage { max-width: 760px; }
  .pr-hud { height: 46px; }
  .pr-time { width: 40px; height: 40px; font-size: 15px; }
  .pr-score__n { font-size: 22px; }
  .pr-cardwrap { padding: 4px 0; }
  .pr-wcard { height: 100%; display: grid; grid-template-columns: 46% minmax(0, 1fr); grid-template-rows: 1fr auto; column-gap: 14px; align-items: center; padding: 10px; }
  .pr-pic { grid-row: 1 / 3; height: 100%; max-height: none; aspect-ratio: auto; }
  .pr-pic.is-noimg { height: 0; }
  .pr-word { margin: 0; align-self: end; min-height: 0; }
  .pr-word__t { font-size: 32px; }
  .pr-word__t.is-long { font-size: 24px; } .pr-word__t.is-xlong { font-size: 19px; }
  .pr-ja { align-self: start; grid-column: 2; }
  .pr-combo { top: auto; bottom: 58px; }
  .pr-btn--pass { min-height: 42px; }
  .pr-heard { min-height: 26px; }
  .pr-coach__mouth { max-width: 110px; }
}

/* ================= 結果 ================= */
.pr-res { max-width: 760px; display: grid; gap: 16px; }
.pr-res__top { text-align: center; padding-top: 22px; background: radial-gradient(120% 90% at 50% 0%, rgba(51, 224, 200, .18), transparent 60%), #fff; }
.pr-res__course { margin: 0; font-size: 14px; color: var(--pr-sub); font-weight: 700; }
.pr-res__stars i { font-style: normal; font-size: 40px; color: #d5dbe3; margin: 0 4px; }
.pr-res__stars i.is-on { color: var(--pr-perfect); text-shadow: 0 2px 0 #c98f00; animation: pr-pop .4s; }
.pr-res__score span { font: 900 clamp(48px, 14vw, 72px)/1 var(--pr-font); font-variant-numeric: tabular-nums; }
.pr-res__score small { margin-left: 4px; font-size: 18px; font-weight: 800; }
.pr-res__best { margin: 6px 0 0; font-size: 15px; color: var(--pr-sub); font-weight: 700; }
.pr-new { display: inline-block; padding: 3px 12px; border-radius: 10px; background: var(--pr-orange); color: #fff; font-weight: 900; animation: pr-pop .5s .3s both; }
.pr-res__rank { display: inline-flex; align-items: center; gap: 10px; margin-top: 12px; padding: 6px 16px 6px 6px; border-radius: 14px; background: var(--pr-navy); color: #fff; }
.pr-res__rank b { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--pr-teal); color: var(--pr-navy); font: 900 24px/1 var(--pr-word); }
.pr-res__rank[data-rank="S"] b { background: var(--pr-perfect); }
.pr-res__rank span { font-weight: 800; }
.pr-res__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 18px 0 0; }
.pr-res__stats div { padding: 8px 4px; border-radius: 12px; background: var(--pr-bg); }
.pr-res__stats dt { font-size: 12px; color: var(--pr-sub); font-weight: 700; }
.pr-res__stats dd { margin: 0; font: 900 20px/1.2 var(--pr-font); font-variant-numeric: tabular-nums; }
.pr-res__btns { display: grid; gap: 10px; margin-top: 18px; }
@media (min-width: 560px) { .pr-res__btns { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.pr-res__none { margin: 0; color: var(--pr-sub); }
.pr-h3 { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 6px; font-size: 16px; }
.pr-h3:first-child { margin-top: 0; }
.pr-h3 small { font-size: 13px; color: var(--pr-sub); }
.pr-h3.is-fix { color: #0e8f6f; } .pr-h3.is-weak { color: #c2264f; }
.pr-rl { margin: 0; padding: 0; list-style: none; }
.pr-rl li { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--pr-line); }
.pr-rl li:last-child { border-bottom: 0; }
.pr-rl__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pr-rl__t { font: 800 17px/1.3 var(--pr-word); overflow-wrap: anywhere; }
.pr-rl__ja { font-size: 13px; color: var(--pr-sub); overflow-wrap: anywhere; }
.pr-rl__heard { font-size: 13px; color: #c2264f; font-weight: 600; overflow-wrap: anywhere; }
.pr-rl__tip { margin-top: 2px; font-size: 12px; color: #3c4757; background: #f3f7fb; border-radius: 8px; padding: 4px 8px; }
.pr-grade { flex: none; padding: 2px 8px; border-radius: 8px; font: 900 11px/1.6 var(--pr-word); letter-spacing: .03em; background: #e9edf2; color: var(--pr-sub); }
.pr-grade--perfect { background: #fff3cf; color: #a86d00; } .pr-grade--great { background: #dcf8ef; color: #0e7f63; } .pr-grade--good { background: #e2efff; color: #2165b5; } .pr-grade--skip { background: #ffe3ea; color: #c2264f; }
.pr-side .pr-grade { background: rgba(255,255,255,.1); }
.pr-side .pr-grade--perfect { color: var(--pr-perfect); } .pr-side .pr-grade--great { color: var(--pr-great); } .pr-side .pr-grade--good { color: var(--pr-good); } .pr-side .pr-grade--skip { color: var(--pr-miss); }
.pr-app { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 16px; background: #fff; border: 2px solid var(--pr-line); color: var(--pr-ink); text-decoration: none; }
.pr-app img { border-radius: 10px; flex: none; }
.pr-app span { display: flex; flex-direction: column; line-height: 1.35; }
.pr-app b { font-size: 15px; } .pr-app small { font-size: 12px; color: var(--pr-sub); }
.pr-noscript { padding: 16px; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  .pr-wcard.is-shake, .pr-wcard.is-in, .pr-wcard.is-out, .pr-wcard.is-skip, .pr-coach.is-in, .pr-count.is-anim, .pr-score__n.is-pop, .pr-combo.is-pop, .pr-time.is-low span { animation: none !important; }
  .pr-game.is-fever .pr-game__bg { animation: none; filter: brightness(1.2); }
  .pr-wcard.is-out, .pr-wcard.is-skip { opacity: 0; }
}
