/* ==========================================================================
   ИИшница — Fun Edition (Tactile 3D Toybox & Morning Kitchen Playground)
   Strict 100dvh, zero scroll, center-anchored cursor zoom
   ========================================================================== */

:root {
  --bg: #fff9ec;
  --surface: rgba(255, 255, 255, 0.8);
  --surface-strong: rgba(255, 253, 249, 0.97);
  --surface-hover: rgba(255, 176, 0, 0.12);
  --border: rgba(30, 25, 21, 0.09);
  --border-strong: rgba(30, 25, 21, 0.18);

  --text: #1e1915;
  --text-muted: #6b6055;
  --text-dim: #9b8e80;

  --gold: #ffae00;
  --gold-deep: #e68600;
  --gold-soft: rgba(255, 176, 0, 0.18);

  --font-display: 'Unbounded', 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', monospace;

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.22, 1.35, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

@media (pointer: fine) {
  body, a, button, input, [role="option"], .toy-item { cursor: none; }
}

#bg-canvas { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; display: block; }

.grain-overlay {
  position: fixed;
  inset: -12%;
  width: 124%;
  height: 124%;
  z-index: 95;
  pointer-events: none;
  opacity: var(--grain-opacity, 0.50);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 220 220' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  mix-blend-mode: multiply;
  animation: grainShift 0.42s steps(6, end) infinite;
  will-change: transform, opacity;
}

@keyframes grainShift {
  0%   { transform: translate3d(0, 0, 0); }
  20%  { transform: translate3d(-2%, 1.5%, 0); }
  40%  { transform: translate3d(1.5%, -2%, 0); }
  60%  { transform: translate3d(-1.5%, -1%, 0); }
  80%  { transform: translate3d(2%, 1%, 0); }
  100% { transform: translate3d(0, 0, 0); }
}

/* Center-Anchored Custom Cursor */
.cursor-dot, .cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 120;
  border-radius: 50%;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
  transition: width 0.25s var(--ease-out-expo), height 0.25s var(--ease-out-expo),
    background-color 0.25s ease, border-color 0.25s ease;
  will-change: transform;
}

.cursor-dot { width: 7px; height: 7px; background: var(--text); }
.cursor-ring { width: 34px; height: 34px; border: 1.5px solid rgba(30, 25, 21, 0.28); }
body.cursor-hover .cursor-ring { width: 54px; height: 54px; border-color: rgba(255, 170, 0, 0.9); background: rgba(255, 176, 0, 0.11); }
body.cursor-grab .cursor-ring { width: 42px; height: 42px; border-width: 2px; border-color: var(--gold-deep); background: rgba(255, 176, 0, 0.18); }
body.cursor-down .cursor-ring { width: 24px; height: 24px; }
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* Animated Top Reset Button (appears when at least 1 icon is eaten) */
.reset-all-btn {
  position: fixed;
  top: clamp(16px, 2.6vh, 26px);
  left: 50%;
  z-index: 68;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1.5px solid rgba(30, 25, 21, 0.14);
  background: rgba(255, 253, 248, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 14px 36px rgba(120, 88, 35, 0.18);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, -26px, 0) scale(0.88);
  transition: opacity 0.36s var(--ease-out-expo), transform 0.42s var(--ease-spring),
    background-color 0.2s ease, box-shadow 0.2s ease;
}

.reset-all-btn.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0) scale(1);
}

.reset-all-btn:hover {
  background: var(--gold);
  border-color: transparent;
  box-shadow: 0 16px 40px rgba(255, 170, 0, 0.34);
}

.reset-icon {
  font-size: 15px;
  display: inline-block;
  transition: transform 0.35s var(--ease-out-expo);
}

.reset-all-btn:hover .reset-icon {
  transform: rotate(-180deg);
}

/* Zero-G Drop Slots Layer (original icon spots) */
.slot-layer {
  position: fixed;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}

.drop-slot {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(38px, 4.8vw, 54px);
  height: clamp(38px, 4.8vw, 54px);
  border-radius: 16px;
  border: 2px dashed rgba(30, 25, 21, 0.22);
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  opacity: 0;
  transform: translate3d(-200px, -200px, 0) translate(-50%, -50%) scale(0.7);
  transition: opacity 0.35s var(--ease-out-expo), border-color 0.2s ease,
    background-color 0.2s ease, box-shadow 0.2s ease;
  will-change: transform, opacity;
}

.drop-slot.is-visible {
  opacity: 1;
}

