/* ==========================================================================
   THOUGHTFUL VOICE — QUIET WARM-PAPER + REAL EXTENSION WORKSPACE
   ========================================================================== */

:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-soft: #f3f1eb;
  --ink: #161615;
  --ink-2: #5a5852;
  --ink-3: #8e8b84;
  --line: rgba(22, 22, 21, 0.085);
  --line-strong: rgba(22, 22, 21, 0.16);
  --accent: #ea4b00;

  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);

  --font-sans: 'IBM Plex Sans', 'PingFang TC', 'Noto Sans TC', 'PingFang SC', 'Noto Sans SC', 'Microsoft JhengHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-display: 'Space Grotesk', 'PingFang TC', 'Noto Sans TC', 'PingFang SC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, monospace;
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }

.wrap {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
}

/* --------------------------------------------------------------------------
   TOP NAVIGATION — QUIET & MINIMAL
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 248, 244, 0.88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  width: min(980px, calc(100% - 48px));
  margin: 0 auto;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  letter-spacing: -0.02em;
}

.brand-icon {
  width: 22px;
  height: 22px;
  border-radius: 5px;
  object-fit: cover;
}

.brand-ver {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-3);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13.5px;
  color: var(--ink-2);
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 2px;
  border-radius: 999px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 999px;
  line-height: 1.2;
  transition: background 0.16s ease, color 0.16s ease;
}

.lang-btn:hover {
  color: var(--ink);
}

.lang-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(22, 22, 21, 0.08);
}

.nav-links a:hover { color: var(--ink); }

.nav-install {
  padding: 7px 14px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff !important;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.16s ease, transform 0.2s var(--spring);
}

.nav-install:hover { background: var(--accent); transform: translateY(-1px); }

/* --------------------------------------------------------------------------
   CENTERED HERO — BREATHABLE, SINGLE FOCAL POINT
   -------------------------------------------------------------------------- */
.hero {
  padding: 40px 0 72px;
}

.hero-center {
  text-align: center;
  max-width: 660px;
  margin: 0 auto 30px;
}

.hero-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(32px, 4.4vw, 48px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.036em;
  color: var(--ink);
}

.hero-sub {
  margin: 12px auto 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 500px;
}

.hero-cta-row {
  margin-top: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-install {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 20px;
  border-radius: 9px;
  background: var(--ink);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 600;
  transition: transform 0.22s var(--spring), background 0.16s ease;
}

.btn-install:hover { background: var(--accent); transform: translateY(-1px); }

.btn-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 500;
  transition: border-color 0.16s ease;
}

.btn-source:hover { border-color: var(--ink); }

/* --------------------------------------------------------------------------
   PURE FLOATING WORKSPACE STAGE (ZERO FAKE BROWSER CHROME)
   -------------------------------------------------------------------------- */
.gemini-window {
  position: relative;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid rgba(22, 22, 21, 0.10);
  box-shadow:
    0 24px 56px rgba(22, 22, 21, 0.065),
    0 2px 8px rgba(22, 22, 21, 0.035);
  overflow: hidden;
  color: #1f1f1f;
  transition: box-shadow 0.35s ease;
}

.gemini-window.is-intercepting {
  box-shadow:
    0 24px 58px rgba(217, 119, 6, 0.13),
    0 0 0 1.5px rgba(217, 119, 6, 0.32);
}

/* Integrated Quiet Tab Bar at Top of Card */
.stage-tabs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(22, 22, 21, 0.07);
  background: #fcfbf9;
}

.scene-btn {
  position: relative;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink-3);
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  overflow: hidden;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.scene-btn:focus-visible {
  box-shadow: 0 0 0 2px rgba(234, 75, 0, 0.35);
}

.scene-btn:hover {
  color: var(--ink);
  background: rgba(22, 22, 21, 0.04);
}

.scene-btn.active {
  color: var(--ink);
  font-weight: 600;
  background: #ffffff;
  box-shadow: 0 1px 3px rgba(22, 22, 21, 0.08), inset 0 0 0 1px rgba(22, 22, 21, 0.07);
}

