:root {
  color-scheme: light;
  --ink: #182923;
  --muted: #52635b;
  --brand: #185640;
  --brand-hover: #103e2e;
  --line: #dbe5de;
  --surface: #f2f7f3;
  --paper: #fff;
  --ground: #f6f8f3;
  --radius: 1.125rem;
  --shadow: 0 1px 2px #132e1710, 0 10px 30px -26px #102e27a0;
  --page-gutter: clamp(1.125rem, 4vw, 3rem);
  font: 16px/1.55 system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--ink);
  background: var(--ground);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; }
a { color: var(--brand); text-underline-offset: .22em; }
a:hover { color: var(--brand-hover); }
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  min-height: 4.625rem;
  padding: .75rem max(var(--page-gutter), calc((100vw - 68rem) / 2));
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
nav, .actions, .row, .inline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .75rem;
}
nav > a:not(.button) {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: .35rem .65rem;
  border-radius: .65rem;
  text-decoration: none;
  color: var(--muted);
  font-size: .9rem;
  font-weight: 650;
}
nav > a:not(.button):hover { color: var(--brand); background: var(--surface); }
.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  color: var(--ink);
  font-size: 1.075rem;
  font-weight: 760;
  letter-spacing: -.035em;
  text-decoration: none;
}
.brand span {
  display: grid;
  place-items: center;
  width: 2.3rem;
  height: 2.3rem;
  flex: none;
  color: white;
  background: linear-gradient(153deg, #276c51, #154633 75%);
  border: 1px solid #143c2c;
  border-radius: .7rem;
  box-shadow: 0 2px 5px #1c44263b, inset 0 1px 1px #ffffff2a;
  font-size: .79rem;
  letter-spacing: -.025em;
}
main {
  width: min(100%, 74rem);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) var(--page-gutter) 4rem;
}
.heading {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  margin: 0 0 clamp(1.5rem, 3.5vw, 2.25rem);
  padding: clamp(1.5rem, 4vw, 3.25rem);
  border: 1px solid #d7e5d8;
  border-radius: calc(var(--radius) + .4rem);
  background:
    radial-gradient(ellipse at 100% 0%, #d9eddf 0%, #d9eddf00 60%),
    linear-gradient(125deg, #edf7ee, #f7faf4 72%);
}
.heading::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: min(42%, 25rem);
  aspect-ratio: 1;
  right: -6%;
  bottom: -80%;
  border-radius: 50%;
  border: 1px solid #22553e14;
  box-shadow: 0 0 0 1.6rem #22553e08, 0 0 0 3.3rem #22553e06, 0 0 0 5rem #22553e04;
  pointer-events: none;
}
.heading p { margin: .45rem 0 0; color: var(--muted); max-width: 66ch; }
.heading p:empty { display: none; }
.heading .eyebrow {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: 0 0 .85rem;
  color: #255541;
  font-size: .73rem;
  font-weight: 790;
  text-transform: uppercase;
  letter-spacing: .115em;
}
.eyebrow::before {
  content: "";
  width: .4rem;
  height: .4rem;
  flex: none;
  border-radius: 50%;
  background: #397859;
  box-shadow: 0 0 0 3px #3978591a;
}
h1 {
  max-width: 27ch;
  margin: 0;
  font-size: clamp(2rem, 5.7vw, 3.6rem);
  line-height: 1.04;
  font-weight: 760;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
h2 {
  margin: 0 0 .85rem;
  font-size: clamp(1.125rem, 2.4vw, 1.325rem);
  line-height: 1.25;
  font-weight: 735;
  letter-spacing: -.028em;
}
h3 { margin: 0 0 .6rem; font-size: 1rem; letter-spacing: -.02em; }
p, .muted { color: var(--muted); }
.panel, .listing {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow);
}
.panel { margin: 0 0 1.125rem; padding: clamp(1.15rem, 3.5vw, 1.85rem); }
.panel > :first-child { margin-top: 0; }
.panel > :last-child { margin-bottom: 0; }
.compact { max-width: 33rem; }
main:has(form[action="/login"]) { max-width: 48rem; }
main:has(form[action="/login"]) .compact { max-width: unset; }
main:has(form[action="/login"]) .heading { margin-bottom: 1rem; }
form[action="/login"] button { width: 100%; }
.empty { text-align: center; padding: clamp(2rem, 5vw, 3.5rem) 1.1rem; }
.empty::before {
  content: "";
  display: block;
  width: 2.6rem;
  height: 2.6rem;
  margin: 0 auto 1rem;
  border-radius: .8rem;
  border: 1px solid #d9e8dd;
  background:
    linear-gradient(#507e62 0 0) center 41% / .95rem 2px no-repeat,
    linear-gradient(#507e62 0 0) center 56% / .95rem 2px no-repeat,
    linear-gradient(#507e62 0 0) center 71% / .65rem 2px no-repeat,
    #eef6ef;
}
.empty p { margin: 0 auto 1rem; max-width: 42ch; }
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
  margin: 0 0 1.15rem;
  padding: .375rem;
  width: fit-content;
  max-width: 100%;
  background: #eaf0e9;
  border: 1px solid #dee8de;
  border-radius: .9rem;
}
.filters a {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  min-height: 2.6rem;
  padding: .33rem .7rem;
  border: 1px solid transparent;
  border-radius: .625rem;
  color: #42574a;
  font-size: .88rem;
  font-weight: 660;
  text-decoration: none;
}
.filters a:hover { background: #f5f9f3; color: var(--brand); }
.filters a[aria-current] {
  background: white;
  border-color: #d9e5da;
  box-shadow: 0 1px 2px #203a2312;
  color: var(--brand-hover);
}
.filters span {
  min-width: 1.25rem;
  padding-inline: .25rem;
  text-align: center;
  border-radius: .35rem;
  background: #dde8de;
  color: #335846;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}
.queue { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem; }
.listing {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  min-height: 5.7rem;
  gap: .75rem;
  padding: 1rem 1.15rem;
  color: var(--ink);
  text-decoration: none;
  transition: border-color .17s, background-color .17s, box-shadow .17s;
}
.listing:hover, .listing:focus-visible {
  background: #fcfefa;
  border-color: #87ab94;
  color: var(--ink);
  box-shadow: 0 3px 14px #24493012;
}
.listing strong, .listing small { display: block; overflow-wrap: anywhere; }
.listing strong { line-height: 1.35; letter-spacing: -.018em; }
.listing small { color: var(--muted); margin-top: .3rem; font-size: .83rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  width: fit-content;
  padding: .22rem .55rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: #edf1ee;
  color: #4a5751;
  font-size: .76rem;
  font-weight: 720;
}
.badge::before { content: ""; width: .34rem; height: .34rem; flex: none; border-radius: 50%; background: currentColor; opacity: .78; }
.badge.ready, .badge.available { color: #285d42; background: #e6f2e8; border-color: #d5ead9; }
.badge.posted { color: #255076; background: #e8f1fa; border-color: #dce9f7; }
.badge.sold { color: #59446e; background: #f2ebf8; border-color: #e9def1; }
.badge.out-of-stock, .badge.unavailable { color: #7c4d20; background: #f9f0e1; border-color: #f0e3d1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem 1rem; margin-bottom: 1.05rem; }
.full { grid-column: 1 / -1; }
label {
  display: grid;
  min-width: 0;
  gap: .4rem;
  margin-bottom: .7rem;
  font-size: .9rem;
  color: #263e31;
  font-weight: 680;
}
input, textarea, select {
  width: 100%;
  min-width: 0;
  min-height: 2.8rem;
  padding: .6rem .775rem;
  background: #fcfdfb;
  color: var(--ink);
  border: 1px solid #b9cabd;
  border-radius: .6rem;
  font: 1rem/1.45 system-ui, sans-serif;
  transition: border-color .17s, box-shadow .17s;
}
input::placeholder, textarea::placeholder { color: #617268; opacity: 1; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { border-color: #2b6e50; box-shadow: 0 0 0 3px #2b6e501c; }
input[type="file"] { max-width: 38rem; padding: .42rem .55rem; border-style: dashed; }
input[type="checkbox"], input[type="radio"] { width: 1rem; height: 1rem; min-height: unset; accent-color: var(--brand); margin: 0; padding: 0; }
input::file-selector-button {
  margin-right: .7rem;
  padding: .38rem .55rem;
  border: 1px solid #c6d7ca;
  border-radius: .4rem;
  background: var(--surface);
  color: var(--brand);
  font: inherit;
  font-size: .84rem;
  font-weight: 650;
  cursor: pointer;
}
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.8rem;
  max-width: 100%;
  padding: .55rem .9rem;
  border-radius: .65rem;
  border: 1px solid var(--brand);
  color: #fff;
  background: var(--brand);
  box-shadow: 0 1px 2px #12342026;
  text-decoration: none;
  font: inherit;
  font-size: .9rem;
  font-weight: 690;
  cursor: pointer;
  transition: background-color .17s, border-color .17s;
}
button:hover, .button:hover { background: var(--brand-hover); color: white; border-color: var(--brand-hover); }
button:disabled { box-shadow: none; opacity: .6; cursor: not-allowed; }
.secondary { color: var(--brand); background: white; border-color: #bbcec0; box-shadow: none; }
.secondary:hover { color: var(--brand-hover); background: var(--surface); border-color: #8eaf98; }
.small { font-size: .84rem; min-height: 2.65rem; }
:focus-visible { outline: 3px solid #397e63; outline-offset: 3px; }
.row { justify-content: space-between; }
.row h2 { margin: 0; }
.inline { align-items: end; }
.inline label { margin: 0; min-width: min(100%, 10rem); }
.actions { margin-top: .5rem; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .85rem; }
figure { margin: 0; min-width: 0; border: 1px solid var(--line); border-radius: .8rem; overflow: hidden; }
figure img { display: block; width: 100%; height: 10rem; object-fit: contain; background: #edf3ee; }
figcaption { padding: .7rem .8rem; font-size: .9rem; font-weight: 620; }
pre {
  background: #f3f7f2;
  border: 1px solid #e1ebe1;
  border-radius: .65rem;
  color: var(--ink);
  font: inherit;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: .95rem;
  margin: .75rem 0 1rem;
}
pre[id$="-code"], pre[id$="-key"] { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; }
.copy-result:empty { display: none; }
.copy-result:not(:empty) { color: #286345; font-size: .85rem; font-weight: 680; }
.access-link { display: block; margin-top: 1.125rem; }
.access-link { width: fit-content; font-size: .9rem; font-weight: 650; }

fieldset { min-width: 0; margin: 0 0 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: .75rem; }
legend, summary { color: var(--ink); font-weight: 710; }
summary { cursor: pointer; }
details:not(.panel) { margin-bottom: 1rem; }
dl { display: grid; gap: .45rem .85rem; grid-template-columns: minmax(0, 12rem) minmax(0, 1fr); }
dt { color: var(--muted); font-weight: 640; }
dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 680px) {
  .queue { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  header { min-height: 4.2rem; }
  nav { gap: .3rem; }
  nav > a:not(.button) { padding-inline: .4rem; font-size: .83rem; }
  .small { padding-inline: .65rem; }
  .heading { border-radius: 1.1rem; }
  .heading::after { display: none; }
  .filters { gap: .2rem; }
  .filters a { padding-inline: .5rem; }
  .form-grid { grid-template-columns: 1fr; gap: .25rem; }
  .listing { padding: .9rem; }
  .inline { align-items: stretch; }
  dl { grid-template-columns: 1fr; }
  dd { margin-bottom: .5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.nav-logout { margin: 0; }
.nav-logout button { white-space: nowrap; }
.queue-tools { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .75rem 1rem; margin-bottom: 1rem; }
.queue-tools .filters { margin-bottom: 0; }
.queue-search { display: flex; align-items: center; gap: .45rem; flex: 0 1 19rem; min-width: 0; margin: 0 0 0 auto; }
.queue-search input[type="search"] { flex: 1 1 0; min-width: 0; margin: 0; }
.queue-search button { flex: none; white-space: nowrap; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 480px) {
  .queue-search { flex-basis: 100%; }
  .nav-logout button, header nav .small { padding-inline: .5rem; }
  header .brand { gap: .35rem; padding-inline-end: 0; }
}
@media (max-width: 370px) {
  header nav > a:not(.button) { display: none; } /* The Sharetown brand also opens the queue. */
}
.queue-search button[hidden] { display: none; }
