/* IT-Tools – gemeinsames Stylesheet (helles und dunkles Design) */
:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #F0F3F7;
  --border: #E3E7ED;
  --border-strong: #CBD2DC;
  --text: #16181D;
  --text-2: #3A4250;
  --muted: #5B6472;
  --accent: #0A6FA8;
  --accent-hover: #085C8C;
  --accent-text: #0A5F91;
  --accent-soft: #E6F2F9;
  --warm-soft: #FDEEE7;
  --warm-text: #A8431B;
  --ok-soft: #E8F5EE;
  --ok-text: #18794E;
  --ok-border: #BFE3CF;
  --err-soft: #FDECEC;
  --err-text: #B42318;
  --err-border: #F4C7C3;
  --shadow: 0 12px 32px rgba(22, 24, 29, .14);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --arabic: "Noto Naskh Arabic", "Scheherazade New", "Traditional Arabic", "Segoe UI", "Times New Roman", serif;
  --sidebar-w: 264px;
  color-scheme: light;
}
[data-theme="dark"] {
  --bg: #0F1217;
  --surface: #171B22;
  --surface-2: #1F242D;
  --border: #2A313C;
  --border-strong: #3A4350;
  --text: #E8EBF0;
  --text-2: #C5CCD6;
  --muted: #9AA4B2;
  --accent: #0A6FA8;
  --accent-hover: #0C80C0;
  --accent-text: #6CC3F0;
  --accent-soft: #12303F;
  --warm-soft: #3A2318;
  --warm-text: #F5A886;
  --ok-soft: #12301F;
  --ok-text: #6FD49C;
  --ok-border: #1F5236;
  --err-soft: #3A1917;
  --err-text: #FF9D94;
  --err-border: #6B2A25;
  --shadow: 0 12px 32px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 var(--font); }
h1, h2, h3, p { margin: 0; }
a { color: var(--accent-text); }
button, input, textarea, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--accent); color: #fff; }
.skip:focus { top: 12px; }
.icon { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mono { font-family: var(--mono); }

/* ---------- Grundlayout ---------- */
.app { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 22px; padding: 24px 16px; background: var(--surface); border-right: 1px solid var(--border); }
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; padding: 0 12px; }
/* Pratix-Logo: Buchstaben in Textfarbe, x aus zwei Sternschnuppen */
.px-link { display: block; color: var(--text); line-height: 0; border-radius: 8px; }
.px-logo { width: 150px; height: auto; display: block; overflow: visible; --px-head-b: #1E96D8; --px-head-o: #EA784E; --px-glow: 0.45; }
[data-theme="dark"] .px-logo { --px-head-b: #FFFFFF; --px-head-o: #FFFFFF; --px-glow: 0.75; }
.brand-sub { font-size: 11px; font-weight: 600; letter-spacing: .2em; color: var(--muted); }
.brand-sub a { color: inherit; text-decoration: none; }
.brand-sub a:hover { color: var(--accent-text); text-decoration: underline; }

.sidebar nav { display: flex; flex-direction: column; gap: 20px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; }
.nav-title { padding: 0 12px 6px; font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 9px 12px; border-radius: 8px; color: var(--text-2); font-weight: 500; text-decoration: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 16px 12px 0; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 10px; font-size: 12px; color: var(--muted); }
.sidebar-foot a { font-weight: 600; text-decoration: none; }
.sidebar-foot a:hover { text-decoration: underline; }
.content { min-width: 0; display: flex; flex-direction: column; }
.backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(0, 0, 0, .45); }

/* ---------- Obere Leiste ---------- */
.topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 16px 40px; background: var(--bg); }
.topbar-actions { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.btn.menu-toggle { display: none; }
.search { position: relative; flex: 1 1 240px; max-width: 440px; }
.search-box { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 10px; color: var(--muted); }
.search-box:focus-within { border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.search-box input { flex: 1; min-width: 0; height: 42px; border: 0; outline: 0; background: transparent; color: var(--text); }
.search-box input::-webkit-search-cancel-button { display: none; }
kbd { font: 12px var(--mono); padding: 2px 6px; border: 1px solid var(--border-strong); border-radius: 6px; color: var(--muted); white-space: nowrap; }
.popover, .menu-list { position: absolute; z-index: 50; top: calc(100% + 8px); padding: 6px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow); }
.popover { left: 0; right: 0; max-height: 60vh; overflow-y: auto; }
.popover a { display: flex; align-items: center; gap: 12px; padding: 10px; border-radius: 8px; color: var(--text); text-decoration: none; }
.popover a small { display: block; color: var(--muted); }
.popover a:hover, .popover a.is-active { background: var(--accent-soft); }
.popover .empty { padding: 12px; color: var(--muted); }
.menu { position: relative; }
.menu summary { list-style: none; }
.menu summary::-webkit-details-marker { display: none; }
.menu-list { right: 0; width: 220px; display: flex; flex-direction: column; gap: 2px; }
.menu-list a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 10px; border-radius: 8px; color: var(--text); font-weight: 500; text-decoration: none; }
.menu-list a:hover { background: var(--surface-2); }
.menu-list a[aria-current] { background: var(--accent-soft); color: var(--accent-text); font-weight: 600; }
.menu-list .code { width: 24px; font: 12px var(--mono); color: var(--muted); }
.menu-list .icon { margin-left: auto; }
.when-light, .when-dark { display: inline-flex; align-items: center; gap: 8px; }
[data-theme="light"] .when-dark, [data-theme="dark"] .when-light { display: none; }

