/* Treasure-style results dashboard */
.progress-dashboard-page {
  --treasure-bg: #031f19;
  --treasure-panel: #06362b;
  --treasure-panel-2: #0a4938;
  --treasure-line: rgba(201, 173, 54, .38);
  --treasure-gold: #ffd44c;
  --treasure-lime: #a9e85a;
  --treasure-text: #fff9dc;
  --treasure-muted: #b7cdbd;
  --content: 1580px;
  color: var(--treasure-text);
  background: #021a15;
}
.progress-dashboard-page::before {
  background-image: radial-gradient(circle at 12% 4%, rgba(71, 196, 90, .14), transparent 25%), radial-gradient(circle at 88% 16%, rgba(240, 188, 38, .09), transparent 24%), radial-gradient(circle at 1px 1px, rgba(255, 217, 73, .08) 1px, transparent 0);
  background-size: auto, auto, 28px 28px;
  opacity: 1;
}
.progress-dashboard-page .site-header {
  border-color: rgba(199, 170, 49, .22);
  background: rgba(2, 31, 25, .94);
  color: #fffbed;
}
.progress-dashboard-page .site-header .brand-text span:first-child { color: #fff !important; }
.progress-dashboard-page .site-header .brand-text span:last-child { color: #ffd046 !important; }
.progress-dashboard-page .site-header .button-soft,
.progress-dashboard-page .site-header .theme-toggle,
.progress-dashboard-page .site-header .profile-dropdown-trigger { border-color: rgba(225, 193, 56, .3); background: rgba(14, 73, 56, .65); color: #fff9dc; }
.progress-dashboard-page .site-nav a,
.progress-dashboard-page .desktop-more-menu summary { color: #f7f7e9; }
.progress-dashboard-page .page-shell { padding: 1px 0 96px; background: linear-gradient(180deg, #062d25 0, #031e19 520px, #021812 100%); }
.treasure-dashboard { width: min(var(--content), calc(100% - 32px)); margin: 24px auto 0; color: var(--treasure-text); }
.treasure-dashboard h1,.treasure-dashboard h2,.treasure-dashboard p { margin: 0; }
.treasure-dashboard h1 { font-size: clamp(1.75rem, 2.5vw, 2.65rem); line-height: 1; }
.treasure-dashboard h2 { font-size: clamp(1.16rem, 1.45vw, 1.45rem); line-height: 1.15; }
.treasure-kicker { margin-bottom: 5px !important; color: var(--treasure-lime); font-size: .72rem; font-weight: 1000; letter-spacing: .11em; text-transform: uppercase; }
.treasure-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; padding: 0 6px; }
.treasure-profile { display: flex; align-items: center; gap: 10px; padding: 7px 9px 7px 7px; border: 1px solid var(--treasure-line); border-radius: 999px; background: rgba(1, 31, 25, .68); box-shadow: inset 0 1px rgba(255,255,255,.07); }
.treasure-profile-avatar,.leader-avatar { display: grid; place-items: center; overflow: hidden; background: var(--avatar-bg, #d8f4b7); color: #0a513a; font-weight: 1000; }
.treasure-profile-avatar { width: 42px; height: 42px; border: 2px solid #e8bf39; border-radius: 50%; }
.treasure-profile-avatar img,.leader-avatar img { width: 100%; height: 100%; object-fit: cover; }
.treasure-profile > span:nth-child(2) { display: grid; line-height: 1.15; min-width: 86px; }
.treasure-profile small { color: var(--treasure-muted); font-size: .66rem; }
.treasure-profile a { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--treasure-gold); text-decoration: none; }
.treasure-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid var(--treasure-line); border-radius: 22px; background: linear-gradient(145deg, rgba(8,65,50,.97), rgba(2,43,34,.98)); box-shadow: inset 0 1px rgba(255,255,255,.055), 0 22px 44px rgba(0,0,0,.17); }
.treasure-card::after { position: absolute; inset: 0; z-index: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(circle at 84% 8%, rgba(142,232,80,.1), transparent 27%), linear-gradient(115deg, rgba(255,255,255,.025), transparent 32%); content: ""; }
.treasure-card > * { position: relative; z-index: 1; }
.treasure-top-grid { display: grid; grid-template-columns: minmax(285px,.82fr) minmax(430px,1.22fr) minmax(410px,1.18fr); gap: 13px; }
.rank-spotlight { min-height: 470px; padding: 22px 22px 18px; text-align: center; background: radial-gradient(circle at 50% 42%, rgba(65,166,62,.34), transparent 34%), linear-gradient(165deg,#084735,#032b22); }
.rank-ribbon { display: inline-flex; padding: 8px 20px; border: 1px solid rgba(255,213,75,.4); border-radius: 999px; background: linear-gradient(#7a4a15,#3c250e); color: #fff0b4; box-shadow: 0 6px 16px rgba(0,0,0,.22); font-size: .78rem; }
.rank-art { position: relative; height: 282px; margin: -6px auto -8px; }
.rank-art img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 20px 16px rgba(0,0,0,.28)); }
.rank-seal { position: absolute; left: 50%; top: 50%; display: flex; align-items: baseline; justify-content: center; min-width: 94px; transform: translate(-50%,-42%); color: #ffe270; text-shadow: 0 2px 0 #4c3000,0 0 14px rgba(255,206,44,.5); }
.rank-seal small { font-size: 1.4rem; }.rank-seal strong { font-size: 3.4rem; line-height: 1; }
.rank-spotlight h2 { color: var(--treasure-gold); font-size: 1.55rem; }
.rank-spotlight > p:not(.rank-ribbon) { max-width: 285px; margin: 6px auto 10px; color: #d9e6d7; font-size: .84rem; line-height: 1.35; }
.top-ten-pill { display: inline-flex; padding: 6px 13px; border: 1px solid rgba(255,211,72,.5); border-radius: 999px; color: #ffe879; font-size: .76rem; }
.leaf-glow { position: absolute; width: 115px; height: 210px; z-index: 0; opacity: .16; background: repeating-radial-gradient(ellipse at center,#7fea5f 0 7px,transparent 8px 18px); filter: blur(1px); }.leaf-glow-one { left: -40px; top: 80px; transform: rotate(-22deg); }.leaf-glow-two { right: -45px; top: 90px; transform: rotate(22deg); }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.heading-coin { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #d9ae2d; border-radius: 50%; background: linear-gradient(145deg,#ffdf61,#b56c0a); color: #6f3d00; box-shadow: inset 0 0 0 4px rgba(255,236,131,.24); }
.leaderboard-card,.treasury-card { min-height: 470px; padding: 20px; }
.ranking-tabs { display: flex; gap: 6px; max-width: 100%; margin: 15px 0 13px; overflow-x: auto; padding: 3px; border: 1px solid rgba(171,204,91,.2); border-radius: 12px; background: rgba(0,24,20,.4); scrollbar-width: thin; }
.ranking-tabs a { display: flex; align-items: center; gap: 6px; flex: 1 0 auto; justify-content: center; min-width: 74px; padding: 7px 9px; border-radius: 9px; color: #c5d6c8; font-size: .73rem; text-decoration: none; }
.ranking-tabs a small { display: grid; place-items: center; min-width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.08); font-size: .58rem; }
.ranking-tabs a.active { background: linear-gradient(135deg,#3c7d23,#125a33); color: #fff48d; box-shadow: inset 0 0 0 1px rgba(205,239,86,.62),0 0 16px rgba(120,226,70,.12); }
.leader-list { display: grid; gap: 7px; }
.leader-row { display: grid; grid-template-columns: 32px 39px minmax(0,1fr) auto; gap: 9px; align-items: center; min-height: 57px; padding: 7px 10px; border: 1px solid rgba(143,184,133,.17); border-radius: 13px; background: rgba(1,35,28,.48); }
.leader-row.current { border-color: rgba(123,226,71,.46); background: linear-gradient(90deg,rgba(34,108,54,.72),rgba(4,58,45,.68)); }
.leader-place { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 50%; background: #124b3b; color: #dce8df; font-size: .82rem; font-weight: 1000; }.place-1 { background: linear-gradient(145deg,#ffe97c,#c9820c); color: #633800; }.place-2 { background: linear-gradient(145deg,#ecf0ef,#7c9893); color: #28433e; }.place-3 { background: linear-gradient(145deg,#efae58,#8c4714); color: #fff4cf; }
.leader-avatar { width: 39px; height: 39px; border: 2px solid rgba(255,210,57,.38); border-radius: 50%; }
.leader-info { display: grid; gap: 6px; min-width: 0; }.leader-info strong { overflow: hidden; color: #fffcea; font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.leader-progress { height: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }.leader-progress i { display: block; width: 50%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#79db45,#c9f57a); box-shadow: 0 0 8px #82df4d; }.leader-row:nth-child(1) .leader-progress i { width: 94%; }.leader-row:nth-child(2) .leader-progress i { width: 81%; }.leader-row:nth-child(3) .leader-progress i { width: 68%; }.leader-row:nth-child(4) .leader-progress i { width: 55%; }.leader-row:nth-child(5) .leader-progress i { width: 43%; }
.leader-row > b { display: flex; gap: 5px; align-items: center; color: var(--treasure-gold); font-size: .79rem; white-space: nowrap; }.leader-row > b span { color: #ffbd20; font-size: .62rem; }
.ranking-caption { margin-top: 10px !important; color: var(--treasure-muted); font-size: .69rem; text-align: center; }
.treasure-inline-empty { display: grid; place-items: center; min-height: 180px; color: var(--treasure-muted); text-align: center; }.treasure-inline-empty strong { color: #fff; }.treasure-inline-empty a { color: var(--treasure-gold); }
.treasury-layout { display: grid; grid-template-columns: minmax(190px,.86fr) minmax(185px,1.14fr); gap: 12px; height: calc(100% - 51px); margin-top: 15px; }
.treasury-stats { display: grid; gap: 8px; }
.treasury-stat { display: flex; align-items: center; gap: 6px; min-height: 104px; padding: 7px 8px; border: 1px solid rgba(196,174,55,.36); border-radius: 15px; background: linear-gradient(135deg,rgba(16,82,56,.78),rgba(1,45,36,.72)); color: inherit; text-decoration: none; }
.treasury-stat img { flex: 0 0 76px; width: 76px; height: 78px; object-fit: contain; filter: drop-shadow(0 10px 8px rgba(0,0,0,.22)); }
.treasury-stat > span { display: grid; line-height: 1.05; }.treasury-stat small { color: #e5d67c; font-size: .66rem; }.treasury-stat strong { margin: 3px 0; color: #fffde7; font-size: 1.55rem; }.treasury-stat em { color: var(--treasure-lime); font-size: .64rem; font-style: normal; }
.vault-art { position: relative; display: flex; align-items: flex-end; justify-content: center; min-height: 330px; overflow: hidden; border-radius: 17px; background: radial-gradient(circle at 50% 46%,rgba(83,168,53,.3),transparent 36%),linear-gradient(180deg,rgba(2,48,38,.32),rgba(0,27,21,.6)); }
.vault-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 16px rgba(0,0,0,.35)); }.vault-art > div { display: grid; z-index: 2; margin-bottom: 12px; padding: 6px 14px; border: 1px solid rgba(255,215,72,.45); border-radius: 999px; background: rgba(2,31,24,.72); text-align: center; backdrop-filter: blur(5px); }.vault-art strong { color: var(--treasure-gold); font-size: 1.1rem; }.vault-art small { color: #c8d6c6; font-size: .56rem; }
.journey-card,.awards-card,.stories-card { margin-top: 13px; padding: 20px 24px; }
.journey-heading { margin-bottom: 10px; }.journey-total,.awards-count { padding: 7px 12px; border: 1px solid rgba(206,180,54,.35); border-radius: 999px; color: #d7dfca; font-size: .7rem; }.journey-total b { color: var(--treasure-gold); font-size: 1rem; }
.journey-track { position: relative; display: grid; grid-template-columns: repeat(6,minmax(135px,1fr)); gap: 10px; padding-top: 5px; overflow-x: auto; scrollbar-width: thin; }
.journey-line { position: absolute; left: 7%; right: 7%; top: 76px; height: 5px; border-radius: 99px; background: linear-gradient(90deg,#b7e957 0 20%,#6fd94d 35%,#204d41 72%); box-shadow: 0 0 12px rgba(134,235,70,.3); }
.journey-step { position: relative; z-index: 1; display: grid; justify-items: center; min-width: 135px; color: #c0cec2; text-align: center; }.journey-step > div { position: relative; width: 126px; height: 116px; opacity: .52; filter: saturate(.45); }.journey-step.complete > div { opacity: 1; filter: none; }.journey-step img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 12px 8px rgba(0,0,0,.3)); }.journey-step i { position: absolute; right: 7px; bottom: 12px; display: grid; place-items: center; width: 24px; height: 24px; border: 2px solid #b5f16b; border-radius: 50%; background: #124d2f; color: #caff80; font-size: .75rem; font-style: normal; }.journey-step strong { margin-top: 2px; color: #f8f4df; font-size: .76rem; }.journey-step small { color: #9db2a2; font-size: .65rem; }.journey-step.complete small { color: #bcde72; }
.award-grid { display: grid; grid-template-columns: repeat(7,minmax(122px,1fr)); gap: 10px; margin-top: 14px; overflow-x: auto; scrollbar-width: thin; }
.award-item { display: grid; justify-items: center; min-height: 177px; min-width: 122px; padding: 8px 7px 11px; border: 1px solid rgba(206,178,53,.34); border-radius: 15px; background: rgba(1,40,31,.55); text-align: center; }.award-item img { width: 108px; height: 108px; object-fit: contain; filter: drop-shadow(0 10px 7px rgba(0,0,0,.3)); }.award-item strong { color: #fff7d5; font-size: .72rem; line-height: 1.1; }.award-item small { margin-top: 3px; color: #abd760; font-size: .6rem; }.award-item.preview { border-style: dashed; }.award-item.preview img { opacity: .86; }
.stories-card .text-link { color: var(--treasure-gold); font-size: .78rem; text-decoration: none; }.story-treasure-grid { display: grid; grid-template-columns: repeat(5,minmax(180px,1fr)); gap: 9px; margin-top: 14px; overflow-x: auto; }.story-treasure-item { display: flex; align-items: center; gap: 9px; min-width: 180px; padding: 9px; border: 1px solid rgba(155,205,110,.22); border-radius: 13px; background: rgba(1,39,31,.55); color: inherit; text-decoration: none; }.story-treasure-item > img,.story-treasure-item > span:first-child { display: grid; place-items: center; flex: 0 0 54px; width: 54px; height: 54px; border-radius: 10px; object-fit: cover; background: rgba(255,211,55,.13); }.story-treasure-item > span:last-child { display: grid; min-width: 0; }.story-treasure-item small { color: var(--treasure-lime); font-size: .56rem; text-transform: uppercase; }.story-treasure-item strong { overflow: hidden; font-size: .72rem; text-overflow: ellipsis; white-space: nowrap; }.story-treasure-item em { color: var(--treasure-muted); font-size: .59rem; font-style: normal; }
.treasure-bottom-grid { display: grid; grid-template-columns: minmax(420px,.9fr) minmax(540px,1.1fr); gap: 13px; margin-top: 13px; }.friends-card,.future-card { min-height: 210px; padding: 22px; }.friends-card { display: grid; grid-template-columns: 165px minmax(0,1fr); align-items: center; }.friends-card > img { width: 175px; height: 165px; object-fit: contain; margin-left: -18px; filter: drop-shadow(0 16px 12px rgba(0,0,0,.3)); }.friends-card p:not(.treasure-kicker),.future-card p:not(.treasure-kicker) { color: var(--treasure-muted); font-size: .72rem; }.friends-card form { display: flex; gap: 7px; margin-top: 11px; }.friends-card input { min-width: 0; flex: 1; height: 39px; padding: 0 11px; border: 1px solid rgba(159,205,110,.35); border-radius: 10px; outline: none; background: rgba(0,30,25,.55); color: #fff; }.friends-card button { padding: 0 15px; border: 0; border-radius: 10px; background: linear-gradient(135deg,#95df4a,#318735); color: #082d1f; font-weight: 1000; cursor: pointer; }.friend-links { display: flex; justify-content: space-between; margin-top: 9px; }.friend-links a { color: #d9d987; font-size: .65rem; text-decoration: none; }
.future-card { display: grid; grid-template-columns: 190px minmax(0,1fr) auto; align-items: center; gap: 18px; }.future-card > img { width: 210px; height: 175px; object-fit: contain; margin-left: -24px; filter: drop-shadow(0 16px 12px rgba(0,0,0,.32)); }.future-card h2 { margin-bottom: 7px; color: var(--treasure-gold); font-size: clamp(1.1rem,1.6vw,1.5rem); }.treasure-button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 44px; padding: 0 20px; border: 1px solid #bcd94c; border-radius: 999px; background: linear-gradient(135deg,#477f24,#76ad31); color: #fff9bc; box-shadow: inset 0 1px rgba(255,255,255,.2),0 5px 16px rgba(0,0,0,.2); font-size: .8rem; text-decoration: none; white-space: nowrap; }.treasure-button span { color: #fff56c; font-size: 1.2rem; }
.treasure-empty { display: grid; grid-template-columns: minmax(260px,.7fr) minmax(300px,1fr); align-items: center; max-width: 980px; min-height: 560px; margin: 60px auto; padding: 30px 60px 30px 30px; border: 1px solid var(--treasure-line); border-radius: 28px; background: radial-gradient(circle at 20% 50%,rgba(68,158,58,.3),transparent 38%),linear-gradient(145deg,#084735,#03271f); box-shadow: 0 30px 70px rgba(0,0,0,.25); }.treasure-empty img { width: 100%; max-height: 430px; object-fit: contain; }.treasure-empty h1 { max-width: 580px; color: var(--treasure-gold); line-height: 1.08; }.treasure-empty p:not(.treasure-kicker) { max-width: 560px; margin: 14px 0 22px; color: var(--treasure-muted); line-height: 1.55; }
.treasure-card a:hover,.treasure-profile a:hover { filter: brightness(1.12); }.treasury-stat:hover,.story-treasure-item:hover,.ranking-tabs a:hover { transform: translateY(-1px); }
@media (max-width: 1240px) { .treasure-top-grid { grid-template-columns: minmax(280px,.75fr) minmax(420px,1.25fr); }.treasury-card { grid-column: 1/-1; }.treasury-layout { grid-template-columns: 1.35fr .65fr; }.treasury-stats { grid-template-columns: repeat(3,1fr); }.vault-art { min-height: 190px; }.treasure-bottom-grid { grid-template-columns: 1fr; } }
@media (max-width: 820px) { .treasure-dashboard { width: min(100% - 20px,680px); margin-top: 14px; }.treasure-titlebar { align-items: flex-start; }.treasure-titlebar h1 { font-size: 1.65rem; }.treasure-top-grid { grid-template-columns: 1fr; }.rank-spotlight { min-height: 420px; }.leaderboard-card,.treasury-card { min-height: auto; }.treasury-card { grid-column: auto; }.treasury-layout { grid-template-columns: 1fr; height: auto; }.treasury-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }.treasury-stat { display: grid; justify-items: center; text-align: center; }.treasury-stat img { width: 68px; }.vault-art { min-height: 250px; }.journey-card,.awards-card,.stories-card { padding: 17px 14px; }.treasure-bottom-grid { grid-template-columns: 1fr; }.future-card { grid-template-columns: 140px minmax(0,1fr); }.future-card > img { width: 155px; }.future-card .treasure-button { grid-column: 1/-1; }.treasure-empty { grid-template-columns: 1fr; padding: 24px; text-align: center; }.treasure-empty img { max-height: 300px; }.treasure-empty .treasure-button { margin-inline: auto; } }
@media (max-width: 560px) { .progress-dashboard-page .page-shell { padding-bottom: 102px; }.treasure-dashboard { width: calc(100% - 14px); }.treasure-titlebar { gap: 10px; }.treasure-titlebar > div:first-child .treasure-kicker { display: none; }.treasure-titlebar h1 { font-size: 1.35rem; }.treasure-profile { padding: 5px; }.treasure-profile-avatar { width: 36px; height: 36px; }.treasure-profile > span:nth-child(2) { display: none; }.treasure-card { border-radius: 17px; }.rank-spotlight { min-height: 390px; padding: 16px; }.rank-art { height: 255px; }.leaderboard-card,.treasury-card { padding: 15px 12px; }.leader-row { grid-template-columns: 28px 35px minmax(0,1fr); gap: 6px; }.leader-row > b { grid-column: 3; font-size: .68rem; }.leader-avatar { width: 35px; height: 35px; }.treasury-stats { grid-template-columns: 1fr; }.treasury-stat { display: flex; justify-items: initial; text-align: left; min-height: 86px; }.treasury-stat img { width: 76px; height: 68px; }.journey-heading { align-items: flex-end; }.journey-heading .treasure-kicker { display: none; }.journey-track { margin-inline: -2px; }.award-grid { margin-inline: -2px; }.friends-card { grid-template-columns: 105px minmax(0,1fr); padding: 15px 12px; }.friends-card > img { width: 115px; height: 135px; }.friends-card form { grid-column: 1/-1; flex-wrap: wrap; }.friends-card form input { flex-basis: 100%; }.friends-card button { height: 40px; flex: 1; }.future-card { grid-template-columns: 105px minmax(0,1fr); padding: 14px; gap: 8px; }.future-card > img { width: 120px; height: 125px; }.future-card h2 { font-size: 1rem; }.future-card p:not(.treasure-kicker) { display: none; }.treasure-empty { min-height: 520px; margin-top: 20px; }.treasure-empty h1 { font-size: 1.75rem; } }

/* Reference alignment: edge-to-edge layout and the revised leaderboard scene. */
.progress-dashboard-page .page-shell { padding-top: 0; }
.treasure-dashboard { width: 100%; max-width: none; margin: 0; padding: 10px 12px 28px; }
.treasure-top-grid { grid-template-columns: minmax(300px,.88fr) minmax(500px,1.24fr) minmax(470px,1.28fr); }

/* The supplied A artwork is the complete left-hand rank composition. */
.rank-spotlight { display: flex; flex-direction: column; justify-content: flex-end; min-height: 520px; padding: 0; background: radial-gradient(circle at 50% 45%,rgba(78,190,67,.25),transparent 42%),linear-gradient(165deg,#074533,#032a21); }
.rank-a-art { position: absolute !important; inset: 0; z-index: 0 !important; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 18px 16px rgba(0,0,0,.3)); }
.rank-copy { z-index: 3 !important; display: grid; justify-items: center; gap: 8px; width: calc(100% - 28px); margin: 0 14px 13px; padding: 9px 14px; border: 1px solid rgba(255,215,72,.25); border-radius: 14px; background: linear-gradient(180deg,rgba(1,32,25,.48),rgba(1,28,22,.9)); text-align: center; backdrop-filter: blur(5px); }
.rank-copy p { color: #d9e6d7; font-size: .78rem; }

.leaderboard-card,.treasury-card { min-height: 520px; }
.period-tabs { display: grid; grid-template-columns: repeat(4,1fr); margin: 14px 0 9px; padding: 3px; border: 1px solid rgba(171,204,91,.22); border-radius: 13px; background: rgba(0,24,20,.48); }
.period-tabs a { display: grid; place-items: center; min-height: 34px; border: 1px solid transparent; border-radius: 10px; color: #c7d5c9; font-size: .74rem; text-decoration: none; }
.period-tabs a.active { border-color: rgba(194,235,75,.75); background: linear-gradient(135deg,#1d5d35,#0c402e); color: #fff16f; box-shadow: inset 0 1px rgba(255,255,255,.08),0 0 16px rgba(146,237,70,.18); }
.leader-columns-head { display: grid; grid-template-columns: minmax(190px,1fr) minmax(118px,.82fr) minmax(118px,.82fr); gap: 9px; margin: 0 10px 6px; color: #d7e58e; font-size: .58rem; text-align: center; }
.leader-row { grid-template-columns: 48px 38px minmax(96px,1fr) minmax(118px,.82fr) minmax(118px,.82fr); gap: 7px; min-height: 57px; padding: 5px 9px; }
.leader-place { width: 48px; height: 48px; overflow: visible; border-radius: 0; background: transparent; }
.leader-place img { width: 48px; height: 48px; object-fit: contain; filter: drop-shadow(0 5px 4px rgba(0,0,0,.3)); }
.leader-name { overflow: hidden; color: #fffbea; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.leader-metric { display: grid; grid-template-columns: minmax(45px,1fr) 34px; gap: 5px; align-items: center; }
.leader-metric > i { display: block; height: 7px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.09); }
.leader-metric > i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#71da45,#c5f276); box-shadow: 0 0 8px rgba(132,231,77,.5); }
.words-metric > i b { background: linear-gradient(90deg,#e4aa23,#ffe36b); box-shadow: 0 0 8px rgba(255,205,51,.35); }
.leader-metric small { color: #cddbcf; font-size: .66rem; text-align: right; white-space: nowrap; }
.leader-metric small em { margin-right: 3px; color: #ffc82e; font-size: .56rem; font-style: normal; }
.ranking-scope-picker { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: 11px; padding: 7px 12px; border: 1px solid rgba(202,177,57,.32); border-radius: 999px; background: rgba(0,29,23,.55); }
.ranking-scope-picker label { color: #d9e68d; font-size: .65rem; white-space: nowrap; }
.ranking-scope-picker select { width: 100%; border: 0; outline: 0; appearance: none; background: transparent; color: #fff8dd; font-size: .72rem; font-weight: 900; text-align: center; cursor: pointer; }
.ranking-scope-picker select option { background: #07382c; color: #fff; }
.ranking-scope-picker > span { color: var(--treasure-gold); }

.treasury-layout { grid-template-columns: minmax(205px,.78fr) minmax(255px,1.22fr); }
.treasury-scene { position: relative; display: grid; grid-template-rows: 1fr auto 1fr; align-items: center; min-height: 420px; overflow: hidden; border-radius: 17px; background: radial-gradient(circle at 50% 42%,rgba(91,182,56,.28),transparent 39%),linear-gradient(180deg,rgba(3,58,44,.35),rgba(0,25,20,.68)); }
.treasury-scene-top,.treasury-scene-bottom { width: 100%; height: 185px; object-fit: contain; filter: drop-shadow(0 15px 12px rgba(0,0,0,.3)); }
.treasury-scene-top { align-self: end; margin-bottom: -26px; }
.treasury-scene-bottom { align-self: start; margin-top: -26px; }
.coin-plaque { z-index: 3; display: inline-flex; align-items: center; justify-self: center; gap: 7px; padding: 8px 16px; border: 1px solid #d5ae2e; border-radius: 999px; background: linear-gradient(135deg,rgba(13,83,53,.96),rgba(2,40,31,.96)); color: #ffe36c; box-shadow: 0 8px 20px rgba(0,0,0,.28),inset 0 1px rgba(255,255,255,.12); }
.coin-plaque span { color: #ffc226; }.coin-plaque strong { font-size: .82rem; }

.award-item.locked img { opacity: .42; filter: grayscale(.65) drop-shadow(0 8px 6px rgba(0,0,0,.25)); }
.award-item.locked small { color: #82998a; }.award-item.locked { border-style: dashed; }
.award-item.earned { border-color: rgba(223,192,61,.55); background: radial-gradient(circle at 50% 30%,rgba(138,212,61,.15),transparent 45%),rgba(1,40,31,.65); }

.treasure-bottom-grid { display: none; }
.future-card { display: grid; grid-template-columns: 210px 215px 2px minmax(210px,1fr) minmax(210px,1fr) auto; align-items: center; gap: 24px; min-height: 180px; margin-top: 13px; padding: 14px 28px; overflow: hidden; }
.future-chest { width: 260px; height: 195px; object-fit: contain; margin-left: -35px; margin-bottom: -15px; filter: drop-shadow(0 20px 15px rgba(0,0,0,.45)); }
.future-texts h2 { color: #ffe069; font-size: 1.45rem; margin-bottom: 6px; text-shadow: 0 2px 4px rgba(0,0,0,.4); line-height: 1.15; }
.future-texts p { color: #aebdb2; font-size: .88rem; line-height: 1.35; }
.future-divider { display: block; width: 2px; height: 40px; background: linear-gradient(180deg, transparent, rgba(142,232,80,.4), transparent); position: relative; }
.future-divider::after { content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; background: #a9e85a; transform: translate(-50%, -50%) rotate(45deg); box-shadow: 0 0 6px #8ee850; }
.future-perk { display: flex; align-items: center; gap: 14px; min-width: 0; }
.perk-icon { position: relative; display: grid; place-items: center; flex: 0 0 92px; width: 92px; height: 92px; border-radius: 24px; background: radial-gradient(circle at 50% 30%, rgba(138,212,61,.15), transparent 60%), rgba(1,40,31,.65); border: 1px solid rgba(138,212,61,.3); box-shadow: inset 0 2px 4px rgba(255,255,255,.08), 0 5px 12px rgba(0,0,0,.3); }
.perk-icon img { width: 72px; height: 72px; object-fit: contain; filter: drop-shadow(0 6px 4px rgba(0,0,0,.4)); }
.future-perk > span { display: grid; gap: 5px; }.future-perk strong { color: #ffe069; font-size: 1.05rem; line-height: 1.1; }.future-perk small { color: var(--treasure-muted); font-size: .85rem; line-height: 1.35; }
.cta-btn { min-height: 52px !important; padding: 0 28px !important; font-size: 1.05rem !important; background: linear-gradient(135deg, rgba(82, 143, 40, 0.9), rgba(50, 100, 25, 0.9)) !important; border-color: rgba(188, 217, 76, 0.5) !important; box-shadow: inset 0 1px 1px rgba(255,255,255,.3), inset 0 -4px 8px rgba(0,0,0,.3), 0 8px 15px rgba(0,0,0,.3) !important; }
.cta-btn span { color: #fff !important; font-size: 1.25rem !important; margin-left: 6px; }



@media (max-width: 1240px) {
  .treasure-top-grid { grid-template-columns: minmax(290px,.72fr) minmax(500px,1.28fr); }
  .treasury-card { grid-column: 1/-1; }
  .future-card { grid-template-columns: 160px minmax(180px,1fr) 0px repeat(2,minmax(140px,.7fr)); gap: 14px; }
  .future-chest { width: 200px; height: 160px; margin-left: -20px; }
  .future-divider { display: none; }
  .future-card .treasure-button { grid-column: 2/-1; justify-self: end; }
}
@media (max-width: 820px) {
  .treasure-dashboard { width: 100%; max-width: none; margin: 0; padding: 8px; }
  .treasure-top-grid { grid-template-columns: 1fr; }
  .treasury-card { grid-column: auto; }
  .leader-row { grid-template-columns: 44px 36px minmax(90px,1fr) minmax(95px,.8fr) minmax(95px,.8fr); }
  .leader-columns-head { grid-template-columns: minmax(170px,1fr) repeat(2,minmax(95px,.8fr)); }
  .treasury-layout { grid-template-columns: 1fr; }
  .treasury-stats { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .treasury-scene { min-height: 390px; }
  .future-card { grid-template-columns: 140px minmax(0,1fr) minmax(140px,.7fr); }
  .future-divider { display: none; }
  .future-perk:last-of-type { display: none; }
  .future-card .treasure-button { grid-column: auto; }
}
@media (max-width: 560px) {
  .treasure-dashboard { padding: 6px; }
  .rank-spotlight { min-height: 430px; }
  .leaderboard-card,.treasury-card { min-height: auto; }
  .leader-columns-head { grid-template-columns: minmax(130px,1fr) repeat(2,minmax(80px,.75fr)); margin-inline: 4px; font-size: .51rem; }
  .leader-row { grid-template-columns: 37px 32px minmax(66px,1fr) minmax(76px,.75fr) minmax(76px,.75fr); gap: 4px; padding-inline: 5px; }
  .leader-place,.leader-place img { width: 37px; height: 37px; }
  .leader-avatar { width: 32px; height: 32px; }
  .leader-name { font-size: .63rem; }
  .leader-metric { grid-template-columns: 1fr; gap: 2px; }.leader-metric small { font-size: .55rem; text-align: center; }
  .ranking-scope-picker { grid-template-columns: 1fr auto; border-radius: 13px; }.ranking-scope-picker label { display: none; }.ranking-scope-picker select { text-align: left; }
  .treasury-stats { grid-template-columns: 1fr; }
  .treasury-scene { min-height: 360px; }
  .future-card { grid-template-columns: 105px minmax(0,1fr); min-height: 155px; padding: 12px; }
  .future-chest { width: 140px; height: 130px; margin-left: -20px; margin-bottom: 0; }.future-divider, .future-perk { display: none; }.future-card .treasure-button { grid-column: 1/-1; justify-self: stretch; }
}

/* Readability and motion pass */
.treasure-dashboard h2 { font-size: clamp(1.35rem,1.55vw,1.72rem); letter-spacing: -.015em; text-shadow: 0 2px 8px rgba(0,0,0,.28); }
.treasure-kicker { margin-bottom: 7px !important; font-size: .84rem; letter-spacing: .12em; text-shadow: 0 0 12px rgba(169,232,90,.2); }
.rank-copy p { font-size: .94rem; line-height: 1.4; text-shadow: 0 2px 8px rgba(0,0,0,.45); }
.top-ten-pill { padding: 7px 15px; font-size: .85rem; }
.period-tabs a { min-height: 39px; font-size: .86rem; }
.leader-columns-head { margin-top: 2px; font-size: .69rem; font-weight: 900; letter-spacing: .01em; }
.leader-row { min-height: 66px; }
.leader-place,.leader-place img { width: 55px; height: 55px; }
.leader-row { grid-template-columns: 55px 45px minmax(110px,1fr) minmax(125px,.82fr) minmax(125px,.82fr); }
.leader-avatar { width: 45px; height: 45px; }
.leader-name { font-size: .91rem; text-shadow: 0 1px 5px rgba(0,0,0,.38); }
.leader-metric > i { height: 9px; }
.leader-metric small { font-size: .77rem; font-weight: 900; }
.ranking-scope-picker { min-height: 49px; padding-inline: 16px; }
.ranking-scope-picker label { font-size: .76rem; }.ranking-scope-picker select { font-size: .84rem; }
.treasury-stat { padding: 9px 10px; }
.treasury-stat img { flex-basis: 88px; width: 88px; height: 88px; }
.treasury-stat small { font-size: .78rem; }.treasury-stat strong { font-size: 1.85rem; }.treasury-stat em { font-size: .76rem; }
.coin-plaque { padding: 10px 20px; }.coin-plaque strong { font-size: .95rem; }

/* Transparent artwork canvases are intentionally oversized and clipped by the scene. */
.treasury-scene { grid-template-rows: 1fr auto 1fr; min-height: 442px; }
.treasury-scene-top,.treasury-scene-bottom { position: relative; z-index: 1; justify-self: center; width: 150%; max-width: none; height: 235px; object-fit: contain; transform-origin: center; }
.treasury-scene-top { margin-bottom: -42px; transform: scale(1.5); }
.treasury-scene-bottom { margin-top: -42px; transform: scale(1.48); }
.coin-plaque { z-index: 4; }

/* The investment path now uses the available height and gives the artwork visual weight. */
.journey-card { min-height: 330px; padding: 23px 28px 20px; }
.journey-heading { margin-bottom: 2px; }
.journey-total { padding: 9px 15px; font-size: .8rem; }.journey-total b { font-size: 1.15rem; }
.journey-track { min-height: 242px; gap: 14px; padding-top: 4px; align-items: start; }
.journey-line { top: 121px; height: 7px; box-shadow: 0 0 18px rgba(134,235,70,.48); }
.journey-step { min-width: 160px; }
.journey-step > div { width: 185px; height: 178px; margin-bottom: -9px; }
.journey-step img { max-width: none; transform: scale(1.17); }
.journey-step i { right: 10px; bottom: 20px; width: 29px; height: 29px; font-size: .88rem; box-shadow: 0 0 12px rgba(166,246,92,.35); }
.journey-step strong { font-size: .91rem; line-height: 1.2; text-shadow: 0 2px 6px rgba(0,0,0,.35); }
.journey-step small { margin-top: 4px; font-size: .76rem; }

.award-item strong { font-size: .84rem; }.award-item small { font-size: .72rem; }.awards-count { font-size: .78rem; }
.future-card h2 { font-size: clamp(1.35rem,1.65vw,1.75rem); }.future-card p:not(.treasure-kicker) { font-size: .86rem; line-height: 1.4; }
.future-perk strong { font-size: .85rem; }.future-perk small { font-size: .72rem; line-height: 1.35; }.treasure-button { min-height: 49px; font-size: .92rem; }

/* Layered energy: slow light sweep, breathing artwork and glowing progress. */
.treasure-card::before { position: absolute; top: -30%; bottom: -30%; left: -45%; z-index: 2; width: 18%; pointer-events: none; background: linear-gradient(90deg,transparent,rgba(255,239,143,.075),transparent); content: ""; transform: skewX(-18deg); animation: treasureSweep 9s ease-in-out infinite; }
.treasure-card:nth-of-type(2)::before { animation-delay: -3s; }.treasure-card:nth-of-type(3)::before { animation-delay: -6s; }
.rank-pulse-wrapper { position: absolute; inset: 0; width: 100%; height: 100%; animation: rankBreathe 5.5s ease-in-out infinite; transform-origin: center; z-index: 1; }
.heading-coin { animation: coinPulse 2.4s ease-in-out infinite; }
.leader-metric > i b { position: relative; overflow: hidden; }
.leader-metric > i b::after { position: absolute; inset: 0; background: linear-gradient(105deg,transparent 25%,rgba(255,255,255,.72) 48%,transparent 70%); content: ""; transform: translateX(-150%); animation: progressShine 2.8s ease-in-out infinite; }
.leader-row:nth-child(2) .leader-metric > i b::after { animation-delay: .35s; }.leader-row:nth-child(3) .leader-metric > i b::after { animation-delay: .7s; }.leader-row:nth-child(4) .leader-metric > i b::after { animation-delay: 1.05s; }.leader-row:nth-child(5) .leader-metric > i b::after { animation-delay: 1.4s; }
.treasury-scene-top { animation: treasuryFloatTop 5s ease-in-out infinite; }
.treasury-scene-bottom { animation: treasuryFloatBottom 4.4s ease-in-out infinite; }
.coin-plaque { animation: plaqueGlow 2.6s ease-in-out infinite; }
.journey-step.complete > div { animation: milestoneFloat 3.8s ease-in-out infinite; }
.journey-step:nth-child(3) > div { animation-delay: -.7s; }.journey-step:nth-child(4) > div { animation-delay: -1.4s; }.journey-step:nth-child(5) > div { animation-delay: -2.1s; }.journey-step:nth-child(6) > div { animation-delay: -2.8s; }.journey-step:nth-child(7) > div { animation-delay: -3.5s; }
.journey-step.complete::before { position: absolute; top: 68px; width: 118px; height: 40px; z-index: -1; border-radius: 50%; background: rgba(138,234,70,.24); filter: blur(14px); content: ""; animation: milestoneGlow 2.7s ease-in-out infinite; }
.award-item.earned img { animation: badgeHover 4s ease-in-out infinite; }.award-item:nth-child(2) img { animation-delay: -.55s; }.award-item:nth-child(3) img { animation-delay: -1.1s; }.award-item:nth-child(4) img { animation-delay: -1.65s; }.award-item:nth-child(5) img { animation-delay: -2.2s; }.award-item:nth-child(6) img { animation-delay: -2.75s; }.award-item:nth-child(7) img { animation-delay: -3.3s; }
.award-item.earned:hover img { animation: badgeCelebrate .65s ease-in-out; }
.future-chest { animation: chestBreathe 4.8s ease-in-out infinite; }



@keyframes treasureSweep { 0%,62% { left:-45%; opacity:0; } 68% { opacity:1; } 86%,100% { left:135%; opacity:0; } }
@keyframes rankBreathe { 0%,100% { transform:scale(1); filter:drop-shadow(0 18px 16px rgba(0,0,0,.3)); } 50% { transform:scale(1.018); filter:drop-shadow(0 20px 20px rgba(114,221,64,.18)); } }
@keyframes coinPulse { 0%,100% { transform:translateY(0) rotate(0); box-shadow:inset 0 0 0 4px rgba(255,236,131,.24),0 0 0 rgba(255,204,42,0); } 50% { transform:translateY(-3px) rotate(7deg); box-shadow:inset 0 0 0 4px rgba(255,236,131,.32),0 0 18px rgba(255,204,42,.42); } }
@keyframes progressShine { 0%,35% { transform:translateX(-150%); } 75%,100% { transform:translateX(150%); } }
@keyframes treasuryFloatTop { 0%,100% { transform:translateY(0) scale(1.5); } 50% { transform:translateY(-8px) scale(1.54); } }
@keyframes treasuryFloatBottom { 0%,100% { transform:translateY(0) scale(1.48); } 50% { transform:translateY(7px) scale(1.52); } }
@keyframes plaqueGlow { 0%,100% { box-shadow:0 8px 20px rgba(0,0,0,.28),0 0 0 rgba(255,205,48,0),inset 0 1px rgba(255,255,255,.12); } 50% { box-shadow:0 8px 20px rgba(0,0,0,.28),0 0 22px rgba(255,205,48,.35),inset 0 1px rgba(255,255,255,.2); } }
@keyframes milestoneFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-7px); } }
@keyframes milestoneGlow { 0%,100% { opacity:.45; transform:scale(.88); } 50% { opacity:1; transform:scale(1.16); } }
@keyframes badgeHover { 0%,100% { transform:translateY(0) rotate(0); } 50% { transform:translateY(-5px) rotate(1.5deg); } }
@keyframes badgeCelebrate { 0%,100% { transform:scale(1) rotate(0); } 35% { transform:scale(1.12) rotate(-5deg); } 70% { transform:scale(1.08) rotate(5deg); } }
@keyframes chestBreathe { 0%,100% { transform:scale(1); filter:drop-shadow(0 15px 11px rgba(0,0,0,.32)); } 50% { transform:scale(1.035); filter:drop-shadow(0 18px 15px rgba(255,196,43,.18)); } }


@media (max-width: 1240px) {
  .journey-step > div { width:170px; height:164px; }
  .treasury-scene-top,.treasury-scene-bottom { width:135%; }
}
@media (max-width: 820px) {
  .treasure-dashboard h2 { font-size:1.4rem; }
  .leader-row { grid-template-columns:48px 40px minmax(96px,1fr) minmax(105px,.8fr) minmax(105px,.8fr); }
  .leader-place,.leader-place img { width:48px; height:48px; }
  .leader-avatar { width:40px; height:40px; }
  .journey-card { min-height:315px; padding-inline:17px; }
  .journey-track { min-height:225px; }.journey-line { top:112px; }.journey-step > div { width:170px; height:160px; }
}
@media (max-width: 560px) {
  .treasure-kicker { font-size:.7rem; }.rank-copy p { font-size:.82rem; }
  .period-tabs a { font-size:.75rem; }
  .leader-columns-head { font-size:.56rem; }
  .leader-row { grid-template-columns:39px 34px minmax(70px,1fr) minmax(80px,.75fr) minmax(80px,.75fr); }
  .leader-place,.leader-place img { width:39px; height:39px; }.leader-avatar { width:34px; height:34px; }.leader-name { font-size:.7rem; }
  .treasury-scene-top,.treasury-scene-bottom { width:145%; }
  .journey-card { min-height:310px; }.journey-step > div { width:165px; height:158px; }.journey-step strong { font-size:.83rem; }
}
@media (prefers-reduced-motion: reduce) {
  .treasure-card::before,.rank-a-art,.heading-coin,.leader-metric > i b::after,.treasury-scene-top,.treasury-scene-bottom,.coin-plaque,.journey-step.complete > div,.journey-step.complete::before,.award-item.earned img,.future-chest { animation:none !important; }
}

/* Curved title fitted to the wooden ribbon in A.webp. */
.rank-banner-title { position: absolute !important; top: 29px; left: 50%; z-index: 4 !important; width: min(78%,350px); height: 105px; overflow: visible; transform: translateX(-50%) rotate(-.5deg); pointer-events: none; filter: drop-shadow(0 2px 1px rgba(55,25,2,.9)) drop-shadow(0 0 5px rgba(255,213,102,.16)); }
.rank-banner-title path { fill: none; }
.rank-banner-title text { fill: #fff1bd; font-family: Nunito,ui-sans-serif,system-ui,sans-serif; font-size: 20px; font-weight: 900; letter-spacing: .15px; }
@media (max-width: 560px) {
  .rank-banner-title { top: 24px; width: min(79%,330px); }
  .rank-banner-title text { font-size: 19px; }
}

/* Dashboard composition v4: two compact content columns + a full-height ranking. */
.treasure-layout-grid {
  display: grid;
  grid-template-columns: minmax(330px,.82fr) minmax(480px,1.18fr) minmax(560px,1.34fr);
  grid-template-rows: 410px 140px 125px 115px;
  gap: 10px;
}
.treasure-top-grid { display: contents; }
.rank-spotlight { grid-column: 1; grid-row: 1; min-height: 0; height: 100%; }
.treasury-card { grid-column: 2; grid-row: 1; min-height: 0; height: 100%; }
.leaderboard-card { grid-column: 3; grid-row: 1 / 5; min-height: 0; height: 100%; }
.journey-card { grid-column: 1 / 3; grid-row: 2; min-height: 0; height: 100%; margin: 0; }
.awards-card { grid-column: 1 / 3; grid-row: 3; min-height: 0; height: 100%; margin: 0; }
.future-card { grid-column: 1 / 3; grid-row: 4; min-height: 0; height: 100%; margin: 0; }

/* Rank ribbon, computed level and nickname. */
.rank-banner-title { top: 45px; width: min(80%,370px); }
.rank-banner-title text { font-size: 22px; }
.rank-profile-level { position: absolute !important; top: 41%; left: 50%; z-index: 5 !important; display: grid; justify-items: center; min-width: 170px; transform: translate(-50%,-50%); color: #ffe36c; text-align: center; text-shadow: 0 3px 0 #4b2d00,0 0 20px rgba(255,204,46,.42); }
.rank-profile-level > strong { display: flex; align-items: baseline; justify-content: center; font-size: clamp(3.6rem,4.2vw,5.35rem); font-weight: 1000; line-height: .9; }
.rank-profile-level > strong small { margin-right: 2px; font-size: .4em; }
.rank-profile-level > span { max-width: 220px; margin-top: -2px; overflow: hidden; color: #fff3a8; font-size: clamp(1.05rem,1.35vw,1.42rem); font-weight: 1000; text-overflow: ellipsis; white-space: nowrap; text-shadow: 0 2px 0 #3b2605,0 0 10px rgba(255,216,78,.3); }
.rank-copy { width: calc(100% - 26px); margin: 0 13px 8px; padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; backdrop-filter: none; }
.rank-copy p { display: grid; gap: 1px; color: #fffbe5; font-size: 1.03rem; line-height: 1.18; text-shadow: 0 2px 5px rgba(0,0,0,.9); }
.rank-copy p strong { color: #fff6bc; font-size: 1.14em; }.rank-copy p span { display: block; }
.top-ten-pill { margin-top: 4px; padding: 5px 14px; background: rgba(2,40,30,.55); font-size: .83rem; }

/* The treasury art is free of an inner clipping panel and fills the card. */
.treasury-card { padding: 15px 16px; }
.treasury-card .card-heading { min-height: 43px; }
.treasury-layout { grid-template-columns: minmax(180px,.78fr) minmax(235px,1.22fr); gap: 6px; height: calc(100% - 43px); margin-top: 0; }
.treasury-stats { gap: 6px; padding-top: 4px; }
.treasury-stat { min-height: 0; padding: 12px 14px; gap: 14px; border-radius: 16px; }
.treasury-stat img { flex-basis: 105px; width: 105px; height: 105px; }
.treasury-stat small { font-size: 1rem; font-weight: 800; }.treasury-stat strong { font-size: 2.45rem; margin: 4px 0; line-height: 1; }.treasury-stat em { font-size: .9rem; }
.treasury-scene { position: relative; display: block; min-height: 0; height: 100%; overflow: visible; border-radius: 0; background: radial-gradient(circle at 52% 42%,rgba(91,182,56,.18),transparent 44%); }
.treasury-scene-top,.treasury-scene-bottom { position: absolute; left: 50%; width: 148%; max-width: none; object-fit: contain; transform-origin: center; }
.treasury-scene-top { top: -10px; height: 255px; margin: 0; }
.treasury-scene-bottom { bottom: -43px; height: 245px; margin: 0; }
.coin-plaque { position: absolute !important; top: 49%; left: 50%; z-index: 6; padding: 8px 17px; transform: translate(-50%,-50%); white-space: nowrap; }
.coin-plaque strong { font-size: .94rem; }
@keyframes treasuryFloatTop { 0%,100% { transform:translate(-50%,0) scale(1.38); } 50% { transform:translate(-50%,-7px) scale(1.42); } }
@keyframes treasuryFloatBottom { 0%,100% { transform:translate(-50%,0) scale(1.36); } 50% { transform:translate(-50%,6px) scale(1.4); } }
@keyframes plaqueGlow { 0%,100% { transform:translate(-50%,-50%) scale(1); box-shadow:0 8px 20px rgba(0,0,0,.28),0 0 0 rgba(255,205,48,0),inset 0 1px rgba(255,255,255,.12); } 50% { transform:translate(-50%,-50%) scale(1.035); box-shadow:0 8px 20px rgba(0,0,0,.28),0 0 22px rgba(255,205,48,.35),inset 0 1px rgba(255,255,255,.2); } }

/* Full-height ranking with larger dynamic Safe totals and its own scroll. */
.leaderboard-card { display: flex; flex-direction: column; padding: 18px 18px 24px 18px; overflow: hidden; }
.leaderboard-card .card-heading h2 { font-size: 1.78rem; }
.period-tabs { flex: 0 0 auto; margin: 14px 0 10px; }.period-tabs a { min-height: 42px; font-size: .96rem; }
.leader-columns-head { flex: 0 0 auto; display: grid; grid-template-columns: 61px 49px minmax(125px,1fr) minmax(135px,.74fr) minmax(140px,.74fr); gap: 8px; margin: 2px 0 7px; padding: 0 11px; font-size: .76rem; }
.leader-columns-head span:first-child { grid-column: 1 / 4; }
.leader-list { flex: 1 1 auto; min-height: 0; overflow-x: auto; overflow-y: auto; padding-right: 4px; scrollbar-color: rgba(182,226,77,.5) rgba(0,25,20,.35); scrollbar-width: thin; }
.leader-list::-webkit-scrollbar { width: 7px; }.leader-list::-webkit-scrollbar-track { border-radius: 99px; background: rgba(0,25,20,.35); }.leader-list::-webkit-scrollbar-thumb { border-radius: 99px; background: linear-gradient(#b9e954,#38843a); }
.leader-row { grid-template-columns: 61px 49px minmax(125px,1fr) minmax(135px,.74fr) minmax(140px,.74fr); gap: 8px; min-height: 70px; padding: 6px 11px; }
.leader-place,.leader-place img { width: 61px; height: 61px; }
.leader-avatar { width: 49px; height: 49px; }.leader-name { font-size: 1rem; }
.leader-metric { grid-template-columns: minmax(48px,1fr) auto; }.leader-metric small { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 48px; font-size: .88rem; }
.words-metric small { display: grid; grid-template-columns: auto auto; gap: 2px 5px; color: #ffe166; line-height: 1.05; }.words-metric small b { min-width: 25px; font-size: 1.12rem; line-height: 1; text-align: left; }.words-metric small em { grid-column: 1 / -1; color: #b8cfbd; font-size: .63rem; font-style: normal; font-weight: 800; white-space: nowrap; }
.leader-coin-icon { width: 25px; height: 25px; object-fit: contain; border-radius: 50%; filter: drop-shadow(0 2px 3px rgba(0,0,0,.35)); }
.ranking-scope-picker { flex: 0 0 auto; min-height: 52px; margin-top: 12px; border: 1px solid rgba(220,195,75,.4); background: linear-gradient(135deg,rgba(10,65,45,.75),rgba(4,45,35,.85)); box-shadow: 0 5px 15px rgba(0,0,0,.3); transition: border-color .2s; }
.ranking-scope-picker:hover { border-color: rgba(255,215,75,.75); box-shadow: 0 5px 18px rgba(0,0,0,.4); }
.ranking-scope-picker label { font-size: .83rem; color: #e5f5ad; }
.ranking-scope-picker select { font-size: .95rem; color: #fff8dd; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ranking-scope-picker select option { padding: 12px; background: #06362b; color: #fff; font-size: .9rem; }

/* Compact journey strip spanning the first two columns. */
.journey-card { padding: 9px 17px 7px; }
.journey-card .card-heading { min-height: 34px; }.journey-card h2 { font-size: 1.35rem; }.journey-card .treasure-kicker { display: none; }
.journey-total { padding: 5px 10px; font-size: .8rem; }.journey-total b { font-size: 1.05rem; }
.journey-track { min-height: 105px; height: auto; gap: 8px; padding: 0; overflow-x: auto; align-items: start; }
.journey-line { top: 52px; height: 5px; }
.journey-step { min-width: 125px; }
.journey-step > div { width: 104px; height: 79px; margin-bottom: -4px; }
.journey-step img { transform: scale(1.25); }.journey-step i { right: 0; bottom: 6px; width: 21px; height: 21px; font-size: .67rem; }
.journey-step strong { font-size: .88rem; }.journey-step small { margin-top: 2px; font-size: .75rem; }
.journey-step.complete::before { top: 31px; width: 80px; height: 24px; }

/* Compact badge strip. */
.awards-card { padding: 8px 16px 7px; }
.awards-card .card-heading { min-height: 33px; }.awards-card h2 { font-size: 1.22rem; }.awards-card .treasure-kicker { display: none; }.awards-count { padding: 5px 9px; font-size: .69rem; }
.award-grid { height: 86px; gap: 7px; margin-top: 2px; overflow-x: auto; }
.award-item { grid-template-rows: 57px auto; align-content: start; min-width: 102px; min-height: 83px; padding: 2px 5px 3px; border-radius: 11px; }
.award-item img { width: 64px; height: 64px; }.award-item strong { font-size: .73rem; }.award-item small { display: none; }

/* Final ribbon remains visible in the first viewport. */
.future-card { grid-template-columns: 210px 275px 2px minmax(190px,1fr) minmax(190px,1fr) auto; gap: 24px; padding: 14px 28px; }
.future-chest { width: 260px; height: 195px; margin-left: -35px; margin-bottom: -15px; }
.future-texts h2 { font-size: 1.45rem; line-height: 1.15; }
.future-texts p { font-size: .88rem; line-height: 1.35; }
.perk-icon { flex-basis: 92px; width: 92px; height: 92px; border-radius: 24px; }
.perk-icon img { width: 72px; height: 72px; }
.future-perk { gap: 14px; }
.future-perk > span { gap: 5px; }
.future-perk strong { font-size: 1.05rem; line-height: 1.1; }
.future-perk small { font-size: .85rem; line-height: 1.35; }
.future-card .cta-btn { min-height: 52px !important; padding: 0 28px !important; font-size: 1.05rem !important; }
.future-card .cta-btn span { font-size: 1.25rem !important; margin-left: 6px; }

/* Larger kid-friendly typography where space permits. */
.treasure-dashboard h2 { font-weight: 1000; }.card-heading .treasure-kicker { font-size: .83rem; }

@media (max-width: 1200px) {
  .treasure-layout-grid { grid-template-columns: minmax(280px,.78fr) minmax(420px,1.22fr); grid-template-rows: 420px 145px 135px auto 680px; }
  .rank-spotlight { grid-column:1;grid-row:1; }.treasury-card { grid-column:2;grid-row:1; }.journey-card { grid-column:1/3;grid-row:2; }.awards-card { grid-column:1/3;grid-row:3; }.future-card { grid-column:1/3;grid-row:4; }.leaderboard-card { grid-column:1/3;grid-row:5; }
  /* Fix cramped stats */
  .treasury-layout { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .treasury-stats { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
  .treasury-stat { padding: 10px 8px; }
  .treasury-stat img { flex-basis: 76px; width: 76px; height: 76px; }
  .treasury-stat strong { font-size: 1.6rem; }
  .treasury-scene { min-height: 230px; }
  /* Future card safe stack */
  .future-card { grid-template-columns: 160px 1fr; grid-template-rows: auto auto auto auto; gap: 14px; padding: 18px 24px; align-items: start; height: auto !important; }
  .future-chest { grid-column: 1; grid-row: 1 / 4; width: 200px; height: 150px; margin: 0 -20px; }
  .future-texts { grid-column: 2; grid-row: 1; margin-bottom: 8px; }
  .future-texts h2 br { display: none; }
  .future-texts p br { display: none; }
  .future-divider { display: none; }
  .future-perk:nth-child(4) { grid-column: 2; grid-row: 2; display: flex; }
  .future-perk:nth-child(5) { grid-column: 2; grid-row: 3; display: flex; }
  .future-card .cta-btn { grid-column: 1 / -1; grid-row: 4; justify-self: center; width: 100%; max-width: 360px; text-align: center; justify-content: center; margin-top: 10px; }
}
@media (max-width: 720px) {
  .treasure-layout-grid { display:flex; flex-direction:column; }
  .rank-spotlight { height:430px; }.treasury-card { height:480px; }.leaderboard-card { order:3; height:720px; }.journey-card { order:4; height:155px; }.awards-card { order:5; height:140px; }.future-card { order:6; height:auto !important; min-height:155px; }
  .leader-columns-head { grid-template-columns:minmax(170px,1fr) repeat(2,minmax(100px,.75fr)); }.leader-row { grid-template-columns:48px 40px minmax(90px,1fr) repeat(2,minmax(100px,.75fr)); }.leader-place,.leader-place img{width:48px;height:48px}.leader-avatar{width:40px;height:40px}
  .future-card { grid-template-columns: 140px 1fr; padding: 16px 20px; }
  .future-chest { width: 170px; height: 130px; margin: 0 -15px; }
}
@media (max-width: 520px) {
  .rank-banner-title { top:34px; }.rank-profile-level > strong { font-size:4.2rem; }.rank-copy p { font-size:.9rem; }
  .treasury-card { height:680px; }.treasury-stats { grid-template-columns:1fr; }.treasury-scene-top { top:-6px; }.treasury-scene-bottom { bottom:-35px; }
  .treasury-stat { padding:10px 14px; }.treasury-stat img { flex-basis: 100px; width:100px; height:100px; }.treasury-stat strong { font-size: 2.2rem; }
  .leaderboard-card { height:760px; padding:12px; }.leader-columns-head { grid-template-columns:minmax(120px,1fr) repeat(2,minmax(78px,.72fr)); font-size:.58rem; }.leader-row { grid-template-columns:39px 34px minmax(72px,1fr) repeat(2,minmax(78px,.72fr)); gap:4px; padding-inline:5px; }.leader-place,.leader-place img{width:39px;height:39px}.leader-avatar{width:34px;height:34px}.leader-name{font-size:.72rem}.leader-metric{grid-template-columns:1fr}.leader-metric small{font-size:.67rem}.leader-coin-icon{width:19px;height:19px}.words-metric small b{font-size:.86rem}
  .future-card { grid-template-columns: 100px 1fr; gap: 12px; padding: 14px; }
  .future-chest { width: 140px; height: 110px; margin-left: -20px; }
  .future-texts h2 { font-size: 1.15rem; }
  .future-texts p { font-size: 0.75rem; }
  .perk-icon { flex-basis: 60px; width: 60px; height: 60px; border-radius: 18px; }
  .perk-icon img { width: 44px; height: 44px; }
  .future-perk strong { font-size: 0.85rem; }
  .future-perk small { font-size: 0.7rem; }
}

/* Viewport-height fit and simplified Safe total column. */
.progress-dashboard-page .page-shell { min-height: calc(100dvh - 68px); }
.treasure-dashboard { min-height: calc(100dvh - 68px); }
.treasure-layout-grid {
  height: calc(100dvh - 100px);
  min-height: 0;
  grid-template-rows:
    minmax(0,4.5fr)
    minmax(0,1.4fr)
    minmax(0,1.3fr)
    minmax(0,1.4fr);
}
.rank-spotlight,.treasury-card,.leaderboard-card,.journey-card,.awards-card,.future-card { height:100%; }

.rank-banner-title { top:36px; width:min(78%,335px); }
.rank-banner-title text { font-size:17.5px; letter-spacing:.05px; }

.leader-columns-head { font-size:.86rem; font-weight:1000; color:#ebf5a0; text-align: center; }
.leader-list { align-content:start; grid-auto-rows:min-content; }
.words-metric { display:flex; align-items:center; justify-content:center; }
.words-metric small { justify-content:center; min-width:82px; gap:7px; }
.words-metric small b { font-size:1.28rem; }
.leader-coin-icon { width:29px; height:29px; }

@media (max-width:1200px) {
  .treasure-layout-grid { height:auto; min-height:0; grid-template-rows:420px 145px 135px auto 680px; }
}
@media (max-width:720px) {
  .treasure-dashboard { min-height:0; }
  .treasure-layout-grid { height:auto; }
}
@media (max-width:520px) {
  .rank-banner-title { top:37px; width:min(75%,310px); }
  .rank-banner-title text { font-size:14.5px; }
  .leader-columns-head { font-size:.66rem; }
  .words-metric small { min-width:58px; gap:4px; }.words-metric small b { font-size:.94rem; }.leader-coin-icon { width:21px; height:21px; }
}


/* ================= LIGHT THEME OVERRIDES (JUICY KIDS) ================= */
:root[data-theme="light"] .progress-dashboard-page {
  --treasure-bg: transparent;
  --treasure-panel: #ffffff;
  --treasure-panel-2: #f8fafc;
  --treasure-line: rgba(255,255,255,0.4);
  --treasure-gold: #f59e0b;
  --treasure-lime: #10b981;
  --treasure-text: #ffffff; /* Default to white for juicy cards */
  --treasure-muted: rgba(255,255,255,0.8);
  
  /* Warm vanilla cream for the background to let colorful cards pop */
  background-color: #fdfaf3;
  background-image: none;
}
:root[data-theme="light"] .progress-dashboard-page::before {
  display: none;
}
:root[data-theme="light"] .progress-dashboard-page .site-header {
  border-color: rgba(0, 0, 0, 0.05);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  color: var(--ink);
}
:root[data-theme="light"] .progress-dashboard-page .site-header .brand-text span:first-child { color: var(--ink) !important; }
:root[data-theme="light"] .progress-dashboard-page .site-header .brand-text span:last-child { color: var(--sun-500) !important; }
:root[data-theme="light"] .progress-dashboard-page .site-header .button-soft,
:root[data-theme="light"] .progress-dashboard-page .site-header .theme-toggle,
:root[data-theme="light"] .progress-dashboard-page .site-header .profile-dropdown-trigger { 
  border-color: rgba(0,0,0,0.1); background: #ffffff; color: var(--ink); 
}
:root[data-theme="light"] .progress-dashboard-page .site-nav a,
:root[data-theme="light"] .progress-dashboard-page .desktop-more-menu summary { color: var(--ink); }
:root[data-theme="light"] .progress-dashboard-page .page-shell { 
  background: transparent; 
}
:root[data-theme="light"] .treasure-profile {
  background: #ffffff;
  border: 1px solid rgba(0,0,0,0.04);
  box-shadow: 0 8px 24px rgba(0,0,0,0.06);
  color: #333;
}

/* Default card fallback */
:root[data-theme="light"] .treasure-card {
  background: #ffffff;
  border: none;
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
  color: #333;
}
:root[data-theme="light"] .treasure-card .treasure-kicker,
:root[data-theme="light"] .treasure-card .treasure-muted {
  color: #666;
}
:root[data-theme="light"] .treasure-button {
  background: linear-gradient(180deg, #34d399, #10b981);
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 0 #059669, 0 8px 16px rgba(16, 185, 129, 0.3);
}
:root[data-theme="light"] .treasure-button:active {
  box-shadow: 0 0 0 #059669;
  transform: translateY(4px);
}
:root[data-theme="light"] .treasure-inline-empty {
  background: var(--surface-sunken);
  border-color: var(--border);
}
:root[data-theme="light"] .leader-row {
  background: var(--surface-sunken);
}
:root[data-theme="light"] .leader-name { color: var(--ink); }
:root[data-theme="light"] .leader-metric { color: var(--muted); }
:root[data-theme="light"] .top-ten-pill {
  background: var(--surface-sunken);
  color: var(--muted);
}


/* WordBank mastery heroes and XP in rankings. */
.rank-mastery-hero {
  position: absolute !important;
  inset: 0;
  z-index: 2 !important;
  display: block;
  color: inherit;
  text-decoration: none;
}
.rank-mastery-hero > img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center top;
  filter: drop-shadow(0 18px 16px rgba(0,0,0,.3));
}
.rank-mastery-hero > span {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  min-width: 118px;
  padding: 8px 11px;
  border: 1px solid rgba(255,215,72,.54);
  border-radius: 14px;
  background: rgba(2,40,30,.82);
  color: #fff7cb;
  text-align: left;
  backdrop-filter: blur(6px);
}
.rank-mastery-hero small { color: #bff27d; font-size: .68rem; font-weight: 900; }
.rank-mastery-hero strong { color: #fff; font-size: .9rem; }
.rank-mastery-hero em { color: #ffd84d; font-size: .74rem; font-style: normal; font-weight: 900; }
.leader-identity { display: grid; gap: 2px; min-width: 0; }
.leader-identity > small {
  overflow: hidden;
  color: #c6e58c;
  font-size: .66rem;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
:root[data-theme="light"] .leaderboard-card .leader-identity > small {
  color: #684800 !important;
}
@media (max-width: 560px) {
  .rank-mastery-hero > span { top: 8px; right: 8px; min-width: 104px; padding: 6px 8px; }
  .rank-mastery-hero strong { font-size: .78rem; }
  .leader-identity > small { font-size: .54rem; }
}

.ranking-method-note {
  margin: -2px 4px 8px !important;
  color: var(--treasure-muted);
  font-size: .68rem;
  font-weight: 750;
  text-align: center;
}
:root[data-theme="light"] .leaderboard-card .ranking-method-note {
  color: #684800 !important;
}
