/* Gacha Focus public site ----------------------------------------------------
 * Server banner palette (dusty pink, cream, warm charcoal), rounded Fredoka
 * headings. The heart of it is the timeline (one bar per banner/event, like
 * wuwatracker.com/timeline); a bar opens the item's embed. Games are told
 * apart by their icons, and each game's kinds by its own items.
 * Breakpoints: desktop > 1100px · tablet 701–1100px · phone ≤ 700px.
 */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/fredoka-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/fredoka-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --bg: #fbf3ef;
  --bg-elevated: #ffffff;
  --surface: #ffffff;
  --surface-sunken: #f7e9e4;
  --line: #efd9d1;
  --line-strong: #e2c2b8;
  --text: #2a2427;
  --text-muted: #6f6266;
  --text-faint: #8d7f83;
  --brand: #d48287;
  --brand-strong: #b05f65;
  --brand-soft: rgba(212, 130, 135, 0.16);
  --on-brand: #ffffff;
  --sticker: rgba(196, 117, 122, 0.28);
  --dot: rgba(196, 117, 122, 0.12);
  --success: #1f8f5f;
  --success-soft: rgba(31, 143, 95, 0.14);
  --warning: #a86a00;
  --warning-soft: rgba(214, 140, 20, 0.18);
  --danger: #c23848;
  --danger-soft: rgba(194, 56, 72, 0.13);
  --info: #4c5fd0;
  --info-soft: rgba(76, 95, 208, 0.13);
  --font: "Nunito", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-display: "Fredoka", ui-rounded, "SF Pro Rounded", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;
  --radius: 22px;
  --radius-sm: 14px;
  --page: 1200px;
  --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #1c191b;
  --bg-elevated: #231f22;
  --surface: #292427;
  --surface-sunken: #201c1f;
  --line: #3b3337;
  --line-strong: #4d4247;
  --text: #f6ece8;
  --text-muted: #c4b5b7;
  --text-faint: #9a8b8e;
  --brand: #e3979a;
  --brand-strong: #f0b0b2;
  --brand-soft: rgba(227, 151, 154, 0.17);
  --on-brand: #2a1d20;
  --sticker: rgba(0, 0, 0, 0.45);
  --dot: rgba(227, 151, 154, 0.07);
  --success: #57d6a0;
  --success-soft: rgba(87, 214, 160, 0.15);
  --warning: #f3ba4b;
  --warning-soft: rgba(243, 186, 75, 0.15);
  --danger: #ff7a87;
  --danger-soft: rgba(255, 122, 135, 0.15);
  --info: #9aa7ff;
  --info-soft: rgba(154, 167, 255, 0.15);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #1c191b;
    --bg-elevated: #231f22;
    --surface: #292427;
    --surface-sunken: #201c1f;
    --line: #3b3337;
    --line-strong: #4d4247;
    --text: #f6ece8;
    --text-muted: #c4b5b7;
    --text-faint: #9a8b8e;
    --brand: #e3979a;
    --brand-strong: #f0b0b2;
    --brand-soft: rgba(227, 151, 154, 0.17);
    --on-brand: #2a1d20;
    --sticker: rgba(0, 0, 0, 0.45);
    --dot: rgba(227, 151, 154, 0.07);
    --success: #57d6a0;
    --success-soft: rgba(87, 214, 160, 0.15);
    --warning: #f3ba4b;
    --warning-soft: rgba(243, 186, 75, 0.15);
    --danger: #ff7a87;
    --danger-soft: rgba(255, 122, 135, 0.15);
    --info: #9aa7ff;
    --info-soft: rgba(154, 167, 255, 0.15);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 130px; }
body {
  margin: 0;
  color: var(--text);
  font: 16px/1.55 var(--font);
  overflow-x: hidden;
  background: var(--bg);
}
img { max-width: 100%; display: block; }
/* Pictures and icons are not draggable (nor their links). */
img, svg, a { -webkit-user-drag: none; user-drag: none; }
img { user-select: none; -webkit-user-select: none; }
a { color: var(--brand-strong); text-underline-offset: 2px; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 8px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0; font-weight: 600; }
p { margin: 0; }
.muted { color: var(--text-muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--brand); color: var(--on-brand); padding: 8px 12px; border-radius: 12px; z-index: 20; }
.skip:focus { left: 8px; }
.game-icon { border-radius: 7px; flex: none; }
.item-icon { flex: none; object-fit: contain; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }

