:root {
  --wood-dark: #16100c;
  --wood-mid: #2c1e16;
  --cream: #f5ead6;
  --kraft: #e5d0ad;
  --brass: #d4a14a;
  --brass-bright: #f2c978;
  --terracotta: #b9532b;
  --magenta: #c4286a;
  --jade: #5e8f42;
  --ink: #2b1d14;
}

* { box-sizing: border-box; user-select: none; -webkit-user-select: none; }

html, body {
  margin: 0; padding: 0; width: 100%; height: 100%;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #231812 0%, #0d0907 100%);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Serif SC", serif;
  color: var(--cream);
}

#viewport {
  position: relative;
  width: 100vw; height: 100vh; height: 100dvh;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}

/* Cinema 1376x768 aspect-locked rig scaled dynamically by JS */
#camera-rig {
  position: relative;
  width: 1376px; height: 768px;
  flex-shrink: 0;
  transform-origin: center center;
  will-change: transform;
}

#stage {
  position: relative;
  width: 1376px; height: 768px;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(212, 161, 74, 0.18);
  background: #140e0a;
}

.layer-img {
  position: absolute; inset: 0; width: 1376px; height: 768px;
  object-fit: cover; pointer-events: none;
}

#bg-warm { opacity: 0; transition: opacity 1.6s ease; }

/* Dynamic swinging brass lamp light cone */
#lamp-cone {
  position: absolute;
  left: 688px; top: 204px;
  width: 780px; height: 640px;
  transform-origin: top center;
  transform: translateX(-50%) rotate(0deg);
  background: radial-gradient(ellipse at 50% 6%, rgba(255, 224, 152, 0.24) 0%, rgba(255, 190, 96, 0.10) 42%, transparent 74%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 4;
}

/* Skyline & Expanded Diorama Hotspots */
#skyline-layer { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

.tower-hotspot, .bougainvillea-hotspot, .lamp-hotspot {
  position: absolute;
  background: transparent; border: none; cursor: pointer;
  pointer-events: auto;
  transition: filter 0.25s ease;
}
.tower-hotspot:hover {
  background: radial-gradient(ellipse at center, rgba(255, 214, 128, 0.16), transparent 72%);
}
.lamp-hotspot:hover {
  background: radial-gradient(circle at 50% 70%, rgba(255, 226, 150, 0.2), transparent 65%);
}

/* Clickable Miniature Urban-Village Windows */
.mini-window {
  position: absolute;
  width: 22px; height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 4px;
  border: 1.5px dashed rgba(255, 226, 164, 0.35);
  background: rgba(255, 198, 102, 0.04);
  cursor: pointer;
  pointer-events: auto;
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background 0.3s ease;
}
.mini-window:hover {
  transform: translate(-50%, -50%) scale(1.28);
  border-color: rgba(255, 232, 168, 0.9);
  background: rgba(255, 212, 120, 0.28);
}
.mini-window.lit {
  border: 1.5px solid rgba(255, 238, 185, 0.95);
  background: radial-gradient(circle, #fff4cb 0%, #ffb74d 65%, rgba(255, 162, 54, 0.3) 100%);
  box-shadow: 0 0 18px 6px rgba(255, 184, 72, 0.72), 0 0 40px 10px rgba(255, 145, 52, 0.35);
  animation: warmFlicker 3.2s infinite ease-in-out;
}
@keyframes warmFlicker {
  0%, 100% { opacity: 0.92; }
  50% { opacity: 1; }
}

/* Pot Interactive Zone */
#pot-zone { position: absolute; inset: 0; z-index: 8; pointer-events: none; }

#pot-empty-mask {
  position: absolute;
  left: 536px; top: 454px; width: 304px; height: 96px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 55%, rgba(42, 22, 12, 0.88) 0%, rgba(62, 31, 16, 0.82) 55%, rgba(88, 42, 18, 0.1) 100%);
  transition: opacity 0.8s ease;
  pointer-events: none;
}

#pot-broth-glow {
  position: absolute;
  left: 536px; top: 462px; width: 304px; height: 84px;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 226, 128, 0.35) 0%, rgba(255, 186, 68, 0.14) 60%, transparent 100%);
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease;
}

