:root {
  --theme-transition-duration: 500ms;
  --page: #f7f5ff;
  --warm: #fff8f1;
  --cool: #eff7ff;
  --surface: #ffffff;
  --text: #2d2b3d;
  --muted: #686579;
  --line: #e1ddec;
  --soft-line: #ece8f3;
  --control-line: #7c748f;
  --danger: #b42318;
  --success: #16794b;
  --accent: #ff5a3c;
  --accent-rgb: 255 90 60;
  --accent-ink: #9a2512;
  --action: #b22f18;
  --action-2: #9a2512;
  --focus: #5b21b6;
  --shadow: 0 18px 50px rgb(45 43 61 / 9%);
  --radius: 1.25rem;
  --container: 70rem;
  --header-height: 3.75rem;
  --motion-fast: 240ms;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light dark;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.72; }
a { color: inherit; }
svg { display: block; }

section[id],
#top {
  scroll-margin-top: calc(var(--header-height) + 1rem);
}

.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;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  top: 0.5rem;
  left: 0.5rem;
  z-index: 300;
  padding: 0.7rem 1rem;
  border-radius: 0.5rem;
  background: var(--text);
  color: #fff;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.app {
  min-height: 100vh;
}

.app[data-platform="youtube"] {
  --accent: #ff5a3c;
  --accent-rgb: 255 90 60;
  --accent-ink: #9a2512;
  --action: #b22f18;
  --action-2: #9a2512;
}

.app[data-platform="instagram"] {
  --accent: #b054f5;
  --accent-rgb: 176 84 245;
  --accent-ink: #7321a8;
  --action: #7b259f;
  --action-2: #8d225e;
}

.app[data-platform="tiktok"] {
  --accent: #00a89f;
  --accent-rgb: 0 168 159;
  --accent-ink: #00645f;
  --action: #006d67;
  --action-2: #961f4a;
}

.container {
  width: min(calc(100% - 2rem), var(--container));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  min-height: var(--header-height);
  border-bottom: 1px solid rgb(225 221 236 / 88%);
  background: rgb(247 245 255 / 96%);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 850;
  line-height: 1.05;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  flex: 0 0 auto;
  padding: 0.44rem;
  border-radius: 0.68rem;
  background-color: var(--action);
  color: #fff;
  transform-origin: 35% 50%;
  animation: logo-arrive 480ms cubic-bezier(.2, .8, .2, 1) both;
  transition: background-color var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.brand:hover .brand-mark { transform: translateX(0.14rem); }

.brand small {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.desktop-nav { display: none; }

.menu-button,
.menu-close {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
}

.menu-button svg,
.menu-close svg {
  width: 1.3rem;
  height: 1.3rem;
}

.mobile-menu {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 100;
}

.menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgb(0 0 0 / 10%);
  opacity: 0;
  transition: opacity 180ms ease;
}

.mobile-menu.is-open .menu-backdrop { opacity: 1; }

.menu-panel {
  position: relative;
  width: min(calc(100% - 2rem), 20rem);
  max-height: calc(100dvh - var(--header-height) - 1rem);
  margin: 0.5rem 1rem 0 auto;
  padding: 0.7rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 40px rgb(45 43 61 / 16%);
}

.menu-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.25rem;
  padding-left: 0.7rem;
  font-weight: 850;
}

.mobile-nav {
  display: grid;
  gap: 0.15rem;
}

.mobile-nav a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0.55rem 0.7rem;
  border-radius: 0.7rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
}

.mobile-nav a:hover { background: var(--page); }

.hero {
  position: relative;
  isolation: isolate;
  padding: 0.9rem 0 2.6rem;
  overflow: hidden;
  background: linear-gradient(180deg, var(--warm), var(--page));
}

.hero-flow {
  position: absolute;
  z-index: -1;
  top: 0.5rem;
  left: 50%;
  width: min(90rem, 150%);
  height: 14rem;
  color: var(--accent);
  opacity: 0.16;
  transform: translateX(-50%);
  pointer-events: none;
  transition: color var(--motion-fast) ease;
}

.hero-flow path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-dasharray: 1300;
  animation: draw-flow 480ms ease-out both;
  vector-effect: non-scaling-stroke;
}

.hero-inner { text-align: center; }
.hero-eyebrow { display: none; }
h1, h2, h3, p { margin-top: 0; }

