/* Motion Prompt — Liquid Glass & Cyber Purple Stylesheet
   Designed for xavinno.com/motion-prompt
   iOS Liquid Glass refraction, cyber purple accents, pure black base, zero dependencies. */

:root {
  --bg: #030407;
  --bg-deep: #020306;
  --glass-surface: rgba(12, 10, 24, 0.68);
  --glass-elevated: rgba(18, 14, 34, 0.78);
  --glass-border: rgba(255, 255, 255, 0.12);
  --glass-border-hover: rgba(168, 85, 247, 0.5);
  --glass-specular: rgba(255, 255, 255, 0.28);
  --ink: #f5f3ff;
  --ink-bright: #ffffff;
  --ink-dim: #cbd5e1;
  --muted: #8b80b6;
  --muted-dim: #4c4273;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --accent: #a855f7;              /* Cyber Purple */
  --accent-bright: #c084fc;       /* Glowing Lilac */
  --accent-rgb: 168, 85, 247;
  --accent-glow: rgba(168, 85, 247, 0.45);
  --accent-dim: rgba(168, 85, 247, 0.15);
  --accent-ink: #ffffff;
  --secondary: #9333ea;
  --secondary-glow: rgba(147, 51, 234, 0.4);
  --emerald: #10b981;
  --stage: #020306;
  --shade: rgba(0, 0, 0, 0.88);
  --mono: "JetBrains Mono", "SF Mono", "Fira Code", ui-monospace, Menlo, Consolas, monospace;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Noto Sans TC", system-ui, sans-serif;
  --top-h: 88px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--top-h) + 20px);
  background-color: var(--bg);
  color-scheme: dark;
}
@media (hover: hover) and (pointer: fine) { html { scrollbar-gutter: stable; } }
html.modal-open { overflow: hidden; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -15%, rgba(168, 85, 247, 0.12), transparent 60%),
    radial-gradient(ellipse 60% 40% at 88% 25%, rgba(147, 51, 234, 0.09), transparent 50%),
    radial-gradient(ellipse 50% 30% at 12% 65%, rgba(192, 132, 252, 0.06), transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  background-attachment: fixed;
  color: var(--ink);
  font: 15px/1.7 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* Custom Cyber Purple Scrollbar */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #030408; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.12);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(168, 85, 247, 0.4);
  box-shadow: 0 0 10px var(--accent-glow);
}

h1, h2, h3, h4, p, ul, ol, dl, dd, pre { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; transition: all 0.2s; }
a:hover { color: var(--accent-bright); }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: transparent; }
[hidden] { display: none !important; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: 1440px; margin-inline: auto; padding-inline: 28px; }

/* Liquid Glass Utilities */
.liquid-glass {
  background: var(--glass-surface);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--glass-border);
  box-shadow: 
    inset 0 1px 1.5px 0 var(--glass-specular),
    inset 0 0 18px 0 rgba(168, 85, 247, 0.05),
    0 16px 40px -15px rgba(0, 0, 0, 0.8);
  position: relative;
}
.liquid-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0.01) 40%, rgba(168, 85, 247, 0.05) 100%);
  pointer-events: none;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 50;
  background: var(--accent); color: var(--accent-ink);
  font: 700 13px var(--mono); padding: 8px 16px;
  border-radius: var(--radius-sm); text-decoration: none;
  box-shadow: 0 0 20px var(--accent-glow);
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

