/* ==========================================================================
   คู่มือการใช้งานแชทบอท VIXI — งาน TMT BIZ FORUM (TOYOTA)
   v4: Deep Navy Blue + Subtle VIXI Fox Orange Theme
   Single-Screen (100dvh) Mobile-First 5-Phone Showcase
   Outer-Bezel Pins + SVG Pointers + Tap-to-Open Bottom Popup Card
   ========================================================================== */

:root {
  /* Deep Navy Blue Base */
  --bg-navy-deep: #050d1f;
  --bg-navy-mid: #0a1938;
  --bg-navy-elevated: #0f2450;
  --bg-glass: rgba(7, 18, 44, 0.95);
  --bg-phone-screen: #121722;
  --bg-chat-canvas: #1a1d24;

  /* Royal / Sky Blue Primary UI Accents */
  --blue-300: #93c5fd;
  --blue-400: #60a5fa;
  --blue-500: #3b82f6;
  --blue-600: #2563eb;
  --blue-700: #1d4ed8;
  --sky-300: #7dd3fc;
  --sky-400: #38bdf8;
  --sky-600: #0284c7;
  --blue-gradient: linear-gradient(135deg, #2563eb 0%, #1d4ed8 58%, #0284c7 100%);
  --blue-gradient-hover: linear-gradient(135deg, #3b82f6 0%, #2563eb 58%, #0ea5e9 100%);

  /* Subtle VIXI Fox Orange Focal Accents (Pins, Pointers, Focus Box, Popup Badge) */
  --orange-50: #fff7ed;
  --orange-100: #ffedd5;
  --orange-400: #fb923c;
  --orange-500: #f97316;
  --orange-600: #ea580c;
  --orange-gradient: linear-gradient(135deg, #fb923c 0%, #f97316 55%, #ea580c 100%);
  --orange-gradient-hover: linear-gradient(135deg, #fdba74 0%, #fb923c 55%, #f97316 100%);

  --green-400: #4ade80;
  --green-bg: rgba(22, 163, 74, 0.22);

  /* High-Contrast Ink & Cool Hairlines */
  --ink-primary: #f8fafc;
  --ink-secondary: #cbd5e1;
  --ink-muted: #94a3b8;

  --border-subtle: rgba(148, 163, 184, 0.16);
  --border-medium: rgba(148, 163, 184, 0.26);
  --border-blue: rgba(96, 165, 250, 0.34);
  --border-sky-strong: rgba(56, 189, 248, 0.56);

  /* Thai-First Typography */
  --font-heading: 'Prompt', 'Noto Sans Thai', 'Sarabun', 'Leelawadee UI', 'Thonburi', system-ui, -apple-system, sans-serif;
  --font-body: 'Noto Sans Thai', 'Sarabun', 'Prompt', 'Leelawadee UI', 'Tahoma', system-ui, -apple-system, sans-serif;

  /* Radii & Motion */
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-pill: 999px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --transition-fast: 170ms var(--ease-out);
  --transition-base: 280ms var(--ease-out);
}

/* ==========================================================================
   True Single-Screen 100dvh Base Reset
   ========================================================================== */

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

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background-color: var(--bg-navy-deep);
  overscroll-behavior: none;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
p {
  margin: 0;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button {
  font-family: inherit;
  font-size: inherit;
  line-height: 1.45;
  cursor: pointer;
}

:focus-visible {
  outline: 2px solid var(--sky-400);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   App Viewport Shell (Top Bar + Stepper + Coverflow Stage + Bottom Bar)
   ========================================================================== */

.app-viewport {
  width: 100%;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
  background:
    radial-gradient(ellipse 72% 52% at 50% 48%, rgba(37, 99, 235, 0.24) 0%, rgba(14, 165, 233, 0.08) 45%, transparent 74%),
    radial-gradient(circle at 18% 20%, rgba(249, 115, 22, 0.07) 0%, transparent 38%),
    linear-gradient(180deg, #050d1f 0%, #0a1938 52%, #050d1f 100%);
}

/* 1. Compact Top Bar (50px) */
.top-bar {
  height: 50px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 14px;
  background-color: rgba(5, 13, 31, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(96, 165, 250, 0.2);
  z-index: 30;
}

.top-bar__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--ink-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.top-bar__brand-icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, #0f2557 0%, #1e3a8a 65%, #f97316 140%);
  border: 1px solid rgba(251, 146, 60, 0.5);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
  box-shadow: 0 3px 12px rgba(249, 115, 22, 0.18);
}

.top-bar__actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.top-bar__counter {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.7rem;
  border-radius: var(--radius-pill);
  background-color: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.5);
  color: #eff6ff;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.28rem 0.78rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background-color: rgba(13, 30, 68, 0.72);
  color: #e0f2fe;
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
  transition: background-color var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast);
}

.btn-pill:hover {
  background-color: rgba(37, 99, 235, 0.32);
  border-color: var(--sky-400);
  color: #ffffff;
}

/* 2. Single-Row Horizontal Slide Stepper (40px) */
.slide-stepper {
  height: 40px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 0 12px;
  background-color: rgba(7, 18, 44, 0.76);
  border-bottom: 1px solid rgba(96, 165, 250, 0.14);
  -webkit-overflow-scrolling: touch;
  z-index: 28;
}

.slide-stepper::-webkit-scrollbar {
  display: none;
}

.slide-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.36rem;
  height: 28px;
  padding: 0 0.72rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(148, 163, 184, 0.22);
  background-color: rgba(13, 30, 68, 0.72);
  color: var(--ink-secondary);
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-fast);
}

.slide-pill:hover {
  border-color: rgba(96, 165, 250, 0.55);
  color: var(--ink-primary);
  background-color: rgba(37, 99, 235, 0.26);
}

.slide-pill__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 0.22rem;
  border-radius: 50%;
  background-color: rgba(96, 165, 250, 0.18);
  color: var(--blue-300);
  font-size: 0.68rem;
  font-weight: 700;
}

.slide-pill.is-active {
  background: var(--blue-gradient);
  border-color: rgba(125, 211, 252, 0.45);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.45);
}

.slide-pill.is-active .slide-pill__num {
  background-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* ==========================================================================
   3. Main 5-Phone Coverflow Stage (fills remaining height)
   ========================================================================== */

.coverflow-stage {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
}

/* Ambient Cool Blue Glow & Bokeh Sparkles (with subtle warm orange whisper) */
.showcase-ambient {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.ambient-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(760px, 95vw);
  height: 76%;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(37, 99, 235, 0.26) 0%,
    rgba(56, 189, 248, 0.09) 44%,
    transparent 72%
  );
  filter: blur(28px);
}

.ambient-sparkle {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(191, 219, 254, 0.85) 0%, rgba(56, 189, 248, 0.36) 45%, transparent 72%);
  filter: blur(1px);
  opacity: 0.52;
  animation: sparkleFloat 7s ease-in-out infinite;
}

