/* ==========================================================================
   TelegramSpot v7 — Product-Ready Multi-Page SEO Architecture
   Built on v6 Ruthless Clarity & 0.5-Second Scannability (Zero Gradients/Bevels)
   ========================================================================== */

:root {
  /* Oceanic Copper — Coastal Sea-Salt + Deep Aegean Navy + Ocean Blue & Warm Tangerine */
  --bg-hero: #f5f8fa;
  --bg-discover: #eaf1f6;
  --bg-themes-outer: #f5f8fa;
  --bg-editorial: #eaf1f6;
  --bg-footer: #f5f8fa;
  --bg-header: rgba(229, 238, 243, 0.94);
  --header-border: #c6d7e2;
  --header-nav-active-bg: #ffffff;
  --header-submit-border: #a3bac9;
  --header-submit-bg: rgba(255, 255, 255, 0.62);
  --header-dot-bg: #d9532a;
  --badge-bg: #d9532a;
  --badge-ink: #ffffff;

  --bg-card: #ffffff;
  --bg-subtle: #eef4f8;
  --bg-hover: rgba(14, 36, 51, 0.06);

  --border: #cfdde6;
  --border-hairline: #d8e4ec;
  --border-card-divider: #e5eef4;
  --border-strong: #b0c6d4;

  --ink: #0e2433;
  --ink-secondary: #435b6b;
  --ink-muted: #657d8d;

  --accent: #0284c7;
  --accent-hover: #0369a1;
  --accent-on: #ffffff;
  --accent-coral: #d9532a;
  --accent-coral-hover: #b8421e;
  --accent-lime: #38bdf8;
  --accent-tg: #0284c7;
  --tonal-bg: #e0f2fe;
  --tonal-ink: #0369a1;
  --focus-ring: rgba(2, 132, 199, 0.16);
  --intent-underline: #bed1dd;
  --card-hover-border: #7a9bb0;
  --upvote-active-bg: rgba(217, 83, 42, 0.11);
  --upvote-active-ink: #d9532a;
  --tabbar-active: #d9532a;

  --verified: #15803d;
  --free-fg: #15803d;

  /* Original Flat Origami Logo */
  --logo-wing-a: #0284c7;
  --logo-wing-b: #38bdf8;
  --logo-spot: #e05a2b;

  /* Hero Bot Preview Window & Deep Studio Tokens */
  --win-tabs-bg: #0b253a;
  --win-tab-active-bg: #143550;
  --win-tab-ink: #a5bfd1;
  --win-tab-indicator: #38bdf8;
  --win-canvas-bg: #e7f0f6;

  --studio-bg: #0b253a;
  --studio-swatch: #143550;
  --studio-swatch-hover: #1b4566;
  --studio-swatch-active: #163e5e;
  --studio-kicker: #fb923c;
  --studio-cta-bg: #38bdf8;
  --studio-cta-hover: #7dd3fc;
  --studio-cta-ink: #0b253a;

  --goal-active-bg: var(--accent);
  --goal-active-ink: var(--accent-on);
  --goal-active-dot: #bae6fd;

  /* Subtle Grounded Elevation (Zero 3D Bevels) */
  --shadow-search: 0 2px 10px rgba(14, 36, 51, 0.06);
  --shadow-window: 0 18px 42px -16px rgba(14, 36, 51, 0.16), 0 2px 6px rgba(14, 36, 51, 0.05);
  --shadow-float: 0 14px 36px rgba(14, 36, 51, 0.15), 0 2px 6px rgba(14, 36, 51, 0.06);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 24px;
  --radius-pill: 9999px;

  --font-display: 'Manrope', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;

  --header-h: 62px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);

  /* Whisper-Faint Architectural Studio Grid + Telegram Doodle Patterns (Zero CSS Gradients) */
  --arch-grid-light: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0H0V40' fill='none' stroke='%230e2433' stroke-opacity='0.036' stroke-width='1'/%3E%3C/svg%3E");
  --arch-grid-dark: url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M40 0H0V40' fill='none' stroke='%23ffffff' stroke-opacity='0.03' stroke-width='1'/%3E%3C/svg%3E");
  --tg-pattern-light: url("data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 56 56' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%230e2433' stroke-opacity='0.048' stroke-width='1.15'%3E%3Ccircle cx='12' cy='12' r='2.3'/%3E%3Cpath d='M36 10l4 3-4 3z'/%3E%3Crect x='34' y='34' width='5.5' height='5.5' rx='1.4' transform='rotate(15 37 37)'/%3E%3Cpath d='M10 40c2-3 5-3 7 0'/%3E%3Ccircle cx='28' cy='26' r='1.2' fill='%230e2433' fill-opacity='0.048' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
  --tg-pattern-dark: url("data:image/svg+xml,%3Csvg width='56' height='56' viewBox='0 0 56 56' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='0.045' stroke-width='1.15'%3E%3Ccircle cx='12' cy='12' r='2.3'/%3E%3Cpath d='M36 10l4 3-4 3z'/%3E%3Crect x='34' y='34' width='5.5' height='5.5' rx='1.4' transform='rotate(15 37 37)'/%3E%3Cpath d='M10 40c2-3 5-3 7 0'/%3E%3Ccircle cx='28' cy='26' r='1.2' fill='%23ffffff' fill-opacity='0.045' stroke='none'/%3E%3C/g%3E%3C/svg%3E");
}

/* Oceanic Copper — Deep Aegean Dark Mode */
[data-theme="dark"] {
  --bg-hero: #091521;
  --bg-discover: #0e1d2c;
  --bg-themes-outer: #091521;
  --bg-editorial: #0e1d2c;
  --bg-footer: #091521;
  --bg-header: rgba(11, 24, 36, 0.94);
  --header-border: #28445e;
  --header-nav-active-bg: #1d344a;
  --header-submit-border: #395b7a;
  --header-submit-bg: transparent;
  --header-dot-bg: #fb923c;
  --badge-bg: #38bdf8;
  --badge-ink: #091521;

  --bg-card: #15283b;
  --bg-subtle: #1d344a;
  --bg-hover: rgba(239, 245, 250, 0.08);

  --border: #28445e;
  --border-hairline: rgba(239, 245, 250, 0.09);
  --border-card-divider: rgba(239, 245, 250, 0.08);
  --border-strong: #395b7a;

  --ink: #eff5fa;
  --ink-secondary: #b7c9d8;
  --ink-muted: #879eb0;

  --accent: #38bdf8;
  --accent-hover: #7dd3fc;
  --accent-on: #091521;
  --accent-coral: #fb923c;
  --accent-coral-hover: #fdba74;
  --accent-lime: #38bdf8;
  --accent-tg: #0284c7;
  --tonal-bg: rgba(56, 189, 248, 0.14);
  --tonal-ink: #38bdf8;
  --focus-ring: rgba(56, 189, 248, 0.22);
  --intent-underline: rgba(239, 245, 250, 0.22);
  --card-hover-border: rgba(56, 189, 248, 0.42);
  --upvote-active-bg: rgba(56, 189, 248, 0.16);
  --upvote-active-ink: #38bdf8;
  --tabbar-active: #38bdf8;

  --verified: #34d399;
  --free-fg: #34d399;

  --logo-wing-a: #38bdf8;
  --logo-wing-b: #0284c7;
  --logo-spot: #fb923c;

  --win-tabs-bg: #0d2235;
  --win-tab-active-bg: #15344f;
  --win-tab-ink: #96b2c7;
  --win-tab-indicator: #38bdf8;
  --win-canvas-bg: #0c1b2a;

  --studio-bg: #0d2235;
  --studio-swatch: #143550;
  --studio-swatch-hover: #1b4566;
  --studio-swatch-active: #163e5e;
  --studio-kicker: #fb923c;
  --studio-cta-bg: #38bdf8;
  --studio-cta-hover: #7dd3fc;
  --studio-cta-ink: #0b253a;

  --goal-active-bg: #38bdf8;
  --goal-active-ink: #091521;
  --goal-active-dot: #091521;

  --shadow-search: 0 2px 12px rgba(0, 0, 0, 0.3);
  --shadow-window: 0 20px 44px -16px rgba(0, 0, 0, 0.56);
  --shadow-float: 0 18px 42px rgba(0, 0, 0, 0.58);
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
:focus:not(:focus-visible) {
  outline: none;
}
.theme-studio-card :focus-visible {
  outline-color: var(--studio-cta-bg);
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-hero);
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}

