/* ===== Design „Fantasy-Nacht“ (dunkel) und „Taghimmel“ (hell) =====
   Alle Farben als Variablen. Auswahl: data-theme="dark|light" am <html> (Umschalter im Kopf, gespeichert),
   ohne Wahl gilt die Systemeinstellung. --accent ist als Textfarbe lesbar, --gold ist die Füllfarbe (Schrift darauf: --on-gold). */
:root {
  /* Taghimmel */
  --bg: #e6f1fc; --bg-grad: linear-gradient(180deg, #cfe5fa 0, #e6f1fc 340px, #f3f8fe 100%);
  --panel: #ffffff; --panel-2: #edf4fc; --line: #c3d6ec; --line-gold: #e2c77a;
  --text: #13203b; --muted: #475877; --title: #0f2a55;
  --accent: #8a5d00; --gold: #e8b93c; --gold-2: #f1d27a; --on-gold: #1d1402; --accent-text: var(--on-gold);
  --danger: #b3261e; --ok: #1d6b3d; --shadow: 0 1px 3px rgba(20, 50, 100, .10), 0 4px 14px rgba(20, 50, 100, .06);
  --glow: inset 0 1px 0 rgba(255, 255, 255, .9);
  --top-bg: linear-gradient(180deg, #ffffff, #dcecfb); --top-line: #d9b24b;
  --nav: #34466a; --nav-hover: #0f2a55;
  --band: linear-gradient(90deg, rgba(10, 26, 58, .88) 0, rgba(10, 26, 58, .66) 45%, rgba(10, 26, 58, .10) 78%, rgba(10, 26, 58, 0) 100%);
  --band-text: #ffffff; --band-sub: #e3ecfa;
  color-scheme: light;
}
/* Fantasy-Nacht: bei dunkler Systemeinstellung (ohne eigene Wahl) oder bei data-theme="dark" */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1124; --bg-grad: radial-gradient(1200px 500px at 70% -100px, #1a2a55 0, rgba(10, 17, 36, 0) 70%), linear-gradient(180deg, #0c1530 0, #0a1124 420px);
    --panel: #121c36; --panel-2: #1a2747; --line: #283a64; --line-gold: rgba(232, 185, 60, .38);
    --text: #e8edf8; --muted: #a6b3cf; --title: #f1d27a;
    --accent: #e8b93c; --gold: #e8b93c; --gold-2: #f1d27a; --on-gold: #1d1402; --accent-text: var(--on-gold);
    --danger: #ff8a80; --ok: #7dd3a0; --shadow: 0 2px 10px rgba(0, 0, 0, .35);
    --glow: inset 0 1px 0 rgba(241, 210, 122, .10);
    --top-bg: linear-gradient(180deg, #0f1a38, #0b142c); --top-line: rgba(232, 185, 60, .55);
    --nav: #b3bfd9; --nav-hover: #f1d27a;
    --band: linear-gradient(90deg, rgba(6, 11, 26, .90) 0, rgba(6, 11, 26, .70) 45%, rgba(6, 11, 26, .12) 78%, rgba(6, 11, 26, 0) 100%);
    --band-text: #ffffff; --band-sub: #dfe6f5;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1124; --bg-grad: radial-gradient(1200px 500px at 70% -100px, #1a2a55 0, rgba(10, 17, 36, 0) 70%), linear-gradient(180deg, #0c1530 0, #0a1124 420px);
  --panel: #121c36; --panel-2: #1a2747; --line: #283a64; --line-gold: rgba(232, 185, 60, .38);
  --text: #e8edf8; --muted: #a6b3cf; --title: #f1d27a;
  --accent: #e8b93c; --gold: #e8b93c; --gold-2: #f1d27a; --on-gold: #1d1402; --accent-text: var(--on-gold);
  --danger: #ff8a80; --ok: #7dd3a0; --shadow: 0 2px 10px rgba(0, 0, 0, .35);
  --glow: inset 0 1px 0 rgba(241, 210, 122, .10);
  --top-bg: linear-gradient(180deg, #0f1a38, #0b142c); --top-line: rgba(232, 185, 60, .55);
  --nav: #b3bfd9; --nav-hover: #f1d27a;
  --band: linear-gradient(90deg, rgba(6, 11, 26, .90) 0, rgba(6, 11, 26, .70) 45%, rgba(6, 11, 26, .12) 78%, rgba(6, 11, 26, 0) 100%);
  --band-text: #ffffff; --band-sub: #dfe6f5;
  color-scheme: dark;
}
/* älterer Name aus der Prüfliste */
:root { --border: var(--line); }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg-grad), var(--bg); background-color: var(--bg); color: var(--text); font: 15px/1.45 system-ui, "Segoe UI", sans-serif; min-height: 100vh; }
a { color: var(--accent); }
h2 { font-size: 1.2rem; margin: 0 0 .75rem; color: var(--title); }
h3 { font-size: 1.05rem; margin: 0 0 .75rem; }
code { background: var(--panel-2); padding: 0 .3em; border-radius: 3px; }
.muted { color: var(--muted); }
.center { text-align: center; margin: 1rem 0; }
[hidden] { display: none !important; }

button, input, select { font: inherit; color: inherit; }
button { background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: .4rem .8rem; cursor: pointer; }
button:hover { border-color: var(--gold); }
button.primary { background: linear-gradient(180deg, var(--gold-2), var(--gold)); color: var(--on-gold); border-color: #c99a26; font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45); }
button.primary:hover { filter: brightness(1.06); }
button.small { padding: .15rem .5rem; font-size: .85rem; }
button.danger { color: var(--danger); }
input, select { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: .4rem .55rem; min-width: 0; }
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.top { position: sticky; top: 0; z-index: 5; display: flex; gap: .4rem 1rem; align-items: center; flex-wrap: wrap;
  padding: .5rem 1rem; background: var(--top-bg); border-bottom: 1px solid var(--top-line); box-shadow: 0 2px 12px rgba(0, 0, 0, .18); }
/* eigene Wortmarke: Zahnrad mit goldenem Stern (nicht das offizielle Flyff-Logo, keine Boss-Grafik) */
.brand { display: inline-flex; align-items: center; gap: .45rem; text-decoration: none; white-space: nowrap; }
.brand-mark { width: 1.8rem; height: 1.8rem; flex: none; filter: drop-shadow(0 0 4px rgba(232, 185, 60, .45)); }
.brand-mark .gear-teeth { fill: #b8871b; }
.brand-mark .gear-ring { fill: var(--panel-2); stroke: #b8871b; stroke-width: 3.2; }
.brand-mark .gear-star { fill: var(--gold-2); stroke: var(--gold); stroke-width: .6; stroke-linejoin: round; }
.brand:hover .brand-mark { transform: rotate(22.5deg); transition: transform .4s; }
.legal { max-width: 860px; }
.legal .card h2 { margin-top: .4rem; }
mark.placeholder { background: rgba(255, 138, 128, .18); color: var(--danger); padding: 0 .25rem; border-radius: 3px; font-weight: 600; }
.foot-links a { color: inherit; }
@media (max-width: 480px) {
  .brand { gap: .3rem; }
  .top .brand-word { font-size: .95rem; letter-spacing: 0; }
  .brand-mark { width: 1.45rem; height: 1.45rem; }
  .top { gap: .4rem .5rem; }
}
.brand-word { font: 700 1.15rem/1 Georgia, "Palatino Linotype", "Book Antiqua", serif; letter-spacing: .03em; color: var(--title); }
.brand-word span { color: var(--accent); font-style: italic; }
.mainnav { display: flex; gap: .1rem; flex: 1; flex-wrap: wrap; }
.mainnav a { color: var(--nav); text-decoration: none; padding: .4rem .6rem; border-bottom: 2px solid transparent; }
.mainnav a:hover { color: var(--nav-hover); }
.mainnav a[aria-current="page"] { color: var(--title); border-bottom-color: var(--gold); font-weight: 600; }
.top-actions:empty { display: none; }
.theme-toggle { display: inline-grid; place-items: center; width: 2.2rem; height: 2.2rem; padding: 0; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line-gold); color: var(--accent); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.theme-toggle svg path:only-child { fill: currentColor; stroke: none; }
/* Seitendaten bearbeiten nur für Admins (der Server prüft zusätzlich) */
.admin-only { display: none !important; }
html.is-admin .admin-only { display: inline-block !important; }
/* Anmeldung im Kopf */
.user-area { position: relative; display: flex; align-items: center; }
.user-area:empty { display: none; }
.login-btn { padding: .3rem .8rem; border-color: var(--line-gold); color: var(--accent); font-weight: 600; }
.user-btn { display: inline-flex; align-items: center; gap: .45rem; padding: .2rem .6rem .2rem .2rem; border-radius: 999px; border-color: var(--line-gold); max-width: 12rem; }
.user-btn img, .avatar-fallback { width: 28px; height: 28px; border-radius: 50%; flex: none; }
.avatar-fallback { display: inline-grid; place-items: center; background: var(--gold); color: var(--on-gold); font-weight: 700; }
.user-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: absolute; right: 0; top: calc(100% + .4rem); z-index: 20; min-width: 12rem; display: flex; flex-direction: column; gap: .3rem;
  padding: .6rem .7rem; background: var(--panel); border: 1px solid var(--line-gold); border-radius: 8px; box-shadow: var(--shadow); }
.user-menu p { margin: 0 0 .2rem; }
.user-menu a { color: var(--text); text-decoration: none; padding: .2rem 0; }
.user-menu a:hover { color: var(--accent); }
.user-menu button { align-self: flex-start; margin-top: .2rem; }
.login-card { max-width: 640px; }
.discord-btn { background: #5865f2; border-color: #4752c4; color: #fff; font-weight: 600; text-decoration: none; }
.discord-btn:hover { background: #4752c4; }
/* schmal: oben Wortmarke und Umschalter, darunter die Navigation als eine wischbare Zeile */
@media (max-width: 760px) {
  .top { padding: .45rem 16px .2rem; }
  .theme-toggle { margin-left: auto; order: 2; }
  .user-area { order: 2; }
  .user-name { display: none; }
  /* Wortmarke, Umschalter und Anmelden in einer Zeile */
  .brand { flex: 1 1 0; min-width: 0; }
  .brand-word { overflow: hidden; text-overflow: ellipsis; }
  .theme-toggle { margin-left: 0; }
  .login-btn { padding: .25rem .55rem; font-size: .85rem; }
  .user-btn { padding: .2rem; }
  .top-actions { order: 3; }
  .mainnav { order: 4; flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 0 12px; }
  .mainnav::-webkit-scrollbar { display: none; }
  .mainnav a { white-space: nowrap; padding: .35rem .5rem; }
}

/* Seitenbanner (Artwork aus dem Fansite-Kit) mit dunklem Band für lesbare Schrift; rechts ein NPC-Begleiter */
.banner { position: relative; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; overflow: hidden;
  min-height: clamp(118px, 15vw, 180px); margin: 0 0 1rem; padding: 1rem 1.2rem; border-radius: 12px;
  background: var(--band), var(--banner) center / cover no-repeat, var(--panel-2);
  border: 1px solid var(--line-gold); box-shadow: var(--shadow), inset 0 0 0 1px rgba(255, 255, 255, .06); }
.banner--big { min-height: clamp(210px, 30vw, 360px); align-items: center; }
.banner-text { position: relative; z-index: 1; max-width: min(62ch, 70%); }
.banner h1 { color: var(--band-text); font: 700 clamp(1.45rem, 3.2vw, 2.1rem)/1.15 Georgia, "Palatino Linotype", serif; letter-spacing: .02em;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .7); }
.banner--big h1 { font-size: clamp(1.8rem, 4.5vw, 3rem); }
.banner h1::after { content: ''; display: block; width: 3.2rem; height: 3px; margin-top: .45rem; border-radius: 2px; background: linear-gradient(90deg, var(--gold), rgba(232, 185, 60, 0)); }
.banner-text p, .banner-text > span { display: block; margin: .5rem 0 0; color: var(--band-sub); text-shadow: 0 1px 4px rgba(0, 0, 0, .8); font-size: .95rem; }
.companion { position: relative; z-index: 1; display: flex; align-items: flex-end; gap: .5rem; margin: 0 0 -1rem; flex: none; }
.companion img { display: block; width: auto; height: clamp(96px, 11vw, 150px); filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .55)); }
.banner--big .companion img { height: clamp(120px, 15vw, 190px); }
.bubble { position: relative; max-width: 15rem; margin-bottom: 2.2rem; padding: .45rem .65rem; border-radius: 10px; font-size: .82rem; line-height: 1.35;
  background: rgba(10, 18, 40, .86); color: #f3f6fc; border: 1px solid rgba(232, 185, 60, .55); box-shadow: 0 3px 12px rgba(0, 0, 0, .4); }
.bubble strong { display: block; color: #f1d27a; font-size: .75rem; letter-spacing: .04em; }
.bubble::after { content: ''; position: absolute; right: -7px; bottom: .9rem; border: 7px solid transparent; border-right: 0; border-left-color: rgba(232, 185, 60, .55); }
@media (max-width: 760px) {
  .bubble { display: none; } /* auf schmalen Bildschirmen nur die Figur, damit nichts verdeckt wird */
  .banner-text { max-width: 100%; }
}
@media (max-width: 480px) {
  .banner { padding: .8rem .9rem; border-radius: 10px; }
  .companion img { height: 84px; }
  .banner--big .companion img { height: 110px; }
  .banner--big { align-items: flex-end; }
}

h1 { font-size: 1.45rem; margin: 0; }
.pagehead { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 1rem; }
.pagehead .subtabs { flex: 1; }
.subtabs { display: flex; gap: .25rem; flex-wrap: wrap; }
.subtabs button { background: none; border: none; border-bottom: 2px solid transparent; border-radius: 0; padding: .4rem .6rem; color: var(--muted); }
.subtabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--accent); }

a.button { display: inline-block; text-decoration: none; color: inherit; background: var(--panel-2); border: 1px solid var(--line); border-radius: 6px; padding: .4rem .8rem; }
a.button:hover { border-color: var(--accent); }
.card a.button { margin: .25rem .4rem 0 0; }

.hero { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: .25rem 0 1rem; }
.hero p { margin: .3rem 0 0; }
.clock { background: var(--panel); border: 1px solid var(--line-gold); border-radius: 8px; padding: .5rem .8rem; min-width: min(240px, 100%); box-shadow: var(--shadow), var(--glow); }
.hero:has(> .clock:only-child) { justify-content: flex-end; margin-top: -.4rem; }
.clock-row { display: flex; justify-content: space-between; gap: 1rem; font-variant-numeric: tabular-nums; }
.home-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.home-grid .card { margin: 0; }
.home-grid h2, .card h2 { font-size: 1.1rem; }
.tiles.small { grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); margin-bottom: .6rem; }
.tiles.small .tile { padding: .4rem .6rem; }
.tiles.small .v { font-size: 1.1rem; }
.inline-form { display: flex; gap: .5rem; }
.inline-form input { flex: 1; }
.nav-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem; }
.navcard { display: flex; flex-direction: column; gap: .25rem; padding: .8rem; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; color: inherit; text-decoration: none; box-shadow: var(--shadow), var(--glow); }
.navcard strong { color: var(--title); }
.navcard:hover { border-color: var(--gold); }

main { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .75rem; }
.filters input[type=search] { flex: 1 1 220px; }
.check { display: inline-flex; gap: .35rem; align-items: center; color: var(--muted); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; box-shadow: var(--shadow); }
.tile .v { font-size: 1.35rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tile .l { color: var(--muted); font-size: .85rem; }

table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
th, td { text-align: left; padding: .45rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: var(--panel-2); font-size: .85rem; color: var(--muted); font-weight: 600; }
tr:last-child td { border-bottom: none; }
td.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.itemcell { display: flex; gap: .55rem; align-items: center; }
.itemcell a { color: inherit; text-decoration: none; font-weight: 600; }
.itemcell a:hover { color: var(--accent); }
.icon { width: 32px; height: 32px; flex: none; image-rendering: pixelated; background: var(--panel-2); border-radius: 4px; }
.tag { display: inline-block; font-size: .75rem; padding: 0 .4rem; border-radius: 4px; background: var(--panel-2); color: var(--muted); margin-left: .25rem; }
.tag.up { background: var(--gold); color: var(--on-gold); font-weight: 700; }
.empty { padding: 2rem; text-align: center; color: var(--muted); background: var(--panel); border: 1px dashed var(--line); border-radius: 8px; }
/* leere Listen: ein kleines Monster aus dem Fansite-Kit (nur Deko) */
div.empty::before { content: ''; display: block; width: 120px; height: 72px; margin: 0 auto .6rem; background: url("/img/kit/monster-aibatt.png") center / contain no-repeat; opacity: .9; }
div.empty.empty-search::before { width: 96px; height: 108px; background-image: url("/img/kit/monster-mushbro.png"); }
div.empty.empty-quiet::before { width: 90px; height: 96px; background-image: url("/img/kit/monster-rabbit.png"); }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .5rem; }
.grid > .empty { grid-column: 1 / -1; }
.itemcard { display: flex; gap: .6rem; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: .5rem; cursor: pointer; text-align: left; }
.itemcard:hover { border-color: var(--accent); }
.itemcard .n { font-weight: 600; }
.itemcard .s { font-size: .8rem; color: var(--muted); }

