@import url('./navigation-city.css');

/* ==========================================================================================
   W126 LAYOUT (docs/notes/W126-layout.md, owner decision D31) - THE BOTTOM BAR, THE HAMBURGER MENU,
   THE EVENTS PAGE, and the little bits every page shares now that a bar sits under it.

   THE BAR is position:fixed at the very bottom of the window and is shown on every page except a battle
   (public/js/tabbar.js toggles body.cc-bar from show()). --cc-bar-h is its whole height INCLUDING the device's
   bottom inset, and EVERY .screen (and the hero sheet) simply ends at its top edge - so nothing is ever drawn
   under the bar, no page needs its own bottom padding for it, and the scroll areas keep their own gutters.
   Phones keep one 460px-wide column; on a wide window the bar is the column's width (widescreen.css's --cc-col-x).
   ========================================================================================== */
:root { --cc-bar-core: 64px; --cc-bar-h: 0px; }
body.cc-bar { --cc-bar-h: calc(var(--cc-bar-core) + var(--sa-bottom, env(safe-area-inset-bottom, 0px))); }

/* every page ends where the bar starts */
body.cc-bar .screen { bottom: var(--cc-bar-h); }
body.cc-bar #detailOv, body.cc-bar .alView { bottom: var(--cc-bar-h); }
/* ...and the hero sheet's card stops where the overlay does (its own caps were written against the whole window) */
body.cc-bar #detailOv #detailCard { max-height: calc(100vh - 40px - var(--cc-bar-h)); max-height: calc(100dvh - 40px - var(--cc-bar-h)); }
/* the HOME column and the SETTINGS skin used to pay the device's bottom inset themselves; the bar pays it now */
body.cc-bar #menu { padding-bottom: 6px; }
body.cc-bar #capeHome { padding-bottom: 0; }
body.cc-bar #capeSettings { padding-bottom: 0; }
/* the bottom BACK TO HOME button is the HOME tab now (the wheel's BACK TO SHOP stays: it does not go home) */
body.cc-bar .screen > .backBtn[data-back]:not([data-back-to]) { display: none; }

