/* ============ Lumina Upscale — dark optical theme ============ */
:root {
  --bg: #0b0d10;
  --bg-raise: #12151a;
  --ink: #e8e6df;
  --ink-dim: #8a8f98;
  --accent: #f5b942;
  --accent-deep: #d99a1e;
  --line: rgba(232, 230, 223, 0.1);
  --radius: 18px;
  --font-display: "Fraunces", serif;
  --font-body: "Outfit", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* atmosphere */
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 50; opacity: 0.5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.04 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}
.glow { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.glow-1 { width: 560px; height: 560px; top: -180px; right: -120px; background: radial-gradient(circle, rgba(245,185,66,0.14), transparent 70%); }
.glow-2 { width: 480px; height: 480px; bottom: -160px; left: -140px; background: radial-gradient(circle, rgba(90,130,200,0.10), transparent 70%); }

main, header, footer { position: relative; z-index: 1; }
section { max-width: 1080px; margin: 0 auto; padding: 72px 24px; }

/* ============ header ============ */
.site-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 20px 28px; max-width: 1080px; margin: 0 auto;
  position: relative; z-index: 90; /* 语言下拉菜单不被 main 区遮挡 */
}
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--accent); position: relative;
}
.logo-mark::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--accent);
}
.logo-text { font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: 0.01em; }
.logo-text em { font-style: normal; color: var(--accent); }
.header-right { display: flex; align-items: center; gap: 14px; }
.nav-link {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--ink-dim); text-decoration: none; font-size: 14px;
  transition: color 0.2s;
}
.nav-link:hover { color: var(--accent); }
@media (max-width: 720px) {
  .nav-link { display: none; } /* 移动端顶栏空间有限，FAQ 由页面内滚动到达 */
}

/* language */
.lang-wrap { position: relative; }
.lang-btn {
  display: flex; align-items: center; gap: 7px;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-dim); padding: 7px 14px; cursor: pointer;
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em;
  transition: border-color 0.2s, color 0.2s;
}
.lang-btn:hover { border-color: var(--accent); color: var(--ink); }
.lang-menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 170px;
  background: var(--bg-raise); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px; display: none; z-index: 60;
  box-shadow: 0 18px 50px rgba(0,0,0,0.5);
}
.lang-menu.open { display: block; animation: fadeUp 0.18s ease both; }
.lang-menu button {
  display: flex; justify-content: space-between; width: 100%;
  background: none; border: 0; color: var(--ink-dim); cursor: pointer;
  padding: 8px 12px; border-radius: 9px; font-size: 13.5px; font-family: var(--font-body);
  text-align: left;
}
.lang-menu button:hover { background: rgba(245,185,66,0.08); color: var(--ink); }
.lang-menu button.active { color: var(--accent); }
.lang-menu button span { font-family: var(--font-mono); font-size: 11px; opacity: 0.6; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 500; font-size: 15px;
  border-radius: 999px; padding: 13px 30px; cursor: pointer;
  border: 1px solid transparent; text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s;
}
.btn-primary {
  background: var(--accent); color: #161006;
  box-shadow: 0 6px 28px rgba(245,185,66,0.25);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 34px rgba(245,185,66,0.35); }
.btn-primary:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: transparent; border-color: var(--accent); color: var(--accent);
}
.btn-ghost:hover { background: rgba(245,185,66,0.1); }
.btn-text { background: none; border: 0; color: var(--ink-dim); font-weight: 400; padding: 13px 14px; }
.btn-text:hover { color: var(--ink); }
.btn-sm { padding: 8px 18px; font-size: 13.5px; }

/* ============ hero ============ */
.hero-split {
  display: grid; grid-template-columns: 1fr 1fr; align-items: center;
  gap: clamp(28px, 5vw, 64px); padding-top: 56px;
}
.hero-eyebrow {
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent);
  animation: fadeUp 0.7s 0.1s ease both;
}
.hero-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(38px, 5.5vw, 62px); line-height: 1.05; letter-spacing: -0.015em;
  margin: 18px 0 20px;
  animation: fadeUp 0.8s 0.2s ease both;
}
.hero-title-accent {
  font-style: italic; font-weight: 400;
  background: linear-gradient(105deg, var(--accent) 20%, #f7d68a 55%, var(--accent-deep) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub {
  max-width: 480px; color: var(--ink-dim); font-size: 16.5px;
  animation: fadeUp 0.8s 0.32s ease both;
}
.hero-demo { animation: fadeUp 0.9s 0.4s ease both; }

/* ============ demo compare sliders ============ */
.compare.demo-compare {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  background: #08090b;
}
.demo-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
  max-width: 900px; margin: 0 auto;
}
.demo-item { margin: 0; }
.demo-item figcaption {
  text-align: center; color: var(--ink-dim); font-size: 13.5px; margin-top: 12px;
}
.demo-note {
  text-align: center; font-family: var(--font-mono); font-size: 11px;
  color: var(--ink-dim); opacity: 0.6; margin-top: 32px;
}

