:root {
  --bg: #0d0b0a; --panel: #17130f; --line: #3a2d1f; --text: #e8dcc8; --muted: #9c8c74;
  --gold: #d9a441; --gold-hi: #f3c96b; --red: #c0503a; --green: #6fbf5a;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--text); }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: radial-gradient(ellipse at top, #2a1a0c 0%, var(--bg) 60%) no-repeat;
}
a { color: var(--gold-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .brand { font-family: Georgia, "Times New Roman", serif; letter-spacing: .02em; }
h1 { color: var(--gold-hi); margin: 0 0 .6em; }
h2 { color: var(--gold); font-size: 1.15rem; margin: 0 0 .8em; text-transform: uppercase; letter-spacing: .08em; }

.top {
  display: flex; align-items: center; gap: 1.5rem; padding: .9rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid var(--line); background: rgba(13, 11, 10, .85); position: sticky; top: 0; z-index: 2;
  backdrop-filter: blur(6px); flex-wrap: wrap;
}
.brand { font-size: 1.6rem; font-weight: bold; color: var(--gold-hi); text-shadow: 0 0 12px rgba(217, 164, 65, .45); }
.brand:hover { text-decoration: none; }
nav { display: flex; gap: 1.1rem; flex: 1; overflow-x: auto; scrollbar-width: none; white-space: nowrap; }
nav::-webkit-scrollbar { display: none; }
nav a { color: var(--text); padding: .3rem 0; border-bottom: 2px solid transparent; }
nav a:hover { text-decoration: none; color: var(--gold-hi); }
nav a[aria-current] { border-color: var(--gold); color: var(--gold-hi); }

.play, button {
  display: inline-block; padding: .55rem 1.3rem; border-radius: 4px; border: 1px solid #f7d27e;
  background: linear-gradient(#e6b350, #a8741e); color: #1b1006; font-weight: 700; cursor: pointer; font: inherit;
  font-weight: 700; box-shadow: 0 0 14px rgba(217, 164, 65, .35);
}
.play:hover, button:hover { filter: brightness(1.12); text-decoration: none; }
button:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.play.big { font-size: 1.2rem; padding: .8rem 2.2rem; }
.ghost { display: inline-block; padding: .55rem 1.3rem; border: 1px solid var(--line); border-radius: 4px;
  color: var(--text); background: transparent; box-shadow: none; font-weight: 400; }
.ghost:hover { border-color: var(--gold); text-decoration: none; }
button.danger { background: transparent; border-color: var(--red); color: var(--red); box-shadow: none; padding: .3rem .8rem; }

main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 1.5rem clamp(1rem, 3vw, 2rem); }
.hero { text-align: center; padding: 3rem 1rem 2.5rem; }
.hero h1 { font-size: clamp(2.6rem, 8vw, 4.5rem); margin: 0; text-shadow: 0 0 30px rgba(217, 164, 65, .5); }
.hero p { color: var(--muted); font-size: 1.1rem; }
.cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin: 1.5rem 0 .5rem; }
.hint { color: var(--muted); font-size: .85rem; }

.grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (max-width: 860px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.panel {
  background: linear-gradient(var(--panel), #120f0c); border: 1px solid var(--line); border-radius: 6px;
  padding: 1.3rem 1.5rem; margin-bottom: 1.5rem; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
}
.panel.narrow { max-width: 520px; margin: 1rem auto; }
.post { padding: 0 0 1.2rem; margin-bottom: 1.2rem; border-bottom: 1px solid var(--line); }
.post:last-child { border: 0; margin: 0; padding: 0; }
.post h3 { margin: .2rem 0 .5rem; font-size: 1.3rem; }
.post p { line-height: 1.6; margin: .5em 0; }
.post.single { max-width: 800px; margin: 1rem auto; }
time { color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; }
.more { display: inline-block; margin-top: .8rem; font-size: .9rem; }
.empty { color: var(--muted); font-style: italic; }

table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.scroll { overflow-x: auto; }
th { text-align: left; color: var(--muted); font-weight: 600; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .06em; padding: .4rem .5rem; border-bottom: 1px solid var(--line); }
td { padding: .45rem .5rem; border-bottom: 1px solid rgba(58, 45, 31, .5); white-space: nowrap; }
tbody tr:hover { background: rgba(217, 164, 65, .06); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.rank { color: var(--muted); width: 2.2rem; }
tbody tr:nth-child(1) .rank, tbody tr:nth-child(1) .name { color: #ffd76a; font-weight: 700; }
tbody tr:nth-child(2) .rank, tbody tr:nth-child(2) .name { color: #d8d8e0; font-weight: 700; }
tbody tr:nth-child(3) .rank, tbody tr:nth-child(3) .name { color: #d99a63; font-weight: 700; }

.form { display: flex; flex-direction: column; gap: .7rem; }
.form label { display: flex; flex-direction: column; gap: .3rem; font-size: .9rem; color: var(--muted); }
.form small { color: var(--muted); margin-top: -.4rem; font-size: .78rem; }
input, textarea {
  font: inherit; color: var(--text); background: #0b0907; border: 1px solid var(--line); border-radius: 4px; padding: .6rem .7rem;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(217, 164, 65, .2); }
.form button { margin-top: .5rem; align-self: flex-start; }
.trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: .7rem 1rem; border-radius: 4px; border: 1px solid; }
.notice.ok { border-color: var(--green); color: #b7e6a8; background: rgba(111, 191, 90, .08); }
.notice.error { border-color: var(--red); color: #f0b3a6; background: rgba(192, 80, 58, .08); }
.admin-list { list-style: none; padding: 0; }
.admin-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .5rem 0;
  border-bottom: 1px solid var(--line); }
.admin-list form { margin: 0; }

footer { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem clamp(1rem, 4vw, 3rem);
  border-top: 1px solid var(--line); color: var(--muted); font-size: .8rem; }
.status i { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; margin-right: .4rem; background: var(--muted); }
.status.on i { background: var(--green); box-shadow: 0 0 8px var(--green); }
.rules ul { margin: 0; padding-left: 1.2rem; line-height: 1.8; }
.rules code { color: var(--gold-hi); background: #0b0907; border: 1px solid var(--line); border-radius: 3px; padding: 0 .3rem; }

/* --- more pages --- */
.discord { color: #fff; background: #5865f2; border-radius: 4px; padding: .5rem 1rem; font-weight: 600; }
.discord:hover { text-decoration: none; filter: brightness(1.1); }
.discord-big { border-color: #5865f2; }
.sub { color: var(--muted); margin: -.3rem 0 1rem; }
a.char { color: inherit; }
a.char:hover { color: var(--gold-hi); }
.tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; overflow: visible; white-space: normal; }
.tabs a { padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; color: var(--text); font-size: .9rem; }
.tabs a:hover { border-color: var(--gold); text-decoration: none; }
.tabs a[aria-current] { background: var(--gold); color: #1b1006; border-color: var(--gold); font-weight: 600; }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .8rem; margin: 0 0 1rem; }
.facts div { background: #0f0c09; border: 1px solid var(--line); border-radius: 5px; padding: .7rem .9rem; }
.facts dt { color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: .2rem 0 0; font-size: 1.35rem; color: var(--gold-hi); font-family: Georgia, serif; }
.facts.wide { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.char-card h1 { margin-bottom: .2rem; }
.events { list-style: none; padding: 0; margin: 0; }
.events li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 0;
  border-bottom: 1px solid var(--line); }
.events li:last-child { border: 0; }
.events small { display: block; color: var(--muted); font-size: .78rem; }
.events .when { text-align: right; }
.countdown { font-family: Georgia, serif; font-size: 1.25rem; color: var(--gold-hi); font-variant-numeric: tabular-nums; }
.packages { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 1rem; margin: 1rem 0; }
.package { text-align: center; background: linear-gradient(#1d1711, #120f0c); border: 1px solid var(--line);
  border-radius: 6px; padding: 1.2rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.package:hover { border-color: var(--gold); }
.package h3 { margin: 0; font-family: Georgia, serif; color: var(--text); }
.package .coins { font: bold 2rem/1.1 Georgia, serif; color: var(--gold-hi); margin: .4rem 0 0; }
.package .coins.small { font-size: 1.4rem; }
.package .coin-type { color: var(--muted); margin: 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; }
.package .bonus { color: var(--green); font-size: .85rem; font-weight: 600; }
.package .price { font-size: 1.2rem; margin: .4rem 0; }
.package form, .package .play { margin-top: auto; }
.wait { color: var(--muted); font-size: .9rem; margin-top: auto; }
.on-dot { color: var(--green); font-weight: 600; font-size: .85rem; }
.order-granted { color: var(--green); }
.order-failed, .order-expired, .order-refunded { color: var(--red); }
.order-paid, .order-waiting { color: var(--gold-hi); }
.narrow-left { max-width: 520px; }
.inline-form { flex-direction: row; flex-wrap: wrap; align-items: flex-end; }
.inline-form label { flex: 1 1 140px; }
.inline-form label.wide { flex-basis: 100%; }
.inline-form button { align-self: flex-end; }
select { font: inherit; color: var(--text); background: #0b0907; border: 1px solid var(--line); border-radius: 4px; padding: .6rem .7rem; }
.form label.check { flex-direction: row; align-items: center; gap: .5rem; color: var(--text); }
.form h3 { margin: 1rem 0 0; color: var(--gold); font-size: 1rem; }
.row-actions { display: flex; gap: .4rem; }
.row-actions .ghost { padding: .3rem .8rem; }
.admin-list small { color: var(--muted); word-break: break-all; }
.admin-list code, .hint code { color: var(--gold-hi); }
@media (max-width: 700px) {
  .top { gap: .6rem 1rem; }
  nav { order: 3; flex-basis: 100%; }
  .events li { flex-direction: column; align-items: flex-start; }
  .events .when { text-align: left; }
}
.register { color: var(--gold-hi); border: 1px solid var(--gold); border-radius: 4px; padding: .5rem 1rem; font-weight: 600; }
.register:hover { text-decoration: none; background: rgba(217, 164, 65, .12); }
@media (max-width: 520px) {
  .top { gap: .6rem .45rem; padding-left: .8rem; padding-right: .8rem; }
  .brand { font-size: 1.2rem; margin-right: auto; }
  .top .register, .top .discord, .top .play { padding: .35rem .55rem; font-size: .82rem; box-shadow: none; }
}
.report summary { cursor: pointer; color: var(--muted); }
.report summary:hover { color: var(--gold-hi); }
.report form { margin-top: .8rem; }
.admin-list li.closed { opacity: .5; }
.state-banned { color: var(--red); font-weight: 600; }
.row-actions input.reason { width: 9rem; padding: .3rem .5rem; font-size: .85rem; }
.row-actions form { display: flex; gap: .3rem; }
.row-actions a.ghost { padding: .3rem .8rem; }
.key code { font-size: 1.15rem; letter-spacing: .08em; user-select: all; }
.captcha { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .3rem; }
.captcha img { border-radius: 6px; border: 1px solid var(--line); }

/* --- the game's artwork (/art, made by make_site_art.py from the game data) --- */
body {
  background:
    radial-gradient(ellipse at top, rgba(42, 26, 12, .85) 0%, rgba(13, 11, 10, .97) 55%) fixed,
    url(/art/stone.jpg) center / 512px repeat fixed,
    var(--bg);
}
.hero { position: relative; overflow: hidden; border-radius: 10px; margin: .5rem 0 2rem; padding: 6rem 1rem 5rem;
  border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0, 0, 0, .6); }
.hero-slides, .hero-slides div { position: absolute; inset: 0; }
.hero-slides div { background: var(--art) center 30% / cover no-repeat; opacity: 0;
  animation: hero-fade 28s infinite; animation-delay: calc(var(--i) * 7s); }
.hero-slides div:first-child { opacity: 1; }
@keyframes hero-fade { 0% { opacity: 0; transform: scale(1.08); } 4% { opacity: 1; } 25% { opacity: 1; }
  30% { opacity: 0; transform: scale(1); } 100% { opacity: 0; } }
.hero::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8, 6, 4, .35) 0%, rgba(8, 6, 4, .55) 55%, rgba(8, 6, 4, .92) 100%); }
.hero > :not(.hero-slides) { position: relative; z-index: 1; }
.hero p { color: #e8dcc8; text-shadow: 0 2px 6px #000; }
.hero .hint { color: #c9b994; }
.banner { position: relative; height: 230px; display: flex; align-items: flex-end; overflow: hidden;
  background: var(--art) center 30% / cover no-repeat; border-bottom: 1px solid var(--line); }
.banner::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10, 8, 6, .15) 0%, rgba(10, 8, 6, .55) 60%, rgba(13, 11, 10, 1) 100%); }
.banner-text { position: relative; width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 clamp(1rem, 3vw, 2rem) 1.2rem; }
.banner h1 { margin: 0; font-size: clamp(2rem, 5vw, 3rem); text-shadow: 0 0 24px rgba(217, 164, 65, .45), 0 3px 8px #000; }
.banner p { margin: .2rem 0 0; color: #e8dcc8; text-shadow: 0 2px 6px #000; }
.panel { background: linear-gradient(rgba(23, 19, 15, .94), rgba(18, 15, 12, .96)); }
@media (prefers-reduced-motion: reduce) { .hero-slides div { animation: none; } }
@media (max-width: 700px) { .banner { height: 160px; } .hero { padding: 4rem 1rem 3rem; } }

/* --- header: Discord in the menu, the account button on the right --- */
.icon { width: 1.05em; height: 1.05em; fill: currentColor; vertical-align: -.15em; flex: none; }
.nav-discord { color: #9aa4ff !important; display: inline-flex; align-items: center; gap: .35rem; }
.nav-discord:hover { color: #c3c9ff !important; }
.login {
  display: inline-flex; align-items: center; gap: .5rem; padding: .5rem 1.05rem .5rem .85rem;
  border-radius: 999px; font-weight: 600; color: #f6e7c4; text-decoration: none;
  background: linear-gradient(180deg, #2a2016 0%, #17110b 100%) padding-box,
              linear-gradient(135deg, #f7d27e 0%, #8a5a18 45%, #f3c96b 100%) border-box;
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .15), 0 0 0 1px rgba(0, 0, 0, .6), 0 4px 14px rgba(0, 0, 0, .45);
  transition: box-shadow .2s, transform .2s, color .2s;
}
.login .icon {
  width: 1.55rem; height: 1.55rem; padding: .28rem; border-radius: 50%; color: #1b1006;
  background: radial-gradient(circle at 35% 30%, #fff1b8, #e6b350 55%, #a8741e);
  box-shadow: 0 0 10px rgba(243, 201, 107, .55);
}
.login:hover { text-decoration: none; color: #fff3d6; transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 230, 170, .2), 0 0 0 1px rgba(0, 0, 0, .6), 0 0 18px rgba(243, 201, 107, .4); }
.login[aria-current] { color: var(--gold-hi); }
.login span { max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) {
  .top .login { padding: .3rem .7rem .3rem .4rem; font-size: .82rem; gap: .35rem; }
  .top .login .icon { width: 1.3rem; height: 1.3rem; }
}
