/* Scent Alchemist — styles (responsive portrait, phones & tablets) */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: radial-gradient(120% 90% at 50% 10%, #2A1F3D 0%, #160F22 70%);
  font-family: 'Manrope', system-ui, sans-serif;
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

#root {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

/* ── Root container — fills any android phone or tablet portrait ── */
.sa-root {
  position: relative;
  width: 100%;
  max-width: 520px;            /* tablets stay readable, phones fill */
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  --serif: 'Cormorant Garamond', Georgia, serif;
  padding-top: env(safe-area-inset-top);
  padding-bottom: env(safe-area-inset-bottom);
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 30px 80px rgba(0,0,0,0.4);
}

.bg-warm {
  position: absolute; inset: 0;
  background:
    radial-gradient(70% 50% at 70% 10%, rgba(200, 155, 60, 0.22), transparent 60%),
    radial-gradient(60% 50% at 20% 95%, rgba(142, 61, 82, 0.16), transparent 70%),
    repeating-linear-gradient(45deg, rgba(120,90,50,0.025) 0 2px, transparent 2px 6px);
  pointer-events: none;
}

/* ── HUD ─────────────────────────────────────────── */
.hud {
  position: relative; z-index: 2;
  display: flex; gap: 6px; align-items: center;
  padding: 10px 10px 6px;
}
.pill {
  display: flex; align-items: center; gap: 5px;
  background: var(--panel);
  border: 1px solid rgba(45, 27, 61, 0.12);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 1px 3px rgba(45, 27, 61, 0.08);
  border-radius: 999px;
  padding: 5px 10px 5px 8px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.pill-ico { font-size: 12px; opacity: 0.7; }
.pill-val { color: var(--ink); }
.pill-hint { font-size: 10px; opacity: 0.55; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }
.pill-coin .pill-ico { color: var(--accent); }
.pill-rep .pill-ico { color: var(--mark); }
.hud-warn {
  margin-left: auto;
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(45, 27, 61, 0.12);
  background: var(--panel);
  color: var(--ink);
  font-weight: 800;
  font-size: 16px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.hud-warn.on {
  background: #C24545;
  color: #fff;
  border-color: #8a2a2a;
  animation: warnpulse 1.4s ease-in-out infinite;
}
@keyframes warnpulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(194, 69, 69, 0.6); }
  50%      { box-shadow: 0 0 0 6px rgba(194, 69, 69, 0); }
}

/* ── Counter scene ──────────── */
.counter-scene {
  position: relative; z-index: 2;
  margin: 6px 10px 8px;
  height: clamp(210px, 28vh, 280px);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(45, 27, 61, 0.1);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 6px 16px rgba(45,27,61,0.06);
}
.counter-scene.empty {
  height: 90px;
}
.counter-empty-text {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--serif);
  font-style: italic;
  color: rgba(45,27,61,0.5);
}

.counter-bg {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, #DCC392 0%, #C7A06A 60%, #A87B48 100%);
  overflow: hidden;
}

/* Antique apothecary backdrop — PNG fills the wall area, bottom 25% hidden by plank */
.bg-cabinet-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  user-select: none;
  pointer-events: none;
}

/* Fallback SVG backdrop (when PNG missing) */
.bg-cabinet {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.bg-window {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 56%;
  background: linear-gradient(180deg, #F3E0B5 0%, #E8C58A 70%, #D9A86A 100%);
  border: 3px solid #6E4A28;
  border-radius: 60% 60% 6px 6px / 40% 40% 6px 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15), inset 0 0 0 1px rgba(255,255,255,0.4);
}
.bg-window::before, .bg-window::after {
  content: '';
  position: absolute;
  background: #6E4A28;
}
.bg-window::before { top: 0; bottom: 0; left: 50%; width: 2px; transform: translateX(-50%); }
.bg-window::after  { top: 30%; left: 0; right: 0; height: 2px; }
.bg-sconce {
  position: absolute;
  top: 24%;
  width: 10px; height: 24px;
  background: radial-gradient(circle at 50% 30%, #FFE9A8 0%, #E8A86A 60%, transparent 70%);
  filter: blur(0.5px);
}
.sconce-l { left: 8%; }
.sconce-r { right: 8%; }
.bg-shelf-bottle {
  position: absolute;
  bottom: 38%;
  width: 7px; height: 16px;
  border-radius: 2px 2px 3px 3px;
  border: 1px solid rgba(0,0,0,0.3);
  box-shadow: 0 1px 0 rgba(0,0,0,0.2);
  opacity: 0.85;
}

.cust-stage {
  position: absolute;
  left: 18px;
  bottom: 56px;
  display: flex; align-items: flex-end; gap: 10px;
  z-index: 2;
}
.cust-figure {
  filter: drop-shadow(0 4px 8px rgba(45,27,61,0.25));
}
.counter-scene.anim-enter .cust-figure { animation: customerRise 0.6s cubic-bezier(.2,.7,.3,1.3); }
.counter-scene.anim-happy .cust-figure { animation: customerHappy 0.55s ease; }
.counter-scene.anim-angry .cust-figure { animation: customerAngry 0.4s ease; }
.counter-scene.anim-sad .cust-figure   { opacity: 0.85; }
@keyframes customerRise {
  0%   { transform: translateY(110px); opacity: 0; }
  60%  { transform: translateY(-6px); opacity: 1; }
  100% { transform: translateY(0); }
}
@keyframes customerHappy {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px) scale(1.04); }
}
@keyframes customerAngry {
  0%, 100% { transform: translateX(0) rotate(0); }
  25%      { transform: translateX(-6px) rotate(-3deg); }
  75%      { transform: translateX(6px) rotate(3deg); }
}

