:root {
  --paper: #f5ead2;
  --muted: rgba(245, 234, 210, .58);
  --gold: #d8ae5f;
  --panel: rgba(20, 10, 14, .88);
  --wine: #8c263e;
  --danger: #e28190;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
}

html, body {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  touch-action: none;
  background: #0d080a;
  color: var(--paper);
  font-family: Georgia, "Times New Roman", serif;
}

input, select, textarea, button, a {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
}

button, .chip-btn, .mode-card, .pick-card, .level-card, .power-btn, .icon-btn, .primary-button, .secondary-button {
  -webkit-appearance: none;
  appearance: none;
  touch-action: manipulation;
  cursor: pointer;
}

body.lefty .controls { flex-direction: row-reverse; }
body.lefty .powerups { left: auto; right: max(12px, var(--safe-r)); }
body.lefty .bottle-meter { left: max(14px, var(--safe-l)); right: auto; }
body.reduced-fx #game { image-rendering: auto; }

#game {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}

.game-ui {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hud {
  position: absolute;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: max(12px, var(--safe-t)) max(14px, var(--safe-r)) 8px max(14px, var(--safe-l));
  background: linear-gradient(to bottom, rgba(8,4,6,.78), transparent);
}

.hud-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-right: auto;
  font: 700 10px/1 Arial, sans-serif;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.hud-seal {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border: 1px solid rgba(216,174,95,.65);
  border-radius: 50%;
  color: var(--gold);
  font: 16px Georgia, serif;
}

.hud-cell { min-width: 48px; text-align: right; }
.hud-cell span {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font: 7px/1 Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.hud-cell strong { font: 15px/1 Georgia, serif; font-weight: 400; }
.hud-lives { color: #d9899a; }

.bottle-meter {
  position: absolute;
  right: max(14px, var(--safe-r));
  top: 78px;
  width: 8px;
  height: 100px;
  overflow: hidden;
  border: 1px solid rgba(245,234,210,.25);
  border-radius: 8px;
  background: rgba(0,0,0,.25);
}
.bottle-meter i {
  position: absolute;
  left: 1px; right: 1px; bottom: 1px;
  height: 100%;
  border-radius: 5px;
  background: linear-gradient(#ae3852, #581126);
  transition: height .12s linear;
}

.level-banner {
  position: absolute;
  top: 14%;
  left: 50%;
  width: min(90vw, 560px);
  translate: -50% 0;
  text-align: center;
  opacity: 0;
}
.level-banner.show { animation: level-in 2s ease both; }
.level-banner small {
  display: block;
  color: var(--gold);
  font: 9px Arial, sans-serif;
  letter-spacing: .32em;
  text-transform: uppercase;
}
.level-banner b {
  display: block;
  margin-top: 6px;
  font: italic 26px Georgia, serif;
  font-weight: 400;
}
@keyframes level-in {
  0% { opacity: 0; transform: translateY(10px); }
  14%, 72% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-8px); }
}

.aim-hint {
  position: absolute;
  width: 18px; height: 18px;
  margin: -9px 0 0 -9px;
  border: 1.5px solid rgba(216,174,95,.55);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
}
.aim-hint.on { opacity: 1; }
.aim-hint::after {
  content: "";
  position: absolute;
  inset: 5px;
  border-radius: 50%;
  background: rgba(216,174,95,.45);
}

.overflow-warn {
  position: absolute;
  left: 50%;
  top: 22%;
  translate: -50% 0;
  padding: 8px 14px;
  border: 1px solid rgba(226,129,144,.5);
  border-radius: 999px;
  background: rgba(50,10,18,.75);
  color: var(--danger);
  font: 11px Arial, sans-serif;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.overflow-warn.show { opacity: 1; }

.powerups {
  position: absolute;
  top: max(54px, calc(var(--safe-t) + 48px));
  left: max(10px, var(--safe-l));
  display: flex;
  flex-direction: row;
  gap: 7px;
  pointer-events: auto;
  z-index: 6;
}
.power-btn {
  position: relative;
  width: 46px;
  height: 46px;
  min-width: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(16, 8, 10, .72);
  color: #f2d9a6;
  box-shadow: 0 8px 18px rgba(0,0,0,.28);
  backdrop-filter: blur(10px);
  letter-spacing: 0;
  text-transform: none;
}
.power-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}
.power-btn:disabled { opacity: .38; }
.power-btn small {
  position: absolute;
  right: -4px;
  top: -4px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #c9584b;
  color: #fff;
  font: 700 10px/1 Arial, sans-serif;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
}
.power-btn[data-power="wide"] { color: #9fd0ff; }
.power-btn[data-power="refill"] { color: #f0a4b2; }

.controls {
  position: absolute;
  left: 0; right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 10px max(16px, var(--safe-r)) max(16px, var(--safe-b)) max(16px, var(--safe-l));
  pointer-events: none;
  background: linear-gradient(to top, rgba(8,4,6,.55), transparent);
}

.pour-stick {
  width: min(46vw, 188px);
  height: 88px;
  pointer-events: auto;
  -webkit-user-select: none;
  user-select: none;
  touch-action: none;
}
.pour-stick-base {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 22px;
  border: 1px solid rgba(216,174,95,.45);
  background:
    radial-gradient(circle at 50% 55%, rgba(160,45,70,.45), rgba(20,8,12,.78));
  box-shadow: 0 10px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.05);
  overflow: hidden;
}
.pour-stick.active .pour-stick-base {
  border-color: rgba(216,174,95,.9);
  background:
    radial-gradient(circle at 50% 55%, rgba(216,174,95,.35), rgba(40,16,22,.82));
}
.pour-stick-hint {
  position: absolute;
  left: 0; right: 0;
  top: 8px;
  text-align: center;
  color: rgba(245,234,210,.55);
  font: 9px Arial, sans-serif;
  letter-spacing: .14em;
  text-transform: uppercase;
  pointer-events: none;
}
.pour-stick-knob {
  position: absolute;
  left: 50%;
  top: 54%;
  width: 46px;
  height: 46px;
  margin: -23px 0 0 -23px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.28);
  background:
    radial-gradient(circle at 35% 30%, #f0d9a0, #b8873d 55%, #6e3d2a);
  box-shadow: 0 6px 16px rgba(0,0,0,.4);
  pointer-events: none;
  transition: box-shadow .12s;
}
.pour-stick.active .pour-stick-knob {
  box-shadow: 0 0 0 3px rgba(216,174,95,.28), 0 8px 18px rgba(0,0,0,.45);
}

.side-btns {
  display: flex;
  gap: 8px;
  pointer-events: auto;
}
.icon-btn {
  width: 48px; height: 48px;
  min-width: 0;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(245,234,210,.22);
  background: rgba(10,5,7,.55);
  color: var(--paper);
  font-size: 14px;
  letter-spacing: 0;
}

.mobile-tip {
  position: absolute;
  left: 50%;
  bottom: calc(96px + var(--safe-b));
  translate: -50% 0;
  max-width: 70vw;
  text-align: center;
  color: rgba(245,234,210,.45);
  font: 9px Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.screen {
  position: fixed;
  inset: 0;
  z-index: 12;
  display: grid;
  place-items: center;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  padding: max(20px, var(--safe-t)) max(16px, var(--safe-r)) max(20px, var(--safe-b)) max(16px, var(--safe-l));
  text-align: center;
  background:
    radial-gradient(circle at 50% 28%, rgba(111,40,55,.36), transparent 42%),
    linear-gradient(145deg, rgba(22,11,15,.94), rgba(7,4,6,.98));
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.screen.hidden {
  display: none !important;
  opacity: 0;
  visibility: hidden;
  pointer-events: none !important;
}

/* —— Hero menu —— */
.menu-hero {
  place-items: stretch center;
  overflow: hidden;
  color: #3a2418;
  background:
    radial-gradient(ellipse 90% 70% at 50% -10%, rgba(255, 214, 170, .95), transparent 55%),
    radial-gradient(ellipse 60% 50% at 85% 30%, rgba(255, 170, 150, .35), transparent 50%),
    radial-gradient(ellipse 50% 45% at 10% 70%, rgba(255, 196, 120, .28), transparent 55%),
    linear-gradient(165deg, #fff4e6 0%, #f7d7c4 38%, #e8b8a4 72%, #c98878 100%);
  padding-top: max(12px, var(--safe-t));
  padding-bottom: max(18px, var(--safe-b));
}

.menu-fx {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  filter: blur(1.2px);
  opacity: .9;
}

.menu-glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
  filter: blur(40px);
  mix-blend-mode: screen;
}
.menu-glow-a {
  width: min(70vw, 420px);
  height: min(70vw, 420px);
  left: -8%;
  top: 8%;
  background: rgba(255, 200, 120, .45);
  animation: glow-drift 9s ease-in-out infinite alternate;
}
.menu-glow-b {
  width: min(55vw, 340px);
  height: min(55vw, 340px);
  right: -6%;
  bottom: 12%;
  background: rgba(255, 140, 150, .32);
  animation: glow-drift 11s ease-in-out infinite alternate-reverse;
}
@keyframes glow-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(18px, -22px) scale(1.08); }
}

.menu-stage {
  position: relative;
  z-index: 2;
  width: min(920px, 100%);
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: min(100%, 100dvh);
}

.menu-pour-scene {
  position: relative;
  width: min(280px, 72vw);
  height: 168px;
  margin: 4px auto 2px;
  animation: scene-float 5.5s ease-in-out infinite;
}
@keyframes scene-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.hero-bottle {
  position: absolute;
  left: 18%;
  top: 4%;
  width: 54px;
  height: 118px;
  transform-origin: 50% 70%;
  animation: bottle-tilt 4.8s ease-in-out infinite;
}
@keyframes bottle-tilt {
  0%, 100% { transform: rotate(18deg); }
  50% { transform: rotate(28deg); }
}
.hero-bottle-glass {
  position: absolute;
  inset: 18px 8px 4px;
  border-radius: 18px 18px 22px 22px / 28px 28px 40px 40px;
  background: linear-gradient(90deg, #1a3d2c, #3f7a58 28%, #234833 55%, #0d2218);
  box-shadow: 0 14px 28px rgba(80, 40, 20, .28);
}
.hero-bottle-glass::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -22px;
  width: 18px;
  height: 28px;
  translate: -50% 0;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(90deg, #163528, #2f6048);
}
.hero-bottle-foil {
  position: absolute;
  left: 50%;
  top: -4px;
  width: 24px;
  height: 18px;
  translate: -50% 0;
  border-radius: 4px;
  background: linear-gradient(90deg, #c9a05a, #f0d28a 40%, #b88840);
}
.hero-bottle-wine {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 10px;
  height: 58%;
  border-radius: 0 0 16px 16px;
  background: linear-gradient(#c4475f, #6d1830);
  opacity: .72;
  animation: wine-sway 4.8s ease-in-out infinite;
}
@keyframes wine-sway {
  0%, 100% { transform: skewX(0deg); }
  50% { transform: skewX(-4deg) translateX(2px); }
}
.hero-bottle-label {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 48px;
  height: 34px;
  border-radius: 3px;
  background: #e8d4b0;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px #b9925a;
}
.hero-bottle-label span {
  color: #7a2a38;
  font: 700 11px "Syne", sans-serif;
  letter-spacing: .08em;
}

.hero-stream {
  position: absolute;
  left: 44%;
  top: 28px;
  width: 3px;
  height: 78px;
  border-radius: 3px;
  background: linear-gradient(180deg, rgba(196, 71, 95, .15), #c4475f 30%, #8e2944);
  transform: rotate(18deg);
  transform-origin: top center;
  animation: stream-flow 1.1s linear infinite;
  box-shadow: 0 0 10px rgba(196, 71, 95, .45);
}
@keyframes stream-flow {
  from { opacity: .55; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.15); }
  to { opacity: .55; filter: brightness(1); }
}

.hero-glass {
  position: absolute;
  right: 16%;
  bottom: 8px;
  width: 64px;
  height: 78px;
}
.hero-glass::before {
  content: "";
  position: absolute;
  inset: 0 4px 22px;
  border: 1.5px solid rgba(255,255,255,.72);
  border-radius: 8px 8px 40% 40% / 10px 10px 55% 55%;
  background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.05) 40%, rgba(255,255,255,.22));
  box-shadow: 0 10px 20px rgba(90, 40, 30, .18);
}
.hero-glass::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 28px;
  height: 20px;
  translate: -50% 0;
  border: 1.5px solid rgba(255,255,255,.45);
  border-top: 0;
  border-radius: 0 0 40% 40%;
}
.hero-glass-wine {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 28px;
  height: 28px;
  border-radius: 0 0 40% 40%;
  background: linear-gradient(#d45a70, #7a2038);
  animation: glass-fill 5s ease-in-out infinite;
}
@keyframes glass-fill {
  0%, 100% { height: 22px; }
  50% { height: 34px; }
}

.hero-cork {
  position: absolute;
  left: 8%;
  top: 18%;
  width: 14px;
  height: 22px;
  border-radius: 4px;
  background: linear-gradient(#d8b074, #a87840);
  animation: cork-float 6s ease-in-out infinite;
  box-shadow: 0 6px 14px rgba(90, 50, 20, .25);
}
@keyframes cork-float {
  0%, 100% { transform: translate(0, 0) rotate(-12deg); }
  50% { transform: translate(10px, -16px) rotate(8deg); }
}

.hero-ripple {
  position: absolute;
  right: 18%;
  bottom: 2px;
  width: 70px;
  height: 10px;
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255,255,255,.45), transparent 70%);
  animation: ripple 2.4s ease-out infinite;
}
@keyframes ripple {
  0% { transform: scale(.7); opacity: .5; }
  100% { transform: scale(1.4); opacity: 0; }
}

.menu-brand {
  position: relative;
  z-index: 2;
  margin-top: -6px;
}
.menu-seal-lg {
  width: 46px;
  height: 46px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(140, 70, 40, .35);
  color: #8a3d28;
  font: 600 22px "Cormorant Garamond", Georgia, serif;
  background: rgba(255,255,255,.35);
  backdrop-filter: blur(8px);
  animation: seal-pulse 3.6s ease-in-out infinite;
}
@keyframes seal-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 190, 120, .0); }
  50% { box-shadow: 0 0 0 10px rgba(255, 190, 120, .18); }
}

