/* ═══════════════════════════════════════════════════════
   YEO'S TEA MASTER — SINGAPORE HERITAGEFEST
   Refined Styles based on References
   ═══════════════════════════════════════════════════════ */

/* ── BRAND FONTS ── */
@font-face {
  font-family: 'Platform';
  src: url('Platform-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Platform';
  src: url('Platform-Medium.ttf') format('truetype');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Platform';
  src: url('Platform-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'WCManoNegraBta';
  src: url('WCManoNegraBta.otf') format('opentype');
  font-weight: 400;
  font-display: swap;
}

:root {
  --yeos-red: #d12e2e;
  --yeos-red-glow: rgba(209, 46, 46, 0.45);

  --ink-bg: #1a2216;
  --text-dark: #222919;
  --text-mid: #4a5441;

  --glass-top: rgba(226, 230, 219, 0.85);
  --glass-btm: rgba(181, 191, 172, 0.95);
  --glass-border: rgba(255, 255, 255, 0.4);
  --glass-blur: 16px;

  --secondary-btn: #efe8d5;
  --secondary-btn-border: #ded5ba;

  --font-display: 'Platform', sans-serif;
  --font-body: 'Platform', sans-serif;
  --font-headline: 'WCManoNegraBta', serif;

  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-body);
  background: var(--ink-bg);
  color: var(--text-dark);
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
  touch-action: none;
}

/* ── DESKTOP BLOCKER ── */
#desktop-blocker {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #1a2216;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
#desktop-blocker.active {
  display: flex;
}
.db-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  max-width: 400px;
  gap: 0;
}
.db-logo {
  height: 48px;
  width: auto;
  margin-bottom: 28px;
}
.db-headline {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 700;
  color: #f0ebe0;
  line-height: 1.15;
  margin-bottom: 16px;
}
.db-body {
  font-family: var(--font-body);
  font-size: 15px;
  color: rgba(240, 235, 224, 0.7);
  line-height: 1.5;
  margin-bottom: 32px;
  max-width: 320px;
}
#db-qr {
  background: #fff;
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  margin-bottom: 20px;
}
#db-qr canvas,
#db-qr img {
  display: block;
}
.db-url {
  font-family: var(--font-body);
  font-size: 12px;
  color: rgba(240, 235, 224, 0.45);
  letter-spacing: 0.3px;
  word-break: break-all;
}

/* ── HEADER ── */
#app-header,
.onboarding-header {
  position: fixed;
  top: 24px;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: env(safe-area-inset-top, 16px) 20px 8px;
  pointer-events: none;
  transition: opacity 300ms ease, transform 300ms ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#app-header.hidden {
  opacity: 0;
  transform: translateY(-20px);
}

.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
}

.onboarding-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.onboarding-header .header-logo,
.onboarding-header .header-menu,
.header-top .header-logo,
.header-top .header-menu {
  pointer-events: auto;
}

.yeos-logo {
  display: block;
  height: 36px;
  width: auto;
  object-fit: contain;
}

.header-menu {
  color: var(--text-dark);
  cursor: pointer;
  opacity: 0.7;
}

/* ── PROGRESS BAR ── */
.progress-bar-container {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 12px;
  border-radius: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.step-text {
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
  white-space: nowrap;
}

.progress-track {
  width: 120px;
  height: 4px;
  background: rgba(0, 0, 0, 0.1);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 25%;
  background: #6abf4b;
  border-radius: 2px;
  transition: width 0.6s var(--ease-out-expo);
}

/* ── SCREENS ── */
.screen {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 500ms ease;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.screen.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 10;
}

.screen-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 1200ms var(--ease-out-expo), filter 900ms ease;
}

#bg-0 {
  background-image: url('New Homepage map.webp');
  background-position: center -20px;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #efe8d5;
}

/* Subtle fades at top (behind text) and bottom (behind button) only */
#bg-0::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(246, 238, 224, 0.72) 0%, transparent 28%),
    linear-gradient(to top,    rgba(246, 238, 224, 0.80) 0%, transparent 22%);
  pointer-events: none;
}

#bg-1 {
  background-image: url('BG Picking.jpg');
  background-position: center;
  background-size: cover;
  filter: blur(5px) brightness(0.85);
  transform: scale(1.05);
}

