:root {
  --ink: #171a25;
  --muted: #656a78;
  --faint: #8c91a0;
  --line: #e6e7ec;
  --surface: rgba(255, 255, 255, 0.94);
  --soft: #f7f7f9;
  --brand: #df3150;
  --brand-dark: #bf1f3d;
  --brand-soft: #fff0f3;
  --blue: #4169e1;
  --green: #14845d;
  --green-soft: #eaf8f2;
  --amber: #a96a00;
  --amber-soft: #fff7e5;
  --danger: #c72f49;
  --danger-soft: #fff0f2;
  --shadow: 0 24px 70px rgba(33, 27, 43, 0.1), 0 2px 8px rgba(33, 27, 43, 0.05);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 11px;
  font-family:
    Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo",
    "Noto Sans KR", "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: #f7f6f8;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 218, 225, 0.5), transparent
    36rem),
    linear-gradient(180deg, #fbfafc 0%, #f5f4f7 100%);
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

[hidden] {
  display: none !important;
}

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

.page-glow {
  position: fixed;
  z-index: -1;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
}

.page-glow--top {
  top: -17rem;
  right: -8rem;
  background: rgba(244, 168, 186, 0.16);
}

.page-glow--bottom {
  bottom: -21rem;
  left: -12rem;
  background: rgba(130, 157, 230, 0.1);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 40px, 1080px);
  margin: 0 auto;
  padding: 28px 0;
}

.brand {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand__mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 11px;
  color: white;
  background: linear-gradient(145deg, #ee4261, #cb2142);
  box-shadow: 0 7px 18px rgba(213, 37, 73, 0.25);
}

.brand__mark svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.service-badge {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  padding: 7px 11px;
  border: 1px solid #dfebe5;
  border-radius: 99px;
  color: #3e6756;
  background: rgba(248, 253, 250, 0.85);
  font-size: 12px;
  font-weight: 650;
}

.service-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #35a777;
  box-shadow: 0 0 0 3px rgba(53, 167, 119, 0.12);
}

.main-content {
  width: min(100% - 32px, 720px);
  margin: 48px auto 0;
}

.hero {
  margin-bottom: 34px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 13px;
  font-weight: 750;
  letter-spacing: 0.01em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(32px, 6vw, 47px);
  font-weight: 820;
  letter-spacing: -0.055em;
  line-height: 1.16;
}

.hero__description {
  margin: 16px auto 0;
  color: var(--muted);
  font-size: 16px;
  letter-spacing: -0.012em;
  line-height: 1.65;
}

