/* =========================================================
   iPhone page redesign + coordinated dark / warm light themes
   ========================================================= */
:root {
  --page-navy: #07111f;
  --page-navy-2: #0b1b30;
  --page-navy-3: #132c49;
  --warm-gold: #dca94c;
  --warm-gold-2: #f0c96c;
  --cream: #f7edda;
  --cream-2: #fff7e8;
  --ink: #3d2c1d;
}

body[data-theme="dark"] {
  --page-surface: rgba(7, 18, 32, .94);
  --page-surface-2: rgba(11, 26, 45, .94);
  --page-text: #f0dfbd;
  --page-muted: #bca47b;
  --page-line: rgba(220, 171, 76, .30);
  --page-row: rgba(8, 18, 31, .88);
  --page-row-hover: rgba(18, 37, 60, .92);
}
body[data-theme="light"] {
  --page-surface: rgba(250, 240, 220, .97);
  --page-surface-2: rgba(255, 248, 235, .98);
  --page-text: #52361e;
  --page-muted: #866947;
  --page-line: rgba(185, 126, 40, .34);
  --page-row: rgba(255, 248, 235, .96);
  --page-row-hover: rgba(255, 242, 215, .98);
}

body[data-theme="light"] {
  
  color: var(--page-text);
}
body[data-theme="light"]::before {
  background: radial-gradient(circle at 50% 0, rgba(255,240,187,.18), transparent 32%);
}
body[data-theme="light"] .app-shell {
  background: linear-gradient(180deg, rgba(237,244,251,.88), rgba(255,248,232,.94));
}
body[data-theme="light"] .topbar {
  background: rgba(251, 241, 222, .94);
  border-bottom-color: rgba(181,124,45,.24);
}
body[data-theme="light"] .top-rank-box {
  background: linear-gradient(180deg, #fff7e7, #f6e8ce) !important;
  border-color: rgba(190,130,40,.42) !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.72), 0 5px 14px rgba(73,52,27,.08) !important;
}
body[data-theme="light"] .hud-rank-name,
body[data-theme="light"] .hud-xp-copy,
body[data-theme="light"] .hud-coins-block,
body[data-theme="light"] .hud-rank-level {
  color: #6f4924 !important;
}
body[data-theme="light"] .top-progress-track {
  background: #d8c9b3;
  border-color: rgba(166,108,30,.25);
}
body[data-theme="light"] .icon-button {
  background: #fff5df;
  border-color: rgba(185,127,43,.32);
}
body[data-theme="light"] .menu-lines,
body[data-theme="light"] .menu-lines::before,
body[data-theme="light"] .menu-lines::after {
  background: #7b542d;
}

/* Shared iPhone-like content pages */
.iphone-page {
  min-height: calc(100vh - 122px);
  margin: -2px -12px 0;
  padding-bottom: 18px;
  color: var(--page-text);
}
.secondary-page-hero {
  position: relative;
  min-height: 286px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(3,8,15,.08), rgba(3,8,15,.08)),
    url("../assets/bg_focus_mockup_scene.webp") center 18% / cover no-repeat;
}
.secondary-page-scene {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.secondary-page-scene .hero-avatar {
  position: absolute;
  left: 50%;
  bottom: 21px;
  width: 176px;
  height: 225px;
  transform: translateX(-62%);
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 9px 12px rgba(0,0,0,.27));
}
.secondary-page-scene .hero-pet {
  position: absolute;
  left: calc(50% + 46px);
  bottom: 27px;
  width: 82px;
  height: 82px;
  object-fit: contain;
  object-position: center bottom;
  filter: drop-shadow(0 7px 9px rgba(0,0,0,.25));
}
.secondary-page-title {
  position: absolute;
  z-index: 4;
  left: 18px;
  right: 18px;
  bottom: 5px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
}
.secondary-page-title span {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237,190,96,.78));
}
.secondary-page-title span:last-child {
  transform: scaleX(-1);
}
.secondary-page-title h2 {
  margin: 0;
  color: #f2d08a;
  font-size: 1.7rem;
  font-weight: 400;
  letter-spacing: .06em;
  text-shadow: 0 2px 10px rgba(0,0,0,.42);
}
body[data-theme="light"] .secondary-page-hero {
  background:
    linear-gradient(180deg, rgba(155,190,227,.04), rgba(255,236,190,.12)),
    url("../assets/bg_focus_mockup_scene.webp") center 18% / cover no-repeat;
}
body[data-theme="light"] .secondary-page-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(173,210,242,.08), rgba(255,230,171,.18));
  pointer-events: none;
}
body[data-theme="light"] .secondary-page-title h2 {
  color: #fff0c7;
}

