*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg-deep: #f9f8f5;
  --bg-mid: #f1f0ec;
  --bg-card: #ffffff;
  --turquoise: #5bb8b2;
  --turquoise-light: #d4eeec;
  --turquoise-pale: #e8f5f4;
  --orange: #e8845a;
  --orange-light: #fce4d6;
  --orange-glow: rgba(232, 132, 90, 0.25);
  --cream: #fdf6e3;
  --cream-dark: #f0e4c8;
  --gold: #d4a017;
  --gold-light: #f5e6b8;
  --text: #2a2d35;
  --text-dim: #6b7280;
  --radius: 14px;
  --font-display: 'Outfit', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
}

html, body {
  width: 100%; height: 100%; overflow: hidden;
  background: var(--bg-deep); font-family: var(--font-body); color: var(--text);
  margin: 0; padding: 0;
  -webkit-text-size-adjust: 100%;
}
/* 100dvh tracks the *visible* area as mobile browser chrome shows/hides,
   so screens are never taller than what the phone actually displays. */
#app { width: 100%; height: 100%; height: 100dvh; position: relative; overflow: hidden; }

.screen {
  position: absolute; inset: 0; display: none; flex-direction: column;
  align-items: center; justify-content: center; z-index: 10; transition: opacity 0.4s ease;
  min-height: 100%; min-width: 100%;
  /* Tall content must be scrollable, not clipped, on small phones */
  overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch;
  padding: max(1rem, env(safe-area-inset-top)) max(1rem, env(safe-area-inset-right))
           max(1rem, env(safe-area-inset-bottom)) max(1rem, env(safe-area-inset-left));
}
/* `safe` keeps centred content from overflowing past the top edge where it
   can't be scrolled to. Declared separately so older browsers keep `center`. */
.screen { align-items: safe center; justify-content: safe center; }
.screen.active { display: flex; }

/* ===== WELCOME ===== */
#welcome {
  background: linear-gradient(160deg, var(--cream) 0%, var(--bg-deep) 40%, var(--turquoise-pale) 100%);
  text-align: center; position: relative;
  overflow-x: hidden; overflow-y: auto;
  padding: max(2rem, env(safe-area-inset-top)) 2rem max(2rem, env(safe-area-inset-bottom));
}
/* overflow:hidden keeps the oversized circles from adding scrollable height
   now that #welcome scrolls instead of clipping */
.welcome-decoration { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.deco-circle {
  position: absolute; border-radius: 50%; opacity: 0.12;
}
.deco-circle.c1 {
  width: 300px; height: 300px; background: var(--turquoise);
  top: -80px; right: -60px;
}
.deco-circle.c2 {
  width: 200px; height: 200px; background: var(--orange);
  bottom: -40px; left: -40px;
}
.deco-circle.c3 {
  width: 150px; height: 150px; background: var(--cream-dark);
  top: 40%; left: -30px;
}
.welcome-mascot {
  width: 100px; height: 100px; object-fit: contain;
  margin-bottom: 1rem; filter: drop-shadow(0 4px 12px rgba(0,0,0,0.1));
  animation: float 3s ease-in-out infinite;
}
#welcome h1 {
  font-family: var(--font-display); font-weight: 800;
  font-size: clamp(2.4rem, 6vw, 3.8rem); letter-spacing: -0.02em;
  color: var(--turquoise);
  -webkit-text-fill-color: var(--turquoise);
  margin-bottom: 0.3rem;
}
#welcome .subtitle {
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.15em; margin-bottom: 1.5rem;
}
#welcome .desc {
  max-width: 420px; color: var(--text-dim); line-height: 1.6; margin-bottom: 1.8rem; font-size: 0.95rem;
}
.welcome-how {
  display: flex; gap: 1.2rem; margin-bottom: 2rem; flex-wrap: wrap; justify-content: center;
}
.how-step {
  display: flex; align-items: center; gap: 0.5rem;
  font-family: var(--font-display); font-weight: 500; font-size: 0.85rem; color: var(--text);
}
.how-num {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--orange);
  color: #fff; font-weight: 700; font-size: 0.8rem;
  display: flex; align-items: center; justify-content: center;
}

/* ===== BUTTONS ===== */
.btn-primary {
  font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  padding: 0.85rem 2.4rem; border: none; border-radius: 50px;
  background: #ffffff;
  color: var(--text); cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: -6px 0 20px rgba(91,184,178,0.45), 6px 0 20px rgba(240,160,80,0.4), 0 2px 8px rgba(0,0,0,0.06);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: -8px 0 28px rgba(91,184,178,0.55), 8px 0 28px rgba(240,160,80,0.5), 0 4px 12px rgba(0,0,0,0.08); }
.btn-play {
  background: #ffffff;
  font-size: 1.15rem; padding: 1rem 3rem; margin-top: 2.5rem;
  box-shadow: -7px 0 24px rgba(91,184,178,0.5), 7px 0 24px rgba(240,160,80,0.45), 0 2px 8px rgba(0,0,0,0.06);
}
.btn-primary:active { transform: translateY(0); }
.btn-lemon {
  background: #ffffff !important; color: var(--text) !important;
  box-shadow: -6px 0 20px rgba(91,184,178,0.45), 6px 0 20px rgba(240,160,80,0.4), 0 2px 8px rgba(0,0,0,0.06) !important;
}
.btn-secondary {
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
  padding: 0.75rem 2rem; border: 2px solid rgba(91,184,178,0.25); border-radius: 50px;
  background: #ffffff; color: var(--text); cursor: pointer; transition: all 0.2s;
  box-shadow: -4px 0 14px rgba(91,184,178,0.25), 4px 0 14px rgba(240,160,80,0.2);
}
.btn-secondary:hover { border-color: rgba(91,184,178,0.4); box-shadow: -6px 0 20px rgba(91,184,178,0.35), 6px 0 20px rgba(240,160,80,0.3); transform: translateY(-1px); }

