:root {
  --bg: #070b14;
  --card: rgba(16, 22, 38, 0.92);
  --ink: #f4f7fb;
  --muted: #a9b6ce;
  --line: rgba(168, 184, 214, 0.18);
  --blue: #6ea2ff;
  --paper: #f6f3ec;
  --danger: #ffb4b4;
  color-scheme: dark;
  font-family: Outfit, "Avenir Next", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  letter-spacing: 0;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(900px 520px at -10% -20%, rgba(59, 91, 255, 0.38), transparent 60%),
    radial-gradient(760px 480px at 110% -10%, rgba(124, 92, 255, 0.28), transparent 55%),
    radial-gradient(700px 420px at 50% 120%, rgba(56, 189, 248, 0.1), transparent 50%),
    var(--bg);
}

:focus-visible {
  outline: 2px solid #9db4ff;
  outline-offset: 2px;
}

.wrap {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
}

a { color: inherit; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 20, 0.78);
  border-bottom: 1px solid rgba(168, 184, 214, 0.1);
}

.bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.03em;
}

.brand img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: block;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-left: auto;
}

.credits {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(125, 211, 252, 0.1);
  border: 1px solid rgba(125, 211, 252, 0.3);
  color: #dff6ff;
  font-size: 13px;
  text-decoration: none;
}

a.credits:hover { border-color: rgba(125, 211, 252, 0.7); }

.credits strong { font-size: 16px; }

.account-loader {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
}

