:root {
  color-scheme: dark;
  --dark-water: #041514;
  --deep-field: #071f1c;
  --signal-teal: #74e7d8;
  --soft-aqua: #a8d8cd;
  --bone-light: #f2ead8;
  --night: var(--dark-water);
  --forest: var(--deep-field);
  --cream: var(--bone-light);
  --gold: #c99a52;
  --copper: #a95f3f;
  --moss: #809765;
  --teal: var(--signal-teal);
  --rust: #a24f37;
  --line: rgba(201, 154, 82, .32);
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cream);
  background:
    radial-gradient(circle at 82% 0, rgba(101, 166, 158, .15), transparent 28rem),
    radial-gradient(circle at 4% 48%, rgba(184, 108, 66, .12), transparent 25rem),
    linear-gradient(145deg, var(--forest), var(--night) 68%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  opacity: .16;
  background-image:
    linear-gradient(rgba(244, 232, 197, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 232, 197, .032) 1px, transparent 1px);
  background-size: 31px 31px;
  mask-image: linear-gradient(to bottom, #000, transparent 85%);
}

button,
a,
input,
textarea,
select { font: inherit; }

.eyebrow {
  margin: 0 0 .8rem;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.claim-shell {
  width: min(48rem, calc(100% - 1.5rem));
  margin: auto;
  padding: clamp(2rem, 7vw, 5rem) 0;
  text-align: center;
}

.claim-card {
  position: relative;
  overflow: hidden;
  padding: clamp(1.2rem, 4vw, 2.5rem);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: linear-gradient(145deg, rgba(13, 33, 26, .94), rgba(5, 16, 11, .94));
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, .38);
}

.claim-card::after {
  position: absolute;
  right: -7rem;
  top: -7rem;
  width: 18rem;
  aspect-ratio: 1;
  content: "";
  border: 1px dashed rgba(231, 184, 92, .25);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(101, 166, 158, .035), 0 0 0 4rem rgba(184, 108, 66, .03);
}

.sticker-stage {
  position: relative;
  z-index: 1;
  min-height: min(28rem, 70vw);
  display: grid;
  place-items: center;
}

.claim-card img {
  width: min(100%, 29rem);
  height: auto;
  filter: drop-shadow(0 1rem 1rem rgba(0, 0, 0, .45));
}

.sticker-fallback {
  width: min(20rem, 68vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border: .6rem solid var(--cream);
  border-radius: 46% 54% 48% 52%;
  outline: .2rem solid var(--teal);
  color: var(--gold);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .13), transparent 17%),
    linear-gradient(145deg, #173b2e, #0b1c15);
  font-size: clamp(5rem, 18vw, 9rem);
  filter: drop-shadow(0 1rem .8rem rgba(0, 0, 0, .5));
  transform: rotate(-2deg);
}

.creature-kind {
  margin: .5rem 0;
  color: var(--teal);
  font-size: .7rem;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.claim-card h1 {
  position: relative;
  z-index: 1;
  margin: .5rem auto 1rem;
  max-width: 14ch;
  font-family: Georgia, serif;
  font-size: clamp(2.2rem, 7vw, 4.8rem);
  line-height: .95;
  letter-spacing: -.035em;
}

.notice-copy {
  max-width: 42rem;
  margin: auto;
  color: rgba(244, 232, 197, .77);
  line-height: 1.6;
}

.claim-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .75rem;
  margin-top: 1.5rem;
}

.button {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .75rem 1rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--cream);
  background: transparent;
  font-weight: 850;
  text-decoration: none;
  cursor: pointer;
}

