/* Zelt V portal: warm night camp. Dark ground, ember amber as the one accent, glass panels,
   condensed caps for headings and tabular figures for numbers. Same look as the Zelt V loading screen. */
:root {
    --ground: #0d0b09;
    --ground-2: #16120d;
    --panel: rgba(28, 23, 17, .72);
    --panel-solid: #1b1611;
    --raised: rgba(255, 255, 255, .045);
    --line: rgba(255, 255, 255, .08);
    --line-strong: rgba(255, 255, 255, .15);
    --ink: #f6f1e8;
    --ink-soft: #cfc6b8;
    --muted: #978d7f;
    --signal: #f2a93b;
    --signal-deep: #c9781f;
    --on: #9bd17a;
    --alarm: #ec5a48;
    --radius: 14px;
    --display: "Bahnschrift SemiCondensed", "Bahnschrift", "DIN Condensed", "Roboto Condensed", "Arial Narrow", sans-serif;
    --text: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--ground); }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column; position: relative;
    color: var(--ink); font: 15px/1.55 var(--text);
    background:
        radial-gradient(ellipse 90% 55% at 50% 112%, rgba(224, 115, 28, .22), transparent 70%),
        radial-gradient(ellipse 70% 45% at 50% -10%, rgba(242, 169, 59, .08), transparent 70%),
        linear-gradient(180deg, var(--ground-2), var(--ground) 420px);
}
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, rgba(255,255,255,.012) 0 2px, transparent 2px 14px); }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .01em; line-height: 1; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; position: relative; }
.mono { font-family: var(--mono); font-size: .9em; }
.label { font: 700 11px/1 var(--text); text-transform: uppercase; letter-spacing: .16em; color: var(--muted); margin: 0 0 14px; }
.blank { color: var(--muted); margin: 24px 0; }
.blank a, .record a { color: var(--signal); }
.error { margin: 24px 0; padding: 14px 16px; border-left: 3px solid var(--alarm); background: var(--panel-solid); border-radius: 0 10px 10px 0; }
.error code { display: block; margin-top: 6px; color: var(--muted); font: 13px var(--mono); word-break: break-word; }