.loader {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 12px;
  width: 100%;
  min-height: 168px;
  padding: 28px 16px;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.clip-grid > .loader,
.addon-grid > .loader,
.bin-list > .loader,
.cost-card > .loader {
  grid-column: 1 / -1;
}

.loader-spin {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid rgba(168, 184, 214, 0.22);
  border-top-color: #8eb6ff;
  animation: loader-spin 0.7s linear infinite;
}

.account-loader .loader-spin {
  width: 22px;
  height: 22px;
  border-width: 2px;
}

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

@media (prefers-reduced-motion: reduce) {
  .loader-spin { animation: none; border-color: #8eb6ff; opacity: 0.8; }
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 10px 16px;
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  color: var(--ink);
}

.btn.primary {
  background: linear-gradient(135deg, #3b6cff, #7a5cff);
  color: white;
  box-shadow: 0 8px 22px rgba(70, 96, 255, 0.32);
}

.btn.ghost {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--line);
}

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

.g-mark { width: 16px; height: 16px; }

.account { display: flex; align-items: center; gap: 8px; }

.account img,
.avatar-fallback {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  background: #2a3860;
  font-weight: 700;
  font-size: 14px;
}

.account-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.hero { padding: 22px 0 0; max-width: 680px; }

.hero h1 {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.12;
}

.hero .lede { margin: 8px 0 0; font-size: 16px; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1, h2, h3 { letter-spacing: -0.03em; }

h1 {
  margin: 0;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 0.98;
  font-weight: 700;
}

h2 { margin: 0; font-size: clamp(28px, 3vw, 40px); line-height: 1.1; }

h3 { margin: 0 0 6px; font-size: 18px; }

.lede, .section-head p, .example p, .flow p, .gate-note, .note, .field-hint {
  color: var(--muted);
  line-height: 1.55;
}

.lede { margin: 14px 0 0; font-size: 18px; max-width: 62ch; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.section { padding: 34px 0; }

.section-head { max-width: 680px; margin-bottom: 18px; }

.section-head p { margin: 8px 0 0; }

#studio, #how, #examples, #faq { scroll-margin-top: 88px; }

.flow {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin: 0;
  padding: 0;
}

.flow li {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 14px 18px;
  min-height: 180px;
}

.flow-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8 55%, #c4b5fd);
  color: #07101f;
  font-weight: 700;
}

.flow p, .example p { margin: 0; font-size: 14px; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
}

.banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.banner p { margin: 0; }

.auth-error, .form-error { color: var(--danger); margin: 0 0 12px; }

.studio {
  display: grid;
  grid-template-columns: minmax(300px, 400px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.stage-column {
  display: grid;
  gap: 16px;
  min-width: 0;
  align-content: start;
}

.controls { padding: 16px; }

.drop {
  display: grid;
  gap: 4px;
  justify-items: center;
  min-height: 148px;
  padding: 18px;
  text-align: center;
  border: 1.5px dashed rgba(158, 186, 255, 0.55);
  border-radius: 16px;
  background: rgba(12, 18, 34, 0.7);
  cursor: pointer;
}

.drop.hot {
  background: rgba(80, 112, 255, 0.16);
  border-color: #9db4ff;
}

.drop input { display: none; }

.drop-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: rgba(110, 162, 255, 0.14);
  color: #b9d0ff;
}

.drop-mark svg { width: 22px; height: 22px; }

.drop-title { font-weight: 650; font-weight: 600; }

.drop-hint, .note, .field-hint, .gate-note { font-size: 13px; }

.fields { display: grid; gap: 14px; margin-top: 16px; }

.fields label, .profile-card label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

fieldset {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 8px;
}

legend { font-size: 13px; font-weight: 600; padding: 0; }

.fields .value {
  float: right;
  color: var(--muted);
  font-weight: 500;
}

.field-hint, .gate-note, .note { margin: 0; }

.fields label .field-hint { font-weight: 500; }

.segment {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0c1220;
}

.segment button, .aspects button {
  font: inherit;
  color: #d5def0;
  cursor: pointer;
}

.segment button {
  border: 0;
  border-radius: 10px;
  padding: 9px 6px;
  background: transparent;
  font-weight: 600;
}

.segment button[aria-pressed="true"] {
  background: linear-gradient(135deg, #3b6cff, #7a5cff);
  color: white;
}

.segment button.is-locked {
  color: #7e8ba3;
  cursor: not-allowed;
}

.aspects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.aspects button {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0c1220;
}

.aspects button svg { width: 54px; height: 40px; }

.aspects button span { font-weight: 650; font-weight: 600; }

.aspects button small { color: var(--muted); }

.aspects button[aria-pressed="true"] {
  border-color: #8eabff;
  background: rgba(70, 102, 255, 0.16);
  box-shadow: inset 0 0 0 1px #8eabff;
}

.pencils {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pencils button {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 72px;
  padding: 8px 4px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c1220;
  color: #d5def0;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.pencils button svg { width: 46px; height: 30px; }

.pencils button[aria-pressed="true"] {
  border-color: #8eabff;
  background: rgba(70, 102, 255, 0.16);
  box-shadow: inset 0 0 0 1px #8eabff;
}

select,
.profile-card input[type="text"],
.profile-card input[type="date"],
.support-form input[type="text"],
.support-form input[type="email"] {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c1220;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

input[type="range"] { width: 100%; accent-color: #7c93ff; }

.check {
  display: flex !important;
  align-items: flex-start;
  gap: 10px;
  font-weight: 500 !important;
}

.check input { width: 18px; height: 18px; margin-top: 1px; accent-color: #7c93ff; }

.legal-check a { color: #b9d0ff; }

.actions { display: grid; gap: 8px; margin-top: 16px; }

.actions .btn, .example .btn { width: 100%; }

#upgrade.is-empty {
  border-color: rgba(240, 180, 90, 0.85);
  background: rgba(240, 180, 90, 0.16);
  color: #ffe7c2;
}

.gate-note { margin-top: 10px; }

.note { margin-top: 8px; }

.stage {
  padding: 14px;
  display: grid;
  gap: 12px;
  align-content: start;
}

.frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.35), transparent 28%),
    var(--paper);
  color: #243049;
}

.frame.tall {
  aspect-ratio: 9 / 16;
  width: auto;
  height: min(72vh, 640px);
  max-width: 100%;
  justify-self: center;
}

.stage-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
  padding: 16px;
}

.stage-empty svg { width: min(72%, 240px); }

.stage-empty p { margin: 0; color: #5d6b84; }

#preview, #result {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: var(--paper);
}

#preview.ready {
  cursor: grab;
  touch-action: none;
}

#preview.dragging { cursor: grabbing; }

.crop-note {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 2;
  margin: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(7, 11, 20, 0.78);
  color: #e7eefc;
  font-size: 13px;
  text-align: center;
  pointer-events: none;
}

#result { object-fit: contain; }

video::-webkit-media-controls-overflow-button,
video::-webkit-media-controls-download-button {
  display: none !important;
}

.progress-wrap {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(7, 11, 20, 0.82);
  color: white;
}

.progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  overflow: hidden;
}

.progress-bar {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.status { margin: 8px 0 0; color: #d5def2; font-size: 13px; }

.result-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.result-row .note { margin: 0; }

.result-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.recent { margin-top: 0; }

.recent-head h2 { font-size: clamp(24px, 2.4vw, 32px); }

.recent-head, .timeline-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.recent-head h2, .timeline-head h2, .editor-bin h2 { margin: 0; }

.recent-head p, .editor-page .section-head p, .library-page .section-head p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.recent-actions, .editor-stage-actions, .library-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.clip-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.clip-card {
  padding: 10px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.clip-media {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
  overflow: hidden;
  background: var(--paper);
}

.clip-media video,
.clip-still {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
  display: block;
}

.clip-still {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.clip-play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  transform: translate(-50%, -50%);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px 12px 14px;
  border: 0;
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.84);
  color: white;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.38);
}

.clip-play svg { display: block; margin-left: 1px; }

.clip-play:hover { background: rgba(7, 11, 20, 0.94); }

.clip-media.is-started .clip-still { display: none; }

.clip-media.is-playing .clip-play { display: none; }

.clip-body { display: grid; gap: 4px; padding: 0 4px 4px; }

.clip-title-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.clip-title {
  flex: 1;
  min-width: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.clip-body .note { margin: 0; }

.clip-more { position: relative; flex: none; }

.clip-more-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  margin-top: -4px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}

.clip-more-btn:hover,
.clip-more-btn[aria-expanded="true"] { background: rgba(255, 255, 255, 0.08); }

.clip-menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 6;
  min-width: 148px;
  padding: 6px;
  display: grid;
  gap: 2px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #121826;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.clip-menu button {
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.clip-menu button:hover { background: rgba(255, 255, 255, 0.06); }

.clip-menu button.danger { color: var(--danger); }

.clip-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.btn.tiny { padding: 6px 10px; font-size: 13px; }

.btn.danger { color: var(--danger); }

.clip-confirm {
  display: grid;
  gap: 8px;
  padding: 2px 4px 4px;
}

.clip-confirm p { margin: 0; font-size: 14px; }

.library-page, .editor-page { padding: 28px 0 72px; }

.library-page h1, .editor-page h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 12px 0;
}

.library-tools { margin: -4px 0 16px; }

.editor {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.7fr);
  gap: 14px;
  align-items: start;
}

.editor-stage, .editor-bin, .timeline { padding: 14px; }

.timeline { grid-column: 1 / -1; }

.editor-stage { display: grid; gap: 12px; }

.editor-stage-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.editor-stage-bar .note { margin: 0; }

#editor-player {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--paper);
}

.editor-bin h2 { font-size: 22px; }

.bin-list { display: grid; gap: 8px; margin-top: 12px; max-height: 520px; overflow: auto; }

.bin-row {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0c1220;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.bin-row img, .bin-fallback, .timeline-clip img, .timeline-fallback {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  border-radius: 8px;
  background: var(--paper);
}

.bin-row strong, .timeline-clip strong { display: block; font-size: 14px; }

.bin-row small, .timeline-clip small { color: var(--muted); font-size: 12px; }

.bin-add {
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  padding-right: 6px;
}

.timeline-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  min-height: 168px;
}

.timeline-clip {
  flex: 1 1 180px;
  min-width: 180px;
  max-width: 280px;
  display: grid;
  gap: 8px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #0c1220;
  cursor: grab;
}

.timeline-face {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--paper);
  cursor: pointer;
}

.timeline-face img, .timeline-face .timeline-fallback { border-radius: 10px; }

.timeline-duration {
  position: absolute;
  right: 6px;
  bottom: 6px;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(7, 11, 20, 0.78);
  color: white;
  font-size: 11px;
  font-weight: 700;
}

.timeline-face .timeline-index { position: absolute; left: 6px; top: 6px; }

.timeline-clip.selected { border-color: #8eabff; box-shadow: inset 0 0 0 1px #8eabff; }

.timeline-clip.dragging { opacity: 0.55; }

.timeline-clip header {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: baseline;
}

.timeline-index {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #818cf8);
  color: #07101f;
  font-size: 12px;
  font-weight: 700;
}

.timeline-actions { display: flex; flex-wrap: wrap; gap: 6px; }

.timeline-empty, .bin-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.timeline-hint { margin: 8px 0 0; }

.example-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.example {
  padding: 14px;
  display: grid;
  gap: 10px;
  align-content: start;
}

.example-art {
  height: 210px;
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  display: grid;
  place-items: center;
}

.example-art img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

.example-art svg { width: 86%; height: 70%; }

.example h3 { font-size: 20px; }

.faq { display: grid; gap: 8px; }

.faq details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 0 16px;
}

.faq summary {
  cursor: pointer;
  font-weight: 600;
  padding: 14px 0;
  list-style: none;
}

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

.faq details p { margin: 0 0 14px; color: var(--muted); line-height: 1.55; }

.support-form {
  display: grid;
  gap: 12px;
  max-width: 640px;
  margin-top: 22px;
  padding: 18px;
}

.support-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
}

