:root {
  color-scheme: light;
  --sky: #ebfaff;
  --sunlight: #fff8d7;
  --paper: #fffdf4;
  --ink: #14392e;
  --deep: #103d32;
  --muted: #3b6252;
  --green: #07684c;
  --mint: #d1f8dd;
  --line: #a6cbbb;
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.45;
  color: var(--ink);
  background: var(--sky);
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  background: linear-gradient(180deg, var(--sky) 0, #f4fffd 205px, var(--sunlight) 780px);
  background-repeat: no-repeat;
  background-color: var(--sunlight);
}
button, input, select { font: inherit; }
button, input[type="checkbox"], select { cursor: pointer; }
button { color: inherit; }
button:disabled { cursor: default; }
a { color: var(--green); text-underline-offset: .19em; }
:focus-visible { outline: 3px solid #a64715; outline-offset: 3px; }
.site-chrome { padding: 4px 8px 5px; }
.masthead {
  display: grid;
  grid-template-columns: minmax(42px, 1fr) auto minmax(42px, 1fr);
  min-height: 52px;
  align-items: center;
  padding: 0 8px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  max-width: 100%;
  text-decoration: none;
  color: var(--deep);
  font-family: Rockwell, Georgia, serif;
  font-size: clamp(1.48rem, 3.1vw, 2.45rem);
  letter-spacing: -.035em;
  font-weight: 800;
  line-height: 1;
}
.brand-mark {
  display: inline-block;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  background: linear-gradient(135deg, #ffb330 0 38%, #fff4a8 38% 49%, #45be72 49% 70%, #087650 70%);
  transform: rotate(-12deg);
  border-radius: 7px 7px 7px 1px;
}
.corner {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #f9fffc;
  color: var(--deep);
  font-weight: 700;
}
.corner:hover { background: var(--mint); }
.help { justify-self: start; font-size: 1.18rem; text-decoration: none; }
.language { justify-self: end; font-size: .78rem; }
.primary-nav {
  display: flex;
  width: fit-content;
  max-width: 100%;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2px;
  margin: 0 auto;
  padding: 2px;
  border: 1px solid #b6dfce;
  border-radius: 12px;
  background: #fcfffd;
}
.primary-nav a, .directory-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .38em;
  min-height: 34px;
  padding: 5px clamp(7px, 2vw, 18px);
  border: 0;
  border-radius: 8px;
  font-size: .875rem;
  font-weight: 700;
  color: var(--deep);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
}
.primary-nav a[aria-current], .primary-nav a:hover { background: var(--mint); }
.directory-trigger { background: #fff0a5; color: #3c330f; }
.directory-trigger:hover { background: #ffe17a; }
.directory-icon {
  display: inline-block;
  width: 14px;
  height: 10px;
  border-block: 1.5px solid currentColor;
  background: linear-gradient(currentColor, currentColor) center / 100% 1.5px no-repeat;
}
#site-panel {
  width: min(444px, calc(100vw - 26px));
  max-height: calc(100dvh - 22px);
  margin: auto;
  padding: 28px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--paper);
  border-radius: 16px;
  box-shadow: 0 14px 55px #104f3c35;
}
dialog::backdrop { background: #16483d90; }
.dialog-close {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  font-size: 1.6rem;
}
#site-panel h2, .paper-page h1, .paper-page h2, .game-guide-strip h2 {
  color: var(--deep);
  font-family: Rockwell, Georgia, serif;
}
#site-panel h2 { margin: 0 26px 12px 0; }
#site-panel nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
#site-panel nav a, .directory a, .inline-nav a {
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 8px 10px;
  background: #f2fff6;
  color: var(--deep);
  border: 1px solid #b8dfc9;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 650;
}
#site-panel nav a:hover, .directory a:hover, .inline-nav a:hover { background: var(--mint); }
#site-panel nav [aria-current] { border-color: var(--green); }
.paper-page, .game-guide-strip {
  width: min(720px, calc(100% - 28px));
  margin: 18px auto 44px;
  padding: clamp(20px, 5vw, 43px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 6px 0 #acd8c034;
}
.paper-page h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); margin: 0 0 17px; line-height: 1.05; }
.paper-page h2, .game-guide-strip h2 { font-size: 1.29rem; margin: 0 0 .5em; }
.paper-page section { margin: 22px 0; }
.paper-page p { max-width: 60ch; }
.paper-page footer, .game-guide-strip nav, .inline-nav {
  display: flex;
  gap: 12px 20px;
  align-items: center;
  flex-wrap: wrap;
}
.paper-page footer { padding-top: 19px; margin-top: 22px; border-top: 1px solid #cbe2d6; }
.directory, .cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; }
.cards, .score-list { list-style: none; padding: 0; }
.cards a, .score-list a {
  display: grid;
  min-height: 83px;
  padding: 10px;
  text-decoration: none;
  color: var(--deep);
  border: 1px solid #b8dfc9;
  border-radius: 8px;
  background: #ecfff1;
}
.cards a:hover, .score-list a:hover { border-color: #267866; background: var(--mint); }
.cards span, .cards time { font-size: .8rem; color: var(--muted); }
.score-list a { margin: 8px 0; min-height: 56px; }
.pills, .preferences > div { display: flex; flex-wrap: wrap; gap: 8px; }
.pills a, .outline, .solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 1px solid var(--green);
  border-radius: 7px;
  padding: .48em .8em;
  color: var(--deep);
  background: var(--paper);
  font-weight: 650;
}
.pills a { text-decoration: none; }
.pills [aria-current], .solid { color: white; background: var(--green); }
.game-guide-strip { margin-top: 32px; scroll-margin-top: 20px; }
.game-guide-strip p { margin: .6em 0; max-width: 65ch; }
.game-guide-strip h3 { font-size: 1rem; margin: 0 0 .3em; }
.game-guide-strip section { margin: 17px 0; }
.game-guide-strip nav { border-top: 1px solid #cbe2d6; padding-top: 13px; margin-top: 20px; }
.site-footer { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px 22px; padding: 0 14px 24px; font-size: .875rem; }
.loading-board { min-height: 440px; text-align: center; padding: 40px 17px; }
.check { display: inline-flex; gap: 8px; align-items: start; }
.check input { width: 18px; height: 18px; margin-top: 2px; }
@media (max-width: 630px) {
  .masthead { min-height: 46px; padding: 0 4px; }
  .corner { width: 36px; height: 36px; }
  .brand-mark { width: 17px; height: 17px; flex-basis: 17px; }
  .primary-nav a, .directory-trigger {
    min-height: 36px;
    padding-inline: clamp(6px, 1.8vw, 12px);
    font-size: .8rem;
  }
}
@media (max-width: 345px) {
  .primary-nav a, .directory-trigger { padding-inline: 5px; font-size: .75rem; }
}
@media (max-height: 520px) and (min-width: 600px) {
  .site-chrome { padding-block: 2px 3px; }
  .masthead { min-height: 35px; }
  .brand { font-size: 1.5rem; }
  .brand-mark { width: 17px; height: 17px; flex-basis: 17px; }
  .corner { width: 32px; height: 32px; }
  .primary-nav a, .directory-trigger { min-height: 29px; padding-block: 3px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; } }
.workshop { max-width: 660px; text-align: center; }
.workshop-board {
  width: min(100%, 440px);
  margin: 16px auto 0;
  display: grid;
  grid-template-columns: repeat(var(--columns), minmax(0, 1fr));
  border: 2px solid #254b41;
  touch-action: none;
}
.workshop-tile {
  display: grid;
  place-items: center;
  width: 100%;
  padding: 0;
  aspect-ratio: 1;
  border: 1px solid #456d4c38;
  background: #a9ed98;
  color: #234239;
  font-weight: 700;
  font-size: clamp(.65rem, 3vw, 1.6rem);
}
.workshop-tile.garden { background: #ffe082; }
.workshop-tile[data-tile="~"] { background: #68d6f4; color: #094766; }
.workshop-tile[data-tile="A"], .workshop-tile[data-tile="B"] { color: #a53d23; }
.workshop-tile[data-tile="#"] { color: #70462e; background: #ecc994; }
.workshop-tile:focus-visible { z-index: 1; outline-offset: -3px; }
.workshop-tools { display: flex; gap: 7px; flex-wrap: wrap; justify-content: center; margin: 12px 0; }
.workshop-tools input { width: 54px; }
.workshop-tools [aria-pressed="true"] { background: var(--mint); border-width: 2px; }
.workshop-status { margin-inline: auto; }
#nickname-pref form { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
#nickname-pref label { display: grid; gap: 5px; }
#nickname-pref input { min-height: 42px; max-width: 100%; border: 1px solid var(--line); border-radius: 6px; padding-inline: 8px; }
#nickname-pref [role="status"] { flex-basis: 100%; margin-block: 0; }
