/* STEP 12 (14 Nov 2026): the user's glass story art. Place pictures, pin markers, boss/chapter banners, cutscene frame.
   Pictures: art/story/place-*.webp, pin-*.webp, pin-locked/current/done.webp, win-chapter/boss/cutscene.webp, star*.webp (made by art/make_story_art.py). */

/* ---- pins: the new glass pins are slimmer than the old numbered ones; the state markers sit on them ---- */
/* F14: both islands use the numbered pins 1-7. No tick, no floating gold pin. Locked = the same pin dimmed; finished = the earned gold stars under the pin; next = the pin bobs */
.stpin .stpimg{position:relative}
.stpin.locked .stpimg{filter:grayscale(.9) brightness(.55) drop-shadow(0 3px 4px rgba(0,0,0,.5))}

/* ---- panel header: the place's glass picture; a boss's name sits on the boss banner ---- */
html body .stpanel .stname.hasplace{position:relative; width:100%; box-sizing:border-box; height:clamp(42px,11.5vh,84px); padding:0; margin:0 0 2px; border-radius:10px; overflow:hidden; display:flex; align-items:flex-end; justify-content:center;
  border:1.5px solid #c8943f; box-shadow:0 0 0 1px #2e1c0e, 0 4px 10px rgba(0,0,0,.45)}
html body .stpanel .stname.hasplace::after{display:none}
.stname.hasplace::before{content:""; position:absolute; inset:0; z-index:1; background:linear-gradient(180deg,rgba(8,5,2,0) 35%,rgba(8,5,2,.82))}
.stplaceimg{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:50% 55%}
.stname.hid .stplaceimg{filter:brightness(.4) blur(2px)}
.stnamebox{position:relative; z-index:2; display:grid; justify-items:center; gap:2px; padding:0 8px 4px; line-height:1}
html body .stpanel .stname.hasplace .stlogo{display:none}
/* the boss's banner (thorny red): the name on its parchment, overlapping the bottom of the picture */
html body .stpanel .stname.isboss{overflow:visible; margin-bottom:6px}
html body .stpanel .stname.isboss .stplaceimg{border-radius:9px}
html body .stpanel .stname.isboss::before{border-radius:9px}
html body .stpanel .stname.isboss .stnamebox{container-type:inline-size; width:min(78%,230px); aspect-ratio:900/282; box-sizing:border-box; padding:0; margin-bottom:-14px; align-content:center; background:url(../art/story/win-boss.webp) center/100% 100% no-repeat; filter:drop-shadow(0 3px 5px rgba(0,0,0,.6))}
html body .stpanel .stname.isboss .stnamebox b:not(#_):not(#_){font-size:max(10.5px,6.4cqw); color:#3a1d0c; text-shadow:none; line-height:1; margin-top:1%; max-width:56%; text-align:center; white-space:nowrap}
html body .stpanel .stname.isboss .stnamebox small{display:none}

/* ---- chapter title banner in the top bar ---- */
html body .stbar .stch>span{position:relative; width:clamp(240px,40vw,350px); aspect-ratio:900/224; box-sizing:border-box; padding:8.6% 9% 3.4%;   /* (17 Nov 2026) a longer banner so the whole chapter title fits on it */ margin:-8px 0 -12px; gap:1px; align-content:center; justify-items:center;
  background:url(../art/story/win-chapter.webp) center/100% 100% no-repeat; filter:drop-shadow(0 3px 5px rgba(0,0,0,.5))}
html body .stbar .stch>span b{font-size:clamp(10px,3.3vh,15px); line-height:1.05; color:#3b2410; text-shadow:none; white-space:nowrap; font-weight:700}
html body .stbar .stch .stdots i{background:rgba(59,36,16,.35); box-shadow:none}
html body .stbar .stch .stdots i.on{background:#7a4a14}
.stdots{display:flex; gap:5px; justify-content:center}

/* ---- boss card (the Shark King's three games) ---- */
#bossCard{flex-wrap:wrap; padding-top:28px}
#bossCard .bcban{position:absolute; left:50%; top:0; transform:translate(-50%,-52%); width:min(250px,60%); aspect-ratio:900/282; display:grid; place-items:center; filter:drop-shadow(0 4px 8px rgba(0,0,0,.6))}
#bossCard .bcban img{position:absolute; inset:0; width:100%; height:100%; object-fit:fill; border-radius:0; aspect-ratio:auto; -webkit-mask:none; mask:none}
#bossCard .bcban b{position:relative; font-family:var(--f-display); font-weight:700; font-size:clamp(13px,2.6vw,18px); line-height:1; color:#3a1d0c; text-shadow:none; margin-top:1%; max-width:52%; white-space:nowrap; text-align:center}
#bossCard>img.bcface{width:min(150px,20vw)}

/* ---- the Ghoul's intro: the boss banner over the title ---- */
.sntext h2.bossban{position:relative; width:min(250px,80%); aspect-ratio:900/282; display:grid; place-items:center; margin:0; text-shadow:none; filter:drop-shadow(0 3px 6px rgba(0,0,0,.6))}
.sntext h2.bossban img{position:absolute; inset:0; width:100%; height:100%}
.sntext h2.bossban span{position:relative; font-size:clamp(13px,2.6vw,18px); line-height:1; color:#3a1d0c; margin-top:1%; white-space:nowrap}

/* ---- cutscene frame (F20, 14 Nov 2026): the leafy frame was removed again; the cutscenes wear the previous cushion frame (story.css .cframe).
   The leafy picture is kept in art/story/old-2026-11-14/win-cutscene.webp. Only the place picture behind a talking face stays here. ---- */
.cframe.hasplace::after{content:""; position:absolute; inset:0; background:linear-gradient(90deg,rgba(6,4,2,.25),rgba(6,4,2,.55)); z-index:0; pointer-events:none}
html body .stcomic .cframe img.cbg.place{animation:none}
.cframe.hasplace>.cface,.cframe.hasplace>.cbubble{position:relative; z-index:1}

@media (max-width:760px){ html body .stbar .stch{justify-self:end} }
.stname.hasplace small{white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:100%}
@media (max-height:350px){ .stname.hasplace small{display:none} }
@media (max-height:380px){ html body .stpanel .stname.hasplace{height:34px} html body .stpanel .stname.isboss{height:40px} }

/* ---------- install step 14 (14 Nov 2026): animated story characters (art/story/anim/*.webp) ---------- */
.stflash img{background:#181818; -webkit-mask:radial-gradient(closest-side, #000 72%, transparent); mask:radial-gradient(closest-side, #000 72%, transparent); box-shadow:none; border-radius:0; width:auto; height:auto; max-width:min(86vw,90vh); max-height:min(86vh,90vw)}
.stflash.small{background:none; place-items:end center; padding-bottom:2vh}
.stflash.small img{max-width:none; max-height:none; width:min(46vh,40vw); height:auto; opacity:.95}
.stflash.small.go img{animation:stpop 1.6s ease-out both}
/* B19: beside a seat (position and size come from storyFlash), never over the hand */
.stflash.small.side{place-items:start}
.stflash.small.side img{position:absolute; max-width:none; max-height:none}
@keyframes stpop{0%{opacity:0; transform:translateY(24%) scale(.8)} 14%{opacity:.95; transform:none} 82%{opacity:.95} 100%{opacity:0; transform:translateY(6%)}}
#sharkFx .ssurge{background:none; width:min(62vw,88vh); aspect-ratio:1; -webkit-mask:radial-gradient(closest-side, #000 70%, transparent); mask:radial-gradient(closest-side, #000 70%, transparent)}
#sharkFx .ssurge img{display:block; width:100%; height:100%; object-fit:contain}
.sngwrap{position:relative; min-width:0; justify-self:stretch}
.sngwrap .sngrave{display:block}
.sngwrap .snstalk{position:absolute; right:3%; bottom:3%; height:48%; width:auto; pointer-events:none; box-shadow:none;
  -webkit-mask:radial-gradient(closest-side, #000 70%, transparent); mask:radial-gradient(closest-side, #000 70%, transparent)}
.snghoul.snanim{width:min(100%,calc(100vh - 28px),380px); height:auto; aspect-ratio:1; object-fit:contain; border-radius:50%; -webkit-mask:radial-gradient(closest-side, #000 72%, transparent); mask:radial-gradient(closest-side, #000 72%, transparent)}
/* F16: every animated character picture has the same flat grey backdrop (about #181818); the frame behind it and the flash behind it use the same grey, and the picture's edges fade into it, so no box shows */
html body .stcomic .cframe.hasanim{background:#181818}
html body .stcomic .cframe img.cbg.anim{object-fit:contain; animation:none; background:#181818; -webkit-mask:radial-gradient(ellipse at center,#000 62%,transparent 98%); mask:radial-gradient(ellipse at center,#000 62%,transparent 98%)}
html body .stcomic .cframe img.cbg.minions{animation:none; filter:brightness(.55) saturate(.9)}
@media (prefers-reduced-motion:reduce){.stflash.small.go img{animation:none}}
/* short phone screens: the boss intro and the prize screens (text column) must fit without scrolling */
@media (max-height:420px){
  .stnight{padding:8px 16px; gap:10px}
  .sntext{gap:4px}
  .sntext h2{font-size:22px}
  .sntext p{font-size:12px; line-height:1.25}
  .sntext .rbtns .btn,.sntext .rbtns .ghost{min-height:34px; padding-top:4px; padding-bottom:4px; font-size:14px}
  .stprizes{margin:0; gap:10px}
  .stprizes .av{width:38px; height:38px}
  .stprizes .tthumb{width:84px; height:40px}
  .stprizes .dthumb{width:32px; height:46px}
  .stprizes small{font-size:11px}
  .snghoul.snanim{width:min(100%,calc(100vh - 28px),380px)}
}

/* ---------- FIX ROUND 2 F13 (14 Nov 2026): the text banners use the paper of the Kalho Akiri banner (art/story/banner-paper.webp, cut from win-boss.webp)
   with the same dark brown writing as that banner; no scenery picture behind any text banner ---------- */
html body .stpanel .stname.hasplace{align-items:center}
.stname.hasplace::before{display:none}
html body .stpanel .stname.hasplace .stnamebox{padding:0 8px; gap:3px}
html body .stpanel .stname.hasplace:not(.isboss) .stnamebox b:not(#_):not(#_){color:#3a1d0c; text-shadow:none}
html body .stpanel .stname.hasplace:not(.isboss) .stnamebox small:not(#_){color:#5a3a1c; font-weight:800}
html body .stpanel .stname.hid .stnamebox b{color:#3a1d0c}
/* the boss: only his own banner, no picture behind it */
html body .stpanel .stname.isboss:not(#_){background:none; border:0; box-shadow:none; height:auto; overflow:visible; margin-bottom:0; align-items:center}
html body .stpanel .stname.isboss .stnamebox:not(#_){margin-bottom:0}
@media (max-height:380px){ html body .stpanel .stname.isboss:not(#_){height:auto} html body .stpanel .stname.isboss .stnamebox{width:min(70%,170px)} }
@media (max-width:700px){ html body .stbar .stch>span{width:clamp(196px,33vw,230px); padding:9% 9% 3.6%} }

/* (18 Nov 2026, user: "keep the banner in the same position ... it should not go on top of the map") the chapter banner sits in the middle of the top bar,
   the same place in every chapter, and it ends where the bar ends: the map starts below it. (Chapters 4 and up used to shift it because their
   bar had no Story book button; that button now keeps its place and is only made invisible.) */
html body .stbar{grid-template-columns:minmax(0,1fr) auto !important}
html body .stbar .stch{justify-self:center !important; grid-column:1}
html body .stbar .sthead{justify-self:end; grid-column:2}
html body .stbar .stch>span{margin:0 !important}