.iphone-surface {
  position: relative;
  margin: 0 16px 14px;
  padding: 16px;
  background: var(--page-surface);
  border: 1px solid var(--page-line);
  border-radius: 12px;
  box-shadow: 0 9px 26px rgba(0,0,0,.12), inset 0 0 0 1px rgba(255,255,255,.025);
}
body[data-theme="light"] .iphone-surface {
  box-shadow: 0 10px 24px rgba(83,58,26,.09), inset 0 0 0 1px rgba(255,255,255,.65);
}
.iphone-page-body {
  margin-top: -1px;
}
.iphone-section-title {
  color: var(--warm-gold-2);
  font-size: .86rem;
  letter-spacing: .10em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
body[data-theme="light"] .iphone-section-title {
  color: #98601d;
}
.iphone-section-title.centered {
  text-align: center;
  margin-top: 15px;
}

.iphone-tab-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 14px;
  border: 1px solid var(--page-line);
  border-radius: 10px;
  overflow: hidden;
  background: rgba(2,9,16,.26);
}
.iphone-tab-switch button {
  min-height: 44px;
  border: 0;
  background: transparent;
  color: var(--page-muted);
  font-size: .78rem;
  letter-spacing: .10em;
}
.iphone-tab-switch button.active {
  background: linear-gradient(180deg, rgba(226,174,74,.24), rgba(190,130,43,.13));
  color: var(--warm-gold-2);
  box-shadow: inset 0 -2px 0 var(--warm-gold);
}
body[data-theme="light"] .iphone-tab-switch {
  background: rgba(230,210,178,.48);
}
body[data-theme="light"] .iphone-tab-switch button.active {
  background: linear-gradient(180deg, #fff2d5, #f7ddb0);
  color: #75481c;
}

/* Quests */
.iphone-list { display: grid; gap: 10px; }
.iphone-quest-row {
  display: grid;
  grid-template-columns: 54px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 12px;
  border: 1px solid var(--page-line);
  border-radius: 10px;
  background: var(--page-row);
}
.iphone-quest-row.completed {
  border-color: rgba(100,160,92,.42);
}
.iphone-row-icon {
  width: 50px;
  height: 50px;
  padding: 8px;
  object-fit: contain;
  border: 1px solid rgba(224,174,75,.34);
  border-radius: 10px;
  background: rgba(8,18,31,.50);
}
body[data-theme="light"] .iphone-row-icon {
  background: #25496f;
}
.iphone-row-title {
  color: var(--page-text);
  font-size: .92rem;
  letter-spacing: .025em;
}
.iphone-row-sub {
  margin-top: 3px;
  color: var(--page-muted);
  font-size: .72rem;
  line-height: 1.3;
}
.iphone-row-progress {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 9px;
  margin-top: 8px;
  color: var(--page-muted);
  font-size: .68rem;
}
.iphone-row-progress .progress-track { height: 5px; }
.coin-reward {
  color: var(--warm-gold-2);
  white-space: nowrap;
  font-size: .92rem;
}

.reward-claim {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(222,170,70,.50);
  border-radius: 8px;
  background: linear-gradient(180deg, #e7b654, #bd7925);
  color: #23180c;
  font-size: .68rem;
}
.reward-done { color: #7eb56b; font-size: 1.4rem; }

/* Stats */
.stats-summary-panel { margin-top: -1px; }
.stats-summary-list { display: grid; }
.stats-summary-row {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  border-top: 1px solid var(--page-line);
}
.stats-summary-row:first-child { border-top: 0; }
.stats-summary-row img {
  width: 40px;
  height: 40px;
  padding: 7px;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(28,66,106,.68);
  border: 1px solid rgba(224,174,75,.34);
}
.stats-summary-row span {
  color: var(--page-muted);
  font-size: .72rem;
  letter-spacing: .06em;
}
.stats-summary-row strong {
  color: var(--warm-gold-2);
  font-weight: 400;
  font-size: 1rem;
}
body[data-theme="light"] .stats-summary-row strong { color: #a7661b; }
.activity-panel { padding-bottom: 12px; }
.compact-range { width: 150px; grid-template-columns: repeat(4,1fr); }
.compact-range button { min-height: 30px; padding: 0; font-size: .62rem; }
.iphone-chart {
  height: 182px;
  display: flex;
  align-items: end;
  gap: 8px;
  padding: 15px 3px 0;
  border-bottom: 1px solid var(--page-line);
}
.iphone-chart-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 7px;
}
.iphone-bar {
  width: min(30px, 72%);
  min-height: 7px;
  border-radius: 4px 4px 1px 1px;
  background: linear-gradient(180deg, #5ca6e9, #1c4c85);
  border: 1px solid rgba(230,183,85,.48);
  box-shadow: inset 0 0 8px rgba(255,255,255,.10);
}
body[data-theme="light"] .iphone-bar {
  background: linear-gradient(180deg, #71b6ef, #3a78ba);
}
.iphone-chart-col span { color: var(--page-muted); font-size: .62rem; }
.stats-foot-row {
  display: flex;
  justify-content: space-between;
  color: var(--warm-gold-2);
  padding-top: 11px;
  font-size: .72rem;
  
}
body[data-theme="light"] .stats-foot-row { color: #9c621c; }

/* Rewards */
.rewards-wallet {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--page-muted);
  letter-spacing: .08em;
}
.rewards-wallet strong { color: var(--warm-gold-2); font-weight: 400; }

.rewards-tabs {
  display: flex;
  overflow-x: auto;
  gap: 7px;
  padding-bottom: 10px;
  scrollbar-width: none;
}
.rewards-tabs::-webkit-scrollbar { display:none; }
.rewards-tabs button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--page-line);
  border-radius: 8px;
  background: transparent;
  color: var(--page-muted);
  font-size: .62rem;
}
.rewards-tabs button.active {
  color: var(--warm-gold-2);
  background: rgba(218,164,70,.12);
  border-color: rgba(228,177,77,.48);
}
body[data-theme="light"] .rewards-tabs button.active {
  color: #75471a;
  background: #f4d9a4;
}
.rewards-list { display: grid; gap: 9px; }
.reward-shop-row {
  display: grid;
  grid-template-columns: 76px minmax(0,1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 94px;
  padding: 10px;
  border: 1px solid var(--page-line);
  border-radius: 10px;
  background: var(--page-row);
}
.reward-art {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.reward-art img { width: 100%; height: 100%; object-fit: contain; }
.reward-title { color: var(--page-text); font-size: .92rem; }
.reward-sub { color: var(--page-muted); margin-top: 4px; font-size: .69rem; }
.reward-price {
  min-width: 80px;
  min-height: 42px;
  padding: 0 9px;
  border: 1px solid rgba(222,170,70,.44);
  border-radius: 8px;
  background: rgba(8,18,31,.35);
  color: var(--warm-gold-2);
  font-size: .70rem;
}

.reward-price:disabled { opacity:.45; }

/* Teams */
.team-tabs { margin-bottom: 12px; }
.team-feature-card {
  display: grid;
  grid-template-columns: 105px 1fr;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--page-line);
  border-radius: 11px;
  background: var(--page-row);
}
.team-crest-big { width: 100px; height: 100px; object-fit: contain; }
.team-name { color: var(--warm-gold-2); font-size: 1.05rem; letter-spacing: .04em; }

.team-motto { color: var(--page-muted); margin-top: 6px; font-size: .74rem; line-height: 1.4; }
.team-meta { display:flex; gap: 14px; margin-top: 12px; color: var(--page-text); font-size: .70rem; }
.team-leaderboard {
  border: 1px solid var(--page-line);
  border-radius: 10px;
  overflow: hidden;
}
.team-member-row {
  display: grid;
  grid-template-columns: 28px 48px minmax(0,1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 66px;
  padding: 7px 10px;
  border-top: 1px solid var(--page-line);
  background: var(--page-row);
}
.team-member-row:first-child { border-top: 0; }
.team-member-row > img {
  width: 44px;
  height: 44px;
  object-fit: cover;
  object-position: center top;
  border-radius: 50%;
  border: 1px solid rgba(220,171,76,.50);
  background: #162b43;
}
.member-rank { color: var(--warm-gold-2); text-align: center; }
.member-copy { display:grid; }
.member-copy strong { color: var(--page-text); font-weight:400; font-size:.86rem; }
.member-copy span { color: var(--page-muted); font-size:.60rem; margin-top:2px; }
.member-score { color: var(--warm-gold-2); font-size:.76rem; }
body[data-theme="light"] .member-rank,
body[data-theme="light"] .member-score { color:#9d621e; }
.invite-members-button {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px solid rgba(221,170,70,.55);
  border-radius: 9px;
  background: linear-gradient(180deg, #365f91, #1e416d);
  color: #f6dfa8;
  letter-spacing: .09em;
}

.subtle-invite {
  margin-top: 7px;
  text-align: center;
  color: var(--page-muted);
  font-size: .58rem;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Bottom navigation: retain fantasy identity but warm the light mode. */
body[data-theme="light"] .bottom-nav {
  
  
  box-shadow: 0 -6px 22px rgba(86,58,23,.08);
}

body[data-theme="light"] .nav-item.active {
  
  
  border-color: rgba(201,139,43,.32);
}
body[data-theme="light"] .nav-item img { filter: sepia(.08) saturate(1.08); }

/* Light theme Focus page: same scene, warmer and friendlier rather than washed-out. */
body[data-theme="light"] .focus-scene-stage {
  background:
    linear-gradient(180deg, rgba(168,202,236,.04), rgba(255,225,161,.10) 50%, rgba(255,240,211,.42) 100%),
    url("../assets/bg_focus_mockup_scene.webp") center 6% / cover no-repeat !important;
}

body[data-theme="light"] .focus-live-controls { z-index: 7; }
body[data-theme="light"] .focus-subject-row select {
  background: #fff4df;
  color: #54371d;
  border-color: rgba(184,126,43,.43);
}
body[data-theme="light"] .focus-subject-row select option { background:#fff6e6; color:#50351c; }
body[data-theme="light"] .focus-time-label,
body[data-theme="light"] .focus-mode-label,
body[data-theme="light"] .focus-last-session,
body[data-theme="light"] .focus-range-row { color:#76552e; }
body[data-theme="light"] .focus-time-value { color:#a76417; }
body[data-theme="light"] .focus-mode-switch { background:rgba(255,246,226,.88); border-color:rgba(186,126,39,.44); }
body[data-theme="light"] .focus-mode-option { color:#75542e; }
body[data-theme="light"] .focus-mode-option.active { background:linear-gradient(180deg,#f1c970,#dca03c)!important; color:#41290f; }
body[data-theme="light"] .focus-quote-overlay { color:#5d4023; text-shadow:0 1px 8px rgba(255,255,255,.75); }
body[data-theme="light"] .focus-quote-attribution { color:#8d622c; }

/* Settings / sheets follow the selected theme. */
body[data-theme="light"] .sheet,
body[data-theme="light"] .focus-panel {
  background: #fff5e4 !important;
  color: #50351e;
  border-color: rgba(183,124,39,.38) !important;
}
body[data-theme="light"] .settings-row { color:#52381f; border-bottom-color:rgba(171,117,39,.18); }
body[data-theme="light"] .settings-row small,
body[data-theme="light"] .sheet .muted,
body[data-theme="light"] .settings-note { color:#8b6a45; }
body[data-theme="light"] input,
body[data-theme="light"] select {
  background:#fffaf0;
  color:#4d341c;
  border-color:rgba(181,123,39,.34);
}

@media (max-width: 390px) {
  .secondary-page-hero { min-height: 264px; }
  .secondary-page-scene .hero-avatar { width:164px; height:211px; }
  .secondary-page-scene .hero-pet { width:74px; height:74px; left:calc(50% + 40px); }
  .iphone-surface { margin-left:12px; margin-right:12px; padding:13px; }
  .iphone-quest-row { grid-template-columns:46px minmax(0,1fr) auto; gap:9px; padding:11px 9px; }
  .iphone-row-icon { width:44px; height:44px; }
  .reward-shop-row { grid-template-columns:64px minmax(0,1fr) auto; }
  .reward-art { width:62px; height:62px; }
  .reward-price { min-width:68px; }
  .team-feature-card { grid-template-columns:88px 1fr; }
  .team-crest-big { width:84px; height:84px; }
}


/* ===== Secondary pages: keep the academy scene exclusive to Focus ===== */

body[data-theme="light"] {
  background: #f4ead7 !important;
}

.secondary-page-header {
  position: relative;
  padding: 22px 16px 14px;
  background: transparent;
}
.secondary-page-header .secondary-page-title {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
}
.secondary-page-header .secondary-page-title h2 {
  color: var(--warm-gold-2);
  text-shadow: none;
  font-size: 1.55rem;
}
.secondary-page-header .secondary-page-title span {
  background: linear-gradient(90deg, transparent, var(--page-line));
}
.secondary-page-header .secondary-page-title span:last-child {
  transform: scaleX(-1);
}
body[data-theme="light"] .secondary-page-header .secondary-page-title h2 {
  color: #8f5d24;
}

/* Remove any legacy courtyard/avatar hero from non-Focus pages. */
.iphone-page .secondary-page-hero,
.iphone-page .secondary-page-scene {
  display: none !important;
}

.iphone-page {
  background: transparent;
}
body[data-theme="dark"] .iphone-page {
  background: linear-gradient(180deg, rgba(8,15,25,.72), rgba(6,11,19,.92));
}
body[data-theme="light"] .iphone-page {
  background: linear-gradient(180deg, #f7efdf, #efe2cb);
}

/* Keep Focus as the only full illustrated scene. */
body.focus-screen-active .focus-scene-stage {
  display: grid;
}


/* ===== Quest expansion + focus scene balance ===== */
/* Even the courtyard lighting so the right side does not read as a bright patch. */
body[data-theme="dark"] .focus-scene-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5,10,17,.08) 0%, rgba(5,10,17,0) 24%, rgba(5,10,17,0) 55%, rgba(5,10,17,.17) 78%, rgba(5,10,17,.28) 100%),
    linear-gradient(180deg, rgba(5,10,17,.02), rgba(5,10,17,.06));
}
body[data-theme="light"] .focus-scene-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(32,60,90,.025) 0%, rgba(32,60,90,0) 28%, rgba(32,60,90,0) 58%, rgba(42,68,94,.055) 82%, rgba(42,68,94,.09) 100%),
    linear-gradient(180deg, rgba(255,233,190,.025), rgba(255,238,207,.10));
}
.focus-character-ground,
.focus-quote-overlay,
.focus-live-controls { z-index: 3; }

.quest-tab-switch-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.quest-tab-switch-three button {
  min-width: 0;
  padding: 0 7px;
  font-size: .68rem;
  letter-spacing: .075em;
  white-space: nowrap;
}
.quest-tab-switch-three button small {
  margin-left: 3px;
  color: inherit;
  opacity: .62;
  font-size: .55rem;
  letter-spacing: 0;
}
.quest-tab-summary {
  margin: -4px 0 10px;
  text-align: center;
  color: var(--page-muted);
  font-size: .56rem;
  letter-spacing: .16em;
}
body[data-theme="light"] .quest-tab-summary { color: #886a45; }

/* Lifetime achievements should feel valuable without making completed rows visually heavy. */
.iphone-quest-row.completed {
  background: linear-gradient(90deg, rgba(93,151,91,.08), var(--page-row) 34%);
}
body[data-theme="light"] .iphone-quest-row.completed {
  background: linear-gradient(90deg, rgba(107,158,88,.11), var(--page-row) 36%);
}

@media (max-width: 390px) {
  .quest-tab-switch-three button {
    padding: 0 4px;
    font-size: .62rem;
    letter-spacing: .05em;
  }
  .quest-tab-switch-three button small { font-size: .50rem; }
}

/* ===== Full-width Focus scene + one-screen secondary dashboards ===== */
/* Cover the entire Focus viewport width. The previous fixed image height could leave a sliver on the right. */
body.focus-screen-active .focus-mockup-page,
body.focus-screen-active .focus-scene-stage {
  width: 100% !important;
  min-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}
body.focus-screen-active .focus-scene-stage {
  background:
    linear-gradient(180deg, rgba(4,8,14,.06) 0%, rgba(4,8,14,.01) 24%, rgba(4,8,14,.03) 48%, rgba(4,8,14,.22) 69%, rgba(4,8,14,.62) 100%),
    url("../assets/bg_focus_mockup_scene.webp") center 24% / cover no-repeat !important;
}
body[data-theme="light"].focus-screen-active .focus-scene-stage {
  background:
    linear-gradient(180deg, rgba(168,202,236,.04), rgba(255,225,161,.10) 50%, rgba(255,240,211,.42) 100%),
    url("../assets/bg_focus_mockup_scene.webp") center 24% / cover no-repeat !important;
}

/* Secondary pages are fixed dashboards: no page scrolling. */
body.secondary-screen-active {
  overflow: hidden !important;
}
body.secondary-screen-active .app-shell {
  height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}
body.secondary-screen-active .content {
  height: calc(100dvh - 72px);
  min-height: 0;
  padding: 0 0 64px !important;
  overflow: hidden !important;
}
body.secondary-screen-active .iphone-page {
  width: 100%;
  height: 100%;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 7px 2px !important;
  display: flex;
  flex-direction: column;
  overflow: hidden !important;
}
body.secondary-screen-active .secondary-page-header {
  flex: 0 0 42px;
  min-height: 42px;
  padding: 8px 8px 4px;
}
body.secondary-screen-active .secondary-page-title {
  height: 30px;
}
body.secondary-screen-active .secondary-page-title h2 {
  font-size: 1.20rem;
  line-height: 1;
}
body.secondary-screen-active .iphone-surface {
  margin: 0 4px 5px !important;
  padding: 7px 8px !important;
  border-radius: 8px;
  box-shadow: none;
}
body.secondary-screen-active .iphone-page-body {
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
}
body.secondary-screen-active .iphone-section-title {
  font-size: .68rem;
  margin-bottom: 5px;
}

/* Quests: all 6/8 rows share the available height. */
body.secondary-screen-active .iphone-quests-page .iphone-page-body {
  display: flex;
  flex-direction: column;
}
body.secondary-screen-active .iphone-quests-page .iphone-tab-switch {
  flex: 0 0 32px;
  min-height: 32px;
  margin-bottom: 3px;
}
body.secondary-screen-active .iphone-quests-page .iphone-tab-switch button {
  min-height: 30px;
  font-size: .58rem;
  padding: 0 3px;
}
body.secondary-screen-active .quest-tab-summary {
  flex: 0 0 15px;
  margin: 0 0 3px;
  
  line-height: 15px;
}
body.secondary-screen-active .iphone-quests-page .iphone-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 3px;
  overflow: hidden;
}
body.secondary-screen-active .iphone-quest-row {
  min-height: 0;
  height: 100%;
  grid-template-columns: 34px minmax(0,1fr) auto;
  gap: 6px;
  padding: 4px 6px;
  border-radius: 6px;
  overflow: hidden;
}
body.secondary-screen-active .iphone-row-icon {
  width: 32px;
  height: 32px;
  padding: 5px;
  border-radius: 6px;
}
body.secondary-screen-active .iphone-row-main {
  min-width: 0;
  align-self: center;
}
body.secondary-screen-active .iphone-row-title {
  
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.secondary-screen-active .iphone-row-sub {
  margin-top: 1px;
  
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.secondary-screen-active .iphone-row-progress {
  gap: 5px;
  margin-top: 3px;
  
}
body.secondary-screen-active .iphone-row-progress .progress-track { height: 3px; }

body.secondary-screen-active .reward-claim {
  
  
  
  border-radius: 5px;
}
body.secondary-screen-active .reward-done { font-size: 1rem; }

/* Stats: summary + chart always fit as one dashboard. */

body.secondary-screen-active .stats-summary-list { height: 155px; }
body.secondary-screen-active .stats-summary-row {
  min-height: 0;
  height: 25%;
  grid-template-columns: 32px 1fr auto;
  gap: 6px;
}
body.secondary-screen-active .stats-summary-row img {
  width: 28px;
  height: 28px;
  padding: 5px;
}
body.secondary-screen-active .stats-summary-row span { font-size: .56rem; }
body.secondary-screen-active .stats-summary-row strong { font-size: .72rem; }
body.secondary-screen-active .iphone-stats-page .activity-panel {
  
  
  
  
  padding-bottom: 5px !important;
}
body.secondary-screen-active .compact-range {
  width: 118px;
}
body.secondary-screen-active .compact-range button {
  min-height: 25px;
  font-size: .52rem;
}
body.secondary-screen-active .iphone-chart {
  flex: 1 1 auto;
  min-height: 80px;
  height: auto;
  gap: 4px;
  padding: 6px 2px 0;
}
body.secondary-screen-active .iphone-bar { width: min(22px, 70%); }
body.secondary-screen-active .iphone-chart-col { gap: 3px; }
body.secondary-screen-active .iphone-chart-col span { font-size: .47rem; }
body.secondary-screen-active .stats-foot-row {
  flex: 0 0 23px;
  padding-top: 5px;
  font-size: .57rem;
}

/* Rewards: all items in the selected category visible simultaneously. */
body.secondary-screen-active .iphone-rewards-page .iphone-page-body {
  display: flex;
  flex-direction: column;
}
body.secondary-screen-active .rewards-wallet {
  flex: 0 0 23px;
  margin-bottom: 3px;
  
}
body.secondary-screen-active .rewards-tabs {
  flex: 0 0 30px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0,1fr));
  gap: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}
body.secondary-screen-active .rewards-tabs button {
  min-width: 0;
  min-height: 28px;
  padding: 0 2px;
  
  
  overflow: hidden;
  text-overflow: ellipsis;
}
body.secondary-screen-active .rewards-list {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-auto-rows: minmax(0, 1fr);
  gap: 3px;
  overflow: hidden;
}
body.secondary-screen-active .reward-shop-row {
  min-height: 0;
  height: 100%;
  grid-template-columns: 43px minmax(0,1fr) auto;
  gap: 7px;
  padding: 3px 6px;
  border-radius: 6px;
  overflow: hidden;
}
body.secondary-screen-active .reward-art {
  width: 40px;
  height: 40px;
}
body.secondary-screen-active .reward-title {
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.secondary-screen-active .reward-sub {
  margin-top: 1px;
  
}
body.secondary-screen-active .reward-price {
  
  
  
  
  border-radius: 5px;
}

/* Team: team card, five members, invite action all visible at once. */
body.secondary-screen-active .iphone-teams-page .iphone-page-body {
  display: flex;
  flex-direction: column;
}
body.secondary-screen-active .team-tabs {
  flex: 0 0 31px;
  min-height: 31px;
  margin-bottom: 4px;
}
body.secondary-screen-active .team-tabs button { min-height: 29px; font-size: .58rem; }
body.secondary-screen-active .team-feature-card {
  flex: 0 0 82px;
  min-height: 82px;
  grid-template-columns: 67px 1fr;
  gap: 8px;
  padding: 5px 7px;
  border-radius: 6px;
}
body.secondary-screen-active .team-crest-big { width: 62px; height: 62px; }

body.secondary-screen-active .team-motto {
  margin-top: 2px;
  
  
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.secondary-screen-active .team-meta {
  gap: 8px;
  margin-top: 5px;
  
}
body.secondary-screen-active .iphone-section-title.centered {
  flex: 0 0 19px;
  margin: 4px 0 2px;
  line-height: 19px;
}
body.secondary-screen-active .team-leaderboard {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-rows: repeat(5, minmax(0,1fr));
  border-radius: 6px;
}
body.secondary-screen-active .team-member-row {
  min-height: 0;
  height: 100%;
  grid-template-columns: 22px 34px minmax(0,1fr) auto;
  gap: 6px;
  padding: 2px 6px;
}
body.secondary-screen-active .team-member-row > img {
  width: 30px;
  height: 30px;
}
body.secondary-screen-active .member-rank { font-size: .62rem; }

body.secondary-screen-active .member-copy span {  margin-top:0; }
body.secondary-screen-active .member-score { font-size: .55rem; }
body.secondary-screen-active .invite-members-button {
  flex: 0 0 34px;
  
  margin-top: 4px;
  
  border-radius: 6px;
}
body.secondary-screen-active .subtle-invite {
  flex: 0 0 12px;
  margin-top: 1px;
  font-size: .43rem;
  line-height: 12px;
}

@media (max-height: 760px) {
  body.secondary-screen-active .content {
    height: calc(100dvh - 66px);
    padding-bottom: 58px !important;
  }
  body.secondary-screen-active .secondary-page-header {
    flex-basis: 36px;
    min-height: 36px;
    padding-top: 5px;
  }
  body.secondary-screen-active .secondary-page-title h2 { font-size: 1.05rem; }
  body.secondary-screen-active .iphone-stats-page .stats-summary-panel { flex-basis: 166px; }
  body.secondary-screen-active .stats-summary-list { height: 138px; }
  body.secondary-screen-active .team-feature-card { flex-basis: 72px; min-height:72px; }
  body.secondary-screen-active .team-crest-big { width:54px; height:54px; }
}

/* ===== Rank journey architecture progression + live status icons ===== */
.rank-scene-card {
  
  border-radius: 7px;
  border: 1px solid rgba(214,176,106,.18);
  background: #090d13;
  isolation: isolate;
}
.rank-scene-card .rank-scene-image {
  
  
  
  display: block !important;
  opacity: .9 !important;
  filter: saturate(1.05) brightness(.96) contrast(1.02) !important;
}
.rank-scene-card.unlocked .rank-scene-image {
  opacity: .96 !important;
  filter: saturate(1.12) brightness(1.02) contrast(1.03) !important;
}
.rank-scene-card.locked .rank-scene-image {
  opacity: .3 !important;
  filter: grayscale(.82) saturate(.25) brightness(.46) contrast(.96) !important;
}
.rank-state-icon {
  position: absolute;
  z-index: 5;
  top: 9px;
  right: 10px;
  width: 29px !important;
  height: 29px !important;
  object-fit: contain !important;
  opacity: 1 !important;
  filter: none !important;
  pointer-events: none;
  drop-shadow: none;
}
.rank-scene-card.locked .rank-state-icon {
  opacity: .9 !important;
  filter: none !important;
}
.rank-scene-overlay {
  z-index: 3;
  
  padding: 12px 48px 11px 12px;
  
}
.rank-scene-copy .rank-name {
  color: #f0d294;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.rank-scene-copy .muted {
  max-width: 290px;
  color: #c7af86;
  
}
.rank-xp-label {
  align-self: end;
  justify-self: end;
  color: #d7b16d;
  font-size: .58rem;
  letter-spacing: .12em;
  white-space: nowrap;
}
.rank-scene-card.unlocked {
  border-color: rgba(214,176,106,.30) !important;
  background: #0b1119 !important;
  box-shadow: none !important;
}
.rank-scene-card.locked {
  border-color: rgba(255,255,255,.045) !important;
  background: #070a0e !important;
  box-shadow: none !important;
}
.rank-scene-card.locked .rank-scene-copy .rank-name,
.rank-scene-card.locked .rank-scene-copy .muted,
.rank-scene-card.locked .rank-xp-label,
.rank-scene-card.locked .rank-number {
  color: #766f65 !important;
}
.rank-scene-card.current {
  border: 2px solid #e2b45d !important;
  box-shadow: 0 0 0 1px rgba(255,225,155,.22), 0 0 18px rgba(226,180,93,.16) !important;
}
.rank-scene-card.current .rank-scene-image {
  opacity: 1 !important;
  filter: saturate(1.18) brightness(1.06) contrast(1.04) !important;
}
.rank-scene-card.current::after {
  content: "";
  position: absolute;
  inset: 3px;
  z-index: 6;
  pointer-events: none;
  border: 1px solid rgba(255,226,156,.28);
  border-radius: 4px;
}

body[data-theme="light"] .rank-scene-overlay {
  background: linear-gradient(90deg, rgba(20,34,51,.82), rgba(20,34,51,.40) 58%, rgba(20,34,51,.08) 100%);
}
body[data-theme="light"] .rank-scene-card.locked {
  background: #d9d5cc !important;
}

/* ===== Count up / count down timer direction ===== */
.focus-timer-choice-row {
  
  display: grid;
  
  align-items: center;
  
}
.focus-timer-choice-label {
  color: #c9a565;
  font-size: .54rem;
  letter-spacing: .16em;
  white-space: nowrap;
}
.focus-timer-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  height: 27px;
  overflow: hidden;
  border: 1px solid rgba(222,177,88,.48);
  border-radius: 999px;
  background: rgba(5,10,17,.64);
}
.focus-timer-option {
  min-width: 0;
  height: 25px !important;
  min-height: 25px !important;
  padding: 0 8px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: transparent !important;
  color: #bda371;
  
  font-size: .55rem !important;
  letter-spacing: .055em;
  line-height: 1;
  white-space: nowrap;
}
.focus-timer-option::before,
.focus-timer-option::after { display:none !important; }
.focus-timer-option.active {
  color: #1a1309;
  background: linear-gradient(180deg, #efc66c, #d89c38) !important;
  box-shadow: inset 0 0 0 1px rgba(255,239,193,.65);
}
body[data-theme="light"] .focus-timer-choice-label { color:#8b5d28; }
body[data-theme="light"] .focus-timer-switch {
  background: rgba(255,246,226,.88);
  border-color: rgba(186,126,39,.44);
}
body[data-theme="light"] .focus-timer-option { color:#856643; }
body[data-theme="light"] .focus-timer-option.active {
  color:#563612;
  background: linear-gradient(180deg,#ffe29a,#eeb85b) !important;
}

/* Recover the few pixels used by the timer-direction control on short iPhones. */
body.focus-screen-active .focus-live-controls { gap: 3px !important; }
body.focus-screen-active .focus-mega-button {
  min-height: 70px !important;
  height: 70px;
  padding-top: 12px !important;
  padding-bottom: 12px !important;
}
@media (max-height: 820px) {
  .focus-timer-choice-row { width:min(290px, 88%); }
  .focus-timer-switch { height:24px; }
  .focus-timer-option { height:22px !important; min-height:22px !important; font-size:.50rem !important; }
  body.focus-screen-active .focus-mega-button { min-height:61px !important; height:61px; }
  .focus-last-session { font-size:.48rem !important; }
}

/* ===== true open-ended Count Up timer ===== */
.focus-duration-block {
  width: 100%;
  display: grid;
  justify-items: center;
  min-height: 58px;
}
.focus-countdown-controls {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 3px;
}
.focus-open-ended-copy {
  display: none;
  min-height: 58px;
  align-content: center;
  justify-items: center;
  text-align: center;
  gap: 2px;
  color: #d6b36f;
  text-shadow: 0 2px 8px rgba(0,0,0,.45);
}
.focus-open-ended-copy strong {
  color: #f0cb79;
  font-weight:700; font-size:.76rem; line-height:1;
  letter-spacing: .14em;
}
.focus-open-ended-copy span {
  color: #c5a66f;
  font-size: .56rem;
  letter-spacing: .04em;
}
.focus-duration-block.is-open-ended .focus-countdown-controls { display: none; }
.focus-duration-block.is-open-ended .focus-open-ended-copy { display: grid; }
.open-ended-sheet-note {
  display: none;
  padding: 11px 12px;
  border: 1px solid rgba(216,174,94,.24);
  background: rgba(11,18,29,.58);
  color: #d7bd87;
  font-size: .76rem;
  line-height: 1.45;
}
.open-ended-sheet-note.visible { display: block; }
.stop-focus-button {
  min-width: min(290px, 82vw);
}
body[data-theme="light"] .focus-open-ended-copy,
body[data-theme="light"] .focus-open-ended-copy span { color:#80592b; text-shadow:none; }
body[data-theme="light"] .focus-open-ended-copy strong { color:#a76417; }
body[data-theme="light"] .open-ended-sheet-note {
  background: rgba(255,248,231,.92);
  color:#74512d;
  border-color: rgba(166,104,28,.28);
}
@media (max-height: 760px) {
  .focus-duration-block,
  .focus-open-ended-copy { min-height: 48px; }
  .focus-open-ended-copy strong { font-size:.68rem; }
  .focus-open-ended-copy span { font-size:.51rem; }
}

/* ===== Stats dashboard refinement: larger summary, goals, compact interactive hours chart ===== */

.stats-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}
.stats-summary-tile {
  min-width: 0;
  min-height: 61px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px 7px;
  border: 1px solid var(--page-line);
  border-radius: 7px;
  background: rgba(16, 36, 59, .42);
}
body[data-theme="light"] .stats-summary-tile {
  background: rgba(255, 249, 237, .66);
}
.stats-summary-tile > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.stats-summary-tile span:not(.stats-icon-simple) {
  overflow: hidden;
  color: var(--page-muted);
  font-size: .61rem;
  line-height: 1.05;
  letter-spacing: .055em;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.stats-summary-tile strong {
  overflow: hidden;
  color: var(--warm-gold-2);
  
  font-size: .91rem;
  line-height: 1;
  font-weight: 400;
  white-space: nowrap;
  text-overflow: ellipsis;
}
body[data-theme="light"] .stats-summary-tile strong { color: #9d5f18; }
.stats-icon-simple {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(221, 174, 82, .42);
  background: rgba(28, 65, 102, .68);
  color: #f0c96c;
  
  font-size: 1.12rem;
  line-height: 1;
}
body[data-theme="light"] .stats-icon-simple {
  background: rgba(230, 239, 247, .88);
  color: #355f8b;
}
.stats-icon-simple.warning { color: #e6a362; }
.stats-icon-simple.earned { color: #8fc681; }
.stats-icon-simple.lost { color: #d98979; }

.stats-goals-panel {
  padding: 7px 9px !important;
}
.stats-goal-row {
  display: grid;
  grid-template-columns: 94px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}
.stats-goal-row + .stats-goal-row {
  border-top: 1px solid var(--page-line);
}
.stats-goal-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
}
.stats-goal-copy strong {
  color: var(--page-text);
  font-size: .63rem;
  font-weight: 400;
  letter-spacing: .08em;
}
.stats-goal-copy span {
  color: var(--page-muted);
  font-size: .55rem;
  white-space: nowrap;
}
.stats-goal-row .progress-track { height: 5px; }
.stats-goal-row > b {
  color: var(--warm-gold-2);
  font-size: .62rem;
  font-weight: 400;
  text-align: right;
}
body[data-theme="light"] .stats-goal-row > b { color: #9d5f18; }

.stats-activity-compact {
  min-height: 0;
  padding: 7px 8px 6px !important;
}
.stats-activity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stats-activity-head .iphone-section-title { margin-bottom: 0; }
.stats-bar-readout {
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 1px 0 2px;
  color: var(--page-muted);
  
  
}
.stats-bar-readout strong {
  
  font-weight: 400;
}
.stats-bar-readout span {
  color: var(--warm-gold-2);
  font-size: .70rem;
}
body[data-theme="light"] .stats-bar-readout span { color: #9d5f18; }
.stats-chart-shell {
  height: 112px;
  min-height: 112px;
  display: grid;
  grid-template-columns: 39px minmax(0, 1fr);
  gap: 4px;
}
.stats-y-axis {
  position: relative;
  display: grid;
  grid-template-columns: 11px 1fr;
  min-width: 0;
  padding-bottom: 18px;
  color: var(--page-muted);
}
.stats-y-title {
  align-self: center;
  writing-mode: vertical-rl;
  
  
  
}
.stats-y-ticks {
  display: flex;
  
  
  
  
  font-size: .48rem;
}
.stats-activity-compact .iphone-chart {
  position: relative;
  height: 112px !important;
  min-height: 112px !important;
  display: flex;
  align-items: stretch;
  gap: 4px;
  padding: 2px 1px 0 !important;
  border-bottom: 0;
  
}
.stats-bar-button {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  color: inherit;
}
.stats-bar-button::before,
.stats-bar-button::after { display: none !important; }
.stats-bar-button .iphone-bar {
  width: min(22px, 70%);
  min-height: 4px;
  max-height: calc(100% - 21px);
  flex: 0 0 auto;
  opacity: .82;
  transition: opacity .15s ease, filter .15s ease, transform .15s ease;
}
.stats-bar-button.selected .iphone-bar,
.stats-bar-button:focus-visible .iphone-bar {
  opacity: 1;
  
  transform: translateY(-1px);
}
.stats-x-label {
  height: 18px;
  display: grid;
  place-items: center;
  color: var(--page-muted) !important;
  font-size: .47rem !important;
  line-height: 1;
  white-space: nowrap;
}
.stats-activity-compact .stats-foot-row {
  min-height: 20px;
  padding-top: 3px;
  font-size: .57rem;
}

/* Override the earlier ultra-small no-scroll stats rules. */
body.secondary-screen-active .iphone-stats-page .stats-summary-panel {
  flex: 0 0 auto;
  min-height: 0;
}
body.secondary-screen-active .iphone-stats-page .stats-summary-grid {
  height: auto;
}
body.secondary-screen-active .iphone-stats-page .stats-summary-tile {
  min-height: 54px;
}
body.secondary-screen-active .iphone-stats-page .stats-goals-panel {
  flex: 0 0 auto;
}
body.secondary-screen-active .iphone-stats-page .activity-panel {
  flex: 1 1 auto;
  min-height: 154px;
  display: flex;
  flex-direction: column;
}

body.secondary-screen-active .iphone-stats-page .stats-activity-compact .iphone-chart {
  flex: 1 1 auto;
  
  
}
body.secondary-screen-active .iphone-stats-page .stats-summary-row,
body.secondary-screen-active .iphone-stats-page .stats-summary-list {
  display: none !important;
}

@media (max-width: 390px) {
  .stats-summary-tile {
    grid-template-columns: 31px minmax(0,1fr);
    gap: 5px;
    padding: 5px;
  }
  .stats-icon-simple { width: 30px; height: 30px; font-size: 1rem; }
  .stats-summary-tile span:not(.stats-icon-simple) { font-size: .55rem; }
  .stats-summary-tile strong { font-size: .82rem; }
}
@media (max-height: 720px) {
  body.secondary-screen-active .iphone-stats-page .stats-summary-tile { min-height: 47px; }
  .stats-icon-simple { width: 29px; height: 29px; font-size: .95rem; }
  .stats-summary-tile span:not(.stats-icon-simple) { font-size: .52rem; }
  .stats-summary-tile strong { font-size: .76rem; }
  .stats-goal-row { min-height: 26px; }
  body.secondary-screen-active .iphone-stats-page .activity-panel { min-height: 135px; }
  body.secondary-screen-active .iphone-stats-page .stats-chart-shell { min-height: 77px; max-height: 92px; }
  body.secondary-screen-active .iphone-stats-page .stats-activity-compact .iphone-chart { min-height: 77px !important; }
}

/* ===== Bottom navigation simplification + Count Up minimum + full Stats canvas ===== */
/* Large, simple line icons only. Labels remain accessible through aria-label/title. */


.nav-item img,
.nav-item small { display: none !important; }







/* Count Up uses the same slider as an optional minimum-time commitment. */
.focus-duration-block.is-open-ended .focus-countdown-controls {
  display: grid !important;
}
.focus-duration-block.is-open-ended .focus-open-ended-copy { display: none !important; }
.focus-minimum-hint {
  display: none;
  width: min(350px, 92%);
  margin: -1px auto 0;
  color: #b99c68;
  font-size: .50rem;
  line-height: 1.15;
  letter-spacing: .035em;
  text-align: center;
}
.focus-minimum-hint.visible { display: block; }
body[data-theme="light"] .focus-minimum-hint { color: #77552f; }
.focus-duration-block.is-open-ended .focus-time-value {
  font-size: clamp(1.18rem, 5.2vw, 1.58rem) !important;
  letter-spacing: .035em;
}
.focus-duration-block.is-open-ended .focus-range-row { margin-top: -1px; }

/* Active Count Up clearly distinguishes an early cancellation from an eligible stop. */
#focusOverlay .stop-focus-button,
#focusOverlay #abandonButton {
  transition: background .16s ease, color .16s ease, opacity .16s ease;
}

/* Stats should visually occupy the complete dashboard viewport. */
body.secondary-screen-active .iphone-stats-page {
  display: grid !important;
  
  gap: 5px !important;
  align-content: stretch;
}
body.secondary-screen-active .iphone-stats-page > .secondary-page-header {
  min-height: 0 !important;
  height: auto !important;
}
body.secondary-screen-active .iphone-stats-page > .iphone-surface {
  width: auto;
  height: 100%;
  min-height: 0 !important;
  margin: 0 4px !important;
  overflow: hidden;
}
body.secondary-screen-active .iphone-stats-page .stats-summary-panel,
body.secondary-screen-active .iphone-stats-page .stats-goals-panel,
body.secondary-screen-active .iphone-stats-page .activity-panel {
  flex: initial !important;
  min-height: 0 !important;
}

/* Larger summary content, spread across its allotted area. */
.iphone-stats-page .stats-summary-panel {
  display: flex;
  flex-direction: column;
  padding: 9px 10px !important;
}
.iphone-stats-page .stats-summary-panel .iphone-section-title {
  flex: 0 0 auto;
  margin-bottom: 6px !important;
  font-size: .76rem !important;
}
.iphone-stats-page .stats-summary-grid {
  flex: 1 1 auto;
  min-height: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  grid-template-rows: repeat(3, minmax(0, 1fr));
  gap: 6px !important;
}
.iphone-stats-page .stats-summary-tile {
  min-height: 0 !important;
  height: 100%;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  gap: 8px !important;
  padding: 7px 9px !important;
}
.iphone-stats-page .stats-icon-simple {
  width: 39px !important;
  height: 39px !important;
  border-radius: 10px !important;
  font-size: 1.20rem !important;
  background: rgba(27, 59, 91, .48);
}



/* Goal progress becomes a prominent pair of commitment cards. */
.iphone-stats-page .stats-goals-panel {
  display: flex;
  flex-direction: column;
  
}

.stats-goal-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  
}
.stats-goal-card {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  
  
  border: 1px solid var(--page-line);
  border-radius: 8px;
  background: rgba(16, 36, 59, .38);
}

.stats-goal-card-head {
  display: flex;
  
  justify-content: space-between;
  gap: 6px;
}
.stats-goal-card-head strong {
  
  
  font-weight: 400;
  
}
.stats-goal-card-head b {
  color: var(--warm-gold-2);
  
  
  font-weight: 400;
}
body[data-theme="light"] .stats-goal-card-head b { color: #9d5f18; }
.stats-goal-big-value {
  
  
  
  
  white-space: nowrap;
}
.stats-goal-big-value span {
  color: var(--page-muted);
  
}
.stats-goal-track {
  
  border-radius: 999px;
}
.stats-goal-status {
  
  color: var(--page-muted);
  
  
}

/* The chart stays compact; the rest of Stats gets the freed space. */
body.secondary-screen-active .iphone-stats-page .stats-activity-compact {
  display: flex !important;
  flex-direction: column;
  padding: 6px 8px 5px !important;
}
body.secondary-screen-active .iphone-stats-page .stats-activity-head {
  flex: 0 0 25px;
}
body.secondary-screen-active .iphone-stats-page .stats-bar-readout {
  flex: 0 0 18px;
  height: 18px;
  margin: 0;
}
body.secondary-screen-active .iphone-stats-page .stats-chart-shell {
  flex: 1 1 auto !important;
  height: auto !important;
  
  max-height: none !important;
}
body.secondary-screen-active .iphone-stats-page .stats-activity-compact .iphone-chart {
  height: 100% !important;
  
}
body.secondary-screen-active .iphone-stats-page .stats-foot-row {
  flex: 0 0 19px;
  min-height: 19px;
}

@media (max-width: 390px) {
  
  .iphone-stats-page .stats-summary-tile { grid-template-columns: 36px minmax(0, 1fr) !important; gap: 6px !important; padding: 5px 6px !important; }
  .iphone-stats-page .stats-icon-simple { width: 34px !important; height: 34px !important; font-size: 1.03rem !important; }
  .iphone-stats-page .stats-summary-tile span:not(.stats-icon-simple) { font-size: .58rem !important; }
  .iphone-stats-page .stats-summary-tile strong { font-size: .88rem !important; }
  
}
@media (max-height: 720px) {
  .bottom-nav { height: 56px !important; min-height: 56px !important; }
  .nav-item { min-height: 45px; }
  .nav-glyph { width: 27px; height: 27px; }
  body.secondary-screen-active .content { padding-bottom: 56px !important; }
  body.secondary-screen-active .iphone-stats-page {  gap: 4px !important; }
  .iphone-stats-page .stats-summary-panel,
  .iphone-stats-page .stats-goals-panel { padding: 6px 8px !important; }
  .iphone-stats-page .stats-summary-panel .iphone-section-title,
  .iphone-stats-page .stats-goals-panel .iphone-section-title { margin-bottom: 3px !important; font-size: .64rem !important; }
  .iphone-stats-page .stats-summary-grid { gap: 4px !important; }
  .iphone-stats-page .stats-summary-tile { padding: 4px 6px !important; }
  .iphone-stats-page .stats-icon-simple { width: 31px !important; height: 31px !important; font-size: .95rem !important; }
  .iphone-stats-page .stats-summary-tile span:not(.stats-icon-simple) { font-size: .53rem !important; }
  .iphone-stats-page .stats-summary-tile strong { font-size: .78rem !important; }
  
  
  
  
  
  
  
}


/* ===== Stats balance pass: slightly larger chart, denser goal typography ===== */
body.secondary-screen-active .iphone-stats-page {
  grid-template-rows: 42px minmax(0, 1.30fr) minmax(0, .76fr) minmax(0, 1.04fr) !important;
}

.iphone-stats-page .stats-goals-panel {
  padding: 7px 9px !important;
}
.iphone-stats-page .stats-goals-panel .iphone-section-title {
  margin-bottom: 4px !important;
  font-size: .72rem !important;
}
.stats-goal-grid {
  gap: 7px;
}
.stats-goal-card {
  justify-content: space-between;
  padding: 7px 9px;
}
.stats-goal-card-head {
  align-items: center;
}
.stats-goal-card-head strong {
  font-size: .75rem;
  line-height: 1.1;
  letter-spacing: .065em;
}
.stats-goal-card-head b {
  font-size: 1.16rem;
  line-height: 1;
}
.stats-goal-big-value {
  margin: 3px 0 4px;
  font-size: .98rem;
  line-height: 1.08;
}
.stats-goal-big-value span {
  font-size: .67rem;
}
.stats-goal-track {
  height: 8px !important;
}
.stats-goal-status {
  margin-top: 4px;
  font-size: .57rem;
  line-height: 1.15;
  letter-spacing: .08em;
}

body.secondary-screen-active .iphone-stats-page .stats-chart-shell {
  min-height: 78px !important;
}
body.secondary-screen-active .iphone-stats-page .stats-activity-compact .iphone-chart {
  min-height: 78px !important;
}

@media (max-width: 390px) {
  .stats-goal-card { padding: 6px 7px; }
  .stats-goal-card-head strong { font-size: .69rem; }
  .stats-goal-card-head b { font-size: 1.06rem; }
  .stats-goal-big-value { font-size: .90rem; }
  .stats-goal-big-value span { font-size: .61rem; }
  .stats-goal-status { font-size: .52rem; }
}

@media (max-height: 720px) {
  body.secondary-screen-active .iphone-stats-page {
    grid-template-rows: 38px minmax(0, 1.22fr) minmax(0, .72fr) minmax(0, .96fr) !important;
  }
  .iphone-stats-page .stats-goals-panel { padding: 5px 7px !important; }
  .iphone-stats-page .stats-goals-panel .iphone-section-title { margin-bottom: 2px !important; font-size: .62rem !important; }
  .stats-goal-card { padding: 4px 6px; }
  .stats-goal-card-head strong { font-size: .62rem; }
  .stats-goal-card-head b { font-size: .94rem; }
  .stats-goal-big-value { margin: 1px 0 2px; font-size: .80rem; }
  .stats-goal-big-value span { font-size: .55rem; }
  .stats-goal-track { height: 6px !important; }
  .stats-goal-status { margin-top: 2px; font-size: .48rem; }
  body.secondary-screen-active .iphone-stats-page .stats-chart-shell,
  body.secondary-screen-active .iphone-stats-page .stats-activity-compact .iphone-chart {
    min-height: 64px !important;
  }
}

/* ===== Stats mood pass: warm academy styling to match Focus ===== */
.academy-stats-page {
  position: relative;
}
body[data-theme="dark"] .academy-stats-page {
  background:
    radial-gradient(circle at top center, rgba(92, 125, 173, .10), transparent 32%),
    linear-gradient(180deg, rgba(11,18,29,.98) 0%, rgba(10,16,26,.98) 100%);
}
body[data-theme="light"] .academy-stats-page {
  background:
    radial-gradient(circle at top center, rgba(223, 196, 139, .20), transparent 34%),
    linear-gradient(180deg, #f5ebd8 0%, #efe1c6 100%);
}

body.secondary-screen-active .academy-stats-page {
  grid-template-rows: 42px minmax(0, 1.28fr) minmax(0, .78fr) minmax(0, 1.06fr) !important;
}

.academy-panel {
  position: relative;
  overflow: hidden;
  border-radius: 8px !important;
}
body[data-theme="dark"] .academy-panel {
  background:
    linear-gradient(180deg, rgba(20,31,49,.88) 0%, rgba(13,21,34,.93) 100%) !important;
  border: 1px solid rgba(206, 160, 82, .22) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.02) !important;
}
body[data-theme="light"] .academy-panel {
  background:
    linear-gradient(180deg, rgba(255,247,233,.96) 0%, rgba(246,234,210,.94) 100%) !important;
  border: 1px solid rgba(181,128,52,.28) !important;
  box-shadow: 0 12px 24px rgba(84,57,24,.08), inset 0 1px 0 rgba(255,255,255,.7) !important;
}
.academy-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(233, 200, 128, .08);
  pointer-events: none;
}
.academy-panel-head {
  display: grid;
  grid-template-columns: minmax(0,1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.academy-panel-divider {
  width: 64px;
  height: 10px;
  object-fit: contain;
  opacity: .84;
}
.iphone-stats-page .iphone-section-title {
  color: #e8c982;
  text-shadow: 0 1px 0 rgba(0,0,0,.2);
  letter-spacing: .14em;
}
body[data-theme="light"] .iphone-stats-page .iphone-section-title {
  color: #946123;
}

.iphone-stats-page .stats-summary-tile,
.iphone-stats-page .stats-goal-card {
  border-radius: 8px !important;
  position: relative;
}
body[data-theme="dark"] .iphone-stats-page .stats-summary-tile {
  background: linear-gradient(180deg, rgba(27,40,62,.76), rgba(19,29,46,.74)) !important;
  border: 1px solid rgba(211,165,84,.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
body[data-theme="light"] .iphone-stats-page .stats-summary-tile {
  background: linear-gradient(180deg, rgba(255,250,240,.98), rgba(247,236,214,.95)) !important;
  border: 1px solid rgba(190,138,55,.20);
}
.iphone-stats-page .stats-summary-tile::after,
.iphone-stats-page .stats-goal-card::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(232,194,117,.08);
  border-radius: 6px;
  pointer-events: none;
}

.stats-icon-frame {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  border: 1px solid rgba(224,174,75,.34);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.03);
}
body[data-theme="dark"] .stats-icon-frame {
  background: linear-gradient(180deg, rgba(49,71,103,.90), rgba(28,43,67,.96));
}
body[data-theme="light"] .stats-icon-frame {
  background: linear-gradient(180deg, rgba(66,102,145,.92), rgba(43,78,119,.96));
}
.stats-icon-frame.earned { background: linear-gradient(180deg, rgba(129,92,44,.95), rgba(95,63,26,.96)); }
.stats-icon-frame.lost,
.stats-icon-frame.warning { background: linear-gradient(180deg, rgba(101,57,52,.95), rgba(73,35,33,.96)); }
.stats-icon-frame.sessions { background: linear-gradient(180deg, rgba(48,84,119,.95), rgba(28,52,78,.96)); }
.stats-icon-frame.streak { background: linear-gradient(180deg, rgba(122,74,37,.95), rgba(88,49,26,.96)); }
.stats-icon-art {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.25));
}
.stats-icon-frame.warning .stats-icon-art,
.stats-icon-frame.lost .stats-icon-art { filter: brightness(0) invert(1) opacity(.82); }
.stats-icon-frame.earned .stats-icon-art { filter: saturate(1.1) brightness(1.05); }

.iphone-stats-page .stats-summary-tile span:not(.stats-icon-simple) {
  color: #cdb288 !important;
  font-size: .60rem !important;
  letter-spacing: .11em;
  text-transform: uppercase;
}
body[data-theme="light"] .iphone-stats-page .stats-summary-tile span:not(.stats-icon-simple) {
  color: #8c6a42 !important;
}
.iphone-stats-page .stats-summary-tile strong {
  color: #f3deaf !important;
  font-size: 1rem !important;
  text-shadow: 0 1px 0 rgba(0,0,0,.22);
}
body[data-theme="light"] .iphone-stats-page .stats-summary-tile strong {
  color: #76491b !important;
  text-shadow: none;
}

body[data-theme="dark"] .stats-goal-card {
  background:
    linear-gradient(180deg, rgba(28,43,66,.80), rgba(18,30,48,.82)) !important;
  border: 1px solid rgba(206,160,82,.20);
}
body[data-theme="light"] .stats-goal-card {
  background:
    linear-gradient(180deg, rgba(255,250,241,.98), rgba(248,238,220,.95)) !important;
  border: 1px solid rgba(190,138,55,.22);
}
.stats-goal-card.daily { box-shadow: inset 0 0 0 999px rgba(68, 118, 175, .05); }
.stats-goal-card.weekly { box-shadow: inset 0 0 0 999px rgba(203, 144, 49, .05); }
.stats-goal-card-head strong,
.stats-goal-big-value,
.stats-goal-big-value span,
.stats-goal-status {
  text-shadow: 0 1px 0 rgba(0,0,0,.12);
}
body[data-theme="light"] .stats-goal-card-head strong,
body[data-theme="light"] .stats-goal-big-value,
body[data-theme="light"] .stats-goal-big-value span,
body[data-theme="light"] .stats-goal-status { text-shadow: none; }
.stats-goal-card-head strong {
  color: #d9bb85;
}
body[data-theme="light"] .stats-goal-card-head strong { color: #936225; }
.stats-goal-card-head b,
.stats-bar-readout span,
.stats-foot-row,
.stats-y-ticks span,
.stats-y-title {
  color: #e6c576 !important;
}
body[data-theme="light"] .stats-goal-card-head b,
body[data-theme="light"] .stats-bar-readout span,
body[data-theme="light"] .stats-foot-row,
body[data-theme="light"] .stats-y-ticks span,
body[data-theme="light"] .stats-y-title { color: #9c631e !important; }
.stats-goal-big-value { color: #f1debb; }
body[data-theme="light"] .stats-goal-big-value { color: #6b441d; }
.stats-goal-big-value span,
.stats-goal-status,
.stats-bar-readout,
.stats-x-label,
.stats-y-axis {
  color: #bea67c !important;
}
body[data-theme="light"] .stats-goal-big-value span,
body[data-theme="light"] .stats-goal-status,
body[data-theme="light"] .stats-bar-readout,
body[data-theme="light"] .stats-x-label,
body[data-theme="light"] .stats-y-axis { color: #8b6b44 !important; }
.stats-goal-track {
  background: rgba(8,13,22,.36) !important;
  border: 1px solid rgba(212,166,85,.16);
}
body[data-theme="light"] .stats-goal-track {
  background: rgba(171,123,51,.08) !important;
}
.stats-goal-track .progress-fill {
  background: linear-gradient(90deg, #e8bf66, #d88f38) !important;
  box-shadow: 0 0 10px rgba(232,191,102,.18);
}

.academy-activity-panel {
  padding-top: 7px !important;
}
.academy-activity-head {
  margin-bottom: 1px;
}
body[data-theme="dark"] .academy-activity-panel {
  background:
    linear-gradient(180deg, rgba(19,31,49,.92), rgba(13,22,35,.95)) !important;
}
body[data-theme="light"] .academy-activity-panel {
  background:
    linear-gradient(180deg, rgba(255,249,238,.98), rgba(245,234,214,.96)) !important;
}
.stats-chart-shell {
  border: 1px solid rgba(209,162,83,.16);
  border-radius: 8px;
  padding: 6px 6px 4px;
  background: linear-gradient(180deg, rgba(7,12,20,.18), rgba(7,12,20,.08));
}
body[data-theme="light"] .stats-chart-shell {
  background: linear-gradient(180deg, rgba(188,145,79,.06), rgba(188,145,79,.02));
}
.stats-activity-compact .iphone-chart {
  background:
    linear-gradient(to bottom,
      rgba(212,166,85,.16) 0 1px,
      transparent 1px calc(50% - .5px),
      rgba(212,166,85,.12) calc(50% - .5px) calc(50% + .5px),
      transparent calc(50% + .5px) calc(100% - 18px),
      rgba(212,166,85,.16) calc(100% - 18px) calc(100% - 17px),
      transparent calc(100% - 17px)) !important;
}
.stats-bar-button .iphone-bar {
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #f0cd78, #8f5b27) !important;
  border: 1px solid rgba(241, 214, 149, .34);
  box-shadow: inset 0 0 10px rgba(255,255,255,.08), 0 2px 4px rgba(0,0,0,.14);
}
body[data-theme="light"] .stats-bar-button .iphone-bar {
  background: linear-gradient(180deg, #d7a85b, #875525) !important;
}
.stats-bar-button.selected .iphone-bar,
.stats-bar-button:focus-visible .iphone-bar {
  filter: brightness(1.06) drop-shadow(0 0 8px rgba(232,191,102,.36));
}
.stats-bar-readout {
  font-size: .66rem;
  letter-spacing: .08em;
}
.stats-bar-readout strong {
  color: #f0deba;
}
body[data-theme="light"] .stats-bar-readout strong { color: #71481d; }
.stats-foot-row {
  letter-spacing: .10em;
  border-top: 1px solid rgba(212,166,85,.10);
}
.compact-range {
  border-color: rgba(211,165,84,.22);
  border-radius: 8px;
  background: rgba(9,14,22,.24);
}
body[data-theme="light"] .compact-range { background: rgba(179,133,65,.08); }
.compact-range button.active {
  background: linear-gradient(180deg, rgba(236,191,96,.28), rgba(197,129,45,.18));
  color: #f1d28d;
}
body[data-theme="light"] .compact-range button.active {
  color: #75491c;
  background: linear-gradient(180deg, #f7e2b7, #e8c98e);
}

@media (max-width: 390px) {
  .academy-panel-divider { width: 54px; }
  .stats-icon-frame { width: 34px; height: 34px; }
  .stats-icon-art { width: 20px; height: 20px; }
}

/* ===== Quests / Rewards / Teams cohesion pass: larger type + Focus-page academy styling ===== */
body.secondary-screen-active .iphone-quests-page .iphone-page-body,
body.secondary-screen-active .iphone-rewards-page .iphone-page-body,
body.secondary-screen-active .iphone-teams-page .iphone-page-body {
  position: relative;
  overflow: hidden;
  border-radius: 8px !important;
}
body[data-theme="dark"] body.secondary-screen-active .iphone-quests-page .iphone-page-body,
body[data-theme="dark"] body.secondary-screen-active .iphone-rewards-page .iphone-page-body,
body[data-theme="dark"] body.secondary-screen-active .iphone-teams-page .iphone-page-body { background: none; }
body[data-theme="dark"] .iphone-quests-page .iphone-page-body,
body[data-theme="dark"] .iphone-rewards-page .iphone-page-body,
body[data-theme="dark"] .iphone-teams-page .iphone-page-body {
  background: linear-gradient(180deg, rgba(20,31,49,.88) 0%, rgba(13,21,34,.93) 100%) !important;
  border: 1px solid rgba(206,160,82,.22) !important;
  box-shadow: 0 14px 30px rgba(0,0,0,.18), inset 0 1px 0 rgba(255,255,255,.02) !important;
}
body[data-theme="light"] .iphone-quests-page .iphone-page-body,
body[data-theme="light"] .iphone-rewards-page .iphone-page-body,
body[data-theme="light"] .iphone-teams-page .iphone-page-body {
  background: linear-gradient(180deg, rgba(255,247,233,.96) 0%, rgba(246,234,210,.94) 100%) !important;
  border: 1px solid rgba(181,128,52,.28) !important;
  box-shadow: 0 12px 24px rgba(84,57,24,.08), inset 0 1px 0 rgba(255,255,255,.7) !important;
}
.iphone-quests-page .iphone-page-body::before,
.iphone-rewards-page .iphone-page-body::before,
.iphone-teams-page .iphone-page-body::before {
  content:"";
  position:absolute;
  inset:0;
  border:1px solid rgba(233,200,128,.08);
  pointer-events:none;
}

/* Shared upper controls */
body.secondary-screen-active .iphone-quests-page .iphone-tab-switch button,
body.secondary-screen-active .iphone-teams-page .team-tabs button {
  font-size: .66rem;
  letter-spacing: .10em;
  color: #ccb182;
}
body[data-theme="light"] body.secondary-screen-active .iphone-quests-page .iphone-tab-switch button,
body[data-theme="light"] body.secondary-screen-active .iphone-teams-page .team-tabs button { color: #845d2c; }
body.secondary-screen-active .quest-tab-summary,
body.secondary-screen-active .rewards-wallet,
body.secondary-screen-active .subtle-invite {
  color: #c4aa80;
  letter-spacing: .12em;
}
body[data-theme="light"] body.secondary-screen-active .quest-tab-summary,
body[data-theme="light"] body.secondary-screen-active .rewards-wallet,
body[data-theme="light"] body.secondary-screen-active .subtle-invite { color: #8a6a44; }
body.secondary-screen-active .quest-tab-summary {
  font-size: .56rem;
}
body.secondary-screen-active .rewards-wallet {
  font-size: .71rem;
}
body.secondary-screen-active .rewards-wallet strong {
  color: #e6c576;
  font-size: .96rem;
}
body[data-theme="light"] .rewards-wallet strong { color: #985f1d; }
body.secondary-screen-active .rewards-tabs button {
  font-size: .54rem;
  letter-spacing: .06em;
  color: #d7be90;
  border-radius: 7px;
}
body[data-theme="light"] .rewards-tabs button { color: #835b2a; }

/* Quest rows */
body.secondary-screen-active .iphone-quest-row,
body.secondary-screen-active .reward-shop-row,
body.secondary-screen-active .team-feature-card,
body.secondary-screen-active .team-member-row,
body.secondary-screen-active .team-leaderboard {
  border-color: rgba(210,163,82,.18) !important;
}
body[data-theme="dark"] .iphone-quest-row,
body[data-theme="dark"] .reward-shop-row,
body[data-theme="dark"] .team-feature-card,
body[data-theme="dark"] .team-member-row,
body[data-theme="dark"] .team-leaderboard {
  background: linear-gradient(180deg, rgba(27,40,62,.76), rgba(19,29,46,.74)) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
body[data-theme="light"] .iphone-quest-row,
body[data-theme="light"] .reward-shop-row,
body[data-theme="light"] .team-feature-card,
body[data-theme="light"] .team-member-row,
body[data-theme="light"] .team-leaderboard {
  background: linear-gradient(180deg, rgba(255,250,240,.98), rgba(247,236,214,.95)) !important;
}
body.secondary-screen-active .iphone-row-title {
  font-size: .75rem;
  line-height: 1.1;
  color: #f0ddba;
  letter-spacing: .02em;
}
body[data-theme="light"] .iphone-row-title { color: #72481f; }
body.secondary-screen-active .iphone-row-sub {
  font-size: .57rem;
  line-height: 1.12;
  color: #bea67c;
}
body[data-theme="light"] .iphone-row-sub { color: #8c6a44; }
body.secondary-screen-active .iphone-row-progress {
  font-size: .54rem;
  color: #c8b18a;
}
body[data-theme="light"] .iphone-row-progress { color: #876842; }
body.secondary-screen-active .coin-reward {
  font-size: .70rem;
  color: #e7c87f;
}
body[data-theme="light"] .coin-reward { color: #9a631f; }
body.secondary-screen-active .reward-claim {
  min-height: 26px;
  padding: 0 9px;
  font-size: .55rem;
  letter-spacing: .08em;
  color: #23180c;
  border-color: rgba(222,170,70,.42);
  background: linear-gradient(180deg, #e7b654, #bd7925);
}

/* Reward shop */
body.secondary-screen-active .reward-title {
  font-size: .76rem;
  line-height: 1.1;
  color: #f0ddba;
}
body[data-theme="light"] .reward-title { color: #71471e; }
body.secondary-screen-active .reward-sub {
  font-size: .57rem;
  line-height: 1.12;
  color: #bea67c;
}
body[data-theme="light"] .reward-sub { color: #8b6a44; }
body.secondary-screen-active .reward-price {
  min-width: 66px;
  min-height: 28px;
  padding: 0 6px;
  font-size: .54rem;
  letter-spacing: .05em;
  color: #f2d79a;
  border-color: rgba(215,169,89,.36);
  background: linear-gradient(180deg, rgba(39,61,93,.92), rgba(26,43,68,.96));
}
body[data-theme="light"] .reward-price {
  color: #734a1f;
  background: linear-gradient(180deg, #fff3d8, #f0ddb3);
  border-color: rgba(188,136,55,.30);
}
body.secondary-screen-active .rewards-tabs button.active,
body.secondary-screen-active .iphone-quests-page .iphone-tab-switch button.active,
body.secondary-screen-active .team-tabs button.active {
  background: linear-gradient(180deg, rgba(236,191,96,.28), rgba(197,129,45,.18));
  color: #f1d28d;
  border-color: rgba(211,165,84,.22);
}
body[data-theme="light"] .rewards-tabs button.active,
body[data-theme="light"] .iphone-quests-page .iphone-tab-switch button.active,
body[data-theme="light"] .team-tabs button.active {
  color: #75491c;
  background: linear-gradient(180deg, #f7e2b7, #e8c98e);
}

/* Teams */
body.secondary-screen-active .team-name {
  font-size: .88rem;
  color: #f0d08c;
  letter-spacing: .05em;
}
body[data-theme="light"] .team-name { color: #8f5b1f; }
body.secondary-screen-active .team-motto {
  font-size: .58rem;
  line-height: 1.18;
  color: #bea67c;
}
body[data-theme="light"] .team-motto { color: #8c6a44; }
body.secondary-screen-active .team-meta {
  font-size: .57rem;
  color: #e7d3ae;
}
body[data-theme="light"] .team-meta { color: #77502a; }
body.secondary-screen-active .member-copy strong {
  font-size: .70rem;
  color: #f1dfbd;
}
body[data-theme="light"] .member-copy strong { color: #6f451d; }
body.secondary-screen-active .member-copy span {
  font-size: .50rem;
  color: #bea67c;
}
body[data-theme="light"] .member-copy span { color: #8b6a44; }
body.secondary-screen-active .member-score,
body.secondary-screen-active .member-rank {
  font-size: .60rem;
  color: #e6c576;
}
body[data-theme="light"] .member-score,
body[data-theme="light"] .member-rank { color: #97611d; }
body.secondary-screen-active .invite-members-button {
  min-height: 35px;
  font-size: .64rem;
  letter-spacing: .10em;
  color: #f6dfa8;
  border-color: rgba(221,170,70,.55);
  background: linear-gradient(180deg, #365f91, #1e416d);
}
body[data-theme="light"] .invite-members-button {
  color: #fff2d2;
  background: linear-gradient(180deg, #4679af, #2b5c91);
}

@media (max-width: 390px) {
  body.secondary-screen-active .iphone-row-title { font-size: .71rem; }
  body.secondary-screen-active .iphone-row-sub { font-size: .54rem; }
  body.secondary-screen-active .reward-title { font-size: .72rem; }
  body.secondary-screen-active .team-name { font-size: .82rem; }
  body.secondary-screen-active .member-copy strong { font-size: .66rem; }
}


/* ===== Stats mockup redesign ===== */
.stats-mock-page { background: linear-gradient(180deg, rgba(7,12,20,.98), rgba(10,17,28,.98)) !important; }
body[data-theme="light"] .stats-mock-page { background: linear-gradient(180deg, #f2e8d7, #eadbc0) !important; }
body.secondary-screen-active .stats-mock-page {   overflow:hidden !important; }
.stats-mock-page > .secondary-page-header {    margin:0 4px !important; border:1px solid rgba(207,160,80,.26); border-radius:8px; overflow:hidden; background:linear-gradient(180deg,rgba(8,14,24,.26),rgba(8,14,24,.72)),url("../assets/stats_header_scene.webp") center 40%/cover no-repeat !important; box-shadow:inset 0 0 0 1px rgba(235,199,117,.08); }
body[data-theme="light"] .stats-mock-page > .secondary-page-header { background:linear-gradient(180deg,rgba(250,242,225,.22),rgba(250,242,225,.56)),url("../assets/stats_header_scene.webp") center 40%/cover no-repeat !important; }

.stats-mock-page > .secondary-page-header .secondary-page-title h2 {  letter-spacing:.09em; color:#efcb81 !important; text-shadow:0 1px 0 rgba(0,0,0,.4),0 0 10px rgba(239,203,129,.08); }
.stats-mock-page > .secondary-page-header .secondary-page-title span { height:1px; opacity:.8; background:linear-gradient(90deg,transparent,rgba(220,174,84,.9),transparent); }
.stats-mock-page > .iphone-surface { margin:0 4px !important; padding:8px !important; border-radius:8px !important; overflow:hidden; border:1px solid rgba(206,160,82,.22) !important; box-shadow:0 12px 24px rgba(0,0,0,.12),inset 0 1px 0 rgba(255,255,255,.02); }
body[data-theme="dark"] .stats-mock-page > .iphone-surface { background:linear-gradient(180deg,rgba(17,28,45,.95),rgba(10,19,31,.96)) !important; }
body[data-theme="light"] .stats-mock-page > .iphone-surface { background:linear-gradient(180deg,rgba(255,250,241,.98),rgba(247,236,214,.95)) !important; border-color:rgba(186,133,54,.24) !important; }
.stats-mock-page > .iphone-surface::before { content:""; position:absolute; inset:0; border:1px solid rgba(234,195,114,.07); pointer-events:none; }
.stats-mock-section-title { display:flex; justify-content:center; align-items:center; gap:9px;      margin-bottom:7px; text-align:center; }
.stats-mock-section-title::before,.stats-mock-section-title::after { content:"✦"; font-size:.58rem; color:#d7a95f; }
body[data-theme="light"] .stats-mock-section-title { color:#915d20; }
.stats-mock-summary-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:6px;  }
.stats-mock-summary-tile { display:flex; flex-direction:column;      text-align:center; border-radius:8px; border:1px solid rgba(208,162,82,.18); background:linear-gradient(180deg,rgba(24,37,58,.82),rgba(18,28,45,.82)); }
body[data-theme="light"] .stats-mock-summary-tile { background:linear-gradient(180deg,rgba(255,251,244,.98),rgba(248,239,219,.95)); }
.stats-mock-icon-medallion,.stats-mock-goal-icon,.stats-mock-detail-icon { display:grid; place-items:center; border-radius:999px; border:1px solid rgba(216,168,84,.42); box-shadow:inset 0 1px 0 rgba(255,255,255,.05),0 3px 8px rgba(0,0,0,.12); background:radial-gradient(circle at 30% 28%,#284a78,#11243d 68%); }
body[data-theme="light"] .stats-mock-icon-medallion,body[data-theme="light"] .stats-mock-goal-icon,body[data-theme="light"] .stats-mock-detail-icon { background:radial-gradient(circle at 30% 28%,#4e76a8,#2b4d77 68%); }
.stats-mock-icon-medallion { width:42px; height:42px; }
.stats-mock-icon-medallion img,.stats-mock-goal-icon img,.stats-mock-detail-icon img { width:22px; height:22px; object-fit:contain; filter:drop-shadow(0 1px 1px rgba(0,0,0,.25)); }
.stats-mock-value { color:#f0dcae; font-size:1.25rem; line-height:1; }
.stats-mock-caption { color:#d7b983;    }
body[data-theme="light"] .stats-mock-value { color:#764b1f; } body[data-theme="light"] .stats-mock-caption { color:#8a6740; }
.stats-mock-goals-panel { display:flex; flex-direction:column;  }
.stats-mock-goal-row { display:grid; grid-template-columns:42px minmax(0,1fr) 96px; align-items:center; gap:8px; padding:8px 10px; border-radius:8px; border:1px solid rgba(208,162,82,.18); background:linear-gradient(180deg,rgba(24,37,58,.74),rgba(18,29,47,.8)); }
body[data-theme="light"] .stats-mock-goal-row { background:linear-gradient(180deg,rgba(255,251,244,.98),rgba(248,239,219,.95)); }

.stats-mock-goal-name { color:#efcb81; font-size:.74rem; letter-spacing:.04em; }
.stats-mock-goal-sub { color:#d7b983; font-size:.55rem; margin-top:1px; }
body[data-theme="light"] .stats-mock-goal-name { color:#905c1f; } body[data-theme="light"] .stats-mock-goal-sub { color:#8b6841; }
.stats-mock-goal-track { width:100%;   border-radius:999px; overflow:hidden; background:rgba(9,14,23,.64); border:1px solid rgba(206,160,82,.16); }
.stats-mock-goal-fill { height:100%; border-radius:inherit; background:linear-gradient(90deg,#efc566,#cf842d); }
.stats-mock-goal-side { display:flex; flex-direction:column; align-items:flex-end; gap:2px; text-align:right; }
.stats-mock-goal-side strong { color:#f1d28a; font-size:1rem; line-height:1; }
.stats-mock-goal-side span { color:#eadab8; font-size:.58rem; }
body[data-theme="light"] .stats-mock-goal-side strong { color:#915b1e; } body[data-theme="light"] .stats-mock-goal-side span { color:#7b5934; }
.stats-mock-activity-panel { display:flex; flex-direction:column;  }
.stats-mock-activity-head { display:grid;    }
.stats-range-select-shell { position:relative; display:inline-flex; align-items:center; min-width:102px; height:30px; padding:0 8px; border-radius:8px; border:1px solid rgba(208,162,82,.28); background:linear-gradient(180deg,rgba(29,43,66,.95),rgba(18,29,47,.98)); }
.stats-range-select-shell::after { content:"▾"; position:absolute; right:9px; color:#e7c87f; font-size:.75rem; pointer-events:none; }
#statsRangeSelect { width:100%; height:100%; border:0;   font:inherit; font-size:.62rem; letter-spacing:.08em; outline:none; appearance:none; padding-right:14px; }
body[data-theme="light"] .stats-range-select-shell { background:linear-gradient(180deg,rgba(255,249,239,.98),rgba(246,236,217,.95)); } body[data-theme="light"] #statsRangeSelect,body[data-theme="light"] .stats-range-select-shell::after { color:#8f5c20; }
.stats-mock-chart-shell { display:grid;  align-items:end;    border-radius:8px; border:1px solid rgba(209,162,83,.16); background:linear-gradient(180deg,rgba(8,13,21,.28),rgba(8,13,21,.14)); }
.stats-mock-chart {  align-items:end; gap:5px;  }


.stats-mock-chart .stats-bar-button.selected .iphone-bar,.stats-mock-chart .stats-bar-button:focus-visible .iphone-bar { background:linear-gradient(180deg,#efc668,#d28a31) !important; filter:drop-shadow(0 0 8px rgba(232,191,102,.30)); }
.stats-mock-chart .stats-x-label { color:#e6c579; font-size:.54rem; letter-spacing:.06em; }
.stats-y-axis { justify-self:stretch;  display:flex; flex-direction:column; justify-content:space-between;  }
.stats-y-title { color:#e6c579; font-size:.49rem; letter-spacing:.08em; }
.stats-y-ticks {  display:flex;   }
.stats-y-ticks span { color:#d2b57d; font-size:.50rem; }
.stats-mock-detail-row { display:grid;      border:1px solid rgba(208,162,82,.18);  }


.stats-mock-detail-copy strong { display:block; color:#efcb81;  letter-spacing:.04em; }
.stats-mock-detail-copy span { display:block; color:#cfb58a;   }
.stats-mock-detail-value { text-align:right; }
.stats-mock-detail-value strong { display:block; color:#f0d08c;   }
.stats-mock-detail-value span { display:block; color:#d4b57a;   }
.stats-mock-lifetime-panel { display:grid;  align-items:center;  }
.stats-mock-lifetime-divider { width:1px;  background:linear-gradient(180deg,transparent,rgba(222,176,87,.42),transparent); justify-self:center; }
.stats-mock-lifetime-block { display:flex; align-items:center;  }
.stats-mock-lifetime-block.lost { justify-self:end; }
.stats-mock-coin { width:38px; height:38px; border-radius:999px; display:grid; place-items:center; font-size:1rem; color:#fff4d8; border:1px solid rgba(241,213,151,.45); box-shadow:inset 0 1px 0 rgba(255,255,255,.1),0 2px 6px rgba(0,0,0,.12); }
.stats-mock-coin.gold { background:radial-gradient(circle at 30% 28%,#f3ce75,#b87427 72%); }
.stats-mock-coin.copper { background:radial-gradient(circle at 30% 28%,#e0996b,#93432d 72%); }
.stats-mock-lifetime-copy span { display:block; color:#d6b67a;  letter-spacing:.08em; }
.stats-mock-lifetime-copy strong { display:block; color:#f0d08d;   }
.stats-mock-lifetime-block.lost .stats-mock-lifetime-copy strong { color:#f29d84; }
@media (max-width:390px) {
 
 .stats-mock-page > .secondary-page-header { height:84px !important; }
 .stats-mock-page > .secondary-page-header .secondary-page-title h2 { font-size:1.55rem !important; }
 .stats-mock-summary-tile { min-height:98px; padding:6px 4px; }
 .stats-mock-value { font-size:1.08rem; }
 
 .stats-mock-goal-row { grid-template-columns:38px minmax(0,1fr) 86px; padding:7px 8px; }
 
 .stats-mock-goal-name { font-size:.68rem; }
 .stats-mock-goal-side strong { font-size:.92rem; }
 .stats-mock-chart-shell { min-height:124px; }
 .stats-mock-chart { min-height:124px !important; }
 
 .stats-mock-detail-value strong { font-size:.94rem; }
 .stats-mock-lifetime-copy strong { font-size:.78rem; }
}

/* ===== ornate gold filigree border for stats page boxes ===== */
.stats-mock-summary-tile,
.stats-mock-goal-row,
.stats-mock-detail-row,
.stats-mock-lifetime-panel {
  position: relative;
  overflow: hidden;
}

.stats-mock-summary-tile::before,
.stats-mock-goal-row::before,
.stats-mock-detail-row::before,
.stats-mock-lifetime-panel::before {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(237, 198, 110, 0.34);
  border-radius: 6px;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 231, 184, 0.03);
}

.stats-mock-summary-tile::after,
.stats-mock-goal-row::after,
.stats-mock-detail-row::after,
.stats-mock-lifetime-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    /* top-left ornament */
    linear-gradient(90deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) top 10px left 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) top 10px left 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(242,208,132,.95) 0 1.3px, transparent 1.6px) top 8px left 8px / 6px 6px no-repeat,
    /* top-right ornament */
    linear-gradient(90deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) top 10px right 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) top 10px right 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(242,208,132,.95) 0 1.3px, transparent 1.6px) top 8px right 8px / 6px 6px no-repeat,
    /* bottom-left ornament */
    linear-gradient(90deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) bottom 10px left 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) bottom 10px left 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(242,208,132,.95) 0 1.3px, transparent 1.6px) bottom 8px left 8px / 6px 6px no-repeat,
    /* bottom-right ornament */
    linear-gradient(90deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) bottom 10px right 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(228,187,103,.75), rgba(228,187,103,.75)) bottom 10px right 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(242,208,132,.95) 0 1.3px, transparent 1.6px) bottom 8px right 8px / 6px 6px no-repeat;
}

body[data-theme="light"] .stats-mock-summary-tile::before,
body[data-theme="light"] .stats-mock-goal-row::before,
body[data-theme="light"] .stats-mock-detail-row::before,
body[data-theme="light"] .stats-mock-lifetime-panel::before {
  border-color: rgba(177, 122, 44, 0.34);
}

body[data-theme="light"] .stats-mock-summary-tile::after,
body[data-theme="light"] .stats-mock-goal-row::after,
body[data-theme="light"] .stats-mock-detail-row::after,
body[data-theme="light"] .stats-mock-lifetime-panel::after {
  background:
    linear-gradient(90deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) top 10px left 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) top 10px left 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(191,144,69,.9) 0 1.3px, transparent 1.6px) top 8px left 8px / 6px 6px no-repeat,
    linear-gradient(90deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) top 10px right 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) top 10px right 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(191,144,69,.9) 0 1.3px, transparent 1.6px) top 8px right 8px / 6px 6px no-repeat,
    linear-gradient(90deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) bottom 10px left 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) bottom 10px left 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(191,144,69,.9) 0 1.3px, transparent 1.6px) bottom 8px left 8px / 6px 6px no-repeat,
    linear-gradient(90deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) bottom 10px right 10px / 16px 1px no-repeat,
    linear-gradient(180deg, rgba(180,126,49,.72), rgba(180,126,49,.72)) bottom 10px right 10px / 1px 16px no-repeat,
    radial-gradient(circle, rgba(191,144,69,.9) 0 1.3px, transparent 1.6px) bottom 8px right 8px / 6px 6px no-repeat;
}

/* ===== Real illustrated filigree frame asset (9-slice) ===== */


/* Remove the previous CSS-drawn filigree approximation. */
.stats-mock-page > .iphone-surface::before,
.stats-mock-summary-tile::before,
.stats-mock-goal-row::before,
.stats-mock-detail-row::before,
.stats-mock-lifetime-panel::before {
  display: none !important;
}

.stats-mock-page > .iphone-surface::after,
.stats-mock-summary-tile::after,
.stats-mock-goal-row::after,
.stats-mock-detail-row::after,
.stats-mock-lifetime-panel::after {
  content: "" !important;
  position: absolute !important;
  z-index: 8;
  inset: -2px !important;
  box-sizing: border-box;
  pointer-events: none;
  
  border-style: solid !important;
  border-color: transparent !important;
  border-image-source: url("../assets/stats_filigree_frame.webp") !important;
  border-image-slice: 34 !important;
  border-image-repeat: stretch !important;
  opacity: .98;
}

/* Larger section frames: generous painted corners, like the mockup. */
.stats-mock-page > .iphone-surface::after,
.stats-mock-lifetime-panel::after {
  border-width: 20px !important;
  border-image-width: 20px !important;
}

/* Inner cards: slightly smaller frame while preserving the same artwork. */
.stats-mock-summary-tile::after,
.stats-mock-goal-row::after,
.stats-mock-detail-row::after {
  border-width: 15px !important;
  border-image-width: 15px !important;
}

body[data-theme="light"] .stats-mock-page > .iphone-surface::after,
body[data-theme="light"] .stats-mock-summary-tile::after,
body[data-theme="light"] .stats-mock-goal-row::after,
body[data-theme="light"] .stats-mock-detail-row::after,
body[data-theme="light"] .stats-mock-lifetime-panel::after {
  opacity: .84;
  filter: saturate(.88) sepia(.10) brightness(.94);
}

@media (max-width: 390px) {
  .stats-mock-page > .iphone-surface::after,
  .stats-mock-lifetime-panel::after {
    border-width: 17px !important;
    border-image-width: 17px !important;
  }
  .stats-mock-summary-tile::after,
  .stats-mock-goal-row::after,
  .stats-mock-detail-row::after {
    border-width: 13px !important;
    border-image-width: 13px !important;
  }
}

/* ===== Stats usability + unique icon pass ===== */


/* Use the illustrated icons directly — no blue medallion circles. */
.stats-mock-summary-icon {
  
  
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.22));
}

.stats-mock-summary-tile .stats-mock-value { margin-top: -1px; }

.stats-mock-icon-medallion,
.stats-mock-goal-icon,
.stats-mock-detail-icon {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}
.stats-mock-goal-icon {
  width: 42px !important;
  height: 42px !important;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.22));
}
.stats-mock-detail-icon {
  
  
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.2));
}
.stats-mock-lifetime-icon {
  
  
  
  object-fit: contain;
  filter: drop-shadow(0 3px 5px rgba(0,0,0,.22));
}

/* Goal progress: compact two-source pie/donut plus individual goal rows. */

.stats-mock-goals-panel > .stats-mock-section-title { margin-bottom: 3px !important; }
.stats-goal-pie-layout {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: 98px minmax(0,1fr);
  gap: 8px;
  align-items: stretch;
}
.stats-goal-pie-column {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.stats-goal-pie {
  --daily-pct: 0;
  --weekly-pct: 0;
  position: relative;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  background: conic-gradient(
    #efc566 0 calc(var(--daily-pct) * .5%),
    rgba(48,66,92,.48) calc(var(--daily-pct) * .5%) 50%,
    #5f9fe6 50% calc(50% + var(--weekly-pct) * .5%),
    rgba(48,66,92,.48) calc(50% + var(--weekly-pct) * .5%) 100%
  );
  border: 1px solid rgba(230,188,99,.42);
  box-shadow: inset 0 0 14px rgba(0,0,0,.20), 0 3px 10px rgba(0,0,0,.16);
}
.stats-goal-pie::before {
  content:"";
  position:absolute;
  inset:13px;
  border-radius:50%;
  background: linear-gradient(180deg,#12243b,#0c1828);
  border:1px solid rgba(221,173,84,.20);
}
body[data-theme="light"] .stats-goal-pie::before {
  background: linear-gradient(180deg,#fff8e9,#f2e3c7);
}
.stats-goal-pie-center {
  position:absolute;
  inset:13px;
  z-index:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  line-height:1;
}
.stats-goal-pie-center strong {
  color:#f1d18b;
  font-size:1.02rem;
  font-weight:400;
}
body[data-theme="light"] .stats-goal-pie-center strong { color:#8f5a1e; }
.stats-goal-pie-center span {
  margin-top:3px;
  color:#cdb287;
  font-size:.40rem;
  letter-spacing:.10em;
}
body[data-theme="light"] .stats-goal-pie-center span { color:#876640; }
.stats-goal-pie-legend {
  display:flex;
  gap:8px;
  color:#cbb185;
  font-size:.40rem;
  letter-spacing:.08em;
}
body[data-theme="light"] .stats-goal-pie-legend { color:#7f5f3a; }
.stats-goal-pie-legend span { display:flex; align-items:center; gap:3px; }
.stats-goal-pie-legend i { width:5px; height:5px; border-radius:50%; display:block; }
.stats-goal-pie-legend i.daily { background:#efc566; }
.stats-goal-pie-legend i.weekly { background:#5f9fe6; }
.stats-goal-list {
  min-width:0;
  display:grid;
  grid-template-rows:repeat(2,minmax(0,1fr));
  
}
.stats-goal-list .stats-mock-goal-row {
  
  
  min-height:0;
  
}

.stats-goal-list .stats-mock-goal-sub { font-size:.49rem; }

.stats-goal-list .stats-mock-goal-side span { font-size:.47rem; }

.stats-mock-goal-fill.weekly { background:linear-gradient(90deg,#7db7ec,#427ec5) !important; }

/* Fix chart bar heights: use the explicit pixel heights generated in JS. */


.stats-mock-chart .stats-bar-button {
  height: 100% !important;
  min-height: 0 !important;
}
.stats-mock-chart .stats-bar-button .iphone-bar {
  flex: 0 0 auto !important;
  
  
}

/* Dropdown options need their own explicit surfaces; browser option menus do not
   reliably inherit the closed select background. */
#statsRangeSelect {
  background:#13243a !important;
  color:#f0d18e !important;
  border-radius:6px;
}

body[data-theme="light"] #statsRangeSelect {
  background:#fff5df !important;
  color:#68431d !important;
}
body[data-theme="light"] #statsRangeSelect option {
  background:#fff5df !important;
  color:#54371d !important;
}

/* Keep the selected-period copy above the lower filigree edge. */
.stats-mock-detail-row {
  
  
  align-items:center !important;
}
.stats-mock-detail-copy,
.stats-mock-detail-value {
  position:relative;
  z-index:2;
  
}

.stats-mock-detail-copy span,
.stats-mock-detail-value span {
  line-height:1.05 !important;
}


.stats-mock-lifetime-copy { min-width:0; }

@media (max-width:390px) {
  
  .stats-mock-summary-icon { width:45px; height:45px; }
  .stats-goal-pie-layout { grid-template-columns:86px minmax(0,1fr); gap:5px; }
  .stats-goal-pie { width:72px; height:72px; }
  .stats-goal-pie::before,.stats-goal-pie-center { inset:11px; }
  .stats-goal-pie-center strong { font-size:.90rem; }
  .stats-goal-pie-legend { gap:5px; font-size:.36rem; }
  .stats-goal-list .stats-mock-goal-row { grid-template-columns:36px minmax(0,1fr) 68px !important; padding:4px 6px !important; }
  .stats-mock-goal-icon { width:35px !important; height:35px !important; }
  .stats-goal-list .stats-mock-goal-name { font-size:.60rem; }
  .stats-goal-list .stats-mock-goal-side strong { font-size:.80rem; }
  .stats-mock-chart-shell,.stats-mock-chart { height:124px !important; min-height:124px !important; }
  .stats-mock-detail-row { min-height:44px; padding:3px 8px 7px !important; }
  .stats-mock-detail-icon { width:34px !important; height:34px !important; }
  .stats-mock-lifetime-icon { width:36px; height:36px; flex-basis:36px; }
}
.stats-mock-goal-icon,
.stats-mock-detail-icon {
  display:block !important;
}

/* ===== Requested stats / HUD polish pass ===== */
/* Distinct ornate top HUD treatment, different from the stats box filigree frames. */
.top-rank-box {
  position: relative;
  isolation: isolate;
  
  
  
  
  
}
.top-rank-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("../assets/button_filigree_divider.webp");
  background-size: 100% 100%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: .22;
  pointer-events: none;
  z-index: 0;
}
.top-rank-box::after {
  content: "";
  position: absolute;
  inset: 10px 18px;
  border-top: 1px solid rgba(234, 193, 111, .18);
  border-bottom: 1px solid rgba(234, 193, 111, .12);
  pointer-events: none;
  z-index: 0;
}
.top-rank-box > * { position: relative; z-index: 1; }

/* Focus summary copy was clipping at the bottom; raise and tighten it. */


.stats-mock-summary-tile {
  
  
  gap: 3px !important;
}

.stats-mock-value { margin-top: 0 !important; }


/* Two separate daily / weekly donut charts. */

.stats-goal-donuts {
  display: grid;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  
  min-height: 0;
}
.stats-goal-donut-card {
  display: grid;
  
  
  align-items: center;
  min-height: 0;
}
.stats-goal-pie.single {
  --goal-pct: 0;
  position: relative;
  
  
  border-radius: 50%;
  border: 1px solid rgba(230,188,99,.40);
  box-shadow: inset 0 0 12px rgba(0,0,0,.22), 0 2px 6px rgba(0,0,0,.18);
}
.stats-goal-pie.single.daily {
  background: conic-gradient(#efc566 0 calc(var(--goal-pct) * 1%), rgba(48,66,92,.42) calc(var(--goal-pct) * 1%) 100%);
}
.stats-goal-pie.single.weekly {
  background: conic-gradient(#5f9fe6 0 calc(var(--goal-pct) * 1%), rgba(48,66,92,.42) calc(var(--goal-pct) * 1%) 100%);
}
.stats-goal-pie.single::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: linear-gradient(180deg, #112239, #0b1726);
  border: 1px solid rgba(221,173,84,.18);
}
body[data-theme="light"] .stats-goal-pie.single::before {
  background: linear-gradient(180deg, #fff8ea, #f1e2c6);
}
.stats-goal-pie.single .stats-goal-pie-center {
  inset: 10px;
}

.stats-goal-pie.single .stats-goal-pie-center span {
  
  margin-top: 2px;
}
.stats-goal-donut-copy {
  min-width: 0;
}
.stats-goal-donut-copy strong {
  display: block;
  color: #efcb81;
  
  letter-spacing: .08em;
  line-height: 1.05;
}
.stats-goal-donut-copy span {
  display: block;
  margin-top: 3px;
  color: #d6b983;
  
  line-height: 1.1;
}
body[data-theme="light"] .stats-goal-donut-copy strong { color: #8f5b1e; }
body[data-theme="light"] .stats-goal-donut-copy span { color: #846340; }

/* Move chart region upward and make the readout sit cleaner below it. */






.stats-mock-detail-copy strong,
.stats-mock-detail-value strong {
  line-height: 1.02 !important;
}

/* More imposing chart bars: darker, squarer, gold-capped feel. */
.stats-mock-chart .stats-bar-button {
  gap: 4px;
}
.stats-mock-chart .stats-bar-button .iphone-bar {
  width: 28px !important;
  max-width: 28px !important;
  border-radius: 2px 2px 0 0 !important;
  background: linear-gradient(180deg, #f0c666 0%, #bf7a24 18%, #6f3e12 58%, #1b2232 100%) !important;
  border: 1px solid rgba(241, 204, 118, .46) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.10), inset 0 -8px 14px rgba(0,0,0,.24), 0 2px 5px rgba(0,0,0,.18) !important;
}
.stats-mock-chart .stats-bar-button.selected .iphone-bar,
.stats-mock-chart .stats-bar-button:focus-visible .iphone-bar {
  background: linear-gradient(180deg, #ffd98b 0%, #dea548 24%, #8f5418 64%, #202738 100%) !important;
  filter: drop-shadow(0 0 8px rgba(232,191,102,.22));
}

/* Keep select/readout clear of the filigree and readable. */



@media (max-width: 390px) {
  
  .top-rank-box::after { inset: 9px 14px; }
  
  .stats-goal-pie-layout.two-donuts {  gap: 5px; }
  .stats-goal-donut-card {  gap: 5px; }
  
  
  .stats-goal-pie.single .stats-goal-pie-center strong { font-size: .78rem; }
  .stats-goal-donut-copy strong { font-size: .58rem; }
  .stats-goal-donut-copy span { font-size: .43rem; }
  
  .stats-mock-chart .stats-bar-button .iphone-bar { width: 24px !important; max-width: 24px !important; }
  
}

/* ===== Final stats/header/layout correction pass ===== */
/* Smaller Stats heading block so the chart and readout have room. */

.stats-mock-page > .secondary-page-header {
  
  
  
  background-position: center 34% !important;
}




/* More vertical space inside the activity section and keep items lifted upward. */
.stats-mock-activity-panel {
  display: grid !important;
  
  align-content: start !important;
  
  padding-top: 6px !important;
  padding-bottom: 8px !important;
}

.stats-mock-chart-shell {
  margin-top: -6px !important;
  margin-bottom: 4px !important;
  
  
  
}

.stats-mock-detail-row {
  margin-top: 0 !important;
  min-height: 56px !important;
  
  border-radius: 10px !important;
  background: linear-gradient(180deg, rgba(18, 30, 48, .94), rgba(11, 21, 35, .94)) !important;
}
body[data-theme="light"] .stats-mock-detail-row {
  background: linear-gradient(180deg, rgba(255, 251, 244, .99), rgba(246, 237, 214, .98)) !important;
}
/* Remove ornate filigree from the selected period / focus time readout. */
.stats-mock-detail-row::after,
body[data-theme="light"] .stats-mock-detail-row::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  border-image: none !important;
}
.stats-mock-detail-copy,
.stats-mock-detail-value {
  transform: none !important;
}
.stats-mock-detail-copy strong {
  
  line-height: 1.02 !important;
}
.stats-mock-detail-copy span,
.stats-mock-detail-value span {
  font-size: .51rem !important;
}
.stats-mock-detail-value strong {
  
  line-height: 1.02 !important;
}
.stats-range-select-shell { margin-top: -2px !important; }
#statsRangeSelect {
  position: relative;
  top: -2px;
}

/* New rectangular illustrated HUD frame asset with room for text. */
.top-rank-box {
  
  
  
  
  
  
  background-size: 100% 100% !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  
}
.hud-rank-block,
.hud-xp-block,
.hud-coins-block {
  align-self: center !important;
}
.hud-rank-block { gap: 10px !important; padding-right: 10px !important; }
.hud-rank-badge {
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
}
.hud-rank-name,
.hud-rank-level,
.hud-xp-copy,
.hud-coins-block,
.hud-coins-block strong {
  line-height: 1.1 !important;
}
.hud-rank-name { font-size: .76rem !important; }
.hud-rank-level { margin-top: 3px !important; font-size: .62rem !important; }
.hud-xp-block { padding: 0 10px 0 12px !important; }
.hud-xp-copy { margin-bottom: 6px !important; font-size: .66rem !important; }
.hud-coins-block { font-size: .84rem !important; padding-left: 10px !important; }
.hud-coin { width: 20px !important; height: 20px !important; font-size: .66rem !important; }

/* Rank sheet badge usage for the redesigned rank shields. */
.rank-scene-overlay {
  position: absolute;
}
.rank-scene-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  
  
  
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.32));
}


@media (max-width: 390px) {
  
  .stats-mock-page > .secondary-page-header {
    
    padding: 6px 8px 5px !important;
  }
  
  .stats-mock-chart-shell,
  .stats-mock-chart {
    
    height: 118px !important;
  }
  .stats-mock-detail-row {
    
    
    
    gap: 6px !important;
  }
  
  
  
  .top-rank-box {
    min-height: 70px !important;
    padding: 11px 16px !important;
    grid-template-columns: minmax(114px, 1.02fr) minmax(118px, 1.14fr) minmax(68px, .68fr) !important;
  }
  .hud-rank-badge { width: 34px !important; height: 34px !important; flex-basis: 34px !important; }
  .hud-rank-name { font-size: .7rem !important; }
  .hud-xp-copy { font-size: .62rem !important; }
  .hud-coins-block { font-size: .78rem !important; }
  .rank-scene-badge { width: 38px; height: 38px; top: 9px; left: 9px; }
  .rank-number { margin-left: 44px; }
}

/* ===== Stats vertical-space rebalance: centered title, larger summary/activity ===== */


/* Center STATS precisely inside the reduced hero/header. */
.stats-mock-page > .secondary-page-header {
  height: 58px !important;
  min-height: 58px !important;
  padding: 0 10px !important;
  display: grid !important;
  place-items: center !important;
}
.stats-mock-page > .secondary-page-header .secondary-page-title {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(34px, 1fr) auto minmax(34px, 1fr) !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 9px !important;
  transform: none !important;
}
.stats-mock-page > .secondary-page-header .secondary-page-title h2 {
  margin: 0 !important;
  align-self: center !important;
  justify-self: center !important;
  font-size: 1.22rem !important;
  line-height: 1 !important;
  text-align: center !important;
}
.stats-mock-page > .secondary-page-header .secondary-page-title span {
  width: 100% !important;
  max-width: none !important;
}

/* Give Focus Summary more vertical breathing room. */
.stats-mock-summary-panel {
  padding: 8px 8px 10px !important;
}
.stats-mock-summary-panel > .stats-mock-section-title {
  margin: 0 0 7px !important;
}
.stats-mock-summary-grid {
  
  min-height: 0 !important;
  
}
.stats-mock-summary-tile {
  height: 100% !important;
  
  
  
}


.stats-mock-caption {
  
  
  transform: none !important;
  padding-bottom: 1px !important;
}

/* Compress Goal Progress without making the information cramped. */
.stats-mock-goals-panel {
  padding: 5px 8px 6px !important;
  gap: 1px !important;
}
.stats-mock-goals-panel > .stats-mock-section-title {
  margin: 0 0 2px !important;
  font-size: .70rem !important;
}
.stats-goal-pie-layout.two-donuts {
  grid-template-columns: 98px minmax(0, 1fr) !important;
  gap: 5px !important;
  min-height: 0 !important;
}
.stats-goal-donuts {
  gap: 3px !important;
}
.stats-goal-donut-card {
  grid-template-columns: 48px minmax(0, 1fr) !important;
  gap: 4px !important;
}
.stats-goal-pie.single {
  width: 48px !important;
  height: 48px !important;
}
.stats-goal-pie.single::before,
.stats-goal-pie.single .stats-goal-pie-center {
  inset: 8px !important;
}
.stats-goal-pie.single .stats-goal-pie-center strong {
  font-size: .72rem !important;
}
.stats-goal-pie.single .stats-goal-pie-center span {
  font-size: .29rem !important;
}
.stats-goal-donut-copy strong {
  font-size: .54rem !important;
}
.stats-goal-donut-copy span {
  font-size: .40rem !important;
}
.stats-goal-list {
  gap: 3px !important;
}

.stats-goal-list .stats-mock-goal-icon {
  width: 31px !important;
  height: 31px !important;
}
.stats-goal-list .stats-mock-goal-name {
  font-size: .57rem !important;
}
.stats-goal-list .stats-mock-goal-sub,
.stats-goal-list .stats-mock-goal-side span {
  font-size: .41rem !important;
}
.stats-goal-list .stats-mock-goal-side strong {
  font-size: .74rem !important;
}
.stats-goal-list .stats-mock-goal-track {
  height: 5px !important;
  
}

/* Reclaimed space goes to Study Activity and especially its readout. */
.stats-mock-activity-panel {
  
  
  padding: 6px 8px 8px !important;
}


.stats-mock-chart-shell {
  
  
  
  
  padding: 4px 8px 0 4px !important;
}
.stats-mock-chart {
  
  
  padding-top: 3px !important;
}
.stats-mock-detail-row {
  align-self: end !important;
  height: 62px !important;
  min-height: 62px !important;
  padding: 8px 12px !important;
  margin: 0 !important;
  grid-template-columns: 42px minmax(0, 1fr) auto !important;
  gap: 9px !important;
  overflow: visible !important;
}
.stats-mock-detail-icon {
  width: 38px !important;
  height: 38px !important;
}
.stats-mock-detail-copy strong {
  font-size: .78rem !important;
}
.stats-mock-detail-copy span {
  margin-top: 3px !important;
  font-size: .53rem !important;
}
.stats-mock-detail-value strong {
  font-size: 1.02rem !important;
}
.stats-mock-detail-value span {
  margin-top: 3px !important;
  font-size: .52rem !important;
}

/* Lifetime economy becomes a compact footer strip. */
.stats-mock-lifetime-panel {
  min-height: 0 !important;
  padding: 3px 10px !important;
  grid-template-columns: 1fr 1px 1fr !important;
}
.stats-mock-lifetime-block {
  gap: 5px !important;
  min-width: 0 !important;
}
.stats-mock-lifetime-icon {
  width: 30px !important;
  height: 30px !important;
  flex: 0 0 30px !important;
}
.stats-mock-lifetime-copy span {
  font-size: .40rem !important;
  line-height: 1 !important;
}
.stats-mock-lifetime-copy strong {
  margin-top: 2px !important;
  font-size: .68rem !important;
  line-height: 1.02 !important;
}
.stats-mock-lifetime-divider {
  height: 58% !important;
}

@media (max-width: 390px) {
  
  .stats-mock-page > .secondary-page-header {
    height: 54px !important;
    min-height: 54px !important;
  }
  .stats-mock-page > .secondary-page-header .secondary-page-title h2 {
    font-size: 1.12rem !important;
  }
  
  
  .stats-mock-caption {
    font-size: .44rem !important;
  }
  .stats-goal-pie-layout.two-donuts {
    grid-template-columns: 88px minmax(0, 1fr) !important;
  }
  .stats-goal-donut-card {
    grid-template-columns: 43px minmax(0, 1fr) !important;
  }
  .stats-goal-pie.single {
    width: 43px !important;
    height: 43px !important;
  }
  .stats-goal-pie.single::before,
  .stats-goal-pie.single .stats-goal-pie-center {
    inset: 7px !important;
  }
  
  .stats-goal-list .stats-mock-goal-icon {
    width: 28px !important;
    height: 28px !important;
  }
  .stats-mock-activity-panel {
    
    padding: 5px 7px 7px !important;
  }
  
  .stats-mock-detail-row {
    height: 58px !important;
    min-height: 58px !important;
    grid-template-columns: 36px minmax(0, 1fr) auto !important;
    padding: 7px 9px !important;
  }
  .stats-mock-detail-icon {
    width: 33px !important;
    height: 33px !important;
  }
  .stats-mock-detail-copy strong { font-size: .70rem !important; }
  .stats-mock-detail-copy span { font-size: .47rem !important; }
  .stats-mock-detail-value strong { font-size: .91rem !important; }
  .stats-mock-detail-value span { font-size: .46rem !important; }
  .stats-mock-lifetime-icon {
    width: 26px !important;
    height: 26px !important;
    flex-basis: 26px !important;
  }
  .stats-mock-lifetime-copy span { font-size: .36rem !important; }
  .stats-mock-lifetime-copy strong { font-size: .59rem !important; }
}


/* ===== 2026-09-01 stats label + goal-track polish ===== */
.stats-mock-summary-tile .stats-mock-caption {
  width: 100% !important;
  max-width: 100% !important;
  
  display: flex;
  
  
  text-align: center;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  overflow-wrap: normal;
  word-break: normal;
  letter-spacing: .065em !important;
  
  font-size: .45rem !important;
}
.stats-goal-list .stats-mock-goal-row {
  
  align-content: center;
}
.stats-goal-list .stats-mock-goal-icon {
  grid-row: 1 / 3;
}
.stats-goal-list .stats-mock-goal-main,
.stats-goal-list .stats-mock-goal-side {
  align-self: center;
}
.stats-goal-list .stats-mock-goal-track {
  grid-column: 2 / 4;
  grid-row: 2;
  width: 100% !important;
  margin-top: 0 !important;
}
@media (max-width: 390px) {
  .stats-mock-summary-tile .stats-mock-caption {
    
    letter-spacing: .045em !important;
  }
}


/* ===== 2026-09-05 Stats refinement: flatter extended row, fixed chart baseline, unclipped weekly goal ===== */
.stats-mock-section-head > span {
  display: none !important;
}

.stats-goal-list,
.stats-goal-list .stats-mock-goal-row,
.stats-mock-goals-panel {
  overflow: visible !important;
}

.stats-goal-list .stats-mock-goal-row {
  grid-template-columns: 34px minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  gap: 7px !important;
  padding: 6px 8px 7px !important;
}

.stats-goal-ring {
  
  
  min-width: 32px !important;
  min-height: 32px !important;
}

.stats-goal-ring span {
  font-size: .54rem !important;
  line-height: 1 !important;
}

.stats-mock-goal-content {
  
  display: flex;
  flex-direction: column;
  
}

.stats-mock-goal-top {
  display: flex;
  
  
  
  min-width: 0;
}



.stats-mock-goal-top strong {
  display: block;
  
  
  
  line-height: 1.05;
}

.stats-mock-goal-top small {
  display: block;
  margin-top: 2px;
  
  
  line-height: 1.15;
}

.stats-mock-goal-top > span {
  flex: 0 0 auto;
  align-self: center;
  
  
  line-height: 1;
  
}

.stats-mock-goal-track {
  margin-top: 0 !important;
  height: 7px !important;
}



.stats-mock-chart-shell {
  position: relative;
  overflow: visible;
}

.stats-mock-chart {
  position: relative;
  border-bottom: 0 !important;
  background:
    linear-gradient(to bottom,
      rgba(212,166,85,.14) 0 1px,
      transparent 1px calc(50% - .5px),
      rgba(212,166,85,.10) calc(50% - .5px) calc(50% + .5px),
      transparent calc(50% + .5px)) !important;
}

.stats-mock-chart::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 17px;
  height: 1.5px;
  background: rgba(214, 173, 92, .56);
  box-shadow: 0 0 0 1px rgba(10, 16, 27, .18);
  pointer-events: none;
}

.stats-mock-chart .stats-bar-button {
  justify-content: flex-end !important;
}



.stats-mock-chart .stats-x-label {
  min-height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stats-extended-entry-panel {
  
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.stats-extended-entry-panel::before,
.stats-extended-entry-panel::after {
  display: none !important;
}

.stats-extended-entry-panel .stats-extended-button {
  
  
  
  border: 0 !important;
  border-top: 1px solid rgba(214, 173, 92, .16) !important;
  
  background: transparent !important;
  box-shadow: none !important;
  
  
}

.stats-extended-entry-panel .stats-extended-button-icon {
  
  
  border: 0 !important;
  
  background: transparent !important;
}



.stats-extended-entry-panel .stats-extended-button-copy strong {
  
  letter-spacing: .08em !important;
}



@media (max-width: 390px) {
  .stats-goal-list .stats-mock-goal-row {
    grid-template-columns: 31px minmax(0, 1fr) !important;
    padding: 5px 6px 6px !important;
  }

  .stats-goal-ring {
    
    
    min-width: 29px !important;
    min-height: 29px !important;
  }

  

  

  

  
}

/* ===== v83: stats title-card size alignment ===== */



@media (max-width: 390px) {
  body.secondary-screen-active .stats-mock-page > .secondary-page-header {
    flex-basis: 50px !important;
    
    
  }
  
  
}