.speech {
  position: absolute;
  left: -10px;
  top: -28px;
  max-width: 150px;
  background: #FAF3E3;
  border: 1px solid rgba(45,27,61,0.18);
  border-radius: 12px;
  padding: 5px 9px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  line-height: 1.2;
  color: var(--ink);
  box-shadow: 0 3px 8px rgba(45,27,61,0.12);
  animation: speechIn 0.4s 0.4s both ease;
  white-space: nowrap;
}
@keyframes speechIn {
  from { transform: translateY(8px) scale(0.85); opacity: 0; }
  to   { transform: none; opacity: 1; }
}
.speech-arrow {
  position: absolute;
  left: 28px; bottom: -5px;
  width: 9px; height: 9px;
  background: #FAF3E3;
  border-right: 1px solid rgba(45,27,61,0.18);
  border-bottom: 1px solid rgba(45,27,61,0.18);
  transform: rotate(45deg);
}

.counter-plank {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 56px;
  background:
    linear-gradient(180deg, #6B4527 0%, #4D2F18 100%),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.06) 0 1px, transparent 1px 18px);
  background-blend-mode: multiply;
  z-index: 3;
}
.counter-plank-edge {
  position: absolute; top: 0; left: 0; right: 0;
  height: 6px;
  background: linear-gradient(180deg, #A8794A, #6B4527);
  box-shadow: 0 1px 0 rgba(0,0,0,0.3);
}
/* Wooden Counter upgrade — richer oak grain */
.counter-plank.rich {
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(255,210,140,0.18), transparent 60%),
    radial-gradient(ellipse 50% 80% at 70% 50%, rgba(255,210,140,0.14), transparent 60%),
    linear-gradient(180deg, #8A5A30 0%, #6B4527 40%, #3D2210 100%),
    repeating-linear-gradient(90deg, rgba(0,0,0,0.08) 0 1px, transparent 1px 14px);
  background-blend-mode: multiply, multiply, normal, multiply;
  box-shadow: inset 0 2px 0 rgba(255,220,150,0.18), inset 0 -2px 4px rgba(0,0,0,0.3);
}
.counter-plank.rich .counter-plank-edge {
  background: linear-gradient(180deg, #C99564, #8A5A30);
}

/* ── Shop decoration overlays ───────────────────────── */

/* Neon Sign — glows above the window */
.decor-neon {
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
}
.decor-neon-svg {
  display: block;
  width: 140px;
  height: 32px;
  filter: drop-shadow(0 0 4px rgba(255,102,204,0.9))
          drop-shadow(0 0 10px rgba(255,102,204,0.6))
          drop-shadow(0 0 18px rgba(255,102,204,0.3));
  animation: neonFlicker 3.2s ease-in-out infinite;
}
@keyframes neonFlicker {
  0%, 18%, 22%, 25%, 53%, 57%, 100% { opacity: 1; }
  20%, 24%, 55% { opacity: 0.55; }
}

/* Glass Display Shelf — upper-left, behind everything else */
.decor-shelf {
  position: absolute;
  top: 10px;
  left: 8px;
  width: 75px;
  height: 38px;
  z-index: 2;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}

/* VIP Sofa — behind the customer, lower-left */
.decor-sofa {
  position: absolute;
  left: 0;
  bottom: 50px;
  width: 130px;
  height: 90px;
  z-index: 1;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
}

/* Brass Register — sits on counter plank, lower-left of plank */
.decor-register {
  position: absolute;
  left: 8px;
  bottom: 4px;
  width: 52px;
  height: 48px;
  z-index: 5;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5));
}

.order-ticket {
  position: absolute;
  right: 12px;
  bottom: 8px;
  width: 178px;
  background: #FAF3E3;
  border: 1px solid rgba(45,27,61,0.15);
  border-radius: 8px;
  padding: 8px 10px 8px;
  box-shadow: 0 6px 12px rgba(0,0,0,0.25), 0 1px 0 rgba(255,255,255,0.6) inset;
  transform: rotate(-1.5deg);
  z-index: 4;
}
.ticket-tape {
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 50px; height: 16px;
  background: rgba(200, 155, 60, 0.45);
  border: 1px dashed rgba(200, 155, 60, 0.6);
  border-radius: 2px;
}
.ticket-meta {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 2px;
}
.ticket-diff {
  font-size: 10px;
  color: var(--mark);
  letter-spacing: 0.1em;
}
.ticket-diff .dim { opacity: 0.35; }
.order-name {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.0;
  color: var(--ink);
  letter-spacing: 0.01em;
}
.order-tag {
  font-size: 10px;
  font-style: italic;
  font-family: var(--serif);
  color: rgba(45,27,61,0.55);
  margin-bottom: 4px;
}
.order-pay {
  display: flex; gap: 5px; align-items: baseline; flex-wrap: nowrap;
  font-size: 11px;
  margin-top: 2px;
  margin-bottom: 4px;
  white-space: nowrap;
}
.pay-base { font-weight: 800; color: var(--accent); font-size: 13px; }
.pay-plus { color: rgba(45,27,61,0.4); font-weight: 600; }
.pay-tip { color: rgba(45,27,61,0.7); font-weight: 600; font-size: 11px; }
.pay-req {
  margin-left: auto;
  font-size: 9px;
  background: rgba(45,27,61,0.06);
  padding: 1px 6px;
  border-radius: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}
.cust-type {
  font-size: 9px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--mark);
  padding: 1px 6px;
  border: 1px solid rgba(142,61,82,0.3);
  border-radius: 999px;
}
.pat-bar {
  position: relative;
  height: 6px;
  background: rgba(45,27,61,0.08);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 4px;
}
.pat-fill {
  height: 100%;
  background: linear-gradient(90deg, #7ABF8F, #C8B748);
  transition: width 0.2s linear, background 0.3s;
  border-radius: 999px;
}
.pat-bar.danger .pat-fill { background: linear-gradient(90deg, #C8702F, #C24545); }
.pat-bar.danger { animation: barflash 0.6s ease-in-out infinite alternate; }
@keyframes barflash {
  from { box-shadow: 0 0 0 0 rgba(194, 69, 69, 0); }
  to   { box-shadow: 0 0 8px 2px rgba(194, 69, 69, 0.4); }
}
.pat-ticks { position: absolute; inset: 0; pointer-events: none; }
.pat-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,0.4); }

/* ── Workshop / flask ─────────────────────────────── */
.workshop {
  position: relative; z-index: 2;
  margin: 0 10px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.0) 0%, rgba(45,27,61,0.04) 100%),
    var(--panel);
  border: 1px solid rgba(45, 27, 61, 0.1);
  border-radius: 16px;
  padding: 10px 14px 12px;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 6px 16px rgba(45,27,61,0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.workshop-shelf {
  display: flex; align-items: center; gap: 8px;
  height: 22px;
}
.shelf-bar { flex: 1; height: 2px; background: linear-gradient(90deg, transparent, rgba(45,27,61,0.18), transparent); border-radius: 2px; }
.shelf-jars { display: flex; gap: 5px; }
.jar {
  width: 8px; height: 14px;
  border-radius: 2px 2px 4px 4px;
  border: 1px solid rgba(45,27,61,0.25);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.4);
}