.scene-bar-fill {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* Main Stage Canvas — Layered Warm-Paper Depth + Locked Height (Zero Layout Jump) */
.gem-body {
  position: relative;
  height: 444px;
  padding: 76px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 20px;
  background:
    radial-gradient(ellipse 80% 58% at 50% 0%, rgba(255, 255, 255, 0.78) 0%, rgba(245, 242, 236, 0) 70%),
    radial-gradient(rgba(22, 22, 21, 0.036) 1px, transparent 1px),
    #f5f2ec;
  background-size: 100% 100%, 22px 22px, 100% 100%;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), inset 0 12px 28px rgba(22, 22, 21, 0.025);
}

.gem-thread {
  width: min(680px, 100%);
  margin: 0 auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 14px;
  position: relative;
  min-height: 0;
  padding-bottom: 2px;
}

/* Authentic Chat Messages */
.chat-bubble-user {
  align-self: flex-end;
  max-width: 74%;
  background: #ffffff;
  color: #1f1f1f;
  padding: 11px 16px;
  border-radius: 18px 18px 4px 18px;
  border: 1px solid rgba(22, 22, 21, 0.075);
  box-shadow: 0 3px 10px rgba(22, 22, 21, 0.04);
  font-size: 13.5px;
  line-height: 1.5;
  display: none;
  opacity: 0;
  will-change: transform, opacity;
  transition:
    background-color 0.28s ease,
    border-color 0.28s ease,
    box-shadow 0.28s ease;
}

.chat-bubble-user.show {
  display: block;
  opacity: 1;
  animation: bubbleUserIn 0.36s var(--ease-out) both;
}

.chat-bubble-user.is-held {
  display: block;
  opacity: 1;
  border: 1.5px solid #d97706;
  background: #fffbeb;
  box-shadow: 0 10px 26px rgba(217, 119, 6, 0.14);
  animation:
    holdCatch 0.34s var(--ease-out) both,
    holdPulse 1.25s ease-in-out 0.34s infinite;
}

@keyframes bubbleUserIn {
  0% { opacity: 0; transform: translateY(10px) scale(0.975); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes holdCatch {
  0% { opacity: 0; transform: translateY(10px) scale(0.97); }
  65% { opacity: 1; transform: translateY(-6px) scale(1.008); }
  100% { opacity: 1; transform: translateY(-4px) scale(1); }
}

@keyframes holdPulse {
  0%, 100% {
    transform: translateY(-4px) scale(1);
    box-shadow: 0 8px 22px rgba(217, 119, 6, 0.12);
  }
  50% {
    transform: translateY(-6px) scale(1.005);
    box-shadow: 0 12px 28px rgba(217, 119, 6, 0.22);
  }
}

.held-note {
  display: block;
  margin-top: 5px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: #b45309;
  font-weight: 600;
}

.user-wav-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-right: 7px;
  padding: 2px 7px;
  border-radius: 6px;
  background: #161615;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.chat-bubble-ai {
  align-self: flex-start;
  max-width: 82%;
  display: none;
  gap: 12px;
  align-items: flex-start;
  opacity: 0;
  will-change: transform, opacity;
}

.chat-bubble-ai.show {
  display: flex;
  opacity: 1;
  animation: bubbleAiIn 0.38s var(--ease-out) both;
}

@keyframes bubbleAiIn {
  0% { opacity: 0; transform: translateY(9px); }
  100% { opacity: 1; transform: translateY(0); }
}

.ai-spark-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #ffffff;
  border: 1px solid rgba(22, 22, 21, 0.08);
  box-shadow: 0 2px 6px rgba(22, 22, 21, 0.05);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: #1a73e8;
  margin-top: 1px;
}

.ai-spark-avatar.is-interrupted {
  background: #fef2f2;
  border-color: #fecaca;
  color: #dc2626;
}

.ai-msg-text {
  font-size: 14px;
  line-height: 1.58;
  color: #1f1f1f;
  padding-top: 2px;
}

.ai-msg-text.is-interrupted {
  color: #991b1b;
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 9px 13px;
  border-radius: 12px;
}

.ai-msg-text code,
.chat-bubble-user code {
  font-family: var(--font-mono);
  font-size: 12px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(22, 22, 21, 0.10);
  padding: 1px 6px;
  border-radius: 5px;
  color: #1f1f1f;
}