.app-card {
  overflow: hidden;
  padding: 36px;
  border: 1px solid rgba(222, 221, 227, 0.9);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.section-heading {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.section-heading--small {
  margin-bottom: 18px;
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  margin-top: 1px;
  border-radius: 9px;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 13px;
  font-weight: 800;
}

.section-heading h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 780;
  letter-spacing: -0.035em;
  line-height: 1.45;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.url-field {
  display: flex;
  align-items: center;
  height: 56px;
  padding: 0 9px 0 16px;
  border: 1.5px solid #d9dae1;
  border-radius: 14px;
  background: white;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.url-field:focus-within {
  border-color: #dc516a;
  box-shadow: 0 0 0 4px rgba(223, 49, 80, 0.1);
}

.url-field.is-invalid {
  border-color: var(--danger);
  box-shadow: 0 0 0 4px rgba(199, 47, 73, 0.09);
}

.url-field__icon {
  flex: 0 0 auto;
  width: 20px;
  margin-right: 11px;
  fill: none;
  stroke: #9094a0;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.url-field input {
  align-self: stretch;
  min-width: 0;
  height: auto;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
}

.url-field input::placeholder {
  color: #a5a8b2;
}

.text-button {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  color: #696d7a;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}

.text-button:hover {
  color: var(--brand);
  background: var(--brand-soft);
}

.form-row {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}

.field-help {
  margin: 0;
  color: var(--faint);
  font-size: 12px;
  line-height: 1.45;
}

.field-help--url {
  margin-top: 10px;
}

.field-message {
  min-height: 18px;
  margin: 8px 0 0;
  color: var(--danger);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.field-message:empty {
  min-height: 0;
  margin-top: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 750;
  letter-spacing: -0.012em;
  line-height: 1;
  text-decoration: none;
  transition: transform 120ms ease, background-color 160ms ease, box-shadow
    160ms ease;
}

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

.button:active:not(:disabled) {
  transform: translateY(0);
}

.button:focus-visible,
.text-button:focus-visible,
.start-over-button:focus-visible,
.brand:focus-visible,
.privacy-note__link:focus-visible,
.site-footer a:focus-visible,
.legal-document a:focus-visible,
.skip-link:focus-visible {
  outline: 3px solid rgba(65, 105, 225, 0.32);
  outline-offset: 2px;
}

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

.button--primary {
  color: white;
  background: linear-gradient(145deg, #e63a59, #cf2546);
  box-shadow: 0 8px 20px rgba(207, 37, 70, 0.2);
}

.button--primary:hover:not(:disabled) {
  background: linear-gradient(145deg, #e23554, #bd1e3b);
  box-shadow: 0 10px 24px rgba(207, 37, 70, 0.26);
}

.button--secondary {
  border-color: #dfe0e5;
  color: #555a68;
  background: white;
}

.button--secondary:hover:not(:disabled) {
  border-color: #caccd4;
  background: #fafafa;
}

.button--compact {
  min-width: 105px;
}

.button--wide {
  width: 100%;
  height: 52px;
  margin-top: 20px;
}

.button--small {
  min-height: 40px;
  padding: 0 15px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.button > svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.button__spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.button.is-loading .button__spinner {
  display: block;
}

.button.is-loading .button__label,
.button.is-loading > svg {
  display: none;
}

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

.section-divider {
  height: 1px;
  margin: 32px -36px;
  background: var(--line);
}

.video-preview {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fafafa;
}

.video-preview__image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border-radius: 11px;
  background: #e8e8eb;
}

.video-preview__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-preview__duration {
  position: absolute;
  right: 7px;
  bottom: 7px;
  padding: 3px 6px;
  border-radius: 5px;
  color: white;
  background: rgba(12, 13, 17, 0.82);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.video-preview__body {
  min-width: 0;
  padding-right: 8px;
}

.video-preview__title {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.video-preview__channel {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.notice {
  margin: 10px 0 0;
  line-height: 1.45;
}

.notice--soft {
  color: #78622f;
  font-size: 11px;
}

.choice-block {
  margin-top: 28px;
}

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

legend {
  padding: 0;
  font-size: 14px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.legend-help {
  margin: 4px 0 12px;
  color: var(--faint);
  font-size: 12px;
}

.choice-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.choice-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.choice-card {
  position: relative;
  display: flex;
  gap: 12px;
  align-items: center;
  min-height: 82px;
  padding: 14px;
  border: 1.5px solid #dedfe5;
  border-radius: 14px;
  background: white;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow
    150ms ease;
}

.choice-card:has(input:checked) {
  border-color: #e14863;
  background: #fffafb;
  box-shadow: 0 0 0 3px rgba(223, 49, 80, 0.07);
}

.choice-card:has(input:focus-visible),
.quality-option:has(input:focus-visible),
.permission-check:has(input:focus-visible) {
  outline: 3px solid rgba(65, 105, 225, 0.3);
  outline-offset: 2px;
}

.choice-card input,
.quality-option input,
.permission-check input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-card__check {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 16px;
  height: 16px;
  border: 1.5px solid #c8cad2;
  border-radius: 50%;
  background: white;
}

.choice-card input:checked ~ .choice-card__check {
  border: 5px solid var(--brand);
}

.choice-card__icon {
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
}

.choice-card__icon--video {
  color: #d43150;
  background: #fff0f3;
}

.choice-card__icon--audio {
  color: #536bc9;
  background: #f0f3ff;
}

.choice-card__icon svg {
  width: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.choice-card__content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 5px;
}

.choice-card__content strong {
  font-size: 14px;
}

.choice-card__content small {
  color: var(--faint);
  font-size: 11px;
}

.quality-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border: 1px solid #dedfe5;
  border-radius: 13px;
}

.quality-option {
  position: relative;
  min-width: 0;
  padding: 12px 10px;
  border-right: 1px solid #e3e4e9;
  background: white;
  cursor: pointer;
  text-align: center;
}

.quality-option:last-child {
  border-right: 0;
}

.quality-option:has(input:checked) {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.quality-option span {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quality-option strong {
  font-size: 13px;
}

.quality-option small {
  overflow: hidden;
  color: var(--faint);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quality-option:has(input:checked) small {
  color: #a65767;
}

.choice-block.is-disabled {
  display: none;
}

.destination-row {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 24px;
  padding: 13px 15px;
  border-radius: 13px;
  background: var(--soft);
}

.destination-row__icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  color: #757a87;
  background: white;
  box-shadow: 0 1px 3px rgba(30, 30, 40, 0.08);
}

.destination-row__icon svg {
  width: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.destination-row > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.destination-row small {
  color: var(--faint);
  font-size: 10px;
}

.destination-row strong {
  font-size: 12px;
  font-weight: 700;
}

.permission-check {
  position: relative;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 2px;
  color: #555a67;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
}

.permission-check__box {
  display: grid;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  place-items: center;
  margin-top: 1px;
  border: 1.5px solid #c7c9d1;
  border-radius: 6px;
  background: white;
}

.permission-check__box svg {
  width: 14px;
  fill: none;
  stroke: white;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
}

.permission-check input:checked + .permission-check__box {
  border-color: var(--brand);
  background: var(--brand);
}

.permission-check input:checked + .permission-check__box svg {
  opacity: 1;
}

.permission-check small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.job-header {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  justify-content: space-between;
}

.status-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 10px;
  font-weight: 800;
}

.status-badge--working {
  color: #425aa8;
  background: #edf1ff;
}

.status-badge--success {
  color: var(--green);
  background: var(--green-soft);
}

.status-badge--failed {
  color: var(--danger);
  background: var(--danger-soft);
}

.status-badge--cancelled {
  color: #717581;
  background: #f0f0f2;
}

.job-header h2 {
  margin: 0;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.job-file-name {
  max-width: 520px;
  overflow: hidden;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.job-percent {
  flex: 0 0 auto;
  margin-top: 20px;
  color: #424755;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  font-weight: 780;
}

.progress-track {
  position: relative;
  overflow: hidden;
  height: 9px;
  margin-top: 24px;
  border-radius: 99px;
  background: #ebebef;
}

.progress-bar {
  position: relative;
  display: block;
  overflow: hidden;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e33858, #f05e78);
  box-shadow: 0 0 10px rgba(227, 56, 88, 0.25);
  will-change: width;
}

.progress-bar::after {
  position: absolute;
  inset: 0;
  width: 42%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55),
    transparent);
  content: "";
  opacity: 0;
  transform: translateX(-120%);
}

.progress-track.is-active:not(.is-indeterminate) .progress-bar::after {
  opacity: 1;
  animation: progress-sheen 1.4s linear infinite;
}

.progress-track.is-indeterminate .progress-bar {
  width: 38% !important;
  animation: indeterminate 1.3s ease-in-out infinite;
}

@keyframes indeterminate {
  from {
    transform: translateX(-110%);
  }
  to {
    transform: translateX(290%);
  }
}

@keyframes progress-sheen {
  from {
    transform: translateX(-120%);
  }
  to {
    transform: translateX(340%);
  }
}

.progress-details {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}

.progress-message,
.progress-meta {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.progress-meta {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.job-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 20px;
}

.result-panel {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-top: 22px;
  padding: 16px;
  border: 1px solid;
  border-radius: 15px;
}

.result-panel--success {
  border-color: #cfe9de;
  background: var(--green-soft);
}

.result-panel--failed {
  border-color: #f0cfd5;
  background: var(--danger-soft);
}

.result-panel--cancelled {
  border-color: #dedfe4;
  background: #f7f7f8;
}

.result-panel__icon {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  font-weight: 850;
}

.result-panel--success .result-panel__icon {
  color: white;
  background: var(--green);
}

.result-panel--failed .result-panel__icon {
  color: white;
  background: var(--danger);
}

.result-panel--cancelled .result-panel__icon {
  color: white;
  background: #878b96;
}

.result-panel__icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-panel__body {
  min-width: 0;
  flex: 1;
}

.result-panel h3 {
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.02em;
}

.result-panel p {
  overflow: hidden;
  margin: 4px 0 0;
  color: #67706c;
  font-size: 11px;
  line-height: 1.45;
  text-overflow: ellipsis;
}

.result-panel--failed p {
  color: #8b5660;
}

.result-panel details {
  margin-top: 7px;
  color: #83525c;
  font-size: 10px;
}

.result-panel summary {
  cursor: pointer;
}

.result-panel code {
  display: block;
  overflow-wrap: anywhere;
  margin-top: 5px;
  white-space: pre-wrap;
}

.success-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  flex: 0 0 auto;
}

#download-form.is-locked .choice-card,
#download-form.is-locked .quality-option,
#download-form.is-locked .permission-check {
  cursor: not-allowed;
  opacity: 0.66;
}

.start-over-button {
  display: block;
  margin: 20px auto 0;
  padding: 8px 10px;
  border: 0;
  color: #686d79;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.privacy-note {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin: 20px auto 0;
  padding: 16px 18px;
  color: #636975;
}

.privacy-note > svg {
  width: 21px;
  flex: 0 0 auto;
  fill: none;
  stroke: #79808e;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.privacy-note strong {
  display: block;
  color: #515661;
  font-size: 12px;
}

.privacy-note p {
  margin: 4px 0 0;
  font-size: 11px;
  line-height: 1.5;
}

.privacy-note__link {
  border-radius: 3px;
  color: #4d596f;
  font-weight: 700;
  text-underline-offset: 2px;
}

.site-footer {
  display: grid;
  gap: 10px;
  width: min(100% - 32px, 720px);
  margin: 38px auto 0;
  padding: 0 0 32px;
  color: #686d79;
  font-size: 13px;
  text-align: center;
}

.site-footer p {
  margin: 0;
}

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  justify-content: center;
}

.site-footer a {
  border-radius: 3px;
  color: #4d5360;
  font-weight: 700;
  text-underline-offset: 3px;
}

.site-footer a:hover {
  color: var(--brand-dark);
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 10px;
  padding: 10px 14px;
  border-radius: 9px;
  color: white;
  background: var(--ink);
  font-size: 13px;
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-160%);
}

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

.legal-main {
  width: min(100% - 40px, 820px);
  margin: 22px auto 0;
}

.legal-document {
  padding: clamp(28px, 6vw, 58px);
  border: 1px solid rgba(30, 31, 38, 0.08);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.legal-document__header {
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
}

.legal-document__header h1 {
  margin: 8px 0 0;
  font-size: clamp(30px, 5vw, 44px);
  letter-spacing: -0.045em;
  line-height: 1.15;
}

.legal-document__effective {
  margin: 14px 0 0;
  color: var(--faint);
  font-size: 13px;
}

.legal-document section {
  padding-top: 30px;
}

.legal-document h2 {
  margin: 0 0 12px;
  font-size: 19px;
  letter-spacing: -0.025em;
  line-height: 1.4;
}

.legal-document p,
.legal-document li,
.legal-document address,
.legal-document td,
.legal-document th {
  color: #505663;
  font-size: 14px;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.legal-document p {
  margin: 10px 0 0;
}

.legal-document ul,
.legal-document ol {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
  padding-left: 22px;
}

.legal-document a {
  border-radius: 3px;
  color: #3857ad;
  font-weight: 700;
  text-underline-offset: 3px;
}

.legal-document address {
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--soft);
  font-style: normal;
}

.legal-document code {
  padding: 2px 5px;
  border-radius: 5px;
  color: #4c5260;
  background: #f0f1f4;
  font-size: 0.9em;
}

.legal-table-wrap {
  overflow-x: auto;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
}

.legal-document table {
  width: 100%;
  min-width: 650px;
  border-collapse: collapse;
  background: white;
}

.legal-document th,
.legal-document td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.legal-document thead th {
  color: #414754;
  background: #f6f6f8;
  font-size: 13px;
}

.legal-document tbody th {
  width: 20%;
  color: #454b58;
  font-weight: 750;
}

.legal-document tbody tr:last-child th,
.legal-document tbody tr:last-child td {
  border-bottom: 0;
}

.site-footer--legal {
  padding-bottom: 44px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 20px;
  bottom: 20px;
  max-width: min(360px, calc(100vw - 40px));
  padding: 12px 15px;
  border: 1px solid rgba(30, 31, 38, 0.1);
  border-radius: 11px;
  color: white;
  background: rgba(35, 37, 46, 0.94);
  box-shadow: 0 12px 35px rgba(20, 20, 30, 0.2);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
}

.form-row--submit {
  margin-top: 8px;
}

.batch-preview-list,
.batch-job-list {
  display: grid;
  gap: 14px;
}

.batch-card {
  padding: 16px;
  border: 1px solid #dedfe5;
  border-radius: 17px;
  background: white;
  box-shadow: 0 5px 18px rgba(32, 28, 42, 0.04);
}

.batch-card__preview {
  display: grid;
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.batch-card__preview .video-preview__body {
  padding-right: 0;
}

.batch-card__settings {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  column-gap: 14px;
  row-gap: 11px;
  align-items: start;
  margin-top: 15px;
  padding-top: 14px;
  border-top: 1px solid #ececf0;
}

.batch-setting legend {
  margin-bottom: 7px;
  color: #686d79;
  font-size: 11px;
}

.context-settings {
  display: contents;
}

[data-role="video-format-setting"],
[data-role="audio-format-setting"] {
  grid-column: 2;
}

[data-role="subtitle-setting"] {
  grid-column: 1 / -1;
  padding-top: 11px;
  border-top: 1px solid #ececf0;
}

.setting-select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 42px;
  padding: 0 34px 0 11px;
  border: 1px solid #dfe0e6;
  border-radius: 10px;
  outline: 0;
  color: #4f5563;
  background: white;
  font-size: 12px;
  font-weight: 680;
}

.setting-select:focus-visible {
  border-color: #dc516a;
  box-shadow: 0 0 0 3px rgba(223, 49, 80, 0.1);
}

.setting-select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.setting-help {
  display: block;
  margin-top: 6px;
  color: var(--faint);
  font-size: 10px;
  line-height: 1.45;
}

.subtitle-group {
  display: grid;
  min-width: 0;
  gap: 6px;
}

.subtitle-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.subtitle-layout:has(.subtitle-automatic > [data-role="automatic-subtitle-switch"][hidden]) {
  grid-template-columns: 1fr;
}

.subtitle-automatic {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.subtitle-automatic:has(> [data-role="automatic-subtitle-switch"][hidden]) {
  display: none;
}

[data-role="subtitle-setting"] > .setting-help {
  margin-top: 8px;
}

.setting-label,
.setting-empty {
  color: #777c88;
  font-size: 10px;
  line-height: 1.45;
}

.setting-empty {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f5f6f8;
}

.setting-check,
.setting-switch {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #e1e2e7;
  border-radius: 10px;
  color: #555b68;
  background: #fafafa;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.45;
}

.setting-check:focus-within,
.setting-switch:focus-within {
  border-color: #dc516a;
  box-shadow: 0 0 0 3px rgba(223, 49, 80, 0.1);
}

.setting-check input,
.setting-switch input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin: 0;
  accent-color: #d72d4d;
}

.setting-check > span,
.setting-switch > span {
  min-width: 0;
}

.setting-check strong,
.setting-switch strong {
  display: block;
  font-size: 11px;
}

.setting-check small,
.setting-switch small {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 10px;
}

.setting-check:has(input:disabled),
.setting-switch:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.62;
}

.media-cover-note {
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: #656b79;
  background: #f5f6f8;
  font-size: 10px;
  line-height: 1.45;
}

.batch-card__extras {
  display: grid;
  gap: 8px;
  margin-top: 11px;
}

.chapter-panel {
  display: grid;
  gap: 9px;
  margin-top: 0;
  padding: 10px;
  border: 1px solid #e3e4e9;
  border-radius: 11px;
  background: #fafafa;
}

.setting-check--chapter {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.chapter-details {
  border-top: 1px solid #e7e8ec;
  padding-top: 8px;
}

.chapter-details summary {
  border-radius: 6px;
  color: #626875;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.45;
}

.chapter-details summary:focus-visible {
  outline: 3px solid rgba(65, 105, 225, 0.24);
  outline-offset: 3px;
}

.chapter-list {
  display: grid;
  gap: 6px;
  margin: 9px 0 0;
  padding: 0;
  list-style: none;
}

.chapter-list li {
  display: grid;
  grid-template-columns: minmax(76px, auto) minmax(0, 1fr);
  gap: 8px;
  color: #686e7a;
  font-size: 10px;
  line-height: 1.45;
}

.chapter-list time {
  color: #858a94;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.chapter-list span {
  overflow-wrap: anywhere;
}

.chapter-list .chapter-list__more {
  display: block;
  color: var(--faint);
}

.mini-options {
  display: grid;
  overflow: hidden;
  border: 1px solid #dfe0e6;
  border-radius: 10px;
  background: white;
}

.mini-options--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-options--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mini-option {
  position: relative;
  min-width: 0;
  border-right: 1px solid #e3e4e9;
  cursor: pointer;
  text-align: center;
}

.mini-option:last-child {
  border-right: 0;
}

.mini-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.mini-option span {
  display: block;
  overflow: hidden;
  padding: 9px 7px;
  color: #676c78;
  font-size: 11px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-option input:checked + span {
  color: var(--brand-dark);
  background: var(--brand-soft);
}

.mini-option:has(input:focus-visible) {
  z-index: 1;
  outline: 3px solid rgba(65, 105, 225, 0.3);
  outline-offset: -3px;
}

.batch-card.is-locked .mini-option {
  cursor: not-allowed;
}

.batch-job-heading {
  align-items: center;
}

.batch-job-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.batch-job-card[data-status="completed"] {
  border-color: #cfe9de;
  background: #fcfffd;
}

.batch-job-card[data-status="failed"] {
  border-color: #f0cfd5;
  background: #fffafb;
}

.batch-job-card[data-status="cancelled"] {
  background: #fafafa;
}

.batch-job-card__header {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
}

.batch-job-card__identity {
  display: flex;
  min-width: 0;
  gap: 11px;
  align-items: flex-start;
}

.batch-job-card__identity > div {
  min-width: 0;
}

.batch-job-card h3 {
  overflow: hidden;
  margin: 0;
  font-size: 14px;
  letter-spacing: -0.02em;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.batch-job-card__identity p {
  margin: 4px 0 0;
  color: var(--faint);
  font-size: 10px;
}

.batch-job-card .status-badge {
  margin-bottom: 6px;
}

.batch-job-card .job-percent {
  margin-top: 4px;
  font-size: 17px;
}

.batch-job-card .progress-track {
  margin-top: 15px;
}

.batch-job-card__error {
  margin: 11px 0 0;
  padding: 9px 11px;
  border-radius: 9px;
  color: #8b5660;
  background: var(--danger-soft);
  font-size: 11px;
  line-height: 1.45;
}

.batch-job-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
  margin-top: 13px;
}

.batch-job-card__actions:not(:has(:not([hidden]))) {
  display: none;
}

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

@media (max-width: 640px) {
  .site-header {
    width: min(100% - 28px, 1080px);
    padding: 18px 0;
  }

  .service-badge {
    padding: 7px 9px;
    font-size: 10px;
  }

  .main-content {
    width: min(100% - 20px, 720px);
    margin-top: 30px;
  }

  .hero {
    padding: 0 8px;
    margin-bottom: 25px;
  }

  .hero h1 {
    font-size: 33px;
  }

  .hero__description {
    font-size: 14px;
  }

  .app-card {
    padding: 24px 18px;
    border-radius: 19px;
  }

  .section-divider {
    margin: 28px -18px;
  }

  .form-row {
    align-items: flex-start;
  }

  .field-help {
    padding-top: 3px;
  }

  .video-preview {
    grid-template-columns: 128px minmax(0, 1fr);
    gap: 12px;
    padding: 9px;
  }

  .video-preview__title {
    font-size: 13px;
  }

  .video-preview__channel {
    margin-top: 4px;
    font-size: 11px;
  }

  .notice {
    display: none;
  }

  .choice-grid--two {
    grid-template-columns: 1fr;
  }

  .choice-card {
    min-height: 72px;
  }

  .quality-option {
    padding: 11px 5px;
  }

  .quality-option small {
    display: none;
  }

  .result-panel {
    flex-wrap: wrap;
  }

  .result-panel__body {
    width: calc(100% - 50px);
  }

  .result-panel > .button,
  .success-actions {
    width: 100%;
    margin-top: 4px;
  }

  .success-actions .button {
    min-width: 0;
    flex: 1;
  }

  .form-row--submit {
    align-items: center;
  }

  .batch-card__preview {
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 11px;
  }

  .batch-card__settings {
    grid-template-columns: 1fr;
    row-gap: 11px;
  }

  [data-role="video-format-setting"],
  [data-role="audio-format-setting"],
  [data-role="subtitle-setting"] {
    grid-column: 1;
  }

  .subtitle-layout {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .batch-job-card__actions .button {
    min-width: 0;
    flex: 1;
  }
}

@media (max-width: 410px) {
  .brand > span:last-child {
    display: none;
  }

  .url-field__icon {
    display: none;
  }

  .url-field {
    padding-left: 12px;
  }

  .button--compact {
    min-width: 94px;
    padding-inline: 14px;
  }

  .video-preview {
    display: block;
  }

  .video-preview__body {
    padding: 11px 4px 3px;
  }

  .batch-card {
    padding: 13px;
  }

  .batch-card__preview {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .batch-card__preview .video-preview__body {
    padding: 0;
  }

  .batch-job-card__header {
    gap: 9px;
  }

  .batch-job-card .job-percent {
    font-size: 15px;
  }
}

@media (max-width: 640px) {
  .legal-main {
    width: min(100% - 20px, 820px);
    margin-top: 12px;
  }

  .legal-document {
    padding: 26px 20px;
    border-radius: 19px;
  }

  .legal-document section {
    padding-top: 25px;
  }

  .legal-document h2 {
    font-size: 18px;
  }

  .legal-document p,
  .legal-document li,
  .legal-document address,
  .legal-document td,
  .legal-document th {
    font-size: 13px;
  }
}

@media print {
  .page-glow,
  .service-badge,
  .skip-link {
    display: none;
  }

  .legal-main {
    width: 100%;
    margin: 0;
  }

  .legal-document {
    padding: 0;
    border: 0;
    box-shadow: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .progress-bar {
    will-change: auto;
  }

  .progress-track.is-active .progress-bar::after {
    opacity: 0;
    animation: none !important;
  }

  .progress-track.is-indeterminate .progress-bar {
    width: 38% !important;
    opacity: 0.72;
    transform: none !important;
    animation: none !important;
  }
}