/* ============ tool ============ */
.tool-section { padding-top: 28px; }
.tool-card {
  background: var(--bg-raise);
  border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px);
  padding: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.45);
  animation: fadeUp 0.9s 0.55s ease both;
}
.dropzone {
  border: 1.5px dashed rgba(232,230,223,0.28); border-radius: 14px;
  padding: 34px 24px; display: flex; align-items: center; justify-content: center;
  gap: 10px; cursor: pointer; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.dropzone:hover, .dropzone:focus-visible, .dropzone.dragover {
  border-color: var(--accent); background: rgba(245,185,66,0.04);
}
.dz-plus { color: var(--accent); flex-shrink: 0; }
.dz-title { font-size: 16.5px; font-weight: 500; color: var(--ink); }

/* ============ 全屏工作台弹框 ============ */
.workspace-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: var(--bg);
  display: flex; flex-direction: column;
  animation: fadeUp 0.25s ease both;
  overflow-y: auto;
}
.workspace-overlay[hidden] { display: none; }
.workspace-topbar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 22px; border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-btn {
  display: none; align-items: center; gap: 6px;
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  color: var(--ink-dim); padding: 8px 14px; cursor: pointer;
  font-family: var(--font-body); font-size: 13px;
}
.history-head { display: flex; justify-content: space-between; align-items: center; }
.topbar-brand { font-family: var(--font-display); font-size: 17px; }
.topbar-brand em { font-style: normal; color: var(--accent); }
.topbar-close {
  width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent;
  color: var(--ink-dim); font-size: 20px; cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.topbar-close:hover { border-color: var(--accent); color: var(--ink); }
.workspace-body { flex: 1; padding: 20px; }

.workspace {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: 300px minmax(0, 1fr) 230px;
  gap: 20px;
  width: 100%; max-width: 1400px; margin: 0 auto; padding: 22px;
}
/* 左控制面板 */
.panel {
  background: #0d1014; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; display: flex; flex-direction: column; gap: 18px;
  overflow-y: auto; min-height: 0; max-height: 100%;
}
.panel-block { display: flex; flex-direction: column; gap: 10px; }
.panel-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--ink-dim);
  display: flex; justify-content: space-between; align-items: baseline;
}
.factor-label { color: var(--accent); font-size: 13px; }
.thumb-row { display: flex; }
.thumb-wrap { position: relative; width: 96px; height: 96px; }
.thumb-wrap img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px;
  border: 1px solid var(--line);
}
.thumb-remove {
  position: absolute; top: -8px; left: -8px; width: 24px; height: 24px;
  border-radius: 50%; border: 0; cursor: pointer;
  background: #d5503c; color: #fff; font-size: 15px; line-height: 1;
  box-shadow: 0 3px 10px rgba(0,0,0,0.4);
}
.radio-row { display: flex; flex-direction: column; gap: 8px; }
.radio {
  display: flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px;
  color: var(--ink);
}
.radio input { accent-color: var(--accent); width: 15px; height: 15px; }
.factor-range {
  width: 100%; appearance: none; height: 3px; border-radius: 3px;
  background: linear-gradient(to right, var(--accent) 50%, rgba(232,230,223,0.15) 50%);
  outline: none; cursor: pointer;
}
.factor-range::-webkit-slider-thumb {
  appearance: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); border: 3px solid #161006;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.range-marks {
  display: flex; justify-content: space-between; gap: 2px;
  font-family: var(--font-mono); font-size: 10.5px;
}
.range-marks .mark {
  background: none; border: 0; padding: 3px 2px; cursor: pointer;
  color: var(--ink-dim); font-family: var(--font-mono); font-size: 10.5px;
  border-radius: 6px; transition: color 0.15s, background 0.15s;
}
.range-marks .mark:hover { color: var(--ink); background: rgba(232,230,223,0.06); }
.range-marks .mark.active { color: var(--accent); }
.range-marks .mark-soon { opacity: 0.45; }
.range-marks .mark-soon em { font-style: normal; font-size: 9px; letter-spacing: 0.08em; }
.btn-block { width: 100%; }
.btn-meta { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; font-weight: 400; }