/* --------------------------------------------------------------------------
   CLEANSHOT-STYLE LIGHT 4K SCREEN CAPTURE STAGE (REPLACES CHEAP GREEN BOX)
   -------------------------------------------------------------------------- */
.capture-sheet {
  display: none;
  width: min(560px, 100%);
  margin: 0 auto;
  padding: 12px;
  border-radius: 14px;
  background: #f7f6f2;
  border: 1px dashed rgba(22, 22, 21, 0.24);
  position: relative;
  transform-origin: 50% 108%;
  will-change: transform, opacity;
  transition:
    transform 0.46s cubic-bezier(0.4, 0, 0.2, 1),
    opacity 0.32s cubic-bezier(0.4, 0, 0.2, 1),
    border-color 0.25s ease,
    background-color 0.25s ease;
}

.capture-sheet.show {
  display: block;
  animation: sheetRise 0.42s var(--ease-out) both;
}

.capture-sheet.locked {
  border-color: rgba(234, 75, 0, 0.55);
  background: #fbfaf7;
}

.capture-sheet.fold-in {
  animation: none;
  transform: translateY(86px) scale(0.32, 0.2);
  opacity: 0;
}

@keyframes sheetRise {
  0% { opacity: 0; transform: translateY(10px) scale(0.975); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Subtle macOS screenshot corner handles */
.cap-handle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 2px;
  background: #ffffff;
  border: 1.5px solid rgba(22, 22, 21, 0.35);
  transition: border-color 0.25s ease;
}

.capture-sheet.locked .cap-handle { border-color: var(--accent); }
.ch-tl { top: -4px; left: -4px; }
.ch-tr { top: -4px; right: -4px; }
.ch-bl { bottom: -4px; left: -4px; }
.ch-br { bottom: -4px; right: -4px; }

.cap-rec-tag {
  position: absolute;
  top: -11px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #161615;
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(4px);
  transition: all 0.25s var(--spring);
}

.capture-sheet.locked .cap-rec-tag {
  opacity: 1;
  transform: translateY(0);
}

.cap-rec-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ff3b30;
  animation: recBlink 1s ease-in-out infinite;
}

@keyframes recBlink { 50% { opacity: 0.35; } }

/* Crisp Light-Mode Mini Web Page Being Captured */
.mini-app {
  background: #ffffff;
  border-radius: 9px;
  border: 1px solid rgba(22, 22, 21, 0.09);
  box-shadow: 0 4px 14px rgba(22, 22, 21, 0.05);
  overflow: hidden;
  position: relative;
}

.mini-app-bar {
  height: 26px;
  padding: 0 10px;
  background: #f8f7f4;
  border-bottom: 1px solid rgba(22, 22, 21, 0.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--ink-3);
}

.mini-app-body {
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
  align-items: center;
}

.mini-metric-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: #faf9f6;
  border: 1px solid rgba(22, 22, 21, 0.07);
}

.mini-k {
  font-size: 10px;
  color: var(--ink-3);
  margin-bottom: 4px;
}