/* ---------- Inhalt ---------- */
main { flex: 1; width: 100%; max-width: 1240px; padding: 12px 40px 56px; display: flex; flex-direction: column; gap: 28px; }
.page-head { display: flex; flex-direction: column; gap: 8px; }
.page-head h1 { font-size: 32px; line-height: 1.15; font-weight: 700; letter-spacing: -.01em; }
.page-head p { font-size: 16px; color: var(--muted); max-width: 70ch; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.crumbs a { color: inherit; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.crumbs .icon { width: 14px; height: 14px; }
.crumbs [aria-current] { color: var(--text); font-weight: 500; }
h2 { font-size: 18px; font-weight: 600; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.cols > * { flex: 1 1 340px; }
.cols > .wide { flex: 2 1 440px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.spread { justify-content: space-between; }
.hint { font-size: 13px; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; }
.sec { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text-2); font-weight: 500; text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn.primary { border-color: transparent; background: var(--accent); color: #fff; font-weight: 600; }
.btn.primary:hover { background: var(--accent-hover); color: #fff; }
.btn.icon-only { width: 44px; padding: 0; flex: none; }
.btn.is-copied { border-color: var(--ok-border); background: var(--ok-soft); color: var(--ok-text); }
.btn[disabled] { opacity: .6; cursor: default; }

.input, .textarea { width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); color: var(--text); }
.input:focus, .textarea:focus { outline: 0; border-color: var(--accent-text); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.mono, .textarea.mono { font-family: var(--mono); font-size: 14px; }
.input.is-invalid { border-color: var(--err-text); }
.textarea { display: block; min-height: 160px; resize: vertical; line-height: 1.5; }
.textarea[readonly] { background: var(--surface-2); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
input[type="range"] { width: 100%; accent-color: var(--accent); min-height: 44px; }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; color: var(--text-2); cursor: pointer; }

/* Ergebniszeilen: Bezeichnung, Wert, Kopieren */
.rows { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; gap: 16px; padding: 8px 0; border-top: 1px solid var(--border); min-width: 0; }
.row-label { flex: none; width: 132px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.row-value { flex: 1; min-width: 0; font: 14px/1.5 var(--mono); overflow-wrap: anywhere; white-space: pre-wrap; }
.row .input { flex: 1; }
.row.is-error .row-value { color: var(--err-text); }

.note { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.note.error { border-color: var(--err-border); background: var(--err-soft); color: var(--err-text); }
.note.ok { border-color: var(--ok-border); background: var(--ok-soft); color: var(--ok-text); }
.stats { display: flex; flex-wrap: wrap; gap: 8px; }
.stat { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; color: var(--text-2); }
.stat b { font-family: var(--mono); color: var(--text); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: var(--surface); color: var(--text-2); font-weight: 500; cursor: pointer; }
.chip:hover { background: var(--surface-2); }
.chip[aria-pressed="true"], .chip[aria-selected="true"], .chip[aria-checked="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }

/* Übersicht */
.tool-section { display: flex; flex-direction: column; gap: 14px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.tool-card { display: flex; align-items: flex-start; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tool-card:hover { border-color: var(--accent-text); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(22, 24, 29, .08); }
.tool-card .badge { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: none; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); }
.tool-card.warm .badge { background: var(--warm-soft); color: var(--warm-text); }
.tool-card.neutral .badge { background: var(--surface-2); color: var(--text-2); }
.tool-card strong { display: block; font-size: 15px; font-weight: 600; }
.tool-card span.desc { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 90; transform: translate(-50%, 20px); padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-weight: 600; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Werkzeug-spezifisch ---------- */
.swatch { position: relative; display: flex; align-items: flex-end; width: 100%; height: 220px; padding: 20px; border: 1px solid var(--border); border-radius: 10px; cursor: pointer; font: 500 28px var(--mono); text-align: left; }
.swatch input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.qr-box { display: flex; align-items: center; justify-content: center; min-height: 300px; padding: 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); }
.qr-box canvas { width: 100%; max-width: 280px; height: auto; image-rendering: pixelated; border-radius: 4px; }
.color-field { display: flex; gap: 10px; }
.color-field input[type="color"] { width: 56px; height: 44px; flex: none; padding: 3px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); cursor: pointer; }
select.input { appearance: auto; }
.param-head, .param-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) minmax(0, 1.4fr); gap: 12px; align-items: center; }
.param-head { padding-bottom: 6px; }
.param-row { padding: 8px 0; border-top: 1px solid var(--border); }
.param-row .num { font: 12px var(--mono); color: var(--muted); }
.param-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.param-cell .row-value { padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); min-height: 44px; }
@media (max-width: 640px) {
  .param-head { display: none; }
  .param-row { grid-template-columns: 28px minmax(0, 1fr); }
  .param-row .param-cell:last-child { grid-column: 2; }
}
.status-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 12px; }
.status-card { display: flex; align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.status-card .code { flex: none; min-width: 52px; padding: 4px 8px; border: 0; border-radius: 8px; background: var(--surface-2); color: var(--text-2); font: 600 15px var(--mono); text-align: center; cursor: pointer; }
.status-card .code:hover { outline: 2px solid var(--accent-text); }
.status-card.c2 .code { background: var(--ok-soft); color: var(--ok-text); }
.status-card.c3 .code { background: var(--accent-soft); color: var(--accent-text); }
.status-card.c4 .code { background: var(--warm-soft); color: var(--warm-text); }
.status-card.c5 .code { background: var(--err-soft); color: var(--err-text); }
.status-card strong { display: block; font-size: 15px; font-weight: 600; }
.status-card p { margin-top: 4px; font-size: 13px; color: var(--muted); }
.search-field { position: relative; max-width: 520px; }
.search-field .icon { position: absolute; left: 14px; top: 12px; color: var(--muted); pointer-events: none; }
.search-field .input { padding-left: 44px; }
.big-input { font-size: 18px; letter-spacing: .04em; }
.examples { display: flex; flex-direction: column; }
.examples .row-label { width: 150px; }
.examples button.row-value { border: 0; background: none; padding: 6px 0; color: var(--accent-text); text-align: left; cursor: pointer; }
.examples button.row-value:hover { text-decoration: underline; }
.tr-text { min-height: 150px; font-size: 20px; line-height: 1.6; }
.kb { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.kb-row { display: flex; gap: 6px; min-width: 640px; }
.kb .k { flex: 1 1 0; min-width: 0; height: 50px; padding: 0 4px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 500 18px var(--font); cursor: pointer; }
.kb .k:hover { background: var(--accent-soft); border-color: var(--accent-text); }
.kb .k.is-down, .kb .k:active { background: var(--accent); border-color: var(--accent); color: #fff; }
.kb .k.fn { flex: 1.6 1 0; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface-2); }
.kb .k.fn[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.kb .k.space { flex: 7 1 0; }
.checks .row-label { width: 260px; text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 500; color: var(--text-2); }
.checks .row-value.pass { color: var(--ok-text); }
.checks .row-value.fail { color: var(--err-text); }
.code-area { min-height: 420px; font-size: 13px; tab-size: 4; white-space: pre; overflow: auto; }
.issue { display: block; width: 100%; padding: 10px 12px; border: 1px solid var(--err-border); border-radius: 10px; background: var(--err-soft); color: var(--err-text); text-align: left; font: inherit; cursor: pointer; overflow-wrap: anywhere; }
.issue b { display: block; font: 600 12px var(--mono); margin-bottom: 2px; }
.issue:hover { border-color: var(--err-text); }
.token-out { padding: 16px 18px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); font: 18px/1.5 var(--mono); overflow-wrap: anywhere; min-height: 60px; }
.perm-table { width: 100%; border-collapse: collapse; }
.perm-table th, .perm-table td { padding: 6px 8px; text-align: center; border-top: 1px solid var(--border); }
.perm-table thead th { border-top: 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.perm-table tbody th { text-align: left; font-weight: 600; }
.perm-table label { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; cursor: pointer; }
.cron-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.runs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.runs li { padding: 10px 0; border-top: 1px solid var(--border); font-family: var(--mono); }
.output-frame { width: 100%; min-height: 260px; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.output-pre { margin: 0; min-height: 260px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface-2); font: 13px/1.5 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.emoji-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.emoji-card { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.emoji-card button { border: 0; background: none; padding: 2px 6px; margin-left: -6px; border-radius: 6px; cursor: pointer; text-align: left; }
.emoji-card button:hover { background: var(--accent-soft); }
.emoji-card .glyph { font-size: 32px; line-height: 1.2; min-height: 44px; }
.emoji-card .code { font: 12px var(--mono); color: var(--muted); }
.osm-text { min-height: 170px; font: 28px/1.7 var(--arabic); }
.keys { display: flex; flex-wrap: wrap; gap: 8px; }
.key { min-width: 48px; height: 48px; padding: 0 8px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: 24px/1 var(--arabic); cursor: pointer; }
.key:hover { background: var(--accent-soft); border-color: var(--accent-text); }
.key:active { transform: translateY(1px); }
.key.small { font: 600 12px var(--font); }
.tabs { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
dialog { width: min(640px, calc(100vw - 32px)); max-height: 85vh; padding: 0; border: 1px solid var(--border-strong); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(0, 0, 0, .5); }
.dialog-body { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.map-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 10px; border: 1px solid var(--border); border-radius: 8px; }
.map-item kbd { border: 0; padding: 0; font-size: 13px; color: var(--text-2); }
.map-item span { font: 22px/1.3 var(--arabic); }

/* ---------- Schmale Bildschirme ---------- */
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; z-index: 60; width: min(86vw, 300px); transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: none; }
  .btn.menu-toggle { display: inline-flex; }
  .topbar { padding: 12px 16px; gap: 8px; }
  .search { flex: 1 1 0; min-width: 0; }
  .topbar-actions { gap: 8px; }
  .topbar-actions .btn { padding: 0 12px; }
  main { padding: 8px 16px 40px; }
  .page-head h1 { font-size: 26px; }
  .card { padding: 16px; }
  kbd { display: none; }
  .topbar-actions summary > span, .when-light > span, .when-dark > span { display: none; }
  .topbar-actions summary .icon:last-child { display: none; }
  .row { flex-wrap: wrap; gap: 6px 12px; }
  .row-label { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------- Statistik ---------- */
.viz-root { --series-1: #2a78d6; --series-2: #eb6834; --grid: #E8ECF1; --bar-track: #EEF1F5; }
[data-theme="dark"] .viz-root { --series-1: #3987e5; --series-2: #d95926; --grid: #262D37; --bar-track: #222832; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.filter-select select { min-width: 220px; }
.chip-link { display: inline-flex; align-items: center; text-decoration: none; }
.chip-link[aria-current] { background: var(--text); border-color: var(--text); color: var(--bg); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; display: flex; flex-direction: column; gap: 4px; }
.kpi .kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi .kpi-value { font-size: 34px; font-weight: 700; letter-spacing: -.01em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi .kpi-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); }
.kpi .kpi-delta b { font-weight: 600; }
.kpi .kpi-delta.up b { color: var(--ok-text); }
.kpi .kpi-delta.down b { color: var(--err-text); }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 8px; }
.legend i { width: 14px; height: 3px; border-radius: 2px; display: inline-block; }
.chart { position: relative; width: 100%; height: 300px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart text { font: 12px var(--font); fill: var(--muted); }
.chart .end-label { font-weight: 600; fill: var(--text-2); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 150px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-size: 13px; }
.chart-tip b { display: block; margin-bottom: 4px; }
.chart-tip .tip-note { display: block; margin-top: 6px; color: var(--muted); font-size: 12px; }
.chart-tip div { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.chart-tip div span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); }
.chart-tip div i { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.chart-tip div em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-empty { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--muted); border: 1px dashed var(--border-strong); border-radius: 10px; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 24px; align-items: start; }
.bars { display: flex; flex-direction: column; }
.bar-head, .bar-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(48px, 1fr) 92px 56px; align-items: center; gap: 10px; }
.bars.with-copies .bar-head, .bars.with-copies .bar-row { grid-template-columns: minmax(0, 1.25fr) minmax(48px, 1fr) 92px 92px 56px; }
.bar-head { padding: 0 8px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.bar-head span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-head span:not(:first-child), .bar-row .num { text-align: right; }
.bar-row { min-height: 40px; padding: 4px 8px; border-radius: 8px; border-top: 1px solid var(--border); }
.bar-row:hover { background: var(--surface-2); }
.bar-row a, .bar-row .name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); text-decoration: none; }
.bar-row a:hover { text-decoration: underline; color: var(--accent-text); }
.bar-row .track { height: 10px; border-radius: 4px; background: var(--bar-track); overflow: hidden; }
.bar-row .fill { height: 100%; border-radius: 0 4px 4px 0; background: var(--series-1); min-width: 2px; }
.bar-row .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.bar-row .pct { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars .empty { padding: 16px 8px; color: var(--muted); }
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: minmax(0, 1fr); }
  .bar-head, .bar-row, .bars.with-copies .bar-head, .bars.with-copies .bar-row { grid-template-columns: minmax(0, 1fr) 84px 52px; }
  .bar-row .track, .bar-head .h-track { display: none; }
  .bars.with-copies .bar-row .copies, .bars.with-copies .bar-head .h-copies { display: none; }
  .chart { height: 240px; }
  .filter-select, .filter-select select { width: 100%; }
}

/* ---------- Zahl in Worten, Kalender, IP ---------- */
.big-out { font-size: 18px; line-height: 1.5; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.date-grid { display: grid; grid-template-columns: 90px minmax(160px, 1fr) 120px; gap: 12px; align-items: end; }
.cal-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.cal-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cal-card.is-source { border-color: var(--accent-text); box-shadow: 0 0 0 2px var(--accent-soft); }
.cal-card .cal-name { font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-card .cal-date { font-size: 20px; font-weight: 700; line-height: 1.3; }
.cal-card .cal-sub { font-size: 13px; color: var(--muted); }
.cal-card .cal-ota { font: 24px/1.6 var(--arabic); color: var(--text-2); }
.cal-card .cal-na { color: var(--muted); font-size: 14px; }
.cal-card .cal-actions { margin-top: auto; padding-top: 6px; }
.ip-big { font: 600 22px/1.35 var(--mono); overflow-wrap: anywhere; }
.ip-big.muted { color: var(--muted); font: 500 15px var(--font); }
.ip-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.map-box { width: 100%; height: 320px; border: 1px solid var(--border); border-radius: 10px; }
@media (max-width: 640px) {
  .date-grid { grid-template-columns: 72px minmax(0, 1fr) 96px; }
}
#loc-rows .row-value, #b-rows .row-value { font-family: var(--font); font-size: 15px; }
#b-rows .row:last-child .row-value { font-family: var(--mono); font-size: 13px; }

/* ---------- Gemeinsam: Optionszeilen, Ablage, Trennlinie ---------- */
.ls-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px 18px; align-items: end; }
.textarea.is-invalid { border-color: var(--err-text); }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 170px; padding: 24px; border: 2px dashed var(--border-strong); border-radius: 14px; background: var(--surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.drop.small { min-height: 120px; }
.drop .icon { width: 30px; height: 30px; color: var(--accent-text); }
.drop b { font-size: 16px; }
.drop:hover, .drop.is-over, .drop:focus-within { border-color: var(--accent-text); background: var(--accent-soft); }
.hint .icon { width: 14px; height: 14px; vertical-align: -2px; }

/* ---------- Tarih hesaplayıcı ---------- */
.date-pair { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; }
.date-pair > .field { flex: 1 1 160px; }
.dc-big { display: flex; flex-direction: column; gap: 2px; }
.dc-big:empty { display: none; }
.dc-big b { font-size: 30px; font-weight: 700; letter-spacing: -.01em; line-height: 1.25; }
.dc-big span { color: var(--muted); }
.dc-hol summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.dc-list { display: flex; flex-direction: column; }
.dc-item { display: grid; grid-template-columns: minmax(170px, 1.1fr) minmax(200px, 1.6fr) minmax(110px, .8fr) auto; align-items: center; gap: 4px 16px; padding: 7px 8px; border-top: 1px solid var(--border); border-radius: 8px; }
.dc-item .dc-l { font-weight: 600; }
.dc-item .dc-r { color: var(--muted); font-size: 13px; text-align: right; }
.dc-item.big .dc-l { color: var(--accent-text); }
.dc-item.past { opacity: .55; }
.dc-item.next { background: var(--accent-soft); border-top-color: transparent; opacity: 1; }
.dc-item.next + .dc-item { border-top-color: transparent; }
.dc-item.today .dc-r { color: var(--ok-text); font-weight: 600; }
@media (max-width: 640px) {
  .dc-item { grid-template-columns: 1fr auto; }
  .dc-item .dc-d { grid-column: 1; font-size: 14px; }
  .dc-item .dc-r { grid-column: 1; text-align: left; }
  .dc-item .btn { grid-row: 1 / span 3; grid-column: 2; }
}

/* ---------- Liste ---------- */
.ls-area { min-height: 320px; }
.ls-freq { display: flex; flex-direction: column; gap: 4px; max-height: 520px; overflow: auto; }
.ls-fr { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(60px, 1fr) 48px; align-items: center; gap: 10px; font-size: 14px; }
.ls-fv { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--mono); font-size: 13px; }
.ls-fb { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.ls-fb i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.ls-fr b { text-align: right; font-variant-numeric: tabular-nums; }
.ls-cmp { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.ls-res .textarea { min-height: 220px; }
.ls-res.a h2 { color: var(--err-text); }
.ls-res.b h2 { color: var(--ok-text); }

/* ---------- Metin karşılaştırma ---------- */
.df-area { min-height: 240px; font-size: 13px; white-space: pre; overflow: auto; }
.df-badge { padding: 2px 10px; border-radius: 99px; font: 600 13px var(--mono); }
.df-badge.add { background: var(--ok-soft); color: var(--ok-text); }
.df-badge.del { background: var(--err-soft); color: var(--err-text); }
.df-out { overflow: auto; border: 1px solid var(--border); border-radius: 10px; }
.df-out:empty { display: none; }
.df-table { width: 100%; border-collapse: collapse; font: 13px/1.55 var(--mono); }
.df-table td { padding: 1px 8px; vertical-align: top; }
.df-n { width: 1%; min-width: 36px; text-align: right; color: var(--muted); background: var(--surface-2); user-select: none; white-space: nowrap; }
.df-c { white-space: pre-wrap; overflow-wrap: anywhere; }
.df-table.split .df-c { width: 50%; }
.df-table.split td.df-n + .df-c { border-right: 1px solid var(--border); }
.df-table.split td:last-child { border-right: 0; }
.df-c.del { background: color-mix(in srgb, var(--err-soft) 70%, transparent); }
.df-c.add { background: color-mix(in srgb, var(--ok-soft) 70%, transparent); }
.df-c.empty { background: repeating-linear-gradient(135deg, transparent 0 6px, var(--surface-2) 6px 12px); }
.df-m { display: inline-block; width: 16px; color: var(--muted); user-select: none; }
.df-out del, .df-flow del { background: var(--err-soft); color: var(--err-text); text-decoration: line-through; text-decoration-thickness: 1px; border-radius: 3px; }
.df-out ins, .df-flow ins { background: var(--ok-soft); color: var(--ok-text); text-decoration: none; border-radius: 3px; }
.df-c.del del { background: color-mix(in srgb, var(--err-text) 22%, transparent); color: inherit; text-decoration: none; }
.df-c.add ins { background: color-mix(in srgb, var(--ok-text) 22%, transparent); color: inherit; }
.df-gap td { padding: 4px 12px; background: var(--surface-2); color: var(--muted); font: 12px var(--font); text-align: center; }
.df-flow { margin: 0; padding: 14px; font: 13px/1.6 var(--mono); white-space: pre-wrap; overflow-wrap: anywhere; }
.df-flow2 { display: grid; grid-template-columns: 1fr 1fr; }
.df-flow2 .df-flow + .df-flow { border-left: 1px solid var(--border); }
@media (max-width: 640px) { .df-flow2 { grid-template-columns: 1fr; } .df-flow2 .df-flow + .df-flow { border-left: 0; border-top: 1px solid var(--border); } }

/* ---------- JSON / YAML / CSV ---------- */
.dt-tag { margin-left: 6px; padding: 2px 8px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font: 600 11px var(--mono); letter-spacing: .04em; }
.dt-tag:empty { display: none; }

/* ---------- Resim ---------- */
.im-list { display: flex; flex-direction: column; }
.im-item { display: grid; grid-template-columns: 72px 1fr auto auto; align-items: center; gap: 14px; padding: 10px 0; border-top: 1px solid var(--border); }
.im-thumb { width: 72px; height: 72px; border-radius: 10px; overflow: hidden; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px; border: 1px solid var(--border); }
.im-thumb img { width: 100%; height: 100%; object-fit: contain; }
.im-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 13px; color: var(--text-2); }
.im-meta b { font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.im-meta em { font-style: normal; font-weight: 600; }
.im-meta em.ok { color: var(--ok-text); }
.im-meta em.bad { color: var(--err-text); }
.im-item.is-error .im-meta span { color: var(--err-text); }
@media (max-width: 640px) { .im-item { grid-template-columns: 56px 1fr auto; } .im-thumb { width: 56px; height: 56px; } .im-item a.btn span { display: none; } .im-item > .btn.icon-only { grid-column: 3; } }
input[type="range"] { width: 100%; min-height: 32px; accent-color: var(--accent); }

/* ---------- Favicon ---------- */
.fv-tabs { display: flex; flex-direction: column; gap: 8px; }
.fv-tab { display: flex; align-items: center; gap: 10px; width: 260px; max-width: 100%; height: 40px; padding: 0 14px; border-radius: 10px 10px 0 0; font: 13px var(--font); }
.fv-tab canvas { width: 16px; height: 16px; flex: none; }
.fv-tab span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fv-tab i { font-style: normal; opacity: .6; }
.fv-tab.light { background: #ffffff; color: #1f1f1f; border: 1px solid #dadce0; border-bottom: 0; }
.fv-tab.dark { background: #35363a; color: #e8eaed; }
.fv-sizes { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 18px; padding: 16px; border-radius: 12px; background: repeating-conic-gradient(var(--surface-2) 0 25%, var(--surface) 0 50%) 0 0 / 16px 16px; border: 1px solid var(--border); }
.fv-sizes figure { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.fv-sizes canvas { image-rendering: auto; }
.fv-sizes figcaption { font-size: 11px; color: var(--muted); }

/* ---------- Kontrast ---------- */
.ct-preview { display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: 12px; border: 1px solid var(--border); }
.ct-preview p { margin: 0; font-size: 15px; }
.ct-preview .ct-large { font-size: 24px; font-weight: 700; line-height: 1.25; }
.ct-ui { align-self: flex-start; padding: 8px 14px; border: 2px solid; border-radius: 8px; font-weight: 600; font-size: 14px; }
.ct-ratio { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.ct-ratio b { font-size: 46px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ct-ratio > span:not(.ct-grade) { color: var(--muted); }
.ct-grade { padding: 4px 12px; border-radius: 99px; font-weight: 700; font-size: 14px; }
.ct-grade.ok { background: var(--ok-soft); color: var(--ok-text); }
.ct-grade.mid { background: var(--warm-soft); color: var(--warm-text); }
.ct-grade.bad { background: var(--err-soft); color: var(--err-text); }
.checks .row-label small.hint { font-size: 12px; font-weight: 400; }
.ct-sugg { display: flex; flex-direction: column; gap: 8px; }
.ct-s { display: grid; grid-template-columns: 56px 1fr auto; align-items: center; gap: 12px; }
.ct-s .ct-sw { display: grid; place-items: center; width: 56px; height: 40px; border-radius: 8px; border: 1px solid var(--border); font-weight: 700; }
.ct-s small { display: block; color: var(--muted); }

/* ================= Zufall & Auslosung ================= */
.btn.sm { min-height: 34px; padding: 0 11px; font-size: 13px; border-radius: 8px; }
.btn.big { min-height: 52px; padding: 0 26px; font-size: 16px; border-radius: 12px; }

/* Namensfeld */
.nb { display: flex; flex-direction: column; gap: 10px; }
.nb-head { display: flex; align-items: center; gap: 10px; }
.nb-count { min-width: 30px; height: 26px; padding: 0 8px; display: inline-grid; place-items: center; border-radius: 7px; background: var(--ok-soft); color: var(--ok-text); font: 700 13px var(--mono); }
.nb-count.is-zero { background: var(--surface-2); color: var(--muted); }
.nb-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 16px; align-items: start; }
.nb-area { min-height: 130px; }
.nb-side { display: flex; flex-direction: column; gap: 10px; }
.nb-mode { display: inline-flex; align-self: flex-start; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.nb-mode button { border: 0; background: var(--surface); color: var(--text-2); font: 600 12px var(--font); padding: 6px 12px; cursor: pointer; }
.nb-mode button[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-text); }
.nb-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.nb-side .hint { font-size: 12px; }
.nb-tags { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 6px; min-height: 130px; padding: 10px; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); }
.nb-tag { display: inline-flex; align-items: center; gap: 4px; padding: 3px 4px 3px 10px; border-radius: 99px; background: var(--accent-soft); color: var(--accent-text); font-size: 13px; font-weight: 500; }
.nb-tag button { width: 22px; height: 22px; border: 0; border-radius: 50%; background: transparent; color: inherit; cursor: pointer; font-size: 15px; line-height: 1; }
.nb-tag button:hover { background: rgba(0,0,0,.08); }
.nb-tag-in { flex: 1 0 100px; min-width: 100px; border: 0; outline: 0; background: transparent; color: var(--text); font: inherit; padding: 4px; }
@media (max-width: 760px) { .nb-body { grid-template-columns: 1fr; } }

/* Zufallsgenerator */
.rn-card { min-height: 460px; }
.rn-pane { display: flex; flex-direction: column; gap: 16px; }
.stage { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; min-height: 230px; perspective: 900px; }
.rn-out { min-height: 40px; text-align: center; font-size: 28px; font-weight: 700; letter-spacing: -.01em; }
.rn-out.c-r { color: #D0313D; } .rn-out.c-g { color: #1F8F55; }
[data-theme="dark"] .rn-out.c-r { color: #FF6B74; } [data-theme="dark"] .rn-out.c-g { color: #46C483; }
.rn-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 22px; }
.tally { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 14px; color: var(--text-2); }
.tally:empty { display: none; }
.coin { position: relative; width: 170px; height: 170px; transform-style: preserve-3d; }
.coin.toss { animation: toss 1.4s cubic-bezier(.3,.6,.4,1); }
@keyframes toss { 0% { translate: 0 0; } 40% { translate: 0 -70px; } 100% { translate: 0 0; } }
.coin-face { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 50%; backface-visibility: hidden; background: radial-gradient(circle at 35% 30%, #FFE9A3, #E9B840 45%, #B9861C 100%); box-shadow: inset 0 0 0 7px rgba(255,255,255,.35), inset 0 0 0 10px rgba(130,90,10,.35), 0 10px 24px rgba(0,0,0,.18); color: #6E4B07; }
.coin-face span { max-width: 120px; font-size: 24px; font-weight: 800; text-align: center; text-transform: uppercase; letter-spacing: .04em; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.coin-face.back { transform: rotateY(180deg); background: radial-gradient(circle at 35% 30%, #F4F6F8, #C7CDD4 45%, #8C959F 100%); color: #3B434C; box-shadow: inset 0 0 0 7px rgba(255,255,255,.4), inset 0 0 0 10px rgba(60,70,80,.3), 0 10px 24px rgba(0,0,0,.18); }
.pcard { width: 140px; height: 196px; perspective: 800px; }
.pcard-in { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s; }
.pcard.open .pcard-in { transform: rotateY(180deg); }
.pcard.shuffle .pcard-in { animation: cshake .8s; }
@keyframes cshake { 0%,100% { transform: rotate(0); } 20% { transform: rotate(-8deg) translateX(-10px); } 40% { transform: rotate(7deg) translateX(10px); } 60% { transform: rotate(-5deg); } 80% { transform: rotate(4deg); } }
.pcard-face { position: absolute; inset: 0; border-radius: 14px; backface-visibility: hidden; box-shadow: 0 10px 24px rgba(0,0,0,.18); }
.pc-back { background: repeating-linear-gradient(45deg, #1E96D8 0 8px, #1A84BF 8px 16px); border: 6px solid #fff; }
.pc-front { display: grid; place-items: center; transform: rotateY(180deg); background: #fff; border: 1px solid #d5dbe3; }
.pc-front b { font-size: 84px; line-height: 1; }
.pcard.r .pc-front b { color: #D0313D; } .pcard.b .pc-front b { color: #15181D; } .pcard.g .pc-front { background: #1F8F55; } .pcard.g .pc-front b { color: #fff; }
.dice-stage { gap: 16px; }
.die { width: 76px; height: 76px; border-radius: 16px; background: linear-gradient(145deg, #ffffff, #E7EBF0); box-shadow: inset 0 -4px 0 rgba(0,0,0,.08), 0 6px 14px rgba(0,0,0,.14); border: 1px solid #D5DBE3; }
.die.d6 { display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); padding: 12px; }
.die.d6 i { display: block; width: 13px; height: 13px; margin: auto; border-radius: 50%; }
.die.d6 i.on { background: #15181D; box-shadow: inset 0 2px 2px rgba(255,255,255,.25); }
.die.dn { display: flex; flex-direction: column; align-items: center; justify-content: center; color: #15181D; }
.die.dn span { font: 800 30px/1 var(--font); }
.die.dn small { font-size: 10px; color: #6B7684; font-weight: 600; }
.rolling .die { animation: dshake .14s infinite alternate; }
@keyframes dshake { from { transform: rotate(-10deg) translateY(-4px); } to { transform: rotate(10deg) translateY(3px); } }
.rn-nums { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 60px; }
.rn-nums span { min-width: 54px; padding: 10px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); font: 700 22px var(--mono); text-align: center; }
.rn-nums.one span { min-width: 160px; padding: 22px 30px; font-size: 64px; border-radius: 20px; }
.rn-nums.letters span { font-family: var(--font); }
.pop { animation: pop .35s both; }
@keyframes pop { from { scale: .6; opacity: 0; } to { scale: 1; opacity: 1; } }
.reel { position: relative; height: 270px; overflow: hidden; border: 1px solid var(--border-strong); border-radius: 14px; background: linear-gradient(var(--surface-2), var(--surface) 30%, var(--surface) 70%, var(--surface-2)); }
.reel::before { content: ""; position: absolute; left: 0; right: 0; top: 108px; height: 54px; background: var(--warm-soft); border-top: 1px solid var(--border-strong); border-bottom: 1px solid var(--border-strong); }
.reel::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(var(--surface) 0, transparent 35%, transparent 65%, var(--surface) 100%); opacity: .75; }
.reel-strip { position: relative; will-change: transform; }
.reel-strip div { height: 54px; display: grid; place-items: center; font-size: 26px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 40px; }
.reel-arrow { position: absolute; top: 123px; z-index: 2; width: 0; height: 0; border: 12px solid transparent; }
.reel-arrow.l { left: 0; border-left-color: #C0434E; } .reel-arrow.r { right: 0; border-right-color: #C0434E; }
.rn-winners { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.rn-winners span { padding: 8px 16px; border-radius: 99px; background: var(--ok-soft); color: var(--ok-text); font-weight: 700; font-size: 17px; }
.rn-winners b { opacity: .6; }
.history { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; max-height: 520px; overflow: auto; }
.history li { display: grid; grid-template-columns: auto 1fr auto; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-top: 1px solid var(--border); font-size: 14px; }
.history li:first-child { border-top: 0; }
.history .h-k { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.history .h-v { font-weight: 600; overflow-wrap: anywhere; }
.history li:has(> .h-v:first-child) { grid-template-columns: 1fr auto; }
.history time { font: 12px var(--mono); color: var(--muted); }

/* Glücksrad */
.wheel-card { align-items: center; }
.wheel-wrap { position: relative; width: 100%; max-width: 560px; margin: 0 auto; }
.wheel-wrap canvas { display: block; margin: 0 auto; }
.wheel-pointer { position: absolute; top: -6px; left: 50%; width: 34px; height: 44px; transform: translateX(-50%); background: #C0434E; clip-path: polygon(0 0, 100% 0, 50% 100%); filter: drop-shadow(0 3px 3px rgba(0,0,0,.3)); z-index: 2; }
.wheel-hub { position: absolute; left: 50%; top: 50%; width: 19%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 5px solid #fff; background: #15181D; color: #fff; font: 800 clamp(12px, 2.6vw, 18px) var(--font); letter-spacing: .06em; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.3); z-index: 2; }
.wheel-hub:hover { background: #1E96D8; }
.wheel-result { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 3; min-width: 260px; max-width: 90%; padding: 22px 26px; border-radius: 18px; background: var(--surface); box-shadow: 0 18px 50px rgba(0,0,0,.3); text-align: center; display: flex; flex-direction: column; gap: 8px; animation: pop .35s both; }
.wheel-result small { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.wheel-result b { font-size: 34px; line-height: 1.15; overflow-wrap: anywhere; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 4; }
.confetti i { position: absolute; top: 40%; width: 9px; height: 14px; border-radius: 2px; opacity: 0; animation: conf 1.8s ease-out forwards; }
@keyframes conf { 0% { opacity: 1; transform: translate(0, 0) rotate(0); } 100% { opacity: 0; transform: translate(var(--dx), 260px) rotate(var(--r)); } }
.wheel-card:fullscreen { justify-content: center; background: var(--bg); }
.wheel-card:fullscreen .wheel-wrap { max-width: min(92vh, 92vw); }

/* Teams */
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 16px; }
.team { border: 1px solid var(--border); border-top: 5px solid var(--tc); border-radius: 12px; padding: 12px 14px; background: var(--surface); }
.team h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 0 8px; font-size: 16px; }
.team h3 small { padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--tc) 18%, transparent); color: var(--text-2); font-size: 12px; }
.team ol { margin: 0; padding-left: 24px; display: flex; flex-direction: column; gap: 3px; }
.team li { padding: 4px 8px; border-radius: 6px; background: color-mix(in srgb, var(--tc) 12%, transparent); font-weight: 500; }
.team li::marker { color: var(--muted); font-size: 13px; }
.pot { float: right; margin-left: 6px; padding: 0 6px; border-radius: 5px; font: 700 11px/18px var(--mono); font-style: normal; background: var(--surface-2); color: var(--muted); }

/* Turnier */
.bracket-scroll { overflow-x: auto; padding-bottom: 6px; }
.bracket { display: flex; gap: 26px; min-width: min-content; }
.b-col { display: flex; flex-direction: column; min-width: 190px; }
.b-col h3 { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); text-align: center; }
.b-ms { display: flex; flex: 1; flex-direction: column; justify-content: space-around; gap: 10px; }
.b-m { position: relative; display: flex; flex-direction: column; border: 1px solid var(--border-strong); border-radius: 10px; background: var(--surface); overflow: hidden; }
.b-m.is-bye { opacity: .7; }
.b-code { position: absolute; top: 50%; left: -2px; transform: translate(-100%, -50%); font: 600 10px var(--mono); color: var(--muted); padding-right: 4px; }
.b-col:first-child .b-code { display: none; }
.b-p { display: block; width: 100%; min-height: 34px; padding: 6px 10px; border: 0; background: transparent; color: var(--text); text-align: left; font: 500 14px var(--font); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.b-p + .b-p { border-top: 1px solid var(--border); }
.b-p:not([disabled]):hover { background: var(--accent-soft); }
.b-p[disabled] { cursor: default; }
.b-p.win { background: var(--ok-soft); color: var(--ok-text); font-weight: 700; }
.b-p.lose { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px; }
.b-p.bye, .b-p.tbd { color: var(--muted); font-style: italic; font-size: 13px; }
.b-p.seed::after { content: "★"; margin-left: 6px; color: #E0B232; font-size: 12px; }
.b-third { margin-top: 26px; }
.b-third h4 { margin: 0 0 6px; font-size: 12px; color: var(--muted); text-align: center; }
.champ { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(120deg, #FFF4D2, #FDE7A6); color: #6E4B07; }
.champ .icon { width: 36px; height: 36px; }
.champ small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .75; }
.champ b { font-size: 24px; }

/* Rollen */
.tbl-wrap { overflow-x: auto; }
.ro-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.ro-table th { text-align: left; padding: 8px 10px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); border-bottom: 2px solid var(--border); }
.ro-table td { padding: 7px 10px; border-bottom: 1px solid var(--border); }
.ro-table td.n { width: 1%; color: var(--muted); font: 12px var(--mono); }
.ro-table td.none { color: var(--muted); }
.role-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; background: color-mix(in srgb, var(--tc) 16%, transparent); border: 1px solid color-mix(in srgb, var(--tc) 45%, transparent); font-weight: 600; font-size: 13px; }
.ro-sum { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.ro-sum h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.ro-chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* Teilen & Export */
.ex-card h2 { font-size: 16px; }
.ex-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ex-grid .btn:first-child { grid-column: span 2; }
.txt-dialog { width: min(720px, 94vw); max-height: 86vh; padding: 20px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.3); }
.txt-dialog::backdrop { background: rgba(10,14,20,.5); }
.txt-dialog pre { max-height: 60vh; overflow: auto; margin-top: 12px; }

@media print {
  .sidebar, .topbar, .no-print, .ex-card, .crumbs, .page-head p, #edit, .toast { display: none !important; }
  .app, .content, main { display: block !important; margin: 0 !important; padding: 0 !important; }
  .card { border: 0 !important; box-shadow: none !important; }
  .bracket-scroll { overflow: visible; }
  body { background: #fff; }
}
.abc { display: flex; flex-wrap: wrap; gap: 4px; }
.abc span { min-width: 26px; padding: 3px 6px; border-radius: 6px; background: var(--surface-2); font: 600 13px var(--mono); text-align: center; color: var(--text-2); }
.abc span.used { opacity: .35; text-decoration: line-through; }
.pool-line { gap: 10px 14px; }

/* ================= Präsentation & Beamer ================= */
.present-exit, .present-brand, .display-fs, .display-wait { display: none; }
.present-btns .btn[data-present="screen"].is-on { border-color: var(--ok-border); background: var(--ok-soft); color: var(--ok-text); }
.is-present .sidebar, .is-present .topbar, .is-present .crumbs, .is-present .page-head, .is-present .ctrl, .is-present .ex-card, .is-present .toast,
.is-display .sidebar, .is-display .topbar, .is-display .crumbs, .is-display .page-head, .is-display .ctrl, .is-display .ex-card, .is-display .act, .is-display #edit, .is-display .skip, .is-display .no-print { display: none !important; }
.is-present .app, .is-display .app { display: block; }
.is-present main, .is-display main { max-width: none; min-height: 100vh; padding: 3vh 3vw 70px; display: flex; flex-direction: column; justify-content: center; gap: 2vh; }
.is-present body, .is-display body { background: var(--bg); }
.is-present .cols > *, .is-display .cols > * { flex: 1 1 100%; }
.is-present .card, .is-display .card { border: 0; box-shadow: none; background: transparent; }
.is-present .present-exit { display: inline-flex; position: fixed; top: 14px; right: 14px; z-index: 50; opacity: .45; }
.is-present .present-exit:hover { opacity: 1; }
.is-present .present-brand, .is-display .present-brand { display: flex; position: fixed; right: 22px; bottom: 16px; gap: 10px; align-items: baseline; color: var(--muted); font-size: 14px; z-index: 40; }
.present-brand b { font-size: 20px; letter-spacing: .02em; color: var(--text); }
/* Zufallsgenerator groß */
.is-present .rn-card, .is-display .rn-card { min-height: 0; }
.is-present .rn-pane, .is-display .rn-pane { zoom: 1.7; }
.is-display .rn-pane .stage { min-height: 260px; }
.is-present .reel, .is-display .reel { max-width: 760px; width: 100%; margin: 0 auto; }
/* Glücksrad groß */
.is-present .wheel-wrap, .is-display .wheel-wrap { max-width: none; }
.is-display .wheel-hub { pointer-events: none; }
.is-present .wheel-result b, .is-display .wheel-result b { font-size: 56px; }
.is-present .wheel-result, .is-display .wheel-result { padding: 30px 44px; }
/* Ergebnisse groß */
.is-present #result, .is-display #result { zoom: 1.35; }
.is-display .b-p { pointer-events: none; }
.is-present .card-head .inline .btn:not(.act), .is-display .card-head .inline .btn { display: none; }
/* Beamer-Fenster */
.is-display body:not(.is-fs) .display-fs { display: block; position: fixed; left: 50%; top: 14px; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border: 0; border-radius: 99px; background: var(--accent); color: #fff; font: 600 14px var(--font); cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.is-display body:has(#edit) .display-wait { display: flex; }
.is-display body:has(#result:not([hidden])) .display-wait { display: none; }
.display-wait { position: fixed; inset: 0; flex-direction: column; align-items: center; justify-content: center; gap: 10px; text-align: center; color: var(--muted); }
.display-wait b { font-size: 32px; color: var(--text); }
.is-display .wheel-result .inline { display: none; }
.is-present #result, .is-display #result { zoom: 1.6; }
.is-present .team-grid, .is-display .team-grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ================= Web-App ================= */
.install-btn { border-color: var(--accent); color: var(--accent-text); }
.is-app body { padding-top: env(safe-area-inset-top); padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
.is-app .sidebar-foot, .is-app main { padding-bottom: calc(24px + env(safe-area-inset-bottom)); }
@media (display-mode: standalone) { html { -webkit-tap-highlight-color: transparent; } .topbar { -webkit-user-select: none; user-select: none; } }
@media (max-width: 640px) { .install-btn span { display: none; } }

/* QR-Inhaltstypen */
.qr-types { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
@media (max-width: 760px) { .qr-types { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .qr-box { position: sticky; top: 90px; } }
.qr-types .chip { justify-content: center; }
.qr-form { display: flex; flex-direction: column; gap: 14px; padding: 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.qr-pane { display: flex; flex-direction: column; gap: 12px; }
.qr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.qr-raw summary { cursor: pointer; font-size: 13px; color: var(--muted); }
.qr-raw pre { margin-top: 8px; max-height: 200px; overflow: auto; white-space: pre-wrap; word-break: break-all; font-size: 12px; }

/* Startseite: Über Pratix & FAQ */
.seo-about { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 32px; margin-top: 18px; padding-top: 28px; border-top: 1px solid var(--border); }
.seo-about h2 { font-size: 20px; margin: 0 0 12px; }
.seo-text p { color: var(--text-2); line-height: 1.65; margin: 0 0 12px; }
.seo-text a { color: var(--accent-text); }
.seo-faq details { border-bottom: 1px solid var(--border); padding: 12px 0; }
.seo-faq summary { cursor: pointer; font-weight: 600; }
.seo-faq details p { margin: 8px 0 0; color: var(--text-2); line-height: 1.6; }
.sidebar-foot a { color: inherit; }
@media (max-width: 900px) { .seo-about { grid-template-columns: 1fr; } }

/* ===== Verlauf / Was ist neu ===== */
.nav-new { margin-left: auto; padding: 2px 7px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.cl-hero { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 20px; }
.cl-kpi { padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.cl-kpi b { display: block; font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.cl-kpi span { color: var(--muted); font-size: 13px; }
#cl-filter { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.cl-time { list-style: none; margin: 0; padding: 0; }
.cl-day { display: grid; grid-template-columns: 150px 1fr; gap: 0 22px; }
.cl-date { position: sticky; top: 76px; align-self: start; padding-top: 6px; text-align: right; }
.cl-date b { display: block; font-size: 22px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.cl-date span { display: block; color: var(--muted); font-size: 13px; }
.cl-date em { font-style: normal; color: var(--muted); font-size: 12px; }
.cl-entries { position: relative; padding: 0 0 22px 34px; border-left: 2px solid var(--border); }
.cl-day:last-child .cl-entries { border-left-style: dashed; }
.cl-item { position: relative; margin-bottom: 14px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.cl-dot { position: absolute; left: -53px; top: 14px; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--bg); background: var(--surface-2); color: var(--text-2); }
.cl-dot .icon { width: 17px; height: 17px; }
.t-new .cl-dot { background: var(--accent); color: #fff; }
.t-milestone .cl-dot { background: var(--warm-text); color: #fff; }
.t-improve .cl-dot { background: var(--ok-text); color: #fff; }
.t-news .cl-dot { background: var(--text-2); color: var(--bg); }
.t-milestone { border-color: var(--border-strong); background: linear-gradient(135deg, var(--warm-soft), var(--surface) 55%); }
.cl-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.cl-tags span { padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); }
.t-new .cl-type { background: var(--accent-soft); color: var(--accent-text); }
.t-improve .cl-type { background: var(--ok-soft); color: var(--ok-text); }
.t-milestone .cl-type { background: var(--warm-soft); color: var(--warm-text); }
.cl-tags .cl-fresh { background: var(--accent); color: #fff; }
.cl-item h3 { margin: 0 0 4px; font-size: 17px; }
.cl-item p { margin: 0; color: var(--text-2); }
.cl-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.cl-tools a { display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 11px; border: 1px solid var(--border); border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; font-weight: 500; }
.cl-tools a:hover { background: var(--surface-2); border-color: var(--border-strong); }
.cl-tools .icon { width: 15px; height: 15px; color: var(--accent-text); }
.cl-cta { margin-top: 10px; padding: 24px; border-radius: 14px; background: var(--accent-soft); scroll-margin-top: 80px; }
.cl-cta-text { margin-bottom: 16px; }
.cl-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.cl-form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.cl-form input, .cl-form textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; font-weight: 400; }
.cl-form textarea { resize: vertical; min-height: 96px; }
.cl-form input:focus, .cl-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.cl-full { grid-column: 1 / -1; }
.cl-send { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cl-send small { color: var(--muted); }
.cl-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.cl-msg { margin-bottom: 14px; padding: 12px 14px; border-radius: 10px; font-weight: 600; }
.cl-msg.ok { background: var(--ok-soft); color: var(--ok-text); }
.cl-msg.err { background: var(--err-soft); color: var(--err-text); }
.cl-cta h2 { margin: 0 0 4px; font-size: 19px; }
.cl-cta p { margin: 0; color: var(--text-2); }
@media (max-width: 720px) {
  .cl-hero { grid-template-columns: repeat(2, 1fr); }
  .cl-kpi b { font-size: 24px; }
  .cl-day { grid-template-columns: 1fr; }
  .cl-date { position: static; text-align: left; padding: 0 0 10px 0; }
  .cl-date b, .cl-date span { display: inline; margin-right: 8px; }
  .cl-entries { margin-left: 16px; padding-left: 28px; }
  .cl-dot { left: -47px; width: 32px; height: 32px; }
  .cl-form { grid-template-columns: 1fr; }
  .cl-send { flex-direction: column; align-items: stretch; }
}
