/* ==========================================================================================================
   W107 LANE A - ceremonies and the sheet that comes alive (docs/notes/W107-A-ceremonies.md)
     1  THE UPGRADE CEREMONY   (public/js/ceremony.js, spec 4.3)
     2  THE HERO SHEET         (tabs, stat tiles, the power-up stepper, the rank strip: public/js/sheet.js, spec 4.5)
     3  THE FINAL TALLY        (public/js/tally.js, spec 7.5 / N3)
     4  THE LEADER CAST        (public/js/cinematics.js side slot, FEEL-96 F17)
     5  THE BOSS ROULETTE      (public/js/hud.js, FEEL-96 F18)
     6  THE FAST ENDING        (public/js/cinematics.js, FEEL-96 F19)
     7  THE HOME CLAIM DOT     (public/js/home.js, FEEL-96 F20)
   Only transform / translate / scale / opacity move. Timings come from motion.css tokens where a menu uses them.
   ========================================================================================================== */

/* ============================================================================ 1 THE UPGRADE CEREMONY */
.ccCer {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 85;
  pointer-events: auto; touch-action: none; overflow: hidden; -webkit-tap-highlight-color: transparent;
  --cx: 50%; --cy: 36%; --cw: 170px; --cr: 96px; --cer-col: #ffd23f; --cer-glow: .35;
}
.ccCer.out { opacity: 0; transition: opacity 160ms ease-in; pointer-events: none; }
.ccCer-none.out { transition: none; }

