:root,
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #060916;
  --bg-soft: #0d1326;
  --surface: rgba(15, 22, 38, 0.42);
  --surface-strong: rgba(18, 26, 46, 0.5);
  --surface-soft: rgba(10, 16, 30, 0.32);
  --text: #eef4ff;
  --muted: #90a1c1;
  --line: rgba(214, 231, 255, 0.08);
  --line-strong: rgba(160, 241, 255, 0.18);
  --accent: #86e7ff;
  --accent-strong: #c7f6ff;
  --accent-2: #ffe28a;
  --accent-soft: rgba(115, 224, 255, 0.14);
  --warm-soft: rgba(255, 226, 138, 0.12);
  --action-bg: linear-gradient(120deg, var(--accent), #63f0ff 55%, var(--accent-2));
  --action-bg-hover: linear-gradient(120deg, #a6efff, #76f2ff 55%, #ffeba8);
  --action-text: #0a111d;
  --action-border: rgba(255, 255, 255, 0.34);
  --action-shadow: 0 12px 26px rgba(8, 126, 164, 0.22), 0 0 34px rgba(134, 231, 255, 0.12);
  --action-shadow-hover: 0 16px 32px rgba(8, 126, 164, 0.28), 0 0 42px rgba(134, 231, 255, 0.18);
  --success: #7df0c0;
  --danger: #ff907e;
  --shadow: 0 34px 96px rgba(0, 0, 0, 0.46);
  --glass-highlight: rgba(255, 255, 255, 0.14);
  --glass-shadow: rgba(4, 9, 20, 0.48);
  --page-background:
    linear-gradient(180deg, #071225 0%, #051020 56%, #030915 100%);
  --page-stars-opacity: 0.98;
  --page-nebula-opacity: 0;
  --canvas-opacity: 1;
  --nav-bg:
    linear-gradient(180deg, rgba(18, 27, 48, 0.62), rgba(7, 12, 23, 0.36)),
    rgba(10, 16, 30, 0.42);
  --nav-shell: rgba(255, 255, 255, 0.05);
  --nav-link: rgba(235, 241, 255, 0.72);
  --nav-hover: rgba(255, 255, 255, 0.07);
  --field-bg: rgba(11, 16, 30, 0.46);
  --image-bg: linear-gradient(135deg, #10182f, #0b1020);
  --panel-bg:
    linear-gradient(180deg, rgba(23, 31, 55, 0.58), rgba(10, 15, 28, 0.36)),
    var(--surface);
  --card-bg:
    linear-gradient(180deg, rgba(22, 30, 52, 0.58), rgba(9, 14, 27, 0.34)),
    var(--surface-strong);
  --status-bg:
    linear-gradient(180deg, rgba(28, 37, 64, 0.54), rgba(12, 18, 32, 0.34)),
    var(--surface-strong);
  --hint-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    linear-gradient(135deg, rgba(115, 224, 255, 0.06), rgba(126, 122, 255, 0.07));
  --callout-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025)),
    linear-gradient(135deg, rgba(115, 224, 255, 0.06), rgba(126, 122, 255, 0.08));
  --panel-sheen:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.025) 28%, transparent 48%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.035), transparent 58%);
  --chip-bg: rgba(255, 255, 255, 0.04);
  --chip-text: #d8ecff;
  --soft-action-bg: rgba(255, 255, 255, 0.05);
  --soft-action-text: #d7ecff;
  --tab-text: #cce4ff;
  --row-bg: rgba(255, 255, 255, 0.04);
  --hero-sheen: linear-gradient(118deg, transparent 0 42%, rgba(134, 231, 255, 0.12) 52%, rgba(255, 226, 138, 0.08) 66%, transparent 82%);
  --elevated-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 -1px 0 rgba(255, 255, 255, 0.02),
    0 20px 34px rgba(0, 0, 0, 0.22);
  --status-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 22px 42px rgba(0, 0, 0, 0.24);
  --control-shadow: 0 16px 32px rgba(0, 0, 0, 0.26);
  --control-hover-shadow: 0 22px 40px rgba(0, 0, 0, 0.34);
  --radius-xl: 22px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f7fbff;
  --bg-soft: #eaf5ff;
  --surface: rgba(255, 255, 255, 0.62);
  --surface-strong: rgba(255, 255, 255, 0.76);
  --surface-soft: rgba(245, 251, 255, 0.58);
  --text: #142235;
  --muted: #617086;
  --line: rgba(30, 76, 110, 0.12);
  --line-strong: rgba(8, 126, 164, 0.24);
  --accent: #087ea4;
  --accent-strong: #05627f;
  --accent-2: #a8864d;
  --accent-soft: rgba(8, 126, 164, 0.12);
  --warm-soft: rgba(168, 134, 77, 0.1);
  --action-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.86) 0%, rgba(217, 237, 248, 0.84) 48%, rgba(239, 229, 204, 0.78) 100%);
  --action-bg-hover: linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(202, 229, 244, 0.9) 48%, rgba(245, 233, 206, 0.86) 100%);
  --action-text: #1d3448;
  --action-border: rgba(69, 125, 163, 0.25);
  --action-shadow: 0 10px 22px rgba(61, 103, 139, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.86);
  --action-shadow-hover: 0 14px 28px rgba(61, 103, 139, 0.18), 0 0 24px rgba(102, 166, 204, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.94);
  --success: #117b58;
  --danger: #c84c3d;
  --shadow: 0 28px 72px rgba(39, 75, 107, 0.16);
  --glass-highlight: rgba(255, 255, 255, 0.74);
  --glass-shadow: rgba(54, 91, 124, 0.2);
  --page-background:
    linear-gradient(180deg, #fbfdff 0%, #eef7ff 42%, #f8fbf7 100%);
  --page-stars-opacity: 0.28;
  --page-nebula-opacity: 0;
  --canvas-opacity: 0;
  --nav-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.48)),
    rgba(236, 247, 255, 0.46);
  --nav-shell: rgba(255, 255, 255, 0.58);
  --nav-link: rgba(27, 44, 66, 0.7);
  --nav-hover: rgba(8, 126, 164, 0.08);
  --field-bg: rgba(255, 255, 255, 0.74);
  --image-bg: linear-gradient(135deg, #e9f5ff, #f8fbff);
  --panel-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(247, 252, 255, 0.64)),
    var(--surface);
  --card-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 248, 255, 0.7)),
    var(--surface-strong);
  --status-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(239, 248, 255, 0.66)),
    var(--surface-strong);
  --hint-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(243, 250, 255, 0.56)),
    linear-gradient(135deg, rgba(8, 126, 164, 0.07), rgba(255, 202, 101, 0.08));
  --callout-bg:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(243, 250, 255, 0.58)),
    linear-gradient(135deg, rgba(8, 126, 164, 0.08), rgba(87, 190, 167, 0.07));
  --panel-sheen:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(255, 255, 255, 0.16) 34%, transparent 62%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.24), transparent 62%);
  --chip-bg: rgba(8, 126, 164, 0.08);
  --chip-text: #25455e;
  --soft-action-bg: rgba(255, 255, 255, 0.68);
  --soft-action-text: #25455e;
  --tab-text: #365066;
  --row-bg: rgba(255, 255, 255, 0.66);
  --hero-sheen: linear-gradient(118deg, transparent 0 42%, rgba(8, 126, 164, 0.08) 52%, rgba(168, 134, 77, 0.08) 66%, transparent 82%);
  --elevated-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.76),
    inset 0 -1px 0 rgba(255, 255, 255, 0.28),
    0 18px 36px rgba(39, 75, 107, 0.13);
  --status-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 16px 32px rgba(39, 75, 107, 0.12);
  --control-shadow: 0 14px 30px rgba(39, 75, 107, 0.12);
  --control-hover-shadow: 0 18px 34px rgba(39, 75, 107, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Manrope", "Noto Sans SC", "Segoe UI", sans-serif;
  background: var(--page-background);
  overflow-x: hidden;
  position: relative;
  isolation: isolate;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -2;
}

#starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  display: block;
  opacity: var(--canvas-opacity);
  pointer-events: none;
  transition: opacity 0.72s ease, filter 0.72s ease;
}

:root[data-theme="light"]:not(.theme-switching) #starfield {
  visibility: hidden;
}

body::before {
  background-image:
    radial-gradient(2px 2px at 8% 14%, rgba(255, 255, 255, 0.92), transparent 58%),
    radial-gradient(3px 3px at 13% 44%, rgba(157, 244, 255, 0.88), transparent 58%),
    radial-gradient(2px 2px at 19% 76%, rgba(255, 255, 255, 0.86), transparent 58%),
    radial-gradient(1px 1px at 27% 28%, rgba(255, 255, 255, 0.8), transparent 58%),
    radial-gradient(2px 2px at 32% 62%, rgba(115, 224, 255, 0.88), transparent 58%),
    radial-gradient(1px 1px at 38% 18%, rgba(255, 255, 255, 0.82), transparent 58%),
    radial-gradient(3px 3px at 44% 36%, rgba(157, 244, 255, 0.92), transparent 58%),
    radial-gradient(2px 2px at 52% 72%, rgba(255, 255, 255, 0.86), transparent 58%),
    radial-gradient(1px 1px at 58% 22%, rgba(255, 255, 255, 0.78), transparent 58%),
    radial-gradient(2px 2px at 64% 84%, rgba(115, 224, 255, 0.86), transparent 58%),
    radial-gradient(3px 3px at 71% 34%, rgba(157, 244, 255, 0.94), transparent 58%),
    radial-gradient(1px 1px at 78% 18%, rgba(255, 255, 255, 0.78), transparent 58%),
    radial-gradient(2px 2px at 83% 58%, rgba(255, 255, 255, 0.84), transparent 58%),
    radial-gradient(3px 3px at 89% 12%, rgba(157, 244, 255, 0.9), transparent 58%),
    radial-gradient(2px 2px at 93% 74%, rgba(115, 224, 255, 0.88), transparent 58%),
    radial-gradient(1px 1px at 96% 42%, rgba(255, 255, 255, 0.8), transparent 58%),
    radial-gradient(1px 1px at 6% 58%, rgba(255, 255, 255, 0.78), transparent 58%),
    radial-gradient(2px 2px at 36% 88%, rgba(157, 244, 255, 0.82), transparent 58%),
    radial-gradient(1px 1px at 68% 8%, rgba(255, 255, 255, 0.72), transparent 58%);
  animation: starDrift 24s linear infinite, twinkle 8s ease-in-out infinite alternate;
  opacity: var(--page-stars-opacity);
  filter: drop-shadow(0 0 4px rgba(157, 244, 255, 0.25));
}