.menu-hero .menu-kicker {
  color: #8a4a32;
  font: 600 10px/1 "Syne", sans-serif;
  letter-spacing: .42em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

.menu-card { width: min(820px, 100%); margin: auto; }
.menu-kicker {
  color: var(--gold);
  font: 9px Arial, sans-serif;
  letter-spacing: .38em;
  text-transform: uppercase;
}
.menu-title {
  margin: 8px 0;
  font: 400 clamp(40px, 9vw, 84px)/.9 Georgia, serif;
  letter-spacing: -.05em;
}
.menu-title em {
  display: block;
  color: var(--gold);
  font-size: .44em;
  font-weight: 400;
}
.hero-title {
  margin: 0;
  font: 600 clamp(54px, 13vw, 110px)/.82 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.04em;
  color: #2c1810;
  text-shadow: 0 2px 0 rgba(255,255,255,.25);
}
.hero-title em {
  display: block;
  margin-top: .02em;
  color: #b04a3a;
  font-style: italic;
  font-weight: 500;
  font-size: .58em;
  letter-spacing: .01em;
}
.menu-tagline {
  margin: 10px auto 4px;
  max-width: 340px;
  color: rgba(70, 40, 28, .72);
  font: 500 14px/1.45 "Syne", sans-serif;
}
.menu-copy {
  max-width: 520px;
  margin: 12px auto 18px;
  color: var(--muted);
  font: 13px/1.5 Arial, sans-serif;
}

.menu-hero .top-actions { margin: 8px 0 4px; }
.menu-hero .chip-btn {
  border-color: rgba(120, 60, 40, .22);
  background: rgba(255,255,255,.42);
  color: #5a2e20;
  backdrop-filter: blur(10px);
  font-family: "Syne", sans-serif;
}
.menu-hero .chip-btn:hover, .menu-hero .chip-btn:active {
  border-color: #b04a3a;
  background: rgba(255,255,255,.7);
  color: #3a1a12;
}

.mode-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
  width: 100%;
}
.menu-hero .mode-card {
  min-width: 0;
  min-height: 112px;
  padding: 14px 12px;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 16px;
  background: rgba(255,255,255,.38);
  backdrop-filter: blur(14px);
  color: #3a2118;
  text-align: left;
  letter-spacing: 0;
  box-shadow: 0 10px 30px rgba(120, 50, 30, .08);
  transition: transform .2s ease, background .2s ease, border-color .2s;
}
.menu-hero .mode-card:hover, .menu-hero .mode-card:active {
  transform: translateY(-3px);
  background: rgba(255,255,255,.62);
  border-color: rgba(176, 74, 58, .45);
  color: #3a2118;
  box-shadow: 0 14px 34px rgba(120, 50, 30, .14);
}
.menu-hero .mode-card .mode-icon {
  display: block;
  margin-bottom: 12px;
  color: #b04a3a;
  font: 600 22px/1 "Cormorant Garamond", Georgia, serif;
}
.menu-hero .mode-card b {
  display: block;
  font: 600 15px "Syne", sans-serif;
  font-weight: 600;
}
.menu-hero .mode-card small {
  display: block;
  margin-top: 6px;
  color: rgba(70, 40, 28, .62);
  font: 10px/1.35 "Syne", sans-serif;
  text-transform: none;
}

