/* The big "What's new" (client/whatsnew.ts bigHtml): a numbered update with one lead card, smaller parts with
   screenshots, what is still on, and the update's patch notes under their own tab. Cole 2026-11-12: longer cards you
   can scroll. So this pop-up scrolls inside its frame (the banner scrolls away, the tabs stay), and nothing else
   moves; every other screen keeps the no-scroll rule. The small pop-up (codex.css .wn) is unchanged. */

.wn.big { position: relative; width: min(1040px, 100%); height: min(880px, calc(100vh - 32px)); height: min(880px, calc(100dvh - 32px)); }
.wn.big > .wn-x { top: 12px; right: 12px; z-index: 4; }
.wn-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--gilt-lo) transparent; }
.wn-scroll::-webkit-scrollbar { width: 8px; }
.wn-scroll::-webkit-scrollbar-thumb { background: var(--gilt-lo); border-radius: 4px; }
.wn.big .wn-hero { min-height: 200px; }
.wn.big .wn-head h2 { font-size: 50px; }

/* Highlights · Patch notes: held under the close button once the banner has scrolled away. */
.wn-tabs { position: sticky; top: 0; z-index: 3; display: flex; gap: 4px; padding: 10px 64px 0 18px;
  background: url(themes/codex/vellum.svg) 0 0 / 300px, var(--vellum); box-shadow: inset 0 -1px 0 var(--rule-soft), 0 6px 10px -8px rgba(60, 40, 20, .35); }
.wn-tabs button { position: relative; padding: 8px 14px 11px; border: 0; background: none; cursor: pointer; font: 700 15px/1 var(--display); letter-spacing: .04em; color: var(--muted); }
.wn-tabs button[aria-selected="true"] { color: var(--rg-rubric); }
.wn-tabs button[aria-selected="true"]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 3px; border-radius: 2px 2px 0 0; background: var(--gilt); box-shadow: 0 0 0 1px var(--gilt-lo); }
.wn-tabs button:hover, .wn-tabs button:focus-visible { outline: 0; color: var(--ink); }

.wn-page { display: grid; gap: 16px; padding: 18px 22px 24px; animation: wn-in .3s backwards; }
.wn-page[hidden] { display: none; }

/* Screenshots: 16:9, shot at 2x in a real browser (public/news). Game art sits on the cards' dusk instead. */
.wn-shot { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #23243a; outline: 1px solid var(--edge); outline-offset: -1px; }
.wn-shot.art { display: grid; place-items: center;
  background: radial-gradient(ellipse at 50% 70%, rgba(255, 196, 120, .4), transparent 62%), linear-gradient(180deg, #23243a, #33304a 70%, #43384a); }
.wn-shot.art img { width: 44%; height: 70%; object-fit: contain; image-rendering: pixelated; filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .3)); }

/* The one big card on top. */
.wn-lead { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); align-items: center; gap: 22px; margin: 0; padding: 12px; text-align: left;
  font: inherit; color: inherit; border: 0; border-radius: 2px; background: var(--inlay); box-shadow: inset 0 0 0 1px var(--rule-soft), 0 3px 0 -1px var(--gilt-lo); }
.wn-lead .wn-shot { box-shadow: 0 2px 0 rgba(60, 40, 20, .25); }
.wn-lead .wn-txt { gap: 8px; padding: 0 8px 0 0; }
.wn-lead .wn-txt b { font-size: 32px; }
.wn-lead .wn-txt span { font-size: 17px; line-height: 1.4; color: var(--ink); text-wrap: pretty; }

/* The smaller parts under it. */
.wn-secs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.wn-secs.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wn-sec { display: grid; grid-template-rows: auto 1fr; gap: 10px; margin: 0; padding: 0 0 13px; text-align: left; font: inherit; color: inherit;
  border: 0; border-radius: 2px; background: var(--inlay); box-shadow: inset 0 0 0 1px var(--rule-soft); animation: wn-in .4s backwards; }
.wn-sec:nth-child(2) { animation-delay: .05s; } .wn-sec:nth-child(3) { animation-delay: .1s; } .wn-sec:nth-child(n+4) { animation-delay: .15s; }
.wn-sec .wn-txt { padding: 0 14px; }
.wn-sec .wn-txt b { font-size: 20px; }
.wn-sec .wn-txt span { text-wrap: pretty; }
/* Three across: a last row of two shares the width, and a last one alone runs across with its picture beside the
   words, so no row is left with a hole. Wide screens only; phones list the parts as rows. */
@media (min-width: 601px) {
  .wn-secs.c3 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .wn-secs.c3 > .wn-sec { grid-column: span 2; }
  .wn-secs.c3 > .wn-sec:nth-child(3n+1):nth-last-child(2), .wn-secs.c3 > .wn-sec:nth-child(3n+2):last-child { grid-column: span 3; }
  .wn-secs.c3 > .wn-sec:nth-child(3n+1):last-child { grid-column: 1 / -1; grid-template-columns: calc((100% - 28px) / 3) minmax(0, 1fr); grid-template-rows: none; align-items: center; gap: 18px; padding: 0; }
  .wn-secs.c3 > .wn-sec:nth-child(3n+1):last-child .wn-txt { padding: 10px 22px 10px 0; }
  .wn-secs.c3 > .wn-sec:nth-child(3n+1):last-child .wn-txt b { font-size: 24px; }
}
button.wn-lead, button.wn-sec { cursor: pointer; transition: box-shadow .15s, transform .15s; }
button.wn-lead:hover, button.wn-lead:focus-visible, button.wn-sec:hover, button.wn-sec:focus-visible { outline: 0; transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px var(--gilt), 0 0 0 2px var(--gilt-hi), 0 6px 14px rgba(60, 40, 20, .25); }
button.wn-lead .wn-txt b::after, button.wn-sec .wn-txt b::after { content: ' \203A'; color: var(--gilt-lo); }

