/* ── Bundle Deal Builder — bento lunch counter ──────────────────────
   Rice-paper white, persimmon lid-sticker headline, lacquer bento
   tray with three compartments that fill and wiggle, menu chips
   with line icons, chopstick divider, wooden tray code card. */

:root {
  --rice: #faf7f0;
  --rice-deep: #f2ecdf;
  --lacquer: #5a3a28;
  --lacquer-deep: #462c1d;
  --persimmon: #e8613c;
  --persimmon-deep: #c74c2b;
  --matcha: #7d9d6a;
  --ink: #33302b;
  --ink-soft: #8d867b;
  --err: #cf4a33;
  --sans: 'Poppins', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

.hidden { display: none !important; }

body {
  font-family: var(--sans);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: linear-gradient(180deg, var(--rice), var(--rice-deep));
  background-attachment: fixed;
  min-height: 100vh;
}

.lunch-counter { min-height: 100vh; display: flex; flex-direction: column; }

.wrap { width: 100%; max-width: 560px; margin: 0 auto; padding: 0 24px; }

main { flex: 1 0 auto; padding-bottom: 60px; }

/* ── Hero ─────────────────────────────────────────────────────────── */
.hero { position: relative; text-align: center; padding: 50px 24px 8px; }

.hanko {
  position: absolute;
  top: 34px;
  right: 10%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 62px;
  height: 62px;
  font-weight: 800;
  font-size: 0.72rem;
  line-height: 1.15;
  text-transform: uppercase;
  color: #fff;
  background: var(--persimmon);
  border-radius: 8px;
  transform: rotate(8deg);
  box-shadow: 0 4px 12px rgba(232, 97, 60, 0.4);
}

.kicker {
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--matcha);
  margin-bottom: 12px;
}

.hero h1 {
  font-weight: 800;
  font-size: clamp(2rem, 8vw, 3.1rem);
  line-height: 1.1;
  color: var(--ink);
}

.lid {
  display: inline-block;
  color: #fff;
  background: var(--persimmon);
  border-radius: 14px;
  padding: 0 18px 4px;
  transform: rotate(-1.5deg);
}

.sub { color: var(--ink-soft); max-width: 420px; margin: 14px auto 0; font-weight: 500; }

/* ── Bento tray ───────────────────────────────────────────────────── */
.tray-stage { margin-top: 26px; }

.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  background: linear-gradient(165deg, var(--lacquer), var(--lacquer-deep));
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 16px 36px rgba(70, 44, 29, 0.35), inset 0 2px 0 rgba(255, 255, 255, 0.15);
}

.compartment {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(250, 247, 240, 0.12);
  border-radius: 12px;
  box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.4);
  color: rgba(250, 247, 240, 0.55);
  text-align: center;
  padding: 8px;
  transition: background 0.2s ease;
}

.slot-hint {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.compartment.filled {
  background: rgba(250, 247, 240, 0.92);
  color: var(--ink);
  animation: wiggle 0.45s ease;
}

@keyframes wiggle {
  0% { transform: scale(0.8) rotate(-4deg); }
  55% { transform: scale(1.08) rotate(3deg); }
  100% { transform: scale(1) rotate(0); }
}

.compartment .item-icon { font-size: 1.7rem; line-height: 1; }

.compartment .item-name { font-weight: 700; font-size: 0.72rem; line-height: 1.25; }

/* ── Chopstick rule ───────────────────────────────────────────────── */
.chopstick-rule {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
  margin: 24px auto;
}

.chopstick-rule span {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lacquer), #8a6647 60%, var(--lacquer));
}

.chopstick-rule span:last-child { transform: rotate(1.6deg); }

/* ── Menu ─────────────────────────────────────────────────────────── */
.menu-label {
  font-weight: 700;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  text-align: center;
  margin-bottom: 14px;
}

.menu {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.menu-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  background: #fff;
  border: 2px solid #e8e1d2;
  border-radius: 12px;
  padding: 12px 14px;
  cursor: pointer;
  transition: all 0.14s ease;
}

