/* 一個經紀七個后 — plum velvet, champagne gold, rose: a luxury talent-agency look */
:root {
  --plum: #2a0f2e; --plum2: #3d1642; --plum3: #5a2160; --ink: #12060f;
  --gold: #e8c77a; --gold2: #f8e6b0; --gold3: #b88a3a;
  --rose: #ff7aa8; --text: #fff4e0; --muted: #dcc6d8; --cyan: #8af2ff;
  --ol: 0 2px 0 #1a0619, 1px 1px 0 #2a0f2e, -1px 1px 0 #2a0f2e, 1px -1px 0 #2a0f2e, -1px -1px 0 #2a0f2e, 0 3px 8px rgba(0,0,0,.55);
  --ol-lite: 0 1px 0 #1a0619, 1px 0 0 #2a0f2e, -1px 0 0 #2a0f2e, 0 -1px 0 #2a0f2e, 0 2px 5px rgba(0,0,0,.5);
  --card: linear-gradient(180deg, rgba(78,28,84,.92), rgba(36,10,40,.94));
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { width: 100%; height: 100%; overflow: hidden; }
body {
  color: var(--text); font-family: Georgia, serif; user-select: none; -webkit-user-select: none; touch-action: manipulation;
  background: radial-gradient(ellipse at 50% 40%, #3a1440 0%, #12060f 70%) #12060f;
}
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
[data-act] { cursor: pointer; }
.hidden { display: none !important; }
#app {
  position: fixed; top: 0; bottom: 0; left: 0; right: 0; margin: 0 auto;
  width: min(100vw, 56.25vh); overflow: hidden; background: var(--ink);
  box-shadow: 0 0 60px rgba(0,0,0,.6);
}
.layer { position: absolute; inset: 0; overflow: hidden; }
.ico { display: inline-flex; width: 1.15em; height: 1.15em; vertical-align: -.2em; flex: none; align-items: center; justify-content: center; }
.ico svg { width: 100%; height: 100%; display: block; }
img.ico { object-fit: contain; }
.charview { display: block; width: 100%; height: 100%; }
.gold-t { color: var(--gold2); }

/* ---------------- 9-slice panel + buttons (drawn fallback until the art is cropped) ---------------- */
.panel {
  background: linear-gradient(180deg, rgba(76,26,80,.97), rgba(36,9,40,.98));
  border: 2px solid var(--gold); border-radius: 1rem;
  box-shadow: inset 0 0 0 1px #6b4a18, 0 12px 30px rgba(0,0,0,.6);
}
html.panel-ready .panel {
  border: 2px solid transparent; border-radius: 0; background: none; box-shadow: none;
  border-image: var(--panel-src) var(--panel-slice) fill / 1.9rem / 0 stretch;
  filter: drop-shadow(0 10px 20px rgba(0,0,0,.55));
}
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: .3rem;
  min-height: max(46px, 2.9rem); min-width: max(46px, 2.9rem); padding: .45rem 1.1rem;
  font-weight: 800; font-size: 1rem; line-height: 1.15; color: var(--text); text-shadow: var(--ol-lite);
  border-radius: .8rem; background: linear-gradient(180deg, #6e2c74, #3a1140);
  border: 1.5px solid rgba(232,199,122,.75);
  box-shadow: 0 3px 0 #16040f, inset 0 1px 0 rgba(255,255,255,.22);
  transition: transform .12s, filter .12s, opacity .12s; white-space: nowrap;
}
.btn.gold {
  color: #3a1508; text-shadow: 0 1px 0 rgba(255,246,214,.75);
  background: linear-gradient(180deg, #fff2c4, #e8c77a 48%, #b8862e); border-color: #fff3c8;
  box-shadow: 0 3px 0 #6b4310, 0 0 16px rgba(232,199,122,.35);
}
html.btn-ready .btn.gold {
  border: 2px solid transparent; border-radius: 0; background: none; box-shadow: none;
  border-image: var(--btn-src) var(--btn-slice) fill / 1.45rem / 0 stretch;
  filter: drop-shadow(0 3px 0 rgba(70,30,6,.85)) drop-shadow(0 0 8px rgba(232,199,122,.3));
}
.btn.small { min-height: max(44px, 2.75rem); padding: .3rem .8rem; font-size: .9rem; }
.btn.wide { width: 100%; }
.btn.big { min-height: max(54px, 3.4rem); padding: .5rem 2.4rem; font-size: 1.25rem; }
.btn.dim { opacity: .55; }
.btn.off { opacity: .42; filter: grayscale(.7); cursor: default; }
.btn.ad { background: linear-gradient(180deg, #3fd1b5, #137a6e); border-color: #b6fff0; box-shadow: 0 3px 0 #06352f; }
.btn .ico { width: 1.15em; height: 1.15em; }
.pressed { animation: press .26s ease-out; }
@keyframes press { 0% { transform: scale(1); } 35% { transform: scale(.93, .88); } 70% { transform: scale(1.05); } 100% { transform: scale(1); } }
@media (hover: hover) {
  [data-act]:not(.off):hover { filter: brightness(1.13); }
  html.btn-ready .btn.gold:hover { filter: brightness(1.12) drop-shadow(0 3px 0 rgba(70,30,6,.85)) drop-shadow(0 0 12px rgba(255,220,140,.6)); }
  .btn:not(.off):hover, .nav-btn:hover, .side-btn:hover { transform: translateY(-1px) scale(1.03); }
}
body.keynav .kfocus {
  outline: 3px solid #fff1c2; outline-offset: 3px; z-index: 3;
  box-shadow: 0 0 0 6px rgba(232,199,122,.3), 0 0 22px rgba(255,214,120,.75);
  transform: scale(1.03);
}

/* ---------------- shared bits ---------------- */
.bar { position: relative; height: .45rem; border-radius: 99px; background: rgba(0,0,0,.5); overflow: hidden; box-shadow: inset 0 1px 2px rgba(0,0,0,.6); }
.bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #fff0b8, #e8b04a); transition: width .7s cubic-bezier(.2,.8,.2,1); }
.affbar i { background: linear-gradient(90deg, #ffc2d8, #ff4f8c); }
.chip { display: inline-flex; align-items: center; gap: .15rem; padding: .12rem .45rem; border-radius: 99px; font-size: .78rem; font-weight: 800; background: rgba(0,0,0,.38); border: 1px solid currentColor; }
.chip.sing { color: #ff9cc6; } .chip.act { color: #ffc27a; } .chip.charm { color: #cfa8ff; } .chip.mix { color: var(--cyan); }
.hearts { display: inline-flex; gap: 1px; vertical-align: middle; }
.hrt { width: .85rem; height: .85rem; display: inline-block; opacity: .28; filter: grayscale(1); }
.hrt.on { opacity: 1; filter: none; }
.hrt svg { width: 100%; height: 100%; display: block; }
.gemimg { filter: drop-shadow(0 0 3px rgba(140,240,255,.6)); }
.badge { position: absolute; top: -.35rem; right: -.2rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 99px; background: #ff3d6e; color: #fff; font-style: normal; font-size: .75rem; font-weight: 900; display: flex; align-items: center; justify-content: center; box-shadow: 0 0 0 2px #2a0f2e; animation: bob 1.2s ease-in-out infinite; }

/* ---------------- title ---------------- */
#title { cursor: pointer; z-index: 1; background: var(--ink); }
.title-art { position: absolute; inset: -2%; background: url(assets/cover-bg.webp) center 30% / cover no-repeat; animation: kenburns 22s ease-in-out infinite alternate; }
.title-vignette { position: absolute; inset: 0; overflow: hidden;
  background: linear-gradient(to bottom, rgba(18,6,15,.55) 0%, rgba(18,6,15,0) 34%, rgba(18,6,15,0) 60%, rgba(18,6,15,.88) 100%); }
.title-vignette::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,236,190,.13), transparent); animation: sweep 7s ease-in-out 1s infinite; }
.title-logo { position: absolute; left: 0; right: 0; margin: 0 auto; top: 5%; width: 84%; max-height: 31%; object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.65)); pointer-events: none; }
#title.enter .title-logo { animation: logoIn .75s cubic-bezier(.2,1.5,.4,1) both, logoFloat 4.5s ease-in-out .8s infinite; }
.title-start { position: absolute; left: 0; right: 0; bottom: calc(8% + env(safe-area-inset-bottom)); text-align: center; pointer-events: none; }
.title-start::before { content: ""; display: block; width: 46%; height: 1px; margin: 0 auto .7rem; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.title-tap { font-size: 1.4rem; font-weight: 900; letter-spacing: .14em; color: var(--gold2); text-shadow: var(--ol), 0 0 18px rgba(232,199,122,.55); animation: pulse 1.7s ease-in-out infinite; }
.title-key { margin-top: .45rem; font-size: .85rem; color: var(--muted); text-shadow: var(--ol-lite); }
#title.enter .title-start { animation: fadeUp .6s ease-out .45s both; }
@media (hover: none) and (pointer: coarse) { .title-key { display: none; } }

/* ---------------- hub ---------------- */
#hub { z-index: 1; }
.hub-bg { position: absolute; inset: -2%; background: url(assets/bg-office.webp) center / cover no-repeat; animation: kenburns 30s ease-in-out infinite alternate; }
.hub-shade { position: absolute; inset: 0;
  background: linear-gradient(to bottom, rgba(20,6,20,.72) 0%, rgba(20,6,20,0) 24%, rgba(20,6,20,0) 52%, rgba(20,6,20,.85) 80%, rgba(16,4,16,.97) 100%); }
.hub-star { position: absolute; left: 6%; right: 6%; top: 15%; bottom: 19%; }
.hud { position: absolute; left: .6rem; right: .6rem; top: calc(.6rem + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: .4rem; pointer-events: none; }
.hud > * { pointer-events: auto; }
.hud-top { display: flex; align-items: center; gap: .45rem; margin-right: 60px; }
.rank-badge { display: flex; align-items: center; gap: .45rem; min-height: 46px; padding: .2rem .85rem .2rem .2rem; border-radius: 99px;
  background: linear-gradient(90deg, rgba(42,15,46,.95), rgba(42,15,46,.65)); border: 1.5px solid rgba(232,199,122,.75); box-shadow: 0 4px 12px rgba(0,0,0,.45); min-width: 0; }
.rb-emblem { position: relative; width: 2.6rem; height: 2.6rem; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 35% 30%, #fff5cc, #e8c77a 45%, #8a5a14); box-shadow: 0 0 10px rgba(232,199,122,.6), inset 0 -2px 4px rgba(0,0,0,.35); }
.rb-emblem .ico { position: absolute; inset: .25rem; width: auto; height: auto; opacity: .38; }
.rb-emblem span { position: relative; font-size: 1.2rem; font-weight: 900; color: #3a1508; }
.rb-text { min-width: 0; }
.rb-co { font-size: .72rem; color: var(--muted); letter-spacing: .04em; white-space: nowrap; }
.rb-rank { font-size: 1.05rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol-lite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.day-chip { flex: none; padding: .3rem .7rem; border-radius: 99px; font-size: .9rem; font-weight: 800; background: rgba(18,4,18,.7); border: 1px solid rgba(232,199,122,.45); text-shadow: var(--ol-lite); }
.hud-res { display: flex; flex-wrap: wrap; gap: .35rem; }
.res { position: relative; display: flex; align-items: center; gap: .3rem; height: 2.2rem; min-width: 0; padding: 0 .65rem 0 .3rem; border-radius: 99px;
  background: rgba(24,6,26,.78); border: 1px solid rgba(232,199,122,.5); box-shadow: 0 3px 8px rgba(0,0,0,.35); }
.res .ico { width: 1.45rem; height: 1.45rem; }
.res b { font-size: 1.05rem; font-weight: 900; text-shadow: var(--ol-lite); white-space: nowrap; }
.res .bar { position: absolute; left: 2rem; right: .7rem; bottom: 3px; height: 3px; }
.res.fame b { margin-bottom: 3px; }
.res.ap b { color: var(--cyan); }
.res.ap.empty { border-color: #ff6b8a; animation: emptyPulse 1.2s ease-in-out infinite; }
.res.ap.empty b { color: #ffb0c0; }
.res.gem .plus { width: 1.1rem; height: 1.1rem; margin-left: .1rem; border-radius: 50%; background: linear-gradient(180deg, #8af2ff, #2a8fb0); color: #062a36; font-weight: 900; font-size: .9rem; line-height: 1.1rem; text-align: center; }
.side { position: absolute; right: .6rem; top: calc(7.8rem + env(safe-area-inset-top)); display: flex; flex-direction: column; gap: .55rem; align-items: center; }
.side-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .1rem; width: 3.7rem; min-height: 3.7rem; padding: .35rem .1rem .3rem;
  border-radius: 1rem; background: rgba(42,15,46,.85); border: 1.5px solid rgba(232,199,122,.65); color: var(--gold2); font-size: .74rem; font-weight: 800; text-shadow: var(--ol-lite);
  box-shadow: 0 4px 10px rgba(0,0,0,.45); transition: transform .12s; }
.side-btn .ico { width: 1.65rem; height: 1.65rem; }
.side-btn.glow { background: linear-gradient(180deg, #fff0c0, #e8c77a 50%, #a8761e); color: #3a1508; text-shadow: none; border-color: #fff6d6; animation: glowPulse 1.4s ease-in-out infinite; }
.bubble { position: absolute; top: 17%; left: 40%; max-width: 56%; padding: .55rem .85rem; border-radius: 1rem; font-size: .92rem; line-height: 1.45;
  background: rgba(255,248,242,.95); color: #3a1230; box-shadow: 0 6px 16px rgba(0,0,0,.4); animation: popIn .32s cubic-bezier(.2,1.5,.4,1); pointer-events: none; }
.bubble::after { content: ""; position: absolute; left: 1.1rem; bottom: -.55rem; border: .35rem solid transparent; border-top: .6rem solid rgba(255,248,242,.95); border-bottom: 0; }
.hub-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 .6rem calc(.65rem + env(safe-area-inset-bottom));
  display: grid; grid-template-columns: 1fr auto; gap: .55rem .6rem; align-items: center; }
.star-plate { min-width: 0; min-height: 3rem; padding: .3rem .8rem; border-left: 3px solid var(--gold); border-radius: .3rem .8rem .8rem .3rem;
  background: linear-gradient(90deg, rgba(42,15,46,.92), rgba(42,15,46,.35)); }
.sp-name { font-size: 1.25rem; font-weight: 900; text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-sub { display: flex; align-items: center; gap: .4rem; font-size: .8rem; color: var(--gold2); white-space: nowrap; overflow: hidden; }
.endday { min-height: max(48px, 3rem); padding: .4rem 1.2rem; font-size: 1.02rem; }
.navbar { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.nav-btn { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15rem; min-height: 3.8rem; padding: .3rem .1rem;
  border-radius: .95rem; background: linear-gradient(180deg, rgba(92,34,98,.96), rgba(40,12,44,.97)); border: 1.5px solid rgba(232,199,122,.7);
  color: var(--gold2); font-size: .85rem; font-weight: 800; text-shadow: var(--ol-lite); box-shadow: 0 3px 0 #12040f, inset 0 1px 0 rgba(255,255,255,.16); transition: transform .12s; }
.nav-btn .ico { width: 1.55rem; height: 1.55rem; filter: drop-shadow(0 1px 0 #1a0619); }
.nav-btn span { white-space: nowrap; }

/* ---------------- pages ---------------- */
#page { z-index: 5; display: flex; flex-direction: column; background: var(--ink); }
#page.slide { animation: slideIn .3s cubic-bezier(.2,1.2,.4,1); }
.page-bg { position: absolute; inset: -4%; background: url(assets/bg-office.webp) center / cover; filter: blur(7px) brightness(.32) saturate(1.25); }
.page-head { position: relative; display: flex; align-items: center; gap: .5rem; min-height: 3.7rem; padding: calc(.55rem + env(safe-area-inset-top)) 62px .45rem .6rem; }
.page-head h1 { flex: 1; min-width: 0; font-size: 1.3rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.back-btn { flex: none; width: max(46px, 2.9rem); height: max(46px, 2.9rem); border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(42,15,46,.9); border: 1.5px solid var(--gold); color: var(--gold2); box-shadow: 0 3px 0 #12040f; }
.back-btn svg { width: 1.3rem; height: 1.3rem; }
.page-res { flex: none; display: flex; align-items: center; gap: .2rem; padding: .3rem .6rem; border-radius: 99px; background: rgba(0,0,0,.4); border: 1px solid rgba(232,199,122,.3); font-size: .9rem; }
.page-res b { margin-right: .35rem; font-weight: 900; }
.page-res b:last-child { margin-right: 0; color: var(--cyan); }
.page-body { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: .4rem .75rem calc(1.4rem + env(safe-area-inset-bottom)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.page-body::-webkit-scrollbar { display: none; }
.card { position: relative; border-radius: .9rem; background: var(--card); border: 1px solid rgba(232,199,122,.45); box-shadow: 0 5px 14px rgba(0,0,0,.4), inset 0 1px 0 rgba(255,255,255,.1); transition: transform .12s; }
.card.locked { opacity: .55; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.list { display: flex; flex-direction: column; gap: .55rem; }
.star-card { overflow: hidden; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at 50% 26%, rgba(255,190,230,.28), transparent 60%), var(--card); }
.star-card.feat { border-color: var(--gold); box-shadow: 0 0 0 1.5px var(--gold), 0 0 18px rgba(232,199,122,.4); }
.star-card.feat::after { content: "★"; position: absolute; top: .4rem; right: .5rem; color: var(--gold2); font-size: 1.1rem; text-shadow: var(--ol-lite); }
.sc-portrait { width: 100%; aspect-ratio: 3 / 4; background-repeat: no-repeat; background-size: 175% auto; background-position: 50% 5%; }
.sc-portrait.sil { filter: brightness(0) drop-shadow(0 0 .35rem rgba(200,120,255,.95)); opacity: .9; }
.sc-info { padding: .45rem .6rem .6rem; min-width: 0; }
.sc-name { font-size: 1.08rem; font-weight: 900; text-shadow: var(--ol-lite); }
.sc-title { display: flex; align-items: center; gap: .2rem; font-size: .76rem; color: var(--muted); margin: .05rem 0 .2rem; }
.sc-stats { display: flex; flex-wrap: wrap; gap: .25rem; margin-top: .3rem; }
.scout-card { display: flex; gap: .7rem; padding: .6rem; }
.scout-card .sc-portrait { width: 6.4rem; flex: none; border-radius: .6rem; background-color: rgba(0,0,0,.25); }
.scout-card .sc-info { padding: .1rem 0; flex: 1; }
.sc-btns { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.need { display: flex; align-items: center; gap: .2rem; min-height: 2rem; font-size: .82rem; color: #ffb6c8; }
.empty-msg { margin-top: 30%; text-align: center; color: var(--muted); font-size: 1.05rem; }
.gig { display: flex; align-items: center; gap: .75rem; padding: .6rem .85rem; min-height: 4.1rem; }
.gig-ico { width: 2.9rem; height: 2.9rem; flex: none; border-radius: .85rem; display: flex; align-items: center; justify-content: center; color: #fff;
  background: linear-gradient(135deg, #ff9cc6, #c2407a); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 2px 6px rgba(0,0,0,.4); }
.gig-ico svg { width: 1.6rem; height: 1.6rem; }
.gig-ico.act { background: linear-gradient(135deg, #ffc98a, #c46a1e); }
.gig-ico.charm { background: linear-gradient(135deg, #d2b0ff, #6c3cc4); }
.gig-ico.mix { background: linear-gradient(135deg, #8aeaff, #2c6cae); }
.gig-info { flex: 1; min-width: 0; }
.gig-name { font-size: 1.05rem; font-weight: 900; text-shadow: var(--ol-lite); }
.gig-sub { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem; font-size: .78rem; color: var(--muted); margin-top: .1rem; }
.gig-cost { display: flex; align-items: center; font-size: 1.1rem; font-weight: 900; color: var(--cyan); text-shadow: var(--ol-lite); }
.show-head { display: flex; align-items: center; gap: .6rem; margin: .5rem 0 .55rem; color: var(--gold2); font-weight: 900; font-size: 1.05rem; text-shadow: var(--ol-lite); }
.show-head::before, .show-head::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold), transparent); }
.stages { display: flex; flex-direction: column; gap: .45rem; margin-bottom: .8rem; }
.stage { display: flex; align-items: center; gap: .75rem; min-height: 3.7rem; padding: .5rem .85rem; }
.stage-n { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; font-weight: 900;
  color: var(--gold2); background: rgba(0,0,0,.4); border: 2px solid rgba(232,199,122,.55); }
.stage-info { flex: 1; min-width: 0; }
.stage-rival { font-size: 1rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage-pow { display: flex; align-items: center; gap: .2rem; font-size: .8rem; color: var(--muted); }
.stage-state { display: flex; flex-direction: column; align-items: center; font-size: 1rem; font-weight: 900; color: var(--gold2); }
.stage-state .ico { width: 1.4rem; height: 1.4rem; }
.stage-state small { font-size: .7rem; color: var(--muted); font-weight: 700; }
.stage.done .stage-n { color: #3a1508; background: radial-gradient(circle at 35% 30%, #fff5cc, #e8c77a 50%, #9a6a1c); border-color: #fff0c0; }
.stage.done .stage-state { color: #9cf5c8; }
.stage.current { border-color: var(--gold); animation: glowPulse 2s ease-in-out infinite; }
.stage.boss { background: linear-gradient(90deg, rgba(118,22,58,.94), rgba(40,10,42,.94)); }
.stage.boss .stage-n { border-color: #ff7aa8; color: #ffd0de; }
.stage.boss.done .stage-n { color: #3a1508; }
.stage.locked { opacity: .45; filter: grayscale(.4); }
/* star detail */
.star-page { padding-top: 0; }
.star-top { position: relative; height: clamp(15rem, 44vh, 27rem); }
.star-glow { position: absolute; inset: 4% 8% 0; background: radial-gradient(ellipse at 50% 58%, var(--tint, #ff9cc6) 0%, transparent 66%); opacity: .55; filter: blur(10px); }
.detail-view { position: absolute; inset: 0; }
.star-nameplate { position: absolute; left: 0; bottom: .7rem; max-width: 62%; padding: .35rem 1rem .4rem .7rem; border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(42,15,46,.94), rgba(42,15,46,.25)); pointer-events: none; }
.star-nameplate .n { font-size: 1.5rem; font-weight: 900; text-shadow: var(--ol); }
.star-nameplate .t { font-size: .8rem; color: var(--gold2); }
.pill-btn { display: flex; align-items: center; gap: .3rem; min-height: 46px; padding: 0 1.05rem; border-radius: 99px; font-weight: 900; font-size: .95rem; color: #fff; text-shadow: var(--ol-lite);
  background: linear-gradient(180deg, #ffa3cb, #d84a84); border: 1.5px solid #ffd6e6; box-shadow: 0 3px 0 #6e1538, 0 0 14px rgba(255,122,168,.45); }
.perform { position: absolute; right: .2rem; bottom: .8rem; }
.star-panel { margin-top: .5rem; padding: 1.25rem 1.15rem 1.15rem; }
.aff-row { display: flex; align-items: center; gap: .35rem; font-size: .95rem; }
.aff-row b { color: #ffb8d2; text-shadow: var(--ol-lite); }
.affb { font-size: .78rem; color: var(--muted); }
.fans { margin-left: auto; display: flex; align-items: center; gap: .2rem; font-weight: 900; }
.star-panel .affbar { margin: .45rem 0 .5rem; height: .55rem; }
.attr-row { display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid rgba(232,199,122,.16); }
.an { display: flex; align-items: center; gap: .25rem; font-weight: 800; white-space: nowrap; }
.an.sing { color: #ff9cc6; } .an.act { color: #ffc98a; } .an.charm { color: #d2b0ff; }
.alv { font-size: .8rem; color: var(--muted); }
.av { min-width: 2.2rem; text-align: right; font-size: 1.15rem; font-weight: 900; text-shadow: var(--ol-lite); }
.act-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-top: .75rem; }
.btn.act-btn { flex-direction: column; gap: .1rem; min-height: 4.2rem; padding: .4rem .25rem; font-size: .85rem; white-space: normal; text-align: center; }
.act-btn .ico { width: 1.45rem; height: 1.45rem; }
.act-btn small { display: flex; align-items: center; gap: .1rem; font-size: .74rem; color: var(--gold2); }
.act-btn small .ico { width: .95rem; height: .95rem; }

/* ---------------- modals ---------------- */
#modal { z-index: 20; display: flex; align-items: center; justify-content: center; }
.modal-back { position: absolute; inset: 0; background: rgba(12,2,12,.74); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .2s ease-out; }
.modal-box { position: relative; width: 86%; max-height: 88%; overflow-y: auto; padding: 1.8rem 1.45rem 1.45rem; scrollbar-width: none; animation: popIn .3s cubic-bezier(.2,1.45,.4,1); }
.modal-box::-webkit-scrollbar { display: none; }
.modal-box.wide { width: 93%; padding-left: 1.2rem; padding-right: 1.2rem; }
.modal-box.gold-box { filter: drop-shadow(0 0 22px rgba(232,199,122,.45)) drop-shadow(0 10px 20px rgba(0,0,0,.6)); overflow: visible; }
.m-title { text-align: center; font-size: 1.4rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol); margin-bottom: .6rem; line-height: 1.25; }
.m-title .ico { width: 1.2em; height: 1.2em; }
.m-title.big { font-size: 1.85rem; letter-spacing: .04em; }
.m-body { text-align: center; line-height: 1.6; color: #f4e6f0; white-space: pre-line; margin-bottom: .6rem; font-size: 1rem; }
.m-sub { text-align: center; font-size: .9rem; color: var(--muted); margin: -.3rem 0 .6rem; display: flex; align-items: center; justify-content: center; gap: .25rem; flex-wrap: wrap; }
.m-btns { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center; margin-top: 1rem; }
.m-btns .btn { flex: 1 1 0; min-width: 6.5rem; }
.m-col { display: flex; flex-direction: column; gap: .55rem; margin-top: .8rem; }
.help { padding-left: 1.3rem; text-align: left; line-height: 1.55; font-size: .95rem; }
.help li { margin-bottom: .5rem; }
.help li::marker { color: var(--gold); font-weight: 900; }
.ceremony { position: relative; text-align: center; }
.cer-rays { position: absolute; left: 50%; top: 40%; width: 34rem; height: 34rem; margin: -17rem 0 0 -17rem; pointer-events: none; z-index: -1; opacity: .5;
  background: repeating-conic-gradient(from 0deg, rgba(255,226,150,.5) 0deg 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 0%, transparent 62%); mask: radial-gradient(circle, #000 0%, transparent 62%); animation: spin 18s linear infinite; }
.cer-rank { display: inline-block; margin: .2rem 0 .7rem; padding: .35rem 1.6rem; font-size: 1.7rem; font-weight: 900; color: #3a1508;
  background: linear-gradient(180deg, #fff2c4, #e8c77a 50%, #b8862e); clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%); animation: slam .55s cubic-bezier(.2,1.6,.4,1) .15s both; }
.reward-line { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: .3rem; margin-top: .6rem; font-size: 1.05rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol-lite); }
.reward-line .ico { width: 1.3em; height: 1.3em; }
.reward-line.big { font-size: 1.3rem; margin: .4rem 0 .2rem; }
.sum-row { display: flex; align-items: center; gap: .55rem; padding: .55rem .2rem; border-bottom: 1px solid rgba(232,199,122,.18); font-size: 1rem; }
.sum-row .ico { width: 1.5rem; height: 1.5rem; }
.sum-row span { flex: 1; color: var(--muted); }
.sum-row b { font-size: 1.25rem; font-weight: 900; text-shadow: var(--ol-lite); }
.ev-tag { display: table; margin: -.4rem auto .5rem; padding: .2rem .9rem; border-radius: 99px; font-size: .82rem; font-weight: 900; letter-spacing: .12em; color: #fff;
  background: linear-gradient(180deg, #ff6b9a, #b8215a); box-shadow: 0 0 12px rgba(255,90,140,.55); animation: bob 1.4s ease-in-out infinite; }
.ev-face { width: 6.2rem; height: 6.2rem; margin: .1rem auto .6rem; border-radius: 50%; background-repeat: no-repeat; background-size: 330% auto; background-position: 50% 5%;
  background-color: rgba(255,200,230,.15); border: 3px solid var(--gold); box-shadow: 0 0 16px rgba(232,199,122,.45); }
.fx-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin: .5rem 0 .3rem; }
.fx-chip { display: inline-flex; align-items: center; gap: .25rem; padding: .4rem .8rem; border-radius: 99px; font-size: 1.1rem; font-weight: 900; background: rgba(0,0,0,.4); border: 1.5px solid rgba(255,255,255,.3); animation: popIn .35s cubic-bezier(.2,1.5,.4,1) both; }
.fx-chip .ico { width: 1.35rem; height: 1.35rem; }
.fx-chip.up { color: #b6ffd9; border-color: #6fe0a8; }
.fx-chip.down { color: #ffb6c6; border-color: #ff6b8a; }
.fx-chip:nth-child(2) { animation-delay: .08s; } .fx-chip:nth-child(3) { animation-delay: .16s; }
.gem-line { display: flex; align-items: center; justify-content: center; gap: .3rem; margin-bottom: .6rem; font-size: 1.05rem; color: var(--muted); }
.gem-line .ico { width: 1.5rem; height: 1.5rem; }
.gem-line b { color: var(--cyan); font-size: 1.2rem; }
.bag-list { display: flex; flex-direction: column; gap: .5rem; }
.bag-row { display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: .8rem; background: rgba(0,0,0,.3); border: 1px solid rgba(232,199,122,.25); }
.bag-row img { width: 3rem; height: 3rem; object-fit: contain; flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.5)); }
.bag-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .1rem; }
.bag-info b { font-size: 1rem; }
.bag-info em { font-style: normal; color: var(--gold2); margin-left: .2rem; }
.bag-info small { font-size: .76rem; color: var(--muted); line-height: 1.35; }
.hint-s { font-size: .72rem; color: var(--muted); max-width: 5rem; text-align: right; }
.pick-list { display: flex; flex-direction: column; gap: .5rem; }
.pick-row { display: flex; align-items: center; gap: .65rem; min-height: 3.9rem; padding: .45rem .7rem; border-radius: .85rem; background: var(--card); border: 1px solid rgba(232,199,122,.45); transition: transform .12s; }
.pick-row.off { opacity: .45; filter: grayscale(.6); cursor: default; }
.pk-face { width: 3.1rem; height: 3.1rem; flex: none; border-radius: 50%; background-repeat: no-repeat; background-size: 400% auto; background-position: 50% 4%;
  background-color: rgba(255,200,230,.16); border: 2px solid rgba(232,199,122,.8); }
.pk-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pk-info b { font-size: 1.02rem; }
.pk-info small { display: flex; align-items: center; gap: .2rem; font-size: .8rem; color: var(--muted); }
.pk-pay { display: flex; flex-direction: column; align-items: flex-end; font-weight: 900; color: var(--gold2); }
.pk-pay small { font-size: .7rem; color: var(--muted); font-weight: 700; }
.lu-title { font-size: .85rem; color: var(--gold2); font-weight: 800; margin: .2rem 0 .4rem; letter-spacing: .06em; }
.lu-list { display: flex; flex-direction: column; gap: .4rem; }
.lu-row { display: grid; grid-template-columns: auto 2.6rem 1fr auto auto auto; grid-template-areas: "r f n p v q" "a f n p v q"; align-items: center; column-gap: .45rem;
  padding: .4rem .6rem; border-radius: .75rem; background: rgba(0,0,0,.32); border: 1px solid rgba(232,199,122,.22); }
.lu-r { grid-area: r; font-size: .72rem; color: var(--muted); white-space: nowrap; }
.lu-a { grid-area: a; display: flex; align-items: center; gap: .15rem; font-size: .85rem; font-weight: 800; white-space: nowrap; }
.lu-a.sing { color: #ff9cc6; } .lu-a.act { color: #ffc98a; } .lu-a.charm { color: #d2b0ff; }
.lu-row .pk-face { grid-area: f; width: 2.6rem; height: 2.6rem; }
.lu-n { grid-area: n; font-weight: 800; font-size: .92rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lu-p { grid-area: p; font-size: 1.05rem; } .lu-p.good { color: #9cf5c8; } .lu-p.bad { color: #ffa0b6; }
.lu-vs { grid-area: v; font-size: .72rem; color: var(--muted); }
.lu-rp { grid-area: q; font-size: 1.05rem; color: #d2b0ff; }
.crown { width: 5.5rem; height: 5.5rem; margin: 0 auto .4rem; color: var(--gold); filter: drop-shadow(0 0 16px rgba(255,214,120,.8)); animation: slam .6s cubic-bezier(.2,1.6,.4,1) both; }
.crown svg { width: 100%; height: 100%; }
.vera-quote { display: flex; align-items: center; gap: .6rem; margin-top: .6rem; padding: .55rem .7rem; border-radius: .8rem; text-align: left; background: rgba(0,0,0,.35); border: 1px solid rgba(200,140,255,.4); }
.vera-quote div:last-child { display: flex; flex-direction: column; font-size: .88rem; line-height: 1.4; }
.vera-quote b { color: #d2b0ff; }

/* ---------------- scenes ---------------- */
#scene { z-index: 10; background: var(--ink); }
#scene.enter { animation: sceneIn .4s ease-out; }
.scene-bg { position: absolute; inset: -3%; background-size: cover; background-position: center; animation: kenburns 24s ease-in-out infinite alternate; }
.scene-shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(to bottom, rgba(18,4,18,.6) 0%, rgba(18,4,18,0) 22%, rgba(18,4,18,0) 50%, rgba(18,4,18,.8) 78%, rgba(14,3,14,.95) 100%); }
.beam { position: absolute; top: -12%; width: 34%; height: 95%; pointer-events: none; mix-blend-mode: screen; transform-origin: 50% 0;
  background: linear-gradient(to bottom, rgba(255,232,178,.42), rgba(255,232,178,0) 92%); clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%); animation: beam 6s ease-in-out infinite alternate; }
.beam.b1 { left: -2%; } .beam.b2 { left: 33%; animation-delay: -2s; background: linear-gradient(to bottom, rgba(255,180,220,.38), rgba(255,180,220,0) 92%); } .beam.b3 { left: 68%; animation-delay: -4s; }
.scene-char { position: absolute; }
.sign-char { left: 6%; right: 6%; top: 13%; bottom: 31%; }
.date-char { left: 4%; right: 4%; top: 10%; bottom: 26%; }
.gig-char { left: 6%; right: 6%; top: 14%; bottom: 17%; }
.sign-banner { position: absolute; left: 0; right: 0; top: calc(5% + env(safe-area-inset-top)); text-align: center; z-index: 2; }
.sign-banner span { display: inline-block; padding: .45rem 2.2rem; font-size: 1.6rem; font-weight: 900; letter-spacing: .08em; color: #3a1508;
  background: linear-gradient(180deg, #fff2c4, #e8c77a 50%, #b8862e); clip-path: polygon(0 0, 100% 0, 95% 50%, 100% 100%, 0 100%, 5% 50%);
  filter: drop-shadow(0 4px 0 rgba(60,20,4,.7)); animation: slam .6s cubic-bezier(.2,1.6,.4,1) .1s both; }
.dlg { position: absolute; left: 4%; right: 4%; bottom: calc(5.6rem + env(safe-area-inset-bottom)); padding: 1.2rem 1.35rem 1.05rem; animation: fadeUp .4s ease-out .2s both; z-index: 2; }
.dlg-name { font-size: 1.15rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol-lite); margin-bottom: .3rem; }
.dlg-name small { margin-left: .4rem; font-size: .78rem; font-weight: 600; color: var(--muted); }
.dlg-text { min-height: 3.1em; font-size: 1.02rem; line-height: 1.55; }
.dlg-aff { display: grid; grid-template-columns: auto auto 1fr auto; align-items: center; gap: .4rem; margin-top: .55rem; font-size: .9rem; }
.dlg-aff b { color: #ffb8d2; }
.dlg-aff .affbar { height: .55rem; }
.scene-btns { position: absolute; left: 0; right: 0; bottom: calc(1.2rem + env(safe-area-inset-bottom)); display: flex; justify-content: center; z-index: 2; animation: fadeUp .4s ease-out .35s both; }
.scene-top { position: absolute; left: .9rem; right: .9rem; top: calc(.9rem + env(safe-area-inset-top)); display: flex; flex-direction: column; align-items: center; gap: .15rem; z-index: 2; }
.scene-title { display: inline-flex; align-items: center; gap: .35rem; font-size: 1.3rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol); }
.scene-title .ico { width: 1.3em; height: 1.3em; }
.scene-sub { font-size: .9rem; color: var(--muted); text-shadow: var(--ol-lite); }
.perf { position: absolute; left: 9%; right: 9%; bottom: calc(9% + env(safe-area-inset-bottom)); text-align: center; z-index: 2; }
.perf-t { font-size: 1.35rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol), 0 0 16px rgba(232,199,122,.6); animation: pulse 1s ease-in-out infinite; }
.perf-bar { height: .7rem; margin: .55rem 0 .4rem; border: 1px solid rgba(232,199,122,.5); }
.perf-bar i { width: 0; transition: width 2.8s linear; }
.perf-hint { font-size: .85rem; color: var(--muted); text-shadow: var(--ol-lite); }
#gigRes { position: absolute; inset: 0; z-index: 3; display: flex; align-items: flex-end; justify-content: center; padding: 0 5% calc(1.2rem + env(safe-area-inset-bottom)); background: linear-gradient(to bottom, transparent 40%, rgba(12,2,12,.6)); }
#gigRes:empty { display: none; }
.gig-res { width: 100%; padding: 1.6rem 1.35rem 1.35rem; animation: popIn .35s cubic-bezier(.2,1.45,.4,1); }
/* battle */
.bt-wrap { position: absolute; inset: 0; display: flex; flex-direction: column; gap: .45rem; padding: calc(.7rem + env(safe-area-inset-top)) .7rem calc(.8rem + env(safe-area-inset-bottom)); z-index: 2; }
.bt-head { display: flex; flex-direction: column; align-items: flex-start; padding-right: 58px; min-height: 2.9rem; }
.bt-head .scene-title { font-size: 1.2rem; }
.bt-score { display: flex; align-items: center; justify-content: center; gap: .9rem; }
.pips { display: flex; gap: .35rem; }
.pips i { width: 1.05rem; height: 1.05rem; border-radius: 50%; border: 2px solid var(--gold); background: rgba(0,0,0,.45); transition: background .3s, box-shadow .3s; }
.pips.you i.on { background: radial-gradient(circle at 35% 30%, #fff5cc, #e8c77a); box-shadow: 0 0 10px rgba(255,214,120,.9); }
.pips.rival i { border-color: #b77cff; }
.pips.rival i.on { background: radial-gradient(circle at 35% 30%, #f0dcff, #9a4cf0); box-shadow: 0 0 10px rgba(180,110,255,.9); }
.bt-dash { font-size: 1rem; font-weight: 900; font-style: italic; letter-spacing: .1em; text-shadow: var(--ol-lite); }
.bt-arena { position: relative; flex: 1; min-height: 0; display: flex; }
.bt-side { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bt-view { position: relative; flex: 1; min-height: 0; }
.bt-side.you .bt-view { background: radial-gradient(ellipse at 50% 70%, rgba(255,214,140,.28), transparent 62%); }
.bt-side.rival .bt-view { background: radial-gradient(ellipse at 50% 70%, rgba(170,90,255,.28), transparent 62%); }
.bt-side.rival.boss .bt-view { background: radial-gradient(ellipse at 50% 70%, rgba(255,80,130,.32), transparent 62%); }
.bt-name { text-align: center; padding: .25rem .2rem; border-radius: .6rem; background: rgba(18,4,18,.7); margin: 0 .2rem; }
.bt-name b { display: block; font-size: .98rem; font-weight: 900; text-shadow: var(--ol-lite); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-pow { display: inline-flex; align-items: center; gap: .15rem; font-size: .92rem; font-weight: 800; color: var(--gold2); }
.bt-side.rival .bt-pow { color: #d2b0ff; }
.bt-vs { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); font-size: 2.3rem; font-weight: 900; font-style: italic; color: #fff; pointer-events: none;
  text-shadow: 0 0 14px #ff5aa0, 0 0 26px rgba(255,90,160,.6), var(--ol); }
#btBanner { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; pointer-events: none; z-index: 3; }
.round-banner { display: flex; flex-direction: column; align-items: center; gap: .1rem; padding: .5rem 2.2rem; font-size: 2rem; font-weight: 900; color: var(--gold2); text-shadow: var(--ol);
  background: linear-gradient(90deg, transparent, rgba(42,15,46,.9) 18%, rgba(42,15,46,.9) 82%, transparent); animation: slam .5s cubic-bezier(.2,1.6,.4,1) both; white-space: nowrap; }
.round-banner:empty { display: none; }
.round-banner small { font-size: .9rem; color: var(--muted); letter-spacing: .1em; }
.round-banner .ico { width: 1.1em; height: 1.1em; }
.round-banner.judge { font-size: 2.6rem; background: none; letter-spacing: .06em; }
.round-banner.perfect { color: #fff3b0; text-shadow: 0 0 18px #ffcf5a, 0 0 32px rgba(255,190,80,.8), var(--ol); }
.round-banner.great { color: #ffb8d6; text-shadow: 0 0 16px #ff5a9a, var(--ol); }
.round-banner.okay { color: #ffffff; }
.round-banner.miss { color: #b9a9c4; }
.round-banner.win { color: #fff0b8; font-size: 2.2rem; }
.round-banner.lose { color: #c8b6ff; font-size: 2.2rem; }
.bt-dlg { position: absolute; left: 0; right: 0; bottom: 0; }
.bt-bars { display: flex; flex-direction: column; gap: .3rem; }
.bt-barrow { display: grid; grid-template-columns: 3.4rem 1fr 3.6rem; align-items: center; gap: .4rem; }
.bt-tag { font-size: .82rem; font-weight: 800; color: var(--gold2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-barrow.rival .bt-tag { color: #d2b0ff; }
.bt-bar { height: .85rem; border-radius: 99px; background: rgba(0,0,0,.55); border: 1px solid rgba(232,199,122,.4); overflow: hidden; }
.bt-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #fff0b8, #e8a33a); box-shadow: 0 0 8px rgba(255,200,100,.7); }
.bt-barrow.rival .bt-bar i { background: linear-gradient(90deg, #e0c2ff, #8a3cf0); box-shadow: 0 0 8px rgba(170,90,255,.7); }
.bt-barrow b { text-align: right; font-size: 1.05rem; font-weight: 900; text-shadow: var(--ol-lite); }
.cheer-box { padding: .6rem .7rem .7rem; border-radius: 1rem; background: rgba(20,5,22,.8); border: 1px solid rgba(232,199,122,.45); opacity: .6; transition: opacity .2s, box-shadow .2s; touch-action: none; cursor: pointer; }
.cheer-box.on { opacity: 1; box-shadow: 0 0 22px rgba(232,199,122,.35); }
.cheer-hint { text-align: center; font-size: .9rem; color: var(--muted); margin-bottom: .45rem; }
.cheer-bar { position: relative; height: 1.7rem; border-radius: 99px; overflow: hidden; border: 2px solid rgba(232,199,122,.65);
  background: linear-gradient(90deg, #26092e, #4a1a50 50%, #26092e); box-shadow: inset 0 2px 5px rgba(0,0,0,.6); }
.cheer-zone { position: absolute; top: 0; bottom: 0; background: linear-gradient(90deg, rgba(255,190,90,.22), rgba(255,200,110,.6) 25%, rgba(255,200,110,.6) 75%, rgba(255,190,90,.22)); }
.cheer-core { position: absolute; top: 0; bottom: 0; background: linear-gradient(180deg, #fff8d0, #ffcf5a); box-shadow: 0 0 12px #ffd86b; }
.cheer-needle { position: absolute; left: 0; top: -2px; bottom: -2px; width: 4px; margin-left: -2px; background: #fff; box-shadow: 0 0 8px #fff, 0 0 14px #ff7aa8; }
.cheer-box.done .cheer-needle { background: #ffe28a; width: 6px; margin-left: -3px; }
.cheer-btn { display: block; width: 100%; margin-top: .6rem; min-height: max(56px, 3.6rem); border-radius: 1rem; font-size: 1.4rem; font-weight: 900; letter-spacing: .1em; color: #fff; text-shadow: var(--ol);
  background: linear-gradient(180deg, #ffa3cb, #e0457f); border: 2px solid #ffd6e6; box-shadow: 0 4px 0 #7a1840, 0 0 16px rgba(255,122,168,.4); }
.cheer-box:not(.on) .cheer-btn { filter: grayscale(.65) brightness(.7); }
.cheer-box.on .cheer-btn { animation: cheerPulse .9s ease-in-out infinite; }
#btResult { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; }
#btResult:empty { display: none; }
.bt-dim { position: absolute; inset: 0; background: rgba(10,2,10,.62); animation: fadeIn .3s ease-out; }
.bt-result { position: relative; width: 88%; padding: 1.8rem 1.35rem 1.35rem; text-align: center; animation: popIn .4s cubic-bezier(.2,1.5,.4,1); }
.bt-result.win .m-title { color: #fff1b8; text-shadow: 0 0 18px rgba(255,200,90,.8), var(--ol); }
.bt-result.lose .m-title { color: #cdbcff; }
.tag { display: inline-block; padding: .1rem .55rem; margin-right: .3rem; border-radius: 99px; font-size: .78rem; color: #3a1508; background: linear-gradient(180deg, #fff2c4, #e8c77a); text-shadow: none; }

/* ---------------- overlays ---------------- */
#fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 30; }
#flash { position: absolute; inset: 0; opacity: 0; pointer-events: none; z-index: 31; }
#toasts { position: absolute; left: 0; right: 0; top: 24%; z-index: 40; display: flex; flex-direction: column; align-items: center; gap: .4rem; pointer-events: none; }
.toast { max-width: 86%; padding: .55rem 1.15rem; border-radius: 99px; text-align: center; font-size: 1rem; font-weight: 800; color: var(--gold2); text-shadow: var(--ol-lite);
  background: rgba(42,15,46,.94); border: 1.5px solid var(--gold); box-shadow: 0 6px 16px rgba(0,0,0,.5); animation: popIn .3s cubic-bezier(.2,1.5,.4,1); transition: opacity .4s, transform .4s; }
.toast.bad { color: #ffd0da; border-color: #ff6b8a; }
.toast.out { opacity: 0; transform: translateY(-12px); }
.floattext { position: absolute; z-index: 41; transform: translateX(-50%); font-size: 1.35rem; font-weight: 900; white-space: nowrap; pointer-events: none; text-shadow: var(--ol); animation: floatUp 1.25s ease-out forwards; }
.subtitle { position: absolute; left: 6%; right: 6%; bottom: 19%; z-index: 45; padding: .6rem .95rem; text-align: center; font-size: 1.02rem; line-height: 1.5; pointer-events: none;
  background: rgba(14,3,15,.78); border: 1px solid rgba(232,199,122,.45); border-radius: .8rem; text-shadow: var(--ol-lite); animation: fadeUp .3s ease-out; }
.subtitle:empty { display: none; }
#curtain { position: absolute; inset: 0; z-index: 60; background: var(--ink); opacity: 0; pointer-events: none; transition: opacity .25s ease; }
#curtain.on { opacity: 1; pointer-events: auto; }
#intro { z-index: 50; background: #000 url(assets/cover-bg.webp) center / cover no-repeat; }
#introVideo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; background: #000 url(assets/cover-bg.webp) center / cover no-repeat; opacity: 0; transition: opacity .4s; }
#intro.playing #introVideo { opacity: 1; }
#introSub { bottom: calc(9% + env(safe-area-inset-bottom)); }
.skip-btn { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 12px; z-index: 2; min-width: 72px; min-height: 46px; padding: 0 1.1rem; border-radius: 99px;
  font-size: .95rem; font-weight: 800; color: var(--gold2); text-shadow: var(--ol-lite); background: rgba(20,5,22,.72); border: 1.5px solid rgba(232,199,122,.7); }

/* ---------------- motion ---------------- */
#app.shake { animation: shake .35s ease-out; }
#app.shake2 { animation: shake2 .55s ease-out; }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 20% { transform: translate(-5px, 2px); } 40% { transform: translate(5px, -2px); } 60% { transform: translate(-3px, 1px); } 80% { transform: translate(2px, -1px); } }
@keyframes shake2 { 0%, 100% { transform: translate(0, 0); } 12% { transform: translate(-9px, 4px) rotate(-.4deg); } 26% { transform: translate(9px, -4px) rotate(.4deg); } 42% { transform: translate(-6px, 3px); } 58% { transform: translate(5px, -2px); } 76% { transform: translate(-2px, 1px); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { 0% { opacity: 0; transform: scale(.72); } 65% { opacity: 1; transform: scale(1.04); } 100% { transform: scale(1); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: none; } }
@keyframes sceneIn { from { opacity: 0; transform: scale(1.04); } to { opacity: 1; transform: none; } }
@keyframes slam { 0% { opacity: 0; transform: scale(2.3); } 60% { opacity: 1; transform: scale(.92); } 100% { transform: scale(1); } }
@keyframes logoIn { 0% { opacity: 0; transform: translateY(-40px) scale(.8); } 70% { opacity: 1; transform: translateY(4px) scale(1.04); } 100% { transform: none; } }
@keyframes logoFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .62; transform: scale(.97); } }
@keyframes kenburns { from { transform: scale(1); } to { transform: scale(1.06) translateY(-1%); } }
@keyframes sweep { 0% { left: -60%; } 55%, 100% { left: 130%; } }
@keyframes beam { from { transform: rotate(-9deg); opacity: .65; } to { transform: rotate(9deg); opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 1px rgba(232,199,122,.8), 0 0 10px rgba(232,199,122,.35); } 50% { box-shadow: 0 0 0 2px #fff0c0, 0 0 24px rgba(255,214,120,.75); } }
@keyframes emptyPulse { 0%, 100% { box-shadow: 0 0 0 rgba(255,107,138,0); } 50% { box-shadow: 0 0 14px rgba(255,107,138,.8); } }
@keyframes cheerPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.025); } }
@keyframes floatUp { 0% { opacity: 0; transform: translate(-50%, 6px) scale(.8); } 15% { opacity: 1; transform: translate(-50%, -6px) scale(1.1); } 100% { opacity: 0; transform: translate(-50%, -64px) scale(1); } }