/* Header ------------------------------------------------------------------ */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg-elevated) 92%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner, .gamebar-inner, .footer-inner, .page { max-width: var(--page); margin: 0 auto; padding-inline: 20px; }
.topbar-inner { display: flex; align-items: center; gap: 18px; height: 62px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font: 600 21px var(--font-display); }
.brand img { border-radius: 50%; }
.brand:hover { color: var(--text); }
.mainnav { display: flex; gap: 2px; align-self: stretch; }
.mainnav a {
  display: inline-flex; align-items: center; flex: none; position: relative;
  color: var(--text-muted); text-decoration: none; font: 500 16px var(--font-display); padding: 0 14px;
}
.mainnav a:hover { color: var(--text); }
.mainnav a[aria-current="page"] { color: var(--text); }
.mainnav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; border-radius: 3px 3px 0 0; background: var(--brand);
}
.lang { color: var(--text-muted); text-decoration: none; font: 500 15px var(--font-display); padding: 6px 12px; border-radius: 999px; }
.lang:hover { color: var(--text); background: var(--surface-sunken); }
.tools { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.theme {
  width: 38px; height: 38px; display: grid; place-items: center; cursor: pointer;
  background: var(--surface); border: 1px solid var(--line); border-radius: 10px; color: var(--text-muted);
}
.theme:hover { color: var(--text); background: var(--surface-sunken); }
.theme svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; }
.theme .icon-moon { display: none; }
:root[data-theme="dark"] .theme .icon-sun { display: none; }
:root[data-theme="dark"] .theme .icon-moon { display: block; }

/* The one game menu: all eight always fit (names shrink to icons on
   narrower screens), and one is always selected. */
.gamebar { border-top: 1px solid var(--line); }
.gamebar-inner { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; padding-block: 8px; }
.gamebar a {
  min-width: 0; display: flex; align-items: center; gap: 8px;
  font: 500 14px/1.1 var(--font-display); color: var(--text-muted); text-decoration: none;
  padding: 4px 8px 4px 4px; border-radius: 12px; border: 1px solid transparent;
}
/* Full names, on up to two lines. */
.gamebar a span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gamebar img { width: 30px; height: 30px; border-radius: 9px; flex: none; }
.gamebar a:hover { color: var(--text); background: var(--surface-sunken); }
.gamebar a[aria-current="page"] { color: var(--text); border-color: var(--brand); background: var(--brand-soft); }
@media (max-width: 1000px) {
  .gamebar-inner { display: flex; justify-content: space-between; }
  .gamebar a { flex: none; }
  .gamebar a:not([aria-current="page"]) span { display: none; }
  .gamebar a:not([aria-current="page"]) { padding: 4px; }
}
@media (max-width: 700px) {
  .gamebar a span { display: none; }
  .gamebar a, .gamebar a:not([aria-current="page"]), .gamebar a[aria-current="page"] { padding: 2px; }
  .gamebar-inner { gap: 2px; }
  .gamebar img { width: 34px; height: 34px; }
  .gamebar a[aria-current="page"] img { box-shadow: 0 0 0 2px var(--brand); }
}

/* Layout ------------------------------------------------------------------ */
.page { padding-top: 30px; padding-bottom: 56px; }
.block { margin-top: 56px; }
.page-head h1 { font-size: clamp(30px, 4vw, 40px); }
.page-head p { color: var(--text-muted); margin-top: 6px; max-width: 70ch; font-size: 17px; }
.game-head { display: flex; align-items: center; gap: 18px; }
.game-head .game-icon { border-radius: 16px; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18); }
.game-stats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; }
.game-stats a { display: inline-flex; align-items: center; gap: 6px; font: 500 15px var(--font-display); color: var(--text-muted); text-decoration: none; }
.game-stats a:hover { color: var(--text); }
.game-stats b { color: var(--text); }
.section-intro { margin: 28px 0 22px; color: var(--text-muted); font-size: 17px; }
.page-head + .block, .page-head + .tiles, .page-head + .tl-wrap { margin-top: 40px; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.section-head h2 { font-size: 24px; display: flex; align-items: center; gap: 10px; }
.count {
  display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px;
  font: 600 13px var(--font-display); color: var(--text-muted); background: var(--surface-sunken);
  border: 1px solid var(--line); border-radius: 999px;
}
.more { font: 500 15px var(--font-display); text-decoration: none; white-space: nowrap; }
.more::after { content: " →"; }
.empty {
  color: var(--text-muted); background: var(--surface); border: 1px dashed var(--line-strong);
  border-radius: 16px; padding: 18px 20px; margin-top: 20px;
}
.jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.jump a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
  font: 500 15px var(--font-display); padding: 4px 6px 4px 6px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--surface);
}
.jump a:hover { border-color: var(--brand); }
.home-grid { display: grid; gap: 0; margin-top: 12px; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 18px 20px; }