#pot-foam-layer { position: absolute; inset: 0; pointer-events: none; z-index: 18; }
.foam-puff {
  position: absolute;
  width: 44px; height: 26px;
  border-radius: 50%;
  background: radial-gradient(circle at 38% 35%, rgba(255, 250, 240, 0.92), rgba(235, 214, 184, 0.72) 70%, rgba(205, 175, 138, 0.1) 100%);
  box-shadow: inset 0 -3px 6px rgba(140, 102, 68, 0.3);
  cursor: pointer;
  pointer-events: auto;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease;
}
.foam-puff:hover { transform: translate(-50%, -50%) scale(1.12); }

/* Clay Pot Lid (Appears during Act 3 simmering -> lift in Act 4!) */
#pot-lid {
  position: absolute;
  left: 518px; top: 404px; width: 340px; height: 118px;
  border-radius: 50% 50% 46% 46% / 62% 62% 38% 38%;
  background: radial-gradient(ellipse at 50% 28%, #d27345 0%, #9b421f 58%, #5e240f 100%);
  box-shadow: inset 0 8px 18px rgba(255, 214, 166, 0.34), inset 0 -10px 18px rgba(24, 8, 2, 0.62), 0 14px 26px rgba(0, 0, 0, 0.55);
  border: 2px solid rgba(240, 174, 118, 0.28);
  opacity: 0; transform: translateY(-70px) scale(0.95);
  pointer-events: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  z-index: 12;
}
#pot-lid.active-lift { pointer-events: auto; }
.lid-knob {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 28px; border-radius: 50%;
  background: radial-gradient(circle at 42% 30%, #e48c58, #8c3718 75%, #4d1c0b);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.5);
}
.lid-rim {
  position: absolute; bottom: 8px; left: 16px; right: 16px; height: 14px;
  border-radius: 50%; border-bottom: 2px solid rgba(255, 224, 178, 0.25);
}
.lid-hint {
  margin-top: 14px; padding: 4px 12px; border-radius: 20px;
  background: rgba(34, 18, 10, 0.78); border: 1px solid var(--brass);
  color: var(--brass-bright); font-size: 13px; letter-spacing: 1px;
  opacity: 0; transition: opacity 0.3s ease;
}
#pot-lid.ready-glow {
  box-shadow: inset 0 8px 18px rgba(255, 226, 166, 0.5), 0 0 38px rgba(255, 198, 92, 0.8), 0 14px 26px rgba(0, 0, 0, 0.55);
}
#pot-lid.ready-glow .lid-hint { opacity: 1; animation: gentlePulse 1.1s infinite; }

#pot-hitbox {
  position: absolute; left: 495px; top: 430px; width: 388px; height: 196px;
  background: transparent; border: none; cursor: pointer; pointer-events: auto;
}

/* 1:1 Extracted Interactive Props */
.interactive-prop {
  position: absolute; cursor: pointer; z-index: 10;
  transition: filter 0.2s ease;
}
.interactive-prop:hover { filter: drop-shadow(0 0 12px rgba(255, 214, 128, 0.45)); }

#hourglass-wrap {
  left: 328px; top: 410px; width: 96px; height: 186px;
  transform-origin: center center;
}
#hourglass-img { width: 100%; height: 100%; display: block; pointer-events: none; }
#sand-canvas { position: absolute; inset: 0; pointer-events: none; }

#bowl-wrap { left: 356px; top: 570px; width: 156px; height: 104px; z-index: 11; }
#bowl-img { width: 100%; height: 100%; display: block; pointer-events: none; }
#bowl-soup-fill {
  position: absolute; left: 34px; top: 20px; width: 102px; height: 24px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 45% 45%, rgba(255, 236, 158, 0.92), rgba(235, 185, 76, 0.85) 68%, rgba(190, 128, 36, 0.5) 100%);
  opacity: 0; transform: scale(0.75);
  pointer-events: none;
  box-shadow: inset 0 2px 6px rgba(255, 255, 240, 0.65);
}
#temp-pill {
  position: absolute; left: 50%; top: -32px; transform: translateX(-50%);
  white-space: nowrap; padding: 4px 10px; border-radius: 14px;
  background: rgba(30, 18, 11, 0.9); border: 1.5px solid var(--brass);
  color: var(--brass-bright); font-size: 12px; font-weight: 700;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.5);
  pointer-events: none;
}