/* ===== FORM ===== */
#form-screen {
  background: linear-gradient(170deg, var(--cream) 0%, var(--bg-deep) 35%, var(--turquoise-pale) 100%);
  overflow-y: auto;
  padding: max(1.5rem, env(safe-area-inset-top)) 1.5rem max(1.5rem, env(safe-area-inset-bottom));
}
.form-container {
  width: 100%; max-width: 520px; display: flex; flex-direction: column; gap: 1.2rem;
}
.form-header { text-align: center; margin-bottom: 0.5rem; }
.form-container h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  color: var(--turquoise);
}
.form-subtitle {
  font-size: 0.88rem; color: var(--text-dim); margin-top: 0.3rem;
}
.form-group label {
  display: block; font-weight: 600; font-size: 0.85rem; color: var(--turquoise);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.5rem;
}
.form-group input, .form-group textarea {
  width: 100%; padding: 0.8rem 1rem; border-radius: var(--radius);
  border: 2px solid var(--turquoise-light); background: var(--bg-card);
  color: var(--text); font-family: var(--font-body); font-size: 0.95rem;
  outline: none; transition: border-color 0.2s;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--turquoise); }
.form-group textarea { resize: vertical; min-height: 80px; }
.focus-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.tag-btn {
  font-family: var(--font-display); font-weight: 500; font-size: 0.85rem;
  padding: 0.5rem 1.1rem; border-radius: 50px; border: 2px solid var(--turquoise-light);
  background: transparent; color: var(--text-dim); cursor: pointer; transition: all 0.2s;
}
.tag-btn:hover { border-color: var(--turquoise); color: var(--text); }
.tag-btn.selected { color: #fff; }
.tag-btn[data-area="hr"].selected { background: #2db5ac; border-color: #2db5ac; }
.tag-btn[data-area="service"].selected { background: #f07040; border-color: #f07040; }
.tag-btn[data-area="procurement"].selected { background: #40b8d4; border-color: #40b8d4; }
.tag-btn[data-area="productivity"].selected { background: #f0a820; border-color: #f0a820; }
.tag-btn[data-area="data"].selected { background: #6b85d4; border-color: #6b85d4; }
.tag-btn[data-area="learning"].selected { background: #c878b8; border-color: #c878b8; }
.prompt-box {
  background: var(--cream); border: 1px solid var(--cream-dark);
  border-radius: var(--radius); padding: 1rem 1.2rem;
  display: flex; align-items: flex-start; gap: 0.8rem;
}
.prompt-text { flex: 1; font-style: italic; color: var(--orange); font-size: 0.9rem; line-height: 1.5; }
.inspire-btn {
  font-family: var(--font-display); font-weight: 600; font-size: 0.75rem;
  padding: 0.4rem 0.9rem; border-radius: 50px; border: 1px solid var(--orange);
  background: transparent; color: var(--orange); cursor: pointer; white-space: nowrap; transition: all 0.2s;
}
.inspire-btn:hover { background: var(--orange-light); }

/* Confirm dialog */
.confirm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35); display: flex;
  align-items: center; justify-content: center; z-index: 200;
}
.confirm-box {
  background: var(--bg-card); border: 1px solid rgba(0,0,0,0.08);
  border-radius: var(--radius); padding: 1.8rem; max-width: 380px; width: 90%; text-align: center;
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}
.confirm-box p { margin-bottom: 1.2rem; line-height: 1.5; font-size: 0.95rem; }
.confirm-box .confirm-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }
.confirm-box button { font-size: 0.85rem; padding: 0.6rem 1.2rem; }

/* ===== TOKEN REWARD ===== */
#token-screen {
  background: linear-gradient(160deg, var(--cream) 0%, var(--bg-deep) 50%, var(--turquoise-pale) 100%);
}
.token-reward { text-align: center; }
.token-thanks {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  color: var(--text); transition: opacity 0.5s ease, transform 0.5s ease;
}
.token-thanks.fade-out {
  opacity: 0; transform: translateY(-15px);
}
.token-main {
  transition: opacity 0.5s ease;
}
.token-earned-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.5rem;
  color: var(--text); margin-bottom: 1.5rem;
}
.token-coins {
  display: flex; gap: 0.8rem; justify-content: center; margin-bottom: 0.8rem;
}
.coin {
  width: 76px; height: 76px; border-radius: 50%;
  background: linear-gradient(145deg, #ffe066 0%, #ffd700 25%, #daa520 50%, #ffd700 75%, #ffe066 100%);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4), 0 2px 8px rgba(0,0,0,0.15), inset 0 2px 4px rgba(255,255,255,0.5), inset 0 -2px 4px rgba(0,0,0,0.1);
  display: flex; align-items: center; justify-content: center;
  position: relative; opacity: 0; transform: translateY(-40px) scale(0.5);
  border: 3px solid #daa520;
}
.coin::before {
  content: ''; position: absolute; inset: 5px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35);
  background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
}
.coin::after {
  content: ''; position: absolute; top: 8px; left: 18px;
  width: 20px; height: 10px; border-radius: 50%;
  background: rgba(255,255,255,0.35); transform: rotate(-25deg);
}
.coin-inner {
  width: 46px; height: 46px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(145deg, rgba(218,165,32,0.3), rgba(255,215,0,0.2));
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.15);
}
.coin-mascot {
  width: 40px; height: 40px; object-fit: contain;
  filter: sepia(0.3) saturate(0.6) brightness(1.15) contrast(1.1);
  opacity: 0.9;
}
.coin.animate {
  animation: coinDrop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.coin.coin-1.animate { animation-delay: 0.1s; }
.coin.coin-2.animate { animation-delay: 0.3s; }
.coin.coin-3.animate { animation-delay: 0.5s; }
.coin.coin-4.animate { animation-delay: 0.7s; }
@keyframes coinDrop {
  0% { opacity: 0; transform: translateY(-40px) scale(0.5) rotate(-20deg); }
  60% { opacity: 1; transform: translateY(8px) scale(1.1) rotate(5deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0deg); }
}
@keyframes popIn {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.1); opacity: 1; }
  100% { transform: scale(1); }
}