/* Karten wie ein Spielmenü: feiner Rand, goldene Lichtkante oben */
.card { background: var(--panel); border: 1px solid var(--line); border-top-color: var(--line-gold); border-radius: 8px; padding: 1rem; margin-bottom: 1rem; box-shadow: var(--shadow), var(--glow); }
.acc { background: var(--panel); border: 1px solid var(--line); border-top-color: var(--line-gold); border-radius: 8px; margin-bottom: 1rem; box-shadow: var(--shadow), var(--glow); }
.acc > header { display: flex; gap: .5rem; align-items: center; padding: .6rem .8rem; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.acc > header .t { font-weight: 700; flex: 1; }
.chars { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: .6rem; padding: .8rem; }
.chr { border: 1px solid var(--line); border-radius: 6px; padding: .6rem; background: var(--panel-2); }
.chr .t { font-weight: 600; display: flex; justify-content: space-between; gap: .5rem; }
.locs { list-style: none; padding: 0; margin: .5rem 0 0; }
.locs li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .2rem 0; border-top: 1px dashed var(--line); }
.locs li a { color: inherit; }
.btns { display: flex; gap: .3rem; flex-wrap: wrap; }

dialog { border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); padding: 1.2rem; width: min(520px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0,0,0,.45); }
dialog label { display: block; margin-bottom: .7rem; font-size: .9rem; color: var(--muted); }
dialog label input, dialog label select { display: block; width: 100%; margin-top: .2rem; color: var(--text); }
dialog .row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.actions { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1rem; flex-wrap: wrap; }
.error { color: var(--danger); min-height: 1.2em; margin: .3rem 0 0; }
.seg { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: .8rem; }
.seg label { display: inline-flex; gap: .3rem; align-items: center; color: var(--text); background: var(--panel-2); padding: .3rem .6rem; border-radius: 6px; margin: 0; }
.seg label input { display: inline; width: auto; margin: 0; }

