/* The monthly board is contained within the existing member workspace. */
main:has(#s-leaderboard.on .monthly-panel) #pageHeading .page-heading,
main:has(#s-leaderboard.on .monthly-panel) #pageHeading .compact-sync { display: none; }
#s-leaderboard .monthly-panel {
  --podium-ink: #f4f5ee;
  --podium-muted: #bec9c1;
  --podium-line: #33403a;
  --podium-volt: #e9ff29;
  --podium-surface: #080f0b;
  margin: 0 auto;
  max-width: 1160px;
  min-width: 0;
  font-family: 'P2R Sans', system-ui, sans-serif;
  color: var(--podium-ink);
  background: var(--podium-surface);
  border: 1px solid var(--podium-line);
  border-radius: 16px;
  overflow: hidden;
}
.monthly-panel *, .monthly-panel *::before, .monthly-panel *::after { box-sizing: border-box; }
.monthly-panel :is(h1,h2,p,ol) { margin: 0; }
.monthly-panel :is(h1,h2,.medal-number,.monthly-rank) { font-family: 'P2R Display','Arial Narrow',sans-serif; font-weight: 800; font-style: italic; }
.monthly-showcase { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(245px,1fr); align-items: center; }
.monthly-podium, .monthly-prize, .monthly-cards { min-width: 0; }
.monthly-photo { position: relative; isolation: isolate; container-type: inline-size; background: #0a1410; }
.monthly-scenery { display: block; width: 100%; height: auto; aspect-ratio: 5 / 4; }
.monthly-heading { position: absolute; top: 4.5%; left: 5%; right: 25%; color: #fafbf5; text-shadow: 0 1px 12px #05100b; }
.monthly-heading h1 { font-size: clamp(29px,9cqw,63px); line-height: .94; letter-spacing: -.012em; text-transform: none; }
.monthly-heading p { margin-top: 1.6%; font-size: clamp(13px,3.4cqw,22px); font-weight: 700; line-height: 1.38; }
.monthly-heading [data-stage] { display: block; color: #dae4d9; font-size: clamp(11px,2.8cqw,16px); line-height: 1.35; }
.monthly-winners, .monthly-rows { padding: 0; list-style: none; }
.medal-place { position: absolute; width: 26%; transform: translateX(-50%); display: grid; justify-items: center; text-align: center; line-height: 1.13; text-shadow: 0 1px 4px #000,0 1px 10px #000; }
.medal-place-1 { top: 60%; left: 50%; }
.medal-place-2 { top: 65%; left: 21.4%; }
.medal-place-3 { top: 68%; left: 79%; }
.medal-number { font-size: clamp(19px,5.1cqw,39px); line-height: .95; }
.medal-place strong { display: block; width: 100%; margin-top: 2px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: clamp(13px,3.8cqw,25px); line-height: 1.11; font-style: italic; color: #fff; }
.medal-place small { display: block; margin-top: 2px; font-size: clamp(11px,2.9cqw,17px); color: #f1f4ef; }
.medal-place.is-mine strong, .monthly-rows .is-mine .monthly-name { color: var(--podium-volt); }
.monthly-scoring { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 7px 5% 12px; color: var(--podium-muted); font-size: .85rem; line-height: 1.4; text-align: center; }
.monthly-scoring::before,.monthly-scoring::after { content: ''; flex: 1; max-width: 70px; height: 1px; background: var(--podium-line); }
.monthly-prize { padding: clamp(16px,2.5vw,32px); }
.monthly-prize h2 { color: var(--podium-volt); font-size: clamp(29px,3.4vw,46px); line-height: 1; text-transform: none; }
.monthly-prize p { margin: 7px 0 13px; font-size: 1rem; line-height: 1.42; }
.monthly-cards { overflow: hidden; border: 1px solid #303b32; border-radius: 10px; background: #101e15; color: var(--podium-ink); }
.monthly-card-track { display: flex; overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none; }
.monthly-card-track::-webkit-scrollbar { display: none; }
.monthly-slide { display: grid; place-items: center; min-width: 0; flex: 0 0 100%; scroll-snap-align: start; scroll-snap-stop: always; background: radial-gradient(ellipse,#182e21,#09150f); }
.monthly-slide img { width: auto; height: auto; max-width: 100%; max-height: clamp(146px,18vw,210px); display: block; user-select: none; }
.monthly-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 4px; padding-inline: 12px 5px; min-height: 38px; border-top: 1px solid #29372f; background: #0d1710; }
.monthly-card-footer [data-edition] { font-size: .82rem; font-weight: 650; line-height: 1.2; font-variant-numeric: tabular-nums; }
.monthly-dots { display: flex; }
.monthly-dots button { display: grid; place-items: center; width: 38px; min-height: 38px; border: 0; padding: 0; border-radius: 6px; background: transparent; color: inherit; }
.monthly-dots button span { width: 7px; height: 7px; background: #859389; border-radius: 8px; }
.monthly-dots [aria-pressed=true] span { width: 18px; background: var(--podium-volt); }
.monthly-panel button:focus-visible,.monthly-panel summary:focus-visible { outline: 2px solid var(--podium-volt); outline-offset: -2px; }
.monthly-standings { padding: 18px clamp(14px,3vw,35px) 20px; border-top: 1px solid var(--podium-line); }
.monthly-section-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.monthly-section-heading h2 { font-size: clamp(28px,3vw,37px); line-height: 1; text-transform: none; }
.monthly-section-heading [data-filled] { font-size: .88rem; color: var(--podium-muted); }
.monthly-message { padding-top: 8px; color: var(--podium-muted); font-size: .9rem; }
.monthly-message[hidden] { display: none; }
.monthly-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-block: 14px 5px; }
#s-leaderboard .monthly-actions button { width: auto; min-height: 40px; padding: 7px 11px; font-size: .87rem; }
.monthly-rules { font-size: .88rem; color: var(--podium-muted); padding-bottom: 5px; }
.monthly-rules summary { cursor: pointer; padding-block: 10px; }
.monthly-rules p { margin-block: 2px 10px; max-width: 72ch; line-height: 1.55; }
.monthly-rows { border-top: 1px solid var(--podium-line); }
.monthly-rows li { min-height: 49px; display: grid; grid-template-columns: 40px minmax(0,1fr) auto; gap: 10px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--podium-line); }
.monthly-rank { font-size: 1.5rem; line-height: 1; }
.monthly-name { font-size: 1rem; overflow-wrap: anywhere; }
.monthly-name small,.monthly-days { font-size: .85rem; color: var(--podium-muted); }
.vacant .monthly-name { color: #aeb8af; font-style: italic; }
.monthly-return { margin-bottom: 12px; }
@media (max-width: 820px) {
  .monthly-showcase { grid-template-columns: 1fr; }
  .monthly-photo { max-width: 620px; margin: 0 auto; }
  .monthly-prize { padding: 8px 16px 17px; }
  .monthly-slide img { max-height: clamp(137px,41vw,178px); }
  .monthly-standings { padding-top: 15px; }
}
@media (max-width: 550px) {
  #s-leaderboard .monthly-panel { border-radius: 10px; margin-inline: -5px; }
  .monthly-prize p { font-size: .94rem; margin-block: 5px 10px; }
  .monthly-card-footer { min-height: 41px; }
  .monthly-rows li { grid-template-columns: 34px minmax(0,1fr) auto; }
}
@media (pointer: coarse) { .monthly-dots button { width: 44px; min-height: 44px; } }
@media (max-width: 345px) {
  .monthly-card-footer { flex-wrap: wrap; justify-content: center; }
  .monthly-heading h1 { font-size: 26px; }
  .monthly-actions { gap: 5px; }
}

.monthly-refresh-mark { display:none; }
@media (max-width: 550px) {
  .monthly-refresh-word { display:none; }
  .monthly-refresh-mark { display:inline; font-size:1.22rem; }
  #s-leaderboard .monthly-actions [data-act=monthlyRefresh] { min-width:44px; }
}
@media (min-width: 821px) {
  #s-leaderboard .monthly-panel { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(280px,1fr); align-items:start; }
  .monthly-showcase { display:block; }
  .monthly-prize { padding:8px 5% 21px; }
  .monthly-slide img { max-height:172px; }
  .monthly-standings { align-self:stretch; padding:24px clamp(16px,2.2vw,29px); border-top:0; border-left:1px solid var(--podium-line); }
  .monthly-rows { max-height:clamp(390px,60vh,750px); overflow-y:auto; scrollbar-color:#56645c transparent; scrollbar-width:thin; }
}
/* Give the podium a single compact header on phones, using the app's existing navigation. */
@media (max-width: 600px) {
  body:has(#s-leaderboard.on .monthly-panel) #hd .row {
    display: flex; flex-wrap: nowrap; align-items: center; gap: 5px; min-height: 55px; height: auto; padding-block: 4px;
  }
  body:has(#s-leaderboard.on .monthly-panel) #hd .row:has(.header-home) .workspace-heading,
  body:has(#s-leaderboard.on .monthly-panel) #hd :is(#hdSub,#streakBtn,.reno-coach) { display:none; }
  body:has(#s-leaderboard.on .monthly-panel) #hd .header-home {
    order: 0; display:inline-flex; align-items:center; flex:1; min-width:0; gap:7px; padding:0;
    background:none; border:0; justify-content:flex-start; font-size:0;
  }
  body:has(#s-leaderboard.on .monthly-panel) #hd .header-home::before {
    content:''; width:32px; height:32px; flex:none; background:url('./assets/brand/volt-pr-logo.webp') center/contain no-repeat;
  }
  body:has(#s-leaderboard.on .monthly-panel) #hd .header-home::after {
    content:'Plans to Riches'; font:750 .96rem/1.2 'P2R Sans',sans-serif; white-space:normal; text-align:left;
  }
  body:has(#s-leaderboard.on .monthly-panel) #hd .command-trigger { order:1; }
  body:has(#s-leaderboard.on .monthly-panel) #hd #accountButton { order:2; font-size:.8rem; padding-inline:8px; }
  body:has(#s-leaderboard.on .monthly-panel) #hd #workspaceMenuToggle { order:3; }
}