/* ---------- Liquid Glass Cyber Header ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  height: var(--top-h);
  background: rgba(4, 5, 12, 0.85);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.7);
}
.top::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(168, 85, 247, 0.35) 25%, rgba(147, 51, 234, 0.35) 75%, transparent);
}
.top-in {
  height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.brand-group {
  display: flex; align-items: center; gap: 16px;
}
.logo {
  display: flex; align-items: center; gap: 16px;
  text-decoration: none; color: #fff;
}
/* Even bigger logo as requested */
.logo-img {
  height: 48px; width: auto; max-height: 52px; object-fit: contain;
  filter: drop-shadow(0 0 20px rgba(255,255,255,0.45));
  transition: transform 0.2s, filter 0.2s;
}
.logo:hover .logo-img {
  transform: scale(1.02);
  filter: drop-shadow(0 0 24px rgba(168, 85, 247, 0.6));
}
.logo-divider {
  color: var(--line-strong); font: 300 24px var(--mono);
}
.logo-sub {
  font: 800 13px/1.2 var(--mono);
  letter-spacing: 0.16em;
  color: var(--accent-bright);
  text-shadow: 0 0 16px var(--accent-glow);
  white-space: nowrap;
}

.top-nav {
  display: flex; align-items: center; gap: 10px;
}
.top-link {
  font: 600 14px var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  transition: all 0.2s;
}
.top-link:hover {
  color: #fff; background: rgba(255, 255, 255, 0.08);
}
.top-main {
  color: var(--accent-bright);
  border: 1px solid rgba(168, 85, 247, 0.35);
  background: rgba(168, 85, 247, 0.08);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.2);
}
.top-main:hover {
  background: var(--accent-dim);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
}

.seg {
  display: flex; align-items: center;
  background: rgba(12, 10, 24, 0.85);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 3px;
  margin-left: 8px;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}
.seg-b {
  border: 0; background: transparent;
  padding: 6px 13px;
  font: 700 12px/1.3 var(--mono);
  letter-spacing: 0.06em;
  color: var(--muted);
  border-radius: 7px;
  transition: all 0.15s;
}
.seg-b:hover { color: #fff; }
.seg-b[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(147, 51, 234, 0.3));
  border: 1px solid var(--accent);
  color: #ffffff;
  box-shadow: 0 0 16px var(--accent-glow), inset 0 1px 1px rgba(255,255,255,0.35);
}

/* ---------- Liquid Glass Hero Section ---------- */
.hero {
  position: relative;
  padding-block: 88px 76px;
  overflow: hidden;
}
.hero-glow-1 {
  position: absolute; top: -120px; left: 8%; width: 550px; height: 380px;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.15) 0%, transparent 70%);
  pointer-events: none; filter: blur(70px);
}
.hero-glow-2 {
  position: absolute; top: 0; right: 6%; width: 500px; height: 340px;
  background: radial-gradient(circle, rgba(147, 51, 234, 0.14) 0%, transparent 70%);
  pointer-events: none; filter: blur(70px);
}
.hero-copy {
  position: relative; z-index: 2; max-width: 980px;
}

.hero-badge-wrap {
  display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 24px;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(168, 85, 247, 0.1);
  border: 1px solid rgba(168, 85, 247, 0.35);
  font: 700 12px/1.3 var(--mono);
  letter-spacing: 0.08em;
  color: var(--accent-bright);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.2), inset 0 1px 1px rgba(255,255,255,0.2);
}
.hero-badge-pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 10px var(--accent);
}
.hero-badge-tag {
  font: 700 11px/1.3 var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.03);
}

/* NO GRADIENT ON TITLE TEXTS as requested */
h1 {
  font-size: clamp(38px, 5.2vw, 76px);
  line-height: 1.08;
  letter-spacing: -0.04em;
  font-weight: 800;
  color: #ffffff;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.text-glow {
  color: #ffffff;
  background: none;
  -webkit-background-clip: unset;
  -webkit-text-fill-color: initial;
}

.lead {
  margin-top: 26px;
  font-size: 17.5px;
  line-height: 1.7;
  color: var(--ink-dim);
  max-width: 44em;
}
.lead-sub {
  margin-top: 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--accent-bright);
  font-weight: 400;
}

.hero-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 36px;
}
.hero-hint {
  display: inline-flex; align-items: center; gap: 6px;
  font: 12.5px var(--mono); color: var(--muted);
  margin-left: 8px;
}
.kbd {
  display: inline-block; padding: 2px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  font: 700 11px var(--mono); color: var(--accent-bright);
}