.drop-slot.is-hover {
  border-color: var(--gold-deep);
  background: rgba(255, 184, 0, 0.18);
  box-shadow: 0 0 28px rgba(255, 176, 0, 0.28);
}

.drop-slot.is-filled {
  border-style: solid;
  border-color: rgba(255, 170, 0, 0.45);
  background: rgba(255, 255, 255, 0.55);
  opacity: 0.72;
}

/* Draggable & Tossable 3D Toys Layer */
.toy-layer {
  position: fixed;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.toy-item {
  position: absolute;
  top: 0;
  left: 0;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  touch-action: none;
  will-change: transform;
}

.toy-item.is-dragging {
  z-index: 50;
}

.toy-visual {
  width: calc(clamp(82px, 11.5vw, 134px) * var(--toy-size, 0.72));
  height: calc(clamp(82px, 11.5vw, 134px) * var(--toy-size, 0.72));
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.28s var(--ease-spring);
}

.toy-item:hover .toy-visual {
  transform: scale(1.1);
}

.toy-item.is-dragging .toy-visual {
  transform: scale(1.16);
}

.toy-visual img,
.toy-visual svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(128, 92, 32, 0.22));
}

.toy-badge {
  padding: 4px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--border);
  box-shadow: 0 6px 16px rgba(120, 88, 35, 0.1);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
  white-space: nowrap;
  pointer-events: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.25s var(--ease-spring);
}

.toy-item:hover .toy-badge {
  background: var(--gold);
  border-color: transparent;
  transform: translateY(-2px);
}

/* Main Viewport Shell */
.viewport-shell {
  position: relative;
  z-index: 6;
  width: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(14px, 2.2vw, 26px) clamp(18px, 3.2vw, 38px);
  pointer-events: none;
}

.viewport-shell > * { pointer-events: auto; }

/* Top Bar */
.top-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: relative; z-index: 20; }

.brand-mark { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px; }
.yolk-orb {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #fff3b8 0%, #ffb800 55%, #ff8800 100%);
  box-shadow: 0 2px 10px rgba(255, 166, 0, 0.45);
}
.brand-text { font-family: var(--font-display); font-size: 15px; font-weight: 700; letter-spacing: -0.02em; }

.combo-pill {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--gold-soft);
  color: var(--gold-deep);
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s ease, transform 0.3s var(--ease-spring);
}
.combo-pill.is-active { opacity: 1; transform: scale(1); }

.top-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  color: var(--text-muted); font-family: var(--font-sans); font-size: 12.5px; font-weight: 500;
  box-shadow: 0 4px 14px rgba(120, 88, 35, 0.06);
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.icon-btn:hover, .icon-btn.is-on { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.95); }
.icon-btn-warm:hover { background: #fff0c7; border-color: rgba(255, 170, 0, 0.4); }

.wave-bars { display: inline-flex; align-items: flex-end; gap: 2.5px; height: 11px; }
.wave-bars i { display: block; width: 2px; height: 4px; border-radius: 2px; background: currentColor; }
.icon-btn.is-on .wave-bars i { background: var(--gold-deep); animation: eqPulse 0.9s ease-in-out infinite alternate; }
.icon-btn.is-on .wave-bars i:nth-child(2) { animation-delay: 0.22s; }
.icon-btn.is-on .wave-bars i:nth-child(3) { animation-delay: 0.45s; }
@keyframes eqPulse { 0% { height: 3px; } 100% { height: 11px; } }

.cta-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 16px; border-radius: 999px;
  background: var(--text); color: #fffdf9; border: none; font-family: var(--font-sans); font-size: 12.5px; font-weight: 600;
  box-shadow: 0 8px 22px rgba(30, 25, 21, 0.16);
  transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.cta-btn:hover { background: var(--gold); color: var(--text); box-shadow: 0 10px 26px rgba(255, 170, 0, 0.35); }
.cta-arrow { transition: transform 0.25s var(--ease-out-expo); }
.cta-btn:hover .cta-arrow { transform: translateX(3px); }

/* Hide header & footer by default; toggleable from Debug */
body.chrome-hidden .top-bar,
body.chrome-hidden .bottom-bar {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}
.top-bar,
.bottom-bar {
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

/* Center Stage */
.center-stage {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  width: 100%; max-width: 580px; margin: 0 auto; transform-style: preserve-3d; will-change: transform; pointer-events: none;
}
.center-stage > * { pointer-events: auto; }

.hero-header {
  position: relative;
  z-index: 12;
  text-align: center;
  margin-bottom: clamp(4px, 0.8vh, 8px);
  transform: translateZ(var(--title-z, 30px));
  will-change: transform;
}
.eyebrow { font-family: var(--font-mono); font-size: clamp(9.5px, 0.95vw, 11px); letter-spacing: 0.16em; color: var(--text-muted); margin-bottom: 6px; }
.hero-title { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, 54px); font-weight: 800; line-height: 1.02; letter-spacing: -0.035em; color: var(--text); }
.title-accent { color: var(--gold-deep); }

/* Center Cut-Out Smiling Fried Egg (sits behind headline & search bar so it can scale freely) */
.egg-stage {
  position: relative; z-index: 4; display: flex; align-items: center; justify-content: center;
  margin: clamp(2px, 0.7vh, 8px) 0 clamp(6px, 1.2vh, 12px);
  transform-style: preserve-3d;
}
.egg-trigger {
  position: relative; background: transparent; border: none; padding: 0;
  display: flex; align-items: center; justify-content: center; outline: none; will-change: transform;
}
.egg-img {
  width: clamp(178px, 27.5vh, 282px); aspect-ratio: 1 / 1; height: auto; display: block; pointer-events: none;
  filter: drop-shadow(var(--shadow-x, 0px) var(--shadow-y, 18px) 26px rgba(128, 92, 32, 0.24));
  will-change: transform, filter;
}
.egg-img.is-hidden {
  opacity: 0;
}
.egg-video-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(var(--shadow-x, 0px) var(--shadow-y, 18px) 26px rgba(128, 92, 32, 0.24));
  will-change: transform, filter;
}
.egg-video-canvas.is-active {
  opacity: 1;
}
.toy-item.is-eaten {
  opacity: 0;
  pointer-events: none;
}