/* Chips and badges -------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--font-display);
  padding: 2px 10px 2px 3px; border-radius: 999px; text-decoration: none; white-space: nowrap;
  color: var(--text); background: var(--surface-sunken); border: 1px solid var(--line);
}
.chip .game-icon { width: 22px; height: 22px; border-radius: 999px; }
a.chip:hover { color: var(--text); border-color: var(--brand); }
.badge { display: inline-flex; align-items: center; font: 500 13px var(--font-display); padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.badge-active { background: var(--success-soft); color: var(--success); }
.badge-ending { background: var(--danger-soft); color: var(--danger); }
.badge-upcoming { background: var(--info-soft); color: var(--info); }
.badge-new { background: var(--warning-soft); color: var(--warning); }

/* Server resets (the selected game's header) ------------------------------ */
.game-head { flex-wrap: wrap; }
.game-head-text { flex: 1; min-width: 260px; }
.resets {
  display: grid; grid-template-columns: auto repeat(var(--servers), minmax(0, auto)); gap: 6px 18px; align-items: baseline;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 14px 20px;
}
.resets-server { font: 600 14px var(--font-display); color: var(--text); white-space: nowrap; }
.resets-server small { font-weight: 500; color: var(--text-faint); }
.resets-kind { font: 500 13px var(--font-display); color: var(--text-faint); white-space: nowrap; }
.resets-kind .short { display: none; }
.resets time { font: 600 19px/1.1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }

/* Discord invites ------------------------------------------------------------ */
.discord-pill {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none; color: #fff; background: #5865f2;
  font: 600 15px var(--font-display); padding: 6px 14px 6px 10px; border-radius: 999px;
}
.discord-pill:hover { color: #fff; background: #6773f4; }
.discord-pill svg { width: 20px; height: 20px; fill: currentColor; }
.cta {
  display: flex; align-items: center; gap: 18px; margin-top: 40px; padding: 18px 22px; border-radius: 20px;
  background: linear-gradient(120deg, #5865f2, #7a5af0); color: #fff;
}
.cta-logo { flex: none; width: 52px; height: 52px; display: grid; place-items: center; background: rgba(255, 255, 255, 0.16); border-radius: 16px; }
.cta-logo svg { width: 32px; height: 32px; fill: #fff; }
.cta-text { flex: 1; min-width: 0; }
.cta-text strong { display: block; font: 600 20px/1.2 var(--font-display); }
.cta-text p { margin-top: 4px; color: rgba(255, 255, 255, 0.86); }
.cta .button.discord { margin-top: 0; background: #fff; color: #4752c4; flex: none; }
.cta .button.discord:hover { background: #eef0ff; color: #3c45a5; }

/* Extension tab ------------------------------------------------------------ */
.ext-banner { display: block; width: 100%; height: auto; margin-top: 26px; border-radius: var(--radius); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.22); }
.ext-actions { display: flex; flex-wrap: wrap; gap: 0 12px; margin-top: 8px; }
.ext-actions .button { margin-top: 14px; }
.button.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); }
.button.secondary:hover { border-color: var(--brand); color: var(--text); }
.ext-perks { list-style: none; padding: 0; margin: 18px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.ext-perks li { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.ext-perks strong { display: block; font: 600 19px/1.2 var(--font-display); }
.ext-perks p { margin-top: 6px; color: var(--text-muted); }
.ext-games { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 12px; }
.ext-games a {
  display: inline-flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; font: 600 17px var(--font-display);
}
.ext-games a:hover { border-color: var(--line-strong); }
.ext-games img { border-radius: 12px; }
.ext-games + .section-intro { margin: 14px 0 0; font-size: 15px; }
.ext-steps { margin: 18px 0 0; padding-left: 1.4em; display: grid; gap: 10px; font-size: 17px; }
.ext-steps li::marker { font: 600 17px var(--font-display); color: var(--brand-strong); }

/* Banner showcase (as fan sites show the running banners) ----------------- *
 * The art with the countdown on it, the featured units framed by rarity
 * (5 gold, 4 purple, 3 blue), the dates. A tile opens the banner's embed. */
.section-intro { color: var(--text-muted); margin: -6px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 18px; margin-top: 18px; }
.tile {
  display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.tile:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); }
.tile[hidden] { display: none; }
.tile-art {
  position: relative; display: block; aspect-ratio: 2 / 1; padding: 0; border: 0; cursor: pointer;
  background: var(--surface-sunken); overflow: hidden;
}
.tile-art > img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.tile:hover .tile-art > img { transform: scale(1.03); }
.tile-art::after { content: ""; position: absolute; inset: 55% 0 0; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); }
.tile-game { position: absolute; top: 10px; left: 10px; z-index: 1; }
.tile-game .game-icon { border-radius: 9px; border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35); }
.tile-countdown {
  position: absolute; right: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: baseline; gap: 6px;
  font: 600 16px var(--font-display); color: #fff; background: rgba(20, 16, 18, 0.72); backdrop-filter: blur(4px);
  padding: 4px 12px; border-radius: 999px;
}
.tile-countdown small { font-size: 12px; font-weight: 500; opacity: 0.8; }
.tile-countdown.is-ending { background: var(--danger); }
.tile-countdown.is-coming { background: var(--info); }
.tile-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; flex: 1; }
.tile-kind { display: flex; align-items: center; gap: 6px; font: 500 14px var(--font-display); color: var(--text-muted); }
.tile-title { font-size: 19px; }
.tile-title button {
  all: unset; cursor: pointer; overflow-wrap: anywhere;
}
.tile-title button:hover { color: var(--brand-strong); }
.tile-title button:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 6px; }
.tile-featured { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 8px; }
.tile-featured li { display: grid; justify-items: center; gap: 4px; width: 64px; text-align: center; }
.tile-featured img, .tile-featured .featured-blank {
  width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--surface-sunken);
  border: 3px solid var(--line); box-sizing: border-box;
}
.tile-featured li.rarity-5 img { border-color: #e6ae48; background: linear-gradient(160deg, #6b4a24, #b98535); }
.tile-featured li.rarity-4 img { border-color: #a274e0; background: linear-gradient(160deg, #3e2d63, #7a55b4); }
.tile-featured li.rarity-3 img { border-color: #5a9de0; background: linear-gradient(160deg, #233d61, #3f6fa8); }
.tile-featured span { font: 500 12px/1.2 var(--font-display); color: var(--text-muted); overflow-wrap: anywhere; }
.tile-featured li.rarity-5 span { color: var(--text); }
.tile-dates { margin-top: auto; font-size: 13px; color: var(--text-faint); font-weight: 700; }

/* Timeline ---------------------------------------------------------------- *
 * One column per day (--day wide). Bars sit at --start days for --len days;
 * site.js paints each bar with its art's average color and scrolls today
 * into view. */
.tl-wrap {
  margin-top: 22px; overflow-x: auto; background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.tl { --day: 42px; position: relative; width: calc(var(--days) * var(--day)); padding-bottom: 14px; }
.tl-head { position: relative; border-bottom: 1px solid var(--line); }
/* Each month spans its days; its name sticks to the visible left edge. */
.tl-months { display: flex; height: 36px; }
.tl-months span { flex: none; width: calc(var(--len) * var(--day)); padding-top: 8px; }
.tl-months b {
  position: sticky; left: 0; display: inline-block; padding: 0 12px;
  font: 600 20px var(--font-display); color: var(--brand-strong); white-space: nowrap;
}
.tl-days { display: grid; grid-template-columns: repeat(var(--days), var(--day)); padding: 4px 0 8px; }
.tl-days span { display: grid; justify-items: center; gap: 1px; }
.tl-days small { font: 500 12px var(--font-display); color: var(--text-faint); }
.tl-days b { font: 600 15px var(--font-display); width: 30px; height: 26px; display: grid; place-items: center; border-radius: 999px; }
.tl-days .is-weekend small { color: var(--brand); }
.tl-days .is-today b { background: var(--brand); color: var(--on-brand); }
.tl-body { position: relative; padding-top: 4px; }
.tl-grid { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--days), var(--day)); pointer-events: none; }
.tl-grid i { border-left: 1px solid color-mix(in srgb, var(--line) 60%, transparent); }
.tl-grid i.is-weekend { background: color-mix(in srgb, var(--surface-sunken) 55%, transparent); }
.tl-now {
  position: absolute; top: -50px; bottom: 0; left: calc(var(--now) * var(--day)); width: 2px;
  background: var(--brand); z-index: 4; pointer-events: none;
}
.tl-now span {
  position: absolute; top: -2px; left: 50%; transform: translateX(-50%); white-space: nowrap;
  font: 600 12px var(--font-display); color: var(--on-brand); background: var(--brand); padding: 2px 8px; border-radius: 999px;
}
.tl-now span:empty { display: none; }
.tl-lane { position: relative; z-index: 2; padding: 6px 0 10px; }
.tl-lane + .tl-lane { border-top: 1px solid var(--line); }
.tl-lane-head { position: sticky; left: 0; display: inline-flex; padding: 6px 12px 2px; }
.tl-lane-head a {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--text);
  font: 600 16px var(--font-display); background: var(--surface); padding: 3px 12px 3px 3px; border-radius: 999px;
  border: 1px solid var(--line);
}
.tl-lane-head a:hover { border-color: var(--brand); }
.tl-row { position: relative; height: 40px; margin-top: 8px; }
.tl-bar {
  --bar: var(--brand-strong);
  position: absolute; top: 0; left: calc(var(--start) * var(--day)); width: calc(var(--len) * var(--day));
  height: 40px; display: flex; align-items: center; padding: 0; overflow: clip;
  border: 0; border-radius: 10px; cursor: pointer; text-align: left;
  background: var(--bar); color: #fff; font: 500 15px var(--font-display);
  transition: filter 0.15s, transform 0.15s;
}
.tl-bar:hover { filter: brightness(1.12); transform: translateY(-1px); }
.tl-bar.cut-start { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.tl-bar.cut-end { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.tl-bar.is-coming { box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.35); }
/* Icon and title stick to the visible left edge when the bar starts before it
   (overflow: clip, not hidden, so the bar is no scroll container). */
.tl-tag {
  position: sticky; left: 0; z-index: 1; display: inline-flex; align-items: center; gap: 8px;
  min-width: 0; max-width: 100%; padding: 0 12px 0 8px;
}
.tl-bar .item-icon { width: 24px; height: 24px; }
.tl-label { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); }
.tl-art {
  position: absolute; right: 0; top: 0; height: 100%; width: min(55%, 240px); object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 70%); mask-image: linear-gradient(to right, transparent, #000 70%);
}
.tl-pill {
  position: absolute; top: 9px; left: calc((var(--start) + var(--len)) * var(--day) + 6px); z-index: 3;
  font: 600 12px var(--font-display); color: var(--text-muted); background: var(--surface-sunken);
  border: 1px solid var(--line); padding: 1px 7px; border-radius: 999px; white-space: nowrap; pointer-events: none;
}
.tl-pill.before { left: auto; right: calc(100% - var(--start) * var(--day) + 6px); }

/* Embed (popover from a bar, or inline in a digest) ------------------------ */
.embed { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 22px; overflow: hidden; }
.embed.is-popover {
  width: min(760px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); overflow-y: auto; padding: 0;
  margin: auto; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); overscroll-behavior: contain;
}
.embed.is-popover::backdrop { background: rgba(14, 10, 12, 0.62); backdrop-filter: blur(3px); }
.embed-close {
  position: absolute; top: 12px; right: 12px; z-index: 2; width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 999px; cursor: pointer; background: rgba(20, 16, 18, 0.7); color: #fff;
}
.embed-close svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.embed-close:hover { background: rgba(20, 16, 18, 0.9); }
/* The whole art at its own proportion; a tall one keeps its sides blurred. */
.embed-art { position: relative; overflow: hidden; background: #141113; }
.embed-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: blur(22px) brightness(0.5); transform: scale(1.2); }
.embed-picture { position: relative; width: 100%; height: auto; max-height: 56vh; object-fit: contain; margin: 0 auto; }
.embed-body { display: flex; flex-direction: column; gap: 14px; padding: 20px 24px 24px; }
.embed-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kind { display: inline-flex; align-items: center; gap: 6px; font: 500 14px var(--font-display); color: var(--text-muted); }
.embed-title { font-size: 26px; overflow-wrap: anywhere; }
.embed-note { font-size: 15px; background: var(--brand-soft); padding: 10px 14px; border-radius: 12px; }
.sub { font: 600 14px var(--font-display); color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: -6px; }
.description { font-size: 15px; color: var(--text-muted); white-space: pre-line; overflow-wrap: anywhere; }
.period { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.period div { background: var(--surface-sunken); border-radius: 12px; padding: 10px 14px; }
.period dt { font: 500 13px var(--font-display); color: var(--text-faint); }
.period dd { margin: 2px 0 0; font-size: 15px; font-weight: 700; }
.period .is-ending { background: var(--danger-soft); }
.relative { display: block; font-weight: 700; font-size: 13px; color: var(--text-muted); }
.relative:empty { display: none; }
.period .is-ending .relative { color: var(--danger); }
.rewards { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.rewards li {
  display: inline-flex; align-items: center; gap: 6px; font-size: 14px; padding: 3px 11px 3px 4px;
  background: var(--surface-sunken); border: 1px solid var(--line); border-radius: 999px;
}
.rewards li img { width: 26px; height: 26px; object-fit: contain; }
.rewards.compact li { font-size: 13px; }
.rewards.compact li img { width: 22px; height: 22px; }
.rewards .reward-dot { width: 8px; height: 8px; margin: 0 4px 0 7px; border-radius: 50%; background: var(--brand); }
.featured { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.featured li { display: flex; align-items: center; gap: 10px; min-width: 0; background: var(--surface-sunken); border-radius: 14px; padding: 6px 10px 6px 6px; }
.featured img, .featured-blank { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; flex: none; background: var(--surface); }
.featured strong { display: block; font: 600 16px var(--font-display); overflow-wrap: anywhere; }
.featured small { display: block; font-size: 13px; color: var(--text-muted); font-weight: 700; }
.source { font: 500 15px var(--font-display); text-decoration: none; }
.source::after { content: " ↗"; }
.embeds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }

/* Codes ------------------------------------------------------------------- */
/* Every card of a row has the same height: rewards in the middle, the
   expiry line at the bottom. */
.codes-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; align-items: stretch; }
.codes-list.side { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 10px; }
.code { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; min-width: 0; }
.side .code { background: var(--surface-sunken); border-color: transparent; padding: 12px 14px; }
.code-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.code-value {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%; cursor: pointer;
  font: 800 16px/1 var(--font-mono); letter-spacing: 0.05em; color: var(--text);
  background: var(--bg-elevated); border: 2px dashed var(--brand); border-radius: 12px; padding: 9px 12px;
}
.code-value span { overflow-wrap: anywhere; text-align: left; }
.code-value svg { width: 17px; height: 17px; flex: none; fill: none; stroke: var(--brand-strong); stroke-width: 2; }
.code-value:hover { background: var(--brand-soft); }
.code-value.is-copied { border-style: solid; border-color: var(--success); color: var(--success); }
.code .rewards { flex: 1; align-content: flex-start; }
.code-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--text-muted); }
.code-foot .relative { display: inline; margin-left: 4px; }
.redeem { font: 600 14px var(--font-display); text-decoration: none; color: var(--on-brand); background: var(--brand); padding: 4px 12px; border-radius: 999px; }
.redeem:hover { color: var(--on-brand); filter: brightness(1.08); }
.redeem::after { content: " ↗"; }
.where { margin-top: 12px; font-size: 14px; color: var(--text-muted); }

