/* ============================================================
   DLDU Wettbüro – im Stil von dldu.de
   Palette: Asche, Stein, Pergament, altes Gold, Glut, Blut
   ============================================================ */
:root {
  --ash: #0a0806; --stone: #16110c; --stone-2: #1d1610;
  --border: #2e2418; --border-soft: #241c12;
  --parchment: #e6dac0; --muted: #94836a;
  --gold: #c9922e; --gold-bright: #e8b44a; --ember: #d4551f; --blood: #9e2222;
  --green: #9fbf7f;
  --font-display: 'Cinzel', 'Times New Roman', serif;
  --font-body: 'Alegreya Sans', system-ui, sans-serif;
}
* { box-sizing: border-box; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
body {
  margin: 0; background: var(--ash);
  background-image: radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201,146,46,.07), transparent 60%),
                    radial-gradient(ellipse 60% 40% at 50% 110%, rgba(212,85,31,.05), transparent 60%);
  color: var(--parchment); font-family: var(--font-body); font-size: 17px; line-height: 1.55; min-height: 100vh;
  background-attachment: fixed;
}
.vignette { position: fixed; inset: 0; pointer-events: none; z-index: 0; box-shadow: inset 0 0 180px 60px rgba(0,0,0,.75); }
a { color: var(--gold-bright); text-decoration: none; }
a:hover { color: #f5cd75; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
code { font-size: 14px; background: var(--ash); border: 1px solid var(--border); padding: 3px 7px; word-break: break-all; }

/* ---------- Kopf ---------- */
.top { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; padding: 16px clamp(16px, 4vw, 48px); border-bottom: 1px solid var(--border-soft); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--parchment); }
.brand:hover { color: var(--parchment); }
.sigil { color: var(--gold); filter: drop-shadow(0 0 6px rgba(201,146,46,.5)); }
.brand-top { display: block; font-family: var(--font-display); font-weight: 900; font-size: 22px; letter-spacing: .14em; line-height: 1.1; }
.brand-sub { display: block; font-family: var(--font-display); font-weight: 700; font-size: 11px; letter-spacing: .32em; text-transform: uppercase; color: var(--ember); }
.top-right { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; }
.purse { display: flex; align-items: center; gap: 8px; padding: 7px 14px; border: 1px solid var(--border); background: var(--stone); border-radius: 2px; }
.purse b { font-family: var(--font-display); font-size: 19px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.purse span { font-size: 12px; color: var(--muted); letter-spacing: .12em; text-transform: uppercase; }
.soul { color: var(--gold-bright); flex: none; }
.who { display: flex; align-items: center; gap: 8px; font-size: 15px; color: var(--muted); }
.who-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: inline-grid; place-items: center; background: #3a2a6b; color: var(--parchment); font-family: var(--font-display); font-weight: 700; font-size: 13px; }
.who-name { color: var(--parchment); }
.inline { display: inline; margin: 0; }
.linkbtn { background: none; border: 0; padding: 6px 4px; color: var(--muted); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--parchment); }

.tabs { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 12px 16px; border-bottom: 1px solid var(--border-soft); }
.tab { font-family: var(--font-display); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 16px; min-height: 44px; display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: 2px; }
.tab:hover { color: var(--parchment); }
.tab.on { color: var(--gold-bright); border-color: var(--border); background: var(--stone); }