/* ===== COIN INSERT: BLACK STRIP ===== */
#coin-insert-overlay {
  position: absolute; inset: 0; z-index: 30;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px);
}
#coin-insert-overlay.hidden { display: none; }
.coin-strip {
  width: 100%; padding: 2rem 1.5rem;
  background: rgba(0,0,0,0.88);
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; transition: background 0.2s;
}
.coin-strip:hover { background: rgba(0,0,0,0.95); }
.coin-strip-text {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  color: #fff; letter-spacing: 0.02em;
}
.coin-strip-sub {
  font-family: var(--font-display); font-weight: 500; font-size: 1rem;
  color: rgba(255,255,255,0.5); margin-top: 0.3rem;
}

/* ===== COIN INSERT: SLOT ON MACHINE ===== */
#coin-slot-panel {
  position: absolute; inset: 0; z-index: 31;
  display: flex; align-items: flex-end; justify-content: center;
  padding-bottom: 3%;
}
#coin-slot-panel.hidden { display: none; }
.coin-slot-target {
  cursor: pointer; text-align: center; position: relative;
  transition: transform 0.1s;
}
.coin-slot-target:hover { transform: scale(1.03); }
.coin-slot-target:active { transform: scale(0.97); }
.coin-slot-label {
  font-family: var(--font-display); font-weight: 700; font-size: 0.9rem;
  color: #ffd700; text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  margin-bottom: 0.4rem;
  animation: labelBounce 1.2s ease-in-out infinite;
}
@keyframes labelBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(4px); }
}
.coin-slot-box-ui {
  width: 70px; height: 50px; margin: 0 auto;
  background: linear-gradient(180deg, #b0b4bc, #8a8e96);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3), inset 0 2px 3px rgba(255,255,255,0.2);
  border: 2px solid #7a7e86;
}
.coin-slot-slit {
  width: 30px; height: 5px; border-radius: 3px;
  background: #111; box-shadow: inset 0 2px 4px rgba(0,0,0,0.6);
}
.coin-drop-area {
  position: absolute; top: 10px; left: 50%; transform: translateX(-50%);
  width: 50px; height: 100px; pointer-events: none;
}
.dropping-coin {
  width: 40px; height: 40px; border-radius: 50%;
  background: linear-gradient(145deg, #ffe066, #ffd700, #daa520);
  box-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
  position: absolute; left: 50%; transform: translateX(-50%);
  border: 2px solid #daa520;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.dropping-coin img {
  width: 26px; height: 26px; object-fit: contain;
  filter: sepia(0.3) saturate(0.6) brightness(1.15); opacity: 0.9;
}
.dropping-coin.drop-anim {
  animation: coinSlotDrop 0.45s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}
@keyframes coinSlotDrop {
  0% { top: -50px; opacity: 1; }
  70% { opacity: 1; }
  100% { top: 40px; opacity: 0; }
}

/* ===== GAME ===== */
#game-screen {
  background: linear-gradient(160deg, #fdf6e3 0%, #e8f0ed 30%, #d4eeec 70%, #dce8f5 100%);
  overflow: hidden;
}
.game-deco-circle {
  position: absolute; border-radius: 50%; pointer-events: none; z-index: 0;
}
.game-deco-circle.gc1 {
  width: 350px; height: 350px; background: rgba(91,184,178,0.12);
  top: -100px; right: -80px;
}
.game-deco-circle.gc2 {
  width: 250px; height: 250px; background: rgba(240,112,64,0.1);
  bottom: -60px; left: -60px;
}
.game-deco-circle.gc3 {
  width: 180px; height: 180px; background: rgba(255,243,176,0.2);
  top: 30%; left: -40px;
}
#canvas3d { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; }
#game-tinge {
  position: absolute; inset: 0; z-index: 3;
  background: rgba(0,0,0,0.3);
  pointer-events: none; opacity: 0;
  transition: opacity 0.8s ease;
}
#game-tinge.active { opacity: 1; }

#game-hud {
  position: absolute; top: 0; left: 0; right: 0;
  padding: max(0.8rem, env(safe-area-inset-top)) 1rem 0.8rem;
  display: flex; justify-content: space-between; align-items: center;
  z-index: 32; pointer-events: none;
}
#game-hud > * { pointer-events: auto; }
.hud-left, .hud-right { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; }
.hud-badge {
  font-family: var(--font-display); font-weight: 600; font-size: 0.76rem;
  padding: 0.32rem 0.8rem; background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.08); border-radius: 50px;
  backdrop-filter: blur(10px); white-space: nowrap; color: var(--text);
}
.token-hud {
  background: linear-gradient(135deg, rgba(253,246,227,0.95), rgba(245,230,184,0.95)) !important;
  border-color: var(--cream-dark) !important;
  font-weight: 700;
}
.hud-btn {
  font-family: var(--font-display); font-weight: 600; font-size: 1rem;
  padding: 0.45rem 0.9rem; background: rgba(255,255,255,0.85);
  border: 1px solid rgba(0,0,0,0.08); border-radius: 50px;
  backdrop-filter: blur(10px); color: var(--text); cursor: pointer;
  transition: all 0.2s; white-space: nowrap;
}
.hud-btn:hover { border-color: var(--turquoise); color: var(--turquoise); }
.hud-btn.active { border-color: var(--orange); color: var(--orange); }
.hud-btn.cooldown { opacity: 0.4; pointer-events: none; }

