/* ---------- Tokens ---------- */
:root{
  --bg: rgb(250,220,80);
  --ink: #000;
  --muted: #3a3300;
  --line: rgba(0,0,0,.3);
  --accent: #000;
  --accent-ink: rgb(250,220,80);
}
*{ box-sizing: border-box; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.6 "Instrument Sans", system-ui, sans-serif;
}

/* ---------- Page frame ---------- */
main{
  max-width: 640px;
  margin: 0 auto;
  padding: 4rem 1.5rem 5rem;
}
@media (min-width: 900px){
  /* Keep at least one column's width (490px) plus its gap free on the
     sides, split evenly, so an extra column only appears once there's
     genuinely room for it. Must match MIN_COLUMN_WIDTH/COLUMN_GAP in
     js/config.js (490 + 24, doubled for both sides = 514). */
  main{ max-width: min(2200px, calc(100vw - 514px)); }
}

/* ---------- Header ---------- */
.head{ max-width: 60ch; margin: 0 auto 3rem; }
h1{
  font: 600 clamp(2.9rem, 9.6vw, 4.3rem)/1.05 Fraunces, Georgia, serif;
  letter-spacing: -.02em;
  margin: 0 0 1.25rem;
  text-align: center;
}
.intro{ margin: 0; }
.intro p{ margin: 0 0 1rem; }

/* ---------- Room columns (packed by layout.js) ---------- */
#list{ display: flex; align-items: flex-start; gap: 1.5rem; }
.col{ display: flex; flex-direction: column; gap: 1.5rem; flex: 1; min-width: 0; }

.room{
  font-size: 1rem;
  margin: 0;
  padding: 1.25em 1.5em .4em;
  border: 2px solid #000;
  border-radius: 18px;
  background: rgba(255,255,255,.4);
  transition: font-size .3s;
}
.room.done{ font-size: .75rem; margin: 1rem 0; } /* collapses once every item is taken */
.room-head{
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1em;
  margin-bottom: .85em;
}
h2{
  font: 600 2em/1.1 Fraunces, Georgia, serif;
  letter-spacing: -.01em;
  margin: 0;
}
.count{ color: var(--muted); font-size: .85em; white-space: nowrap; }
.room-blurb{ color: var(--muted); font-size: .95em; margin: 0 0 .8em; white-space: pre-line; }

/* Static text block under the list. Reuses the room card look, but centred
   at the same width as the header so it doesn't stretch across a wide page. */
.closing{ max-width: 60ch; margin: 1.5rem auto 0; }
.closing h2{ margin-bottom: .85em; }
.closing p{ margin: 0 0 1em; }

/* ---------- Item rows ---------- */
ul{ list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
li{ border-bottom: 1px solid var(--line); padding: 1.1em 0; }
li:last-child{ border-bottom: 0; }
.row{ display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.name{ font: 600 1.25em/1.3 Fraunces, Georgia, serif; }
.note{ color: var(--muted); font-size: .95em; margin: .15em 0 0; white-space: pre-line; }
.link{ display: inline-block; margin-top: .2em; font-size: .9em; color: var(--accent); }
.tag{ color: var(--muted); font-size: .95em; white-space: nowrap; }
.taken .name, .taken .note{ text-decoration: line-through; color: var(--muted); font-weight: 400; }
/* Taken rows fade back, shrink slightly and nearly lose their padding, so
   the items still available stand out and stay easy to find. */
.taken{ padding: .1em 0; opacity: .65; font-size: .85em; }
/* A completed room has already shrunk the whole card, so its rows stay at
   the card's size rather than shrinking a second time. */
.room.done .taken{ font-size: 1em; }
/* A completed room's title is struck through and muted, like its items. */
.room.done h2{ text-decoration: line-through; color: var(--muted); }

/* ---------- Buttons & the claim form ---------- */
button{
  font: 500 .95rem "Instrument Sans", system-ui, sans-serif;
  border-radius: 999px;
  padding: .5rem 1.1rem;
  cursor: pointer;
  white-space: nowrap;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
}
button:hover{ background: var(--accent); color: var(--accent-ink); }
button.solid{ background: var(--accent); color: var(--accent-ink); }
button:focus-visible, input:focus-visible, textarea:focus-visible{
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
form{ display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .9rem; }
input, textarea{
  flex: 1 1 200px;
  font: inherit;
  font-size: .95rem;
  padding: .5rem .8rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
}
textarea{ flex-basis: 100%; resize: vertical; min-height: 4.5rem; }

/* ---------- Status line & footer ---------- */
.msg{ color: var(--muted); font-size: .9rem; margin-top: .5rem; }
footer{ margin-top: 2.5rem; color: var(--muted); font-size: .95rem; }