.ambient-sparkle--1 {
  width: 24px;
  height: 24px;
  top: 14%;
  left: 7%;
  background: radial-gradient(circle, rgba(254, 215, 170, 0.72) 0%, rgba(251, 146, 60, 0.32) 48%, transparent 72%);
  animation-delay: 0s;
}
.ambient-sparkle--2 { width: 14px; height: 14px; top: 24%; right: 11%; animation-delay: 1.4s; }
.ambient-sparkle--3 { width: 16px; height: 16px; bottom: 20%; left: 13%; animation-delay: 2.5s; }
.ambient-sparkle--4 {
  width: 22px;
  height: 22px;
  bottom: 14%;
  right: 8%;
  background: radial-gradient(circle, rgba(254, 215, 170, 0.65) 0%, rgba(251, 146, 60, 0.32) 48%, transparent 72%);
  animation-delay: 0.8s;
}
.ambient-sparkle--5 { width: 10px; height: 10px; top: 52%; left: 22%; animation-delay: 3.1s; }
.ambient-sparkle--6 { width: 12px; height: 12px; top: 44%; right: 20%; animation-delay: 1.9s; }

@keyframes sparkleFloat {
  0%, 100% { transform: translateY(0) scale(1); opacity: 0.38; }
  50% { transform: translateY(-9px) scale(1.16); opacity: 0.76; }
}

.coverflow-track {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 1;
}

/* Phone Mockup Base (overflow: visible so outer-bezel pins float cleanly outside) */
.phone-mockup {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 318px;
  height: min(640px, calc(100% - 20px));
  overflow: visible;
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  transition: transform 0.45s var(--ease-out), opacity 0.38s ease, filter 0.38s ease;
  will-change: transform, opacity;
}