/* Liquid Glass Telemetry Cards */
.facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 48px;
}
.fact-card {
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.fact-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: 
    inset 0 1px 1.5px 0 var(--glass-specular),
    0 20px 48px -12px rgba(0, 0, 0, 0.85),
    0 0 24px -4px rgba(168, 85, 247, 0.3);
}
.fact-card dt {
  font: 700 11px/1.2 var(--mono);
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.fact-card dd {
  font: 800 38px/1.1 var(--mono);
  letter-spacing: -0.04em;
  color: #ffffff;
  margin-top: 8px;
}
.fact-unit {
  font-size: 16px; font-weight: 600; color: var(--accent-bright); margin-left: 4px;
}
.fact-sub {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
  font-weight: 400;
}

/* ---------- Cyber Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: rgba(18, 14, 34, 0.85);
  backdrop-filter: blur(16px);
  padding: 10px 18px;
  font: 700 13.5px/1.4 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink);
  white-space: nowrap;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.15);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(28, 22, 52, 0.95);
  color: #ffffff;
  transform: translateY(-1px);
}
.btn-s { padding: 7px 13px; font-size: 12.5px; flex: none; }
.btn-ghost {
  background: transparent; border-color: var(--line); box-shadow: none;
}
.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--line-strong);
}
.btn-main {
  background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
  border-color: transparent;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.45), inset 0 1px 1px rgba(255,255,255,0.4);
}
.btn-main:hover {
  filter: brightness(1.12);
  box-shadow: 0 0 32px rgba(168, 85, 247, 0.65);
  color: #fff;
}
.btn-glow {
  box-shadow: 0 0 24px rgba(168, 85, 247, 0.45);
}
.btn-outline {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
}
.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent-bright);
  box-shadow: 0 0 20px var(--accent-dim);
}
.btn.is-done {
  background: #10b981; border-color: #10b981; color: #ffffff;
}

.playtoggle .i-play { display: none; }
.playtoggle[aria-pressed="false"] .i-play { display: block; }
.playtoggle[aria-pressed="false"] .i-pause { display: none; }

/* ---------- Main Gallery & Sidebar Architecture ---------- */
.gallery {
  scroll-margin-top: calc(var(--top-h) + 12px);
  padding-bottom: 72px;
}

/* Two-column layout on web/desktop view */
.gallery-container {
  display: grid;
  grid-template-columns: 290px minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

/* Left Sidebar for Module Packs */
.gallery-sidebar {
  position: sticky;
  top: calc(var(--top-h) + 18px);
  max-height: calc(100vh - var(--top-h) - 36px);
  overflow-y: auto;
  scrollbar-width: none;
}
.gallery-sidebar::-webkit-scrollbar { display: none; }

.sidebar-inner {
  border-radius: var(--radius-lg);
  padding: 18px 16px;
}
.sidebar-header {
  padding: 4px 6px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 12px;
}
.sidebar-tag {
  font: 700 11px var(--mono);
  letter-spacing: 0.12em;
  color: var(--accent-bright);
}
.sidebar-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin-top: 4px;
  letter-spacing: -0.02em;
}

/* Vertical pack list inside sidebar */
.sidebar-chips {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.sidebar-chips .chip {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font: 600 13px/1.35 var(--mono);
  letter-spacing: 0.01em;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.08);
}
.sidebar-chips .chip:hover {
  background: rgba(168, 85, 247, 0.1);
  border-color: rgba(168, 85, 247, 0.4);
  color: #ffffff;
  transform: translateX(3px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 0 16px rgba(168, 85, 247, 0.2);
}
.sidebar-chips .chip[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(147, 51, 234, 0.25));
  border-color: var(--accent);
  color: #ffffff;
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.35),
    0 0 20px var(--accent-glow);
}
.sidebar-chips .chip small {
  font: 700 11px var(--mono);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
}
.sidebar-chips .chip[aria-pressed="true"] small {
  background: rgba(168, 85, 247, 0.35);
  border-color: var(--accent-bright);
  color: #ffffff;
}

