:root {
  --bg: #f5f1ea;
  --panel: #fcfaf6;
  --ink: #241f19;
  --muted: #746c63;
  --line: #e7e0d5;
  --line-strong: #d7cec1;
  --brand: #241f19;
  --brand-strong: #16120f;
  --accent: #d9804f;
  --gold: #e2b65c;
  --mint: #8bb8aa;
  --soft: #f7f2eb;
  --ok: #2f8f68;
  --warn: #c98635;
  --shadow-sm: 0 10px 30px rgba(36, 31, 25, 0.06);
  --shadow-md: 0 22px 60px rgba(36, 31, 25, 0.10);
  --shadow-lg: 0 36px 90px rgba(36, 31, 25, 0.12);
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 28px;
  color-scheme: light;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(199, 192, 226, 0.58), transparent 28%),
    radial-gradient(circle at top right, rgba(224, 215, 244, 0.48), transparent 24%),
    linear-gradient(180deg, #f7f4ef 0%, #f4efe8 100%);
  color: var(--ink);
  line-height: 1.6;
}

#app {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  min-height: 100dvh;
}

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

button,
input,
select {
  font: inherit;
}

.icon {
  width: 1.1em;
  height: 1.1em;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(231, 224, 213, 0.72);
  background: rgba(247, 244, 239, 0.84);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1240px;
  margin: 0 auto;
  padding: 18px 24px;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
  font-size: 18px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  box-shadow: none;
}

.brand-mark img {
  display: block;
  width: 100%;
  height: 100%;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.nav-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition:
    color 0.15s ease,
    background-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--ink);
  background: var(--soft);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.page {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 34px 24px 90px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  align-items: center;
  gap: 40px;
  min-height: 420px;
}

.home-hero {
  position: relative;
  grid-template-columns: minmax(360px, 0.88fr) minmax(520px, 1.12fr);
  justify-items: stretch;
  min-height: 0;
  gap: 34px;
  padding: 46px 48px;
  border: 1px solid var(--line);
  border-radius: 36px;
  background: rgba(252, 250, 246, 0.92);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.home-hero::before,
.home-tools-section::before,
.scenario-section::before,
.workflow-band::before,
.seo-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(36, 31, 25, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(36, 31, 25, 0.055) 1px, transparent 1px);
  background-size: 102px 102px;
  pointer-events: none;
  opacity: 0.55;
}

.home-hero > *,
.home-tools-section > *,
.scenario-section > *,
.workflow-band > *,
.seo-panel > * {
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 760px;
  text-align: center;
}

.home-hero .hero-copy {
  align-self: center;
  max-width: 560px;
  text-align: left;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.tool-head h1 {
  margin: 0;
  font-size: clamp(42px, 6vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
}

.home-hero h1 {
  font-size: clamp(38px, 4.1vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.accent-word {
  color: var(--accent);
}

.hero p,
.tool-head p {
  max-width: 720px;
  margin: 22px auto 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.home-hero p {
  max-width: 560px;
  margin-left: 0;
  margin-right: 0;
}

.home-hero .cta-row,
.home-hero .hero-proof {
  justify-content: flex-start;
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 26px;
}

.hero-proof span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  padding: 10px 15px;
  font-size: 12px;
  font-weight: 500;
}

.hero-proof .icon {
  width: 14px;
  height: 14px;
  color: var(--accent);
}

.hero-visual {
  min-height: 330px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}

.hero-studio {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: white;
}

.product-hero-visual {
  position: relative;
  width: 100%;
  margin: 0;
  min-height: 390px;
  border-radius: var(--radius-lg);
  overflow: visible;
}

.product-hero-visual img {
  display: block;
  width: 100%;
  min-height: 390px;
  height: clamp(390px, 34vw, 500px);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--soft);
  box-shadow: 0 16px 50px rgba(36, 31, 25, 0.14);
}

.hero-metric {
  position: absolute;
  display: grid;
  gap: 4px;
  max-width: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  padding: 16px 18px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
}

.hero-metric strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.hero-metric span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.metric-local {
  left: 18px;
  bottom: 22px;
}

.metric-size {
  right: 18px;
  top: 20px;
}

.hero-note {
  position: absolute;
  width: 220px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.95);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.hero-note strong {
  display: block;
  font-size: 16px;
  line-height: 1.25;
}

.hero-note span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.hero-note-left {
  left: 24px;
  top: 22px;
}

.hero-note-right {
  right: 24px;
  bottom: 24px;
}

.studio-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  padding: 14px 16px;
  background: var(--soft);
}

.studio-toolbar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #d1d5db;
}

.studio-toolbar span:nth-child(1) {
  background: var(--accent);
}

.studio-toolbar span:nth-child(2) {
  background: var(--gold);
}

.studio-toolbar span:nth-child(3) {
  background: var(--mint);
}

.studio-toolbar strong {
  margin-left: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
}

.studio-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 16px;
  padding: 20px;
}