#bg-2 {
  background-image: url('bg_tray.png');
  background-position: center;
  background-size: cover;
}

#bg-3 {
  background-image: url('bg_wok.png');
  background-position: center;
  background-size: cover;
}

#bg-4 { 
  background-image: url('Bg_bottling.webp'); 
  background-size: cover; 
  background-position: center; 
  filter: blur(8px); 
  transform: scale(1.1); 
}
#bg-5 {
  background: radial-gradient(ellipse at 50% 30%, #5a4230 0%, #2a1a0e 70%, #1a0f08 100%);
}

.full-viewport-title-bg {
  display: none;
}

/* ── GLASS CARD ── */
.glass-card {
  position: relative;
  z-index: 20;
  margin: auto 16px calc(env(safe-area-inset-bottom, 16px) + 16px);
  padding: 16px 20px;
  background: linear-gradient(to bottom, var(--glass-top), var(--glass-btm));
  backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.2);
  border-radius: 16px;
  border: 1px solid var(--glass-border);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  text-align: center;
  transform: translateY(0);
  transition: transform 600ms var(--ease-out-expo), opacity 600ms ease;
}

.glass-card.exit-down {
  transform: translateY(120%);
  opacity: 0;
}

.glass-card.enter-up {
  animation: slideUp 700ms var(--ease-out-expo) forwards;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ── HOME LAYOUT OVERRIDES ── */
.home-top-container {
  position: absolute;
  top: 24px;
  left: 0;
  right: 0;
  padding: calc(env(safe-area-inset-top, 16px) + 52px) 32px 24px;
  text-align: center;
  z-index: 20;
}

.home-bottom-container {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px 24px calc(env(safe-area-inset-bottom, 24px) + 24px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  z-index: 20;
  transform: translateY(0);
  transition: transform 600ms var(--ease-out-expo), opacity 600ms ease;
  background: linear-gradient(to top, rgba(246, 238, 224, 0.95) 0%, rgba(246, 238, 224, 0) 100%);
}

.home-bottom-container.exit-down {
  transform: translateY(120%);
  opacity: 0;
}

.home-headline {
  font-family: var(--font-headline);
  font-size: 52px;
  font-weight: 400;
  color: #7a3023;
  line-height: 1.1;
  margin-bottom: 20px;
  padding: 8px 16px;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.9), 0 2px 16px rgba(255, 255, 255, 0.6);
}

.home-body {
  font-family: var(--font-body);
  font-size: 16px;
  color: #311407;
  line-height: 1.5;
  font-weight: 600;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.85), 0 2px 12px rgba(255, 255, 255, 0.5);
}

.card-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  color: var(--text-dark);
  margin-bottom: 8px;
  line-height: 1.25;
}

.card-body {
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-mid);
  margin-bottom: 16px;
}

.card-body--hint {
  font-size: 12px;
  color: rgba(74, 84, 65, 0.6);
  margin-top: -10px;
}

.card-body--product {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-dark);
}

.card-body--action {
  color: var(--yeos-red);
  font-weight: 600;
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

/* ── BUTTONS ── */
.btn-primary.btn-red {
  width: 100%;
  padding: 16px;
  border-radius: 30px;
  border: none;
  background: linear-gradient(180deg, #d83c34 0%, var(--yeos-red) 100%);
  color: white;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 16px var(--yeos-red-glow), inset 0 1px 1px rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: transform 0.2s;
}

.btn-primary.btn-red:active {
  transform: scale(0.97);
}

.btn-secondary {
  width: 100%;
  padding: 14px;
  border-radius: 30px;
  border: 1px solid var(--secondary-btn-border);
  background: linear-gradient(180deg, #fffcf5 0%, var(--secondary-btn) 100%);
  color: var(--text-dark);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s;
}

.btn-secondary:active {
  transform: scale(0.97);
  background: #e8dfc5;
}

.btn-hidden {
  display: none;
}

/* ── COUNTER ── */
.card-live-ui {
  margin-bottom: 20px;
}

.counter {
  display: inline-block;
  padding: 6px 16px;
  background: rgba(106, 191, 75, 0.15);
  border: 1.5px solid #6abf4b;
  border-radius: 20px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: #3b7325;
}

.permissions-notice {
  font-size: 13px;
  color: #637a4e;
  margin-top: 6px;
  margin-bottom: 24px;
}

/* ── HARVESTING ── */
.harvest-area {
  position: absolute;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.harvest-leaf {
  position: absolute;
  width: 66px;
  height: 66px;
  pointer-events: auto;
  z-index: 15;
  will-change: top, left, transform;
}

.catcher-basket {
  position: absolute;
  bottom: 22%;
  left: 50%;
  width: 140px;
  height: 100px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 20;
  will-change: left;
}

.catcher-basket img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.harvest-leaf::before {
  content: '';
  position: absolute;
  inset: -4px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.8), transparent 70%);
  border-radius: 50%;
  z-index: -1;
  animation: pulse-glow 2s infinite alternate;
}

.harvest-leaf.unripe-leaf img {
  filter: hue-rotate(-50deg) saturate(0.6) brightness(1.2) drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3)) !important;
}