.combo { position: relative; }
.combo-list { position: absolute; z-index: 10; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 0; list-style: none;
  max-height: 280px; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.combo-list li { display: flex; gap: .5rem; align-items: center; padding: .3rem .5rem; cursor: pointer; color: var(--text); }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--panel-2); }
.combo-list .s { font-size: .78rem; color: var(--muted); }
.picked { display: flex; gap: .6rem; align-items: center; background: var(--panel-2); border-radius: 6px; padding: .4rem .6rem; margin: -.3rem 0 .7rem; }

.detail-head { display: flex; gap: .8rem; align-items: center; margin-bottom: .6rem; }
.detail-head .icon { width: 48px; height: 48px; }
.detail-desc { white-space: pre-line; background: var(--panel-2); border-radius: 6px; padding: .6rem; font-size: .9rem; }
.model-box { margin-top: .8rem; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: radial-gradient(circle at 50% 40%, var(--panel-2), var(--panel)); }
.model-box canvas { display: block; width: 100%; height: 300px; touch-action: none; cursor: grab; }
.model-box canvas:active { cursor: grabbing; }
.model-bar { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; padding: .4rem .6rem; border-top: 1px solid var(--line); font-size: .8rem; }
.model-bar button[aria-pressed="true"] { border-color: var(--accent); color: var(--accent); }
.ward { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.ward-stage { position: sticky; top: 4.5rem; border: 1px solid var(--line); border-radius: 8px; overflow: hidden;
  background: radial-gradient(circle at 50% 35%, var(--panel-2), var(--panel)); }
.ward-stage canvas { display: block; width: 100%; height: min(72vh, 640px); touch-action: none; cursor: grab; }
.ward-side { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.ward-side h3 { margin: .4rem 0 0; }
.ward-look { display: grid; grid-template-columns: 1fr 1fr auto; gap: .5rem; }
.ward-look label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.ward-look input[type=color] { width: 3rem; height: 2.1rem; padding: .1rem; }
.ward-slots { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.ward-slots li { display: grid; grid-template-columns: 4.5rem 32px minmax(0, 1fr) auto; gap: .5rem; align-items: center; padding: .35rem .5rem; border-bottom: 1px solid var(--line); }
.ward-slots li:last-child { border-bottom: none; }
.ward-slots .sl { color: var(--muted); font-size: .85rem; }
.ward-slots .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ward-picker { border: 1px solid var(--accent); border-radius: 8px; padding: .6rem; background: var(--panel); display: flex; flex-direction: column; gap: .5rem; }
.ward-picker h3 { margin: 0; }
.pick-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; background: var(--panel); }
.pick-list li { display: flex; gap: .5rem; align-items: center; padding: .3rem .5rem; cursor: pointer; border-bottom: 1px solid var(--line); }
.pick-list li:last-child { border-bottom: none; }
.pick-list li:hover, .pick-list li:focus-visible { background: var(--panel-2); outline: none; }
.pick-list .s { font-size: .78rem; color: var(--muted); }
.pick-list li.empty { cursor: default; color: var(--muted); }
@media (max-width: 860px) {
  .ward { grid-template-columns: 1fr; }
  .ward-stage { position: static; }
  .ward-stage canvas { height: 55vh; }
}
dl.props { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; font-size: .9rem; margin: .6rem 0; }
dl.props dt { color: var(--muted); }
dl.props dd { margin: 0; }

/* News, Events, Updates */
:root { --c-sale: #7f5300; --c-maint: #b3261e; --c-event: #1a64a6; --c-update: #6339ad; --c-notice: #4f5f7c; --c-survey: #1d6b3d; --c-rates: #9a3f71; --warn: #b3261e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { --c-sale: #e8b93c; --c-maint: #ff8a80; --c-event: #7cb8f0; --c-update: #c3a3f5; --c-notice: #a6b3cf; --c-survey: #7dd3a0; --c-rates: #f0a0c8; --warn: #ff8a80; }
}
:root[data-theme="dark"] { --c-sale: #e8b93c; --c-maint: #ff8a80; --c-event: #7cb8f0; --c-update: #c3a3f5; --c-notice: #a6b3cf; --c-survey: #7dd3a0; --c-rates: #f0a0c8; --warn: #ff8a80; }
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; padding: .05rem .45rem; border-radius: 999px;
  border: 1px solid currentColor; color: var(--c-notice); white-space: nowrap; }
.badge.cat-sale { color: var(--c-sale); } .badge.cat-maintenance { color: var(--c-maint); } .badge.cat-event { color: var(--c-event); }
.badge.cat-update { color: var(--c-update); } .badge.cat-survey { color: var(--c-survey); } .badge.cat-rates { color: var(--c-rates); }
.home-grid .card.wide { grid-column: 1 / -1; }
.bar.wrap { flex-wrap: wrap; }
.server-props { grid-template-columns: 6.5rem 1fr; gap: .45rem .8rem; }
.server-props dd { line-height: 1.5; }
.server-props dd a { color: var(--accent); }
.warn { color: var(--warn); }
.dt-link { color: inherit; }
.dt-link:hover { color: var(--accent); }
.rest { display: inline-block; font-size: .78rem; padding: 0 .4rem; border-radius: 4px; background: var(--panel-2); color: var(--text); white-space: nowrap; }
.small-text { font-size: .85rem; }
a.ext { color: var(--accent); font-size: .85rem; text-decoration: none; white-space: nowrap; }
a.ext:hover { text-decoration: underline; }
.mini-list { list-style: none; margin: 0 0 .6rem; padding: 0; }
.mini-list li { padding: .35rem 0; border-top: 1px dashed var(--line); }
.mini-list li:first-child { border-top: none; }
.mini-list a { color: inherit; font-weight: 600; text-decoration: none; }
.mini-list a:hover { color: var(--accent); }
.card h3 { font-size: .95rem; margin: .4rem 0 .3rem; }
.news-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.news-list > h3 { grid-column: 1 / -1; margin: .2rem 0 0; }
.news-item { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .7rem; background: var(--panel-2); min-width: 0; }
.news-item h3 { margin: .35rem 0 .25rem; overflow-wrap: anywhere; }
.news-item h3 a { color: inherit; text-decoration: none; }
.news-item h3 a:hover { color: var(--accent); }
.news-item p { margin: 0 0 .35rem; font-size: .88rem; color: var(--muted); overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 4; line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.news-meta { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; font-size: .8rem; color: var(--muted); }
.datastand { display: flex; flex-wrap: wrap; gap: .4rem .8rem; align-items: center; font-size: .85rem; color: var(--muted); margin: .8rem 0 0; }
.datastand button { margin-left: auto; }
.datastand button:disabled { opacity: .6; cursor: default; }
main > .datastand { margin: 0 0 1rem; }
.intro { margin: 0 0 .6rem; max-width: 70ch; }
.event-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.event-list .card { margin: 0; min-width: 0; }
.event-card.running { border-left: 3px solid var(--c-event); }
.event-card.upcoming { border-left: 3px solid var(--accent); }
.event-card .period { margin: .2rem 0 .4rem; font-size: .9rem; }
.event-card h3 a { color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.event-card h3 a:hover { color: var(--accent); }
.event-card p { overflow-wrap: anywhere; }
.points { margin: .3rem 0 .5rem; padding-left: 1.2rem; font-size: .88rem; }
.points li { margin: .15rem 0; overflow-wrap: anywhere; }
.note { font-size: .85rem; background: var(--panel-2); border-radius: 6px; padding: .35rem .5rem; }
.slots { list-style: none; margin: .4rem 0; padding: 0; font-size: .85rem; }
.slots li { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; padding: .2rem .4rem; border-radius: 4px; }
.slots li.current { background: var(--panel-2); font-weight: 600; }
details.rates summary { cursor: pointer; font-size: .85rem; color: var(--muted); }
details.past > summary { cursor: pointer; list-style: none; margin-bottom: .75rem; }
details.past > summary::-webkit-details-marker { display: none; }
details.past > summary h2 { display: inline; }
details.past > summary::before { content: '▸ '; color: var(--muted); }
details.past[open] > summary::before { content: '▾ '; }
.hint { color: var(--text); }
/* Admin */
.job-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.job-list .card { margin: 0; min-width: 0; display: flex; flex-direction: column; gap: .3rem; }
.job-card h3 { margin: 0; }
.job-card p { margin: 0; overflow-wrap: anywhere; }
.job-card > button { align-self: flex-start; margin-top: auto; }
.job-card.running { border-left: 3px solid var(--c-event); }
.warn-note { border-left: 3px solid var(--warn); }
ul.job-log { list-style: none; margin: .3rem 0 0; padding: .3rem .5rem; background: var(--panel-2); border-radius: 6px; font-size: .78rem;
  font-family: ui-monospace, Consolas, monospace; max-height: 9rem; overflow: auto; }
.alias-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 1fr)); gap: .6rem; margin-bottom: 1rem; }
.alias-list .card { margin: 0; min-width: 0; }
.alias-head { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; overflow-wrap: anywhere; }
ul.alias-sources { list-style: none; margin: .3rem 0; padding: 0; font-size: .85rem; }
ul.alias-sources li { padding: .2rem 0; border-top: 1px dashed var(--line); overflow-wrap: anywhere; }
ul.alias-sources a { color: inherit; }
.alias-actions { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; margin-top: .4rem; }
.alias-actions .combo { flex: 1 1 200px; min-width: 0; }
.alias-actions .combo input { width: 100%; }
.alias-row { grid-column: 1 / -1; display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; padding: .4rem .6rem; background: var(--panel);
  border: 1px solid var(--line); border-radius: 8px; overflow-wrap: anywhere; }
.alias-row .arrow { color: var(--muted); }
.alias-row button { margin-left: auto; }
.picked-item { display: inline-flex; gap: .4rem; align-items: center; min-width: 0; }
.picked-item .icon { width: 24px; height: 24px; }
.picked-item small { display: block; }

/* Cashshop-Erkennung und Prüfliste */
.sd-panel { margin: .8rem 0 1rem; }
.sd-row { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-end; margin: .5rem 0; }
.sd-row label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; min-width: 0; max-width: 100%; }
.sd-row select { max-width: 100%; }
.review-list { display: grid; gap: .8rem; margin-bottom: 1rem; }
.review-card { margin: 0; min-width: 0; }
.rv-reasons { display: flex; flex-wrap: wrap; gap: .3rem; margin: .3rem 0; }
.rv-crop { width: 100%; max-width: 640px; max-height: 320px; overflow: hidden auto; border: 1px solid var(--border); border-radius: 6px; background: var(--bg); }
.rv-crop img { display: block; width: 100%; height: auto; }
.rv-ocr pre { white-space: pre-wrap; word-break: break-word; font-size: .8rem; margin: .3rem 0; }
.rv-row { display: flex; flex-wrap: wrap; gap: .6rem; margin: .5rem 0; }
.rv-row label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; flex: 1 1 14rem; min-width: 0; }
.rv-row label.rv-price { flex: 0 1 9rem; }
.rv-item { border-top: 1px dashed var(--border); padding: .4rem 0; }
.rv-item-row { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
.rv-item-row .combo { flex: 1 1 12rem; min-width: 0; }
.rv-qty { display: flex; align-items: center; gap: .3rem; font-size: .85rem; }
.rv-qty input { width: 5.5rem; }
.badge.auto-mark { font-size: .7rem; }

.backup-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: .8rem; margin-bottom: 1rem; }
.backup-grid .card { margin: 0; min-width: 0; }
.sb-mode { border: none; padding: 0; margin: 0 0 .6rem; }
.sb-mode label.check { color: var(--text); margin-bottom: .2rem; }
.sb-plan { margin-top: .7rem; }
.sb-plan table { font-size: .85rem; }
.sb-plan td, .sb-plan th { white-space: normal; }