/* Right Content Area */
.gallery-main {
  min-width: 0;
}

/* Top Sticky Subcategories Bar & Search */
.tools {
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 24px;
}
.tools-in {
  display: flex; flex-direction: column; gap: 12px;
}
.tools-top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.subcat-hud-wrap {
  display: inline-flex; align-items: center; gap: 8px;
}
.subcat-indicator {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent-bright);
  box-shadow: 0 0 8px var(--accent);
}
.subcat-title {
  font: 700 11.5px var(--mono);
  letter-spacing: 0.1em;
  color: var(--accent-bright);
}

.chips-sub {
  display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  padding-top: 8px; border-top: 1px dashed rgba(255, 255, 255, 0.08);
}
.chips-sub::-webkit-scrollbar { display: none; }
.chips-sub .chip {
  flex: none;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  font: 600 12.5px/1.3 var(--mono);
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.15s;
}
.chips-sub .chip:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
.chips-sub .chip[aria-pressed="true"] {
  background: rgba(168, 85, 247, 0.25);
  border-color: var(--accent-bright);
  color: #fff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.tools-side {
  display: flex; align-items: center; gap: 10px; flex: none;
}
.search {
  display: flex; align-items: center; gap: 10px;
  width: 280px;
  border-radius: var(--radius-md);
  padding: 0 12px;
  color: var(--muted);
  transition: all 0.2s;
}
.liquid-glass-input {
  background: rgba(10, 8, 22, 0.85);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line-strong);
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}
.search:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 18px rgba(168, 85, 247, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
  outline: none;
}
.search input {
  flex: 1; min-width: 0;
  border: 0; background: transparent;
  padding: 8px 0;
  font: 13.5px var(--mono);
  color: #ffffff;
  outline: 0;
}
.search input::placeholder {
  color: var(--muted); opacity: 1; font-family: var(--font); font-size: 13px;
}
.search svg { flex: none; color: var(--muted); }
.search-kbd {
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.05);
  font: 700 11px var(--mono);
  color: var(--muted);
}