.phone-mockup.is-pos-0.is-active {
  transform: translate(-50%, -50%) scale(1);
  z-index: 10;
  opacity: 1;
  filter: brightness(1);
  pointer-events: auto;
}

.phone-mockup.is-pos-m1 {
  transform: translate(calc(-50% - 315px), -50%) scale(0.76);
  z-index: 5;
  opacity: 0.68;
  filter: brightness(0.7);
  pointer-events: auto;
  cursor: pointer;
}

.phone-mockup.is-pos-p1 {
  transform: translate(calc(-50% + 315px), -50%) scale(0.76);
  z-index: 5;
  opacity: 0.68;
  filter: brightness(0.7);
  pointer-events: auto;
  cursor: pointer;
}

.phone-mockup.is-pos-m2 {
  transform: translate(calc(-50% - 565px), -50%) scale(0.65);
  z-index: 3;
  opacity: 0.45;
  filter: brightness(0.55);
  pointer-events: auto;
  cursor: pointer;
}

.phone-mockup.is-pos-p2 {
  transform: translate(calc(-50% + 565px), -50%) scale(0.65);
  z-index: 3;
  opacity: 0.45;
  filter: brightness(0.55);
  pointer-events: auto;
  cursor: pointer;
}

.phone-mockup.is-pos-m1:hover,
.phone-mockup.is-pos-p1:hover {
  opacity: 0.86;
  filter: brightness(0.88);
}

.phone-mockup.is-pos-m2:hover,
.phone-mockup.is-pos-p2:hover {
  opacity: 0.65;
  filter: brightness(0.75);
}

.phone-mockup.is-hidden {
  transform: translate(-50%, -50%) scale(0.5);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}

/* Cool Silver-Sapphire Metallic iPhone Bezel & Screen */
.iphone-bezel {
  position: relative;
  width: 100%;
  height: 100%;
  padding: 9px;
  border-radius: 42px;
  background: linear-gradient(145deg, #b8cce6 0%, #526c94 35%, #c7daf2 70%, #3b5073 100%);
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.55),
    inset 0 -1px 2px rgba(2, 8, 23, 0.55),
    0 24px 56px rgba(2, 8, 23, 0.8);
}

.phone-mockup.is-pos-0.is-active .iphone-bezel {
  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.68),
    inset 0 -1px 2px rgba(2, 8, 23, 0.55),
    0 30px 80px rgba(2, 8, 23, 0.88),
    0 0 62px rgba(37, 99, 235, 0.24);
}

.iphone-screen {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: var(--bg-phone-screen);
  border-radius: 34px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 2px solid #060b18;
}

.iphone-statusbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 5px;
  background-color: #0d1526;
  color: #f8fafc;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  font-weight: 600;
  flex-shrink: 0;
}

.iphone-time {
  letter-spacing: 0.02em;
}

.iphone-notch {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 104px;
  height: 20px;
  background-color: #040812;
  border-radius: 0 0 14px 14px;
}

.iphone-status-icons {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #f8fafc;
  opacity: 0.92;
}

.iphone-status-icons svg {
  display: block;
  height: 10px;
  width: auto;
}

.iphone-chat-topbar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.68rem 0.48rem;
  background: linear-gradient(180deg, #0f1b33 0%, #152340 100%);
  border-bottom: 1px solid rgba(96, 165, 250, 0.16);
  flex-shrink: 0;
}

.iphone-back-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.09);
  color: #f8fafc;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