body::after {
  background: none;
  opacity: var(--page-nebula-opacity);
  animation: none;
}

.page-shell::before,
.page-shell::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.page-shell::before {
  display: none;
}

.page-shell::after {
  background-image:
    radial-gradient(1px 1px at 16% 22%, rgba(255, 255, 255, 0.32), transparent 60%),
    radial-gradient(1px 1px at 22% 68%, rgba(157, 244, 255, 0.26), transparent 60%),
    radial-gradient(1px 1px at 40% 46%, rgba(255, 255, 255, 0.28), transparent 60%),
    radial-gradient(1px 1px at 56% 74%, rgba(157, 244, 255, 0.22), transparent 60%),
    radial-gradient(1px 1px at 74% 38%, rgba(255, 255, 255, 0.24), transparent 60%),
    radial-gradient(1px 1px at 84% 58%, rgba(157, 244, 255, 0.22), transparent 60%);
  opacity: 0.9;
  filter: blur(0.3px);
  animation: particleFlow 18s linear infinite;
}

img {
  display: block;
  width: 100%;
  border-radius: 18px;
  background: var(--image-bg);
  object-fit: cover;
}

button,
input,
select {
  font: inherit;
}

.site-topbar,
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  padding: 10px clamp(12px, 3vw, 28px);
  border-bottom: 1px solid var(--line);
  background: var(--nav-bg);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(22px) saturate(145%);
  -webkit-backdrop-filter: blur(22px) saturate(145%);
}