h1 {
  max-width: 29ch;
  margin: 0 auto;
  font-size: clamp(1.65rem, 7.5vw, 2.55rem);
  line-height: 1.09;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.accent-text {
  background: linear-gradient(100deg, var(--action), var(--action-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-copy {
  max-width: 39rem;
  margin: 0.3rem auto 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.platform-tabs {
  width: min(100%, 35rem);
  margin: 0.75rem auto 0;
  padding: 0.25rem;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.2rem;
  border: 1px solid var(--control-line);
  border-radius: 0.95rem;
  background: rgb(255 255 255 / 82%);
}

.platform-tab {
  min-width: 0;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
  padding: 0.35rem 0.15rem;
  border: 0;
  border-radius: 0.7rem;
  background-color: transparent;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  transition:
    background-color var(--motion-fast) ease,
    color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.platform-tab[aria-selected="true"] {
  background-color: rgb(var(--accent-rgb) / 12%);
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 18%);
}

.platform-tab.is-auto-detected {
  animation: tab-emphasis 230ms ease-out;
}

.platform-tab svg {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
}

.form-card {
  width: min(100%, 46rem);
  margin: 0.65rem auto 0;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-top-color: var(--accent);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  text-align: left;
  transition: border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.form-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 850;
}

.form-row {
  display: grid;
  gap: 0.6rem;
}

.input-wrap {
  position: relative;
  min-width: 0;
}

.url-input {
  width: 100%;
  min-width: 0;
  height: 54px;
  padding: 0 3.5rem 0 0.9rem;
  border: 1px solid var(--control-line);
  border-radius: 0.8rem;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
}

.url-input:hover { border-color: #625a74; }

.url-input:focus {
  border-color: var(--accent-ink);
  outline: 3px solid rgb(var(--accent-rgb) / 18%);
}

.url-input[aria-invalid="true"] { border-color: var(--danger); }

.input-action {
  position: absolute;
  top: 5px;
  right: 5px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0.65rem;
  background-color: rgb(var(--accent-rgb) / 11%);
  color: var(--accent-ink);
  transition: background-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.input-action:hover { background-color: rgb(var(--accent-rgb) / 20%); }

.input-action svg {
  width: 1.15rem;
  height: 1.15rem;
}

.primary-button,
.secondary-button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border-radius: 0.8rem;
  padding: 0.7rem 1rem;
  font-weight: 850;
  text-decoration: none;
}

.primary-button {
  border: 1px solid transparent;
  background-color: var(--action);
  color: #fff;
  box-shadow: 0 10px 24px rgb(var(--accent-rgb) / 19%);
  transition:
    background-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}

.primary-button:not(:disabled):not([aria-disabled="true"]):hover { transform: translateY(-1px); }

.secondary-button {
  border: 1px solid var(--control-line);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.secondary-button:hover {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
}

.form-row .primary-button { width: 100%; }

.submit-spinner {
  width: 1rem;
  height: 1rem;
  display: none;
  flex: 0 0 auto;
  border: 2px solid rgb(255 255 255 / 48%);
  border-top-color: #fff;
  border-radius: 50%;
}

#submit-button.is-analyzing .submit-spinner {
  display: block;
  animation: spin 700ms linear infinite;
}

#submit-button.is-analyzing { cursor: wait; }

#submit-button[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.84;
}

.form-help,
.form-error,
.form-status {
  margin: 0.5rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.form-help { color: var(--muted); }
.form-error { color: var(--danger); font-weight: 750; }
.form-status {
  min-height: 1.4em;
  color: var(--muted);
  font-weight: 700;
}

.form-status[data-state="success"] { color: var(--success); }
.form-status[data-state="warning"] { color: var(--danger); }

.form-support {
  width: min(100%, 46rem);
  margin: 0.6rem auto 0;
  padding: 0 0.25rem;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-align: center;
}

.result-card {
  position: relative;
  width: min(100%, 53rem);
  margin: 1rem auto 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 16px 42px rgb(45 43 61 / 8%);
  text-align: left;
  overflow: hidden;
}

.media-summary {
  display: grid;
  align-items: start;
  gap: 0.9rem;
}

.thumbnail-shell {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.9rem;
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent-ink);
}

.result-thumbnail {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumbnail-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.thumbnail-fallback svg {
  width: 2.2rem;
  height: 2.2rem;
}

.result-platform {
  margin: 0 0 0.1rem;
  color: var(--accent-ink);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.result-card h2 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.25rem;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.result-meta,
.result-notice,
.format-note,
.job-metrics,
.file-details {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.result-notice {
  color: var(--accent-ink);
  font-weight: 700;
}

.suggestion-link {
  color: inherit;
  text-decoration: underline;
}

.format-note[data-state="error"] {
  color: var(--danger);
  font-weight: 750;
}

.download-form,
.job-panel,
.completion-panel,
.cancelled-panel {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--soft-line);
}

.format-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.media-type-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.media-type-heading {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 850;
}

.media-type-option {
  position: relative;
  min-width: 0;
  min-height: 48px;
  display: grid;
  place-items: center;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  background: var(--surface);
  font-weight: 850;
  text-align: center;
  cursor: pointer;
}

.media-type-option:has(input:checked) {
  border-color: var(--accent-ink);
  background: rgb(var(--accent-rgb) / 8%);
  color: var(--accent-ink);
}

.media-type-option:has(input:focus-visible) {
  outline: 3px solid rgb(var(--accent-rgb) / 22%);
  outline-offset: 2px;
}

.media-type-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.format-fieldset legend,
.job-panel h3,
.completion-panel h3,
.cancelled-panel h3,
.error-panel h3 {
  margin-bottom: 0.7rem;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 850;
}

.format-group + .format-group { margin-top: 0.85rem; }

.quick-format-grid {
  display: grid;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.format-group-title {
  margin: 0 0 0.45rem;
  font-size: 0.8rem;
  font-weight: 850;
}

.format-options {
  display: grid;
  gap: 0.45rem;
}

.format-disclosure-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
}

.format-disclosure {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-align: left;
}

.format-disclosure::after {
  content: "⌄";
  color: var(--accent-ink);
  font-size: 1.1rem;
  line-height: 1;
  transform: rotate(0);
  transition: transform var(--motion-fast) ease;
}

.format-disclosure[aria-expanded="true"]::after { transform: rotate(180deg); }

.format-option-count {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.extra-format-options { margin-top: 0.55rem; }

.format-option {
  position: relative;
  min-width: 0;
  min-height: 64px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 0.22rem 0.65rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--control-line);
  border-radius: 0.8rem;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.format-option:has(input:checked) {
  border-color: var(--accent-ink);
  background: rgb(var(--accent-rgb) / 8%);
  box-shadow: inset 0 0 0 1px var(--accent-ink);
}

.format-option input {
  -webkit-appearance: none;
  appearance: none;
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  border: 2px solid var(--control-line);
  border-radius: 50%;
  background: var(--surface);
  accent-color: var(--action);
}

.format-option input:checked {
  border-color: var(--action);
  background: radial-gradient(circle, var(--action) 0 42%, transparent 46%);
}

.format-option input:focus-visible {
  outline: 3px solid rgb(var(--accent-rgb) / 22%);
  outline-offset: 3px;
}

.format-card-main {
  min-width: 0;
  grid-column: 2;
  display: grid;
  gap: 0.2rem;
}

.format-role-list,
.format-label-row {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.3rem;
}

.format-role {
  color: var(--accent-ink);
  font-size: 0.72rem;
  font-weight: 900;
}

.format-label {
  min-width: 0;
  font-size: 0.9rem;
  font-weight: 850;
  overflow-wrap: anywhere;
}

.format-orientation-badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.08rem 0.4rem;
  border-radius: 999px;
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent-ink);
  font-size: 0.7rem;
  font-weight: 900;
  white-space: nowrap;
}

.format-size {
  min-width: 0;
  grid-column: 2;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 850;
  text-align: left;
  overflow-wrap: anywhere;
}

.format-estimate-note {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.download-form .primary-button,
.completion-panel .primary-button,
.cancelled-panel .primary-button {
  width: 100%;
  margin-top: 0.85rem;
}

.job-status {
  margin: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.stage-timeline {
  display: grid;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
}

.stage-item {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.stage-marker {
  width: 1.15rem;
  height: 1.15rem;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1;
  text-align: center;
}

.stage-item.is-complete { color: var(--text); }
.stage-item.is-complete .stage-marker {
  border-color: var(--success);
  background: rgb(22 121 75 / 10%);
  color: var(--success);
  font-weight: 950;
}

.stage-item.is-active {
  color: var(--text);
  font-weight: 900;
}

.stage-item.is-active .stage-marker {
  border-color: var(--accent-ink);
  color: var(--accent-ink);
  box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 24%);
  animation: stage-pulse 1.6s ease-out infinite;
}

.progress-track {
  position: relative;
  width: 100%;
  height: 0.7rem;
  margin-top: 0.75rem;
  overflow: hidden;
  border-radius: 999px;
  background: rgb(38 35 49 / 18%);
  box-shadow: inset 0 1px 2px rgb(20 18 31 / 16%);
}

.progress-value {
  position: relative;
  width: 0;
  height: 100%;
  overflow: hidden;
  border-radius: inherit;
  background: var(--accent);
  box-shadow: 0 1px 3px rgb(var(--accent-rgb) / 22%);
}

.progress-track:not(.is-indeterminate) .progress-value::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgb(255 255 255 / 28%) 50%, transparent 80%);
  transform: translateX(-100%);
  animation: progress-highlight 1.8s ease-in-out infinite;
}

.progress-track[data-stage="merging"] .progress-value,
.progress-track[data-stage="remuxing"] .progress-value,
.progress-track[data-stage="transcoding"] .progress-value {
  background: linear-gradient(90deg, #7654cf, #e6813f);
}

.progress-track[data-stage="mp3_encoding"] .progress-value { background: #db7330; }
.progress-track[data-stage="verifying"] .progress-value { background: #128f92; }
.progress-track[data-stage="ready"] .progress-value { background: var(--success); }

.progress-track.is-transfer-hold .progress-value {
  background: var(--accent);
}

.progress-track.is-indeterminate .progress-value {
  width: 100%;
  background: transparent;
  transition: none;
}

.progress-track.is-indeterminate::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    transparent 8%,
    rgb(255 255 255 / 65%) 50%,
    transparent 92%
  );
  transform: translateX(-100%);
  animation: progress-sweep 1.5s ease-in-out infinite;
}

.progress-track.is-indeterminate[data-stage="merging"],
.progress-track.is-indeterminate[data-stage="remuxing"],
.progress-track.is-indeterminate[data-stage="transcoding"] {
  background: rgb(118 84 207 / 20%);
}

.progress-track.is-indeterminate[data-stage="mp3_encoding"] { background: rgb(219 115 48 / 20%); }
.progress-track.is-indeterminate[data-stage="verifying"] { background: rgb(18 143 146 / 20%); }
.progress-track.is-indeterminate[data-stage="ready"] { background: rgb(22 121 75 / 20%); }

.inline-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.85rem;
}

.inline-actions .primary-button,
.inline-actions .secondary-button {
  width: 100%;
}

.completion-icon {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.75rem;
  border-radius: 50%;
  background: rgb(22 121 75 / 12%);
  color: var(--success);
}

.completion-icon svg {
  width: 1.7rem;
  height: 1.7rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.completion-panel.is-entering {
  animation: completion-in 360ms ease-out both;
}

.completion-panel.is-entering .completion-icon path {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: success-draw 620ms ease-out forwards;
}

.completion-message {
  margin: 0 0 0.65rem;
  color: var(--text);
  font-weight: 750;
}

.file-name {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  font-weight: 850;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.file-size {
  margin: 0.2rem 0 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.file-expiry {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.last-download-panel {
  margin-top: 1rem;
  padding: 0.85rem;
  border: 1px solid rgb(var(--accent-rgb) / 24%);
  border-radius: 0.8rem;
  background: rgb(var(--accent-rgb) / 6%);
}

.last-download-panel h3 {
  margin: 0;
  font-size: 0.92rem;
}

.last-download-name {
  margin: 0.25rem 0 0.65rem;
  display: -webkit-box;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.last-download-panel .primary-button,
.last-download-panel .secondary-button { width: 100%; }

.error-message {
  margin: 0;
  color: var(--danger);
  font-weight: 750;
  overflow-wrap: anywhere;
}

.section { padding: 3.25rem 0; }
#platforms { background: var(--warm); }
#how { background: var(--surface); }
#benefits { background: var(--cool); }
#privacy { background: var(--surface); }
#faq { background: var(--page); }

.section-heading {
  max-width: 43rem;
  margin-bottom: 1.55rem;
}

.kicker {
  margin-bottom: 0.3rem;
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.section h2 {
  margin-bottom: 0.55rem;
  font-size: clamp(1.72rem, 7.5vw, 2.45rem);
  line-height: 1.14;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.section-heading > p:last-child,
.info-card p,
.step-card p,
.benefit-card p,
.privacy-copy p {
  margin-bottom: 0;
  color: var(--muted);
}

.platform-grid {
  display: grid;
  border-block: 1px solid var(--line);
}

.info-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr);
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 0.25rem;
  cursor: default;
}

.info-card + .info-card { border-top: 1px solid var(--line); }

.card-icon {
  width: 3.1rem;
  height: 3.1rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: rgb(var(--card-rgb, 255 90 60) / 12%);
  color: var(--card-accent, var(--accent));
}

.card-icon svg {
  width: 1.45rem;
  height: 1.45rem;
}

.info-card h3,
.step-card h3,
.benefit-card h3 {
  margin-bottom: 0.25rem;
  font-size: 1.08rem;
  line-height: 1.3;
}

.platform-youtube { --card-accent: #c9351d; --card-rgb: 201 53 29; }
.platform-instagram { --card-accent: #8b2ec3; --card-rgb: 139 46 195; }
.platform-tiktok { --card-accent: #007b75; --card-rgb: 0 123 117; }

.steps-grid {
  position: relative;
  display: grid;
}

.steps-grid::before {
  content: "";
  position: absolute;
  top: 1.3rem;
  bottom: 1.3rem;
  left: 1.25rem;
  width: 2px;
  background: var(--line);
}

.step-card {
  position: relative;
  display: grid;
  grid-template-columns: 2.6rem minmax(0, 1fr);
  column-gap: 0.85rem;
  padding: 0 0 1.4rem;
}

.step-card:last-child { padding-bottom: 0; }

.step-number {
  z-index: 1;
  grid-row: 1 / span 2;
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 32%);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  transition: border-color var(--motion-fast) ease, color var(--motion-fast) ease;
}

.benefits-grid {
  display: grid;
  gap: 1.25rem;
}

.benefit-card {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
}
.benefit-card > div {
  flex: 1;
  min-width: 0;
}

.benefit-card .card-icon {
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: transparent;
  color: var(--accent-ink);
  box-shadow: inset 0 0 0 1px rgb(var(--accent-rgb) / 28%);
  transition: color var(--motion-fast) ease, box-shadow var(--motion-fast) ease;
}

.benefit-card .card-icon svg {
  width: 1.2rem;
  height: 1.2rem;
}

.privacy-layout {
  display: grid;
  gap: 1.35rem;
}

.privacy-copy h3 {
  margin-bottom: 0.45rem;
  font-size: 1.22rem;
}

.privacy-list {
  margin: 0;
  padding: 1.2rem 0 0;
  display: grid;
  gap: 0.75rem;
  border-top: 1px solid var(--line);
  list-style: none;
}

.privacy-list li {
  position: relative;
  padding-left: 1.65rem;
  color: var(--muted);
}

.privacy-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: 900;
}

.faq-list {
  border-top: 1px solid var(--control-line);
}

details {
  border-bottom: 1px solid var(--control-line);
  background: transparent;
}

summary {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 0;
  cursor: pointer;
  font-weight: 850;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }

summary::after {
  content: "+";
  flex: 0 0 auto;
  color: var(--accent-ink);
  font-size: 1.35rem;
  line-height: 1;
  transition: color var(--motion-fast) ease;
}

details[open] summary::after { content: "−"; }

details p {
  margin: 0;
  padding: 0 2rem 1rem 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.final-cta {
  padding: 3rem 0;
  background: var(--surface);
}

.cta-card {
  width: min(100%, 50rem);
  margin-inline: auto;
  padding: 1.7rem 1rem;
  border: 1px solid rgb(var(--accent-rgb) / 22%);
  border-radius: calc(var(--radius) + 0.2rem);
  background: rgb(var(--accent-rgb) / 8%);
  text-align: center;
  transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease;
}

.cta-card h2 {
  margin-bottom: 0.45rem;
  font-size: clamp(1.7rem, 7vw, 2.3rem);
  line-height: 1.15;
}

.cta-card p {
  max-width: 38rem;
  margin: 0 auto 1rem;
  color: var(--muted);
}

.site-footer {
  padding: 2rem 0;
  background: var(--text);
  color: #fff;
}

.footer-inner {
  display: grid;
  gap: 1.2rem;
}

.footer-copy {
  margin: 0;
  color: #f1eef7;
}

.footer-meta {
  margin: 0.3rem 0 0;
  color: #c9c3d5;
  font-size: 0.82rem;
}

.footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 1.25rem;
}

.footer-button {
  width: auto;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.5rem;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  color: inherit;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
  text-decoration-color: transparent;
  font: inherit;
  cursor: pointer;
  opacity: 0.82;
  transition:
    color 180ms ease,
    opacity 180ms ease,
    text-decoration-color 180ms ease,
    background-color 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.footer-button:hover,
.footer-button:focus-visible {
  color: #ffffff;
  opacity: 1;
  text-decoration-color: currentColor;
}

.footer-button:active {
  background: transparent;
}

.footer-button:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 4px;
  border-radius: 0.5rem;
}

.footer-report-wrap {
  position: relative;
  display: inline-flex;
}

.footer-report-button {
  border: 1px solid rgb(var(--accent-rgb) / 30%);
  border-radius: 2rem;
  padding: 0.25rem 0.8rem;
  background: rgb(var(--accent-rgb) / 5%);
  box-shadow: 0 0 10px rgb(var(--accent-rgb) / 5%);
  text-decoration-color: transparent !important;
}

.footer-report-button:hover,
.footer-report-button:focus-visible {
  background: rgb(var(--accent-rgb) / 15%);
  border-color: rgb(var(--accent-rgb) / 50%);
  box-shadow: 0 0 15px rgb(var(--accent-rgb) / 10%);
}

@keyframes report-pulse {
  0% { box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 40%); }
  70% { box-shadow: 0 0 0 10px rgb(var(--accent-rgb) / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(var(--accent-rgb) / 0%); }
}

@media (prefers-reduced-motion: no-preference) {
  .footer-report-button.is-pulsing {
    animation: report-pulse 2s ease-out 1;
    animation-delay: 1s;
  }
}

.footer-report-help {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: max-content;
  max-width: 260px;
  padding: 0.6rem 0.8rem;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--control-line);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
  box-shadow: 0 10px 25px rgb(45 43 61 / 15%);
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
  z-index: 100;
}

.footer-report-wrap:hover .footer-report-help,
.footer-report-button:focus-visible + .footer-report-help {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

html[dir="rtl"] .footer-report-help {
  left: auto;
  right: 50%;
  transform: translateX(50%) translateY(4px);
}

html[dir="rtl"] .footer-report-wrap:hover .footer-report-help,
html[dir="rtl"] .footer-report-button:focus-visible + .footer-report-help {
  transform: translateX(50%) translateY(0);
}

@media (max-width: 48rem) {
  .footer-report-help {
    left: auto;
    right: 0;
    transform: translateY(4px);
  }
  .footer-report-wrap:hover .footer-report-help,
  .footer-report-button:focus-visible + .footer-report-help {
    transform: translateY(0);
  }
  html[dir="rtl"] .footer-report-help {
    right: auto;
    left: 0;
    transform: translateY(4px);
  }
  html[dir="rtl"] .footer-report-wrap:hover .footer-report-help,
  html[dir="rtl"] .footer-report-button:focus-visible + .footer-report-help {
    transform: translateY(0);
  }
}

.site-footer :focus-visible { outline-color: #fff; }

.support-launcher {
  position: fixed;
  right: max(1rem, env(safe-area-inset-right));
  bottom: max(1rem, env(safe-area-inset-bottom));
  z-index: 55;
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 1px solid rgb(var(--accent-rgb) / 32%);
  border-radius: 50%;
  background: var(--surface);
  color: var(--accent-ink);
  box-shadow: 0 10px 28px rgb(45 43 61 / 16%);
  animation: support-pulse 3s infinite;
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    color var(--motion-fast) ease,
    opacity var(--motion-fast) ease,
    transform var(--motion-fast) ease,
    visibility var(--motion-fast) ease;
}

@keyframes support-pulse {
  0% { box-shadow: 0 10px 28px rgb(45 43 61 / 16%), 0 0 0 0 rgb(var(--accent-rgb) / 40%); }
  70% { box-shadow: 0 10px 28px rgb(45 43 61 / 16%), 0 0 0 12px rgb(var(--accent-rgb) / 0%); }
  100% { box-shadow: 0 10px 28px rgb(45 43 61 / 16%), 0 0 0 0 rgb(var(--accent-rgb) / 0%); }
}

.support-launcher:hover,
.support-launcher:focus-visible {
  border-color: var(--accent-ink);
  box-shadow: 0 12px 30px rgb(45 43 61 / 21%);
  transform: translateY(-2px);
}

.support-launcher.is-occluded {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
  transform: translateY(0.5rem);
}

.support-launcher svg {
  width: 1.45rem;
  height: 1.45rem;
}

.support-tooltip {
  position: absolute;
  right: calc(100% + 0.65rem);
  width: max-content;
  max-width: min(12rem, calc(100vw - 5.5rem));
  padding: 0.42rem 0.58rem;
  border-radius: 0.55rem;
  background: var(--text);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.3;
  opacity: 0;
  pointer-events: none;
  transform: translateX(0.25rem);
  transition: opacity 160ms ease, transform 160ms ease;
}

.support-launcher:hover .support-tooltip,
.support-launcher:focus-visible .support-tooltip {
  opacity: 1;
  transform: translateX(0);
}

body:has(#processing-dialog[open]) .support-launcher,
body:has(#support-dialog[open]) .support-launcher {
  visibility: hidden;
  pointer-events: none;
  opacity: 0;
}

dialog {
  width: min(calc(100% - 2rem), 32rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 70px rgb(20 18 30 / 26%);
}

dialog::backdrop { background: rgb(32 29 45 / 55%); }
dialog[open] { animation: dialog-in 180ms ease-out; }
.dialog-panel { padding: 1.1rem; }

.dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.9rem;
}

.dialog-head h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.dialog-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--control-line);
  border-radius: 0.7rem;
  background: var(--surface);
  color: var(--text);
  font-size: 1.35rem;
}

.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin-top: 1rem;
}

.dialog-body { overflow-wrap: anywhere; }
.dialog-body p { color: var(--muted); }
.dialog-body p:last-child { margin-bottom: 0; }

.support-dialog {
  width: min(calc(100% - 1rem), 42rem);
  max-height: calc(100dvh - 1rem);
  overflow: hidden;
}

.support-dialog-panel {
  max-height: calc(100dvh - 1rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.support-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.support-dialog-head h2 {
  margin: 0;
  font-size: 1.3rem;
  line-height: 1.3;
}

.support-dialog-content {
  min-width: 0;
  min-height: 0;
  padding: 1rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.support-description {
  margin: 0 0 1rem;
  color: var(--muted);
}

.support-form {
  min-width: 0;
  display: grid;
  gap: 1rem;
}

.support-field { min-width: 0; }

.support-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.support-label-row .form-label { margin-bottom: 0.35rem; }

.support-counter {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
}

.support-control {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  background: #fff;
  color: var(--text);
}

select.support-control { padding-right: 2.2rem; }

.support-control:hover { border-color: #625a74; }

.support-control:focus {
  border-color: var(--accent-ink);
  outline: 3px solid rgb(var(--accent-rgb) / 18%);
}

.support-control[aria-invalid="true"] { border-color: var(--danger); }

.support-message {
  min-height: 9rem;
  resize: vertical;
  line-height: 1.5;
}

.support-field-help,
.support-field-error {
  margin: 0.35rem 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
}

.support-field-help { color: var(--muted); }

.support-field-error {
  min-height: 1.1em;
  color: var(--danger);
  font-weight: 750;
}

.support-drop-zone {
  width: 100%;
  min-width: 0;
  border: 2px dashed var(--border-color);
  background: var(--bg-tertiary);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.2s, border-color 0.2s;
  text-align: center;

  min-height: 92px;
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  align-items: center;
  gap: 0.2rem 0.7rem;
  padding: 0.8rem;
  border: 1px dashed var(--control-line);
  border-radius: 0.8rem;
  background: var(--page);
  color: var(--text);
  cursor: pointer;
}

.support-drop-zone:hover,
.support-drop-zone.is-dragging {
  border-color: var(--accent-ink);
  background: rgb(var(--accent-rgb) / 8%);
}

.support-drop-zone[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.72;
}

.support-drop-zone:focus-visible {
  border-color: var(--accent-ink);
  outline: 3px solid rgb(var(--accent-rgb) / 18%);
  outline-offset: 2px;
}

.support-drop-zone svg {
  width: 1.7rem;
  height: 1.7rem;
  grid-row: 1 / span 2;
  color: var(--accent-ink);
}

.support-drop-zone span,
.support-drop-zone small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.support-drop-zone small {
  color: var(--muted);
  font-size: 0.76rem;
}

.support-preview-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 190px));
  gap: 0.75rem;
  align-items: start;
  justify-content: start;
  margin-top: 0.65rem;
}

.support-preview-item {
  position: relative;
  width: 100%;
  max-width: 190px;
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: var(--surface);
  overflow: hidden;
}

.support-preview-item img {
  display: block;
  width: 100%;
  height: 112px;
  object-fit: contain;
  border-radius: 0.55rem;
  background: var(--page);
}

.support-remove-file {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  width: 32px;
  height: 32px;
  min-width: 32px;
  padding: 0;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgb(255 255 255 / 92%);
  border: 1px solid var(--control-line);
  box-shadow: 0 2px 8px rgb(0 0 0 / 15%);
  z-index: 2;
  color: var(--muted);
  transition: all 0.2s ease;
}

.support-remove-file:hover {
  color: var(--accent-ink);
  background: rgb(var(--accent-rgb) / 10%);
}

.support-remove-file svg {
  width: 17px;
  height: 17px;
}

.support-add-more-screenshots {
  width: 100%;
  margin-top: 0.65rem;
}









.support-check {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  font-weight: 800;
}

.support-check input {
  width: 1.2rem;
  height: 1.2rem;
  flex: 0 0 auto;
  accent-color: var(--action);
}

.support-privacy {
  margin: -0.35rem 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.support-honeypot {
  position: fixed;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.support-error-summary {
  padding: 0.75rem;
  border: 1px solid rgb(180 35 24 / 35%);
  border-radius: 0.7rem;
  background: rgb(180 35 24 / 7%);
  color: var(--danger);
  font-size: 0.84rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.support-error-summary p,
.support-error-summary ul {
  margin: 0;
}

.support-error-summary ul {
  padding: 0.35rem 0 0 1.2rem;
}

.support-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 750;
}

.support-actions {
  position: sticky;
  bottom: -1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.55rem;
  margin: 0 -0.2rem -1rem;
  padding: 0.8rem 0.2rem max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--soft-line);
  background: var(--surface);
}

.support-submit-spinner {
  width: 1rem;
  height: 1rem;
  display: none;
  flex: 0 0 auto;
  border: 2px solid rgb(255 255 255 / 48%);
  border-top-color: #fff;
  border-radius: 50%;
}

#support-submit[aria-busy="true"] .support-submit-spinner {
  display: block;
  animation: spin 700ms linear infinite;
}

.support-success {
  padding: 0.6rem 0 0;
  text-align: center;
}

.support-success-icon {
  width: 3.4rem;
  height: 3.4rem;
  display: grid;
  place-items: center;
  margin: 0 auto 0.8rem;
  border-radius: 50%;
  background: rgb(22 121 75 / 10%);
  color: var(--success);
}

.support-success-icon svg {
  width: 1.8rem;
  height: 1.8rem;
}

.support-success h3 {
  margin: 0;
  font-size: 1.35rem;
}

.support-success p {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.processing-dialog {
  width: min(92vw, 57rem);
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}

.processing-dialog-panel {
  max-height: calc(100dvh - 2rem);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.processing-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1rem 0;
}

.processing-head h2 {
  margin: 0;
  font-size: 1.25rem;
  line-height: 1.3;
}

.processing-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem;
}

.processing-summary {
  display: grid;
  grid-template-columns: minmax(6.5rem, 8rem) minmax(0, 1fr);
  align-items: start;
  gap: 0.85rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--soft-line);
}

.processing-summary-copy { min-width: 0; }

.processing-thumbnail-shell {
  position: relative;
  isolation: isolate;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 0.8rem;
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent-ink);
}

.processing-thumbnail-background,
.processing-thumbnail,
.processing-thumbnail-fallback {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.processing-thumbnail-background {
  z-index: 0;
  object-fit: cover;
  filter: blur(12px) saturate(1.12);
  transform: scale(1.12);
}

.processing-thumbnail-shell::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: rgb(20 18 31 / 24%);
  pointer-events: none;
}

.processing-thumbnail {
  z-index: 2;
  object-fit: contain;
}

.processing-thumbnail-fallback {
  z-index: 3;
  display: grid;
  place-items: center;
  background: var(--soft-line);
  color: var(--muted);
}

.processing-thumbnail-fallback svg {
  width: 1.8rem;
  height: 1.8rem;
}

.processing-platform {
  margin: 0;
  color: var(--accent-ink);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.processing-media-title {
  margin: 0.1rem 0 0;
  display: -webkit-box;
  overflow: hidden;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1.35;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.processing-hashtags {
  margin: 0.25rem 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-selection {
  margin: 0.3rem 0 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
  overflow-wrap: anywhere;
}

.processing-dialog .job-panel,
.processing-dialog .completion-panel,
.processing-dialog .cancelled-panel,
.processing-dialog .error-panel {
  margin-top: 1rem;
  padding-top: 0;
  border-top: 0;
}

.processing-dialog .job-panel {
  min-height: 10rem;
}

.processing-dialog .inline-actions {
  position: sticky;
  bottom: 0;
  margin-inline: -1rem;
  padding: 0.85rem 1rem max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--soft-line);
  background: var(--surface);
}

.processing-dialog .job-panel .inline-actions {
  display: flex;
  justify-content: flex-end;
}

.processing-dialog .job-panel .inline-actions .secondary-button {
  width: auto;
  min-width: 8rem;
  min-height: 44px;
  padding-inline: 1rem;
}

@keyframes logo-arrive {
  0% { opacity: 0; transform: translateX(-0.45rem) rotate(-8deg); }
  65% { opacity: 1; transform: translateX(0.1rem) rotate(2deg); }
  100% { opacity: 1; transform: translateX(0) rotate(0); }
}

@keyframes draw-flow {
  from { stroke-dashoffset: 1300; opacity: 0; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes dialog-in {
  from { opacity: 0; transform: translateY(0.45rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes spin { to { transform: rotate(1turn); } }

@keyframes tab-emphasis {
  50% { box-shadow: inset 0 0 0 2px rgb(var(--accent-rgb) / 55%); }
}

@keyframes progress-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

@keyframes progress-highlight {
  0%, 30% { transform: translateX(-100%); }
  70%, 100% { transform: translateX(100%); }
}

@keyframes stage-pulse {
  70%, 100% { box-shadow: 0 0 0 0.42rem rgb(var(--accent-rgb) / 0%); }
}

@keyframes completion-in {
  from { opacity: 0; transform: translateY(0.4rem); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes success-draw {
  to { stroke-dashoffset: 0; }
}

@media (max-width: 47.99rem) {
  .support-launcher {
    right: max(0.8rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .site-footer {
    padding-bottom: max(5.5rem, calc(2rem + env(safe-area-inset-bottom)));
  }

  .processing-dialog {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .processing-dialog-panel {
    height: 100dvh;
    max-height: 100dvh;
  }

  .processing-head {
    padding-top: max(0.85rem, env(safe-area-inset-top));
  }

  .processing-body {
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .support-preview-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-preview-item {
    max-width: none;
  }

  .support-preview-item img {
    height: 100px;
  }

  .support-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
  }

  .support-actions .primary-button,
  .support-actions .secondary-button {
    width: 100%;
  }
}

@media (min-width: 48rem) {
  :root { --header-height: 4.4rem; }
  .container { width: min(calc(100% - 3rem), var(--container)); }
  .site-header, .header-inner { min-height: var(--header-height); }
  .menu-button { display: none; }

  .desktop-nav {
    display: flex;
    align-items: center;
    gap: 0.15rem;
  }

  .desktop-nav a {
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem 0.58rem;
    border-radius: 0.65rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 750;
  }

  .desktop-nav a:hover {
    background: var(--surface);
    color: var(--text);
  }

  .mobile-menu { display: none; }
  .hero { padding: 2.9rem 0 4rem; }
  .hero-flow { top: 1.2rem; height: 17rem; }

  .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.65rem;
    color: var(--accent-ink);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .hero-eyebrow::before {
    content: "";
    width: 1.6rem;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
  }

  h1 {
    max-width: 25ch;
    font-size: clamp(3rem, 5.4vw, 3.75rem);
    line-height: 1.07;
  }

  .hero-copy {
    margin-top: 0.4rem;
    font-size: 1rem;
  }

  .platform-tabs { margin-top: 1.25rem; }
  .platform-tab { font-size: 0.92rem; }
  .form-card { margin-top: 0.9rem; padding: 1rem; }
  .form-row { grid-template-columns: minmax(0, 1fr) auto; }
  .form-row .primary-button { width: auto; min-width: 12rem; }
  .media-summary { grid-template-columns: 13rem minmax(0, 1fr); }
  .quick-format-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .format-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inline-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }

  .processing-body {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: start;
    gap: 1.35rem;
  }

  .processing-summary {
    display: block;
    padding: 0 1.35rem 0 0;
    border-right: 1px solid var(--soft-line);
    border-bottom: 0;
  }

  .processing-summary-copy { margin-top: 0.85rem; }

  .processing-dialog .job-panel,
  .processing-dialog .completion-panel,
  .processing-dialog .cancelled-panel,
  .processing-dialog .error-panel {
    min-width: 0;
    margin-top: 0;
  }

  .processing-dialog .inline-actions {
    bottom: 0;
    margin-inline: 0;
    padding-inline: 0;
  }

  .section { padding: 4.75rem 0; }

  .platform-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-block: 0;
  }

  .info-card {
    grid-template-columns: 3.6rem minmax(0, 1fr);
    padding: 0.7rem 1.25rem;
  }

  .info-card:first-child { padding-left: 0; }
  .info-card + .info-card { border-top: 0; border-left: 1px solid var(--line); }

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

  .steps-grid::before {
    top: 1.25rem;
    right: 8%;
    bottom: auto;
    left: 8%;
    width: auto;
    height: 2px;
  }

  .step-card {
    display: block;
    padding: 0 1rem;
    text-align: center;
  }

  .step-number { margin: 0 auto 0.75rem; }
  .benefits-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.6rem 2rem; }

  .privacy-layout {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 2.5rem;
    align-items: start;
  }

  .privacy-list {
    padding: 0 0 0 2rem;
    border-top: 0;
    border-left: 1px solid var(--line);
  }

  .final-cta { padding: 4rem 0; }
  .cta-card { padding: 2.3rem 2rem; }
  .footer-inner { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }

  

  .dialog-panel { padding: 1.35rem; }
}

@media (max-height: 35rem) and (max-width: 60rem) {
  .processing-dialog {
    width: 100%;
    height: 100dvh;
    max-width: none;
    max-height: 100dvh;
    margin: 0;
    border: 0;
    border-radius: 0;
  }

  .processing-dialog-panel {
    height: 100dvh;
    max-height: 100dvh;
  }

  .processing-head {
    padding-top: max(0.85rem, env(safe-area-inset-top));
  }

  .processing-body {
    display: block;
    padding-bottom: max(1rem, env(safe-area-inset-bottom));
  }

  .processing-summary {
    display: grid;
    grid-template-columns: minmax(6.5rem, 8rem) minmax(0, 1fr);
    padding: 0 0 1rem;
    border-right: 0;
    border-bottom: 1px solid var(--soft-line);
  }

  .processing-summary-copy { margin-top: 0; }

  .processing-dialog .job-panel,
  .processing-dialog .completion-panel,
  .processing-dialog .cancelled-panel,
  .processing-dialog .error-panel {
    margin-top: 1rem;
  }

  .processing-dialog .inline-actions {
    position: sticky;
    bottom: 0;
    margin-inline: -1rem;
    padding: 0.85rem 1rem max(1rem, env(safe-area-inset-bottom));
  }
}

@media (min-width: 64rem) {
  .desktop-nav a { padding-inline: 0.75rem; font-size: 0.92rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto;
    animation: none;
    transition-duration: 0.01ms;
  }
  .format-disclosure::after { transition: none; }
  .support-launcher,
  .support-tooltip { transition: none; }
}

[hidden] { display: none; }



/* Tooltip styles */
.support-check-container {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.support-info-container {
  display: inline-flex;
  position: relative;
  margin-left: 0.5rem;
}

.support-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--page);
  color: var(--text);
  border: 1px solid var(--control-line);
  cursor: pointer;
  padding: 3px;
  flex: 0 0 28px;
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

.support-info-icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.25;
}



.support-info-icon:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.support-info-icon:hover {
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent-ink);
  border-color: var(--accent-ink);
}

.support-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: 280px;
  background: var(--surface);
  color: var(--text);
  padding: 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 8px 24px rgba(45, 43, 61, 0.12);
  border: 1px solid var(--line);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s, visibility 0.2s;
}

.support-tooltip[aria-hidden="false"] {
  opacity: 1;
  visibility: visible;
}

@media (max-width: 480px) {
  .support-tooltip {
    left: -20px;
    transform: none;
    max-width: 260px;
  }
}

/* Helper text for email */
.support-helper {
  font-size: 12px;
  color: var(--muted);
  margin-top: 4px;
}

#support-message {
  min-height: 7rem;
  resize: vertical;
}

/* --------------------------------------------------------------------------
   THEME VARIABLES
-------------------------------------------------------------------------- */
html[data-theme='dark'] {
  color-scheme: dark;
  --page: #15141b;
  --warm: #1a1714;
  --cool: #15181e;
  --surface: #211f29;
  --text: #eceaf2;
  --muted: #aaa6b6;
  --line: #3b3847;
  --soft-line: #2e2b36;
  --control-line: #514c60;
  --shadow: 0 18px 50px rgb(0 0 0 / 40%);
}

html[data-theme='dark'] .site-header {
  border-bottom-color: #3b3847;
  background: rgb(21 20 27 / 96%);
}

html[data-theme='dark'] .mobile-menu .menu-panel {
  background: var(--surface);
}

html[data-theme='dark'] .url-input {
  background: #25232c;
  color: var(--text);
}

html[data-theme='dark'] .support-control {
  background: #25232c;
  color: var(--text);
}

html[data-theme='dark'] .dialog-panel,
html[data-theme='dark'] .processing-dialog-panel,
html[data-theme='dark'] .support-dialog-panel {
  background: var(--surface);
  box-shadow: 0 8px 32px rgb(0 0 0 / 60%), 0 0 0 1px var(--line);
}

html[data-theme='dark'] .menu-backdrop,
html[data-theme='dark'] .dialog::backdrop,
html[data-theme='dark'] .processing-dialog::backdrop,
html[data-theme='dark'] .support-dialog::backdrop {
  background: rgb(7 6 10 / 70%);
}

html[data-theme='dark'] .form-card,
html[data-theme='dark'] .result-card {
  background: var(--surface);
  box-shadow: 0 4px 20px rgb(0 0 0 / 20%);
}

html[data-theme='dark'] .info-card,
html[data-theme='dark'] .step-card,
html[data-theme='dark'] .benefit-card {
  background: transparent;
  box-shadow: none;
  border-radius: 0;
}

html[data-theme='dark'] .section h2,
html[data-theme='dark'] .section h3,
html[data-theme='dark'] .privacy-copy h3 {
  color: var(--text);
}

html[data-theme='dark'] .section-heading > p:last-child,
html[data-theme='dark'] .info-card p,
html[data-theme='dark'] .step-card p,
html[data-theme='dark'] .benefit-card p,
html[data-theme='dark'] .privacy-copy p,
html[data-theme='dark'] .privacy-list li {
  color: var(--muted);
}

html[data-theme='dark'] #platforms { background: #1a1714; }
html[data-theme='dark'] #how { background: #211f29; }
html[data-theme='dark'] #benefits { background: #171a20; }
html[data-theme='dark'] #privacy { background: #211f29; }
html[data-theme='dark'] #faq { background: #15141b; }

html[data-theme='dark'] .site-footer {
  background: #0f0e14;
  color: #f2eff7;
  border-top: 1px solid #302d39;
}

html[data-theme='dark'] .footer-copy {
  color: #f2eff7;
}

html[data-theme='dark'] .footer-meta {
  color: #aaa6b6;
}

html[data-theme="dark"] .footer-button {
  color: #d8d4e0;
  border: 0;
  background: transparent;
}

html[data-theme="dark"] .footer-button:hover {
  color: #ffffff;
  background: transparent;
}

html[data-theme='dark'] .site-footer :focus-visible {
  outline-color: #a78bfa;
}

html[data-theme='dark'] .format-group {
  background: var(--surface);
}

html[data-theme='dark'] {
  --focus: #a78bfa;
}

::view-transition {
  pointer-events: none;
}

::view-transition-group(root),
::view-transition-image-pair(root),
::view-transition-old(root),
::view-transition-new(root) {
  pointer-events: none;
}

::view-transition-group(root) {
  animation-duration: var(--theme-transition-duration);
  animation-timing-function: cubic-bezier(0.42, 0.05, 0.82, 0.72);
}
::view-transition-old(root),
::view-transition-new(root) {
  animation: none;
  mix-blend-mode: normal;
}

::view-transition-old(root) {
  z-index: 1;
}

::view-transition-new(root) {
  z-index: 2;
}

/* --------------------------------------------------------------------------
   THEME TOGGLE
-------------------------------------------------------------------------- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  min-height: 44px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  border-radius: 15px;
}

.theme-toggle:focus-visible {
  outline: none;
}

.theme-toggle:focus-visible .theme-toggle-track {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.theme-toggle-track {
  font-size: 3px;
  position: relative;
  height: 10em;
  width: 20em;
  border: 4px solid #e4e7ec;
  border-radius: 10em;
  background-color: white;
  box-shadow: 0px 6px 15px #e4e7ec;
  transition: background-color 250ms, box-shadow 250ms, border-color 250ms;
  box-sizing: content-box;
}

html[data-theme='dark'] .theme-toggle-track {
  background-color: #374151;
  border-color: #374151;
  box-shadow: 0px 6px 15px #111827; 
}

.theme-toggle-thumb {
  transform: translate(11.75em, 1.75em);
  position: absolute;
  top: 0; left: 0;
  height: 6.5em;
  width: 6.5em;
  border-radius: 50%;
  background-color: #ffeccf;
  box-shadow: inset 0px 0px 0px 0.75em #ffbb52;
  transition: background-color 250ms, box-shadow 250ms, border-color 250ms, transform 500ms cubic-bezier(.26,2,.46,.71);
}

html[data-theme='dark'] .theme-toggle-thumb {
  background-color: #485367;
  box-shadow: inset 0px 0px 0px 0.75em white;
  transform: translate(1.75em, 1.75em);
}

.sun-icon-wrapper {
  position: absolute;
  top: 0; left: 0;
  height: 6em;
  width: 6em;
  opacity: 1;
  transform: translate(2em, 2em) rotate(15deg);
  transform-origin: 50% 50%;
  transition: opacity 150ms, transform 500ms cubic-bezier(.26,2,.46,.71);
}

html[data-theme='dark'] .sun-icon-wrapper {
  opacity: 0;
  transform: translate(3em, 2em) rotate(0deg);
}

.moon-icon-wrapper {
  position: absolute;
  top: 0; left: 0;
  height: 6em;
  width: 6em;
  opacity: 0;
  transform: translate(11em, 2em) rotate(0deg);
  transform-origin: 50% 50%;
  transition: opacity 150ms, transform 500ms cubic-bezier(.26,2.5,.46,.71);
}

html[data-theme='dark'] .moon-icon-wrapper {
  opacity: 1;
  transform: translate(12em, 2em) rotate(-15deg);
}

.icon-sun {
  position: absolute;
  top: 0; left: 0;
  height: 6em;
  width: 6em;
  color: #ffbb52;
}

.icon-moon {
  position: absolute;
  top: 0; left: 0;
  height: 6em;
  width: 6em;
  color: white;
}

.icon-sun[hidden], .icon-moon[hidden] {
  display: block !important;
}

@media (prefers-reduced-motion: reduce) {
  ::view-transition-new(root) {
    animation: none !important;
  }
  .theme-toggle-thumb, .sun-icon-wrapper, .moon-icon-wrapper, .theme-toggle-track {
    transition: none !important;
  }
}

/* --------------------------------------------------------------------------
   INTERNATIONALIZATION, LANGUAGE MENU, RTL
-------------------------------------------------------------------------- */


html.i18n-font-arabic body {
  font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  line-height: 1.72;
}

html.i18n-font-devanagari body {
  font-family: "Noto Sans Devanagari", "Nirmala UI", Mangal, sans-serif;
  line-height: 1.7;
}

html.i18n-font-bengali body {
  font-family: "Noto Sans Bengali", "Nirmala UI", sans-serif;
  line-height: 1.72;
}

html.i18n-font-thai body {
  font-family: "Noto Sans Thai", "Leelawadee UI", Tahoma, sans-serif;
  line-height: 1.72;
}

html.i18n-font-cjk body {
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
}

html.i18n-font-japanese body {
  font-family: "Yu Gothic", "Hiragino Sans", Meiryo, sans-serif;
}

html.i18n-font-korean body {
  font-family: "Malgun Gothic", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
}

.language-selector {
  position: relative;
  flex: 0 0 auto;
}

.language-button {
  position: relative;
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 800;
  overflow: hidden;
  z-index: 1;
}

.language-button::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgb(var(--accent-rgb) / 10%);
  transform: translateX(calc(-100% * var(--dir-sign, 1)));
  transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
  z-index: -1;
  pointer-events: none;
}
html[dir="rtl"] .language-button {
  --dir-sign: -1;
}

.language-button:hover,
.language-button[aria-expanded="true"] {
  border-color: var(--accent-ink);
}

.language-button:hover::before,
.language-button[aria-expanded="true"]::before {
  transform: translateX(0);
}

.language-button:focus-visible,
.language-option:focus-visible,
.language-close:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.language-current-flag,
.language-option img {
  width: 20px;
  height: 14px;
  flex: 0 0 auto;
  border: 1px solid rgb(45 43 61 / 18%);
  border-radius: 2px;
  object-fit: cover;
  transform: none !important;
}

.language-current-name {
  white-space: nowrap;
}

.language-menu[hidden],
.language-backdrop[hidden] {
  display: none !important;
}

.language-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  z-index: 121;
  width: min(350px, calc(100vw - 2rem));
  max-height: min(34rem, calc(100dvh - var(--header-height) - 1rem));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: 0 12px 36px rgb(45 43 61 / 15%);
  
  opacity: 0;
  transform: translateY(-8px) scaleY(0.96);
  transform-origin: top;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

.language-menu.is-open {
  opacity: 1;
  transform: translateY(0) scaleY(1);
  visibility: visible;
  pointer-events: auto;
  transition: opacity 200ms cubic-bezier(0.22, 1, 0.36, 1), transform 200ms cubic-bezier(0.22, 1, 0.36, 1);
}

@media (min-width: 48rem) {
  .language-menu-head {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

.language-menu-head {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.45rem 0.55rem 0.25rem 0.85rem;
}

.language-menu-head h2 {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.3;
}

.language-close {
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--text);
  font-size: 1.35rem;
}

.language-close:hover {
  background: var(--page);
}

.language-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.25rem;
  padding: 0.25rem 0.5rem 0.5rem;
}

.language-option {
  min-width: 0;
  min-height: 44px;
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 0.55rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  background: transparent;
  color: var(--text);
  text-align: start;
  font-size: 0.86rem;
  transition: background var(--motion-fast) ease;
}

.language-option:hover {
  background: var(--page);
}

.language-option[aria-selected="true"] {
  background: rgb(var(--accent-rgb) / 9%);
  color: var(--accent-ink);
  font-weight: 850;
}

.language-option-name {
  min-width: 0;
  overflow-wrap: normal;
  word-break: normal;
  unicode-bidi: isolate;
}

.language-option-check {
  visibility: hidden;
  font-weight: 900;
  font-size: 0.8rem;
}

.language-option[aria-selected="true"] .language-option-check {
  visibility: visible;
}

.language-backdrop {
  position: fixed;
  inset: var(--header-height) 0 0;
  z-index: 120;
  background: rgb(0 0 0 / 22%);
  opacity: 0;
  transition: opacity 160ms ease;
}
.language-menu.is-open ~ .language-backdrop, 
body.language-menu-open .language-backdrop {
  opacity: 1;
}

html[data-theme="dark"] .language-button,
html[data-theme="dark"] .language-menu {
  border-color: #625a74;
  background: var(--surface);
  color: var(--text);
}

html[data-theme="dark"] .language-option:hover,
html[data-theme="dark"] .language-close:hover {
  background: #292631;
}

html[data-theme="dark"] .language-current-flag,
html[data-theme="dark"] .language-option img {
  border-color: rgb(255 255 255 / 30%);
}

.primary-button,
.secondary-button,
.footer-button,
.format-disclosure,
.platform-tab,
.support-actions button,
.inline-actions button {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.url-input,
#support-email,
.file-name,
.last-download-name,
.processing-media-title,
.processing-hashtags,
.result-title,
.format-label,
.format-size,
.processing-selection {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.result-meta {
  unicode-bidi: plaintext;
  text-align: start;
}

html[dir="rtl"] .skip-link {
  right: 0.5rem;
  left: auto;
}

html[dir="rtl"] .format-disclosure,
html[dir="rtl"] .format-option,
html[dir="rtl"] .format-size,
html[dir="rtl"] .support-control,
html[dir="rtl"] .job-status,
html[dir="rtl"] .job-metrics {
  text-align: right;
}

html[dir="rtl"] .format-orientation-badge {
  direction: rtl;
  unicode-bidi: isolate;
}

html[dir="rtl"] .support-launcher {
  right: auto;
  left: max(1rem, env(safe-area-inset-left));
}

html[dir="rtl"] .support-launcher > .support-tooltip {
  right: auto;
  left: calc(100% + 0.65rem);
}

html[dir="rtl"] .processing-summary-copy,
html[dir="rtl"] .result-card,
html[dir="rtl"] .support-dialog-content,
html[dir="rtl"] .dialog-body {
  text-align: right;
}

@media (max-width: 47.99rem) {
  body.language-menu-open {
    overflow: hidden;
  }

  .header-inner {
    gap: 0.5rem;
  }

  .brand {
    min-width: 0;
  }

  .header-actions {
    gap: 0.25rem;
  }

  .language-button {
    width: 44px;
    padding-inline: 0.35rem;
    gap: 0.15rem;
  }

  .language-current-name {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }

  .language-menu {
    position: fixed;
    top: var(--header-height);
    right: 0;
    left: 0;
    width: 100%;
    max-height: calc(100dvh - var(--header-height));
    padding-bottom: env(safe-area-inset-bottom);
    border-right: 0;
    border-left: 0;
    border-radius: 0 0 1rem 1rem;
  }

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

  html[dir="rtl"] .support-launcher {
    left: max(0.8rem, env(safe-area-inset-left));
  }
}

@media (max-width: 24.4rem) {
  .container {
    width: min(calc(100% - 1rem), var(--container));
  }

  .brand small {
    display: none;
  }
}

@media (min-width: 48rem) {
  .language-backdrop {
    display: none !important;
  }

  html[dir="rtl"] .processing-summary {
    padding: 0 0 0 1.35rem;
    border-right: 0;
    border-left: 1px solid var(--soft-line);
  }

  html[dir="rtl"] .info-card:first-child {
    padding-right: 0;
    padding-left: 1.25rem;
  }

  html[dir="rtl"] .info-card + .info-card {
    border-right: 1px solid var(--line);
    border-left: 0;
  }

  html[dir="rtl"] .privacy-list {
    padding: 0 2rem 0 0;
    border-right: 1px solid var(--line);
    border-left: 0;
  }
}





.header-inner {
  direction: ltr;
}

.brand,
.header-actions,
.language-selector,
.language-button,
.theme-toggle {
  direction: ltr;
}

html[dir="rtl"] .desktop-nav,
html[dir="rtl"] .mobile-nav {
  direction: rtl;
}

.language-chevron {
  position: relative;
  width: 14px;
  height: 10px;
  flex: 0 0 14px;
  display: inline-block;
  margin-inline-start: 0.15rem;
}

.language-chevron span {
  position: absolute;
  top: 4px;
  width: 8px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.language-chevron span:first-child {
  left: 0;
  transform: rotate(42deg);
}

.language-chevron span:last-child {
  right: 0;
  transform: rotate(-42deg);
}

.language-button[aria-expanded="true"] .language-chevron span:first-child {
  transform: rotate(-42deg);
}

.language-button[aria-expanded="true"] .language-chevron span:last-child {
  transform: rotate(42deg);
}


.language-option-name,
.language-current-name {
  min-width: 0;
  unicode-bidi: isolate;
  text-align: left;
}

.language-option-name[dir="rtl"],
.language-current-name[dir="rtl"] {
  direction: rtl;
  text-align: left;
  unicode-bidi: isolate;
}

.language-current-flag,
.language-option img {
  transform: none !important;
}


html.i18n-font-tamil body {
  font-family: "Noto Sans Tamil", "Nirmala UI", Latha, sans-serif;
}

html.i18n-font-telugu body {
  font-family: "Noto Sans Telugu", "Nirmala UI", Gautami, sans-serif;
}

html.i18n-font-gurmukhi body {
  font-family: "Noto Sans Gurmukhi", "Nirmala UI", Raavi, sans-serif;
}

html.i18n-font-gujarati body {
  font-family: "Noto Sans Gujarati", "Nirmala UI", Shruti, sans-serif;
}

html.i18n-font-ethiopic body {
  font-family: "Noto Sans Ethiopic", Nyala, "Segoe UI", sans-serif;
}

@media (min-width: 48rem) {
  .language-options {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .language-menu.is-open {
    width: min(640px, calc(100vw - 2rem));
    max-height: 75vh;
    overflow-y: auto;
  }
}
@media (max-width: 47.99rem) and (min-width: 36rem) {
  .language-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .language-menu.is-open {
    width: min(450px, calc(100vw - 2rem));
    max-height: 75vh;
    overflow-y: auto;
  }
}

.legal-close-action { margin-top: 2rem; }

.not-found-page {
  text-align: center;
  padding: 100px 20px;
}
.not-found-page .cta-link {
  margin-top: 20px;
  display: inline-block;
}

/* --------------------------------------------------------------------------
   INTENT & LEGAL PAGES
-------------------------------------------------------------------------- */

/* INTENT PAGE LAYOUT */
.intent-page {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.intent-page .section {
  padding: 0;
}

.intent-page .benefits-grid, .intent-page .steps-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .intent-page .benefits-grid, .intent-page .steps-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 64rem) {
  .intent-page .steps-grid {
    grid-template-columns: repeat(3, minmax(280px, 1fr));
  }
  .intent-page .benefits-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}





.intent-overview-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .intent-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* INTENT LINKS */
.intent-links-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.75rem;
  grid-template-columns: 1fr;
}

.intent-links-list li a {
  display: block;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-wrap: break-word;
  word-break: normal;
  hyphens: auto;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease, transform var(--motion-fast) ease;
}

.intent-links-list li a:hover, .intent-links-list li a:focus {
  border-color: var(--accent-ink);
  background: rgb(var(--accent-rgb) / 8%);
  outline: none;
}

/* Related Links Polish */
.related-list {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 48rem) {
  .related-list {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

.related-list li a {
  display: flex;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
  transition: border-color var(--motion-fast) ease, background var(--motion-fast) ease;
  line-height: 1.4;
}

.related-list li a:hover {
  border-color: var(--accent-ink);
  background: rgb(var(--accent-rgb) / 8%);
}


/* LEGAL PAGE LAYOUT */
.legal-page {
  width: 100%;
  max-width: 48rem;
  margin: 3rem auto;
  padding: 0 1rem;
}

.legal-inner {
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 1rem;
  padding: 2rem;
}

.legal-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  font-weight: 800;
}

.legal-content p {
  line-height: 1.6;
  margin-bottom: 1rem;
}

.legal-close-action {
  display: block;
  margin-top: 2rem;
}

/* Ensure the app takes full height and footer is at bottom */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main#main-content {
  flex: 1 0 auto;
}

.site-footer {
  flex-shrink: 0;
  margin-top: auto;
}


/* Intent Page Legal Polish */
.intent-page .rights-notice {
  padding: 1rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 1rem;
  border-inline-start: 4px solid var(--accent-ink, var(--text));
  color: var(--text);
  line-height: 1.5;
  margin-top: 1rem;
}

html[data-theme="dark"] .intent-page .rights-notice {
  border-inline-start-color: var(--accent-ink, var(--text));
}

/* Intent Page Troubleshooting Cards */
.intent-page .intent-troubleshooting .benefit-card {
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 1rem;
  border-inline-start: 4px solid var(--accent-ink, var(--text));
}

html[data-theme="dark"] .intent-page .intent-troubleshooting .benefit-card {
  border-inline-start-color: var(--accent-ink, var(--text));
}


/* --- INTENT PAGE POLISH --- */
/* Overview */
.intent-page .intent-overview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 1rem;
  padding: 1.5rem;
}
@media (min-width: 768px) {
  .intent-page .intent-overview-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
  }
}
.intent-page .intent-overview-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding: 0;
  border: none;
  background: transparent;
  border-radius: 0;
}
@media (max-width: 767px) {
  .intent-page .intent-overview-card:nth-child(2) {
    border-block-start: 1px solid var(--control-line);
    padding-block-start: 1.5rem;
  }
}
@media (min-width: 768px) {
  .intent-page .intent-overview-card:nth-child(2) {
    border-inline-start: 1px solid var(--control-line);
    padding-inline-start: 2rem;
  }
}
.intent-page .intent-overview-card .card-icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme="dark"] .intent-page .intent-overview-card .card-icon {
  background: rgba(255, 255, 255, 0.1);
}

/* Steps */
.intent-page .steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  position: relative;
}
@media (min-width: 768px) {
  .intent-page .steps-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  .intent-page .steps-grid::before {
    display: block;
    content: "";
    position: absolute;
    top: 1.5rem;
    inset-inline-start: 2rem;
    inset-inline-end: 2rem;
    height: 1px;
    background: var(--control-line);
    z-index: 0;
  }
}
.intent-page .step-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  position: relative;
  z-index: 1;
}
.intent-page .step-number {
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--control-line);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.125rem;
}
html[data-theme="dark"] .intent-page .step-number {
  background: var(--surface);
}

/* Benefits */
.intent-page #benefits .benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 1rem;
  padding: 1.5rem;
}
@media (min-width: 768px) {
  .intent-page #benefits .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}
.intent-page #benefits .benefit-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
@media (max-width: 767px) {
  .intent-page #benefits .benefit-card:not(:first-child) {
    border-block-start: 1px solid var(--control-line);
    padding-block-start: 1.5rem;
  }
}
@media (min-width: 768px) {
  .intent-page #benefits .benefit-card:not(:first-child) {
    border-inline-start: 1px solid var(--control-line);
    padding-inline-start: 2rem;
  }
}
.intent-page #benefits .benefit-card .card-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: rgb(var(--accent-rgb) / 10%);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
html[data-theme="dark"] .intent-page #benefits .benefit-card .card-icon {
  background: rgba(255, 255, 255, 0.1);
}

/* Troubleshooting */
.intent-page .intent-troubleshooting {
  background: var(--surface);
  border-radius: 1rem;
  border: 1px solid var(--control-line);
  padding: 1.5rem;
  border-inline-start: 4px solid var(--accent);
}
.intent-page .intent-troubleshooting .benefits-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin-top: 1.5rem;
}
@media (min-width: 768px) {
  .intent-page .intent-troubleshooting .benefits-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
  }
}
.intent-page .intent-troubleshooting .benefit-card {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
}
@media (max-width: 767px) {
  .intent-page .intent-troubleshooting .benefit-card:not(:first-child) {
    border-block-start: 1px solid var(--control-line);
    padding-block-start: 1.5rem;
  }
}
@media (min-width: 768px) {
  .intent-page .intent-troubleshooting .benefit-card:not(:first-child) {
    border-inline-start: 1px solid var(--control-line);
    padding-inline-start: 2rem;
  }
}

/* Related Links */
.intent-page .related-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
@media (min-width: 768px) {
  .intent-page .related-list {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}
.intent-page .related-list a {
  display: block;
  padding: 1rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-radius: 0.75rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.intent-page .related-list a:hover,
.intent-page .related-list a:focus-visible {
  background: var(--page);
  border-color: var(--accent);
  transform: translateY(-1px);
}
html[data-theme="dark"] .intent-page .related-list a:hover,
html[data-theme="dark"] .intent-page .related-list a:focus-visible {
  background: rgba(255, 255, 255, 0.05);
}

/* Rights Notice */
.intent-page .rights-notice {
  background: var(--surface);
  border: 1px solid var(--control-line);
  border-inline-start: 4px solid var(--muted);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.5;
}
html[data-theme="dark"] .intent-page .rights-notice {
  background: rgba(255, 255, 255, 0.02);
}