.gallery-meta {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: 10px 18px;
}
.count {
  font: 700 13px/1.5 var(--mono);
  letter-spacing: 0.04em;
  color: var(--accent-bright);
}
.count-tag {
  font: 700 11px var(--mono);
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* Pack Section Title - NO // as requested */
.pack {
  padding-block: 28px 36px;
  position: relative;
}
.pack + .pack {
  border-top: 1px solid var(--line);
}
.pack-h {
  display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px;
  margin-bottom: 24px;
}
.pack-h h3 {
  font-size: clamp(22px, 2.4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #ffffff;
}
.pack-h span {
  font: 700 13px var(--mono);
  color: var(--muted);
  padding: 3px 8px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}
.pack-h .pack-browse {
  margin-left: auto;
  font: 700 12.5px var(--mono);
  color: var(--accent-bright);
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--accent-dim);
  background: rgba(168, 85, 247, 0.08);
}
.pack-h .pack-browse:hover {
  background: var(--accent-dim);
  box-shadow: 0 0 14px var(--accent-glow);
}

/* ---------- Liquid Glass Tile Cards ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.tile-box {
  position: relative;
  min-width: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  background: rgba(12, 10, 24, 0.68);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: 
    inset 0 1px 1.5px 0 var(--glass-specular),
    0 16px 40px -15px rgba(0, 0, 0, 0.8);
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.tile-box:hover {
  border-color: var(--glass-border-hover);
  box-shadow: 
    inset 0 1px 2px 0 var(--glass-specular),
    0 20px 48px -10px rgba(0, 0, 0, 0.85),
    0 0 24px -4px rgba(168, 85, 247, 0.35);
  transform: translateY(-4px) scale(1.008);
}
.tile-box.is-picked {
  border-color: var(--accent-bright);
  box-shadow: 
    inset 0 1px 2px rgba(255, 255, 255, 0.4),
    0 0 26px rgba(168, 85, 247, 0.5);
}

.tile {
  display: block; text-decoration: none;
}
.tile:hover { color: inherit; }

.tile-stage {
  position: relative; display: block;
  background: var(--stage);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  overflow: hidden;
}
.tile-stage .fx-tile-frame {
  position: absolute; inset: 0; display: block; width: 100%; height: 100%;
  border: 0; background: var(--stage);
}
.tile-stage .mp-clip-frame { object-fit: contain; }
.tile canvas, .d-stage canvas { display: block; width: 100%; height: auto; }

/* Floating Liquid Pick Button */
.tile-pick {
  position: absolute; top: 10px; right: 10px; z-index: 10;
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(8, 6, 18, 0.88);
  backdrop-filter: blur(12px);
  color: var(--ink-dim);
  padding: 3px 11px 3px 5px;
  font: 700 11.5px/1.3 var(--mono);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.2), 0 2px 8px rgba(0, 0, 0, 0.4);
  transition: all 0.15s;
}
.tile-pick:hover {
  border-color: #ffffff; color: #ffffff;
}
.tile-pick[aria-pressed="true"] {
  border-color: var(--accent-bright);
  background: rgba(168, 85, 247, 0.25);
  color: #ffffff;
  box-shadow: 0 0 16px rgba(168, 85, 247, 0.5), inset 0 1px 1px rgba(255,255,255,0.4);
}
.pick-box {
  display: inline-grid; place-items: center;
  width: 17px; height: 17px; flex: none;
  border: 1.5px solid var(--line-strong);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.05);
  color: transparent;
  transition: all 0.15s;
}
[aria-pressed="true"] > .pick-box {
  background: var(--accent);
  border-color: var(--accent-bright);
  color: #ffffff;
  box-shadow: 0 0 10px var(--accent-glow);
}

.tile-cap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 12px;
  row-gap: 2px;
  align-items: baseline;
  padding: 14px 16px 16px;
}
.tile-id {
  font: 700 12px/1.4 var(--mono);
  color: var(--accent-bright);
  grid-row: span 2;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.12);
  border: 1px solid rgba(168, 85, 247, 0.3);
}
.tile-name {
  font-size: 15px; font-weight: 700; line-height: 1.35;
  color: #ffffff;
  letter-spacing: -0.01em;
}
.tile-sub {
  font-size: 13px; line-height: 1.45;
  color: #cbd5e1;
  font-weight: 400;
}
.tile.is-broken .tile-stage { display: grid; place-items: center; }
.empty {
  padding: 64px 0 96px;
  text-align: center;
  color: var(--muted);
  font: 15px var(--mono);
}