.speech-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 0;
  height: 0;
  z-index: 60;
  pointer-events: none;
  transform-style: preserve-3d;
  will-change: transform;
}

.egg-speech {
  position: absolute;
  top: 28%;
  left: calc(100% + 18px);
  width: max-content;
  max-width: 238px;
  white-space: normal;
  line-height: 1.38;
  padding: 11px 16px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.98);
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 14px 34px rgba(120, 88, 35, 0.16);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  opacity: 0;
  transform: translate3d(-10px, -25%, var(--speech-z, 55px)) scale(0.84);
  transform-origin: left center;
  pointer-events: none;
  z-index: 30;
  will-change: transform, opacity;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1), transform 0.3s cubic-bezier(0.22, 1.3, 0.36, 1);
}

.egg-speech.no-anim {
  transition: none !important;
}

/* Comic bubble tail base */
.egg-speech::before,
.egg-speech::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 0;
  height: 0;
  border-style: solid;
  transform: translateY(-50%);
}

/* Right sides (tail on left pointing left toward egg mouth) */
.egg-speech.side-right,
.egg-speech.side-right-low {
  left: calc(50% + var(--speech-dist, 96px));
  right: auto;
  transform-origin: left center;
  transform: translate3d(-10px, -25%, var(--speech-z, 55px)) scale(0.84);
}
.egg-speech.side-right { top: 38%; }
.egg-speech.side-right-low { top: 56%; }

.egg-speech.side-right::before,
.egg-speech.side-right-low::before {
  left: -10.5px;
  right: auto;
  border-width: 7px 10px 7px 0;
  border-color: transparent var(--border-strong) transparent transparent;
}
.egg-speech.side-right::after,
.egg-speech.side-right-low::after {
  left: -8px;
  right: auto;
  border-width: 6px 9px 6px 0;
  border-color: transparent rgba(255, 255, 255, 0.98) transparent transparent;
}

/* Left sides (tail on right pointing right toward egg mouth) */
.egg-speech.side-left,
.egg-speech.side-left-low {
  right: calc(50% + var(--speech-dist, 96px));
  left: auto;
  transform-origin: right center;
  transform: translate3d(10px, -25%, var(--speech-z, 55px)) scale(0.84);
}
.egg-speech.side-left { top: 38%; }
.egg-speech.side-left-low { top: 56%; }

.egg-speech.side-left::before,
.egg-speech.side-left-low::before {
  right: -10.5px;
  left: auto;
  border-width: 7px 0 7px 10px;
  border-color: transparent transparent transparent var(--border-strong);
}
.egg-speech.side-left::after,
.egg-speech.side-left-low::after {
  right: -8px;
  left: auto;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent rgba(255, 255, 255, 0.98);
}