#game-hint {
  position: absolute; bottom: 80px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 500; font-size: 0.85rem;
  padding: 0.5rem 1.4rem; background: rgba(255,255,255,0.9);
  border: 1px solid rgba(0,0,0,0.08); border-radius: 50px;
  backdrop-filter: blur(10px); z-index: 20; pointer-events: none;
  transition: opacity 0.3s; white-space: nowrap; color: var(--text);
}
#desktop-hint {
  position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%);
  font-size: 0.75rem; color: var(--text-dim); z-index: 20; pointer-events: none;
}
#kiosk-kb-hint {
  display: none; position: absolute; bottom: 260px; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
  padding: 0.4rem 1.2rem; background: rgba(253,246,227,0.9);
  border: 1px solid var(--cream-dark); border-radius: 50px;
  z-index: 20; pointer-events: none; color: var(--text-dim);
}

/* Legend */
#legend-panel {
  position: absolute; top: 50px; right: 1rem; background: rgba(255,255,255,0.95);
  border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  backdrop-filter: blur(12px); padding: 0.7rem 0.9rem;
  z-index: 25; display: none; min-width: 155px; color: var(--text);
}
#legend-panel.open { display: block; }
.legend-row {
  display: flex; align-items: center; gap: 0.55rem; padding: 0.25rem 0;
  font-size: 0.8rem; font-family: var(--font-display); font-weight: 500;
}
.legend-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.legend-mascot { width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; object-fit: contain; }
.legend-dot.special-dot {
  background: linear-gradient(135deg, #ffd700, #f07040);
  box-shadow: 0 0 5px rgba(255,215,0,0.5);
}

/* Save Bag */
#bag-toggle {
  position: absolute; bottom: 1rem; right: 1rem; z-index: 25;
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(255,255,255,0.9); border: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(10px); display: flex; align-items: center;
  justify-content: center; cursor: pointer; font-size: 1.5rem; transition: all 0.2s;
}
#bag-toggle:hover { border-color: var(--turquoise); }
#bag-count {
  position: absolute; top: -4px; right: -4px; width: 19px; height: 19px;
  border-radius: 50%; background: var(--orange); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: 0.6rem;
  display: none; align-items: center; justify-content: center;
}
#bag-count.has-items { display: flex; }
#bag-panel {
  position: absolute; bottom: 76px; right: 1rem; width: 300px; max-height: 380px;
  overflow-y: auto; background: rgba(255,255,255,0.96);
  border: 1px solid rgba(0,0,0,0.08); border-radius: var(--radius);
  backdrop-filter: blur(12px); padding: 0.75rem; z-index: 25; display: none;
  color: var(--text);
}
#bag-panel.open { display: block; }
.bag-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0.5rem; padding-bottom: 0.35rem; border-bottom: 1px solid rgba(0,0,0,0.06);
}
.bag-title { font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; }
.bag-email-btn {
  font-size: 0.75rem; padding: 0.25rem 0.6rem; border-radius: 50px;
  border: 1px solid rgba(0,0,0,0.12); background: transparent;
  color: var(--text-dim); cursor: pointer; transition: all 0.2s;
  font-family: var(--font-display); font-weight: 500;
}
.bag-email-btn:hover { border-color: var(--turquoise); color: var(--turquoise); }
.bag-empty { color: var(--text-dim); font-size: 0.82rem; text-align: center; padding: 0.8rem 0; }
.bag-card {
  background: rgba(0,0,0,0.03); border-radius: 10px;
  padding: 0.6rem 0.7rem; margin-bottom: 0.4rem; position: relative; cursor: pointer;
  transition: background 0.2s;
}
.bag-card:hover { background: rgba(0,0,0,0.06); }
.bag-card-header { display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.25rem; }
.bag-card-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.bag-card-area {
  font-family: var(--font-display); font-weight: 600; font-size: 0.7rem;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-dim);
}
.bag-card-idea {
  font-size: 0.8rem; color: var(--text); line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.bag-card.expanded .bag-card-idea { display: block; -webkit-line-clamp: unset; }
.bag-card-chevron {
  position: absolute; top: 0.6rem; right: 0.5rem;
  font-size: 0.65rem; color: var(--text-dim); transition: transform 0.2s;
}
.bag-card.expanded .bag-card-chevron { transform: rotate(180deg); }
.bag-card-remove {
  position: absolute; top: 0.6rem; right: 1.5rem; background: none; border: none;
  color: var(--text-dim); cursor: pointer; font-size: 0.72rem; padding: 0.2rem;
  opacity: 0; transition: opacity 0.2s;
}
.bag-card:hover .bag-card-remove { opacity: 1; }

/* Mobile Controls */
#mobile-controls {
  display: none; position: absolute; bottom: 0; left: 0; right: 0;
  padding: 1rem 1.5rem calc(2rem + env(safe-area-inset-bottom)); z-index: 25;
  justify-content: space-between; align-items: flex-end;
}
#joystick-area {
  width: 120px; height: 120px; border-radius: 50%;
  background: rgba(91,184,178,0.08); border: 2px solid rgba(91,184,178,0.25);
  position: relative; touch-action: none;
}
#joystick-knob {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(91,184,178,0.35); border: 2px solid var(--turquoise);
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%); transition: none;
}
.joystick-arrow {
  position: absolute; font-size: 10px; color: rgba(91,184,178,0.35);
  pointer-events: none; line-height: 1;
}
.arrow-up { top: 6px; left: 50%; transform: translateX(-50%); }
.arrow-down { bottom: 6px; left: 50%; transform: translateX(-50%); }
.arrow-left { left: 6px; top: 50%; transform: translateY(-50%); }
.arrow-right { right: 6px; top: 50%; transform: translateY(-50%); }
#drop-btn {
  font-family: var(--font-display); font-weight: 700; font-size: 1.1rem;
  width: 90px; height: 90px; border-radius: 50%;
  border: 3px solid var(--orange); background: rgba(232,132,90,0.12);
  color: var(--orange); cursor: pointer; text-transform: uppercase;
  letter-spacing: 0.05em; touch-action: manipulation;
}
@media (pointer: coarse) {
  #mobile-controls { display: flex; }
  #desktop-hint { display: none; }
  #game-hint { display: none; }
  /* Compact HUD for mobile */
  #game-hud { padding: max(0.5rem, env(safe-area-inset-top)) 0.6rem 0.5rem; flex-wrap: nowrap; }
  .hud-badge { font-size: 0.6rem; padding: 0.2rem 0.5rem; }
  .hud-btn { font-size: 0.8rem; padding: 0.3rem 0.5rem; }
  .hud-left { gap: 0.25rem; }
  .hud-right { gap: 0.25rem; }
  /* Hide hard mode on mobile, keep shuffle */
  #hardModeBtn { display: none; }
  /* Bag at top right */
  #bag-toggle { bottom: auto; top: max(0.4rem, env(safe-area-inset-top)); right: 0.5rem; left: auto; width: 38px; height: 38px; font-size: 1rem; }
  #bag-panel { bottom: auto; top: calc(3rem + env(safe-area-inset-top)); right: 0.5rem; left: auto; width: 270px; max-height: 280px; }
  #bag-count { top: -3px; right: -3px; width: 16px; height: 16px; font-size: 0.5rem; }
  #legend-panel { top: 2.8rem; left: 0.5rem; right: auto; }
  /* Coin slot: responsive bottom position for portrait phones */
  #coin-slot-panel { padding-bottom: 20%; }
  /* Reveal card */
  .message-card { width: 92%; max-width: none; padding: 1.2rem 1.2rem 1rem; border-radius: 14px; }
  .card-tag { font-size: 0.6rem; padding: 0.2rem 0.55rem; }
  .card-tag-row { margin-bottom: 0.5rem; }
  .card-name { font-size: 0.9rem; margin-bottom: 0.7rem; }
  .card-section { margin-bottom: 0.7rem; }
  .card-label { font-size: 0.62rem; margin-bottom: 0.2rem; }
  .card-content { font-size: 0.85rem; line-height: 1.5; }
  .card-votes { margin-top: 0.6rem; padding-top: 0.5rem; gap: 0.4rem; }
  .card-actions { margin-top: 0.6rem; gap: 0.4rem; }
  .vote-btn { width: 34px; height: 34px; padding: 0.35rem; }
  .vote-score { font-size: 0.78rem; }
  /* Welcome steps as column */
  .welcome-how { flex-direction: column; gap: 0.6rem; align-items: center; }
  .card-actions button { font-size: 0.72rem; padding: 0.45rem 0.7rem; }
  .card-actions .btn-secondary { border-width: 1.5px; }
}

