/* RuneScape 2004 website. Change the look here: the tokens below set every colour and font on the site.
   Layout: dark stone page, a carved masthead with the gold logo and nav, content on parchment panels. */
:root {
    --stone: #14110c;          /* page background */
    --stone-2: #211b13;        /* masthead and footer */
    --stone-edge: #3b2f1e;     /* dark borders */
    --parchment: #e4d8b8;      /* content panels */
    --parchment-2: #d5c59d;    /* rows, table stripes */
    --parchment-edge: #8a6d3b; /* panel borders */
    --ink: #2a1c0c;            /* text on parchment */
    --ink-dim: #5e4a2c;        /* secondary text on parchment */
    --light: #efe4c8;          /* text on stone */
    --light-dim: #b3a17c;
    --gold: #ffb23a;           /* logo and headings on stone */
    --gold-hi: #ffd76a;
    --button: #e9a823;         /* Play Now button */
    --button-dark: #a8650f;
    --link: #7a3d00;
    --online: #2f8f2f;
    --chat-name: #000000;      /* public chat, as in the 2004 chatbox */
    --chat-text: #0000ff;
    --screen: #0b0f08;         /* status screen */
    --screen-text: #9cff6a;
    --font-display: "Pixelify Sans", "Courier New", monospace;
    --font-body: "Rubik", "Segoe UI", system-ui, sans-serif;
    --font-chat: "VT323", "Courier New", monospace;
    --font-arcade: "Press Start 2P", "Courier New", monospace; /* site name only */
    --radius: 4px;
    color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background-color: var(--stone);
    background-image: radial-gradient(ellipse at 50% -10%, #3a2c18 0%, transparent 60%),
        repeating-conic-gradient(rgba(255, 255, 255, .025) 0 25%, transparent 0 50%); /* 2px dither, like old 16-colour screens */
    background-size: 100% 900px, 4px 4px;
    background-repeat: no-repeat, repeat;
    color: var(--light); font: 17px/1.55 var(--font-body);
}
a { color: inherit; }
:focus-visible { outline: 3px solid var(--gold-hi); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; text-wrap: balance; margin: 0; }

.masthead { background: linear-gradient(var(--stone-2), #18130d); border-bottom: 3px solid var(--stone-edge); box-shadow: 0 2px 0 #000; }
.masthead-inner, .main, .footer-inner {
    width: 100%; max-width: 1080px; margin: 0 auto;
    padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.masthead-inner { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 24px; padding-block: 14px; }
.nav { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.nav a { text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: var(--radius); color: var(--light); }
.nav a:hover { color: var(--gold-hi); }
.nav a[aria-current="page"]:not(.btn-play) { color: var(--gold); box-shadow: inset 0 -2px 0 var(--gold); border-radius: 0; }

.btn-play {
    display: inline-block; text-decoration: none; font-family: var(--font-display); font-weight: 700; letter-spacing: .03em;
    color: var(--ink) !important; background: linear-gradient(var(--gold-hi), var(--button) 55%, var(--button-dark));
    border: 2px solid #000; border-radius: var(--radius); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 0 #000;
    padding: 8px 16px;
}
.btn-play:hover { filter: brightness(1.08); }
.btn-play:active { transform: translateY(1px); }
.btn-big { font-size: 1.2rem; padding: 12px 26px; }
.btn-huge { font-size: 1.5rem; padding: 16px 36px; }
.btn-ghost { display: inline-block; text-decoration: none; font-weight: 600; color: var(--gold); border: 2px solid var(--stone-edge); border-radius: var(--radius); padding: 10px 20px; }
.btn-ghost:hover { border-color: var(--gold); }

.main { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-block: 32px 56px; align-content: start; }

.hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 28px; align-items: center; }
.lead { font-size: 1.15rem; max-width: 52ch; color: var(--light); margin: 12px 0 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }


.panel {
    background: var(--parchment) linear-gradient(rgba(255, 255, 255, .18), transparent 120px); color: var(--ink);
    border: 3px solid var(--parchment-edge); border-radius: var(--radius); box-shadow: 0 0 0 2px #000, 0 10px 30px rgba(0, 0, 0, .45);
    padding: clamp(18px, 3.5vw, 32px); display: grid; gap: 18px; min-width: 0;
}
.panel a { color: var(--link); }
.panel-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; border-bottom: 2px solid var(--parchment-edge); padding-bottom: 8px; }
.panel-title h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.panel-title h2 { font-size: 1.5rem; }
.empty { color: var(--ink-dim); font-style: italic; }

.update { display: grid; gap: 6px; padding-bottom: 18px; border-bottom: 1px solid var(--parchment-edge); }
.update:last-child { border-bottom: 0; padding-bottom: 0; }
.update-head { display: grid; gap: 2px; }
.update time { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-dim); font-weight: 600; }
.update h3 { font-size: 1.3rem; }
.update h3 a { color: var(--ink); text-decoration: none; }
.update h3 a:hover { text-decoration: underline; }
.update p, .update ul { margin: 0; max-width: 70ch; }
.update ul { padding-left: 1.2em; display: grid; gap: 2px; }

.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button, .hs-skills button, .hs-search button {
    font: 500 .92rem var(--font-body); color: var(--ink); background: var(--parchment-2); border: 2px solid var(--parchment-edge);
    border-radius: var(--radius); padding: 6px 12px; cursor: pointer;
}
.filters button[aria-pressed="true"], .hs-skills button[aria-pressed="true"] { background: var(--stone-2); color: var(--gold); border-color: #000; }
.change-group { display: grid; gap: 8px; }
.change-group h3 { font-size: 1.2rem; }
.change-group small { font-family: var(--font-body); font-weight: 400; font-size: .9rem; color: var(--ink-dim); }
.changes { list-style: none; margin: 0; padding: 0; border: 2px solid var(--parchment-edge); border-radius: var(--radius); }
.changes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; padding: 10px 14px; border-top: 1px solid var(--parchment-edge); }
.changes li:first-child { border-top: 0; }
.changes li:nth-child(even) { background: rgba(0, 0, 0, .04); }
.changes p { margin: 2px 0 0; font-size: .96rem; max-width: 70ch; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; justify-content: end; align-content: start; }
.tag { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 7px; border-radius: 99px; color: var(--light); background: var(--stone-2); }
.tag-server { background: #2c5b2c; } .tag-content { background: #7a5410; } .tag-desktop { background: #284c78; } .tag-mobile { background: #8a3f10; } .tag-admin { background: #7d1f1f; }

.play { justify-items: center; text-align: center; padding-block: 48px; }
.play h1 { font-size: clamp(2rem, 5vw, 3rem); }
.play .lead { color: var(--ink); margin: 0; }
.play-alt { color: var(--ink-dim); margin: 0; }

.live { font-size: .9rem; color: var(--ink-dim); display: inline-flex; align-items: center; gap: 6px; }
.live::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--ink-dim); }
.live.on::before { background: var(--online); box-shadow: 0 0 0 3px rgba(47, 143, 47, .25); }
.hs { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 24px; align-items: start; }
.hs-skills { display: grid; gap: 4px; }
.hs-skills button { text-align: left; }
/* (one column no wider than the page: the name box's default width and the table can't stretch it past a phone screen) */
.hs-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; min-width: 0; }
.hs-main h2 { font-size: 1.4rem; }
.hs-search { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.hs-search label { font-weight: 600; font-size: .9rem; }
.hs-search-row { display: flex; gap: 6px; }
.hs-search input { flex: 1; min-width: 0; font: 1rem var(--font-body); color: var(--ink); background: #f4ecd6; border: 2px solid var(--parchment-edge); border-radius: var(--radius); padding: 7px 10px; }
.table-wrap { overflow-x: auto; border: 2px solid var(--parchment-edge); border-radius: var(--radius); }
.hs-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.hs-table th, .hs-table td { padding: 7px 12px; text-align: right; white-space: nowrap; }
.hs-table th:nth-child(2), .hs-table td:nth-child(2) { text-align: left; width: 100%; }
.hs-table th { background: var(--stone-2); color: var(--gold); font-family: var(--font-display); font-size: .9rem; }
.hs-table tbody tr:nth-child(even) { background: rgba(0, 0, 0, .05); }
.hs-table td.empty { text-align: center; }
.hs-table .me { background: rgba(255, 178, 58, .3) !important; font-weight: 700; }
.hs-table button.name { font: inherit; color: var(--link); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--online); margin-left: 6px; vertical-align: middle; }

.footer { background: var(--stone-2); border-top: 3px solid var(--stone-edge); color: var(--light-dim); font-size: .9rem; }
.footer-inner { padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); }