/* Embers rising from the bottom edge: pure CSS, no script (the CSP allows none). */
.embers { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; opacity: .8; }
.embers::before, .embers::after {
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 200%;
    background-image:
        radial-gradient(circle at 12% 30%, #ffc061 0 1.6px, transparent 2.6px),
        radial-gradient(circle at 27% 72%, #ff9a2e 0 1.2px, transparent 2.2px),
        radial-gradient(circle at 41% 18%, #ffc061 0 1px, transparent 2px),
        radial-gradient(circle at 58% 55%, #ff8a1f 0 1.5px, transparent 2.5px),
        radial-gradient(circle at 73% 86%, #ffc061 0 1.1px, transparent 2.1px),
        radial-gradient(circle at 88% 40%, #ff9a2e 0 1.4px, transparent 2.4px);
    background-size: 100% 50%;
    animation: embers 26s linear infinite;
}
.embers::after { animation-duration: 38s; animation-delay: -12s; opacity: .55; transform: translateX(3%); }
@keyframes embers { from { transform: translateY(0); } to { transform: translateY(-50%); } }
@media (prefers-reduced-motion: reduce) { .embers::before, .embers::after { animation: none; } }
.masthead, main.wrap, .colophon { position: relative; z-index: 1; }

/* Masthead */
.masthead { position: sticky; top: 0; z-index: 5; background: rgba(13, 11, 9, .78); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.masthead .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 64px; flex-wrap: wrap; }
.mark { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--signal); }
.mark .tent { width: 34px; height: 23px; }
.mark b { font: 800 24px/1 var(--display); text-transform: uppercase; letter-spacing: .02em; color: var(--ink); }
.mark b span { color: var(--signal); }
.masthead nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.masthead nav a, .masthead nav button { font: 600 14px/1 var(--text); color: var(--ink-soft); text-decoration: none; background: none; border: 0; padding: 10px 14px; border-radius: 99px; cursor: pointer; }
.masthead nav a:hover, .masthead nav button:hover { color: var(--ink); background: var(--raised); }
.masthead nav a[aria-current] { color: var(--ink); background: rgba(242, 169, 59, .14); box-shadow: inset 0 0 0 1px rgba(242, 169, 59, .35); }
.masthead nav form { margin: 0; }
.masthead nav .signin { margin-left: 6px; color: #1a1209; font-weight: 700; background: linear-gradient(180deg, #f7bf5f, var(--signal-deep)); box-shadow: 0 6px 18px rgba(224, 115, 28, .3); }
.masthead nav .signin:hover { color: #1a1209; background: linear-gradient(180deg, #ffd07a, #dc8a2a); }

main.wrap { flex: 1; padding-top: 48px; padding-bottom: 72px; }

/* Page intro */
.intro { margin-bottom: 36px; }
.intro h1 { font-size: clamp(42px, 7vw, 68px); }
.facts { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 28px; color: var(--muted); }
.facts span { padding: 8px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: 99px; }
.facts b { color: var(--signal); font-weight: 700; font-variant-numeric: tabular-nums; }
.find { display: grid; grid-template-columns: minmax(0, 460px) max-content; justify-content: start; gap: 8px 0; align-items: end; }
.find label { grid-column: 1 / -1; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.find input { height: 46px; padding: 0 16px; font: inherit; color: var(--ink); background: var(--panel); border: 1px solid var(--line-strong); border-right: 0; border-radius: 12px 0 0 12px; outline: 0; }
.find input:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(242, 169, 59, .15); }
.find button { height: 46px; padding: 0 22px; font: 700 14px var(--text); color: #1a1209; background: linear-gradient(180deg, #f7bf5f, var(--signal-deep)); border: 0; border-radius: 0 12px 12px 0; cursor: pointer; }
.find button:hover { filter: brightness(1.08); }

/* Sort tabs */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { font: 700 14px/1 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); text-decoration: none; padding: 11px 16px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); white-space: nowrap; }
.tabs a:hover { color: var(--ink); border-color: var(--line-strong); }
.tabs a[aria-current] { color: #1a1209; background: var(--signal); border-color: var(--signal); }

/* Tables sit on a glass panel */
table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.roster, .entries { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; border-collapse: separate; border-spacing: 0; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
th { font: 700 11px/1 var(--text); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); text-align: left; padding: 16px 14px 12px; border-bottom: 1px solid var(--line-strong); white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
tbody tr:last-child td { border-bottom: 0; }
th:first-child, td:first-child { padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
.num { text-align: right; white-space: nowrap; }
th.sorted { color: var(--signal); }
td.sorted { color: var(--ink); font-weight: 700; }
.roster td { color: var(--ink-soft); }
.roster tbody tr:hover td { background: rgba(242, 169, 59, .06); }
.roster .place { width: 3ch; text-align: left; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.roster tr.first td { background: linear-gradient(90deg, rgba(242, 169, 59, .12), transparent 60%); }
.roster tr.first .place { color: var(--signal); font-weight: 700; }
.roster .name a { color: var(--ink); font-weight: 650; text-decoration: none; }
.roster .name a:hover { color: var(--signal); }
.roster .name span { margin-left: 10px; color: var(--muted); font-size: 13px; }
.seen { color: var(--muted); font-size: 13px; white-space: nowrap; }
.seen.on, .meta .on { color: var(--on); }
.seen.on::before, .meta .on::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: var(--on); box-shadow: 0 0 8px var(--on); vertical-align: 1px; }
h2.label { margin-top: 8px; }

/* Dossier */
.dossier-head { position: relative; padding: 30px 30px 28px; margin-bottom: 18px; background: linear-gradient(135deg, rgba(242, 169, 59, .1), rgba(28, 23, 17, .7) 55%); border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.dossier-head::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(224, 115, 28, .25), transparent 70%); pointer-events: none; }
.dossier-head .label { color: var(--signal); }
.dossier-head h1 { font-size: clamp(38px, 7vw, 68px); overflow-wrap: anywhere; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 0; margin: 16px 0 0; color: var(--muted); }
.meta > * { padding: 0 14px; border-left: 1px solid var(--line-strong); }
.meta > :first-child { padding-left: 0; border-left: 0; color: var(--ink-soft); }
.meta a { text-decoration: none; color: var(--signal); }
.meta a:hover { text-decoration: underline; }
.stamp { display: inline-block; margin: 20px 0 0; padding: 8px 14px; font: 700 18px/1 var(--display); text-transform: uppercase; letter-spacing: .08em; color: var(--alarm); border: 2px solid var(--alarm); border-radius: 6px; transform: rotate(-3deg); }
.ledger { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 0 0 48px; }
.ledger div { padding: 18px 18px 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.ledger dt { font: 700 11px/1 var(--text); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); }
.ledger dd { margin: 0; }
.ledger dd:not(.rank) { margin-top: 10px; font: 700 26px/1.1 var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ledger div:first-child dd:not(.rank) { color: var(--signal); }
.ledger .rank { margin-top: 6px; font-size: 12.5px; color: var(--muted); }
.record { margin-top: 8px; }
.entries td:first-child { width: 19ch; color: var(--muted); white-space: nowrap; }
.entries td:nth-child(2) { width: 22ch; color: var(--ink-soft); }
.entries td:nth-child(2) span { display: block; font-size: 12.5px; color: var(--muted); }
.entries .ban-active td { background: rgba(236, 90, 72, .07); }
.entries .ban-active td:nth-child(2) { color: var(--alarm); font-weight: 600; }
.entries .ban-active td:nth-child(2) span { color: var(--alarm); }
.entries .blank { margin: 0; }

/* Garage */
.garage-section { margin: 0 0 52px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 16px; }
.section-head h2 { font-size: 30px; }
.section-head p { margin: 0; color: var(--muted); }
.garage, .showroom { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.showroom { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
.car { display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: transform .2s ease, border-color .2s ease; }
.car:hover { transform: translateY(-3px); border-color: rgba(242, 169, 59, .4); }
.car-stage { position: relative; height: 150px; display: grid; place-items: center; background: radial-gradient(ellipse 80% 60% at 50% 100%, rgba(255, 255, 255, .07), transparent 70%), linear-gradient(180deg, rgba(255, 255, 255, .02), rgba(0, 0, 0, .25)); border-bottom: 1px solid var(--line); }
.car-stage::after { content: ""; position: absolute; left: 18%; right: 18%; bottom: 20px; height: 10px; border-radius: 50%; background: rgba(0, 0, 0, .55); filter: blur(6px); }
.car-stage .paint { position: absolute; inset: 0; width: 100%; height: 100%; }
.car-stage .shot { position: relative; z-index: 1; width: 128px; height: 128px; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .5)); transition: transform .25s ease; }
.car:hover .shot { transform: scale(1.06); }
.car-stage .shot.none { width: 120px; height: 60px; color: #3a3129; filter: none; }
.car.compact .car-stage { height: 120px; }
.car.compact .shot { width: 104px; height: 104px; }
.car-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.car-body h3 { font-size: 19px; line-height: 1.1; letter-spacing: .02em; overflow-wrap: anywhere; }
.car-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.car-meta span:last-child { color: var(--ink-soft); font-weight: 600; }
.swatch { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; }
.swatch img { display: block; }
.tuning { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.tuning div { padding: 8px 9px; background: var(--raised); border-radius: 9px; }
.tuning dt { font: 700 9.5px/1 var(--text); text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.tuning dd { margin: 7px 0 0; }
.pips { display: flex; gap: 3px; }
.pips i { flex: 1; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .12); }
.pips i.on { background: linear-gradient(90deg, var(--signal-deep), #f7bf5f); box-shadow: 0 0 6px rgba(242, 169, 59, .45); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin: auto 0 0; }
.badge { padding: 4px 9px; font-size: 11.5px; font-weight: 600; color: var(--signal); border: 1px solid rgba(242, 169, 59, .4); border-radius: 99px; }
.plate { padding: 3px 9px; font: 700 12px/1.3 var(--mono); letter-spacing: .08em; color: #15120e; background: #f1ede4; border: 1px solid #fff; border-left: 9px solid #2f5fb3; border-radius: 4px; }

/* Footer */
.colophon { border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; background: rgba(13, 11, 9, .6); }
.colophon .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 24px; padding-top: 20px; padding-bottom: 24px; }
.colophon span:first-child { color: var(--ink-soft); }

@media (max-width: 860px) {
    .wrap { padding: 0 16px; }
    main.wrap { padding-top: 30px; }
    .opt { display: none; }
    .ledger { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .roster .name span { display: block; margin: 2px 0 0; }
    .entries td:first-child, .entries td:nth-child(2) { width: auto; }
    .dossier-head { padding: 24px 20px; }
}
@media (max-width: 520px) {
    .masthead .wrap { gap: 0 12px; padding-top: 8px; padding-bottom: 8px; }
    .masthead nav { gap: 2px; }
    .masthead nav a, .masthead nav button { padding: 8px 10px; }
    .find { grid-template-columns: minmax(0, 1fr) max-content; }
    th:first-child, td:first-child { padding-left: 14px; }
    th:last-child, td:last-child { padding-right: 14px; }
    .entries thead { display: none; }
    .entries tr { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
    .entries td { padding: 0; border: 0; }
    .entries td:nth-child(3) { grid-column: 1 / -1; color: var(--ink); }
    .ledger { gap: 8px; }
    .ledger div { padding: 14px; }
    .ledger dd:not(.rank) { font-size: 21px; }
}
