/* truth-dare.hoshibi.de – flach, Hoshibi Dark. Keine Inline-Styles (CSP). Wahrheit blau, Pflicht orangerot, App-Akzent rosa. */
:root {
  --bg: #09090b; --bar: #0d0f14; --surf: #11131a; --raise: #161922; --raise2: #1c202b;
  --line: rgba(255, 255, 255, .08); --line2: rgba(255, 255, 255, .16);
  --tx: #f4f4f6; --mute: #9ca3af;
  --accent: #e879a8; --truth: #5aa9f0; --dare: #f0694b;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--tx); font: 16px/1.5 var(--sans); }
[hidden] { display: none !important; }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--mute); }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; top: 8px; left: 8px; z-index: 50; background: var(--tx); color: var(--bg); padding: 8px 12px; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1 { font-size: 26px; line-height: 1.2; margin: 4px 0 6px; }
h2 { font-size: 17px; margin: 22px 0 8px; }

.top { background: var(--bar); border-bottom: 1px solid var(--line); }
.top-in { max-width: 720px; margin: 0 auto; height: 52px; padding: 0 12px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; white-space: nowrap; }
.mark { width: 26px; height: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 3px; }
.mark i { border-radius: 3px; background: var(--truth); }
.mark i + i { background: var(--dare); }
.eco { display: flex; gap: 14px; margin-left: 6px; font-size: 14px; }
.eco a { color: var(--mute); text-decoration: none; padding: 4px 0; }
.eco a:hover { color: var(--tx); }
.top .btn { margin-left: auto; white-space: nowrap; padding: 8px 12px; }
@media (max-width: 560px) { .eco a:last-child { display: none; } }
.brand { min-width: 0; } .bt { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 560px) { .lg { display: none; } .top-in { gap: 10px; } .bt { font-size: 14px; } }

.btn { background: var(--raise); border: 1px solid var(--line2); border-radius: 4px; padding: 9px 16px; font-size: 14px; font-weight: 600; min-height: 40px; }
.btn:hover:not(:disabled) { background: var(--raise2); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.pri { background: var(--tx); color: var(--bg); border-color: var(--tx); }
.btn.pri:hover:not(:disabled) { background: #fff; }
.btn.ghost { background: none; }
.btn.wide { width: 100%; }
.btn.danger { border-color: var(--dare); color: var(--dare); }
.ic { width: 36px; height: 36px; background: none; border: 0; border-radius: 4px; color: var(--mute); }
.ic:hover { color: var(--tx); background: var(--raise); }

main { flex: 1; width: 100%; max-width: 720px; margin: 0 auto; padding: 16px 12px 24px; position: relative; }
.banner { border: 1px solid var(--line2); border-left: 3px solid var(--dare); background: var(--surf); padding: 10px 12px; font-size: 14px; margin-bottom: 12px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); z-index: 60; background: var(--tx); color: var(--bg); padding: 8px 14px; border-radius: 4px; font-weight: 600; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .15s; max-width: 92%; }
.toast.on { opacity: 1; }

.field { margin: 18px 0; }
.lab { display: block; font-size: 13px; color: var(--mute); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 8px; }
.seg { display: inline-flex; border: 1px solid var(--line2); border-radius: 4px; overflow: hidden; }
.seg button { background: none; border: 0; padding: 9px 18px; color: var(--mute); font-size: 14px; min-height: 40px; }
.seg button + button { border-left: 1px solid var(--line2); }
.seg button[aria-pressed="true"] { background: var(--raise2); color: var(--tx); box-shadow: inset 0 -2px 0 var(--accent); }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.players:empty { display: none; }
.pl { display: flex; border: 1px solid var(--line2); border-radius: 4px; background: var(--surf); }
.pl input { flex: 1; min-width: 0; background: none; border: 0; padding: 9px 10px; }
.pl button { background: none; border: 0; color: var(--mute); padding: 0 10px; }
.pl button:hover { color: var(--tx); }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.pk { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); background: var(--surf); border-radius: 4px; padding: 10px 12px; cursor: pointer; }
.pk:has(input:checked) { border-color: var(--accent); background: var(--raise); }
.pk input { margin-top: 5px; accent-color: var(--accent); }
.pk b { display: block; }
.pk small { color: var(--mute); display: block; line-height: 1.35; }
.pk .num { color: var(--mute); font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; border: 1px solid var(--line2); border-radius: 4px; padding: 7px 12px; min-height: 36px; font-size: 14px; color: var(--mute); cursor: pointer; user-select: none; }
.chip:hover { background: var(--raise); }
.chip:has(input:checked) { color: var(--tx); background: var(--raise2); border-color: var(--accent); }
.chip:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.avail { color: var(--mute); font-size: 13px; margin: 0 0 12px; }