@media (max-width: 760px) {
    .hero { grid-template-columns: 1fr; }
    .hs { grid-template-columns: 1fr; }
    .hs-skills { display: flex; flex-wrap: wrap; }
}
@media (max-width: 520px) {
    .changes li { grid-template-columns: 1fr; }
    .tags { justify-content: start; }
    .nav { width: 100%; justify-content: space-between; }
}
@media (prefers-reduced-motion: no-preference) {
    .nav a, .btn-play, .btn-ghost, .filters button, .hs-skills button { transition: color .12s, border-color .12s, filter .12s, background .12s; }
}

/* original 2004 skill icons from the game's sprites, scaled without blurring */
.skill-icon { width: 25px; height: 25px; object-fit: contain; image-rendering: pixelated; flex: none; }
.hs-skills button, .hs-main h2, .hs-table .skill { display: flex; align-items: center; gap: 8px; }
.hs-main h2 .skill-icon { width: 32px; height: 32px; }

/* numbers line up in columns */
.hs-table td { font-variant-numeric: tabular-nums; }
.live { font-size: .9rem; }

/* pixel icons from the game's sprites (map icons are 15px, skill icons 25px), scaled without blurring */
.icon { width: 30px; height: 30px; image-rendering: pixelated; vertical-align: middle; flex: none; }
.panel-title h2, .change-group h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.change-group h3 .icon { width: 26px; height: 26px; }