.iphone-chat-heading {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.iphone-chat-title {
  font-family: var(--font-heading);
  font-size: 0.78rem;
  font-weight: 600;
  color: #f8fafc;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iphone-chat-sub {
  font-size: 0.64rem;
  color: var(--blue-300);
  opacity: 0.82;
  line-height: 1.28;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Keep exact class name, styled in crisp Royal/Sky Blue */
.iphone-gold-pill {
  padding: 0.16rem 0.55rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #1d4ed8 0%, #0284c7 100%);
  border: 1px solid rgba(125, 211, 252, 0.4);
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 0.64rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
  flex-shrink: 0;
}

.iphone-chat-viewport {
  flex: 1;
  min-height: 0;
  background-color: var(--bg-chat-canvas);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(96, 165, 250, 0.45) transparent;
}

.iphone-chat-viewport::-webkit-scrollbar {
  width: 4px;
}

.iphone-chat-viewport::-webkit-scrollbar-thumb {
  background-color: rgba(96, 165, 250, 0.45);
  border-radius: 999px;
}

.phone-image-stage {
  margin: auto 0;
  position: relative;
  width: 100%;
  flex-shrink: 0;
}

.phone-chat-img {
  width: 100%;
  height: auto;
  display: block;
}

.iphone-chat-inputbar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.42rem 0.68rem 0.34rem;
  background-color: #0d1526;
  border-top: 1px solid rgba(96, 165, 250, 0.15);
  flex-shrink: 0;
}

.iphone-input-fake {
  flex: 1;
  min-width: 0;
  padding: 0.28rem 0.65rem;
  border-radius: var(--radius-pill);
  background-color: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.18);
  color: #94a3b8;
  font-size: 0.68rem;
  line-height: 1.38;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.iphone-send-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.35);
}

.iphone-home-bar {
  width: 100px;
  height: 4px;
  margin: 3px auto 6px;
  border-radius: var(--radius-pill);
  background-color: rgba(148, 163, 184, 0.36);
  flex-shrink: 0;
}

/* ==========================================================================
   Outer-Bezel Pins, SVG Pointers & Focus Box — Subtle Fox-Orange Focal Accent
   ========================================================================== */

/* Invisible target coordinate anchor inside .phone-image-stage */
.pin-target-anchor {
  position: absolute;
  width: 1px;
  height: 1px;
  pointer-events: none;
  opacity: 0;
}

/* Subtle Fox-Orange highlight box shown ONLY when its pin is tapped */
.pin-focus-box {
  position: absolute;
  border-radius: 8px;
  border: 2px solid var(--orange-400);
  background-color: rgba(249, 115, 22, 0.06);
  box-shadow: 0 0 16px rgba(249, 115, 22, 0.36);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
  transition: opacity 0.2s ease;
}

.pin-focus-box.is-active {
  opacity: 1;
}

/* Outer-bezel pin layer & SVG pointer overlay (strictly outside .iphone-screen!) */
.bezel-pins-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 25;
  overflow: visible;
}

.pin-pointers-svg {
  position: absolute;
  left: -48px;
  top: 0;
  width: calc(100% + 96px);
  height: 100%;
  pointer-events: none;
  z-index: 22;
  overflow: visible;
}

/* Hide pins, pointers & focus boxes on all non-active phones */
.phone-mockup:not(.is-pos-0) .bezel-pins-layer,
.phone-mockup:not(.is-pos-0) .pin-pointers-svg,
.phone-mockup:not(.is-pos-0) .pin-focus-box {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.bezel-pin {
  position: absolute;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 50%;
  border: 1.5px solid var(--orange-100);
  background: var(--orange-gradient);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  cursor: pointer;
  z-index: 25;
  box-shadow: 0 6px 18px rgba(234, 88, 12, 0.45);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast),
    background var(--transition-fast);
}

.bezel-pin::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 1.5px solid rgba(251, 146, 60, 0.58);
  animation: bezelPinPulse 2.4s ease-out infinite;
  pointer-events: none;
}

.bezel-pin--left {
  left: -18px;
}

.bezel-pin--right {
  left: calc(100% + 18px);
}

.bezel-pin:hover {
  transform: translate(-50%, -50%) scale(1.1);
  background: var(--orange-gradient-hover);
  box-shadow: 0 8px 20px rgba(234, 88, 12, 0.55), 0 0 18px rgba(249, 115, 22, 0.65);
}

.bezel-pin.is-active {
  transform: translate(-50%, -50%) scale(1.16);
  background: linear-gradient(135deg, #fdba74 0%, #f97316 55%, #ea580c 100%);
  box-shadow: 0 0 0 3px var(--orange-50), 0 0 22px rgba(249, 115, 22, 0.85);
  z-index: 28;
}

.bezel-pin.is-active::after {
  border-color: #ffffff;
}

@keyframes bezelPinPulse {
  0% { transform: scale(0.88); opacity: 0.75; }
  100% { transform: scale(1.38); opacity: 0; }
}

.pin-pointer-line {
  stroke: rgba(251, 146, 60, 0.65);
  stroke-width: 1.5;
  stroke-dasharray: 3 2;
  fill: none;
  transition: stroke var(--transition-fast), stroke-width var(--transition-fast);
}

.pin-pointer-line.is-active {
  stroke: var(--orange-400);
  stroke-width: 2.2;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 6px rgba(249, 115, 22, 0.75));
}