.site-nav,
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(100%, 1160px);
  min-height: 54px;
  margin: 0 auto;
  padding: 0;
}

.site-logo,
.logo {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
  transition: color 180ms ease, text-shadow 180ms ease;
}

.site-logo:hover,
.logo:hover {
  color: var(--accent-strong);
  text-shadow: 0 0 18px rgba(115, 224, 255, 0.36);
}

.site-nav-links,
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--nav-shell);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 14px 28px rgba(0, 0, 0, 0.18);
}

.site-nav-links a,
.nav-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--nav-link);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.site-nav-links a:hover,
.nav-links a:hover {
  color: var(--text);
  background: var(--nav-hover);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.site-nav-links a.is-active,
.nav-links a.is-active,
.nav-link.is-active {
  color: var(--action-text);
  background: var(--action-bg);
  border-color: var(--action-border);
  box-shadow: var(--action-shadow);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--nav-shell);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
  cursor: pointer;
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
  backdrop-filter: blur(18px) saturate(130%);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--nav-hover);
}

.theme-toggle-icon {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 34% 32%, #fff 0 24%, #ffe28a 25% 64%, transparent 65%);
  box-shadow: 0 0 16px rgba(255, 226, 138, 0.42);
}

:root[data-theme="light"] .theme-toggle-icon {
  background: radial-gradient(circle at 62% 38%, transparent 0 33%, #1c385c 34% 66%, transparent 67%);
  box-shadow: 0 0 14px rgba(8, 126, 164, 0.26);
}

.page-shell {
  position: relative;
  z-index: 1;
  width: min(100vw - 40px, 1220px);
  margin: 0 auto;
  padding: 22px 0 42px;
}

.hero,
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(30px) saturate(130%);
  -webkit-backdrop-filter: blur(30px) saturate(130%);
}

.hero::before,
.panel::before,
.status-card::before,
.preview-card::before,
.hint-box::before,
.stat-card::before,
.focus-card::before,
.image-card::before,
.metric-card::before,
.empty-state::before,
.glass-callout::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    var(--panel-sheen);
  opacity: 0.56;
}

.hero,
.panel,
.status-card,
.preview-card,
.hint-box,
.stat-card,
.focus-card,
.image-card,
.metric-card,
.empty-state,
.glass-callout {
  position: relative;
  overflow: hidden;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.58fr);
  gap: 22px;
  padding: clamp(24px, 4vw, 36px);
  border-radius: var(--radius-xl);
  margin-bottom: 18px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--hero-sheen);
  opacity: 0.86;
  transform: translateX(8%);
}

.hero-copy {
  position: relative;
  z-index: 1;
}

.hero-kicker {
  margin: 0 0 12px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

h1,
h2,
h3 {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 4.6vw, 58px);
  line-height: 1.08;
  max-width: 15ch;
}

.hero-desc,
.panel-title p,
.status-row span,
.preview-empty,
.stat-card small,
.hint-box p,
.card-text,
#status-text,
.empty-copy p {
  color: var(--muted);
}

.hero-desc {
  max-width: 62rem;
  margin: 18px 0 0;
  font-size: 16px;
  line-height: 1.75;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.primary-link,
.soft-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.primary-link {
  border: 1px solid var(--action-border);
  color: var(--action-text);
  background: var(--action-bg);
  box-shadow: var(--action-shadow);
}

.soft-link {
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--soft-action-bg);
}

.primary-link:hover,
.soft-link:hover {
  transform: translateY(-1px);
}

.primary-link:hover {
  background: var(--action-bg-hover);
  box-shadow: var(--action-shadow-hover);
}

.soft-link:hover {
  border-color: var(--line-strong);
  background: var(--nav-hover);
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.tag,
.summary-chip,
.card-link,
.ghost-button,
.tab-button {
  font-family: "IBM Plex Mono", monospace;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--chip-bg);
  border: 1px solid var(--line);
  color: var(--chip-text);
  font-size: 12px;
}

.hero-status {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
}

.status-card {
  border-radius: var(--radius-lg);
  background: var(--status-bg);
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: var(--status-shadow);
}

.status-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
}