.harvest-leaf.unripe-leaf::before {
  display: none;
}

@keyframes pulse-glow {
  0% {
    opacity: 0.5;
    transform: scale(0.8);
  }

  100% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.harvest-leaf.picked {
  opacity: 0;
  transform: scale(0.5);
  pointer-events: none;
}

.float-plus {
  position: fixed;
  font-weight: 700;
  font-size: 24px;
  z-index: 100;
  animation: float-up 0.8s forwards;
  pointer-events: none;
}

@keyframes float-up {
  to {
    transform: translateY(-40px);
    opacity: 0;
  }
}

/* ── WITHERING ── */
.wither-tray {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  width: 100%;
  aspect-ratio: 1/1;
  transform: translateY(-50%);
  z-index: 15;
}

.wither-leaf {
  position: absolute;
  width: 66px;
  height: 66px;
  margin: -33px 0 0 -33px;
  will-change: left, top, transform;
}

.progress-ring-container {
  position: absolute;
  top: 38%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring-bg-blur {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 50%;
}

.progress-ring {
  width: 100px;
  height: 100px;
  transform: rotate(-90deg);
  position: relative;
  z-index: 2;
}

.progress-ring__bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 6;
}

.progress-ring__fill {
  fill: none;
  stroke: #6abf4b;
  stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 301.59;
  stroke-dashoffset: 301.59;
  transition: stroke-dashoffset 0.15s;
}

.progress-ring__label {
  position: absolute;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 20px;
  color: #fff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
  z-index: 3;
}

/* ── OXIDATION ── */
.fire-glow {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: radial-gradient(ellipse at 50% 80%, rgba(232, 115, 26, 0.4) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s;
}

#screen-3.active .fire-glow {
  opacity: 1;
  animation: flicker 3s infinite alternate;
}

@keyframes flicker {
  0% {
    opacity: 0.7;
  }

  50% {
    opacity: 1;
  }

  100% {
    opacity: 0.8;
  }
}

.oxidation-meter {
  position: relative;
  width: 100%;
  height: 32px;
  margin-bottom: 24px;
}

.meter-track {
  display: flex;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.2);
  background: linear-gradient(90deg,
    #a8d96a 0%,
    #6ab84a 20%,
    #3a7a28 33%,
    #3a7a28 50%,
    #5a6020 62%,
    #7a4220 75%,
    #7a4220 100%
  );
}

.meter-border {
  position: absolute;
  inset: -2px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 18px;
  pointer-events: none;
}

.meter-needle-container {
  position: absolute;
  top: -4px;
  left: 0%;
  width: 20px;
  height: 40px;
  margin-left: -10px;
  z-index: 10;
  transition: left 50ms linear;
}

