:root {
  --bg: #0b0f16; --panel: #131a25; --panel-2: #1a2331; --line: #263246; --text: #e8ecf3; --muted: #8b97ab;
  --blue: #4f8cff; --blue-soft: #4f8cff26; --red: #e5484d; --red-soft: #e5484d26; --gold: #e2b350; --ok: #3fb97a;
  --radius: 10px; --font: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.45 var(--font); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.05rem; margin: 0 0 .75rem; }
h3 { font-size: .95rem; margin: 0 0 .5rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.center { text-align: center; }
[hidden] { display: none !important; }

/* Kopfzeile */
.topbar { display: flex; align-items: center; gap: 1rem; padding: .6rem 1.2rem; background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.brand { display: flex; align-items: center; gap: .5rem; color: var(--text); font-size: 1.05rem; }
.brand:hover { text-decoration: none; }
.brand b { color: var(--gold); }
#nav { margin-left: auto; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
.navlink { color: var(--text); padding: .25rem .5rem; border-radius: 6px; }
.navlink:hover { background: var(--panel-2); text-decoration: none; }
.user { display: flex; align-items: center; gap: .4rem; color: var(--muted); }
.user img { border-radius: 50%; }
main { max-width: 1180px; margin: 0 auto; padding: 1.5rem 1.2rem 4rem; }

/* Bausteine */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; }
.grid-2 > .card { margin-bottom: 0; }
.grid-2 { margin-bottom: 1rem; }
.rows { display: flex; flex-direction: column; gap: .35rem; }
.row { display: flex; align-items: center; gap: .75rem; padding: .45rem .6rem; background: var(--panel-2); border-radius: 8px; color: var(--text); flex-wrap: wrap; }
a.row:hover { text-decoration: none; outline: 1px solid var(--line); }
.grow { flex: 1; min-width: 0; }
.pos { width: 4.2rem; color: var(--muted); font-size: .85rem; }
.pool-name { width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.icons { display: flex; flex-wrap: wrap; gap: .3rem; }
.champ-icon { border-radius: 6px; border: 2px solid transparent; }
.champ-icon.manual { border-color: var(--gold); }
.tag { display: inline-block; font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); margin-left: .3rem; }
.tag.you { color: var(--gold); border-color: var(--gold); }
.status { font-size: .8rem; color: var(--muted); }
.status.offen { color: var(--ok); }
.room-row.abgesagt { opacity: .55; }
.verdict { margin-right: .6rem; white-space: nowrap; }
.verdict.buff { color: var(--ok); } .verdict.nerf { color: var(--red); }
.alert { background: #e2b35018; border: 1px solid #e2b35066; color: var(--gold); padding: .6rem .8rem; border-radius: 8px; }
.team-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.team-card { display: flex; flex-direction: column; gap: .2rem; color: var(--text); margin: 0; }
.team-card:hover { text-decoration: none; border-color: var(--blue); }

/* Formulare */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .9rem; border-radius: 8px; border: 1px solid var(--blue); background: var(--blue); color: #fff; font: inherit; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: none; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--muted); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: #1a1405; font-weight: 600; }
.btn.danger { background: transparent; border-color: #e5484d88; color: var(--red); }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn.discord { background: #5865f2; border-color: #5865f2; width: 100%; padding: .7rem; font-weight: 600; }
input, select { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; }
input:focus, select:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
label { display: flex; flex-direction: column; gap: .3rem; color: var(--muted); font-size: .9rem; }
label.check { flex-direction: row; align-items: center; gap: .4rem; color: var(--text); }
.stack { display: flex; flex-direction: column; gap: .6rem; align-items: stretch; }
.inline-form { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .9rem; }
.inline-form input:not([type=checkbox]) { flex: 1; min-width: 160px; }
.code-input { text-transform: uppercase; letter-spacing: .15em; font-family: ui-monospace, monospace; }
.code-box { margin: .8rem 0; padding: .8rem; border: 1px dashed var(--gold); border-radius: 8px; }
.code { display: flex; align-items: center; gap: .8rem; font: 600 1.3rem ui-monospace, monospace; letter-spacing: .12em; color: var(--gold); }
.login { max-width: 420px; margin: 2rem auto; }
.login h1 { font-size: 2rem; margin-bottom: .3rem; }
#toast { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%) translateY(150%); background: var(--panel-2); border: 1px solid var(--line); padding: .6rem 1rem; border-radius: 8px; transition: transform .2s; z-index: 50; max-width: 90vw; }
#toast.show { transform: translateX(-50%) translateY(0); }
#toast.error { border-color: var(--red); color: #ffb4b6; }
.chip { font: inherit; font-size: .85rem; padding: .25rem .7rem; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; }
.chip.active { background: var(--panel-2); color: var(--text); border-color: var(--muted); }

/* Draft-Raum */
main:has(.draft) { max-width: 1440px; }
.draft { display: grid; grid-template-columns: 1fr; gap: .8rem; }
.draft:has(.draft-side:not([hidden])) { grid-template-columns: 1fr 260px; }
.draft > .draft-header, .draft > .game-tabs, .draft > .draft-main, .draft > .coach { grid-column: 1; }
.draft-side { grid-column: 2; grid-row: 1 / span 4; }
.draft-side .card { padding: .8rem; }
.draft-header { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem 1rem; }
.draft-header.offline { border-color: var(--red); }
.draft-header.offline::after { content: "Verbindung getrennt – verbinde neu …"; grid-column: 1 / -1; color: var(--red); font-size: .85rem; text-align: center; }
.team-name { display: flex; flex-direction: column; }
.team-name.red { text-align: right; align-items: flex-end; }
.team-name small { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; }
.team-name.blue small { color: var(--blue); } .team-name.red small { color: var(--red); }
.team-name b { font-size: 1.15rem; }
.score { text-align: center; }
.score-num { font-size: 1.6rem; font-weight: 700; letter-spacing: .1em; }
.game-tabs { display: flex; gap: .4rem; }
.draft-main { display: grid; grid-template-columns: 290px 1fr 290px; gap: .8rem; align-items: start; }
.side-board { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .7rem; display: flex; flex-direction: column; gap: .6rem; }
.side-board.blue { border-top: 3px solid var(--blue); }
.side-board.red { border-top: 3px solid var(--red); }
.side-board.turn.blue { box-shadow: 0 0 0 1px var(--blue), 0 0 24px var(--blue-soft); }
.side-board.turn.red { box-shadow: 0 0 0 1px var(--red), 0 0 24px var(--red-soft); }
.board-title { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.board-title b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-title small { color: var(--muted); text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; }
.bans { display: grid; grid-template-columns: repeat(5, 1fr); gap: .35rem; }
.ban { aspect-ratio: 1; background: var(--bg); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; display: grid; place-items: center; position: relative; }
/* Gebannt: leicht entsättigt + roter Schrägstrich, Champion bleibt gut erkennbar */
.ban:has(.banned)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top right, transparent calc(50% - 1.5px), #e5484dcc calc(50% - 1.5px), #e5484dcc calc(50% + 1.5px), transparent calc(50% + 1.5px)); pointer-events: none; }
.ban.active { border-color: var(--gold); animation: pulse 1.2s infinite; }
.picks { display: flex; flex-direction: column; gap: .35rem; }
.pick { display: flex; align-items: center; gap: .7rem; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .35rem; min-height: 78px; }
.pick.active { border-color: var(--gold); animation: pulse 1.2s infinite; }
.pick.locked { background: var(--panel-2); }
.pick-text { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.side-board.red .pick-text { align-items: flex-end; }
.role { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.role-select { font-size: .78rem; padding: .1rem .3rem; max-width: 8rem; }
.side-board.red .pick { flex-direction: row-reverse; text-align: right; }
.pick-name { font-weight: 600; font-size: 1.05rem; color: var(--muted); }
.pick.locked .pick-name { color: var(--text); }
.champ-img { width: 68px; height: 68px; border-radius: 6px; display: grid; place-items: center; flex: none; }
.ban .champ-img { width: 100%; height: 100%; }
.champ-img.empty { background: var(--panel-2); }
.champ-img.none { color: var(--muted); font-size: 1rem; }
.champ-img.banned { filter: grayscale(.45) brightness(.9); }
.champ-img.preview { opacity: .6; }
@keyframes pulse { 50% { box-shadow: 0 0 0 3px #e2b35040; } }
.draft-center { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.draft-status { min-height: 2.6rem; }
.your-turn b { color: var(--gold); }
.turn-hint { color: var(--gold); font-size: .85rem; margin-top: .2rem; }
.ready-line { display: flex; gap: 1rem; margin-top: .3rem; flex-wrap: wrap; font-size: .9rem; }
.ready.yes { color: var(--ok); }
.draft-controls { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.draft-controls:empty { display: none; }
.grid-tools { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.search { flex: 1; min-width: 180px; }
.tag-bar { display: flex; flex-wrap: wrap; gap: .3rem; }
.champ-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(68px, 1fr)); gap: .4rem; max-height: 56vh; overflow-y: auto; padding: .2rem; }
.champ { display: flex; flex-direction: column; align-items: center; gap: .15rem; background: transparent; border: 2px solid transparent; border-radius: 8px; padding: .2rem; color: var(--text); font: inherit; font-size: .7rem; cursor: pointer; }
.champ img { width: 56px; height: 56px; border-radius: 6px; }
.champ span { max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.champ:hover:not(:disabled) { border-color: var(--line); background: var(--panel-2); }
.champ.selected { border-color: var(--gold); background: #e2b35018; }
.champ:disabled { cursor: default; }
.champ.used img, .champ.fearless img { filter: grayscale(1) brightness(.45); }
.champ.used span, .champ.fearless span { color: var(--muted); }
.champ.fearless { position: relative; }
.champ.fearless::after { content: "F"; position: absolute; top: 2px; right: 6px; font-size: .65rem; font-weight: 700; color: var(--gold); }
.locked-info:empty { display: none; }

@media (max-width: 1350px) {
  .draft-main { grid-template-columns: 250px 1fr 250px; }
  .champ-img { width: 58px; height: 58px; }
  .pick { min-height: 68px; }
}
@media (max-width: 1100px) {
  .draft, .draft:has(.draft-side:not([hidden])) { grid-template-columns: 1fr; }
  .draft-side { grid-column: 1; grid-row: auto; }
}
@media (max-width: 820px) {
  .draft-main { grid-template-columns: 1fr 1fr; }
  .draft-center { grid-column: 1 / -1; grid-row: 2; }
  .pick { min-height: 56px; }
  .champ-img { width: 48px; height: 48px; }
}

/* Coach-Spalte */
.coach { background: var(--panel); border: 1px solid var(--line); border-top: 3px solid var(--gold); border-radius: var(--radius); padding: .8rem 1rem; }
.coach-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem 1rem; margin-bottom: .7rem; }
.coach-head h2 { margin: 0; }
.coach-switch { display: flex; gap: .3rem; }
.coach-source { flex: 1; }
.coach-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.coach-col { background: var(--panel-2); border: 1px solid transparent; border-radius: 8px; padding: .6rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.coach-col.focus { border-color: var(--gold); box-shadow: 0 0 18px #e2b35022; }
.coach-col h3 { margin: 0 0 .2rem; }
.coach-pos { display: flex; flex-direction: column; gap: .25rem; margin-bottom: .35rem; }
.pos-head { font-size: .9rem; }
.suggestion { background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .3rem .45rem; }
.suggestion:hover { border-color: var(--gold); }
.suggestion.outside { border-style: dashed; }
.sugg-row { display: flex; align-items: center; gap: .4rem; }
.sugg-main { display: flex; align-items: center; gap: .55rem; flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 0; color: var(--text); font: inherit; cursor: pointer; }
.why { flex: none; background: none; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font: inherit; font-size: .72rem; padding: .05rem .45rem; cursor: pointer; }
.why:hover { color: var(--text); border-color: var(--gold); }
.tag-out { color: var(--muted); font-weight: normal; font-size: .75rem; }
.details { list-style: none; margin: .35rem 0 .1rem; padding: 0; font-size: .78rem; display: flex; flex-direction: column; gap: .1rem; }
.details .pts { display: inline-block; min-width: 2.4rem; font-weight: bold; }
.details .plus .pts { color: #6fd98f; }
.details .minus .pts { color: #ff8a8d; }
.details .minus { color: #ffb4b6; }
.col-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem; }
.coach-top { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: .8rem; margin-bottom: .8rem; }
.coach-top > :only-child { grid-column: 1 / -1; }
.coach-reactions, .coach-what { background: var(--panel-2); border-radius: 8px; padding: .6rem; display: flex; flex-direction: column; gap: .4rem; }
.coach-reactions h3 { margin: 0; }
.reaction { display: flex; gap: .55rem; align-items: center; padding: .3rem .4rem; border-radius: 8px; background: var(--bg); border-left: 3px solid var(--line); }
.reaction.enemy { border-left-color: #e5484d; }
.reaction.own { border-left-color: #6fd98f; }
.reaction-text { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; min-width: 0; }
.reaction-options { display: flex; flex-wrap: wrap; gap: .3rem; }
.chip.outside { border-style: dashed; }
.coach-what.empty { justify-content: center; }
.what-head { display: flex; align-items: center; gap: .55rem; }
.what-title { flex: 1; min-width: 0; }
.what-score { font-size: 1.2rem; font-weight: bold; }
.what-score.plus { color: #6fd98f; }
.what-score.minus { color: #ff8a8d; }
.warn-text { color: #ffb4b6; margin: 0; }
.champ.inactive:not(:disabled) { opacity: .85; }
.champ-img.tiny { width: 20px; height: 20px; display: inline-grid; vertical-align: middle; margin-right: .25rem; }
.timing { margin-top: .4rem; padding: .45rem .55rem; border-radius: 8px; background: var(--bg); border-left: 3px solid var(--line); font-size: .85rem; }
.timing.early { border-left-color: #6fd98f; }
.timing.late { border-left-color: var(--gold); }
.timing.counter { border-left-color: #5aa9ff; }
.lane-opp { display: flex; align-items: center; gap: .55rem; padding: .3rem .4rem; border-radius: 8px; background: var(--bg); border-left: 3px solid #e5484d; }
.partner { padding: .3rem .4rem; border-radius: 8px; background: var(--bg); display: flex; flex-direction: column; gap: .2rem; }
.captain-timing { margin-top: .3rem; padding-top: .4rem; border-top: 1px solid var(--line); }
.captain-timing h3 { margin: 0 0 .2rem; }
.coach-claude.inline { margin-top: .2rem; border-top: 0; padding-top: 0; }
.coach-head .coach-switch .muted { align-self: center; margin-right: .2rem; }

.champ-img.small { width: 40px; height: 40px; }
.sugg-text { display: flex; flex-direction: column; min-width: 0; }
.reasons { font-size: .75rem; color: var(--muted); line-height: 1.3; }
.stats { display: flex; flex-wrap: wrap; gap: .3rem; margin: .2rem 0 .4rem; }
.stat { font-size: .78rem; padding: .1rem .5rem; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); color: var(--muted); }
.stat b { color: var(--text); }
.stat.warn { border-color: #e5484d88; }
.warnings, .threats { margin: 0 0 .4rem; padding-left: 1.1rem; font-size: .85rem; }
.warnings li { color: #ffb4b6; }
.threats li { color: var(--gold); }
.coach-claude { margin-top: auto; padding-top: .4rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .4rem; }
.claude-result { font-size: .85rem; }
.claude-result p { margin: .2rem 0; }
.claude-result ul { margin: .2rem 0; padding-left: 1.1rem; }
@media (max-width: 1000px) { .coach-grid, .coach-top { grid-template-columns: 1fr; } }

/* Admin */
.settings-grid { display: grid; gap: .9rem; }
.setting { display: grid; grid-template-columns: 220px 1fr; gap: .4rem 1rem; align-items: start; }
.setting .options { display: flex; flex-direction: column; gap: .35rem; }
@media (max-width: 700px) { .setting { grid-template-columns: 1fr; } }

/* ---------- Phase 3: Ergebnis im Raum, Reiter, Archiv, Statistik ---------- */
.result-box { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; margin: .4rem 0 .8rem; padding: .5rem .8rem; border-radius: 8px; background: var(--panel-2); font-size: .9rem; }
.team-tabs { display: flex; gap: .4rem; margin: -.4rem 0 1rem; }
.archive-filter { display: flex; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: .7rem; }
.archive-filter select { margin-left: .2rem; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px; padding: .15rem .3rem; font: inherit; }
.archive-row { padding: .55rem .2rem; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: .35rem; }
.archive-head { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .7rem; }
.archive-head .btn { margin-left: auto; }
.archive-game { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem .5rem; padding-left: .3rem; }
.archive-picks, .archive-bans { display: inline-flex; gap: 2px; }
.archive-bans .champ-icon { filter: grayscale(.45) brightness(.9); opacity: .85; }
.game-no { min-width: 4.6rem; }
.side-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.side-dot.blue { background: #3b82f6; }
.side-dot.red { background: #e5484d; }
.champ-icon.none { display: inline-grid; place-items: center; width: 20px; height: 20px; color: var(--muted); font-size: .7rem; }
.result { font-weight: bold; font-size: .85rem; padding: .05rem .5rem; border-radius: 999px; border: 1px solid var(--line); }
.result.win { color: #6fd98f; border-color: #6fd98f66; }
.result.loss { color: #ff8a8d; border-color: #ff8a8d66; }
.result.draw { color: var(--gold); }
.result.open { color: var(--muted); font-weight: normal; }
.stats-table { width: 100%; border-collapse: collapse; font-size: .85rem; }
.stats-table th { text-align: left; color: var(--muted); font-weight: normal; border-bottom: 1px solid var(--line); padding: .25rem .4rem; }
.stats-table td { padding: .2rem .4rem; border-bottom: 1px solid #ffffff0d; }
.champ-cell { display: flex; align-items: center; gap: .35rem; }
.pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: .6rem; }
.pos-card { background: var(--panel-2); border-radius: 8px; padding: .5rem .6rem; }
.pos-card .details li { display: flex; align-items: center; gap: .3rem; }
.opp-report { border-bottom: 1px solid var(--line); padding: .5rem 0; }
.opp-report summary { cursor: pointer; }
.opp-report h3 { margin: .5rem 0 .3rem; font-size: .95rem; }
.ban-count { display: inline-flex; flex-direction: column; align-items: center; font-size: .7rem; color: var(--muted); }

/* ---------- Admin: Freischaltungen und Teams (0.9) ---------- */
.admin-search { width: 100%; max-width: 320px; margin-bottom: .6rem; }
.admin-team { margin: .4rem 0; }
.admin-team > summary { cursor: pointer; padding: .3rem 0; }
.admin-player { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.admin-player .tag { margin-left: .3rem; }
.admin-status { min-width: 9rem; }
.admin-teamrow { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.admin-teamname { min-width: 10rem; }
.options.inline { display: flex; flex-wrap: wrap; gap: .2rem .8rem; }
.update-notes { white-space: pre-wrap; margin: .3rem 0 0; font-family: inherit; }

/* ---------- Fußzeile und Rechtliches ---------- */
.site-footer { max-width: 1180px; margin: -2.5rem auto 0; padding: 1rem 1.2rem 2rem; display: flex; flex-wrap: wrap; gap: 1.2rem; justify-content: center; font-size: .85rem; border-top: 1px solid var(--line); }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--text); }
.site-footer .cancel-link { color: var(--text); font-weight: 600; }
.legal { max-width: 820px; margin: 0 auto; }
.legal-text h1 { font-size: 1.5rem; }
.legal-text h2 { font-size: 1.1rem; margin-top: 1.4rem; }
.legal-text h3 { margin-top: 1rem; }
.legal-text p, .legal-text li { line-height: 1.6; }
.legal-text ul { padding-left: 1.3rem; }
.legal-form fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; display: flex; flex-direction: column; gap: .4rem; }
.legal-form legend { color: var(--muted); font-size: .9rem; padding: 0 .3rem; }
textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: .45rem .6rem; resize: vertical; }
textarea:focus { outline: 2px solid var(--blue); outline-offset: -1px; }
.legal-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.legal-editor { width: 100%; box-sizing: border-box; font-family: ui-monospace, monospace; font-size: .85rem; }
.legal-preview { border: 1px dashed var(--line); border-radius: 8px; padding: .8rem 1rem; }
.legal-gap { margin-top: 1.4rem; }
.cancel-row.done { opacity: .55; }
@media print {
  .topbar, .site-footer, .no-print, #toast { display: none !important; }
  html, body { background: #fff; color: #000; }
  .card { border-color: #999; background: #fff; }
  .row { background: #f3f3f3; color: #000; }
}
