/* Lumen Academy — retained component refinements.
   This file is the final shared UI layer: no new version-suffixed style generations. */

:root{
  --lumen-surface: linear-gradient(180deg,rgba(8,20,38,.94),rgba(5,14,28,.97));
  --lumen-border: rgba(191,145,75,.28);
  --lumen-border-soft: rgba(183,146,87,.16);
  --lumen-divider: rgba(190,154,92,.18);
}

/* --------------------------------------------------------------------------
   Focus — retained readability improvements.
   -------------------------------------------------------------------------- */
body.focus-screen-active .focus-subject-row > select,
body[data-reward-theme].focus-screen-active .focus-subject-row > select{
  font-size:.76rem !important;
}
body.focus-screen-active .focus-mode-option,
body[data-reward-theme].focus-screen-active .focus-mode-option,
body.focus-screen-active .focus-timer-option,
body[data-reward-theme].focus-screen-active .focus-timer-option{
  font-size:.70rem !important;
  letter-spacing:.025em !important;
}
.beginner-tutorial-copy span{
  font-size:.62rem !important;
  letter-spacing:.14em !important;
}
.beginner-tutorial-copy strong{
  font-size:.82rem !important;
  line-height:1.1 !important;
}
.beginner-tutorial-copy small{
  font-size:.70rem !important;
  line-height:1.28 !important;
}
.beginner-tutorial-strip{ padding:10px 12px !important; }
.beginner-tutorial-strip.compact{ padding:9px 12px !important; }
.focus-boosts-heading .focus-loadout-title-copy b{ font-size:.62rem !important; }



/* --------------------------------------------------------------------------
   Rewards / Chests — retained readability changes without touching
   Characters, Pets, Relics, Castles, Themes, Boosts, or Lumen Pass.
   -------------------------------------------------------------------------- */
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .mystery-chest-copy > span{
  font-size:.60rem !important;
}
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .mystery-chest-copy > strong{
  font-size:.92rem !important;
}
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .mystery-chest-copy p{
  font-size:.68rem !important;
  line-height:1.32 !important;
}
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .mystery-chest-copy small{
  font-size:.62rem !important;
  line-height:1.24 !important;
}
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-mock-action strong{
  font-size:.70rem !important;
}
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-mock-action.locked span{
  font-size:.60rem !important;
}
.reward-universal-v69.category-chests .reward-universal-description-v69,
.reward-universal-v69.category-chests .reward-detail-description,
.reward-universal-v69.category-chests .reward-detail-lore{
  font-size:.76rem !important;
  line-height:1.48 !important;
}
.reward-universal-v69.category-chests .reward-universal-rarity-v69,
.reward-universal-v69.category-chests .reward-detail-rarity,
.reward-universal-v69.category-chests .reward-detail-category,
.reward-universal-v69.category-chests .reward-detail-kicker{
  font-size:.62rem !important;
}

/* --------------------------------------------------------------------------
   Allies — flatter surfaces and more readable metadata.
   -------------------------------------------------------------------------- */