/* Highlight Target Rings */
.prop-ring {
  position: absolute; inset: -10px; border-radius: 50%;
  border: 2.5px dashed var(--brass-bright);
  opacity: 0; pointer-events: none;
}
.prop-ring.active {
  opacity: 1;
  animation: ringPulse 1.3s infinite ease-in-out;
}
@keyframes ringPulse {
  0%, 100% { transform: scale(0.95); opacity: 0.65; }
  50% { transform: scale(1.07); opacity: 1; }
}

/* Coconut Station */
#coconut-station { position: absolute; inset: 0; z-index: 11; pointer-events: none; }
.coco-btn {
  position: absolute; background: transparent; border: none; cursor: pointer;
  pointer-events: auto; border-radius: 50%; z-index: 10;
}
.coco-btn.highlight {
  z-index: 22;
  box-shadow: inset 0 0 0 3px rgba(244, 211, 118, 0.9), 0 0 24px rgba(154, 214, 96, 0.55);
  animation: gentlePulse 1.2s infinite;
}
#flying-coconut {
  position: absolute; left: 1004px; top: 482px; width: 132px; height: 138px;
  opacity: 0; pointer-events: none; z-index: 16;
  filter: drop-shadow(0 16px 20px rgba(0, 0, 0, 0.55));
}
#rhythm-ring {
  position: absolute; left: 1030px; top: 530px; width: 110px; height: 110px;
  transform: translate(-50%, -50%);
  pointer-events: none; opacity: 0; transition: opacity 0.25s;
  display: flex; align-items: center; justify-content: center;
}
#rhythm-ring.show { opacity: 1; }
.rhythm-target {
  position: absolute; width: 58px; height: 58px; border-radius: 50%;
  border: 3px solid var(--brass-bright);
  box-shadow: 0 0 16px rgba(242, 201, 120, 0.7);
}
.rhythm-pulse {
  position: absolute; width: 106px; height: 106px; border-radius: 50%;
  border: 3px solid #a8f07a;
}
.rhythm-label {
  position: absolute; bottom: -26px; white-space: nowrap;
  padding: 2px 9px; border-radius: 10px;
  background: rgba(24, 15, 9, 0.9); border: 1px solid var(--brass);
  color: #f9e4b7; font-size: 12px; font-weight: 700;
}

/* Sauce Station */
#sauce-station { position: absolute; inset: 0; z-index: 12; pointer-events: none; }
#sauce-hitbox, #soy-hitbox {
  position: absolute; background: transparent; border: none; cursor: pointer; pointer-events: auto; border-radius: 50%;
}
#squeeze-lime {
  position: absolute; left: 985px; top: 562px; width: 56px; height: 58px;
  opacity: 0; pointer-events: none; z-index: 15;
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.5));
}
#sauce-ring { left: 936px; top: 590px; width: 156px; height: 90px; inset: auto; }

