/* PrivatePS website mockup - shared styles.
   Dark OSRS mood: dark background, warm gold and parchment accents.
   Converts 1:1 to the Ktor templates (same class names). */

/* Theme "stone" (from the PrivatePS banner): carved grey stone, silver text, gold accents. */
:root {
  --bg: #141412;
  --bg-2: #1a1a17;
  --panel: #2a2925;
  --panel-2: #33312c;
  --line: #45423b;
  --line-2: #5a564d;
  --stone-hi: #77736a;   /* top-edge highlight of carved stone */
  --stone-lo: #121110;   /* bottom-edge shadow */
  --silver: #e4e2dc;
  --gold: #d9a733;
  --gold-2: #f2c552;
  --text: #e6e2d7;
  --muted: #aaa597;
  --dim: #7d796e;
  --green: #6fbf5a;
  --red: #d0574a;
  --blue: #5a9be0;
  --purple: #a678d8;
  --radius: 8px;
  --shadow: 0 6px 24px rgba(0, 0, 0, .45);
  --font-head: "Pirata One", "Cinzel", Georgia, serif; /* chiselled lettering like "Private" in the banner */
  --font-logo: "UnifrakturMaguntia", "Pirata One", Georgia, serif; /* medieval logo font */
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  background: var(--bg);
  background-image: radial-gradient(ellipse at top, #24231f 0%, var(--bg) 60%);
  background-attachment: fixed;
  color: var(--text);
  font: 15px/1.6 var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-2); text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--gold-2); margin: 0 0 .5em; line-height: 1.25; letter-spacing: .02em; }
h1 { font-size: 2rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.dim { color: var(--dim); }
hr { border: 0; border-top: 1px solid var(--line); margin: 1.5rem 0; }
code { background: var(--panel-2); padding: 1px 6px; border-radius: 4px; font-size: .9em; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
main { flex: 1; padding: 28px 0 48px; }

.site-header {
  background: rgba(15, 13, 9, .92);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(6px);
}
.site-header .container { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-family: var(--font-logo); font-size: 1.7rem; font-weight: 400; color: var(--gold-2); white-space: nowrap; }
.logo span { color: var(--text); }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: 6px; white-space: nowrap; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel); text-decoration: none; }
.nav a.active { color: var(--gold-2); background: var(--panel); }
.header-actions { display: flex; gap: 8px; align-items: center; }
.online-pill { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.online-pill b { color: var(--green); }

.menu-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 6px; padding: 6px 10px; cursor: pointer; }

.site-footer { border-top: 1px solid var(--line); background: var(--bg-2); padding: 24px 0; color: var(--dim); font-size: .9rem; }
.site-footer .container { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; }
.site-footer a { color: var(--muted); }

/* Two-column layout with a side menu (account + staff) */
.with-side { display: grid; grid-template-columns: 230px 1fr; gap: 24px; align-items: start; }
.side-menu { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; position: sticky; top: 84px; }
.side-menu h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); margin: 10px 10px 6px; font-family: var(--font-body); }
.side-menu a { display: block; padding: 8px 10px; border-radius: 6px; color: var(--muted); }
.side-menu a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.side-menu a.active { background: var(--panel-2); color: var(--gold-2); }
.side-menu .badge { float: right; }