/* ---------- Workflow Section ---------- */
.how {
  padding-block: 100px 92px;
  border-top: 1px solid var(--line);
  margin-top: 48px;
  scroll-margin-top: var(--top-h);
  position: relative;
}
.section-tag {
  font: 700 12px var(--mono);
  letter-spacing: 0.12em;
  color: var(--accent-bright);
  margin-bottom: 12px;
}
.sec-h {
  font-size: clamp(32px, 4.2vw, 56px);
  line-height: 1.15;
  letter-spacing: -0.035em;
  font-weight: 800;
  color: #ffffff;
}
.sec-lead {
  margin-top: 16px;
  font-size: 17px;
  color: var(--ink-dim);
  max-width: 44em;
}

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.step-card {
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.step-card:hover {
  border-color: var(--glass-border-hover);
  transform: translateY(-3px);
  box-shadow: inset 0 1px 1.5px 0 var(--glass-specular), 0 20px 48px -12px rgba(0, 0, 0, 0.85);
}
.step-header {
  display: flex; align-items: baseline; justify-content: space-between;
}
.step-n {
  font: 800 44px/1 var(--mono);
  letter-spacing: -0.04em;
  color: var(--accent-bright);
  text-shadow: 0 0 20px var(--accent-glow);
}
.step-tag {
  font: 700 11px var(--mono);
  letter-spacing: 0.1em;
  color: var(--muted);
}
.step-card h3 {
  font-size: 19px; line-height: 1.35;
  font-weight: 700; color: #ffffff;
  margin-top: 18px;
}
.step-card p {
  margin-top: 10px; font-size: 14.5px; line-height: 1.65;
  color: var(--ink-dim);
}
.step-code {
  margin-top: 20px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: rgba(4, 5, 12, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.step-code code {
  font: 12.5px/1.5 var(--mono); color: #c084fc;
}

.how-more {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
}
.how-col {
  border-radius: var(--radius-lg);
  padding: 24px;
}
.how-col h3 {
  font-size: 17px; font-weight: 700; color: #ffffff;
}
.how-col p {
  margin-top: 12px; font-size: 14px; line-height: 1.65; color: var(--ink-dim);
}
.how-col p a { color: var(--accent-bright); }
.how-own {
  margin-top: 28px; font-size: 14px; color: var(--muted);
}
.how-own a { color: var(--accent-bright); text-decoration: underline; }
.how-own + .how-own { margin-top: 8px; }

.says {
  margin-top: 18px; display: grid; gap: 10px;
}
.says li {
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(5, 5, 14, 0.8);
  padding: 10px 14px;
  font: 13.5px/1.6 var(--mono);
  color: #d8b4fe;
}
.says li::before {
  content: "> "; color: var(--accent-bright); font-weight: 700;
}

/* ---------- Detail Modal (Inspector HUD in Liquid Glass) ---------- */
.detail {
  width: min(1120px, calc(100vw - 48px));
  max-width: none;
  max-height: calc(100dvh - 56px);
  padding: 0;
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: var(--radius-xl);
  background: rgba(10, 8, 22, 0.95);
  backdrop-filter: blur(32px) saturate(200%);
  -webkit-backdrop-filter: blur(32px) saturate(200%);
  color: var(--ink);
  overflow: auto;
  overscroll-behavior: contain;
  box-shadow: 
    inset 0 1px 2px 0 rgba(255, 255, 255, 0.3),
    0 24px 64px rgba(0, 0, 0, 0.9),
    0 0 40px rgba(168, 85, 247, 0.25);
}
.detail::backdrop {
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.detail[open] {
  animation: d-in 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes d-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.d-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 12px 18px 12px 24px;
  background: rgba(10, 8, 22, 0.96);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--line);
}
.d-id {
  display: flex; align-items: baseline; gap: 12px; min-width: 0;
  font: 700 14px/1.4 var(--mono);
}
#d-id {
  color: var(--accent-bright);
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.35);
}
.d-where {
  font: 600 13px/1.4 var(--mono);
  color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.d-nav {
  display: flex; gap: 4px; align-items: center; flex: none;
}
.icon-b {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink-dim);
  transition: all 0.15s;
}
.icon-b:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  color: #fff;
}
#d-play { margin-right: 8px; }

.d-body {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas:
    "stage side"
    "head side"
    "main side";
  grid-template-rows: auto auto 1fr;
  gap: 0 36px;
  padding: 28px 32px 36px;
}
.d-stage {
  grid-area: stage;
  background: var(--stage);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.8);
}
.d-stage.is-fx-live { height: 320px; }
.d-stage.is-shotcraft-live { height: clamp(340px, 50vh, 560px); }
.d-stage #d-fx-frame {
  display: block; width: 100%; height: 100%; border: 0; background: var(--stage);
}
.d-stage video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: var(--stage);
}
.d-stage.is-fx-live #d-canvas { display: none; }
.d-stage:not(.is-fx-live) #d-fx-frame { display: none; }

