@font-face {
  font-family: "Lumor Display";
  src: local("Baskerville"), local("Iowan Old Style"), local("Georgia");
  font-style: normal;
  font-weight: 400 700;
}

:root {
  --ink: #241f1a;
  --paper: #efe4d0;
  --paper-light: #f7eddd;
  --muted: #776e62;
  --orange: #e05e2e;
  --orange-dark: #a83b20;
  --blue: #245b82;
  --blue-dark: #173e5a;
  --line: rgba(36, 31, 26, .25);
  --error: #b83e2b;
  --display: "Lumor Display", Georgia, serif;
  --ui: "Trebuchet MS", Arial, sans-serif;
  --mono: "Courier New", Courier, monospace;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--ui); }
button, input { font: inherit; }
button { color: inherit; }

.page-shell {
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding: 27px clamp(22px, 5vw, 78px) 46px;
  background: var(--paper);
}

.page-shell::before {
  content: "";
  position: absolute;
  z-index: -5;
  inset: 0;
  opacity: .32;
  background-image: radial-gradient(rgba(36, 31, 26, .24) .65px, transparent .9px);
  background-size: 5px 5px;
  pointer-events: none;
}

.loot-scene {
  position: absolute;
  z-index: -3;
  inset: 0;
  overflow: hidden;
  background: var(--paper);
  pointer-events: none;
}
.loot-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(247, 237, 221, .97) 0 37%, rgba(247, 237, 221, .45) 57%, rgba(247, 237, 221, .08) 100%);
}
.scene-sun { position: absolute; width: 38vw; height: 38vw; max-width: 610px; max-height: 610px; min-width: 320px; min-height: 320px; right: 12%; top: 10%; border-radius: 50%; background: var(--orange); opacity: .92; }
.scene-sun::after { content: ""; position: absolute; inset: 8%; border: 2px solid rgba(247, 237, 221, .64); border-radius: 50%; }

.loot-label { position: absolute; color: var(--ink); font-family: var(--mono); font-size: clamp(9px, .75vw, 12px); font-weight: 700; letter-spacing: .12em; }
.loot-label-top { top: 15%; right: 7%; transform: rotate(3deg); }
.loot-label-bottom { bottom: 12%; left: 7%; transform: rotate(-4deg); }
.loot-copy { position: absolute; right: 8%; bottom: 17%; color: rgba(247, 237, 221, .9); font-family: var(--mono); font-size: clamp(9px, .75vw, 12px); letter-spacing: .1em; transform: rotate(-4deg); }