.pin-pointer-dot {
  fill: var(--orange-400);
  stroke: var(--bg-navy-deep);
  stroke-width: 1;
}

.pin-pointer-dot.is-active {
  fill: #ffffff;
  stroke: var(--orange-400);
  stroke-width: 1.5;
}

/* Desktop Circular White Coverflow Arrows */
.coverflow-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.88);
  background-color: #ffffff;
  color: #0a1938;
  font-size: 1.7rem;
  font-weight: 600;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.58);
  z-index: 18;
  transition: transform var(--transition-fast), background var(--transition-fast),
    color var(--transition-fast), box-shadow var(--transition-fast);
}

.coverflow-arrow--prev {
  left: 22px;
}

.coverflow-arrow--next {
  right: 22px;
}

.coverflow-arrow:hover {
  background: var(--blue-gradient);
  color: #ffffff;
  border-color: var(--sky-300);
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.45);
}

.coverflow-arrow:active {
  transform: translateY(-50%) scale(0.97);
}

/* ==========================================================================
   4. Compact Bottom Navigation Bar (58px)
   ========================================================================== */

.bottom-nav-bar {
  height: 58px;
  flex-shrink: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  padding: 0 12px;
  background-color: rgba(5, 13, 31, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid rgba(96, 165, 250, 0.2);
  z-index: 30;
}

.nav-step-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  height: 38px;
  padding: 0 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(96, 165, 250, 0.34);
  background-color: rgba(13, 30, 68, 0.72);
  color: var(--ink-primary);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast);
}

.nav-step-btn:hover {
  background-color: rgba(37, 99, 235, 0.3);
  border-color: var(--sky-400);
  color: #ffffff;
}

.nav-step-btn:active {
  transform: scale(0.97);
}

.nav-step-btn--primary {
  background: var(--blue-gradient);
  border-color: rgba(125, 211, 252, 0.38);
  color: #ffffff;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.38);
}

.nav-step-btn--primary:hover {
  background: var(--blue-gradient-hover);
  color: #ffffff;
}

.bottom-nav-meta {
  text-align: center;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.bottom-nav-title {
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink-primary);
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bottom-nav-hint {
  font-size: 0.7rem;
  color: var(--blue-300);
  opacity: 0.9;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   5. Tap-to-Open Bottom Manual Popup Card (.pin-sheet)
   ========================================================================== */

.pin-sheet {
  position: fixed;
  left: 50%;
  bottom: max(12px, env(safe-area-inset-bottom, 12px));
  transform: translate(-50%, calc(100% + 28px));
  width: min(500px, calc(100vw - 20px));
  max-height: 44dvh;
  overflow-y: auto;
  z-index: 50;
  padding: 1rem 1.15rem 1.05rem;
  border-radius: 20px;
  background:
    radial-gradient(circle at 8% 0%, rgba(249, 115, 22, 0.11), transparent 40%),
    rgba(7, 18, 44, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1.5px solid rgba(56, 189, 248, 0.48);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.92), 0 0 36px rgba(37, 99, 235, 0.22);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform var(--transition-base), opacity 220ms ease, visibility 220ms ease;
}

.pin-sheet.is-open {
  transform: translate(-50%, 0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.pin-sheet__header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.pin-sheet__badge {
  min-width: 28px;
  height: 28px;
  padding: 0 0.45rem;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, #fb923c 0%, #f97316 100%);
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pin-sheet__tag {
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 600;
  color: #dbeafe;
  background-color: rgba(37, 99, 235, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.42);
  padding: 0.15rem 0.62rem;
  border-radius: var(--radius-pill);
  line-height: 1.42;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pin-sheet__counter {
  margin-left: auto;
  font-family: var(--font-heading);
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--ink-muted);
  white-space: nowrap;
}

.pin-sheet__close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--border-medium);
  background-color: rgba(15, 36, 80, 0.7);
  color: var(--ink-primary);
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color var(--transition-fast), border-color var(--transition-fast);
}

.pin-sheet__close:hover {
  background-color: rgba(37, 99, 235, 0.35);
  border-color: var(--sky-400);
}

.pin-sheet__title {
  font-family: var(--font-heading);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink-primary);
  line-height: 1.44;
  margin-bottom: 0.38rem;
}

.pin-sheet__desc {
  font-size: 0.9rem;
  line-height: 1.66;
  color: var(--ink-secondary);
  margin: 0;
}

.pin-sheet__prompt {
  margin-top: 0.75rem;
}

.pin-sheet__prompt:empty {
  display: none;
}

.prompt-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.44rem 0.9rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(96, 165, 250, 0.42);
  background-color: rgba(37, 99, 235, 0.2);
  color: #dbeafe;
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.45;
  text-align: left;
  max-width: 100%;
  transition: background-color var(--transition-fast), border-color var(--transition-fast),
    color var(--transition-fast), transform var(--transition-fast);
}

.prompt-chip:hover {
  background-color: rgba(37, 99, 235, 0.34);
  border-color: var(--sky-400);
  color: #ffffff;
  transform: translateY(-1px);
}

.prompt-chip.is-copied {
  border-color: var(--green-400);
  background-color: var(--green-bg);
  color: #bbf7d0;
}

.pin-sheet__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border-subtle);
}

