/* Dragonforge web sites: one stylesheet for the admin portal and the player account site (Docs/23 §4.1). Light and dark
   from the system; system fonts everywhere except the game title (Almendra, OFL) on the account site's signed-out pages. */
:root {
    --bg: #f6f7f9; --panel: #ffffff; --text: #1d2330; --muted: #667085; --line: #e3e6ec;
    --accent: #b4441f; --ok: #1f8a4c; --bad: #c0392b; --warn: #b7791f; --chip: #eef0f4;
}
@media (prefers-color-scheme: dark) {
    :root { --bg: #12151b; --panel: #1a1f27; --text: #e6e8ec; --muted: #98a0ad; --line: #2a313c;
            --accent: #f08a5d; --ok: #48c27a; --bad: #ef6b5e; --warn: #e2b04a; --chip: #232a35; }
}
@font-face { font-family: "Almendra"; src: url("/fonts/Almendra-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Almendra"; src: url("/fonts/Almendra-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif; }
header { background: var(--panel); border-bottom: 1px solid var(--line); }
.bar { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.brand { font-weight: 700; color: var(--accent); letter-spacing: .02em; text-decoration: none; }
nav a { color: var(--text); text-decoration: none; padding: 4px 8px; border-radius: 6px; }
nav a.on, nav a:hover { background: var(--chip); }
.who { margin-left: auto; color: var(--muted); display: flex; gap: 8px; align-items: center; }
main { max-width: 1200px; margin: 0 auto; padding: 18px 16px 40px; }
h1 { font-size: 20px; margin: 0 0 14px; }
h2 { font-size: 15px; margin: 22px 0 8px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 14px; margin-bottom: 14px; }
.grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.stat .n { font-size: 24px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
th { color: var(--muted); font-weight: 600; font-size: 12px; }
td.wrap { white-space: normal; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.ok { color: var(--ok); } .bad { color: var(--bad); } .warn { color: var(--warn); }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; background: var(--muted); }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.chip { display: inline-block; padding: 1px 7px; border-radius: 999px; background: var(--chip); font-size: 12px; text-decoration: none; color: var(--text); }
.chip.bad { background: var(--bad); color: #fff; } .chip.ok { background: var(--ok); color: #fff; } .chip.on { background: var(--accent); color: #fff; }
form.inline { display: inline; }
input[type=text], input[type=password], input[type=email], select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; }
textarea { width: 100%; }
button, .button { font: inherit; border: 1px solid var(--line); background: var(--chip); color: var(--text); border-radius: 6px; padding: 6px 12px; cursor: pointer; text-decoration: none; display: inline-block; }
button.danger { background: var(--bad); border-color: var(--bad); color: #fff; }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
button[disabled] { opacity: .55; cursor: default; }
.msg { padding: 8px 12px; border-radius: 8px; margin-bottom: 12px; background: var(--chip); }
.msg.bad { background: var(--bad); color: #fff; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; }
.cols { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

/* ---- the account site: one centred column that fits a phone in portrait ---- */
body.site main { max-width: 520px; padding: 18px 16px 48px; }
body.site h1 { font-size: 22px; }
.site .title { font-family: "Almendra", Georgia, serif; font-size: 40px; text-align: center; color: var(--accent); margin: 28px 0 6px; font-weight: 400; }
.site .tagline { text-align: center; color: var(--muted); margin: 0 0 22px; }
.site .card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 20px; margin-bottom: 14px; }
.site label { display: block; }
.site input[type=text], .site input[type=password], .site input[type=email] { width: 100%; padding: 9px 10px; font-size: 16px; }
.site input.code { font-size: 22px; letter-spacing: .25em; text-align: center; }
.site label.check { display: flex; gap: 8px; align-items: center; }
.site label.check input { width: auto; }
.site button.primary, .site .button.primary, .site .button.wide { width: 100%; padding: 10px 14px; font-size: 16px; text-align: center; }
.site .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.site .links { text-align: center; margin-top: 16px; }
.site .links a { margin: 0 8px; }
.site .switcher .chip { margin-right: 6px; }
.site .hint { font-size: 12px; color: var(--muted); margin: 4px 0 0; }
.site .codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px 18px; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; letter-spacing: .06em; padding: 14px; background: var(--bg); border-radius: 8px; }
.site .honey { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.site nav.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.site nav.tabs a { padding: 6px 10px; border-radius: 8px; background: var(--chip); }
.site nav.tabs a.on { background: var(--accent); color: #fff; }
.site .qr { display: block; margin: 0 auto; background: #fff; padding: 6px; border-radius: 8px; }
.site .rows .row { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.site .rows .row:last-child { border-bottom: 0; }