.studio-canvas {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.9) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(255, 255, 255, 0.9) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(255, 255, 255, 0.9) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(255, 255, 255, 0.9) 75%),
    #f3f4f6;
  background-position:
    0 0,
    0 10px,
    10px -10px,
    -10px 0;
  background-size: 20px 20px;
}

.photo-stack {
  position: absolute;
  inset: 38px 38px 46px;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: var(--shadow-lg);
}

.crop-frame {
  position: absolute;
  inset: 24px 58px 30px;
  border: 2px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  box-shadow:
    0 0 0 999px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(0, 0, 0, 0.1);
}

.crop-frame::before,
.crop-frame::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.6);
}

.crop-frame::before {
  left: 33%;
  top: 0;
  bottom: 0;
  width: 1px;
}

.crop-frame::after {
  top: 33%;
  left: 0;
  right: 0;
  height: 1px;
}

.size-tag {
  position: absolute;
  right: 20px;
  bottom: 20px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
}

.studio-controls {
  display: grid;
  align-content: start;
  gap: 12px;
}

.studio-controls > div:not(.progress-line):not(.mini-actions) {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--soft);
}

.studio-controls small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.studio-controls b {
  display: block;
  margin-top: 6px;
  font-size: 20px;
}

.progress-line {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-line i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--ink);
}

.mini-actions {
  display: grid;
  gap: 8px;
}

.mini-actions span {
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: white;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.mini-actions span:hover {
  opacity: 0.9;
}

.mini-actions span:last-child {
  background: var(--accent);
}

.cta-row,
.tool-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 10px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.button .icon {
  width: 16px;
  height: 16px;
}

.button.primary {
  border-color: #d47442;
  background: #cf7541;
  color: white;
  box-shadow: 0 12px 24px rgba(217, 128, 79, 0.22);
}

.button.primary:hover:not(:disabled) {
  background: #ca7140;
}

.button.accent {
  border-color: var(--accent);
  background: var(--accent);
  color: white;
}

.button.compact {
  min-height: 36px;
  padding: 8px 12px;
  font-size: 13px;
}

.button.subtle {
  background: white;
  color: var(--muted);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.section {
  margin-top: 34px;
}

.section h2 {
  margin: 0 0 20px;
  font-size: 24px;
}

.section-title {
  margin-bottom: 38px;
  text-align: center;
}

.section-title h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 54px);
  font-weight: 800;
  letter-spacing: -0.05em;
  line-height: 1.02;
}

.section-title .eyebrow {
  display: block;
  margin-top: 12px;
}

.home-tools-section,
.scenario-section {
  position: relative;
  padding: 42px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(252, 250, 246, 0.94);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.workflow-copy h2,
.seo-panel h2 {
  margin: 0;
  max-width: 720px;
  font-size: clamp(24px, 4vw, 40px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

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

.card,
.panel,
.ad-slot {
  display: grid;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.card {
  padding: 20px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  margin: 0 0 8px;
}

.card p,
.card li {
  color: var(--muted);
  line-height: 1.6;
}

.status-badge,
.inline-beta,
.title-beta,
.nav-beta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(201, 134, 53, 0.26);
  border-radius: 999px;
  background: rgba(255, 246, 225, 0.92);
  color: #9b5f1e;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
}

.status-badge {
  padding: 4px 8px;
  font-size: 11px;
}

.inline-beta,
.title-beta {
  vertical-align: middle;
  padding: 5px 10px;
  font-size: 12px;
}

.title-beta {
  position: relative;
  top: -0.12em;
}

.nav-beta {
  padding: 2px 6px;
  font-size: 10px;
}

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

.feature-card {
  position: relative;
  display: grid;
  min-height: 400px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  padding: 22px;
  overflow: hidden;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.feature-card:hover,
.scenario-card:hover {
  transform: translateY(-4px);
  border-color: #d9cdbc;
  box-shadow: var(--shadow-md);
}

.feature-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 16px;
}

.feature-art {
  width: 100%;
  aspect-ratio: 1.35;
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--soft);
}

.feature-top > span {
  color: var(--muted);
  font-weight: 600;
  font-size: 13px;
}

.feature-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: #f4ede4;
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
}

.feature-icon .icon {
  width: 20px;
  height: 20px;
}

.feature-card:nth-child(2) .feature-icon {
  background: #fef2f2;
  color: var(--accent);
}

.feature-card:nth-child(3) .feature-icon {
  background: #ecfdf5;
  color: var(--mint);
}

.feature-card h3 {
  margin: 0 0 10px;
  font-size: 22px;
  font-weight: 700;
}

.feature-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-self: end;
  margin-top: 20px;
}

.tag-row small {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
}

.feature-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: max-content;
  margin-top: 16px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
}

.feature-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 0.2s ease;
}

.feature-card:hover .feature-link .icon {
  transform: translateX(3px);
}

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