.pin-sheet__nav {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  height: 36px;
  padding: 0 0.85rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(96, 165, 250, 0.32);
  background-color: rgba(13, 30, 68, 0.72);
  color: var(--ink-primary);
  font-family: var(--font-heading);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background var(--transition-fast), border-color var(--transition-fast),
    opacity var(--transition-fast);
}

.pin-sheet__nav:hover:not(:disabled) {
  background-color: rgba(37, 99, 235, 0.32);
  border-color: var(--sky-400);
}

.pin-sheet__nav:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.pin-sheet__nav--primary {
  background: var(--blue-gradient);
  border-color: rgba(125, 211, 252, 0.38);
  color: #ffffff;
}

.pin-sheet__nav--primary:hover:not(:disabled) {
  background: var(--blue-gradient-hover);
  color: #ffffff;
}

/* ==========================================================================
   Toast & Full-Screen Lightbox (1 / 10 .. 10 / 10)
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  top: 60px;
  z-index: 1300;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-pill);
  background: var(--blue-gradient);
  color: #ffffff;
  border: 1px solid var(--sky-300);
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 14px 36px rgba(2, 8, 23, 0.78), 0 0 22px rgba(37, 99, 235, 0.35);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity var(--transition-fast), visibility var(--transition-fast),
    transform var(--transition-fast);
}

.toast.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity var(--transition-base), visibility var(--transition-base);
}

.lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lightbox__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(3, 8, 20, 0.94);
  backdrop-filter: blur(10px);
}

.lightbox__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 0.85rem 1rem 1rem;
  color: var(--ink-primary);
}

.lightbox__toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding-bottom: 0.65rem;
  flex-shrink: 0;
}

.lightbox__actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lightbox__counter {
  font-family: var(--font-heading);
  font-size: 0.86rem;
  font-weight: 600;
  color: #eff6ff;
  background-color: rgba(37, 99, 235, 0.28);
  border: 1px solid rgba(96, 165, 250, 0.5);
  padding: 0.28rem 0.8rem;
  border-radius: var(--radius-pill);
}

.lightbox__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 36px;
  padding: 0.35rem 0.88rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(96, 165, 250, 0.36);
  background-color: rgba(13, 30, 68, 0.78);
  color: var(--ink-primary);
  font-family: var(--font-heading);
  font-size: 0.84rem;
  font-weight: 500;
  transition: background var(--transition-fast), border-color var(--transition-fast);
}

.lightbox__btn:hover {
  background-color: rgba(37, 99, 235, 0.35);
  border-color: var(--sky-400);
}

.lightbox__btn--close {
  background: var(--blue-gradient);
  border-color: rgba(125, 211, 252, 0.42);
  color: #ffffff;
  font-weight: 600;
}

.lightbox__btn--close:hover {
  background: var(--blue-gradient-hover);
  color: #ffffff;
}

.lightbox__stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0 3rem;
}

.lightbox__img-wrap {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 14px;
  box-shadow: 0 22px 60px rgba(2, 6, 23, 0.78);
  cursor: zoom-in;
}

.lightbox__stage.is-zoomed {
  padding: 0.4rem;
}

.lightbox__stage.is-zoomed .lightbox__img-wrap {
  align-items: flex-start;
  justify-content: center;
}

.lightbox__stage.is-zoomed .lightbox__img {
  max-width: none;
  max-height: none;
  width: min(640px, 92vw);
  height: auto;
  cursor: zoom-out;
}

.lightbox__nav--prev,
.lightbox__nav--next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.82);
  background-color: #ffffff;
  color: #0a1938;
  font-size: 1.4rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(2, 8, 23, 0.58);
  transition: background var(--transition-fast), color var(--transition-fast),
    transform var(--transition-fast);
}

.lightbox__nav--prev { left: 0.3rem; }
.lightbox__nav--next { right: 0.3rem; }

.lightbox__nav--prev:hover,
.lightbox__nav--next:hover {
  background: var(--blue-gradient);
  color: #ffffff;
  border-color: var(--sky-300);
  transform: translateY(-50%) scale(1.06);
}

.lightbox__caption-bar {
  padding: 0.75rem 0.5rem 0.1rem;
  text-align: center;
  flex-shrink: 0;
  max-width: 720px;
  margin: 0 auto;
}

.lightbox__title {
  font-family: var(--font-heading);
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--sky-300);
  margin-bottom: 0.18rem;
}

.lightbox__caption {
  font-size: 0.84rem;
  line-height: 1.55;
  color: var(--ink-secondary);
}

/* ==========================================================================
   Responsive Breakpoints (v3 geometry preserved 100%)
   ========================================================================== */

