/* VideoAppGrader immutable auth stylesheet: 20260723-videoappgrader-surface-v65. */

/* source: frontend/css/00-reset-tokens.css */
/* Reset, tokens and split map.
   Source: public/styles.css lines 1-40 before 20260520-csssplit01.
   Move-only split: keep import order in public/styles.css. */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Doublethink-aligned release shell */
/* CSS split map:
   1. reset/tokens/base shell;
   2. auth surface and shared layout;
   3. workbench panels, options and status/result surfaces;
   4. montage editor, preview, inspector and corrections;
   5. responsive/mobile rules;
   6. final release-lock overrides stay last until cascade flattening is deliberate.
*/
:root {
  --dt-bg: #0a0d13;
  --dt-bg-soft: #10141e;
  --dt-surface: rgba(15, 19, 28, 0.9);
  --dt-surface-strong: rgba(18, 24, 36, 0.96);
  --dt-surface-soft: rgba(22, 28, 40, 0.78);
  --dt-ink: #f4efe4;
  --dt-text: #e8e0d0;
  --dt-muted: #b8a27d;
  --dt-muted-strong: #d8c19a;
  --dt-line: rgba(216, 187, 138, 0.24);
  --dt-line-soft: rgba(216, 187, 138, 0.12);
  --dt-accent: #8fa8d8;
  --dt-accent-strong: #c3d3ff;
  --dt-accent-soft: rgba(143, 168, 216, 0.18);
  --dt-gold: #e2ca9e;
  --dt-gold-soft: rgba(226, 202, 158, 0.76);
  --dt-radius-sm: 16px;
  --dt-radius-md: 24px;
  --dt-radius-lg: 32px;
  --dt-shadow-soft: 0 14px 40px rgba(0, 0, 0, 0.22);
  --dt-shadow-panel: 0 28px 80px rgba(0, 0, 0, 0.28);
  --dt-font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
}



/* source: frontend/css/10-auth-base.css */
/* Initial auth surface and first responsive auth rules.
   Source: public/styles.css lines 41-530 before 20260520-csssplit01.
   Move-only split: keep import order in public/styles.css. */
body.vag-auth-gate,
body.vag-app-open {
  color: var(--dt-text);
  background:
    radial-gradient(circle at top left, rgba(143, 168, 216, 0.12), transparent 32%),
    radial-gradient(circle at top right, rgba(213, 164, 106, 0.09), transparent 24%),
    linear-gradient(180deg, var(--dt-bg-soft) 0%, #0b0e14 30%, #090b11 100%);
}

body.vag-auth-gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  padding: clamp(16px, 3vw, 32px);
}

body.vag-auth-gate .container {
  width: min(1120px, 100%);
  max-width: none;
  margin: 0 auto;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(360px, 0.9fr);
  grid-template-areas:
    "brand card"
    "showcase card"
    "footer footer";
  gap: clamp(18px, 4vw, 48px);
  align-items: center;
}

body.vag-auth-gate .auth-brand-panel {
  grid-area: brand;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: clamp(16px, 3vw, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-radius: var(--dt-radius-lg);
  border: 1px solid var(--dt-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    rgba(15, 20, 30, 0.86);
  box-shadow: var(--dt-shadow-soft);
}

body.vag-auth-gate .auth-brand-lockup {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 14px;
}

body.vag-auth-gate .auth-brand-logo {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
}

body.vag-auth-gate .hero-panel {
  grid-area: showcase;
  width: auto;
  min-height: 0;
  margin: 0;
  padding: clamp(16px, 3vw, 24px);
  border-radius: var(--dt-radius-lg);
  border: 1px solid var(--dt-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    rgba(15, 20, 30, 0.78);
  box-shadow: var(--dt-shadow-soft);
  backdrop-filter: none;
}

body.vag-auth-gate .hero-panel::before,
body.vag-auth-gate .hero-panel::after {
  display: none;
}

body.vag-auth-gate .hero-panel__inner {
  max-width: 640px;
  margin: 0;
}

body.vag-auth-gate .hero-badge,
.vag-app-eyebrow {
  margin: 0 0 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--dt-gold);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

body.vag-auth-gate .hero-subtitle {
  max-width: 38rem;
  margin-top: 0;
  color: var(--dt-muted);
  font-size: 0.98rem;
  line-height: 1.58;
}

body.vag-auth-gate #authGateSection {
  grid-area: card;
  max-width: none;
  margin: 0;
  padding: clamp(20px, 3vw, 30px);
  border-radius: var(--dt-radius-lg);
  border: 1px solid var(--dt-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
    rgba(15, 20, 30, 0.92);
  box-shadow: var(--dt-shadow-panel);
}

body.vag-auth-gate .auth-doc-footer {
  grid-area: footer;
  max-width: none;
  margin: 0;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: var(--dt-radius-lg);
  border: 1px solid var(--dt-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    rgba(15, 20, 30, 0.78);
  box-shadow: var(--dt-shadow-soft);
}

body.vag-auth-gate .auth-doc-footer > span {
  color: var(--dt-gold);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

body.vag-auth-gate .auth-doc-footer .auth-legal-footer {
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  border-top: 0;
}

body.vag-auth-gate #authForm,
body.vag-auth-gate #authUserBox {
  max-width: none;
}

body.vag-auth-gate #authGateSection .section-title {
  margin: 0 0 18px;
  text-align: left;
  font-family: var(--dt-font-serif);
  font-size: 1.72rem;
  line-height: 1.05;
  letter-spacing: 0;
  color: var(--dt-ink);
}

body.vag-auth-gate .hint-text {
  color: var(--dt-muted);
}

body.vag-auth-gate .segfx-field span,
body.vag-auth-gate label {
  color: var(--dt-gold-soft);
}

body.vag-auth-gate .text-input,
body.vag-auth-gate input,
body.vag-auth-gate select,
body.vag-auth-gate textarea {
  border-color: var(--dt-line);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(216, 187, 138, 0.07), rgba(7, 10, 16, 0.9));
  color: var(--dt-ink);
}

body.vag-auth-gate .btn,
body.vag-app-open .btn {
  min-height: 46px;
  border-radius: 999px;
  border-color: var(--dt-line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--dt-ink);
}

body.vag-auth-gate .btn-primary,
body.vag-app-open .btn-primary {
  border-color: rgba(143, 168, 216, 0.45);
  background: linear-gradient(135deg, rgba(143, 168, 216, 0.2), rgba(143, 168, 216, 0.08));
  color: #f5f7ff;
}

body.vag-app-open #heroSection,
body.vag-app-open #authBrandSection,
body.vag-app-open #authGateSection,
body.vag-app-open .auth-doc-footer {
  display: none;
}

@media (max-width: 860px), (max-height: 720px) {
  body.vag-auth-gate {
    min-height: 100dvh;
    align-items: start;
    padding:
      max(10px, var(--vag-surface-safe-top, 0px))
      max(10px, var(--vag-surface-safe-right, 0px))
      max(16px, var(--vag-surface-safe-bottom, 0px))
      max(10px, var(--vag-surface-safe-left, 0px));
  }

  body.vag-auth-gate .container {
    width: min(100%, 540px);
    grid-template-columns: 1fr;
    grid-template-areas:
      "brand"
      "showcase"
      "card"
      "footer";
    gap: 10px;
    align-items: start;
  }

  body.vag-auth-gate .auth-brand-panel,
  body.vag-auth-gate .hero-panel,
  body.vag-auth-gate #authGateSection,
  body.vag-auth-gate .auth-doc-footer {
    border-radius: 18px;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.22);
  }

  body.vag-auth-gate .auth-brand-panel {
    padding: 6px 4px;
    border-color: transparent;
    background: transparent;
    box-shadow: none;
  }

  body.vag-auth-gate .hero-panel {
    padding: 14px;
  }

  body.vag-auth-gate #authGateSection {
    padding: 14px 12px;
  }

  body.vag-auth-gate .auth-doc-footer {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px 14px;
  }

  body.vag-auth-gate .auth-doc-footer .auth-legal-footer {
    justify-content: flex-start;
  }

  body.vag-auth-gate .auth-brand-logo {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
  }

  body.vag-auth-gate #authGateSection .section-title {
    margin-bottom: 8px;
    font-size: 1.34rem;
  }
}

.vag-app-topbar {
  position: relative;
  z-index: 200;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  width: 100%;
  padding: 14px clamp(16px, 3vw, 28px) 10px;
  background: rgba(11, 14, 22, 0.98);
  box-shadow: 0 1px 0 var(--dt-line-soft);
  backdrop-filter: blur(18px);
}

.vag-app-topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -28px;
  height: 28px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(11, 14, 22, 0.98), rgba(11, 14, 22, 0));
}

.vag-app-topbar__brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.vag-app-logo {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border-radius: 18px;
  border: 1px solid rgba(195, 211, 255, 0.26);
  background:
    radial-gradient(circle at 30% 30%, rgba(195, 211, 255, 0.24), transparent 40%),
    linear-gradient(180deg, rgba(143, 168, 216, 0.26), rgba(143, 168, 216, 0.08));
  color: var(--dt-ink);
  font-family: var(--dt-font-serif);
  font-weight: 700;
  overflow: hidden;
}

.vag-app-logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.vag-app-brand {
  color: var(--dt-ink);
  font-family: var(--dt-font-serif);
  font-size: 1.8rem;
  line-height: 1;
  letter-spacing: 0;
}

.vag-app-deck {
  margin: 2px 0 0;
  color: var(--dt-muted);
  font-size: 0.78rem;
  line-height: 1.25;
}

.vag-app-topbar__tabs.workflow-tabs {
  display: inline-flex;
  grid-template-columns: none;
  width: auto;
  gap: 3px;
  margin: 0;
  padding: 5px;
  border-radius: 999px;
  border: 1px solid var(--dt-line-soft);
  background: linear-gradient(180deg, rgba(216, 187, 138, 0.05), rgba(255, 255, 255, 0.02));
}

.vag-app-topbar__tabs .workflow-tab {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border: 0;
  border-radius: 999px;
  color: var(--dt-muted);
  background: transparent;
  font-size: 0.9rem;
  font-weight: 800;
}

.workflow-tab__num {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
}

.vag-app-topbar__tabs .workflow-tab.is-active {
  color: var(--dt-ink);
  background: linear-gradient(135deg, rgba(143, 168, 216, 0.22), rgba(143, 168, 216, 0.08));
  box-shadow: inset 0 0 0 1px rgba(143, 168, 216, 0.22);
}

.vag-app-profile {
  justify-self: end;
  min-height: 42px;
  padding-inline: 16px;
}

body.vag-app-open .workbench-grid {
  width: min(1260px, 100%);
  margin: 0 auto;
  grid-template-columns: minmax(280px, 0.9fr) minmax(360px, 1.15fr) minmax(280px, 0.82fr);
  gap: 16px;
}

body.vag-app-open #uploadSection,
body.vag-app-open .workflow-shell,
body.vag-app-open #progressSection,
body.vag-app-open #resultSection,
body.vag-app-open #storiesResult,
body.vag-app-open .panel {
  border-radius: var(--dt-radius-lg);
  border-color: var(--dt-line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(255, 255, 255, 0)),
    var(--dt-surface);
  box-shadow: var(--dt-shadow-soft);
}

body.vag-app-open .workflow-shell {
  padding: 26px;
  background:
    radial-gradient(circle at top left, rgba(143, 168, 216, 0.1), transparent 36%),
    var(--dt-surface);
}

body.vag-app-open .workflow-panel .section-title,
body.vag-app-open #uploadSection .section-title {
  font-family: var(--dt-font-serif);
  letter-spacing: 0;
  color: var(--dt-ink);
}

body.vag-app-open .section-kicker {
  color: var(--dt-gold);
}

body.vag-app-open .option {
  border-radius: 22px;
  border-color: var(--dt-line-soft);
  background: linear-gradient(180deg, rgba(216, 187, 138, 0.045), rgba(255, 255, 255, 0.02));
}

body.vag-app-open .option.is-checked {
  border-color: rgba(143, 168, 216, 0.42);
  background: linear-gradient(180deg, rgba(143, 168, 216, 0.12), rgba(255, 255, 255, 0.02));
}

body.vag-app-open .file-label {
  border-radius: 24px;
  border-color: var(--dt-line);
  background: linear-gradient(180deg, rgba(216, 187, 138, 0.06), rgba(255, 255, 255, 0.02));
}

body.vag-app-open .primary-summary div {
  border-top-color: var(--dt-line-soft);
}

body.vag-app-open .bottom-action-rail {
  border-color: var(--dt-line);
  border-radius: 24px;
  background: rgba(12, 16, 24, 0.98);
}