/* ── BOTTLING ── */
.bottle-game-container {
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  pointer-events: none;
}
.bottle-vessel-wrapper {
  position: relative;
  display: inline-block;
}
.bottle-sketch {
  width: 250px; /* Increased from 160px for mobile visibility */
  height: auto;
  display: block;
}
.bottle-colored {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  --fill-level: 0%; 
  -webkit-mask-image: linear-gradient(to top, 
    black 0%, 
    black var(--fill-level), 
    transparent calc(var(--fill-level) + 15%), 
    transparent 100%
  );
  mask-image: linear-gradient(to top, 
    black 0%, 
    black var(--fill-level), 
    transparent calc(var(--fill-level) + 15%), 
    transparent 100%
  );
}
.fill-target-line {
  position: absolute; bottom: 72%; left: 15%; right: 15%; height: 10%; 
  border-top: 2px dashed rgba(255, 255, 255, 0.9); border-bottom: 2px dashed rgba(255, 255, 255, 0.9);
  background: rgba(106, 191, 75, 0.2); z-index: 10; display: flex; align-items: center; justify-content: center;
}
.target-label {
  font-size: 9px; font-weight: 700; color: #000; letter-spacing: 1px;
}

/* ── BREWING & VOUCHER ── */
#lottie-container {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 15;
  display: flex;
  align-items: center;
  justify-content: center;
}

#lottie-container svg {
  max-width: 100%;
  max-height: 100%;
}

.pour-prompt {
  position: absolute;
  top: 35%;
  left: 50%;
  transform: translateX(-50%);
  z-index: 16;
  width: 80%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #fff;
  font-weight: 500;
  text-align: center;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  animation: bounce-down 2s infinite;
}

.pour-arrow {
  width: 30px;
  height: 40px;
  stroke: #fff;
}

@keyframes bounce-down {

  0%,
  100% {
    transform: translate(-50%, 0);
  }

  50% {
    transform: translate(-50%, 10px);
  }
}

.pour-prompt.hidden {
  display: none;
}

.ship-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 30;
}
.ship-video.hidden {
  display: none;
}

.steam-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  background: rgba(245, 240, 230, 0.95);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1.2s;
}

.steam-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.steam-overlay.clearing {
  opacity: 0;
  transition: opacity 2s;
}

/* ── CUSTOM DECLARATION (SCREEN 5) ── */
.custom-decl-card {
  position: absolute;
  top: 56%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 400px;
  background: url('voucher.webp') no-repeat center center;
  background-size: 100% 100%;
  border-radius: 20px;
  border: none;
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  box-shadow: 0 16px 40px rgba(0,0,0,0.25);
  transition: opacity 1s var(--ease-out-expo);
  z-index: 20;
}