/* ---------- Gerüst ---------- */
.wrap { position: relative; z-index: 1; max-width: 1000px; margin: 0 auto; padding: clamp(24px, 5vw, 44px) 16px 72px; }
.head { text-align: center; margin-bottom: 28px; }
.eyebrow { font-family: var(--font-display); font-size: 12px; letter-spacing: .3em; text-transform: uppercase; color: var(--ember); margin: 0 0 10px; }
.head h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(26px, 5vw, 44px); letter-spacing: .08em; text-transform: uppercase; margin: 0; line-height: 1.15; text-shadow: 0 0 40px rgba(201,146,46,.25); }
.head p { color: var(--muted); margin: 6px auto 0; max-width: 40rem; }
.ember { height: 1px; margin: 14px auto; max-width: 360px; position: relative; background: linear-gradient(90deg, transparent, var(--border) 20%, var(--ember) 50%, var(--border) 80%, transparent); }
.ember::after { content: ''; position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; transform: translate(-50%, -50%); background: var(--gold-bright); box-shadow: 0 0 12px 3px rgba(232,180,74,.55); }
.stitle { font-family: var(--font-display); font-weight: 700; font-size: clamp(17px, 3vw, 21px); letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 36px 0 14px; display: flex; align-items: center; gap: 14px; }
.stitle::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--border), transparent); }
.layout { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.main-col { flex: 999 1 520px; min-width: 0; }
.side-col { flex: 1 1 280px; min-width: 0; }
.panel { border: 1px solid var(--border); background: linear-gradient(180deg, var(--stone-2), var(--stone)); padding: 20px; box-shadow: 0 10px 30px rgba(0,0,0,.3); }
.panel h3 { font-family: var(--font-display); font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--gold); margin: 0 0 12px; }
.panel p { margin: 0 0 12px; } .panel p:last-child { margin-bottom: 0; }
.small { font-size: 14px; color: var(--muted); }
.empty { color: var(--muted); font-style: italic; margin: 0; }
.flash { max-width: 720px; margin: 0 auto 22px; padding: 12px 16px; border: 1px solid var(--gold); background: rgba(201,146,46,.1); text-align: center; }
.flash-err { border-color: var(--blood); background: rgba(158,34,34,.12); color: #f0b4b4; }

/* ---------- Wetten ---------- */
.pills { display: flex; gap: 8px; margin-bottom: 14px; }
.pill { flex: 1 1 0; text-align: center; font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 11px 14px; min-height: 44px; border: 1px solid var(--border); background: var(--stone); color: var(--muted); border-radius: 2px; }
.pill:hover { color: var(--parchment); }
.pill.on { border-color: var(--gold); color: var(--gold-bright); background: rgba(201,146,46,.1); }
.hint { margin: 0 0 14px; font-size: 15px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.hint b { color: var(--parchment); font-weight: 500; font-size: 17px; }
.hint .pool { margin-left: auto; }
.closed { color: #d97b7b; }
.done { color: var(--green); }
.rows { display: flex; flex-direction: column; border: 1px solid var(--border); background: var(--stone); }
.row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 14px; border-bottom: 1px solid var(--border-soft); color: var(--parchment); min-height: 58px; }
.row:last-child { border-bottom: 0; }
a.row:hover { background: rgba(201,146,46,.06); color: var(--parchment); }
.row.sel { background: rgba(201,146,46,.12); box-shadow: inset 3px 0 0 var(--gold-bright); }
.row.is-closed { opacity: .75; }
.av { width: 40px; height: 40px; border-radius: 5px; object-fit: cover; border: 1px solid rgba(201,146,46,.3); box-shadow: 0 2px 8px rgba(0,0,0,.5); flex: none; background: var(--stone-2); }
.av-fb { display: grid; place-items: center; font-family: var(--font-display); font-weight: 700; color: var(--parchment); }
.av-round { width: 30px; height: 30px; border-radius: 50%; }
.rname { font-size: 17px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q { font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.q-new { font-family: var(--font-body); font-weight: 500; font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.duels { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.duel { border: 1px solid var(--border); background: var(--stone); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.opt { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px; min-height: 46px; border: 1px solid var(--border); background: var(--stone-2); color: var(--parchment); border-radius: 2px; }
a.opt:hover { border-color: var(--muted); color: var(--parchment); }
.opt b { font-family: var(--font-display); color: var(--gold-bright); }
.opt.sel { border-color: var(--gold-bright); background: rgba(201,146,46,.14); }
.opt.is-closed { opacity: .7; }
.dn { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs { font-family: var(--font-display); font-size: 10px; letter-spacing: .24em; text-transform: uppercase; color: var(--ember); text-align: center; }
.duel-state { margin: 2px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Wettschein ---------- */
.slip-opt { font-size: 18px; font-weight: 500; }
.slip-line { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--border-soft); margin-bottom: 12px; }
.slip-line b { font-family: var(--font-display); font-size: 19px; color: var(--gold-bright); }
.slip-line b.g { color: var(--green); }
.stake { width: 100%; padding: 10px 12px; min-height: 48px; background: var(--ash); border: 1px solid var(--border); color: var(--parchment); font-family: var(--font-display); font-size: 20px; border-radius: 2px; }
.chips { display: flex; gap: 6px; margin: 8px 0 12px; }
.chip { flex: 1 1 0; min-height: 44px; border: 1px solid var(--border); background: var(--stone-2); color: var(--parchment); cursor: pointer; border-radius: 2px; font: inherit; font-size: 14px; }
.chip:hover { border-color: var(--muted); }
.slip-note { margin-top: 12px !important; }

/* ---------- Knöpfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--font-display); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; padding: 10px 18px; min-height: 44px; border: 1px solid var(--gold); color: var(--gold-bright); background: rgba(201,146,46,.08); cursor: pointer; border-radius: 2px; transition: background .15s, transform .12s; }
.btn:hover:not(:disabled) { background: rgba(201,146,46,.18); color: var(--gold-bright); transform: translateY(-1px); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.gold { border-color: var(--gold-bright); color: #1a120a; background: var(--gold-bright); }
.btn.gold:hover:not(:disabled) { background: #f5cd75; color: #1a120a; }
.btn.ghost { border-color: var(--border); color: var(--muted); background: transparent; }
.btn.ghost:hover:not(:disabled) { color: var(--parchment); border-color: var(--muted); }
.btn.danger { border-color: var(--blood); color: #d97b7b; background: rgba(158,34,34,.08); }
.btn.wide { width: 100%; }
.btn.sm { padding: 6px 10px; font-size: 11px; min-height: 36px; }
.btn.twitch { border-color: #9146ff; background: #6b2fd1; color: #fff; }
.btn.twitch:hover:not(:disabled) { background: #7c3ff0; color: #fff; }
.btn.small { padding: 8px 14px; font-size: 12px; }

/* ---------- Abzeichen ---------- */
.badge { display: inline-block; padding: 2px 9px; font-size: 13px; border: 1px solid var(--border); color: var(--muted); background: var(--stone-2); border-radius: 2px; white-space: nowrap; font-weight: 500; }
.b-run { color: #ffb08a; border-color: rgba(212,85,31,.6); background: rgba(212,85,31,.14); }
.life-dead { color: #d97b7b; border-color: var(--blood); background: rgba(158,34,34,.1); }
.life-immortal { color: #1a120a; background: var(--gold-bright); border-color: var(--gold-bright); }
.life-alive { color: var(--green); border-color: #3c4a2c; }
.b-won { color: var(--green); border-color: #3c4a2c; background: rgba(60,74,44,.2); }
.b-open { color: var(--gold-bright); border-color: #4a3d22; }

/* ---------- Tabellen ---------- */
.tscroll { overflow-x: auto; border: 1px solid var(--border); background: var(--stone); }
.tscroll.narrow { max-width: 680px; margin: 0 auto; }
table.t { width: 100%; border-collapse: collapse; min-width: 460px; }
table.t th { font-family: var(--font-display); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--stone-2); white-space: nowrap; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--border-soft); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
table.t tr.me td { background: rgba(201,146,46,.1); }
table.t tr.is-live td { background: rgba(212,85,31,.08); }
table.t tr.is-live td:first-child { box-shadow: inset 3px 0 0 var(--ember); }
table.t tr.banned td { opacity: .6; }
.pts { font-family: var(--font-display); font-weight: 700; font-size: 18px; color: var(--gold-bright); }
.of { color: var(--muted); font-size: 13px; }
.medal { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; font-family: var(--font-display); font-weight: 900; font-size: 14px; color: #1a120a; box-shadow: 0 2px 6px rgba(0,0,0,.6); }
.m1 { background: radial-gradient(circle at 35% 30%, #ffe08a, #c9922e 70%); box-shadow: 0 0 14px rgba(232,180,74,.55); }
.m2 { background: radial-gradient(circle at 35% 30%, #f1f1f1, #9ea3ad 70%); }
.m3 { background: radial-gradient(circle at 35% 30%, #e7a97a, #9c5a30 70%); }
.rk { display: inline-block; width: 30px; text-align: center; color: var(--muted); font-family: var(--font-display); font-weight: 700; }
.namecell { display: flex; align-items: center; gap: 10px; }

/* ---------- Meine Wetten ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { border: 1px solid var(--border); background: var(--stone); padding: 14px 16px; }
.stat small { display: block; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat b { font-family: var(--font-display); font-size: 24px; color: var(--gold-bright); font-variant-numeric: tabular-nums; }
.daily { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 18px; }
.daily p { flex: 1 1 260px; margin: 0; }
.bets { display: flex; flex-direction: column; gap: 8px; }
.bet { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; border: 1px solid var(--border); background: var(--stone); padding: 12px 14px; }
.bet-main { flex: 999 1 220px; min-width: 0; font-weight: 500; }
.bet-main small { display: block; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
.bet-num { flex: 1 1 110px; text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); font-size: 15px; }
.bet-num b { color: var(--parchment); font-weight: 500; }

/* ---------- Verwaltung ---------- */
.admin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.form label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.form input:not([type=checkbox]), .form select, .adjust input { display: block; width: 100%; margin-top: 4px; padding: 9px 10px; min-height: 42px; background: var(--ash); border: 1px solid var(--border); color: var(--parchment); font: inherit; border-radius: 2px; }
.form label.check { display: flex; gap: 10px; align-items: center; color: var(--parchment); }
.form label.check input { width: 18px; height: 18px; }
.duel-add { margin-top: 14px; }
.duel-add-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.duel-add-row label { flex: 1 1 200px; margin: 0; }
.adjust { display: flex; gap: 6px; align-items: center; }
.adjust input { display: inline-block; margin: 0; min-height: 36px; padding: 6px 8px; }
.adjust input[type=number] { width: 80px; flex: none; }
.adjust input[name=note] { width: 140px; }
.actions .inline { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Fuß ---------- */
.foot { position: relative; z-index: 1; text-align: center; font-size: 13px; letter-spacing: .04em; color: var(--muted); padding: 0 16px 28px; }
.foot p { margin: 4px 0; }
.foot a { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.foot a:hover { color: var(--parchment); }

@media (max-width: 640px) {
  .hint .pool { margin-left: 0; }
  .who-name { display: none; }
  .row { padding: 9px 12px; gap: 10px; }
}