/* Center the 10-pill stepper cleanly on wide desktop screens */
@media (min-width: 1080px) {
  .slide-stepper {
    justify-content: center;
  }
}

/* Mobile & Tablet (<= 899px): leave >= 43px each side for outer-bezel pins */
@media (max-width: 899px) {
  .phone-mockup {
    width: min(302px, calc(100vw - 86px));
    height: min(610px, calc(100% - 12px));
  }

  .iphone-bezel {
    padding: 8px;
    border-radius: 38px;
  }

  .iphone-screen {
    border-radius: 30px;
  }

  .phone-mockup.is-pos-m1 {
    transform: translate(calc(-50% - 205px), -50%) scale(0.76);
    z-index: 2;
    opacity: 0.3;
    filter: brightness(0.55);
    pointer-events: none;
  }

  .phone-mockup.is-pos-p1 {
    transform: translate(calc(-50% + 205px), -50%) scale(0.76);
    z-index: 2;
    opacity: 0.3;
    filter: brightness(0.55);
    pointer-events: none;
  }

  .phone-mockup.is-pos-m2,
  .phone-mockup.is-pos-p2 {
    opacity: 0;
    pointer-events: none;
  }

  .coverflow-arrow {
    display: none;
  }
}

/* Narrow Mobile (<= 480px) */
@media (max-width: 480px) {
  .top-bar {
    padding: 0 10px;
  }

  .top-bar__brand {
    font-size: 0.88rem;
  }

  .btn-pill {
    padding: 0.25rem 0.62rem;
    font-size: 0.74rem;
  }

  .bottom-nav-bar {
    padding: 0 8px;
    gap: 0.45rem;
  }

  .nav-step-btn {
    padding: 0 0.72rem;
    font-size: 0.78rem;
    height: 36px;
  }

  .bottom-nav-title {
    font-size: 0.82rem;
  }

  .bottom-nav-hint {
    font-size: 0.66rem;
  }

  .lightbox__stage {
    padding: 0 0.25rem;
  }

  .lightbox__nav--prev,
  .lightbox__nav--next {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }
}

/* Short Viewport Height (e.g., 360x640) */
@media (max-height: 680px) {
  .iphone-statusbar {
    padding: 6px 14px 4px;
  }

  .iphone-notch {
    width: 92px;
    height: 17px;
  }

  .iphone-chat-topbar {
    padding: 0.34rem 0.6rem 0.38rem;
  }

  .iphone-chat-inputbar {
    padding: 0.32rem 0.6rem 0.28rem;
  }

  .iphone-home-bar {
    margin: 2px auto 5px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