.custom-decl-card.visible {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.decl-heading {
  font-weight: 700;
  font-size: 18px;
  color: #0c2340;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
  margin-bottom: 8px;
}

.decl-image-container {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

.decl-bottle {
  height: 28vh;
  min-height: 180px;
  width: auto;
  object-fit: contain;
}

.decl-stamp {
  position: absolute;
  right: 18%;
  bottom: 0%;
  width: 125px;
  height: auto;
  transform: rotate(-12deg);
  mix-blend-mode: multiply;
  opacity: 0;
  animation: stamp-slam 0.5s ease-in 0.8s forwards;
}

@keyframes stamp-slam {
  0% { transform: scale(2) rotate(-12deg); opacity: 0; }
  80% { transform: scale(0.9) rotate(-12deg); opacity: 1; }
  100% { transform: scale(1) rotate(-12deg); opacity: 1; }
}

.decl-details {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}

.decl-product-en {
  font-size: 15px;
  font-weight: 700;
  color: #0c2340;
  text-align: center;
  margin-bottom: 16px;
  line-height: 1.2;
}

.decl-product-zh {
  font-size: 16px;
  font-weight: 600;
  color: #0c2340;
  text-align: center;
  margin-bottom: 16px;
}

.decl-rule {
  width: 100%;
  height: 1px;
  background: #7a94ad;
  margin: 6px 0;
}

.decl-row {
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  padding: 4px 0;
}

.decl-label {
  font-size: 13px;
  font-weight: 700;
  color: #0c2340;
  width: 110px;
  flex-shrink: 0;
}

.decl-value {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  color: #0c2340;
  flex-grow: 1;
}

.btn-tiktok {
  background: #000;
  color: #fff;
  border-radius: 8px;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  border: none;
}
.btn-tiktok:active {
  background: #333;
}

.social-icon {
  color: #0c2340;
  opacity: 0.8;
  transition: opacity 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-icon:active {
  opacity: 1;
}

/* ── RESPONSIVE: smaller phones (iPhone 13 mini, 15, SE) ── */
@media (max-height: 780px) {
  /* Home */
  .home-top-container {
    padding: calc(env(safe-area-inset-top, 16px) + 48px) 32px 12px;
  }
  .home-headline {
    font-size: 36px;
    margin-bottom: 8px;
  }
  .home-body {
    font-size: 14px;
    line-height: 1.4;
  }
  .permissions-notice {
    font-size: 12px;
  }

  /* Harvesting — raise basket so the card can't cover it */
  .catcher-basket {
    bottom: 28%;
  }

  /* Compact card text so it takes less vertical space */
  .card-headline {
    font-size: 21px;
    margin-bottom: 6px;
  }
  .card-body {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .glass-card {
    padding: 12px 16px;
  }
}

@media (max-height: 700px) {
  /* Home */
  .home-top-container {
    padding: calc(env(safe-area-inset-top, 16px) + 44px) 32px 8px;
  }
  .home-headline {
    font-size: 30px;
    margin-bottom: 6px;
  }
  .home-body {
    font-size: 13px;
    line-height: 1.35;
  }
  .permissions-notice {
    margin-bottom: 12px;
    font-size: 11px;
  }
  .home-bottom-container {
    padding: 16px 24px calc(env(safe-area-inset-bottom, 16px) + 16px);
    gap: 8px;
  }

  /* Harvesting — raise basket even higher on very small screens */
  .catcher-basket {
    bottom: 34%;
  }
}

/* ── SCRATCH CARD ── */
.scratch-wrapper {
  position: relative;
  display: inline-block;
  margin-top: 4px;
}
.scratch-canvas {
  position: absolute;
  inset: 0;
  border-radius: 8px;
  cursor: crosshair;
  touch-action: none;
  animation: silver-shimmer 2.4s ease-in-out infinite;
}
@keyframes silver-shimmer {
  0%, 100% { filter: brightness(1); }
  50%       { filter: brightness(1.18) contrast(0.95); }
}

/* ── DISCOUNT MODE (skip path on screen 5) ── */
.custom-decl-card.discount-mode {
  top: 48%;
  padding: 36px 28px 28px;
  justify-content: center;
  gap: 0;
}

.bonus-scratch-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: #888;
  text-transform: uppercase;
  border-top: 1px dashed #ccc;
  padding-top: 12px;
}

.discount-hero {
  text-align: center;
  margin-bottom: 20px;
}
.discount-percent {
  font-size: 64px;
  font-weight: 700;
  color: #d12e2e;
  line-height: 1;
  font-family: var(--font-display);
}
.discount-off {
  font-size: 28px;
  font-weight: 700;
  color: #d12e2e;
  font-family: var(--font-display);
  margin-bottom: 6px;
}
.discount-products {
  font-size: 13px;
  font-weight: 700;
  color: #0c2340;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}
.discount-code-label {
  font-size: 11px;
  font-weight: 600;
  color: #8a7a6a;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.discount-code-badge {
  display: inline-block;
  background: #0c2340;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 4px;
  font-family: var(--font-body);
}

/* ── DECLARATION CARD: responsive for small screens ── */
@media (max-height: 780px) {
  .custom-decl-card {
    top: 54%;
    padding: 20px 18px;
  }
  .decl-bottle {
    height: 22vh;
    min-height: 140px;
  }
  .decl-stamp {
    width: 80px;
  }
  .decl-heading {
    font-size: 15px;
  }
  .decl-product-en {
    font-size: 13px;
    margin-bottom: 10px;
  }
  .discount-percent {
    font-size: 52px;
  }
  .discount-off {
    font-size: 22px;
  }
}

@media (max-height: 700px) {
  .custom-decl-card {
    top: 52%;
    padding: 16px 14px;
    width: 88%;
  }
  .decl-bottle {
    height: 18vh;
    min-height: 110px;
  }
  .decl-stamp {
    width: 64px;
  }
  .discount-percent {
    font-size: 44px;
  }
  .discount-off {
    font-size: 18px;
  }
  .discount-code-badge {
    font-size: 18px;
    padding: 8px 18px;
  }
}