.loot-card { position: absolute; display: flex; flex-direction: column; justify-content: space-between; width: clamp(145px, 18vw, 280px); aspect-ratio: 1.25; padding: 20px; border: 2px solid var(--ink); box-shadow: 8px 9px 0 rgba(36, 31, 26, .19); color: var(--ink); font-family: var(--display); font-size: clamp(25px, 3vw, 49px); font-weight: 700; line-height: .84; }
.loot-card span { letter-spacing: -.06em; }
.loot-card i { align-self: flex-end; font-family: var(--mono); font-size: 12px; font-style: normal; letter-spacing: .12em; }
.loot-card-orange { right: 15%; top: 27%; background: #edb24e; transform: rotate(8deg); }
.loot-card-blue { right: 29%; top: 42%; z-index: 2; background: #7ba7bd; transform: rotate(-11deg); }
.loot-route { position: absolute; z-index: 1; right: 18%; top: 31%; width: 28%; height: 35%; border-top: 2px dashed rgba(36, 31, 26, .35); border-right: 2px dashed rgba(36, 31, 26, .35); border-radius: 0 35% 0 0; transform: rotate(13deg); opacity: .75; }
.loot-route span { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: var(--blue-dark); box-shadow: 0 0 0 4px rgba(247, 237, 221, .5); }
.loot-route span:nth-child(1) { top: -5px; left: 12%; }
.loot-route span:nth-child(2) { top: 42%; left: 52%; background: var(--orange); }
.loot-route span:nth-child(3) { right: -5px; bottom: 10%; }
.loot-route i { position: absolute; right: -7px; bottom: 0; width: 14px; height: 14px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(-8deg); }
.mini-pack { position: absolute; z-index: 2; display: grid; place-items: center; width: clamp(55px, 6vw, 94px); aspect-ratio: .8; border: 2px solid var(--ink); box-shadow: 5px 6px 0 rgba(36, 31, 26, .16); color: var(--ink); font-family: var(--mono); font-size: clamp(9px, .9vw, 13px); font-weight: 700; line-height: 1.05; text-align: center; }
.mini-pack b { font-family: var(--display); font-size: clamp(15px, 1.7vw, 25px); letter-spacing: -.04em; }
.mini-pack-red { right: 36%; top: 30%; background: #d76a49; transform: rotate(-13deg); }
.mini-pack-yellow { right: 10%; bottom: 28%; background: #edb24e; transform: rotate(9deg); }
.loot-token { position: absolute; z-index: 3; right: 20%; top: 53%; display: grid; place-items: center; width: clamp(86px, 10vw, 155px); aspect-ratio: 1; border: 8px solid var(--blue-dark); border-radius: 50%; background: var(--blue); color: var(--paper-light); box-shadow: 7px 8px 0 rgba(36, 31, 26, .22); font-family: var(--display); font-size: clamp(45px, 6vw, 92px); transform: rotate(17deg); }
.loot-token::after { content: ""; position: absolute; inset: 14px; border: 1px dashed rgba(247, 237, 221, .74); border-radius: 50%; }
.loot-ticket {
  pointer-events: auto;
  position: absolute;
  z-index: 4;
  right: 6%;
  top: 34%;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  width: clamp(145px, 16vw, 245px);
  aspect-ratio: 1.8;
  padding: 18px;
  border: 1px solid var(--ink);
  background: var(--paper-light);
  box-shadow: 8px 8px 0 rgba(36, 31, 26, .18);
  color: var(--ink);
  cursor: pointer;
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 43px);
  font-weight: 700;
  line-height: .78;
  text-align: left;
  transform: rotate(4deg);
  transition: transform .28s cubic-bezier(.2,.8,.2,1), box-shadow .28s ease, background-color .28s ease, color .28s ease;
}
.loot-ticket::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px dashed rgba(36, 31, 26, .3);
  pointer-events: none;
}
.loot-ticket::after {
  content: "OPEN DROP";
  position: absolute;
  right: -12px;
  top: -14px;
  padding: 5px 7px;
  background: var(--orange);
  color: var(--paper-light);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: .08em;
  opacity: 0;
  transform: translateY(7px) rotate(-7deg);
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1);
}
.loot-ticket:hover,
.loot-ticket:focus-visible {
  z-index: 8;
  color: var(--paper-light);
  background: var(--blue-dark);
  box-shadow: 13px 15px 0 rgba(36, 31, 26, .28);
  transform: translate(-7px, -10px) rotate(-2deg) scale(1.035);
}
.loot-ticket:hover::before,
.loot-ticket:focus-visible::before { border-color: rgba(247, 237, 221, .55); }
.loot-ticket:hover::after,
.loot-ticket:focus-visible::after { opacity: 1; transform: translateY(0) rotate(-7deg); }
.loot-ticket i { color: var(--orange); font-family: var(--mono); font-size: 24px; font-style: normal; }
.loot-ticket:hover i,
.loot-ticket:focus-visible i { color: #ff9b62; transform: translate(3px, -3px); }
.loot-sticker { position: absolute; z-index: 5; right: 34%; top: 20%; display: grid; place-items: center; width: clamp(70px, 8vw, 118px); aspect-ratio: 1; border-radius: 50%; background: var(--orange); color: var(--paper-light); font-family: var(--mono); font-size: clamp(10px, 1vw, 15px); font-weight: 700; line-height: 1; text-align: center; transform: rotate(-16deg); }

.topbar { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; }
.wordmark { color: var(--ink); text-decoration: none; font-family: var(--display); font-size: 26px; font-weight: 700; letter-spacing: -.07em; }
.wordmark span { margin-left: 5px; color: var(--orange-dark); font-family: var(--mono); font-size: 12px; letter-spacing: .06em; vertical-align: middle; }
.locale { display: flex; gap: 7px; align-items: center; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.locale-button { padding: 9px 1px; border: 0; background: transparent; color: inherit; cursor: pointer; }
.locale-button.is-active { color: var(--ink); }

.generator { width: min(100%, 650px); position: relative; margin: clamp(122px, 20vh, 218px) auto 0; padding: 34px 38px 31px; border: 2px solid var(--ink); background: rgba(247, 237, 221, .96); box-shadow: 12px 13px 0 var(--blue-dark); }
.generator::before { content: "LUMOR / CODE CHECK"; position: absolute; top: -24px; left: -2px; padding: 6px 10px; background: var(--blue-dark); color: var(--paper-light); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.generator::after { content: "CHECK YOUR DROP"; position: absolute; right: 20px; bottom: -26px; color: var(--blue-dark); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .12em; transform: rotate(-3deg); }
.eyebrow { margin: 0 0 23px; color: var(--orange-dark); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .16em; }
.input-line { display: flex; align-items: center; border-bottom: 2px solid var(--ink); transition: border-color .18s ease; }
.input-line:focus-within { border-color: var(--orange); }
.input-line.has-error { border-color: var(--error); }
input { min-width: 0; flex: 1; padding: 13px 10px 14px 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: clamp(14px, 1.4vw, 17px); letter-spacing: .035em; }
input::placeholder { color: rgba(36, 31, 26, .48); }
.clear-button, .text-button { padding: 10px 0 10px 14px; border: 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 11px; }
.clear-button:hover, .text-button:hover { color: var(--orange-dark); }
.error { min-height: 18px; margin: 8px 0 0; color: var(--error); font-size: 11px; }
.result { margin-top: 49px; }
.code { width: 100%; padding: 0; border: 0; background: transparent; color: var(--blue-dark); cursor: copy; font-family: var(--display); font-size: clamp(78px, 10vw, 126px); font-weight: 700; line-height: .78; letter-spacing: -.085em; text-align: left; }
.code:hover { color: var(--orange-dark); }
.progress-track { height: 4px; margin-top: 28px; background: rgba(36, 31, 26, .17); }
.progress-fill { height: 100%; width: 100%; background: var(--orange); transform-origin: left center; }
.actions { display: flex; gap: 19px; margin-top: 10px; }
.text-button { padding-left: 0; color: var(--blue-dark); font-family: var(--mono); font-size: 10px; font-weight: 700; letter-spacing: .05em; }
button:focus-visible, input:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 640px) {
  .page-shell { padding: 22px 18px 32px; }
  .loot-scene::before { background: linear-gradient(90deg, rgba(247, 237, 221, .97) 0 39%, rgba(247, 237, 221, .48) 72%, rgba(247, 237, 221, .12)); }
  .scene-sun { width: 92vw; height: 92vw; right: -28%; top: 17%; }
  .loot-card-orange { right: -8%; top: 31%; }
  .loot-card-blue { right: 17%; top: 48%; }
  .loot-route { right: 8%; top: 31%; width: 52%; height: 37%; transform: rotate(8deg); }
  .mini-pack-red { right: 38%; top: 29%; }
  .mini-pack-yellow { right: 2%; bottom: 26%; }
  .loot-ticket { right: -13%; top: 40%; }
  .loot-token { right: 13%; top: 56%; }
  .loot-sticker { right: 30%; top: 22%; }
  .loot-copy { right: 5%; bottom: 14%; }
  .generator { margin-top: 21vh; padding: 28px 22px 26px; box-shadow: 9px 10px 0 var(--blue-dark); }
  .generator::before { top: -22px; }
  .code { font-size: clamp(68px, 21vw, 94px); }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
