:root {
  color-scheme: dark;
  --bg: #140f16;
  --panel: #211822;
  --line: #503849;
  --ink: #fff2e5;
  --muted: #d8c3cb;
  --rose: #ff9aab;
  --serif: Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: radial-gradient(ellipse at 65% 8rem, #291728 0%, transparent 60rem), var(--bg);
  color: var(--ink);
  font: 1rem/1.55 system-ui, sans-serif;
}
a { color: inherit; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--rose); outline-offset: 3px; }
.wrap { width: min(1120px, calc(100% - 3rem)); margin-inline: auto; }
header { background: var(--bg); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 68px; }
.brand { font: 1.4rem var(--serif); text-decoration: none; white-space: nowrap; }
.brand span { color: var(--rose); margin-right: .45rem; }
nav { display: flex; flex-wrap: wrap; gap: .25rem 1.35rem; }
nav a {
  padding-block: .3rem;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: .91rem;
  text-decoration: none;
}
nav a:hover, nav [aria-current="page"] { color: var(--rose); border-color: var(--rose); }

main { min-height: 67vh; padding-block: 3rem 4rem; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 1.25rem; margin-bottom: 1.75rem; }
.spuren-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 17rem;
  padding: clamp(1rem, 3.5vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #241625;
}
.spuren-art {
  position: absolute;
  z-index: -2;
  inset: 0 0 0 auto;
  width: min(100%, 46rem);
  height: 100%;
  pointer-events: none;
}
.spuren-hero::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(90deg, #211423 0%, #211423 24%, #211423b3 52%, transparent 78%),
              linear-gradient(0deg, #2114239e, transparent 62%);
}
.spuren-hero p { max-width: 34ch; color: var(--ink); }
.spuren-hero .button { white-space: nowrap; }
.eyebrow, .index { color: var(--rose); font-size: .75rem; font-weight: 750; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { margin: 0; font-family: var(--serif); font-weight: normal; line-height: 1.12; }
h1 { margin-block: .45rem; font-size: clamp(2.5rem, 6vw, 4.3rem); letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.6rem, 3.7vw, 2.15rem); }
h3 { font-size: 1.32rem; }
p { margin: .6rem 0 0; color: var(--muted); }
section { scroll-margin-top: 1rem; }
.section-gap { margin-top: 1.5rem; }

.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .62rem .98rem;
  border: 1px solid var(--rose);
  border-radius: 6px;
  background: var(--rose);
  color: #280f1c;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
}
.button:hover { background: #ffc0ca; }
.button:disabled { opacity: .58; cursor: default; }
.secondary { background: #221622; border-color: #9b687c; color: var(--ink); }
.secondary:hover { background: #442739; }
.danger { background: #6e2139; color: var(--ink); }
.danger:hover { background: #8b2d49; }
.remove { border: 0; background: transparent; color: var(--rose); text-decoration: underline; cursor: pointer; }

.card { min-width: 0; padding: 1.25rem; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.cards, .rules, .meeting-controls, .meeting-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.cards { align-items: stretch; }
.rules, #regeln .cards, .meeting-steps { margin-top: 1rem; }
.meeting-note { background: #2b1a28; }
.role .index { display: block; margin-bottom: .55rem; }
.meeting-layout { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.meeting-steps { display: grid; gap: .65rem; padding: 0; list-style: none; }
.meeting-steps li { display: flex; align-items: flex-start; gap: .8rem; }
.step-number, .count {
  display: inline-grid;
  place-items: center;
  min-width: 1.9rem;
  padding: .2rem .35rem;
  border: 1px solid #8e5d74;
  border-radius: 99px;
  color: var(--rose);
  font: 700 .8rem/1.3 system-ui, sans-serif;
  vertical-align: middle;
}

label { display: block; margin: .75rem 0 .25rem; font-weight: 650; }
input, textarea, select {
  width: 100%;
  min-width: 0;
  padding: .62rem .7rem;
  border: 1px solid #88677a;
  border-radius: 5px;
  background: #171018;
  color: var(--ink);
}
textarea { resize: vertical; }
#save-vote { margin-top: .85rem; }
.feedback, .meeting-status { color: var(--rose); }
.feedback:empty, .meeting-status:empty { display: none; }
.meeting-controls > .feedback { grid-column: 1 / -1; }
.player-add { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .55rem; }
.player-list { list-style: none; padding: 0; margin: .85rem 0 0; }
.player-list li { border-top: 1px solid var(--line); padding: .65rem 0; overflow-wrap: anywhere; }
.player-list li:last-child { padding-bottom: 0; }
.player-list li p { margin-top: .1rem; }
.player-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: .25rem .65rem; align-items: center; }
.player-row .remove { grid-column: 2; justify-self: start; padding-left: 0; }
.overview-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: .35rem .65rem; }
.reset-option { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: 1rem; }
.reset-option .button, #import-round, #import-clues { margin-top: .8rem; }
#import-round { margin-bottom: 1rem; }

.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -2px; }
table { width: 100%; min-width: 690px; border-collapse: collapse; text-align: left; font-size: .95rem; }
th, td { padding: .74rem .85rem; vertical-align: top; }
th { color: var(--muted); background: #302232; font-size: .82rem; }
td { border-top: 1px solid var(--line); overflow-wrap: anywhere; }
td:nth-child(2) { font-weight: 700; }
td:nth-child(5) { min-width: 11rem; white-space: pre-wrap; }
td time { white-space: nowrap; }
.badge { display: inline-block; border: 1px solid #78536a; border-radius: 6px; padding: .16rem .48rem; color: #ffd0da; font-size: .82rem; }
.table-note { margin: 0; padding: .85rem; }

dialog {
  width: min(32rem, calc(100% - 1.5rem));
  max-height: calc(100% - 1.5rem);
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
}
dialog::backdrop { background: #0a070bc9; }
footer { border-top: 1px solid var(--line); color: var(--muted); font-size: .87rem; }
footer .wrap { display: flex; justify-content: space-between; gap: 1rem; padding-block: 1.15rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

@media (max-width: 700px) {
  .wrap { width: calc(100% - 1.6rem); }
  .bar { align-items: flex-start; flex-direction: column; gap: .4rem; padding-block: .65rem; }
  nav { gap: .1rem .8rem; }
  nav a { font-size: .84rem; }
  main { padding-block: 1.7rem 2.8rem; }
  .page-heading { align-items: flex-start; flex-direction: column; gap: .8rem; margin-bottom: 1.1rem; }
  .spuren-hero { justify-content: end; min-height: 14rem; }
  .spuren-hero::before {
    background: linear-gradient(90deg, #211423ee, #2114237a 65%, transparent),
                linear-gradient(0deg, #211423e0, transparent 78%);
  }
  .spuren-hero p { max-width: 26ch; }
  .cards, .rules, .meeting-controls, .meeting-layout { grid-template-columns: 1fr; }
  .card { padding: 1rem; }
  .table-card { padding: 0; }
}