#ccTabBar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 82;
  display: none;
  grid-template-columns: 1fr 1fr 1.28fr 1fr 1fr;
  align-items: stretch;
  height: var(--cc-bar-h);
  padding: 0 4px var(--sa-bottom, env(safe-area-inset-bottom, 0px));
  background: linear-gradient(180deg, #221a4a 0%, #150e2c 100%);
  border-top: 3px solid #0a0618;
  box-shadow: 0 -2px 0 rgba(255, 210, 63, .62), 0 -12px 18px -8px rgba(0, 0, 0, .6);
  box-sizing: border-box;
  -webkit-user-select: none; user-select: none;
}
body.cc-bar #ccTabBar { display: grid; }
/* the HOME tour dims the whole window with a spotlight: the bar steps aside for it */
body:has(#capeTour:not(.hidden)) #ccTabBar { display: none; }

.ccBarTab {
  position: relative; min-width: 0; min-height: 56px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  padding: 4px 0 3px; margin: 0; border: 0; background: transparent; cursor: pointer;
  color: #bdb2ec; font-family: 'Bangers', Impact, sans-serif; letter-spacing: .8px;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ccBarTab:focus-visible { outline: 3px solid var(--pow, #ffd23f); outline-offset: -4px; border-radius: 10px; }
.ccBarPlate { position: relative; display: flex; align-items: center; justify-content: center; width: 40px; height: 32px; }
.ccBarIco { display: flex; width: 28px; height: 28px; filter: drop-shadow(0 1px 0 rgba(0, 0, 0, .55)); transition: transform .12s ease-out; }
.ccBarIco svg { width: 100%; height: 100%; display: block; }
.ccBarLbl { font-size: 13px; line-height: 1; }
.ccBarTab:active .ccBarIco { transform: translateY(2px) scale(.94); }

/* the tab you are on */
.ccBarTab.on { color: var(--pow, #ffd23f); }
.ccBarTab.on::before {
  content: ''; position: absolute; left: 14%; right: 14%; top: -3px; height: 5px;
  background: var(--pow, #ffd23f); border: 2px solid #0a0618; border-top: 0; border-radius: 0 0 8px 8px;
}
.ccBarTab.on .ccBarIco { transform: scale(1.1); }
.ccBarTab.on .ccBarPlate::after {
  content: ''; position: absolute; inset: -4px -2px -3px; z-index: -1; border-radius: 12px;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 210, 63, .30), rgba(255, 210, 63, 0) 70%);
}

/* HOME, the middle one: a round gold button that stands a little above the bar */
.ccBarMain .ccBarPlate {
  width: 54px; height: 54px; margin: -22px 0 0; border-radius: 50%; flex: 0 0 54px;
  background: radial-gradient(circle at 50% 30%, #3a2c74 0%, #241a4e 100%);
  border: 3px solid #0a0618; box-shadow: 0 0 0 3px rgba(255, 210, 63, .62), 0 4px 0 #0a0618;
}
.ccBarMain .ccBarIco { width: 32px; height: 32px; }
.ccBarMain .ccBarLbl { font-size: 14px; }
.ccBarMain.on .ccBarPlate { background: radial-gradient(circle at 50% 30%, #ffe27a 0%, #ffbf1f 100%); box-shadow: 0 0 0 3px #fff8e7, 0 0 14px 3px rgba(255, 210, 63, .55), 0 4px 0 #0a0618; }
.ccBarMain.on::before { display: none; }
.ccBarMain.on .ccBarPlate::after { display: none; }
.ccBarMain:active .ccBarPlate { transform: translateY(2px); box-shadow: 0 0 0 3px rgba(255, 210, 63, .62), 0 2px 0 #0a0618; }
.ccBarMain.on:active .ccBarPlate { box-shadow: 0 0 0 3px #fff8e7, 0 0 14px 3px rgba(255, 210, 63, .55), 0 2px 0 #0a0618; }

/* marks: the same two the old rail carried (a NEW dot = finished and waiting, a number = something to do) */
.ccBarNew, .ccBarCount {
  position: absolute; z-index: 2; pointer-events: none; white-space: nowrap; line-height: 1.25;
  font-family: 'Bangers', Impact, sans-serif; border-radius: 20px;
}
.ccBarNew { right: -8px; top: -5px; padding: 0 4px; font-size: 9px; letter-spacing: .3px; color: #241a06;
  background: linear-gradient(180deg, #ffd23f, #f59f00); border: 1.5px solid #1b1430; }
.ccBarCount { left: -8px; top: -5px; padding: 0 4px; font-size: 10px; letter-spacing: .2px; color: #241a06;
  background: linear-gradient(180deg, #ffd23f, #f59f00); border: 1.5px solid #1b1430; }
.ccBarMain .ccBarNew { right: -4px; top: -2px; } .ccBarMain .ccBarCount { left: -4px; top: -2px; }
.ccBarNew[hidden], .ccBarCount[hidden], .ccBarLock[hidden] { display: none !important; }
/* HQ before it opens: dimmed, with a little padlock */
.ccBarLocked { opacity: .55; filter: grayscale(1); }
.ccBarLock { position: absolute; right: 22%; top: 6px; width: 15px; height: 15px; border-radius: 50%; pointer-events: none;
  background: #1b1430 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='%23fff8e7'/%3E%3Cpath d='M7.5 11V8.2a4.5 4.5 0 0 1 9 0V11' fill='none' stroke='%23fff8e7' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E") center / 11px no-repeat;
  border: 1.5px solid #bdb2ec; }

@media (max-width: 359px) { .ccBarLbl { font-size: 12px; } .ccBarMain .ccBarLbl { font-size: 13px; } }
@media (min-width: 540px) {
  #ccTabBar { left: var(--cc-col-x); right: var(--cc-col-x); }
}
@media (prefers-reduced-motion: reduce) { .ccBarIco { transition: none; } }
body.cc-rm .ccBarIco { transition: none; }

/* ---- the hamburger (HOME's top-right corner) ------------------------------------------------- */
#capeHome .ch-iconbtn.ccBurger { position: relative; }
#capeHome .ch-iconbtn.ccBurger svg { width: 26px; height: 26px; display: block; }
#capeHome .ch-iconbtn .ccBurgerDot {
  position: absolute; right: 5px; top: 5px; width: 13px; height: 13px; border-radius: 50%; pointer-events: none;
  background: #ff5c7a; box-shadow: 0 0 0 2px #1b1430;
}
#capeHome .ch-iconbtn .ccBurgerDot[hidden] { display: none !important; }

.ccMenuShade { position: fixed; inset: 0; z-index: 83; background: rgba(8, 4, 20, .38); }
.ccMenuShade[hidden], .ccMenu[hidden] { display: none !important; }
.ccMenu {
  position: fixed; z-index: 84; right: 10px; top: 64px; width: min(264px, calc(100vw - 20px));
  padding: 8px; border-radius: 16px; background: linear-gradient(180deg, #2e2358, #1d1540);
  border: 3px solid #0a0618; box-shadow: 0 0 0 3px rgba(255, 210, 63, .7), 6px 8px 0 rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; gap: 6px; transform-origin: 90% 0;
  animation: ccMenuPop .16s cubic-bezier(.2, 1.5, .4, 1) both;
}
@keyframes ccMenuPop { from { opacity: 0; transform: scale(.86) translateY(-6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ccMenu { animation: none; } }
body.cc-rm .ccMenu { animation: none; }
@media (min-width: 540px) { .ccMenu { right: calc(var(--cc-col-x, 0px) + 10px) !important; } }
.ccMenuRow {
  position: relative; min-height: 54px; display: flex; align-items: center; gap: 12px;
  padding: 6px 14px 6px 10px; border-radius: 12px; border: 2px solid #1b1430; background: #3a2c74;
  color: #fff8e7; font-family: 'Bangers', Impact, sans-serif; font-size: 20px; letter-spacing: 1.2px; text-align: left; cursor: pointer;
  -webkit-tap-highlight-color: transparent; touch-action: manipulation; box-shadow: 0 3px 0 #0a0618;
}
.ccMenuRow:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a0618; }
.ccMenuRow:focus-visible { outline: 3px solid var(--pow, #ffd23f); outline-offset: 1px; }
.ccMenuIco { display: flex; width: 32px; height: 32px; flex: 0 0 32px; padding: 3px; border-radius: 9px; background: rgba(0, 0, 0, .28); }
.ccMenuIco svg { width: 100%; height: 100%; display: block; }
.ccMenuLbl { flex: 1 1 auto; }
.ccMenuRow .ccBarNew, .ccMenuRow .ccBarCount { position: static; margin-left: 4px; }
.ccMenuRow .ccBarNew { order: 3; } .ccMenuRow .ccBarCount { order: 4; }

/* ---- the ACCOUNT page ------------------------------------------------------------------------- */
#acctScr .acctWrap { width: 100%; max-width: 420px; margin: 0 auto; }
#acctScr .acctRow { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin: 12px 0 0; }
#acctScr .acctRow .tinyBtn { min-height: 44px; }

/* ---- HOME: with the wheel door gone the POWER plate stands alone ------------------------------------ */
#chPowerRow .ch-powerplate { flex: 0 1 240px; }

/* ---- the two tab strips (SHOP | PREMIUM, HEROES | LEADER): the HQ tabs' look, a size up ------------- */
.ccHubTabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: min(360px, 100%); margin: 2px 0 10px; }
.ccHubTabs:empty { display: none; }
.ccHubTab {
  min-height: 48px; padding: 6px 4px; border: 2px solid #4a3f72; border-radius: 12px; background: #1d1736; color: #bdb3d8;
  font-family: 'Bangers', Impact, sans-serif; font-size: 20px; letter-spacing: 1.2px; cursor: pointer;
  box-shadow: 0 3px 0 #0a0618; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.ccHubTab.on { background: var(--pow, #ffd23f); color: #1b1430; border-color: #1b1430; }
.ccHubTab:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a0618; }
.ccHubTab:focus-visible { outline: 3px solid var(--pow, #ffd23f); outline-offset: 2px; }
.ccHubPanel { width: 100%; display: flex; flex-direction: column; align-items: center; }
.ccHubPanel[hidden] { display: none !important; }
#premBody { width: min(360px, 100%); }
#shopPanelPrem .pfSect { width: min(360px, 100%); }
#pfPass, #pfPlatinum { width: min(360px, 100%); }

/* ---- the PRIZE WHEEL entry at the foot of the SHOP --------------------------------------------------- */
.shopWheelDoor {
  position: relative; width: min(360px, 100%); margin: 14px 0 4px; min-height: 60px; padding: 8px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 3px solid #1b1430; background: linear-gradient(180deg, #3a2c74, #2a2052); color: #fff8e7;
  box-shadow: 0 0 0 3px rgba(255, 210, 63, .45), 0 4px 0 #0a0618; -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.shopWheelDoor[hidden] { display: none !important; }
.shopWheelDoor .swTxt { display: flex; flex-direction: column; gap: 2px; }
.shopWheelDoor b { font-family: 'Bangers', Impact, sans-serif; font-size: 22px; letter-spacing: 1.2px; color: var(--pow, #ffd23f); font-weight: 400; }
.shopWheelDoor i { font-style: normal; font-weight: 800; font-size: 11.5px; letter-spacing: .5px; opacity: .9; }
.shopWheelDoor .swGo { font-family: 'Bangers', Impact, sans-serif; font-size: 22px; letter-spacing: 1px; padding: 6px 14px; border-radius: 10px; color: #1b1430;
  background: var(--pow, #ffd23f); border: 2px solid #1b1430; }
.shopWheelDoor.is-live { border-color: var(--pow, #ffd23f); }
.shopWheelDoor.is-live::after { content: ''; position: absolute; inset: -6px; border-radius: 19px; border: 2px solid var(--pow, #ffd23f); opacity: 0; pointer-events: none;
  animation: chDoorPulse 1.5s ease-in-out infinite; }
.shopWheelDoor:active { transform: translateY(2px); box-shadow: 0 0 0 3px rgba(255, 210, 63, .45), 0 2px 0 #0a0618; }
body.cc-rm .shopWheelDoor.is-live::after { animation: none; opacity: .85; }
@media (prefers-reduced-motion: reduce) { .shopWheelDoor.is-live::after { animation: none; opacity: .85; } }
/* the sticky BACK button's scrim ends where the bar starts */
body.cc-bar #shopScr .backBtn::before { bottom: var(--cc-bar-h); }

/* ---- LINEUP's LEADER tab ----------------------------------------------------------------------------- */
.lineupLeaderTab #lineupCount { display: none; }
.lineupLeadHead { width: min(360px, 100%); text-align: center; margin: 2px 0 8px; display: flex; flex-direction: column; gap: 3px; }
.lineupLeadHead b { font-family: 'Bangers', Impact, sans-serif; font-weight: 400; font-size: 22px; letter-spacing: 1.2px; color: var(--pow, #ffd23f); }
.lineupLeadHead span { font-size: 11.5px; font-weight: 800; color: #bdb3d8; line-height: 1.35; }
.lineupLeaderList { width: min(360px, 100%); display: flex; flex-direction: column; gap: 9px; }
.lineupLeaderRow {
  position: relative; display: flex; align-items: center; gap: 10px; min-height: 76px; padding: 8px 10px; text-align: left; cursor: pointer;
  border-radius: 14px; border: 3px solid #1b1430; background: #241b44; color: #fff8e7; box-shadow: 0 3px 0 #0a0618, inset 0 0 0 2px color-mix(in srgb, var(--acc, #b197fc) 55%, transparent);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
.lineupLeaderRow.sel { background: linear-gradient(180deg, #4b3a8f, #33276a); border-color: var(--pow, #ffd23f); box-shadow: 0 3px 0 #0a0618, 0 0 0 2px rgba(255, 210, 63, .5); }
.lineupLeaderRow:active { transform: translateY(2px); box-shadow: 0 1px 0 #0a0618; }
.lineupLeaderRow .lcMedal { flex: 0 0 54px; width: 54px; height: 54px; }
.lineupLeaderRow .llBody { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lineupLeaderRow .llName { font-family: 'Bangers', Impact, sans-serif; font-size: 19px; letter-spacing: 1px; line-height: 1.05; }
.lineupLeaderRow .llRole { font-size: 10px; font-weight: 900; letter-spacing: .5px; color: #bdb3d8; }
.lineupLeaderRow .llPassive { font-size: 11px; font-weight: 700; color: #d8d2ea; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lineupLeaderRow .llPick { flex: 0 0 auto; font-family: 'Bangers', Impact, sans-serif; font-size: 15px; letter-spacing: .8px; padding: 6px 9px; border-radius: 9px;
  background: #3a2c74; border: 2px solid #1b1430; color: #fff8e7; }
.lineupLeaderRow.sel .llPick { background: var(--pow, #ffd23f); color: #1b1430; }
.lineupLeadNote { width: min(360px, 100%); margin: 10px 0 4px; text-align: center; font-size: 10.5px; font-weight: 800; color: #8d86ad; }
.lineupLeadMore { margin: 6px 0 4px; min-height: 44px; }

/* ---- the REASON CARD: the one line a greyed tab / card / button says when it is tapped (owner decision D32) ---- */
.ccReason {
  position: fixed; z-index: 86; left: 50%; bottom: calc(var(--cc-bar-h, 0px) + 16px); transform: translateX(-50%);
  width: max-content; max-width: min(340px, calc(100vw - 24px)); padding: 10px 16px 10px 12px; box-sizing: border-box;
  display: flex; align-items: center; gap: 10px; border-radius: 14px; cursor: pointer;
  background: #fff8e7; color: #1b1430; border: 3px solid #0a0618; box-shadow: 0 0 0 3px rgba(255, 210, 63, .8), 5px 6px 0 rgba(0, 0, 0, .45);
  font-family: 'Bangers', Impact, sans-serif; font-size: 18px; letter-spacing: .8px; line-height: 1.15;
}
.ccReason[hidden] { display: none !important; }
.ccReason.pop { animation: ccReasonPop .18s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes ccReasonPop { from { opacity: 0; transform: translateX(-50%) translateY(10px) scale(.9); } to { opacity: 1; transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ccReason.pop { animation: none; } }
body.cc-rm .ccReason.pop { animation: none; }
.ccReasonLock { flex: 0 0 auto; display: flex; width: 16px; height: 16px; padding: 3px; box-sizing: content-box; background: #ffd23f; border: 2px solid #1b1430; border-radius: 50%; }
.ccReasonLock svg { width: 100%; height: 100%; }

/* ---- HOME: a mode that is not open yet is GREYED in place (owner decision D32) ----------------------- */
#capeHome .ch-card.ch-locked { filter: grayscale(1) brightness(.78); cursor: default; }
#capeHome .ch-card.ch-locked .ch-lockBadge {
  position: absolute; top: 8px; right: 8px; z-index: 3; width: 26px; height: 26px; padding: 4px; box-sizing: border-box; pointer-events: none;
  border-radius: 50%; background: #fff8e7; border: 2px solid #1b1430; display: flex; font-size: 18px;
}
#capeHome .ch-card.ch-locked .ch-lockBadge svg { width: 100%; height: 100%; }
#capeHome .ch-playbtn.is-locked { filter: grayscale(1) brightness(.8); }

/* ---- greyed tabs / rows (owner decision D32) ---------------------------------------------------------- */
.ccHubTab.ccHubLocked { opacity: .55; filter: grayscale(1); position: relative; }
.ccHubLock { display: inline-block; width: 14px; height: 14px; margin-left: 6px; vertical-align: -1px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='5' y='11' width='14' height='10' rx='2' fill='%23bdb3d8'/%3E%3Cpath d='M7.5 11V8.2a4.5 4.5 0 0 1 9 0V11' fill='none' stroke='%23bdb3d8' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.lineupLeaderRow.locked { opacity: .6; filter: grayscale(1); cursor: default; box-shadow: 0 3px 0 #0a0618; }
.lineupLeaderRow.locked .llPick { background: #1d1736; color: #bdb3d8; }

/* ---- W326 E-004 (J 2026-09-16 "notification marks on tabs"): the plain DOT - something is waiting there (HOME: a finished quest or an owed reward
   while you are elsewhere; HQ: a headquarters invite). Top-right of the icon plate like the NEW pill, never over the label. ---- */
.ccBarDot { position: absolute; right: -3px; top: -3px; z-index: 2; width: 12px; height: 12px; border-radius: 50%; pointer-events: none;
  background: #ff5c7a; box-shadow: 0 0 0 2px #1b1430; }
.ccBarMain .ccBarDot { right: 1px; top: 1px; width: 13px; height: 13px; }
.ccBarDot[hidden] { display: none !important; }

/* ---- W326: a longer menu (NEWS, HINTS) still fits a 360x640 phone above the bar. The rows stay 46 px tall thumb targets (E-022); on a very short
   window the card scrolls inside itself instead of running under the bar. ---- */
.ccMenu { max-height: calc(100vh - 64px - var(--cc-bar-h, 64px) - 8px); max-height: calc(100dvh - 64px - var(--cc-bar-h, 64px) - 8px); overflow-y: auto; overscroll-behavior: contain; }
.ccMenu { gap: 5px; }
.ccMenuRow { min-height: 46px; font-size: 19px; padding-top: 4px; padding-bottom: 4px; }
.ccMenuIco { width: 30px; height: 30px; flex-basis: 30px; }
/* W326 E-020: the RANKINGS row carries J's two words; they may wrap to two lines inside the same 46 px row */
.ccMenuRow[data-item="leaderboard"] .ccMenuLbl { font-size: 17px; line-height: 1.02; letter-spacing: .9px; }
.ccMenu{width:min(370px,calc(100vw - 20px));max-height:calc(100dvh - var(--cc-menu-top,64px) - 12px - env(safe-area-inset-bottom,0px));padding:10px;box-sizing:border-box;background:linear-gradient(145deg,#183858,#12223d 60%,#201f3c);gap:9px;scrollbar-width:thin}
.ccMenuGroup{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
.ccMenuHeading{grid-column:1/-1;color:#ffdc8a;font:800 11px/1.2 system-ui;letter-spacing:.14em;padding:3px 1px}
.ccMenuGroup .ccMenuRow{min-width:0;min-height:46px;padding:5px;gap:5px;font-size:16px;line-height:1.05;background:#25445e}
.ccMenuGroup .ccMenuRow:focus-visible{z-index:1}
.ccMenuGroup .ccMenuRow[data-item="leaderboard"] .ccMenuLbl{font-size:14px}
.ccMenuGroup .ccMenuRow:last-child:nth-child(even){grid-column:1/-1}
.ccMenuGroup .ccMenuLbl{overflow-wrap:anywhere}
@media(max-width:330px){.ccMenuGroup .ccMenuIco{width:23px;height:23px;flex-basis:23px}}