.egg-speech.is-visible {
  opacity: 1;
  transform: translate3d(0, -30%, var(--speech-z, 55px)) scale(1);
}

/* Expanding shockwave ring on Zero-G background click */
.shockwave-ring {
  position: fixed;
  top: 0;
  left: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 170, 0, 0.78);
  box-shadow: 0 0 28px rgba(255, 184, 0, 0.35), inset 0 0 18px rgba(255, 184, 0, 0.22);
  pointer-events: none;
  z-index: 7;
  transform: translate3d(-100px, -100px, 0) translate(-50%, -50%) scale(0.2);
  will-change: transform, opacity;
}

/* Google-Style Search Bar */
.search-cluster { position: relative; z-index: 12; width: 100%; max-width: calc(550px * var(--search-width, 0.85)); }

.search-shell {
  position: relative; border-radius: 24px; background: rgba(255, 255, 255, 0.88); border: 1px solid var(--border);
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 18px 50px rgba(130, 96, 36, 0.11), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  overflow: hidden; transition: border-color 0.3s ease, box-shadow 0.35s var(--ease-out-expo);
}
.search-shell.is-focused, .search-shell:hover {
  border-color: var(--border-strong); background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 64px rgba(130, 96, 36, 0.16), 0 0 0 1px rgba(255, 176, 0, 0.24);
}
.search-spotlight {
  position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity 0.35s ease;
  background: radial-gradient(220px circle at var(--mx, 50%) var(--my, 50%), rgba(255, 196, 61, 0.2), transparent 65%);
}
.search-shell:hover .search-spotlight, .search-shell.is-focused .search-spotlight { opacity: 1; }

.search-bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 11px; height: clamp(50px, 6.4vh, 58px); padding: 0 8px 0 18px; }
.search-icon { display: flex; align-items: center; justify-content: center; color: var(--text-muted); flex-shrink: 0; }
.search-icon .lens-yolk { color: var(--gold); transform-origin: 10.5px 10.5px; transition: transform 0.35s var(--ease-spring); }
.search-shell.is-typing .search-icon .lens-yolk, .search-shell.is-focused .search-icon .lens-yolk { transform: scale(1.35); }

.search-input-wrap { position: relative; flex: 1; min-width: 0; display: flex; align-items: center; overflow: hidden; }
.search-mirror {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: max-content;
  pointer-events: none;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: clamp(13.5px, 1.48vw, 16px);
  font-weight: 500;
  white-space: pre;
  line-height: 1.2;
}
.search-mirror strong {
  font-weight: 800;
  color: var(--text);
}
.search-input {
  position: relative;
  z-index: 1;
  width: 100%; background: transparent; border: none; outline: none;
  color: transparent;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-sans); font-size: clamp(13.5px, 1.48vw, 16px); font-weight: 500; caret-color: var(--gold-deep);
}
.search-input::placeholder { color: var(--text-dim); -webkit-text-fill-color: var(--text-dim); font-weight: 400; font-size: 14px; }

.fake-caret {
  display: none; width: 2.5px; height: 21px; border-radius: 2px; background: var(--gold-deep);
  animation: blink 0.85s steps(2, start) infinite; position: absolute; left: 0; pointer-events: none;
}
.search-shell.is-auto-typing .fake-caret { display: block; }
@keyframes blink { to { opacity: 0; } }