@media (max-width: 980px) {
  body.vag-auth-gate .container {
    grid-template-columns: 1fr;
    align-items: start;
  }

  body.vag-auth-gate .hero-panel {
    padding-bottom: 0;
  }

  .vag-app-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand profile";
  }

  .vag-app-topbar__brand {
    grid-area: brand;
  }

  .vag-app-profile {
    grid-area: profile;
  }

  .vag-app-topbar__tabs.workflow-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
  }

  .vag-app-topbar__tabs .workflow-tab {
    justify-content: center;
    padding-inline: 8px;
  }

  body.vag-app-open .workbench-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 560px) {
  body.vag-auth-gate {
    padding: 8px;
    align-items: start;
  }

  body.vag-auth-gate #heroSection h1 {
    max-width: none;
    font-size: 2.45rem;
  }

  body.vag-auth-gate #authGateSection {
    padding: 18px;
    border-radius: 24px;
  }

  body.vag-auth-gate .hero-meta {
    padding: 14px;
  }

  .vag-app-topbar {
    gap: 8px 10px;
    padding: 9px 10px 8px;
  }

  .vag-app-logo {
    width: 34px;
    height: 34px;
    border-radius: 13px;
    font-size: 0.82rem;


/* source: frontend/css/20-app-base.css */
/* Shared app components before editor base.
   Source: public/styles.css lines 531-2129 before 20260520-csssplit01.
   Move-only split: keep import order in public/styles.css. */
  }

  .vag-app-brand {
    font-size: 1.24rem;
  }

  .vag-app-eyebrow {
    display: none;
  }

  .vag-app-deck {
    font-size: 0.68rem;
  }

  .vag-app-profile {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 0.78rem;
  }

  .vag-app-topbar__tabs .workflow-tab {
    min-height: 35px;
    gap: 5px;
    font-size: 0.72rem;
  }

  .workflow-tab__num {
    width: 20px;
    height: 20px;
    font-size: 0.64rem;
  }

  body.vag-app-open .studio-shell {
    padding: 16px 10px 16px;
  }

  body.vag-app-open #uploadSection,
  body.vag-app-open .workflow-shell,
  body.vag-app-open .panel {
    border-radius: 24px;
  }
}

:root{
  --bg-1:#061019;
  --bg-2:#0d1b25;
  --bg-3:#152736;
  --panel:rgba(12,20,28,0.72);
  --panel-2:rgba(14,24,34,0.82);
  --text:#eff6ee;
  --text-2:#d7e3d9;
  --muted:#95a59d;
  --muted-2:#6c7d75;
  --line:rgba(255,255,255,0.08);
  --line-2:rgba(242,165,49,0.22);
  --accent:#f2a531;
  --accent-light:#ffd98d;
  --accent-dark:#c97806;
  --violet:#f2a531;
  --violet-2:#ffe6b2;
  --violet-3:#d58917;
  --green:#8ee29a;
  --cyan:#67d7d3;
  --danger:#ff7d7f;
  --warm:#ffd484;
  --shadow:0 40px 120px rgba(0,0,0,0.44);
  --shadow-soft:0 24px 60px rgba(0,0,0,0.24);
  --radius-xl:32px;
  --radius-lg:26px;
  --radius-md:18px;
  --radius-sm:12px;
  --ease-out:cubic-bezier(0.16, 1, 0.3, 1);
  --font:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-heading:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@keyframes subtleShift {
  0%, 100% { background-position: 0% 50%; transform: translate3d(0, 0, 0); }
  50% { background-position: 100% 50%; transform: translate3d(0, -4px, 0); }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

html {
  min-height: 100%;
  background: var(--bg-1);
}

body {
  position: relative;
  min-height: 100vh;
  padding: 16px;
  color: var(--text);
  font-family: var(--font);
  background:
    radial-gradient(circle at 12% 14%, rgba(242,165,49,0.18), transparent 28%),
    radial-gradient(circle at 82% 18%, rgba(103,215,211,0.16), transparent 22%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,0.05), transparent 24%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 52%, var(--bg-3) 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
}

body::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,0.4), transparent 78%);
  opacity: 0.22;
}

body::after {
  background:
    radial-gradient(circle at 50% 0%, rgba(255,255,255,0.08), transparent 38%),
    radial-gradient(circle at 20% 100%, rgba(242,165,49,0.10), transparent 28%);
  opacity: 0.55;
}

.container {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 0 44px;
  background: transparent;
}

h1 {
  margin-bottom: 16px;
  font-family: var(--font-heading);
  text-align: left;
  line-height: 0.94;
  letter-spacing: 0;
  font-size: clamp(2.9rem, 4.5rem, 6.4rem);
  font-weight: 800;
  background: linear-gradient(135deg, #ffffff 0%, #ffe6b2 44%, #67d7d3 100%);
  background-size: 200% 200%;
  animation: subtleShift 9s ease-in-out infinite;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.65;
  font-weight: 500;
}

.section {
  margin-bottom: 24px;
}

.section-title {
  margin-bottom: 18px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: 0;
}

.section-title-center {
  text-align: center;
}

.subsection-title {
  margin: 18px 0 12px;
  color: var(--accent-light);
  font-family: var(--font-heading);
  font-size: 0.92rem;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.panel {
  position: relative;
  overflow: hidden;
  padding: 28px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(16,26,35,0.80), rgba(10,17,24,0.74));
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(14px);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.16), transparent);
  opacity: 0.8;
}

.hero-panel {
  width: min(calc(100vw - 32px), 1500px);
  min-height: clamp(420px, 70vh, 760px);
  margin-left: calc(50% - 50vw + 16px);
  margin-right: calc(50% - 50vw + 16px);
  padding: clamp(72px, 11vw, 136px) clamp(24px, 8vw, 92px) 60px;
  border-radius: 0 0 40px 40px;
  border: none;
  background:
    linear-gradient(118deg, rgba(6,12,18,0.12) 0%, rgba(6,12,18,0.68) 34%, rgba(6,12,18,0.92) 100%),
    radial-gradient(circle at 78% 30%, rgba(103,215,211,0.30), transparent 24%),
    radial-gradient(circle at 20% 14%, rgba(242,165,49,0.22), transparent 30%),
    linear-gradient(120deg, #0a141c 0%, #112434 52%, #173247 100%);
  box-shadow: 0 34px 90px rgba(0,0,0,0.28);
  backdrop-filter: blur(18px);
}

.hero-panel::before {
  inset: auto 0 0;
  height: 140px;
  background: linear-gradient(180deg, transparent 0%, rgba(6,12,18,0.65) 100%);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -12% -22% auto;
  width: clamp(260px, 34vw, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242,165,49,0.20) 0%, rgba(242,165,49,0.04) 46%, transparent 70%);
  filter: blur(18px);
  opacity: 0.95;
}

.hero-panel__inner {
  position: relative;
  z-index: 1;
  max-width: 660px;
  margin-left: clamp(0px, 4vw, 80px);
  text-align: left;
  animation: riseIn .7s var(--ease-out) both;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 18px;
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255,217,141,0.22);
  background: rgba(8,16,22,0.38);
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.66rem;
  font-weight: 800;
}

.hero-subtitle {
  max-width: 560px;
  font-size: 1.08rem;
  color: rgba(239,246,238,0.78);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  max-width: 760px;
  margin-top: 28px;
}

.hero-meta__item {
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.14);
}

.hero-meta__item span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,217,141,0.84);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-meta__item strong {
  display: block;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.94rem;
  line-height: 1.42;
  font-weight: 700;
}

.hero-steps {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-top: 32px;
}

.hero-step {
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(8,16,22,0.38);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.hero-step-arrow {
  display: block;
  width: 24px;
  height: 1px;
  background: rgba(255,217,141,0.48);
  position: relative;
}

.hero-step-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 7px;
  height: 7px;
  border-right: 1px solid rgba(255,217,141,0.6);
  border-top: 1px solid rgba(255,217,141,0.6);
  transform: rotate(45deg);
}

#authGateSection {
  max-width: 980px;
  margin: -56px auto 0;
  padding-top: 30px;
  border-color: rgba(255,217,141,0.16);
  background:
    linear-gradient(180deg, rgba(16,25,33,0.92), rgba(10,17,24,0.86)),
    radial-gradient(circle at 12% 0%, rgba(242,165,49,0.10), transparent 24%);
  box-shadow: 0 24px 80px rgba(0,0,0,0.26);
}

#authForm,
#authUserBox {
  max-width: 780px;
  margin: 0 auto;
}

#uploadSection {
  max-width: 840px;
  margin: 0 auto;
  padding-top: 14px;
}

.file-label {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  padding: 42px 26px 36px;
  text-align: center;
  cursor: pointer;
  border-radius: var(--radius-lg);
  border: 1.5px dashed rgba(255,217,141,0.24);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.012)),
    radial-gradient(circle at top, rgba(103,215,211,0.09), transparent 34%);
  transition: border-color .25s var(--ease-out), background .25s var(--ease-out), transform .25s var(--ease-out), box-shadow .25s var(--ease-out);
}

.file-label::before {
  content: "source";
  position: absolute;
  top: 18px;
  left: 20px;
  color: rgba(255,217,141,0.78);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.file-label:hover {
  transform: translateY(-2px);
  border-color: rgba(255,217,141,0.42);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.018)),
    radial-gradient(circle at top, rgba(103,215,211,0.14), transparent 38%);
  box-shadow: 0 18px 44px rgba(0,0,0,0.20);
}

.file-label input {
  display: block;
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-icon {
  margin-bottom: 16px;
  color: var(--accent);
  opacity: 0.88;
}

.file-text {
  max-width: 520px;
  margin: 0 auto;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 1.08rem;
  line-height: 1.48;
  font-weight: 700;
}

.file-formats {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.file-name {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin: 14px auto 0;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  color: var(--text-2);
  font-size: 0.84rem;
  font-weight: 700;
}

.source-list {
  display: grid;
  gap: 8px;
  max-width: 680px;
  margin: 12px auto 0;
}

.source-list[hidden] {
  display: none;
}

.source-list__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 9px 10px 9px 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.04);
}

.source-list__meta {
  min-width: 0;
  display: grid;
  gap: 2px;
  text-align: left;
}

.source-list__meta strong,
.source-list__meta span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.source-list__meta strong {
  color: var(--text);
  font-size: 0.9rem;
}

.source-list__meta span {
  color: var(--muted);
  font-size: 0.78rem;
}

.source-list__actions {
  display: inline-flex;
  gap: 6px;
}

.source-list__btn {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  font-size: 1rem;
  font-weight: 900;
  cursor: pointer;
}

.source-list__btn:disabled {
  cursor: default;
  opacity: 0.34;
}

.hint-text {
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.68;
  font-weight: 500;
}

.hint-soft {
  background: rgba(255,255,255,0.018);
}

.auth-grid-center {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 760px;
  margin: 18px auto 0;
}

.auth-status {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.mt-12 {
  margin-top: 12px;
}

.mt-14 {
  margin-top: 14px;
}

.landing-accordion {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.landing-accordion--centered {
  max-width: 860px;
  margin-left: auto;
  margin-right: auto;
}

.landing-card {
  --mode-line: rgba(255,255,255,0.16);
  --mode-glow: rgba(255,255,255,0.08);
  --mode-chip: rgba(255,255,255,0.78);
  position: relative;
  overflow: hidden;
  padding: 0;
  border-radius: calc(var(--radius-lg) + 2px);
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(17,28,38,0.80), rgba(10,17,24,0.72));
  box-shadow: 0 18px 40px rgba(0,0,0,0.14);
  transition: transform .3s var(--ease-out), border-color .3s var(--ease-out), box-shadow .3s var(--ease-out), background .3s var(--ease-out);
}

.landing-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--mode-line), transparent);
  opacity: 0.92;
}

#landingQuickCard {
  --mode-line: rgba(242,165,49,0.52);
  --mode-glow: rgba(242,165,49,0.15);
  --mode-chip: #ffe0ac;
}

#landingReadyCard {
  --mode-line: rgba(103,215,211,0.50);
  --mode-glow: rgba(103,215,211,0.14);
  --mode-chip: #c9f7f3;
}

#landingCutCard {
  --mode-line: rgba(142,226,154,0.48);
  --mode-glow: rgba(142,226,154,0.14);
  --mode-chip: #d5f7d8;
}

#landingEditCard {
  --mode-line: rgba(255,255,255,0.26);
  --mode-glow: rgba(255,255,255,0.10);
  --mode-chip: #e9f1eb;
}

.landing-card__head {
  width: 100%;
  min-height: 100px;
  padding: 22px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-family: inherit;
  color: inherit;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background .2s ease;
}