.mode-card {
  min-width: 0;
  min-height: 118px;
  padding: 14px 10px;
  border: 1px solid rgba(245,234,210,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: var(--paper);
  text-align: left;
  letter-spacing: 0;
}
.mode-card:hover, .mode-card:active {
  border-color: var(--gold);
  background: rgba(216,174,95,.12);
  color: var(--paper);
  box-shadow: none;
}
.mode-card .mode-icon {
  display: block;
  margin-bottom: 12px;
  color: var(--gold);
  font: 22px/1 Georgia, serif;
}
.mode-card b { display: block; font: 14px Georgia, serif; font-weight: 400; }
.mode-card small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font: 9px/1.35 Arial, sans-serif;
  text-transform: none;
}

.top-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.chip-btn {
  min-width: 0;
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245,234,210,.2);
  background: rgba(255,255,255,.04);
  color: var(--paper);
  font: 10px Arial, sans-serif;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.chip-btn:hover, .chip-btn.active {
  border-color: var(--gold);
  background: rgba(216,174,95,.14);
  color: var(--paper);
  box-shadow: none;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
  margin: 14px 0;
  text-align: left;
}
.pick-card, .level-card {
  min-width: 0;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(245,234,210,.16);
  border-radius: 12px;
  background: rgba(255,255,255,.03);
  color: var(--paper);
  text-align: left;
  letter-spacing: 0;
}
.pick-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 108px;
}
.bottle-icon {
  width: 54px;
  height: 84px;
  display: block;
  border-radius: 8px;
  background: rgba(0,0,0,.22);
}
.pick-card .pick-meta { min-width: 0; }
.pick-card.selected, .level-card.selected {
  border-color: var(--gold);
  background: rgba(216,174,95,.14);
}
.pick-card:disabled, .level-card:disabled { opacity: .4; }
.pick-card b, .level-card b { display: block; font: 14px Georgia, serif; font-weight: 400; }
.pick-card small, .level-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font: 9px/1.35 Arial, sans-serif;
  text-transform: none;
}
.level-card .stars-mini { color: var(--gold); margin-top: 6px; font-size: 12px; letter-spacing: .08em; }

.daily-box, .achieve-list, .settings-list {
  text-align: left;
  margin: 14px auto;
  max-width: 520px;
}
.daily-item, .achieve-item, .setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(245,234,210,.1);
  font: 13px Arial, sans-serif;
}
.daily-item small, .achieve-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}
.setting-row label { text-align: left; }
.setting-row select, .setting-row input[type="checkbox"] {
  accent-color: var(--gold);
}
.setting-row select {
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid rgba(245,234,210,.2);
  background: rgba(0,0,0,.35);
  color: var(--paper);
}