/* News -------------------------------------------------------------------- */
.digest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.digest-list.wide { margin-top: 24px; }
.digest-list.side { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 10px; }
.digest-list a {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; height: 100%; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px; text-decoration: none; color: var(--text);
}
.digest-list.side a { background: var(--surface-sunken); border-color: transparent; padding: 12px 14px; }
.digest-list a:hover { color: var(--text); border-color: var(--brand); }
.digest-list strong { font: 600 18px/1.25 var(--font-display); }
.digest-list small { color: var(--text-muted); font-size: 13px; }
.digest { max-width: 1000px; margin: 0 auto; }
.digest-head { margin-bottom: 20px; }
.back { font: 500 15px var(--font-display); text-decoration: none; }
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 18px; color: var(--text-muted); font-weight: 700; font-size: 14px; }
.digest-head h1 { margin-top: 10px; font-size: clamp(30px, 4vw, 42px); }
.prose { font-size: 17px; }
.prose p + p, .prose p + ul, .prose ul + p { margin-top: 12px; }
.prose h3 { margin: 22px 0 8px; font-size: 22px; }
.prose .subtext { font-size: 14px; color: var(--text-muted); }
.digest-section { margin-top: 36px; }
.digest-section h2 { font-size: 24px; margin-bottom: 14px; }
.prose-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; font-size: 16px; }
.cite { font-size: 11px; font-weight: 800; margin-left: 2px; }
.cite a { text-decoration: none; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.timeline li { display: grid; grid-template-columns: minmax(150px, 220px) 1fr; gap: 14px; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; }
.timeline-when { font: 500 15px var(--font-display); color: var(--text-muted); }
.sources ol { margin: 0; padding-left: 26px; display: grid; gap: 6px; font-size: 14px; }
.sources li:target { background: var(--brand-soft); border-radius: 6px; }

/* Hero (Discord invite) --------------------------------------------------- */
.hero {
  display: grid; grid-template-columns: 1.15fr 1fr; align-items: center; gap: 8px;
  background: #231f22; color: #fbeae5; border-radius: 24px; overflow: hidden;
}
.hero-text { padding: 30px 40px 30px 12px; }
.hero h2 { font-size: clamp(34px, 4.5vw, 50px); color: #fbeae5; }
.hero p { margin-top: 10px; font-size: 18px; color: #e4c9c6; max-width: 34ch; }
.hero-art { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; margin-top: 22px;
  padding: 0 22px; border-radius: 14px; font: 600 17px var(--font-display); text-decoration: none; border: 0;
}
.button.primary { background: var(--brand); color: var(--on-brand); }
.button.discord { background: #5865f2; color: #fff; }
.button.discord:hover { background: #6773f4; color: #fff; }
.button.discord svg { width: 24px; height: 24px; fill: currentColor; }

.not-found { display: grid; justify-items: center; gap: 12px; text-align: center; padding: 60px 0; }
.not-found img { border-radius: 50%; }
.not-found p { color: var(--text-muted); }

/* Footer ------------------------------------------------------------------ */
.footer { border-top: 1px solid var(--line); background: var(--bg-elevated); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 24px; }
.footer-brand { display: flex; align-items: center; gap: 10px; max-width: 60ch; font-size: 13px; color: var(--text-muted); }
.footer-brand img { border-radius: 50%; flex: none; }
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; font: 500 15px var(--font-display); }
.footer-links a { text-decoration: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 1100px) {
  .embeds { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  .topbar-inner { flex-wrap: wrap; gap: 0 8px; height: auto; padding-top: 8px; }
  .mainnav { order: 3; width: calc(100% + 28px); margin: 0 -14px; padding: 0 10px; height: 44px; overflow-x: auto; scrollbar-width: none; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { padding: 0 11px; font-size: 15px; }
  .topbar-inner, .gamebar-inner, .footer-inner, .page { padding-inline: 14px; }
  .page { padding-top: 20px; }
  .tl { --day: 36px; }
  .resets { width: 100%; gap: 6px 12px; padding: 12px 14px; }
  .resets time { font-size: 14px; }
  .resets-server small { display: block; }
  .resets-kind .long { display: none; }
  .resets-kind .short { display: inline; }
  .discord-pill span { display: none; }
  .discord-pill { padding: 7px; }
  .cta { flex-wrap: wrap; }
  .cta .button.discord { width: 100%; }
        .tiles { grid-template-columns: minmax(0, 1fr); }
  .tl-bar { font-size: 14px; }
  .codes-list, .digest-list, .codes-list.side, .digest-list.side { grid-template-columns: minmax(0, 1fr); }
  .period { grid-template-columns: minmax(0, 1fr); }
  .embed-body { padding: 16px 16px 20px; }
  .embed-title { font-size: 22px; }
  .hero { grid-template-columns: 1fr; }
  .hero-text { padding: 4px 20px 26px; }
  .hero-art { max-height: 220px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
