:root {
  --bg: #0a0806;
  --panel: #16110c;
  --panel-2: #1e1710;
  --line: #3a2e1f;
  --text: #f7f0e4;
  --muted: #b5a489;
  --gold: #e8c547;
  --gold-deep: #b8891a;
  --brown: #5c3a22;
  --fur: #8b5a2b;
  --denim: #3d5a7a;
  --green: #6b9e3a;
  --radius: 18px;
  --font: "Outfit", system-ui, sans-serif;
  --display: "Bebas Neue", "Impact", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
}

/* ===== SPLASH ===== */
.splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 50% 35%, #2a1a0a 0%, transparent 55%),
    radial-gradient(circle at 20% 80%, #1a2a12 0%, transparent 40%),
    radial-gradient(circle at 85% 70%, #1a2030 0%, transparent 35%),
    linear-gradient(180deg, #120e09 0%, #070605 100%);
  transition: opacity .55s ease, visibility .55s ease;
}
.splash.leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.splash-glow {
  position: absolute;
  width: min(70vw, 520px);
  height: min(70vw, 520px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(232,197,71,.28) 0%, transparent 68%);
  filter: blur(8px);
  animation: glowPulse 3.2s ease-in-out infinite;
  pointer-events: none;
}
.splash-smoke {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 42% 38%, rgba(255,255,255,.06) 0%, transparent 28%),
    radial-gradient(ellipse at 48% 32%, rgba(255,255,255,.04) 0%, transparent 22%);
  animation: smokeDrift 8s ease-in-out infinite alternate;
  pointer-events: none;
}
.mascot-hit {
  position: relative;
  z-index: 2;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  max-width: min(92vw, 560px);
  animation: mascotPop .9s cubic-bezier(.16,1.2,.4,1) both;
}
.mascot-hit:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 10px;
  border-radius: 24px;
}
.splash-mascot {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 22px 40px rgba(0,0,0,.65)) drop-shadow(0 0 28px rgba(232,197,71,.25));
  transition: transform .35s ease, filter .35s ease;
  animation: mascotFloat 4.5s ease-in-out 1s infinite;
}
.mascot-hit:hover .splash-mascot,
.mascot-hit:focus-visible .splash-mascot {
  transform: scale(1.04) rotate(-1deg);
  filter: drop-shadow(0 28px 48px rgba(0,0,0,.7)) drop-shadow(0 0 40px rgba(232,197,71,.4));
}
.splash-ring {
  position: absolute;
  inset: -4%;
  border-radius: 50%;
  border: 2px solid rgba(232,197,71,.25);
  animation: ringPulse 2.4s ease-out infinite;
  pointer-events: none;
}
.splash-copy {
  position: absolute;
  bottom: max(1.5rem, 4vh);
  left: 0;
  right: 0;
  text-align: center;
  z-index: 3;
  animation: fadeUp .7s ease .35s both;
  pointer-events: none;
}
.splash-eyebrow {
  margin: 0;
  letter-spacing: .22em;
  text-transform: uppercase;
  font-size: .72rem;
  color: var(--gold);
}
.splash-title {
  margin: .15rem 0 0;
  font-family: var(--display);
  font-size: clamp(2.8rem, 10vw, 4.6rem);
  letter-spacing: .04em;
  line-height: .95;
  background: linear-gradient(180deg, #ffe9a0 0%, var(--gold) 45%, var(--gold-deep) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 0 40px rgba(232,197,71,.25);
}
.splash-sub {
  margin: .35rem 0 0;
  color: var(--muted);
  font-weight: 500;
}
.splash-cta {
  margin: .85rem 0 0;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
}
.pulse { animation: ctaPulse 1.8s ease-in-out infinite; }

@keyframes mascotPop {
  0% { opacity: 0; transform: scale(.35) translateY(80px); filter: blur(8px); }
  60% { opacity: 1; transform: scale(1.06) translateY(-8px); filter: blur(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes mascotFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes glowPulse {
  0%, 100% { opacity: .7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes smokeDrift {
  from { transform: translateY(0) scale(1); opacity: .7; }
  to { transform: translateY(-18px) scale(1.05); opacity: 1; }
}
@keyframes ringPulse {
  0% { transform: scale(.88); opacity: .55; }
  100% { transform: scale(1.15); opacity: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ctaPulse {
  0%, 100% { opacity: .7; }
  50% { opacity: 1; }
}
@keyframes appIn {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ===== APP ===== */
.app {
  min-height: 100vh;
  background:
    radial-gradient(900px 420px at 8% -5%, #3a2810 0%, transparent 55%),
    radial-gradient(700px 380px at 100% 0%, #1a2a18 0%, transparent 50%),
    var(--bg);
  animation: appIn .55s ease both;
}
.hero, main, footer { width: min(1100px, calc(100% - 2rem)); margin-inline: auto; }
.hero {
  padding: 1.6rem 0 1rem;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-inner { display: flex; gap: 1rem; align-items: center; }
.hero-mark {
  width: 72px;
  height: auto;
  filter: drop-shadow(0 8px 16px rgba(0,0,0,.45));
}
.eyebrow {
  margin: 0 0 .25rem;
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .7rem;
  color: var(--gold);
}
.hero h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: .03em;
  line-height: 1;
}
.sub { margin: .4rem 0 0; color: var(--muted); max-width: 36rem; line-height: 1.45; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 1rem;
  margin: 1.1rem 0 1.35rem;
}
.card {
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 28px rgba(0,0,0,.28);
  transition: border-color .2s ease, transform .2s ease;
}
.card:hover {
  border-color: rgba(232,197,71,.45);
  transform: translateY(-2px);
}
.thumb {
  aspect-ratio: 3 / 4;
  background:
    radial-gradient(circle at 50% 30%, #2a2118 0%, #100d0a 70%);
  display: grid;
  place-items: center;
  padding: .85rem;
  border-bottom: 1px solid var(--line);
}
.thumb img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.card-body { padding: .9rem 1rem 1.05rem; display: flex; flex-direction: column; gap: .5rem; }
.card h3 { margin: 0; font-size: .98rem; }
.meta { margin: 0; font-size: .74rem; color: var(--muted); }
.qty-row { display: flex; align-items: center; gap: .5rem; }
.qty-row label { font-size: .8rem; color: var(--muted); }
.qty-row input {
  width: 5.5rem;
  padding: .48rem .55rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e0b08;
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
}
.qty-row input:focus {
  outline: none;
  border-color: var(--gold-deep);
  box-shadow: 0 0 0 3px rgba(232,197,71,.18);
}

.notes-panel {
  background: linear-gradient(165deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1.2rem;
  box-shadow: 0 10px 28px rgba(0,0,0,.22);
}
.notes-head {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.notes-head h2 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: .04em;
  font-size: 1.45rem;
}
.ai-row { display: flex; gap: .5rem; flex: 1 1 280px; max-width: 520px; }
.ai-row input {
  flex: 1;
  padding: .55rem .7rem;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e0b08;
  color: var(--text);
  font-family: inherit;
}
textarea {
  width: 100%;
  resize: vertical;
  min-height: 110px;
  padding: .8rem .9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0e0b08;
  color: var(--text);
  font: inherit;
  line-height: 1.45;
}
.hint { margin: .55rem 0 0; color: var(--gold); font-size: .85rem; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
  margin: 1.15rem 0 1.5rem;
}
.btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #241c14;
  color: var(--text);
  border-radius: 999px;
  padding: .68rem 1.2rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, transform .15s ease;
}
.btn:hover { border-color: var(--gold-deep); }
.btn:active { transform: scale(.98); }
.btn.primary {
  background: linear-gradient(180deg, #f0d36a, #c4921c);
  color: #1a1206;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(184,137,26,.35);
}
.btn.ghost { background: transparent; }
.btn.tiny { padding: .4rem .85rem; font-size: .82rem; }

.summary {
  background: linear-gradient(165deg, #1c160f, #120e09);
  border: 1px solid rgba(232,197,71,.45);
  border-radius: var(--radius);
  padding: 1.05rem 1.15rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 0 1px rgba(232,197,71,.08), 0 16px 40px rgba(0,0,0,.35);
}
.summary-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
  margin-bottom: .7rem;
}
.summary-head h2 {
  margin: 0;
  font-family: var(--display);
  letter-spacing: .04em;
  font-size: 1.45rem;
  color: var(--gold);
}
.summary-actions { display: flex; gap: .4rem; }
pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem;
  line-height: 1.45;
  background: #0a0806;
  border-radius: 12px;
  padding: 1rem;
  border: 1px solid var(--line);
}
footer {
  padding: 0 0 2.5rem;
  color: var(--muted);
  font-size: .78rem;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
@media print {
  .splash, .hero .sub, .ai-row, .actions, .notes-panel, .grid, footer, .summary-actions, #back-splash { display: none !important; }
  .app { display: block !important; background: #fff; color: #000; }
  .summary { border: none; box-shadow: none; }
  pre { border: 1px solid #ccc; background: #fff; color: #000; }
}

.card-note {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .15rem;
}
.card-note label {
  font-size: .75rem;
  color: var(--muted);
}
.card-note textarea {
  min-height: 72px;
  font-size: .82rem;
  padding: .55rem .65rem;
  border-radius: 10px;
}
.lock-banner {
  margin: 0 0 .85rem;
  padding: .7rem .85rem;
  border-radius: 12px;
  border: 1px solid rgba(232,197,71,.35);
  background: rgba(184,137,26,.12);
  color: var(--text);
  font-size: .86rem;
  line-height: 1.4;
}
.lock-banner strong { color: var(--gold); }