.flask-wrap {
  display: grid;
  grid-template-columns: minmax(150px, 170px) 1fr;
  align-items: center;
  gap: 12px;
}
.flask-wrap.shake { animation: shake 0.4s ease-in-out; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px) rotate(-1deg); }
  40% { transform: translateX(5px) rotate(1deg); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(3px); }
}
.flask-svg {
  filter: drop-shadow(0 8px 16px rgba(45,27,61,0.15));
  width: 100%;
  height: auto;
  max-width: 170px;
}
.sparkle { animation: sparkfade 0.32s ease-out; }
@keyframes sparkfade {
  from { opacity: 1; transform: translateY(0); }
  to   { opacity: 0; transform: translateY(-12px); }
}

.mix-readout {
  background: rgba(45,27,61,0.03);
  border-radius: 12px;
  padding: 10px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
}
.mix-readout-head {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: rgba(45,27,61,0.55);
  margin-bottom: 6px;
}
.mix-total { font-size: 11px; color: var(--ink); }
.mix-rows { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.mix-row {
  display: grid;
  grid-template-columns: 12px 1fr auto auto;
  gap: 6px;
  align-items: center;
  font-size: 12px;
}
.mix-sw {
  width: 12px; height: 12px;
  border-radius: 3px;
  border: 1px solid;
}
.mix-name { color: var(--ink); }
.mix-cur { font-weight: 700; font-variant-numeric: tabular-nums; }
.mix-tgt {
  font-size: 11px;
  color: rgba(45,27,61,0.5);
  font-variant-numeric: tabular-nums;
}
.mix-tgt.good { color: #2B7A4B; font-weight: 700; }
.mix-empty {
  font-family: var(--serif);
  font-style: italic;
  font-size: 12px;
  color: rgba(45,27,61,0.5);
  text-align: center;
  padding: 20px 8px;
}

/* ── Ingredient buttons ──────────────────────────── */
.ing-grid {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 10px 10px 0;
}
/* Essences are the 6 mixable ingredients — 3×2 grid looks balanced. */
.ing-grid-essences { grid-template-columns: repeat(3, 1fr); }
.ing-btn {
  background: var(--panel);
  border: 1px solid rgba(45, 27, 61, 0.1);
  border-radius: 12px;
  padding: 6px 4px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  cursor: pointer;
  position: relative;
  transition: transform 0.1s ease;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
  min-height: 70px;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ing-btn:active { transform: scale(0.96); }
.ing-btn.bounce { animation: ingbounce 0.22s ease; }
@keyframes ingbounce {
  0%, 100% { transform: translateY(0); }
  40%      { transform: translateY(-5px) scale(1.05); }
}
.ing-btn.out { opacity: 0.4; cursor: not-allowed; }
.ing-btn.out::after {
  content: ''; position: absolute; left: 6px; right: 6px; top: 50%;
  height: 1.5px; background: rgba(194, 69, 69, 0.7); transform: rotate(-18deg);
}
.ing-btn.dim { opacity: 0.55; cursor: default; }
.ing-meta {
  display: flex; flex-direction: column; align-items: center;
  font-size: 9px;
  line-height: 1.1;
}
.ing-short {
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.02em;
}
.ing-stock {
  font-size: 9px;
  font-variant-numeric: tabular-nums;
  color: rgba(45,27,61,0.55);
}
.ing-stock.low { color: #C8702F; font-weight: 700; }
.ing-stock.out { color: #C24545; font-weight: 700; }

/* ── Action bar ──────────────────────────────────── */
.action-bar {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: 1fr 1fr 1.6fr 1fr 1fr;
  gap: 6px;
  padding: 10px;
  margin-top: auto;
}
.action-bar-6 {
  grid-template-columns: 1fr 1fr 1fr 1.6fr 1fr 1fr;
}
.action-bar-6 .act { font-size: 9px; height: 54px; padding: 0 2px; }
.action-bar-6 .act-ico { font-size: 16px; }
.act {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid rgba(45, 27, 61, 0.1);
  background: var(--panel);
  color: var(--ink);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 2px 6px rgba(45,27,61,0.06);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.act:disabled { opacity: 0.45; cursor: not-allowed; }
.act-ico { font-size: 18px; line-height: 1; opacity: 0.85; font-weight: 400; }
.act-primary {
  background: linear-gradient(180deg, #D7AB58, #B5862E);
  color: #fff;
  border-color: #8E641E;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 10px rgba(180, 130, 50, 0.4);
}
.act-primary:disabled { background: rgba(45,27,61,0.1); color: rgba(45,27,61,0.4); box-shadow: none; }
.act-primary .act-ico { opacity: 1; }
.act-alert {
  background: linear-gradient(180deg, #E8B486, #C8702F);
  color: #fff;
  border-color: #944C18;
}
.act-badge {
  position: absolute;
  top: -6px;
  right: -4px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
  padding: 2px 6px;
  border-radius: 999px;
  background: #FAF3E3;
  color: #2D1B3D;
  border: 1px solid rgba(45,27,61,0.2);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.act-badge.low {
  background: #E8B486;
  color: #4A2A10;
  border-color: #944C18;
}
.act-badge.out {
  background: #C24545;
  color: #fff;
  border-color: #8a2a2a;
  animation: warnpulse 1.4s ease-in-out infinite;
}
.act { position: relative; } /* badge needs positioning context */

/* ── Sheets / modals ─────────────────────────────── */
.sheet-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 12, 30, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 10;
  animation: fadein 0.2s ease;
}
@keyframes fadein {
  from { opacity: 0; } to { opacity: 1; }
}
.sheet {
  width: 100%;
  max-height: 86%;
  background: var(--panel);
  border-radius: 18px 18px 0 0;
  border-top: 3px solid var(--accent);
  box-shadow: 0 -20px 40px rgba(0,0,0,0.3);
  display: flex; flex-direction: column;
  animation: slideup 0.32s cubic-bezier(.2,.7,.3,1);
}
@keyframes slideup {
  from { transform: translateY(40%); opacity: 0.6; }
  to   { transform: translateY(0); opacity: 1; }
}
.sheet-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px 8px;
}
.sheet-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  color: var(--ink);
}
.sheet-sub {
  font-size: 11px;
  font-style: italic;
  font-family: var(--serif);
  color: rgba(45,27,61,0.55);
}
.sheet-close {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid rgba(45,27,61,0.15);
  background: var(--panel);
  font-size: 14px;
  cursor: pointer;
}
.sheet-body {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 4px 16px 18px;
}

/* recipe book */
.recipe-list { display: flex; flex-direction: column; gap: 10px; }
.recipe-card {
  border: 1px solid rgba(45,27,61,0.1);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
}
.recipe-card.active {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200, 155, 60, 0.18);
}
.recipe-card.locked { opacity: 0.55; cursor: default; }
.recipe-card-head { display: flex; justify-content: space-between; align-items: flex-start; }
.recipe-name { font-family: var(--serif); font-size: 19px; font-weight: 600; line-height: 1.1; }
.recipe-tag { font-size: 11px; font-style: italic; font-family: var(--serif); color: rgba(45,27,61,0.55); }
.recipe-meta { text-align: right; font-size: 11px; }
.diff { font-size: 11px; color: var(--mark); letter-spacing: 0.1em; }
.diff .dim { opacity: 0.35; }
.rec-base { font-weight: 700; color: var(--accent); font-size: 13px; }
.ratio-bar {
  display: flex; height: 24px;
  border-radius: 6px;
  overflow: hidden;
  margin-top: 8px;
  border: 1px solid rgba(45,27,61,0.1);
}
.ratio-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700;
  color: rgba(45,27,61,0.7);
  border-right: 1px solid rgba(255,255,255,0.4);
  min-width: 20px;
}
.ratio-seg:last-child { border-right: 0; }
.ratio-legend {
  margin-top: 6px;
  display: flex; flex-wrap: wrap; gap: 6px 10px;
  font-size: 11px;
}
.leg { display: inline-flex; align-items: center; gap: 4px; }
.leg-sw { width: 10px; height: 10px; border: 1px solid; border-radius: 3px; }
.lock-row {
  font-size: 12px;
  margin-top: 6px;
  color: rgba(45,27,61,0.55);
  font-style: italic;
}

/* restock */
.restock-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.restock-row {
  display: grid;
  grid-template-columns: 14px 1fr auto auto auto;
  gap: 8px;
  align-items: center;
  padding: 8px 8px;
  border: 1px solid rgba(45,27,61,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.4);
}
.ing-sw { width: 14px; height: 14px; border-radius: 4px; border: 1px solid; }
.restock-info { min-width: 0; }
.rs-name { font-size: 13px; font-weight: 600; line-height: 1.1; }
.rs-stock { font-size: 11px; color: rgba(45,27,61,0.6); font-variant-numeric: tabular-nums; }
.dim { opacity: 0.5; }
.rs-cost { font-size: 12px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }

/* upgrades */
.upg-list { display: flex; flex-direction: column; gap: 8px; }
.upg-card {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(45,27,61,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.4);
}
.upg-card.owned { background: rgba(122, 191, 143, 0.16); border-color: rgba(43, 122, 75, 0.3); }
.upg-glyph {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(160deg, #F5DCA2, #C89B3C);
  color: #5A3D14;
  border-radius: 10px;
  font-size: 20px;
  font-weight: 700;
}
.upg-name { font-family: var(--serif); font-size: 16px; font-weight: 600; line-height: 1.05; }
.upg-desc { font-size: 11px; color: rgba(45,27,61,0.7); }
.upg-effect {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--mark);
  font-weight: 700;
  margin-top: 2px;
}

/* generic buttons */
.btn {
  border: 1px solid rgba(45,27,61,0.15);
  background: var(--panel);
  border-radius: 10px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 12px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--ink);
}
.btn:disabled { opacity: 0.4; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #D7AB58, #B5862E); color: #fff; border-color: #8E641E; }
.btn-ghost   { background: transparent; }
.btn-amber   { background: linear-gradient(180deg, #B5862E, #8E641E); color: #fff; border-color: #5A3D14; }
.btn.thin    { padding: 6px 10px; font-size: 11px; }
.btn.wide    { width: 100%; padding: 12px; font-size: 13px; }

/* result */
.result-card {
  width: 86%;
  max-width: 340px;
  margin: 0 auto 16%;
  background: var(--panel);
  border-radius: 20px;
  padding: 18px 18px 16px;
  text-align: center;
  border: 2px solid var(--accent, #C89B3C);
  box-shadow: 0 0 0 6px rgba(255,255,255,0.06), 0 0 40px var(--glow, #fff);
  animation: popin 0.4s cubic-bezier(.2,.7,.3,1.3);
}
@keyframes popin {
  from { transform: scale(0.7); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}
.result-tier {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.result-score { display: flex; justify-content: center; margin: 4px 0 8px; }
.result-reason {
  font-size: 11px;
  font-style: italic;
  font-family: var(--serif);
  color: rgba(45,27,61,0.65);
  margin-bottom: 10px;
}
.result-rows {
  display: flex; flex-direction: column; gap: 6px;
  background: rgba(45,27,61,0.04);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.result-row {
  display: flex; justify-content: space-between;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.result-row strong { font-weight: 800; }

/* tutorial */
.tut-backdrop {
  position: absolute; inset: 0;
  background: rgba(20, 12, 30, 0.65);
  z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  cursor: pointer;
}
.tut-card {
  background: var(--panel);
  border-radius: 18px;
  border: 2px solid var(--accent);
  padding: 20px 22px;
  max-width: 320px;
  text-align: center;
  cursor: default;
  animation: popin 0.3s ease;
}
.tut-step {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--mark);
  font-weight: 700;
  margin-bottom: 6px;
}
.tut-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 8px;
}
.tut-body {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(45,27,61,0.75);
  margin-bottom: 14px;
}
.tut-actions { display: flex; gap: 8px; justify-content: center; }

/* floaters */
.floaters {
  position: absolute; inset: 0;
  z-index: 8;
  pointer-events: none;
}
.floater {
  position: absolute;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(255,255,255,0.6);
  animation: floatup 1.3s cubic-bezier(.2,.7,.3,1) forwards;
}
.f-coin { color: var(--accent); }
.f-perfect { color: #2B7A4B; font-size: 22px; }
.f-warn { color: #C8702F; font-size: 14px; }
@keyframes floatup {
  0%   { transform: translateY(0); opacity: 0; }
  20%  { opacity: 1; }
  100% { transform: translateY(-50px); opacity: 0; }
}

/* ── Result: customer review quote ────────────────── */
.result-review {
  position: relative;
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.45;
  color: var(--ink);
  padding: 12px 18px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.55), rgba(255,255,255,0.25));
  border: 1px solid rgba(45,27,61,0.08);
  border-radius: 10px;
  margin-bottom: 14px;
  text-align: left;
}
.review-quote-mark {
  font-family: var(--serif);
  font-size: 26px;
  line-height: 0;
  vertical-align: -8px;
  color: var(--accent);
  margin-right: 2px;
  font-style: normal;
}
.review-quote-mark.closing { margin-left: 2px; margin-right: 0; }
.review-attrib {
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(45,27,61,0.5);
  margin-top: 6px;
  font-weight: 700;
  text-align: right;
}

/* Dev panel inside Upgrades */
.dev-panel {
  margin-top: 22px;
  padding: 12px;
  border-radius: 12px;
  background:
    repeating-linear-gradient(45deg, rgba(168,80,168,0.08) 0 8px, rgba(168,80,168,0.04) 8px 16px),
    rgba(45,27,61,0.06);
  border: 1px dashed rgba(168, 80, 168, 0.5);
}
.dev-panel-label {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #8B4D8B;
  margin-bottom: 8px;
  text-align: center;
}
.dev-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.dev-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid rgba(168, 80, 168, 0.4);
  background: rgba(255,255,255,0.5);
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  gap: 2px;
}
.dev-btn:active { transform: scale(0.97); background: rgba(168,80,168,0.12); }
.dev-btn small {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(45,27,61,0.5);
}

/* Day report prep row */
.day-prep-label {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(45,27,61,0.5);
  font-weight: 700;
  text-align: center;
  margin-bottom: 6px;
}
.day-prep-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.day-prep-btn {
  padding: 12px 8px;
  text-align: center;
  border-radius: 10px;
  border: 1px solid rgba(45,27,61,0.2);
}

/* Upgrade section labels (tools vs decor) */
.upg-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(45,27,61,0.6);
  font-weight: 800;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(45,27,61,0.15);
  margin-bottom: 8px;
}

/* ── Blind order ticket ──────────────────────────── */
.order-ticket.blind {
  background: linear-gradient(170deg, #FAF3E3 0%, #F0E3CC 100%);
  border-color: rgba(142,61,82,0.4);
}
.blind-title {
  display: flex; align-items: center; gap: 6px;
  letter-spacing: 0.08em;
}
.blind-tag {
  display: inline-block;
  font-size: 8px; font-weight: 800;
  letter-spacing: 0.14em;
  background: var(--mark);
  color: #fff;
  padding: 2px 5px;
  border-radius: 4px;
}
.order-brief {
  font-family: var(--serif);
  font-style: italic;
  font-size: 11px;
  color: rgba(45,27,61,0.8);
  line-height: 1.25;
  margin: 3px 0 4px;
}

/* ── Recipe tag chips ────────────────────────────── */
.tag-row {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin-top: 8px;
}
.tag-chip {
  font-size: 9px;
  text-transform: lowercase;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(142,61,82,0.1);
  color: var(--mark);
  border: 1px solid rgba(142,61,82,0.2);
}

/* ── Result: blind reveal ─────────────────────────── */
.result-reveal {
  font-size: 11px;
  margin-top: -4px;
  margin-bottom: 10px;
  color: rgba(45,27,61,0.75);
}
.result-reveal strong {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  color: var(--mark);
}

/* ── Rescue sheet ────────────────────────────────── */
.rescue-limit {
  font-size: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  line-height: 1.4;
  border: 1px solid;
}
.rescue-limit.available {
  background: rgba(110, 142, 62, 0.1);
  border-color: rgba(110, 142, 62, 0.3);
  color: #3d5b1f;
}
.rescue-limit.used {
  background: rgba(194, 69, 69, 0.08);
  border-color: rgba(194, 69, 69, 0.3);
  color: #7A2D2D;
}
.rescue-limit strong { font-weight: 800; }

.rescue-row:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.rescue-section-label {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(45,27,61,0.55);
  font-weight: 700;
  margin: 2px 0 6px;
}
.rescue-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.rescue-row {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  gap: 8px; align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(45,27,61,0.08);
  border-radius: 10px;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.rescue-row:active { transform: scale(0.98); }
.rescue-info { min-width: 0; }
.rescue-pourback {
  font-size: 11px; font-weight: 700;
  color: #6E8E3E;
  padding: 4px 8px;
  background: rgba(110,142,62,0.12);
  border: 1px solid rgba(110,142,62,0.3);
  border-radius: 8px;
}
.rescue-empty {
  font-family: var(--serif); font-style: italic;
  font-size: 12px; color: rgba(45,27,61,0.5);
  text-align: center; padding: 16px 8px;
  margin-bottom: 12px;
}
.rescue-divider {
  height: 1px; background: rgba(45,27,61,0.1);
  margin: 14px 0;
}
.rescue-budget {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(180,130,50,0.3);
  border-radius: 10px;
  background: rgba(200,155,60,0.08);
}
.rescue-budget-info { flex: 1; min-width: 0; }

/* ── Day-end report ──────────────────────────────── */
.day-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 14px;
}
.day-stat {
  text-align: center;
  padding: 10px 4px;
  border: 1px solid rgba(45,27,61,0.1);
  border-radius: 10px;
  background: rgba(255,255,255,0.45);
}
.day-stat-num {
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  line-height: 1;
  color: var(--ink);
}
.day-stat-lbl {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(45,27,61,0.55);
  font-weight: 700;
  margin-top: 4px;
}
.day-rows {
  display: flex; flex-direction: column; gap: 6px;
  background: rgba(45,27,61,0.04);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 14px;
}
.day-row {
  display: flex; justify-content: space-between;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}
.day-row.total {
  font-weight: 700;
  padding-top: 6px;
  border-top: 1px dashed rgba(45,27,61,0.15);
  color: var(--accent);
}
.day-row strong { font-weight: 800; }

/* ── Serving scene overlay ──────────────────────── */
.serve-overlay {
  position: absolute; inset: 0;
  background: radial-gradient(60% 50% at 50% 45%, rgba(20,12,30,0.7) 0%, rgba(20,12,30,0.85) 100%);
  backdrop-filter: blur(3px);
  z-index: 12;
  display: flex; align-items: center; justify-content: center;
  animation: fadein 0.25s ease;
}
.phase-seal { cursor: pointer; }
.serve-stage {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  filter: drop-shadow(0 12px 24px rgba(0,0,0,0.4));
}
.serve-caption {
  font-family: var(--serif, 'Cormorant Garamond', serif);
  font-style: italic;
  font-size: 15px;
  color: #FAF3E3;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}
.tap-hint {
  display: inline-block;
  margin-left: 8px;
  font-style: normal;
  font-size: 12px;
  opacity: 0.7;
  animation: tapHintBob 1s ease-in-out infinite;
}
@keyframes tapHintBob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(3px); }
}

/* pour: liquid rises from below visible band */
@keyframes pourFill {
  0%   { transform: translateY(120px); }
  100% { transform: translateY(0); }
}
.pour-fill { animation: pourFill 1.2s cubic-bezier(.25,.8,.4,1) forwards; }
.static-fill { transform: translateY(0); }
.meniscus { opacity: 0; animation: meniscusShow 0.4s ease-out 1.0s forwards; }
@keyframes meniscusShow { from { opacity: 0; } to { opacity: 0.4; } }

/* pour stream */
@keyframes pourStream {
  0%   { opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { opacity: 0; }
}
.pour-stream { animation: pourStream 1.2s ease-in-out; transform-origin: top; }

/* wax */
@keyframes waxPulse {
  0%, 100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(168,80,96,0)); }
  50%      { transform: scale(1.08); filter: drop-shadow(0 0 8px rgba(168,80,96,0.6)); }
}
.wax-pulse { animation: waxPulse 0.9s ease-in-out infinite; transform-origin: 100px 38px; }
@keyframes waxLand {
  0%   { transform: scale(0.4) translateY(-8px); opacity: 0; }
  60%  { transform: scale(1.1) translateY(2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.wax-set { animation: waxLand 0.35s cubic-bezier(.2,.7,.3,1.3) both; transform-origin: 100px 38px; }

/* aging sparkles */
@keyframes ageSpark {
  0%, 100% { opacity: 0; transform: translateY(0); }
  50%      { opacity: 0.9; transform: translateY(-10px); }
}
.age-spark    { animation: ageSpark 1.5s ease-in-out infinite; }
.age-spark.s2 { animation-delay: 0.3s; }
.age-spark.s3 { animation-delay: 0.6s; }
.age-spark.s4 { animation-delay: 0.9s; }

/* discard-into-bin sequence */

/* Bottle arcs from upper-left toward the bin, rotates, then drops in & vanishes */
@keyframes trashArc {
  0%   { transform: translate(-40px, -10px) rotate(-25deg) scale(1); opacity: 0; }
  10%  { transform: translate(-40px, -10px) rotate(-25deg) scale(1); opacity: 1; }
  40%  { transform: translate(-20px, -30px) rotate(20deg)  scale(0.95); opacity: 1; }
  58%  { transform: translate(-4px,  6px)   rotate(75deg)  scale(0.8);  opacity: 1; }
  68%  { transform: translate(0,    32px)   rotate(110deg) scale(0.55); opacity: 1; }
  74%  { transform: translate(0,    52px)   rotate(140deg) scale(0.35); opacity: 0; }
  100% { transform: translate(0,    52px)   rotate(140deg) scale(0.35); opacity: 0; }
}
.trash-bottle {
  animation: trashArc 1.8s cubic-bezier(.4,.2,.7,1) forwards;
  transform-origin: 50% 50%;
  transform-box: fill-box;
}

/* Lid hinges at the right rim — opens to receive, then slams shut with a bounce */
@keyframes lidFlip {
  0%   { transform: rotate(0deg); }
  8%   { transform: rotate(-20deg); }
  22%  { transform: rotate(-68deg); }
  62%  { transform: rotate(-68deg); }
  74%  { transform: rotate(8deg); }    /* slam past */
  82%  { transform: rotate(-6deg); }   /* bounce */
  90%  { transform: rotate(3deg); }
  100% { transform: rotate(0deg); }
}
.bin-lid {
  animation: lidFlip 1.8s cubic-bezier(.4,.1,.3,1) forwards;
  transform-origin: 100% 50%;
  transform-box: fill-box;
}

/* Bin shudders when bottle hits */
@keyframes binBounce {
  0%, 66% { transform: translateY(0); }
  70%     { transform: translateY(4px); }
  78%     { transform: translateY(0); }
  82%     { transform: translateY(2px); }
  100%    { transform: translateY(0); }
}
.bin-body {
  animation: binBounce 1.8s ease-out forwards;
}

/* Dust puff on impact */
@keyframes trashPuff {
  0%, 60%  { opacity: 0; transform: translateY(0) scale(0.4); }
  70%      { opacity: 0.7; transform: translateY(-4px) scale(1); }
  90%      { opacity: 0; transform: translateY(-12px) scale(1.3); }
  100%     { opacity: 0; }
}
.trash-puff {
  animation: trashPuff 1.8s ease-out forwards;
  transform-origin: 110px 138px;
  transform-box: fill-box;
}

/* ── Settings sheet ──────────────────────────────── */
.settings-list { display: flex; flex-direction: column; gap: 10px; }
.settings-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px;
  border: 1px solid rgba(45,27,61,0.1);
  border-radius: 12px;
  background: rgba(255,255,255,0.4);
}
.settings-info { flex: 1; min-width: 0; }
.settings-name {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
  margin-bottom: 2px;
}
.settings-desc {
  font-size: 11px;
  color: rgba(45,27,61,0.7);
  line-height: 1.4;
}
.toggle {
  flex-shrink: 0;
  width: 44px; height: 26px;
  border-radius: 999px;
  background: rgba(45,27,61,0.18);
  border: 1px solid rgba(45,27,61,0.2);
  position: relative;
  cursor: pointer;
  transition: background 0.2s ease;
  padding: 0;
}
.toggle.on {
  background: var(--accent);
  border-color: rgba(0,0,0,0.15);
}
.toggle-knob {
  position: absolute;
  top: 2px; left: 2px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  transition: transform 0.2s ease;
}
.toggle.on .toggle-knob {
  transform: translateX(18px);
}
.hardmode-tag {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #fff;
  background: var(--mark);
  padding: 2px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

/* HUD gear + back buttons */
.hud-gear,
.hud-back {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(45, 27, 61, 0.12);
  background: var(--panel);
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  -webkit-tap-highlight-color: transparent;
}
.hud-gear { margin-left: 4px; }
.hud-back { margin-right: 4px; font-size: 22px; line-height: 1; padding-bottom: 3px; }
.hud-gear:active, .hud-back:active { transform: scale(0.94); }

/* Settings section labels */
.settings-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: rgba(45,27,61,0.55);
  font-weight: 800;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px dashed rgba(45,27,61,0.15);
}
.settings-soon {
  display: inline-block;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: rgba(45,27,61,0.12);
  color: rgba(45,27,61,0.7);
  padding: 2px 5px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

/* Dev grid — 2 columns now */
.dev-grid {
  grid-template-columns: 1fr 1fr !important;
}

/* ── Start screen ───────────────────────────────────── */
.start-screen {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: var(--bg);
}
.start-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  pointer-events: none;
  user-select: none;
  transform: scale(1.15);
  filter: blur(2px) brightness(0.7) saturate(0.95);
}
.start-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 38%, transparent 0%, rgba(20, 12, 30, 0.55) 100%),
    linear-gradient(180deg, rgba(20,12,30,0.55) 0%, rgba(20,12,30,0.25) 40%, rgba(20,12,30,0.7) 100%);
}
.start-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 32px 28px;
  max-width: 320px;
  width: 100%;
  text-align: center;
}
.start-flask {
  width: 92px;
  height: 110px;
  filter: drop-shadow(0 8px 20px rgba(200,155,60,0.5));
  margin-bottom: 14px;
}
.start-title {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-weight: 600;
  font-size: 44px;
  line-height: 1;
  color: #FAF3E3;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5), 0 0 30px rgba(200,155,60,0.4);
  margin: 0 0 6px;
  letter-spacing: 0.01em;
}
.start-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 14px;
  color: rgba(250, 243, 227, 0.75);
  margin: 0 0 28px;
  letter-spacing: 0.04em;
}
.start-confirm {
  font-family: var(--serif, 'Cormorant Garamond', serif);
  font-style: italic;
  font-size: 13px;
  color: #FFD5C2;
  margin-bottom: 12px;
  padding: 8px 14px;
  background: rgba(194, 69, 69, 0.18);
  border: 1px solid rgba(194, 69, 69, 0.45);
  border-radius: 10px;
}
.start-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.start-btn {
  display: block;
  width: 100%;
  padding: 14px 18px;
  font-family: 'Manrope', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  background: rgba(250, 243, 227, 0.92);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transition: transform 0.1s ease;
}
.start-btn:hover { background: #FAF3E3; }
.start-btn:active { transform: scale(0.98); }
.start-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  background: rgba(250, 243, 227, 0.5);
}
.start-btn.primary {
  background: linear-gradient(180deg, #D7AB58, #B5862E);
  color: #fff;
  border-color: #8E641E;
  box-shadow: 0 4px 14px rgba(180, 130, 50, 0.5);
}
.start-btn.primary:disabled { background: rgba(120, 100, 75, 0.45); color: rgba(255,255,255,0.5); }
.start-btn.ghost {
  background: rgba(250, 243, 227, 0.18);
  color: #FAF3E3;
  border-color: rgba(255,255,255,0.25);
  box-shadow: none;
}
.start-btn.ghost:hover { background: rgba(250, 243, 227, 0.28); }
.start-btn.danger {
  background: linear-gradient(180deg, #D26060, #A33030);
  color: #fff;
  border-color: #7A2020;
  box-shadow: 0 4px 14px rgba(194,69,69,0.5);
}
.start-footer {
  margin-top: 22px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: rgba(250, 243, 227, 0.45);
}

/* Tablet portrait: roomier type */
@media (min-width: 480px) {
  .order-name { font-size: 24px; }
  .sheet-title { font-size: 24px; }
  .recipe-name { font-size: 20px; }
  .ing-btn { min-height: 78px; }
  .act { height: 60px; font-size: 11px; }
}

/* Very small phones */
@media (max-width: 340px) {
  .flask-wrap { grid-template-columns: 130px 1fr; gap: 8px; }
  .flask-svg { max-width: 130px; }
  .order-ticket { width: 158px; }
  .order-name { font-size: 20px; }
}