/* ===== REVEAL ===== */
#reveal-screen { background: var(--bg-deep); cursor: pointer; }
.capsule-reveal {
  position: relative; width: 140px; height: 140px;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.capsule-reveal.opened { transform: scale(0.3); opacity: 0; }
.capsule-half {
  position: absolute; width: 140px; height: 70px; border-radius: 70px 70px 0 0;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s;
}
.capsule-half.top { top: 0; filter: brightness(1.15); }
.capsule-half.bottom { bottom: 0; border-radius: 0 0 70px 70px; filter: brightness(0.85); }
.capsule-half.special-top {
  background: linear-gradient(135deg, #ffd700, #ffe066, #ffd700) !important;
  box-shadow: 0 0 25px rgba(255,215,0,0.4);
}
.capsule-half.special-bottom {
  background: linear-gradient(135deg, #daa520, #ffd700, #daa520) !important;
  box-shadow: 0 0 20px rgba(255,215,0,0.3);
}
.capsule-seam {
  position: absolute; top: 50%; left: 0; right: 0; height: 4px;
  background: rgba(255,255,255,0.5); transform: translateY(-50%); border-radius: 2px;
}
.capsule-shine {
  position: absolute; top: 18%; left: 22%; width: 30px; height: 16px;
  background: rgba(255,255,255,0.45); border-radius: 50%; transform: rotate(-30deg);
}
.tap-hint {
  margin-top: 1.5rem; font-size: 0.85rem; color: var(--text-dim);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 0.8; } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.capsule-reveal:not(.opened) { animation: float 3s ease-in-out infinite; }

/* Message card */
.message-card {
  position: absolute; width: 92%; max-width: 520px;
  background: var(--bg-card);
  border-radius: 16px; padding: 2rem 2.2rem 1.6rem;
  box-shadow: 0 8px 32px rgba(0,0,0,0.07);
  transform: scale(0);
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); cursor: default;
  max-height: 85vh; overflow-y: auto;
  color: var(--text);
}
.message-card.visible { transform: scale(1); }
.message-card.special-card {
  box-shadow: 0 12px 48px rgba(0,0,0,0.1), 0 0 0 2px rgba(255,215,0,0.3);
}

.card-tag-row { margin-bottom: 1rem; }
.card-tag {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.68rem; padding: 0.25rem 0.7rem; border-radius: 50px;
  text-transform: uppercase; letter-spacing: 0.08em; color: #fff;
}
.card-special-badge {
  display: inline-block; font-family: var(--font-display); font-weight: 600;
  font-size: 0.65rem; padding: 0.2rem 0.6rem; border-radius: 50px;
  background: linear-gradient(135deg, #ffd700, #f07040); color: #fff;
  letter-spacing: 0.05em; margin-left: 0.3rem;
}
.card-name {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: var(--text-dim); margin-bottom: 1.4rem;
}
.card-section { margin-bottom: 1.2rem; }
.card-label {
  font-size: 0.7rem; font-weight: 600; color: var(--text-dim);
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.4rem;
}
.card-content { font-size: 1rem; line-height: 1.65; color: var(--text); }

/* Vote */
.card-votes {
  display: flex; align-items: center; gap: 0.5rem; margin-top: 1.2rem;
  padding-top: 1rem; border-top: 1px solid rgba(0,0,0,0.06);
}
.vote-btn {
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; padding: 0.45rem; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.1); background: transparent;
  color: var(--text-dim); cursor: pointer; transition: all 0.2s;
  width: 38px; height: 38px;
}
.vote-btn:hover { border-color: var(--turquoise); background: var(--turquoise-pale); }
.vote-btn.voted-up { border-color: var(--turquoise); background: var(--turquoise-light); }
.vote-score {
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  color: var(--text-dim);
}
.card-actions { display: flex; gap: 0.45rem; margin-top: 1rem; }
.card-actions button { font-size: 0.8rem; padding: 0.55rem 1rem; flex: 1; white-space: nowrap; }

/* ===== NO TOKENS ===== */
#no-tokens-screen {
  background: linear-gradient(160deg, var(--cream) 0%, var(--bg-deep) 50%, var(--turquoise-pale) 100%);
}
.no-tokens-box {
  text-align: center; padding: 2.5rem; max-width: 400px;
}
.no-tokens-icon { font-size: 3rem; margin-bottom: 1rem; }
.no-tokens-coin {
  width: 80px; height: 80px; border-radius: 50%; margin: 0 auto 1.2rem;
  background: linear-gradient(145deg, #ffe066 0%, #ffd700 25%, #daa520 50%, #ffd700 75%, #ffe066 100%);
  box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4), inset 0 2px 4px rgba(255,255,255,0.5);
  border: 3px solid #daa520;
  display: flex; align-items: center; justify-content: center;
}
.no-tokens-mascot { width: 50px; height: 50px; object-fit: contain; border-radius: 50%; }
.no-tokens-box h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.6rem;
  margin-bottom: 0.6rem; color: var(--text);
}
.no-tokens-box p {
  color: var(--text-dim); margin-bottom: 1.8rem; line-height: 1.5;
}
.no-tokens-actions { display: flex; gap: 0.8rem; justify-content: center; flex-wrap: wrap; }

