.sg-page{display:grid;gap:12px}.sg-card{overflow:hidden;border-radius:11px;border:1px solid #af906b;background:#f9edda}.sg-art{position:relative;isolation:isolate;height:clamp(155px,28vw,206px);overflow:hidden;background:linear-gradient(90deg,#32172ac4,transparent 74%),url(winter.webp) center/cover;color:#ffefd0}.sg-card.swim .sg-art{background:linear-gradient(90deg,#e0f9e8cb,transparent 76%),url(sea.webp) center/cover;color:#144e50}.sg-art>img{position:absolute;max-width:none;width:auto;object-fit:contain}.sg-side{height:220%;left:69%;top:7%}.sg-lead{height:239%;left:47%;top:6%}.sg-word{position:absolute;left:4%;top:12%;display:grid;gap:3px}.sg-word small,.sg-kicker,.sg-filmlabel{font:700 10px Georgia,serif;letter-spacing:.12em}.sg-word b{font:700 clamp(29px,5vw,48px)/1.2 DFKai-SB,serif}.sg-word span{font-size:12px;letter-spacing:.16em;font-weight:bold}.sg-token{width:17px;height:17px;vertical-align:middle}.sg-actions button,.sg-skip{cursor:pointer;font-family:inherit}.sg-actions button{background:#fff4de;border:1px solid #bea075;border-radius:7px;color:#593b2a;padding:6px 10px}.sg-odds{font-size:12px;line-height:1.6}.sg-odds summary{cursor:pointer}.sg-dialog{padding:0;color:#503725;background:#fff6e6;width:min(740px,94vw);max-width:100%;max-height:92dvh;border:1px solid #9b7a54;border-radius:14px;box-shadow:0 10px 48px #201a1a66}.sg-dialog::backdrop{background:#201b19ac}.sg-dialog [hidden]{display:none!important}.sg-paper{padding:18px}.sg-paper h3{margin:5px 0 13px;font-size:21px}.sg-cinema{position:relative;overflow:hidden;background:#34272a}.sg-filmhead{position:absolute;top:0;inset-inline:0;padding:18px 19px 30px;background:linear-gradient(#121921b0,transparent);color:#fff2d8;pointer-events:none}.sg-filmhead b{display:block;margin-top:6px;font-size:19px}.sg-skip{position:absolute;bottom:max(15px,env(safe-area-inset-bottom));left:50%;transform:translateX(-50%);border:1px solid #ecd6af99;background:#30282bcf;color:#ffefcb;padding:10px 20px;border-radius:22px;min-height:44px}.sg-cinema canvas{display:block;width:100%;height:clamp(310px,60vh,520px)}.sg-strip{display:flex;overflow-x:auto;list-style:none;gap:8px;padding:2px 0 12px;scroll-snap-type:x proximity}.sg-strip:has(li:only-child){justify-content:center}.sg-prize{scroll-snap-align:start;flex:0 0 106px;position:relative;background:#f7e9cc;border:1px solid #c6ab88;border-radius:8px;overflow:hidden;text-align:center}.sg-prize:only-child{flex-basis:148px}.sg-prize>img{width:100%;height:135px;object-fit:cover;object-position:top}.sg-prize.minor>img{object-fit:contain;padding:22%}.sg-prize i{position:absolute;left:4px;top:4px;border-radius:20px;padding:2px 5px;background:#ffefccda;font:700 11px Georgia}.sg-prize b,.sg-prize small,.sg-choices b,.sg-choices small{display:block}.sg-prize small{padding:4px;font-size:11px}.sg-actions{display:flex;justify-content:center;gap:8px;margin-top:14px}.sg-actions button:disabled{opacity:.5}.sg-choices{display:grid;grid-template-columns:repeat(auto-fill,minmax(88px,1fr));gap:6px;overflow:auto;max-height:47dvh}.sg-choices label{position:relative;border:1px solid #cbb28b;border-radius:6px;text-align:center;background:#f2e5ce}.sg-choices input{position:absolute;left:3px;top:3px}.sg-choices img{height:62px;width:100%;object-fit:contain}.sg-choices label:has(:checked){background:#e6cb9f}.sg-choices small{font-size:11px}.sg-dialog.playing{position:fixed;inset:0;margin:0;width:100%;max-width:none;height:100%;height:100dvh;max-height:none;border:0;border-radius:0;overflow:hidden;box-sizing:border-box}.playing .sg-cinema,.playing .sg-cinema canvas{width:100%;height:100%}.playing .sg-filmhead{padding-top:max(18px,env(safe-area-inset-top));padding-left:max(19px,env(safe-area-inset-left));padding-right:max(19px,env(safe-area-inset-right))}@media(max-width:767px),(pointer:coarse) and (max-height:600px){.sg-side{height:193%}.sg-lead{height:210%}.sg-word small{font-size:8px}}

.sg-art>img,.sg-art,.sg-prize>img,.sg-cinema canvas{image-rendering:auto}.sg-filmhead .sg-filmlabel{color:#ffeecc}.sg-word>small{color:inherit;text-shadow:0 1px 2px #57332838}

/* 兩池固定採用雙人互動橫幅；不更動服裝獎品立繪。 */
.sg-card.christmas .sg-art.sg-duo{background:linear-gradient(90deg,#32172abf,transparent 50%),url(christmas-duo-review.webp) 66% 35%/cover;width:100%;height:auto;aspect-ratio:2.55;max-height:clamp(155px,28vw,206px)}
.sg-card.swim .sg-art.sg-duo{background:linear-gradient(90deg,#e6f9e6ce,transparent 50%),url(swim-duo-review.webp) 56% 25%/cover}
.sg-art-desc{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.sg-duo .sg-word{z-index:1}
.sg-card{container-type:inline-size}@container(max-width:310px){.sg-art.sg-duo{height:auto;aspect-ratio:2.12}.sg-duo .sg-word b{font-size:25px}}
@container(max-width:420px){.sg-card.swim .sg-art.sg-duo{height:auto;aspect-ratio:2.55;background-position:center,75% 30%}.sg-duo .sg-word{top:9%}}

/* 以卡寬決定字級，寬螢幕上的窄商店也保留人物旁的留白。 */
.sg-card.christmas .sg-word b{font-size:clamp(21px,8cqi,40px)}
.sg-card.christmas .sg-word small{font-size:clamp(7px,2cqi,10px)}
@media(orientation:landscape){
  .sg-card.swim .sg-art.sg-duo{width:100%;height:auto;aspect-ratio:2.75;max-height:clamp(155px,28vw,206px);background-position:center,38% 25%}
  .sg-card.swim .sg-word{left:3.5%}
  .sg-card.swim .sg-word b{font-size:clamp(18px,6.6cqi,36px)}
  .sg-card.swim .sg-word small{font-size:clamp(7px,1.85cqi,10px)}
}

/* 同一張票券的下半部。插畫區的裁切、文字位置與操作區互不影響。 */
.sg-card.christmas,.sg-dialog[data-book-theme="christmas"]{
 --sg-edge:#ab815c;--sg-gilt:#e3bd88;--sg-band1:#623741;--sg-band2:#3c2432;--sg-band3:#4e2e3b;
 --sg-ink:#ffead0;--sg-muted:#e7c8ac;--sg-line:#aa7b63;--sg-track:#301e2b;
 --sg-soft1:#fff2d6;--sg-soft2:#ebcba3;--sg-soft-ink:#552e32;--sg-rich1:#a14e52;--sg-rich2:#753841;--sg-rich-ink:#fff4dc;
 --sg-album:#50303e;--sg-spine:#8e525a;--sg-filigree:#d5a78133;
}
.sg-card.swim,.sg-dialog[data-book-theme="swim"]{
 --sg-edge:#71a89c;--sg-gilt:#f4deb0;--sg-band1:#dff2de;--sg-band2:#b4ddd0;--sg-band3:#c7e3d8;
 --sg-ink:#174e50;--sg-muted:#295d5a;--sg-line:#699d8e;--sg-track:#91bcad;
 --sg-soft1:#fff9df;--sg-soft2:#e7eacb;--sg-soft-ink:#214f4e;--sg-rich1:#2c8582;--sg-rich2:#1d625f;--sg-rich-ink:#fff8db;
 --sg-album:#e5f1df;--sg-spine:#397e79;--sg-filigree:#4b948940;
}
.sg-card{border-color:var(--sg-edge);box-shadow:0 2px 4px #4d332019}
.sg-ticketband{position:relative;isolation:isolate;color:var(--sg-ink);padding:9px clamp(7px,3cqw,15px) 4px;
 background:linear-gradient(118deg,var(--sg-band1),var(--sg-band2) 65%,var(--sg-band3));border-top:1px solid var(--sg-edge)}
.sg-ticketband::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none}
.christmas .sg-ticketband::before{background:
 radial-gradient(circle at 5% 27%,#f7deac99 0 1px,transparent 1.5px),radial-gradient(circle at 88% 61%,#f7deac88 0 1px,transparent 1.5px),
 repeating-linear-gradient(55deg,transparent 0 7px,#e0ab7920 7px 8px,transparent 8px 13px);mask-image:linear-gradient(90deg,#000,transparent 35%,transparent 70%,#000)}
.swim .sg-ticketband::before{background:repeating-radial-gradient(ellipse at 103% 124%,transparent 0 9px,var(--sg-filigree) 10px 11px,transparent 12px 17px);mask-image:linear-gradient(95deg,#0007,transparent 40%,#000b)}
.sg-foil{height:13px;display:flex;gap:6px;align-items:center;justify-content:center;margin:-7px 1px 4px;color:var(--sg-gilt);pointer-events:none}
.swim .sg-foil{color:#4e897d}.sg-foil i{flex:1;height:1px;background:linear-gradient(90deg,transparent,var(--sg-line))}.sg-foil i:last-child{transform:scaleX(-1)}.sg-foil svg{width:32px;height:16px;stroke-width:1.6}
.sg-ticketband .sg-prices{display:grid;grid-template-columns:1fr 1.09fr;gap:8px}
.sg-ticketband .sg-fare{--tk-line:#bb9c73;--tk-foil:#fff8e2aa;--tk-ink:var(--sg-soft-ink);position:relative;isolation:isolate;
 display:grid;grid-template-columns:minmax(0,.93fr) minmax(0,1fr);align-items:center;justify-content:stretch;min-width:0;min-height:48px;
 padding:4px 7px;overflow:hidden;border:1px solid var(--tk-line);border-radius:7px;color:var(--tk-ink);
 background:linear-gradient(146deg,var(--sg-soft1),var(--sg-soft2));box-shadow:inset 0 0 0 2px var(--tk-foil),0 2px 1px #1d182436;cursor:pointer;font-family:inherit;touch-action:manipulation}
.sg-ticketband .sg-fare[data-n="10"]{--tk-line:var(--sg-gilt);--tk-foil:#f9e5ab52;--tk-ink:var(--sg-rich-ink);background:linear-gradient(135deg,var(--sg-rich1),var(--sg-rich2))}
.sg-fare::before,.sg-fare::after{content:"";position:absolute;width:10px;height:10px;top:50%;margin-top:-5px;border:1px solid var(--tk-line);border-radius:50%;background:var(--sg-band1);pointer-events:none}
.sg-fare::before{left:-7px}.sg-fare::after{right:-7px;background:var(--sg-band2)}
.sg-fare .sg-fare-cost,.sg-fare .sg-fare-count{position:relative;display:flex;align-items:center;justify-content:center;white-space:nowrap}
.sg-fare .sg-fare-cost{gap:4px;min-height:30px;border-right:1px dashed currentColor}.sg-fare-cost img{width:17px;height:17px;object-fit:contain;filter:drop-shadow(0 1px 0 #fff6)}.sg-fare-cost b{font:700 16px/1 Georgia,serif;color:inherit;font-variant-numeric:tabular-nums}
.sg-fare .sg-fare-count{gap:2px;font:700 14px/1.25 "Microsoft JhengHei",sans-serif}.sg-fare-count>span{font:inherit;opacity:.9}.sg-fare-count strong{font:700 22px/1 Georgia,serif;color:inherit}
.sg-ticketband .sg-foot{display:flex;align-items:center;justify-content:space-between;gap:10px;padding-top:3px}
.sg-pity{width:min(40%,145px);min-width:85px;display:grid;gap:4px;color:var(--sg-muted)}
.sg-pity span{display:flex;align-items:baseline;justify-content:space-between;gap:3px;font:600 11px/1.25 "Microsoft JhengHei",sans-serif;white-space:nowrap}.sg-pity b{font:700 11px/1 Georgia,serif;font-variant-numeric:tabular-nums;color:var(--sg-ink)}
.sg-pity progress{appearance:none;display:block;width:100%;height:3px;border:0;border-radius:5px;overflow:hidden;background:var(--sg-track);color:var(--sg-ink)}.sg-pity progress::-webkit-progress-bar{background:var(--sg-track)}.sg-pity progress::-webkit-progress-value{background:linear-gradient(90deg,var(--sg-line),var(--sg-ink));border-radius:5px}.sg-pity progress::-moz-progress-bar{background:var(--sg-ink)}
.sg-ticketband .sg-album{position:relative;isolation:isolate;min-height:44px;display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:2px 7px 2px 3px;border:0;background:transparent;color:var(--sg-ink);font:700 13px/1.25 "Microsoft JhengHei",sans-serif;cursor:pointer;touch-action:manipulation}
.sg-album::before{content:"";position:absolute;z-index:-1;inset:6px 0 5px 9px;background:var(--sg-album);border:1px solid var(--sg-line);border-radius:3px 11px 11px 3px;box-shadow:0 1px 1px #24172422}
.sg-album b{color:var(--sg-muted);font:600 11px/1.2 "Microsoft JhengHei",sans-serif}.sg-album i{font:700 19px/1 Georgia,serif;opacity:.85}
.sg-mini-book{position:relative;display:grid;place-items:center;width:26px;height:30px;transform:rotate(-7deg);border:1px solid var(--sg-edge);border-left:3px solid var(--sg-rich2);border-radius:2px 4px 3px 2px;background:linear-gradient(110deg,var(--sg-spine),var(--sg-rich2));box-shadow:1px 1px 0 #f9e8bd,2px 2px 0 var(--sg-edge)}
.sg-mini-book img{width:18px;height:18px;object-fit:contain}.sg-mini-book::after{content:"";position:absolute;bottom:-4px;right:3px;width:5px;height:6px;background:var(--sg-gilt);clip-path:polygon(0 0,100% 0,100% 100%,50% 68%,0 100%)}
.sg-ticketband button:focus-visible{outline:3px solid var(--sg-ink);outline-offset:1px}.sg-ticketband button:active{transform:translateY(1px)}
@media(hover:hover){.sg-ticketband button:hover{filter:brightness(1.06)}}
@container(max-width:306px){.sg-ticketband{padding-inline:7px}.sg-ticketband .sg-prices{gap:5px}.sg-fare-cost img{width:15px;height:15px}.sg-fare-cost b{font-size:14px}.sg-fare-count strong{font-size:19px}.sg-ticketband .sg-fare{padding-inline:3px}.sg-ticketband .sg-album{gap:4px}}
/* 打開後的集章冊延續同一款封面、印章與裝訂色。 */
.sg-dialog[data-book-theme]{border-color:var(--sg-edge)}
.sg-book-cover{position:relative;display:flex;align-items:center;gap:12px;margin:7px 0 11px;padding:10px 15px;color:var(--sg-ink);border:1px solid var(--sg-edge);border-left:5px solid var(--sg-spine);border-radius:3px 9px 9px 3px;background:linear-gradient(125deg,var(--sg-band1),var(--sg-band2));box-shadow:inset 0 0 0 2px var(--sg-filigree)}
.sg-book-cover .sg-token{width:35px;height:35px}.sg-book-cover b,.sg-book-cover small{display:block}.sg-book-cover small{color:var(--sg-muted);font-size:12px;margin-top:3px}
.sg-dialog[data-book-theme] .sg-choices label:has(:checked){background:var(--sg-soft2);border-color:var(--sg-rich2)}.sg-dialog[data-book-theme] .sg-actions [data-exchange]:enabled{background:var(--sg-rich2);border-color:var(--sg-edge);color:var(--sg-rich-ink)}

/* 分鏡字卡只寫片名；等級透過動畫材質表現。 */
.sg-filmhead{padding: max(23px,env(safe-area-inset-top)) 22px 32px;background:linear-gradient(180deg,#2c233d8a,transparent);text-shadow:0 1px 3px #241b39aa}
.sg-filmhead b{margin-top:5px;color:#fff7e5;font:600 clamp(18px,4.6vw,25px)/1.2 "Noto Serif TC","PMingLiU",serif;letter-spacing:.14em}
.sg-filmhead .sg-filmlabel{display:flex;align-items:center;gap:7px;font:700 9px/1.3 Georgia,serif;letter-spacing:.20em;color:#fff3d6}.sg-filmlabel:before{content:"";width:16px;border-top:1px solid currentColor}
.sg-cinema[data-scene=ramune] .sg-filmhead{background:linear-gradient(#315865a3,transparent)}
.sg-cinema .sg-skip{font-size:13px;letter-spacing:.10em;background:#382d3bd9}.sg-cinema[data-scene=ramune] .sg-skip{background:#264d58db}

/* 機率簿：先給全池摘要，再依池別、獎種展開；數字靠右，窄畫面也能掃讀。 */
.sg-odds{background:#fff5df;border:1px solid #bd9b72;border-radius:10px;color:#4a3228;font-size:14px;line-height:1.55}
.sg-odds .sg-only-text{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.sg-odds summary{padding:9px 12px;font-weight:bold;list-style:none;display:flex;gap:.55em;align-items:center;min-height:42px;box-sizing:border-box}
.sg-odds summary::-webkit-details-marker{display:none}
.sg-odds summary::before{content:"";display:block;flex:none;width:6px;height:6px;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(-45deg)}
.sg-odds details[open]>summary::before,.sg-odds[open]>summary::before{transform:rotate(45deg)}
.sg-odds summary:focus-visible{outline:2px solid #805e30;outline-offset:-3px}
.sg-odds>summary{font-size:16px}.sg-odds-body{padding:0 11px 9px}.sg-odds-body h4,.sg-odds-inside>p{margin:4px 0 6px;font:inherit;font-size:12px;color:#66503d}
.sg-odds dl,.sg-odds dd{margin:0}.sg-odds-totals{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.sg-odds-totals>div{padding:6px 2px;border:1px solid #d9ba84;border-radius:6px;background:#fae9ca;text-align:center}
.sg-odds-totals dt{font-size:12px}.sg-odds-totals dd{font-size:20px;font-weight:bold;line-height:1.2;color:#593827}
.sg-odds .sg-rules{display:grid;gap:4px;margin:10px 0}.sg-rules>div{display:grid;grid-template-columns:3.4em 1fr;gap:3px}.sg-rules dt{font-weight:bold;color:#694c38}
.sg-pool-odds{margin:6px 0;border:1px solid #b99673;border-radius:7px;overflow:hidden}.sg-pool-odds.christmas>summary{background:#603c4e;color:#fff2d5}.sg-pool-odds.swim>summary{background:#285d60;color:#eff9e4}
.sg-odds-inside{padding:6px 8px;background:#fffaf0}.sg-prize-group+.sg-prize-group,.sg-odds-note{border-top:1px solid #dfcaaa}
.sg-prize-group summary{padding:7px 4px;font-size:13px}.sg-prize-group summary b,.sg-odds-list dd{margin-left:auto;font-variant-numeric:tabular-nums}
.sg-odds-list>div{display:flex;justify-content:space-between;gap:8px;padding:5px 9px;background:#fbf0dc}.sg-odds-list>div:nth-child(even){background:#fff9ed}.sg-odds-list dd{white-space:nowrap;font-weight:bold}
.sg-odds-note{margin-top:7px}.sg-odds-note summary{padding:6px 2px;color:#674f3e;font-size:13px}.sg-odds-note p{margin:5px 0}

/* 兌換時直接展示選定的全身原圖；不套用抽卡翻面或計時關閉。 */
.sg-dialog.stamp-result{width:min(640px,94vw);background:#fff5df}
.sg-dialog.stamp-result .sg-paper{padding:0}
.sg-stamp-receipt{display:grid;grid-template-columns:1.1fr 1fr;align-items:stretch}
.sg-stamp-art{display:grid;place-items:center;min-width:0;padding:14px;box-sizing:border-box;background:linear-gradient(0deg,#51334152,transparent 45%),url(cine-winter-bg.webp) center/cover}
[data-book-theme=swim] .sg-stamp-art{background:linear-gradient(0deg,#33615a38,transparent 45%),url(cine-summer-bg.webp) center/cover}
.sg-stamp-art img{display:block;width:100%;height:clamp(200px,60dvh,440px);object-fit:contain;image-rendering:auto;filter:drop-shadow(0 4px 5px #33251d3a)}
.sg-stamp-slip{display:flex;flex-direction:column;justify-content:center;padding:clamp(16px,3vw,32px);border-left:1px dashed #bca57c;background:linear-gradient(120deg,#fffbef,#f8e9cd);color:#503824}
.sg-stamp-slip header{display:flex;align-items:center;gap:9px;font-size:14px;font-weight:bold;letter-spacing:.09em;color:var(--sg-rich2)}
.sg-stamp-slip header img{width:34px;height:34px}.sg-stamp-slip header small{font-size:10px;letter-spacing:.14em}
.sg-stamp-slip h3{font:700 clamp(25px,4vw,34px)/1.2 Georgia,"Microsoft JhengHei",serif;margin:14px 0 18px;letter-spacing:.08em}
.sg-stamp-slip h3:focus{outline:none}.sg-stamp-tag{font-size:12px;font-weight:bold;letter-spacing:.08em;margin:0 0 3px;color:var(--sg-rich2)}
.sg-stamp-name{font-size:23px;line-height:1.4}.sg-stamp-note{margin:2px 0 0;font-size:13px;color:#725538}
.sg-stamp-slip dl{margin:16px 0;padding:8px 0;border-block:1px dashed #bca57c;font-size:14px}
.sg-stamp-slip dl div{display:flex;justify-content:space-between;gap:1em;padding:3px 0}.sg-stamp-slip dd{margin:0;font-weight:bold}
.sg-stamp-slip button{width:100%;min-height:44px;border:1px solid var(--sg-edge);border-radius:7px;background:var(--sg-rich2);color:var(--sg-rich-ink);font-size:15px;font-family:inherit;font-weight:bold;cursor:pointer}
@media(max-width:530px) and (orientation:portrait){
 .sg-stamp-receipt{grid-template-columns:1fr}.sg-stamp-art{padding:10px}.sg-stamp-art img{height:clamp(150px,42dvh,350px)}
 .sg-stamp-slip{border-left:0;border-top:1px dashed #bca57c;padding:15px 22px;display:grid;grid-template-columns:1fr auto;align-items:center}
 .sg-stamp-slip header{grid-column:2;grid-row:1;justify-self:end}.sg-stamp-slip h3{grid-row:1;grid-column:1;margin:0}
 .sg-stamp-tag,.sg-stamp-name,.sg-stamp-note,.sg-stamp-slip dl,.sg-stamp-slip button{grid-column:1/-1}
 .sg-stamp-tag{margin-top:12px}.sg-stamp-slip dl{margin:10px 0}
}