#sheetOverlay > .sheet:has(.allies-modal-v55){
  border-color:var(--lumen-border) !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-find-top-v61{
  border-color:var(--lumen-border-soft) !important;
  background:linear-gradient(180deg,rgba(9,24,45,.68),rgba(6,17,32,.72)) !important;
  box-shadow:none !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-find-head-v55 strong{
  font-size:.78rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-find-head-v55 small{
  font-size:.66rem !important;
  line-height:1.28 !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-find-row-v55 input{
  font-size:.76rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-find-row-v55 button{
  font-size:.68rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-summary-card-v60{
  border:0 !important;
  border-top:1px solid var(--lumen-divider) !important;
  border-bottom:1px solid var(--lumen-divider) !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-summary-copy-v60 small{
  font-size:.58rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-summary-copy-v60 strong{
  font-size:.92rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-code-strip-v61{
  border-color:var(--lumen-border-soft) !important;
  background:rgba(7,19,35,.48) !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-code-strip-v61 .allies-code-copy-v55 span{
  font-size:.56rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-code-strip-v61 .allies-copy-v55 strong{
  font-size:.60rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-list-panel-main-v61{
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  padding-left:2px !important;
  padding-right:2px !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-list-heading-v55 strong{
  font-size:.76rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-list-row-v55{
  border:0 !important;
  border-bottom:1px solid var(--lumen-divider) !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-list-identity-v55 strong{
  font-size:.82rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-list-identity-v55 small{
  font-size:.60rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-list-focus-v55 span{
  font-size:.74rem !important;
}
#sheetOverlay > .sheet:has(.allies-modal-v55) .allies-list-focus-v55 small{
  font-size:.56rem !important;
}

/* Allies/teammate profile refinements are part of the Allies experience. */
.ally-profile-head-v45 > div > span{ font-size:.62rem !important; }
.ally-profile-identity-v45 > span{ font-size:.60rem !important; }
.ally-profile-identity-v45 p{
  font-size:.70rem !important;
  line-height:1.3 !important;
}
.ally-profile-pills-v45 em{
  font-size:.58rem !important;
  padding:3px 7px !important;
}
.ally-profile-section-title-v45 > span{ font-size:.62rem !important; }
.ally-profile-section-title-v45 > em{ font-size:.56rem !important; }
.ally-profile-stat-copy-v45 small,
.ally-profile-stat-v45.subject-breakdown .ally-profile-stat-copy-v45 small{
  font-size:.58rem !important;
  line-height:1.15 !important;
}
.ally-profile-stat-copy-v45 strong{ font-size:.80rem !important; }
.ally-profile-assets-v45{
  border:0 !important;
  border-top:1px solid var(--lumen-divider) !important;
  border-bottom:1px solid var(--lumen-divider) !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
}
.ally-profile-asset-row-v45 small{ font-size:.58rem !important; }
.ally-profile-asset-row-v45 strong{ font-size:.76rem !important; }
.ally-profile-actions-v45 button{ font-size:.68rem !important; }

/* --------------------------------------------------------------------------
   Quests — clean layout without decorative gold corner filigree.
   Keep the normal card border/background; only the corner artwork is removed.
   -------------------------------------------------------------------------- */
body.secondary-screen-active .quests-mock-row::before,
body .quests-mock-row::before{
  content:none !important;
  display:none !important;
  background-image:none !important;
  border:0 !important;
  box-shadow:none !important;
}
body.secondary-screen-active .quests-mock-row::after,
body .quests-mock-row::after{
  content:none !important;
  display:none !important;
}

@media(max-width:430px){
  #sheetOverlay > .sheet.ui-modal-shell :is(small,.muted,.subcopy){font-size:max(.75rem,12px) !important;line-height:1.38 !important;}
  #sheetOverlay > .sheet.ui-modal-shell :is(.kicker,.eyebrow,.reward-detail-kicker,.lumen-celestial-kicker){font-size:max(.75rem,12px) !important;letter-spacing:.08em !important;}
  .beginner-tutorial-copy small{ font-size:.66rem !important; }
  body.focus-screen-active .focus-mode-option,
  body[data-reward-theme].focus-screen-active .focus-mode-option,
  body.focus-screen-active .focus-timer-option,
  body[data-reward-theme].focus-screen-active .focus-timer-option{
    font-size:.66rem !important;
  }

  body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .mystery-chest-copy p{
    font-size:.64rem !important;
  }
  body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .mystery-chest-copy small{
    font-size:.58rem !important;
  }

  .ally-profile-identity-v45 p{ font-size:.66rem !important; }
  .ally-profile-pills-v45 em{ font-size:.54rem !important; }
  .ally-profile-stat-copy-v45 small,
  .ally-profile-stat-v45.subject-breakdown .ally-profile-stat-copy-v45 small{
    font-size:.54rem !important;
  }
  .ally-profile-asset-row-v45 small{ font-size:.54rem !important; }
}


/* The daily quote is fixed for the calendar day, while each return to
   Focus randomly shows either that quote or one personal Extended Stat. */
.focus-quote-overlay.is-daily-stat{
  width:min(82%,350px) !important;
}
.focus-daily-insight-stat{
  display:grid;
  justify-items:center;
  align-content:center;
  gap:3px;
  min-height:38px;
  text-align:center;
  color:inherit;
}
.focus-daily-insight-stat strong{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:inherit;
  font-size:1.02rem;
  line-height:1.05;
  font-weight:600;
  text-shadow:0 2px 9px rgba(0,0,0,.46);
}
.focus-daily-insight-stat span{
  max-width:100%;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:inherit;
  opacity:.76;
  font-size:.58rem;
  line-height:1.1;
  font-weight:700;
  letter-spacing:.13em;
  text-transform:uppercase;
}
.focus-quote-overlay.is-daily-stat .focus-loadout-strip{
  margin-top:8px;
}
@media(max-width:430px){
  .focus-quote-overlay.is-daily-stat{ width:min(86%,330px) !important; }
  .focus-daily-insight-stat strong{ font-size:.94rem; }
  .focus-daily-insight-stat span{ font-size:.54rem; letter-spacing:.1em; }
}


/* Stats title card matches the shared Quests/Rewards/Teams card height.
   This lives in the final stylesheet so older Stats-specific rules cannot enlarge it. */
body.secondary-screen-active .stats-mock-page > .secondary-page-header{
  flex:0 0 58px !important;
  height:58px !important;
  min-height:58px !important;
  padding:0 10px !important;
}
body.secondary-screen-active .stats-mock-page{
  grid-template-rows:58px minmax(0,.67fr) minmax(0,.90fr) minmax(0,1.26fr) minmax(42px,.11fr) !important;
}
body.secondary-screen-active .stats-mock-page > .secondary-page-header .secondary-page-title h2{
  font-size:1.22rem !important;
}
@media(max-width:390px){
  body.secondary-screen-active .stats-mock-page > .secondary-page-header{
    flex-basis:54px !important;
    height:54px !important;
    min-height:54px !important;
  }
  body.secondary-screen-active .stats-mock-page{
    grid-template-rows:54px minmax(0,.65fr) minmax(0,.92fr) minmax(0,1.24fr) minmax(39px,.10fr) !important;
  }
  body.secondary-screen-active .stats-mock-page > .secondary-page-header .secondary-page-title h2{
    font-size:1.12rem !important;
  }
}

/* Active boost cabinet and applied-reward feedback. */
.toast{white-space:pre-line !important;}
.toast.boosted-reward-toast{
  border-color:rgba(223,180,89,.72) !important;
  background:linear-gradient(180deg,rgba(15,28,47,.98),rgba(7,16,29,.99)) !important;
  color:#f2dfb7 !important;
  box-shadow:0 10px 28px rgba(0,0,0,.34),inset 0 1px 0 rgba(255,255,255,.05),0 0 18px rgba(219,170,73,.10) !important;
  text-align:center !important;
  line-height:1.45 !important;
}
.rewards-system-panel.boost-cabinet-panel{
  margin:0 4px !important;
  padding:12px 15px 10px !important;
  border:1px solid rgba(151,111,62,.46) !important;
  border-radius:15px !important;
  background:linear-gradient(180deg,rgba(8,15,29,.985),rgba(5,11,22,.995)) !important;
  box-shadow:inset 0 1px 0 rgba(245,218,162,.03),0 9px 20px rgba(0,0,0,.16) !important;
  display:block !important;
  color:#d7c3a0 !important;
}
.boost-cabinet-head{display:flex;padding:0 2px 9px !important;}
.boost-cabinet-head>img{width:42px !important;height:42px !important;object-fit:contain;filter:saturate(.9) brightness(.98) drop-shadow(0 4px 8px rgba(0,0,0,.30)) !important;}
.boost-cabinet-head>span{display:grid;min-width:0;}
.boost-cabinet-head small{color:#b88d55 !important;font-weight:700;}
.boost-cabinet-head strong{color:#f0d7a0 !important;font-size:.94rem !important;font-weight:500;line-height:1;}
.boost-cabinet-max{
  display:grid;grid-template-columns:1fr 1px 1fr;align-items:center;gap:10px;
  padding:7px 4px 9px !important;border-top:1px solid rgba(160,121,66,.18);border-bottom:1px solid rgba(160,121,66,.20);
}
.boost-cabinet-max>span{display:flex;align-items:baseline;justify-content:center;gap:7px;min-width:0;}
.boost-cabinet-max small{color:#9d8b72 !important;font-size:.45rem !important;letter-spacing:.12em;font-weight:700;}
.boost-cabinet-max strong{color:#edc87f !important;font-size:.74rem !important;font-weight:700;}
.boost-cabinet-max>i{height:22px;width:1px;background:rgba(181,142,79,.25);}
.boost-cabinet-list{display:grid !important;gap:0 !important;margin:0 !important;}
.boost-cabinet-line{
  display:grid !important;
  min-height:47px;padding:6px 3px !important;border:0 !important;border-bottom:1px solid rgba(151,111,62,.18) !important;
  border-radius:0 !important;background:transparent !important;box-shadow:none !important;
}
.boost-cabinet-line:last-child{border-bottom:0 !important;}
.boost-cabinet-line>img{object-fit:contain;filter:drop-shadow(0 3px 5px rgba(0,0,0,.30));}
.boost-cabinet-line>span{display:grid;gap:1px;min-width:0;text-align:left !important;}
.boost-cabinet-line>span strong{color:#e7d2a7 !important;font-weight:600 !important;letter-spacing:.01em !important;text-overflow:ellipsis;}
.boost-cabinet-line>span small{color:#a89983 !important;font-size:.44rem !important;font-weight:600;letter-spacing:.07em;}
.boost-cabinet-line>b{color:#c9a35d !important;font-size:.47rem !important;letter-spacing:.08em;white-space:nowrap;}
.boost-cabinet-empty{padding:11px 4px 5px;color:#968b7b;font-size:.56rem;line-height:1.35;text-align:center;}
@media(max-width:430px){
  .rewards-system-panel.boost-cabinet-panel{padding:10px 12px 8px !important;}
  .boost-cabinet-head>img{width:37px !important;height:37px !important;}
  .boost-cabinet-head strong{font-size:.87rem !important;}
  .boost-cabinet-line{grid-template-columns:30px minmax(0,1fr) auto;min-height:43px;gap:7px;padding:5px 2px !important;}
  .boost-cabinet-line>img{width:28px;height:28px;}
  .boost-cabinet-line>span strong{font-size:.56rem !important;}
  .boost-cabinet-line>span small,.boost-cabinet-line>b{font-size:.41rem !important;}
}

/* ==========================================================================
   CANONICAL UI SYSTEM
   Four actions, one close affordance, one opaque modal surface.
   Bespoke screens may keep artwork/layout, but share interaction chrome.
   ========================================================================== */
:root{
  --ui-modal-bg:linear-gradient(180deg,rgba(9,20,36,.995),rgba(5,13,25,.998));
  --ui-modal-border:rgba(208,169,91,.32);
  --ui-divider:rgba(202,166,101,.17);
  --ui-gold:#e7c277;
  --ui-gold-bright:#f7dda3;
  --ui-muted:#a9b2c1;
  --ui-danger:#e2a097;
  --ui-control-bg:rgba(8,18,32,.72);
  --ui-control-border:rgba(190,153,86,.24);
  --ui-hit:44px;
}

/* Base action geometry. Legacy classes are mapped to these primitives in JS. */
.ui-btn{
  min-height:44px !important;
  border-radius:10px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px !important;
  padding:10px 16px !important;
  font-weight:700 !important;
  font-size:.78rem !important;
  line-height:1.1 !important;
  letter-spacing:.025em !important;
  text-transform:none !important;
  text-decoration:none !important;
  box-shadow:none !important;
  transition:transform .14s ease,border-color .14s ease,background .14s ease,filter .14s ease !important;
}
.ui-btn::before,.ui-btn::after{display:none !important;content:none !important;}
.ui-btn:not(:disabled):active{transform:translateY(1px) scale(.995);}
.ui-btn-primary{
  border:1px solid rgba(237,197,106,.82) !important;
  background:radial-gradient(circle at 50% 0%,rgba(255,242,182,.22),transparent 44%),linear-gradient(180deg,#b38b4c 0%,#8a642d 52%,#67471d 100%) !important;
  color:#fff0c6 !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.26),inset 0 0 0 2px rgba(73,45,14,.10),0 6px 15px rgba(0,0,0,.18) !important;
}
.ui-btn-primary:not(:disabled):hover{filter:brightness(1.06);}
.ui-btn-secondary{
  border:1px solid rgba(213,180,117,.36) !important;
  background:rgba(10,22,38,.54) !important;
  color:#d8c7a4 !important;
}
.ui-btn-secondary:not(:disabled):hover{border-color:rgba(231,194,123,.56) !important;background:rgba(16,30,49,.66) !important;}
.ui-btn-destructive{
  border:1px solid rgba(190,105,96,.48) !important;
  background:linear-gradient(180deg,rgba(106,45,44,.68),rgba(67,29,32,.76)) !important;
  color:#f2c7c0 !important;
}
.ui-btn-destructive:not(:disabled):hover{border-color:rgba(224,132,119,.68) !important;filter:brightness(1.05);}
.ui-btn-quiet{
  min-height:36px !important;
  padding:6px 8px !important;
  border:0 !important;
  background:transparent !important;
  color:#c8ae78 !important;
  box-shadow:none !important;
  text-decoration:none !important;
}
.ui-btn:disabled{opacity:.48 !important;filter:saturate(.6) !important;cursor:not-allowed !important;transform:none !important;}

/* Shared close control: 44px hit target, same X weight and placement. */
#sheetOverlay > .sheet.ui-modal-shell .ui-close,
.ui-close{
  
  padding:0 !important;margin:0 !important;
  display:grid !important;place-items:center !important;
  
  
  font:500 1.36rem/1 system-ui,-apple-system,sans-serif !important;
  letter-spacing:0 !important;text-shadow:none !important;
}
#sheetOverlay > .sheet.ui-modal-shell .ui-close::before,#sheetOverlay > .sheet.ui-modal-shell .ui-close::after,.ui-close::before,.ui-close::after{display:none !important;content:none !important;}
#sheetOverlay > .sheet.ui-modal-shell .ui-close:hover,.ui-close:hover{border-color:rgba(232,195,120,.52) !important;background:rgba(13,26,43,.76) !important;}

/* Every sheet gets the same opaque structural surface; bespoke art stays inside it. */
#sheetOverlay > .sheet.ui-modal-shell{
  background:var(--ui-modal-bg) !important;
  border:1px solid var(--ui-modal-border) !important;
  opacity:1 !important;
  backdrop-filter:none !important;
}
body[data-reward-theme] #sheetOverlay > .sheet.ui-modal-shell{
  background:var(--ui-modal-bg) !important;
  border-color:var(--ui-modal-border) !important;
  opacity:1 !important;
}

/* Functional sheets use one opaque surface. Theme changes cannot alter opacity/structure. */
#sheetOverlay > .sheet.ui-modal-shell.ui-functional-sheet{
  background:var(--ui-modal-bg) !important;
  border:1px solid var(--ui-modal-border) !important;
  box-shadow:0 24px 64px rgba(0,0,0,.52),inset 0 1px 0 rgba(255,255,255,.035) !important;
  backdrop-filter:none !important;
  opacity:1 !important;
}
body[data-reward-theme] #sheetOverlay > .sheet.ui-modal-shell.ui-functional-sheet{
  background:var(--ui-modal-bg) !important;
  border-color:var(--ui-modal-border) !important;
  opacity:1 !important;
}
.ui-functional-sheet .sheet-header,.ui-sheet-header{
  display:flex !important;align-items:flex-start !important;justify-content:space-between !important;gap:14px !important;
  padding:0 0 14px !important;margin:0 0 4px !important;
  border-bottom:1px solid var(--ui-divider) !important;background:transparent !important;
}
.ui-functional-sheet .sheet-header > div{min-width:0;display:grid;gap:4px;}
.ui-functional-sheet .sheet-title{font-size:1.42rem !important;line-height:1.08 !important;color:#f0d59a !important;text-transform:none !important;letter-spacing:.005em !important;}
.ui-functional-sheet .kicker{font-size:.75rem !important;line-height:1.1 !important;letter-spacing:.10em !important;text-transform:none !important;color:#c9a761 !important;}
.ui-functional-sheet .muted{font-size:.78rem !important;line-height:1.48 !important;color:#9faabb !important;}
.ui-functional-sheet .sheet-actions,.ui-sheet-actions{display:grid !important;grid-template-columns:repeat(2,minmax(0,1fr)) !important;gap:9px !important;margin-top:14px !important;}
.ui-sheet-actions.single{grid-template-columns:1fr !important;}
.ui-sheet-actions.sticky{position:sticky !important;bottom:-14px !important;z-index:4 !important;margin:14px -2px -8px !important;padding:11px 2px 8px !important;background:linear-gradient(180deg,rgba(5,13,25,0),rgba(5,13,25,.98) 24%) !important;}

/* Flat forms: one list, separators, no cards within cards. */
.ui-form-list{display:grid !important;gap:0 !important;border-top:1px solid var(--ui-divider) !important;border-bottom:1px solid var(--ui-divider) !important;}
.ui-form-row,.quest-maker-grid > label{
  min-height:62px !important;display:grid !important;grid-template-columns:minmax(0,1fr) minmax(116px,42%) !important;align-items:center !important;gap:14px !important;
  padding:10px 2px !important;border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;background:transparent !important;
}
.ui-form-row:last-child,.quest-maker-grid > label:last-child{border-bottom:0 !important;}
.ui-form-row > span{display:grid;gap:3px;min-width:0;}
.ui-form-row strong{color:#ead3a2;font-size:.82rem;font-weight:600;}
.ui-form-row small{color:#929eaf;font-size:.75rem;line-height:1.3;}
.ui-form-row input,.quest-maker-grid select,.quest-maker-grid input,.academy-code-entry-modern input{
  width:100% !important;min-width:0 !important;min-height:44px !important;padding:0 12px !important;
  border:1px solid var(--ui-control-border) !important;border-radius:9px !important;background:var(--ui-control-bg) !important;color:#eee0c3 !important;
  font-size:.80rem !important;outline:0 !important;box-shadow:none !important;
}
.ui-form-row input:focus,.quest-maker-grid select:focus,.quest-maker-grid input:focus,.academy-code-entry-modern input:focus{border-color:rgba(234,194,111,.58) !important;box-shadow:0 0 0 3px rgba(218,171,77,.07) !important;}
.ui-input-suffix{position:relative;min-width:0;}.ui-input-suffix input{padding-right:42px !important;}.ui-input-suffix em{position:absolute;right:10px;top:50%;transform:translateY(-50%);font-style:normal;color:#bca271;font-size:.72rem;}

/* Compact modern warnings and confirmations. */
.ui-warning-hero{display:grid;grid-template-columns:52px minmax(0,1fr);align-items:center;gap:12px;padding:12px 2px 13px;border-bottom:1px solid var(--ui-divider);}
.ui-warning-symbol{width:48px;height:48px;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(210,165,82,.38);background:radial-gradient(circle,rgba(193,139,54,.16),rgba(21,31,45,.32));color:#e2b968;font-size:.94rem;font-weight:700;}
.cancellation-warning .ui-warning-symbol{border-color:rgba(191,103,93,.42);background:rgba(102,43,44,.24);color:#e5a59c;}
.ui-warning-hero > div{display:grid;gap:3px;}.ui-warning-hero strong{color:#ead3a2;font-size:.88rem;}.ui-warning-hero p{margin:0;color:#9ea8b5;font-size:.76rem;line-height:1.4;}
.ui-flat-list{display:grid;gap:0 !important;margin-top:4px !important;}
.ui-flat-list > *{padding:11px 2px !important;border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;background:transparent !important;border-radius:0 !important;}
.ui-flat-list > *:last-child{border-bottom:0 !important;}
.strict-warning-rule{display:grid;gap:4px;}.strict-warning-rule strong{color:#d9bd83 !important;font-size:.76rem !important;text-transform:none !important;letter-spacing:.02em !important;}.strict-warning-rule span{color:#a4adba !important;font-size:.75rem !important;line-height:1.45 !important;}
.team-leave-confirm,.team-remove-confirm{padding:12px 2px !important;border:0 !important;background:transparent !important;box-shadow:none !important;text-align:left !important;}
.team-leave-warning{width:44px !important;height:44px !important;margin:0 0 10px !important;display:grid !important;place-items:center !important;border-radius:50% !important;border:1px solid rgba(191,103,93,.42) !important;background:rgba(102,43,44,.22) !important;color:#e3a197 !important;font-size:1rem !important;}
.team-leave-confirm strong,.team-remove-confirm strong{color:#edd3a7 !important;font-size:.90rem !important;}.team-leave-confirm p,.team-remove-confirm p{color:#9ca7b7 !important;font-size:.76rem !important;line-height:1.45 !important;}

/* Quest Maker: reward preview leads, flat controls, sticky create CTA. */
.quest-maker-preview-hero{margin:3px 0 10px !important;padding:14px 2px 13px !important;border:0 !important;border-top:1px solid rgba(214,174,92,.20) !important;border-bottom:1px solid rgba(214,174,92,.20) !important;border-radius:0 !important;background:radial-gradient(circle at 50% 20%,rgba(106,65,155,.10),transparent 68%) !important;text-align:center !important;}
.quest-maker-preview span{font-size:.75rem !important;letter-spacing:.08em !important;text-transform:none !important;}.quest-maker-preview strong{font-size:1.02rem !important;color:#f0d28d !important;}.quest-maker-preview small{font-size:.75rem !important;line-height:1.42 !important;}
.quest-maker-grid{grid-template-columns:1fr !important;gap:0 !important;margin:0 !important;}
.quest-maker-grid label > span{font-size:.75rem !important;text-transform:none !important;letter-spacing:.02em !important;}
.quest-maker-number i{font-size:.70rem !important;}
.quest-maker-divider{font-size:.75rem !important;text-transform:none !important;letter-spacing:.05em !important;margin:14px 0 5px !important;}
.quest-maker-existing-list{max-height:245px !important;gap:0 !important;}
.quest-maker-existing{padding:11px 2px !important;border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;border-radius:0 !important;background:transparent !important;}
.quest-maker-existing span{font-size:.75rem !important;}.quest-maker-existing strong{font-size:.80rem !important;}.quest-maker-existing small{font-size:.75rem !important;line-height:1.35 !important;}.quest-maker-existing button{min-height:36px !important;border:0 !important;background:transparent !important;color:#d99289 !important;font-size:.72rem !important;text-transform:none !important;}
.quest-maker-empty{font-size:.76rem !important;border:0 !important;background:transparent !important;padding:14px 2px !important;}
.quest-maker-sticky-action{grid-template-columns:1fr !important;}

/* Academy code entry: emblem + a single focused field rather than a field card stack. */
.academy-code-entry-modern{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:13px;padding:16px 2px 13px;border-bottom:1px solid var(--ui-divider);}
.academy-code-emblem{width:54px;height:54px;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(209,170,91,.28);background:radial-gradient(circle,rgba(76,102,145,.18),rgba(7,17,30,.1));}.academy-code-emblem img{width:34px;height:34px;object-fit:contain;}.academy-code-entry-modern label{display:grid;gap:6px;}.academy-code-entry-modern label > span{font-size:.75rem !important;color:#c9aa6c;text-transform:none;letter-spacing:.04em;}

/* Lumen Path choice/mystery panels now share the celestial reveal language. */
.lumen-celestial-sheet{position:relative;isolation:isolate;overflow:hidden;text-align:center;color:#eadbb9;}
.lumen-celestial-sheet::before{content:"";position:absolute;inset:-12px;z-index:-2;background:radial-gradient(circle at 50% 30%,rgba(91,112,192,.23),transparent 42%),linear-gradient(180deg,rgba(7,18,40,.98),rgba(5,11,27,.995));}
.lumen-celestial-stars{position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:radial-gradient(circle at 17% 22%,rgba(255,235,177,.7) 0 1px,transparent 1.6px),radial-gradient(circle at 72% 18%,rgba(184,205,255,.6) 0 1px,transparent 1.5px),radial-gradient(circle at 86% 61%,rgba(255,225,157,.5) 0 1px,transparent 1.5px),radial-gradient(circle at 28% 76%,rgba(167,196,255,.5) 0 1px,transparent 1.5px);background-size:97px 97px,131px 131px,109px 109px,149px 149px;opacity:.7;}
.lumen-celestial-intro{display:grid;justify-items:center;gap:5px;padding:8px 0 14px;}.lumen-celestial-intro>img{width:48px;height:48px;object-fit:contain;filter:drop-shadow(0 0 12px rgba(225,183,95,.32));}.lumen-celestial-intro h3{margin:0;color:#f1d89c;font-size:1.3rem;font-weight:500;}.lumen-celestial-intro p{margin:0;color:#9facbf;font-size:.76rem;line-height:1.4;}
.lumen-choice-options{display:grid !important;}.lumen-choice-options button{display:grid !important;justify-items:center !important;align-content:center !important;gap:8px !important;border:1px solid rgba(211,171,88,.28) !important;border-radius:14px !important;color:#eed39a !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.035) !important;}.lumen-choice-art{display:grid;place-items:center;position:relative;}.lumen-choice-art::before{content:"";position:absolute;inset:8px;border-radius:50%;background:radial-gradient(circle,rgba(106,133,213,.23),transparent 68%);}.lumen-choice-art img{object-fit:contain;position:relative;filter:drop-shadow(0 8px 14px rgba(0,0,0,.32));}
.lumen-celestial-reveal{display:grid;justify-items:center;gap:8px;padding:4px 4px 0;}.lumen-celestial-kicker{font-size:.75rem;letter-spacing:.10em;color:#d7b56e;}.lumen-celestial-art{width:190px;height:190px;position:relative;display:grid;place-items:center;margin:2px 0;}.lumen-celestial-art i{position:absolute;inset:13px;border-radius:50%;background:repeating-conic-gradient(from 0deg,rgba(230,195,112,.13) 0 8deg,transparent 8deg 19deg);mask:radial-gradient(circle,transparent 0 34%,#000 35% 100%);}.lumen-celestial-art img{width:145px;height:145px;object-fit:contain;position:relative;filter:drop-shadow(0 12px 22px rgba(0,0,0,.36));}.lumen-celestial-reveal>strong{font-size:1.28rem;color:#f3daa1;font-weight:500;}.lumen-celestial-reveal>p{margin:0;max-width:330px;color:#aab6c9;font-size:.78rem;line-height:1.48;}.lumen-duplicate-conversion b{color:#e7bd6d;font-weight:700;}

/* Allies loading/error states match the decorative loaded surface. */
.allies-status-state{display:grid;justify-items:center;padding:18px 10px;color:#aebbd0;}.allies-status-emblem{width:58px;height:58px;display:grid;place-items:center;border-radius:50%;border:1px solid rgba(110,146,200,.22);background:radial-gradient(circle,rgba(67,100,158,.17),transparent 70%);}.allies-status-emblem img{width:38px;height:38px;object-fit:contain;}.allies-status-state strong{font-weight:600;}.allies-status-state .ui-btn{margin-top:5px;min-width:126px;}.ui-spinner{width:22px;height:22px;border-radius:50%;border:2px solid rgba(213,177,105,.18);border-top-color:#d8b56f;animation:uiSpin .8s linear infinite;}@keyframes uiSpin{to{transform:rotate(360deg);}}

/* Shared readability floor for functional UI. */
.ui-functional-sheet :is(small,.muted,.subcopy){font-size:max(.75rem,12px) !important;}
.ui-functional-sheet :is(.kicker,.eyebrow,label>span){font-size:max(.75rem,12px) !important;letter-spacing:.08em !important;}

/* Keep category/navigation language gold under every reward theme. */
body[data-reward-theme] :is(.quests-filter button,.quest-tab,.rewards-group-label,.secondary-page-title h2,.secondary-page-header .secondary-page-title h2){color:#efcb81 !important;}

/* Stats keep neutral/gold labels under themes; reduced motion never leaves content hidden. */
body[data-reward-theme] .stats-mock-page :is(.stats-label,.stats-summary-label,.stats-bar-readout small){color:#a9b2c1 !important;}
body[data-reward-theme] .stats-mock-page .stats-range-tabs button{color:#b9a57f !important;}
body[data-reward-theme] .stats-mock-page .stats-range-tabs button.active{color:#f0cf83 !important;}
body.reduce-motion :is(.stats-mock-page *, .lumen-celestial-sheet *, .chest-reveal-screen *){animation-duration:.001ms !important;animation-iteration-count:1 !important;transition-duration:.001ms !important;}
body.reduce-motion :is(.lumen-celestial-reveal,.lumen-celestial-art,.chest-reveal-art-shell,.chest-reveal-name,.chest-reveal-rarity){opacity:1 !important;transform:none !important;filter:none !important;}

/* Focus boost drawer remains visually subordinate to Start Focus and truncates long names. */



/* Settings stays one continuous list; sliders are integrated, never boxed. */
#sheetOverlay .settings-list,#sheetOverlay .settings-section{background:transparent !important;border:0 !important;box-shadow:none !important;}.settings-row{border-radius:0 !important;border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;background:transparent !important;box-shadow:none !important;}.settings-row:last-child{border-bottom:0 !important;}.settings-volume-row,.settings-slider-shell,.volume-slider-shell{border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;padding-left:0 !important;padding-right:0 !important;}

/* Subtle theme chrome only; theme never recolours modal surfaces or functional gold language. */
body[data-reward-theme="volcano_castle"] .topbar{background:radial-gradient(circle at 18% 0%,rgba(184,72,42,.055),transparent 48%),linear-gradient(180deg,rgba(25,24,28,.985),rgba(14,15,20,.995)) !important;border-bottom-color:rgba(203,151,100,.15) !important;box-shadow:0 5px 18px rgba(5,7,11,.12) !important;}
body[data-reward-theme="volcano_castle"] .bottom-nav{background:radial-gradient(circle at 50% 125%,rgba(176,62,38,.045),transparent 58%),linear-gradient(180deg,rgba(22,22,27,.985),rgba(12,14,19,.997)) !important;border-top-color:rgba(203,151,100,.14) !important;box-shadow:0 -6px 18px rgba(5,7,11,.11) !important;}
body[data-reward-theme="volcano_castle"] .bottom-nav .nav-item.active{background:linear-gradient(180deg,rgba(139,69,43,.085),rgba(67,39,34,.05)) !important;}body[data-reward-theme="volcano_castle"] .bottom-nav .nav-item.active::before{background:#d5a06f !important;box-shadow:0 0 5px rgba(206,123,65,.16) !important;}
body[data-reward-theme="forest_castle"] .topbar{background:radial-gradient(circle at 18% 0%,rgba(58,132,77,.05),transparent 48%),linear-gradient(180deg,rgba(23,26,25,.985),rgba(13,16,18,.995)) !important;border-bottom-color:rgba(151,174,132,.14) !important;box-shadow:0 5px 18px rgba(5,9,7,.12) !important;}
body[data-reward-theme="forest_castle"] .bottom-nav{background:radial-gradient(circle at 50% 125%,rgba(51,126,72,.04),transparent 58%),linear-gradient(180deg,rgba(21,24,23,.985),rgba(12,15,17,.997)) !important;border-top-color:rgba(151,174,132,.13) !important;box-shadow:0 -6px 18px rgba(5,9,7,.11) !important;}
body[data-reward-theme="forest_castle"] .bottom-nav .nav-item.active{background:linear-gradient(180deg,rgba(63,121,76,.075),rgba(38,72,48,.045)) !important;}body[data-reward-theme="forest_castle"] .bottom-nav .nav-item.active::before{background:#a9b985 !important;box-shadow:0 0 5px rgba(91,154,104,.15) !important;}
body[data-reward-theme="forest_castle"] :is(.secondary-page-header .secondary-page-title h2,.secondary-page-title h2,.quests-filter button,.quest-tab,.rewards-group-label){color:#efcb81 !important;}
body[data-reward-theme] #sheetOverlay > .sheet{opacity:1 !important;}

/* Lumen Path / Inventory selector: centred, larger, still flat. */
.lumen-path-view-tabs-v98{justify-content:center !important;gap:44px !important;padding:0 0 12px !important;width:100% !important;}.lumen-path-view-tabs-v98 button{min-width:98px !important;padding:0 10px 10px !important;}.lumen-path-view-tabs-v98 button strong{font-size:.76rem !important;letter-spacing:.03em !important;}.lumen-path-view-tabs-v98 button::after{left:12% !important;right:12% !important;height:3px !important;}

/* Standard close buttons inside bespoke surfaces inherit the same interaction geometry. */
.ui-specialized-sheet .ui-close{position:relative;top:auto;right:auto;}

/* Auth: sparse, readable, with launch legal/account copy. */
.auth-legal-copy{margin:8px 4px 0;text-align:center;color:#8795aa;font-size:.75rem;line-height:1.5;}.auth-legal-copy a{color:#cfb070;text-decoration:none;border-bottom:1px solid rgba(207,176,112,.34);}.auth-note{font-size:.75rem !important;line-height:1.5 !important;}.auth-form label span{font-size:.75rem !important;letter-spacing:.08em !important;}.auth-tabs button{font-size:.76rem !important;}

/* Onboarding final page: three immediate unlocks, no dense card stack. */
.onboarding-unlock-list.compact{gap:0 !important;border-top:1px solid var(--ui-divider);border-bottom:1px solid var(--ui-divider);}.onboarding-unlock-list.compact article{border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;padding:9px 2px !important;}.onboarding-unlock-list.compact article:last-child{border-bottom:0 !important;}.onboarding-unlock-list.compact b,.onboarding-unlock-list.compact p{font-size:.75rem !important;line-height:1.35 !important;}.onboarding-unlock-list.compact strong{font-size:.82rem !important;}.onboarding-more-unlocks{margin:8px 0 0;text-align:center;color:#b9a67f;font-size:.75rem;line-height:1.4;}

@media(max-width:430px){
  .ui-btn{font-size:.76rem !important;min-height:44px !important;}
  .ui-functional-sheet .sheet-title{font-size:1.28rem !important;}
  .ui-functional-sheet .sheet-actions,.ui-sheet-actions{grid-template-columns:1fr !important;}
  .ui-form-row,.quest-maker-grid > label{grid-template-columns:1fr !important;gap:6px !important;min-height:0 !important;padding:10px 2px !important;}
  .lumen-choice-options{gap:8px !important;}.lumen-choice-options button{padding:10px 7px !important;}
  .lumen-celestial-art{width:170px;height:170px;}.lumen-celestial-art img{width:132px;height:132px;}
  .lumen-path-view-tabs-v98{gap:36px !important;}.lumen-path-view-tabs-v98 button{min-width:90px !important;}.lumen-path-view-tabs-v98 button strong{font-size:.75rem !important;}
}


/* Claimed Path actions read as completed rather than disabled/error states. */
.lumen-path-step.claimed > button:disabled{
  opacity:.78 !important;
  color:#c4ad7b !important;
  border-color:rgba(195,157,88,.22) !important;
  background:linear-gradient(180deg,rgba(76,59,35,.34),rgba(36,30,24,.48)) !important;
  box-shadow:inset 0 1px 0 rgba(255,235,190,.035) !important;
  filter:none !important;
  font-size:.78rem !important;
  letter-spacing:.025em !important;
}

/* Bespoke social surfaces keep their identity but use the shared interaction rhythm. */
.create-team-head-copy h2,.academy-expedition-head h2,.allies-header-v55 h2{
  text-transform:none !important;
  letter-spacing:.01em !important;
}


/* Phone readability floor for current player-facing surfaces. */
@media(max-width:430px){
  .focus-daily-insight-stat span,
  .lumen-path-history-note-v98,
  .lumen-path-inventory-title small,
  .lumen-path-chest-cell small,
  .boost-cabinet-head small,
  .boost-cabinet-max small,
  .boost-cabinet-line > span small,
  .boost-cabinet-line > b,
  .ally-profile-head-v45 > div > span,
  .ally-profile-identity-v45 > span,
  .ally-profile-pills-v45 em,
  .ally-profile-section-title-v45 > span,
  .ally-profile-section-title-v45 > em,
  .ally-profile-stat-copy-v45 small,
  .ally-profile-asset-row-v45 small,
  .allies-find-head-v55 small,
  .allies-summary-copy-v60 small,
  .allies-code-copy-v55 span,
  .allies-list-identity-v55 small,
  .allies-list-focus-v55 small,
  .mystery-chest-copy small,
  .mystery-chest-copy p{
    font-size:12px !important;
    line-height:1.35 !important;
    letter-spacing:.04em !important;
  }
  .rewards-group-label{font-size:12px !important;letter-spacing:.06em !important;}
}

/* Shared specialized modal structure: opaque outer sheet, art and glow stay internal. */
#sheetOverlay > .sheet.ui-modal-shell.ui-specialized-sheet{
  background:var(--ui-modal-bg) !important;
  opacity:1 !important;
  backdrop-filter:none !important;
}

/* Current boost drawer uses stable classes and stays quieter than the Start Focus CTA. */
.boost-cabinet-panel{border-color:rgba(171,137,80,.22) !important;background:rgba(7,16,29,.62) !important;box-shadow:none !important;}
.boost-cabinet-toggle{min-height:56px !important;}

.boost-cabinet-toggle .boost-cabinet-head strong{white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}

.boost-cabinet-line>span strong{white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}


/* Quest category tabs remain Lumen gold under reward themes; locked Elite keeps its distinct pre-purchase state. */
body[data-reward-theme] .iphone-quests-page .iphone-tab-switch button:not(.elite),
body[data-reward-theme] .iphone-quests-page .iphone-tab-switch button.elite:not(.locked){
  color:#efcb81 !important;
}


/* Shared header geometry for bespoke social/reward surfaces. */
.ui-bespoke-header{
  min-height:44px !important;
  display:flex !important;
  align-items:flex-start !important;
  justify-content:space-between !important;
  gap:14px !important;
}
.ui-bespoke-header > :first-child{min-width:0 !important;}
.ui-bespoke-header h2,
.ui-bespoke-header .manage-academy-title{
  text-transform:none !important;
  letter-spacing:.01em !important;
}
#sheetOverlay > .sheet.ui-modal-shell{
  border-radius:18px !important;
}

/* Final phone microcopy floor: no player-facing secondary label should collapse below 12px. */
@media(max-width:430px){
  .beginner-tutorial-copy :is(span,small),
  body.focus-screen-active :is(.focus-mode-option,.focus-timer-option),
  body[data-reward-theme].focus-screen-active :is(.focus-mode-option,.focus-timer-option),
  .focus-boosts-heading .focus-loadout-title-copy :is(b,strong),
  .focus-boost-group .focus-loadout-bonus,
  body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-group-label,
  body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-text-subtabs button small,
  body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .mystery-chest-copy :is(span,p,small),
  body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-mock-action :is(strong,span),
  .reward-universal-v69.category-chests :is(.reward-universal-rarity-v69,.reward-detail-rarity,.reward-detail-category,.reward-detail-kicker),
  .ally-profile-actions-v45 button,
  .focus-daily-insight-stat span,
  .boost-cabinet-empty{
    font-size:12px !important;
    line-height:1.3 !important;
    letter-spacing:.04em !important;
  }
}


/* ==========================================================================
   v102 regression repair — modal reachability + quiet close control.
   The visual X is intentionally small and uncarded; its transparent hit target
   remains comfortable. Sheets can reach both viewport edges and scroll fully.
   ========================================================================== */
#sheetOverlay > .sheet.ui-modal-shell .ui-close,
.ui-close{
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  min-height:38px !important;
  flex:0 0 38px !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#d9bd82 !important;
  font:400 1.08rem/1 system-ui,-apple-system,sans-serif !important;
  box-shadow:none !important;
}
#sheetOverlay > .sheet.ui-modal-shell .ui-close:hover,
.ui-close:hover,
#sheetOverlay > .sheet.ui-modal-shell .ui-close:focus-visible,
.ui-close:focus-visible{
  border:0 !important;
  background:transparent !important;
  color:#f1d79e !important;
  outline:1px solid rgba(232,195,120,.28) !important;
  outline-offset:-6px !important;
}

.phone-stage > #sheetOverlay{
  place-items:start center !important;
  padding:16px 24px !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  overscroll-behavior:contain !important;
  -webkit-overflow-scrolling:touch !important;
}
.phone-stage #sheetOverlay .sheet{
  max-height:calc(100% - 32px) !important;
  margin:auto 0 !important;
  scroll-padding-top:14px !important;
  scroll-padding-bottom:18px !important;
  padding-bottom:22px !important;
}
.phone-stage #sheetOverlay .sheet-header{
  top:0 !important;
  margin:-12px -12px 8px !important;
  padding:12px !important;
}
.phone-stage #sheetOverlay .sheet > :last-child{
  margin-bottom:2px !important;
}
@media(max-width:599px){
  .phone-stage > #sheetOverlay{padding:14px 24px 16px !important;}
  .phone-stage #sheetOverlay .sheet{max-height:calc(100% - 30px) !important;}
}

/* Lumen-only boost lock treatment (Developer Mode preview only). */
.rewards-mock-action.lumen-locked{
  border:1px solid rgba(201,163,91,.26) !important;
  background:rgba(10,20,34,.54) !important;
  color:#c9ad78 !important;
  opacity:.86 !important;
}
.rewards-mock-action.lumen-locked strong{color:#e2c583 !important;}
.rewards-mock-action.lumen-locked span{color:#8f9bad !important;}

/* Bespoke X controls keep their existing placement but use the same uncarded visual. */
:is(.close-button,.academy-expedition-x,.allies-close-v55,.ally-profile-close-v45,.create-team-close,.manage-academy-close,.reward-universal-close-v69){
  width:38px !important;
  height:38px !important;
  min-width:38px !important;
  min-height:38px !important;
  padding:0 !important;
  border:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  color:#d9bd82 !important;
  box-shadow:none !important;
  text-shadow:none !important;
  font:400 1.08rem/1 system-ui,-apple-system,sans-serif !important;
}
:is(.close-button,.academy-expedition-x,.allies-close-v55,.ally-profile-close-v45,.create-team-close,.manage-academy-close,.reward-universal-close-v69):hover{
  border:0 !important;
  background:transparent !important;
  color:#f1d79e !important;
}

/* ========================================================================== 
   POPUP & OVERLAY REFINEMENT
   Stable selectors only: this section modernises player-facing sheets without
   creating another versioned design generation.
   ========================================================================== */

/* Progress celebrations: preserve the successful full-screen language, but make
   supporting copy easier to read and give personal bests a distinct trophy halo. */
.progress-celebration-screen > p{
  font-size:.84rem !important;
  line-height:1.52 !important;
}
.progress-celebration-unlock span{font-size:.82rem !important;line-height:1.35 !important;}
.celebration-personal-best .progress-celebration-art::after{
  content:"";position:absolute;width:72%;aspect-ratio:1;border-radius:50%;
  border:1px solid rgba(240,190,82,.28);box-shadow:0 0 34px rgba(223,165,58,.14),inset 0 0 22px rgba(236,190,91,.08);
  pointer-events:none;
}

/* Onboarding choices now behave like app controls rather than a separate button system. */
.onboarding-choice-grid button,.onboarding-subject-grid button{
  min-height:44px !important;padding:9px 10px !important;border-radius:10px !important;
  border:1px solid rgba(213,180,117,.30) !important;background:rgba(10,22,38,.56) !important;
  color:#d8c7a4 !important;box-shadow:none !important;font-size:.76rem !important;font-weight:700 !important;
  letter-spacing:.025em !important;text-transform:none !important;
}
.onboarding-choice-grid button.selected,.onboarding-subject-grid button.selected{
  border-color:rgba(237,197,106,.68) !important;background:linear-gradient(180deg,rgba(151,112,54,.62),rgba(91,62,25,.66)) !important;
  color:#f5dfad !important;box-shadow:inset 0 1px 0 rgba(255,255,255,.12) !important;
}

/* Strict mode: one flat warning panel and one unmistakable consequence row. */
.strict-warning-panel{display:grid;gap:0;margin:0;}
.strict-warning-summary{display:grid;grid-template-columns:44px minmax(0,1fr);gap:12px;align-items:center;padding:13px 2px 12px;border-bottom:1px solid var(--ui-divider);}
.strict-warning-mark{width:42px;height:42px;display:grid;place-items:center;color:#e0bd75;font-size:1.15rem;border:1px solid rgba(210,165,82,.28);border-radius:50%;background:rgba(111,80,33,.10);}
.strict-warning-summary div{display:grid;gap:3px;}.strict-warning-summary strong{color:#ead3a2;font-size:.90rem;}.strict-warning-summary p{margin:0;color:#9fa9b7;font-size:.78rem;line-height:1.42;}
.strict-consequence-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 2px;border-bottom:1px solid rgba(199,118,103,.22);}
.strict-consequence-row span{color:#aeb6c2;font-size:.76rem;}.strict-consequence-row strong{color:#e6a49a;font-size:.78rem;text-align:right;}

/* Countdown and Count Up cancellation share this exact compact component. */
.focus-cancel-confirm{display:grid;gap:10px;padding:13px 2px 2px;}
.focus-cancel-consequence{display:flex;align-items:center;gap:9px;flex-wrap:wrap;}
.focus-cancel-consequence span{display:inline-flex;align-items:center;min-height:30px;padding:5px 9px;border:1px solid rgba(195,105,94,.35);border-radius:999px;background:rgba(111,44,43,.20);color:#e5a49a;font-size:.76rem;font-weight:800;}
.focus-cancel-consequence strong{color:#d8c9ac;font-size:.79rem;font-weight:600;}
.focus-cancel-confirm p{margin:0;color:#99a5b4;font-size:.76rem;line-height:1.45;}

/* Profile & Goals: editable name row, goal steppers/chips, sticky Save. */
.profile-goals-flat{display:grid;border-top:1px solid var(--ui-divider);border-bottom:1px solid var(--ui-divider);}
.profile-name-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(132px,42%);gap:14px;align-items:center;padding:11px 2px;border-bottom:1px solid rgba(202,166,101,.12);}
.profile-name-row>span,.profile-goal-copy{display:grid;gap:3px;}.profile-name-row strong,.profile-goal-copy strong{color:#ead3a2;font-size:.83rem;}.profile-name-row small,.profile-goal-copy small{color:#929eaf;font-size:.75rem;line-height:1.35;}
.profile-name-row input{min-height:44px;padding:0 12px;border:1px solid var(--ui-control-border);border-radius:9px;background:var(--ui-control-bg);color:#eee0c3;font-size:.80rem;outline:0;}
.profile-goal-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px 14px;align-items:center;padding:12px 2px;border-bottom:1px solid rgba(202,166,101,.12);}
.profile-goal-row:last-child{border-bottom:0;}.profile-goal-copy{grid-row:1 / span 2;align-self:center;}
.goal-stepper{display:grid;grid-template-columns:38px minmax(88px,1fr) 38px;align-items:center;border:1px solid var(--ui-control-border);border-radius:10px;overflow:hidden;background:rgba(8,18,32,.55);}
.goal-stepper button{height:40px;border:0;background:transparent;color:#dab970;font-size:1rem;}.goal-stepper output{display:grid;place-items:center;min-height:40px;border-left:1px solid rgba(202,166,101,.12);border-right:1px solid rgba(202,166,101,.12);color:#ead8b3;font-size:.78rem;font-weight:700;}
.goal-chip-row{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;}.goal-chip{min-height:29px;padding:4px 8px;border:1px solid rgba(193,159,97,.24);border-radius:999px;background:transparent;color:#a9b2be;font-size:.70rem;}.goal-chip.selected{border-color:rgba(231,191,111,.56);background:rgba(137,98,39,.18);color:#e7c477;}

/* Favourite Subjects: search first, custom creator as a flat row, grouped chips. */
.subject-toolbar-flat{padding:2px 0 11px !important;border-bottom:1px solid var(--ui-divider) !important;}
.custom-subject-flat{display:grid !important;grid-template-columns:minmax(0,1fr) minmax(150px,42%) !important;align-items:center !important;gap:12px !important;margin:0 !important;padding:11px 2px !important;border:0 !important;border-bottom:1px solid var(--ui-divider) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}
.custom-subject-flat>div:first-child{display:grid;gap:3px;}.custom-subject-flat>div:first-child strong{color:#ead3a2;font-size:.82rem;}.custom-subject-flat>div:first-child small{color:#929eaf;font-size:.75rem;line-height:1.35;}
.custom-subject-flat .custom-subject-entry{display:grid !important;}.custom-subject-flat input{min-height:42px !important;border-radius:9px !important;}
.subject-settings-flat{max-height:min(54vh,520px) !important;padding:0 !important;gap:0 !important;}
.subject-settings-flat .subject-settings-group{padding:11px 0 12px !important;border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}
.subject-settings-flat .subject-settings-group:last-child{border-bottom:0 !important;}.subject-settings-flat .subject-settings-group-title{margin:0 0 8px !important;padding:0 !important;border:0 !important;color:#c8ab70 !important;font-size:.75rem !important;letter-spacing:.06em !important;}
.subject-settings-flat .subject-settings-grid{display:flex !important;flex-wrap:wrap !important;gap:7px !important;}
.subject-settings-flat .subject-favorite-row{width:auto !important;min-height:34px !important;display:inline-flex !important;align-items:center !important;gap:6px !important;padding:6px 10px !important;border:1px solid rgba(190,153,86,.22) !important;border-radius:999px !important;background:transparent !important;box-shadow:none !important;}
.subject-settings-flat .subject-favorite-row.selected{border-color:rgba(232,190,107,.58) !important;background:rgba(124,89,37,.17) !important;}.subject-settings-flat .subject-favorite-name{font-size:.74rem !important;}.subject-settings-flat .subject-favorite-star{font-size:.70rem !important;}
.subject-settings-actions{grid-template-columns:auto minmax(0,1fr) !important;align-items:center !important;}

/* Purchase confirmation: product hero + price + one dominant confirm action. */
.purchase-confirm-hero{display:grid;padding:11px 0 14px;border-bottom:1px solid var(--ui-divider);}.purchase-confirm-art{margin:0 !important;}.purchase-confirm-copy{display:grid;gap:12px;text-align:left;}.purchase-confirm-copy p{margin:0;color:#a7b0bd;font-size:.78rem;line-height:1.48;}.purchase-confirm-price{display:grid !important;gap:3px !important;margin:0 !important;padding:0 !important;border:0 !important;background:transparent !important;text-align:left !important;}.purchase-confirm-price span{color:#a88d5c !important;font-size:.70rem !important;letter-spacing:.08em !important;}.purchase-confirm-price strong{color:#f0d397 !important;}.purchase-confirm-actions{align-items:center !important;}

/* Lumen Path choices use the same celestial depth as chest reveals. */
.lumen-choice-sheet{padding-bottom:4px;}.lumen-choice-sheet::after{content:"";position:absolute;inset:72px 6% auto;height:210px;z-index:-1;background:radial-gradient(ellipse,rgba(103,124,214,.18),transparent 70%);filter:blur(10px);}.lumen-choice-options{grid-template-columns:repeat(auto-fit,minmax(132px,1fr)) !important;gap:11px !important;}.lumen-choice-options button{position:relative;min-height:178px !important;padding:14px 10px 12px !important;border-color:rgba(214,177,99,.30) !important;background:linear-gradient(180deg,rgba(17,35,64,.88),rgba(6,17,35,.96)) !important;}.lumen-choice-options button:hover{border-color:rgba(238,199,119,.58) !important;transform:translateY(-1px);}.lumen-choice-options strong{font-size:.84rem !important;color:#efd49a !important;}.lumen-choice-options small{max-width:150px;font-size:.73rem !important;line-height:1.35 !important;color:#9faec2 !important;}.lumen-choice-options em{font-style:normal;color:#d6b56f;font-size:.70rem;font-weight:800;letter-spacing:.05em;text-transform:uppercase;}.lumen-choice-art{width:94px !important;height:94px !important;}.lumen-choice-art img{width:88px !important;height:88px !important;}

/* Chest duplicate conversion appears as part of the reveal, not a plain follow-up panel. */
.chest-reveal-conversion{position:relative;z-index:2;display:grid;justify-items:center;gap:2px;margin:3px 0 5px;padding:8px 18px;border-top:1px solid rgba(228,185,98,.22);border-bottom:1px solid rgba(228,185,98,.22);}.chest-reveal-conversion span{color:#a99979;font-size:.74rem;letter-spacing:.04em;}.chest-reveal-conversion strong{color:#f1ce82;font-size:1rem;animation:lumenCoinPulse .7s ease-out both;}@keyframes lumenCoinPulse{0%{transform:scale(.82);opacity:.2;}70%{transform:scale(1.06);opacity:1;}100%{transform:scale(1);}}.reduce-motion .chest-reveal-conversion strong{animation:none !important;}

/* Premium castle room detail is now a focused variant of the existing Castle Upgrade shell. */
.premium-room-detail .premium-room-upgrade-hero{position:relative;min-height:170px;}.premium-room-detail .premium-room-hero-icon{position:absolute;left:50%;top:47%;transform:translate(-50%,-50%);width:62px;height:62px;display:grid;place-items:center;border:1px solid rgba(231,188,103,.34);border-radius:50%;background:rgba(8,18,34,.88);box-shadow:0 8px 22px rgba(0,0,0,.25);z-index:2;}.premium-room-detail .premium-room-hero-icon img{width:44px;height:44px;object-fit:contain;}.premium-room-upgrade-detail{display:grid;gap:0 !important;}.premium-room-level-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 2px;border-top:1px solid rgba(202,166,101,.12);border-bottom:1px solid rgba(202,166,101,.12);}.premium-room-level-row span{color:#9da8b5;font-size:.75rem;}.premium-room-level-row strong{color:#e7cca0;font-size:.78rem;text-align:right;}

/* Extended Stats behaves like an archive page: section separators, not nested cards. */
.extended-stats-modal{border-radius:0 !important;}.extended-stats-modal .extended-stats-scroll{padding:0 !important;}.extended-stats-modal .extended-stats-section{margin:0 !important;padding:14px 0 8px !important;border:0 !important;border-top:1px solid var(--ui-divider) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.extended-stats-modal .extended-stats-section:first-child{border-top:0 !important;padding-top:4px !important;}.extended-stats-modal .extended-stats-section-head{padding:0 2px 8px !important;border:0 !important;background:transparent !important;}.extended-stats-modal .extended-stats-section-head strong{font-size:.78rem !important;text-transform:none !important;letter-spacing:.02em !important;}.extended-stats-modal .extended-stats-list{padding:0 !important;}.extended-stats-modal .extended-stat-row{padding:9px 2px !important;border-bottom:1px solid rgba(202,166,101,.10) !important;background:transparent !important;}.extended-stats-modal .extended-stat-row:last-child{border-bottom:0 !important;}

/* Team destructive confirmations: short warning, quiet cancel, red text action. */
.ui-destructive-confirm{display:grid !important;grid-template-columns:44px minmax(0,1fr) !important;gap:0 12px !important;align-items:start !important;}.ui-destructive-confirm .team-leave-warning{grid-row:1 / span 2;margin:0 !important;}.ui-destructive-confirm strong{align-self:end;}.ui-destructive-confirm p{margin:4px 0 0 !important;}.ui-destructive-text.ui-btn-destructive{min-height:38px !important;border:0 !important;background:transparent !important;color:#e3a097 !important;box-shadow:none !important;padding:7px 8px !important;}.ui-destructive-text.ui-btn-destructive:hover{background:rgba(120,55,51,.12) !important;color:#efb0a6 !important;}
.team-manage-row{border-radius:0 !important;background:transparent !important;border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;box-shadow:none !important;}.team-manage-row:last-child{border-bottom:0 !important;}.team-remove-member.ui-destructive-text{font-size:.72rem !important;}

/* Manage Academy: preserve hierarchy, remove card-inside-card density. */
.manage-academy-overhaul .manage-academy-block{border:0 !important;border-top:1px solid var(--ui-divider) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;padding:13px 0 !important;}.manage-academy-overhaul .manage-academy-list-surface{border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.manage-academy-overhaul .manage-academy-row{border-radius:0 !important;background:transparent !important;border-left:0 !important;border-right:0 !important;box-shadow:none !important;}.academy-settings-flat{display:grid !important;gap:0 !important;padding:0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.academy-settings-flat .manage-academy-setting-block{padding:13px 2px !important;border:0 !important;border-bottom:1px solid var(--ui-divider) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.academy-settings-flat .manage-academy-setting-block:last-of-type{border-bottom:0 !important;}.academy-settings-flat .manage-academy-settings-actions{padding-top:12px !important;}.academy-invite-flat{display:grid !important;justify-items:center !important;text-align:center !important;padding:12px 0 0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.academy-invite-flat .manage-academy-invite-sheet-code{font-size:1.22rem !important;letter-spacing:.12em !important;border:1px solid rgba(214,175,96,.28) !important;background:rgba(8,18,32,.48) !important;}.academy-invite-flat .manage-academy-settings-actions.split{grid-template-columns:auto minmax(0,1fr) !important;width:100% !important;}

/* Create Academy: live banner preview is the hero; configuration below becomes progressive rows. */
.create-team .create-team-divider{margin:10px 0 !important;}.create-team-section{padding:12px 0 !important;border:0 !important;border-bottom:1px solid var(--ui-divider) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.create-team-section:last-of-type{border-bottom:0 !important;}.create-team-selected-banner{border:1px solid rgba(211,171,88,.24) !important;border-radius:12px !important;background:radial-gradient(circle at 50% 0%,rgba(105,121,186,.12),rgba(7,17,31,.66)) !important;box-shadow:none !important;}.create-team-banner-grid{padding:2px 0 !important;}.create-team-submit{position:sticky !important;bottom:0 !important;z-index:4 !important;margin-top:12px !important;}

/* Allies: keep identity/art, reduce supporting card nesting. */
.allies-summary-card-v60{border:0 !important;border-top:1px solid rgba(202,166,101,.14) !important;border-bottom:1px solid rgba(202,166,101,.14) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.allies-list-panel-main-v61{border:0 !important;border-top:1px solid rgba(202,166,101,.14) !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}.allies-list-row-v55{border-radius:0 !important;background:transparent !important;border-left:0 !important;border-right:0 !important;box-shadow:none !important;}.allies-status-state{min-height:230px !important;display:grid !important;place-items:center !important;align-content:center !important;gap:9px !important;text-align:center !important;}.allies-status-state .allies-status-emblem{width:58px;height:58px;display:grid;place-items:center;}.allies-status-state .allies-status-emblem img{width:44px;height:44px;object-fit:contain;}.allies-status-state strong{color:#ead0a0;font-size:.86rem !important;}.allies-status-state small{max-width:250px;color:#97a4b5;font-size:.75rem !important;line-height:1.4 !important;}

@media(max-width:430px){
  .profile-name-row{grid-template-columns:1fr !important;gap:7px !important;}.profile-goal-row{grid-template-columns:1fr !important;}.profile-goal-copy{grid-row:auto !important;}.goal-chip-row{justify-content:flex-start !important;}.goal-stepper{width:100% !important;}
  .custom-subject-flat{grid-template-columns:1fr !important;gap:8px !important;}.subject-settings-actions{grid-template-columns:auto minmax(0,1fr) !important;}
  .rank-journey-stop{grid-template-columns:30px 64px minmax(0,1fr) !important;gap:8px !important;}.rank-journey-thumb{height:70px !important;}.rank-journey-title{grid-template-columns:20px minmax(0,1fr) !important;}.rank-journey-title small{grid-column:2 !important;}.rank-journey-title img{grid-row:1 / span 2 !important;}.rank-journey-unlocks{grid-template-columns:1fr !important;gap:2px !important;}
  .purchase-confirm-hero{grid-template-columns:1fr !important;justify-items:center !important;}.purchase-confirm-art{width:min(180px,55vw) !important;min-height:132px !important;}.purchase-confirm-copy{text-align:center !important;}.purchase-confirm-price{text-align:center !important;}.purchase-confirm-actions{grid-template-columns:auto minmax(0,1fr) !important;}
  .lumen-choice-options{grid-template-columns:1fr 1fr !important;}.lumen-choice-sheet.choice-count-3 .lumen-choice-options button:last-child{grid-column:1 / -1 !important;max-width:58%;width:100%;justify-self:center;}.lumen-choice-options button{min-height:166px !important;}.lumen-choice-art{width:84px !important;height:84px !important;}.lumen-choice-art img{width:80px !important;height:80px !important;}
  .ui-destructive-confirm{grid-template-columns:38px minmax(0,1fr) !important;}.ui-destructive-confirm .team-leave-warning{width:38px !important;height:38px !important;}
}
.progress-celebration-eyebrow,.progress-celebration-unlock b{font-size:.75rem !important;line-height:1.25 !important;}


/* --------------------------------------------------------------------------
   Modal cohesion — one continuous surface, no detached title blocks.
   Functional headers scroll with their content rather than floating above it.
   This also prevents Settings rows from travelling visibly underneath the title.
   -------------------------------------------------------------------------- */
#sheetOverlay > .sheet.ui-modal-shell > .sheet-header,
body[data-reward-theme] #sheetOverlay > .sheet.ui-modal-shell > .sheet-header,
#sheetOverlay > .sheet.ui-modal-shell.ui-functional-sheet > .sheet-header,
body[data-reward-theme] #sheetOverlay > .sheet.ui-modal-shell.ui-functional-sheet > .sheet-header{
  position:relative !important;
  top:auto !important;
  z-index:auto !important;
  margin:0 0 10px !important;
  padding:0 0 13px !important;
  background:transparent !important;
  background-image:none !important;
  border-bottom:1px solid var(--ui-divider) !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* Settings uses exactly the same uninterrupted surface as its rows. */
#sheetOverlay > .sheet.ui-modal-shell.settings-sheet-modal,
body[data-reward-theme] #sheetOverlay > .sheet.ui-modal-shell.settings-sheet-modal{
  background:var(--ui-modal-bg) !important;
  background-color:#071322 !important;
  border-color:var(--ui-modal-border) !important;
}
#sheetOverlay > .sheet.ui-modal-shell.settings-sheet-modal > .sheet-header,
body[data-reward-theme] #sheetOverlay > .sheet.ui-modal-shell.settings-sheet-modal > .sheet-header{
  background:transparent !important;
  color:inherit !important;
}

/* Bespoke modal headers keep their artwork and typography identity, but the
   title region itself no longer introduces a second card/surface colour. */
#sheetOverlay > .sheet.ui-modal-shell .ui-bespoke-header,
body[data-reward-theme] #sheetOverlay > .sheet.ui-modal-shell .ui-bespoke-header{
  background:transparent !important;
  background-image:none !important;
  box-shadow:none !important;
  backdrop-filter:none !important;
  -webkit-backdrop-filter:none !important;
}

/* Restored illustrated Rank Journey: keep the scene cards cinematic and distinct
   while still living inside the shared modal shell. */
.rank-journey:not(.rank-journey-timeline){
  gap:9px !important;
  max-height:min(68vh,650px) !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  padding:0 !important;
}
.rank-journey:not(.rank-journey-timeline) .rank-scene-card{
  min-height:104px !important;
}


/* v107 interaction polish: instructional controls use one uppercase command language. */
:where(.action-button,.secondary-button,.danger-button,.plain-danger-button,.primary-button,.auth-primary,.tiny-button,.ui-text-action){
  text-transform:uppercase !important;
}
.strict-warning-actions{
  grid-template-columns:1fr !important;
}
.strict-warning-actions #confirmStrictButton{order:1;}
.strict-warning-actions #backFromStrictButton{order:2;}

/* Profile & Goals — keep the Daily Goal value compact so its supporting copy retains room. */
.profile-goal-row[data-goal-kind="daily"]{
  grid-template-columns:minmax(0,1fr) minmax(136px,148px);
  column-gap:12px;
}
.profile-goal-row[data-goal-kind="daily"] .goal-stepper{
  grid-template-columns:34px minmax(68px,1fr) 34px;
  width:100%;
}
.profile-goal-row[data-goal-kind="daily"] .goal-stepper output{
  font-size:.70rem;
  white-space:nowrap;
}
.profile-goal-row[data-goal-kind="daily"] .profile-goal-copy{
  min-width:0;
}
.profile-goal-row[data-goal-kind="daily"] .profile-goal-copy small{
  max-width:23ch;
}
@media(max-width:430px){
  .profile-goal-row[data-goal-kind="daily"]{
    grid-template-columns:1fr !important;
  }
  .profile-goal-row[data-goal-kind="daily"] .goal-stepper{
    width:min(100%,210px) !important;
  }
}

/* ===== v109 usability + launch cohesion ===== */
/* Custom subject entry: prioritize the text field; keep ADD compact. */
.custom-subject-flat .custom-subject-entry{grid-template-columns:minmax(0,1fr) 58px !important;gap:8px !important;}
.custom-subject-flat .custom-subject-entry .custom-subject-add{min-width:0 !important;width:58px !important;padding:0 6px !important;font-size:.72rem !important;}
.subject-settings-flat{scrollbar-width:none !important;}
.subject-settings-flat::-webkit-scrollbar{display:none !important;}

/* Focus active boosts: readable, flatter grouping. */
/* Keep the Focus boost disclosure wide enough for readable effect/source copy. */
.focus-quote-overlay .focus-boosts-strip{width:min(96%,380px) !important;max-width:380px !important;}
.focus-boosts-heading{width:min(270px,78%) !important;max-width:270px !important;min-height:54px !important;padding:9px 11px !important;}
.focus-boosts-heading .focus-loadout-mini-art{width:38px !important;height:38px !important;}
.focus-boosts-heading .focus-loadout-mini-art img{width:35px !important;height:35px !important;}
.focus-boosts-heading .focus-loadout-title-copy strong{font-size:.82rem !important;letter-spacing:.055em !important;}
.focus-boost-group{padding:10px 2px !important;border:0 !important;border-bottom:1px solid rgba(202,166,101,.12) !important;background:transparent !important;border-radius:0 !important;box-shadow:none !important;}
.focus-boost-group-head{grid-template-columns:38px minmax(0,1fr) !important;gap:9px !important;}
.focus-boost-group-head img{width:36px !important;height:36px !important;}
.focus-boost-total-row b{font-size:.61rem !important;}

.focus-boost-group .focus-loadout-bonuses{padding-left:47px !important;gap:5px !important;}

.focus-boost-group.reward-totals{display:grid !important;border-bottom:0 !important;}
.focus-boost-total-row{border:1px solid rgba(214,169,81,.13) !important;border-radius:9px !important;}

.focus-boost-total-row small,.focus-boost-source-stack{white-space:normal !important;overflow-wrap:anywhere !important;word-break:normal !important;}

/* Rewards boost cabinet: larger icon with copy horizontally beside it. */
.boost-cabinet-toggle{grid-template-columns:minmax(0,1fr) auto !important;align-items:center !important;min-height:70px !important;padding:9px 11px !important;}
.boost-cabinet-head{display:grid !important;grid-template-columns:52px minmax(0,1fr) !important;align-items:center !important;gap:11px !important;}
.boost-cabinet-toggle .boost-cabinet-head>img{width:50px !important;height:50px !important;}
.boost-cabinet-head>span{display:grid !important;gap:3px !important;text-align:left !important;}
.boost-cabinet-head small{font-size:.70rem !important;letter-spacing:.08em !important;}
.boost-cabinet-toggle .boost-cabinet-head strong{font-size:.88rem !important;}
.boost-cabinet-summary{display:flex !important;align-items:center !important;gap:6px !important;padding:0 !important;border:0 !important;background:transparent !important;box-shadow:none !important;}
.boost-cabinet-summary b{font-size:.88rem !important;color:#e6c06d !important;}
.boost-cabinet-summary small{font-size:.62rem !important;letter-spacing:.08em !important;color:#9ca9ba !important;}
.boost-cabinet-line{grid-template-columns:42px minmax(0,1fr) auto !important;align-items:center !important;gap:9px !important;}
.boost-cabinet-line>img{width:40px !important;height:40px !important;}
.boost-cabinet-line>span strong{font-size:.78rem !important;}.boost-cabinet-line>span small,.boost-cabinet-line>b{font-size:.70rem !important;}

/* Boost actions: readable quantity and bronze/gold ACTIVATE treatment. */
.rewards-mock-action.boost-action{align-items:center !important;column-gap:9px !important;}


.rewards-mock-action.boost-action.equip{border-color:rgba(232,187,91,.72) !important;background:linear-gradient(180deg,#9a641e,#5f390f) !important;color:#ffe5a3 !important;}
.rewards-mock-action.boost-action.equip strong,.rewards-mock-action.boost-action.equip span{color:#ffe5a3 !important;}
.rewards-mock-card .boost-charge-copy,.rewards-mock-card [class*="charge"]{text-align:center !important;text-transform:uppercase !important;}
.lumen-inventory-activate{border:1px solid rgba(232,187,91,.72) !important;background:linear-gradient(180deg,#9a641e,#5f390f) !important;color:#ffe5a3 !important;font-weight:900 !important;letter-spacing:.05em !important;}

/* Keep Chests / Boosts selector typography stable. */
.lumen-inventory-tabs button,.lumen-path-inventory-tabs button,[data-lumen-inventory-tab]{font-size:.78rem !important;line-height:1.1 !important;font-weight:800 !important;}

/* Lumen purchase confirmation: unframed star and a real Cancel button. */
.purchase-confirm-art{min-height:112px !important;border:0 !important;background:transparent !important;box-shadow:none !important;overflow:visible !important;}
.purchase-confirm-art::before,.purchase-confirm-art::after,.purchase-confirm-art .reward-detail-art-glow{display:none !important;}
.purchase-confirm-art img{width:min(118px,32vw) !important;height:min(118px,32vw) !important;object-fit:contain !important;filter:drop-shadow(0 7px 12px rgba(0,0,0,.34)) !important;}
.purchase-confirm-hero{grid-template-columns:118px minmax(0,1fr) !important;gap:16px !important;align-items:center !important;}
.purchase-confirm-copy{min-width:0 !important;}.purchase-confirm-price strong{font-size:1.16rem !important;}
.purchase-confirm-actions{grid-template-columns:1fr 1fr !important;gap:9px !important;}.purchase-confirm-cancel{justify-self:stretch !important;width:100% !important;}

/* Elite tab stays gold in every state. */
.iphone-quests-page .iphone-tab-switch button.elite,.iphone-quests-page .iphone-tab-switch button.elite.active,.quests-mock-switch button.elite,.quests-mock-switch button.elite.active{color:#e5b45b !important;text-shadow:none !important;}

/* Extended Stats: centered with air above and below. */
.phone-stage > #sheetOverlay.extended-stats-overlay{align-items:center !important;padding:18px 10px !important;}
.phone-stage > #sheetOverlay.extended-stats-overlay > .sheet.extended-stats-modal{margin:auto !important;top:auto !important;bottom:auto !important;border-radius:14px !important;}

/* Theme art must never paint outside the phone rectangle. */
.phone-stage{position:relative !important;overflow:hidden !important;isolation:isolate !important;}
body[data-reward-theme]{background:#05080e !important;}
body[data-reward-theme]::before,body[data-reward-theme]::after{content:none !important;display:none !important;}
.phone-stage::before,.phone-stage::after{max-width:100% !important;max-height:100% !important;overflow:hidden !important;}

/* Destructive account row. */
 .settings-delete-row strong,.settings-delete-row>span:last-child{color:#dc8377 !important;}
.settings-delete-row>span:first-child{min-width:0 !important;}
.settings-delete-row>span:last-child{white-space:nowrap !important;flex:0 0 auto !important;min-width:max-content !important;}
.email-verification-row{grid-template-columns:1fr !important;align-items:start !important;}
.email-verification-row>span{display:grid !important;gap:3px !important;min-width:0 !important;}
.email-verification-state{display:block !important;margin-top:3px !important;font-size:.74rem !important;font-weight:800 !important;letter-spacing:.06em !important;}
.email-verification-state.unverified{color:#d7a06c !important;}
.email-verification-state.verified{color:#8fc5a2 !important;}
/* Group equipment bonuses into one clear relic card and one castle card. */
.focus-boosts-expanded > .focus-boost-group:not(.reward-totals){padding:10px !important;border:1px solid rgba(196,156,83,.16) !important;border-radius:10px !important;background:rgba(8,17,30,.46) !important;}
.focus-boosts-expanded > .focus-boost-group:not(.reward-totals) .focus-loadout-bonus{padding:2px 0 !important;border:0 !important;border-radius:0 !important;background:transparent !important;box-shadow:none !important;}
.rewards-mock-action.active-boost.boost-action span{justify-self:center !important;text-align:center !important;text-transform:uppercase !important;font-size:.72rem !important;}



/* Launch-hardening: explicit best-effort offline state. */
.network-status {
  position: sticky;
  top: calc(env(safe-area-inset-top, 0px) + 64px);
  z-index: 11;
  margin: 0 12px;
  padding: 7px 10px;
  border: 1px solid rgba(214,176,106,.24);
  border-radius: 6px;
  background: rgba(12,16,22,.96);
  color: var(--gold, #d6b06a);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-align: center;
}
.network-status.hidden { display: none !important; }
.auth-field-hint { display:block; margin-top:5px; color:var(--muted,#a29b91); font-size:.8rem; line-height:1.25; }


/* v113 verification resend visibility */
#sheetOverlay button[hidden]{display:none !important;}

/* Developer Mode email verification sandbox control */
.developer-verification-control{
  margin: 14px 0 4px;
  padding: 14px 0;
  border-top: 1px solid rgba(214,174,91,.18);
  border-bottom: 1px solid rgba(214,174,91,.18);
}
.developer-verification-copy{
  display:flex;
  flex-direction:column;
  gap:4px;
  margin-bottom:10px;
}
.developer-verification-copy strong{font-size:.84rem;letter-spacing:.08em;color:var(--gold,#d8b45c);}
.developer-verification-copy small{font-size:.78rem;color:var(--muted,#9aa0ad);}
.developer-verification-copy span{font-size:.82rem;font-weight:800;color:#f2ead7;}
.developer-verification-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.developer-verification-actions .action-button,
.developer-verification-actions .secondary-button{min-width:0;width:100%;}


/* v115 fixes: settings delete label, fullscreen reveals, boost action layout, and wider focus boosts. */
.settings-delete-row{align-items:flex-start !important;}
.settings-delete-row > span:first-child{flex:1 1 auto !important;}
.settings-delete-row > span:last-child,
.settings-delete-row > .settings-delete-label,
.phone-stage #sheetOverlay .settings-delete-row > span:last-child,
#sheetOverlay .settings-sheet-modal .settings-delete-row > span:last-child{
  flex:0 0 auto !important;
  width:auto !important;
  max-width:none !important;
  min-width:max-content !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
  line-height:1 !important;
  align-self:center !important;
}
#confirmDeleteAccount{white-space:nowrap !important;}

#sheetOverlay > .sheet.ui-fullscreen-reveal-sheet{
  width:100% !important;
  max-width:100% !important;
  height:100% !important;
  max-height:100% !important;
  margin:0 !important;
  padding:0 !important;
  border-radius:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  overflow:hidden !important;
}
.phone-stage > #sheetOverlay.has-fullscreen-reveal,
.phone-stage > #sheetOverlay:has(> .sheet.ui-fullscreen-reveal-sheet){
  place-items:stretch !important;
  padding:0 !important;
  overflow:hidden !important;
}
.phone-stage > #sheetOverlay > .sheet.ui-fullscreen-reveal-sheet .chest-reveal-screen{
  position:absolute !important;
  inset:0 !important;
  width:100% !important;
  height:100% !important;
  min-height:100% !important;
  max-height:none !important;
  border-radius:0 !important;
}

.focus-boosts-strip,
body[data-reward-theme] .focus-boosts-strip{
  width:100% !important;
  max-width:none !important;
  align-self:stretch !important;
}
.focus-boosts-dropdown,
.focus-boosts-heading,
.focus-boosts-expanded,
body[data-reward-theme] .focus-boosts-dropdown,
body[data-reward-theme] .focus-boosts-heading,
body[data-reward-theme] .focus-boosts-expanded{
  width:100% !important;
  max-width:none !important;
}


.focus-boost-group-head b{font-size:.76rem !important;}
.focus-boost-group-head strong{font-size:.92rem !important;}
.focus-boost-group .focus-loadout-bonus{font-size:.82rem !important;line-height:1.38 !important;}
.focus-boost-total-row strong{font-size:.82rem !important;}
.focus-boost-total-row small,.focus-boost-source-stack{font-size:.68rem !important;line-height:1.34 !important;}

.rewards-mock-action.boost-action{
  min-height:58px !important;
  display:grid !important;
  grid-template-columns:1fr !important;
  grid-template-rows:auto auto !important;
  justify-items:center !important;
  align-content:center !important;
  row-gap:3px !important;
  padding:8px 10px !important;
  text-align:center !important;
}
.rewards-mock-action.boost-action strong,
.rewards-mock-action.boost-action span,
.rewards-mock-action.boost-action span b{
  display:block !important;
  width:100% !important;
  text-align:center !important;
}
.rewards-mock-action.boost-action strong{font-size:.78rem !important;line-height:1.05 !important;}
.rewards-mock-action.boost-action span{justify-self:center !important;font-size:.76rem !important;line-height:1.05 !important;}
.rewards-mock-action.boost-action span b{font-size:.74rem !important;letter-spacing:.05em !important;}
.rewards-mock-action.active-boost.boost-action span b{font-size:.72rem !important;}


/* v116 Focus Active Boosts: XP/Coins are headers; details match Relic/Castle rhythm. */
.focus-boost-group.reward-totals{
  grid-template-columns:1fr 1fr !important;
  gap:10px !important;
}
.focus-boost-total-row{
  display:grid !important;
  grid-template-columns:1fr !important;
  grid-template-rows:auto auto !important;
  gap:7px !important;
  align-content:start !important;
  padding:10px 11px !important;
}
.focus-boost-total-head{
  display:flex !important;
  align-items:center !important;
  gap:7px !important;
  min-width:0 !important;
  padding-bottom:6px !important;
  border-bottom:1px solid rgba(214,169,81,.12) !important;
}
.focus-boost-total-head img{
  width:28px !important;
  height:28px !important;
  object-fit:contain !important;
  flex:0 0 auto !important;
}
.focus-boost-total-head b{
  color:#d3aa5d !important;
  font-size:.78rem !important;
  line-height:1 !important;
  letter-spacing:.08em !important;
  font-weight:800 !important;
}
.focus-boost-total-copy{
  display:grid !important;
  gap:4px !important;
  min-width:0 !important;
  text-align:left !important;
}
.focus-boost-total-copy > strong{
  color:#f0ce87 !important;
  font-size:.74rem !important;
  line-height:1.25 !important;
  font-weight:700 !important;
  white-space:normal !important;
}

.focus-boost-total-copy .focus-boost-source-stack{
  display:grid !important;
  gap:2px !important;
  color:#9daabd !important;
  overflow-wrap:anywhere !important;
  white-space:normal !important;
}
@media(max-width:430px){
  .focus-boost-total-head img{width:26px !important;height:26px !important;}
  .focus-boost-total-head b{font-size:.75rem !important;}
  .focus-boost-total-copy > strong,
  .focus-boost-total-copy .focus-boost-source-stack,
  .focus-boost-total-copy .focus-boost-source-stack > span,
  .focus-boost-group .focus-loadout-bonus{font-size:.72rem !important;}
}


/* v118 cohesion fixes: stable Rewards subtabs, compact boost trigger, wide boost detail panel. */
.rewards-subtabs.rewards-text-subtabs button,
.rewards-subtabs.rewards-text-subtabs button.active,
.iphone-rewards-page .rewards-text-subtabs button,
.iphone-rewards-page .rewards-text-subtabs button.active{
  height:44px !important;
  min-height:44px !important;
  max-height:44px !important;
  line-height:1 !important;
  transform:none !important;
}
.rewards-subtabs.rewards-text-subtabs button strong,
.rewards-subtabs.rewards-text-subtabs button.active strong,
.iphone-rewards-page .rewards-text-subtabs button strong,
.iphone-rewards-page .rewards-text-subtabs button.active strong{
  display:block !important;
  font-size:.84rem !important;
  line-height:1 !important;
  font-weight:600 !important;
  letter-spacing:.045em !important;
  transform:none !important;
}
#toggleAnalytics > span:last-child{
  flex:0 0 auto !important;
  width:auto !important;
  max-width:none !important;
  min-width:max-content !important;
  white-space:nowrap !important;
  word-break:keep-all !important;
  overflow-wrap:normal !important;
}
.focus-boosts-dropdown,
body[data-reward-theme] .focus-boosts-dropdown{
  width:100% !important;
  max-width:100% !important;
}

.focus-boosts-expanded,
body[data-reward-theme] .focus-boosts-expanded{
  position:relative !important;
  left:50% !important;
  transform:translateX(-50%) !important;
  
  
  padding:8px 12px 12px !important;
}


.nav-item.verification-locked{opacity:.72;}


/* Focus Active Boosts + Rewards utility-tab corrections. */
.focus-boosts-dropdown,
body[data-reward-theme] .focus-boosts-dropdown{
  overflow:visible !important;
  padding-bottom:2px !important;
}
.focus-boosts-dropdown:not([open]),
body[data-reward-theme] .focus-boosts-dropdown:not([open]){
  padding-bottom:3px !important;
}
.focus-boosts-heading,
body[data-reward-theme] .focus-boosts-heading{
  box-sizing:border-box !important;
  width:min(210px,62%) !important;
  max-width:210px !important;
  height:36px !important;
  min-height:36px !important;
  max-height:36px !important;
  margin:0 auto 2px !important;
  padding:4px 9px !important;
  grid-template-columns:24px minmax(0,1fr) 15px !important;
  gap:5px !important;
  overflow:visible !important;
  line-height:1 !important;
}
.focus-boosts-heading .focus-loadout-mini-art,
body[data-reward-theme] .focus-boosts-heading .focus-loadout-mini-art{
  width:23px !important;
  height:23px !important;
}
.focus-boosts-heading .focus-loadout-mini-art img,
body[data-reward-theme] .focus-boosts-heading .focus-loadout-mini-art img{
  width:22px !important;
  height:22px !important;
}
.focus-boosts-heading .focus-loadout-title-copy strong,
body[data-reward-theme] .focus-boosts-heading .focus-loadout-title-copy strong{
  font-size:.66rem !important;
  line-height:1 !important;
}
.focus-boosts-expanded,
body[data-reward-theme] .focus-boosts-expanded{
  width:min(388px,calc(100% + 34px)) !important;
  max-width:calc(100vw - 10px) !important;
}
/* Source lines and Relic/Castle detail lines intentionally share one small-detail scale. */
.focus-boost-total-copy .focus-boost-source-stack,
.focus-boost-total-copy .focus-boost-source-stack > span,
.focus-boost-group .focus-loadout-bonus{
  font-size:.60rem !important;
  line-height:1.32 !important;
}
/* CHESTS and BOOSTS must not change type metrics when content switches. */
body.secondary-screen-active .iphone-rewards-page .rewards-text-subtabs button strong,
.iphone-rewards-page .rewards-text-subtabs button strong,
body.secondary-screen-active .rewards-text-subtabs button strong,
.rewards-text-subtabs button strong,
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-text-subtabs button strong{
  font-size:.92rem !important;
  line-height:1 !important;
  font-weight:600 !important;
  letter-spacing:.045em !important;
}
@media(max-width:430px){
  .focus-boosts-heading,
  body[data-reward-theme] .focus-boosts-heading{
    width:min(194px,60%) !important;
    max-width:194px !important;
    height:34px !important;
    min-height:34px !important;
    max-height:34px !important;
    padding:4px 9px !important;
  }
  .focus-boost-total-copy .focus-boost-source-stack,
  .focus-boost-total-copy .focus-boost-source-stack > span,
  .focus-boost-group .focus-loadout-bonus{
    font-size:.60rem !important;
  }
}
@media(max-width:420px){
  body.secondary-screen-active .iphone-rewards-page .rewards-text-subtabs button strong,
  .iphone-rewards-page .rewards-text-subtabs button strong,
  body.secondary-screen-active .rewards-text-subtabs button strong,
  .rewards-text-subtabs button strong,
  body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-text-subtabs button strong{
    font-size:.84rem !important;
  }
}

/* Closed Focus boost disclosure must size to the pill itself, not the legacy 50px loadout card. */
.focus-boosts-dropdown,
body[data-reward-theme] .focus-boosts-dropdown{
  padding:0 !important;
}
.focus-boosts-dropdown:not([open]),
body[data-reward-theme] .focus-boosts-dropdown:not([open]){
  height:38px !important;
  min-height:38px !important;
  max-height:38px !important;
  padding:0 !important;
  overflow:visible !important;
}
.focus-boosts-dropdown[open],
body[data-reward-theme] .focus-boosts-dropdown[open]{
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  padding:0 !important;
  overflow:visible !important;
}


/* v120 Rewards consistency: top categories, boost states, and scrollable boost cabinet. */
body.secondary-screen-active .iphone-rewards-page .rewards-group-tabs .rewards-group-label,
.iphone-rewards-page .rewards-group-tabs .rewards-group-label,
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-group-tabs .rewards-group-label{
  font-size:.50rem !important;
  line-height:1.05 !important;
  font-weight:700 !important;
  letter-spacing:.015em !important;
  transform:none !important;
}
body.secondary-screen-active .iphone-rewards-page .rewards-group-tabs button.active .rewards-group-label,
.iphone-rewards-page .rewards-group-tabs button.active .rewards-group-label,
body.secondary-screen-active .iphone-rewards-page:has(.mystery-chest-list) .rewards-group-tabs button.active .rewards-group-label{
  font-size:.50rem !important;
  line-height:1.05 !important;
  font-weight:700 !important;
}

/* Stored boosts are ready to activate: bronze surface with gold text. */
body.secondary-screen-active .iphone-rewards-page .rewards-mock-action.boost-action.equip,
.iphone-rewards-page .rewards-mock-action.boost-action.equip,
body[data-reward-theme] .iphone-rewards-page .rewards-mock-action.boost-action.equip{
  border:1px solid rgba(232,187,91,.78) !important;
  background:linear-gradient(180deg,#9f6922 0%,#684013 100%) !important;
  color:#ffe291 !important;
  box-shadow:inset 0 1px 0 rgba(255,233,172,.12),0 4px 10px rgba(0,0,0,.20) !important;
}
body.secondary-screen-active .iphone-rewards-page .rewards-mock-action.boost-action.equip strong,
body.secondary-screen-active .iphone-rewards-page .rewards-mock-action.boost-action.equip span,
.iphone-rewards-page .rewards-mock-action.boost-action.equip strong,
.iphone-rewards-page .rewards-mock-action.boost-action.equip span{
  color:#ffe291 !important;
}

/* RUNNING is status-only; the cabinet owns remaining charge information. */
.rewards-mock-action.active-boost.boost-action.running{
  grid-template-columns:1fr !important;
  grid-template-rows:1fr !important;
  place-items:center !important;
  min-height:58px !important;
  padding:8px 10px !important;
}
.rewards-mock-action.active-boost.boost-action.running strong{
  align-self:center !important;
  justify-self:center !important;
  width:100% !important;
  text-align:center !important;
}

/* Many simultaneous boosts stay usable without growing the Rewards page indefinitely. */
.boost-cabinet-expanded-v98 .boost-cabinet-list{
  max-height:min(238px,32vh) !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
  overscroll-behavior:contain !important;
  -webkit-overflow-scrolling:touch !important;
  padding-right:4px !important;
  scrollbar-width:thin !important;
  scrollbar-color:rgba(215,177,98,.38) transparent !important;
}
.boost-cabinet-expanded-v98 .boost-cabinet-list::-webkit-scrollbar{width:4px !important;}
.boost-cabinet-expanded-v98 .boost-cabinet-list::-webkit-scrollbar-track{background:transparent !important;}
.boost-cabinet-expanded-v98 .boost-cabinet-list::-webkit-scrollbar-thumb{
  border-radius:999px !important;
  background:rgba(215,177,98,.34) !important;
}


/* v121: active Focus sessions can change subject without interrupting the timer. */
#focusOverlay.dev-focus-v2 .dev-focus-subject-switch{
  position:relative !important;
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto !important;
  align-items:center !important;
  width:min(100%, 268px) !important;
  min-height:34px !important;
  padding:0 10px 0 12px !important;
  border:1px solid rgba(221,179,94,.24) !important;
  border-radius:999px !important;
  background:rgba(5,12,22,.50) !important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.025) !important;
}
#focusOverlay.dev-focus-v2 .dev-focus-subject-switch select{
  width:100% !important;
  min-width:0 !important;
  height:32px !important;
  padding:0 18px 0 0 !important;
  border:0 !important;
  outline:0 !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  background:transparent !important;
  color:#f3ddb1 !important;
  font:inherit !important;
  font-size:.78rem !important;
  font-weight:700 !important;
  line-height:1 !important;
  letter-spacing:.08em !important;
  text-align:center !important;
  text-align-last:center !important;
  text-transform:uppercase !important;
  cursor:pointer !important;
}
#focusOverlay.dev-focus-v2 .dev-focus-subject-switch select option{
  background:#07111f !important;
  color:#f3ddb1 !important;
  text-transform:none !important;
}
#focusOverlay.dev-focus-v2 .dev-focus-subject-chevron{
  width:14px !important;
  color:#c7a35e !important;
  font-size:.85rem !important;
  line-height:1 !important;
  pointer-events:none !important;
}


/* Academy Expedition: make the qualified Gold chest read as the hero reward in the compact summary. */
.academy-expedition-summary-item.summary-reward.gold .academy-expedition-summary-reward{
  min-height:44px !important;
  overflow:visible !important;
}
.academy-expedition-summary-item.summary-reward.gold .team-expedition-reward-icons.compact{
  overflow:visible !important;
}
.academy-expedition-summary-item.summary-reward.gold .team-expedition-reward-icon.chest{
  width:56px !important;
  height:46px !important;
  min-width:56px !important;
  overflow:visible !important;
}
.academy-expedition-summary-item.summary-reward.gold .team-expedition-reward-icon.chest img{
  width:54px !important;
  height:44px !important;
  max-width:none !important;
  max-height:none !important;
  object-fit:contain !important;
  filter:drop-shadow(0 5px 10px rgba(0,0,0,.28)) !important;
}

/* Historical Academy weekly prize winners. */
.manage-academy-prize-actions{display:flex !important;align-items:center !important;justify-content:flex-end !important;gap:7px !important;flex-wrap:wrap !important;}
.manage-academy-prize-history{
  min-height:32px !important;
  padding:0 10px !important;
  border:1px solid rgba(218,177,91,.32) !important;
  border-radius:8px !important;
  background:rgba(8,20,38,.58) !important;
  color:#d9bd80 !important;
  font-size:.68rem !important;
  font-weight:800 !important;
  letter-spacing:.045em !important;
  text-transform:uppercase !important;
}
.weekly-prize-history-shell{display:grid !important;gap:0 !important;margin-top:3px !important;border-top:1px solid rgba(205,166,88,.16) !important;}
.weekly-prize-history-row{
  min-height:68px !important;
  display:grid !important;
  grid-template-columns:24px 46px minmax(0,1fr) auto !important;
  align-items:center !important;
  gap:9px !important;
  padding:8px 2px !important;
  border-bottom:1px solid rgba(205,166,88,.13) !important;
}
.weekly-prize-history-rank{color:#826f53 !important;font-size:.62rem !important;font-weight:800 !important;letter-spacing:.06em !important;text-align:center !important;}
.weekly-prize-history-avatar{width:44px !important;height:44px !important;display:grid !important;place-items:center !important;overflow:hidden !important;border:1px solid rgba(207,170,91,.24) !important;border-radius:50% !important;background:rgba(8,17,30,.72) !important;}
.weekly-prize-history-avatar img{width:48px !important;height:48px !important;object-fit:contain !important;object-position:center top !important;}
.weekly-prize-history-copy{min-width:0 !important;display:grid !important;gap:1px !important;}
.weekly-prize-history-copy small{color:#9d8969 !important;font-size:.60rem !important;font-weight:800 !important;letter-spacing:.07em !important;}
.weekly-prize-history-copy strong{color:#ead8b1 !important;font-size:.82rem !important;font-weight:650 !important;white-space:nowrap !important;overflow:hidden !important;text-overflow:ellipsis !important;}
.weekly-prize-history-copy span{color:#9daabc !important;font-size:.68rem !important;}
.weekly-prize-history-reward{display:grid !important;justify-items:end !important;gap:1px !important;white-space:nowrap !important;}
.weekly-prize-history-reward b{color:#eac46f !important;font-size:.68rem !important;}
.weekly-prize-history-reward small{color:#a99570 !important;font-size:.58rem !important;letter-spacing:.03em !important;}
.weekly-prize-history-loading,.weekly-prize-history-empty{padding:26px 8px !important;color:#9daabc !important;font-size:.74rem !important;line-height:1.45 !important;text-align:center !important;}
.weekly-prize-history-retry{justify-self:center !important;min-width:120px !important;}
@media(max-width:390px){
  .academy-expedition-summary-item.summary-reward.gold .team-expedition-reward-icon.chest{width:52px !important;height:43px !important;min-width:52px !important;}
  .academy-expedition-summary-item.summary-reward.gold .team-expedition-reward-icon.chest img{width:50px !important;height:41px !important;}
  .weekly-prize-history-row{grid-template-columns:20px 42px minmax(0,1fr) auto !important;gap:7px !important;}
  .weekly-prize-history-avatar{width:40px !important;height:40px !important;}
  .weekly-prize-history-avatar img{width:44px !important;height:44px !important;}
  .weekly-prize-history-copy strong{font-size:.76rem !important;}
  .weekly-prize-history-reward b{font-size:.62rem !important;}
  .weekly-prize-history-reward small{font-size:.54rem !important;}
}


/* v124: the current winner keeps the original weekly-prize row appearance.
   It becomes interactive only when no prize is waiting to be claimed. */
.manage-academy-prize-winner-history{
  width:100% !important;
  margin:0 !important;
  padding-left:0 !important;
  padding-right:0 !important;
  border:0 !important;
  border-top:1px solid rgba(215,223,235,.12) !important;
  border-radius:0 !important;
  background:transparent !important;
  background-image:none !important;
  color:inherit !important;
  box-shadow:none !important;
  font:inherit !important;
  text-align:left !important;
  cursor:pointer !important;
  appearance:none !important;
  -webkit-appearance:none !important;
}
.manage-academy-prize-winner-history:hover,
.manage-academy-prize-winner-history:active{
  background:transparent !important;
  color:inherit !important;
  transform:none !important;
}
.manage-academy-prize-winner-history:focus-visible{
  outline:1px solid rgba(227,185,94,.50) !important;
  outline-offset:2px !important;
}


/* v132: remove the 6px solid strip between the Focus artwork and bottom navigation.
   The legacy Focus canvas is intentionally lifted 6px; extend its height by the
   same amount so the illustrated scene still reaches the nav without moving HUD/content. */
body.focus-screen-active .phone-stage .focus-mockup-page{
  height:calc(100% + 6px) !important;
  min-height:calc(100% + 6px) !important;
}

/* v134 — Extended Stats scroll restoration.
   Keep the centered 18px outer breathing room, but give the modal a definite
   height so its grid's final row can become the dedicated vertical scroller. */
.phone-stage > #sheetOverlay.extended-stats-overlay > .sheet.extended-stats-modal{
  height:100% !important;
  max-height:100% !important;
  min-height:0 !important;
}
.phone-stage > #sheetOverlay.extended-stats-overlay > .sheet.extended-stats-modal .extended-stats-sheet{
  height:100% !important;
  min-height:0 !important;
}
.phone-stage > #sheetOverlay.extended-stats-overlay > .sheet.extended-stats-modal .extended-stats-scroll{
  min-height:0 !important;
  overflow-y:auto !important;
  overscroll-behavior-y:contain !important;
  -webkit-overflow-scrolling:touch !important;
  touch-action:pan-y !important;
}

/* v144 — Lumen Pass checkout should feel like purchasing a premium reward, not a generic confirmation. */
.lumen-pass-purchase-sheet{display:grid;gap:12px;text-align:center;padding:2px 2px 4px;}
.lumen-pass-purchase-topline{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;min-height:28px;color:#c6a861;font-size:.61rem;font-weight:900;letter-spacing:.16em;}
.lumen-pass-purchase-topline>span{grid-column:2;}
.lumen-pass-purchase-topline .close-button{grid-column:3;justify-self:end;}
.lumen-pass-purchase-art{position:relative;display:grid;place-items:center;width:150px;height:150px;margin:-2px auto -8px;isolation:isolate;}
.lumen-pass-purchase-glow{position:absolute;inset:14%;border-radius:50%;background:radial-gradient(circle,rgba(243,201,102,.38),rgba(119,68,210,.16) 45%,transparent 72%);filter:blur(10px);z-index:-1;}
.lumen-pass-purchase-art img{display:block;width:130px;height:130px;object-fit:contain;object-position:center;filter:drop-shadow(0 11px 18px rgba(0,0,0,.38));}
.lumen-pass-purchase-copy{display:grid;gap:7px;justify-items:center;padding:0 10px;}
.lumen-pass-purchase-plan{color:#d6b96f;font-size:.60rem;font-weight:900;letter-spacing:.16em;}
.lumen-pass-purchase-copy h2{margin:0;color:#f7e8bc;font-family:var(--font-display,inherit);font-size:1.34rem;line-height:1.05;letter-spacing:.015em;}
.lumen-pass-purchase-copy p{max-width:310px;margin:0;color:#abb5c4;font-size:.73rem;line-height:1.52;}
.lumen-pass-purchase-details{display:grid;grid-template-columns:1fr 1fr;width:100%;max-width:310px;margin-top:3px;border:1px solid rgba(219,181,94,.18);border-radius:12px;background:rgba(7,17,32,.58);overflow:hidden;}
.lumen-pass-purchase-details>div{display:grid;gap:3px;padding:9px 8px;}
.lumen-pass-purchase-details>div+div{border-left:1px solid rgba(219,181,94,.14);}
.lumen-pass-purchase-details strong{color:#ecd08c;font-size:.78rem;}
.lumen-pass-purchase-details small{color:#8794a7;font-size:.54rem;line-height:1.2;}
.lumen-pass-purchase-actions{display:grid;gap:7px;padding:3px 10px 0;}
.lumen-pass-purchase-cta{display:flex;align-items:center;justify-content:center;gap:9px;min-height:48px;width:100%;border:1px solid rgba(244,204,111,.80);border-radius:13px;background:linear-gradient(180deg,#a56e22,#684014);box-shadow:0 7px 18px rgba(0,0,0,.24),inset 0 1px rgba(255,236,172,.23);color:#fff0bd;font-weight:900;letter-spacing:.045em;cursor:pointer;}
.lumen-pass-purchase-cta span{font-size:.72rem;}
.lumen-pass-purchase-cta strong{font-size:.92rem;color:#fff4c7;}
.lumen-pass-purchase-cancel{justify-self:center;border:0;background:transparent;color:#8995a6;font-size:.67rem;font-weight:700;padding:7px 18px;cursor:pointer;}
.lumen-pass-purchase-cancel:hover,.lumen-pass-purchase-cancel:focus-visible{color:#c0c8d3;text-decoration:underline;}
.lumen-pass-purchase-legal{display:block;max-width:300px;margin:-2px auto 0;color:#727e90;font-size:.50rem;line-height:1.35;}
@media(max-width:390px){.lumen-pass-purchase-art{width:134px;height:134px;}.lumen-pass-purchase-art img{width:116px;height:116px;}.lumen-pass-purchase-copy h2{font-size:1.22rem;}.lumen-pass-purchase-copy p{font-size:.69rem;}}

/* v144 — compact social safety actions required for UGC moderation. */
.social-safety-actions-v144{display:grid;grid-template-columns:1fr 1fr;gap:7px;width:100%;}
.social-safety-actions-v144 button{min-height:34px;border-radius:9px;background:rgba(8,17,31,.72);font-size:.58rem;font-weight:900;letter-spacing:.08em;cursor:pointer;}
.social-safety-report-v144{border:1px solid rgba(218,177,91,.30);color:#c8ae73;}
.social-safety-block-v144{border:1px solid rgba(205,112,98,.36);color:#d58c80;}
.social-safety-actions-v144 button:disabled{opacity:.5;cursor:default;}
.lumen-pass-restore-purchases{display:block;margin:8px auto 2px;padding:7px 14px;border:0;background:transparent;color:#8d99aa;font-size:.57rem;font-weight:800;letter-spacing:.08em;cursor:pointer;}
.lumen-pass-restore-purchases:hover,.lumen-pass-restore-purchases:focus-visible{color:#c8b57b;text-decoration:underline;}
.lumen-pass-purchase-odds{display:block;max-width:310px;margin:0 auto;padding:7px 9px;border-radius:9px;background:rgba(120,88,35,.10);color:#9f9275;font-size:.49rem;line-height:1.36;}
