:root {
  color-scheme: dark;
  --bg: #101b1b;
  --panel: #172626;
  --ink: #eee7d6;
  --muted: #a5b1a8;
  --gold: #d7b578;
  --line: #ffffff18;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background:
    radial-gradient(ellipse at 20% 0%, #263a33, transparent 55%), var(--bg);
  color: var(--ink);
  font:
    16px/1.5 system-ui,
    sans-serif;
}
header {
  max-width: 1440px;
  margin: auto;
  padding: 28px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
a {
  color: var(--gold);
}
.brand {
  text-decoration: none;
  font: 36px Georgia;
  letter-spacing: 7px;
  color: var(--ink);
}
.brand span {
  display: block;
  font: 9px system-ui;
  letter-spacing: 5px;
  color: var(--gold);
}
.tag,
.muted {
  color: var(--muted);
  font-size: 14px;
}
main {
  max-width: 1320px;
  margin: auto;
  padding: 35px 4%;
}
h1,
h2 {
  font-family: Georgia, serif;
  font-weight: 400;
  line-height: 1.1;
}
h1 {
  font-size: clamp(48px, 6vw, 84px);
  margin: 22px 0;
}
h2 {
  font-size: 28px;
  margin: 10px 0 20px;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--gold);
  font-weight: 700;
}
.welcome {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 80px;
  align-items: center;
  padding: 40px 0 65px;
}
.lede {
  max-width: 400px;
  font-size: 18px;
  color: var(--muted);
}
form,
.decision {
  background: var(--panel);
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 12px;
}
label {
  display: block;
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0;
}
input,
select {
  display: block;
  width: 100%;
  padding: 14px;
  background: #101b1b;
  border: 1px solid #8e9e8d55;
  color: var(--ink);
  border-radius: 6px;
  font: 16px system-ui;
  margin-top: 7px;
}
button {
  cursor: pointer;
  background: #283a33;
  color: var(--ink);
  border: 1px solid #7f998355;
  padding: 13px 20px;
  border-radius: 6px;
  font: 600 14px system-ui;
  transition: background 0.15s;
}
button:hover {
  background: #3b5143;
}
button:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
button.primary {
  background: var(--gold);
  color: #19221d;
  border-color: var(--gold);
}
form button {
  width: 100%;
  margin: 12px 0;
}
.quiet {
  background: transparent;
}
.danger {
  border-color: #bc7976;
  color: #f2b9ad;
}
.resume {
  display: block;
  margin-top: 8px;
  font-size: 14px;
}
.decor {
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--gold);
  margin-top: 35px;
  font-size: 10px;
  letter-spacing: 2px;
}
.crest {
  width: 70px;
  height: 90px;
  border: 1px solid var(--gold);
  display: grid;
  place-items: center;
  font: 40px Georgia;
  border-radius: 30px 30px 8px 8px;
}
.roomhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.roomhead h2 {
  margin-bottom: 0;
}
.table-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 30px;
}
.players {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}
.player {
  padding: 14px;
  background: #ffffff03;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.player.active {
  border-color: var(--gold);
}
.player.out {
  opacity: 0.55;
}
.playerhead {
  display: flex;
  justify-content: space-between;
  gap: 5px;
  font-size: 13px;
  margin-bottom: 14px;
  overflow-wrap: anywhere;
}
.you {
  font-size: 8px;
  color: var(--gold);
}
.coins {
  color: var(--gold);
  white-space: nowrap;
}
.cards {
  display: flex;
  gap: 8px;
}
.card {
  min-width: 0;
  flex: 1;
  min-height: 130px;
  background: repeating-linear-gradient(
    45deg,
    #20392f,
    #20392f 8px,
    #233c32 8px,
    #233c32 9px
  );
  border: 1px solid #7e987655;
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  padding: 8px;
}
.card.known {
  background: #e7ddc4;
  color: #263c30;
}
.monogram {
  font: 36px Georgia;
  margin-bottom: 12px;
  color: var(--gold);
}
.known .monogram {
  color: #466348;
}
.card strong {
  font: 12px Georgia;
}
.card small {
  font: 7px system-ui;
  letter-spacing: 1px;
  margin-top: 10px;
}
.card.revealed {
  background: #332827;
  color: #c0a6a0;
  border-color: #946761;
  text-decoration: line-through;
}
.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.controls > label,
.actions {
  width: 100%;
}
.actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
button small {
  display: block;
  margin-top: 5px;
  font-size: 10px;
  font-weight: 400;
  color: inherit;
  opacity: 0.7;
}
.choices {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  width: 100%;
}
.choices input {
  width: auto;
  display: inline;
  margin-right: 8px;
}
aside {
  border-left: 1px solid var(--line);
  padding-left: 25px;
}
aside h2 {
  font-size: 24px;
}
ol {
  padding: 0;
  list-style: none;
  max-height: 630px;
  overflow: auto;
}
li {
  font-size: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
}
li:first-child {
  color: var(--ink);
}
.rules {
  border-top: 1px solid var(--line);
  margin-top: 38px;
  padding: 22px 0;
  color: var(--muted);
  font-size: 14px;
}
.rules summary {
  cursor: pointer;
  color: var(--gold);
}
.reference {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.reference b {
  display: block;
  color: var(--ink);
  margin-bottom: 8px;
}
footer {
  text-align: center;
  color: var(--muted);
  font-size: 11px;
  padding: 20px 25px 35px;
}
#error:not(:empty) {
  background: #4d2d2c;
  color: #ffd6c9;
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 20px;
}
button:focus-visible,
a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
}
@media (max-width: 1000px) {
  .players {
    grid-template-columns: repeat(2, 1fr);
  }
  .welcome {
    gap: 35px;
  }
  .table-layout {
    grid-template-columns: minmax(0, 1fr) 220px;
  }
}
@media (max-width: 700px) {
  header {
    padding: 20px 5%;
  }
  .tag {
    display: none;
  }
  .welcome {
    grid-template-columns: 1fr;
    padding-top: 5px;
    gap: 25px;
  }
  .decor {
    display: none;
  }
  main {
    padding-top: 22px;
  }
  .table-layout {
    grid-template-columns: 1fr;
  }
  .players {
    gap: 10px;
  }
  .card {
    min-height: 115px;
  }
  .player {
    padding: 10px;
  }
  .decision,
  form {
    padding: 22px;
  }
  .actions {
    grid-template-columns: repeat(2, 1fr);
  }
  aside {
    border-left: 0;
    border-top: 1px solid var(--line);
    padding: 20px 0;
  }
  ol {
    max-height: 250px;
  }
  .reference {
    grid-template-columns: repeat(2, 1fr);
  }
  .roomhead h2 {
    font-size: 24px;
  }
  .roomhead button {
    padding: 12px;
    font-size: 12px;
  }
}