/* Still on: the running event and the pass, as slim rows. */
.wn-sub { display: flex; align-items: center; gap: 12px; margin: 6px 0 -4px; font: 700 12px/1 var(--pixel); letter-spacing: .18em; text-transform: uppercase; color: var(--gilt-lo); }
.wn-sub::after { content: ''; flex: 1; height: 1px; background: var(--rule-soft); }
.wn-cards.slim { padding: 0; gap: 12px; }
.wn-cards.slim.n3, .wn-cards.slim.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.wn-cards.slim .wn-card { grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: none; align-items: center; gap: 14px; padding: 0; text-align: left; }
.wn-cards.slim .wn-pic { height: 84px; }
.wn-cards.slim .wn-pic img { width: 64px; height: 64px; }
.wn-cards.slim .wn-txt { padding: 8px 12px 8px 0; }

/* Patch notes: what changed in words, never by how much. Two balanced columns, read down. */
.wn-page.wn-notes { display: block; columns: 2; column-gap: 32px; }
.wn-page.wn-notes[hidden] { display: none; }
.wn-notes section { break-inside: avoid; padding-bottom: 22px; }
.wn-notes h3 { margin: 0 0 10px; padding-bottom: 7px; font: 700 23px/1 var(--display); color: var(--rg-rubric); border-bottom: 1px solid var(--rule-soft); }
.wn-notes ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.wn-notes li { position: relative; padding-left: 20px; font: 15.5px/1.38 var(--sans); color: var(--ink); text-wrap: pretty; }
.wn-notes li::before { content: ''; position: absolute; left: 4px; top: .52em; width: 6px; height: 6px; transform: rotate(45deg); background: var(--gilt); box-shadow: 0 0 0 1px var(--gilt-lo); }

@media (prefers-reduced-motion: reduce) { .wn-page, .wn-sec { animation: none; } }

/* The itch frame and other short windows: a smaller banner, so the lead card shows at once. */
@media (max-height: 640px) and (min-width: 601px) {
  .wn.big .wn-hero { aspect-ratio: auto; height: 180px; min-height: 0; }
  .wn.big .wn-head h2 { font-size: 42px; }
}

@media (max-width: 600px) {
  .wn.big { height: calc(100vh - 32px); height: calc(100dvh - 32px); }
  .wn.big .wn-head h2 { font-size: 36px; }
  .wn-tabs { padding: 8px 56px 0 8px; }
  .wn-tabs button { padding: 8px 10px 11px; font-size: 14.5px; }
  .wn-page { gap: 10px; padding: 12px 12px 18px; }
  .wn-lead { grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 0 0 13px; }
  .wn-lead .wn-txt { gap: 5px; padding: 0 13px; }
  .wn-lead .wn-txt b { font-size: 25px; }
  .wn-lead .wn-txt span { font-size: 15.5px; }
  .wn-secs, .wn-secs.c2 { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .wn-sec { grid-template-columns: 44% minmax(0, 1fr); grid-template-rows: none; align-items: center; gap: 11px; padding: 0; }
  .wn-sec .wn-txt { gap: 2px; padding: 8px 10px 8px 0; }
  .wn-sec .wn-txt b { font-size: 17px; }
  .wn-sec .wn-txt span { font-size: 14px; line-height: 1.28; }
  .wn-cards.slim, .wn-cards.slim.n3, .wn-cards.slim.n4 { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .wn-cards.slim .wn-card { grid-template-columns: 76px minmax(0, 1fr); }
  .wn-cards.slim .wn-pic { height: 76px; }
  .wn-cards.slim .wn-pic img { width: 60px; height: 60px; }
  .wn-page.wn-notes { columns: 1; }
  .wn-notes section { padding-bottom: 18px; }
  .wn-notes h3 { font-size: 21px; }
  .wn-notes li { font-size: 15px; }
}
/* The XP boost sticker (client/whatsnew.ts boostSticker): a gilt seal in the banner's bottom-right corner, there only
   while the boost runs. */
.wn-boost { position: absolute; right: 18px; bottom: 14px; z-index: 3; width: 84px; height: 84px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; transform: rotate(-9deg); background: radial-gradient(circle at 35% 30%, #fff1b8, #f0c45a 45%, #c8862a 100%); color: #4a2408; box-shadow: 0 0 0 3px #7a2e12, 0 0 0 5px #f0d08a, 0 8px 18px rgba(0, 0, 0, .5); font-family: 'Crimson Pro', Georgia, serif; line-height: 1; text-align: center; pointer-events: auto; }
.wn-boost b { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.wn-boost span { font-size: 15px; font-weight: 800; letter-spacing: .08em; }
.wn-boost em { margin-top: 3px; font-size: 11px; font-style: normal; font-weight: 700; color: #6b3410; }
@media (max-width: 520px) { .wn-boost { width: 66px; height: 66px; right: 10px; bottom: 10px; } .wn-boost b { font-size: 19px; } .wn-boost span { font-size: 12px; } .wn-boost em { font-size: 9.5px; } }