/* === EXPANSION 1: HANDCRAFTED CLAY TECH-PARK EMPLOYEE BADGE === */
#clay-badge {
  left: 205px; top: 572px; width: 102px; height: 86px;
  z-index: 13;
  perspective: 600px;
}
.badge-lanyard {
  position: absolute; left: -12px; top: -18px; width: 64px; height: 42px;
  border: 5px solid #3c658f; border-radius: 40px 40px 12px 12px;
  border-bottom-color: transparent;
  transform: rotate(-28deg);
  filter: drop-shadow(0 4px 5px rgba(0,0,0,0.55));
}
.badge-card {
  position: relative; width: 82px; height: 54px; margin: 14px auto 0;
  transform-style: preserve-3d;
  transform: rotate(-12deg) rotateX(28deg);
  transition: transform 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#clay-badge.flipped .badge-card {
  transform: rotate(-6deg) rotateX(28deg) rotateY(180deg);
}
.badge-front, .badge-back {
  position: absolute; inset: 0; border-radius: 7px;
  backface-visibility: hidden;
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.62), inset 0 2px 4px rgba(255, 255, 255, 0.55);
}
.badge-front {
  background: linear-gradient(145deg, #efe4cf 0%, #d9c7a8 100%);
  border: 2px solid #b9a17f;
  padding: 6px;
}
.badge-led {
  position: absolute; top: 5px; right: 6px; width: 8px; height: 8px; border-radius: 50%;
  background: #48c9ff;
  box-shadow: 0 0 10px 3px rgba(72, 201, 255, 0.9);
  animation: workBlink 0.9s infinite;
}
@keyframes workBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.25; } }
.badge-photo {
  width: 22px; height: 24px; border-radius: 4px;
  background: linear-gradient(180deg, #8b9db0, #5a6c80);
  float: left; margin-right: 6px;
}
.badge-lines { float: left; width: 34px; padding-top: 3px; }
.badge-lines span { display: block; height: 4px; border-radius: 2px; background: #8f7b62; margin-bottom: 5px; }
.badge-lines span:last-child { width: 22px; }
.badge-stripes {
  position: absolute; left: 6px; right: 6px; bottom: 5px; height: 6px;
  display: flex; gap: 3px;
}
.badge-stripes i { flex: 1; border-radius: 2px; }
.badge-stripes i:nth-child(1) { background: #e65c4f; }
.badge-stripes i:nth-child(2) { background: #f2b84b; }
.badge-stripes i:nth-child(3) { background: #4ca982; }

.badge-back {
  background: linear-gradient(145deg, #754c32, #4d2e1c);
  border: 2px solid #966644;
  transform: rotateY(180deg);
  display: flex; align-items: center; justify-content: center;
}
.badge-back-stamp {
  font-size: 11px; font-weight: 800; line-height: 1.1; text-align: center;
  color: #f3ce88; letter-spacing: 1px;
  border: 1.5px dashed rgba(243, 206, 136, 0.65); padding: 3px 8px; border-radius: 4px;
}
.badge-ping-bubble {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  white-space: nowrap; padding: 3px 9px; border-radius: 12px;
  background: rgba(24, 52, 74, 0.92); border: 1.5px solid #6bd4ff;
  color: #dff6ff; font-size: 11px; font-weight: 700;
  box-shadow: 0 4px 12px rgba(72, 201, 255, 0.45);
  animation: gentlePulse 1.1s infinite;
}
#clay-badge.flipped .badge-ping-bubble { display: none; }

/* === EXPANSION 2: HANDCRAFTED CLAY MINIATURE VINTAGE RADIO === */
#clay-radio {
  left: 1166px; top: 404px; width: 118px; height: 86px;
  z-index: 12;
}
.radio-antenna {
  position: absolute; right: 16px; top: -22px; width: 3px; height: 34px;
  background: linear-gradient(180deg, #e5c687, #8b6a35);
  transform: rotate(14deg); border-radius: 2px;
}
.radio-body {
  position: relative; width: 108px; height: 64px; margin-top: 12px;
  border-radius: 12px;
  background: linear-gradient(160deg, #8c4b2b 0%, #5e2f19 65%, #3d1d0f 100%);
  border: 2px solid #b57347;
  box-shadow: 0 12px 22px rgba(0, 0, 0, 0.65), inset 0 3px 6px rgba(255, 214, 162, 0.25);
  padding: 9px 10px;
  display: grid; grid-template-columns: 44px 1fr; gap: 8px; align-items: center;
}
.radio-grille {
  height: 40px; border-radius: 6px;
  background: repeating-linear-gradient(0deg, #2e170d 0px, #2e170d 3px, #7b4a2e 3px, #7b4a2e 6px);
  box-shadow: inset 0 2px 5px rgba(0,0,0,0.65);
}
.radio-dial-window {
  position: relative; height: 16px; border-radius: 4px;
  background: linear-gradient(90deg, #ffb648, #ffe7a3, #f3a43b);
  box-shadow: 0 0 12px rgba(255, 198, 92, 0.7), inset 0 1px 4px rgba(60, 26, 8, 0.5);
  margin-bottom: 6px;
}
.radio-needle {
  position: absolute; top: 2px; bottom: 2px; left: 22%; width: 3px;
  background: #b92b27; border-radius: 2px;
  transition: left 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.radio-knob {
  width: 18px; height: 18px; border-radius: 50%; margin-left: auto;
  background: radial-gradient(circle at 35% 30%, #f7d68d, #b88232 72%, #6e4a18);
  box-shadow: 0 3px 6px rgba(0,0,0,0.55);
}
.radio-label {
  margin-top: 4px; text-align: center; font-size: 11px; font-weight: 700;
  color: #f6dcb0; text-shadow: 0 2px 5px rgba(0, 0, 0, 0.9);
  background: rgba(28, 17, 11, 0.78); border: 1px solid rgba(212, 161, 74, 0.45);
  border-radius: 10px; padding: 2px 6px;
}

/* FX Canvas */
#fx-canvas { position: absolute; inset: 0; pointer-events: none; z-index: 15; }

/* Torn Kraft Paper Micro-Stories */
#story-popups { position: absolute; inset: 0; pointer-events: none; z-index: 18; }
.story-note {
  position: absolute; max-width: 240px;
  padding: 8px 12px; border-radius: 4px 10px 6px 8px;
  background: linear-gradient(160deg, #f7ecd6, #e6d1ab);
  color: var(--ink); font-size: 12.5px; line-height: 1.45; font-weight: 600;
  border: 1.5px solid #b89664;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.55);
  transform: translate(-50%, -115%);
}
.story-note::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; width: 12px; height: 12px;
  background: #e8d4b0; border-right: 1.5px solid #b89664; border-bottom: 1.5px solid #b89664;
  transform: translateX(-50%) rotate(45deg);
}

/* === DIEGETIC HUD CHROME === */
#hud-top {
  position: fixed; top: 14px; left: 16px; right: 16px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  z-index: 30; pointer-events: none;
}

.chapter-ribbon {
  pointer-events: auto;
  position: relative;
  display: flex; align-items: center; gap: 16px;
  padding: 9px 18px 9px 16px;
  background: linear-gradient(180deg, rgba(44, 29, 20, 0.92), rgba(26, 17, 12, 0.94));
  border: 1.5px solid rgba(212, 161, 74, 0.55);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 229, 178, 0.22);
  backdrop-filter: blur(8px);
}
.ribbon-pin {
  width: 10px; height: 10px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe6a8, #b67e2a);
  box-shadow: 0 2px 5px rgba(0,0,0,0.6);
}
.ribbon-title .badge-tag {
  display: block; font-size: 10px; letter-spacing: 1.4px; color: var(--brass-bright); font-weight: 700;
}
.ribbon-title h1 {
  margin: 0; font-size: 17px; font-weight: 800; color: var(--cream); letter-spacing: 1px;
}

.act-steps { display: flex; gap: 8px; flex-wrap: wrap; }
.act-dot {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 20px;
  font-size: 12px; color: rgba(245, 234, 214, 0.52);
  border: 1px solid rgba(212, 161, 74, 0.18);
  transition: all 0.3s ease;
}
.act-dot i {
  font-style: normal; width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; background: rgba(212, 161, 74, 0.18);
}
.act-dot.active {
  color: #fff6e2; background: rgba(185, 83, 43, 0.35);
  border-color: var(--brass-bright);
  box-shadow: 0 0 14px rgba(212, 161, 74, 0.35);
}
.act-dot.active i { background: var(--brass-bright); color: var(--ink); }
.act-dot.done { color: #b7e297; border-color: rgba(145, 198, 102, 0.45); }
.act-dot.done i { background: #74a94f; color: #16210f; }

.brass-controls {
  pointer-events: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end;
}
.brass-btn {
  padding: 8px 13px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(52, 34, 23, 0.92), rgba(29, 19, 13, 0.95));
  border: 1.5px solid rgba(212, 161, 74, 0.5);
  color: var(--cream); font-size: 12.5px; font-weight: 700;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s, background 0.2s;
}
.brass-btn:hover { transform: translateY(-2px); border-color: var(--brass-bright); background: rgba(74, 47, 30, 0.96); }
.brass-btn:active { transform: translateY(0) scale(0.96); }
.brass-btn.on { border-color: var(--brass-bright); color: var(--brass-bright); }
.link-btn { background: linear-gradient(180deg, rgba(164, 52, 86, 0.82), rgba(98, 28, 52, 0.9)); border-color: rgba(244, 148, 184, 0.55); }

/* Left Stitched Flavor Notebook */
#flavor-notebook {
  position: fixed; left: 16px; top: 82px; width: 244px; z-index: 28;
  padding: 10px 14px; border-radius: 12px;
  background: linear-gradient(165deg, rgba(46, 31, 21, 0.88), rgba(27, 18, 12, 0.92));
  border: 1.5px dashed rgba(212, 161, 74, 0.48);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(6px);
}
.nb-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.nb-title { font-size: 12px; font-weight: 800; color: var(--brass-bright); letter-spacing: 0.4px; white-space: nowrap; }
.nb-city { font-size: 11px; color: #f6d799; white-space: nowrap; }
.flavor-bars { display: flex; flex-direction: column; gap: 6px; }
.f-row { display: grid; grid-template-columns: 32px 1fr; align-items: center; gap: 8px; font-size: 11.5px; color: #e8d7bc; }
.f-track { height: 7px; border-radius: 6px; background: rgba(255, 232, 194, 0.14); overflow: hidden; }
.f-track i { display: block; height: 100%; width: 12%; border-radius: 6px; transition: width 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); }
#bar-sweet { background: linear-gradient(90deg, #7ec850, #c8f08a); }
#bar-umami { background: linear-gradient(90deg, #e09c38, #ffe08a); }
#bar-zest  { background: linear-gradient(90deg, #d95240, #ff9d5c); }
#bar-heat  { background: linear-gradient(90deg, #c4366b, #ff82a9); }

/* Act 2 Ingredient Tray */
#ingredient-tray {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  z-index: 32;
  padding: 12px 16px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(46, 30, 20, 0.95), rgba(26, 17, 11, 0.96));
  border: 2px solid var(--brass);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.68);
  text-align: center;
}
.tray-title { font-size: 12.5px; font-weight: 800; color: var(--brass-bright); margin-bottom: 9px; letter-spacing: 0.8px; }
.tray-items { display: flex; gap: 10px; }
.ing-card {
  width: 116px; padding: 10px 8px; border-radius: 12px; cursor: pointer;
  background: linear-gradient(160deg, #f6ead4, #e1c79c);
  border: 2px solid #b58d58; color: var(--ink);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s;
}
.ing-card:hover:not(:disabled) { transform: translateY(-6px) rotate(-1.5deg); }
.ing-card:disabled { opacity: 0.42; cursor: default; transform: scale(0.94); filter: grayscale(0.4); }
.ing-emoji { font-size: 26px; }
.ing-card b { font-size: 12.5px; }
.ing-card small { font-size: 10.5px; color: #6e4e34; }

/* Bottom Stitched Prompt Plaque */
#hud-bottom {
  position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: 30; width: min(820px, calc(100vw - 32px));
  pointer-events: none;
}
.prompt-plaque {
  pointer-events: auto;
  display: flex; align-items: center; gap: 14px;
  padding: 11px 18px; border-radius: 16px;
  background: linear-gradient(180deg, rgba(44, 28, 19, 0.93), rgba(24, 15, 10, 0.96));
  border: 1.5px solid rgba(212, 161, 74, 0.6);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 224, 168, 0.22);
  backdrop-filter: blur(8px);
}
.prompt-step-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: radial-gradient(circle at 35% 30%, rgba(242, 201, 120, 0.28), rgba(185, 83, 43, 0.26));
  border: 1.5px solid rgba(242, 201, 120, 0.55);
}
.prompt-copy { flex: 1; min-width: 0; }
.prompt-main { font-size: 14.5px; font-weight: 700; color: #fff6e4; line-height: 1.35; }
.prompt-sub { font-size: 12px; color: rgba(240, 217, 179, 0.75); margin-top: 2px; }
.prompt-timer {
  padding: 6px 13px; border-radius: 12px; text-align: center;
  background: rgba(185, 83, 43, 0.28); border: 1.5px solid var(--brass-bright);
}
.timer-label { display: block; font-size: 10px; color: var(--brass-bright); }
.prompt-timer strong { font-size: 18px; font-family: monospace; color: #fff4d2; }

/* === TITLE & FINALE OVERLAYS === */
#title-overlay, #finale-overlay {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at center, rgba(22, 13, 8, 0.54) 0%, rgba(12, 7, 5, 0.82) 100%);
  backdrop-filter: blur(4px);
  padding: 20px;
}

.title-card {
  position: relative; width: min(560px, 94vw);
  padding: 32px 34px 28px; border-radius: 20px; text-align: center;
  background: linear-gradient(160deg, rgba(46, 30, 20, 0.96), rgba(26, 16, 11, 0.98));
  border: 2px solid var(--brass);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.8), inset 0 0 0 6px rgba(242, 201, 120, 0.08);
}
.card-stitch {
  position: absolute; inset: 10px; border-radius: 13px;
  border: 1.5px dashed rgba(212, 161, 74, 0.35); pointer-events: none;
}
.title-eyebrow { font-size: 11px; letter-spacing: 2.2px; color: var(--brass-bright); font-weight: 700; }
.title-main { margin: 10px 0 12px; font-size: 34px; letter-spacing: 3px; color: #fff6e5; text-shadow: 0 4px 18px rgba(212, 161, 74, 0.38); }
.title-desc { margin: 0 0 18px; font-size: 14.5px; line-height: 1.75; color: #e8d5b8; }
.title-pills { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 24px; }
.title-pills span {
  padding: 5px 11px; border-radius: 20px; font-size: 12px;
  background: rgba(242, 201, 120, 0.12); border: 1px solid rgba(242, 201, 120, 0.34); color: #f6e0b8;
}

.wax-cta {
  padding: 13px 30px; border-radius: 30px; border: none; cursor: pointer;
  background: linear-gradient(180deg, #d86538 0%, #a53c1b 100%);
  color: #fff8eb; font-size: 15.5px; font-weight: 800; letter-spacing: 1.5px;
  box-shadow: 0 10px 26px rgba(165, 60, 27, 0.55), inset 0 2px 3px rgba(255, 224, 178, 0.42);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.2s;
}
.wax-cta:hover { transform: translateY(-3px) scale(1.03); filter: brightness(1.08); }
.wax-cta:active { transform: scale(0.97); }

/* Finale Wax-Sealed Polaroid */
.polaroid-shell {
  width: min(860px, 95vw); display: grid; grid-template-columns: 1.05fr 1fr; gap: 24px;
  padding: 24px; border-radius: 20px;
  background: linear-gradient(160deg, #f6ebd4, #e4cca1);
  color: var(--ink);
  border: 3px solid #b99158;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.82);
}
.polaroid-photo-wrap {
  position: relative; background: #fffbf2; padding: 12px 12px 36px; border-radius: 8px;
  box-shadow: 0 12px 26px rgba(45, 25, 10, 0.28);
  transform: rotate(-1.6deg);
}
.polaroid-photo-wrap img { width: 100%; border-radius: 4px; display: block; }
.polaroid-caption {
  margin-top: 10px; text-align: center; font-size: 13px; color: #5b3e28; font-weight: 700; letter-spacing: 1px;
}
.wax-seal {
  position: absolute; right: -12px; bottom: 16px; width: 72px; height: 72px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #dc433e, #981e1c 72%, #681110);
  border: 3px solid #f0827a;
  box-shadow: 0 8px 18px rgba(80, 14, 12, 0.55), inset 0 2px 6px rgba(255, 200, 190, 0.45);
  display: flex; align-items: center; justify-content: center;
  color: #ffe8c8; font-size: 19px; font-weight: 900; transform: rotate(12deg);
}
.polaroid-details { display: flex; flex-direction: column; justify-content: center; gap: 10px; }
.ending-tag { font-size: 11.5px; letter-spacing: 2px; color: #9c431f; font-weight: 800; }
.polaroid-details h3 { margin: 0; font-size: 25px; color: #2b180e; }
.polaroid-details p { margin: 0; font-size: 14px; line-height: 1.7; color: #4e3422; }
.finale-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 8px;
}
.stat-chip {
  padding: 8px 10px; border-radius: 10px;
  background: rgba(94, 58, 30, 0.1); border: 1px solid rgba(130, 84, 42, 0.28);
  font-size: 12.5px; display: flex; justify-content: space-between; font-weight: 700;
}
.finale-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.finale-actions .brass-btn { color: var(--cream); }

.hidden { display: none !important; }

@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}

@media (max-width: 900px) {
  .act-steps { display: none; }
  #flavor-notebook { display: none; }
  .polaroid-shell { grid-template-columns: 1fr; max-height: 92vh; overflow-y: auto; }
}
