/*
Theme Name: 99 Club
Description: A modern, dark Old School fan-site theme: clean type, gold accents, and the game's own art (the world map, item and skill icons) doing the decorating. Pairs with the TSPS Site plugin.
Version: 4.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: tsps-osrs
*/

@font-face { font-family: "RS Bold"; src: url(assets/fonts/RuneScape-Bold-12.ttf) format("truetype"); font-display: swap; }

:root {
  /* The palette. */
  --bg: #0d0f13;
  --surface: #151920;
  --surface-2: #1b2029;
  --surface-3: #222835;
  --line: #252b36;
  --line-2: #313947;
  --text: #ece9e2;
  --muted: #9aa1ad;
  --faint: #6b7280;
  --gold: #f2b53a;
  --gold-soft: #f6cf74;
  --gold-ink: #2a1c00;
  --green: #3fd17a;
  --red: #ff6a5f;
  --blue: #6aa8ff;
  --radius: 14px;
  --radius-sm: 9px;
  --font: Inter, "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --max: 1200px;

  /* The old theme's names, kept so every page and the plugin's styles follow the new palette. */
  --rs-orange: var(--gold);
  --rs-yellow: var(--gold-soft);
  --rs-green: var(--green);
  --rs-red: var(--red);
  --rs-cyan: #5fd4ff;
  --rs-white: #fff;
  --stone: var(--surface);
  --stone-dark: var(--surface-2);
  --stone-line: var(--line);
  --stone-hi: var(--line-2);
  --parch: var(--surface-2);
  --parch-2: var(--surface-3);
  --parch-ink: var(--text);
  --parch-muted: var(--muted);
  --parch-line: var(--line);
  --chat-blue: var(--text);
  --chat-red: var(--gold);
  --page: var(--bg);
  --font-head: var(--font);
  --font-ui: var(--font);
  --font-small: var(--font);
  --font-body: var(--font);
  --shadow: none;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  color: var(--text); background: var(--bg);
  font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-soft); }
img { max-width: 100%; }
.pixel, .icon, img.icon { image-rendering: pixelated; }

h1, h2, h3, h4 { font-family: var(--font); color: var(--text); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.015em; }
h1 { font-size: 44px; font-weight: 800; }
h2 { font-size: 24px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; }
h4 { font-size: 15px; font-weight: 700; }
.yellow { color: var(--gold-soft); }
.green { color: var(--green); }
.red { color: var(--red); }
.white { color: #fff; }
.muted, .tsps-muted { color: var(--muted); }
.rs { font-size: 15px; }
.wrap { width: min(var(--max), 100% - 48px); margin-inline: auto; }
.label { font-size: 13px; color: var(--muted); }
.small { font-size: 13px; }

/* ------------------------------------------------------------ cards */

.rs-panel, .panel, .card {
  position: relative; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px;
}
.rs-panel .rs-panel { background: var(--surface-2); }
.panel-title, .card-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 0 14px;
}
.panel-title h2, .panel-title h3, .card-title h2, .card-title h3 { margin: 0; font-size: 18px; font-weight: 800; }
.card-title a, .panel-title a { font-size: 14px; font-weight: 600; }

/* What was parchment: lists and leaderboards, now a quieter card. */
.scroll { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--text); }
.scroll a { color: var(--text); font-weight: 600; }
.scroll a:hover { color: var(--gold); }
.scroll h2, .scroll h3 { color: var(--text); }

/* ------------------------------------------------------------ header */