.landing-card__head:hover {
  background: rgba(255,255,255,0.02);
}

.landing-card__titlebox {
  display: flex;
  align-items: center;
  gap: 16px;
  width: 100%;
  max-width: 780px;
}

.landing-card__icon {
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  border: 1px solid var(--mode-line);
  background:
    radial-gradient(circle at 30% 30%, var(--mode-glow), transparent 60%),
    rgba(255,255,255,0.035);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
  font-size: 1.35rem;
}

.landing-card__title {
  margin-bottom: 4px;
  text-align: left;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}

.landing-card__lead {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  font-weight: 500;
}

.landing-card__chevron {
  flex: 0 0 auto;
  color: var(--mode-chip);
  font-size: 1.35rem;
  transition: transform .3s var(--ease-out);
}

.landing-card__body {
  display: none;
  padding: 4px 28px 28px;
  text-align: left;
}

.landing-card.is-open {
  transform: translateY(-2px);
  border-color: var(--mode-line);
  background:
    linear-gradient(180deg, rgba(18,30,40,0.90), rgba(10,17,24,0.82)),
    radial-gradient(circle at top right, var(--mode-glow), transparent 30%);
  box-shadow: 0 18px 44px rgba(0,0,0,0.22);
}

.landing-card.is-open .landing-card__body {
  display: block;
}

.landing-card.is-open .landing-card__chevron {
  transform: rotate(180deg);
}

.landing-card.is-locked {
  border-color: rgba(255,125,127,0.18);
  opacity: 0.72;
}

.landing-card.is-locked .landing-card__icon {
  border-color: rgba(255,125,127,0.18);
  background: rgba(255,125,127,0.08);
}

.landing-card.is-locked .landing-card__lead {
  color: var(--muted-2);
}

.btn.disabled,
.go-btn.disabled {
  opacity: 0.42;
  cursor: not-allowed;
  pointer-events: none;
}

.landing-card__body .hint-text,
.landing-card__body .options-grid,
.landing-card__body .mode-actions,
.landing-mini-panel {
  max-width: 860px;
}

.landing-mini-panel {
  margin-top: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.03);
}

.options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.option {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 124px;
  padding: 18px;
  text-align: left;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.018));
  transition: all .24s var(--ease-out);
  cursor: pointer;
}

.option:hover {
  transform: translateY(-2px);
  border-color: rgba(255,217,141,0.18);
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.022));
}

.option.is-checked {
  border-color: rgba(255,217,141,0.28);
  background:
    linear-gradient(180deg, rgba(242,165,49,0.10), rgba(255,255,255,0.018)),
    rgba(255,255,255,0.02);
  box-shadow: inset 0 0 0 1px rgba(255,217,141,0.06);
}

.option-static {
  cursor: default;
}

.option-static:hover {
  transform: none;
}

.option input[type="checkbox"] {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.option input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.option.is-disabled {
  opacity: 0.6;
}

.option-icon {
  margin-bottom: 10px;
  font-size: 1.48rem;
}

.option-label {
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  line-height: 1.4;
  font-weight: 700;
}

.option-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.77rem;
  line-height: 1.55;
}

.mode-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.mode-actions-center {
  justify-content: center;
}

.btn,
.go-btn,
.download-btn {
  font-family: inherit;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 20px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all .2s var(--ease-out);
}

.btn:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,217,141,0.18);
  color: var(--text);
}

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  border: none;
  color: #081118;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  box-shadow: 0 8px 22px rgba(242,165,49,0.24);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #ffe2a8, var(--accent-dark));
  box-shadow: 0 12px 28px rgba(242,165,49,0.32);
}

.btn-secondary {
  border: 1px solid rgba(255,217,141,0.18);
  background: rgba(242,165,49,0.08);
  color: var(--accent-light);
}

.btn-ghost {
  background: rgba(255,255,255,0.025);
  border-color: rgba(255,255,255,0.07);
}

.btn-danger {
  border: 1px solid rgba(251,113,133,0.18);
  background: rgba(251,113,133,0.08);
  color: var(--danger);
}

.btn-sm {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.8rem;
}

.go-btn {
  width: 100%;
  min-height: 62px;
  padding: 18px 22px;
  border: none;
  border-radius: 18px;
  color: #081118;
  font-family: inherit;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 55%, var(--accent-dark) 100%);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(242,165,49,0.26);
  transition: all .25s var(--ease-out);
}

.go-btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(242,165,49,0.34);
}

.go-btn:disabled {
  opacity: .35;
  cursor: not-allowed;
  box-shadow: none;
}

.go-icon {
  font-size: 1.1rem;
}

.slider-group {
  margin-bottom: 14px;
}

.slider-title {
  display: block;
  margin-bottom: 6px;
  color: var(--violet-2);
  font-size: 0.9rem;
  font-weight: 700;
}

.slider-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.slider-row input[type="range"] {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.12);
  outline: none;
  -webkit-appearance: none;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--accent-light), var(--violet));
  box-shadow: 0 2px 10px rgba(242,165,49,0.28);
  cursor: pointer;
  -webkit-appearance: none;
}

.sl {
  min-width: 34px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.sv {
  min-width: 36px;
  color: var(--violet);
  font-size: 0.94rem;
  text-align: center;
  font-weight: 800;
}

.toggle-btn {
  width: 100%;
  margin: 8px 0;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid rgba(255,217,141,0.24);
  background: rgba(242,165,49,0.12);
  color: var(--violet-2);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .16s ease, transform .16s ease;
}

.toggle-btn:hover {
  transform: translateY(-1px);
  background: rgba(242,165,49,0.18);
}

.advanced-grid,
.enhance-grid,
.sub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.param-group {
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.param-group h4 {
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255,217,141,0.16);
  color: var(--violet-2);
  font-size: 0.9rem;
}

.param-group label {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.83rem;
}

.param-group input[type="number"],
.segfx-field input,
.text-input {
  width: 100%;
  min-height: 54px;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
  color: var(--text);
  outline: none;
  font: inherit;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out), box-shadow .2s var(--ease-out);
}

.param-group input[type="number"]:focus,
.segfx-field input:focus,
.text-input:focus {
  border-color: rgba(255,217,141,0.40);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 4px rgba(242,165,49,0.08);
}

.text-input::placeholder,
.param-group input[type="number"]::placeholder,
.segfx-field input::placeholder {
  color: rgba(149,165,157,0.72);
}

#authForm .hint-text,
#authUserBox .hint-text,
#authStatus {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.032), rgba(255,255,255,0.018)),
    radial-gradient(circle at top, rgba(242,165,49,0.08), transparent 42%);
}

#authForm .segfx-field span {
  color: var(--text-2);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#authUserTitle {
  color: var(--text);
  font-family: var(--font-heading);
}

#authUserMeta {
  margin-top: 10px;
  text-align: center;
}

.auth-wallet-card {
  margin: 14px auto 0;
  max-width: 560px;
  padding: 16px;
  border: 1px solid rgba(242, 165, 49, 0.28);
  border-radius: 18px;
  background:
    radial-gradient(circle at 14% 0%, rgba(242, 165, 49, 0.16), transparent 38%),
    linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  box-shadow: 0 18px 45px rgba(0,0,0,0.22), inset 0 1px 0 rgba(255,255,255,0.08);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 14px;
}

.auth-wallet-label {
  display: block;
  color: var(--text-2);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

#authWalletBalance {
  display: block;
  margin-top: 3px;
  color: #ffe0ac;
  font-family: var(--font-heading);
  font-size: clamp(1.4rem, 1.75rem, 2.1rem);
  line-height: 1;
}

.auth-wallet-note {
  grid-column: 1 / -1;
  color: rgba(239,246,240,0.72);
  font-size: .92rem;
}

.btn-sm {
  min-height: 40px;
  padding: 10px 14px;
  border-radius: 13px;
  font-size: .9rem;
}

@media (max-width: 640px) {
  .auth-wallet-card {
    grid-template-columns: 1fr;
  }
}

.color-row {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.subtitle-presentation-field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.035);
}

.subtitle-presentation-field__label {
  color: var(--text);
  font-size: .92rem;
  font-weight: 800;
}

.subtitle-presentation-field select {
  width: 100%;
  min-height: 46px;
  padding: 0 42px 0 13px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 12px;
  color: var(--text);
  background: rgba(8,11,18,0.92);
  font: inherit;
  font-weight: 750;
}

.subtitle-presentation-field select:focus-visible {
  outline: 2px solid rgba(122,217,158,0.9);
  outline-offset: 2px;
}

.subtitle-presentation-field .hint-text {
  margin: 0;
  line-height: 1.45;
}

.color-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.color-title {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.color-group input[type="color"] {
  width: 48px;
  height: 48px;
  padding: 3px;
  border-radius: 12px;
  border: 2px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  cursor: pointer;
}

.sub-preview {
  position: relative;
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    radial-gradient(circle at top, rgba(255,255,255,0.06), transparent 36%),
    linear-gradient(180deg, #11131d 0%, #090b12 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.sub-preview.sub-preview--portrait {
  width: min(100%, 360px);
  height: 640px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 22px;
}

.sub-preview.sub-preview--landscape {
  width: 100%;
  height: 260px;
  margin-left: auto;
  margin-right: auto;
  border-radius: 18px;
}

#subPreviewText {
  position: absolute;
  left: 50%;
  width: 82%;
  max-width: 82%;
  display: block;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  font-family: Arial, sans-serif;
  font-weight: 900;
  transform: translateX(-50%);
  z-index: 2;
}

#subPreviewText.sub-preview-text--build-up {
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.sub-preview-word--reveal {
  opacity: 0;
  animation: subtitle-preview-reveal 1ms linear var(--subtitle-reveal-delay, 0s) forwards;
}

@keyframes subtitle-preview-reveal {
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sub-preview-word--reveal {
    opacity: 1;
    animation: none;
  }
}

.censor-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 15px;
}

.censor-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  cursor: pointer;
  transition: border-color .16s ease, background .16s ease;
}

.censor-opt:hover {
  border-color: rgba(255,217,141,0.24);
  background: rgba(242,165,49,0.08);
}

.censor-opt input {
  width: 16px;
  height: 16px;
  accent-color: var(--violet);
}

.censor-opt span {
  color: var(--violet-2);
  font-size: 0.9rem;
  font-weight: 600;
}

.mix-row {
  display: flex;
  align-items: center;
  gap: 15px;
}

.replace-check {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  cursor: pointer;
}

.replace-check input {
  accent-color: var(--violet);
}

.replace-check span {
  color: var(--muted);
  font-size: 0.86rem;
}

.cut-config-row {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 14px;
  margin-top: 12px;
}

.cut-config-row--work {
  margin-bottom: 14px;
}

.cut-config-field {
  min-width: 220px;
  flex: 1 1 240px;
}

.cut-config-check {
  align-self: end;
  min-height: 48px;
}

#editorPanel,
#progressSection,
#resultSection,
#storiesResult {
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
}

#progressSection,
#resultSection,
#storiesResult {
  position: relative;
  overflow: hidden;
  margin-top: 32px;
  padding: 28px;
  border-radius: 28px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(16,26,35,0.90), rgba(10,17,24,0.82));
  box-shadow: 0 22px 54px rgba(0,0,0,0.18);
}

#progressSection::before,
#resultSection::before,
#storiesResult::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,217,141,0.56), rgba(103,215,211,0.46), transparent);
}

.progress-track {
  height: 12px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.05);
}

.progress-fill {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 8px;
  min-width: 36px;
  height: 100%;
  width: 0%;
  border-radius: 999px;
  color: white;
  font-size: 0;
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), #ffd98d, var(--cyan));
  background-size: 200% 100%;
  box-shadow: 0 0 28px rgba(103,215,211,0.18);
  animation: subtleShift 3s ease infinite;
  transition: width .4s var(--ease-out);
}

#progressPercent {
  display: block;
  margin-top: 8px;
  text-align: center;
  color: var(--accent-light);
  font-family: var(--font-heading);
  font-size: 0.88rem;
  font-weight: 700;
}

.progress-text,
.result-info,
.result-title {
  text-align: center;
}

.progress-text {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 0.96rem;
  font-weight: 600;
}

.log-output {
  margin-top: 14px;
  max-height: 220px;
  overflow-y: auto;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.06);
  background:
    linear-gradient(180deg, rgba(5,10,15,0.72), rgba(5,10,15,0.88)),
    radial-gradient(circle at top, rgba(103,215,211,0.08), transparent 34%);
  color: #9ef1ae;
  font-family: "SF Mono", "Courier New", monospace;
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
}