.article-card {
  display: grid;
  align-content: start;
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.article-card:hover,
.info-card:hover {
  transform: translateY(-2px);
  border-color: rgba(36, 31, 25, 0.18);
  box-shadow: var(--shadow-md);
}

.article-category {
  width: max-content;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdf9;
  color: var(--accent);
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.article-card h2 {
  margin: 18px 0 10px;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.article-card p {
  margin: 0;
  color: var(--muted);
}

.article-card small {
  margin-top: 18px;
  color: var(--muted);
  font-weight: 700;
}

.workflow-band {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 32px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(252, 250, 246, 0.94);
  padding: 40px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.workflow-copy p,
.seo-panel p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.workflow-steps div {
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.workflow-steps b {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(180deg, #e08a55, #cf7541);
  color: white;
}

.workflow-steps b .icon {
  width: 20px;
  height: 20px;
}

.workflow-steps strong {
  display: block;
  margin-top: 16px;
  font-size: 16px;
  font-weight: 700;
}

.workflow-steps span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

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

.scenario-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  padding: 18px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease;
}

.scenario-icon {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: #f4ede4;
  color: var(--accent);
}

.scenario-card:nth-child(2n) .scenario-icon {
  background: #fef2f2;
  color: var(--accent);
}

.scenario-card:nth-child(3n) .scenario-icon {
  background: #ecfdf5;
  color: var(--mint);
}

.scenario-icon .icon {
  width: 20px;
  height: 20px;
}

.scenario-card strong {
  font-size: 16px;
  font-weight: 700;
}

.scenario-card span {
  color: var(--muted);
  line-height: 1.5;
  font-size: 14px;
}

.scenario-card > span:not(.scenario-icon) {
  grid-column: 2;
}

.home-ad-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: stretch;
}

.seo-panel {
  border: 1px solid var(--line);
  border-radius: 30px;
  background: rgba(252, 250, 246, 0.94);
  padding: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.seo-section.compact {
  margin-top: 20px;
}

.ad-slot.tall {
  min-height: 360px;
}

.tool-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 8px;
  text-align: left;
}

.tool-head h1 {
  max-width: 780px;
  font-size: clamp(38px, 4.8vw, 64px);
}

.tool-head p {
  margin-right: 0;
  margin-left: 0;
}

.ad-slot {
  display: none;
  place-items: center;
  min-height: 120px;
  color: var(--muted);
  font-weight: 500;
  background: rgba(255, 255, 255, 0.72);
  border-style: solid;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 20px;
  align-items: start;
  margin-top: 32px;
}

.panel {
  padding: 24px;
}

.workspace > aside.panel {
  align-self: start;
  height: max-content;
}

.workspace.empty-workspace {
  align-items: stretch;
}

.workspace.empty-workspace > .panel:first-child {
  display: grid;
}

.workspace.empty-workspace > .panel:first-child > .dropzone {
  height: 100%;
  min-height: 0;
}

.workspace.empty-workspace > aside.panel {
  align-self: stretch;
  height: auto;
}

.dropzone {
  display: grid;
  place-items: center;
  min-height: 260px;
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius);
  background: var(--soft);
  text-align: center;
  cursor: pointer;
  overflow: hidden;
  transition:
    border-color 0.15s ease,
    background-color 0.15s ease,
    box-shadow 0.15s ease;
}

.compress-dropzone {
  min-height: 340px;
  border-color: #d1d5db;
  background: var(--soft);
}

.dropzone-content {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 24px;
}

.dropzone .upload-orb {
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border: 1px solid #e7b99f;
  border-radius: 20px;
  background: #f4ded5;
  color: #a84f2e;
  box-shadow: 0 10px 24px rgba(168, 79, 46, 0.12);
}

.dropzone .upload-orb .icon {
  width: 32px;
  height: 32px;
  stroke-width: 2.1;
}

.format-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

.format-pills small {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  color: var(--muted);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
}

.dropzone.dragging {
  border-color: var(--ink);
  background: white;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.dropzone img,
.preview-canvas,
canvas {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.dropzone strong {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.dropzone span,
.hint {
  color: var(--muted);
  font-size: 14px;
}

.batch-loaded {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 16px;
  text-align: left;
  cursor: default;
}

.loaded-main {
  display: grid;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(20, 108, 148, 0.14);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.loaded-preview {
  display: grid;
  place-items: center;
  min-height: 160px;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #edf3f7;
}

.loaded-preview img {
  width: 100%;
  height: 100%;
  max-height: 210px;
  object-fit: contain;
  border-radius: 0;
}

.loaded-copy {
  display: grid;
  align-content: center;
  gap: 8px;
  min-width: 0;
}

.loaded-copy strong,
.loaded-toolbar strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loaded-copy span:not(.loaded-status),
.loaded-toolbar span:not(.loaded-status) {
  color: var(--muted);
  font-size: 13px;
}

.loaded-copy p {
  max-width: 520px;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.loaded-status {
  justify-self: start;
  width: fit-content;
  border: 1px solid rgba(20, 108, 148, 0.18);
  border-radius: 999px;
  background: rgba(20, 108, 148, 0.08);
  color: var(--ink);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
}

.loaded-strip {
  display: flex;
  gap: 10px;
  width: 100%;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
}

.loaded-thumb {
  position: relative;
  flex: 0 0 84px;
  height: 72px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
  box-shadow: 0 8px 20px rgba(12, 24, 33, 0.06);
  cursor: pointer;
  padding: 0;
}

.loaded-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
}

.loaded-thumb span {
  position: absolute;
  top: 6px;
  left: 6px;
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgba(10, 19, 27, 0.78);
  color: white;
  font-size: 12px;
  font-weight: 850;
}

.loaded-thumb.active {
  border-color: rgba(20, 108, 148, 0.72);
  box-shadow:
    0 0 0 3px rgba(20, 108, 148, 0.12),
    0 10px 24px rgba(12, 24, 33, 0.10);
}

.resize-editor .loaded-thumb {
  flex-basis: 72px;
  width: 72px;
  height: 72px;
}

.loaded-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(20, 108, 148, 0.14);
  border-radius: var(--radius-sm);
  background: white;
  padding: 12px 14px;
}

.resize-editor {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 16px;
  cursor: default;
  text-align: left;
}

.resize-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  border: 1px solid rgba(20, 108, 148, 0.14);
  border-radius: var(--radius-sm);
  background: white;
  padding: 12px 14px;
}

.resize-file-info {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.resize-toolbar .button {
  flex: 0 0 auto;
  max-width: 100%;
}

.resize-toolbar strong,
.resize-toolbar span {
  display: block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resize-toolbar strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
}

.resize-toolbar span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.resize-stage-wrap {
  display: grid;
  place-items: center;
  border: 1px solid rgba(20, 108, 148, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, rgba(10, 19, 27, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(10, 19, 27, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(10, 19, 27, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(10, 19, 27, 0.04) 75%);
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.resize-stage {
  position: relative;
  max-width: 100%;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: #edf3f7;
  box-shadow: 0 18px 40px rgba(12, 24, 33, 0.16);
  cursor: grab;
  touch-action: none;
}

.resize-stage.dragging {
  cursor: grabbing;
}

.resize-stage canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.crop-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.crop-grid span {
  position: absolute;
  display: block;
  border-color: rgba(255, 255, 255, 0.76);
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35));
}

.crop-grid span:nth-child(1),
.crop-grid span:nth-child(2) {
  top: 0;
  bottom: 0;
  border-left: 1px dashed rgba(255, 255, 255, 0.78);
}

.crop-grid span:nth-child(1) {
  left: 33.333%;
}

.crop-grid span:nth-child(2) {
  left: 66.666%;
}

.crop-grid span:nth-child(3),
.crop-grid span:nth-child(4) {
  left: 0;
  right: 0;
  border-top: 1px dashed rgba(255, 255, 255, 0.78);
}

.crop-grid span:nth-child(3) {
  top: 33.333%;
}

.crop-grid span:nth-child(4) {
  top: 66.666%;
}

.compress-queue {
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 16px;
  cursor: default;
  text-align: left;
}

.compress-queue-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid rgba(20, 108, 148, 0.14);
  border-radius: var(--radius);
  background: white;
  padding: 14px;
  box-shadow: var(--shadow-sm);
}

.compress-queue-head strong,
.compress-queue-head span {
  display: block;
}

.compress-queue-head strong {
  color: var(--ink);
  font-size: 18px;
  font-weight: 850;
}

.compress-queue-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.compress-list {
  display: grid;
  gap: 8px;
}

.compress-row {
  display: grid;
  grid-template-columns: 58px minmax(140px, 1.4fr) minmax(88px, 0.6fr) minmax(96px, 0.6fr) minmax(110px, 0.7fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
}

.compress-row.done {
  border-color: rgba(20, 108, 148, 0.20);
  background: white;
}

.compress-row > img {
  width: 58px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  background: #edf3f7;
}

.compress-file,
.compress-size {
  min-width: 0;
}

.compress-file strong,
.compress-file span,
.compress-size span,
.compress-size b {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compress-file strong {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.compress-file span,
.compress-size span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.compress-size b {
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.compress-saving {
  width: fit-content;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.compress-saving.success {
  background: rgba(20, 108, 148, 0.10);
  color: var(--ink);
}

.compress-saving.processing {
  background: rgba(217, 128, 79, 0.14);
  color: #9a4b22;
}

.compress-saving.waiting {
  background: rgba(0, 0, 0, 0.05);
  color: #6b7280;
}

.compress-saving.failed {
  background: rgba(225, 86, 55, 0.12);
  color: #a43f2c;
}

.compress-saving.empty {
  visibility: hidden;
}

.compress-download {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.compress-batch-summary {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.file-queue {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  width: 100%;
  margin-bottom: 14px;
}

.file-chip {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  padding: 8px;
  text-align: left;
}

.file-chip.active {
  border-color: rgba(20, 108, 148, 0.52);
  box-shadow: 0 0 0 3px rgba(20, 108, 148, 0.10);
}

.file-chip img {
  width: 48px;
  height: 48px;
  object-fit: cover;
  border-radius: 8px;
}

.file-chip span {
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.collage-editor {
  display: grid;
  gap: 18px;
  width: 100%;
  padding: clamp(12px, 2vw, 20px);
  text-align: left;
  cursor: default;
}

.collage-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  text-align: left;
}

.collage-toolbar-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.dropzone .collage-toolbar-copy strong {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.3;
}

.collage-toolbar-copy span {
  max-width: 620px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.collage-toolbar .queue-actions {
  flex-wrap: nowrap;
  width: auto;
}

.collage-toolbar .button {
  white-space: nowrap;
}

.collage-color-picker {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
}

.color-swatch {
  position: relative;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid rgba(36, 31, 25, 0.18);
  border-radius: 50%;
  background: var(--swatch);
  cursor: pointer;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.color-swatch:hover {
  transform: translateY(-1px);
}

.color-swatch.active {
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.75),
    0 0 0 3px var(--accent);
}

.custom-color {
  position: relative;
  display: block;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  margin-left: auto;
  overflow: hidden;
  border: 1px solid rgba(36, 31, 25, 0.18);
  border-radius: 50%;
  background: conic-gradient(#f05252, #e2b65c, #68b886, #57a6d9, #8b74d6, #df6ca2, #f05252);
  cursor: pointer;
  box-shadow: inset 0 0 0 3px white;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.custom-color:hover {
  transform: translateY(-1px);
  box-shadow:
    inset 0 0 0 3px white,
    0 0 0 2px rgba(217, 128, 79, 0.35);
}

.field .custom-color input[type="color"] {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 0;
  height: 100%;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.collage-preview-wrap {
  display: grid;
  place-items: center;
  min-height: 420px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(45deg, #eee8df 25%, transparent 25%),
    linear-gradient(-45deg, #eee8df 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #eee8df 75%),
    linear-gradient(-45deg, transparent 75%, #eee8df 75%),
    #f8f4ee;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  overflow: hidden;
}

.collage-preview {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: 680px;
  height: auto;
  border-radius: 4px;
  box-shadow: var(--shadow-md);
  cursor: grab;
  touch-action: none;
}

.collage-preview:active {
  cursor: grabbing;
}

.collage-strip {
  display: flex;
  gap: 10px;
  padding: 4px 2px 8px;
  overflow-x: auto;
}

.collage-thumb {
  position: relative;
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  padding: 3px;
  border: 2px solid transparent;
  border-radius: 10px;
  background: var(--soft);
  cursor: grab;
}

.collage-thumb.active {
  border-color: var(--accent);
}

.collage-thumb img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
}

.collage-thumb span {
  position: absolute;
  right: 5px;
  bottom: 5px;
  display: grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(36, 31, 25, 0.84);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.control-stack {
  display: grid;
  gap: 16px;
}

.compress-summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 14px;
}

.compress-summary > span {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
}

.compress-summary .icon {
  width: 20px;
  height: 20px;
}

.compress-summary strong,
.compress-summary small {
  display: block;
}

.compress-summary small {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.4;
}

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

.field label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.preset-field {
  gap: 10px;
}

.preset-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 430px;
  overflow-y: auto;
  padding-right: 2px;
}

.preset-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  cursor: pointer;
  padding: 12px;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.preset-card:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 108, 148, 0.32);
  box-shadow: var(--shadow-sm);
}

.preset-card.active {
  border-color: rgba(20, 108, 148, 0.68);
  background: rgba(20, 108, 148, 0.06);
  box-shadow: 0 0 0 3px rgba(20, 108, 148, 0.10);
}

.preset-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--soft);
  color: var(--ink);
}

.preset-icon .icon {
  width: 20px;
  height: 20px;
}

.preset-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.preset-copy strong,
.preset-copy span,
.preset-copy small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preset-copy strong {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.preset-copy span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.preset-copy small {
  color: var(--muted);
  font-size: 12px;
}

.preset-meta {
  display: grid;
  justify-items: end;
  gap: 4px;
  align-items: center;
  min-width: 96px;
}

.preset-meta b {
  border-radius: 999px;
  background: rgba(36, 31, 25, 0.07);
  color: var(--ink);
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.preset-meta small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  color: var(--ink);
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.field textarea {
  min-height: 150px;
  resize: vertical;
  line-height: 1.55;
}

.field select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 46px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23746c63' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 10 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
}

.field input[type="range"] {
  appearance: none;
  -webkit-appearance: none;
  padding: 0 18px;
  accent-color: var(--accent);
}

.field input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.field input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  margin-top: -7px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(36, 31, 25, 0.18);
  -webkit-appearance: none;
}

.field input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--gold));
}

.field input[type="range"]::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 3px solid white;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 2px 8px rgba(36, 31, 25, 0.18);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.button:focus-visible,
.nav-links a:focus-visible,
.feature-card:focus-visible,
.scenario-card:focus-visible,
.article-card:focus-visible,
.info-card:focus-visible {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.08);
}

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

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: white;
  padding: 8px 14px;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.chip.active {
  border-color: var(--ink);
  background: var(--ink);
  color: white;
}

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

.stat {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  background: var(--soft);
}

.stat b {
  display: block;
  margin-top: 8px;
  font-size: 18px;
}

.compare {
  position: relative;
  display: grid;
  place-items: center;
  height: clamp(320px, 52vw, 560px);
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid rgba(20, 108, 148, 0.14);
  background:
    linear-gradient(45deg, rgba(36, 31, 25, 0.035) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(36, 31, 25, 0.035) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(36, 31, 25, 0.035) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(36, 31, 25, 0.035) 75%),
    white;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
  background-size: 20px 20px;
  user-select: none;
}

.compare img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.compare img.after {
  clip-path: inset(0 0 0 50%);
}

.compare-label {
  position: absolute;
  top: 14px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 999px;
  background: rgba(36, 31, 25, 0.86);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(12, 24, 33, 0.16);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.compare .compare-label {
  color: #fff;
}

.compare-label-before {
  left: 14px;
}

.compare-label-after {
  right: 14px;
}

.compare-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 2;
  width: 2px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(12, 24, 33, 0.18);
  pointer-events: none;
}

.compare-divider span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 2px solid white;
  border-radius: 999px;
  background: rgba(36, 31, 25, 0.86);
  box-shadow: 0 8px 22px rgba(12, 24, 33, 0.22);
  transform: translate(-50%, -50%);
}

.compare-divider span::before,
.compare-divider span::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border-top: 2px solid white;
  border-left: 2px solid white;
}

.compare-divider span::before {
  left: 12px;
  transform: rotate(-45deg);
}

.compare-divider span::after {
  right: 12px;
  transform: rotate(135deg);
}

.compare input {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  min-height: 0;
  opacity: 0;
  cursor: ew-resize;
}

.upscale-single {
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 16px;
  cursor: default;
  text-align: left;
}

.upscale-single-preview {
  display: grid;
  place-items: center;
  height: clamp(320px, 52vw, 560px);
  overflow: hidden;
  border: 1px solid rgba(20, 108, 148, 0.14);
  border-radius: var(--radius);
  background: white;
  box-shadow: var(--shadow-sm);
}

.upscale-single-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.upscale-single-meta,
.upscale-queue-head {
  border: 1px solid rgba(20, 108, 148, 0.14);
  border-radius: var(--radius-sm);
  background: white;
  padding: 12px 14px;
}

.upscale-single-meta strong,
.upscale-single-meta span,
.upscale-queue-head strong,
.upscale-queue-head span {
  display: block;
}

.upscale-single-meta strong,
.upscale-queue-head strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 16px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upscale-single-meta span,
.upscale-single-meta p,
.upscale-queue-head span {
  color: var(--muted);
  font-size: 13px;
}

.upscale-single-meta p {
  margin: 6px 0 0;
}

.upscale-queue {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 16px;
  cursor: default;
  text-align: left;
}

.upscale-finished {
  display: grid;
  gap: 12px;
  width: 100%;
  padding: 16px;
  cursor: default;
  text-align: left;
}

.upscale-list,
.upscale-results {
  display: grid;
  gap: 10px;
}

.upscale-pending {
  display: grid;
  gap: 10px;
}

.batch-summary.compact {
  padding: 12px 14px;
}

.batch-summary.compact strong {
  font-size: 15px;
}

.upscale-row,
.upscale-row-main {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  padding: 10px;
}

.upscale-row > img,
.upscale-row-main > img {
  width: 64px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--soft);
}

.upscale-row strong,
.upscale-row span,
.upscale-row-main strong,
.upscale-row-main span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upscale-row span,
.upscale-row-main span {
  color: var(--muted);
  font-size: 13px;
}

.upscale-status {
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.06);
  color: var(--muted);
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 850;
}

.upscale-status.processing {
  background: rgba(31, 111, 235, 0.12);
  color: #1f5fbf;
}

.upscale-status.waiting {
  background: rgba(0, 0, 0, 0.04);
  color: var(--muted);
}

.upscale-status.done {
  background: rgba(21, 128, 61, 0.12);
  color: #15803d;
}

.upscale-result-row {
  display: grid;
  gap: 10px;
}

.upscale-row-main {
  grid-template-columns: 64px minmax(0, 1fr) auto auto;
}

.upscale-compare-panel {
  width: 100%;
}

.upscale-compare-panel.nested {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  padding: 12px;
}

.upscale-compare-panel.nested .compare {
  height: clamp(280px, 44vw, 460px);
}

.upscale-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(20, 108, 148, 0.18);
  border-radius: var(--radius);
  background: white;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.upscale-compare-panel.single .upscale-summary {
  margin-top: 14px;
  margin-bottom: 0;
}

.upscale-summary strong {
  color: var(--ink);
  font-size: 18px;
}

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

.compress-result {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
  padding: 16px;
}

.batch-summary {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(20, 108, 148, 0.18);
  border-radius: var(--radius);
  background: var(--soft);
  padding: 14px 16px;
}

.batch-summary strong {
  font-size: 18px;
}

.batch-summary span {
  color: var(--muted);
}

.processing-summary {
  position: relative;
  padding-left: 46px;
}

.processing-summary::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 18px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(31, 95, 191, 0.18);
  border-top-color: #1f5fbf;
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
}

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

.batch-results {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.batch-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  padding: 10px;
}

.batch-row img {
  width: 64px;
  height: 54px;
  object-fit: cover;
  border-radius: 8px;
  background: #eef3f7;
}

.batch-row strong,
.batch-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-row span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
}

.compress-result img {
  width: 130px;
  height: 96px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.compress-result strong {
  display: block;
  color: var(--ok);
  font-size: 24px;
}

.compress-result span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  line-height: 1.5;
}

.seo-list {
  columns: 2;
  padding-left: 20px;
}

.seo-list li {
  margin: 10px 0;
}

.notice {
  border-left: 4px solid var(--warn);
  background: #fffbeb;
  color: #92400e;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
}

.tool-feedback {
  border-left: 4px solid var(--warn);
  background: #fffbeb;
  color: #92400e;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.5;
}

.tool-feedback[hidden] {
  display: none;
}

.tool-feedback.error {
  border-left-color: var(--warn);
}

.model-status {
  border: 1px solid rgba(20, 108, 148, 0.16);
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  padding: 12px 14px;
  font-size: 13px;
}

.info-head {
  grid-template-columns: minmax(0, 1fr);
}

.info-head .eyebrow {
  margin-bottom: 14px;
}

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

.info-card {
  display: grid;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.info-card h2 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.2;
}

.info-card p {
  margin: 0;
  color: var(--muted);
}

.article-layout {
  display: grid;
  gap: 26px;
}

.article-hero {
  border: 1px solid var(--line);
  border-radius: 32px;
  background: rgba(252, 250, 246, 0.94);
  padding: 46px;
  box-shadow: var(--shadow-md);
}

.article-hero-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.article-hero h1 {
  max-width: 880px;
  margin: 0;
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.article-hero p {
  max-width: 760px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 17px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.back-link .icon {
  transform: rotate(180deg);
}

.article-body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 22px;
  align-items: start;
}

.article-main {
  display: grid;
  gap: 16px;
}

.article-main section,
.article-aside,
.contact-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.article-main h2 {
  margin: 0 0 12px;
  font-size: 24px;
  line-height: 1.2;
}

.article-main p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.article-main p + p {
  margin-top: 14px;
}

.article-main ul,
.article-main ol {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--muted);
}

.article-main li {
  padding-left: 4px;
}

.article-callout {
  background: linear-gradient(180deg, rgba(255, 253, 249, 0.96), rgba(255, 246, 225, 0.74));
}

.article-faq {
  display: grid;
  gap: 12px;
}

.article-faq h2 {
  margin-bottom: 2px;
}

.article-faq details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  padding: 14px 16px;
}

.article-faq summary {
  cursor: pointer;
  color: var(--ink);
  font-weight: 800;
}

.article-faq details p {
  margin-top: 10px;
}

.article-aside {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 12px;
}

.article-aside strong {
  margin-bottom: 4px;
}

.article-aside a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  padding: 12px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.contact-section {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 26px;
  align-items: start;
}

.contact-copy h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.contact-copy p {
  margin: 14px 0 0;
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-status {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: white;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.contact-status.success {
  border-color: rgba(47, 143, 104, 0.3);
  background: rgba(47, 143, 104, 0.08);
  color: var(--ok);
}

.contact-status.error {
  border-color: rgba(201, 134, 53, 0.3);
  background: rgba(201, 134, 53, 0.1);
  color: var(--warn);
}

footer {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 16px 24px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 32px 24px;
  text-align: center;
  font-size: 14px;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}

.footer-links a {
  color: var(--ink);
  font-weight: 600;
}

@media (max-width: 1100px) {
  .home-hero {
    grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
    gap: 28px;
    padding: 40px 34px;
  }

  .home-hero h1 {
    font-size: clamp(34px, 4.4vw, 48px);
  }

  .product-hero-visual,
  .product-hero-visual img {
    min-height: 360px;
  }

  .product-hero-visual img {
    height: 360px;
  }

  .hero-note-left {
    left: 16px;
    top: 16px;
  }

  .hero-note-right {
    right: 16px;
    top: auto;
    bottom: 18px;
  }
}

@media (max-width: 860px) {
  .hero,
  .workspace,
  .tool-head,
  .workflow-band,
  .home-ad-layout {
    grid-template-columns: 1fr;
  }

  .tool-grid,
  .cards,
  .info-grid,
  .article-grid,
  .article-body,
  .contact-section,
  .feature-grid,
  .scenario-grid,
  .workflow-steps {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .home-hero {
    grid-template-columns: 1fr;
    padding: 34px 18px 26px;
  }

  .home-hero .hero-copy {
    max-width: 760px;
    text-align: center;
  }

  .home-hero p {
    margin-left: auto;
    margin-right: auto;
  }

  .home-hero .cta-row,
  .home-hero .hero-proof {
    justify-content: center;
  }

  .hero-visual {
    min-height: 240px;
  }

  .product-hero-visual,
  .product-hero-visual img {
    min-height: 330px;
  }

  .product-hero-visual {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    align-items: stretch;
    margin-top: 22px;
  }

  .product-hero-visual img {
    grid-column: 1 / -1;
    height: auto;
  }

  .hero-metric {
    position: static;
    max-width: none;
    width: auto;
    min-height: 100%;
    padding: 12px 14px;
  }

  .metric-local {
    order: 1;
  }

  .metric-size {
    order: 2;
  }

  .studio-body {
    grid-template-columns: 1fr;
  }

  .studio-canvas {
    min-height: 270px;
  }

  .section-title {
    display: block;
  }

  .article-hero {
    padding: 30px 22px;
  }

  .article-aside {
    position: static;
  }

  .stats,
  .split,
  .batch-row {
    grid-template-columns: 1fr;
  }

  .compress-queue {
    padding: 12px;
  }

  .compress-queue-head,
  .compress-batch-summary {
    grid-template-columns: 1fr;
  }

  .compress-queue-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .queue-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .collage-toolbar {
    grid-template-columns: 1fr;
    align-items: start;
    padding: 14px;
  }

  .collage-toolbar .queue-actions {
    width: 100%;
  }

  .compress-row {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .compress-size,
  .compress-saving,
  .compress-download {
    grid-column: 2;
  }

  .compress-download {
    justify-content: flex-start;
  }

  .upscale-row,
  .upscale-row-main {
    grid-template-columns: 56px minmax(0, 1fr);
  }

  .upscale-status,
  .upscale-row-main .button {
    grid-column: 2;
    justify-self: start;
  }

  .preset-grid {
    grid-template-columns: 1fr;
    max-height: 360px;
  }

  .resize-editor {
    padding: 12px;
  }

  .resize-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .resize-toolbar .button {
    align-self: flex-start;
  }

  .resize-stage-wrap {
    padding: 10px;
  }

  .batch-loaded {
    padding: 12px;
  }

  .loaded-main {
    grid-template-columns: 1fr;
  }

  .loaded-preview {
    min-height: 220px;
  }

  .loaded-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .batch-row .button {
    width: 100%;
  }

  .seo-list {
    columns: 1;
  }

  .hero-note {
    position: static;
    width: auto;
    min-height: 100%;
    margin-top: 0;
    padding: 14px;
  }

  .hero-note-left {
    order: 3;
  }

  .hero-note-right {
    order: 4;
  }
}

@media (min-width: 721px) and (max-width: 860px) {
  .home-hero {
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    align-items: center;
    gap: 24px;
    padding: 30px;
  }

  .home-hero .hero-copy {
    max-width: none;
    text-align: left;
  }

  .home-hero h1 {
    font-size: clamp(31px, 4.1vw, 36px);
    line-height: 1.02;
  }

  .home-hero p {
    margin-left: 0;
    margin-right: 0;
    font-size: 14px;
  }

  .home-hero .cta-row,
  .home-hero .hero-proof {
    justify-content: flex-start;
  }

  .home-hero .button {
    min-height: 42px;
    padding: 9px 14px;
  }

  .home-hero .hero-proof span {
    padding: 8px 11px;
  }

  .product-hero-visual {
    display: block;
    min-height: 320px;
    margin-top: 0;
  }

  .product-hero-visual img {
    grid-column: auto;
    min-height: 320px;
    height: 320px;
  }

  .home-hero .hero-note {
    display: none;
  }

  .home-hero .hero-metric {
    position: absolute;
    max-width: 166px;
    min-height: auto;
    padding: 10px 12px;
  }

  .home-hero .hero-metric strong {
    font-size: 18px;
  }

  .home-hero .hero-metric span {
    font-size: 12px;
  }

  .home-hero .metric-local {
    left: 12px;
    bottom: 14px;
  }

  .home-hero .metric-size {
    right: 12px;
    top: 14px;
  }
}

@media (max-width: 640px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .product-hero-visual {
    grid-template-columns: 1fr;
  }

  .product-hero-visual img {
    min-height: 280px;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

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

  .nav-cta {
    width: 100%;
  }

  .collage-editor {
    gap: 12px;
    padding: 10px;
  }

  .collage-toolbar {
    gap: 12px;
    padding: 12px;
  }

  .collage-toolbar .queue-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .collage-toolbar .button {
    min-width: 0;
  }

  .collage-preview-wrap {
    min-height: 280px;
    padding: 10px;
  }
}