.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(13, 15, 19, .86); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-size: 18px; font-weight: 800; letter-spacing: -.01em; }
.brand:hover { color: var(--text); }
.brand-mark {
  width: 34px; height: 34px; display: grid; place-items: center; border-radius: var(--radius-sm);
  font: 20px "RS Bold", var(--font); color: var(--gold-ink); background: var(--gold);
}
.site-nav { margin-left: 4px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.site-nav li { position: relative; }
.site-nav a { display: block; padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; font-size: 14.5px; white-space: nowrap; }
.site-nav a:hover, .site-nav li:hover > a { color: var(--text); background: var(--surface-2); }
.site-nav .current-menu-item > a, .site-nav .current_page_item > a,
.site-nav .current-menu-ancestor > a, .site-nav .current_page_ancestor > a { color: var(--text); background: var(--surface-2); }
.site-nav .sub-menu, .site-nav .children {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; min-width: 200px; flex-direction: column; gap: 2px;
  background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px; z-index: 5;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
.site-nav .sub-menu::before, .site-nav .children::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; }
.site-nav .sub-menu a, .site-nav .children a { color: var(--text); font-weight: 500; }
.site-nav .sub-menu a:hover, .site-nav .children a:hover { background: var(--surface-3); }
.site-nav li:hover > .sub-menu, .site-nav li:focus-within > .sub-menu,
.site-nav li:hover > .children, .site-nav li:focus-within > .children { display: flex; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.online-pill, .pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 99px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--muted); white-space: nowrap;
}
.online-pill i, .live-pip { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(63, 209, 122, .18); display: inline-block; }
.nav-toggle {
  display: none; margin-left: auto; width: 42px; height: 42px; cursor: pointer; border-radius: 10px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 2px; margin: 0 auto; background: currentColor; position: relative; border-radius: 2px;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ------------------------------------------------------------ buttons */

.btn, .button, .button-ghost, .tsps-play-button, .wp-block-button__link, .tsps-account input[type="submit"], .search-form button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; cursor: pointer; text-decoration: none; border-radius: 10px;
  font: 700 14.5px var(--font); color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2);
  transition: background .15s, border-color .15s;
}
.btn:hover, .button:hover, .button-ghost:hover, .search-form button:hover { color: var(--text); background: var(--surface-3); border-color: #3d4656; }
.button-ghost { background: transparent; }
.tsps-play-button, .btn.gold, .tsps-account input[type="submit"] { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.tsps-play-button:hover, .btn.gold:hover, .tsps-account input[type="submit"]:hover { color: var(--gold-ink); background: var(--gold-soft); border-color: var(--gold-soft); }
.btn.big, .hero .tsps-play-button { padding: 14px 24px; font-size: 16px; }
.link-button { background: none; border: 0; padding: 0 4px; color: var(--gold); font: inherit; font-weight: 600; cursor: pointer; }

/* ------------------------------------------------------------ XP event banner */

.event-banner { background: linear-gradient(90deg, rgba(242, 181, 58, .16), rgba(242, 181, 58, .04)); border-bottom: 1px solid rgba(242, 181, 58, .35); font-size: 14px; }
.event-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px 0; }
.event-banner img { width: 18px; height: 18px; image-rendering: pixelated; }
.event-banner strong { color: var(--gold); }
.event-banner span { color: var(--text); }
.event-banner .when { color: var(--muted); margin-left: auto; }
.event-banner.is-live .when { color: var(--green); font-weight: 600; }

/* ------------------------------------------------------------ layout */

.site-main { padding: 28px 0 72px; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; }
.stack { display: grid; gap: 18px; align-content: start; }
.page-hero { padding: 36px 0 22px; }
.page-hero h1 { margin: 0; }
.page-hero p { margin: 8px 0 0; color: var(--muted); max-width: 680px; font-size: 16px; }
.entry-content > * + * { margin-top: 1em; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > .rs-panel + .rs-panel, .entry-content > .grid + .rs-panel, .entry-content > .rs-panel + .grid { margin-top: 18px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; flex-wrap: wrap; }
.section-head h2 { margin: 0; }
.section-head a { font-size: 14px; font-weight: 600; }
.home-row { margin-bottom: 44px; }

/* ------------------------------------------------------------ home */

.hero { padding: 56px 0 36px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: center; }
.eyebrow { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }
.hero h1 { font-size: 58px; line-height: 1.02; margin: 12px 0 16px; letter-spacing: -.025em; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lede { color: var(--muted); font-size: 18px; max-width: 520px; margin: 0 0 28px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero-mini { display: flex; gap: 26px; margin-top: 30px; color: var(--muted); font-size: 14px; }
.hero-mini b { display: block; color: var(--text); font-size: 21px; font-weight: 800; }
.hero-card { position: relative; display: block; border-radius: 18px; overflow: hidden; border: 1px solid var(--line-2); aspect-ratio: 4 / 3; background: #10161f; }
.hero-card .hero-map { position: absolute; inset: 0; height: auto; }
.hero-card::after { content: ""; position: absolute; inset: 0; z-index: 500; pointer-events: none; background: linear-gradient(180deg, rgba(13, 15, 19, 0) 55%, rgba(13, 15, 19, .92)); }
.hero-card .badge-live { position: absolute; top: 14px; left: 14px; z-index: 600; background: var(--red); color: #fff; font-weight: 800; font-size: 12px; padding: 4px 9px; border-radius: 6px; letter-spacing: .06em; }
.hero-card .hero-cap { position: absolute; left: 18px; right: 18px; bottom: 16px; z-index: 600; display: flex; justify-content: space-between; align-items: end; gap: 12px; color: var(--text); }
.hero-card .hero-cap b { font-size: 17px; }
.hero-card .hero-cap small { color: var(--muted); display: block; }
.hero-map { height: 460px; background: #10161f; }
.hero-map .leaflet-container { background: #10161f; }
.map-badge { display: inline-flex; gap: 8px; align-items: center; }

.stat-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 0 0 44px; }
.stat-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-card small { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.stat-card b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.stat-card em { font-style: normal; color: var(--green); font-size: 13px; font-weight: 600; }

/* ------------------------------------------------------------ status line */

.tsps-status { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; }
.tsps-status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.tsps-status-online { color: var(--green); }
.tsps-status-offline { color: var(--red); }

/* ------------------------------------------------------------ stat strips (pages) */

.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; margin: 0 0 22px; padding: 0 !important; background: none !important; border: 0 !important; }
.stat-strip .stat { padding: 16px 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.stat-label { display: block; font-size: 13px; font-weight: 500; color: var(--muted); }
.stat-value { display: block; font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.2; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.stat-value.live { color: var(--green); }
.stat-value a { color: var(--gold); }

/* ------------------------------------------------------------ activity feed (the old chatbox) */

.chatbox { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; color: var(--text); max-height: 460px; overflow-y: auto; font-size: 14.5px; }
.chatbox.tall { max-height: none; }
.chat-line { display: flex; gap: 12px; align-items: center; padding: 10px 0; line-height: 1.35; border-top: 1px solid var(--line); }
.chat-line:first-child { border-top: 0; }
.chat-line img { width: 36px; height: 32px; padding: 3px; object-fit: contain; image-rendering: pixelated; flex: none; background: var(--surface-2); border-radius: 8px; }
.chat-line .chan { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 2px 7px; border-radius: 5px; }
.chat-line .who { color: var(--text); font-weight: 700; }
.chat-line .who a { color: var(--text); }
.chat-line .what { color: var(--muted); }
.chat-line .what a { color: var(--gold); }
.chat-line .when { margin-left: auto; color: var(--faint); font-size: 12px; white-space: nowrap; padding-left: 10px; }
.chat-line.kind-max .chan, .chat-line.kind-total .chan { color: var(--gold-ink); background: var(--gold); }
.chat-line.kind-clog .chan { color: #e3d2ff; background: #4b2f7a; }
.chat-line.kind-boss .chan { color: #ffd6d2; background: #6b2420; }
.chat-empty { color: var(--muted); padding: 16px 0; }
.chat-more { text-align: center; padding: 10px 0 6px; }
.chat-more button { font: 600 14px var(--font); color: var(--gold); background: none; border: 0; cursor: pointer; }

/* ------------------------------------------------------------ podium, lists */

.podium { display: grid; grid-template-columns: 1fr 1.1fr 1fr; gap: 14px; align-items: end; }
.podium-card { text-align: center; padding: 20px 14px; grid-row: 1; }
.podium-card.second { grid-column: 1; }
.podium-card.first { grid-column: 2; padding-top: 30px; border-color: rgba(242, 181, 58, .5); }
.podium-card.third { grid-column: 3; }
.podium-rank { font-size: 30px; font-weight: 800; color: #c9ced6; }
.first .podium-rank { color: var(--gold); font-size: 44px; }
.third .podium-rank { color: #d9925a; }
.podium-name { display: block; font-size: 19px; font-weight: 800; margin: 4px 0; }
.podium-name a { color: var(--text); }
.podium-meta { color: var(--muted); font-size: 13px; }
.podium-meta b { color: var(--text); }

.player-list { list-style: none; margin: 0; padding: 0; }
.player-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.player-list li:first-child { border-top: 0; }
.player-list .who { flex: 1; min-width: 0; font-weight: 600; }
.player-list .who a { color: var(--text); }
.player-list .who small { display: block; font-size: 12.5px; color: var(--muted); font-weight: 400; }
.player-list .num { text-align: right; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.player-list img.icon { width: 24px; height: 22px; object-fit: contain; }

.avatar { flex: none; width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; font-weight: 800; font-size: 14px; color: #0d0f13; background: var(--avatar-color, var(--gold)); }

.bar { display: block; height: 7px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: var(--w, 0%); background: var(--green); border-radius: 99px; }
.bar.gold > i, .bar-list .bar > i { background: var(--gold); }
.bar.red > i { background: var(--red); }
.bar-list { display: grid; gap: 12px; }
.bar-row { display: grid; gap: 6px; color: var(--text); }
.bar-row:hover { color: var(--gold); }
.bar-row-top { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 14.5px; }
.bar-row-top span:last-child { color: var(--muted); font-weight: 500; }

.sotw { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; }
.sotw-icon { width: 56px; height: 56px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; }
.sotw-icon img { width: 38px; height: 38px; object-fit: contain; image-rendering: pixelated; }
.countdown { font-size: 13.5px; color: var(--muted); }

.news-list { list-style: none; margin: 0; padding: 0; }
.news-list li { padding: 10px 0; border-top: 1px solid var(--line); }
.news-list li:first-child { border-top: 0; }
.news-list time { display: block; font-size: 12.5px; color: var(--faint); }
.news-list a { color: var(--text); font-weight: 600; }
.news-list a:hover { color: var(--gold); }

.steps .card h3 { font-size: 18px; }
.steps .card p { margin: 0; color: var(--muted); }
code { font-family: ui-monospace, Consolas, monospace; font-size: 13.5px; color: var(--gold-soft); background: var(--surface-2); padding: 2px 6px; border-radius: 6px; }

/* ------------------------------------------------------------ forms */

select, input[type="text"], input[type="password"], input[type="email"], input[type="url"], input[type="search"], input[type="number"], input[type="datetime-local"], textarea {
  font: 15px var(--font); color: var(--text); background: var(--surface-2);
  border: 1px solid var(--line-2); border-radius: 10px; padding: 9px 12px; min-height: 42px;
}
select:focus, input:focus, textarea:focus { outline: 2px solid rgba(242, 181, 58, .55); outline-offset: 1px; border-color: var(--gold); }
input::placeholder, textarea::placeholder { color: var(--faint); }
select option { background: var(--surface-2); color: var(--text); }
.search-form { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.search-form input[type="search"] { flex: 1; min-width: 200px; }

/* ------------------------------------------------------------ tabs */

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px; }
.tab, .skill-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 99px;
  font-size: 13.5px; font-weight: 600; color: var(--muted); background: var(--surface); border: 1px solid var(--line);
}
.tab:hover, .skill-tab:hover { color: var(--text); border-color: var(--line-2); }
.tab.is-active, .skill-tab.is-active { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.skill-tab img { width: 18px; height: 18px; image-rendering: pixelated; }
.skill-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.board-heading { display: flex; align-items: center; gap: 12px; margin: 0 0 14px; }
.board-heading img { width: 28px; height: 28px; image-rendering: pixelated; }
.board-heading h2 { margin: 0; font-size: 26px; }
.board-heading small { margin-left: auto; font-size: 13px; color: var(--muted); }
.tsps-hiscores-skill { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 14px; }
.tsps-hiscores-skill label { font-weight: 600; color: var(--muted); }

/* ------------------------------------------------------------ tables */

.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.rs-panel .table-wrap, .scroll .table-wrap { background: transparent; border: 0; border-radius: 0; }
.tsps-hiscores-table, .rs-table { width: 100%; border-collapse: collapse; color: var(--text); font-size: 14.5px; }
.tsps-hiscores-table th, .rs-table th {
  text-align: left; color: var(--faint); font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  padding: 12px 16px 10px; border-bottom: 1px solid var(--line);
}
.tsps-hiscores-table td, .rs-table td { padding: 11px 16px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.tsps-hiscores-table tbody tr:last-child td, .rs-table tbody tr:last-child td { border-bottom: 0; }
.tsps-hiscores-table tbody tr:hover, .rs-table tbody tr:hover { background: rgba(255, 255, 255, .025); }
.tsps-hiscores-table td:nth-child(n+3), .tsps-hiscores-table th:nth-child(n+3), .rs-table .num { text-align: right; }
.tsps-hiscores-table a, .rs-table a { color: var(--text); font-weight: 600; }
.tsps-hiscores-table a:hover, .rs-table a:hover { color: var(--gold); }
.rank-badge { display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; background: var(--surface-2); font-weight: 700; font-size: 13px; }
.rank-1 .rank-badge { background: var(--gold); color: var(--gold-ink); }
.rank-2 .rank-badge { background: #c9ced6; color: #1a1d22; }
.rank-3 .rank-badge { background: #b9774a; color: #1f1208; }
.tsps-staff { color: var(--gold); }
.up, .mkt-up { color: var(--green); }
.down, .mkt-down { color: var(--red); }
.tsps-hiscores-pages { display: flex; gap: 12px; justify-content: center; align-items: center; margin-top: 16px; color: var(--muted); }
.tsps-offline { padding: 16px 18px; border: 1px dashed var(--line-2); border-radius: var(--radius); color: var(--muted); }

/* ------------------------------------------------------------ account and login */

.tsps-account-login { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tsps-account form p { margin: 0 0 14px; display: grid; gap: 6px; }
.tsps-account form label { font-weight: 600; color: var(--muted); font-size: 14px; }
.tsps-account form input[type="text"], .tsps-account form input[type="password"] { width: 100%; }
.tsps-account form .login-remember label { display: flex; gap: 8px; align-items: center; }
.tsps-account input[type="submit"] { width: 100%; }
.perk-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.perk-list li { display: flex; gap: 12px; color: var(--muted); }
.perk-list img { width: 22px; height: 22px; image-rendering: pixelated; flex: none; margin-top: 2px; }
.perk-list b { display: block; color: var(--text); }
.account-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.account-bar p { margin: 0; }
.account-bar b { color: var(--gold); }

/* ------------------------------------------------------------ profile */

.tsps-player-link { font-weight: 600; }
.tsps-back { margin-top: 22px; font-weight: 600; }
.profile { display: grid; gap: 18px; }
.profile-hero { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.profile-avatar {
  width: 84px; height: 84px; display: grid; place-items: center; position: relative; border-radius: 22px;
  font-size: 40px; font-weight: 800; color: #0d0f13; background: var(--avatar-color, var(--gold)); cursor: pointer;
}
.combat-badge {
  position: absolute; right: -12px; bottom: -10px; display: flex; align-items: center; gap: 3px; padding: 2px 7px;
  font-size: 12.5px; font-weight: 700; color: var(--text); background: var(--surface-3); border: 1px solid var(--line-2); border-radius: 8px;
}
.combat-badge img { width: 14px; height: 14px; image-rendering: pixelated; }
.profile-name { font-size: 40px; margin: 0 0 8px; }
.profile-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 6px;
  font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--line);
}
.tag img { width: 14px; height: 14px; image-rendering: pixelated; }
.tag.gold { color: var(--gold); border-color: rgba(242, 181, 58, .35); }
.tag.online { color: var(--green); border-color: rgba(63, 209, 122, .35); }
.tag.maxed { color: var(--gold-ink); background: var(--gold); border-color: var(--gold); }
.profile-rank { text-align: right; }
.profile-rank .big { display: block; font-size: 44px; font-weight: 800; color: var(--gold); line-height: 1; }
.profile-rank small { font-size: 13px; color: var(--muted); }
.profile-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.profile-nav { display: flex; flex-wrap: wrap; gap: 6px; }

.tsps-profile-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; padding: 0 !important; background: none !important; border: 0 !important; }
.tsps-stat { padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.tsps-stat-label { display: block; font-size: 12.5px; color: var(--muted); }
.tsps-stat-value { display: block; font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }

.profile-cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.profile-side { display: grid; gap: 18px; }

.tsps-skill-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tsps-skill {
  display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 0 10px;
  padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; color: var(--text);
}
.tsps-skill:hover { border-color: var(--line-2); color: var(--text); background: var(--surface-3); }
.tsps-skill-icon { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; grid-row: span 2; }
.tsps-skill-name { font-size: 13px; font-weight: 600; color: var(--muted); }
.tsps-skill-level { grid-row: span 2; font-size: 22px; font-weight: 800; }
.tsps-skill-meta { font-size: 12px; color: var(--faint); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsps-skill .bar { grid-column: 1 / -1; height: 4px; margin-top: 8px; }
.tsps-skill.is-maxed { border-color: rgba(242, 181, 58, .45); }
.tsps-skill.is-maxed .tsps-skill-level { color: var(--gold); }

.equip-grid {
  display: grid; grid-template-columns: repeat(3, 54px); gap: 8px 14px; justify-content: center;
  grid-template-areas: ". head ." "cape amulet ammo" "weapon body shield" ". legs ." "hands feet ring";
}
.equip-slot { width: 54px; height: 54px; display: grid; place-items: center; position: relative; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; }
.equip-slot img { width: 36px; height: 32px; image-rendering: pixelated; }
.equip-slot .slot-name { font-size: 10px; color: var(--faint); }
.equip-slot:hover .tip { display: block; }
.tip {
  display: none; position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translateX(-50%); z-index: 5;
  background: var(--surface-3); color: var(--text); font-size: 12.5px; font-weight: 600; padding: 4px 8px; white-space: nowrap; border: 1px solid var(--line-2); border-radius: 7px;
}
.equip-head { grid-area: head; } .equip-cape { grid-area: cape; } .equip-amulet { grid-area: amulet; } .equip-ammo { grid-area: ammo; }
.equip-weapon { grid-area: weapon; } .equip-body { grid-area: body; } .equip-shield { grid-area: shield; } .equip-legs { grid-area: legs; }
.equip-hands { grid-area: hands; } .equip-feet { grid-area: feet; } .equip-ring { grid-area: ring; }

.facts { margin: 0; }
.facts div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.facts div:first-child { border-top: 0; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 700; text-align: right; }

.boss-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.boss-card { display: grid; gap: 4px; padding: 11px 13px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 11px; color: var(--text); }
.boss-card:hover { color: var(--text); border-color: var(--line-2); background: var(--surface-3); }
.boss-card .top { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.boss-card b { font-weight: 700; }
.boss-card .kc { color: var(--gold); font-weight: 800; }
.boss-card small { font-size: 12px; color: var(--muted); }

.quest-list { columns: 3 200px; column-gap: 18px; list-style: none; margin: 0; padding: 0; font-size: 14px; }
.quest-list li { break-inside: avoid; padding: 2px 0; }
.quest-list .complete { color: var(--green); }
.quest-list .started { color: var(--gold-soft); }
.quest-list .not-started { color: var(--red); }
.quest-details { margin-top: 12px; }
.quest-details summary { list-style: none; margin-bottom: 12px; }
.quest-details summary::-webkit-details-marker { display: none; }

.clog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 4px; }
.clog-slot { position: relative; height: 40px; display: grid; place-items: center; background: var(--surface-2); border-radius: 8px; }
.clog-slot img { width: 36px; height: 32px; image-rendering: pixelated; }
.clog-slot .qty { position: absolute; left: 3px; top: 1px; font-size: 10.5px; font-weight: 700; color: var(--gold-soft); line-height: 1; }
.ca-tiers { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: 12px; }
.ca-tier { text-align: center; padding: 8px 4px; background: var(--surface-2); border-radius: 10px; }
.ca-tier b { display: block; font-size: 13px; }
.ca-tier span { font-size: 12px; color: var(--gold); font-weight: 700; }

.xp-chart { width: 100%; height: auto; display: block; background: var(--surface-2); border-radius: 12px; }
.xp-chart .grid-line { stroke: var(--line); stroke-width: 1; }
.xp-chart .line { fill: none; stroke: var(--green); stroke-width: 2.5; }
.xp-chart .area { fill: rgba(63, 209, 122, .1); }
.xp-chart text { fill: var(--faint); font: 12px var(--font); }
.gain-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; }
.gain-tiles div { text-align: center; padding: 10px; background: var(--surface-2); border-radius: 10px; }
.gain-tiles b { display: block; font-size: 20px; font-weight: 800; color: var(--green); }
.gain-tiles span { font-size: 12.5px; color: var(--muted); }

/* ------------------------------------------------------------ items */

.item-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.item-row { display: flex; gap: 10px; align-items: center; padding: 7px 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; color: var(--text); font-weight: 600; font-size: 14px; }
.item-row:hover { border-color: var(--line-2); background: var(--surface-2); color: var(--text); }
.item-row img { width: 36px; height: 32px; image-rendering: pixelated; flex: none; }
.item-head { display: flex; gap: 18px; align-items: center; }
.item-icon-big { width: 96px; height: 86px; display: grid; place-items: center; background: var(--surface-2); border-radius: 16px; flex: none; }
.item-icon-big img { width: 72px; height: 64px; image-rendering: pixelated; }
.bonus-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bonus-grid h4 { margin: 0 0 6px; color: var(--muted); }
.bonus-grid dl { margin: 0; font-size: 14px; }
.bonus-grid dl div { display: flex; justify-content: space-between; padding: 2px 0; }
.bonus-grid dt { color: var(--muted); }
.bonus-grid dd { margin: 0; font-weight: 700; }

/* ------------------------------------------------------------ maps */

.world-map { height: 640px; background: #10161f; border-radius: 12px; }
.world-map.small { height: 340px; }
.leaflet-container { font: 13px var(--font); }
.leaflet-container img.leaflet-tile { image-rendering: pixelated; width: 256.5px !important; height: 256.5px !important; }
.map-dot { width: 10px !important; height: 10px !important; margin: -5px 0 0 -5px !important; background: #fff; border: 2px solid #000; border-radius: 50%; }
.map-dot.bot { width: 7px !important; height: 7px !important; margin: -3.5px 0 0 -3.5px !important; background: var(--gold); border-width: 1px; }
.leaflet-tooltip.rs-tip { background: var(--surface-3); color: var(--text); border: 1px solid var(--line-2); border-radius: 7px; font: 600 12.5px var(--font); padding: 3px 8px; box-shadow: 0 8px 20px rgba(0, 0, 0, .4); }
.leaflet-tooltip.rs-tip::before { display: none; }
.leaflet-bar { border: 0 !important; border-radius: 10px !important; overflow: hidden; }
.leaflet-bar a { background: var(--surface-2) !important; color: var(--text) !important; border-color: var(--line) !important; }
.map-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 13.5px; color: var(--muted); }
.map-legend i { display: inline-block; width: 10px; height: 10px; border: 2px solid #000; border-radius: 50%; margin-right: 6px; vertical-align: -1px; }

/* ------------------------------------------------------------ compare, competitions, signature, posts */

.compare-head { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; text-align: center; }
.compare-head .vs { font-size: 28px; font-weight: 800; color: var(--gold); }
.compare-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.comp-card { display: grid; gap: 12px; }
.comp-head { display: flex; gap: 12px; align-items: center; }
.comp-head img { width: 34px; height: 34px; padding: 4px; image-rendering: pixelated; background: var(--surface-2); border-radius: 9px; }
.comp-head h3 { margin: 0; }
.comp-head h3 a { color: var(--text); }
.comp-meta { font-size: 13px; color: var(--muted); }
.comp-status { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 6px; background: var(--surface-2); }
.comp-status.live { color: var(--green); background: rgba(63, 209, 122, .12); }
.comp-status.upcoming { color: var(--gold); background: rgba(242, 181, 58, .12); }
.comp-status.ended { color: var(--muted); }

.sig-preview { display: block; max-width: 100%; image-rendering: pixelated; border-radius: 8px; }
.copy-field { display: flex; gap: 6px; margin-top: 8px; }
.copy-field input { flex: 1; min-width: 0; font-size: 13px; }

.post-list { display: grid; gap: 18px; }
.post-list h2 a { color: var(--text); }
.post-list h2 a:hover { color: var(--gold); }
.post-meta { font-size: 13px; color: var(--faint); margin: 0 0 10px; }
.entry-content p, .entry-content li { color: #d6d3cc; }
.entry-content h3 { margin-top: 1.4em; }
.update-list { list-style: none; margin: 0; padding: 0; }
.update-list li { display: grid; grid-template-columns: 90px 1fr; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.update-list li:first-child { border-top: 0; }
.update-list time { font-size: 12.5px; color: var(--faint); }
.update-list a { color: var(--text); font-weight: 600; }
.update-week { font-size: 16px; font-weight: 800; color: var(--gold); margin: 18px 0 4px; }
.update-week:first-child { margin-top: 0; }

/* ------------------------------------------------------------ XP drops */

.xp-drop {
  position: fixed; z-index: 1000; pointer-events: none; display: flex; align-items: center; gap: 4px;
  font: 800 15px var(--font); color: #fff; text-shadow: 0 1px 3px #000; animation: xp-drop 1.8s linear forwards;
}
.xp-drop img { width: 18px; height: 18px; image-rendering: pixelated; }
@keyframes xp-drop { 0% { opacity: 0; transform: translateY(0); } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; transform: translateY(-90px); } }
.levelup-spark { position: fixed; z-index: 999; width: 4px; height: 4px; pointer-events: none; background: var(--c, var(--gold)); animation: spark 900ms steps(9) forwards; }
@keyframes spark { to { transform: translate(var(--dx), var(--dy)); opacity: 0; } }

/* ------------------------------------------------------------ footer */

.site-footer { margin-top: 20px; padding: 32px 0 40px; border-top: 1px solid var(--line); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 14px 28px; justify-content: space-between; align-items: center; }
.footer-brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 800; }
.footer-brand .brand-mark { width: 28px; height: 28px; font-size: 16px; border-radius: 8px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a { color: var(--muted); font-weight: 600; font-size: 14px; }
.footer-links a:hover { color: var(--text); }
.footer-note { width: 100%; color: var(--faint); font-size: 12px; }

/* ------------------------------------------------------------ small screens */

@media (max-width: 1100px) {
  .site-nav a { padding: 8px 9px; font-size: 14px; }
  .online-pill { display: none; }
}
@media (max-width: 980px) {
  .cols-main, .profile-cols, .hero .wrap { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .stat-strip, .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsps-profile-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ca-tiers { grid-template-columns: repeat(3, 1fr); }
  .bonus-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  h1 { font-size: 34px; }
  h2 { font-size: 21px; }
  .hero h1 { font-size: 42px; }
  .wrap { width: calc(100% - 32px); }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0; background: var(--bg); border-bottom: 1px solid var(--line); max-height: 75vh; overflow-y: auto; padding: 8px 16px 14px; }
  .site-header.nav-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; }
  .site-nav .sub-menu, .site-nav .children { display: flex; position: static; background: none; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .header-right .tsps-play-button { display: none; }
  .grid-2, .tsps-account-login, .podium { grid-template-columns: 1fr; }
  .podium-card, .podium-card.first, .podium-card.second, .podium-card.third { grid-column: auto; grid-row: auto; }
  .podium-card.first { order: -1; }
  .profile-hero { grid-template-columns: auto 1fr; }
  .profile-rank { grid-column: 1 / -1; text-align: left; display: flex; gap: 10px; align-items: baseline; }
  .profile-name { font-size: 30px; }
  .tsps-profile-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tsps-skill-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ca-tiers { grid-template-columns: repeat(2, 1fr); }
  .bonus-grid { grid-template-columns: 1fr; }
  .world-map { height: 460px; }
  .compare-head { grid-template-columns: 1fr; }
  .update-list li { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .xp-drop, .levelup-spark { display: none; }
}

/* ---------------------------------------------------------------- Grand Exchange (market.php) */
.mkt-flat { color: var(--muted); }
.mkt-item { display: inline-flex; align-items: center; gap: 6px; }
.mkt-item img { width: 27px; height: 24px; image-rendering: pixelated; }
.mkt-notice { padding: 10px 14px; margin: 0 0 16px; font: 16px var(--font-ui); border: 2px solid #000; }
.mkt-notice.ok { background: #1f3d17; color: var(--rs-green); }
.mkt-notice.bad { background: #3d1717; color: #ff8c80; }
.mkt-movers, .rs-panel + .rs-panel, .grid + .rs-panel, .rs-panel + .grid { margin-top: 18px; }
.mkt-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 18px; align-items: center; }
.mkt-title { display: flex; gap: 14px; align-items: center; }
.mkt-title h2 { margin: 0; }
.icon.big { width: 54px; height: 48px; image-rendering: pixelated; }
.mkt-figures { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; }
.mkt-figures .stat-value.small { font-size: 22px; }
.mkt-chart { width: 100%; height: auto; display: block; background: rgba(0, 0, 0, .25); border: 1px solid var(--stone-line); }
.mkt-chart .grid { stroke: rgba(255, 255, 255, .08); }
.mkt-chart text { fill: var(--muted); font: 13px var(--font-small); }
.mkt-chart .line { fill: none; stroke: var(--rs-yellow); stroke-width: 2.5; stroke-linejoin: round; }
.mkt-chart .area { fill: rgba(255, 255, 0, .08); }
.mkt-chart .dot { fill: var(--rs-yellow); stroke: #000; stroke-width: 1.5; }
.mkt-chart .osrs { stroke: var(--rs-orange); stroke-dasharray: 6 5; stroke-width: 1.5; }
.mkt-chart .osrs-label { fill: var(--rs-orange); }
.mkt-nochart { margin: 0; }
.mkt-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mkt-order { display: grid; gap: 8px; align-content: start; }
.mkt-order h4 { margin: 0; font: 20px var(--font-head); }
.mkt-order.buy h4 { color: var(--rs-green); }
.mkt-order.sell h4 { color: var(--rs-orange); }
.mkt-order label { display: grid; gap: 2px; font: 16px var(--font-ui); color: var(--rs-orange); text-shadow: var(--shadow); }
.mkt-order input[type=number], .clan-say input, .live-search {
  width: 100%; padding: 6px 8px; font: 16px var(--font-ui); color: var(--parch-ink); background: var(--parch); border: 2px solid #000; box-sizing: border-box;
}
.muted.small { margin: 0; }
.mkt-form.inline { display: inline; }
.mkt-mine h4 { font: 18px var(--font-head); color: var(--rs-orange); margin: 14px 0 6px; }
.mkt-slots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mkt-slot { display: grid; gap: 2px; justify-items: start; padding: 8px 10px; background: rgba(0, 0, 0, .3); border: 1px solid var(--stone-line); box-shadow: inset 1px 1px 0 var(--stone-hi); min-height: 92px; font: 15px var(--font-ui); }
.mkt-slot small { font: 14px var(--font-small); color: var(--rs-orange); }
.mkt-slot.buy small { color: var(--rs-green); }
.mkt-slot b { color: var(--rs-yellow); font-weight: normal; }
.mkt-slot em { font-style: normal; color: var(--muted); font-size: 14px; }
.mkt-slot.done em { color: var(--rs-green); }
.mkt-slot.empty { place-items: center; color: var(--faint); }
.mkt-orders { list-style: none; margin: 0; padding: 0; font: 15px var(--font-ui); }
.mkt-orders li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 4px 0; border-bottom: 1px solid var(--stone-line); }
.mkt-orders img { width: 27px; height: 24px; }
.mkt-results { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 4px 14px; }
.mkt-results .item-row { display: flex; align-items: center; gap: 8px; }
.mkt-price { margin-left: auto; color: var(--rs-yellow); font: 16px var(--font-ui); font-weight: normal; }
.mkt-login { margin: 0 0 16px; }

/* ---------------------------------------------------------------- clans (clans.php) */
.clan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.clan-head h2 { margin: 0; }
.clan-grid { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); margin-top: 0; }
.clan-chat { height: 360px; max-height: 360px; }
.clan-chat .chat-line .who { flex: none; }
.clan-chat .chat-line .what { flex: 1; }
.clan-say { display: flex; gap: 8px; margin-top: 10px; }
.clan-say input { flex: 1; }

/* ---------------------------------------------------------------- live world (live.php) */
.live-world { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.live-canvas { background: #000; }
.live-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding: 8px 4px 2px; font: 15px var(--font-ui); }
.live-toggle { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; }
.live-side { display: grid; gap: 18px; }
.live-side .rs-panel + .rs-panel { margin-top: 0; }
.live-dot { display: block; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #fff; border: 2px solid #000; box-sizing: border-box; }
.live-dot.bot { width: 7px; height: 7px; margin: -3.5px 0 0 -3.5px; background: var(--rs-yellow); border-width: 1px; }
.live-dot.fight { width: 16px; height: 16px; margin: -8px 0 0 -8px; background: var(--rs-red); animation: live-pulse 1.2s ease-in-out infinite; }
.live-dot.fighting { background: var(--rs-orange); }
.live-dot.followed { width: 14px; height: 14px; margin: -7px 0 0 -7px; background: var(--rs-cyan); box-shadow: 0 0 0 3px rgba(0, 255, 255, .35); z-index: 1000 !important; }
.leaflet-marker-icon.live-dot { transition: transform 2.4s linear; }
.live-zooming .leaflet-marker-icon.live-dot { transition: none; }
@keyframes live-pulse { 50% { box-shadow: 0 0 0 6px rgba(255, 58, 47, .35); } }
.live-legend .live-dot, .live-person .live-dot { display: inline-block; margin: 0 6px 0 0; animation: none; vertical-align: middle; }
.live-search { margin-bottom: 8px; }
.live-people { max-height: 360px; overflow-y: auto; display: grid; gap: 2px; }
.live-person { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: 2px 6px; padding: 4px 6px; color: var(--text); font: 15px var(--font-ui); border-bottom: 1px solid var(--stone-line); }
.live-person:hover { background: rgba(255, 255, 255, .06); }
.live-person b { font-weight: normal; color: var(--rs-yellow); }
.live-person.bot b { color: var(--text); }
.live-person small { grid-column: 2 / -1; color: var(--muted); font: 13px var(--font-small); }
.live-fight { padding: 6px 0; border-bottom: 1px solid var(--stone-line); font: 15px var(--font-ui); }
.live-fight:last-child { border-bottom: 0; }
.live-bar { position: relative; height: 18px; margin: 4px 0; background: #400; border: 1px solid #000; overflow: hidden; }
.live-bar span { position: absolute; top: 0; bottom: 0; left: 0; background: #0b8a0b; transition: width .6s; }
.live-bar.prayer { background: #1b2a40; }
.live-bar.prayer span { background: #3e86c8; }
.live-bar b { position: relative; display: block; text-align: center; font: 13px var(--font-small); color: #fff; text-shadow: var(--shadow); font-weight: normal; line-height: 17px; }
.live-where { margin: 0 0 6px; }
.live-target { margin: 8px 0; }
.live-follow h4 { margin: 10px 0 4px; font: 16px var(--font-head); color: var(--rs-orange); }
.live-skills { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2px; margin-top: 8px; }
.live-skill { display: flex; align-items: center; gap: 3px; font: 14px var(--font-small); color: var(--rs-yellow); text-shadow: var(--shadow); }
.live-skill img { width: 18px; height: 18px; image-rendering: pixelated; }
.live-items { display: grid; grid-template-columns: repeat(7, 36px); gap: 2px; }
.live-items.inv { grid-template-columns: repeat(4, 36px); }
.live-item { position: relative; width: 36px; height: 32px; background: rgba(0, 0, 0, .25); }
.live-item img { width: 36px; height: 32px; image-rendering: pixelated; }
.live-item i { position: absolute; left: 1px; top: -2px; font: 12px var(--font-small); font-style: normal; color: var(--rs-yellow); text-shadow: var(--shadow); }

@media (max-width: 960px) {
  .live-world, .clan-grid, .mkt-head, .mkt-tabs { grid-template-columns: 1fr; }
  .mkt-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .live-canvas { height: 420px !important; }
}

/* ---------------------------------------------------------------- v4 touches for the market, clans and live pages */
.mkt-bought { color: var(--green); font-weight: 700; }
.mkt-sold { color: var(--red); font-weight: 700; }
.mkt-slot { border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line); box-shadow: none; }
.mkt-slot b { color: var(--text); font-weight: 700; }
.mkt-notice { border-radius: 12px; border: 1px solid transparent; }
.mkt-notice.ok { background: rgba(63, 209, 122, .1); border-color: rgba(63, 209, 122, .35); color: var(--green); }
.mkt-notice.bad { background: rgba(255, 106, 95, .1); border-color: rgba(255, 106, 95, .35); color: var(--red); }
.mkt-chart { border-radius: 12px; border: 0; background: var(--surface-2); }
.mkt-chart .line { stroke: var(--gold); }
.mkt-chart .dot { fill: var(--gold); stroke: var(--bg); }
.mkt-order label { color: var(--muted); font-weight: 600; font-size: 13.5px; }
.mkt-order input[type=number], .clan-say input, .live-search { color: var(--text); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; }
.mkt-item { color: var(--text); font-weight: 600; }
.mkt-item img { background: var(--surface-2); border-radius: 7px; padding: 2px; width: 31px; height: 28px; }
.mkt-orders li { border-bottom: 0; border-top: 1px solid var(--line); padding: 8px 0; }
.mkt-orders li:first-child { border-top: 0; }
.mkt-flat { color: var(--faint); }
.mkt-up, .mkt-down { font-weight: 700; }
.icon.big { border-radius: 12px; background: var(--surface-2); padding: 4px; }
.clan-chat .chat-line { padding: 8px 0; }
.clan-chat .chat-line .who { color: var(--gold); }
.clan-chat .chat-line .what { color: var(--text); }
.live-bar { border-radius: 99px; border: 0; height: 16px; }
.live-bar b { line-height: 16px; font-size: 11px; }
.live-item { border-radius: 7px; background: var(--surface-2); }
.live-person { border-bottom: 0; border-top: 1px solid var(--line); border-radius: 0; }
.live-person b { color: var(--text); font-weight: 700; }
.live-person.bot b { color: var(--muted); }
.live-follow h4, .mkt-mine h4 { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.live-skill { color: var(--text); font-weight: 700; }
.live-canvas { border-radius: 10px; overflow: hidden; }
.live-dot { border-radius: 50%; }
.live-dot.fight { border-radius: 4px; }

/* ---------------------------------------------------------------- adventure log, collection log, bosses (journal.php) */
.journal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 18px; }
.journal-head h2 { margin: 0; }
.timeline { display: grid; gap: 22px; }
.timeline-day h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 8px; }
.timeline-day .rs-panel { padding: 6px 18px; }
.clog-slot.missing img { opacity: .16; filter: grayscale(1); }
.clog-best { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.clog-best .item-row span { display: grid; }
.clog-categories { display: grid; gap: 10px; }
.clog-category { padding: 12px 16px; }
.clog-category summary { display: flex; justify-content: space-between; cursor: pointer; list-style: none; font-size: 14.5px; }
.clog-category summary::-webkit-details-marker { display: none; }
.clog-category[open] summary { margin-bottom: 12px; }
.clog-category.done { border-color: rgba(63, 209, 122, .4); }
.tab span { opacity: .7; font-weight: 500; }

/* Live world: someone underground or in an instance, drawn at the way in. */
.live-dot.below { outline: 2px dashed var(--rs-cyan); outline-offset: 2px; }
.live-dot.bot.below { outline-width: 1px; }
.live-legend .live-dot.below-key { background: transparent; border: 2px dashed var(--rs-cyan); }

/* How to Play */
.tsps-how-to-play .tsps-lead { font-size: 1.1rem; }
.tsps-play-ways { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; margin: 12px 0 24px; }
.tsps-play-way { background: var(--surface, rgba(255,255,255,.04)); border: 1px solid var(--line, rgba(255,255,255,.1)); border-radius: 12px; padding: 16px 20px; }
.tsps-play-way h3 { margin-top: 0; }

/* Account: website sign-up */
.tsps-signup-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tsps-signup label { display: block; font-weight: 600; margin-bottom: 4px; }
.tsps-signup input.input { width: 100%; }
.tsps-signup-error { color: #ff8a80; background: rgba(255, 82, 82, .1); border: 1px solid rgba(255, 82, 82, .3); border-radius: 8px; padding: 8px 12px; }
.tsps-small { font-size: .85rem; }
.tsps-welcome { border-color: var(--gold); margin-bottom: 16px; }
.tsps-account-login > .card:nth-child(3) { grid-column: 1 / -1; }

/* Sign-up: the XP rate choice. Without JavaScript the cards sit in the form; with it they're a pop-up
   (the same look as the game's XP rate window, client/game/plugins/xprate). */
.tsps-rate-modal { margin: 8px 0 16px; }
.tsps-rate-modal:not(.is-popup) .tsps-rate-eyebrow, .tsps-rate-modal:not(.is-popup) .tsps-rate-actions { display: none; }
.tsps-rate-modal:not(.is-popup) .tsps-rate-title { font-size: 1rem; margin: 0 0 4px; }
.tsps-rate-modal.is-popup { display: none; position: fixed; inset: 0; z-index: 10000; margin: 0; padding: 16px;
  align-items: center; justify-content: center; background: rgba(6, 7, 9, .72); backdrop-filter: blur(3px); }
.tsps-rate-modal.is-popup.is-open { display: flex; animation: tsps-rate-fade .18s ease-out; }
html.tsps-rate-locked { overflow: hidden; }
@keyframes tsps-rate-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes tsps-rate-rise { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.tsps-rate-modal.is-popup .tsps-rate-panel { width: min(780px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: linear-gradient(180deg, #1b1e24 0%, #121418 100%); border: 1px solid rgba(240, 180, 41, .35); border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .04); padding: 28px 28px 24px; animation: tsps-rate-rise .22s ease-out; }
.tsps-rate-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold, #f0b429); }
.tsps-rate-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.tsps-rate-lead { margin: 8px 0 22px; font-size: 14px; line-height: 1.5; color: #a9adb6; }
.tsps-rate-modal:not(.is-popup) .tsps-rate-lead { margin: 0 0 12px; }
.tsps-rate-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.tsps-rate-modal:not(.is-popup) .tsps-rate-grid { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.tsps-rate-card { position: relative; display: flex; flex-direction: column; gap: 6px; min-height: 150px; padding: 16px 14px; cursor: pointer;
  background: #20242b; border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; transition: border-color .12s, background .12s, transform .12s; }
.tsps-rate-card:hover { border-color: rgba(240, 180, 41, .55); background: #252a32; transform: translateY(-2px); }
.tsps-rate-card input { position: absolute; opacity: 0; pointer-events: none; }
.tsps-rate-card:focus-within { outline: 2px solid rgba(255, 255, 255, .35); outline-offset: 2px; }
.tsps-rate-card:has(input:checked) { border-color: var(--gold, #f0b429); background: linear-gradient(180deg, rgba(240, 180, 41, .16), rgba(240, 180, 41, .05));
  box-shadow: 0 0 0 1px var(--gold, #f0b429) inset; }
.tsps-rate-x { font-size: 30px; font-weight: 800; line-height: 1; color: #fff; }
.tsps-rate-card:has(input:checked) .tsps-rate-x { color: var(--gold, #f0b429); }
.tsps-rate-name { font-size: 13px; font-weight: 700; color: #e9e6df; }
.tsps-rate-blurb { font-size: 12px; line-height: 1.45; color: #a9adb6; }
.tsps-rate-check { position: absolute; top: 10px; right: 10px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); }
.tsps-rate-card:has(input:checked) .tsps-rate-check { border-color: var(--gold, #f0b429); background: var(--gold, #f0b429) center / 12px no-repeat
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23131417' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E"); }
.tsps-rate-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; flex-wrap: wrap; }
.tsps-rate-modal:not(.is-popup) .tsps-rate-footer { margin-top: 10px; }
.tsps-rate-note { margin: 0; font-size: 12px; color: #8a8f99; }
.tsps-rate-actions { display: flex; gap: 10px; }
.tsps-rate-confirm { min-width: 200px; }
.tsps-rate-confirm:disabled { opacity: .45; cursor: not-allowed; }
@media (max-width: 720px) {
  .tsps-rate-modal.is-popup .tsps-rate-panel { padding: 22px 18px 18px; }
  .tsps-rate-modal.is-popup .tsps-rate-grid { grid-template-columns: 1fr; }
  .tsps-rate-modal.is-popup .tsps-rate-card { min-height: 0; display: grid; grid-template-columns: 64px 1fr; column-gap: 12px; align-items: center; }
  .tsps-rate-modal.is-popup .tsps-rate-x { grid-row: span 2; }
  .tsps-rate-modal.is-popup .tsps-rate-blurb { grid-column: 2; }
  .tsps-rate-actions { width: 100%; }
  .tsps-rate-actions > * { flex: 1; }
  .tsps-rate-confirm { min-width: 0; }
}
.tsps-rate-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; font-size: 11px; font-weight: 700; line-height: 1.5; color: var(--gold, #f0b429);
  border: 1px solid rgba(240, 180, 41, .4); border-radius: 999px; vertical-align: middle; }
.tag.xp-rate { color: var(--gold, #f0b429); border-color: rgba(240, 180, 41, .4); }

/* Hiscores: XP rate and Staff tabs (above the skill tabs). */
.rate-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.rate-tab { padding: 6px 14px; font-size: 13px; font-weight: 700; color: var(--muted, #a9adb6); text-decoration: none;
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); border-radius: 999px; transition: color .12s, border-color .12s, background .12s; }
.rate-tab:hover { color: #fff; border-color: rgba(240, 180, 41, .5); }
.rate-tab.is-active { color: #131417; background: var(--gold, #f0b429); border-color: var(--gold, #f0b429); }
.rate-tab.is-staff { margin-left: auto; }
@media (max-width: 600px) { .rate-tab.is-staff { margin-left: 0; } }

/* Big moments: the home page ticker and the Rare drops page (tsps-site/includes/moments.php). */
.moments-ticker { display: flex; align-items: center; gap: 0; padding: 0 !important; margin: 0 0 18px; overflow: hidden; }
.moments-label { flex: none; display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-size: 12px; font-weight: 800; letter-spacing: .08em;
  text-transform: uppercase; color: var(--gold, #f0b429); border-right: 1px solid rgba(255, 255, 255, .08); }
.moments-dot { width: 8px; height: 8px; border-radius: 50%; background: #ef4444; box-shadow: 0 0 0 0 rgba(239, 68, 68, .6); animation: moments-pulse 2s infinite; }
@keyframes moments-pulse { 0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .55); } 70% { box-shadow: 0 0 0 8px rgba(239, 68, 68, 0); } 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); } }
.moments-track { flex: 1; min-width: 0; overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 24px, #000 calc(100% - 24px), transparent); }
.moments-run { display: inline-flex; white-space: nowrap; animation: moments-scroll 60s linear infinite; }
.moments-run.is-still { animation: none; }
.moments-ticker:hover .moments-run { animation-play-state: paused; }
.moments-copy { display: inline-flex; }
@keyframes moments-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.moment { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; color: inherit; text-decoration: none; border-right: 1px solid rgba(255, 255, 255, .06); }
.moment:hover { background: rgba(255, 255, 255, .04); }
.moment img { width: 24px; height: 24px; object-fit: contain; image-rendering: pixelated; }
.moment b { color: #fff; }
.moment span { color: var(--muted, #a9adb6); }
.moment-drop span, .moment-pet span { color: #ff8a65; }
.moment-level span, .moment-max span, .moment-200m span { color: var(--gold, #f0b429); }
.moment em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold, #f0b429); }
.moment small { font-size: 11px; color: #8a8f99; }
.moment-empty { color: var(--muted, #a9adb6); }
.moments-all { flex: none; padding: 12px 16px; font-size: 13px; font-weight: 700; color: var(--gold, #f0b429); text-decoration: none; border-left: 1px solid rgba(255, 255, 255, .08); }
@media (prefers-reduced-motion: reduce) { .moments-run { animation: none; } .moments-track { overflow-x: auto; } }
@media (max-width: 600px) { .moments-label { padding: 10px 12px; font-size: 11px; } .moments-all { display: none; } }
.tsps-moments-table .moment-what { display: flex; align-items: center; gap: 10px; }
.tsps-moments-table .moment-what img { width: 28px; height: 28px; object-fit: contain; image-rendering: pixelated; }
.tsps-moments-table .moment-drop .moment-what, .tsps-moments-table .moment-pet .moment-what { color: #ff8a65; font-weight: 600; }
.tsps-moments-table .moment-level .moment-what, .tsps-moments-table .moment-max .moment-what, .tsps-moments-table .moment-200m .moment-what { color: var(--gold, #f0b429); font-weight: 600; }

/* ---------------------------------------------------------------- collection log hiscores, pets, clans */
.pet-row { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.pet-row img { width: 32px; height: 32px; object-fit: contain; image-rendering: pixelated; }
.tsps-clog-board .bar { min-width: 90px; }
.profile-pets { margin: 12px 0 4px; }
.profile-pets .card-title h4 { margin: 0; font-size: 15px; }
.tag.clan { color: var(--text); text-decoration: none; }
.tag.clan:hover { color: var(--gold); }
.clan-board th.is-sorted { color: var(--gold); }

/* ---------------------------------------------------------------- account settings */
.account-settings > summary { list-style: none; cursor: pointer; display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.account-settings > summary::-webkit-details-marker { display: none; }
.account-settings > summary h2 { margin: 0; font-size: 20px; }
.account-settings > summary::after { content: "\25BE"; margin-left: auto; color: var(--muted); }
.account-settings[open] > summary::after { content: "\25B4"; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 22px; margin-top: 14px; }
.settings-grid h3 { margin: 0 0 10px; font-size: 16px; }
.settings-grid section + section { border-left: 1px solid var(--border, #2a3140); padding-left: 22px; }
@media (max-width: 820px) { .settings-grid section + section { border-left: 0; padding-left: 0; border-top: 1px solid var(--border, #2a3140); padding-top: 16px; } }
.settings-grid label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.settings-grid input.input { width: 100%; box-sizing: border-box; }
.settings-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0 0 12px; }
.settings-facts dt { color: var(--muted); }
.settings-facts dd { margin: 0; font-weight: 600; }
.login-list { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; }
.login-list li { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.tsps-signup-ok { color: #9be7a0; background: rgba(76, 175, 80, .12); border: 1px solid rgba(76, 175, 80, .35); border-radius: 8px; padding: 8px 12px; }

/* ---------------------------------------------------------------- forums */
.tsps-forums .forum-table td { vertical-align: top; }
.tsps-forums .forum-board b { font-size: 16px; }
.forum-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.forum-head h2 { margin: 0 0 4px; }
.forum-head p { margin: 0; }
.forum-who { margin: 4px 0 14px; }
.forum-post { margin-bottom: 12px; padding: 14px 16px; }
.forum-post-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.forum-avatar { width: 38px; height: 38px; flex: none; }
.forum-actions { margin-left: auto; display: flex; gap: 12px; }
.forum-actions form { margin: 0; }
.link-button { background: none; border: 0; padding: 0; color: var(--muted); cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.link-button:hover { color: var(--gold); }
.forum-body { overflow-wrap: anywhere; line-height: 1.6; }
.forum-body p { margin: 0 0 .8em; }
.forum-body p:last-child { margin-bottom: 0; }
.forum-form label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.forum-form input.input, .forum-form textarea { width: 100%; box-sizing: border-box; }
.forum-form textarea { background: var(--surface-3); color: var(--text); border: 1px solid #3d4656; border-radius: 8px; padding: 10px; font: inherit; resize: vertical; }
@media (max-width: 600px) { .forum-post { padding: 12px; } .forum-actions { gap: 8px; } }

/* ---------------------------------------------------------------- prestige */
.prestige-stars { color: var(--gold); font-weight: 700; font-size: .85em; white-space: nowrap; }
.tag.prestige { color: var(--gold); border-color: rgba(242, 181, 58, .35); text-decoration: none; }
.skill-tab[href*="tsps_skill=prestige"]::before { content: "\2605"; color: var(--gold); margin-right: 4px; }

/* ---------------------------------------------------------------- live map: boats, raids, hotspots */
.live-boat { background: none; border: 0; }
.live-boat-hull { display: block; width: 20px; height: 20px; transform-origin: 50% 50%; transition: transform .8s linear; }
.live-boat-hull svg { display: block; margin: 0 auto; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.live-boat-hull path { fill: #8b5a2b; stroke: #2b1a0c; stroke-width: 1.2; }
.live-boat-hull path.sail { fill: #f4ecd8; stroke: #6b5a44; stroke-width: .8; }
.live-boat.bot .live-boat-hull path:not(.sail) { fill: #6f6a63; }
.live-boat-key { display: inline-block; width: 10px; height: 14px; margin-right: 6px; vertical-align: -2px; background: #8b5a2b; clip-path: polygon(50% 0, 100% 40%, 85% 100%, 15% 100%, 0 40%); }
.live-raid { background: none; border: 0; }
.live-raid-badge { display: flex; align-items: center; justify-content: center; width: 26px; height: 26px; border-radius: 6px; background: #7a1f1f; color: #ffd7d7; border: 2px solid #ff6b6b; font-weight: 800; font-size: 12px; box-shadow: 0 0 0 3px rgba(255, 70, 70, .25); animation: live-raid-pulse 2s ease-in-out infinite; }
.live-raid-key { display: inline-block; width: 12px; height: 12px; margin-right: 6px; vertical-align: -1px; border-radius: 3px; background: #7a1f1f; border: 2px solid #ff6b6b; }
@keyframes live-raid-pulse { 0%, 100% { box-shadow: 0 0 0 3px rgba(255, 70, 70, .25); } 50% { box-shadow: 0 0 0 7px rgba(255, 70, 70, .05); } }
.live-dot.aboard { outline: 2px solid #2fd3c6; outline-offset: 1px; }
.live-fights a.down { text-decoration: line-through; opacity: .6; }

/* ---------------------------------------------------------------- gazette and rivals */
.gazette-masthead { text-align: center; border-bottom: 3px double var(--gold); margin-bottom: 14px; padding-bottom: 8px; }
.gazette-masthead h2 { font-family: Georgia, "Times New Roman", serif; font-size: 34px; letter-spacing: .5px; margin: 0 0 4px; }
.gazette-stories { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.gazette-story { padding: 14px 16px; }
.gazette-story.is-lead { grid-column: 1 / -1; border-color: rgba(242, 181, 58, .45); }
.gazette-story.is-lead h3 { font-size: 24px; }
.gazette-story h3 { font-family: Georgia, "Times New Roman", serif; margin: 6px 0 8px; font-size: 18px; line-height: 1.25; }
.gazette-story p { margin: 0 0 8px; line-height: 1.55; }
.gazette-kicker { display: flex; align-items: center; gap: 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.gazette-kicker time { margin-left: auto; color: var(--muted); text-transform: none; letter-spacing: 0; }
.gazette-kicker i { font-style: normal; }
.profile-rival { margin-top: 18px; }
.rival-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; }
.rival-side { display: grid; gap: 2px; }
.rival-side.right { text-align: right; }
.rival-side small, .rival-score small { color: var(--muted); font-size: 12px; }
.rival-score { display: grid; grid-template-columns: auto auto auto; gap: 2px 10px; align-items: baseline; justify-items: center; font-size: 28px; font-weight: 800; }
.rival-score small { grid-column: 1 / -1; font-weight: 500; }
.rival-score .vs { font-size: 14px; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------ avatars and titles */

.item-avatar { background: radial-gradient(circle at 50% 40%, var(--surface-3, #2a3140), var(--surface-2, #1b2029)); border: 1px solid var(--line-2, #3a4252); overflow: hidden; }
.item-avatar img { width: 82%; height: auto; image-rendering: pixelated; object-fit: contain; }
.profile-avatar.item-avatar { overflow: visible; }
.profile-avatar.item-avatar img { width: 70%; }
.board-name { display: inline-flex; align-items: center; gap: 8px; vertical-align: middle; }
.board-avatar { width: 26px; height: 26px; font-size: 12px; }
.player-title {
  display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 700; vertical-align: middle;
  color: var(--title-color, var(--gold)); border: 1px solid color-mix(in srgb, var(--title-color, var(--gold)) 45%, transparent);
  background: color-mix(in srgb, var(--title-color, var(--gold)) 10%, transparent);
}
.tag.player-title { margin-left: 0; font-size: 12px; padding: 3px 8px; }
.avatar-picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 6px; max-height: 240px; overflow-y: auto; padding: 2px; }
.settings-grid label.avatar-choice { margin: 0; cursor: pointer; }
.avatar-choice input { position: absolute; opacity: 0; pointer-events: none; }
.avatar-choice-face {
  display: grid; place-items: center; height: 46px; border-radius: 10px; background: var(--surface-2, #1b2029); border: 2px solid var(--line, #2a3140);
  font-size: 11px; font-weight: 700; color: var(--muted);
}
.avatar-choice-face img { max-width: 36px; max-height: 32px; image-rendering: pixelated; }
.avatar-choice.pet .avatar-choice-face { border-color: rgba(96, 224, 160, .35); }
.avatar-choice input:checked + .avatar-choice-face { border-color: var(--gold, #f2b53a); box-shadow: 0 0 0 2px rgba(242, 181, 58, .25); }
.avatar-choice input:focus-visible + .avatar-choice-face { outline: 2px solid var(--gold, #f2b53a); outline-offset: 2px; }