main {
  flex: 1;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

code {
  font-family: var(--font-mono);
  font-size: 0.87em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 200;
  background: var(--accent);
  color: var(--accent-on);
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  font-weight: 600;
}
.skip-link:focus { left: 12px; }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Clean Flat Buttons (Zero Gradients, Zero 3D Bevels)
   ========================================================================== */
.btn-primary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--accent);
  color: var(--accent-on);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.14s var(--ease);
}
.btn-primary-pill:hover { background: var(--accent-hover); }
.btn-primary-pill.btn-xs { height: 34px; padding: 0 15px; font-size: 13px; }

.btn-telegram {
  background: #0284c7;
  color: #ffffff;
}
.btn-telegram:hover { background: #0369a1; }
[data-theme="dark"] .btn-telegram {
  background: #38bdf8;
  color: #091521;
}
[data-theme="dark"] .btn-telegram:hover { background: #7dd3fc; }

.btn-tonal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  background: var(--tonal-bg);
  color: var(--tonal-ink);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.btn-tonal-pill:hover { background: var(--accent); color: var(--accent-on); }

.btn-secondary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease);
}
.btn-secondary-pill:hover { border-color: var(--accent); color: var(--accent); }

.btn-outline-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.btn-outline-pill:hover { background: var(--bg-card); border-color: var(--ink-muted); }
.btn-outline-pill.btn-xs { height: 32px; padding: 0 13px; font-size: 12.5px; }

.full-width { width: 100%; }