/* ---------- retro touches ---------- */
.logo { text-decoration: none; font-family: var(--font-arcade); font-weight: 400; font-size: 1rem; line-height: 1.6; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.nav { margin-left: auto; }
/* stepped "pixel" corners */
.btn-play, .btn-ghost, .screen, .filters button, .hs-skills button {
    clip-path: polygon(0 4px, 4px 4px, 4px 0, calc(100% - 4px) 0, calc(100% - 4px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 4px), 0 calc(100% - 4px));
}
.btn-play { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .55), inset 0 -4px 0 rgba(0, 0, 0, .3); border-radius: 0; }
.btn-play:active { transform: translateY(2px); box-shadow: inset 0 4px 0 rgba(0, 0, 0, .3); }
.btn-ghost { border-radius: 0; background: rgba(0, 0, 0, .35); }

.title {
    font-family: var(--font-arcade); font-weight: 400; font-size: clamp(1.5rem, 3.6vw, 2.2rem); line-height: 1.35; color: var(--gold);
    text-shadow: 3px 3px 0 #9a4b00, 6px 6px 0 #000;
}

.screen {
    position: relative; background: var(--screen); color: var(--screen-text); border: 4px solid var(--stone-edge);
    padding: 16px 18px; display: grid; gap: 12px; font-family: var(--font-chat); font-size: 1.25rem; min-width: 0;
}
.screen::after { /* scanlines */
    content: ""; position: absolute; inset: 0; pointer-events: none;
    background: repeating-linear-gradient(to bottom, transparent 0 2px, rgba(0, 0, 0, .28) 2px 3px);
}
.screen-head { display: flex; justify-content: space-between; gap: 12px; text-transform: uppercase; color: var(--light-dim); }
.status { display: inline-flex; align-items: center; gap: 8px; }
.blink-dot { width: 10px; height: 10px; background: var(--light-dim); }
.status.up { color: var(--screen-text); } .status.up .blink-dot { background: var(--screen-text); }
.status.down { color: var(--chat-red, #ff3b30); } .status.down .blink-dot { background: #ff3b30; }
.count { display: flex; align-items: baseline; gap: 12px; }
.count b { font-weight: 400; font-size: 4.5rem; line-height: .9; color: var(--gold-hi); text-shadow: 0 0 12px rgba(255, 215, 106, .45); }
.count span { text-transform: uppercase; }
.stats { list-style: none; margin: 0; padding: 10px 0 0; border-top: 2px dashed #2d3a22; display: grid; gap: 4px; }
.stats li { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 10px; }
.stats .icon { width: 22px; height: 22px; object-fit: contain; }
.stats b { font-weight: 400; color: var(--gold-hi); }

.live-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.chatpanel, .howpanel { background: var(--stone-2); border: 3px solid var(--stone-edge); box-shadow: 0 0 0 2px #000; display: grid; grid-template-rows: auto 1fr auto; min-width: 0; }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px; border-bottom: 3px solid var(--stone-edge); }
.bar h2 { font-size: 1.15rem; color: var(--gold); text-shadow: 2px 2px 0 #000; }
.live-tag { font-family: var(--font-chat); font-size: 1.1rem; color: #ff3b30; text-transform: uppercase; display: inline-flex; align-items: center; gap: 6px; }
.live-tag::before { content: ""; width: 8px; height: 8px; background: #ff3b30; }
/* the game's own chatbox background and colours */
.chatbox {
    background: #d1c099 url("/site/img/chatback.png") center / 100% 100%; image-rendering: pixelated;
    height: 260px; overflow-y: auto; padding: 10px 14px; font-family: var(--font-chat); font-size: 1.3rem; line-height: 1.2;
    border: 3px solid #000; margin: 10px; overflow-wrap: anywhere;
}
.chatbox p { margin: 0; }
.chat-name { color: var(--chat-name); }
.chat-text { color: var(--chat-text); }
.chat-empty { color: #5b4a2b; }
.crown { width: 12px; height: 12px; image-rendering: pixelated; vertical-align: -1px; margin-right: 3px; }
.chat-foot { padding: 0 14px 12px; font-family: var(--font-chat); font-size: 1.2rem; color: var(--light-dim); }
.chat-foot a { color: var(--gold); }
.cursor { color: var(--gold); }

@media (prefers-reduced-motion: no-preference) {
    .status.up .blink-dot, .live-tag::before { animation: blink 1.2s steps(1) infinite; }
    .cursor { animation: blink 1s steps(1) infinite; }
}
@keyframes blink { 50% { opacity: 0; } }
@media (max-width: 760px) {
    .live-row { grid-template-columns: 1fr; }
}

/* ---------- suggestions and bugs ---------- */
.intro { margin: 0; max-width: 65ch; }
.post-form { display: grid; gap: 12px; max-width: 720px; }
.field { display: grid; gap: 4px; min-width: 0; }
.field label { font-weight: 500; font-size: .92rem; }
.field input, .field textarea {
    font: 1rem var(--font-body); color: var(--ink); background: #f4ecd6; border: 2px solid var(--parchment-edge);
    border-radius: 0; padding: 8px 10px; width: 100%; resize: vertical;
}
.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.form-note { margin: 0; font-size: .85rem; color: var(--ink-dim); }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; }
.form-actions .btn-play { border: 2px solid #000; cursor: pointer; font-size: 1rem; }
.form-actions .btn-play:disabled { filter: grayscale(.6); cursor: wait; }
.form-status { font-weight: 500; }
.form-status.ok { color: #1f6b1f; }
.form-status.bad { color: #9b1c1c; }
.count-tag { font-family: var(--font-chat); font-size: 1.2rem; color: var(--ink-dim); }
.posts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.post { background: rgba(255, 255, 255, .25); border: 2px solid var(--parchment-edge); padding: 12px 14px; display: grid; gap: 6px; min-width: 0; }
.post.resolved { opacity: .75; }
.post-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.post-meta { font-family: var(--font-chat); font-size: 1.15rem; color: var(--ink-dim); }
.post-body { margin: 0; white-space: pre-line; overflow-wrap: anywhere; max-width: 75ch; }
.state { font-size: .75rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 2px 8px; color: var(--light); }
.state-open { background: #9b1c1c; }
.state-done { background: #2c5b2c; }

/* ---------- menu icons (the game's side-tab icons) ---------- */
.nav a { display: inline-flex; align-items: center; gap: 6px; }
.nav-icon { width: 20px; height: 20px; object-fit: contain; image-rendering: pixelated; flex: none; }
.btn-play .nav-icon { filter: drop-shadow(1px 1px 0 rgba(0, 0, 0, .4)); }

/* ---------- in-game interface windows (Suggestions, Bugs) ---------- */
:root {
    --if-orange: #ff981f;   /* interface titles */
    --if-yellow: #ffff00;   /* interface labels */
    --if-text: #f1e6c8;
    --if-dim: #c9b88f;
    --if-edge: #6b5a43;
    --q-red: #ff0000;       /* quest list: not started */
    --q-green: #00ff00;     /* quest list: completed */
}
.gamebox {
    background: #3e3529 url("/site/img/stone.png") repeat; image-rendering: pixelated; color: var(--if-text);
    border: 3px solid #1a140d; box-shadow: inset 0 0 0 2px var(--if-edge), inset 0 0 0 4px #241c13, 0 0 0 2px #000, 0 10px 30px rgba(0, 0, 0, .45);
    padding: clamp(18px, 3.5vw, 32px); display: grid; gap: 18px; min-width: 0;
}
.gamebox h1, .gamebox h2 { color: var(--if-orange); text-shadow: 2px 2px 0 #000; }
.gamebox .panel-title { border-bottom: 2px solid var(--if-edge); }
.gamebox .panel-title h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); }
.gamebox .panel-title h2 { font-size: 1.5rem; }
.gamebox .intro { color: var(--if-text); text-shadow: 1px 1px 0 #000; }
.gamebox .field label { color: var(--if-yellow); font-family: var(--font-display); font-weight: 500; text-shadow: 1px 1px 0 #000; }
/* text boxes look like the game's chat input */
.gamebox .field input, .gamebox .field textarea {
    background: #d1c099 url("/site/img/chatback.png") center / 100% 100%; color: #000; border: 2px solid #000;
    box-shadow: inset 0 0 0 1px var(--if-edge); font-family: var(--font-chat); font-size: 1.35rem; line-height: 1.2;
}
.gamebox .field input:focus, .gamebox .field textarea:focus { outline: 2px solid var(--if-yellow); outline-offset: 1px; }
.gamebox .form-note, .gamebox .empty, .gamebox .count-tag { color: var(--if-dim); text-shadow: 1px 1px 0 #000; }
.gamebox .form-actions .btn-play { color: var(--if-orange) !important; background: linear-gradient(#665844, #463b2d); text-shadow: 1px 1px 0 #000; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), inset 0 -3px 0 rgba(0, 0, 0, .35); }
.gamebox .form-actions .btn-play:hover { color: var(--if-yellow) !important; filter: none; }
.gamebox .form-status { text-shadow: 1px 1px 0 #000; }
.gamebox .form-status.ok { color: var(--q-green); }
.gamebox .form-status.bad { color: #ff5a4a; }
/* entries read like the quest journal */
.gamebox .post { background: rgba(0, 0, 0, .28); border: 2px solid #241c13; box-shadow: inset 0 0 0 1px var(--if-edge); }
.gamebox .post-head strong { font-family: var(--font-display); font-weight: 600; color: var(--if-orange); text-shadow: 1px 1px 0 #000; font-size: 1.1rem; }
.gamebox .post-meta { color: var(--if-dim); }
.gamebox .post-body { color: var(--if-text); }
.gamebox .post.resolved { opacity: 1; }
.gamebox .state { background: none; padding: 0; font-family: var(--font-display); font-size: .95rem; letter-spacing: .02em; text-shadow: 1px 1px 0 #000; }
.gamebox .state-open, .q-red { color: var(--q-red); }
.gamebox .state-done, .q-green { color: var(--q-green); }
.legend { margin: 0; font-family: var(--font-chat); font-size: 1.2rem; color: var(--if-dim); text-shadow: 1px 1px 0 #000; }
.legend span { font-family: var(--font-display); }
.nav a { padding: 8px 8px; font-size: .95rem; }
.nav { gap: 2px; }

/* ---------- how to play ---------- */
.howpanel { grid-template-rows: auto 1fr auto; }
.steps { list-style: none; margin: 0; padding: 14px 16px 16px; display: grid; gap: 10px; counter-reset: step; align-content: start; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: center; gap: 12px; color: var(--light); font-size: 1.05rem; }
.steps li::before {
    content: counter(step); display: grid; place-items: center; width: 34px; height: 34px;
    font-family: var(--font-arcade); font-size: .8rem; color: var(--ink);
    background: linear-gradient(var(--gold-hi), var(--button) 55%, var(--button-dark)); border: 2px solid #000;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 2px 0 #000;
}
.footer p { margin: 0; text-align: center; }
.footer-inner { display: grid; gap: 4px; }
.how-sub { margin: 0; padding: 12px 16px 0; font-family: var(--font-body); font-weight: 700; font-size: 1.1rem; color: var(--gold-hi); text-shadow: 2px 2px 0 #000; }
.howpanel { grid-template-rows: auto auto 1fr; }
.stats b { text-align: right; }

/* home: the 2004 login screen (title.jpg, mirrored the way the game draws it), faded in behind the top of the page */
.home-bg {
    position: absolute; top: 0; left: 0; right: 0; height: 820px; z-index: -1; pointer-events: none;
    background: url("/site/img/login-bg.jpg") center top / cover no-repeat; opacity: .32;
    -webkit-mask-image: linear-gradient(#000 45%, transparent); mask-image: linear-gradient(#000 45%, transparent);
}
/* how to play: title, subtitle and the steps sit centred in the box */
.howpanel .bar { justify-content: center; }
.how-sub { text-align: center; }
.steps { justify-content: center; align-content: center; }
.hero-text { text-align: center; } /* the name, the intro bullets and Play Now, centred in their column */
.hero .lead { max-width: 60ch; margin-left: auto; margin-right: auto; font-family: 'Cinzel', Georgia, serif; font-weight: 600; font-size: 1.08rem; line-height: 1.6; letter-spacing: .02em; }
.lead-list { list-style: none; padding: 0; } /* each line of site.json's intro becomes a bullet */
.lead-list li::before { content: '\25C6'; color: var(--gold); font-size: .8em; margin-right: .5em; vertical-align: .12em; }
.hero-actions { justify-content: center; }
.count { justify-content: center; }
/* the in-game bug has dark legs drawn for a light tab; a faint outline keeps them visible on the dark menu */
.nav-icon[src$="/bug.png"] { filter: drop-shadow(0 0 1px rgba(255, 225, 170, .9)); }

/* ---------- events ---------- */
.events { background: var(--stone-2); border: 3px solid var(--stone-edge); box-shadow: 0 0 0 2px #000; min-width: 0; }
.events .bar h2 { display: flex; align-items: center; gap: 10px; }
.events .bar .icon { width: 24px; height: 24px; }
.events-body {
    display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 24px; padding: 18px 24px;
    background: radial-gradient(ellipse at 22% 60%, rgba(255, 140, 20, .22), transparent 55%), linear-gradient(#17120c, #0e0b08);
}
.events-art { width: 180px; height: auto; image-rendering: pixelated; filter: drop-shadow(0 0 14px rgba(255, 150, 30, .35)) drop-shadow(4px 6px 0 rgba(0, 0, 0, .6)); }
.events-text {
    margin: 0; font-family: var(--font-display); font-weight: 700; font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1.3;
    color: #ff981f; text-shadow: 3px 3px 0 #000, 0 0 18px rgba(255, 140, 20, .45);
}
@media (max-width: 560px) {
    .events-body { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .events-art { width: 140px; }
}
.events-copy { display: grid; gap: 14px; min-width: 0; }
.events-countdown {
    margin: 0; display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; justify-self: start;
    background: var(--screen); border: 3px solid var(--stone-edge); padding: 8px 14px; font-family: var(--font-chat); color: var(--screen-text);
    font-size: 1.35rem; text-transform: uppercase;
}
.events-countdown b { font-weight: 400; color: var(--gold-hi); font-size: 1.8rem; text-shadow: 0 0 10px rgba(255, 215, 106, .4); }
@media (max-width: 560px) { .events-countdown { justify-self: center; } }
.events-countdown b { text-transform: none; }

/* hiscores: player names, rows sliding in, numbers counting up (hiscores.js) */
.hs-table button.name { font-family: 'Cinzel', Georgia, serif; font-weight: 700; letter-spacing: .03em; }
.hs-table button.name { font-size: 1.05rem; }
@keyframes hs-row-in { from { opacity: 0; transform: translateX(-12px); } to { opacity: 1; transform: none; } }
.hs-row-in { animation: hs-row-in .35s ease-out both; }
@keyframes hs-gain { 0%, 60% { color: #1a8f2e; text-shadow: 0 0 6px rgba(80, 220, 100, .6); } 100% { color: inherit; text-shadow: none; } }
.hs-gain { animation: hs-gain 2s ease-out; }
@media (prefers-reduced-motion: reduce) { .hs-row-in, .hs-gain { animation: none; } }

/* hiscores: character viewer and worn equipment tab (viewer.js) */
.viewer { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; }
.viewer[hidden] { display: none; }
.viewer-box { background: radial-gradient(ellipse at 50% 40%, #4a4033, #2a241c 75%); border: 3px solid #000; box-shadow: inset 0 0 0 2px #6b5a3e; border-radius: var(--radius); padding: 8px; text-align: center; }
.viewer-model { display: block; width: 220px; height: 300px; cursor: grab; touch-action: none; image-rendering: pixelated; }
.viewer-model:active { cursor: grabbing; }
.viewer-hint { margin: 2px 0 0; font-family: var(--font-chat); font-size: 1.05rem; color: var(--light-dim); }
.viewer-tab { position: relative; flex: 1; min-width: 210px; display: grid; place-items: center; background: #3e3529; }
.viewer-worn { display: block; width: 285px; max-width: 100%; height: auto; aspect-ratio: 190 / 200; image-rendering: pixelated; }
.viewer-tip { position: absolute; z-index: 2; pointer-events: none; white-space: nowrap; padding: 2px 6px; background: #000; border: 1px solid #5d4a2e; font-family: var(--font-chat); font-size: 1.2rem; color: #ff981f; text-shadow: 1px 1px 0 #000; }
.viewer-tip[hidden] { display: none; }
.viewer-status { flex-basis: 100%; margin: 0; font-size: .9rem; color: var(--ink-dim); }
/* the combat level under the worn equipment, and "Online now" pulsing slowly in red while they're online */
.viewer-combat { margin: 6px 0 0; font-family: var(--font-chat); font-size: 1.25rem; color: #ff981f; text-shadow: 1px 1px 0 #000; }
.viewer-combat[hidden] { display: none; }
.viewer-status.viewer-live { color: #e03a2e; font-weight: 600; animation: viewer-live 2.4s ease-in-out infinite; }
@keyframes viewer-live { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { .viewer-status.viewer-live { animation: none; } }

/* hiscores in the game's own fonts (public/site/fonts, made from content/fonts p12/b12): drawn at 2x, so every
   font pixel lands on whole screen pixels and stays sharp, like the skills tab in game */
@font-face { font-family: 'RuneScape Plain 12'; src: url('/site/fonts/rs-plain-12.otf') format('opentype'); font-display: swap; }
@font-face { font-family: 'RuneScape Bold 12'; src: url('/site/fonts/rs-bold-12.otf') format('opentype'); font-display: swap; }
.hs, .hs input, .hs button, .hs-table button.name { font-family: 'RuneScape Plain 12', var(--font-body); font-size: 24px; letter-spacing: 0; -webkit-font-smoothing: none; font-smooth: never; }
.hs-skills button, .hs-search button, .hs-table th, .hs-main h2, .hs-table button.name { font-family: 'RuneScape Bold 12', var(--font-display); font-weight: 400; font-size: 24px; }
.hs-table th { color: #ff981f; text-shadow: 2px 2px 0 #000; }
.hs-skills button[aria-pressed="true"] { color: #ffff00; text-shadow: 2px 2px 0 #000; }
.hs-table td, .hs-skills button, .hs-search label { line-height: 1.1; }
.hs-search label { font-family: 'RuneScape Bold 12', var(--font-body); font-weight: 400; font-size: 24px; }
@media (min-width: 761px) { .hs { grid-template-columns: max-content minmax(0, 1fr); } }
/* phones: the table in the same font at 16px (sharp on 3x screens), with tighter cells and short column headings
   (# and Lvl; the full ones stay for screen readers), so rank, name, level and XP all fit */
.th-short { display: none; }
@media (max-width: 520px) {
    .hs-table th, .hs-table td, .hs-table button.name { font-size: 16px; }
    .panel:has(> .hs) { padding-inline: 10px; }
    .hs-table th, .hs-table td { padding: 5px 3px; }
    .hs-table th:first-child, .hs-table td:first-child { padding-left: 6px; }
    .hs-table th:last-child, .hs-table td:last-child { padding-right: 6px; }
    .hs-table .skill { gap: 4px; }
    .hs-table .skill .skill-icon { width: 20px; height: 20px; }
    .th-long { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
    .th-short { display: inline; }
}
/* the character box and the worn equipment box are the same height: both canvases are 300px tall, and the
   "Drag to turn" hint sits over the bottom of the character instead of below it */
.viewer { align-items: stretch; }
.viewer-box:has(.viewer-model) { position: relative; display: grid; place-items: center; }
.viewer-hint { position: absolute; left: 0; right: 0; bottom: 10px; margin: 0; pointer-events: none; text-shadow: 1px 1px 0 #000; }

/* ---------- admin page (/admin): server statistics, grouped like the in-game interfaces ---------- */
.admin-signin .post-form { max-width: 520px; }
.admin-signout { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 0; }
.admin-signout .btn-play, .admin-links .btn-play { font-size: .95rem; padding: 6px 14px; cursor: pointer; color: var(--if-orange) !important; background: linear-gradient(#665844, #463b2d); text-shadow: 1px 1px 0 #000; }
.admin-signout .btn-play:hover, .admin-links .btn-play:hover { color: var(--if-yellow) !important; filter: none; }
.admin-links { display: flex; flex-wrap: wrap; gap: 8px; }
.admin-groups { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); gap: 18px; align-items: start; }
.admin-group { display: grid; gap: 8px; min-width: 0; }
.admin-group h2 { font-size: 1.3rem; }
.admin-list { margin: 0; background: rgba(0, 0, 0, .28); border: 2px solid #241c13; box-shadow: inset 0 0 0 1px var(--if-edge); }
.admin-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: baseline; padding: 8px 12px; border-top: 1px solid rgba(107, 90, 67, .6); }
.admin-row:first-child { border-top: 0; }
.admin-row dt { color: var(--if-yellow); font-family: var(--font-display); font-weight: 500; text-shadow: 1px 1px 0 #000; min-width: 0; }
.admin-row dt small { display: block; font-family: var(--font-body); font-weight: 400; font-size: .82rem; color: var(--if-dim); }
.admin-row dd { margin: 0; text-align: right; font-family: var(--font-chat); font-size: 1.45rem; line-height: 1.1; color: var(--if-text); text-shadow: 1px 1px 0 #000; overflow-wrap: anywhere; }
/* the admin trades list: each trade shows both sides next to each other (stacked on phones) */
.trades { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trade { background: rgba(0, 0, 0, .28); border: 2px solid #241c13; box-shadow: inset 0 0 0 1px var(--if-edge); padding: 10px 14px; display: grid; gap: 8px; min-width: 0; }
.trade .post-meta { color: var(--if-dim); text-shadow: 1px 1px 0 #000; }
.trade-sides { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 10px 18px; }
.trade-side { display: grid; gap: 4px; align-content: start; min-width: 0; }
.trade-side p { margin: 0; }
.trade-who { color: var(--if-text); text-shadow: 1px 1px 0 #000; overflow-wrap: anywhere; }
.trade-who strong { font-family: var(--font-display); font-weight: 600; color: var(--if-orange); font-size: 1.1rem; }
.trade-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; font-family: var(--font-chat); font-size: 1.3rem; line-height: 1.1; color: var(--if-text); text-shadow: 1px 1px 0 #000; }
.trade-count { color: var(--if-yellow); }
.trade-value { color: var(--if-dim); text-shadow: 1px 1px 0 #000; }
.trade-value b { color: var(--q-green); font-family: var(--font-chat); font-size: 1.3rem; font-weight: 400; }
.admin-pages { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 10px; }
.admin-pages .btn-play { font-size: .95rem; padding: 6px 14px; color: var(--if-orange) !important; background: linear-gradient(#665844, #463b2d); text-shadow: 1px 1px 0 #000; }
.admin-pages .btn-play:hover { color: var(--if-yellow) !important; filter: none; }
/* admin tables (open GE offers, accounts): the trade-window look, scrolling sideways on phones */
.admin-table { width: 100%; border-collapse: collapse; background: rgba(0, 0, 0, .28); border: 2px solid #241c13; box-shadow: inset 0 0 0 1px var(--if-edge); color: var(--if-text); text-shadow: 1px 1px 0 #000; }
.admin-table th, .admin-table td { padding: 6px 10px; text-align: left; border-top: 1px solid rgba(107, 90, 67, .6); white-space: nowrap; }
.admin-table th { color: var(--if-yellow); font-family: var(--font-display); font-weight: 500; border-top: 0; }
.admin-table td { font-family: var(--font-chat); font-size: 1.25rem; line-height: 1.1; }
.admin-table td .btn-play, .admin-confirm .btn-play { font-size: .9rem; padding: 4px 12px; color: var(--if-orange) !important; background: linear-gradient(#665844, #463b2d); text-shadow: 1px 1px 0 #000; font-family: var(--font-display); }
.admin-table td .btn-play:hover, .admin-confirm .btn-play:hover { color: var(--if-yellow) !important; filter: none; }
.admin-confirm { border-color: #7d1f1f; }
.admin-confirm .admin-danger { color: #fff !important; background: linear-gradient(#a33, #6b1515); cursor: pointer; }
/* admin accounts: tabs, search and sort */
.admin-tab { text-decoration: none; font: 500 .95rem var(--font-display); color: var(--if-orange); background: rgba(0, 0, 0, .28); border: 2px solid #241c13; box-shadow: inset 0 0 0 1px var(--if-edge); padding: 6px 12px; text-shadow: 1px 1px 0 #000; }
.admin-tab[aria-current="page"] { color: var(--if-yellow); background: rgba(0, 0, 0, .5); }
.admin-search { display: flex; flex-wrap: wrap; align-items: end; gap: 10px 12px; }
.admin-search .field { flex: 1 1 180px; max-width: 280px; }
.admin-search select { font: 1.2rem var(--font-chat); color: #000; background: #d1c099; border: 2px solid #000; box-shadow: inset 0 0 0 1px var(--if-edge); padding: 6px 8px; width: 100%; }
.admin-search .btn-play { font-size: .95rem; padding: 7px 16px; cursor: pointer; color: var(--if-orange) !important; background: linear-gradient(#665844, #463b2d); text-shadow: 1px 1px 0 #000; border: 2px solid #000; }
.admin-wrap { border: 0; }
.admin-dim { color: var(--if-dim); }
.admin-row dd a { color: var(--if-orange); }
.admin-row dd a:hover { color: var(--if-yellow); }
/* admin accounts table: roomier than the other admin tables, scrolling sideways inside its own box on narrow screens */
.acc-wrap { margin-top: 10px; overflow-x: auto; }
/* (each account in a box of its own, with a clear border and a gap between them; every column centred) */
.acc-table { border-collapse: separate; border-spacing: 0 10px; }
.acc-table th, .acc-table td { padding: 12px 20px; line-height: 1.35; text-align: center !important; vertical-align: middle; }
.acc-table th { border-bottom: 2px solid var(--if-edge); }
.acc-table tbody td { background: rgba(255, 255, 255, .06); border-top: 2px solid #a08c66; border-bottom: 2px solid #a08c66; }
.acc-table tbody td:first-child { border-left: 2px solid #a08c66; border-radius: 6px 0 0 6px; }
.acc-table tbody td:last-child { border-right: 2px solid #a08c66; border-radius: 0 6px 6px 0; }
.acc-table tbody tr:hover td { background: rgba(255, 255, 255, .11); }
.acc-num { font-variant-numeric: tabular-nums; }
/* the accounts page uses the whole width of the window (up to 1700px), so every column fits */
.admin-wide { margin-inline: min(0px, calc(50% - min(50vw - 24px, 850px))); }
.acc-table .btn-play { font-size: .9rem; padding: 4px 14px; color: var(--if-orange) !important; background: linear-gradient(#665844, #463b2d); text-shadow: 1px 1px 0 #000; font-family: var(--font-display); }
.acc-table td .acc-ban { color: #fff !important; background: linear-gradient(#a33, #6b1515); }
.acc-table td .acc-unban { color: var(--if-text) !important; background: linear-gradient(#2c7a2c, #1b4d1b); }
.acc-table .btn-play:hover { filter: brightness(1.15); }
/* the ban / unban confirm step */
.ban-confirm { max-width: 720px; gap: 12px; }
.ban-lengths { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--if-text); text-shadow: 1px 1px 0 #000; }
.ban-lengths legend { color: var(--if-yellow); font-family: var(--font-display); padding: 0; margin-bottom: 6px; }
.ban-lengths label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.ban-confirm .form-actions .btn-play { font-size: .95rem; padding: 6px 14px; cursor: pointer; }
/* (so all the columns fit the wide page: cells may wrap, long addresses break anywhere, end dates go under "Until") */
.acc-table { width: 100%; }
.acc-table th, .acc-table td { white-space: normal; padding-inline: 12px; }
.acc-table td.acc-ip { overflow-wrap: anywhere; min-width: 9ch; max-width: 22ch; font-size: 1.1rem; }
.acc-table .acc-until { display: inline-block; min-width: 9ch; }
.acc-table td.acc-place { min-width: 12ch; max-width: 24ch; }
.acc-table .acc-coord { display: block; font-size: .8em; color: var(--if-dim); font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-table td.acc-played { white-space: nowrap; font-variant-numeric: tabular-nums; }
.acc-table td:first-child { min-width: 10ch; }
.acc-table td .btn-play { white-space: nowrap; }
.ban-confirm .form-actions .admin-danger { color: #fff !important; background: linear-gradient(#a33, #6b1515); }
@media (max-width: 1250px) {
    .acc-table th, .acc-table td { padding-inline: 6px; }
    .acc-table th { font-size: .85rem; }
    .acc-table td { font-size: 1.1rem; }
    .acc-table td.acc-ip { font-size: 1rem; max-width: 18ch; }
}
/* the delete confirm step */
.delete-confirm { border-color: #c22; }
.delete-list { margin: 0; padding-left: 1.3em; color: var(--if-text); text-shadow: 1px 1px 0 #000; display: grid; gap: 2px; }
.acc-table td .acc-delete { background: linear-gradient(#5a1010, #2e0707); }

/* custom: the account page (/account) */
.account-signin .post-form, .account .post-form { max-width: 560px; }
.account-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-signout { margin: 0; }
.account .viewer { margin-top: 14px; }
.account-grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 24px; align-items: start; margin-top: 18px; }
.account-side, .account-main { display: grid; gap: 14px; min-width: 0; }
.account-main h2 { font-size: 1.4rem; margin-top: 6px; }
/* each detail: its title on a stone band in the game's lettering (as the hiscores headings), the value below it */
.account-facts { display: grid; gap: 10px; margin: 0; }
.account-facts div { display: grid; border: 2px solid var(--parchment-edge); border-radius: var(--radius); overflow: hidden; }
.account-facts dt { background: var(--stone-2); color: var(--gold); font-family: var(--font-display); font-size: 1rem; letter-spacing: .03em; text-shadow: 1px 1px 0 #000; padding: 4px 12px; }
.account-facts dd { margin: 0; padding: 7px 12px; font-weight: 500; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
    .account-grid { grid-template-columns: minmax(0, 1fr); }
}

/* custom: the admin drop events page (/admin/events) */
.drop-event { display: grid; gap: 6px; }
.drop-event p { margin: 0; }
.drop-event .table-wrap { margin-top: 6px; }
.drop-table td, .drop-table th { text-align: left; }

/* custom: the admin Reports page (/admin/reports) */
.report { display: grid; gap: 6px; }
.report p { margin: 0; }
.report-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.report-actions { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; margin-top: 4px; }
.report-actions form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.report-review input[type="text"] { min-width: 0; width: min(320px, 100%); font: .95rem var(--font-body); padding: 5px 8px; border-radius: var(--radius); border: 2px solid var(--if-edge); background: rgba(0, 0, 0, .3); color: var(--if-text); }
.report-delete label { color: var(--if-dim); font-size: .85rem; display: flex; gap: 4px; align-items: center; }
