:root {
  --bg: #edf5ef;
  --panel: rgba(250, 255, 251, 0.84);
  --panel-strong: #f8fff9;
  --ink: #163127;
  --muted: #567063;
  --line: rgba(22, 49, 39, 0.12);
  --accent: #2f8f5b;
  --accent-2: #5ea36f;
  --accent-3: #b7de8a;
  --shadow: 0 22px 60px rgba(17, 54, 35, 0.12);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: "Space Grotesk", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(183, 222, 138, 0.45), transparent 30%),
    radial-gradient(circle at top right, rgba(94, 163, 111, 0.18), transparent 28%),
    linear-gradient(180deg, #f7fbf7 0%, var(--bg) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(24, 34, 47, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(24, 34, 47, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 85%);
}

.page-shell {
  width: min(1200px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 18px;
  border-radius: 22px;
  backdrop-filter: blur(18px);
  background: rgba(248, 255, 249, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.66);
  box-shadow: var(--shadow);
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
}

.site-brand strong,
.site-brand span {
  display: block;
}

.site-brand strong {
  font-size: 1.35rem;
  line-height: 1.1;
}

.site-brand span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.9rem;
}

.tool-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.tool-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--ink);
  text-decoration: none;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(22, 49, 39, 0.1);
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.tool-link:hover {
  transform: translateY(-1px);
  border-color: rgba(47, 143, 91, 0.38);
}

.tool-link.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1e5d3f, #2f8f5b);
  border-color: transparent;
}

.hero-card,
.panel {
  backdrop-filter: blur(18px);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow);
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-xl);
}

.hero-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: auto -8% -35% auto;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(47, 143, 91, 0.24), transparent 65%);
}

.eyebrow,
.mono-label,
.drop-kicker {
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow {
  margin: 0;
  color: var(--accent-2);
  font-size: 0.82rem;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(24, 34, 47, 0.08);
  position: relative;
  z-index: 1;
}

.lang-button {
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 14px;
  font: inherit;
  cursor: pointer;
}

.lang-button.is-active {
  background: var(--ink);
  color: #fff;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 28px;
  align-items: end;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.4rem);
  line-height: 0.96;
  letter-spacing: -0.04em;
}

.hero-copy {
  max-width: 62ch;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.hero-badges span {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 250, 242, 0.82);
  border: 1px solid rgba(24, 34, 47, 0.09);
  color: var(--ink);
  font-size: 0.92rem;
}

.workspace {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 24px;
  margin-top: 24px;
}

.panel {
  border-radius: var(--radius-xl);
  padding: 24px;
}

.drop-panel {
  display: grid;
  gap: 20px;
}

.dropzone {
  position: relative;
  min-height: 340px;
  border-radius: 24px;
  border: 2px dashed rgba(94, 163, 111, 0.38);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.6), rgba(248, 255, 249, 0.88)),
    linear-gradient(120deg, rgba(183, 222, 138, 0.18), rgba(94, 163, 111, 0.08));
  display: grid;
  place-items: center;
  padding: 28px;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
  cursor: pointer;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.is-over {
  transform: translateY(-2px);
  border-color: rgba(47, 143, 91, 0.58);
  box-shadow: inset 0 0 0 1px rgba(47, 143, 91, 0.18);
  outline: none;
}

.dropzone-inner {
  max-width: 520px;
  text-align: center;
}

.drop-kicker {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
}

.dropzone h2 {
  margin: 0;
  font-size: clamp(1.9rem, 3vw, 3rem);
  letter-spacing: -0.04em;
}

.drop-copy {
  margin: 16px auto 0;
  color: var(--muted);
  line-height: 1.75;
}

.ghost-button,
.primary-button {
  font: inherit;
  border: none;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, opacity 160ms ease;
}

.ghost-button {
  margin-top: 22px;
  padding: 14px 20px;
  border-radius: 999px;
  background: rgba(24, 34, 47, 0.06);
  color: var(--ink);
}

.ghost-button:hover,
.primary-button:hover {
  transform: translateY(-1px);
}

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

.panel-head h3,
.option-title {
  margin: 0;
  font-size: 1rem;
}

.counter,
.mono-label {
  color: var(--muted);
  font-size: 0.82rem;
}

.file-panel {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
}

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

.file-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--panel-strong);
  border: 1px solid rgba(24, 34, 47, 0.08);
}

.file-meta strong,
.file-meta span {
  display: block;
}

.file-meta span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.88rem;
}

.file-tag {
  align-self: start;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(94, 163, 111, 0.14);
  color: var(--accent-2);
  font-size: 0.8rem;
  white-space: nowrap;
}

.control-panel {
  display: grid;
  gap: 22px;
  align-content: start;
}

.option-group {
  display: grid;
  gap: 14px;
}

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

.dpi-option {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 16px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(24, 34, 47, 0.1);
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.dpi-option input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.dpi-option span {
  font-weight: 700;
}

.dpi-option small {
  color: var(--muted);
}

.dpi-option:has(input:checked) {
  background: linear-gradient(135deg, rgba(47, 143, 91, 0.12), rgba(183, 222, 138, 0.26));
  border-color: rgba(47, 143, 91, 0.45);
  transform: translateY(-1px);
}

.status-card {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(248, 255, 249, 0.94));
  border: 1px solid var(--line);
}

.dependency-status {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.dependency-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(24, 34, 47, 0.1);
  background: rgba(255, 255, 255, 0.8);
}

.dependency-chip.ok {
  color: #166534;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
}

.dependency-chip.ng {
  color: #991b1b;
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.25);
}

.progress-track {
  height: 12px;
  margin-top: 14px;
  border-radius: 999px;
  background: rgba(24, 34, 47, 0.08);
  overflow: hidden;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--accent-3), var(--accent-2));
  transition: width 200ms ease;
}

.status-message {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.primary-button {
  width: 100%;
  padding: 18px 22px;
  border-radius: 18px;
  background: linear-gradient(135deg, #1e5d3f, #2f8f5b);
  color: #fff;
  box-shadow: 0 18px 28px rgba(30, 93, 63, 0.18);
}

.primary-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tips {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
}

.tips p {
  margin: 0 0 10px;
  font-weight: 700;
}

.tips ul {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.7;
}

@media (max-width: 980px) {
  .site-header,
  .hero-grid,
  .workspace {
    grid-template-columns: 1fr;
  }

  .hero-badges {
    justify-content: flex-start;
  }

  .site-header,
  .hero-topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .tool-nav {
    justify-content: flex-start;
  }
}

@media (max-width: 640px) {
  .page-shell {
    width: min(100% - 20px, 100%);
    padding-top: 14px;
  }

  .hero-card,
  .panel {
    padding: 18px;
    border-radius: 22px;
  }

  .dropzone {
    min-height: 280px;
    padding: 20px;
  }

  .dpi-grid {
    grid-template-columns: 1fr;
  }
}