.result-section {
  text-align: center;
}

.result-title {
  margin-bottom: 12px;
  font-family: var(--font-heading);
  font-size: 1.8rem;
  line-height: 1.1;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--green), var(--cyan));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.result-info {
  max-width: 700px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.result-video {
  display: block;
  width: 100%;
  max-height: 520px;
  margin: 0 auto 20px;
  border-radius: 22px;
  border: 1px solid rgba(255,255,255,0.08);
  background: #000;
  box-shadow: 0 22px 60px rgba(0,0,0,0.42);
}

.download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 14px;
  color: #0a0a0a;
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--green), var(--cyan));
  box-shadow: 0 8px 24px rgba(103,215,211,0.22);
  transition: all .25s var(--ease-out);
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 34px rgba(103,215,211,0.28);
}

.stories-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.story-card {
  padding: 16px;
  text-align: center;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.018));
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.story-card:hover {
  transform: translateY(-2px);
  border-color: rgba(103,215,211,0.26);
  box-shadow: 0 12px 28px rgba(0,0,0,0.16);
}

.story-card h4 {
  margin-bottom: 10px;
  color: var(--text);
  font-family: var(--font-heading);
  font-size: 0.98rem;
  line-height: 1.35;
}

.story-card video {
  width: 100%;
  margin-bottom: 10px;
  border-radius: 14px;
}

.story-card a {
  display: inline-block;
  padding: 10px 18px;
  border-radius: 12px;
  color: #11222a;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-light), var(--green), var(--cyan));
}


/* source: frontend/css/40-utility-release-base.css */
/* Utility, focus, toast and early release override rules.
   Source: public/styles.css lines 3392-5160 before 20260520-csssplit01.
   Move-only split: keep import order in public/styles.css. */
/* Right-pane tablet layout must keep status visible above the fixed CTA. */
body.vag-app-open .workbench-grid {
  min-height: 0;
}

@media (min-width: 720px) and (max-width: 859px) {
  body.vag-app-open .workbench-grid {
    grid-template-columns: minmax(250px, .86fr) minmax(0, 1.14fr);
    align-items: stretch;
    min-height: 0;
  }

  body.vag-app-open #uploadSection,
  body.vag-app-open .workflow-shell {
    min-height: 100%;
  }

  body.vag-app-open .file-label {
    min-height: 142px;
  }

  body.vag-app-open #outputPlaceholder,
  body.vag-app-open #progressSection,
  body.vag-app-open #resultSection,
  body.vag-app-open #storiesResult {
    grid-column: 1 / -1;
  }
}

/* Final release override: the workbench must end after the status panel, not stretch into empty space. */
body.vag-app-open .workbench-grid {
  min-height: 0;
}

@media (max-width: 760px) {
  body.vag-app-open .workbench-grid {
    min-height: 0;
  }
}

@media (min-width: 720px) and (max-width: 859px) {
  body.vag-app-open .workbench-grid {
    min-height: 0;
  }
}

@media (min-width: 720px) and (max-width: 859px) {
  body.vag-app-open .workbench-grid {
    grid-template-columns: minmax(250px, .86fr) minmax(0, 1.14fr);
    align-items: stretch;
    min-height: 0;
  }

  body.vag-app-open #uploadSection,
  body.vag-app-open .workflow-shell {
    min-height: 100%;
  }

  body.vag-app-open .file-label {
    min-height: 142px;
  }

  body.vag-app-open .simple-options-grid .option {
    min-height: 46px;
  }

  body.vag-app-open #outputPlaceholder,
  body.vag-app-open #progressSection,
  body.vag-app-open #resultSection,
  body.vag-app-open #storiesResult {
    grid-column: 1 / -1;
  }
}


.cut-reserved-note {
  margin-top: 10px;
  text-align: center;
}

/* ── Focus-visible ring for keyboard navigation ── */
.btn:focus-visible,
.go-btn:focus-visible,
.download-btn:focus-visible,
.file-label:focus-within,
.text-input:focus-visible,
.option:focus-visible {
  outline: 2px solid var(--violet);
  outline-offset: 2px;
}

/* Initially hidden elements - managed by JS */
.is-hidden-block {
  display: none;
}
.is-hidden-panel {
  display: none;
}

/* ── UI rescue workbench layer ── */
:root {
  --bg-1:#071015;
  --bg-2:#0d171d;
  --bg-3:#111d24;
  --panel:rgba(13,22,28,0.86);
  --panel-2:rgba(17,28,36,0.92);
  --line:rgba(232,238,232,0.10);
  --line-2:rgba(242,165,49,0.24);
  --radius-xl:20px;
  --radius-lg:16px;
  --radius-md:12px;
  --radius-sm:10px;
}

.is-ui-hidden,
[hidden] {
  display: none;
}

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

body {
  padding: 22px;
  background:
    linear-gradient(180deg, #071015 0%, #0d171d 48%, #111d24 100%);
  background-attachment: scroll;
}

body::before,
body::after {
  display: none;
}

.container {
  max-width: 1220px;
  padding-bottom: 40px;
}

.hero-panel {
  width: 100%;
  min-height: 0;
  margin: 0 0 14px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17,28,36,0.92), rgba(10,18,23,0.90));
  box-shadow: 0 18px 48px rgba(0,0,0,0.22);
  backdrop-filter: none;
}

.hero-panel::before,
.hero-panel::after {
  display: none;
}

.hero-panel__inner {
  max-width: none;
  margin: 0;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(420px, .95fr);
  gap: 24px;
  align-items: end;
}

.hero-badge {
  margin-bottom: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent-light);
  justify-content: flex-start;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(2rem, 3rem, 4rem);
  line-height: 1;
  letter-spacing: 0;
  background: none;
  -webkit-text-fill-color: currentColor;
  color: #fff3d8;
  animation: none;
}

.hero-subtitle {
  max-width: 640px;
  color: rgba(239,246,238,0.72);
}

.hero-meta {
  margin-top: 0;
  max-width: none;
  gap: 12px;
}

.hero-meta__item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
}

#authGateSection {
  max-width: none;
  margin: 0 0 16px;
  padding: 24px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(17,28,36,0.92), rgba(10,18,23,0.88));
  box-shadow: 0 16px 42px rgba(0,0,0,0.18);
}

#authGateSection .section-title {
  margin-bottom: 12px;
}

#authForm,
#authUserBox {
  max-width: 900px;
}

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

.auth-wallet-card {
  display: grid;
}

.studio-shell {
  display: grid;
  gap: 18px;
}

.workbench-grid {
  display: grid;
  grid-template-columns: minmax(290px, .9fr) minmax(360px, 1.15fr) minmax(280px, .8fr);
  gap: 16px;
  align-items: start;
}

.section-kicker {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,217,141,0.78);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}

#uploadSection {
  max-width: none;
  margin: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 16px 34px rgba(0,0,0,0.14);
}

.file-label {
  min-height: 210px;
  padding: 30px 18px;
  border-radius: 14px;
  border-color: rgba(255,217,141,0.22);
  background: rgba(255,255,255,0.025);
  box-shadow: none;
}

.file-label::before {
  display: none;
}

.file-text {
  font-size: 1rem;
}

.mode-chooser {
  max-width: none;
  margin: 0;
  gap: 10px;
}

.workflow-shell {
  max-width: none;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
}

.workflow-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 16px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
}

.workflow-tab {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: rgba(239,246,238,0.72);
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.workflow-tab.is-active {
  border-color: rgba(103,215,211,0.34);
  background: rgba(103,215,211,0.12);
  color: var(--text);
}

.workflow-panel {
  min-height: 120px;
}

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

.simple-cut-row {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) minmax(120px, .8fr) minmax(180px, 1.1fr);
  gap: 10px;
  margin-top: 14px;
  align-items: end;
}

.bottom-action-rail {
  grid-column: 1 / -1;
  position: sticky;
  bottom: 14px;
  z-index: 50;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(255,217,141,0.22);
  border-radius: 16px;
  background: rgba(10,18,23,0.95);
  box-shadow: 0 18px 48px rgba(0,0,0,0.32);
  backdrop-filter: blur(12px);
}

.bottom-action-rail__meta {
  min-width: 0;
}

.bottom-action-rail__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.landing-card {
  border-radius: 14px;
  background: var(--panel);
  box-shadow: none;
  border-color: var(--line);
}

.landing-card::before {
  display: none;
}

.landing-card__head {
  min-height: 0;
  padding: 14px;
}

.landing-card__head:disabled {
  cursor: not-allowed;
}

.landing-card__titlebox {
  gap: 12px;
}

.landing-card__icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: .9rem;
  font-weight: 900;
  color: #101820;
  background: linear-gradient(135deg, var(--accent-light), var(--accent));
  border: 0;
}

.landing-card__title {
  margin-bottom: 2px;
  font-size: .98rem;
  letter-spacing: 0;
}

.landing-card__lead {
  max-width: none;
  font-size: .82rem;
  line-height: 1.45;
}

.mode-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.mode-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  background: rgba(255,255,255,0.045);
  color: rgba(239,246,238,0.72);
  font-size: .67rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.landing-card__chevron {
  display: none;
}

.landing-card__body {
  display: none;
  padding: 0 14px 16px;
}

.landing-card.is-selected {
  border-color: rgba(255,217,141,0.34);
  background: linear-gradient(180deg, rgba(21,34,42,0.96), rgba(12,21,27,0.92));
  box-shadow: 0 12px 34px rgba(0,0,0,0.18);
}

.landing-card.is-selected .mode-tags span {
  border-color: rgba(255,217,141,0.20);
  color: #fff3d8;
  background: rgba(255,217,141,0.07);
}

.mode-option[data-mode="ready"]:not(.is-locked) {
  border-color: rgba(103,215,211,0.20);
}

.mode-option[data-mode="ready"].is-selected {
  border-color: rgba(103,215,211,0.48);
  box-shadow: 0 14px 38px rgba(22,184,181,0.12);
}

.landing-card.is-selected .landing-card__body {
  display: block;
}

.landing-card.is-locked {
  opacity: .56;
}

.landing-card.is-locked .landing-card__icon {
  background: rgba(255,255,255,0.08);
  color: var(--muted);
}

.landing-card__body > .mode-actions {
  display: none;
}

.landing-card__body .hint-text {
  margin-bottom: 12px;
}

.options-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.option {
  min-height: 104px;
  padding: 14px;
  border-radius: 12px;
  background: rgba(255,255,255,0.025);
}

.option-icon {
  margin-bottom: 8px;
  font-size: 1.05rem;
  opacity: .78;
}

#progressSection,
#resultSection,
#storiesResult {
  max-width: none;
  border-radius: 18px;
}

.result-kicker {
  margin-bottom: 8px;
  color: var(--accent-light);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

.result-actions .download-btn,
.result-actions .btn {
  margin: 0;
}

@media (max-width: 760px) {
  .result-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .result-actions .download-btn,
  .result-actions .btn {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
  }
}

.log-details {
  margin-top: 14px;
}

.log-details summary {
  cursor: pointer;
  color: var(--accent-light);
  font-size: .84rem;
  font-weight: 800;
}

@media (max-width: 1060px) {
  .hero-panel__inner,
  .workbench-grid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {
  body {
    padding: 10px;
    padding-bottom: calc(110px + var(--vag-surface-safe-bottom, 0px));
    background: #071015;
  }

  .container {
    padding-bottom: 18px;
  }

  .hero-panel {
    padding: 16px;
    border-radius: 14px;
  }

  .hero-meta {
    display: none;
  }

  h1 {
    font-size: clamp(1.8rem, 2.15rem, 2.5rem);
  }

  .hero-subtitle {
    font-size: .92rem;
  }

  #authGateSection,
  #uploadSection,
  .landing-card,
  #progressSection,
  #resultSection,
  #storiesResult {
    border-radius: 14px;
  }

  #authGateSection {
    padding: 16px;
  }

  .auth-grid-center {
    grid-template-columns: 1fr;
  }

  #uploadSection {
    padding: 16px;
  }

  .file-label {
    min-height: 154px;
    padding: 22px 14px;
  }

  .file-icon svg {
    width: 36px;
    height: 36px;
  }

  .mode-chooser {
    gap: 8px;
  }

  .workflow-shell {
    padding: 14px;
    border-radius: 14px;
  }

  .workflow-tabs {
    grid-template-columns: 1fr;
  }

  .simple-options-grid,
  .simple-cut-row {
    grid-template-columns: 1fr;
  }

  .landing-card__head {
    padding: 13px;
  }

  .landing-card__body {
    padding: 0 12px 14px;
  }

  .options-grid,
  .advanced-grid,
  .enhance-grid,
  .sub-grid,
  .stories-list,
  .segment-range-grid,
  .segment-fx-grid,
  .nudge-grid {
    grid-template-columns: 1fr;
  }

  .editor-topbar {
    display: grid;
  }

  .editor-topbar__actions {
    justify-content: stretch;
  }

  .editor-topbar__actions .btn {
    flex: 1;
  }

  .editor-inspector-tabs {
    overflow-x: auto;
  }

  .editor-inspector-tab {
    min-width: 88px;
    flex: 0 0 auto;
  }

  .transport-bar {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .transport-bar .btn {
    flex: 0 0 auto;
  }

  .editor-mobile-actions,
  .editor-mobile-render-bar {
    position: sticky;
    bottom: calc(8px + var(--vag-surface-safe-bottom, 0px));
    z-index: 20;
    display: block;
    padding: 8px;
    border: 1px solid rgba(255,217,141,0.24);
    border-radius: 14px;
    background: rgba(10,18,23,0.96);
    box-shadow: 0 14px 36px rgba(0,0,0,0.32);
  }

  .editor-mobile-actions .btn {
    width: 100%;
  }

  .segment-timeline__handle {
    width: 16px;
    opacity: .82;
  }

  .editor-global-panel-mount > .section {
    padding: 12px;
  }

  .bottom-action-rail {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin: 0;
    padding: 10px max(10px, var(--vag-surface-safe-left, 0px)) calc(10px + var(--vag-surface-safe-bottom, 0px)) max(10px, var(--vag-surface-safe-right, 0px));
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
    border-radius: 16px 16px 0 0;
  }

  .bottom-action-rail__actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .bottom-action-rail__actions .btn {
    width: 100%;
  }

  .log-details:not([open]) .log-output {
    display: none;
  }

  .log-output {
    max-height: 130px;
  }
}