/* ===== QR SCREEN ===== */
#qr-screen {
  background: linear-gradient(160deg, var(--cream) 0%, var(--bg-deep) 50%, var(--turquoise-pale) 100%);
}
.qr-box {
  text-align: center; padding: 2.5rem; max-width: 420px;
}
.qr-box h2 {
  font-family: var(--font-display); font-weight: 700; font-size: 1.8rem;
  margin-bottom: 0.6rem; color: var(--text);
}
.qr-box > p {
  color: var(--text-dim); margin-bottom: 1.5rem; line-height: 1.5;
}
#qrCodeContainer {
  margin: 0 auto 1.2rem; display: flex; justify-content: center;
}
#qrCodeContainer img {
  border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.qr-timer {
  font-family: var(--font-display); font-weight: 500; font-size: 0.9rem;
  color: var(--text-dim); margin-bottom: 1rem;
}

/* ===== STREAK POPUP ===== */
.streak-popup {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) scale(0);
  z-index: 40; pointer-events: none;
  font-family: var(--font-display); font-weight: 800; font-size: 1.8rem;
  color: #fff; text-align: center; padding: 1rem 2.2rem;
  background: linear-gradient(135deg, var(--turquoise), var(--orange));
  border-radius: 20px; box-shadow: 0 8px 32px rgba(0,0,0,0.2);
  opacity: 0; white-space: nowrap;
}
.streak-popup.show {
  animation: streakPop 2.2s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* AIgrow feedback toast */
.aigrow-toast {
  position: absolute; top: 3.5rem; left: 50%; transform: translateX(-50%) translateY(-20px);
  z-index: 40; pointer-events: none;
  font-family: var(--font-display); font-weight: 600; font-size: 0.85rem;
  color: var(--text); text-align: center; padding: 0.6rem 1.4rem;
  background: rgba(255,255,255,0.95); border-radius: 50px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  opacity: 0; white-space: nowrap;
  transition: opacity 0.3s, transform 0.3s;
}
.aigrow-toast.show {
  opacity: 1; transform: translateX(-50%) translateY(0);
}
@keyframes streakPop {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  15% { opacity: 1; transform: translate(-50%, -50%) scale(1.15); }
  25% { transform: translate(-50%, -50%) scale(1); }
  75% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(0.8) translateY(-20px); }
}