.search-controls { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.search-micro-btn {
  width: 32px; height: 32px; border-radius: 50%; border: none; background: transparent; color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center; transition: color 0.2s ease, transform 0.35s var(--ease-out-expo);
}
.search-micro-btn:hover { color: var(--text); background: var(--surface-hover); transform: rotate(-180deg); }

.search-submit {
  display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 15px; border-radius: 999px; border: none;
  background: var(--gold); color: var(--text); font-family: var(--font-sans); font-size: 13px; font-weight: 600;
}
.search-submit:hover { background: #ffbe2e; box-shadow: 0 8px 20px rgba(255, 170, 0, 0.35); }
.search-submit kbd { font-family: var(--font-mono); font-size: 11px; padding: 1px 5px; border-radius: 5px; background: rgba(30, 25, 21, 0.1); }

.search-dropdown { position: relative; z-index: 2; max-height: 0; opacity: 0; overflow: hidden; transition: max-height 0.55s var(--ease-out-expo), opacity 0.4s ease; }
.search-shell.is-open .search-dropdown { max-height: 240px; opacity: 1; }
.dropdown-divider { height: 1px; margin: 0 18px; background: var(--border); }
.suggestions-list { list-style: none; padding: 6px 8px 9px; display: flex; flex-direction: column; gap: 2px; }

.suggestion-item {
  display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-radius: 12px; color: var(--text-muted); font-size: 13px;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s var(--ease-out-expo); outline: none;
}
.suggestion-item:hover, .suggestion-item.is-selected { background: var(--surface-hover); color: var(--text); transform: translateX(4px); }
.sug-icon { font-size: 14px; width: 20px; text-align: center; flex-shrink: 0; }
.sug-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sug-text strong { color: var(--text); font-weight: 600; }
.sug-tag { font-family: var(--font-mono); font-size: 10px; padding: 3px 8px; border-radius: 999px; background: rgba(30, 25, 21, 0.05); color: var(--text-muted); flex-shrink: 0; }
.sug-tag-gold { background: var(--gold-soft); color: var(--gold-deep); font-weight: 500; }
.search-hint { margin-top: 9px; text-align: center; font-size: 12px; color: var(--text-dim); }

/* Bottom Bar */
.bottom-bar { display: flex; align-items: center; justify-content: flex-end; gap: 16px; position: relative; z-index: 20; }
.debug-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(14px);
  color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.debug-btn-fixed {
  display: none !important;
  position: fixed;
  left: clamp(16px, 2.6vw, 32px);
  bottom: clamp(14px, 2.2vh, 24px);
  z-index: 92;
}
.debug-btn:hover, .debug-btn.is-open { color: var(--text); border-color: var(--border-strong); background: rgba(255, 255, 255, 0.96); }

/* Floating Debug Panel */
.debug-panel {
  position: fixed;
  left: clamp(16px, 2.6vw, 32px);
  bottom: clamp(54px, 7.5vh, 66px);
  z-index: 91;
  width: 274px;
  max-height: 78dvh;
  overflow-y: auto;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 253, 249, 0.95);
  border: 1px solid var(--border-strong);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 20px 50px rgba(80, 56, 20, 0.16);
  display: flex;
  flex-direction: column;
  gap: 10px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px) scale(0.96);
  transition: opacity 0.25s var(--ease-out-expo), transform 0.28s var(--ease-spring);
}
.debug-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}
.debug-header { display: flex; align-items: center; justify-content: space-between; }
.debug-title { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; color: var(--text-muted); }
.debug-live {
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--gold-deep);
  padding: 2px 8px; border-radius: 999px; background: var(--gold-soft); font-variant-numeric: tabular-nums;
}
.debug-check {
  display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 500; color: var(--text);
  padding: 6px 8px; border-radius: 10px; background: rgba(30, 25, 21, 0.04);
}
.debug-check input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--gold-deep); }
.debug-row { display: flex; flex-direction: column; gap: 4px; }
.debug-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-muted); }
.debug-label b { font-family: var(--font-mono); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.debug-row input[type="range"] { width: 100%; accent-color: var(--gold-deep); }
.debug-test-btn {
  height: 32px; border-radius: 10px; border: 1px solid var(--border); background: rgba(30, 25, 21, 0.05);
  color: var(--text); font-family: var(--font-sans); font-size: 12px; font-weight: 600;
  transition: background-color 0.2s ease;
}
.debug-test-btn:hover { background: var(--gold); border-color: transparent; }

.telemetry { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); letter-spacing: 0.06em; }
.telemetry b { color: var(--text-muted); font-weight: 500; }
.tel-sep { opacity: 0.35; }