/* Final Doublethink fit pass: keep the auth screen editorial, not overlapping. */
body.vag-auth-gate .hero-panel {
  border: 0;
  outline: 0;
}

body.vag-auth-gate .hero-panel__inner {
  width: min(100%, 560px);
  display: block;
}

body.vag-auth-gate #heroSection h1 {
  max-width: 560px;
  font-size: clamp(2.05rem, 2.8rem, 3.55rem);
  line-height: 1.02;
  text-align: left;
}

body.vag-auth-gate .hero-meta {
  max-width: 420px;
}

body.vag-auth-gate .auth-legal {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

body.vag-auth-gate .legal-check {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  margin: 0;
  color: var(--dt-muted);
  font-size: 0.84rem;
  line-height: 1.42;
  letter-spacing: 0;
  text-transform: none;
}

body.vag-auth-gate .legal-check input {
  width: 16px;
  height: 16px;
  margin-top: 2px;
  padding: 0;
}

body.vag-auth-gate .legal-check span {
  min-width: 0;
}

body.vag-auth-gate .legal-check a,
body.vag-auth-gate .auth-legal-footer a {
  color: var(--dt-accent-strong);
  text-decoration: none;
}

body.vag-auth-gate .auth-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 14px;
  font-size: 0.82rem;
  line-height: 1.35;
}

@media (max-width: 560px) {
  body.vag-auth-gate #heroSection h1 {
    max-width: none;
    font-size: 2.28rem;
  }
}

body.vag-auth-gate #heroSection h1 {
  max-width: 520px;
  font-size: clamp(1.75rem, 2.3rem, 2.9rem);
  line-height: 1.08;
}

body.vag-auth-gate .hero-subtitle {
  max-width: 34rem;
  font-size: .94rem;
  line-height: 1.62;
}

body.vag-auth-gate .hero-meta {
  max-width: 380px;
  margin-top: 16px;
  padding: 12px 14px;
}

body.vag-auth-gate .hero-meta__item {
  padding: 7px 0;
}

body.vag-auth-gate #authGateSection {
  padding: 22px;
}

body.vag-auth-gate #authGateSection .section-title {
  font-size: 1.48rem;
}

body.vag-auth-gate .hint-text {
  font-size: .9rem;
  line-height: 1.55;
}

.vag-app-topbar {
  gap: 10px;
  padding: 10px clamp(12px, 2.4vw, 22px) 8px;
}

body.vag-app-open .vag-app-logo {
  width: 38px;
  height: 38px;
  border-radius: 15px;
}

.vag-app-brand {
  font-size: 1.42rem;
}

.vag-app-eyebrow {
  margin-bottom: 4px;
  font-size: .62rem;
}

.vag-app-deck {
  font-size: .72rem;
}

.vag-app-topbar__tabs .workflow-tab {
  min-height: 36px;
  padding: 5px 11px;
  font-size: .82rem;
}

.workflow-tab__num {
  width: 21px;
  height: 21px;
  font-size: .66rem;
}

body.vag-app-open .workflow-shell {
  padding: 18px;
}

body.vag-app-open #uploadSection,
body.vag-app-open .workflow-shell,
body.vag-app-open .panel {
  border-radius: 22px;
}

body.vag-app-open .section-title {
  margin-bottom: 12px;
  font-size: 1rem;
}

body.vag-app-open .section-kicker {
  margin-bottom: 6px;
  font-size: .62rem;
}

body.vag-app-open .simple-options-grid {
  gap: 10px;
}

body.vag-app-open .option {
  min-height: 0;
  padding: 12px;
  border-radius: 18px;
}

body.vag-app-open .option-icon {
  margin-bottom: 4px;
  font-size: .9rem;
}

body.vag-app-open .option-label {
  font-size: .88rem;
  line-height: 1.2;
}

body.vag-app-open .option-hint {
  display: none;
}

body.vag-app-open .file-label {
  min-height: 165px;
  padding: 20px 14px;
  border-radius: 20px;
}

body.vag-app-open select,
body.vag-app-open input[type="number"],
body.vag-app-open input[type="text"],
body.vag-app-open textarea {
  min-height: 38px;
  width: 100%;
  border: 1px solid rgba(255, 217, 141, .22);
  border-radius: 12px;
  background: rgba(13, 22, 33, .88);
  color: var(--dt-ink);
  font: inherit;
  font-size: .86rem;
  line-height: 1.25;
  padding: 8px 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
  color-scheme: dark;
}

body.vag-app-open select:focus,
body.vag-app-open input[type="number"]:focus,
body.vag-app-open input[type="text"]:focus,
body.vag-app-open textarea:focus {
  border-color: rgba(248, 180, 67, .68);
  outline: 2px solid rgba(248, 180, 67, .18);
  outline-offset: 1px;
}

@media (max-width: 560px) {
  body.vag-auth-gate {
    display: block;
    padding: 14px 10px;
  }

  body.vag-auth-gate .container {
    display: block;
  }

  body.vag-auth-gate #heroSection h1 {
    font-size: 1.85rem;
    line-height: 1.12;
  }

  body.vag-auth-gate .hero-subtitle {
    font-size: .88rem;
    line-height: 1.55;
  }

  body.vag-auth-gate .hero-meta {
    display: none;
  }

  body.vag-auth-gate #authGateSection {
    margin-top: 14px;
    padding: 16px;
  }

  body.vag-auth-gate #authGateSection .section-title {
    font-size: 1.28rem;
  }

  .vag-app-topbar {
    position: sticky;
  }

  .vag-app-logo {
    width: 30px;
    height: 30px;
    border-radius: 12px;
  }

  .vag-app-brand {
    font-size: 1.05rem;
  }

  .vag-app-deck {
    display: none;
  }

  .vag-app-topbar__tabs .workflow-tab {
    min-height: 32px;
    padding: 4px 6px;
    font-size: .68rem;
  }

  .workflow-tab__num {
    width: 18px;
    height: 18px;
  }

  body.vag-app-open .studio-shell {
    padding: 12px 10px 18px;
  }

  body.vag-app-open .workflow-shell {
    padding: 14px;
  }

  body.vag-app-open .simple-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  body.vag-app-open .option-hint {
    display: none;
  }

  body.vag-app-open .option {
    min-height: 58px;
    padding: 9px 10px;
  }

  body.vag-app-open .option-label {
    font-size: .8rem;
  }

  body.vag-app-open .file-label {
    min-height: 112px;
    padding: 14px 12px;
  }

  body.vag-app-open .file-icon {
    margin-bottom: 8px;
    font-size: 1.35rem;
  }

  body.vag-app-open .file-text {
    font-size: .92rem;
    line-height: 1.25;
  }

  body.vag-app-open .file-hint {
    margin-top: 8px;
    font-size: .66rem;
    letter-spacing: .14em;
  }

  body.vag-app-open select,
  body.vag-app-open input[type="number"],
  body.vag-app-open input[type="text"],
  body.vag-app-open textarea {
    min-height: 34px;
    font-size: .78rem;
    padding: 7px 9px;
  }
}

/* Release compact scale pass: controls and text should feel like a tool, not a hero page. */
body.vag-auth-gate #heroSection h1 {
  max-width: 500px;
  font-size: clamp(1.52rem, 1.9rem, 2.35rem);
  line-height: 1.12;
}

body.vag-auth-gate .hero-subtitle {
  max-width: 31rem;
  font-size: .84rem;
  line-height: 1.48;
}

body.vag-auth-gate .hero-badge {
  margin-bottom: 10px;
  font-size: .66rem;
}

body.vag-auth-gate #authGateSection {
  padding: 18px;
}

body.vag-auth-gate #authGateSection .section-title {
  font-size: 1.18rem;
  line-height: 1.18;
}

body.vag-auth-gate .hint-text {
  padding: 10px 11px;
  font-size: .8rem;
  line-height: 1.42;
}

body.vag-auth-gate .text-input,
body.vag-auth-gate input,
body.vag-auth-gate select,
body.vag-auth-gate textarea {
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 13px;
  font-size: .86rem;
}

body.vag-auth-gate .btn,
body.vag-app-open .btn,
body.vag-app-open .go-btn,
body.vag-app-open .download-btn {
  min-height: 40px;
  padding: 8px 13px;
  border-radius: 12px;
  font-size: .8rem;
  line-height: 1.18;
}

body.vag-app-open .go-btn {
  min-height: 48px;
  padding: 11px 15px;
  border-radius: 14px;
}

body.vag-auth-gate .legal-check,
body.vag-auth-gate .auth-legal-footer {
  font-size: .76rem;
  line-height: 1.34;
}

body.vag-app-open .vag-app-brand {
  font-size: 1.12rem;
}

body.vag-app-open .vag-app-topbar__tabs .workflow-tab {
  min-height: 32px;
  padding: 4px 8px;
  border-radius: 10px;
  font-size: .72rem;
}

body.vag-app-open .workflow-tab__num {
  width: 18px;
  height: 18px;
  font-size: .58rem;
}

body.vag-app-open .section-title {
  font-size: .92rem;
  line-height: 1.25;
}

body.vag-app-open .section-kicker,
body.vag-app-open .bottom-action-rail__meta span,
body.vag-app-open .bottom-action-rail__meta strong {
  font-size: .7rem;
  line-height: 1.25;
}

body.vag-app-open .option {
  padding: 10px;
  border-radius: 14px;
}

body.vag-app-open .option-label {
  font-size: .78rem;
  line-height: 1.18;
}

body.vag-app-open .file-label {
  min-height: 128px;
  padding: 14px 12px;
  border-radius: 16px;
}

body.vag-app-open .file-icon {
  margin-bottom: 8px;
  font-size: 1.16rem;
}

body.vag-app-open .file-text {
  font-size: .84rem;
  line-height: 1.2;
}

body.vag-app-open .file-hint {
  margin-top: 7px;
  font-size: .62rem;
}

body.vag-app-open .bottom-action-rail {
  gap: 8px;
  padding-top: 8px;
  padding-bottom: calc(8px + var(--vag-surface-safe-bottom, 0px));
}

body.vag-app-open .bottom-action-rail__actions .btn {
  min-height: 38px;
  padding: 7px 10px;
  font-size: .74rem;
  border-radius: 11px;
}