.support-form textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0c1220;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
}

.support-form .btn { justify-self: start; min-width: 140px; }

.prose {
  padding: 28px 0 72px;
  max-width: 760px;
}

.prose h1 { font-size: clamp(36px, 5vw, 56px); margin: 12px 0; }

.prose .eyebrow { margin: 18px 0 0; color: var(--blue); }

.prose h2 { font-size: 22px; margin: 28px 0 8px; }

.prose > p { color: var(--muted); line-height: 1.65; }

.updated { font-size: 13px; }

.back {
  display: inline-flex;
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.welcome-page { padding: 28px 0 64px; }

.welcome-wrap {
  min-height: calc(100vh - 220px);
  display: grid;
  align-items: center;
}

.profile-card {
  width: min(480px, 100%);
  margin: 0 auto;
  padding: 26px 22px 20px;
  border-radius: 22px;
  background: #12182b;
  border: 1px solid var(--line);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}

.profile-card h2 { font-size: 30px; margin: 0 0 8px; }

.profile-card .lede { margin: 0 0 16px; font-size: 15px; }

.profile-actions { display: flex; gap: 8px; margin-top: 6px; }

.profile-actions .btn.primary { flex: 1; }

#profile-dialog {
  width: min(480px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

#profile-dialog::backdrop {
  background: rgba(4, 8, 18, 0.72);
  backdrop-filter: blur(8px);
}

.site-footer {
  margin-top: 20px;
  border-top: 1px solid rgba(168, 184, 214, 0.12);
  padding: 28px 0 18px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 24px;
}

.footer-brand { margin-bottom: 8px; }

.footer-grid p { margin: 0; color: var(--muted); max-width: 36ch; }

.footer-grid nav, .legal-row {
  display: grid;
  gap: 8px;
  align-content: start;
}

.footer-grid h2 {
  margin: 0 0 4px;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-grid a { text-decoration: none; color: var(--ink); }

.footer-grid a:hover, .back:hover { color: #d6e4ff; }

.legal-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid rgba(168, 184, 214, 0.1);
  color: var(--muted);
  font-size: 13px;
}

@media (min-width: 1021px) {
  .controls { position: sticky; top: 88px; }
}

@media (max-width: 1020px) {
  .flow { grid-template-columns: repeat(3, 1fr); }
  .studio { grid-template-columns: 1fr; }
  .flow li { min-height: 0; }
  .example-grid { grid-template-columns: 1fr 1fr; }
  .editor { grid-template-columns: 1fr; }
  .editor-stage-bar, .recent-head, .timeline-head { flex-direction: column; align-items: stretch; }
}

@media (max-width: 800px) {
  .example-grid, .footer-grid, .clip-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid div:first-child { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .wrap { width: min(1120px, calc(100% - 28px)); }
  .bar { flex-wrap: wrap; padding: 10px 0; }
  .top-actions { width: 100%; }
  .account-name { display: none; }
  .hero { padding-top: 16px; }
  .hero h1 { font-size: 30px; }
  .pencils { grid-template-columns: repeat(3, 1fr); }
  .flow { grid-template-columns: 1fr; }
  .banner, .result-row, .legal-row { flex-direction: column; align-items: stretch; }
  .profile-actions { flex-direction: column; }
}

@media (max-width: 640px) {
  .example-grid, .footer-grid, .clip-grid { grid-template-columns: 1fr; }
  .footer-grid div:first-child { grid-column: auto; }
  h1 { font-size: 38px; }
}

.cost-note, .cost-link { margin: 10px 0 0; font-size: 13px; }

.cost-note { color: var(--muted); }

.cost-link {
  display: inline-flex;
  color: #d6e4ff;
  font-weight: 600;
  text-decoration: none;
}

.field-hint a { color: #d6e4ff; }

.upgrade-band {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.upgrade-band p { margin: 8px 0 0; max-width: 68ch; }

.upgrade-band.is-empty {
  border-color: rgba(240, 180, 90, 0.8);
  background:
    linear-gradient(180deg, rgba(240, 180, 90, 0.16), rgba(16, 22, 38, 0.92) 48%),
    var(--card);
  box-shadow: 0 0 0 1px rgba(240, 180, 90, 0.35), 0 18px 50px rgba(240, 180, 90, 0.12);
}

.plans-page { padding: 28px 0 72px; }

.plans-page h1 {
  font-size: clamp(36px, 5vw, 56px);
  margin: 12px 0;
}

.plans-page .section-head p { margin: 8px 0 0; }

.addon-head { margin-top: 36px; }

.plan-status {
  margin: 0 0 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(124, 92, 255, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.35);
}

.plan-status p { margin: 0; }

.plan-status strong { font-weight: 650; }

.plan-scroller {
  overflow-x: auto;
  padding: 2px 2px 12px;
  scrollbar-color: rgba(169, 182, 206, 0.55) transparent;
}

.plan-scroller::-webkit-scrollbar { height: 10px; }

.plan-scroller::-webkit-scrollbar-thumb {
  background: rgba(169, 182, 206, 0.55);
  border-radius: 999px;
}

.plan-grid {
  display: flex;
  gap: 14px;
  width: max-content;
  min-width: 100%;
}

.plan-grid.is-loading {
  display: block;
  width: 100%;
}

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

.plan-card {
  display: flex;
  flex: 0 0 280px;
  width: 280px;
  flex-direction: column;
  gap: 10px;
  padding: 18px 16px 16px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
}

.addon-grid .plan-card { flex: none; width: auto; }

.plan-card.featured {
  border-color: rgba(122, 92, 255, 0.75);
  background:
    linear-gradient(180deg, rgba(59, 108, 255, 0.2), rgba(16, 22, 38, 0.92) 42%),
    var(--card);
}

.plan-card.featured.tone-choice {
  border-color: rgba(45, 196, 168, 0.8);
  background:
    linear-gradient(180deg, rgba(45, 196, 168, 0.18), rgba(16, 22, 38, 0.92) 42%),
    var(--card);
}

.plan-card.tone-choice .plan-badge {
  background: rgba(45, 196, 168, 0.2);
  color: #d7fff6;
}

.plan-badge {
  align-self: flex-start;
  margin: 0;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(122, 92, 255, 0.22);
  color: #e4dcff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.plan-card h2, .plan-card h3 { margin: 0; font-size: 26px; }

.plan-sub, .plan-copy { margin: 0; color: var(--muted); line-height: 1.5; }

.plan-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  margin: 2px 0;
}

.plan-price strong {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.plan-price span { color: var(--muted); font-size: 14px; }

.plan-features {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 4px 0 8px;
  padding: 0;
  color: #d5def0;
  font-size: 14px;
  line-height: 1.4;
}

.plan-features li {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.tick {
  width: 16px;
  height: 16px;
  margin-top: 1px;
  border-radius: 50%;
  background: rgba(110, 162, 255, 0.18);
  display: grid;
  place-items: center;
}

.tick::before {
  content: "";
  width: 6px;
  height: 3px;
  border-left: 2px solid #b9d0ff;
  border-bottom: 2px solid #b9d0ff;
  transform: rotate(-45deg) translate(0, -1px);
}

.plan-card .btn { width: 100%; margin-top: auto; }

.plan-switch {
  margin: -4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.cost-card { margin-top: 22px; padding: 18px 16px 8px; }

.cost-card h2 { font-size: 24px; margin-bottom: 6px; }

.cost-card p { margin: 0 0 8px; }

.cost-table { width: 100%; border-collapse: collapse; }

.cost-table th, .cost-table td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.cost-table th { color: var(--muted); font-weight: 600; }

.plans-success { margin-top: 14px; color: #d8ffe8; }

@media (max-width: 720px) {
  .upgrade-band, .plan-status { flex-direction: column; align-items: stretch; }
  .addon-grid { grid-template-columns: 1fr; }
}

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