/* Katalog: Filter nach Werten */
details.statfilter { padding: .6rem .8rem; }
details.statfilter > summary { cursor: pointer; font-weight: 600; }
#sf-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: .6rem 1rem; margin-top: .6rem; }
.sf-block { border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; margin: 0; min-width: 0; }
.sf-block legend { font-size: .85rem; font-weight: 600; padding: 0 .3rem; }
.sf-block label { display: flex; flex-direction: column; gap: .2rem; font-size: .85rem; color: var(--muted); margin-bottom: .45rem; }
.sf-block label.check { flex-direction: row; color: var(--text); margin-bottom: .25rem; }
.sf-block select { width: 100%; }
.range { display: flex; gap: .3rem; align-items: center; }
.range input { width: 100%; min-width: 0; }
.sf-stat { display: grid; grid-template-columns: minmax(0, 1fr) 4.5rem 4.5rem auto; gap: .3rem; margin-bottom: .35rem; }
.sf-stat select { min-width: 0; }
.sf-foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: .5rem; align-items: flex-end; }
.sf-foot label { display: flex; flex-direction: column; font-size: .85rem; color: var(--muted); gap: .2rem; }
.itemcard .m { font-size: .78rem; color: var(--accent); margin-top: .1rem; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  .sf-stat { grid-template-columns: minmax(0, 1fr) 3.8rem 3.8rem auto; }
}