@media (max-width: 560px) {
  body.vag-auth-gate {
    padding: 10px 9px;
  }

  body.vag-auth-gate #heroSection h1 {
    font-size: 1.44rem;
    line-height: 1.14;
  }

  body.vag-auth-gate .hero-subtitle {
    font-size: .78rem;
    line-height: 1.42;
  }

  body.vag-auth-gate .hero-badge {
    margin-bottom: 8px;
    font-size: .6rem;
  }

  body.vag-auth-gate #authGateSection {
    margin-top: 12px;
    padding: 13px;
  }

  body.vag-auth-gate #authGateSection .section-title {
    font-size: 1.04rem;
  }

  body.vag-auth-gate .text-input,
  body.vag-auth-gate input,
  body.vag-auth-gate select,
  body.vag-auth-gate textarea {
    min-height: 39px;
    padding: 8px 10px;
    font-size: .8rem;
  }

  body.vag-auth-gate .btn,
  body.vag-app-open .btn,
  body.vag-app-open .go-btn,
  body.vag-app-open .download-btn {
    min-height: 38px;
    padding: 7px 10px;
    font-size: .76rem;
  }

  body.vag-app-open .vag-app-brand {
    font-size: .9rem;
  }

  body.vag-app-open .vag-app-topbar {
    gap: 8px;
    padding: 8px 9px 6px;
  }

  body.vag-app-open .vag-app-topbar__tabs .workflow-tab {
    min-height: 29px;
    padding: 3px 5px;
    font-size: .62rem;
  }

  body.vag-app-open .studio-shell {
    padding: 9px 8px 14px;
  }

  body.vag-app-open .workflow-shell {
    padding: 11px;
  }

  body.vag-app-open .option {
    min-height: 50px;
    padding: 8px;
  }

  body.vag-app-open .option-label {
    font-size: .72rem;
  }

  body.vag-app-open .file-label {
    min-height: 92px;
    padding: 12px 10px;
  }

  body.vag-app-open .file-icon {
    margin-bottom: 6px;
    font-size: 1rem;
  }

  body.vag-app-open .file-text {
    font-size: .78rem;
  }

  body.vag-app-open .bottom-action-rail__actions .btn {
    min-height: 36px;
    padding: 6px 9px;
    font-size: .7rem;
  }
}

/* Release alignment pass: remove cramped cards, uneven axes and native checkbox noise. */
body.vag-auth-gate #authForm {
  display: grid;
  gap: 12px;
}

body.vag-auth-gate .auth-grid-center {
  gap: 10px;
  width: 100%;
  margin: 0;
}

body.vag-auth-gate .auth-legal {
  gap: 9px;
  margin-top: 0;
}

body.vag-auth-gate .mode-actions {
  gap: 8px;
  margin-top: 0;
}

body.vag-auth-gate .auth-legal-footer {
  gap: 7px 11px;
  margin-top: 2px;
}

body.vag-auth-gate .legal-check {
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
}

body.vag-auth-gate .legal-check input,
body.vag-app-open .option input[type="checkbox"],
body.vag-app-open .censor-opt input {
  -webkit-appearance: none;
  appearance: none;
  display: grid;
  place-content: center;
  width: 15px;
  height: 15px;
  min-height: 15px;
  max-height: 15px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255, 217, 141, .42);
  border-radius: 4px;
  background: rgba(7, 16, 21, .92);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.05);
}

body.vag-auth-gate .legal-check input::before,
body.vag-app-open .option input[type="checkbox"]::before,
body.vag-app-open .censor-opt input::before {
  content: "";
  width: 8px;
  height: 5px;
  border-left: 2px solid #071015;
  border-bottom: 2px solid #071015;
  transform: rotate(-45deg) scale(0);
  transform-origin: center;
}

body.vag-auth-gate .legal-check input:checked,
body.vag-app-open .option input[type="checkbox"]:checked,
body.vag-app-open .censor-opt input:checked {
  border-color: rgba(242, 165, 49, .95);
  background: var(--accent);
}

body.vag-auth-gate .legal-check input:checked::before,
body.vag-app-open .option input[type="checkbox"]:checked::before,
body.vag-app-open .censor-opt input:checked::before {
  transform: rotate(-45deg) scale(1);
}

body.vag-app-open .file-formats {
  max-width: 24rem;
  color: rgba(190, 200, 190, .82);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  text-transform: none;
}

body.vag-app-open .file-name {
  margin-top: 10px;
}

body.vag-app-open .simple-options-grid {
  gap: 9px;
}

body.vag-app-open .simple-options-grid .option {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 17px;
  grid-template-rows: auto;
  align-items: center;
  column-gap: 7px;
  row-gap: 0;
  min-height: 48px;
}

body.vag-app-open .simple-options-grid .option-icon {
  grid-column: 1;
  margin: 0;
  font-size: .82rem;
  line-height: 1;
  text-align: center;
}

body.vag-app-open .simple-options-grid .option-label {
  grid-column: 2;
  min-width: 0;
}

body.vag-app-open .simple-options-grid .option input[type="checkbox"] {
  position: static;
  grid-column: 3;
  justify-self: end;
}

body.vag-app-open .simple-options-grid .option-hint {
  display: none;
}

@media (max-width: 560px) {
  body.vag-auth-gate .hero-panel {
    padding: 14px;
  }

  body.vag-app-open {
    padding-bottom: calc(86px + var(--vag-surface-safe-bottom, 0px));
  }

  body.vag-app-open #uploadSection,
  body.vag-app-open .workflow-shell,
  body.vag-app-open .panel {
    border-radius: 18px;
  }

  body.vag-app-open .file-label {
    min-height: 100px;
  }

  body.vag-app-open .file-formats {
    max-width: 18rem;
    font-size: .68rem;
  }

  body.vag-app-open .simple-options-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }

  body.vag-app-open .simple-options-grid .option {
    min-height: 46px;
    padding: 8px 7px;
  }

  body.vag-app-open .simple-cut-row {
    gap: 9px;
    margin-top: 12px;
  }

  body.vag-app-open .bottom-action-rail {
    border-radius: 14px 14px 0 0;
    box-shadow: 0 -12px 30px rgba(0,0,0,.34);
  }
}

/* Release auth-entry foundation lock.
   Folded out of the late semantic tail so auth owns its final surface rules. */
body.vag-auth-gate {
  background:
    radial-gradient(circle at 18% 12%, rgba(157, 181, 231, .12), transparent 34%),
    radial-gradient(circle at 86% 16%, rgba(240, 177, 62, .10), transparent 30%),
    linear-gradient(180deg, #080a0f 0%, #0b0e15 52%, #07080c 100%);
}

body.vag-auth-gate .container {
  width: min(1060px, calc(100% - 32px));
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, .92fr) minmax(340px, 1.08fr);
  gap: clamp(16px, 2.4vw, 28px);
  align-items: center;
  margin: 0 auto;
  padding: clamp(18px, 4vw, 42px) 0;
}

body.vag-auth-gate #heroSection,
body.vag-auth-gate #authGateSection {
  width: 100%;
  max-width: none;
  margin: 0;
}

body.vag-auth-gate #heroSection {
  min-height: 0;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(226, 202, 158, .16);
  border-radius: 24px;
  background:
    linear-gradient(140deg, rgba(244, 241, 232, .045), rgba(244, 241, 232, .012)),
    rgba(13, 18, 28, .76);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 28px 80px rgba(0, 0, 0, .26);
}

body.vag-auth-gate #heroSection .hero-panel__inner {
  max-width: 30rem;
  margin: 0;
}

body.vag-auth-gate #heroSection .hero-badge {
  color: rgba(226, 202, 158, .92);
  font-family: var(--font);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: .30em;
}

body.vag-auth-gate #heroSection h1 {
  max-width: 12ch;
  margin: 14px 0 10px;
  color: var(--dt-ink, #f4f1e8);
  font-family: var(--dt-font-serif, Georgia, serif);
  font-size: clamp(2.15rem, 3.2rem, 4.4rem);
  line-height: .96;
  letter-spacing: 0;
}

body.vag-auth-gate #heroSection .hero-subtitle {
  max-width: 28rem;
  margin: 0;
  color: rgba(244, 241, 232, .72);
  font-size: clamp(.92rem, 1rem, 1.06rem);
  font-weight: 720;
  line-height: 1.42;
}

body.vag-auth-gate #heroSection .hero-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: clamp(22px, 4vw, 34px);
}

body.vag-auth-gate #heroSection .hero-meta__item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(226, 202, 158, .14);
  border-radius: 14px;
  background: rgba(244, 241, 232, .04);
}

body.vag-auth-gate #heroSection .hero-meta__item span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  margin: 0;
  border-radius: 999px;
  color: #101015;
  background: linear-gradient(135deg, #ffe08a, #f0b13e);
  font-size: .76rem;
  font-weight: 950;
  letter-spacing: 0;
}

body.vag-auth-gate #heroSection .hero-meta__item strong {
  color: rgba(244, 241, 232, .90);
  font-family: var(--font);
  font-size: .9rem;
  font-weight: 850;
  line-height: 1.18;
}

body.vag-auth-gate #authGateSection {
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(226, 202, 158, .18);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(244, 241, 232, .04), rgba(244, 241, 232, .012)),
    rgba(12, 17, 27, .88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04), 0 28px 80px rgba(0, 0, 0, .30);
}

body.vag-auth-gate .auth-card-head {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
}

body.vag-auth-gate .auth-form-overline {
  color: rgba(226, 202, 158, .88);
  font-size: .68rem;
  font-weight: 950;
  letter-spacing: .24em;
  text-transform: uppercase;
}

body.vag-auth-gate #authGateSection .section-title {
  margin: 0;
  color: var(--dt-ink, #f4f1e8);
  font-size: clamp(1.55rem, 1.9rem, 2.25rem);
}

body.vag-auth-gate .auth-form-subtitle,
body.vag-auth-gate .auth-mode-note {
  margin: 0;
  color: rgba(244, 241, 232, .64);
  font-size: .86rem;
  font-weight: 720;
  line-height: 1.38;
}

body.vag-auth-gate .auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid rgba(226, 202, 158, .13);
  border-radius: 16px;
  background: rgba(6, 9, 15, .62);
}

body.vag-auth-gate .auth-tab {
  min-height: 40px;
  border: 0;
  border-radius: 12px;
  color: rgba(244, 241, 232, .66);
  background: transparent;
  font: inherit;
  font-size: .86rem;
  font-weight: 900;
  cursor: pointer;
}

body.vag-auth-gate .auth-tab.is-active {
  color: #0d1016;
  background: linear-gradient(135deg, #ffe08a, #f0b13e);
}

body.vag-auth-gate .auth-grid-center {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 0;
}

body.vag-auth-gate #authForm .segfx-field {
  display: grid;
  gap: 6px;
}

body.vag-auth-gate #authForm .segfx-field span {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
}

body.vag-auth-gate #authForm .text-input {
  min-height: 46px;
  border-radius: 14px;
  font-size: .94rem;
}

body.vag-auth-gate .auth-mode-note {
  margin-top: 10px;
}

body.vag-auth-gate .auth-legal[hidden],
body.vag-auth-gate #authLoginBtn[hidden],
body.vag-auth-gate #authRegisterBtn[hidden] {
  display: none;
}

body.vag-auth-gate .auth-legal {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding: 10px;
  border: 1px solid rgba(226, 202, 158, .12);
  border-radius: 14px;
  background: rgba(244, 241, 232, .035);
}

body.vag-auth-gate .legal-check {
  align-items: start;
  color: rgba(244, 241, 232, .66);
  font-size: .74rem;
  line-height: 1.28;
}

body.vag-auth-gate .mode-actions {
  display: grid;
  grid-template-columns: 1fr;
  margin-top: 14px;
}

body.vag-auth-gate .mode-actions .btn {
  width: 100%;
  min-height: 46px;
  border-radius: 14px;
}

body.vag-auth-gate .auth-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  margin-top: 12px;
  color: rgba(244, 241, 232, .48);
  font-size: .72rem;
}

body.vag-auth-gate .auth-status {
  margin-top: 12px;
  padding: 10px 12px;
  min-height: 39px;
  box-sizing: border-box;
  border-radius: 12px;
  background: rgba(244, 241, 232, .035);
}

@media (max-width: 760px) {
  body.vag-auth-gate .container {
    width: min(100% - 18px, 430px);
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 10px;
    align-items: start;
    padding: 18px 0 calc(22px + var(--vag-surface-safe-bottom, 0px));
  }

  body.vag-auth-gate #heroSection {
    padding: 16px;
    border-radius: 20px;
  }

  body.vag-auth-gate #heroSection h1 {
    max-width: none;
    margin: 10px 0 8px;
    font-size: 2.05rem;
  }

  body.vag-auth-gate #heroSection .hero-meta {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 6px;
    margin-top: 14px;
  }

  body.vag-auth-gate #heroSection .hero-meta__item {
    min-height: 0;
    grid-template-columns: 1fr;
    gap: 6px;
    justify-items: center;
    padding: 8px 6px;
    text-align: center;
  }

  body.vag-auth-gate #heroSection .hero-meta__item strong {
    font-size: .67rem;
  }

  body.vag-auth-gate #authGateSection {
    padding: 16px;
    border-radius: 20px;
  }
}


