/* 閉店 → レジ → レシート。感熱紙（白に少し青灰）、等幅の印字、上端のギザギザ、ミシン目、判 */
#receipt { position: absolute; inset: 0; z-index: 50; overflow: hidden; touch-action: pan-y; background: rgba(8,10,18,0); transition: background 1.2s; }
#receipt.stage-dark, #receipt.stage-reg, #receipt.stage-print { background: rgba(8,10,18,.9); }
.closing { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-start; pointer-events: auto; }
.closed-sign { margin-top: 90px; padding: 10px 36px; font-weight: 900; font-size: 38px; letter-spacing: 6px; color: #fff; background: var(--red); border: 4px solid #fff; border-radius: 8px; box-shadow: 0 8px 20px rgba(0,0,0,.6); transform-origin: 50% -80px; animation: hang 1s cubic-bezier(.3, 1.4, .5, 1) both; }
@keyframes hang { from { transform: translateY(-260px) rotate(-8deg); } 60% { transform: rotate(4deg); } to { transform: rotate(-1deg); } }
.stage-print .closing, .skip .closing { opacity: 0; transition: opacity .5s; pointer-events: none; }
.register { position: absolute; left: 50%; bottom: -170px; width: min(86%, 340px); height: 150px; transform: translateX(-50%); z-index: 4; border-radius: 14px 14px 0 0; transition: bottom .6s cubic-bezier(.3, 1.2, .5, 1);
  background: linear-gradient(#8a98a6, #5d6b78); border: 3px solid #3a4550; box-shadow: 0 -6px 18px rgba(0,0,0,.5); }
.stage-reg .register { bottom: -70px; }
.stage-print .register { bottom: -180px; transition: bottom .9s ease-in .5s; }
.register .lcd { margin: 14px auto 0; width: 62%; padding: 6px 10px; text-align: right; font: 700 24px/1 ui-monospace, Menlo, monospace; color: #9dfc9d; background: #0b1a10; border-radius: 4px; border: 2px solid #2a3a30; text-shadow: 0 0 6px #5f5; }
.register .slot { position: absolute; left: 12%; right: 12%; top: 60px; height: 10px; background: #1b2128; border-radius: 5px; box-shadow: inset 0 2px 4px #000; }
.scroller { position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow-y: auto; overflow-x: hidden; padding: 14px 0 40px; touch-action: pan-y; transform: translateY(100%); opacity: 0; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; z-index: 2; }
.stage-print .scroller, .skip .scroller { transform: none; opacity: 1; transition: transform .9s cubic-bezier(.2, .8, .3, 1), opacity .3s; }
.skip .scroller { transition: none; }
.paper { position: relative; width: min(92%, 372px); margin: 0 auto; padding: 22px 16px 18px; color: #2a2a2a; font-family: ui-monospace, "SF Mono", Menlo, "Courier New", "Hiragino Sans", monospace;
  background: repeating-linear-gradient(90deg, rgba(120,140,170,.05) 0 3px, transparent 3px 7px), linear-gradient(#f9f8f3, #f1f1ea); box-shadow: 0 10px 30px rgba(0,0,0,.55);
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / 14px 100%; }
.paper::before { content: ""; position: absolute; left: 0; right: 0; top: -7px; height: 8px; background: linear-gradient(135deg, transparent 50%, #f9f8f3 50%) 0 0 / 14px 8px; }
.line { opacity: 0; transform: translateY(6px); }
.stage-print .line { animation: lineIn .25s ease-out both; animation-delay: calc(1.3s + var(--i) * .23s); }
.skip .line { animation: none !important; opacity: 1; transform: none; }
@keyframes lineIn { to { opacity: 1; transform: none; } }
.rhead { display: flex; align-items: center; gap: 10px; }
.stamp-mark { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 900 22px/1 system-ui, "Hiragino Maru Gothic ProN", sans-serif; color: var(--red); border: 3px solid var(--red); outline: 1.5px solid var(--red); outline-offset: 2px; transform: rotate(-8deg); opacity: .9; }
.rname { display: flex; flex-direction: column; flex: 1; min-width: 0; } .rname b { font-size: 18px; font-weight: 900; } .rname small { font-size: 12px; color: #667; }
.badge { flex: none; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 3px; border: 1.5px solid; transform: rotate(3deg); }
.badge.today { color: #1f5fa8; border-color: #1f5fa8; } .badge.other { color: #8a4a1a; border-color: #8a4a1a; }
.perf { height: 0; margin: 12px 0; border-top: 2px dashed #b6b6ac; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { padding: 8px 0 10px; border-top: 1px dotted #bbb; min-height: 56px; } .row:first-child { border-top: 0; }
.row.empty { text-align: center; font-weight: 800; color: #777; padding: 18px 0; }
.rtop { display: flex; justify-content: space-between; gap: 6px; align-items: baseline; } .rname2 { font-weight: 900; font-size: 15px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .rpeel { font-size: 12px; color: #667; flex: none; }
.rmid { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin: 3px 0 6px; font-size: 13px; }
.tagsaid { color: #667; } .verdict { font-weight: 900; font-size: 15px; padding: 1px 7px; border-radius: 3px; flex: none; }
.verdict.real { color: #17803d; border: 2px solid #17803d; } .verdict.fake { color: #fff; background: var(--red); transform: rotate(-3deg); box-shadow: 0 1px 0 #7a0d08; }
.stack { display: flex; align-items: center; gap: 2px; }
.arrow { color: #99998d; font-size: 16px; font-weight: 900; flex: none; }
.mini { position: relative; flex: 1 1 0; min-width: 0; height: 54px; border-radius: 3px; padding: 3px 3px 2px; display: flex; flex-direction: column; justify-content: center; align-items: center; background: #fbf3dc; border: 1px dashed rgba(215,38,30,.6); box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.mini.w1, .mini.w2, .mini.w3 { background: #efe2bd; border-color: rgba(150,110,50,.6); } .mini.backing { background: #bdb7a8; border-color: rgba(0,0,0,.25); }
.mini i { font-style: normal; font-size: 11px; font-weight: 800; color: #6b5a35; line-height: 1.1; white-space: nowrap; } .mini b { font-size: 13px; font-weight: 900; line-height: 1.15; white-space: nowrap; letter-spacing: -.3px; }
.mini.today i { color: var(--red); }
.mini.dim { opacity: .62; }
.mini em { position: absolute; left: -2px; right: -2px; bottom: 3px; transform: rotate(-5deg); font-style: normal; font-size: 10px; font-weight: 800; text-align: center; color: #fff; background: rgba(70,60,40,.82); padding: 1px 0; white-space: nowrap; letter-spacing: -.3px; }
.totals { display: grid; gap: 6px; }
.tot { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; } .tot span { font-size: 13px; font-weight: 800; } .tot b { font-size: 28px; font-weight: 900; font-variant-numeric: tabular-nums; }
.tot.gain b { color: #17803d; } .tot.fool b { color: var(--red); } .tot.peel b { font-size: 18px; }
.missed { margin-top: 8px; padding: 8px; background: #fff3c4; border: 1.5px dashed #c79a00; border-radius: 4px; font-size: 13px; } .missed span { font-weight: 900; font-size: 12px; color: #8a6a00; } .missed p { margin: 2px 0 0; font-weight: 700; }
.ending { text-align: center; }
.rstamp { display: inline-block; margin: 12px auto 16px; padding: 6px 16px; font: 900 26px/1.1 "Hiragino Maru Gothic ProN", system-ui, sans-serif; border: 4px solid; border-radius: 8px; outline: 2px solid; outline-offset: 2px; transform: rotate(-6deg) scale(1.9); opacity: 0; letter-spacing: 1px; }
.rstamp.slam, .skip .rstamp { animation: slam2 .4s cubic-bezier(.2, 1.5, .4, 1) forwards; }
@keyframes slam2 { 0% { transform: rotate(-6deg) scale(2); opacity: 0; } 55% { opacity: 1; transform: rotate(-6deg) scale(.94); } 100% { transform: rotate(-6deg) scale(1); opacity: .94; } }
.rstamp.sucker { color: var(--red); } .rstamp.smart { color: #17803d; } .rstamp.empty { color: #3a4a8a; }
.reason { margin: 6px 0; font-size: 14px; font-weight: 700; line-height: 1.45; }
.title { display: inline-block; margin: 2px 0; padding: 3px 14px; background: #2a2a2a; color: #ffe27a; font-weight: 900; font-size: 14px; border-radius: 12px; }
.records { display: flex; justify-content: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; } .records span { font-size: 12px; font-weight: 900; padding: 2px 8px; border-radius: 10px; background: #e8e6da; }
.records .best { background: linear-gradient(#ffe27a, #e9b800); color: #5a4300; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e9b800; }
.thanks { text-align: center; font-size: 12px; color: #889; margin: 10px 0 4px; }
.btns { display: grid; gap: 8px; margin-top: 8px; }
.btns button { width: 100%; border: 0; border-radius: 12px; font-weight: 900; font-family: inherit; touch-action: manipulation; }
.btns .primary { height: 52px; font-size: 18px; background: linear-gradient(#e33a2f, #c71f17); color: #fff; box-shadow: 0 3px 0 #7a0d08; }
.btns .today { height: 38px; font-size: 13px; background: #e8e6da; color: #2a2a2a; } .btns .save { height: 44px; font-size: 14px; background: #2a2a2a; color: #fff; }
.btns button:active { transform: translateY(2px); } .btns button:disabled { opacity: .7; }
#receipt .full-img { position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,.92); display: flex; align-items: center; justify-content: center; touch-action: pan-y; }
#receipt .full-img img { max-width: 94%; max-height: 94%; -webkit-touch-callout: default; -webkit-user-select: auto; user-select: auto; }
@media (max-height: 700px) { .closed-sign { margin-top: 50px; font-size: 30px; } .rstamp { font-size: 22px; } }
@media (prefers-reduced-motion: reduce) { .closed-sign, .rstamp { animation-duration: .01s !important; } }
.records .best.big { font-size: 15px; padding: 5px 14px; }
.records .best.quiet { background: #e8e6da; color: #667; box-shadow: none; font-weight: 700; }
.mini em { position: static !important; display: block; transform: none !important; margin-top: 2px; padding: 1px 3px; border-radius: 2px; white-space: normal; font-size: 9px; line-height: 1.15; letter-spacing: 0; max-width: 100%; overflow-wrap: anywhere; }
.mini { height: auto !important; min-height: 54px; overflow: hidden; }
/* 層が4枚、5枚（タイムセールの後）の行: 値段が全部読め、「めくらなかった」が値段に重ならない */
.stack[data-n="4"] .mini b { font-size: 12px; letter-spacing: -.5px; } .stack[data-n="5"] .mini b { font-size: 10.5px; letter-spacing: -.6px; }
.stack[data-n="5"] .mini i { font-size: 9.5px; } .stack[data-n="4"] .mini i { font-size: 10px; } .stack[data-n="5"] .arrow, .stack[data-n="4"] .arrow { font-size: 12px; margin: 0 -1px; }
/* 「作った話と感想」の丸いボタンがレシートの字に重ならないよう、下に余白 */
.scroller { padding-bottom: 96px; }
.paper { padding-right: 14px; padding-left: 14px; }
/* 見せかけの行の理由の1行（買った後のレシートだけ） */
.row .why { margin: -2px 0 6px; font-size: 12px; line-height: 1.35; font-weight: 700; color: #8a1d17; text-wrap: pretty; }
.mini b { max-width: none; }
.stack[data-n="5"] .mini b, .stack[data-n="6"] .mini b { font-size: 11px; letter-spacing: -.8px; } .stack[data-n="5"] .mini i, .stack[data-n="6"] .mini i { font-size: 9.5px; } .stack[data-n="5"] .mini em, .stack[data-n="6"] .mini em { font-size: 8px; letter-spacing: -.3px; left: -3px; right: -3px; }
@media (max-width: 380px) { .mini b { font-size: 11.5px; letter-spacing: -.6px; } .mini i { font-size: 10px; } }
@media (max-width: 380px) { .stack[data-n="5"] .mini em, .stack[data-n="6"] .mini em { font-size: 7px; letter-spacing: -.4px; white-space: normal; word-break: keep-all; padding: 1px 1px; } .stack[data-n="5"] .mini i, .stack[data-n="6"] .mini i { font-size: 8.5px; letter-spacing: -.4px; } .stack[data-n="6"] .mini b { font-size: 10px; } }

/* ===== 周回2: 称号の判、余分に払った額、取り逃しの枠 ===== */
.tstamps { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin: 8px 0 4px; }
.tst { position: relative; padding: 3px 7px; font-size: 10.5px; font-weight: 900; line-height: 1.2; border-radius: 4px; border: 1.5px solid; transform: rotate(-2deg); white-space: nowrap; }
.tst.got { color: #7a1f1a; border-color: #b2342b; background: rgba(215,38,30,.06); }
.tst.lock { color: #aab; border-color: #c9c9c0; border-style: dashed; background: rgba(0,0,0,.04); letter-spacing: 2px; }
.tst:nth-child(even) { transform: rotate(1.5deg); }
.tst.new { box-shadow: 0 0 0 2px #fff, 0 0 0 3px #e9b800; background: #fff3c4; }
.tst em { position: absolute; top: -9px; right: -6px; font-style: normal; font-size: 8.5px; letter-spacing: .5px; padding: 0 4px; background: #d7261e; color: #fff; border-radius: 6px; transform: rotate(8deg); }
.tot.sub { font-size: 11px; font-weight: 700; color: #7a6f5a; justify-content: flex-end; text-align: right; margin-top: -2px; }
.missed { overflow: visible; overflow-wrap: anywhere; line-height: 1.4; padding-bottom: 10px; }
.missed p { line-height: 1.4; }
.paper { padding-bottom: 20px; }
.traps { margin-top: 8px; padding: 6px 8px; font-size: 12px; background: #eceae0; border-radius: 4px; } .traps span { font-weight: 900; font-size: 11px; color: #6a5f48; } .traps p { margin: 2px 0 0; font-weight: 700; line-height: 1.4; }

/* 周回2 修正: レシートの画面でも看板の帯（JA / EN と音）を押せる */
#hud { z-index: 60; }
#receipt .scroller { padding-top: 66px; }
#receipt .closing { padding-top: 40px; }
@media (max-height: 700px) { #receipt .scroller { padding-top: 54px; } }
/* 周回3: だまされた額の注と、感想の部品（右下）が金額に重ならない余白 */
.tot.fool { flex-wrap: wrap; } .tot .fnote { flex-basis: 100%; text-align: right; font-size: 10px; font-weight: 700; color: #7a6f5a; margin-top: -2px; }
#receipt { padding-bottom: 72px !important; }
.tst.lock { display: inline-flex; flex-direction: column; align-items: center; } .tst .thint { font-size: 9px; font-weight: 700; color: #7a6f5a; line-height: 1.1; }