/* the scrim: a spotlight - the stage stays lit, the rest dims */
.ccCerScrim {
  position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0;
  background: radial-gradient(circle at var(--cx) var(--cy), rgba(10, 6, 24, 0) 0, rgba(10, 6, 24, 0) var(--cr), #0a0618 calc(var(--cr) * 3));
}
.ccCer-full.on .ccCerScrim { opacity: .55; transition: opacity 180ms ease-out; }
.ccCer-some.on .ccCerScrim { opacity: .35; transition: opacity 90ms linear; }
.ccCer-none .ccCerScrim { display: none; }

/* the light shaft: ONE node, six soft beams (a repeating conic gradient), turning 18 deg/s, alpha 0 > .35 > 0 */
.ccCerShaft {
  position: absolute; left: var(--cx); top: var(--cy); width: 150vmin; height: 150vmin; margin: -75vmin 0 0 -75vmin;
  border-radius: 50%; opacity: 0; will-change: transform, opacity;
  background: repeating-conic-gradient(from 0deg, rgba(255, 228, 130, .85) 0deg 9deg, rgba(255, 228, 130, 0) 9deg 60deg);
  -webkit-mask-image: radial-gradient(circle, #000 0%, #000 22%, transparent 62%);
  mask-image: radial-gradient(circle, #000 0%, #000 22%, transparent 62%);
}
.ccCerShaft.soft {
  background: radial-gradient(circle, rgba(255, 228, 130, .9) 0%, rgba(255, 228, 130, 0) 58%);
  -webkit-mask-image: none; mask-image: none;
}
.ccCer.shaftOn .ccCerShaft { animation: ccCerShaft 600ms ease-out both; }
.ccCer.shaftOn .ccCerShaft.soft { animation: ccCerShaftSoft 400ms ease-out both; }
.ccCer.ccCerNf.shaftOn .ccCerShaft { animation: ccCerShaftSteady 600ms linear both; }
.ccCer.ccCerNf.shaftOn .ccCerShaft.soft { animation: ccCerShaftSteady 400ms linear both; }
@keyframes ccCerShaft { 0% { opacity: 0; rotate: 0deg; } 45% { opacity: var(--cer-glow); } 100% { opacity: 0; rotate: 10.8deg; } }
@keyframes ccCerShaftSoft { 0% { opacity: 0; } 40% { opacity: var(--cer-glow); } 100% { opacity: 0; } }
@keyframes ccCerShaftSteady { 0% { opacity: 0; } 25% { opacity: .18; } 75% { opacity: .18; } 100% { opacity: 0; } }

/* the motes: sparkles in the rarity colour, rising */
.ccCerMote {
  position: absolute; left: var(--cx); top: var(--cy); width: 7px; height: 7px; margin: -3px 0 0 -3px; border-radius: 50%;
  background: var(--cer-col); box-shadow: 0 0 6px var(--cer-col); opacity: 0; scale: var(--ms, 1);
}
.ccCer.motesOn .ccCerMote { animation: ccCerMote var(--ml, 800ms) var(--md, 0ms) ease-out both, ccCerTwinkle 420ms ease-in-out infinite alternate; }
.ccCer.ccCerNf.motesOn .ccCerMote { animation: ccCerMote var(--ml, 800ms) var(--md, 0ms) ease-out both; }
@keyframes ccCerMote {
  0% { opacity: 0; translate: var(--mx, 0px) 36px; }
  14% { opacity: .95; }
  100% { opacity: 0; translate: calc(var(--mx, 0px) * 1.25) calc(var(--mr, 90px) * -1); }
}
@keyframes ccCerTwinkle { from { filter: brightness(.8); } to { filter: brightness(1.25); } }

/* the level badge: the old number slides up, the new one drops in with an overshoot */
.ccCerLv {
  position: absolute; left: var(--cx); top: var(--cy); translate: -50% -50%; pointer-events: none; white-space: nowrap; opacity: 0;
  font-family: 'Bangers', cursive; font-size: 64px; line-height: 1; letter-spacing: 2px; color: #ffd23f;
  -webkit-text-stroke: 3px #1b1430; paint-order: stroke fill; text-shadow: 0 4px 0 #1b1430, 0 0 18px rgba(255, 210, 63, .45);
}
.ccCerLv.old { color: #cfc7ee; text-shadow: 0 4px 0 #1b1430; }
.ccCer-full.on .ccCerLv.old, .ccCer-some.on .ccCerLv.old { opacity: 1; }
.ccCer-full.badgeOn .ccCerLv.old { animation: ccCerLvOut 100ms ease-in both; }
.ccCer-full.badgeOn .ccCerLv.new { animation: ccCerLvDrop 260ms cubic-bezier(.2, .9, .3, 1) both; }
.ccCer-some.badgeOn .ccCerLv.old { animation: ccCerFadeOut 120ms linear both; }
.ccCer-some.badgeOn .ccCerLv.new { animation: ccCerFadeIn 120ms linear both; }
.ccCer-none .ccCerLv.old { display: none; }
.ccCer-none .ccCerLv.new { opacity: 1; }
@keyframes ccCerLvOut { from { opacity: 1; translate: -50% -50%; } to { opacity: 0; translate: -50% calc(-50% - 30px); } }
@keyframes ccCerLvDrop { 0% { opacity: 0; scale: 1.6; } 60% { opacity: 1; scale: 1.15; } 100% { opacity: 1; scale: 1; } }
@keyframes ccCerFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ccCerFadeOut { from { opacity: 1; } to { opacity: 0; } }

/* the next-step banner: slides up 200 ms with a 350 ms green sheen */
.ccCerBanner {
  position: absolute; left: 50%; bottom: calc(20% + env(safe-area-inset-bottom, 0px)); translate: -50% 30px;
  max-width: min(88vw, 340px); box-sizing: border-box; padding: 9px 16px 8px; border-radius: 12px; overflow: hidden; opacity: 0;
  font-family: 'Bangers', cursive; font-size: 19px; line-height: 1.15; letter-spacing: 1.1px; text-align: center; pointer-events: none;
  color: #12361a; background: linear-gradient(180deg, #b6f29a, #6fd04f); box-shadow: 0 0 0 3px #1b1430, 0 6px 0 rgba(0, 0, 0, .35);
}
.ccCerBanner.k-pick { color: #3a2300; background: linear-gradient(180deg, #ffe28a, #ffb703); }
.ccCerBanner.k-max { color: #3a2300; background: linear-gradient(180deg, #ffe28a, #ffb703); rotate: -3deg; font-size: 24px; }
.ccCerBanner.empty { display: none; }
.ccCerBanner::after {
  content: ''; position: absolute; left: 0; top: 0; right: 0; bottom: 0; translate: -120% 0; opacity: 0;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, .5) 50%, rgba(255, 255, 255, 0) 70%);
}
.ccCer-full.bannerOn .ccCerBanner { animation: ccCerBannerIn 200ms cubic-bezier(.2, .9, .3, 1.1) both; }
.ccCer-full.bannerOn:not(.ccCerNf) .ccCerBanner::after { animation: ccCerSheen 350ms 200ms ease-out both; }
.ccCer-some.bannerOn .ccCerBanner { translate: -50% 0; animation: ccCerFadeIn 120ms linear both; }
.ccCer-none .ccCerBanner { translate: -50% 0; }
.ccCer-none.bannerOn .ccCerBanner { opacity: 1; }
@keyframes ccCerBannerIn { from { opacity: 0; translate: -50% 30px; } to { opacity: 1; translate: -50% 0; } }
@keyframes ccCerSheen { 0% { opacity: 1; translate: -120% 0; } 100% { opacity: 1; translate: 120% 0; } }

/* the POWER UP plate lives inside the ceremony root now (it stays above the scrim); it waits for its beat at 260 ms */
.ccCer .ccPowerUp.puWait { opacity: 0; }
.ccCer .ccPowerUp { z-index: 5; }

/* the pressed button: squash .95 (80 ms), spring 1.02 > 1 (120 ms) */
.ccCerPress { animation: ccCerPress 200ms ease-out both; }
@keyframes ccCerPress { 0% { scale: 1; } 40% { scale: .95; } 72% { scale: 1.02; } 100% { scale: 1; } }

/* ============================================================================ 2 THE HERO SHEET (tabs, tiles, stepper, rank strip) */
.ccTabs { display: flex; gap: 6px; justify-content: center; margin: 8px 0 6px; }
.ccTabs[hidden] { display: none; }
.ccTab {
  position: relative; flex: 1 1 0; max-width: 116px; min-height: 38px; padding: 5px 8px; border-radius: 11px 11px 4px 4px; cursor: pointer;
  background: #2c2547; color: #cfc7ee; border: 2px solid #3a3357; font-family: 'Bangers', cursive; font-size: 16px; letter-spacing: 1.1px; line-height: 1;
}
.ccTab::after { content: ''; position: absolute; left: -2px; right: -2px; top: -4px; bottom: -4px; }
.ccTab.on { background: var(--pow, #ffd23f); color: #1b1430; border-color: #1b1430; }
.ccTabDot { position: absolute; top: -5px; right: -4px; width: 12px; height: 12px; border-radius: 50%; background: #ff5c7a; box-shadow: 0 0 0 2px #1b1430; }

/* what each tab shows: W126 moved this to public/css/herosheet.css (four tabs: STATS / INFO / TALENTS / STORY) */
#detailStats { margin: 6px 0 10px; }
#detailStats[hidden], #detailTabBody[hidden] { display: none; }

.ccTiles { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ccTile { min-width: 0; text-align: left; padding: 5px 9px 6px; border-radius: 10px; background: #241b44; box-shadow: inset 0 0 0 2px #3a3357; }
.ccTile .tl { font-size: 9.5px; font-weight: 900; letter-spacing: .8px; color: #ff922b; line-height: 1.2; }
.ccTile .tv { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; min-height: 22px; }
.ccTile .n { font-family: 'Bangers', cursive; font-weight: 400; font-size: 19px; letter-spacing: .8px; color: #74c0fc; font-variant-numeric: tabular-nums; line-height: 1.15; }
.ccTile .d { font-style: normal; font-size: 11px; font-weight: 900; color: #9be15d; letter-spacing: .2px; }
.ccTile[data-tile="role"] .n, .ccTile[data-tile="target"] .n { font-size: 15px; }
.ccTile .d.gain { animation: moFade var(--mo-tab, 120ms) ease-out both; }
html[data-anim="none"] .ccTile .d.gain { animation: none; }

.ccStep, .ccRanks { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px; margin: 8px 0 2px; }
.ccStep .sl, .ccRanks .rl { font-size: 9.5px; font-weight: 900; letter-spacing: .8px; color: #ff922b; margin-right: 3px; }
.ccStepBtn {
  position: relative; min-width: 36px; height: 32px; padding: 0 6px; border-radius: 9px; cursor: pointer;
  background: #2c2547; color: #cfc7ee; border: 2px solid #3a3357; font-family: 'Bangers', cursive; font-size: 15px; letter-spacing: .8px;
}
.ccStepBtn::after, .ccRankBtn::after { content: ''; position: absolute; left: -3px; right: -3px; top: -6px; bottom: -6px; }
.ccStepBtn.on { background: var(--pow, #ffd23f); color: #1b1430; border-color: #1b1430; }
.ccRankBtn {
  position: relative; width: 27px; height: 29px; padding: 0; border-radius: 8px; cursor: pointer; border: 2px solid #1b1430;
  background: var(--rk, #fff); color: var(--rki, #1b1430); font-family: 'Bangers', cursive; font-size: 16px; line-height: 1; opacity: .72;
}
.ccRankBtn.on { opacity: 1; box-shadow: 0 0 0 2px #ffd23f; }
.ccRankBtn.crown { border-radius: 8px 8px 11px 11px; }
.ccRankLine { text-align: center; margin: 5px 0 0; font-size: 11px; font-weight: 800; color: #d8d2ea; }
.ccRankLine .rp { display: inline-block; margin: 0 5px; }
.ccRankLine .rp i { font-style: normal; font-weight: 900; letter-spacing: .5px; color: #ff922b; margin-right: 4px; }
.ccRankLine .rp b { color: #74c0fc; font-weight: 900; }

/* ============================================================================ 3 THE FINAL TALLY */
#tallyOv { position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 96; display: flex; align-items: center; justify-content: center; padding: 10px; box-sizing: border-box; }
#tallyOv.hidden { display: none; }
.tyCard {
  display: flex; flex-direction: column; width: min(100%, 420px); max-height: 100%; box-sizing: border-box; overflow: hidden; border-radius: 16px;
  background: #1f1740; box-shadow: 0 0 0 3px #1b1430, 0 0 0 6px #ffd23f; padding: 10px 10px 12px; transform-origin: 50% 0;
}
.tyCard.unroll { animation: tyUnroll var(--ty-unroll, 300ms) cubic-bezier(.2, .8, .3, 1) both; }
@keyframes tyUnroll { 0% { transform: scaleY(.06); opacity: .5; } 100% { transform: scaleY(1); opacity: 1; } }
html[data-anim="none"] .tyCard.unroll, html[data-anim="some"] .tyCard.unroll { animation: none; }
.tyTitle { font-family: 'Bangers', cursive; font-size: 26px; letter-spacing: 1.6px; text-align: center; color: #ffd23f; text-shadow: 0 3px 0 #1b1430; margin: 0 0 6px; }
.tyScroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 6px; }
.tyPanel { --ty-col: #4dabf7; border-radius: 12px; padding: 7px 8px 8px; background: #1f2a4d; box-shadow: inset 0 0 0 2px var(--ty-col); }
.tyPanel.rival { --ty-col: #ff6b6b; background: #4a2036; }
.tyPanel.you { --ty-col: #4dabf7; background: #1f2a4d; }
.tyPanel.partner, .tyPanel.rival2, .tyPanel.rival3 { --ty-col: #ffa94d; background: #4a3220; }
.tyHead { display: grid; grid-template-columns: 38px 1fr; column-gap: 8px; align-items: center; margin-bottom: 5px; }
.tyBust { grid-row: 1 / span 2; width: 38px; height: 38px; border-radius: 10px; overflow: hidden; background: #120d24; box-shadow: inset 0 0 0 2px var(--ty-col); display: flex; align-items: center; justify-content: center; }
.tyBust canvas, .tyBust img, .tyBust svg { width: 100%; height: 100%; object-fit: contain; }
.tyBustFb { font-family: 'Bangers', cursive; font-size: 20px; color: #fff8e7; }
.tyName { font-family: 'Bangers', cursive; font-size: 18px; letter-spacing: .9px; color: #fff8e7; line-height: 1.1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tyChips { display: flex; gap: 4px; flex-wrap: wrap; }
.tyChip { font-size: 9.5px; font-weight: 900; letter-spacing: .5px; padding: 1px 6px; border-radius: 999px; background: rgba(0, 0, 0, .35); color: #d8d2ea; }
.tyChip.pow { color: #ffd23f; }
.tyRows { display: flex; flex-direction: column; gap: 3px; }
.tyRow { display: grid; grid-template-columns: 28px 1fr 46px; column-gap: 7px; align-items: center; min-height: 30px; border-radius: 8px; padding: 1px 2px; }
.tyRow.tap { cursor: pointer; }
.tyRow.top { background: rgba(255, 210, 63, .1); }
.tyArt { position: relative; width: 28px; height: 28px; }
.tyArt canvas, .tyArt img, .tyArt svg { width: 100%; height: 100%; object-fit: contain; display: block; }
.tyCrown { position: absolute; right: -4px; top: -6px; font-style: normal; font-size: 12px; line-height: 1; color: #ffd23f; text-shadow: 0 1px 0 #1b1430; }
.tyMid { min-width: 0; }
.tyTop { display: flex; align-items: baseline; gap: 5px; min-width: 0; }
.tyRn { font-size: 11px; font-weight: 900; color: #fff8e7; letter-spacing: .3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tyLv { font-size: 9px; font-weight: 900; color: #1b1430; background: #ffd23f; border-radius: 999px; padding: 0 5px; flex: none; }
.tyGem { width: 7px; height: 7px; border-radius: 2px; background: var(--g, #9be15d); flex: none; rotate: 45deg; }
.tyTrack { height: 9px; border-radius: 999px; background: rgba(0, 0, 0, .4); overflow: hidden; margin-top: 3px; }
.tyTrack.stub .tyFill { background: #6b6a76; }
.tyFill { width: 100%; height: 100%; border-radius: 999px; background: var(--col, #74c0fc); transform-origin: 0 50%; transform: scaleX(0); }
.tyTrack.none .tyFill { display: none; }
.tyNum { text-align: right; font-family: 'Bangers', cursive; font-weight: 400; font-size: 16px; letter-spacing: .6px; color: #fff8e7; font-variant-numeric: tabular-nums; }
.tyNote { margin-top: 4px; text-align: center; font-size: 11px; font-weight: 900; letter-spacing: .6px; color: #ffa8a8; }
.tyFoot, .tyMidBar { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 12px; margin-top: 4px; font-size: 10.5px; font-weight: 800; color: #d8d2ea; }
.tyFoot i, .tyMidBar i { font-style: normal; font-weight: 900; letter-spacing: .6px; color: #ff922b; margin-right: 4px; }
.tyFoot b, .tyMidBar b { color: #74c0fc; }
.tyMidBar { margin: 0; padding: 3px 0; font-size: 11px; }
.tyActs { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.tyBtn { font-size: 16px; padding: 7px 18px; min-height: 44px; }
.tyShareStatus { flex: none; margin: 8px 12px 4px; font: 800 12px/1.4 'Nunito', system-ui, sans-serif; text-align: center; color: #fff8e7; overflow-wrap: anywhere; }
.tyShareStatus[hidden] { display: none; }
.overTally { margin: 6px 0 2px; text-align: center; }
.overTally .tinyBtn { min-height: 44px; padding: 6px 22px; font-size: 14px; }

/* Normal-result journey only. Manual TALLY keeps its original compact scroll and SHARE action. */
#tallyOv.tyJourney { padding: 0; align-items: stretch; background: #fff2ca; }
#tallyOv.tyJourney .tyCard {
  width: 100%; height: 100%; max-width: none; max-height: none; min-height: 0; border-radius: 0; padding: 0;
  background: radial-gradient(circle at 18% 0, #fffdf0, #fff2ca 65%); color: #24153c; box-shadow: none;
}
#tallyOv.tyJourney .tyReportHead {
  flex: none; display: grid; grid-template-columns: 72px minmax(0, 1fr) 72px; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 4px solid #24153c; background: #ffd23f; box-shadow: 0 4px 0 #24153c18;
}
#tallyOv.tyJourney .tyTitle { margin: 0; color: #24153c; text-shadow: 0 2px 0 #fff8e7; font-size: clamp(28px, 6vw, 42px); line-height: 1.05; }
#tallyOv.tyJourney .tyBack {
  min-height: 44px; padding: 7px 8px; border: 2px solid #24153c; border-radius: 10px; background: #fff8e7; color: #24153c;
  font-family: 'Nunito', system-ui, sans-serif; font-size: 12px; font-weight: 900; cursor: pointer;
}
#tallyOv.tyJourney .tyScroll {
  width: 100%; max-width: 840px; margin: 0 auto; padding: 18px 18px 24px; box-sizing: border-box; gap: 14px; overscroll-behavior: contain;
}
#tallyOv.tyJourney .tySectionTitle { margin: 0 0 9px; font: 400 23px/1.1 'Bangers', cursive; letter-spacing: 1px; color: #4c2674; }
#tallyOv.tyJourney .tySummary { flex: none; border: 2px solid #24153c; border-radius: 12px; background: #eee6f6; }
#tallyOv.tyJourney .tySummary > summary { min-height: 48px; margin: 0; padding: 12px; box-sizing: border-box; cursor: pointer; }
#tallyOv.tyJourney .tySummaryGrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 2px 12px 16px; }
#tallyOv.tyJourney .tySummaryStat {
  display: flex; flex-direction: column; justify-content: center; min-width: 0; min-height: 78px; padding: 9px 10px; box-sizing: border-box;
  border: 2px solid #24153c; border-radius: 12px; background: #fffdf4; box-shadow: 3px 3px 0 #24153c; text-align: center;
}
#tallyOv.tyJourney .tySummaryStat b { font: 400 clamp(26px, 5vw, 36px)/1.1 'Bangers', cursive; color: #4c2674; overflow-wrap: anywhere; }
#tallyOv.tyJourney .tySummaryStat span { margin-top: 4px; font-size: 11px; font-weight: 900; line-height: 1.3; color: #493f59; overflow-wrap: anywhere; }
#tallyOv.tyJourney .tyDamageHeading { margin-top: 5px; }
#tallyOv.tyJourney .tyDamageHeading .tySectionTitle { margin-bottom: 3px; }
#tallyOv.tyJourney .tyDamageHeading p { margin: 0; font-size: 12px; font-weight: 800; line-height: 1.4; color: #62516e; }
#tallyOv.tyJourney .tyPanel { padding: 13px; border: 2px solid #24153c; border-top: 6px solid var(--ty-col); border-radius: 14px; background: #fffdf4; box-shadow: 3px 3px 0 #24153c; }
#tallyOv.tyJourney .tyHead { grid-template-columns: 34px minmax(0, 1fr); column-gap: 8px; margin-bottom: 6px; }
#tallyOv.tyJourney .tyBust { width: 34px; height: 34px; }
#tallyOv.tyJourney .tyName { color: #24153c; font-size: 19px; white-space: normal; overflow-wrap: anywhere; }
#tallyOv.tyJourney .tyTotal { margin: 0 0 10px; color: #315575; font-size: 12px; font-weight: 900; }
#tallyOv.tyJourney .tyChip { background: #eee6f6; color: #4c2674; font-size: 10px; padding: 3px 7px; }
#tallyOv.tyJourney .tyChip.pow { background: #ffedaa; color: #5d3a08; }
#tallyOv.tyJourney .tyRows { gap: 4px; }
#tallyOv.tyJourney .tyRow { grid-template-columns: 30px minmax(0, 1fr) 56px; column-gap: 8px; min-height: 32px; padding: 0 3px; }
#tallyOv.tyJourney .tyRow.top { background: #fff0b6; outline: 1px solid #d9ab37; }
#tallyOv.tyJourney .tyArt { width: 30px; height: 30px; }
#tallyOv.tyJourney .tyRn { color: #24153c; font-size: 11px; white-space: normal; line-height: 1.2; }
#tallyOv.tyJourney .tyTop { flex-wrap: wrap; gap: 3px 5px; }
#tallyOv.tyJourney .tyTrack { height: 8px; margin-top: 3px; border: 1px solid #24153c35; background: #ded7e8; }
#tallyOv.tyJourney .tyFill { box-shadow: inset 0 -2px 0 #24153c26; }
#tallyOv.tyJourney .tyNum { font-size: 21px; color: #24153c; }
#tallyOv.tyJourney .tyNote { color: #8c3346; line-height: 1.4; }
#tallyOv.tyJourney .tyFoot, #tallyOv.tyJourney .tyMidBar { font-size: 12px; color: #493f59; }
#tallyOv.tyJourney .tyFoot i, #tallyOv.tyJourney .tyMidBar i { color: #66418c; }
#tallyOv.tyJourney .tyFoot b, #tallyOv.tyJourney .tyMidBar b { color: #24153c; }
#tallyOv.tyJourney .tyActs { flex: none; margin: 0; padding: 12px 18px 16px; border-top: 3px solid #24153c; background: #4c2674; }
#tallyOv.tyJourney .tyBtn { width: 100%; max-width: 420px; min-height: 52px; font-size: 25px; border: 3px solid #24153c; box-shadow: 0 4px 0 #24153c; }
#tallyOv.tyJourney .tyShareStatus { margin: 0; padding: 8px 14px; background: #eee6f6; color: #493f59; }
#tallyOv.tyJourney button:focus-visible { outline: 3px solid #087e98; outline-offset: 3px; }
#tallyOv.tyJourney summary:focus-visible { outline: 3px solid #087e98; outline-offset: -4px; border-radius: 10px; }
@media (max-width: 479px) {
  #tallyOv.tyJourney .tyReportHead { grid-template-columns: 58px minmax(0, 1fr) 58px; gap: 4px; padding: 9px 10px; }
  #tallyOv.tyJourney .tyScroll { padding: 14px 12px 20px; }
  #tallyOv.tyJourney .tySummaryGrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  #tallyOv.tyJourney .tyPanel { padding: 11px 8px; }
}

/* ============================================================================ 4 THE LEADER CAST (FEEL-96 F17, public/js/cinematics.js castStart)
   A side slot: the leader's bust slides in at the strip's edge, a comic bubble carries his own line, ~1.2 s. Nothing here takes a tap. */
#cineCast { position: fixed; left: 0; right: 0; top: 44px; height: 64px; z-index: 61; pointer-events: none; }
.cineCastBust {
  position: absolute; left: 0; top: 0; width: 58px; height: 58px; border-radius: 14px; overflow: hidden; opacity: 0;
  background: #120d24; box-shadow: 0 0 0 3px var(--cast-col, #ffd23f), 0 6px 0 rgba(0, 0, 0, .4); will-change: transform, opacity;
}
.cineCastBust > *, .cineCastBust img, .cineCastBust canvas, .cineCastBust svg { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.cineCastBubble {
  position: absolute; top: 5px; box-sizing: border-box; padding: 6px 11px 5px; border-radius: 13px; opacity: 0;
  background: #fff8e7; color: #1b1430; border: 3px solid #1b1430; box-shadow: 0 4px 0 rgba(0, 0, 0, .35);
  font-family: 'Bangers', cursive; font-size: 15px; letter-spacing: .8px; line-height: 1.12; max-width: 230px;
}
.cineCastBubble::before {
  content: ''; position: absolute; left: -11px; top: 14px; width: 0; height: 0; border-style: solid; border-width: 6px 9px 6px 0; border-color: transparent #1b1430 transparent transparent;
}
#cineCast.rival .cineCastBubble::before { left: auto; right: -11px; border-width: 6px 0 6px 9px; border-color: transparent transparent transparent #1b1430; }

/* ============================================================================ 5 THE BOSS ROULETTE (FEEL-96 F18, public/js/hud.js startRoulette)
   One CSS translate of a column of nine faces, decelerating, landing on the real boss (or the silhouette of an unmet one). */
body.cc-hud { --cc-roul-px: 18px; }
body.cc-hud .cc-roul { display: inline-block; width: var(--cc-roul-px); height: var(--cc-roul-px); overflow: hidden; flex: 0 0 auto; border-radius: 50%; }
body.cc-hud .cc-roul-col { display: flex; flex-direction: column; animation: ccRoul var(--roul-ms, 3000ms) var(--roul-ease, cubic-bezier(.25, .6, .3, 1)) both; }
body.cc-hud .cc-roul-face { display: block; width: var(--cc-roul-px); height: var(--cc-roul-px); flex: 0 0 var(--cc-roul-px); border-radius: 50%; box-sizing: border-box; }
@keyframes ccRoul { from { translate: 0 0; } to { translate: 0 calc(var(--rn, 8) * var(--cc-roul-px) * -1); } }
@media (max-height: 700px) { body.cc-hud { --cc-roul-px: 16px; } }
html[data-anim="none"] body.cc-hud .cc-roul-col, html[data-anim="some"] body.cc-hud .cc-roul-col { animation: none; }
body.cc-hud .cc-boss-face.veil { background: #120d24; }

.overTally:empty { display: none; }
.ccTallyBtn .ci { width: 16px; height: 16px; margin-right: 6px; vertical-align: -3px; }

/* ============================================================================ 7 THE HOME CLAIM DOT (FEEL-96 F20)
   Absolute inside the chest row (.ch-chestwrap is position:relative): it adds no height to the fitted HOME column. A 44px round gold dot with a count;
   it bobs (+-4 px, motion.css) on FULL and sits still on SOME / NONE. */
.ccClaimDot {
  position: absolute; right: 2px; top: 50%; margin-top: -22px; z-index: 3; width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center; flex-direction: column; line-height: 1;
  background: linear-gradient(180deg, #ffe28a, #ffb703); color: #3a2300; border: 2px solid var(--ink, #1b1430);
  box-shadow: 0 0 0 2px #ffd23f66, 0 4px 0 rgba(0, 0, 0, .35);
}
.ccClaimDot[hidden] { display: none; }
.ccClaimDot .ico { display: flex; width: 20px; height: 20px; }
.ccClaimDot .ico .ci { width: 20px; height: 20px; }
.ccClaimDot .n {
  position: absolute; right: -5px; top: -6px; min-width: 18px; height: 18px; padding: 0 4px; box-sizing: border-box; border-radius: 9px;
  background: #ff5c7a; color: #fff; font-family: 'Bangers', cursive; font-size: 12px; letter-spacing: .4px; line-height: 14px; text-align: center;
  border: 2px solid var(--ink, #1b1430);
}
.ccClaimDot::after { content: ''; position: absolute; left: -5px; right: -5px; top: -5px; bottom: -5px; border-radius: 50%; }