.loading-overlay {
  position: absolute; inset: 0; background: rgba(249,248,245,0.9);
  display: none; align-items: center; justify-content: center;
  z-index: 100; font-family: var(--font-display); color: var(--text-dim);
}
.loading-overlay.active { display: flex; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

/* ===== KIOSK MODE (55-65 inch IDP) ===== */
.kiosk-mode #mobile-controls {
  display: flex !important;
  justify-content: center; align-items: flex-end; gap: 3rem;
  padding: 1rem 2.5rem 1.5rem;
  background: linear-gradient(to top, rgba(255,255,255,0.5) 0%, transparent 100%);
}
.kiosk-mode #desktop-hint { display: none !important; }
.kiosk-mode #kiosk-kb-hint { display: block; }
.kiosk-mode #game-hint { display: none; }

.kiosk-mode #joystick-area {
  width: 200px; height: 200px;
}
.kiosk-mode #joystick-knob {
  width: 80px; height: 80px;
}
.kiosk-mode .joystick-arrow { font-size: 16px; }
.kiosk-mode .arrow-up { top: 12px; }
.kiosk-mode .arrow-down { bottom: 12px; }
.kiosk-mode .arrow-left { left: 12px; }
.kiosk-mode .arrow-right { right: 12px; }
.kiosk-mode #drop-btn {
  width: 140px; height: 140px;
  font-size: 1.5rem; border-width: 4px;
}
.kiosk-mode .hud-badge, .kiosk-mode .hud-btn {
  font-size: 1.1rem; padding: 0.6rem 1.3rem;
}
.kiosk-mode #bag-toggle {
  bottom: auto; top: 3.5rem; left: 1.5rem; right: auto;
  width: 70px; height: 70px; font-size: 1.8rem;
}
.kiosk-mode #bag-panel {
  bottom: auto; top: 7rem; left: 1.5rem; right: auto;
  width: 400px; max-height: 500px; font-size: 1rem;
}
.kiosk-mode #legend-panel { top: 3.5rem; right: 1.5rem; font-size: 0.95rem; }

/* Kiosk: Welcome screen */
.kiosk-mode .welcome-mascot { width: 180px; height: 180px; }
.kiosk-mode #welcome h1 { font-size: 5rem; }
.kiosk-mode #welcome .subtitle { font-size: 1.4rem; }
.kiosk-mode #welcome .desc { font-size: 1.2rem; max-width: 560px; }
.kiosk-mode .how-step { font-size: 1.1rem; }
.kiosk-mode .how-num { width: 36px; height: 36px; font-size: 1rem; }

/* Kiosk: Form screen */
.kiosk-mode .form-container { max-width: 720px; }
.kiosk-mode .form-container h2 { font-size: 2rem; }
.kiosk-mode .form-subtitle { font-size: 1.1rem; }
.kiosk-mode .form-group label { font-size: 1rem; }
.kiosk-mode .form-group input,
.kiosk-mode .form-group textarea { font-size: 1.2rem; padding: 1.1rem 1.3rem; }
.kiosk-mode .tag-btn { font-size: 1.1rem; padding: 0.7rem 1.6rem; }
.kiosk-mode .prompt-text { font-size: 1.05rem; }
.kiosk-mode .inspire-btn { font-size: 0.9rem; padding: 0.5rem 1.1rem; }

/* Kiosk: Buttons */
.kiosk-mode .btn-primary { font-size: 1.3rem; padding: 1.1rem 3.5rem; }
.kiosk-mode .btn-secondary { font-size: 1.1rem; padding: 0.9rem 2.2rem; }

/* Kiosk: Token screen */
.kiosk-mode .token-thanks { font-size: 2.2rem; }
.kiosk-mode .token-earned-text { font-size: 2.2rem; }
.kiosk-mode .token-reward .coin { width: 100px; height: 100px; }
.kiosk-mode .coin-inner { width: 64px; height: 64px; }
.kiosk-mode .coin-mascot { width: 54px; height: 54px; }

/* Kiosk: Reveal card */
.kiosk-mode .message-card { max-width: 650px; padding: 2.8rem 3rem 2.2rem; }
.kiosk-mode .card-content { font-size: 1.25rem; }
.kiosk-mode .card-name { font-size: 1.4rem; }
.kiosk-mode .card-tag { font-size: 0.8rem; padding: 0.3rem 0.9rem; }
.kiosk-mode .card-actions button { font-size: 1.05rem; padding: 0.7rem 1.4rem; }

/* Kiosk: Coin slot */
.kiosk-mode .coin-slot-label { font-size: 1.3rem; }
.kiosk-mode .coin-slot-box-ui { width: 150px; height: 95px; border-radius: 14px; }
.kiosk-mode .coin-slot-slit { width: 60px; height: 10px; }

/* Kiosk: QR and no-tokens */
.kiosk-mode .qr-box h2 { font-size: 2.4rem; }
.kiosk-mode .qr-box > p { font-size: 1.2rem; }
.kiosk-mode .qr-timer { font-size: 1.2rem; }
.kiosk-mode .no-tokens-box h2 { font-size: 2rem; }
.kiosk-mode .no-tokens-box p { font-size: 1.15rem; }
.kiosk-mode .no-tokens-icon { font-size: 4rem; }

/* Kiosk: Streak popup */
.kiosk-mode .streak-popup { font-size: 2.8rem; padding: 1.8rem 3.5rem; }

/* Kiosk: Capsule reveal */
.kiosk-mode .capsule-reveal { width: 180px; height: 180px; }
.kiosk-mode .capsule-half { width: 180px; height: 90px; border-radius: 90px 90px 0 0; }
.kiosk-mode .capsule-half.bottom { border-radius: 0 0 90px 90px; }
.kiosk-mode .tap-hint { font-size: 1.1rem; }