.mini-v {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.mini-bars {
  margin-top: 8px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 26px;
}

.mini-bars span {
  flex: 1;
  border-radius: 2px;
  background: #e3e0d8;
}

.mini-bars span.hi { background: var(--ink); }

.mini-bug-box {
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(22, 22, 21, 0.09);
  background: #ffffff;
  position: relative;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.capture-sheet.bug-spot .mini-bug-box {
  border-color: rgba(234, 75, 0, 0.55);
  background: #fff7f3;
}

.mini-bug-row {
  height: 7px;
  border-radius: 3px;
  background: #e6e4de;
  margin-bottom: 6px;
}

.mini-bug-row.short { width: 65%; }
.mini-bug-row.shifted {
  width: 82%;
  transform: translateX(12px);
  background: rgba(234, 75, 0, 0.35);
}

.mini-bug-note {
  font-family: var(--font-mono);
  font-size: 9.5px;
  color: var(--accent);
  margin-top: 6px;
}

/* Smooth Animated Cursor pointing out the layout shift */
.demo-cursor {
  position: absolute;
  right: 34%;
  bottom: 24%;
  width: 18px;
  height: 18px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transform: translate(-40px, 16px);
  transition: transform 0.85s var(--ease-out), opacity 0.25s ease;
}

.capture-sheet.locked .demo-cursor {
  opacity: 1;
  transform: translate(0, 0);
}

.capture-sheet.bug-spot .demo-cursor {
  transform: translate(18px, -10px) scale(0.92);
}

.demo-cursor-ring {
  position: absolute;
  top: -6px;
  left: -6px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  opacity: 0;
  transform: scale(0.4);
}

.capture-sheet.bug-spot .demo-cursor-ring {
  animation: cursorPing 0.7s ease-out;
}

@keyframes cursorPing {
  0% { opacity: 0.9; transform: scale(0.4); }
  100% { opacity: 0; transform: scale(1.7); }
}

/* --------------------------------------------------------------------------
   AUTHENTIC GEMINI PROMPT COMPOSER + SEEKABLE WEBM CHIP
   -------------------------------------------------------------------------- */
.gem-composer-wrap {
  width: min(680px, 100%);
  margin: 0 auto;
  position: relative;
}

.gem-composer {
  position: relative;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(22, 22, 21, 0.09);
  box-shadow:
    0 12px 32px rgba(22, 22, 21, 0.065),
    0 2px 6px rgba(22, 22, 21, 0.035);
  padding: 15px 16px 12px 20px;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    box-shadow 0.25s ease,
    transform 0.34s var(--spring);
}

.gem-composer.is-active-focus {
  background: #ffffff;
  border-color: rgba(22, 22, 21, 0.16);
  box-shadow:
    0 16px 38px rgba(22, 22, 21, 0.085),
    0 2px 8px rgba(22, 22, 21, 0.04);
}

.gem-composer.impact-pop {
  animation: gemImpact 0.36s var(--spring);
}

@keyframes gemImpact {
  0% { transform: translateY(0) scale(1); }
  35% { transform: translateY(3px) scale(0.992, 0.98); }
  100% { transform: translateY(0) scale(1); }
}

.gem-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-bottom: 0;
  transition:
    max-height 0.34s var(--ease-out),
    margin-bottom 0.34s var(--ease-out),
    opacity 0.22s ease;
}

.gem-attachments.has-files {
  max-height: 76px;
  opacity: 1;
  margin-bottom: 10px;
}

.gem-file-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 13px 7px 8px;
  border-radius: 12px;
  background: #f7f5f0;
  border: 1px solid rgba(22, 22, 21, 0.09);
  box-shadow: 0 1px 2px rgba(22, 22, 21, 0.03);
  will-change: transform, opacity;
  animation: fileDropIn 0.34s var(--ease-out) both;
}

@keyframes fileDropIn {
  0% { opacity: 0; transform: translateY(-6px) scale(0.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.gem-file-badge {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  background: #161615;
  color: #ffffff;
  flex-shrink: 0;
}

.gem-file-badge.is-webm {
  background: #eef4ff;
  color: #1a73e8;
  border: 1px solid rgba(26, 115, 232, 0.2);
}

.gem-file-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  line-height: 1.2;
}

.gem-file-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #1f1f1f;
}

.gem-file-meta {
  font-family: var(--font-mono);
  font-size: 10px;
  color: #5f6368;
}

/* Seekable WebM Scrubbing Track inside Video Chip */
.webm-scrub-row {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  color: #5f6368;
}

.webm-scrub-track {
  position: relative;
  width: 84px;
  height: 4px;
  border-radius: 99px;
  background: #e2e8f0;
  overflow: visible;
}

.webm-scrub-fill {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: #1a73e8;
  transform-origin: left center;
  will-change: transform;
  animation: scrubFillGlide 3.4s ease-in-out infinite alternate;
}

.webm-scrub-thumb {
  position: absolute;
  left: -4px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #1a73e8;
  box-shadow: 0 0 0 2px #ffffff;
  will-change: transform;
  animation: scrubThumbGlide 3.4s ease-in-out infinite alternate;
}

@keyframes scrubFillGlide {
  0% { transform: scaleX(0.22); }
  100% { transform: scaleX(0.78); }
}

@keyframes scrubThumbGlide {
  0% { transform: translate3d(18.5px, -50%, 0); }
  100% { transform: translate3d(65.5px, -50%, 0); }
}

.webm-ok-tag {
  color: #15803d;
  font-weight: 600;
}

/* Input Line */
.gem-input-line {
  min-height: 36px;
  font-size: 15px;
  line-height: 1.5;
  color: #1f1f1f;
  padding: 2px 4px 10px 0;
}

.gem-placeholder { color: #747775; }

.stt-typo {
  color: #b91c1c;
  background: rgba(220, 38, 38, 0.10);
  padding: 0 4px;
  border-radius: 4px;
  text-decoration: line-through;
  text-decoration-thickness: 1.6px;
  font-weight: 500;
}

.gem-caret {
  display: inline-block;
  width: 1.5px;
  height: 1em;
  background: #1a73e8;
  vertical-align: -2px;
  margin-left: 1px;
  animation: gemBlink 0.9s steps(2) infinite;
}

@keyframes gemBlink { 50% { opacity: 0; } }

/* Toolbar */
.gem-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 40px;
}

.gem-left-icons {
  display: flex;
  align-items: center;
  gap: 6px;
}

.gem-circle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: #444746;
  display: grid;
  place-items: center;
  font-size: 18px;
}