.ghost-circle-btn {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.ghost-circle-btn:hover { background: var(--bg-hover); color: var(--ink); }
.ghost-circle-btn.sm { width: 34px; height: 34px; font-size: 20px; }

.text-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: var(--radius-pill);
  transition: background-color 0.14s var(--ease);
}
.text-btn:hover { background: var(--tonal-bg); }
.text-btn.danger { color: #dc2626; }
[data-theme="dark"] .text-btn.danger { color: #fb7185; }

/* ==========================================================================
   Vivid Matte Flat Pastel Icon Tiles (Zero Gradients, Zero Bevels)
   ========================================================================== */
.app-tile {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--tile-bg, #dff0ff);
  color: var(--tile-fg, #0077cc);
}
.app-tile.sm { width: 36px; height: 36px; border-radius: 10px; }
.app-tile.lg { width: 56px; height: 56px; border-radius: 16px; }
.app-tile.lg svg { width: 26px; height: 26px; }

.app-tile[data-tone="sky"]    { --tile-bg: #dff0ff; --tile-fg: #0077cc; }
.app-tile[data-tone="teal"]   { --tile-bg: #ccfbf1; --tile-fg: #0f766e; }
.app-tile[data-tone="coral"]  { --tile-bg: #ffe4e6; --tile-fg: #e11d48; }
.app-tile[data-tone="amber"]  { --tile-bg: #fef3c7; --tile-fg: #b45309; }
.app-tile[data-tone="violet"] { --tile-bg: #ede9fe; --tile-fg: #6d28d9; }
.app-tile[data-tone="mint"]   { --tile-bg: #dcfce7; --tile-fg: #15803d; }

[data-theme="dark"] .app-tile[data-tone="sky"]    { --tile-bg: rgba(56, 189, 248, 0.16); --tile-fg: #38bdf8; }
[data-theme="dark"] .app-tile[data-tone="teal"]   { --tile-bg: rgba(45, 212, 191, 0.16); --tile-fg: #2dd4bf; }
[data-theme="dark"] .app-tile[data-tone="coral"]  { --tile-bg: rgba(251, 113, 133, 0.16); --tile-fg: #fb7185; }
[data-theme="dark"] .app-tile[data-tone="amber"]  { --tile-bg: rgba(251, 191, 36, 0.16); --tile-fg: #fbbf24; }
[data-theme="dark"] .app-tile[data-tone="violet"] { --tile-bg: rgba(167, 139, 250, 0.16); --tile-fg: #a78bfa; }
[data-theme="dark"] .app-tile[data-tone="mint"]   { --tile-bg: rgba(52, 211, 153, 0.16); --tile-fg: #34d399; }

/* ==========================================================================
   Balanced 3-Column Harmonized Header (Palette-Driven)
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--header-h);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--header-border);
}

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
}

.brand {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.025em;
  color: var(--ink);
  flex-shrink: 0;
}
.site-header .brand { color: var(--ink); }
.brand.brand-sm { font-size: 16px; gap: 8px; }
.brand-mark { display: inline-flex; line-height: 0; }

.main-nav {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--ink-secondary);
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  transition: color 0.14s var(--ease), background-color 0.14s var(--ease);
}
.nav-link:hover { color: var(--ink); background: var(--bg-hover); }
.nav-link.is-active {
  color: var(--ink);
  background: var(--header-nav-active-bg);
}
.nav-link.is-active::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--header-dot-bg);
  flex-shrink: 0;
}

.header-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 6px;
}

.site-header .ghost-circle-btn { color: var(--ink-secondary); }
.site-header .ghost-circle-btn:hover {
  color: var(--ink);
  background: var(--bg-hover);
}

[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }

.saved-dot-badge {
  position: absolute;
  top: 4px;
  right: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: var(--radius-pill);
  background: var(--badge-bg);
  color: var(--badge-ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.saved-dot-badge[hidden] { display: none; }

.header-submit-btn {
  margin-left: 4px;
  border: 1px solid var(--header-submit-border);
  color: var(--ink);
  background: var(--header-submit-bg);
}
.header-submit-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   Homepage Section 1: Hero + Fixed-Height Unified Bot Preview
   ========================================================================== */
.hero {
  padding: 46px 0 54px;
  background-color: var(--bg-hero);
  background-image: var(--arch-grid-light);
  background-size: 40px 40px;
  border-bottom: 1px solid var(--border-hairline);
}
[data-theme="dark"] .hero {
  background-image: var(--arch-grid-dark);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
  gap: 48px;
  align-items: center;
}

.hero-title {
  margin: 0 0 16px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.35rem, 3.8vw, 3.2rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--ink);
}
.accent-text {
  color: var(--accent-coral);
}

.hero-subtitle {
  margin: 0 0 24px;
  max-width: 520px;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
}

/* Authoritative 54px Pill Search Bar */
.search-shell {
  position: relative;
  max-width: 530px;
}

.search-bar {
  height: 54px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-pill);
  padding: 5px 5px 5px 18px;
  box-shadow: var(--shadow-search);
  transition: border-color 0.16s var(--ease), box-shadow 0.16s var(--ease);
}
.search-bar:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--focus-ring), var(--shadow-search);
}

.search-icon { color: var(--ink-muted); flex-shrink: 0; }

.search-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-size: 15.5px;
  color: var(--ink);
}
.search-input:focus-visible { outline: none; }
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}
.search-input::placeholder { color: var(--ink-muted); }

.search-kbd {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  flex-shrink: 0;
}

.search-clear {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.search-clear:hover { color: var(--ink); }
.search-clear[hidden] { display: none; }

.search-submit { height: 42px; padding: 0 22px; }

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  box-shadow: var(--shadow-float);
  padding: 6px;
  max-height: 330px;
  overflow-y: auto;
}
.search-dropdown[hidden] { display: none; }

.dropdown-item {
  width: 100%;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 11px;
  transition: background-color 0.14s var(--ease);
}
.dropdown-item:hover { background: var(--bg-subtle); }
.dropdown-item-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dropdown-item-title { font-weight: 600; font-size: 14px; color: var(--ink); }
.dropdown-item-sub { font-size: 12.5px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Single-Row Frameless Quick Links */
.intent-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  overflow: hidden;
  font-size: 13.5px;
  color: var(--ink-muted);
}
.intent-label { font-weight: 500; flex-shrink: 0; }
.intent-link {
  border: none;
  border-bottom: 1px solid var(--intent-underline);
  background: transparent;
  padding: 3px 1px;
  color: var(--ink-secondary);
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.intent-link:hover {
  color: var(--accent-coral);
  border-bottom-color: var(--accent-coral);
}
.intent-sep { opacity: 0.45; flex-shrink: 0; }

/* ==========================================================================
   Unified Native Telegram Preview Window (LOCKED HEIGHT — 0px Jump!)
   ========================================================================== */
.hero-demo-wrap { min-width: 0; }

.tg-window {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-window);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.tg-win-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  background: var(--win-tabs-bg);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  height: 42px;
}

.demo-tab {
  position: relative;
  border: none;
  background: transparent;
  color: var(--win-tab-ink);
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  padding: 0 6px;
  height: 100%;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.14s var(--ease), background-color 0.14s var(--ease);
}
.demo-tab:hover { color: #ffffff; background: rgba(255, 255, 255, 0.06); }
.demo-tab.is-active { background: var(--win-tab-active-bg); color: #ffffff; }
.demo-tab.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2.5px;
  background: var(--win-tab-indicator);
}

/* Fixed-Height Header, Canvas & Footer for ZERO Vertical Layout Shift */
.tg-win-head {
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-card-divider);
  background: var(--bg-card);
}

.tg-win-profile { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tg-win-name {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  color: var(--ink);
  line-height: 1.2;
}
.tg-win-name a:hover { color: var(--accent); }
.tg-win-handle { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }

.tg-win-canvas {
  height: 248px;
  min-height: 248px;
  max-height: 248px;
  overflow: hidden;
  padding: 16px;
  background-color: var(--win-canvas-bg);
  background-image: var(--tg-pattern-light);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}
[data-theme="dark"] .tg-win-canvas {
  background-image: var(--tg-pattern-dark);
}

.demo-msg {
  max-width: 88%;
  padding: 9px 13px;
  border-radius: 15px;
  font-size: 13.5px;
  line-height: 1.44;
  animation: fadeSlide 0.2s var(--ease);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.demo-msg.user {
  align-self: flex-end;
  text-align: left;
  border: none;
  background: var(--accent-tg);
  color: #ffffff;
  border-bottom-right-radius: 4px;
  transition: background-color 0.14s var(--ease), transform 0.12s var(--ease);
}
.demo-msg.user:hover { background: #0a6f99; }
.demo-msg.user:active { transform: scale(0.985); }
.demo-msg.user:disabled { opacity: 0.78; cursor: wait; }
[data-theme="dark"] .demo-msg.user { background: #157ba6; }
[data-theme="dark"] .demo-msg.user:hover { background: #1994c8; }

.bubble-trigger-hint {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
}

.demo-msg.bot {
  align-self: flex-start;
  background: var(--bg-card);
  color: var(--ink);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}

.demo-msg-label {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-coral);
  margin-bottom: 3px;
}

.typing-dots { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  animation: dotBounce 0.9s infinite ease-in-out;
}
.typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.typing-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotBounce {
  0%, 80%, 100% { opacity: 0.3; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}

.demo-voice-bar { display: flex; align-items: center; gap: 9px; }
.voice-play {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 10px;
}
.waveform { display: flex; align-items: center; gap: 2.5px; height: 18px; }
.waveform span { width: 2.5px; border-radius: 2px; background: rgba(255, 255, 255, 0.92); }

.demo-file-row { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 4px; }
.demo-file-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(255, 255, 255, 0.18);
  padding: 2px 7px;
  border-radius: 6px;
  font-family: var(--font-mono);
  font-size: 11.5px;
}

.demo-code-box {
  margin-top: 5px;
  padding: 5px 9px;
  border-radius: 8px;
  background: var(--bg-subtle);
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.tg-win-foot {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
  border-top: 1px solid var(--border-card-divider);
  background: var(--bg-card);
}

.tg-win-foot-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.free-text {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--free-fg);
  font-size: 13px;
  font-weight: 600;
}
.free-text::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

.foot-copy-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--ink-secondary);
  font-size: 13px;
  font-weight: 500;
  transition: color 0.14s var(--ease);
}
.foot-copy-btn:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

/* ==========================================================================
   Sections & Contrast Band Rhythm
   ========================================================================== */
.section {
  padding: 54px 0;
  scroll-margin-top: 72px;
}
.section-directory {
  background: var(--bg-discover);
  border-bottom: 1px solid var(--border-hairline);
}
.section-themes {
  background: var(--bg-themes-outer);
}
.section-surface-alt {
  background: var(--bg-discover);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.section-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.4vw, 1.95rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--ink);
}

.section-desc {
  margin: 6px 0 0;
  max-width: 560px;
  color: var(--ink-secondary);
  font-size: 15px;
}

/* ==========================================================================
   Discovery Grid & Crawlable Stretched-Link 3-Tier Cards (Zero Modal!)
   ========================================================================== */
.directory-controls { display: flex; align-items: center; gap: 10px; }

.segmented {
  display: inline-flex;
  background: #dfeaf2;
  border: 1px solid #cfdde6;
  padding: 3px;
  border-radius: var(--radius-pill);
}
[data-theme="dark"] .segmented {
  background: #15283b;
  border-color: #28445e;
}

.seg-btn {
  border: none;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.seg-btn:hover { color: var(--ink); }
.seg-btn.is-active { background: #ffffff; color: #0e2433; font-weight: 700; }
[data-theme="dark"] .seg-btn.is-active { background: #243d56; color: #eff5fa; font-weight: 700; }

.goal-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
}

.goal-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-secondary);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.goal-chip svg { flex-shrink: 0; opacity: 0.8; }
.goal-chip:hover { background: var(--bg-hover); color: var(--ink); }
.goal-chip.is-active { background: var(--goal-active-bg); color: var(--goal-active-ink); }
.goal-chip.is-active::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--goal-active-dot);
  flex-shrink: 0;
}
.goal-chip.is-active svg { opacity: 1; }

.goal-chip-look { color: var(--accent-coral); }
.goal-chip-look:hover { background: var(--tonal-bg); color: var(--accent-coral); }

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-muted);
}

.hub-quick-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
}
.hub-quick-links a {
  color: var(--accent);
  font-weight: 600;
  font-size: 13.5px;
}
.hub-quick-links a:hover { text-decoration: underline; }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

/* Stretched-Link 3-Tier Card */
.spot-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: border-color 0.15s var(--ease);
}
.spot-card:hover { border-color: var(--card-hover-border); }

.spot-card-link {
  color: inherit;
}
.spot-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}
.spot-card:hover .spot-title,
.spot-card:hover .spot-card-link { color: var(--accent-coral); }

.spot-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.spot-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.spot-title-block { min-width: 0; }
.spot-title-row { display: flex; align-items: center; gap: 5px; }
.spot-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.verified-check { color: var(--verified); display: inline-flex; flex-shrink: 0; }
.spot-type-label { display: block; margin-top: 1px; font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }

/* Interactive Controls Elevated Above Stretched-Link Overlay */
.bookmark-btn,
.handle-copy,
.upvote-btn,
.card-open-link {
  position: relative;
  z-index: 2;
}

.bookmark-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.bookmark-btn:hover { background: var(--bg-subtle); color: var(--ink); }
.bookmark-btn.is-saved { color: var(--accent); background: var(--tonal-bg); }
.bookmark-btn.is-saved svg { fill: currentColor; }

.spot-desc {
  margin: 0 0 18px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.spot-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 13px;
  border-top: 1px solid var(--border-card-divider);
}

.card-foot-left { display: flex; align-items: center; gap: 10px; min-width: 0; }

.handle-copy {
  border: none;
  background: transparent;
  padding: 0;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 155px;
  transition: color 0.14s var(--ease);
}
.handle-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.handle-copy:hover { color: var(--accent); }

.upvote-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--ink-muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.upvote-btn:hover { background: var(--bg-subtle); color: var(--ink); }
.upvote-btn.is-upvoted { background: var(--upvote-active-bg); color: var(--upvote-active-ink); }
.upvote-btn.is-popping { animation: upvotePop 0.25s var(--ease); }
@keyframes upvotePop {
  0% { transform: scale(1); }
  45% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

.card-open-link {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-family: var(--font-display);
  font-size: 12.5px;
  font-weight: 600;
  color: #0369a1;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: #e0f2fe;
  flex-shrink: 0;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.card-open-link:hover { background: #0284c7; color: #ffffff; }
[data-theme="dark"] .card-open-link {
  background: rgba(56, 189, 248, 0.14);
  color: #38bdf8;
}
[data-theme="dark"] .card-open-link:hover {
  background: #38bdf8;
  color: #091521;
}

.directory-more-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 24px;
}
.directory-more-wrap[hidden] { display: none; }

.badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--ink-secondary);
  flex-shrink: 0;
}
.badge-bot { background: var(--tonal-bg); color: var(--tonal-ink); }
.badge-channel { background: #ede9fe; color: #6d28d9; }
[data-theme="dark"] .badge-channel { background: rgba(167, 139, 250, 0.16); color: #c4b5fd; }

.empty-state {
  text-align: center;
  padding: 42px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.empty-state[hidden] { display: none; }
.empty-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-subtle);
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.empty-state h3 { margin: 0 0 6px; font-family: var(--font-display); font-size: 17px; font-weight: 700; }
.empty-state p { margin: 0 0 16px; color: var(--ink-secondary); font-size: 14.5px; }

/* ==========================================================================
   Palette-Driven Deep Live Theme Studio (Supports All 24 Themes Live!)
   ========================================================================== */
.theme-studio-card {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 34px;
  align-items: center;
  background: var(--studio-bg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-2xl);
  padding: 36px;
  color: #f4f6fa;
  transition: border-color 0.25s var(--ease), background-color 0.2s var(--ease);
}
.theme-studio-card.is-highlighted { border-color: var(--studio-cta-bg); }

.studio-kicker {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--studio-kicker);
  margin-bottom: 8px;
}

.studio-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 2.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.18;
  color: #f4f6fa;
}

.studio-desc { margin: 8px 0 0; font-size: 14.8px; line-height: 1.55; color: #c5cedf; }

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 20px 0 14px;
}

.swatch-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  background: var(--studio-swatch);
  text-align: left;
  transition: background-color 0.14s var(--ease), border-color 0.14s var(--ease);
}
.swatch-btn:hover { background: var(--studio-swatch-hover); border-color: rgba(255, 255, 255, 0.24); }
.swatch-btn.is-active { background: var(--studio-swatch-active); border-color: var(--studio-cta-bg); }

.swatch-dots { display: inline-flex; align-items: center; flex-shrink: 0; }
.swatch-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--studio-bg); }
.swatch-dot + .swatch-dot { margin-left: -4px; }

.swatch-label strong { display: block; font-family: var(--font-display); font-size: 13px; font-weight: 600; color: #f4f6fa; line-height: 1.2; }
.swatch-label span { font-size: 11px; color: #a5b1c8; }
.swatch-btn.is-active .swatch-label span { color: var(--studio-cta-bg); }

.studio-selected-info {
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--studio-swatch);
  border: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 13px;
  line-height: 1.48;
  color: #c5cedf;
  margin-bottom: 18px;
}
.studio-selected-info strong { color: #ffffff; }

.studio-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

.btn-studio-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 20px;
  border-radius: var(--radius-pill);
  border: none;
  background: var(--studio-cta-bg);
  color: var(--studio-cta-ink);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  transition: background-color 0.14s var(--ease);
}
.btn-studio-primary:hover { background: var(--studio-cta-hover); }

.btn-studio-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #edf1f8;
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  transition: background-color 0.14s var(--ease);
}
.btn-studio-outline:hover { background: var(--studio-swatch); }

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.preview-toolbar-label { font-size: 12.5px; font-weight: 600; color: #c5cedf; }

.preview-mode-switch {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  overflow: hidden;
  background: var(--studio-swatch);
}

.mode-btn {
  border: none;
  background: transparent;
  color: #a5b1c8;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  transition: background-color 0.14s var(--ease), color 0.14s var(--ease);
}
.mode-btn:hover { color: #f4f6fa; }
.mode-btn.is-active { background: var(--studio-cta-bg); color: var(--studio-cta-ink); }

.mockup-stage { display: flex; justify-content: center; align-items: center; min-height: 412px; }

.tg-mockup {
  --m-sidebar: #ffffff;
  --m-sidebar-active: #eaf4fc;
  --m-header: #ffffff;
  --m-canvas: #dce8f3;
  --m-in: #ffffff;
  --m-out: #dff2ff;
  --m-ink: #0f172a;
  --m-muted: #64748b;
  --m-accent: #0088cc;
  --m-border: rgba(15, 23, 42, 0.08);
  --m-composer: #ffffff;
  --m-pattern: var(--tg-pattern-light);
  --m-date-bg: rgba(15, 23, 42, 0.11);

  width: 100%;
  display: grid;
  grid-template-columns: 182px minmax(0, 1fr);
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  min-height: 400px;
  transition: max-width 0.25s var(--ease), border-radius 0.25s var(--ease);
}

.phone-statusbar { display: none; }
.phone-back { display: none; color: var(--m-accent); line-height: 0; }

.mockup-stage[data-preview-mode="phone"] .tg-mockup {
  max-width: 310px;
  grid-template-columns: 1fr;
  border-radius: 30px;
  border: 5px solid #263550;
  min-height: 412px;
}
.mockup-stage[data-preview-mode="phone"] .mock-sidebar { display: none; }
.mockup-stage[data-preview-mode="phone"] .phone-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 6px;
  background: var(--m-header);
  color: var(--m-ink);
  font-size: 11px;
  font-weight: 700;
}
.phone-notch { width: 66px; height: 14px; border-radius: var(--radius-pill); background: #0f172a; }
.phone-signals { font-family: var(--font-mono); font-size: 10px; opacity: 0.72; }
.mockup-stage[data-preview-mode="phone"] .phone-back { display: inline-flex; }
.mockup-stage[data-preview-mode="phone"] .mock-composer {
  margin: 0 10px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--m-border);
  padding: 6px 6px 6px 14px;
}

.mock-sidebar {
  background: var(--m-sidebar);
  border-right: 1px solid var(--m-border);
  padding: 11px 9px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mock-search-pill {
  background: var(--m-sidebar-active);
  color: var(--m-muted);
  font-size: 11.5px;
  padding: 6px 10px;
  border-radius: var(--radius-pill);
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.mock-chat-item {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 10px;
  transition: background-color 0.14s var(--ease);
}
.mock-chat-item:hover,
.mock-chat-item.is-selected { background: var(--m-sidebar-active); }

.mock-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #ffffff;
  font-size: 10.5px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mock-avatar.sm { width: 26px; height: 26px; font-size: 10px; }

.mock-chat-meta { min-width: 0; flex: 1; }
.mock-chat-row { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.mock-chat-row strong { font-size: 12px; font-weight: 600; color: var(--m-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mock-chat-row span { font-size: 9.5px; color: var(--m-muted); flex-shrink: 0; }
.mock-chat-meta p { margin: 2px 0 0; font-size: 10.5px; color: var(--m-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.mock-chat-pane {
  display: flex;
  flex-direction: column;
  background-color: var(--m-canvas);
  background-image: var(--m-pattern);
  min-width: 0;
}
.mock-chat-header {
  background: var(--m-header);
  border-bottom: 1px solid var(--m-border);
  padding: 10px 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.mock-header-user { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mock-header-user strong { display: block; font-size: 12.5px; font-weight: 600; color: var(--m-ink); line-height: 1.2; }
.mock-header-user > div > span { font-size: 10.5px; color: var(--m-muted); }

.mock-theme-tag {
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: var(--m-sidebar-active);
  color: var(--m-accent);
  white-space: nowrap;
  flex-shrink: 0;
}

.mock-messages {
  flex: 1;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  max-height: 288px;
  overflow-y: auto;
}
.mock-date-pill {
  align-self: center;
  font-size: 10.5px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  background: var(--m-date-bg);
  color: var(--m-ink);
}
.mock-bubble {
  max-width: 86%;
  padding: 8px 11px;
  border-radius: 13px;
  font-size: 12.2px;
  line-height: 1.44;
  color: var(--m-ink);
}
.mock-bubble.is-new { animation: fadeSlide 0.2s var(--ease); }
.mock-bubble p { margin: 0; word-break: break-word; }
.mock-bubble.incoming { align-self: flex-start; background: var(--m-in); border-bottom-left-radius: 4px; }
.mock-bubble.outgoing { align-self: flex-end; background: var(--m-out); border-bottom-right-radius: 4px; }
.mock-sender { font-size: 11px; font-weight: 700; color: var(--m-accent); margin-bottom: 2px; }
.mock-reply-quote { border-left: 2px solid var(--m-accent); padding: 2px 7px; margin-bottom: 5px; font-size: 10.5px; }
.mock-reply-quote strong { display: block; color: var(--m-accent); }
.mock-reply-quote span { color: var(--m-muted); }
.mock-time { display: block; text-align: right; font-size: 9.5px; color: var(--m-muted); margin-top: 3px; }

.mock-composer {
  background: var(--m-composer);
  border-top: 1px solid var(--m-border);
  padding: 8px 10px 8px 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.mock-composer-input { flex: 1; min-width: 0; border: none; outline: none; background: transparent; font-size: 12px; color: var(--m-ink); }
.mock-composer-input::placeholder { color: var(--m-muted); }
.mock-send-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--m-accent);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ==========================================================================
   Multi-Page Subpage Layouts (Hubs, Detail Pages, Guides, 24 Themes, Saved)
   ========================================================================== */
.page-hero {
  padding: 28px 0 24px;
  background-color: var(--bg-hero);
  background-image: var(--arch-grid-light);
  background-size: 40px 40px;
  border-bottom: 1px solid var(--border-hairline);
}
[data-theme="dark"] .page-hero {
  background-image: var(--arch-grid-dark);
}

.page-title,
.page-hero h1,
.guide-hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.3vw, 2.0rem);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: var(--ink);
}

.page-lead {
  margin: 0;
  max-width: 650px;
  font-size: 16px;
  line-height: 1.56;
  color: var(--ink-secondary);
}

/* Lightweight Editorial Transparent Spot Illustrations */
.section-title-with-spot {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.home-spot-art {
  width: 68px;
  height: 39px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.hub-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.hub-head-copy {
  min-width: 0;
  flex: 1;
}
.hub-spot-art {
  width: 200px;
  height: 118px;
  flex-shrink: 0;
  display: block;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.empty-spot-art {
  width: 150px;
  height: 89px;
  display: block;
  margin: 0 auto 12px;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.hub-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 22px;
}

.hub-search-wrap {
  position: relative;
  width: 100%;
  max-width: 380px;
}
.hub-search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 40px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 14.5px;
  color: var(--ink);
  outline: none;
}
.hub-search-input:focus { border-color: var(--accent); }
.hub-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-muted);
  pointer-events: none;
}

/* Dedicated Bot / Channel Page */
.detail-hero-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.detail-identity {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
}

.detail-meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--ink-muted);
}

.detail-cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(0, 0.72fr);
  gap: 28px;
  align-items: start;
}

.detail-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.content-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.content-card h2 {
  margin: 0 0 12px;
  font-family: var(--font-display);
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.content-card p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink-secondary);
}
.content-card p:last-child { margin-bottom: 0; }

.check-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14.8px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
.check-list li::before {
  content: "✓";
  color: var(--verified);
  font-weight: 700;
  flex-shrink: 0;
}

.steps-list {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.steps-list li {
  counter-increment: step;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.8px;
  color: var(--ink-secondary);
}
.steps-list li::before {
  content: counter(step);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--tonal-bg);
  color: var(--tonal-ink);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.cmd-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cmd-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-subtle);
  font-size: 14px;
}
.cmd-row code {
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}
.cmd-row span { color: var(--ink-secondary); }

/* ==========================================================================
   4-Module Human Detail Page Modules (Sample Preview, Verdict, Commands, Compare)
   ========================================================================== */
.module-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.module-head h2 { margin: 0; }
.module-kicker {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
}

/* Module 1: Live Sample Preview (Bot Chat / Sample Channel Post) */
.sample-tg-frame {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-card);
}
.sample-tg-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-card-divider);
}
.sample-tg-bar-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.sample-tg-bar-meta strong {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.sample-tg-bar-meta span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}
.tg-win-canvas.detail-sample-canvas {
  height: auto;
  min-height: 0;
  max-height: none;
  padding: 16px;
  justify-content: flex-start;
}
.demo-msg.user.is-static {
  cursor: default;
}
.demo-msg.user.is-static:hover {
  background: var(--accent-tg);
}
.demo-msg.user.is-static:active {
  transform: none;
}
.sample-user-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  margin-bottom: 2px;
}
.sample-bot-meta {
  display: block;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--ink-muted);
}