.status-row + .status-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.status-row strong {
  color: var(--accent-strong);
  text-align: right;
}

.status-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 16px rgba(115, 224, 255, 0.85);
  animation: pulse 2s ease-in-out infinite;
}

.status-steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  display: grid;
  gap: 8px;
}

.demo-quickbar {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.demo-quickbar article {
  display: grid;
  gap: 7px;
  min-height: 118px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  box-shadow: var(--elevated-shadow);
  backdrop-filter: blur(22px) saturate(130%);
  -webkit-backdrop-filter: blur(22px) saturate(130%);
}

.demo-quickbar span {
  color: var(--muted);
  font-size: 13px;
}

.demo-quickbar strong {
  font-size: clamp(20px, 2vw, 26px);
}

.demo-quickbar small {
  color: var(--muted);
  line-height: 1.55;
}

.workspace-layout {
  display: grid;
  grid-template-columns: minmax(320px, 374px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.control-column,
.content-column {
  min-width: 0;
}

.panel {
  border-radius: var(--radius-xl);
  padding: clamp(18px, 2.4vw, 24px);
}

.panel-sticky {
  position: sticky;
  top: 92px;
}

.content-panel {
  min-height: calc(100vh - 170px);
}

.panel-title {
  margin-bottom: 18px;
}

.panel-title p {
  margin: 8px 0 0;
  line-height: 1.65;
}

.control-form {
  display: grid;
  gap: 15px;
}

.field {
  display: grid;
  gap: 10px;
}

.field span {
  font-size: 14px;
}

.field-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.field-value {
  font-size: 12px;
  color: var(--accent-strong);
}

input[type="file"],
select {
  width: 100%;
  padding: 14px 15px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--field-bg);
  color: var(--text);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  backdrop-filter: blur(20px) saturate(125%);
  -webkit-backdrop-filter: blur(20px) saturate(125%);
}

input[type="file"]::file-selector-button {
  margin-right: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-strong);
  border-radius: 999px;
  padding: 8px 12px;
}

select:focus,
input[type="file"]:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(115, 224, 255, 0.08);
  transform: translateY(-1px);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

.preview-card,
.hint-box,
.stat-card,
.focus-card,
.image-card,
.metric-card,
.empty-state {
  border-radius: var(--radius-lg);
  background: var(--card-bg);
  border: 1px solid var(--line);
  box-shadow: var(--elevated-shadow);
}

.preview-card {
  padding: 14px;
}

.preview-head,
.card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.preview-image {
  margin-top: 12px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 10px;
  animation: fadeUp 420ms ease both;
}

.preview-empty {
  margin: 12px 0 4px;
  font-size: 14px;
}

.ghost-button,
.card-link {
  border: 1px solid var(--line);
  background: var(--soft-action-bg);
  color: var(--soft-action-text);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  text-decoration: none;
  transition: border-color 180ms ease, transform 180ms ease, background 180ms ease;
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.ghost-button:hover,
.card-link:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: rgba(115, 224, 255, 0.06);
}

.hint-box {
  padding: 14px 16px;
  background: var(--hint-bg);
}

.hint-box summary {
  cursor: pointer;
  color: var(--accent-strong);
  font-weight: 600;
  list-style: none;
}

.hint-box summary::-webkit-details-marker {
  display: none;
}

.hint-box p {
  margin: 12px 0 0;
  line-height: 1.55;
}

.primary-button {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--action-border);
  padding: 15px 18px;
  border-radius: 999px;
  background: var(--action-bg);
  color: var(--action-text);
  font-weight: 700;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
  box-shadow: var(--action-shadow);
  backdrop-filter: blur(18px) saturate(125%);
  -webkit-backdrop-filter: blur(18px) saturate(125%);
}

.button-label,
.button-glow {
  position: relative;
  z-index: 1;
}

.button-glow {
  position: absolute;
  inset: -40%;
  z-index: 0;
  background: radial-gradient(circle, rgba(115, 224, 255, 0.26), transparent 60%);
  transform: translateX(-45%);
  transition: transform 260ms ease;
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-2px);
  background: var(--action-bg-hover);
  box-shadow: var(--action-shadow-hover);
}

