/* Layout: sticky nav, sponsor strip, then list + sidebar; one column on phones */
:root {
  --bg: #f3f1ec; --surface: #ffffff; --surface2: #ebe7df; --line: #d9d3c7;
  --fg: #1d1a16; --muted: #6c655a; --accent: #c96a14; --accent-fg: #ffffff;
  --gold: #a87c0c; --gold-bg: #fbf1d3; --good: #2f8a4e; --good-bg: #e3f3e8; --bad: #c0392b; --bad-bg: #fbe6e3;
  --warn-bg: #fdf3dc; --ad: #e4eef0; --ad-line: #9bb8bd;
  --display: "Chakra Petch", system-ui, sans-serif;
  --body: "Manrope", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #13161b; --surface: #1b1f26; --surface2: #232832; --line: #2e3440;
    --fg: #ece8e0; --muted: #9a9488; --accent: #f08a2b; --accent-fg: #1a1208;
    --gold: #e8bd4a; --gold-bg: #2b2516; --good: #5cc27e; --good-bg: #17291f; --bad: #ef6f5f; --bad-bg: #321a17;
    --warn-bg: #2b2516; --ad: #18262a; --ad-line: #3c5a60; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #13161b; --surface: #1b1f26; --surface2: #232832; --line: #2e3440;
  --fg: #ece8e0; --muted: #9a9488; --accent: #f08a2b; --accent-fg: #1a1208;
  --gold: #e8bd4a; --gold-bg: #2b2516; --good: #5cc27e; --good-bg: #17291f; --bad: #ef6f5f; --bad-bg: #321a17;
  --warn-bg: #2b2516; --ad: #18262a; --ad-line: #3c5a60; color-scheme: dark;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--body); font-size: 15px; line-height: 1.5; }
img { max-width: 100%; }
a { color: inherit; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(28px, 4.4vw, 42px); }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
code, .code { font-family: var(--mono); font-size: 13px; }
.wrap { max-width: 1180px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.label { font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.label a { text-decoration: none; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.bad-text { color: var(--bad); }
.pre { white-space: pre-line; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.page { padding-block: 28px 50px; display: flex; flex-direction: column; gap: 18px; }
.narrow { max-width: 620px; }

.topnav { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.topnav .wrap { display: flex; align-items: center; gap: 10px; min-height: 60px; flex-wrap: wrap; }
.logo { font-family: var(--display); font-weight: 700; font-size: 20px; display: flex; align-items: center; gap: 8px; text-decoration: none; margin-right: 12px; }
.logo i { width: 26px; height: 26px; background: var(--accent); clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%); }
.logo span { color: var(--accent); }
.navlinks { display: flex; gap: 18px; font-weight: 600; font-size: 14px; color: var(--muted); }
.navlinks a { text-decoration: none; }
.navlinks a.on, .navlinks a:hover { color: var(--fg); }
.spacer { flex: 1; }
@media (max-width: 820px) { .navlinks { display: none; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid var(--line); background: var(--surface2); color: var(--fg); padding: 8px 14px; border-radius: 8px; font-weight: 700; font-size: 14px; text-decoration: none; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.btn.danger { color: var(--bad); }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { padding: 8px 11px; }
.linkish { background: none; border: 0; color: var(--muted); text-decoration: underline; font-size: 13px; }
.logout { text-align: center; padding-bottom: 20px; }

.hero { padding-block: 32px 22px; display: flex; flex-direction: column; gap: 10px; }
.hero p { color: var(--muted); max-width: 62ch; margin: 0 0 8px; }
.search { display: flex; gap: 10px; flex-wrap: wrap; }
.search input { flex: 1 1 260px; min-width: 0; }
input, textarea, select { font: inherit; color: var(--fg); }
input[type=file] { font-size: 14px; color: var(--muted); max-width: 100%; }
input[type=file]::file-selector-button { font: inherit; font-weight: 700; color: var(--fg); background: var(--surface2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; margin-right: 12px; cursor: pointer; transition: border-color .15s; }
input[type=file]::file-selector-button:hover { border-color: var(--muted); }
input[type=checkbox], input[type=radio] { width: auto; flex: none; margin: 0; accent-color: var(--accent); }
input:not([type=checkbox]):not([type=radio]):not([type=file]), textarea { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); width: 100%; min-width: 0; }
.search input { padding: 12px 14px; border-radius: 10px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.chip { border: 1px solid var(--line); color: var(--muted); padding: 6px 12px; border-radius: 999px; font-size: 13px; font-weight: 600; text-decoration: none; }
.chip.on { background: var(--fg); color: var(--bg); border-color: var(--fg); }

.ad { border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; color: var(--muted); min-width: 0; overflow: hidden; }
.ad ins { display: block; width: 100%; }
.ad.placeholder { background: var(--ad); border: 1px dashed var(--ad-line); padding: 14px; font-size: 13px; }
.ad.box { min-height: 250px; }
.ad.bottom { min-height: 90px; margin-top: 10px; margin-bottom: 30px; }

/* Top banner: the owner's image, with a glass info bar along the bottom. */
.top-banner { position: relative; margin-bottom: 28px; border-radius: 16px; overflow: hidden; border: 1px solid var(--gold); aspect-ratio: 5 / 1; min-height: 170px; max-width: 100%; background: var(--surface2); color: #fff; box-shadow: 0 0 0 1px rgba(232, 189, 74, .15), 0 18px 40px -18px rgba(232, 189, 74, .35); }
.top-banner > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.top-banner:hover > img { transform: scale(1.03); }
.top-banner .tb-tag { position: absolute; top: 12px; left: 12px; z-index: 1; background: var(--gold-bg); color: var(--gold); border: 1px solid var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
.top-banner .tb-bar { position: absolute; inset: auto 0 0 0; display: flex; align-items: center; gap: 14px; padding: 12px 16px; background: rgba(12, 14, 18, .62); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-top: 1px solid rgba(255, 255, 255, .08); }
.top-banner .icon { width: 52px; height: 52px; font-size: 18px; border-radius: 12px; border: 2px solid rgba(255, 255, 255, .25); }
.tb-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.tb-name { font-family: var(--display); font-weight: 700; font-size: 21px; color: #fff; text-decoration: none; line-height: 1.1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-name::after { content: ""; position: absolute; inset: 0; } /* whole banner clicks through to the server */
.tb-name:hover { text-decoration: underline; }
.top-banner .meta { color: rgba(255, 255, 255, .85); }
.top-banner .tagp { background: rgba(255, 255, 255, .14); color: #fff; }
.top-banner .status.online { color: #6fe39a; }
.tb-votes { font-size: 12px; font-weight: 700; color: rgba(255, 255, 255, .8); font-variant-numeric: tabular-nums; }
.tb-actions { display: flex; gap: 8px; align-items: center; position: relative; z-index: 1; }
.top-banner .ip { color: #fff; border-color: rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .25); font-size: 13px; padding: 7px 10px; }
.top-banner .vote { padding: 9px 18px; font-size: 14px; }
@media (max-width: 640px) { .top-banner { aspect-ratio: auto; height: 190px; } .top-banner .ip, .top-banner .tagp { display: none; } .top-banner .icon { width: 42px; height: 42px; } .tb-name { font-size: 18px; } }
.top-banner-empty { display: block; margin-bottom: 24px; padding: 10px 14px; border: 1px dashed var(--line); border-radius: 10px; text-align: center; font-size: 13px; color: var(--muted); text-decoration: none; }
.top-banner-empty:hover { color: var(--fg); border-color: var(--muted); }
.sponsors { margin-bottom: 30px; }
.sechead { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.sechead a { font-size: 13px; font-weight: 700; color: var(--accent); text-decoration: none; }
.sgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .sgrid { grid-template-columns: 1fr; } }
.scard { border: 1px solid var(--gold); background: var(--surface); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.banner { position: relative; height: 96px; overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; display: block; }
.scard .tag { position: absolute; top: 10px; left: 10px; background: var(--gold-bg); color: var(--gold); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; border: 1px solid var(--gold); }
.scard .body { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-width: 0; }
.row h3 a { text-decoration: none; }
.scard { transition: transform .15s ease, box-shadow .15s ease; }
.scard:not(.empty):hover { transform: translateY(-2px); box-shadow: 0 14px 30px -16px rgba(232, 189, 74, .45); }
.scard .body { padding-top: 0; }
.sc-head { display: flex; align-items: flex-end; gap: 12px; margin-top: -26px; position: relative; }
.sc-head .icon { width: 56px; height: 56px; font-size: 19px; border: 3px solid var(--surface); border-radius: 14px; }
.sc-title { flex: 1; min-width: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-bottom: 4px; }
.sc-title h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-title h3 a { text-decoration: none; }
.sc-votes { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.sc-foot { margin-top: auto; padding-top: 4px; }
.scard.empty { border-style: dashed; background: transparent; align-items: center; justify-content: center; text-align: center; padding: 20px; gap: 8px; min-height: 220px; }
.scard.empty p { color: var(--muted); margin: 0; font-size: 14px; }

.g0 { background: linear-gradient(135deg, #c4572b, #2e9a6a); } .g1 { background: linear-gradient(135deg, #2b7bc4, #c43b6e); }
.g2 { background: linear-gradient(135deg, #6a4bc4, #b3871c); } .g3 { background: linear-gradient(135deg, #2e9a6a, #3b8fa3); }
.g4 { background: linear-gradient(135deg, #c43b6e, #7a5a3a); } .g5 { background: linear-gradient(135deg, #b3871c, #c4572b); }
.g6 { background: linear-gradient(135deg, #3b8fa3, #2b7bc4); } .g7 { background: linear-gradient(135deg, #7a5a3a, #6a4bc4); }

.main { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; padding-bottom: 20px; }
@media (max-width: 900px) { .main { grid-template-columns: 1fr; } }
/* The heading sits above the list only, so the sidebar's top lines up with the first server card. */
@media (min-width: 901px) {
  .list-layout { row-gap: 0; }
  .list-layout > .sechead { grid-column: 1; grid-row: 1; }
  .list-layout > .list-col { grid-column: 1; grid-row: 2; }
  .list-layout > .side { grid-column: 2; grid-row: 2; }
}
.list { display: flex; flex-direction: column; gap: 10px; }
.srv { display: grid; grid-template-columns: 44px 64px minmax(0, 1fr) auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.srv.dash { grid-template-columns: 64px minmax(0, 1fr) auto; }
.srv:hover { border-color: var(--muted); }
.srv.is-off { opacity: .7; }
.rank { font-family: var(--display); font-weight: 700; font-size: 20px; text-align: center; color: var(--muted); }
.rank.top { color: var(--accent); }
.icon { width: 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 700; font-size: 22px; color: #fff; overflow: hidden; flex: none; }
.icon img { width: 100%; height: 100%; object-fit: cover; }
.info { min-width: 0; }
.info h3 { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.info h3 a { text-decoration: none; }
.info h3 a:hover { color: var(--accent); }
.desc { color: var(--muted); font-size: 14px; margin: 2px 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wrapdesc { white-space: normal; }
.meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.tagp { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); text-decoration: none; }
.tagp.new { color: var(--accent); }
.ip { font-family: var(--mono); font-size: 12px; border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; background: transparent; color: var(--fg); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.ip:hover { border-color: var(--accent); }
.ip.big { font-size: 16px; padding: 8px 14px; }
.status { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.online { color: var(--good); }
.status.offline { color: var(--bad); }
.status.unknown { color: var(--muted); }
.side-r { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; font-variant-numeric: tabular-nums; }
.votes { font-family: var(--display); font-size: 18px; font-weight: 700; text-align: right; }
.votes small { font-family: var(--body); font-size: 11px; color: var(--muted); font-weight: 600; display: block; }
.vote { display: inline-block; background: var(--accent); color: var(--accent-fg); border: 0; border-radius: 8px; padding: 7px 14px; font-weight: 800; font-size: 13px; text-decoration: none; }
.mini-live { color: var(--good); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.mini-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.row-stats { display: flex; gap: 18px; align-items: flex-start; }
.pc { display: flex; flex-direction: column; align-items: flex-end; min-width: 64px; font-family: var(--display); font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc small { font-family: var(--body); font-size: 11px; color: var(--muted); font-weight: 600; }
.pc.on b { color: var(--good); display: inline-flex; align-items: center; gap: 6px; }
.pc.on b::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 25%, transparent); }
.pc.off b { color: var(--bad); font-size: 14px; line-height: 27px; }
.pc.none b { color: var(--muted); }
.pc-bar { width: 64px; height: 4px; border-radius: 4px; background: var(--surface2); overflow: hidden; margin-top: 4px; }
.pc-bar i { display: block; height: 100%; background: var(--good); border-radius: inherit; }
.vote:disabled { background: var(--surface2); color: var(--muted); cursor: not-allowed; }
.cooldown { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 14px; margin-bottom: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface2); text-align: center; }
.cd-time { font-family: var(--display); font-size: 28px; font-variant-numeric: tabular-nums; color: var(--accent); line-height: 1.1; }
.vote.big { padding: 11px 18px; font-size: 15px; width: 100%; }
@media (max-width: 600px) {
  .srv { grid-template-columns: 48px minmax(0, 1fr); row-gap: 10px; }
  .srv.dash { grid-template-columns: 48px minmax(0, 1fr); }
  .rank { display: none; }
  .srv .icon { width: 48px; height: 48px; font-size: 17px; }
  .side-r { grid-column: 1 / -1; flex-direction: row; justify-content: space-between; align-items: center; }
}
.pager { display: flex; justify-content: center; align-items: center; gap: 14px; margin-top: 18px; }

.side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 76px; min-width: 0; }
@media (max-width: 900px) { .side { position: static; } }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px; min-width: 0; }
.panel h3, .panel h2 { margin-bottom: 10px; }
.panel p { margin: 0 0 10px; }
.mini { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.mini li { display: flex; gap: 10px; align-items: center; font-size: 14px; }
.mini .n { font-family: var(--display); font-weight: 700; width: 18px; color: var(--muted); }
.mini .nm { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.hall { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.tier { border: 1px solid var(--line); border-radius: 10px; padding: 12px; display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.tier .price { font-family: var(--display); font-weight: 700; color: var(--accent); font-size: 19px; white-space: nowrap; }

.srv-hero { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.srv-banner { height: clamp(120px, 22vw, 240px); }
.srv-head { display: flex; gap: 16px; align-items: flex-end; padding: 0 20px 18px; margin-top: -32px; position: relative; flex-wrap: wrap; }
.srv-head .icon { width: 88px; height: 88px; border: 4px solid var(--surface); border-radius: 16px; font-size: 28px; }
.srv-head .info { flex: 1 1 260px; padding-top: 38px; }
.srv-head p { margin: 4px 0 0; }
.srv-tags { margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 600px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.stat b { font-family: var(--display); font-size: 22px; display: block; font-variant-numeric: tabular-nums; }
.addr { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 6px; }
.links { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.video { position: relative; aspect-ratio: 16 / 9; max-width: 100%; border-radius: 12px; overflow: hidden; background: #000; }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.spark { width: 100%; height: 60px; color: var(--accent); display: block; margin-bottom: 6px; }
.prose p, .prose li { max-width: 68ch; }
textarea.code { width: 100%; resize: vertical; margin-top: 10px; }

.form { display: flex; flex-direction: column; gap: 14px; }
.form label, .side label { display: flex; flex-direction: column; gap: 5px; font-weight: 700; font-size: 14px; min-width: 0; }
.form small, legend small { color: var(--muted); font-weight: 500; font-size: 12px; }
.form fieldset { border: 1px solid var(--line); border-radius: 8px; display: flex; flex-wrap: wrap; gap: 6px 16px; padding: 10px 12px; margin: 0; }
.form legend { font-weight: 700; font-size: 14px; padding: 0 4px; }
.form label.check { flex-direction: row; align-items: center; font-weight: 500; gap: 8px; }
.form fieldset.pick { gap: 8px; padding: 12px; }
.pick-chip { position: relative; display: inline-flex; cursor: pointer; }
.pick-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pick-chip span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--muted); background: var(--surface); user-select: none; }
.pick-chip:hover span { border-color: var(--muted); color: var(--fg); }
.pick-chip input:checked + span { background: var(--accent); border-color: var(--accent); color: var(--accent-fg); }
.pick-chip input:checked + span::before { content: "✓"; font-weight: 800; }
.pick-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.pick-chip input:disabled + span { opacity: .45; cursor: not-allowed; }
.tag-preview { display: flex; flex-wrap: wrap; gap: 6px; margin-top: -6px; }
.tag-preview:empty { display: none; }
.tagp.custom { background: transparent; border: 1px dashed var(--line); }
.form fieldset.options { flex-direction: column; flex-wrap: nowrap; gap: 8px; padding: 12px; }
.options label.check { padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.options label.check:hover { border-color: var(--muted); }
.options label.check:has(input:checked) { border-color: var(--accent); background: var(--surface2); }
.form .btn { align-self: flex-start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 600px) { .two { grid-template-columns: 1fr; } }
.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.inline-form input { flex: 1 1 140px; width: auto; }
.admin-actions { align-items: stretch; }
.row-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }

.alert { border-radius: 10px; padding: 12px 14px; font-weight: 600; font-size: 14px; margin: 0; }
.alert ul { margin: 0; padding-left: 18px; }
.alert.good { background: var(--good-bg); color: var(--good); }
.alert.bad { background: var(--bad-bg); color: var(--bad); }
.alert.warn { background: var(--warn-bg); color: var(--fg); font-weight: 500; }
.pill { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 2px 8px; border-radius: 6px; background: var(--surface2); color: var(--muted); }
.pill.approved { background: var(--good-bg); color: var(--good); }
.pill.rejected, .pill.archived { background: var(--bad-bg); color: var(--bad); }
.pill.sponsored { background: var(--gold-bg); color: var(--gold); }
.empty-state { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; }

.profile { position: relative; }
.profile summary { list-style: none; cursor: pointer; border-radius: 50%; }
.profile summary::-webkit-details-marker { display: none; }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--surface2); border: 2px solid var(--accent); font-family: var(--display); font-weight: 700; font-size: 17px; color: var(--fg); }
.avatar { overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.big { width: 72px; height: 72px; font-size: 30px; }
.profile-row { display: flex; align-items: center; gap: 14px; min-width: 0; overflow-wrap: anywhere; }
.profile-name { font-family: var(--display); font-size: 20px; }
.profile[open] .avatar, .profile summary:hover .avatar { background: var(--accent); color: var(--accent-fg); }
.menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; min-width: 220px; max-width: calc(100vw - 32px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 12px 30px rgba(0, 0, 0, .25); display: flex; flex-direction: column; }
.menu-head { display: flex; flex-direction: column; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; overflow-wrap: anywhere; }
.menu a, .menu button { display: block; width: 100%; text-align: left; padding: 9px 10px; border-radius: 8px; text-decoration: none; font-weight: 600; font-size: 14px; background: none; border: 0; color: var(--fg); }
.menu a:hover, .menu button:hover, .menu a:focus-visible, .menu button:focus-visible { background: var(--surface2); }
.menu form { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }
.menu form button { color: var(--bad); }
@media (max-width: 520px) { .topnav .signup { display: none; } }
.setup { margin-top: 12px; }
.setup summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent); }
.setup[open] summary { margin-bottom: 8px; }
.setup p { margin: 8px 0; }
.sort-pick { position: relative; }
.sort-pick summary { list-style: none; height: 100%; min-height: 46px; padding: 0 14px; gap: 8px; white-space: nowrap; border-radius: 10px; }
.sort-pick summary::-webkit-details-marker { display: none; }
.sort-pick .chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg) translateY(-2px); margin-left: 4px; transition: transform .15s; }
.sort-pick[open] .chev { transform: rotate(225deg) translateY(-2px); }
.sort-pick[open] summary { border-color: var(--accent); }
.sort-pick .menu { min-width: 200px; }
.menu button.on { color: var(--accent); }
.menu button.on::after { content: "✓"; float: right; font-weight: 800; }
.verify-bar { background: var(--warn-bg); border-bottom: 1px solid var(--line); font-size: 14px; }
.verify-bar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-block: 10px; }
.measure { max-width: 68ch; }
.auction-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stack-tight { display: flex; flex-direction: column; gap: 4px; }
@media (max-width: 600px) { .auction-stats { grid-template-columns: 1fr; } }
.standings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-variant-numeric: tabular-nums; }
.standings li { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.standings li.in { border-color: var(--gold); background: var(--gold-bg); }
.standings li.out { opacity: .75; }
.standings .pos { font-family: var(--display); font-weight: 700; font-size: 18px; color: var(--muted); }
.standings .nm { font-weight: 700; text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.standings .amt { font-family: var(--display); font-weight: 700; }
.standings .cutline { display: block; border: 0; border-top: 2px dashed var(--bad); border-radius: 0; padding: 4px 0 0; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--bad); }
@media (max-width: 480px) { .standings li { grid-template-columns: 24px minmax(0, 1fr) auto; } .standings li .pill { display: none; } }
.form label.check span { font-weight: 500; }
.legal h2 { margin-top: 10px; }
.legal p, .legal li { line-height: 1.65; }
.guide-list { display: grid; gap: 12px; margin-top: 18px; }
.guide-card { display: block; color: inherit; text-decoration: none; }
.guide-card:hover h2 { text-decoration: underline; }
.guide-card h2 { margin: 0 0 4px; font-size: 1.1rem; }
.guide-card p { margin: 0; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; }
.tbl th, .tbl td { text-align: left; vertical-align: top; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; margin-top: 20px; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 10px 20px; flex-wrap: wrap; padding-block: 18px; }
.foot-links { display: flex; gap: 18px; flex-wrap: wrap; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--fg); }
.toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 16px; border-radius: 10px; font-weight: 700; font-size: 14px; z-index: 20; }
@media (prefers-reduced-motion: no-preference) { .srv, .btn, .chip { transition: border-color .15s, background-color .15s; } }

/* Voting plugin download box (key page, server settings, submit form) */
.plugin-dl { border: 2px solid var(--accent); border-radius: 12px; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; background: var(--surface); min-width: 0; overflow-wrap: anywhere; }
.plugin-dl-head { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.plugin-dl-head p { margin: 4px 0 0; }
.plugin-dl-head .btn { white-space: nowrap; }
.plugin-steps { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