.sample-post-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  color: var(--ink);
}
.sample-post-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.sample-post-author {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.sample-post-author strong {
  display: block;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.2;
}
.sample-post-author span {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}
.sample-post-tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--accent);
  background: var(--tonal-bg);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
}
.sample-post-headline {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.sample-post-body {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
.sample-code-wrap {
  position: relative;
  margin-bottom: 12px;
}
.sample-code-block {
  margin: 0;
  padding: 12px 58px 12px 13px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 12.2px;
  line-height: 1.5;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  overflow-x: auto;
}
.sample-code-copy {
  position: absolute;
  top: 8px;
  right: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--ink-secondary);
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease);
}
.sample-code-copy:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.sample-post-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-card-divider);
  font-size: 12px;
  color: var(--ink-muted);
}
.sample-reactions {
  font-weight: 600;
  color: var(--ink-secondary);
}

/* Module 2: Honest Human Verdict ("Worth it?" Split Card) */
.verdict-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.verdict-col {
  padding: 16px;
  border-radius: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
}
.verdict-col.is-catch {
  border-left: 3px solid var(--accent-coral);
}
.verdict-col.is-keep {
  border-left: 3px solid var(--verified);
}
.verdict-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.verdict-label.is-keep { color: var(--verified); }
.verdict-label.is-catch { color: var(--accent-coral); }
.verdict-col p {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.58;
  color: var(--ink-secondary);
}