.mood-switcher {
  display: inline-flex; align-items: center; padding: 3px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border); backdrop-filter: blur(14px);
}
.mood-btn { border: none; background: transparent; color: var(--text-muted); font-family: var(--font-mono); font-size: 11px; padding: 5px 11px; border-radius: 999px; }
.mood-btn:hover { color: var(--text); }
.mood-btn.is-active { background: var(--text); color: #fffdf9; }

/* Modal Overlay */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(30, 25, 21, 0.36); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  opacity: 0; pointer-events: none; transition: opacity 0.35s var(--ease-out-expo);
}
.modal-backdrop.is-open { opacity: 1; pointer-events: auto; }
.modal-card {
  position: relative; width: 100%; max-width: 560px; max-height: 86dvh; overflow-y: auto; border-radius: 26px;
  background: var(--surface-strong); border: 1px solid var(--border); box-shadow: 0 32px 90px rgba(80, 56, 20, 0.22);
  padding: clamp(24px, 4vw, 34px); transform: translateY(20px) scale(0.96); transition: transform 0.42s var(--ease-out-expo);
}
.modal-backdrop.is-open .modal-card { transform: translateY(0) scale(1); }
.modal-close {
  position: absolute; top: 18px; right: 18px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid var(--border); background: rgba(30, 25, 21, 0.04); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.modal-close:hover { color: var(--text); background: rgba(30, 25, 21, 0.1); }
.modal-kicker { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.16em; color: var(--gold-deep); text-transform: uppercase; margin-bottom: 10px; }
.modal-title { font-family: var(--font-display); font-size: clamp(19px, 2.5vw, 24px); font-weight: 700; line-height: 1.22; margin-bottom: 12px; padding-right: 32px; }
.modal-lead { font-size: 14.5px; line-height: 1.6; color: var(--text-muted); margin-bottom: 18px; text-wrap: pretty; }

.tag-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 20px; }
.skill-pill { font-family: var(--font-mono); font-size: 11.5px; padding: 6px 11px; border-radius: 999px; background: rgba(255, 176, 0, 0.12); color: var(--text); }

.module-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-bottom: 18px; }
.module-box { padding: 12px 13px; border-radius: 15px; background: rgba(255, 176, 0, 0.07); border: 1px solid rgba(30, 25, 21, 0.07); }
.module-box-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
.module-box-desc { font-size: 12px; line-height: 1.42; color: var(--text-muted); text-wrap: pretty; }

.waitlist-form { display: flex; flex-direction: column; gap: 11px; }
.waitlist-input { width: 100%; height: 46px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--border-strong); background: #fff; color: var(--text); font-family: var(--font-sans); font-size: 15px; outline: none; }
.waitlist-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(255, 176, 0, 0.18); }
.waitlist-submit { height: 46px; border-radius: 14px; border: none; background: var(--text); color: #fffdf9; font-family: var(--font-sans); font-size: 14.5px; font-weight: 600; width: 100%; transition: background-color 0.2s ease, color 0.2s ease; }
.waitlist-submit:hover { background: var(--gold); color: var(--text); }
.waitlist-success { padding: 16px; border-radius: 16px; background: rgba(255, 176, 0, 0.14); border: 1px solid rgba(255, 170, 0, 0.36); font-size: 14.5px; line-height: 1.5; }

/* Personal Data Consent Checkbox & Secondary Privacy Modal (RF / EU) */
.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 12.5px;
  line-height: 1.42;
  color: var(--text-muted);
  padding: 2px 2px 4px;
}
.consent-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  flex-shrink: 0;
  accent-color: var(--gold-deep);
}
.consent-link {
  display: inline;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: rgba(230, 134, 0, 0.55);
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}
.consent-link:hover { color: var(--gold-deep); }

.privacy-backdrop { z-index: 86; }
.privacy-card { max-width: 600px; }
.privacy-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(30, 25, 21, 0.06);
  margin-bottom: 14px;
}
.privacy-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.privacy-tab.is-active {
  background: var(--text);
  color: #fffdf9;
}
.privacy-panel {
  display: none;
  font-size: 12.5px;
  line-height: 1.52;
  color: var(--text-muted);
  background: rgba(255, 176, 0, 0.06);
  border: 1px solid rgba(30, 25, 21, 0.08);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  max-height: 44dvh;
  overflow-y: auto;
  text-wrap: pretty;
}
.privacy-panel.is-active { display: block; }
.privacy-panel h3 {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.privacy-panel p { margin-bottom: 8px; }
.privacy-panel ul { padding-left: 17px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 4px; }
.privacy-panel li strong { color: var(--text); }

.egg-spark { position: fixed; pointer-events: none; z-index: 90; font-size: 17px; will-change: transform, opacity; }

@media (max-width: 900px) {
  .toy-visual { width: 68px; height: 68px; }
  .egg-speech {
    max-width: 165px;
    font-size: 11.5px;
    padding: 8px 12px;
  }
}
@media (max-width: 680px) {
  .toy-visual { width: 54px; height: 54px; }
  .toy-badge { font-size: 9.5px; padding: 3px 8px; }
  .icon-btn .btn-text, .search-submit kbd, .telemetry { display: none; }
  .icon-btn { padding: 0 11px; }
  .bottom-bar { justify-content: space-between; }
  .module-grid { grid-template-columns: 1fr; }
}
@media (max-height: 700px) {
  .egg-img { width: clamp(142px, 22.5vh, 208px); }
  .search-shell.is-open .search-dropdown { max-height: 204px; }
}