.primary-button:hover:not(:disabled) .button-glow {
  transform: translateX(10%);
}

.primary-button:disabled {
  opacity: 0.72;
  cursor: progress;
}

.empty-state {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 26px;
  align-items: center;
  padding: 28px;
  min-height: 340px;
}

.empty-visual {
  position: relative;
  width: 160px;
  height: 160px;
  margin: 0 auto;
}

.empty-ring,
.empty-core {
  position: absolute;
  inset: 0;
  margin: auto;
  border-radius: 50%;
}

.empty-ring {
  border: 1px solid rgba(115, 224, 255, 0.26);
}

.ring-1 {
  width: 160px;
  height: 160px;
  animation: spin 16s linear infinite;
}

.ring-2 {
  width: 110px;
  height: 110px;
  animation: spinReverse 10s linear infinite;
}

.empty-core {
  width: 44px;
  height: 44px;
  background: radial-gradient(circle, rgba(157, 244, 255, 0.9), rgba(115, 224, 255, 0.18));
  box-shadow: 0 0 26px rgba(115, 224, 255, 0.5);
}

.empty-copy h3 {
  font-size: 28px;
  margin-bottom: 10px;
}

.empty-copy p {
  margin: 0;
  max-width: 42rem;
  line-height: 1.75;
}

.summary-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.summary-chip {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--chip-bg);
  color: var(--chip-text);
  border: 1px solid var(--line);
  font-size: 12px;
  animation: fadeUp 360ms ease both;
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.summary-chip.success {
  border-color: rgba(125, 240, 192, 0.24);
  color: var(--success);
  background: rgba(125, 240, 192, 0.08);
}

.result-shell {
  animation: fadeUp 500ms ease both;
}

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

.stat-card,
.focus-card,
.image-card,
.metric-card {
  padding: 18px;
}

.stat-card {
  display: grid;
  gap: 6px;
  min-height: 136px;
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
}

.stat-card strong {
  font-size: clamp(24px, 2.2vw, 34px);
}

.result-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
  margin-bottom: 18px;
}

.tab-button {
  border: 1px solid var(--line);
  background: var(--chip-bg);
  color: var(--tab-text);
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.tab-button:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
}

.tab-button.is-active {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(115, 224, 255, 0.08);
  border-color: rgba(115, 224, 255, 0.3);
  color: var(--accent-strong);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
  animation: fadeUp 360ms ease both;
}

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

.focus-card {
  display: grid;
  gap: 10px;
  min-height: 168px;
}

.focus-card strong {
  font-size: clamp(24px, 2.4vw, 36px);
  line-height: 1.08;
}

.focus-card small {
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
}

.focus-card.accent {
  border-color: rgba(115, 224, 255, 0.22);
  background: linear-gradient(180deg, rgba(115, 224, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.focus-label {
  font-size: 13px;
  color: var(--muted);
}

.overview-details,
.prediction-grid,
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.card-text {
  margin: 14px 0 0;
  line-height: 1.7;
}

.gallery-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}

.glass-callout {
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  background: var(--callout-bg);
  border: 1px solid var(--line);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 18px 30px rgba(0, 0, 0, 0.18);
}

.glass-callout strong {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.glass-callout p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.download-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

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

.image-card img {
  margin-top: 14px;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  padding: 12px;
  transition: transform 220ms ease, box-shadow 220ms ease, filter 220ms ease;
}

.image-card:hover img {
  transform: translateY(-2px);
  box-shadow: 0 20px 36px rgba(0, 0, 0, 0.24);
  filter: saturate(1.05) brightness(1.02);
}

.prediction-list {
  list-style: none;
  padding: 0;
  margin: 14px 0 0;
  display: grid;
  gap: 10px;
}

.prediction-list li,
.detail-list div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--row-bg);
  border: 1px solid rgba(140, 168, 255, 0.08);
  backdrop-filter: blur(16px) saturate(120%);
  -webkit-backdrop-filter: blur(16px) saturate(120%);
}

.prediction-rank {
  min-width: 34px;
  color: var(--accent-strong);
  font-size: 12px;
}

.prediction-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prediction-score,
.detail-list dd {
  margin: 0;
  color: var(--accent-strong);
  font-family: "IBM Plex Mono", monospace;
}

.detail-list {
  margin: 14px 0 0;
}

.detail-list dt {
  color: var(--muted);
}

.detail-list div + div {
  margin-top: 10px;
}

.hidden {
  display: none !important;
}

.reveal {
  animation: fadeUp 520ms ease both;
}

.reveal-delay-1 {
  animation-delay: 60ms;
}

.reveal-delay-2 {
  animation-delay: 140ms;
}

.reveal-delay-3 {
  animation-delay: 220ms;
}

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

@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
}

