:root {
  --red: #e10600;
  --red-dark: #b10500;
  --good: #16a34a;
  --bad: #e10600;
  --sans: Inter, "Segoe UI", sans-serif;
  color-scheme: dark;
  --bg: #0a0a0a;
  --bg-2: #111111;
  --card: #141414;
  --ink: #f5f5f5;
  --muted: #a3a3a3;
  --dim: #737373;
  --line: #2a2a2a;
  --header: rgba(10, 10, 10, 0.92);
  --hero: #050505;
  --chip: #1c1c1c;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f4f4;
  --bg-2: #ffffff;
  --card: #ffffff;
  --ink: #111111;
  --muted: #5c5c5c;
  --dim: #8a8a8a;
  --line: #e4e4e4;
  --header: rgba(255, 255, 255, 0.94);
  --hero: #0a0a0a;
  --chip: #f7f7f7;
  --shadow: 0 16px 36px rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--sans);
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 28px;
  background: var(--header);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.14em;
  font-size: 14px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #0a0a0a;
  color: var(--red);
}

.brand-mark svg,
.section-title svg,
.secure-icon svg,
.fmt-icon svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark svg { width: 16px; height: 16px; }

.header-tools { display: flex; align-items: center; gap: 18px; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.lang-switch { position: relative; display: inline-flex; }
.lang-switch select {
  appearance: none;
  border: 1px solid var(--line);
  background: var(--chip) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='none' stroke='%23a3a3a3' stroke-width='1.6' d='M1 1.5 6 6.5 11 1.5'/%3E%3C/svg%3E") no-repeat right 10px center;
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 30px 7px 12px;
  font-size: 12px;
  font-weight: 650;
  max-width: 168px;
}
html[dir="rtl"] .lang-switch select { background-position: left 10px center; padding: 7px 12px 7px 30px; }
.nav { display: flex; gap: 18px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 500; }
.nav a:hover { color: var(--ink); }

.theme-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--chip);
}

.theme-switch button {
  border: 0;
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 650;
}

.theme-switch button.is-on {
  background: var(--red);
  color: white;
}

.hero {
  position: relative;
  z-index: 1;
  padding: 28px 24px 8px;
  overflow: visible;
  background:
    radial-gradient(ellipse 55% 80% at 100% 0%, rgba(225, 6, 0, 0.28), transparent 55%),
    var(--hero);
  color: #f5f5f5;
}

body.picker-open .pair-card { z-index: 6; }

.hero-glow, .hero-grid {
  position: absolute;
  pointer-events: none;
}
.hero-glow {
  width: 560px;
  height: 560px;
  right: -120px;
  top: -180px;
  background: radial-gradient(circle, rgba(225, 6, 0, 0.42), transparent 68%);
  filter: blur(6px);
  animation: glow 8s ease-in-out infinite;
}
.hero-grid {
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at 30% 40%, #000 10%, transparent 72%);
}