/* 右侧历史面板 */
.history-panel {
  background: #0d1014; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; display: flex; flex-direction: column; gap: 12px;
  overflow-y: auto; min-height: 0; max-height: 100%;
}
.history-list {
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; flex: 1;
}
.history-empty { color: var(--ink-dim); font-size: 12.5px; text-align: center; padding: 18px 0; }
.history-item {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--line); border-radius: 12px;
  padding: 8px; background: #08090b;
  transition: border-color 0.2s;
}
.history-item:hover { border-color: rgba(245,185,66,0.5); }
.history-item img {
  width: 46px; height: 46px; border-radius: 8px; object-fit: cover;
  flex-shrink: 0; display: block;
}
.hi-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.hi-factor { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }
.hi-dims { font-family: var(--font-mono); font-size: 10px; color: var(--ink-dim); }
.hi-time { font-family: var(--font-mono); font-size: 10px; color: var(--ink-dim); opacity: 0.7; }
.hi-dl {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  border: 1px solid var(--line); background: transparent; cursor: pointer;
  color: var(--accent); display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, background 0.2s;
}
.hi-dl:hover { border-color: var(--accent); background: rgba(245,185,66,0.08); }

/* 右侧预览：撑满高度，图片居中自适应 */
.preview-wrap {
  position: relative;
  border-radius: var(--radius); overflow: hidden;
  background: #08090b; border: 1px solid var(--line);
  height: 100%; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
/* loading 遮罩：覆盖整个预览区 */
.loading {
  position: absolute; inset: 0; z-index: 5;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: rgba(8, 9, 11, 0.82); backdrop-filter: blur(4px);
}
.compare-tall {
  display: inline-block; position: relative;
  max-width: 100%; max-height: 100%;
  line-height: 0;
}
/* 预览区：等比适配，尽量铺满高度（优先级需高于下方 .compare img） */
.compare.compare-tall {
  width: auto; max-width: 100%;  /* 容器收缩到图片宽度，滑块范围=图片范围 */
}
.compare.compare-tall img {
  display: block; width: auto; height: auto;
  max-width: 100%;
  max-height: calc(100vh - 150px);
}
.compare.compare-tall img.compare-before {
  height: 100%; width: auto; max-width: none; max-height: none;
  top: 0; left: 0;
}
.preview-idle { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 14px; }
.preview-idle img {
  max-width: 100%; max-height: 480px; border-radius: 12px;
  opacity: 0.92;
}
.preview-wrap {
  border-radius: var(--radius); overflow: hidden;
  background: #08090b; border: 1px solid var(--line);
  min-height: 260px; display: flex; align-items: center; justify-content: center;
}
.compare { position: relative; width: 100%; user-select: none; }
.compare img { display: block; width: 100%; height: auto; }
.compare-after { width: 100%; }
.compare-before-clip {
  position: absolute; inset: 0; overflow: hidden; width: 50%;
}
/* before 图固定高度、宽度自适应——拖动滑块时图片本身不缩放，只移动裁剪窗口 */
.compare img.compare-before {
  position: absolute; top: 0; left: 0;
  height: 100%; width: auto; max-width: none;
}
.compare-handle {
  position: absolute; top: 0; bottom: 0; left: 50%; width: 2px;
  background: var(--accent); pointer-events: none; /* 分割线不响应鼠标 */
}
.compare-grip {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--accent); display: flex;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  cursor: ew-resize; touch-action: none; pointer-events: auto; /* 只有把手可拖 */
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
/* 拖动特效：把手放大 + 光晕增强，分割线加粗 */
.compare-handle.dragging .compare-grip,
.compare-grip:active {
  transform: translate(-50%, -50%) scale(1.25);
  box-shadow: 0 0 0 8px rgba(245,185,66,0.25), 0 4px 16px rgba(0,0,0,0.5);
}
.compare-handle.dragging { width: 3px; box-shadow: 0 0 12px rgba(245,185,66,0.6); }
.compare-grip::before, .compare-grip::after {
  content: ""; position: absolute; top: 50%; width: 8px; height: 2px;
  background: #161006; border-radius: 2px;
}
.compare-grip::before { left: 7px; box-shadow: -2px 0 0, 4px 0 0 #161006; transform: rotate(45deg); }
.compare-grip::after { right: 7px; transform: rotate(-45deg); }
.compare-tag {
  position: absolute; top: 12px; font-family: var(--font-mono); font-size: 10.5px;
  letter-spacing: 0.14em; text-transform: uppercase;
  background: rgba(8,9,11,0.75); color: var(--ink-dim);
  padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(6px);
}
.tag-before { left: 12px; }
.tag-after { right: 12px; color: var(--accent); }

.loading { text-align: center; }
.loader-ring {
  width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 50%;
  border: 2.5px solid var(--line); border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
.loading p { font-family: var(--font-mono); font-size: 13px; color: var(--ink-dim); }

.controls { display: flex; flex-direction: column; gap: 16px; }
.factor-group { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.factor {
  background: #0d1014; border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 8px; cursor: pointer; text-align: center;
  color: var(--ink); font-family: var(--font-body);
  transition: border-color 0.18s, background 0.18s, transform 0.18s;
}
.factor strong { display: block; font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.factor span { font-size: 11px; color: var(--ink-dim); letter-spacing: 0.05em; }
.factor:hover:not(:disabled) { border-color: rgba(245,185,66,0.5); transform: translateY(-2px); }
.factor.selected {
  border-color: var(--accent); background: rgba(245,185,66,0.08);
  box-shadow: 0 0 0 1px var(--accent) inset;
}
.factor.selected span { color: var(--accent); }
.factor-locked { opacity: 0.45; cursor: not-allowed; }
.factor-locked span { font-style: italic; }

.file-meta, .result-meta {
  font-family: var(--font-mono); font-size: 12px; color: var(--ink-dim);
  letter-spacing: 0.03em;
}
.result-meta { color: var(--accent); }
.action-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }

.error-box {
  margin-top: 16px; padding: 12px 18px; border-radius: 12px;
  background: rgba(220,80,60,0.12); border: 1px solid rgba(220,80,60,0.4);
  color: #f0a08e; font-size: 14px;
}

/* ============ sections ============ */
.section-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(28px, 4.5vw, 40px); letter-spacing: -0.01em;
  text-align: center; margin-bottom: 44px;
}
.features { padding-top: 40px; }
.feature-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.feature {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 28px; background: rgba(18,21,26,0.6);
  transition: transform 0.25s ease, border-color 0.25s;
}
.feature:hover { transform: translateY(-4px); border-color: rgba(245,185,66,0.4); }
.f-num {
  font-family: var(--font-mono); font-size: 11.5px; color: var(--accent);
  letter-spacing: 0.18em; margin-bottom: 14px;
}
.feature h3 { font-family: var(--font-display); font-weight: 500; font-size: 19px; margin-bottom: 8px; }
.feature p { color: var(--ink-dim); font-size: 14.5px; }

.how { text-align: center; }
.how-steps {
  list-style: none; display: flex; justify-content: center;
  gap: clamp(20px, 5vw, 56px); flex-wrap: wrap;
}
.how-steps li { max-width: 240px; }
.how-steps span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid var(--accent); color: var(--accent);
  font-family: var(--font-display); font-size: 17px; margin-bottom: 12px;
}
.how-steps p { color: var(--ink-dim); font-size: 14.5px; }

.faq { max-width: 720px; }
.faq details {
  border-bottom: 1px solid var(--line); padding: 18px 4px;
}
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-size: 17.5px; font-weight: 500;
  list-style: none; position: relative; padding-right: 30px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  color: var(--accent); font-size: 20px; transition: transform 0.2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { color: var(--ink-dim); font-size: 14.5px; margin-top: 10px; }

/* ============ footer ============ */
.site-footer {
  text-align: center; padding: 56px 24px 72px;
  border-top: 1px solid var(--line); margin-top: 40px;
}
.footer-brand { font-family: var(--font-display); font-size: 20px; }
.footer-brand::after { content: "."; color: var(--accent); }
.footer-note { color: var(--ink-dim); font-size: 13.5px; margin-top: 8px; }
.footer-meta { font-family: var(--font-mono); font-size: 11px; color: var(--ink-dim); opacity: 0.6; margin-top: 20px; }

/* ============ anims ============ */
@keyframes fadeUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-12px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ mobile ============ */
@media (max-width: 720px) {
  section { padding: 48px 18px; }
  .site-header { padding: 16px 18px; }
  .tool-card { padding: 16px; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-split { grid-template-columns: 1fr; padding-top: 32px; }
  .hero-sub { max-width: none; }
  /* 移动端：预览占满剩余高度 + 控制面板贴底 + 历史右侧抽屉 */
  .workspace {
    display: flex; flex-direction: column;
    padding: 10px; gap: 10px;
    overflow-y: auto; min-height: 0;  /* 允许滚动，预览底部不被裁切 */
  }
  .preview-wrap { flex: none; height: 42vh; padding: 10px; }
  .compare.compare-tall { height: auto; }
  .compare.compare-tall img { max-height: calc(42vh - 20px); }
  .panel { flex: none; max-height: none; overflow: visible; padding: 12px; gap: 12px; }
  .thumb-wrap { width: 64px; height: 64px; }
  .factor-group, .dropzone { padding: 26px 14px; }
  .btn-block { padding: 12px 20px; }
  .topbar-btn { display: flex; }
  .history-panel {
    position: fixed; top: 0; right: 0; bottom: 0; z-index: 120;
    width: min(320px, 86vw); max-height: none;
    border-radius: 0; border-top: 0; border-bottom: 0; border-right: 0;
    transform: translateX(105%);
    transition: transform 0.28s ease;
  }
  .history-panel.open { transform: translateX(0); }
  .history-list { max-height: none; }
  .workspace-overlay { overflow: hidden; }
  .workspace-topbar { padding: 10px 14px; }
  .demo-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  .action-row .btn { flex: 1; }
  .dropzone { padding: 44px 16px; }
}