/* Module 3: Tap-to-Copy Command Deck (Bots) & Follow Tips (Channels) */
.cmd-deck-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.cmd-deck-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 9px 12px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card-divider);
}
.cmd-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 11px;
  border-radius: 8px;
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
  max-width: 100%;
  transition: border-color 0.14s var(--ease), background-color 0.14s var(--ease);
}
.cmd-copy-btn code {
  color: inherit;
  font-size: 12.8px;
  white-space: nowrap;
}
.cmd-copy-hint {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-muted);
  padding-left: 6px;
  border-left: 1px solid var(--border);
}
.cmd-copy-btn:hover {
  border-color: var(--accent);
  background: var(--tonal-bg);
}
.cmd-copy-btn:hover .cmd-copy-hint {
  color: var(--accent);
}
.cmd-outcome {
  font-size: 14px;
  color: var(--ink-secondary);
  text-align: right;
}

.follow-tip-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.follow-tip-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 11px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-card-divider);
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
}
.follow-tip-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
  flex-shrink: 0;
}

/* Module 4: Quick Comparison Table + Optional 1-Line Fix */
.compare-table-wrap {
  width: 100%;
  overflow-x: auto;
}
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.compare-table th {
  text-align: left;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  padding: 0 12px 10px 0;
  border-bottom: 1px solid var(--border);
}
.compare-table td {
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--border-card-divider);
  color: var(--ink-secondary);
  vertical-align: top;
  line-height: 1.5;
}
.compare-table tr:last-child td { border-bottom: none; }
.compare-table tr.is-current td:first-child strong { color: var(--ink); }
.compare-self-pill {
  display: inline-block;
  margin-left: 5px;
  font-family: var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--tonal-bg);
  color: var(--tonal-ink);
  vertical-align: middle;
}
.compare-link {
  font-weight: 600;
  color: var(--accent);
}
.compare-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.fix-note {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-coral);
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-secondary);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.fix-note-label {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--accent-coral);
  flex-shrink: 0;
}

