/* リザルト画面（js/result.js）。ユズリハ案（docs/result/mock.html）をゲームに組み込んだもの。名前はすべて rz- で始める */
#result { padding: 0 !important; overflow: hidden !important; background: var(--cream); color: var(--ink); }
.rz { --rz-en: var(--en); --rz-gray: #8d897f; --rz-ok: #4d6dff; --tile: min(78px, 19.5vw); position: absolute; inset: 0; font-family: var(--heavy); color: var(--ink); overflow: hidden; }
.rz-num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.rz-hide { opacity: 0; }
.rz-intro { position: absolute; inset: 0; background: var(--ink); z-index: 5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; }
.rz-song { font-family: var(--en); font-weight: 400 !important; font-weight: 900; font-size: 12px; letter-spacing: .3em; color: var(--cream); opacity: .55; }
.rz-tiles { display: grid; grid-template-columns: repeat(4, var(--tile)); grid-auto-rows: var(--tile); gap: 6px; }
.rz-tile { position: relative; border-radius: 8px; background: #22222a; overflow: hidden; box-shadow: inset 0 0 0 1px #33333d; }
.rz-tile small { font-family: var(--en); font-weight: 400 !important; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 900; letter-spacing: .08em; color: var(--yellow); opacity: 0; }
.rz-tile.flash { animation: rztflash 260ms ease-out; }
@keyframes rztflash { 0% { background: var(--yellow); } 100% { background: #22222a; } }
.rz-tile.lit small { opacity: .55; transition: opacity 200ms; }
.rz-tile .w { font-family: var(--en-bold); font-weight: 900 !important; position: absolute; top: 0; height: var(--tile); width: calc(var(--tile) * 4 + 18px); display: flex; align-items: center; justify-content: center; font-weight: 900; letter-spacing: -.03em; color: var(--yellow); line-height: 1; clip-path: inset(0 100% 0 0); white-space: nowrap; }
.rz-tile.word { background: #101015; }
.rz-intro.go .rz-tile .w { animation: rzwipeIn 280ms cubic-bezier(.2,.8,.2,1) forwards; }
@keyframes rzwipeIn { to { clip-path: inset(0 0 0 0); } }
.rz-rk { font-family: var(--en-bold); font-weight: 900 !important; font-weight: 900; font-size: 11px; letter-spacing: .2em; color: var(--cream); opacity: 0; }
.rz-skipw { position: absolute; bottom: calc(var(--sb) + 150px); font-size: 11px; font-weight: 900; color: var(--cream); opacity: .4; }
.rz-wipe { position: absolute; top: -10%; bottom: -10%; left: 0; width: 150%; background: var(--yellow); transform: translateX(-160%) skewX(-14deg); z-index: 6; pointer-events: none; }
.rz-wipe.go { animation: rzsweep 420ms cubic-bezier(.6,0,.3,1) forwards; }
@keyframes rzsweep { 0% { transform: translateX(-160%) skewX(-14deg); } 100% { transform: translateX(110%) skewX(-14deg); } }

.rz-res { position: absolute; inset: 0; display: flex; flex-direction: column; padding-top: calc(var(--st) + 56px); overflow-y: auto; }   /* 左上はオイカゼラボの「戻る」の予約 */
.rz-hdr { display: flex; align-items: center; justify-content: space-between; background: var(--ink); color: var(--cream); min-height: 50px; padding: 0 18px; gap: 10px; }
.rz-clrbox { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.1; }
.rz-clrbox small { font-size: 10px; font-weight: 800; opacity: .75; }
.rz-hdr b { font-family: var(--en-bold); font-weight: 900 !important; font-size: min(20px, 5.2vw); letter-spacing: 0; white-space: nowrap; }
.rz-tag { font-size: 12px; font-weight: 900; background: var(--yellow); color: var(--ink); padding: 3px 8px; border-radius: 3px; }
.rz-clr { font-family: var(--en-bold); font-weight: 900 !important; font-size: 18px; letter-spacing: .08em; color: var(--yellow); }
.rz.failed .rz-clr { color: #ff6a4c; }
.rz.failed .rz-tile .w, .rz.failed .rz-tile small { color: #b9b4aa; }
.rz-mbar { margin: 12px 18px 0; background: var(--ink); border-radius: 10px; padding: 8px 10px 7px; }
.rz-rail { font-family: var(--en); font-weight: 400 !important; display: flex; justify-content: space-between; font-size: 9px; font-weight: 900; letter-spacing: .2em; color: var(--cream); opacity: .6; margin-bottom: 5px; }
.rz-cols { display: flex; gap: 2px; height: 30px; align-items: flex-end; }
.rz-col { flex: 1; display: flex; flex-direction: column-reverse; gap: 2px; height: 100%; }
.rz-col i { display: block; height: 6px; border-radius: 1px; background: #2b2b33; }
.rz-col.empty i { height: 2px; }
.rz-col.on i.p { background: var(--yellow); } .rz-col.on i.s { background: var(--rz-ok); } .rz-col.on i.x { background: var(--rz-gray); }
.rz-col.rz-pop { animation: rzcolpop 160ms ease-out; }
@keyframes rzcolpop { 0% { transform: scaleY(1.6); transform-origin: bottom; } 100% { transform: none; } }
.rz-legend { display: flex; gap: 12px; justify-content: flex-end; margin-top: 6px; font-size: 9px; font-weight: 900; color: var(--cream); opacity: .7; }
.rz-legend span::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 1px; margin-right: 4px; vertical-align: -1px; background: var(--c); }
.rz-band { position: relative; margin-top: 12px; background: var(--yellow); padding: 12px 136px 30px 18px; min-height: 150px; }   /* 右はランクの場所（はみ出さないように空けておく） */
.rz-lbl { font-family: var(--en); font-weight: 400 !important; font-size: 11px; font-weight: 900; letter-spacing: .32em; }
.rz-score { font-family: var(--en-bold); font-weight: 900 !important; font-weight: 900; line-height: .9; letter-spacing: -.03em; white-space: nowrap; margin-top: 2px; }
.rz-score .hi { font-size: min(54px, 13.5vw); } .rz-score .lo { font-size: min(34px, 8.5vw); }
.rz-score.bump { animation: rzbump 200ms ease-out; }
@keyframes rzbump { 0% { transform: scale(1.05); transform-origin: left bottom; } 100% { transform: none; } }
.rz-parts { font-family: var(--en); font-weight: 400 !important; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; font-size: 11px; }
.rz-parts span { background: rgba(21,21,28,.1); padding: 2px 7px; border-radius: 3px; }
.rz-parts .rz-bonus { background: var(--ink); color: var(--yellow); }
.rz-parts .rz-hype { background: #ff2f63; color: #fff; }
.rz-bonus.rz-pop, .rz-hype.rz-pop { animation: rzchipPop 220ms cubic-bezier(.2,.9,.3,1.4); }
@keyframes rzchipPop { 0% { transform: scale(1.6); } 100% { transform: none; } }
.rz-rankbox { position: absolute; right: 18px; top: 14px; width: 104px; text-align: center; }
.rz-rank { width: 104px; height: 104px; border-radius: 10px; border: 2px dashed rgba(21,21,28,.35); display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 900; letter-spacing: .3em; color: rgba(21,21,28,.45); }
.rz-rank.on { font-family: var(--en-bold); font-weight: 900 !important; border: 0; background: var(--ink); color: var(--yellow); font-size: 96px; letter-spacing: -.05em; line-height: 1; transform: rotate(-5deg); box-shadow: 5px 5px 0 var(--red); }
.rz-rank.on.r-SS { font-size: 52px; } .rz-rank.on.r-SSS { font-size: 38px; } .rz-rank.on.r-EXC { font-size: 36px; }
.rz-rank.rz-stamp { animation: rzstamp 300ms cubic-bezier(.2,.9,.3,1); }
@keyframes rzstamp { 0% { transform: scale(3) rotate(-14deg); opacity: 0; } 40% { transform: scale(.9) rotate(-5deg); opacity: 1; } 70% { transform: scale(1.04) rotate(-5deg); } 100% { transform: rotate(-5deg); } }
.rz-next { margin-top: 10px; font-size: 10px; font-weight: 900; opacity: 0; line-height: 1.3; }
.rz-next b { display: block; font-family: var(--en-bold); font-weight: 900; }
.rz-next b { font-size: 12px; }
.rz.shake { animation: rzshake 140ms linear; }
@keyframes rzshake { 25% { transform: translate(4px,-3px); } 50% { transform: translate(-4px,2px); } 75% { transform: translate(2px,3px); } }
.rz-flash { position: absolute; inset: 0; background: #fff; opacity: 0; pointer-events: none; z-index: 4; }
.rz-flash.go { animation: rzfl 160ms ease-out; }
@keyframes rzfl { 0% { opacity: .75; } 100% { opacity: 0; } }
.rz-ribbon { position: absolute; right: -8px; bottom: -17px; transform: rotate(-4deg) translateX(120%); background: var(--red); color: #fff; padding: 6px 18px 6px 14px; display: flex; align-items: baseline; gap: 8px; box-shadow: 0 3px 0 rgba(0,0,0,.2); z-index: 2; }
.rz-ribbon.on { transition: transform 260ms cubic-bezier(.2,.9,.3,1.2); transform: rotate(-4deg); }
.rz-ribbon b { font-size: 17px; font-weight: 900; } .rz-ribbon small { font-family: var(--en); font-weight: 400 !important; font-size: 9px; font-weight: 900; letter-spacing: .18em; opacity: .85; } .rz-ribbon .rz-num { font-family: var(--en-bold); font-weight: 900 !important; font-size: 17px; font-weight: 900; }
.rz-judge { display: flex; gap: 12px; margin: 30px 18px 0; }
.rz-rows { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.rz-row { display: grid; grid-template-columns: 96px 1fr 44px; align-items: center; gap: 8px; height: 24px; opacity: 0; transform: translateX(-14px); }
.rz-row.on { opacity: 1; transform: none; transition: opacity 180ms, transform 220ms cubic-bezier(.2,.9,.3,1); }
.rz-row .k { font-family: var(--en); font-weight: 400 !important; font-size: 12px; font-weight: 900; letter-spacing: .06em; display: flex; align-items: center; gap: 4px; }
.rz-row .k svg { width: 14px; height: 14px; flex: none; }
.rz-row .t { height: 6px; border-radius: 3px; background: rgba(21,21,28,.08); overflow: hidden; }
.rz-row .t i { display: block; height: 100%; width: 0; border-radius: 3px; background: var(--c); transition: width 300ms ease-out; }
.rz-row .n { font-family: var(--en-bold); font-weight: 900 !important; font-size: 22px; font-weight: 900; text-align: right; line-height: 1; }
.rz-row.x { color: var(--rz-gray); }
.rz-combo { width: 108px; flex: none; background: var(--ink); color: var(--cream); border-radius: 10px; padding: 10px 10px 8px; display: flex; flex-direction: column; justify-content: space-between; opacity: 0; transform: translateY(10px); }
.rz-combo.on { opacity: 1; transform: none; transition: opacity 180ms, transform 220ms cubic-bezier(.2,.9,.3,1); }
.rz-combo small { font-family: var(--en); font-weight: 400 !important; font-size: 9px; font-weight: 900; letter-spacing: .16em; color: var(--yellow); }
.rz-combo b { font-family: var(--en-bold); font-weight: 900 !important; font-size: 52px; font-weight: 900; line-height: 1; letter-spacing: -.03em; }
.rz-combo span { font-size: 11px; font-weight: 900; opacity: .55; }
/* もう一回！は最初から押せる（演出中もパネルの上に出しておく） */
.rz-menu { position: relative; z-index: 8; margin-top: auto; padding: 18px 18px calc(var(--sb) + 14px); display: flex; flex-direction: column; align-items: center; gap: 8px; }   /* 演出中もパネルの上に出す（もう一回！は最初から押せる） */
.rz-big { font-family: var(--heavy); font-weight: 900; border: 0; cursor: pointer; font-size: 26px; width: 260px; height: 62px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.25), 0 0 0 2px rgba(255,255,255,.25); }
.rz-big:active { transform: translateY(3px); box-shadow: 0 3px 0 rgba(0,0,0,.25); }
.rz-small { font-family: var(--heavy); font-weight: 900; border: 0; cursor: pointer; font-size: 15px; min-height: 44px; padding: 10px 20px; border-radius: 999px; background: rgba(21,21,28,.08); color: var(--ink); }
.rz.dark .rz-small { color: var(--cream); background: rgba(255,255,255,.12); } .rz.dark .rz-note { color: var(--cream); }
.rz-note { font-size: 11px; opacity: .5; margin: 0; }
@media (prefers-reduced-motion: reduce) { .rz * { animation: none !important; transition: none !important; } }
@media (max-height: 760px) { .rz-res { padding-top: calc(var(--st) + 50px); } .rz-mbar { margin-top: 8px; } .rz-band { margin-top: 8px; min-height: 136px; } .rz-judge { margin-top: 24px; } .rz-row { height: 21px; } .rz-row .n { font-size: 19px; } .rz-combo b { font-size: 44px; } .rz-big { height: 54px; font-size: 22px; } .rz-small { min-height: 40px; padding: 8px 18px; } }
/* 覚えた言葉（府県ごと。v0.43.0）：RETRY・TITLE の下（RETRY の位置は前と同じ。下へなぞると見える）。押せた言葉は赤・青、押せなかった言葉は灰 */
.rz-learn { position: relative; z-index: 8; margin: 0 18px calc(var(--sb) + 18px); background: rgba(6,20,31,.55); box-shadow: inset 0 0 0 1px rgba(230,246,255,.14); border-radius: 12px; padding: 8px 12px 6px; }
.rz-lhd { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 4px; }
.rz-lhd b { font-size: 12px; font-weight: 900; letter-spacing: .12em; }
.rz-lhd span { font-family: var(--en-bold); font-weight: 900; font-size: 13px; }
.rz-lrow { display: grid; grid-template-columns: 4.6em 1fr; gap: 6px; align-items: baseline; padding: 3px 0; border-top: 1px solid rgba(230,246,255,.1); }
.rz-lrow .p { font-size: 11px; font-weight: 900; white-space: nowrap; opacity: .85; }
.rz-lrow .ws { display: flex; flex-wrap: wrap; gap: 2px 8px; min-width: 0; }
.rz-lrow .lw { font-size: 13px; font-weight: 900; line-height: 1.5; overflow-wrap: anywhere; }
.rz-lrow .lw.r { color: #ff8a7a; } .rz-lrow .lw.b { color: #9cc0ff; }
.rz-lrow .lw.ng { color: var(--rz-gray); }
.rz-lrow rt { font-size: 7px; font-weight: 800; opacity: .75; }

/* オイカゼラボ公開先：共通部品が「ラボへ戻る」を出している間（html[data-oikaze-lab-return="visible"]）、左上 104×56 を空ける（v0.52.0）。
   タイトルの文字・ボタンは左上に無い（BEST は右上）ので、結果の上の余白だけ部品の高さ（--oikaze-lab-ui-top）より小さくならないようにする */
html[data-oikaze-lab-return="visible"] .rz-res { padding-top: max(calc(var(--st) + 56px), var(--oikaze-lab-ui-top, 0px)); }
html[data-oikaze-lab-return="visible"] #title .t-best { top: max(calc(var(--st) + 16px), calc(var(--oikaze-lab-ui-top, 0px) - 40px)); }
@media (max-height: 760px) { html[data-oikaze-lab-return="visible"] .rz-res { padding-top: max(calc(var(--st) + 56px), var(--oikaze-lab-ui-top, 0px)); } }

/* iPad 縦（v0.58.1、11/11 塾長「iPhone と同じように大きく」）：縦向き・幅700px以上・高さ900px以上のときだけ、結果画面全体を iPhone（390×844）の形のまま拡大する。
   倍率 --rz-zoom ＝ min(幅/390, 高さ/844)（main.js が入れる）。中央の空きが無くなり、RETRY・覚えた言葉の位置は iPhone と同じ並び。iPhone 縦・iPad 横・パソコンは今と同じ（1 倍） */
@media (orientation: portrait) and (min-width: 700px) and (min-height: 900px) {
  #result .rz { zoom: var(--rz-zoom, 1); }
}
