/* v0.5 experience: effect icons, journey log, stamps and the cinematic player. */
.effects{position:absolute;left:3%;top:calc(3.2% + clamp(34px,4.6vw,56px));z-index:4;pointer-events:none;display:flex;flex-direction:column;align-items:flex-start;gap:5px}
.effect{display:flex;align-items:center;gap:4px;padding:3px 9px 3px 4px;border-radius:20px;background:#06202eda;border:1px solid #c6ead36b;color:#d1ffee;font:800 13px/1 Consolas,ui-monospace,monospace;font-variant-numeric:tabular-nums}.effect img{width:22px;height:22px;object-fit:contain;filter:drop-shadow(0 0 5px #9effe0aa)}.effect.boost{border-color:#eac57f80;color:#ffe1a4}.effect.boost img{filter:drop-shadow(0 0 5px #ffd88caa)}
.panel-links{display:flex;flex-wrap:wrap;justify-content:center;gap:2px 14px;margin-top:12px}.panel-links .secondary{margin:0}
.finale-go{display:block;margin:12px auto 0}
.record-note{font-size:11px!important;line-height:1.6!important;color:#f3dfb5!important;margin:-12px 0 16px!important}.record-note.warn{color:#ffb9a8!important}
.stamp{position:relative;display:inline-grid;place-items:center;margin:2px auto 8px;padding:6px 18px;border:3px double #ffcf7d;border-radius:10px;color:#ffe2a6;font-weight:900;letter-spacing:4px;font-size:15px;transform:rotate(-6deg);text-shadow:0 0 12px #ffb54a88;box-shadow:inset 0 0 18px #ffb54a33,0 0 24px #ffb54a33}
.stamp.pop{animation:stamp-pop .7s cubic-bezier(.2,1.6,.4,1) both}.stamp.all{border-color:#9ff0da;color:#c9fff0;text-shadow:0 0 12px #7fe8cc88}
@keyframes stamp-pop{0%{opacity:0;transform:rotate(-18deg) scale(2.2)}60%{opacity:1}100%{opacity:1;transform:rotate(-6deg) scale(1)}}
.finale .panel{background:linear-gradient(150deg,#153a4ef2,#0b1f31f2);border-color:#ffd88a66}.finale .stamp{font-size:19px;padding:8px 22px}
/* Journey log */
.record-dialog{width:min(1080px,95vw);max-height:92svh;color:#fff1d7;background:#0f2533;border:1px solid #7c9ca65c;border-radius:18px;padding:24px 26px;box-shadow:0 30px 100px #000b;overscroll-behavior:contain}.record-dialog::backdrop{background:#04101de6;backdrop-filter:blur(7px)}
.record-dialog.finale-mode{border-color:#ffd88a88;background:radial-gradient(ellipse at 50% 0%,#244a5c,#0f2533 60%)}
.record-summary{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:12px;margin-bottom:12px}
.log-box{position:relative;padding:12px 14px;border-radius:12px;background:#0a1d29;border:1px solid #cfe0e41f}.log-box small{display:block;font-size:10px;letter-spacing:2px;color:#c7a979}.log-box strong{display:block;margin:6px 0 4px;font:800 26px/1 Consolas,ui-monospace,monospace;color:#ffe0a0}.log-box strong em{font-size:14px;font-style:normal;color:#b9ccd4;margin-left:2px}.log-box p{margin:0;font-size:11px;color:#bcd0d6;line-height:1.5}
.log-box.total strong{font-size:38px}.meter{display:block;height:6px;border-radius:4px;background:#ffffff14;overflow:hidden;margin-top:7px}.meter i{display:block;height:100%;border-radius:4px;background:linear-gradient(90deg,#ffcf7d,#ffe8b5)}.meter.coins i{background:linear-gradient(90deg,#7fe8cc,#d8fff3)}
.log-titles{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;font-size:11px;color:#b9ccd4}.title-chip{padding:4px 10px;border-radius:20px;border:1px solid #ffd88a88;color:#ffe3a8;background:#2a2412;font-weight:800;letter-spacing:1px}.title-chip.coins{border-color:#8ff0d788;color:#c9fff0;background:#0f2a24}.title-chip.none{border-style:dashed;border-color:#cfe0e440;color:#9fb4bd;background:none;font-weight:400}
.record-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.log-card{position:relative;display:flex;flex-direction:column;min-height:168px;overflow:hidden;border-radius:12px;border:1px solid #d7c69540;background:#0a202d;isolation:isolate}
.log-card>img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;z-index:-2;filter:saturate(.95)}.log-card:after{content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(180deg,#06131d33 0%,#06131dd9 52%,#06131df2 100%)}
.log-card.cleared{border-color:#ffd69180}.log-card.all-coins{border-color:#8ff0d7aa}
.log-copy{display:flex;flex-direction:column;gap:4px;padding:11px 12px 0;flex:1}.log-number{font:10px Consolas,monospace;color:#e9d7ae;letter-spacing:1px}.log-copy strong{font-size:16px;letter-spacing:1px;text-shadow:0 2px 8px #000}
.log-state{font-size:10px;color:#cfe0e4}.log-state b{color:#ffe0a0;font-weight:800}.log-state .fresh{color:#9ff0da}
.log-coins{display:flex;justify-content:space-between;font:10px Consolas,monospace;color:#d8f5ec;margin-top:2px}
.log-stamps{position:absolute;top:9px;right:9px;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.log-stamp{padding:3px 8px;border:2px solid #ffcf7d;border-radius:6px;font-size:10px;font-weight:900;letter-spacing:2px;color:#ffe2a6;background:#1a140acc;transform:rotate(-7deg)}.log-stamp.all{border-color:#9ff0da;color:#c9fff0;background:#0a1a16cc}.log-stamp.new{animation:stamp-pop .8s cubic-bezier(.2,1.6,.4,1) .15s both}
.log-retry{margin:9px 12px 12px;min-height:40px;border-radius:8px;border:1px solid #ffe8b980;background:#ffe3ad1f;color:#ffe9c0;font-weight:800;font-size:12px}.log-retry:hover,.log-retry:focus-visible{background:#ffe3ad38}.log-card:not(.cleared) .log-retry{background:linear-gradient(#ffe3ad,#efbc72);color:#392b15;border-color:#ffe8b9}
.record-foot{display:flex;justify-content:space-between;align-items:center;gap:14px;margin-top:14px;flex-wrap:wrap}.record-status{margin:0;font-size:11px;color:#9fb6c3;line-height:1.5}.record-status.warn{color:#ffb9a8}.record-actions{display:flex;gap:14px}.record-actions .secondary{margin:0}
@media(max-width:950px){.record-dialog{padding:16px}.record-summary{grid-template-columns:1fr 1fr 1fr;gap:8px}.log-box{padding:9px 10px}.log-box strong{font-size:20px}.log-box.total strong{font-size:28px}.log-box p{font-size:9px}.record-grid{gap:9px}.log-card{min-height:148px}.log-copy strong{font-size:14px}}
/* Phones: the scene label keeps only its Japanese name so it never reaches the stats pill. */
@media (orientation:landscape) and (max-height:600px), (max-width:550px) and (orientation:portrait){.chapter small{display:none}}
@media(orientation:landscape) and (max-height:600px){.record-dialog{max-height:96svh;padding:12px 14px}.record-dialog .map-heading{margin-bottom:10px}.record-dialog .map-heading h2{font-size:19px;margin-top:4px}.log-card{min-height:136px}.log-retry{min-height:36px;margin:7px 10px 10px}.effects{top:calc(3% + 38px)}.effect{font-size:11px;padding:2px 7px 2px 3px}.effect img{width:18px;height:18px}}
@media(max-width:550px) and (orientation:portrait){.record-summary{grid-template-columns:1fr 1fr}.log-box.total{grid-column:1/-1}.record-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.log-copy strong{font-size:12px}.log-state,.log-coins{font-size:8px}.effects{top:calc(4% + 30px);gap:3px}.effect{font-size:8px;padding:1px 5px 1px 2px}.effect img{width:12px;height:12px}.record-foot{flex-direction:column;align-items:flex-start}}
/* Cinematic player: fixed over everything, 16:9 stage letterboxed, captions scale with the stage. */
.cinema{position:fixed;inset:0;z-index:60;display:grid;place-items:center;background:#01060b;color:#fff4dc;touch-action:manipulation;-webkit-user-select:none;user-select:none}
.cinema-stage{position:relative;width:min(100vw,calc(100svh * 16 / 9));aspect-ratio:16/9;overflow:hidden;background:#02080e;container-type:inline-size}
.cinema-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.cinema-captions{position:absolute;inset:0;pointer-events:none;font-size:1.25cqw;color:#fff4dc}
.cap{position:absolute;left:0;right:0;text-align:center;opacity:0;will-change:opacity,transform;text-shadow:0 .1em .6em #000c,0 0 .15em #000}
.cap.hero{font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","Noto Serif JP","Noto Serif CJK JP",serif;font-weight:700;font-size:3.4em;letter-spacing:.14em;line-height:1.45}
.cap.line{font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","Noto Serif JP","Noto Serif CJK JP",serif;font-weight:700;font-size:2.35em;letter-spacing:.1em;line-height:1.6}
.cap.name{text-align:left;font-weight:900;font-size:5.2em;letter-spacing:.06em;line-height:1.1}.cap.name small{display:block;font-size:.3em;letter-spacing:.3em;font-weight:700;color:#ffdca0;margin-bottom:.5em}
.cap.name.right{text-align:right}
.cap small.thanks{display:block;font-family:"Yu Gothic UI","Hiragino Sans",sans-serif;font-size:.36em;font-weight:800;letter-spacing:.5em;color:#ffdca0;margin-bottom:.55em}
.cap.verb{font-weight:900;font-size:4.2em;letter-spacing:.3em;color:#fff0cc;text-align:left;line-height:1.2}
.cap.tag{font-family:"Yu Mincho","YuMincho","Hiragino Mincho ProN","Noto Serif JP","Noto Serif CJK JP",serif;font-weight:700;font-size:1.9em;letter-spacing:.14em;line-height:1.5;text-align:left}
.cap.small{font-size:1.25em;letter-spacing:.35em;color:#e8d6ad;line-height:1.5}
.cap.credit{font-size:1.5em;line-height:1.55;text-align:left}.cap.credit small{display:block;font-size:.72em;letter-spacing:.3em;color:#f0d79e}
.cap.stats{font:700 1.15em/1.5 Consolas,ui-monospace,monospace;letter-spacing:.08em;color:#d9f1ea;text-align:right}
.cinema-controls{position:absolute;right:max(12px,env(safe-area-inset-right));top:max(10px,env(safe-area-inset-top));display:flex;gap:8px;z-index:2}
.cinema-controls button{min-width:44px;min-height:40px;padding:0 13px;border-radius:22px;border:1px solid #fff4dc55;background:#051019b3;color:#fff4dc;font-size:13px;font-weight:800;backdrop-filter:blur(6px)}.cinema-controls button[aria-pressed=true]{opacity:.65}.cinema-controls .skip{background:#fff4dce6;color:#1c1407;border-color:#fff4dc}
.cinema-bar{position:absolute;left:0;right:0;bottom:0;height:3px;background:#ffffff14;z-index:2}.cinema-bar i{display:block;height:100%;width:0;background:#ffd88a}
.cinema-loading{position:absolute;left:50%;bottom:8%;transform:translateX(-50%);font-size:12px;letter-spacing:2px;color:#c9d9de;z-index:2}
@media(orientation:portrait){.cinema-controls{top:auto;bottom:max(18px,env(safe-area-inset-bottom));right:50%;transform:translateX(50%)}}
