/* ==========================================================================
   📱 VIBECARD SHELL & HUD — /HUMAN-CRAFTED-UI EDITION
   Antialiased Typography, 40px Hit Targets, Tabular Nums, 1px Hairline Borders
   ========================================================================== */

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

html, body {
  width: 100%;
  height: 100%;
  background-color: var(--m3-surface-dim);
  color: var(--m3-on-surface);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
  overscroll-behavior: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  transition: background-color 0.18s var(--ease-out-expo), color 0.18s var(--ease-out-expo);
}

button, a, [role="button"] {
  user-select: none;
  -webkit-user-select: none;
  font-family: inherit;
}

/* Mobile Phone Frame on Desktop, Full 100dvh on Mobile */
.phone-shell {
  width: 100%;
  max-width: 420px;
  height: 100dvh;
  margin: 0 auto;
  position: relative;
  display: flex;
  flex-direction: column;
  background-color: var(--m3-surface);
  overflow: hidden;
  transition: background-color 0.18s var(--ease-out-expo);
}

@media (min-width: 640px) {
  body {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .phone-shell {
    height: min(856px, 95dvh);
    border-radius: 42px;
    border: 1px solid var(--m3-outline);
    box-shadow: var(--vc-shell-shadow);
  }
}

/* Status Bar (Tabular Nums) */
.status-bar {
  position: relative;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px 4px;
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  color: var(--m3-on-surface);
}
.status-icons { display: flex; align-items: center; gap: 6px; }

/* 1. Splash Screen */
.splash-screen {
  position: absolute;
  inset: 0;
  z-index: 100;
  background-color: var(--m3-surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 80px 24px 48px;
  transition: opacity 0.22s var(--ease-out-expo), visibility 0.22s var(--ease-out-expo);
}
.splash-screen.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.splash-mascot-wrap {
  position: relative;
  width: 148px;
  height: 148px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto 0;
}
.splash-mascot-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 2;
}
.splash-brand-group { text-align: center; }
.splash-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--m3-on-surface-variant);
  margin-bottom: 6px;
}
.splash-brand {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--m3-on-surface);
}

/* 2. Top Navigation & Pure Visual Progress Bar (Zero Text Labels, Matches Image 1 & 2) */
.top-nav-bar {
  position: relative;
  z-index: 25;
  padding: 8px 18px 8px;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 48px;
}
.icon-nav-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--m3-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.12s var(--ease-out-expo), background-color 0.15s ease, color 0.15s ease;
}
@media (hover: hover) and (pointer: fine) {
  .icon-nav-btn:hover { background: var(--m3-surface-container-low); color: var(--m3-on-surface); }
}
.icon-nav-btn:active {
  transform: scale(0.95);
}
.icon-nav-btn.is-invisible { opacity: 0; pointer-events: none; }

/* Pure Visual Progress Track (Thick Rounded Pill Bar with Specular Highlight) */
.progress-bar-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  transition: opacity 0.18s ease;
}
.progress-bar-wrap.is-hidden { opacity: 0; pointer-events: none; }
.progress-thread-track {
  width: 100%;
  height: 15px;
  background-color: var(--m3-surface-container-high);
  border-radius: 999px;
  position: relative;
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background-color: var(--m3-primary);
  border-radius: 999px;
  transition: width 0.28s var(--ease-out-expo);
}

/* Inline Keyboard Badge (<kbd>) */
.vc-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--m3-surface-container-low);
  border: 1px solid var(--m3-outline-variant);
  color: var(--m3-on-surface-variant);
}

.vc-svg-icon {
  display: inline-block;
  vertical-align: -0.15em;
  flex-shrink: 0;
}

/* 3. Main Step Viewport */
.stage-viewport {
  flex: 1;
  position: relative;
  z-index: 10;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
  padding: 4px 18px 10px;
  display: flex;
  flex-direction: column;
}
.stage-viewport::-webkit-scrollbar { width: 0; height: 0; }

/* 4. Duolingo-Inspired Mascot + Left-Pointing Speech Bubble (Matches Image 1 & 2) */
.lumi-whisper-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 2px 0 4px;
  flex-shrink: 0;
}
.lumi-mascot-fig {
  width: 78px;
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.lumi-mascot-fig img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 6px 14px rgba(15, 20, 15, 0.14));
}
.lumi-speech-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 14px 17px;
  border-radius: 18px;
  background: var(--vc-card-grad);
  border: 1.5px solid var(--m3-outline);
  box-shadow: var(--vc-card-shadow);
}
.lumi-bubble-tail {
  position: absolute;
  left: -7px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: var(--m3-surface-container-lowest);
  border-left: 1.5px solid var(--m3-outline);
  border-bottom: 1.5px solid var(--m3-outline);
  transform: translateY(-50%) rotate(45deg);
  border-bottom-left-radius: 3px;
}
.lumi-whisper-text {
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.015em;
  color: var(--m3-on-surface);
  text-wrap: pretty;
}
.lumi-whisper-text b,
.lumi-whisper-text strong {
  font-weight: 800;
  color: var(--m3-primary);
}