.d-head { grid-area: head; padding-top: 24px; }
.d-head h2 {
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 800;
  color: #ffffff;
}
.d-sub {
  color: var(--accent-bright);
  font: 600 13px var(--mono);
  margin-top: 6px;
}
.d-meaning {
  margin-top: 16px; font-size: 17px; font-weight: 600; color: #f8fafc;
}
.d-summary {
  margin-top: 10px; font-size: 15px; color: var(--ink-dim); line-height: 1.6;
}

.d-main { grid-area: main; }
.d-main h3 {
  margin-top: 26px; font: 700 12px var(--mono); letter-spacing: 0.1em;
  color: var(--accent-bright); text-transform: uppercase;
}
.d-main h3 + * { margin-top: 10px; }
.d-ask {
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: var(--radius-md);
  background: rgba(168, 85, 247, 0.08);
  padding: 12px 16px;
  font: 14px/1.65 var(--mono);
  color: #e9d5ff;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.15);
}
.d-spec li {
  position: relative; padding-left: 20px; font-size: 14.5px; line-height: 1.7; color: var(--ink-dim);
}
.d-spec li + li { margin-top: 6px; }
.d-spec li::before {
  content: ""; position: absolute; left: 2px; top: 0.72em; width: 6px; height: 6px;
  background: var(--accent-bright); box-shadow: 0 0 8px var(--accent);
}
#d-use { font-size: 14.5px; color: var(--ink-dim); line-height: 1.65; }
.d-tags {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 24px;
}
.d-tags li {
  font: 600 11.5px/1.4 var(--mono);
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.03);
}

.d-side {
  grid-area: side;
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
}
.d-side .btn-pick {
  width: 100%; justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line-strong);
}
.d-side .btn-main { width: 100%; justify-content: center; }
.d-side .btn:not(.btn-main) { width: 100%; justify-content: center; }

.d-prompt, .d-code pre {
  font: 12.5px/1.7 var(--mono);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(4, 3, 10, 0.95);
  padding: 14px 16px;
  overflow: auto;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.6);
}
.d-prompt {
  white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px;
  font-family: var(--mono); font-size: 12.5px; color: #e9d5ff;
}
.d-code { min-width: 0; }
.d-code summary {
  cursor: pointer; font: 700 12.5px var(--mono);
  color: var(--accent-bright); padding: 4px 0;
}
.d-code pre {
  margin-top: 8px; max-height: 320px; white-space: pre; tab-size: 2; color: #e2e8f0;
}
.d-links {
  display: flex; flex-wrap: wrap; gap: 6px 16px;
  font: 12.5px var(--mono); color: var(--muted);
}
.d-links a { color: var(--accent-bright); }

/* ---------- Liquid Glass Cockpit Selection Tray ---------- */
.tray {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  background: rgba(8, 6, 18, 0.94);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-top: 1px solid rgba(168, 85, 247, 0.4);
  box-shadow: 
    inset 0 1px 1.5px rgba(255, 255, 255, 0.25),
    0 -12px 36px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(168, 85, 247, 0.25);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
html.has-tray body { padding-bottom: var(--tray-h, 0px); }
html.has-tray { scroll-padding-bottom: calc(var(--tray-h, 0px) + 16px); }

.tray-in { padding-block: 12px 14px; }
.tray-top {
  display: flex; align-items: center; gap: 12px 16px;
}
.tray-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--accent-dim);
  border-radius: var(--radius-sm);
  background: rgba(168, 85, 247, 0.1);
  padding: 6px 12px;
  font: 700 13px var(--mono);
  color: var(--accent-bright);
  white-space: nowrap;
}
.tray-chev { transition: transform 0.15s; }
.tray-toggle[aria-expanded="true"] .tray-chev { transform: rotate(180deg); }
.tray-wait {
  flex: 1; min-width: 0; font: 13px var(--mono); color: var(--muted);
}
.tray-main {
  margin-left: auto; padding: 9px 20px; font-size: 13.5px;
}

.tray-body { margin-top: 10px; }
.tray-list {
  display: flex; flex-wrap: wrap; gap: 6px;
  max-height: 100px; overflow-y: auto; padding: 2px;
}
.tray-list li {
  display: inline-flex; align-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(18, 14, 32, 0.92);
  padding: 3px 4px 3px 6px;
  font: 12.5px var(--mono);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}