.hud { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; font-size: 14px; }
.turn { text-align: center; font-size: clamp(22px, 6vw, 34px); font-weight: 800; line-height: 1.2; margin: 14px 0; min-height: 1.2em; word-break: break-word; }
.tod { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt { position: relative; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 8px; text-align: center; min-height: min(40dvh, 260px); padding: 18px 12px; background: var(--raise); color: var(--tx); border: 1px solid var(--line); border-radius: 4px; }
.opt:hover { background: var(--raise2); }
.opt.truth { border-top: 3px solid var(--truth); } .opt.dare { border-top: 3px solid var(--dare); }
.opt .txt { font-size: clamp(22px, 6vw, 34px); font-weight: 800; }
.truth .txt { color: var(--truth); } .dare .txt { color: var(--dare); }
.opt .key { position: absolute; top: 8px; left: 10px; font-size: 12px; color: var(--mute); }
.opt .sub { font-size: 13px; color: var(--mute); }
.opt:disabled { opacity: .35; cursor: not-allowed; }
.ctrl { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.ctrl .pri { margin-left: auto; min-width: 120px; }
.hint { font-size: 12px; margin-top: 18px; }
@media (max-width: 440px) { .tod { grid-template-columns: 1fr; } .opt { min-height: 18dvh; } .hint { display: none; } }

.task { background: var(--raise); border: 1px solid var(--line); border-top: 3px solid var(--mute); border-radius: 4px; padding: 14px 14px 18px; }
.task.truth { border-top-color: var(--truth); } .task.dare { border-top-color: var(--dare); }
.meta { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; font-size: 13px; }
.badge { font-weight: 800; text-transform: uppercase; letter-spacing: .08em; font-size: 13px; }
.truth .badge { color: var(--truth); } .dare .badge { color: var(--dare); }
.ttxt { font-size: clamp(22px, 5.4vw, 32px); font-weight: 700; line-height: 1.3; margin: 14px 0 0; word-break: break-word; }
.timer { margin-top: 12px; border: 1px solid var(--line); background: var(--surf); border-radius: 4px; padding: 10px 12px; }
.clock { display: block; font-size: 40px; font-weight: 700; line-height: 1.1; }
.timer.run .clock { color: var(--accent); }
.timer.out .clock { color: var(--dare); }
.bar { height: 4px; background: var(--raise2); margin: 8px 0 10px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); }
.tm-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tm-row .seg button { padding: 9px 12px; }

.nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin: 12px 0; }
.nums div { background: var(--surf); border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; }
.nums dt { font-size: 12px; color: var(--mute); text-transform: uppercase; letter-spacing: .05em; }
.nums dd { margin: 2px 0 0; font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--mute); font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.tbl th, .tbl td { padding: 7px 8px; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.tbl .r { text-align: right; white-space: nowrap; }
.ct { color: var(--truth); } .cd { color: var(--dare); }

.foot { border-top: 1px solid var(--line); background: var(--bar); padding: 14px 12px; display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; font-size: 13px; color: var(--mute); }
.foot a { text-decoration: none; } .foot a:hover { color: var(--tx); }
.link { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; }

dialog { background: var(--surf); color: var(--tx); border: 1px solid var(--line2); border-radius: 6px; padding: 0; width: min(580px, calc(100% - 24px)); max-height: 86dvh; }
dialog::backdrop { background: rgba(0, 0, 0, .65); }
.dh { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.dh h2 { margin: 0; }
.db { padding: 14px; }
.own-form { display: grid; gap: 8px; }
.own-form input, .own-filter input, select { background: var(--bg); border: 1px solid var(--line2); border-radius: 4px; padding: 9px 10px; min-height: 40px; }
.own-form input { width: 100%; }
.own-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; }
.own-row label, .own-filter label:not(.sr) { font-size: 12px; color: var(--mute); display: grid; gap: 2px; }
.own-row .btn { margin-left: auto; }
.own-filter { display: flex; gap: 8px; flex-wrap: wrap; align-items: end; margin-top: 16px; }
.own-filter input { width: 140px; }
.own-list { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; max-height: 40dvh; overflow: auto; }
.own-list li { display: flex; gap: 10px; align-items: center; background: var(--raise); border: 1px solid var(--line); border-radius: 4px; padding: 6px 6px 6px 10px; font-size: 14px; }
.own-list span { flex: 1; word-break: break-word; }
.own-list .tag { flex: none; font-size: 11px; font-family: var(--mono); color: var(--mute); text-align: right; }
.priv h3 { margin: 16px 0 4px; font-size: 15px; }
.priv p, .priv li { color: var(--mute); font-size: 14px; margin: 4px 0; }
.priv ul { padding-left: 18px; margin: 4px 0; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