.hero-inner {
  position: relative;
  width: min(1040px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.hero-copy h1 {
  margin: 0;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.02;
  letter-spacing: -0.045em;
}

.hero-copy p {
  margin: 8px 0 0;
  max-width: 38rem;
  color: #cfcfcf;
  font-size: 15px;
  line-height: 1.45;
}

.tool-row {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 14px;
  align-items: start;
}
.pair-card {
  position: relative;
  z-index: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
}
.pair-stage {
  position: relative;
  max-width: none;
}
.pair-floor { display: none; }
.pair-wrap { position: relative; }

.pair-bar {
  display: grid;
  grid-template-columns: 1fr 84px 1fr;
  align-items: stretch;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 24px;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1a1a, #0c0c0c);
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.pair-end {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  min-height: 0;
  padding: 14px 14px;
  border: 0;
  background: transparent;
  color: white;
  text-align: left;
}

.pair-end:hover { background: rgba(255, 255, 255, 0.04); }
.pair-end.is-target {
  background: linear-gradient(180deg, rgba(225, 6, 0, 0.22), rgba(225, 6, 0, 0.08));
}
.pair-end.is-target:hover { background: linear-gradient(180deg, rgba(225, 6, 0, 0.3), rgba(225, 6, 0, 0.12)); }
.pair-kicker {
  color: #9a9a9a;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pair-end.is-target .pair-kicker { color: #ff8a84; }
.pair-main { display: flex; align-items: center; gap: 10px; }
.fmt-name { font-size: 26px; font-weight: 750; letter-spacing: -0.05em; line-height: 1; }
.fmt-icon svg { width: 28px; height: 28px; color: #fff; }
.pair-end.is-target .fmt-icon svg { color: #ffb0ab; }
.pair-change { color: #c8c8c8; font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }

.pair-bridge {
  display: grid;
  place-items: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #070707;
}
.pair-bridge b {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: radial-gradient(circle at 32% 28%, #ff5a52, #e10600 42%, #7a0400 78%);
  color: white;
  box-shadow:
    0 10px 20px rgba(225, 6, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.pair-bridge svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html[dir="rtl"] .pair-bridge svg { transform: scaleX(-1); }

.popover {
  position: absolute;
  z-index: 6;
  top: calc(100% + 10px);
  left: 0;
  width: min(520px, calc(100vw - 32px));
  max-height: 320px;
  overflow: auto;
  padding: 12px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.popover-label {
  margin: 8px 4px 6px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.popover-grid, .pills { display: flex; flex-wrap: wrap; gap: 6px; }

.popover button, .pill {
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.pill {
  border-radius: 999px;
  background: var(--bg);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  text-transform: uppercase;
  padding: 8px 11px;
}

.popover button.is-on, .popover button:hover, .pill:hover { border-color: var(--red); color: var(--red); }

.stage {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 14px;
  width: min(1080px, calc(100% - 32px));
  margin: 8px auto 28px;
}

.panel-card {
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.pending { margin: 0 0 12px; color: var(--muted); text-align: left; }

.dropzone {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 0;
  padding: 8px 4px 4px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: var(--chip);
}
.tool-row .select-btn { grid-column: 1 / -1; width: 100%; }

.dropzone:hover, body.is-drag .dropzone { border-color: var(--red); }

.step-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(225, 6, 0, 0.55);
  border-radius: 14px;
  background: #0a0a0a;
  color: var(--red);
  font-weight: 750;
  letter-spacing: 0.04em;
}

.drop-copy h2 { margin: 0; font-size: 22px; letter-spacing: -0.03em; }
.drop-copy p, .muted, .hint, .file-meta, .foot, .status { color: var(--muted); }
.drop-copy p { margin: 4px 0 0; }

.select-btn, .ghost-btn, .text-btn { border-radius: 12px; font-weight: 700; }
.select-btn {
  border: 0;
  background: var(--red);
  color: white;
  padding: 14px 18px;
  min-width: 148px;
}
.select-btn:hover { background: var(--red-dark); }
.select-btn:disabled { opacity: 0.6; cursor: progress; }
.go { width: 100%; min-height: 52px; font-size: 16px; }

.ghost-btn, .text-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 10px 12px;
}
.text-btn { color: var(--muted); }
.ghost-btn:hover, .text-btn:hover { border-color: var(--red); color: var(--red); }

.block-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.block-label b { font-weight: 750; }

.pair-summary {
  margin: 0 0 4px;
  font-size: 18px;
  font-weight: 750;
  letter-spacing: -0.04em;
}
.block-label span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid rgba(225, 6, 0, 0.55);
  background: #0a0a0a;
  color: var(--red);
  letter-spacing: 0;
}

.file-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--chip);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 52px;
  padding: 0 10px;
  border-radius: 16px;
  border: 1px solid rgba(225, 6, 0, 0.55);
  background: #0a0a0a;
  color: white;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.file-name { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.file-meta, .hint, .status, .foot p, .muted { margin: 0; line-height: 1.5; }
.file-actions { display: flex; gap: 8px; }

.preview { margin-top: 10px; }
.preview:empty { display: none; margin: 0; }
#source-preview { max-height: 168px; overflow: hidden; }
#source-preview:empty { max-height: 0; overflow: visible; }
.preview-img, .preview video, .preview audio, .preview-frame { width: 100%; border-radius: 14px; }
#source-preview video, #source-preview .preview-img, #source-preview audio { max-height: 168px; display: block; }
#source-preview .preview-frame { height: 168px; }
.preview-img, .preview video {
  max-height: 200px;
  object-fit: contain;
  background:
    linear-gradient(45deg, rgba(225, 6, 0, 0.08) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(225, 6, 0, 0.08) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(225, 6, 0, 0.08) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(225, 6, 0, 0.08) 75%);
  background-size: 16px 16px;
  background-color: var(--chip);
}
.preview-frame { height: 280px; border: 0; background: var(--bg-2); }

.hint { margin: 0 0 8px; }
.targets { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; }
.group-label {
  margin: 0 0 4px;
  color: var(--dim);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.fmt-grid { display: flex; flex-wrap: wrap; gap: 6px; }
.fmt {
  text-align: left;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 6px 10px;
}
.fmt strong { display: block; font-size: 12px; letter-spacing: 0.04em; }
#target-panel .fmt small { display: none; }
.fmt.is-on { border-color: var(--red); background: rgba(225, 6, 0, 0.08); box-shadow: inset 0 0 0 1px var(--red); }

.options {
  display: grid;
  gap: 12px;
  margin-top: 0;
}
.options:empty { display: none; }
#pair-hint:empty { display: none; }
.edit-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  border: 0;
  border-radius: 0;
  overflow: visible;
}
.edit-row {
  display: grid;
  grid-template-columns: minmax(92px, 128px) minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--chip);
}
.edit-row > span:first-child { color: var(--muted); font-size: 13px; font-weight: 650; }
.edit-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.edit-row input[type="number"],
.edit-row select {
  width: 96px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  padding: 8px 10px;
}
.edit-row .ghost-btn { padding: 8px 10px; font-size: 12px; }
.opt { display: grid; gap: 6px; font-size: 13px; }
.opt-head { display: flex; justify-content: space-between; gap: 12px; }
.opt input { width: 100%; accent-color: var(--red); }
.quiet { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 13px; }

#target-panel .go { margin-top: 0; }
#target-panel .hint { text-align: left; }
.action-dock {
  position: sticky;
  bottom: 8px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 10px;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}
.action-dock .go {
  width: auto;
  min-height: 34px;
  padding: 6px 14px;
  font-size: 13px;
}
.action-dock .hint {
  margin: 0;
  flex: 1 1 140px;
  font-size: 12px;
  line-height: 1.25;
}
.action-dock .status {
  margin: 0;
  min-height: 0;
  flex: 1 1 100%;
  text-align: left;
  font-size: 12px;
}
.action-dock .status:empty { display: none; }
.action-dock .bar { flex: 1 1 100%; height: 2px; }
.bar { height: 3px; overflow: hidden; border-radius: 99px; background: var(--line); }
.bar span { display: block; width: 35%; height: 100%; background: var(--red); animation: slide 1s ease-in-out infinite; }
.status { min-height: 1.3em; margin-top: 12px; text-align: center; }
.status.is-bad { color: var(--bad); }
.status.is-ok { color: var(--good); }

.result { padding-top: 4px; }
.result .preview-img, .result video { max-height: 180px; }
.result-name { margin: 0 0 10px; font-weight: 700; }
.download { display: inline-flex; margin-top: 12px; text-decoration: none; }

.info { width: min(1080px, calc(100% - 40px)); margin: 12px auto 28px; }
.info-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.9fr;
  gap: 20px;
  align-items: stretch;
}
.info-card {
  position: relative;
  overflow: hidden;
  padding: 26px 26px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow);
}
.info-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), transparent 72%);
}
.catalog-card { grid-column: 1; grid-row: 1; }
#blog-card a { color: var(--red); }
#security { grid-column: 2; grid-row: 1; }
.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.section-title svg { width: 16px; height: 16px; color: var(--red); }
.info-card .muted { margin-top: 12px; }
.cat-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.cat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  background: var(--chip);
  border-radius: 999px;
  padding: 8px 12px;
  color: var(--muted);
  font-size: 13px;
}
.cat strong { font-weight: 650; color: var(--ink); }
.cat em { font-style: normal; font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--dim); }
.cat.is-on { border-color: var(--red); color: var(--red); background: rgba(225, 6, 0, 0.08); }
.cat.is-on strong { color: var(--red); }
.cat svg { width: 14px; height: 14px; }

.catalog-split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 14px;
  margin-top: 18px;
}
.mini-panel {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--chip);
}
.split-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: var(--dim);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.common { display: grid; gap: 8px; }
.chip {
  display: grid;
  gap: 2px;
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  border-radius: 12px;
  padding: 10px 12px;
  text-align: left;
}
.chip .pair { display: flex; gap: 8px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; font-weight: 750; }
.chip small { display: block; color: var(--muted); font-size: 12px; }
.chip.is-on, .chip:hover { border-color: var(--red); }
.chip.is-on .pair, .chip:hover .pair { color: var(--red); }

.secure-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 14px; }
.secure-list li { display: flex; gap: 10px; color: var(--muted); font-size: 14px; line-height: 1.45; }
.secure-list li > span:last-child { display: grid; gap: 2px; }
.secure-list strong { color: var(--ink); }
.secure-icon {
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(225, 6, 0, 0.12);
  color: var(--red);
}
.secure-icon svg { width: 15px; height: 15px; }

