/* ============================================================
   winter break minecraft server — round 3: one short page.
   calm craft look kept: clean system sans, 6px corners, thin
   borders, soft shadow, grass-green primary — now with the
   real game textures (dirt band, grass row, pixelated title,
   item icons, framed map). pure css, no web fonts.
   ============================================================ */

/* ---------- tokens ---------- */
:root {
  color-scheme: light dark;

  --bg: #f5f5f1;
  --panel: #ffffff;
  --chipbg: #f1f1ea;
  --fieldbg: #ffffff;
  --ink: #1e241c;
  --ink-soft: #5d6558;
  --line: #d9dbd2;
  --line-strong: #c2c6b9;
  --focus: #b45309;

  --grass: #5d9c33;
  --grass-strong: #4c8c27;
  --grass-deep: #3a6b1d;
  --on-green: #ffffff;
  --green-bg: #edf4e3;
  --green-line: #cfe0b7;
  --green-ink: #3a6b1d;
  --dirt: #9c7a52;
  --dirt-deep: #7c5f3e;
  --frame: #d6be96;

  --red-bg: #fbeae5;
  --red-ink: #9a3412;
  --red-line: #e5c3b7;

  --shadow: 0 1px 2px rgba(23, 28, 20, 0.06), 0 4px 14px rgba(23, 28, 20, 0.06);
  --shadow-pop: 0 2px 6px rgba(23, 28, 20, 0.10), 0 10px 26px rgba(23, 28, 20, 0.10);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #191b19;
    --panel: #242724;
    --chipbg: #2a2e2a;
    --fieldbg: #1f221f;
    --ink: #e8eae3;
    --ink-soft: #a3aa9c;
    --line: #363b36;
    --line-strong: #4a504a;
    --focus: #ffd84d;

    --grass: #6cbf3e;
    --grass-strong: #79c74d;
    --grass-deep: #8bd45f;
    --on-green: #14240c;
    --green-bg: #26311f;
    --green-line: #3d5230;
    --green-ink: #9ada70;
    --dirt: #6f573a;
    --dirt-deep: #55412a;
    --frame: #8a7350;

    --red-bg: #33211b;
    --red-ink: #f0b3a0;
    --red-line: #55342a;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 14px rgba(0, 0, 0, 0.28);
    --shadow-pop: 0 2px 6px rgba(0, 0, 0, 0.45), 0 10px 26px rgba(0, 0, 0, 0.4);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  overflow-x: clip;
}
[hidden] { display: none !important; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul { padding: 0; list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.pix { image-rendering: pixelated; }

.sr-only {
  position: absolute; width: 1px; height: 1px; margin: -1px;
  padding: 0; overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.skip { position: absolute; left: -9999px; top: 8px; }
.skip:focus {
  position: fixed; left: 16px; top: 14px; z-index: 70;
  background: var(--panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: var(--shadow-pop);
  padding: 10px 14px; font-weight: 600;
}

/* ---------- dirt-and-grass header band ---------- */
.band {
  position: relative;
  background-color: var(--dirt-deep);
  background-image: url(assets/dirt.png);
  background-size: 32px 32px;
  image-rendering: pixelated;
  border-bottom: 3px solid rgba(0, 0, 0, 0.28);
  padding: 38px 12px 8px;
  text-align: center;
}
.band::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 32px;
  background-image: url(assets/grass_block_side.png);
  background-size: 32px 32px;
  background-repeat: repeat-x;
  image-rendering: pixelated;
}
.band .title { display: block; margin: 0 auto; width: 312px; height: 27px; max-width: 100%; }
.band .dates { display: block; margin: 5px auto 0; width: 309px; height: 27px; max-width: 100%; }

/* ---------- page frame ---------- */
.app {
  max-width: 620px;
  margin: 0 auto;
  padding: 10px 14px calc(12px + env(safe-area-inset-bottom));
}
.noscript {
  border: 1px solid var(--red-line);
  border-left: 4px solid var(--red-ink);
  border-radius: 6px;
  background: var(--red-bg);
  color: var(--red-ink);
  padding: 10px 12px;
  font-weight: 600;
  margin: 0 0 10px;
}

/* ---------- shared cards ---------- */
.card, .done {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 11px 13px;
  margin: 0 0 8px;
}

/* ---------- the sign-up form ---------- */
label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 3px;
  line-height: 1.3;
}
.field + .field { margin-top: 9px; }
input[type="text"] {
  width: 100%;
  font: inherit;
  font-weight: 500;
  color: var(--ink);
  background: var(--fieldbg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 11px;
  min-height: 44px;
}
input[type="text"]::placeholder { color: var(--ink-soft); opacity: 0.7; }

.eds { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ed {
  min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 6px 4px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--chipbg);
  font-weight: 600; font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.ed:hover { border-color: var(--grass); }
.ed:active { background: var(--green-bg); border-color: var(--grass); }
.ed:disabled { opacity: 0.5; cursor: default; }

/* ---------- the "you're in" block ---------- */
.done {
  background: var(--green-bg);
  border-color: var(--green-line);
}
.done h2 {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
}
.done h2 span { color: var(--green-ink); }

button.big {
  display: block;
  width: 100%;
  font-weight: 600; font-size: 0.98rem;
  color: var(--on-green); background: var(--grass-strong);
  border: 1px solid transparent;
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 9px 16px;
  min-height: 44px;
  margin-top: 8px;
  cursor: pointer;
  transition: background-color 0.12s;
}
button.big:hover { background: var(--grass-deep); }
button.big:active { background: var(--grass-deep); box-shadow: none; }

.status {
  font-size: 0.8rem; font-weight: 600; color: var(--green-ink);
  margin: 5px 0 0; line-height: 1.3;
}
.nostore {
  font-size: 0.8rem; font-weight: 600; color: var(--red-ink);
  margin: 6px 0 0;
}

.mcrow { margin-top: 9px; border-top: 1px solid var(--green-line); padding-top: 9px; }
button.mini {
  font-weight: 600; font-size: 0.84rem;
  color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: var(--shadow);
  padding: 6px 12px; min-height: 38px;
  cursor: pointer;
  transition: border-color 0.12s, background-color 0.12s;
}
button.mini:hover { border-color: var(--grass); }
button.mini:active { background: var(--chipbg); box-shadow: none; }
button.who-else {
  display: block;
  margin: 7px auto 0;
  min-height: 32px;
  padding: 6px 12px;
  background: none; border: 0;
  border-radius: 6px;
  color: var(--ink-soft);
  font-size: 0.8rem; font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
.mcfields { margin-top: 9px; }
.mcfields .grow { display: flex; gap: 8px; align-items: stretch; }
.mcfields input { flex: 1 1 auto; min-width: 0; min-height: 40px; }
.mcfields .grow button.mini { flex: none; }

/* ---------- events: header line + 3x2 tile grid ---------- */
.events { margin: 2px 0 8px; }
.ev-head { margin: 0 0 7px; }
.ev-head button {
  display: block; width: 100%;
  text-align: left;
  background: none; border: 0; padding: 1px 0;
  color: var(--ink-soft);
  font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.03em; line-height: 1.3;
  cursor: pointer;
}
.ev-head button:hover { color: var(--ink); }
.evfail {
  color: var(--red-ink); font-weight: 500; font-size: 0.84rem;
  margin: 0 0 8px;
}

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 7px; }
.tile {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  width: 100%;
  padding: 6px 3px 5px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s;
}
.tile img { width: 32px; height: 32px; }
.tile .tname { font-size: 0.78rem; font-weight: 600; line-height: 1.25; }
.tile .tdate { font-size: 0.7rem; font-weight: 500; line-height: 1.25; color: var(--ink-soft); }
.tile:hover { border-color: var(--grass); }
.tile.on {
  background: var(--green-bg);
  border-color: var(--grass-strong);
}
.tile.on .tname { color: var(--green-ink); }
.tile.on::after {
  content: "\2713";
  position: absolute; top: 2px; right: 5px;
  font-size: 0.72rem; font-weight: 700;
  color: var(--green-ink);
}

/* ---------- spawn map + seed ---------- */
.maprow { display: flex; gap: 12px; align-items: center; margin: 0 0 8px; }
button.mapthumb {
  position: relative; flex: none;
  width: 132px;
  padding: 7px;
  background-color: var(--frame);
  background-image: url(assets/map_frame.png);
  background-size: 100% 100%;
  image-rendering: pixelated;
  border: 0; border-radius: 4px;
  box-shadow: var(--shadow);
  cursor: pointer;
  line-height: 0;
}
.mapinner {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.mapinner .mapimg {
  display: block;
  width: 100%; height: 100%;
  object-fit: cover;
  image-rendering: pixelated;
}
.markthumb {
  position: absolute;
  transform: translate(-50%, -50%);
  line-height: 0;
}
.markthumb img { width: 8px; height: 8px; image-rendering: pixelated; }
.mapsoon {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(18, 22, 16, 0.62);
  color: #fff; font-weight: 700; font-size: 0.78rem;
  line-height: 1.3;
}
.mapside {
  flex: 1 1 auto; min-width: 0;
  display: flex; flex-direction: column; gap: 8px;
  align-items: flex-start;
}
.seedline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#seed { font-weight: 600; font-size: 0.88rem; overflow-wrap: anywhere; }
button.tiny { min-height: 32px; padding: 4px 10px; font-size: 0.76rem; }

/* ---------- discord + who's in row ---------- */
.linkrow { display: flex; gap: 8px; margin: 0 0 8px; }
.big-link {
  flex: 1 1 0; min-width: 0;
  min-height: 44px;
  display: flex; align-items: center; justify-content: center;
  padding: 7px 10px;
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  box-shadow: var(--shadow);
  color: var(--ink);
  font-weight: 600; font-size: 0.9rem;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.12s;
}
.big-link:hover { border-color: var(--grass); }

/* ---------- footer ---------- */
.foot {
  margin-top: 4px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.62rem;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.foot p + p { margin-top: 3px; }

/* ---------- bottom sheet (events, who's in, big map) ---------- */
.scrim {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(12, 16, 10, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.sheet {
  position: relative;
  width: min(100%, 620px);
  max-height: 82vh;
  max-height: 82dvh;
  overflow-y: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
  box-shadow: var(--shadow-pop);
  padding: 13px 16px calc(16px + env(safe-area-inset-bottom));
}
.sheet-x {
  position: absolute; top: 10px; right: 12px;
  min-height: 32px; padding: 4px 12px;
  background: var(--chipbg);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 0.8rem; font-weight: 600;
  cursor: pointer;
}
.sheet-h {
  font-size: 1.08rem; font-weight: 700; letter-spacing: -0.01em;
  margin: 0 72px 7px 0;
  line-height: 1.25;
}
.sheet-body .when {
  font-weight: 600; color: var(--ink-soft);
  font-size: 0.9rem; margin: 0 0 8px;
}

.times { display: flex; flex-wrap: wrap; gap: 8px; }
.times li {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--fieldbg);
  padding: 4px 10px 5px;
  min-width: 96px;
}
.times b {
  display: block;
  font-size: 0.64rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-soft);
}
.times span { font-weight: 600; font-size: 0.92rem; }

.ev-meta { margin-top: 9px; font-size: 0.82rem; font-weight: 500; color: var(--ink-soft); }
.ev-meta .cnt { color: var(--ink); font-weight: 600; }

.prereqs { margin-top: 9px; }
.prereqs h4 {
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.05em;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px;
}
.prereqs ul { list-style: disc; padding-left: 1.3em; }
.prereqs li { font-size: 0.87rem; padding: 2px 0; }
.prereqs li::marker { color: var(--grass-strong); }

/* the join toggle inside the event sheet */
.imin {
  margin-top: 11px;
  width: 100%;
  display: flex; align-items: center; gap: 11px;
  min-height: 48px;
  border: 1px solid var(--grass-strong);
  border-radius: 6px;
  background: var(--panel);
  color: var(--green-ink);
  padding: 8px 12px;
  font-weight: 600; font-size: 0.92rem;
  cursor: pointer;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.imin .box {
  width: 22px; height: 22px; flex: none;
  border: 2px solid var(--line-strong);
  border-radius: 4px;
  background: var(--fieldbg);
  position: relative;
}
.imin .box::after {
  content: "";
  position: absolute; left: 4px; top: 4px;
  width: 8px; height: 5px;
  border-left: 3px solid #fff; border-bottom: 3px solid #fff;
  transform: rotate(-45deg);
  opacity: 0;
}
.imin[aria-pressed="true"] {
  background: var(--grass-strong);
  border-color: var(--grass-strong);
  color: var(--on-green);
}
.imin[aria-pressed="true"] .box {
  background: var(--grass-strong);
  border-color: var(--on-green);
}
.imin[aria-pressed="true"] .box::after { opacity: 1; }

/* who's in sheet */
.edchips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 10px; }
.edchips li {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--chipbg);
  padding: 3px 11px;
  font-weight: 500; font-size: 0.84rem;
}
.names { color: var(--ink-soft); overflow-wrap: anywhere; }
.poffline { color: var(--red-ink); font-weight: 500; font-size: 0.88rem; margin-top: 10px; }

/* big map sheet */
.mapbig {
  width: min(100%, 360px);
  margin: 4px auto 0;
  padding: 8px;
  background-color: var(--frame);
  background-image: url(assets/map_frame.png);
  background-size: 100% 100%;
  image-rendering: pixelated;
  border-radius: 4px;
}
.marker {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-width: 44px; min-height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer; font: inherit;
}
.marker.on .mlabel, .marker:hover .mlabel { background: var(--grass-deep); color: #fff; }
.marker:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; border-radius: 6px; }
.marker img { width: 16px; height: 16px; image-rendering: pixelated; }
.mlabel {
  font-size: 0.62rem; font-weight: 700;
  color: #fff; background: rgba(10, 14, 8, 0.72);
  padding: 1px 5px; border-radius: 4px;
  white-space: nowrap; line-height: 1.4;
}
.mapseed { text-align: center; font-weight: 600; font-size: 0.85rem; margin-top: 10px; }

/* ---------- error banner ---------- */
.err {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom));
  left: 50%; transform: translateX(-50%);
  width: min(100% - 24px, 588px);
  background: var(--red-bg); color: var(--red-ink);
  border: 1px solid var(--red-line);
  border-left: 4px solid var(--red-ink);
  border-radius: 6px;
  box-shadow: var(--shadow-pop);
  padding: 10px 12px;
  font-weight: 500; font-size: 0.88rem;
  z-index: 60;
}

/* ---------- clipboard fallback input ---------- */
.copyhack { position: fixed; left: -9999px; top: 0; opacity: 0; }

/* ---------- responsive polish + motion ---------- */
@media (min-width: 760px) {
  .app { padding-top: 16px; }
  .card, .done { padding: 14px 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Round 4: one quiet sign-up and a calendar list. */
.app { padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); }
.card, .done { background: transparent; border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0 0 8px; }
.field label { font-size: 16px; letter-spacing: 0; text-transform: none; margin-bottom: 2px; }
.field + .field { margin-top: 0; }
#name { min-height: 44px; padding: 7px 10px; }
.signup-options { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.eds { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--chipbg); }
.ed { min-height: 40px; padding: 5px 10px; border: 0; border-radius: 999px; background: transparent; font-size: 14px; font-weight: 500; }
.ed:hover { border-color: transparent; }
.ed[aria-pressed="true"] { color: var(--green-ink); background: var(--green-bg); font-weight: 600; }
button.big.join { width: auto; min-width: 96px; min-height: 44px; margin: 0 0 0 auto; padding: 7px 16px; box-shadow: none; font-size: 16px; }
.events { margin: 2px 0 7px; }
.ev-head { margin: 0 0 2px; }
.ev-head button { min-height: 28px; color: var(--ink-soft); font-size: 13px; letter-spacing: 0; font-weight: 500; }
.tiles { display: block; }
.tile { display: grid; grid-template-columns: 32px 82px minmax(0, 1fr) 48px 18px; align-items: center; gap: 6px; min-height: 36px; padding: 3px 0; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: transparent; box-shadow: none; text-align: left; }
.tile:first-child { border-top: 1px solid var(--line); }
.tile img { width: 26px; height: 26px; }
.tile .tdate { color: var(--ink); font-size: 16px; font-weight: 700; line-height: 1.2; }
.tile .tname { font-size: 16px; font-weight: 400; line-height: 1.2; }
.event-time { color: var(--ink-soft); font-size: 14px; text-align: right; white-space: nowrap; }
.tile:hover, .tile.on { background: transparent; }
.tile.on .tname { color: var(--ink); }
.joined-mark { color: var(--green-ink); font-size: 16px; font-weight: 700; text-align: right; visibility: hidden; }
.tile.on .joined-mark { visibility: visible; }
.tile.on::after { content: none; }
.maprow { justify-content: center; gap: 12px; margin: 8px 0; }
button.mapthumb { width: 88px; padding: 5px; box-shadow: none; }
.mapside { flex: 0 1 auto; gap: 2px; }
.map-intro { font-size: 16px; line-height: 1.3; }
.seedline { gap: 6px; flex-wrap: nowrap; }
#seed { font-size: 16px; }
button.tiny { min-height: 44px; padding: 4px 8px; font-size: 14px; }
.linkrow { gap: 16px; margin: 0 0 4px; justify-content: center; }
.big-link { flex: 0 1 auto; min-height: 44px; padding: 5px 8px; border: 0; background: transparent; box-shadow: none; color: var(--ink-soft); text-decoration: underline; font-size: 16px; font-weight: 500; }
.big-link:hover { border-color: transparent; color: var(--ink); }
.foot { margin-top: 2px; font-size: 14px; line-height: 1.25; letter-spacing: 0; }
.foot p + p { margin-top: 4px; font-size: 13px; }
.foot a { color: inherit; }
/* Round 2: clearer selection and reliable mobile tap targets. */
.ed { min-height: 44px; white-space: nowrap; }
.ed[aria-pressed="true"] {
  color: var(--green-ink);
  background: var(--panel);
  border: 1px solid var(--grass-strong);
  box-shadow: 0 1px 2px rgba(0,0,0,.12);
}
.ev-head button { min-height: 44px; padding: 6px 0; }
.tile {
  grid-template-columns: 28px minmax(72px, max-content) minmax(0, 1fr) minmax(48px, max-content) 18px;
  min-height: 44px;
  padding: 4px 0;
}
.tile .tdate, .event-time { white-space: nowrap; }
.tile .tdate { min-width: 72px; }
.event-time { min-width: 48px; }
@media (max-width: 359px) {
  .signup-options { flex-wrap: wrap; }
  .eds { width: 100%; }
  .ed { flex: 1 1 0; padding-left: 4px; padding-right: 4px; }
  button.big.join { width: 100%; margin: 0; }
}
@media (prefers-color-scheme: dark) {
  .ed[aria-pressed="true"] { background: #414941; border-color: #9ada70; }
}
@media (max-height: 650px) {
  .band { padding-top: 35px; padding-bottom: 5px; }
  .band::before { height: 29px; }
  .app { padding-top: 5px; }
  .maprow { margin: 4px 0; }
  .tile { min-height: 44px; }
}

/* add to calendar, in the event sheet */
.calrow { display: flex; align-items: center; gap: 8px; margin: 10px 0 0; font-size: 0.84rem; color: var(--ink-soft); }
.calrow span { margin-right: auto; }
a.mini.cal {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 0.84rem; text-decoration: none;
  color: var(--ink); background: var(--panel);
  border: 1px solid var(--line-strong); border-radius: 6px;
  padding: 6px 12px; min-height: 44px; min-width: 64px;
}
a.mini.cal:hover { border-color: var(--grass); }

/* map: tapped place */
.place { margin: 10px 2px 0; min-height: 84px; }
.place p { margin: 0 0 4px; }
.place-h { font-weight: 700; }
.place-where, .place-by { color: var(--ink-soft); font-size: 0.9rem; }
button.place-ev.link {
  display: block; width: 100%; text-align: left; font: inherit; font-weight: 600;
  color: var(--green-ink); background: var(--green-bg); border: 1px solid var(--green-line);
  border-radius: 6px; padding: 8px 10px; min-height: 44px; margin: 6px 0 4px; cursor: pointer;
}
.extras { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 8px; }
button.mini.nether { min-height: 44px; }
.marker.edge-r { align-items: flex-end; transform: translate(calc(-100% + 8px), -50%); }
.marker.edge-l { align-items: flex-start; transform: translate(-8px, -50%); }
.marker.lab-up { flex-direction: column-reverse; }

/* 12/5 fewer interactions */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.joinrow { display: flex; gap: 8px; align-items: stretch; }
.joinrow input { flex: 1 1 auto; min-width: 0; min-height: 48px; margin: 0; }
.joinrow button.big.join { flex: 0 0 auto; width: auto; min-width: 104px; min-height: 48px; margin: 0; }
.tile { grid-template-columns: 30px minmax(0, 1fr) auto 18px; gap: 10px; min-height: 52px; padding: 5px 0; }
.tile img { width: 28px; height: 28px; }
.twhat, .twhen { display: flex; flex-direction: column; min-width: 0; }
.twhen { align-items: flex-end; }
.tile .tname { font-size: 16px; font-weight: 600; line-height: 1.2; }
.twhere { font-size: 13px; color: var(--ink-soft); line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .tdate { font-size: 15px; font-weight: 600; min-width: 0; line-height: 1.2; }
.tile .event-time { font-size: 13px; min-width: 0; line-height: 1.25; }
.tile.on .tname { color: var(--green-ink); }
button.mapcard {
  display: flex; align-items: center; gap: 12px; width: 100%; margin: 12px 0 6px; padding: 8px 12px 8px 8px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: 10px; box-shadow: var(--shadow);
  color: var(--ink); font: inherit; text-align: left; cursor: pointer; min-height: 88px;
}
button.mapcard:hover { border-color: var(--grass); }
button.mapcard .mapinner { position: relative; flex: 0 0 72px; width: 72px; height: 72px; border-radius: 6px; overflow: hidden; }
button.mapcard .mapimg { width: 100%; height: 100%; display: block; }
.pins { position: absolute; inset: 0; }
.pin { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #fff; border: 2px solid #b91c1c; animation: pinpulse 1.8s ease-in-out infinite; }
.pin.home { background: #b91c1c; }
@keyframes pinpulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .pin { animation: none; } }
.maptext { display: flex; flex-direction: column; flex: 1 1 auto; gap: 2px; }
.maptext b { font-size: 16px; }
.maptext span { font-size: 14px; color: var(--ink-soft); }
.chev { font-size: 28px; color: var(--ink-soft); line-height: 1; }
/* done view: two compact rows */
.done:not([hidden]) { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 10px; row-gap: 6px; }
.done h2 { grid-column: 1; margin: 0; }
.done #share { grid-column: 2; width: auto; min-width: 104px; min-height: 44px; margin: 0; padding: 7px 18px; }
.done .status, .done .nostore { grid-column: 1 / -1; margin: 0; }
.done .status:empty { display: none; }
.done .mcrow { grid-column: 1; margin: 0; padding: 0; border: 0; }
.done .mcrow:has(.mcfields:not([hidden])) { grid-column: 1 / -1; }
.done button.who-else { grid-column: 2; margin: 0; text-align: right; }
.done #share { width: auto; justify-self: end; }
.done .mcrow { grid-column: 1; }
.done button.mini { white-space: nowrap; }
.done button.who-else { grid-column: 2; justify-self: end; white-space: nowrap; }

/* ---------- board page ---------- */
.board-band { padding: 38px 14px 12px; }
.board-band h1 { color: #fff; font-size: 1.25rem; line-height: 1.3; font-weight: 700; }
.board-back { position: absolute; left: 14px; top: 34px; min-height: 44px; display: flex; align-items: center; color: #fff; font-weight: 600; text-decoration: none; }
.board-app { max-width: 620px; margin: 0 auto; padding: 10px 14px calc(20px + env(safe-area-inset-bottom)); }
#sample-note { padding: 9px 11px; margin-bottom: 10px; border: 1px solid var(--green-line); border-radius: 6px; background: var(--green-bg); color: var(--green-ink); font-size: .86rem; line-height: 1.35; }
#board-error { padding: 12px; color: var(--red-ink); background: var(--red-bg); border: 1px solid var(--red-line); border-radius: 6px; }
.board-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 3px; margin-bottom: 11px; border-radius: 8px; background: var(--chipbg); }
.board-tabs button { min-height: 44px; border: 1px solid transparent; border-radius: 6px; background: transparent; font-weight: 600; cursor: pointer; }
.board-tabs button[aria-selected="true"] { background: var(--panel); border-color: var(--line); box-shadow: var(--shadow); color: var(--green-ink); }
.bingo-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.bingo-square { position: relative; min-width: 0; min-height: 70px; padding: 14px 3px 5px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 5px; text-align: center; cursor: pointer; overflow-wrap: anywhere; }
.bingo-square.has-it { background: var(--green-bg); border-color: var(--green-line); }
.bingo-square .square-title { font-size: clamp(.61rem, 2.7vw, .75rem); line-height: 1.15; font-weight: 650; }
.bingo-square .square-count { color: var(--ink-soft); font-size: .58rem; line-height: 1.05; }
.bingo-square .first-player { position: absolute; top: 1px; right: 2px; max-width: 95%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: var(--green-ink); font-size: .48rem; line-height: 1.1; }
.closest { margin-top: 15px; }
.closest h2, .leader-title { font-size: 1rem; line-height: 1.3; margin-bottom: 6px; }
#closest-list { display: grid; gap: 4px; }
#closest-list li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--line); font-size: .85rem; }
#closest-list .bingo-winner { color: var(--green-ink); font-weight: 700; }
.bingo-rule { margin-top: 9px; color: var(--ink-soft); font-size: .82rem; line-height: 1.35; }
.category-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.category-chip { min-height: 44px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--ink-soft); font-size: .8rem; font-weight: 600; cursor: pointer; }
.category-chip[aria-pressed="true"] { color: var(--green-ink); background: var(--green-bg); border-color: var(--grass-strong); }
.leader-title { margin: 0 0 3px; }
.leader-list { counter-reset: rank; }
.leader-list li { display: grid; grid-template-columns: 30px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 44px; padding: 4px 2px; border-bottom: 1px solid var(--line); }
.leader-rank { font-weight: 700; color: var(--ink-soft); text-align: center; }
.leader-rank.rank-1 { color: #b8860b; }
.leader-rank.rank-2 { color: #78828a; }
.leader-rank.rank-3 { color: #a05a2c; }
.leader-person { min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.edition-tag { display: block; color: var(--ink-soft); font-size: .72rem; font-weight: 400; }
.leader-value { text-align: right; font-variant-numeric: tabular-nums; font-weight: 650; }
.leader-updated { margin-top: 14px; color: var(--ink-soft); font-size: .78rem; }
.sheet-body .square-hint { margin: 0 0 12px; color: var(--ink-soft); }
.square-holders { display: grid; gap: 7px; }
.square-holders li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.square-holders time { color: var(--ink-soft); text-align: right; font-size: .8rem; }
@media (min-width: 600px) { .bingo-grid { gap: 7px; } .bingo-square { min-height: 88px; padding: 8px; } .bingo-square .square-title { font-size: .82rem; } }
