/* ロック画面と札（ux）。基準 390×844、360×640 でも全部入る。壁紙は assets/wallpaper.jpg（なければ勾配だけ） */
.wall { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: #1b1a3a url(/assets/wallpaper.jpg) center / cover no-repeat; }
.wall::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,16,52,.45), rgba(40,20,60,.25) 55%, rgba(106,61,107,.3)); }
.wall::after { content: ""; position: absolute; inset: 0; background: #070614; opacity: calc(var(--night, 0) * .5); }
.wall .city { position: absolute; left: 0; right: 0; bottom: 0; height: 22%; opacity: .55; background: linear-gradient(180deg, transparent, #0b0920 90%); }
#app > :not(.wall):not(.result):not(.sheet):not(.replay):not(.flash):not(.replang) { position: relative; z-index: 1; }

.status { height: 30px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px 0 8px; flex: none; }
.lang { display: flex; gap: 0; }
.lang button { min-width: 44px; height: 44px; margin: -7px 0; background: none; border: 0; font-size: 12px; font-weight: 700; opacity: .5; cursor: pointer; letter-spacing: .05em; }
.lang button.on { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
.sysicons { display: flex; align-items: center; gap: 5px; color: #fff; }
.sysicons .sg { fill: #fff; opacity: .92; }
.clock { text-align: center; flex: none; }
.clock .time { font-size: 52px; line-height: 56px; font-weight: 200; font-variant-numeric: tabular-nums; letter-spacing: -.02em; text-shadow: 0 2px 14px rgba(0,0,0,.28); }
.clock .date { font-size: 13px; opacity: .85; height: 18px; font-weight: 500; }
@media (min-height: 760px) { .clock .time { font-size: 76px; line-height: 84px; } .clock { margin-bottom: 10px; } }

.burn { position: relative; height: 56px; margin: 6px 12px 4px; padding: 0 8px; border-radius: 14px; background: rgba(0,0,0,.34); box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); display: flex; align-items: center; gap: 8px; flex: none; overflow: hidden; }
.burn.empty::before { content: attr(data-placeholder); position: absolute; left: 14px; font-size: 12px; opacity: .5; letter-spacing: .04em; }
.burn.empty::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: repeating-linear-gradient(90deg, rgba(255,77,61,.5) 0 6px, transparent 6px 12px); }
.burn .chips { display: flex; gap: 4px; flex: 1; min-width: 0; overflow: hidden; }
.burn .chip { flex: none; padding: 4px 9px; border-radius: 10px; font-size: 12px; font-weight: 700; color: #ffd9d3; background: radial-gradient(120% 140% at 30% 0%, #8a2018, #2a0b09); border: 1px solid #ff4d3d; box-shadow: 0 0 10px rgba(255,77,61,.45), inset 0 -3px 6px rgba(0,0,0,.5); white-space: nowrap; animation: ember 2.6s ease-in-out infinite; }
.burn .chip:nth-child(n+4) { font-size: 11px; padding: 3px 6px; }
.burn .chip:nth-child(n+7) { font-size: 10px; padding: 2px 4px; }
.burn .chip.landing { visibility: hidden; }
.burn .chip.fresh { animation: scorch .7s ease-out both, ember 2.6s 0.7s ease-in-out infinite; }
.burn .chip.pulse { animation: chippulse .35s ease-out; }
@keyframes ember { 0%, 100% { box-shadow: 0 0 8px rgba(255,77,61,.35), inset 0 -3px 6px rgba(0,0,0,.5); } 50% { box-shadow: 0 0 15px rgba(255,77,61,.7), inset 0 -3px 6px rgba(0,0,0,.5); } }
@keyframes scorch { from { filter: brightness(2.4); border-color: #fff; } to { filter: none; } }
@keyframes chippulse { 50% { transform: scale(1.12); } }
.gauge { display: flex; gap: 3px; flex: none; }
.gauge i { width: 12px; height: 20px; border-radius: 3px; border: 1px solid rgba(255,255,255,.45); transition: background .15s, box-shadow .15s; }
.gauge i.on { background: var(--burn); border-color: var(--burn); box-shadow: 0 0 8px var(--burn); }

.stack { flex: none; padding: 0 12px; }
.slot { height: 108px; margin-bottom: 8px; }
.card {
  position: relative; height: 108px; padding: 8px 12px; border-radius: 20px; overflow: hidden;
  background: rgba(40,44,70,.82); border: 1px solid rgba(255,255,255,.22); box-shadow: 0 8px 24px rgba(0,0,0,.35);
  touch-action: none; cursor: default; transition: filter .2s, border-color .15s;
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .card { background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.12)); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); }
}
.card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: inset 0 1px 0 rgba(255,255,255,.35); }
.card.oldest { filter: brightness(.8); }
.card.held { border-color: rgba(255,255,255,.55); }
.card.arrive { animation: drop .28s cubic-bezier(.2,1.4,.4,1) both; }
.card.arrive::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; animation: rim .5s ease-out both; }
.card.leave { animation: leave .12s ease-in both; }
@keyframes drop { from { transform: translateY(-16px) scale(1.04); opacity: .3; } to { transform: none; opacity: 1; } }
@keyframes rim { from { box-shadow: inset 0 0 0 2px rgba(255,255,255,.9); } to { box-shadow: inset 0 0 0 0 rgba(255,255,255,0); } }
@keyframes leave { to { transform: scale(.94); opacity: 0; } }
.stack.freeze .card { filter: brightness(.7); }
.card header { height: 22px; display: flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.card .icon { position: relative; width: 20px; height: 20px; border-radius: 6px; flex: none; display: block; padding: 2px; background: linear-gradient(135deg,#6b7cff,#3a4aa8); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 1px 3px rgba(0,0,0,.3); }
.icon::before { content: ""; position: absolute; inset: 2px; background-size: contain; background-repeat: no-repeat; background-position: center; }
.card .icon.face::before { display: none; }
.card .icon.face { padding: 0; border-radius: 50%; background-image: url(/assets/avatars.webp); background-size: 120px 20px; background-repeat: no-repeat; background-color: #8a7bd0; }
.card .icon.face svg { display: none; }
.card .icon.i-0 { background-color: #d9722b; background-image: linear-gradient(135deg,#ffb36b,#d9722b); } .card .icon.i-1 { background: linear-gradient(135deg,#ff8a7a,#c9453a); }
.card .icon.i-2 { background: linear-gradient(135deg,#b58cff,#6a3fc4); } .card .icon.i-5 { background: linear-gradient(135deg,#59d27a,#1f8a45); }
.card .icon.i-8 { background: linear-gradient(135deg,#6bb4ff,#2a6ac9); } .card .icon.i-7 { background: linear-gradient(135deg,#ffe36b,#e0a100); }
.card .icon.i-6 { background: linear-gradient(135deg,#c79a6b,#8a5a2b); } .card .icon.i-4 { background: linear-gradient(135deg,#9aa1b5,#5b6177); }
.card .icon.i-3 { background: linear-gradient(135deg,#4a5a8c,#1f2a55); } .card .icon.i-9 { background: linear-gradient(135deg,#ffa24a,#d9621b); }
.card .icon.i-10 { background: linear-gradient(135deg,#6a6de0,#2c2f9a); }
.card .icon.face.i-0, .card .icon.face.i-1 { background-image: url(/assets/avatars.webp); background-size: 120px 20px; background-repeat: no-repeat; }
.card .name { font-weight: 700; overflow: hidden; text-overflow: ellipsis; }
.card .headline { font-weight: 700; opacity: .85; overflow: hidden; text-overflow: ellipsis; }
.card .time.t-now::after { content: var(--t-now); } .card .time.t-ago::after { content: var(--t-ago); }
.card .time { margin-left: auto; font-size: 11px; opacity: .65; }

/* 本文。かたまりは固定の幅の箱（開いても幅が変わらない）。伏せた帯の中に字はない */
.body { display: flex; flex-wrap: wrap; align-content: flex-start; margin-top: 2px; min-height: 66px; max-height: 66px; overflow: hidden; font-size: 16px; line-height: 22px; touch-action: none; }
.chunk { display: inline-flex; align-items: center; height: 22px; margin-right: 4px; white-space: nowrap; }
.chunk.always { opacity: .95; }
.ck { display: inline-block; height: 20px; border-radius: 6px; position: relative; overflow: hidden; line-height: 20px; text-align: center;
  background: linear-gradient(180deg, rgba(255,255,255,.4), rgba(255,255,255,.22));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.55), inset 0 -1px 0 rgba(0,0,0,.3), 0 1px 2px rgba(0,0,0,.2); }
.ck:not(.open)::before { content: ""; position: absolute; inset: 0; opacity: .1; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='20'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='40' height='20' filter='url(%23n)'/%3E%3C/svg%3E"); }
.ck:not(.open)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%) -120% 0 / 60% 100% no-repeat; animation: shimmer 3s infinite; }
@keyframes shimmer { 0%, 70% { background-position: -120% 0; } 100% { background-position: 220% 0; } }
.card.held .ck:not(.open) { background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.34)); }
@media (hover: hover) { .ck:not(.open):hover { background: linear-gradient(180deg, rgba(255,255,255,.5), rgba(255,255,255,.3)); } .body { cursor: grab; } }
.ck.open { background: rgba(255,255,255,.1); box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); animation: peel .08s linear; }
.ck.open::before, .ck.open::after { display: none; }
@keyframes peel { from { background: rgba(255,255,255,.4); color: transparent; } to { background: rgba(255,255,255,.1); } }
.ck.open[data-kind="answer"] { box-shadow: inset 0 -2px 0 var(--errand); }
.ck.open[data-kind="answer"]::after { display: block; content: ""; position: absolute; left: 0; bottom: 0; height: 2px; width: 100%; background: var(--errand); animation: underline .15s ease-out; transform-origin: left; }
@keyframes underline { from { transform: scaleX(0); } }
.ck.open[data-kind="fact"] { background: rgba(255,77,61,.38); color: #fff; box-shadow: 0 0 0 1px var(--burn), 0 0 10px rgba(255,77,61,.5); }

/* 手ほどきの指（最初になぞるまで 2秒ごと。マウスの時も出す） */
.hand { display: none; }
.card.with-hand .hand { display: block; position: absolute; left: 12px; top: 52px; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.6), rgba(255,255,255,.25)); border: 2px solid rgba(255,255,255,.85); pointer-events: none; animation: handmove 2s ease-in-out infinite; box-shadow: 0 0 14px rgba(255,255,255,.5); }
@keyframes handmove { 0% { transform: translateX(0); opacity: 0; } 15% { opacity: 1; } 80% { transform: translateX(150px); opacity: 1; } 100% { transform: translateX(160px); opacity: 0; } }

/* なぞった跡、粒、吹き出し、飛ぶ字 */
.trail { position: fixed; z-index: 30; width: 10px; height: 10px; margin: -5px 0 0 -5px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, #fff, rgba(255,255,255,0)); animation: trail .4s ease-out forwards; }
@keyframes trail { to { opacity: 0; transform: scale(.3); } }
.puff { position: fixed; z-index: 30; width: 5px; height: 5px; margin: -2px 0 0 -2px; border-radius: 50%; pointer-events: none; background: #fff; }
.puff.fact { background: #ff6a5a; } .puff.answer { background: var(--errand); }
.bubble { position: fixed; z-index: 31; height: 28px; padding: 0 10px; line-height: 28px; border-radius: 14px; background: rgba(12,10,30,.92); color: #fff; font-size: 14px; font-weight: 700; pointer-events: none; transform: translate(-50%, 0); white-space: nowrap; box-shadow: 0 2px 10px rgba(0,0,0,.4); }
.bubble.fact { background: #7a1d17; box-shadow: 0 0 0 1px var(--burn); }
.flyer { position: fixed; z-index: 32; left: 0; top: 0; padding: 3px 9px; border-radius: 8px; font-size: 16px; font-weight: 800; color: #fff; background: rgba(255,77,61,.65); border: 1px solid #ff8a7a; text-shadow: 0 0 8px #ff3b2a; box-shadow: 0 0 16px #ff4d3d; pointer-events: none; white-space: nowrap; will-change: transform; }
.flash { position: absolute; inset: 0; z-index: 40; pointer-events: none; box-shadow: inset 0 0 0 0 rgba(255,60,40,0); }
.flash.go { animation: edge .5s ease-out; }
@keyframes edge { 0% { box-shadow: inset 0 0 70px 14px rgba(255,60,40,.95); } 100% { box-shadow: inset 0 0 0 0 rgba(255,60,40,0); } }
#app.shake { animation: shake .12s linear; }
@keyframes shake { 25% { transform: translate(3px, 1px); } 75% { transform: translate(-3px, -1px); } }

.route { flex: none; height: 44px; margin: 0 24px; position: relative; }
.route .line { position: absolute; left: 0; right: 0; top: 12px; height: 2px; background: rgba(255,255,255,.35); border-radius: 1px; }
.route .node { position: absolute; top: 8px; width: 10px; height: 10px; margin-left: -5px; border-radius: 50%; background: rgba(255,255,255,.55); }
.route .node.next { box-shadow: 0 0 10px #fff; background: #fff; }
.route .dot { position: absolute; top: -5px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; background: #ffb347; box-shadow: 0 0 10px #ffb347; }
.route .dot.rail { width: 20px; height: 10px; margin-left: -10px; top: -4px; border-radius: 5px; background: #6bb4ff; box-shadow: 0 0 10px #6bb4ff; }
.route .places { position: absolute; left: -12px; right: -12px; top: 24px; display: flex; justify-content: space-between; font-size: 11px; opacity: .75; }
.route .skyline { display: none; }
@keyframes skyline { to { background-position: -80px 0; } }
.bottom { flex: 1 1 auto; min-height: 52px; max-height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; }
.bottom .fb-space { width: 56px; flex: none; } /* 「作った話と感想」のボタン用（widget が左下に重ねる） */
.bottom .hint { font-size: 12px; opacity: .7; letter-spacing: .08em; animation: hintpulse 2.4s infinite; }
@keyframes hintpulse { 0%, 100% { opacity: .5; } 50% { opacity: .95; } }
.sound { width: 44px; height: 44px; margin-right: 4px; background: none; border: 0; color: #fff; opacity: .8; cursor: pointer; display: grid; place-items: center; }
.sound .mute { display: none; } .sound.muted .mute { display: inline; } .sound.muted .wave { display: none; }

/* PC: スマホの形を中央に置く（390px 基準。スマホ幅では枠なし） */
@media (min-width: 431px) {
  body { background: radial-gradient(circle at 50% 40%, #2a2150, #0a0918 70%); }
  #app { max-width: 390px; top: 16px; bottom: 16px; height: auto; border-radius: 44px; border: 2px solid rgba(255,255,255,.18); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 0 0 8px #0b0a18; }
}
@media (prefers-reduced-motion: reduce) {
  .trail, .puff, .ck:not(.open)::after, .route .skyline { animation: none; }
  #app.shake { animation: none; }
}
.route .node em { position: absolute; top: 14px; left: 50%; transform: translateX(-50%); font-style: normal; font-size: 11px; white-space: nowrap; opacity: .8; }
.route .node.next em { opacity: 1; font-weight: 700; }
.route .node { z-index: 1; }
.slot { position: relative; }

/* 工程7: 目的の表示（帯が空の間）、ネタバレの名前、帰り道の終点 */
.burn { height: 72px; }
.burn .goal { position: absolute; left: 10px; right: 74px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; font-size: 11px; line-height: 14px; opacity: .95; pointer-events: none; }
.burn .goal p { margin: 0; }
.burn .goal .g1 { font-weight: 700; }
.burn .goal .g2 { color: #8ff0de; }
.burn .goal .rec { display: inline-block; margin-right: 5px; padding: 0 5px; border-radius: 3px; background: #d8362a; color: #fff; font-size: 10px; letter-spacing: .06em; }
.burn:not(.empty) .goal { display: none; }
.burn.empty::before { display: none; }
.burn .chips { position: relative; }
.burn .gw { flex: none; display: flex; flex-direction: column; align-items: center; gap: 3px; }
.burn .gl { font-size: 11px; letter-spacing: .06em; opacity: .85; white-space: nowrap; }
.route .node:nth-of-type(4) em { left: auto; right: -4px; transform: none; }
.bubble.remember { background: #0f5c4f; box-shadow: 0 0 0 1px #3ed6c0; font-size: 13px; z-index: 33; }

/* 工程7: 入れ替わりの予告（最古の札を薄くし、下の帯が減る） */
.card.going { opacity: calc(.45 + var(--left, 1) * .55); }
.card.going::after { content: ""; position: absolute; left: 12px; bottom: 4px; height: 3px; width: calc((100% - 24px) * var(--left, 1)); border-radius: 2px; background: #ffb347; pointer-events: none; }

/* 周回1: 札を本物の通知に見せる。開いた字は枠のない地の文、伏せた帯はぼけた字の形、札の高さは中身に合わせる */
.slot { height: auto; min-height: 62px; }
.card { height: auto; padding-bottom: 9px; }
.body { min-height: 20px; max-height: 60px; font-size: 15px; line-height: 20px; color: rgba(255,255,255,.88); letter-spacing: -.01em; }
.chunk { height: 20px; margin-right: 0; }
.ck { margin: 0; overflow: visible; background: none; box-shadow: none; border-radius: 4px; height: 20px; line-height: 20px; }
.ck:not(.open)::before { inset: 4px 3px; opacity: 1; border-radius: 4px; filter: blur(2.6px);
  background-image:
    repeating-linear-gradient(90deg, rgba(255,255,255,.62) 0 5px, rgba(255,255,255,.2) 5px 7px, rgba(255,255,255,.55) 7px 15px, rgba(255,255,255,.28) 15px 17px, rgba(255,255,255,.6) 17px 22px, rgba(255,255,255,.14) 22px 25px),
    linear-gradient(180deg, rgba(255,255,255,0), rgba(255,255,255,.18) 60%, rgba(255,255,255,0)); }
.ck:not(.open)::after { display: none; }
.card.held .ck:not(.open)::before { opacity: .8; }
@media (hover: hover) { .ck:not(.open):hover { background: none; } }
.ck.open { background: none; box-shadow: none; animation: bloom .2s ease-out; color: rgba(255,255,255,.92); }
.ck.open[data-kind="answer"] { box-shadow: none; color: #d6fbe4; }
.ck.open[data-kind="answer"]::after { left: 3px; width: calc(100% - 6px); bottom: 1px; }
.ck.open[data-kind="fact"] { background: rgba(255,77,61,.2); color: #ffb4aa; box-shadow: inset 0 -2px 0 rgba(255,77,61,.85); text-shadow: none; }
@keyframes bloom { from { filter: blur(5px); opacity: .2; } to { filter: blur(0); opacity: 1; } }
.card.with-hand .hand { top: 24px; }
@media (prefers-reduced-motion: reduce) { .ck.open { animation: none; } .ck.open[data-kind="answer"]::after { animation: none; } }

/* 周回2: 開いた字は語の間の空きなしで続く（判定の矩形は変えない。footprint だけ左右 4px ずつ重ねる）。指が触れていても伏せた帯はぼけた字の形のまま */
/* （PO の決定 2026-11-23: 負の margin で重ねない。かたまりの箱の幅は core が字の幅ちょうどにする。開いても後ろの位置は動かない） */
.body { letter-spacing: 0; }   /* canvas の measure と同じ幅にする */
.card.held .ck:not(.open) { background: none; box-shadow: none; }
.card.held .ck:not(.open)::before { opacity: 1; filter: blur(2.6px) brightness(1.15); }
/* 周回3: 次の問いは約 0.9 秒押せない。見た目も押せない形（薄く、少し下がって、押せる時に上がってはっきりする）。上の端は直線（札を横切る丸い角をやめる） */
#app .sheet.guard .choice { opacity: .28; filter: saturate(.3); pointer-events: none; transform: translateY(12px); }
#app .sheet .choice { transition: opacity .28s ease-out, filter .28s ease-out, transform .28s ease-out; }
#app .sheet.guard .secs { opacity: .6; }
#app .sheet { border-radius: 0; border-top: 1px solid rgba(255,255,255,.14); }

/* 周回2: 帯。チップは2行まで（切らない）、下に目的の1行、進んだ目盛り、満杯 */
.burn .chips { flex-wrap: wrap; align-content: center; align-self: stretch; gap: 4px; padding: 5px 0 17px; overflow: hidden; }
.burn .chip, .burn .chip:nth-child(n+4), .burn .chip:nth-child(n+7) { font-size: 11.5px; line-height: 14px; padding: 3px 8px; max-width: 100%; }
.burn[data-n="5"] .chip, .burn[data-n="6"] .chip, .burn[data-n="7"] .chip, .burn[data-n="8"] .chip, .burn[data-n="9"] .chip { font-size: 10.5px; line-height: 12px; padding: 2px 6px; }
.burn .goalline { position: absolute; left: 10px; right: 74px; bottom: 4px; margin: 0; font-size: 10.5px; line-height: 13px; letter-spacing: .02em; white-space: nowrap; overflow: hidden; color: #8ff0de; opacity: .9; pointer-events: none; }
.burn.empty .goalline { display: none; }
.burn .goalline.full { color: #ffb4aa; font-weight: 700; opacity: 1; }
.burn .gauge { position: relative; }
.burn .gplus { position: absolute; left: 50%; top: -2px; transform: translateX(-50%); font-style: normal; text-decoration: none; font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 0 8px #ff3b2a, 0 1px 2px rgba(0,0,0,.6); opacity: 0; pointer-events: none; }
.burn .gplus.go { animation: gplus 1.3s ease-out both; }
@keyframes gplus { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 12% { opacity: 1; transform: translate(-50%, -8px) scale(1.25); } 70% { opacity: 1; transform: translate(-50%, -12px) scale(1); } 100% { opacity: 0; transform: translate(-50%, -18px) scale(1); } }
.burn.full .gauge i.on { background: #ff6a5a; box-shadow: 0 0 10px #ff4d3d; }
.burn .gauge.throb { animation: throb .55s ease-out; }
.burn .gauge.throb i.on { animation: throbcell .55s ease-out; }
@keyframes throb { 0% { transform: scale(1); } 25% { transform: scale(1.35); } 55% { transform: scale(1); } 75% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes throbcell { 0%, 60% { background: #ff1a05; box-shadow: 0 0 16px 3px #ff1a05; } 100% { } }
@media (prefers-reduced-motion: reduce) { .burn .gplus.go, .burn .gauge.throb, .burn .gauge.throb i.on { animation: none; } }
.burn .gplus { left: auto; right: calc(100% + 8px); top: 50%; transform: translateY(-50%); white-space: nowrap; }
@keyframes gplus { 0% { opacity: 0; transform: translateY(-30%) scale(.8); } 12% { opacity: 1; transform: translateY(-62%) scale(1.3); } 70% { opacity: 1; transform: translateY(-58%) scale(1); } 100% { opacity: 0; transform: translateY(-80%) scale(1); } }
.burn { height: 76px; }
.burn .chips { padding: 5px 0 19px; }
/* 周回3: 焼き付いた時の「+n」は目盛りの真下（チップに重ならない）。大きめに、1.6 秒見える */
.burn .gplus { left: 50%; right: auto; top: calc(100% + 1px); transform: translateX(-50%); font-size: 17px; line-height: 18px; z-index: 2; }
.burn .gplus.go { animation: gplus3 1.8s ease-out both; }
@keyframes gplus3 { 0% { opacity: 0; transform: translateX(-50%) translateY(-8px) scale(.7); } 10% { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.35); } 22% { transform: translateX(-50%) scale(1); } 80% { opacity: 1; transform: translateX(-50%); } 100% { opacity: 0; transform: translateX(-50%) translateY(3px); } }
/* 周回3: 初めて橙の帯が出た時の1行（「なぞって読む」の行に、3.8 秒だけ） */
.bottom .hint.noted { color: #ffcf8a; opacity: 1; animation: none; letter-spacing: .02em; font-weight: 700; }
/* PC: 端末の枠の外は、壁紙をぼかして敷く */
@media (min-width: 431px) {
  body::before { content: ""; position: fixed; inset: -60px; z-index: -1; pointer-events: none; background: #0a0918 url(/assets/wallpaper.jpg) center / cover no-repeat; filter: blur(34px) brightness(.5) saturate(1.1); }
}

/* 周回4: 札が届く約0.5秒前、山の上の端に細い光が走る（山の全体が動く合図。場所を取らず、字を隠さない） */
.stack { position: relative; }
.stack::before { content: ""; position: absolute; left: 12px; right: 12px; top: -3px; height: 2px; border-radius: 2px; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.95), transparent); background-size: 40% 100%; background-repeat: no-repeat; }
.stack.incoming::before { animation: incoming .5s ease-in both; }
@keyframes incoming { from { opacity: 0; background-position: -40% 0; } 20% { opacity: .9; } to { opacity: .9; background-position: 140% 0; } }
@media (prefers-reduced-motion: reduce) { .stack.incoming::before { animation: none; opacity: .6; background-size: 100% 100%; } }

/* 周回5: 時間切れの後、シートごと一度下がり、次の問いが上がってくる。番号は上がった直後の 0.9秒（押せない間）に大きく光る */
#app .sheet.down { transform: translateY(104%); transition: transform .35s ease-in; }
#app .sheet.rise { animation: rise5 .36s ease-out; }
@keyframes rise5 { from { transform: translateY(104%); } to { transform: none; } }
#app .sheet.newq .count { font-size: 17px; font-weight: 800; opacity: 1; padding: 3px 12px; border-radius: 14px; background: #ffb347; color: #1a1430; animation: newq 0.9s ease-out both; }
@keyframes newq { 0% { transform: scale(1.35); } 30% { transform: scale(1.1); } 100% { transform: scale(1); } }

/* 周回5: 再生の間も言語のボタンを出す（左上。右上は「スキップ」）。押すと再生を止めて、結果を今の言語で出す */
#app .replang { display: none; position: absolute; left: 8px; top: 10px; z-index: 9; }
#app[data-stage="replay"] .replang { display: flex; }
#app .replang button { min-width: 44px; height: 44px; background: rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.4); border-radius: 22px; margin-right: 4px; color: #fff; font-size: 12px; font-weight: 700; opacity: .6; cursor: pointer; letter-spacing: .05em; }
#app .replang button.on { opacity: 1; text-decoration: underline; text-underline-offset: 4px; }