.code {
  margin: 16px 0 0;
  padding: 14px 16px;
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  font-family: ui-monospace, Consolas, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.pair-guide, .guide-page {
  width: min(920px, calc(100% - 32px));
  margin: 8px auto 28px;
}
.pair-guide, .guide-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 8px 22px 18px;
}
.guide-page h1 { font-size: clamp(32px, 5vw, 48px); letter-spacing: -0.04em; margin: 0 0 16px; }
.guide-page .kicker, .crumbs { color: var(--dim); font-size: 13px; margin: 0 0 8px; }
.crumbs a, .pair-guide a, .guide-body a { color: var(--red); }
.pair-guide h2, .guide-body h2 { font-size: 22px; margin: 18px 0 8px; }
.pair-guide p, .guide-body p, .faq dd { color: var(--muted); line-height: 1.65; }
.faq { margin: 0; }
.faq dt { margin-top: 14px; font-weight: 700; }
.faq dd { margin: 4px 0 0; }
.guide-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; margin: 14px 0; }
.guide-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--chip);
  text-decoration: none;
}
.guide-card b { color: var(--ink); }
.guide-card span { color: var(--muted); font-size: 13px; line-height: 1.45; }
.guide-card:hover { border-color: var(--red); }
.guide-action { margin: 16px 0; }
.guide-body .guide-action .select-btn { display: inline-flex; text-decoration: none; color: #fff; }

.foot {
  width: min(1040px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 36px;
  border-top: 1px solid var(--line);
}
.seo-links { margin-bottom: 16px; }
.seo-links p {
  margin: 0 0 10px;
  color: var(--dim);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.seo-links nav { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.seo-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
}
.seo-links a:hover, .seo-links a.is-on { color: var(--red); }
.noscript { width: min(860px, calc(100% - 32px)); margin: 12px auto; }

@media (max-width: 800px) {
  .nav { display: none; }
  .hero { padding: 20px 16px 6px; }
  .hero-copy h1 { font-size: clamp(26px, 8vw, 34px); }
  .dropzone, .file-row, .info-grid, .catalog-split, .tool-row, .edit-form { grid-template-columns: 1fr; }
  .catalog-card, #security { grid-column: auto; grid-row: auto; }
  .dropzone { justify-items: start; }
  .file-row { grid-template-columns: auto minmax(0, 1fr); }
  .file-actions { grid-column: 1 / -1; flex-wrap: wrap; }
  .pair-bar { grid-template-columns: minmax(0, 1fr) 44px minmax(0, 1fr); }
  .pair-end { padding: 12px 10px; gap: 6px; }
  .pair-bridge b { width: 36px; height: 36px; }
  .fmt-name { font-size: 20px; }
  .edit-row { grid-template-columns: 1fr; gap: 6px; }
  .site-header { height: auto; min-height: 64px; padding: 10px 16px; }
  .header-tools { gap: 8px; }
  .lang-switch select { max-width: 126px; }
  .panel-card { padding: 14px; }
  .stage { width: min(1080px, calc(100% - 20px)); }
}

@media (max-width: 420px) {
  .pair-bar { grid-template-columns: 1fr; }
  .pair-bridge { min-height: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  .bar span, .hero-glow { animation: none; }
  html { scroll-behavior: auto; }
}

@keyframes slide {
  from { transform: translateX(-120%); }
  to { transform: translateX(320%); }
}
@keyframes glow {
  0%, 100% { opacity: 0.75; }
  50% { opacity: 1; }
}