.tray-n {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent); color: #ffffff;
  font: 800 11px/1 var(--mono); flex: none;
}
.tray-name {
  display: inline-flex; align-items: baseline; gap: 6px;
  min-width: 0; padding: 2px 6px;
  text-decoration: none; color: #fff;
}
.tray-name:hover { color: var(--accent-bright); }
.tray-id { font: 700 11.5px var(--mono); color: var(--accent-bright); }
.tray-nm { max-width: 16em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tray-x {
  display: inline-grid; place-items: center;
  width: 24px; height: 24px; flex: none;
  border: 0; border-radius: 999px;
  background: transparent; color: var(--muted);
}
.tray-x:hover { background: rgba(255, 255, 255, 0.1); color: #fff; }
.tray-empty { font: 13px var(--mono); color: var(--muted); padding: 4px 0; }

.tray-row {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
  margin-top: 12px;
}
.tray-note {
  flex: 1 1 320px; display: flex; align-items: center; gap: 10px; min-width: 0;
}
.tray-note-l { font: 700 12px var(--mono); color: var(--muted); white-space: nowrap; }
.tray-note input {
  flex: 1; min-width: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: rgba(4, 3, 10, 0.9);
  padding: 7px 12px;
  font: 13.5px var(--mono); color: #ffffff;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.5);
}
.tray-note input::placeholder { color: var(--muted); opacity: 1; }
.tray-note input:focus-visible { border-color: var(--accent); }
.tray-acts { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Cyber Footer ---------- */
.foot {
  border-top: 1px solid var(--line);
  padding-block: 48px 64px;
  font-size: 13.5px;
  color: var(--muted);
  background: #020306;
}
.foot-in { display: grid; gap: 12px; }
.foot-brand {
  display: flex; align-items: center; gap: 14px; margin-bottom: 6px;
}
.foot-logo { height: 28px; width: auto; opacity: 0.9; }
.foot strong { color: #ffffff; }
.foot a { color: var(--ink-dim); }
.foot a:hover { color: var(--accent-bright); }
.foot-links {
  display: flex; flex-wrap: wrap; gap: 8px 20px;
  margin-block: 6px 10px; font: 13px var(--mono);
}
.foot-remove, .foot-thanks { font-size: 13px; line-height: 1.6; }

/* ---------- Responsive Layout Breakpoints ---------- */
@media (max-width: 1023px) {
  .gallery-container {
    display: block;
  }
  .gallery-sidebar {
    position: static;
    max-height: none;
    overflow: visible;
    margin-bottom: 24px;
  }
  .sidebar-inner {
    padding: 12px 14px;
  }
  .sidebar-header {
    display: none;
  }
  .sidebar-chips {
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  .sidebar-chips::-webkit-scrollbar { display: none; }
  .sidebar-chips .chip {
    flex: none;
    width: auto;
    border-radius: 999px;
    padding: 6px 14px;
  }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .how-more { grid-template-columns: minmax(0, 1fr); }
  .d-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "stage" "head" "side" "main";
    grid-template-rows: none;
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .wrap { padding-inline: 18px; }
  .top-how, .top-main { display: none; }
  .hero { padding-block: 48px 40px; }
  .logo-img { height: 38px; }
  .facts { grid-template-columns: 1fr; gap: 12px; }
  .tools-top { flex-direction: column; align-items: stretch; }
  .tools-side { width: 100%; }
  .search { flex: 1; width: auto; }
  .tiles { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .detail {
    width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-width: 1px 0 0;
  }
  .d-body { padding: 18px 18px 28px; }
  .tray-top { flex-wrap: wrap; }
  .tray-note { flex-basis: 100%; flex-direction: column; align-items: stretch; gap: 6px; }
  .tray-acts { width: 100%; }
  .tray-acts .btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