/* Item-Werte, Effekte, Sets */
#item-detail h3.sub { font-size: .95rem; margin: .9rem 0 .35rem; }
ul.effects { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem; }
ul.effects li { background: var(--panel-2); border-radius: 4px; padding: .1rem .45rem; font-size: .88rem; }
p.timing { margin: .4rem 0 0; font-size: .88rem; color: var(--muted); }
.set-parts { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: .35rem; }
.set-part { display: flex; gap: .4rem; align-items: center; text-align: left; padding: .3rem .4rem; min-width: 0; }
.set-part span { display: flex; flex-direction: column; min-width: 0; font-size: .85rem; overflow-wrap: anywhere; }
.set-part small { color: var(--muted); font-size: .75rem; }
.set-part.current { border-color: var(--accent); }
.set-part .icon { width: 28px; height: 28px; }
ul.set-bonus { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .88rem; }
details.levels { margin-top: .6rem; }
details.levels summary { cursor: pointer; font-size: .9rem; }
details.levels table { margin-top: .4rem; }

/* Verknüpfungen: Item-Chips, Hinweise, Codes */
.chips { display: flex; flex-wrap: wrap; gap: .3rem; margin: .4rem 0; align-items: center; }
.chip-wrap { display: inline-flex; align-items: center; gap: .2rem; max-width: 100%; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .1rem .5rem .1rem .2rem; border-radius: 999px; font-size: .8rem;
  background: var(--panel-2); border: 1px solid var(--line); max-width: 100%; min-width: 0; }
.chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chip .icon { width: 20px; height: 20px; border-radius: 50%; }
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip-try { font-size: .75rem; color: var(--accent); white-space: nowrap; }
.tag.hl { background: var(--c-sale); color: var(--panel); font-weight: 600; }
.now-box { margin: .8rem 0; padding: .5rem .7rem; border-radius: 8px; border: 1px solid var(--c-sale); background: var(--panel-2); font-size: .9rem; }
ul.mentions { list-style: none; margin: 0; padding: 0; font-size: .88rem; }
ul.mentions li { padding: .35rem 0; border-top: 1px dashed var(--line); }
ul.mentions li.running { border-left: 3px solid var(--c-sale); padding-left: .5rem; }
ul.mentions a { color: inherit; }
ul.codes { list-style: none; margin: 0; padding: 0; }
ul.codes li { padding: .45rem 0; border-top: 1px dashed var(--line); }
ul.codes li:first-child { border-top: none; }
ul.codes a.ext { white-space: normal; overflow-wrap: anywhere; }
.code-row { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
details.expired-codes { margin-top: .6rem; }
details.expired-codes summary { cursor: pointer; color: var(--muted); font-size: .9rem; }
ul.codes li.expired code.code { text-decoration: line-through; opacity: .7; }
code.code { font-size: 1rem; font-weight: 700; letter-spacing: .05em; padding: .1rem .4rem; user-select: all; overflow-wrap: anywhere; }

.warn-soft { color: var(--accent); }
.more-hidden { display: none; }
.show-more { grid-column: 1 / -1; justify-self: start; }
/* Versionen */
.version-list { display: grid; gap: 1rem; margin-bottom: 1rem; }
.version-list .card { margin: 0; min-width: 0; }
.version-card.latest { border-left: 3px solid var(--c-update); }
.version-head { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.version-head h2 { margin: 0; font-size: 1.4rem; }
.version-sub { font-weight: 500; color: var(--muted); font-size: 1.05rem; }
.version-card h3 { margin: .8rem 0 .3rem; }
ul.version-posts { list-style: none; margin: 0; padding: 0; font-size: .9rem; }
ul.version-posts li { padding: .3rem 0; border-top: 1px dashed var(--line); overflow-wrap: anywhere; }
ul.version-posts li a:not(.ext) { color: inherit; }
.vp-date { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: .2rem; }

/* Cashshop */
.ok-text { color: var(--ok); }
.shop-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: .8rem; margin-bottom: 1rem; }
.shop-list .card { margin: 0; min-width: 0; }
.shop-card.running { border-left: 3px solid var(--c-sale); }
.shop-card.upcoming { border-left: 3px solid var(--accent); }
.shop-card h3 a { color: inherit; text-decoration: none; }
.shop-card h3 a:hover { color: var(--accent); }
.shop-card .btns { align-items: center; margin-top: .5rem; gap: .8rem; }
.table-wrap { overflow-x: auto; margin: .4rem 0; }
table.offers { font-size: .85rem; }
table.offers th, table.offers td { padding: .3rem .45rem; vertical-align: top; }
table.offers tr.current td { background: var(--panel-2); font-weight: 600; }
.offer-name { font-weight: 600; }
.item-id { font-size: .72rem; color: var(--muted); font-family: ui-monospace, Consolas, monospace; overflow-wrap: anywhere; }
.offer-items { list-style: none; margin: 0; padding: 0; }
.offer-items li { margin: .1rem 0; }
.item-link { display: inline-flex; gap: .4rem; align-items: center; color: inherit; text-decoration: none; }
.item-link .icon { width: 24px; height: 24px; }
.item-link:hover span { color: var(--accent); text-decoration: underline; }
.history h3 .icon { width: 32px; height: 32px; }
dialog.wide-dialog { width: min(900px, calc(100vw - 32px)); max-height: calc(100vh - 32px); }
.ocr-bar { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; margin: .4rem 0 .8rem; }
fieldset.offer-edit { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: 0 0 .8rem; min-width: 0; }
fieldset.offer-edit.ocr { border-color: var(--c-update); }
fieldset.offer-edit legend { font-weight: 600; padding: 0 .3rem; }
.of-grid { display: grid; grid-template-columns: 2fr 1fr; gap: .2rem .7rem; }
.of-grid label { margin-bottom: .4rem; }
.of-items { list-style: none; margin: .2rem 0 .4rem; padding: 0; }
.of-items > li { display: grid; grid-template-columns: minmax(0, 1fr) 7rem auto; gap: .5rem; align-items: end; padding: .35rem 0; border-top: 1px dashed var(--line); }
.of-items > li .combo { min-width: 0; }
.of-items > li input[type=search] { width: 100%; }
.of-items label.qty { margin: 0; }
.of-items .picked-item { display: flex; gap: .5rem; align-items: center; min-width: 0; padding-bottom: .4rem; }
.of-items .picked-item .icon { width: 28px; height: 28px; }
.ocr-hint { grid-column: 1 / -1; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.ocr-hint select { font-size: .8rem; max-width: 100%; }
@media (max-width: 640px) {
  .of-grid { grid-template-columns: 1fr; }
  .of-items > li { grid-template-columns: minmax(0, 1fr) 5.5rem auto; }
}
.maint-focus { border-left: 3px solid var(--accent); }
.maint-focus.active { border-left-color: var(--c-maint); }
.maint-focus h2 { margin-bottom: .4rem; }
.maint-focus p { margin: .3rem 0; }
.sources a.button { margin: .25rem .4rem 0 0; }
@media (max-width: 640px) {
  .event-list, .news-list { grid-template-columns: 1fr; }
  .datastand button { margin-left: 0; }
  .server-props { grid-template-columns: 1fr; gap: .1rem; }
  .server-props dd { margin-bottom: .45rem; }
}

.site-foot { max-width: 1200px; margin: 0 auto; padding: .5rem 1rem 1rem; text-align: right; font-size: .75rem; color: var(--muted);
  display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .2rem .8rem; }
.foot-legal::before { content: '★ '; color: var(--gold); }
button.linkish { background: none; border: none; padding: 0; color: inherit; font: inherit; text-decoration: underline dotted; cursor: pointer; }
button.linkish:hover { color: var(--accent); }
/* Patchlog */
dialog.patchlog { border-color: var(--line-gold); }
dialog.patchlog .bar { margin-bottom: .6rem; }
dialog.patchlog h2 { margin: 0; }
.pl-version { border-top: 1px solid var(--line); padding: .6rem 0 .3rem; }
.pl-version h3 { margin: 0 0 .3rem; font-size: 1.05rem; color: var(--title); }
.pl-version.latest h3 { color: var(--accent); }
.pl-title { font-weight: 500; color: var(--text); }
.pl-group { margin: .4rem 0 .15rem; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.pl-version ul { margin: 0; padding-left: 1.2rem; font-size: .9rem; }
.pl-version li { margin: .15rem 0; }

/* einklappbare Abschnitte in den Item-Details („Kommt vor in“, „Cashshop-Angebote“) */
details.fold { margin-top: 1rem; border: 1px solid var(--line); border-top-color: var(--line-gold); border-radius: 8px; background: var(--panel-2); }
details.fold > summary { cursor: pointer; list-style: none; padding: .45rem .7rem; display: flex; align-items: center; gap: .4rem; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold > summary::before { content: '▸'; color: var(--accent); transition: transform .15s; }
details.fold[open] > summary::before { transform: rotate(90deg); }
details.fold > summary h3 { display: inline; margin: 0; font-size: .95rem; color: var(--title); }
details.fold > summary:hover h3 { color: var(--accent); }
.fold-count { color: var(--muted); font-weight: 500; }
details.fold[open] { padding-bottom: .5rem; }
details.fold > :not(summary) { margin-left: .7rem; margin-right: .7rem; }

/* Klassenbilder (Fansite-Kit): Katalog-Filter und CS-Viewer */
.class-pic { display: block; height: 96px; width: auto; margin: .3rem auto 0; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.class-row { display: flex; justify-content: center; align-items: flex-end; gap: .2rem; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--line); }
.class-row img { height: 92px; width: auto; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .35)); }
.site-foot a { color: inherit; }
.site-foot a:hover { color: var(--accent); }

#toast { position: fixed; bottom: 1rem; left: 50%; transform: translateX(-50%); background: var(--text); color: var(--bg);
  padding: .5rem 1rem; border-radius: 6px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; }
#toast.show { opacity: 1; }
#toast.err { background: var(--danger); color: #fff; }

@media (max-width: 640px) {
  .top { gap: .4rem; }
  main { padding: .75rem 16px; }
  .hide-sm { display: none; }
  th, td { padding: .4rem; }
}