.facts-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--verified);
  font-weight: 600;
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--verified);
  flex-shrink: 0;
}

/* FAQ Accordion (<details>) */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  background: var(--bg-hero);
}
.faq-item summary {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 18px;
  color: var(--ink-muted);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 10px 0 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink-secondary);
}

/* Sticky Right Quick Facts Card */
.quick-facts-card {
  position: sticky;
  top: 82px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.quick-facts-card h3 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
}
.facts-dl {
  margin: 0 0 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.facts-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-card-divider);
  font-size: 13.5px;
}
.facts-row:last-child { border-bottom: none; padding-bottom: 0; }
.facts-row dt { color: var(--ink-muted); }
.facts-row dd { margin: 0; font-weight: 600; color: var(--ink); text-align: right; }

/* 24-Theme Gallery Grid (/telegram-themes/) */
.themes-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.theme-gallery-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s var(--ease);
}
.theme-gallery-card:hover,
.theme-gallery-card.is-active { border-color: var(--accent); }

.tg-mini-banner {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  border-bottom: 1px solid var(--border-card-divider);
}
.tg-mini-b-in,
.tg-mini-b-out {
  max-width: 78%;
  padding: 6px 10px;
  border-radius: 10px;
  font-size: 11.5px;
  line-height: 1.35;
}
.tg-mini-b-in { align-self: flex-start; border-bottom-left-radius: 3px; }
.tg-mini-b-out { align-self: flex-end; border-bottom-right-radius: 3px; }

.theme-gallery-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.theme-gallery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.theme-gallery-head h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}
.theme-gallery-body p {
  margin: 0 0 8px;
  font-size: 13.8px;
  line-height: 1.5;
  color: var(--ink-secondary);
  flex: 1;
}
.theme-gallery-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--border-card-divider);
}