.primary-button, .secondary-button {
  min-width: 180px;
  min-height: 48px;
  padding: 14px 20px;
  border-radius: 8px;
  border: 1px solid var(--gold);
  background: transparent;
  color: var(--paper);
  font: 11px Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
  cursor: pointer;
}
.secondary-button { border-color: rgba(245,234,210,.25); }
.primary-button:hover, .primary-button:active {
  background: var(--gold);
  color: #1a0e10;
}
.button-row {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.result-stats {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin: 18px 0;
}
.result-stats small {
  display: block;
  color: var(--muted);
  font: 8px Arial, sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.result-stats strong {
  display: block;
  margin-top: 5px;
  font: 24px Georgia, serif;
  font-weight: 400;
}
.stars { color: var(--gold); font-size: 28px; letter-spacing: .18em; }

.toast-stack {
  position: fixed;
  top: calc(70px + var(--safe-t));
  left: 50%;
  translate: -50% 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  gap: 6px;
  pointer-events: none;
  width: min(90vw, 360px);
}
.toast {
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(20,10,14,.9);
  border: 1px solid rgba(216,174,95,.35);
  color: var(--paper);
  font: 12px/1.35 Arial, sans-serif;
  text-align: center;
  animation: toast-in 2.4s ease both;
}
@keyframes toast-in {
  0% { opacity: 0; transform: translateY(-8px); }
  12%, 75% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

.tutorial-mask {
  position: fixed;
  inset: 0;
  z-index: 18;
  background: rgba(5,2,4,.72);
  display: grid;
  place-items: end center;
  padding: 20px;
  pointer-events: auto;
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
}
.tutorial-mask.hidden { display: none; }
.tutorial-card {
  width: min(420px, 100%);
  padding: 18px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid rgba(216,174,95,.35);
  text-align: left;
}
.tutorial-card h3 {
  margin: 0 0 8px;
  font: 22px Georgia, serif;
  font-weight: 400;
}
.tutorial-card p {
  margin: 0 0 14px;
  color: var(--muted);
  font: 13px/1.45 Arial, sans-serif;
}

@media (pointer: coarse) {
  #game { cursor: none; }
  button { min-height: 44px; }
}

@media (max-width: 720px) {
  .hud-brand span:last-child { display: none; }
  .mode-grid { grid-template-columns: repeat(2, 1fr); }
  .hud-cell strong { font-size: 13px; }
  .pour-stick { height: 82px; }
  .pour-stick-knob { width: 42px; height: 42px; margin: -21px 0 0 -21px; }
  .menu-pour-scene { height: 148px; }
  .hero-title { font-size: clamp(48px, 14vw, 78px); }
}

@media (orientation: portrait) {
  .mobile-tip { bottom: calc(108px + var(--safe-b)); }
}

@media (max-height: 520px) {
  .screen { place-items: start center; }
  .menu-title { font-size: 42px; }
  .hero-title { font-size: 48px; }
  .menu-pour-scene { display: none; }
  .menu-hero .mode-card { min-height: 88px; }
  .menu-hero .mode-card .mode-icon { display: none; }
}

/* —— Butilochka modern game menu —— */
.screen { touch-action: manipulation; }
.screen > .menu-card { touch-action: pan-y; }
.menu-hero { padding: 0; touch-action: none; }

.game-menu-shell {
  position: relative;
  z-index: 3;
  width: min(1180px, 100%);
  height: 100%;
  min-height: 100dvh;
  margin: 0 auto;
  padding:
    max(14px, var(--safe-t))
    max(16px, var(--safe-r))
    max(12px, var(--safe-b))
    max(16px, var(--safe-l));
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 14px;
  font-family: "Syne", Arial, sans-serif;
}

.game-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
}
.game-logo { display: flex; align-items: center; gap: 10px; text-align: left; }
.game-logo-mark {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 14px;
  color: white;
  background: linear-gradient(145deg, #c9584b, #8d2937);
  box-shadow: 0 8px 18px rgba(137, 43, 47, .25), inset 0 1px rgba(255,255,255,.35);
}
.game-logo-mark svg { width: 26px; height: 26px; display: block; }
.game-logo b { display: block; color: #29140f; font-size: 17px; line-height: 1; }
.game-logo small {
  display: block; margin-top: 4px;
  color: rgba(67, 35, 25, .54);
  font-size: 8px; letter-spacing: .16em; text-transform: uppercase;
}

.player-strip { display: flex; align-items: center; gap: 8px; }
.player-level, .player-stars {
  min-width: 60px;
  height: 40px;
  padding: 0 11px;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid rgba(110, 58, 38, .14);
  border-radius: 13px;
  background: rgba(255,255,255,.46);
  color: #4b251b;
  box-shadow: 0 6px 18px rgba(115, 61, 42, .06);
  backdrop-filter: blur(12px);
}
.player-level span { font-size: 7px; letter-spacing: .1em; opacity: .55; }
.player-stars .menu-mini-icon { width: 14px; height: 14px; color: #c88426; flex-shrink: 0; }
.player-level b, .player-stars b { font-size: 13px; }
.menu-settings-btn {
  width: 40px; height: 40px; min-width: 40px; padding: 0;
  display: grid; place-items: center;
  border: 1px solid rgba(110, 58, 38, .14);
  border-radius: 13px;
  background: rgba(255,255,255,.46);
  color: #5a3024;
  box-shadow: 0 6px 18px rgba(115, 61, 42, .06);
}
.menu-settings-btn svg { width: 18px; height: 18px; display: block; }

.game-menu-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(330px, .92fr);
  align-items: center;
  gap: clamp(18px, 4vw, 54px);
}

.menu-showcase {
  position: relative;
  min-height: 430px;
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 32px;
  background:
    radial-gradient(circle at 70% 18%, rgba(255,255,255,.72), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.50), rgba(255,235,215,.22));
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(111, 51, 37, .13), inset 0 1px rgba(255,255,255,.5);
}
.menu-showcase::before {
  content: "";
  position: absolute;
  width: 300px; height: 300px;
  right: -90px; top: -100px;
  border-radius: 50%;
  border: 1px solid rgba(178, 83, 63, .14);
  box-shadow: 0 0 0 35px rgba(255,255,255,.08), 0 0 0 70px rgba(255,255,255,.05);
}
.showcase-badge {
  position: absolute;
  left: 22px; top: 20px;
  display: flex; align-items: center; gap: 7px;
  padding: 8px 11px;
  border-radius: 999px;
  color: #6e3428;
  background: rgba(255,255,255,.48);
  font-size: 8px; letter-spacing: .12em; text-transform: uppercase;
}
.showcase-badge i {
  width: 7px; height: 7px; border-radius: 50%;
  background: #d55a4e;
  box-shadow: 0 0 0 4px rgba(213,90,78,.12);
  animation: live-dot 1.8s ease-in-out infinite;
}
@keyframes live-dot { 50% { opacity: .45; transform: scale(.72); } }
.menu-showcase .menu-pour-scene {
  width: min(380px, 82vw);
  height: 230px;
  margin: 14px auto 0;
  transform: scale(1.12);
}
.menu-bottle-art {
  position: absolute;
  inset: -8% -8%;
  width: 116%;
  height: 116%;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 18px 20px rgba(87, 39, 26, .18));
}
.showcase-orbit {
  position: absolute;
  left: 50%; top: 50%;
  border: 1px solid rgba(181, 79, 58, .16);
  border-radius: 50%;
  translate: -50% -50%;
}
.orbit-one { width: 245px; height: 125px; transform: rotate(-15deg); animation: orbit-spin 12s linear infinite; }
.orbit-two { width: 180px; height: 180px; animation: orbit-spin 16s linear infinite reverse; }
@keyframes orbit-spin { to { rotate: 360deg; } }
.showcase-copy { position: relative; z-index: 2; text-align: left; }
.showcase-copy small {
  color: #a9483b;
  font-size: 8px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
}
.showcase-copy h1 {
  margin: 3px 0 2px;
  color: #28130e;
  font: 600 clamp(52px, 8vw, 90px)/.85 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.05em;
}
.showcase-copy p { margin: 8px 0 0; color: rgba(63, 32, 24, .65); font-size: 11px; }

.menu-command { display: flex; flex-direction: column; gap: 12px; }
.campaign-play {
  position: relative;
  width: 100%; min-height: 112px;
  padding: 18px 18px;
  display: grid;
  grid-template-columns: 56px 1fr 34px;
  align-items: center;
  gap: 14px;
  border: 0;
  border-radius: 24px;
  color: white;
  background:
    radial-gradient(circle at 85% 10%, rgba(255,255,255,.25), transparent 30%),
    linear-gradient(135deg, #c9584b, #9b3241 58%, #72243a);
  box-shadow: 0 18px 36px rgba(122, 38, 52, .28), inset 0 1px rgba(255,255,255,.25);
  text-align: left;
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.campaign-play:active { transform: scale(.98); box-shadow: 0 10px 24px rgba(122,38,52,.25); }
.campaign-play::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.18) 50%, transparent 70%);
  translate: -100% 0;
  animation: play-sheen 4s ease-in-out infinite;
}
@keyframes play-sheen { 55%,100% { translate: 130% 0; } }
.play-symbol {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  border-radius: 18px;
  background: rgba(255,255,255,.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.2);
}
.play-symbol svg { width: 22px; height: 22px; display: block; margin-left: 2px; }
.play-copy { position: relative; z-index: 1; }
.play-copy small { display: block; opacity: .65; font-size: 8px; letter-spacing: .13em; text-transform: uppercase; }
.play-copy b { display: block; margin-top: 3px; font-size: 22px; }
.play-copy em { display: block; margin-top: 5px; opacity: .72; font: normal 9px "Syne", sans-serif; }
.play-arrow {
  position: relative; z-index: 1;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  opacity: .85;
}
.play-arrow svg { width: 22px; height: 22px; display: block; }

.quick-modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.quick-mode {
  min-width: 0; min-height: 102px;
  padding: 13px 11px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between;
  border: 1px solid rgba(255,255,255,.55);
  border-radius: 19px;
  color: #3c2018;
  background: rgba(255,255,255,.43);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 24px rgba(104,50,35,.08);
  text-align: left;
  transition: transform .15s ease, background .15s ease;
}
.quick-mode:active { transform: scale(.97); background: rgba(255,255,255,.72); }
.quick-icon {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, #c85a4e, #a53d38);
  box-shadow: inset 0 1px rgba(255,255,255,.25);
}
.quick-icon svg { width: 18px; height: 18px; display: block; }
.quick-mode.timed .quick-icon { background: linear-gradient(145deg, #d0923a, #a86a22); }
.quick-mode.endless .quick-icon { background: linear-gradient(145deg, #8a62b0, #65408a); }
.quick-mode b { display: block; font-size: 11px; }
.quick-mode small { display: block; margin-top: 3px; color: rgba(59,31,23,.55); font-size: 8px; }

.game-menu-dock {
  min-height: 67px;
  padding: 7px 10px;
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 4px;
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 22px;
  background: rgba(255,255,255,.48);
  backdrop-filter: blur(18px);
  box-shadow: 0 14px 34px rgba(105,51,35,.1);
}
.game-menu-dock button {
  flex: 1 1 0;
  min-width: 0; min-height: 52px; padding: 5px 8px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  border: 0; border-radius: 15px;
  background: transparent;
  color: rgba(70,35,26,.58);
}
.game-menu-dock button:active { background: rgba(180,75,58,.1); color: #9e3e35; }
.game-menu-dock .dock-icon {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 9px;
  color: #8d4a3c;
  background: rgba(180, 90, 70, .1);
}
.game-menu-dock .dock-icon svg { width: 16px; height: 16px; display: block; }
.game-menu-dock button:active .dock-icon {
  color: #9e3e35;
  background: rgba(180, 75, 58, .16);
}
.game-menu-dock b { font-size: 7px; text-transform: uppercase; letter-spacing: .04em; }
@media (max-width: 420px) {
  .game-menu-dock { gap: 1px; padding: 4px 4px; }
  .game-menu-dock button { padding: 3px 2px; }
  .game-menu-dock b { font-size: 6px; }
}

/* Matching professional treatment for secondary menus */
.screen:not(.menu-hero) {
  color: #321a13;
  background:
    radial-gradient(circle at 20% 5%, rgba(255,255,255,.88), transparent 34%),
    radial-gradient(circle at 88% 92%, rgba(218,117,103,.24), transparent 40%),
    linear-gradient(155deg, #fff2e4, #edc3ae);
}
.screen:not(.menu-hero) .menu-card {
  max-width: 790px;
  padding: clamp(20px, 4vw, 36px);
  border: 1px solid rgba(255,255,255,.66);
  border-radius: 28px;
  background: rgba(255,255,255,.48);
  backdrop-filter: blur(18px);
  box-shadow: 0 24px 60px rgba(103,48,34,.14), inset 0 1px rgba(255,255,255,.65);
}
.screen:not(.menu-hero) .menu-kicker { color: #ac4a3e; font-family: "Syne", sans-serif; font-weight: 700; }
.screen:not(.menu-hero) .menu-title {
  color: #2c1711;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-weight: 600;
}
.screen:not(.menu-hero) .menu-copy { color: rgba(55,29,21,.62); font-family: "Syne", sans-serif; font-size: 11px; }
.screen:not(.menu-hero) .pick-card,
.screen:not(.menu-hero) .level-card {
  border-color: rgba(112,56,39,.12);
  background: rgba(255,255,255,.45);
  color: #3a2118;
  box-shadow: 0 8px 20px rgba(100,45,30,.06);
}
.screen:not(.menu-hero) .pick-card.selected,
.screen:not(.menu-hero) .level-card.selected {
  border-color: #bd5346;
  background: rgba(255,255,255,.78);
  box-shadow: 0 9px 24px rgba(173,67,57,.14);
}
.screen:not(.menu-hero) .pick-card small,
.screen:not(.menu-hero) .level-card small { color: rgba(55,29,21,.56); }
.screen:not(.menu-hero) .daily-item,
.screen:not(.menu-hero) .achieve-item,
.screen:not(.menu-hero) .setting-row {
  border-color: rgba(90,44,31,.12);
  color: #3a2118;
}
.screen:not(.menu-hero) .daily-item small,
.screen:not(.menu-hero) .achieve-item small { color: rgba(55,29,21,.55); }
.screen:not(.menu-hero) .setting-row select {
  border-color: rgba(100,48,34,.2);
  background: rgba(255,255,255,.66);
  color: #3a2118;
}
.screen:not(.menu-hero) .primary-button {
  border: 0;
  color: white;
  background: linear-gradient(135deg, #c8584a, #8e2d3e);
  box-shadow: 0 10px 22px rgba(132,39,52,.22);
}
.screen:not(.menu-hero) .secondary-button {
  border-color: rgba(93,45,31,.2);
  color: #552b20;
  background: rgba(255,255,255,.44);
}
.screen:not(.menu-hero) .result-stats small { color: rgba(55,29,21,.5); }
.screen:not(.menu-hero) .stars { color: #c6862c; }

@media (max-width: 760px) {
  .game-menu-shell { gap: 9px; }
  .game-menu-main { grid-template-columns: 1fr; gap: 9px; align-content: center; }
  .menu-showcase {
    min-height: 250px;
    padding: 16px 18px;
    border-radius: 25px;
    display: grid;
    grid-template-columns: 48% 52%;
    align-items: center;
  }
  .showcase-badge { top: 12px; left: 14px; }
  .menu-showcase .menu-pour-scene {
    width: 210px; height: 145px; margin: 20px 0 0 -18px; transform: scale(.88);
  }
  .showcase-copy { padding-top: 20px; }
  .showcase-copy h1 { font-size: clamp(44px, 14vw, 68px); }
  .showcase-copy p { font-size: 9px; line-height: 1.35; }
  .campaign-play { min-height: 89px; border-radius: 20px; grid-template-columns: 46px 1fr 26px; padding: 13px; }
  .play-symbol { width: 45px; height: 45px; border-radius: 14px; }
  .play-copy b { font-size: 18px; }
  .quick-modes { gap: 7px; }
  .quick-mode { min-height: 79px; padding: 9px; border-radius: 15px; }
  .quick-icon { width: 28px; height: 28px; }
  .quick-icon svg { width: 15px; height: 15px; }
  .dock-icon { width: 26px; height: 26px; }
  .dock-icon svg { width: 14px; height: 14px; }
  .quick-mode small { display: none; }
  .game-menu-dock { min-height: 61px; border-radius: 19px; padding: 5px 7px; }
}

@media (max-width: 390px) {
  .game-logo small { display: none; }
  .player-level, .player-stars { min-width: 49px; padding: 0 7px; }
  .menu-showcase { min-height: 220px; }
  .menu-showcase .menu-pour-scene { transform: scale(.76); margin-left: -28px; }
  .showcase-copy h1 { font-size: 43px; }
}

@media (max-height: 600px) and (orientation: landscape) {
  .game-menu-shell { min-height: 100%; grid-template-rows: auto 1fr; }
  .game-menu-main { grid-template-columns: 1fr 1fr; }
  .menu-showcase { min-height: 330px; }
  .menu-showcase .menu-pour-scene { display: block; transform: scale(.82); height: 145px; }
  .game-menu-dock {
    position: absolute;
    right: max(14px, var(--safe-r));
    top: 76px;
    width: 60px;
    min-height: 280px;
    flex-direction: column;
  }
}

/* —— Rebuilt main menu: compact, editorial, mobile-first —— */
.menu-hero {
  --tilt-x: 0;
  --tilt-y: 0;
  color: #f8ead8;
  background:
    radial-gradient(ellipse 80% 55% at 80% -10%, rgba(125, 47, 63, .48), transparent 62%),
    radial-gradient(ellipse 65% 55% at 4% 80%, rgba(91, 39, 48, .38), transparent 68%),
    #171013;
}
.menu-hero .menu-fx { opacity: .22; mix-blend-mode: screen; }
.game-menu-shell {
  width: min(1080px, 100%);
  padding: max(12px, var(--safe-t)) max(14px, var(--safe-r)) max(10px, var(--safe-b)) max(14px, var(--safe-l));
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: clamp(10px, 2vw, 18px);
}
.game-menu-header { min-height: 46px; }
.game-logo { gap: 8px; }
.game-logo-mark {
  width: 36px; height: 36px;
  border-radius: 11px;
  background: #b84c54;
  box-shadow: 0 8px 22px rgba(184, 76, 84, .24);
}
.game-logo-mark svg { width: 22px; height: 22px; }
.game-logo b { color: #f8ead8; font-size: 15px; letter-spacing: -.02em; }
.game-logo small { color: rgba(248, 234, 216, .46); font-size: 7px; letter-spacing: .2em; }
.player-strip { gap: 6px; }
.player-level, .player-stars, .menu-settings-btn {
  height: 34px;
  min-height: 34px;
  border: 1px solid rgba(248, 234, 216, .12);
  border-radius: 10px;
  background: rgba(255,255,255,.07);
  color: #f8ead8;
  box-shadow: none;
  backdrop-filter: none;
}
.player-level, .player-stars { min-width: 48px; padding: 0 8px; }
.player-level span { font-size: 6px; }
.player-level b, .player-stars b { font-size: 11px; }
.menu-settings-btn { width: 34px; min-width: 34px; padding: 0; color: #f8ead8; }
.menu-settings-btn svg { width: 16px; height: 16px; }
.game-menu-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .78fr);
  gap: clamp(14px, 3vw, 32px);
  align-items: stretch;
}
.menu-showcase {
  min-height: 0;
  height: 100%;
  padding: 20px;
  border: 1px solid rgba(248, 234, 216, .12);
  border-radius: 24px;
  background:
    radial-gradient(circle at 65% 24%, rgba(208, 107, 91, .17), transparent 30%),
    linear-gradient(145deg, rgba(255,255,255,.08), rgba(255,255,255,.025));
  box-shadow: inset 0 1px rgba(255,255,255,.08);
  backdrop-filter: none;
}
.menu-showcase::before { width: 270px; height: 270px; right: -100px; top: -120px; border-color: rgba(246, 187, 133, .1); box-shadow: 0 0 0 35px rgba(255,255,255,.025), 0 0 0 70px rgba(255,255,255,.018); }
.showcase-badge {
  left: 20px; top: 18px;
  padding: 0;
  color: #e2a26d;
  background: transparent;
  font-size: 7px;
  letter-spacing: .2em;
}
.showcase-badge i { width: 5px; height: 5px; background: #d76e62; box-shadow: 0 0 0 3px rgba(215,110,98,.13); }
.menu-showcase .menu-pour-scene {
  width: min(430px, 100%);
  height: min(280px, 58%);
  min-height: 190px;
  margin: 28px auto 0;
  transform: translate(calc(var(--tilt-x) * -16px), calc(var(--tilt-y) * -16px));
}
.menu-bottle-art { inset: -7% -7%; width: 114%; height: 114%; filter: drop-shadow(0 20px 20px rgba(0,0,0,.28)); }
.showcase-orbit { border-color: rgba(247, 200, 161, .11); }
.showcase-copy { margin-top: auto; text-align: left; transform: translate(calc(var(--tilt-x) * 6px), calc(var(--tilt-y) * 6px)); }
.showcase-copy small { color: #df956f; font-size: 7px; letter-spacing: .22em; }
.showcase-copy h1 {
  margin: 5px 0 0;
  color: #f8ead8;
  font: 600 clamp(46px, 7vw, 82px)/.78 "Cormorant Garamond", Georgia, serif;
  letter-spacing: -.055em;
}
.showcase-copy p { margin: 10px 0 0; color: rgba(248,234,216,.54); font-size: 10px; }
.menu-command { justify-content: center; gap: 10px; }
.campaign-play {
  min-height: 92px;
  padding: 15px;
  grid-template-columns: 46px 1fr 24px;
  gap: 11px;
  border-radius: 18px;
  background: linear-gradient(135deg, #b84c54, #762d43);
  box-shadow: 0 14px 30px rgba(0,0,0,.22), inset 0 1px rgba(255,255,255,.18);
}
.campaign-play::after { display: none; }
.play-symbol { width: 44px; height: 44px; border-radius: 14px; background: rgba(255,255,255,.14); }
.play-symbol svg { width: 19px; height: 19px; }
.play-copy small { font-size: 7px; letter-spacing: .16em; }
.play-copy b { margin-top: 4px; font-size: 19px; letter-spacing: -.03em; }
.play-copy em { margin-top: 4px; font-size: 8px; }
.play-arrow { opacity: .72; }
.quick-modes { gap: 7px; }
.quick-mode {
  min-height: 82px;
  padding: 11px 10px;
  border: 1px solid rgba(248,234,216,.11);
  border-radius: 15px;
  color: #f8ead8;
  background: rgba(255,255,255,.055);
  box-shadow: none;
  backdrop-filter: none;
}
.quick-icon { width: 29px; height: 29px; border-radius: 9px; box-shadow: none; }
.quick-icon svg { width: 15px; height: 15px; }
.quick-mode b { font-size: 10px; }
.quick-mode small { color: rgba(248,234,216,.4); font-size: 7px; }
.game-menu-dock {
  position: static;
  min-height: 58px;
  padding: 4px 5px;
  gap: 2px;
  border: 1px solid rgba(248,234,216,.11);
  border-radius: 17px;
  background: rgba(255,255,255,.055);
  box-shadow: none;
  backdrop-filter: none;
}
.game-menu-dock button { min-height: 48px; padding: 3px 5px; color: rgba(248,234,216,.5); }
.game-menu-dock .dock-icon { width: 25px; height: 25px; border-radius: 8px; color: #e2a26d; background: rgba(226,162,109,.1); }
.game-menu-dock .dock-icon svg { width: 14px; height: 14px; }
.game-menu-dock b { font-size: 7px; letter-spacing: .04em; }

@media (max-width: 760px) {
  .game-menu-shell {
    padding-top: max(10px, var(--safe-t));
    padding-bottom: max(8px, var(--safe-b));
    grid-template-rows: auto minmax(0, 1fr) auto;
    gap: 8px;
  }
  .game-menu-main { display: flex; flex-direction: column; justify-content: center; gap: 8px; }
  .menu-showcase {
    height: auto;
    min-height: 0;
    flex: 1 1 auto;
    padding: 15px;
    border-radius: 20px;
  }
  .menu-showcase .menu-pour-scene {
    width: 100%;
    height: clamp(155px, 31vh, 225px);
    min-height: 0;
    margin: 20px auto 0;
  }
  .showcase-copy { margin-top: 0; }
  .showcase-copy h1 { font-size: clamp(43px, 14vw, 62px); }
  .showcase-copy p { margin-top: 7px; font-size: 9px; }
  .menu-command { flex: 0 0 auto; gap: 7px; }
  .campaign-play { min-height: 72px; padding: 11px; border-radius: 16px; grid-template-columns: 39px 1fr 22px; gap: 9px; }
  .play-symbol { width: 38px; height: 38px; border-radius: 12px; }
  .play-symbol svg { width: 17px; height: 17px; }
  .play-copy b { font-size: 17px; }
  .quick-mode { min-height: 68px; padding: 8px; border-radius: 12px; }
  .quick-icon { width: 25px; height: 25px; border-radius: 8px; }
  .quick-icon svg { width: 13px; height: 13px; }
  .quick-mode b { font-size: 9px; white-space: nowrap; }
  .quick-mode small { display: none; }
}
@media (max-width: 390px) {
  .game-logo b { font-size: 14px; }
  .game-logo small { display: none; }
  .menu-showcase .menu-pour-scene { height: 150px; }
  .showcase-copy h1 { font-size: 43px; }
  .showcase-copy p { font-size: 8px; }
  .campaign-play { min-height: 68px; }
  .play-copy b { font-size: 16px; }
  .game-menu-dock b { font-size: 6px; }
}

/* Four arcade modes: the acceleration mode gets its own visual cue. */
.quick-modes { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.quick-mode.acceleration .quick-icon {
  background: linear-gradient(145deg, #d17848, #a8443c);
}
@media (max-width: 760px) {
  .quick-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quick-mode.acceleration .quick-icon { background: linear-gradient(145deg, #d17848, #a8443c); }
}

/* —— Cellar (bottle picker) —— */
.cellar-screen {
  place-items: start center !important;
  align-content: start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: max(12px, var(--safe-t)) 14px max(14px, var(--safe-b)) !important;
  color: #f8ead8 !important;
  background: #140e12 !important;
  background-image:
    radial-gradient(ellipse 80% 45% at 50% 0%, rgba(130, 55, 65, .42), transparent 60%),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(70, 36, 28, .35), transparent 55%) !important;
}
.cellar-shell {
  width: min(520px, 100%);
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-family: "Syne", Arial, sans-serif;
  color: #f8ead8;
}
.cellar-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
}
.cellar-screen .menu-kicker {
  color: #df956f !important;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 8px;
}
.cellar-screen .menu-title {
  margin: 4px 0 0 !important;
  color: #f8ead8 !important;
  font: 600 clamp(34px, 9vw, 48px)/.92 "Cormorant Garamond", Georgia, serif !important;
}
.cellar-screen .secondary-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(248,234,216,.18) !important;
  border-radius: 12px;
  color: #f4e6d4 !important;
  background: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}
.cellar-stage {
  position: relative;
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 340px;
  touch-action: pan-y;
}
.cellar-view {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  min-height: 340px;
  padding: 18px 12px 0;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(248,234,216,.14);
  background:
    radial-gradient(ellipse 70% 45% at 50% 20%, rgba(200, 90, 70, .16), transparent 60%),
    linear-gradient(180deg, #24181d 0%, #151014 55%, #1c120f 100%);
}
.cellar-bottle-canvas {
  position: relative;
  z-index: 2;
  width: min(170px, 46vw);
  height: auto;
  aspect-ratio: 180 / 290;
  display: block;
  margin-bottom: 8px;
  filter: drop-shadow(0 18px 16px rgba(0,0,0,.45));
}
.cellar-bottle-canvas.is-locked {
  opacity: .45;
  filter: drop-shadow(0 14px 12px rgba(0,0,0,.35)) grayscale(.35) brightness(.65);
}
.cellar-bottle-canvas.cellar-pop {
  animation: cellar-pop .38s cubic-bezier(.2,.85,.2,1);
}
@keyframes cellar-pop {
  from { opacity: .35; transform: scale(.94) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.cellar-table {
  width: 100%;
  height: 78px;
  margin-top: auto;
  border-radius: 0 0 22px 22px;
  background:
    linear-gradient(180deg, rgba(255,220,170,.3), rgba(120,70,40,.08) 24%, transparent 50%),
    linear-gradient(180deg, #9a6140 0%, #6a3d26 40%, #2a1712 100%);
  box-shadow: inset 0 1px 0 rgba(255,220,170,.35);
}
.cellar-lock-note {
  position: absolute;
  left: 50%;
  top: 42%;
  z-index: 3;
  transform: translate(-50%, -50%);
  min-width: 58%;
  max-width: 82%;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(12, 8, 10, .9);
  border: 1px solid rgba(248,234,216,.22);
  color: #f1d8b8;
  text-align: center;
  font-size: 11px;
  line-height: 1.35;
}
.cellar-lock-note.hidden { display: none !important; }
.cellar-nav {
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(248,234,216,.22);
  border-radius: 50%;
  color: #f8ead8;
  background: rgba(20, 12, 14, .55);
  font-size: 24px;
  line-height: 1;
}
.cellar-nav:active { transform: scale(.94); background: rgba(226,162,109,.28); }
.cellar-hint {
  margin: 0;
  color: rgba(248,234,216,.5);
  font-size: 10px;
  text-align: center;
}
.cellar-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 14px;
}
.cellar-dots button {
  width: 7px;
  height: 7px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(248,234,216,.25);
}
.cellar-dots button.on {
  width: 18px;
  border-radius: 99px;
  background: #e2a26d;
}
.cellar-panel {
  padding: 14px;
  border: 1px solid rgba(248,234,216,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  text-align: left;
}
.cellar-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.cellar-panel-top b {
  color: #f8ead8;
  font: 600 22px/1 "Cormorant Garamond", Georgia, serif;
}
@media (max-height: 640px) {
  .cellar-stage, .cellar-view { min-height: 280px; }
  .cellar-bottle-canvas { width: min(140px, 40vw); }
  .cellar-table { height: 64px; }
  .cellar-hint { display: none; }
}

/* —— Showcase stages: place previews —— */
.gallery-screen {
  place-items: start center !important;
  align-content: start !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  padding: max(12px, var(--safe-t)) 12px max(12px, var(--safe-b)) !important;
  color: #f8ead8 !important;
  background: #120d10 !important;
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -5%, rgba(130, 55, 65, .4), transparent 58%),
    radial-gradient(ellipse 50% 40% at 100% 100%, rgba(60, 35, 28, .35), transparent 55%) !important;
}
.gallery-shell {
  width: min(760px, 100%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: "Syne", Arial, sans-serif;
  color: #f8ead8;
}
.gallery-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
}
.gallery-screen .menu-kicker {
  color: #df956f !important;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 8px;
}
.gallery-screen .menu-title {
  margin: 4px 0 0 !important;
  color: #f8ead8 !important;
  font: 600 clamp(34px, 9vw, 50px)/.9 "Cormorant Garamond", Georgia, serif !important;
}
.gallery-back,
.gallery-screen .secondary-button {
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(248,234,216,.18) !important;
  border-radius: 12px;
  color: #f4e6d4 !important;
  background: rgba(255,255,255,.08) !important;
  box-shadow: none !important;
}
.places-wallet {
  min-width: 78px;
  padding: 8px 11px;
  border: 1px solid rgba(248,234,216,.14);
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  text-align: right;
}
.places-wallet small {
  display: block;
  color: rgba(248,234,216,.45);
  font-size: 7px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.places-wallet b {
  display: block;
  margin-top: 3px;
  color: #efcf84;
  font-size: 17px;
}

.stage {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid rgba(248,234,216,.12);
  background: linear-gradient(180deg, rgba(255,255,255,.05), rgba(0,0,0,.18));
  isolation: isolate;
}
.place-stage {
  min-height: min(340px, 46vh);
  height: min(340px, 46vh);
  background: #0e0a0c;
}
.stage-track {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  scrollbar-width: none;
}
.stage-track::-webkit-scrollbar { display: none; }
.stage-slide {
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  min-height: 100%;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  display: grid;
  place-items: center;
  padding: 20px 44px 36px;
  box-sizing: border-box;
}
.place-slide {
  padding: 0;
  place-items: stretch;
}
.stage-arrow {
  position: absolute;
  top: 42%;
  z-index: 5;
  width: 36px;
  height: 36px;
  min-height: 0;
  padding: 0;
  border: 1px solid rgba(248,234,216,.22);
  border-radius: 50%;
  color: #f8ead8;
  background: rgba(20, 12, 14, .58);
  font-size: 22px;
  line-height: 1;
  backdrop-filter: blur(6px);
  box-shadow: 0 6px 16px rgba(0,0,0,.28);
}
.stage-arrow.left { left: 8px; }
.stage-arrow.right { right: 8px; }
.stage-arrow:active { transform: scale(.94); background: rgba(226,162,109,.28); }

.place-frame {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: #1a1216;
}
.stage-place-art,
.stage-place-video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.stage-place-video {
  background: #1a1216;
  pointer-events: none;
}
.place-slide.is-locked .stage-place-art,
.place-slide.is-locked .stage-place-video {
  filter: saturate(.65) brightness(.7);
}
  position: absolute;
  left: 12px;
  bottom: 12px;
  z-index: 2;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(12,8,10,.74);
  border: 1px solid rgba(248,234,216,.12);
  color: #f8ead8;
  font: 600 13px/1 "Cormorant Garamond", Georgia, serif;
  letter-spacing: .02em;
}
.place-frame-label {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  z-index: 3;
  min-width: 54%;
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(12, 8, 10, .9);
  border: 1px solid rgba(248,234,216,.22);
  color: #f1d8b8;
  text-align: center;
  font-size: 10px;
  line-height: 1.35;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}
.gallery-hint {
  margin: 0;
  color: rgba(248,234,216,.5);
  font-size: 10px;
  text-align: center;
  letter-spacing: .04em;
}

.gallery-dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 14px;
}
.gallery-dots button {
  width: 7px;
  height: 7px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(248,234,216,.25);
}
.gallery-dots button.on {
  width: 18px;
  border-radius: 99px;
  background: #e2a26d;
}
.gallery-panel {
  padding: 14px;
  border: 1px solid rgba(248,234,216,.14);
  border-radius: 18px;
  background: rgba(255,255,255,.07);
  text-align: left;
}
.gallery-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.gallery-panel-top b {
  color: #f8ead8;
  font: 600 22px/1 "Cormorant Garamond", Georgia, serif;
}
.gallery-badge {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 8px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #df956f;
  background: rgba(226,162,109,.14);
  white-space: nowrap;
}
.gallery-badge.selected {
  color: #efcf84;
  background: rgba(216,174,95,.18);
}
.gallery-badge.locked {
  color: rgba(248,234,216,.55);
  background: rgba(255,255,255,.08);
}
.gallery-info {
  margin: 8px 0 12px;
  color: rgba(248,234,216,.62);
  font-size: 11px;
  line-height: 1.4;
}
#cellarSelectBtn,
#placesActionBtn {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, #b84c54, #762d43);
}
#cellarSelectBtn:disabled,
#placesActionBtn:disabled {
  opacity: .55;
  background: rgba(255,255,255,.12);
  color: rgba(248,234,216,.7);
}
@media (max-width: 420px) {
  .stage-arrow { width: 32px; height: 32px; font-size: 20px; }
  .gallery-panel-top b { font-size: 19px; }
  .cellar-panel-top b { font-size: 19px; }
  .stage-slide { padding-left: 40px; padding-right: 40px; }
}
@media (max-height: 640px) {
  .place-stage { min-height: 250px; height: 250px; }
  .gallery-hint { font-size: 9px; }
}