/* ---------- Components ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid > .card + .card, .showcase > .card + .card { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2, .card-head h3 { margin: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 9px 16px; border-radius: 6px; border: 1px solid var(--line-2);
  background: var(--panel-2); color: var(--text); font: 600 .95rem var(--font-body);
  cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--gold); color: var(--gold-2); text-decoration: none; }
.btn-gold { background: linear-gradient(#e2b453, #b9862c); color: #1a1408; border-color: #e9c46a; }
.btn-gold:hover { color: #000; filter: brightness(1.08); }
.btn-red { background: #4a1c17; border-color: #7a2e25; color: #f3c2bb; }
.btn-red:hover { border-color: var(--red); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-lg { padding: 13px 26px; font-size: 1.05rem; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: .75rem; font-weight: 600; border: 1px solid var(--line-2); color: var(--muted); background: var(--panel-2); }
.badge-gold { color: var(--gold-2); border-color: #7a6230; }
.badge-green { color: var(--green); border-color: #355f2b; }
.badge-red { color: #f08a7e; border-color: #7a2e25; }
.badge-blue { color: #8ec0f5; border-color: #2d527a; }
.badge-purple { color: #c7a3f0; border-color: #5a3d7a; }

/* Rank / mode icons (placeholder shapes; real game sprites later) */
.ico { display: inline-block; width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }
.ico-supporter { background: var(--blue); clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ico-tempmod { background: #c9c9c9; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ico-mod { background: #c9c9c9; clip-path: polygon(0 100%, 0 30%, 25% 60%, 50% 10%, 75% 60%, 100% 30%, 100% 100%); }
.ico-admin { background: var(--gold); clip-path: polygon(0 100%, 0 30%, 25% 60%, 50% 10%, 75% 60%, 100% 30%, 100% 100%); }
.ico-iron { background: #9aa0a6; clip-path: polygon(15% 0, 85% 0, 100% 30%, 50% 100%, 0 30%); }
.ico-hcim { background: #c0392b; clip-path: polygon(15% 0, 85% 0, 100% 30%, 50% 100%, 0 30%); }
.ico-uim { background: #ecf0f1; clip-path: polygon(15% 0, 85% 0, 100% 30%, 50% 100%, 0 30%); }
.ico-gim { background: #2e8b57; clip-path: polygon(15% 0, 85% 0, 100% 30%, 50% 100%, 0 30%); }

/* Forms */
.form { display: grid; gap: 14px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .9rem; }
.field .hint { font-size: .8rem; color: var(--dim); margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line-2);
  background: #15120d; color: var(--text); font: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 168, 74, .15); }
textarea { min-height: 120px; resize: vertical; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: .9rem; }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.inline-form > * { flex: 1 1 160px; }
.inline-form .btn { flex: 0 0 auto; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { background: var(--panel-2); color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: rgba(214, 168, 74, .04); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank-1 td:first-child { color: var(--gold-2); font-weight: 700; }

/* Tabs and filters */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a, .tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 10px 14px; font: 600 .92rem var(--font-body); cursor: pointer; white-space: nowrap; }
.tabs a:hover, .tabs button:hover { color: var(--text); text-decoration: none; }
.tabs .active { color: var(--gold-2); border-bottom-color: var(--gold); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--panel-2); color: var(--muted); font-size: .85rem; cursor: pointer; }
.chip.active, .chip:hover { color: var(--gold-2); border-color: var(--gold); text-decoration: none; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--panel-2); margin-bottom: 16px; }
.alert-warn { border-color: #7a6230; background: #2a2212; }
.alert-red { border-color: #7a2e25; background: #2a1512; }
.alert-green { border-color: #355f2b; background: #172312; }

/* Stats */
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.stat .label { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.stat .value { font: 700 1.6rem var(--font-head); color: var(--gold-2); }
.stat .delta { font-size: .8rem; }

/* Landing hero */
.hero { text-align: center; padding: 56px 16px 64px; border-bottom: 1px solid var(--line); background: linear-gradient(rgba(18, 16, 12, .2), rgba(18, 16, 12, .5)), url("img/hero-fortress.svg") center bottom / cover no-repeat; }
/* Logo in the style of the gold dragon crest: brass gold, dark bronze edge, red gem accents */
.hero-logo { display: flex; flex-direction: column; align-items: center; margin: 0 auto 4px; }
.crest-img {
  width: clamp(170px, 26vw, 240px); height: auto;
  /* the crest artwork has a stone background: fade it out at the edges */
  -webkit-mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, #000 70%, transparent 100%);
  mask-image: radial-gradient(ellipse 58% 58% at 50% 50%, #000 70%, transparent 100%);
  filter: drop-shadow(0 8px 18px rgba(0, 0, 0, .8)) saturate(1.05);
  margin-bottom: -18px; position: relative; z-index: 1;
}
.logo-plate { position: relative; padding: 6px 34px 2px; }
.logo-text {
  position: relative; display: inline-block;
  font-family: var(--font-logo); font-weight: 400; font-size: clamp(3.4rem, 9vw, 6.6rem); line-height: 1.05; letter-spacing: .02em;
  background: linear-gradient(180deg, #fff6cf 0%, #f3d488 18%, #d9a64a 38%, #8a5a1c 52%, #5a3810 56%, #b9822f 70%, #f1cf7e 88%, #fff0b8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  -webkit-text-stroke: 2px #3a2108;
  filter: drop-shadow(0 1px 0 #fff3c4) drop-shadow(0 3px 0 #2a1606) drop-shadow(0 0 16px rgba(255, 140, 50, .45)) drop-shadow(0 8px 10px rgba(0, 0, 0, .85));
}
/* small red gems either side of the word, like the crest's jewels */
.logo-plate::before, .logo-plate::after {
  content: ""; position: absolute; top: 54%; width: 14px; height: 14px;
  background: radial-gradient(circle at 35% 30%, #ff9a8a, #b0141a 55%, #4a0508);
  border: 2px solid #e2b453; transform: translateY(-50%) rotate(45deg); box-shadow: 0 0 10px rgba(255, 60, 40, .6);
}
.logo-plate::before { left: 4px; }
.logo-plate::after { right: 4px; }
.logo-rule { width: min(420px, 70%); height: 14px; margin: 0 auto 12px; background:
  linear-gradient(#e2b453, #e2b453) left center / calc(50% - 14px) 3px no-repeat,
  linear-gradient(#e2b453, #e2b453) right center / calc(50% - 14px) 3px no-repeat; position: relative; }
.logo-rule::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 12px; background: #c9462e; border: 2px solid #f0c96a; transform: translate(-50%, -50%) rotate(45deg); }
.hero .tagline { font: 700 1.05rem var(--font-head); letter-spacing: .18em; text-transform: uppercase; color: #f3c97a; text-shadow: 0 2px 10px rgba(0, 0, 0, .9); margin-bottom: 18px; }

/* Ornate buttons (hero) */
.btn-ornate {
  position: relative; padding: 14px 34px; font: 700 1.05rem var(--font-head); letter-spacing: .08em; text-transform: uppercase;
  color: #fff3d6; background: linear-gradient(#8a2a14, #4a120a); border: 2px solid #e2b453; border-radius: 4px;
  box-shadow: 0 0 0 2px #2a0b06, 0 0 22px rgba(255, 122, 30, .45), inset 0 1px 0 rgba(255, 220, 160, .35);
  text-shadow: 0 2px 4px rgba(0, 0, 0, .8);
}
.btn-ornate::before, .btn-ornate::after { content: ""; position: absolute; top: 50%; width: 12px; height: 12px; background: #e2b453; transform: translateY(-50%) rotate(45deg); box-shadow: 0 0 0 2px #2a0b06; }
.btn-ornate::before { left: -8px; }
.btn-ornate::after { right: -8px; }
.btn-ornate:hover { color: #fff; filter: brightness(1.15); text-decoration: none; }
.btn-ornate.dark { background: linear-gradient(#2c2418, #15110b); }

/* Stats row under the hero */
.hero-stats { display: flex; justify-content: center; gap: 48px; margin-top: 28px; flex-wrap: wrap; }
.hero-stats div { text-align: center; }
.hero-stats b { display: block; font: 700 1.7rem var(--font-head); color: #fff3d6; text-shadow: 0 2px 8px rgba(0, 0, 0, .8); }
.hero-stats span { font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: #e9c98a; }

/* Small crest next to the text logo in the header */
.logo { display: flex; align-items: center; gap: 8px; }
.logo img { width: 30px; height: 36px; object-fit: cover; -webkit-mask-image: radial-gradient(ellipse 50% 52% at 50% 50%, #000 70%, transparent 100%); mask-image: radial-gradient(ellipse 50% 52% at 50% 50%, #000 70%, transparent 100%); }
.logo { background: linear-gradient(180deg, #fff0b8, #d9a64a 45%, #8a5a1c 60%, #f1cf7e); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo span { color: transparent; }
.hero h1 { text-shadow: 0 3px 18px rgba(0, 0, 0, .7); }
.hero p.lead { color: #e9dcc0 !important; text-shadow: 0 2px 10px rgba(0, 0, 0, .8); }

/* Update banner (landing) */
.update-banner { display: grid; grid-template-columns: 1fr 1fr auto; gap: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: linear-gradient(90deg, #2a2213, #1f1b14); overflow: hidden; margin: -28px 0 32px; position: relative; z-index: 2; box-shadow: var(--shadow); }
.update-banner > div { padding: 14px 18px; }
.update-banner > div + div { border-left: 1px solid var(--line); }
.update-banner .label { font-size: .75rem; text-transform: uppercase; letter-spacing: .1em; color: var(--dim); }
.update-banner .title { font-weight: 700; color: var(--gold-2); }
.update-banner ul { margin: 4px 0 0; padding-left: 18px; color: var(--muted); font-size: .9rem; }
.update-banner .when { display: flex; flex-direction: column; justify-content: center; align-items: flex-start; gap: 6px; }
.countdown { font: 700 1.2rem var(--font-head); color: var(--gold-2); }

/* Showcase cards with artwork */
.showcase { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 32px; }
.showcase .card { padding: 0; overflow: hidden; }
.showcase img { display: block; width: 100%; aspect-ratio: 400 / 220; object-fit: cover; border-bottom: 1px solid var(--line); }
.showcase .body { padding: 16px 18px; }

/* Modal (download gate) */
.modal-backdrop { position: fixed; inset: 0; background: rgba(5, 4, 3, .78); display: none; align-items: center; justify-content: center; z-index: 100; padding: 16px; }
.modal-backdrop.open { display: flex; }
.modal { width: 100%; max-width: 440px; background: var(--panel); border: 1px solid var(--line-2); border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .7); overflow: hidden; }
.modal-head { padding: 18px 20px 0; display: flex; justify-content: space-between; align-items: start; gap: 12px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.modal-close { background: none; border: 0; color: var(--muted); font-size: 1.4rem; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }
.modal-body { padding: 0 20px 20px; }
.modal .tabs { margin-top: 12px; }
.hero h1 { font-size: 3rem; margin-bottom: .2em; }
.hero p.lead { font-size: 1.15rem; color: var(--muted); max-width: 640px; margin: 0 auto 28px; }
.hero .btn-row { justify-content: center; }
.feature h3 { display: flex; gap: 8px; align-items: center; }
.feature .icon { width: 36px; height: 36px; border-radius: 8px; background: var(--panel-2); border: 1px solid var(--line-2); display: grid; place-items: center; color: var(--gold); font-weight: 700; }

/* News */
.news-item { display: grid; grid-template-columns: 1fr; gap: 6px; }
.news-meta { font-size: .82rem; color: var(--dim); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.changelog h4 { font-family: var(--font-body); font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; margin: 12px 0 4px; }
.changelog ul { margin: 0; padding-left: 20px; }
.changelog .new h4 { color: var(--green); }
.changelog .chg h4 { color: var(--blue); }
.changelog .fix h4 { color: #f08a7e; }

/* Character cards */
.char-card { display: grid; grid-template-columns: 72px 1fr auto; gap: 14px; align-items: center; }
.portrait { width: 72px; height: 72px; border-radius: 8px; background: linear-gradient(135deg, #2c2518, #18140d); border: 1px solid var(--line-2); display: grid; place-items: center; font: 700 1.6rem var(--font-head); color: var(--gold); }
.char-card .name { font-weight: 700; font-size: 1.05rem; }

/* Skill grid (profile) */
.skills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.skill { display: flex; justify-content: space-between; padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; }
.skill b { color: var(--gold-2); }

/* Quest list (profile): completed quests only */
.quest-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.quest-list li { padding: 7px 10px 7px 30px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; position: relative; }
.quest-list li::before { content: "\2713"; position: absolute; left: 10px; color: var(--green); font-weight: 700; }

/* Vote list */
.vote-site { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-2); }
.vote-site + .vote-site { margin-top: 8px; }

/* Auth pages */
.auth { max-width: 440px; margin: 0 auto; }

/* Staff */
.staff-bar { background: #2a1512; border-bottom: 1px solid #7a2e25; color: #f3c2bb; font-size: .85rem; padding: 6px 0; }
/* public preview build */
.preview-bar { background: #2b2412; border-bottom: 1px solid #6b5420; color: var(--gold-2); font-size: .85rem; padding: 6px 0; text-align: center; }
body.preview .online-pill, body.preview .hero-stats { display: none; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 16px; font-size: .92rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.toggle { position: relative; display: inline-block; width: 38px; height: 22px; }
.toggle input { display: none; }
.toggle span { position: absolute; inset: 0; background: #3a3124; border-radius: 999px; cursor: pointer; transition: .15s; }
.toggle span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--text); border-radius: 50%; transition: .15s; }
.toggle input:checked + span { background: var(--green); }
.toggle input:checked + span::after { left: 19px; }

/* Placeholder notice for the mockup */
.mock-note { border: 1px dashed var(--line-2); color: var(--dim); padding: 8px 12px; border-radius: 6px; font-size: .82rem; margin-top: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .with-side { grid-template-columns: 1fr; }
  .showcase { grid-template-columns: 1fr 1fr; }
  .update-banner { grid-template-columns: 1fr 1fr; }
  .update-banner .when { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--line); flex-direction: row; align-items: center; justify-content: space-between; }
  .side-menu { position: static; display: flex; flex-wrap: wrap; gap: 4px; }
  .side-menu h4 { width: 100%; }
  .skills { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .site-header .container { justify-content: space-between; }
  .menu-toggle { display: inline-block; order: 3; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; background: var(--bg-2); border-bottom: 1px solid var(--line); padding: 8px 16px; }
  .nav.open { display: flex; }
  .online-pill { display: none; }
}
@media (max-width: 720px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
  .hero { padding: 64px 16px 56px; }
  .showcase { grid-template-columns: 1fr; }
  .update-banner { grid-template-columns: 1fr; }
  .update-banner > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .update-banner .when { flex-direction: column; align-items: flex-start; }
  .kv { grid-template-columns: 1fr; }
  .char-card { grid-template-columns: 56px 1fr; }
  .char-card .btn-row { grid-column: 1 / -1; }
  .portrait { width: 56px; height: 56px; }
}

/* ================= Stone theme components (banner style) ================= */
/* Carved stone: rough grey slab, light top edge, dark bottom edge, subtle speckle texture. */
.stone, .card, .stat, .side-menu, .update-banner, .modal, .vote-site, .skill, .quest-list li {
  background-color: var(--panel);
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,.035) 0 1px, transparent 2px),
    radial-gradient(circle at 70% 60%, rgba(0,0,0,.18) 0 1px, transparent 2px),
    linear-gradient(180deg, #34322d, #2a2925 40%, #24231f);
  background-size: 7px 7px, 9px 9px, 100% 100%;
  border: 1px solid #1b1a17;
  box-shadow: inset 0 1px 0 var(--stone-hi), inset 0 -2px 0 var(--stone-lo), 0 6px 18px rgba(0,0,0,.45);
}
.update-banner { background-image: linear-gradient(180deg, #3a3832, #2a2925 50%, #222120); }

/* Headings: silver chiselled text, gold for accents */
h1, h2 { background: linear-gradient(180deg, #ffffff, #d8d6cf 45%, #8f8c84 60%, #e9e7e1); -webkit-background-clip: text; background-clip: text; color: transparent; filter: drop-shadow(0 2px 0 rgba(0,0,0,.75)); letter-spacing: .01em; }
h3, h4 { color: var(--gold-2); }
a { color: var(--gold-2); }

/* Buttons as carved stone tiles (like the tab row in the banner) */
.btn {
  background: linear-gradient(180deg, #5d5a52, #44423c 55%, #36342f);
  border: 2px solid #1d1c19; border-radius: 7px; color: var(--silver);
  box-shadow: inset 0 1px 0 #8a867c, inset 0 -2px 0 #23221f, 0 3px 6px rgba(0,0,0,.45);
  text-shadow: 0 1px 0 #000;
}
.btn:hover { color: #fff; border-color: #1d1c19; filter: brightness(1.12); }
.btn-gold { background: linear-gradient(180deg, #5d5a52, #44423c 55%, #36342f); color: var(--gold-2); }
.btn-gold:hover { color: #ffd76a; }
.btn-red { background: linear-gradient(180deg, #6a2a22, #4a1c17 55%, #3a1511); color: #f6cfc8; box-shadow: inset 0 1px 0 #9a4a3f, inset 0 -2px 0 #23100d, 0 3px 6px rgba(0,0,0,.45); }

/* Header: dark stone bar; nav items as small stone tabs */
.site-header { background: linear-gradient(180deg, #262521, #1b1a17); border-bottom: 2px solid #0e0e0c; box-shadow: inset 0 -1px 0 #3d3b35; }
.nav a { color: var(--muted); border: 1px solid transparent; }
.nav a:hover { background: #33312c; border-color: #1b1a17; }
.nav a.active { color: var(--gold-2); background: linear-gradient(180deg, #4a4740, #33312c); border-color: #1b1a17; box-shadow: inset 0 1px 0 #77736a; }
.logo { background: none; -webkit-background-clip: border-box; background-clip: border-box; color: var(--silver); font-family: "Pirata One", serif; }
.logo span { color: var(--gold-2); }

/* Hero with the painted banner */
.hero.hero-banner { padding: 0 0 28px; background: radial-gradient(ellipse at 50% 0%, #2a2925, var(--bg) 70%); border-bottom: 2px solid #0e0e0c; }
.banner-frame { max-width: 1280px; margin: 0 auto; position: relative; }
.banner-frame img { display: block; width: 100%; height: auto; -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); }
.hero-banner .lead { margin-top: 18px !important; }
.btn-stone-lg { padding: 14px 30px; font: 400 1.35rem "Pirata One", serif; letter-spacing: .03em; }
.btn-stone-lg.gold { color: var(--gold-2); }
.hero-stats b, .stat .value, .countdown { font-family: "Cinzel", Georgia, serif; }

/* Section split: green world vs. Wilderness, as in the banner */
.worlds { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 32px; }
.world { position: relative; overflow: hidden; border-radius: 8px; min-height: 180px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end;
  border: 1px solid #1b1a17; box-shadow: inset 0 1px 0 var(--stone-hi), 0 6px 18px rgba(0,0,0,.45);
  background-image: linear-gradient(180deg, rgba(20,20,18,.15), rgba(20,20,18,.92) 75%), url("img/stone/hero-background.jpg"); background-size: 210% auto; }
.world.light { background-position: 0% 40%; }
.world.dark { background-position: 100% 40%; }
.world h3 { font: 400 1.7rem "Pirata One", serif; margin: 0 0 4px; }
.world.light h3 { color: #e9e7e1; }
.world.dark h3 { color: #ff9a4a; }
@media (max-width: 720px) { .worlds { grid-template-columns: 1fr; } }

/* ================= Generated stone artwork (branding-stone) ================= */
/* real stone texture on panels */
.card, .stat, .side-menu, .update-banner, .modal, .vote-site {
  background-image: linear-gradient(180deg, rgba(58,56,50,.55), rgba(20,20,18,.72)), url("img/stone/texture-stone.jpg");
  background-size: 100% 100%, 380px 380px;
}
/* hero: painted background + transparent logo */
.hero.hero-art { padding: 0 0 30px; border-bottom: 2px solid #0e0e0c;
  background: linear-gradient(180deg, rgba(20,20,18,0) 55%, var(--bg) 100%), url("img/stone/hero-background.jpg") center top / cover no-repeat; }
.hero-art .logo-art { display: block; width: min(760px, 94%); margin: 0 auto; padding-top: clamp(24px, 6vw, 64px); filter: drop-shadow(0 10px 24px rgba(0,0,0,.75)); }
.hero-art .lead { background: rgba(14,14,12,.62); display: inline-block; padding: 10px 18px; border-radius: 8px; margin-top: 8px !important; }
/* play button image */
.btn-play-img { display: inline-block; width: 250px; height: 100px; background: url("img/stone/play-normal.png") center / contain no-repeat; border: 0; text-indent: -9999px; overflow: hidden; }
.btn-play-img:hover { background-image: url("img/stone/play-hover.png"); }
.btn-play-img:active { background-image: url("img/stone/play-pressed.png"); }
/* header emblem */
.logo img { width: auto; height: 40px; -webkit-mask-image: none; mask-image: none; object-fit: contain; }
/* menu and tab icons */
.nav a img, .side-menu a img, .tabs img { width: 22px; height: 22px; vertical-align: -6px; margin-right: 6px; }
.feature .icon img { width: 40px; height: 40px; }
.feature .icon { width: auto; height: auto; background: none; border: 0; }
/* rank / game-mode icons from the generated atlas */
.ico { width: 16px; height: 16px; clip-path: none !important; background-color: transparent !important; background-size: contain; background-repeat: no-repeat; background-position: center; }
.ico-supporter { background-image: url("img/icons/rank-supporter-48.png"); }
.ico-tempmod { background-image: url("img/icons/rank-tempmod-48.png"); }
.ico-mod { background-image: url("img/icons/rank-moderator-48.png"); }
.ico-admin { background-image: url("img/icons/rank-admin-48.png"); }
.ico-iron { background-image: url("img/icons/mode-ironman-48.png"); }
.ico-hcim { background-image: url("img/icons/mode-hardcore-48.png"); }
.ico-uim { background-image: url("img/icons/mode-ultimate-48.png"); }
.ico-gim { background-image: url("img/icons/mode-group-48.png"); }
/* completed quests: tick icon */
.quest-list li::before { content: ""; width: 16px; height: 16px; top: 9px; background: url("img/icons/status-done-48.png") center / contain no-repeat; }
/* portraits: default avatar inside the stone frame */
.portrait { position: relative; background: url("img/stone/avatar-default.png") center 70% / 78% no-repeat, #1b1a17; border: 0; font-size: 0; }
.portrait::after { content: ""; position: absolute; inset: -6px; background: url("img/stone/frame-portrait.png") center / 100% 100% no-repeat; pointer-events: none; }
/* status gem next to the online count */
.online-pill img { width: 14px; height: 14px; vertical-align: -2px; margin-right: 4px; }

/* 404 page */
.notfound { text-align: center; padding: 20px 0 40px; }
.notfound img { width: min(520px, 90%); }