/* Guides Hub & Article Layout */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s var(--ease);
}
.guide-card:hover { border-color: var(--accent); }
.guide-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.guide-meta { font-size: 12.5px; font-weight: 500; color: var(--ink-muted); }
.guide-card h2,
.guide-card h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: var(--ink);
}
.guide-card p { margin: 0 0 16px; font-size: 14.5px; line-height: 1.52; color: var(--ink-secondary); flex: 1; }
.guide-read-link {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--accent);
}

/* ==========================================================================
   Open Apple Support / Stripe Docs Editorial Guide Layout (Zero Box Clutter)
   ========================================================================== */
.section-guide-reading {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-hairline);
  padding: 40px 0 60px;
}
[data-theme="dark"] .section-guide-reading {
  background: var(--bg-hero);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 680px) 260px;
  justify-content: space-between;
  gap: 56px;
  align-items: start;
}

.guide-article {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  min-width: 0;
}

.guide-article p {
  margin: 0 0 16px;
  font-size: 16.5px;
  line-height: 1.75;
  color: #2d4150;
}
[data-theme="dark"] .guide-article p {
  color: #cbd7e2;
}
.guide-article p:last-child { margin-bottom: 0; }

.guide-section {
  margin-top: 40px;
  scroll-margin-top: 84px;
}
.guide-section.is-first {
  margin-top: 0;
}

.guide-h2 {
  margin: 0 0 14px;
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
}

/* Natural Numbered Text Steps */
.guide-steps {
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  counter-reset: gstep;
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.guide-steps li {
  counter-increment: gstep;
  position: relative;
  padding-left: 32px;
  font-size: 16.5px;
  line-height: 1.7;
  color: #2d4150;
}
[data-theme="dark"] .guide-steps li { color: #cbd7e2; }
.guide-steps li::before {
  content: counter(gstep) ".";
  position: absolute;
  left: 0;
  top: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
}
.guide-steps li strong { color: var(--ink); font-weight: 600; }

/* Plain Crisp Editorial Bullet List */
.guide-plain-list {
  margin: 0 0 18px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.guide-plain-list li {
  font-size: 16.5px;
  line-height: 1.7;
  color: #2d4150;
}
[data-theme="dark"] .guide-plain-list li { color: #cbd7e2; }
.guide-plain-list li strong { color: var(--ink); font-weight: 600; }

/* Quiet Frameless Left-Accent Catch Note (Zero Card Box) */
.guide-catch-note {
  margin: 22px 0;
  padding: 2px 0 2px 16px;
  border-left: 3px solid var(--accent-coral);
  background: transparent;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--ink-secondary);
}

.guide-table-wrap { margin: 20px 0 22px; }
.guide-open-table th {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.guide-open-table td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--border-card-divider);
}

/* Single Calm Visual Summary Card (.tg-settings-mock) */
.tg-settings-mock {
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-subtle);
}
.tg-settings-mock.guide-visual-summary {
  margin: 32px 0;
}
.tg-settings-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  background: var(--studio-bg);
  color: #f4f6fa;
}
.tg-settings-title {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
}
.tg-settings-sub {
  font-size: 11.5px;
  color: #a5bfd1;
}
.tg-settings-rows {
  background: var(--bg-card);
}
.tg-settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-card-divider);
  font-size: 14.5px;
}
.tg-settings-row:last-child { border-bottom: none; }
.tg-settings-key {
  font-weight: 500;
  color: var(--ink);
}
.tg-settings-val {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}
.tg-settings-val.is-blue { color: var(--accent); }
.tg-settings-val.is-copper { color: var(--accent-coral); }

/* 16:9 Embedded YouTube Video Walkthrough */
.video-embed-wrap {
  margin: 32px 0 0;
  scroll-margin-top: 84px;
}
.video-embed-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #0b253a;
}
.video-embed-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.video-embed-caption {
  margin-top: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--ink-muted);
}

.guide-inline-tip {
  margin-top: 18px !important;
  font-size: 15.5px !important;
  color: var(--ink-secondary) !important;
}
.guide-text-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.guide-text-link:hover { color: var(--accent-hover); }

.guide-related-picks {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--border-hairline);
}

/* Clean Responsive Google AdSense Containers (Zero Overflow, Zero Fake Boxes) */
.ad-band {
  background: var(--bg-themes-outer);
  padding: 28px 0 0;
}

.ad-unit {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  text-align: center;
}
.ad-unit-banner {
  margin: 28px auto 0;
  max-width: 970px;
}
.ad-band .ad-unit-banner {
  margin-top: 0;
}
.ad-unit-inline {
  margin: 32px 0 4px;
}
.ad-unit-sidebar {
  margin: 0;
}
.ad-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 6px;
}
.ad-unit .adsbygoogle {
  display: block;
  max-width: 100%;
  overflow: hidden;
}

.detail-sidebar {
  position: sticky;
  top: 82px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-width: 0;
}
.detail-sidebar .quick-facts-card {
  position: static;
}

/* Zero-CLS AdSense Slot Placeholders (Retained for future fixed-height slots) */
.ad-slot {
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--bg-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 12px;
}
.ad-slot.ad-banner {
  min-height: 96px;
  margin-top: 32px;
}
.ad-slot.ad-rect {
  min-height: 250px;
}
.ad-slot-label {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* Sticky Quiet Right Guide Sidebar (Frameless Hairline TOC) */
.guide-sidebar {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.toc-card {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  border-radius: 0;
  padding: 2px 0 2px 16px;
}
.toc-title {
  margin: 0 0 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-muted);
}
.toc-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.toc-list a {
  display: block;
  padding: 3px 0;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color 0.14s var(--ease);
}
.toc-list a:hover {
  color: var(--accent);
}

/* Collections Grid (/collections/) */
.collections-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.collection-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.collection-head { display: flex; align-items: center; gap: 12px; }
.collection-head h2 { margin: 0; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.collection-card p { margin: 0; font-size: 14.5px; color: var(--ink-secondary); }
.collection-links { display: flex; flex-wrap: wrap; gap: 8px; }
.collection-item-pill {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-subtle);
  color: var(--ink);
  border: 1px solid var(--border);
  transition: border-color 0.14s var(--ease), color 0.14s var(--ease);
}
.collection-item-pill:hover { border-color: var(--accent); color: var(--accent); }

/* Standalone /saved/ Page */
.saved-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 18px;
}

/* Prose Card (/about/, /privacy/) */
.prose-card {
  max-width: 780px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
}
.prose-card h2 {
  margin: 24px 0 10px;
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
}
.prose-card h2:first-child { margin-top: 0; }
.prose-card p { margin: 0 0 12px; font-size: 15px; line-height: 1.64; color: var(--ink-secondary); }

/* ==========================================================================
   Clean Footer — ZERO Duplication with Header Links!
   ========================================================================== */
.site-footer {
  border-top: 1px solid var(--border-hairline);
  background: var(--bg-footer);
  padding: 26px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}