.gem-tools-text {
  font-size: 12.5px;
  font-weight: 500;
  color: #5f6368;
  padding: 6px 8px;
}

.model-picker-container {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.gem-model-trigger {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, 0.78);
  color: #3c4043;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.16s ease, border-color 0.2s ease, color 0.2s ease;
}

.gem-model-trigger:hover { background: #e4eaf2; }

.gem-model-trigger.is-wrong {
  border-color: rgba(217, 119, 6, 0.45);
  background: #fef3c7;
  color: #92400e;
}

.gem-model-trigger.is-locked-ok {
  border-color: rgba(217, 119, 6, 0.32);
  background: #ffffff;
  color: #1f1f1f;
}

.gem-send-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  background: #1f1f1f;
  color: #ffffff;
  display: grid;
  place-items: center;
  margin-left: 4px;
  flex-shrink: 0;
  transition: transform 0.2s var(--spring), background 0.16s ease;
}

.gem-send-circle:hover { background: #0b57d0; transform: scale(1.05); }
.gem-send-circle:active { transform: scale(0.92); }
.gem-send-circle.hit-press { animation: sendPop 0.34s var(--spring); }

@keyframes sendPop {
  0% { transform: scale(1); }
  45% { transform: scale(0.84); background: #d97706; }
  100% { transform: scale(1); }
}

/* Native Gemini Model Dropdown + Nested Thinking Submenu */
.gem-dropdown-menu {
  position: absolute;
  right: 0;
  bottom: 46px;
  width: 268px;
  background: #ffffff;
  border-radius: 14px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.14), 0 2px 6px rgba(0, 0, 0, 0.06);
  padding: 6px;
  z-index: 35;
  opacity: 0;
  transform: translateY(10px) scale(0.96);
  pointer-events: none;
  transition: transform 0.26s var(--spring), opacity 0.18s ease;
}

.gem-dropdown-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.gem-menu-item {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  border-radius: 9px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.gem-menu-item:hover,
.gem-menu-item.is-hovered { background: #f0f4f9; }

.gem-menu-title { font-size: 13.5px; font-weight: 500; color: #1f1f1f; line-height: 1.3; }
.gem-menu-sub { font-size: 11.5px; color: #5f6368; line-height: 1.3; }
.gem-menu-sep { height: 1px; background: #eceff3; margin: 5px 6px; }

.gem-menu-sub-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: #1f1f1f;
}

.gem-menu-sub-row.is-hovered { background: #f0f4f9; }

.gem-submenu-flyout {
  position: absolute;
  right: 274px;
  bottom: 0;
  width: 164px;
  background: #ffffff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.10);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.14);
  padding: 6px;
  opacity: 0;
  transform: translateX(8px) scale(0.96);
  pointer-events: none;
  transition: transform 0.24s var(--spring), opacity 0.16s ease;
}

.gem-submenu-flyout.open {
  opacity: 1;
  transform: translateX(0) scale(1);
  pointer-events: auto;
}

/* --------------------------------------------------------------------------
   BELOW THE FOLD — QUIET EDITORIAL SECTIONS
   -------------------------------------------------------------------------- */
.band { padding: 68px 0; border-top: 1px solid var(--line); }

.band-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.band-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.band-lead { margin: 6px 0 0; font-size: 14.5px; color: var(--ink-2); max-width: 500px; }

.seg-switch {
  display: inline-flex;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 3px;
  gap: 3px;
}

.seg-btn {
  border: 0;
  background: transparent;
  color: var(--ink-2);
  padding: 7px 13px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--ink);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}

.gallery-grid { display: grid; grid-template-columns: 1.55fr 0.85fr; gap: 28px; align-items: start; }

.gallery-frame {
  border-radius: 14px;
  background: #141518;
  border: 1px solid var(--line-strong);
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(22, 22, 21, 0.06);
}

.gallery-media {
  aspect-ratio: 16 / 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f1012;
  overflow: hidden;
}

.gallery-media img { width: 100%; height: 100%; object-fit: contain; }

.gallery-side { display: flex; flex-direction: column; gap: 20px; padding-top: 6px; }
.gallery-side h3 { margin: 0; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.gallery-side p { margin: 8px 0 0; font-size: 14px; line-height: 1.6; color: var(--ink-2); }

.callout-list {
  list-style: none;
  margin: 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.callout-list li { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; color: var(--ink); }
.callout-mark { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--ink-3); flex-shrink: 0; }

.platform-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }

.plat-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.plat-card.featured { border-color: var(--line-strong); }
.plat-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.plat-name { font-family: var(--font-display); font-size: 16px; font-weight: 700; letter-spacing: -0.02em; }
.plat-state { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: #15803d; }
.plat-card.featured .plat-state { color: var(--accent); }
.plat-desc { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }

.plat-footnote { margin-top: 14px; font-size: 13px; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 18px; }
.plat-footnote strong { color: var(--ink-2); font-weight: 600; }

.manual-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 22px; flex-wrap: wrap; }

.manual-tab {
  border: 0;
  background: transparent;
  padding: 10px 2px 12px;
  margin-right: 18px;
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-3);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.16s ease, border-color 0.16s ease;
}

.manual-tab:hover { color: var(--ink); }
.manual-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

.manual-panel { display: none; }
.manual-panel.active { display: block; }

.spec-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.spec-item { padding: 16px 18px; border-radius: 11px; background: var(--surface); border: 1px solid var(--line); }
.spec-k { display: block; font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 5px; }
.spec-v { font-size: 13.5px; line-height: 1.55; color: var(--ink); }

.spec-v code, .faq-a code, .rev-note code, .callout-list code {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--surface-soft);
  padding: 1px 5px;
  border-radius: 4px;
}

.faq-stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.faq-card { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 15px 18px; }
.faq-card summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--font-display); font-size: 14.5px; font-weight: 600; }
.faq-card summary::-webkit-details-marker { display: none; }
.faq-plus { font-family: var(--font-mono); font-size: 16px; color: var(--ink-3); transition: transform 0.2s var(--spring); flex-shrink: 0; }
.faq-card[open] .faq-plus { transform: rotate(45deg); color: var(--ink); }
.faq-a { margin: 10px 0 0; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }

.rev-list { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.rev-row { display: grid; grid-template-columns: 64px 104px 1fr; gap: 16px; padding: 13px 2px; border-bottom: 1px solid var(--line); align-items: baseline; font-size: 13.5px; }
.rev-v { font-family: var(--font-mono); font-weight: 700; color: var(--ink); }
.rev-d { font-family: var(--font-mono); font-size: 12px; color: var(--ink-3); }
.rev-note { color: var(--ink-2); line-height: 1.55; }

.site-footer { border-top: 1px solid var(--line); padding: 26px 0 40px; font-size: 13px; color: var(--ink-3); }
.footer-inner { width: min(980px, calc(100% - 48px)); margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--ink); }

@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .platform-grid, .spec-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-stack { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .wrap, .topbar-inner, .footer-inner { width: calc(100% - 28px); }
  .nav-links .hide-xs, .gem-tools-text { display: none; }
  .gem-body { padding: 70px 14px 18px; height: auto; min-height: 400px; }
  .mini-app-body { grid-template-columns: 1fr; }
  .gem-submenu-flyout { right: 12px; bottom: 150px; }
  .platform-grid, .spec-grid { grid-template-columns: 1fr; }
  .rev-row { grid-template-columns: 52px 1fr; }
  .rev-d { display: none; }
}