.menu-chip .chip-icon { font-size: 1.25rem; }

.menu-chip:hover:not(:disabled) { border-color: var(--persimmon); transform: translateY(-2px); }

.menu-chip.in-box {
  border-color: var(--persimmon);
  background: rgba(232, 97, 60, 0.08);
  box-shadow: 0 3px 0 rgba(232, 97, 60, 0.25);
}

.menu-chip:disabled { opacity: 0.45; cursor: not-allowed; }
.menu-chip.in-box:disabled { opacity: 1; cursor: pointer; }

/* ── Claim ────────────────────────────────────────────────────────── */
.claim {
  background: #fff;
  border: 2px solid #e8e1d2;
  border-radius: 16px;
  padding: 24px 26px 22px;
  margin-top: 24px;
}

.field { margin-bottom: 14px; }

label {
  display: block;
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: var(--lacquer);
}

input[type="email"] {
  width: 100%;
  padding: 13px 15px;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1rem;
  color: var(--ink);
  background: var(--rice);
  border: 2px solid #e8e1d2;
  border-radius: 10px;
  transition: border-color 0.15s ease;
}

input:focus { outline: none; border-color: var(--persimmon); }
input.error { border-color: var(--err); }
input::placeholder { color: #c1b8a6; }

/* ── Button ───────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fff;
  background: linear-gradient(180deg, var(--persimmon), var(--persimmon-deep));
  border: none;
  border-radius: 12px;
  padding: 16px 32px;
  cursor: pointer;
  transition: transform 0.12s ease;
  box-shadow: 0 5px 0 #9a3a20;
}

.btn:hover:not(:disabled) { transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn:focus-visible { outline: 3px solid var(--matcha); outline-offset: 3px; }

.btn-block { width: 100%; }

.form-error { color: var(--err); font-weight: 700; text-align: center; margin-top: 12px; }

.spinner {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Code tray ────────────────────────────────────────────────────── */
.code-tray { text-align: center; margin-top: 24px; }

.wood-card {
  display: inline-block;
  background:
    repeating-linear-gradient(90deg, transparent 0 46px, rgba(70, 44, 29, 0.08) 46px 48px),
    linear-gradient(180deg, #d9b98c, #c8a271);
  border-radius: 14px;
  padding: 30px 36px 26px;
  min-width: 280px;
  box-shadow: 0 16px 34px rgba(70, 44, 29, 0.3), inset 0 2px 0 rgba(255, 255, 255, 0.35);
}

.wc-label {
  font-weight: 800;
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--lacquer);
  margin-bottom: 8px;
}

.wc-code {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(1.6rem, 8vw, 2.2rem);
  letter-spacing: 0.08em;
  color: var(--lacquer-deep);
  word-break: break-all;
}

.copy-btn {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  background: var(--persimmon);
  border: none;
  border-radius: 999px;
  padding: 10px 26px;
  cursor: pointer;
  margin-top: 14px;
  transition: transform 0.12s ease;
  box-shadow: 0 4px 0 #9a3a20;
}

.copy-btn:hover { transform: translateY(-1px); }

.expires { font-size: 0.74rem; color: var(--lacquer); margin-top: 10px; font-weight: 700; }

.picks-line { font-weight: 600; font-size: 0.85rem; color: var(--lacquer); margin-top: 12px; }

.after-line { color: var(--ink-soft); font-weight: 500; max-width: 380px; margin: 20px auto 0; }

/* ── Footer ───────────────────────────────────────────────────────── */
.foot {
  text-align: center;
  padding: 30px 20px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-weight: 500;
}

#wbx-powered-by-slot { margin-top: 12px; }

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 480px) {
  .menu { grid-template-columns: 1fr; }
  .hanko { width: 52px; height: 52px; font-size: 0.62rem; right: 5%; }
  .wood-card { min-width: 0; width: 100%; }
}