/* Kiosk: hide email button in bag since shared screen */
.kiosk-mode .bag-email-btn { display: none; }

/* Kiosk: Confirm dialog */
.kiosk-mode .confirm-box { max-width: 500px; padding: 2.5rem; }
.kiosk-mode .confirm-box p { font-size: 1.15rem; }
.kiosk-mode .confirm-box button { font-size: 1rem; padding: 0.8rem 1.5rem; }

/* ===== COACH MARK ===== */
#coach-overlay {
  position: absolute; inset: 0; z-index: 60;
  background: rgba(20,24,28,0.62); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; padding: 1.5rem;
}
#coach-overlay.show { display: flex; }
.coach-box {
  background: var(--bg-card); border-radius: 20px; padding: 2rem 2.2rem;
  max-width: 420px; width: 100%; text-align: center;
  box-shadow: 0 12px 48px rgba(0,0,0,0.25);
  animation: popIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.coach-box h2 {
  font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
  color: var(--turquoise); margin-bottom: 1.2rem;
}
.coach-steps { display: flex; flex-direction: column; gap: 0.9rem; margin-bottom: 1.2rem; text-align: left; }
.coach-step { display: flex; align-items: center; gap: 0.9rem; }
.coach-emoji {
  font-size: 1.6rem; width: 44px; height: 44px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--turquoise-pale); border-radius: 12px;
}
.coach-step p { font-size: 0.92rem; line-height: 1.4; color: var(--text); }
.coach-step b { color: var(--turquoise); }
.coach-controls {
  font-family: var(--font-display); font-weight: 600; font-size: 0.82rem;
  color: var(--text-dim); margin-bottom: 1.3rem;
  background: var(--cream); border-radius: 10px; padding: 0.6rem 0.8rem;
}
.coach-controls b { color: var(--orange); }
.kiosk-mode .coach-box { max-width: 640px; padding: 3rem 3.4rem; }
.kiosk-mode .coach-box h2 { font-size: 2.3rem; margin-bottom: 1.8rem; }
.kiosk-mode .coach-steps { gap: 1.3rem; margin-bottom: 1.8rem; }
.kiosk-mode .coach-step p { font-size: 1.3rem; }
.kiosk-mode .coach-emoji { font-size: 2.4rem; width: 64px; height: 64px; }
.kiosk-mode .coach-controls { font-size: 1.15rem; padding: 0.9rem 1.1rem; }

/* ===== CONFETTI ===== */
.confetti-piece {
  position: absolute; pointer-events: none; z-index: 50;
  animation: confetti-burst 1s ease-out forwards;
}
@keyframes confetti-burst {
  0% { opacity: 1; transform: translate(0, 0) rotate(0deg) scale(1); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)) rotate(var(--rot)) scale(0.3); }
}

/* Streak HUD badge */
.streak-badge {
  background: linear-gradient(135deg, var(--orange), #ef4444) !important;
  color: #fff !important; border-color: transparent !important;
}
.streak-pop {
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes pop { 0% { transform: scale(1); } 50% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ===== SMALL SCREEN TUNING (narrow phones) ===== */
@media (max-width: 480px) {
  .welcome-mascot { width: 84px; height: 84px; margin-bottom: 0.8rem; }
  #welcome h1 { font-size: clamp(2rem, 11vw, 2.8rem); }
  #welcome .subtitle { font-size: 0.85rem; margin-bottom: 1.1rem; }
  #welcome .desc { font-size: 0.88rem; margin-bottom: 1.4rem; }
  .form-container { gap: 1rem; }
  .form-container h2 { font-size: 1.4rem; }
  .prompt-box { flex-direction: column; gap: 0.6rem; padding: 0.8rem 0.9rem; }
  .inspire-btn { align-self: flex-start; }
  .no-tokens-box, .qr-box { padding: 1.5rem 1.2rem; }
  .coach-box { padding: 1.5rem 1.3rem; border-radius: 16px; }
  .coach-box h2 { font-size: 1.3rem; margin-bottom: 1rem; }
  .coach-steps { gap: 0.7rem; margin-bottom: 1rem; }
  .coach-emoji { width: 38px; height: 38px; font-size: 1.35rem; }
  .coach-step p { font-size: 0.85rem; }
  .coach-controls { font-size: 0.75rem; }
  #qrCodeContainer img { width: 200px; height: 200px; }
}

/* ===== SHORT SCREEN TUNING (landscape phones / small viewports) ===== */
@media (max-height: 700px) {
  .welcome-mascot { width: 70px; height: 70px; margin-bottom: 0.6rem; }
  #welcome h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  #welcome .subtitle { font-size: 0.8rem; margin-bottom: 0.9rem; }
  #welcome .desc { font-size: 0.85rem; margin-bottom: 1.1rem; line-height: 1.5; }
  .welcome-how { gap: 0.7rem; margin-bottom: 1.2rem; }
  .btn-primary { padding: 0.7rem 2rem; font-size: 0.95rem; }
  .btn-play { margin-top: 1.2rem; }
  .token-coins .coin { width: 56px; height: 56px; }
  .coin-inner { width: 34px; height: 34px; }
  .coin-mascot { width: 28px; height: 28px; }
}
@media (max-height: 560px) {
  .welcome-mascot { display: none; }
  /* Keep the 3 steps on one row so they don't push the button off-screen */
  .welcome-how { flex-direction: row !important; gap: 0.8rem; }
  .how-step { font-size: 0.72rem; gap: 0.3rem; }
  .how-num { width: 22px; height: 22px; font-size: 0.68rem; }
  .coach-steps { gap: 0.55rem; }
  .coach-emoji { width: 32px; height: 32px; font-size: 1.15rem; }
}