/* source: frontend/css/80-app-surface-contract.css */
/* VAG-SURFACE-001 candidate owner layer.
   This file is bundled only into an immutable candidate until public/index.html
   is switched atomically. It owns layout geometry, not shared component skin. */

html[data-ui-release],
html[data-ui-release] body {
  width: 100%;
  max-width: 100%;
  height: 100%;
  overflow: hidden;
}

/* VAG-NATIVE-SHELL-001
   The launch context is server/prepaint-owned and available before this
   stylesheet is applied. App containers lock only document-level gestures;
   their declared inner scroll owners restore vertical panning below. */
html[data-ui-release][data-launch-context="W0"],
html[data-ui-release][data-launch-context="W1"],
html[data-ui-release][data-launch-context="W3"],
html[data-ui-release][data-launch-context="W0"] body,
html[data-ui-release][data-launch-context="W1"] body,
html[data-ui-release][data-launch-context="W3"] body {
  overscroll-behavior: none;
}

html[data-ui-release][data-launch-context="W0"] body,
html[data-ui-release][data-launch-context="W1"] body,
html[data-ui-release][data-launch-context="W3"] body {
  touch-action: none;
}

html[data-ui-release][data-launch-context="W0"] body.vag-auth-gate [data-vag-surface-root="auth"][data-scroll-owner],
html[data-ui-release][data-launch-context="W1"] body.vag-auth-gate [data-vag-surface-root="auth"][data-scroll-owner],
html[data-ui-release][data-launch-context="W3"] body.vag-auth-gate [data-vag-surface-root="auth"][data-scroll-owner],
html[data-ui-release][data-launch-context="W0"] body.vag-app-open .studio-shell[data-scroll-owner],
html[data-ui-release][data-launch-context="W1"] body.vag-app-open .studio-shell[data-scroll-owner],
html[data-ui-release][data-launch-context="W3"] body.vag-app-open .studio-shell[data-scroll-owner],
html[data-ui-release][data-launch-context="W0"] [data-first-use-slides],
html[data-ui-release][data-launch-context="W1"] [data-first-use-slides],
html[data-ui-release][data-launch-context="W3"] [data-first-use-slides],
html[data-ui-release][data-launch-context="W0"] .apps-buggiman-modal__panel,
html[data-ui-release][data-launch-context="W1"] .apps-buggiman-modal__panel,
html[data-ui-release][data-launch-context="W3"] .apps-buggiman-modal__panel,
html[data-ui-release][data-launch-context="W0"] .result-delivery-sheet,
html[data-ui-release][data-launch-context="W1"] .result-delivery-sheet,
html[data-ui-release][data-launch-context="W3"] .result-delivery-sheet {
  touch-action: pan-y;
}

html[data-ui-release] .vag-app-topbar,
html[data-ui-release] .bottom-action-rail,
html[data-ui-release] .xapp-c2 {
  -webkit-touch-callout: none;
  user-select: none;
}

html[data-ui-release] .vag-app-topbar img,
html[data-ui-release] .bottom-action-rail img,
html[data-ui-release] .xapp-c2 img {
  -webkit-user-drag: none;
  user-drag: none;
}

html[data-ui-release] body,
html[data-ui-release] [data-vag-surface-root],
html[data-ui-release] [data-modal-background],
html[data-ui-release] .vag-app-topbar,
html[data-ui-release] .studio-shell,
html[data-ui-release] .workbench-grid,
html[data-ui-release] .workbench-grid > *,
html[data-ui-release] .workflow-panel,
html[data-ui-release] .editor-shell,
html[data-ui-release] .editor-main,
html[data-ui-release] .ai-workspace {
  min-width: 0;
  max-width: 100%;
}

html[data-ui-release] body[data-safe-area-owner] {
  --vag-surface-safe-top: env(safe-area-inset-top, 0px);
  --vag-surface-safe-right: env(safe-area-inset-right, 0px);
  --vag-surface-safe-bottom: env(safe-area-inset-bottom, 0px);
  --vag-surface-safe-left: env(safe-area-inset-left, 0px);
  --mig-safe-area-top: var(--vag-surface-safe-top);
  --mig-safe-area-right: var(--vag-surface-safe-right);
  --mig-safe-area-bottom: var(--vag-surface-safe-bottom);
  --mig-safe-area-left: var(--vag-surface-safe-left);
  --vag-shell-safe-top: var(--vag-surface-safe-top);
  --vag-shell-safe-right: var(--vag-surface-safe-right);
  --vag-shell-safe-bottom: var(--vag-surface-safe-bottom);
  --vag-shell-safe-left: var(--vag-surface-safe-left);
}

html[data-ui-release] body.vag-auth-gate {
  padding: 0;
  overflow: hidden;
}

html[data-ui-release] body.vag-auth-gate [data-vag-surface-root="auth"][data-viewport-owner] {
  width: 100%;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  grid-template-rows: repeat(4, max-content);
  align-content: start;
  align-content: safe center;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: max(16px, var(--vag-surface-safe-top)) max(10px, var(--vag-surface-safe-right)) max(24px, var(--vag-surface-safe-bottom)) max(10px, var(--vag-surface-safe-left));
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 860px), (max-height: 720px) {
  html[data-ui-release] body.vag-auth-gate [data-vag-surface-root="auth"][data-viewport-owner] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "card"
      "showcase"
      "ecosystem"
      "footer";
    grid-template-rows: repeat(5, max-content);
    align-content: start;
  }
}

html[data-ui-release] body.vag-app-open {
  --vag-workbench-max: 900px;
  --vag-workbench-gutter: clamp(8px, 1.2vw, 16px);
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
}

html[data-ui-release] body.vag-app-open #appUnlocked[data-viewport-owner] {
  position: fixed;
  inset: 0;
  width: auto;
  max-width: none;
  height: auto;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
}

html[data-ui-release] body.vag-app-open .vag-app-topbar {
  position: relative;
  z-index: 2;
  isolation: isolate;
  grid-row: 1;
  align-self: start;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 8px 10px;
  width: min(
    var(--vag-workbench-max),
    calc(100% - max(var(--vag-workbench-gutter), var(--vag-surface-safe-left)) - max(var(--vag-workbench-gutter), var(--vag-surface-safe-right)))
  );
  margin: max(8px, var(--vag-surface-safe-top)) auto 0;
  padding-top: 10px;
  border: 1px solid rgba(226, 202, 158, .14);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(18, 22, 31, .99), rgba(8, 10, 15, .985));
}

html[data-ui-release] body.vag-app-open .vag-app-topbar::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: calc(100% - 1px);
  right: -1px;
  left: -1px;
  height: 28px;
  background: linear-gradient(180deg, rgba(8, 10, 15, .96), rgba(8, 10, 15, 0));
  pointer-events: none;
}

html[data-ui-release] body.vag-app-open .vag-app-topbar > .vag-app-topbar__brand {
  grid-column: 1;
  grid-row: 1;
}

html[data-ui-release] body.vag-app-open .vag-app-topbar > .vag-app-actions {
  grid-column: 2;
  grid-row: 1;
}

html[data-ui-release] body.vag-app-open .vag-app-topbar > #workflowTabs {
  box-sizing: border-box;
  display: grid;
  grid-column: 1 / -1;
  grid-row: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
}

html[data-ui-release] body.vag-app-open .studio-shell[data-scroll-owner] {
  grid-row: 2;
  align-self: stretch;
  width: 100%;
  height: auto;
  min-height: 0;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: clamp(24px, 2.4vw, 30px) var(--vag-workbench-gutter) clamp(34px, 3vw, 44px);
  scrollbar-gutter: stable;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

html[data-ui-release][data-launch-context="W2"] body.vag-app-open .studio-shell[data-scroll-owner] {
  touch-action: pan-x pan-y pinch-zoom;
}

html[data-ui-release] body.vag-app-open .workbench-grid {
  width: min(100%, var(--vag-workbench-max));
  min-height: 0;
  margin-inline: auto;
  padding: 0;
  grid-template-columns: minmax(0, 1fr);
  grid-auto-rows: max-content;
  gap: clamp(10px, 1.3vw, 16px);
  align-content: start;
  border: 0;
  background: transparent;
  box-shadow: none;
}

html[data-ui-release] body.vag-app-open #uploadSection,
html[data-ui-release] body.vag-app-open .workflow-shell,
html[data-ui-release] body.vag-app-open #outputPlaceholder,
html[data-ui-release] body.vag-app-open #progressSection,
html[data-ui-release] body.vag-app-open #resultSection,
html[data-ui-release] body.vag-app-open #storiesResult,
html[data-ui-release] body.vag-app-open .processing-journal {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

html[data-ui-release] body.vag-app-open #outputPlaceholder,
html[data-ui-release] body.vag-app-open #progressSection,
html[data-ui-release] body.vag-app-open #resultSection,
html[data-ui-release] body.vag-app-open #storiesResult,
html[data-ui-release] body.vag-app-open .processing-journal {
  grid-column: 1 / -1;
  width: 100%;
  margin-inline: 0;
}

html[data-ui-release] body.vag-app-open .bottom-action-rail {
  position: relative;
  z-index: 2;
  isolation: isolate;
  grid-row: 3;
  align-self: end;
  width: min(
    var(--vag-workbench-max),
    calc(100% - max(var(--vag-workbench-gutter), var(--vag-surface-safe-left)) - max(var(--vag-workbench-gutter), var(--vag-surface-safe-right)))
  );
  min-width: 0;
  margin: 0 auto;
  padding-right: max(14px, var(--vag-surface-safe-right));
  padding-bottom: max(8px, var(--vag-surface-safe-bottom));
  padding-left: max(14px, var(--vag-surface-safe-left));
  border-right: 1px solid rgba(226, 202, 158, .14);
  border-left: 1px solid rgba(226, 202, 158, .14);
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, rgba(10, 12, 17, .985), rgba(6, 7, 10, .995));
}

html[data-ui-release] body.vag-app-open .bottom-action-rail::before {
  content: "";
  position: absolute;
  z-index: -1;
  right: -1px;
  bottom: calc(100% - 1px);
  left: -1px;
  height: 34px;
  background: linear-gradient(180deg, rgba(7, 8, 12, 0), rgba(7, 8, 12, .96));
  pointer-events: none;
}

html[data-ui-release] body.vag-app-open #bottomPrimaryBtn {
  min-width: 0;
  min-height: 54px;
}

html[data-ui-release] body.vag-app-open .result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  justify-content: stretch;
}

html[data-ui-release] body.vag-app-open .result-actions .btn {
  width: 100%;
  min-height: 48px;
  margin: 0;
}

html[data-ui-release] body.vag-app-open .result-actions .btn:disabled {
  cursor: not-allowed;
}

html[data-ui-release] [data-overlay-root] {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  overflow: visible;
  pointer-events: none;
}

html[data-ui-release] [data-overlay-root] > dialog[open] {
  pointer-events: auto;
}

/* Apps v6 keeps its immutable skin; VideoAppGrader owns the allocator that
   keeps the provider rail fully inside the current visual viewport. */
html[data-ui-release] body.vag-app-open .apps-buggiman-rail:not([data-suppressed="true"]),
html[data-ui-release] body.vag-app-open .apps-buggiman-rail:not([data-suppressed="true"]):hover,
html[data-ui-release] body.vag-app-open .apps-buggiman-rail:not([data-suppressed="true"]):focus-visible,
html[data-ui-release] body.vag-app-open .apps-buggiman-rail:not([data-suppressed="true"]):active {
  top: var(--vag-provider-visual-center-y, 50%);
  right: calc(var(--vag-provider-visual-right, 0px) + max(0px, var(--vag-surface-safe-right)));
  width: 44px;
  min-width: 44px;
  min-height: 58px;
  transform: translateY(-50%);
}

/* Apps v6 owns the semantic modal interlock. The app projection owns its
   perceptible one-modal contour and hides only the exact suppressed v6 rail;
   removing the provider attribute restores the immutable provider skin. */
html[data-ui-release] body.vag-app-open
  #apps-buggiman-rail.apps-buggiman-rail[data-apps-provider-owner="20260723-apps-shell-return-v6"][data-apps-provider-modal-suppressed="true"] {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

html[data-ui-release] .result-delivery-sheet {
  padding-bottom: max(18px, var(--vag-surface-safe-bottom));
}

html[data-ui-release] .vag-first-use {
  --app-first-use-panel-inline: 560px;
  --app-first-use-overlay-padding: 16px;
  --app-first-use-overlay-padding-compact: 8px;
  background: rgba(3, 5, 9, .68);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

html[data-ui-release] .vag-first-use__panel {
  gap: 14px;
  padding: clamp(20px, 4vw, 30px);
  border: 1px solid rgba(240, 177, 62, .34);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(23, 29, 40, .99), rgba(10, 14, 21, .99));
  box-shadow: 0 28px 80px rgba(0, 0, 0, .54);
}