.button.primary { color: #142018; background: var(--gold); }
.button[aria-disabled="true"], .button:disabled { opacity: .5; cursor: not-allowed; }

:focus-visible {
  outline: .2rem solid var(--teal);
  outline-offset: .25rem;
}

.text-receipt {
  position: relative;
  z-index: 1;
  margin-top: 1.5rem;
  padding: 1rem;
  text-align: left;
  border-left: .25rem solid var(--teal);
  background: rgba(101, 166, 158, .08);
  line-height: 1.5;
}

.text-receipt strong,
.text-receipt span { display: block; }

.text-receipt strong { margin-bottom: .3rem; color: var(--teal); }
.status { min-height: 1.5em; color: var(--teal); }
.private-prompt { max-width: 38rem; margin: 1.5rem auto .5rem; color: var(--gold); font-family: Georgia, serif; font-size: 1.1rem; line-height: 1.45; }
.privacy-note { max-width: 42rem; margin: .7rem auto; color: rgba(244, 232, 197, .58); font-size: .8rem; line-height: 1.5; }
[hidden] { display: none !important; }

@media (max-width: 560px) {
  .claim-shell { width: min(100% - .8rem, 48rem); padding: .8rem 0 2rem; }
  .claim-card { padding: 1rem; border-radius: 1.25rem; }
  .sticker-stage { min-height: 20rem; }
  .claim-actions { display: grid; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.utility-shell {
  width: min(82rem, calc(100% - 2rem));
  margin: auto;
  padding: clamp(2rem, 6vw, 5rem) 0;
}

.utility-shell h1,
.utility-shell h2,
.utility-shell h3 { font-family: Georgia, serif; }

.utility-hero,
.goblin-welcome {
  position: relative;
  overflow: hidden;
  padding: clamp(1.4rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1.75rem;
  background: linear-gradient(120deg, rgba(13, 40, 30, .96), rgba(7, 19, 15, .93));
  box-shadow: 0 1.6rem 4rem rgba(0, 0, 0, .3);
}

.utility-hero::after,
.goblin-welcome::after {
  position: absolute;
  right: -6rem;
  top: -7rem;
  width: 20rem;
  aspect-ratio: 1;
  content: "";
  border: 1px dashed rgba(231, 184, 92, .27);
  border-radius: 50%;
  box-shadow: 0 0 0 2rem rgba(101, 166, 158, .035), 0 0 0 4rem rgba(184, 108, 66, .03);
}

.utility-hero h1,
.goblin-welcome h1 {
  position: relative;
  z-index: 1;
  margin: .3rem 0 .8rem;
  font-size: clamp(2.8rem, 7vw, 6rem);
  line-height: .9;
  letter-spacing: -.045em;
}

.utility-hero > p:last-child,
.goblin-welcome > div > p:last-child { max-width: 54rem; color: rgba(244, 232, 197, .75); line-height: 1.6; }

.setup-panel,
.satchel,
.goblin-tools { margin-top: 1rem; }

.session-row,
.satchel-head,
.build-row,
.inline-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

label { display: block; color: rgba(244, 232, 197, .82); line-height: 1.45; }

input[type="text"],
textarea,
select {
  width: 100%;
  min-height: 2.8rem;
  margin-top: .4rem;
  padding: .7rem .8rem;
  border: 1px solid rgba(101, 166, 158, .52);
  border-radius: .75rem;
  color: var(--cream);
  background: #091812;
}

textarea { min-height: 7rem; resize: vertical; }
.session-row > label:first-child { width: min(34rem, 100%); }
.field-toggle { padding: .8rem 1rem; border: 1px solid rgba(231, 184, 92, .23); border-radius: 1rem; }

.selection-tools {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
  margin: 1.25rem 0;
  padding: 1rem;
  border: 1px solid rgba(244, 232, 197, .1);
  border-radius: 1rem;
  background: rgba(4, 13, 9, .45);
}

.selection-tools button,
[data-select-family] button,
.drawer-tabs button {
  min-height: 2.5rem;
  padding: .55rem .8rem;
  border: 1px solid var(--family-accent, var(--gold));
  border-radius: 999px;
  color: var(--cream);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

[data-select-family] { display: contents; }

.catalogue-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

fieldset {
  margin: 0;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--family-accent) 50%, transparent);
  border-radius: 1.25rem;
  background: rgba(4, 13, 9, .5);
}

legend { padding: 0 .55rem; color: var(--family-accent); font-family: Georgia, serif; font-size: 1.35rem; }
.family-description { min-height: 3em; color: rgba(244, 232, 197, .55); font-size: .8rem; line-height: 1.45; }

.badge-check {
  display: grid;
  grid-template-columns: auto 2.8rem 1fr;
  gap: .65rem;
  align-items: center;
  margin: .45rem 0;
  padding: .65rem;
  border: 1px solid rgba(244, 232, 197, .075);
  border-radius: .8rem;
  background: rgba(255, 255, 255, .018);
}

.badge-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--family-accent); }
.check-glyph { font-size: 1.65rem; text-align: center; }
.badge-check strong, .badge-check small { display: block; }
.badge-check small { margin-top: .2rem; color: rgba(244, 232, 197, .53); line-height: 1.35; }
.build-row { margin: 1.2rem 0; padding: 1rem 0; border-top: 1px dashed rgba(231, 184, 92, .25); }
.pack-output { margin-top: 1rem; padding: 1.25rem; border-left: .3rem solid var(--teal); background: rgba(101, 166, 158, .07); }
.pack-output label { width: 100%; }
.pack-output input { max-width: none; }

.goblin-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, .8fr);
  gap: clamp(1rem, 4vw, 3rem);
  align-items: center;
}