.footer-links a {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-secondary);
  transition: color 0.14s var(--ease);
}
.footer-links a:hover { color: var(--accent); }

/* ==========================================================================
   Drawer, Submit Modal & Toast
   ========================================================================== */
.drawer-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(11, 18, 32, 0.52);
  backdrop-filter: blur(4px);
}
.drawer-backdrop[hidden],
.modal-backdrop[hidden],
.drawer[hidden] { display: none; }

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 110;
  width: 100%;
  max-width: 396px;
  background: var(--bg-card);
  border-left: 1px solid var(--border-strong);
  box-shadow: var(--shadow-float);
  display: flex;
  flex-direction: column;
}
.drawer-head {
  padding: 20px 20px 15px;
  border-bottom: 1px solid var(--border-card-divider);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.drawer-head h3 { margin: 0 0 4px; font-family: var(--font-display); font-size: 18px; font-weight: 700; }
.drawer-head p { margin: 0; font-size: 13px; color: var(--ink-muted); }

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.saved-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 13px;
  background: var(--bg-subtle);
}
.saved-row-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.saved-row strong { display: block; font-size: 14px; font-weight: 600; }
.saved-row-left > div > span { font-family: var(--font-mono); font-size: 12px; color: var(--ink-muted); }

.drawer-foot {
  padding: 14px 20px;
  border-top: 1px solid var(--border-card-divider);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.drawer-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.drawer-manage-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
}
.drawer-manage-link:hover { text-decoration: underline; }

.modal-backdrop {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: 88vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-2xl);
  padding: 26px;
  box-shadow: var(--shadow-float);
}
.modal-close { position: absolute; top: 18px; right: 18px; }
.modal-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 600; color: var(--accent); }
.modal-title { margin: 0 0 8px; font-family: var(--font-display); font-size: 21px; font-weight: 700; letter-spacing: -0.02em; }
.modal-desc { margin: 0 0 18px; font-size: 14.5px; color: var(--ink-secondary); }

.submit-form { display: flex; flex-direction: column; gap: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink); }
.field input,
.field select,
.field textarea {
  border: 1px solid var(--border-strong);
  background: var(--bg-subtle);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus { border-color: var(--accent); }

.toast-region {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 150;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast {
  background: var(--ink);
  color: var(--bg-card);
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: var(--shadow-float);
  animation: fadeSlide 0.18s var(--ease);
}

.mobile-tabbar { display: none; }

/* ==========================================================================
   Standalone Mobile Excellence (<= 1024px, <= 760px / 375x812 Zero Overflow)
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid,
  .detail-layout { grid-template-columns: 1fr; gap: 30px; }
  .quick-facts-card,
  .detail-sidebar { position: static; }
  .cards-grid,
  .guides-grid,
  .themes-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .theme-studio-card { grid-template-columns: 1fr; padding: 28px; gap: 26px; }
}

@media (max-width: 960px) {
  .guide-layout { grid-template-columns: 1fr; gap: 22px; }
  .guide-sidebar { position: static; }
}

@media (max-width: 760px) {
  body { padding-bottom: 68px; }
  .container { padding: 0 16px; }
  .section { padding: 36px 0; }
  .page-hero { padding: 24px 0 26px; }
  .hub-head-inner { gap: 16px; }
  .hub-spot-art { display: none; }
  .home-spot-art { width: 54px; height: 31px; }
  .header-inner { display: flex; justify-content: space-between; }
  .brand { font-size: 16.5px; gap: 8px; }
  .main-nav,
  .saved-icon-btn,
  .search-kbd { display: none; }
  .header-submit-btn { height: 36px; padding: 0 14px; font-size: 13px; }
  .hero { padding: 26px 0 34px; }
  .hero-title { font-size: 2.02rem; }
  .hero-subtitle { font-size: 15.5px; margin-bottom: 20px; }
  .search-bar { height: 50px; padding: 4px 4px 4px 14px; }
  .search-input { font-size: 14.5px; }
  .search-submit { height: 40px; padding: 0 16px; }
  .intent-row { flex-wrap: wrap; gap: 6px; }
  .tab-long { display: none; }
  .demo-tab { font-size: 12px; padding: 0 4px; }
  /* Fixed Mobile Canvas Height — 0px Hero Jump across all 4 bot tabs */
  .tg-win-canvas {
    height: 268px;
    min-height: 268px;
    max-height: 268px;
    padding: 14px;
  }
  .cards-grid,
  .guides-grid,
  .themes-gallery-grid,
  .collections-grid,
  .field-row { grid-template-columns: 1fr; }
  .content-card,
  .prose-card { padding: 20px 16px; }
  .section-guide-reading { padding: 28px 0 40px; }
  .guide-h2 { font-size: 19px; }
  .guide-article p,
  .guide-steps li,
  .guide-plain-list li { font-size: 15.5px; }
  .tg-settings-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .tg-settings-row { font-size: 13.5px; padding: 11px 13px; }
  .cmd-row { flex-direction: column; gap: 3px; }
  .verdict-grid { grid-template-columns: 1fr; gap: 12px; }
  .cmd-deck-row { flex-direction: column; align-items: flex-start; gap: 6px; }
  .cmd-outcome { text-align: left; font-size: 13.5px; }
  .compare-table thead { display: none; }
  .compare-table,
  .compare-table tbody,
  .compare-table tr,
  .compare-table td { display: block; width: 100%; }
  .compare-table tr {
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
  }
  .compare-table tr:last-child { border-bottom: none; padding-bottom: 0; }
  .compare-table td {
    padding: 4px 0;
    border: none;
  }
  .compare-table td::before {
    content: attr(data-label);
    display: block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--ink-muted);
    margin-bottom: 2px;
  }
  .theme-studio-card { padding: 20px 16px; border-radius: 20px; }
  .theme-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .handle-copy,
  .upvote-btn,
  .card-open-link { min-height: 36px; }
  .preview-toolbar { flex-wrap: wrap; gap: 8px; }
  .preview-mode-switch { display: none; }
  .mockup-stage { min-height: 0; }
  .tg-mockup { grid-template-columns: 1fr; min-height: 356px; border-radius: 20px; }
  .mock-sidebar { display: none; }
  .mockup-stage[data-preview-mode="phone"] .tg-mockup {
    max-width: 100%;
    border-width: 4px;
    border-radius: 24px;
  }
  .mobile-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    height: 62px;
    background: var(--bg-header);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--border-hairline);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
  }
  .tabbar-item {
    border: none;
    background: transparent;
    color: var(--ink-muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 600;
  }
  .tabbar-item.is-active { color: var(--tabbar-active); }
  .tabbar-icon-wrap { position: relative; display: inline-flex; }
  .mobile-saved-dot {
    position: absolute;
    top: -4px;
    right: -8px;
    min-width: 15px;
    height: 15px;
    padding: 0 4px;
    border-radius: var(--radius-pill);
    background: var(--badge-bg);
    color: var(--badge-ink);
    font-size: 9.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .mobile-saved-dot[hidden] { display: none; }
  .toast-region { bottom: 74px; left: 16px; right: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