html[data-ui-release] .vag-first-use__panel:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 225, 140, .72), 0 28px 80px rgba(0, 0, 0, .54);
}

html[data-ui-release] .vag-first-use [data-first-use-control="skip"] {
  min-width: 44px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(244, 241, 232, .18);
  border-radius: 999px;
  background: rgba(244, 241, 232, .06);
  color: var(--studio-text, #f4f1e8);
  font: 700 .78rem/1 system-ui, sans-serif;
}

html[data-ui-release] .vag-first-use [data-first-use-eyebrow],
html[data-ui-release] .vag-first-use [data-first-use-slide-eyebrow] {
  color: var(--studio-gold-strong, #ffd56f);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

html[data-ui-release] .vag-first-use [data-first-use-counter] {
  display: block;
  margin-top: 4px;
  color: rgba(244, 241, 232, .58);
  font-size: .78rem;
}

html[data-ui-release] .vag-first-use h2,
html[data-ui-release] .vag-first-use p {
  margin: 0;
  overflow-wrap: anywhere;
}

html[data-ui-release] .vag-first-use h2 {
  font-size: clamp(1.5rem, 5vw, 2.15rem);
  line-height: 1.05;
}

html[data-ui-release] .vag-first-use p {
  color: rgba(244, 241, 232, .72);
  font-size: 1rem;
  line-height: 1.5;
}

html[data-ui-release] .vag-first-use [data-first-use-slide] {
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: min(280px, 42vh);
  padding: 8px 2px 18px;
}

html[data-ui-release] .vag-first-use [data-first-use-progress] {
  min-width: 72px;
}

html[data-ui-release] .vag-first-use [data-first-use-dot] {
  background: rgba(244, 241, 232, .22);
}

html[data-ui-release] .vag-first-use [data-first-use-dot][aria-current="step"] {
  width: 22px;
  background: var(--studio-gold-strong, #ffd56f);
}

html[data-ui-release] .vag-first-use [data-first-use-control="back"],
html[data-ui-release] .vag-first-use [data-first-use-control="next"],
html[data-ui-release] .vag-first-use [data-first-use-control="done"] {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid rgba(157, 181, 231, .25);
  border-radius: 999px;
  background: rgba(157, 181, 231, .09);
  color: var(--studio-text, #f4f1e8);
  font-weight: 800;
}

html[data-ui-release] .vag-first-use [data-first-use-control="next"],
html[data-ui-release] .vag-first-use [data-first-use-control="done"] {
  border-color: rgba(240, 177, 62, .46);
  background: linear-gradient(135deg, rgba(240, 177, 62, .28), rgba(240, 177, 62, .12));
}

html[data-ui-release] .vag-first-use [data-first-use-feedback] {
  flex: 1 1 140px;
  color: rgba(244, 241, 232, .72);
  font-size: .78rem;
}

html[data-ui-release] [data-modal-background][inert] {
  user-select: none;
}

html[data-ui-release] img,
html[data-ui-release] video,
html[data-ui-release] canvas,
html[data-ui-release] svg {
  max-width: 100%;
}

html[data-ui-release] pre,
html[data-ui-release] code,
html[data-ui-release] .file-name,
html[data-ui-release] .result-info,
html[data-ui-release] .progress-text,
html[data-ui-release] .processing-journal,
html[data-ui-release] .ai-chat-message {
  overflow-wrap: anywhere;
  word-break: break-word;
}

html[data-ui-release] .segment-timeline,
html[data-ui-release] .editor-timeline,
html[data-ui-release] .editor-preview-stack,
html[data-ui-release] .ai-chat-log {
  max-width: 100%;
}

@media (min-width: 1080px) {
  html[data-ui-release] body.vag-app-open .workbench-grid {
    row-gap: 16px;
  }
}

@media (max-width: 719px) {
  html[data-ui-release] body.vag-app-open .studio-shell[data-scroll-owner] {
    padding: 22px 8px 34px;
  }

  html[data-ui-release] body.vag-app-open .workbench-grid {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  html[data-ui-release] body.vag-app-open .fast-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  html[data-ui-release] body.vag-app-open .fast-setting,
  html[data-ui-release] body.vag-app-open .fast-setting--control {
    grid-template-columns: 38px minmax(0, 1fr) minmax(30px, auto);
  }

  html[data-ui-release] body.vag-app-open .fast-setting--control select,
  html[data-ui-release] body.vag-app-open .fast-setting--control input[type="number"] {
    grid-column: 2 / -1;
  }

  html[data-ui-release] input,
  html[data-ui-release] select,
  html[data-ui-release] textarea {
    font-size: 16px;
  }

  html[data-ui-release] body.vag-app-open .result-actions {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 430px) {
  html[data-ui-release] body.vag-app-open .vag-app-topbar {
    padding-inline: 8px;
  }

  html[data-ui-release] body.vag-app-open .workbench-grid,
  html[data-ui-release] body.vag-app-open #uploadSection,
  html[data-ui-release] body.vag-app-open .workflow-shell {
    border-radius: 14px;
  }

  html[data-ui-release] body.vag-app-open .bottom-action-rail {
    padding-right: max(10px, var(--vag-surface-safe-right));
    padding-left: max(10px, var(--vag-surface-safe-left));
  }

  html[data-ui-release] .vag-first-use [data-first-use-slide] {
    min-height: 220px;
  }
}

@media (max-height: 520px) {
  html[data-ui-release] body.vag-app-open .vag-app-topbar {
    margin-top: max(4px, var(--vag-surface-safe-top));
    padding-top: 6px;
    padding-bottom: 6px;
  }

  html[data-ui-release] body.vag-app-open .studio-shell[data-scroll-owner] {
    padding-top: 6px;
    padding-bottom: 6px;
  }

  html[data-ui-release] body.vag-app-open .bottom-action-rail[data-bottom-safe-consumer] {
    gap: 4px;
    padding-top: 6px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html[data-ui-release] *,
  html[data-ui-release] *::before,
  html[data-ui-release] *::after {
    animation: none;
    transition: none;
    scroll-behavior: auto;
  }

  html[data-ui-release] .file-label:hover,
  html[data-ui-release] .option:hover,
  html[data-ui-release] .btn:hover:not(:disabled),
  html[data-ui-release] .go-btn:hover:not(:disabled),
  html[data-ui-release] .toggle-btn:hover,
  html[data-ui-release] .download-btn:hover,
  html[data-ui-release] .story-card:hover,
  html[data-ui-release] .segment-timeline__item:hover,
  html[data-ui-release] .ms-btn:hover,
  html[data-ui-release] body.vag-app-open #bottomPrimaryBtn.btn-primary:hover:not(:disabled) {
    transform: none;
  }
}


/* source: frontend/css/app-entry-foundation.css */
@layer mig-app-entry-foundation {
  [data-app-entry-root] {
    display: grid;
    inline-size: min(100%, 900px);
    margin-inline: auto;
    gap: var(--app-entry-gap, 16px);
  }

  [data-app-entry-region="identity"],
  [data-app-entry-region="description"],
  [data-app-entry-region="auth"],
  [data-app-entry-region="account-help"] {
    min-inline-size: 0;
  }

  [data-app-entry-region="identity"] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  [data-app-entry-identity] {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-inline-size: 0;
  }

  [data-app-entry-copy] {
    display: grid;
    gap: 6px;
    max-inline-size: var(--app-entry-copy-inline, 62ch);
  }

  [data-app-entry-auth-tabs] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  [data-app-entry-auth-pane][hidden],
  [data-first-use-slide][hidden],
  [data-first-use-control][hidden] {
    display: none;
  }

  [data-app-entry-form] {
    display: grid;
    gap: 12px;
  }

  [data-app-entry-form] label {
    display: grid;
    gap: 6px;
    min-inline-size: 0;
  }

  [data-app-entry-form] input,
  [data-app-entry-form] button,
  [data-app-entry-auth-tabs] button,
  [data-first-use-control] {
    min-block-size: 44px;
  }

  [data-app-entry-feedback] {
    min-block-size: 1.35em;
    overflow-wrap: anywhere;
  }

  [data-first-use-root] {
    position: absolute;
    inset: 0;
    z-index: var(--app-first-use-z, 40);
    display: grid;
    place-items: center;
    padding: var(--app-first-use-overlay-padding, 16px);
  }

  [data-first-use-root][hidden] {
    display: none;
  }

  [data-first-use-panel] {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    inline-size: min(100%, var(--app-first-use-panel-inline, 680px));
    max-block-size: calc(100% - 2 * var(--app-first-use-panel-clearance, 8px));
    min-inline-size: 0;
    overflow: hidden;
    outline: none;
  }

  [data-first-use-head],
  [data-first-use-actions] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-inline-size: 0;
  }

  [data-first-use-slides] {
    min-block-size: 0;
    overflow: auto;
    overscroll-behavior: contain;
  }

  [data-first-use-slide] {
    min-inline-size: 0;
    overflow-wrap: anywhere;
  }

  [data-first-use-progress] {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  [data-first-use-dot] {
    inline-size: 8px;
    block-size: 8px;
    border-radius: 999px;
  }

  [data-first-use-actions] {
    flex-wrap: wrap;
  }

  [data-first-use-action-group] {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-inline-start: auto;
  }

  @media (max-width: 420px) {
    [data-app-entry-root] {
      gap: var(--app-entry-gap-compact, 12px);
    }

    [data-first-use-root] {
      padding: var(--app-first-use-overlay-padding-compact, 8px);
    }

    [data-first-use-head] {
      align-items: start;
    }

    [data-first-use-actions] {
      align-items: stretch;
    }

    [data-first-use-action-group] {
      inline-size: 100%;
      margin-inline-start: 0;
    }

    [data-first-use-action-group] > * {
      flex: 1 1 0;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    [data-app-entry-root],
    [data-first-use-root],
    [data-first-use-panel],
    [data-first-use-slide] {
      scroll-behavior: auto;
      transition-duration: 0.01ms;
      animation-duration: 0.01ms;
      animation-iteration-count: 1;
    }
  }
}

/*
 * Canonical region projection.
 * Release builders append the foundation after the app skin so this
 * structural rule wins legacy column placement without owning colors,
 * typography, materials, safe areas or product copy. The two phantom-ID
 * branches are a deliberate specificity escrow: :is() matches through the
 * attribute branch, while its specificity outranks historical body/app/id
 * selectors without priority flags or app-specific patches.
 */
:is(#mig-app-entry-root-a, [data-app-entry-root]):is(#mig-app-entry-root-b, [data-app-entry-root]) {
  inline-size: min(100%, 900px);
  max-inline-size: 900px;
  margin-inline: auto;
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas:
    "identity"
    "description"
    "auth"
    "account-help";
}

:is(#mig-app-entry-root-a, [data-app-entry-root]):is(#mig-app-entry-root-b, [data-app-entry-root]) > [data-app-entry-region="identity"] {
  grid-area: identity;
}

:is(#mig-app-entry-root-a, [data-app-entry-root]):is(#mig-app-entry-root-b, [data-app-entry-root]) > [data-app-entry-region="description"] {
  grid-area: description;
}

:is(#mig-app-entry-root-a, [data-app-entry-root]):is(#mig-app-entry-root-b, [data-app-entry-root]) > [data-app-entry-region="auth"] {
  grid-area: auth;
}

:is(#mig-app-entry-root-a, [data-app-entry-root]):is(#mig-app-entry-root-b, [data-app-entry-root]) > [data-app-entry-region="account-help"] {
  grid-area: account-help;
}

/*
 * State truth must outrank app skins as reliably as the region projection.
 * Some historical skins give visible slide/control selectors app-level
 * specificity. These escrow selectors keep the native `hidden` contract
 * authoritative without priority flags and without per-app overrides.
 */
:is(#mig-app-entry-pane-hidden-a, [data-app-entry-auth-pane]):is(#mig-app-entry-pane-hidden-b, [data-app-entry-auth-pane])[hidden],
:is(#mig-first-use-slide-hidden-a, [data-first-use-slide]):is(#mig-first-use-slide-hidden-b, [data-first-use-slide])[hidden],
:is(#mig-first-use-control-hidden-a, [data-first-use-control]):is(#mig-first-use-control-hidden-b, [data-first-use-control])[hidden],
:is(#mig-first-use-root-hidden-a, [data-first-use-root]):is(#mig-first-use-root-hidden-b, [data-first-use-root])[hidden] {
  display: none;
}