@keyframes starDrift {
  from {
    transform: translateY(0);
  }
  50% {
    transform: translateY(8px);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes twinkle {
  0% {
    opacity: 0.72;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.84;
  }
}

@keyframes nebulaFlow {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(-18px, 10px, 0) scale(1.03);
  }
  100% {
    transform: translate3d(12px, -8px, 0) scale(1.01);
  }
}

@keyframes lightBandFlow {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.7;
  }
  50% {
    transform: translate3d(18px, -10px, 0) scale(1.02);
    opacity: 1;
  }
  100% {
    transform: translate3d(-12px, 8px, 0) scale(1.01);
    opacity: 0.82;
  }
}

@keyframes particleFlow {
  from {
    transform: translate3d(0, 0, 0);
  }
  to {
    transform: translate3d(-18px, 10px, 0);
  }
}

@keyframes orbFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-18px, -14px, 0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes spinReverse {
  from {
    transform: rotate(360deg);
  }
  to {
    transform: rotate(0deg);
  }
}

@media (max-width: 1420px) {
  .page-shell {
    width: min(100vw - 28px, 1220px);
  }

  .workspace-layout {
    grid-template-columns: minmax(310px, 340px) minmax(0, 1fr);
  }
}

@media (max-width: 1200px) {
  .hero,
  .demo-quickbar,
  .workspace-layout,
  .stats-grid,
  .overview-grid,
  .overview-details,
  .prediction-grid,
  .metrics-grid,
  .image-grid,
  .gallery-tools {
    grid-template-columns: 1fr;
  }

  .panel-sticky {
    position: static;
  }

  .content-panel {
    min-height: auto;
  }

  h1 {
    max-width: none;
  }
}

@media (max-width: 760px) {
  .site-topbar,
  .site-header {
    padding: 8px 10px;
  }

  .site-nav,
  .nav {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px 10px;
    min-height: auto;
  }

  .site-logo,
  .logo {
    grid-column: 1;
    grid-row: 1;
    min-height: 34px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
  }

  .site-nav-links,
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    width: 100%;
    gap: 6px;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    justify-content: flex-start;
    padding: 0;
    border-color: transparent;
    border-radius: 0;
    background: transparent;
    scrollbar-width: none;
    box-shadow: none;
  }

  .site-nav-links::-webkit-scrollbar,
  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .site-nav-links a,
  .nav-links a {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.84rem;
  }

  .theme-toggle {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: center;
    width: 38px;
    min-width: 38px;
    min-height: 38px;
    padding: 0;
  }

  .theme-toggle-text {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    border: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
  }

  .page-shell {
    width: min(100vw - 16px, 1220px);
    padding-top: 10px;
  }

  .hero,
  .panel {
    padding: 18px;
  }

  h1 {
    font-size: clamp(30px, 11vw, 42px);
  }

  .hero-actions,
  .download-row,
  .result-tabs {
    gap: 8px;
  }

  .primary-link,
  .soft-link,
  .tab-button,
  .card-link,
  .ghost-button {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    text-align: center;
  }

  .demo-quickbar article {
    min-height: auto;
    padding: 14px 16px;
  }

  .empty-state {
    grid-template-columns: 1fr;
    text-align: left;
    padding: 22px;
  }

  .empty-visual {
    width: 130px;
    height: 130px;
  }

  .ring-1 {
    width: 130px;
    height: 130px;
  }

  .ring-2 {
    width: 90px;
    height: 90px;
  }
}