.goblin-oath {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1rem 1rem 1rem 2.3rem;
  border-left: .25rem solid var(--gold);
  background: rgba(7, 19, 15, .58);
}

.goblin-oath li { margin: .65rem 0; color: rgba(244, 232, 197, .68); line-height: 1.45; }
.goblin-oath strong { color: var(--cream); }
.satchel { padding: 1.2rem; border: 1px solid var(--line); border-radius: 1.5rem; background: rgba(5, 16, 11, .65); }
.satchel-head h2 { margin: .2rem 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.drawer-tabs { display: flex; flex-wrap: wrap; gap: .55rem; margin: 1rem 0; padding-bottom: 1rem; border-bottom: 1px dashed rgba(244, 232, 197, .14); }
.drawer-tabs button[aria-pressed="true"] { color: #102019; background: var(--family-accent); }
.helper-stickers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .8rem; }

.helper-sticker {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--family-accent) 44%, transparent);
  border-radius: 1.15rem;
  background: linear-gradient(145deg, rgba(13, 33, 26, .92), rgba(4, 13, 9, .92));
}

.helper-art { min-height: 11rem; display: grid; place-items: center; }
.helper-art > * { grid-area: 1 / 1; }
.helper-art img { width: 100%; max-height: 14rem; object-fit: contain; }
.helper-art span { width: 8rem; aspect-ratio: 1; display: grid; place-items: center; border: .35rem solid var(--cream); border-radius: 46% 54%; outline: .15rem solid var(--family-accent); background: var(--forest); font-size: 3.7rem; }
.helper-sticker h3 { margin: .2rem 0 .45rem; font-size: 1.3rem; }
.helper-sticker > p:not(.creature-kind) { flex: 1; color: rgba(244, 232, 197, .64); font-size: .87rem; line-height: 1.45; }
.helper-sticker .button { align-self: stretch; }
.text-link { margin-top: .75rem; color: var(--teal); font-size: .8rem; font-weight: 800; text-align: center; }
.goblin-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.review-pouch, .field-issued { padding: 1.25rem; border: 1px solid rgba(101, 166, 158, .32); border-radius: 1.25rem; background: rgba(5, 16, 11, .65); }
.review-pouch > p:not(.eyebrow) { color: rgba(244, 232, 197, .62); line-height: 1.5; }
.field-issued > p:not(.eyebrow) { color: rgba(244, 232, 197, .62); line-height: 1.5; }
.field-issued canvas { width: min(100%, 28rem); height: auto; display: block; margin: 1rem auto; border-radius: 1rem; background: rgba(244, 232, 197, .04); }
.field-issued .button { margin-top: .6rem; }

@media (max-width: 900px) {
  .catalogue-checklist, .goblin-welcome, .goblin-tools { grid-template-columns: 1fr; }
  .helper-stickers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .utility-shell { width: min(100% - .7rem, 82rem); padding: .7rem 0 2rem; }
  .helper-stickers { grid-template-columns: 1fr; }
  .utility-hero, .goblin-welcome, .satchel { padding: 1rem; border-radius: 1.1rem; }
}
