/* Modila design tokens. Single source of truth for colors (phase A).
   --brand      : graphic accents only (playhead, keyframes, focus). Not for text.
   --brand-ink  : red used for text or as a button background with white text. */
:root, :root[data-theme="light"] {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-subtle: #F7F7F8;
  --surface: #FFFFFF;
  --surface-raised: #F7F7F8;
  --text: #18181B;
  --text-muted: #68686F;
  --border: #E6E6E9;
  --brand: #F04452;
  --brand-ink: #D92F40;
  --brand-hover: #BF2436;
  --brand-soft: #FFF0F1;
  --brand-soft-ink: #B81F31;
  --on-brand: #FFFFFF;
  --success: #15803D;
  --warning: #A16207;
  --danger: #B91C1C;
  --focus-ring: #18181B;
  --disabled-fg: #8A8A92;
  --canvas-bg: #E9E9EC;
  --timeline-track: #F0F0F2;
  --selection-outline: #F04452;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111114;
  --bg-subtle: #18181D;
  --surface: #202027;
  --surface-raised: #292931;
  --text: #F5F5F7;
  --text-muted: #A1A1AA;
  --border: #35353F;
  --brand: #FF5964;
  --brand-ink: #FF5964;
  --brand-hover: #FF727B;
  --brand-soft: #3A2027;
  --brand-soft-ink: #FF8A92;
  --on-brand: #111114;
  --success: #4ADE80;
  --warning: #FBBF24;
  --danger: #F87171;
  --focus-ring: #F5F5F7;
  --disabled-fg: #6E6E78;
  --canvas-bg: #0B0B0E;
  --timeline-track: #1D1D23;
  --selection-outline: #FF5964;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) { /* fallback if the inline script did not run */
    color-scheme: dark;
    --bg:#111114;--bg-subtle:#18181D;--surface:#202027;--surface-raised:#292931;
    --text:#F5F5F7;--text-muted:#A1A1AA;--border:#35353F;--brand:#FF5964;
    --brand-ink:#FF5964;--brand-hover:#FF727B;--brand-soft:#3A2027;
    --brand-soft-ink:#FF8A92;--on-brand:#111114;
  }
}

/* src/styles.css */
:root {
  --r1: 4px;
  --r2: 10px;
  --r3: 16px;
  --r4: 22px;
  --font:
    "Inter",
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    sans-serif;
  --mono:
    ui-monospace,
    "SF Mono",
    Menlo,
    Consolas,
    monospace;
}
* {
  box-sizing: border-box;
}
html,
body,
#root {
  height: 100%;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3 {
  margin: 0;
  letter-spacing: -0.01em;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.muted {
  color: var(--text-muted);
}
.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  padding: 0 14px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover:not(:disabled) {
  background: var(--surface-raised);
}
.btn:disabled {
  color: var(--disabled-fg);
  cursor: not-allowed;
}
.btn.primary {
  background: var(--brand-ink);
  border-color: var(--brand-ink);
  color: var(--on-brand);
  font-weight: 600;
}
.btn.primary:hover:not(:disabled) {
  background: var(--brand-hover);
  border-color: var(--brand-hover);
}
.btn.primary:disabled {
  background: var(--surface-raised);
  border-color: var(--border);
  color: var(--disabled-fg);
}
.btn.ghost {
  border-color: transparent;
  background: transparent;
}
.btn.ghost:hover:not(:disabled) {
  background: var(--surface-raised);
}
.btn.danger {
  color: var(--danger);
}
.btn.sm {
  height: 28px;
  padding: 0 10px;
  font-size: 13px;
}
.btn.icon {
  width: 32px;
  padding: 0;
}
.btn[aria-pressed=true] {
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
  border-color: transparent;
}
.spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  animation: spin .8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (prefers-reduced-motion: reduce) {
  .spinner {
    animation-duration: 2s;
  }
  * {
    scroll-behavior: auto !important;
  }
}
.input,
.select,
.textarea {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  background: var(--bg);
}
.textarea {
  height: auto;
  min-height: 96px;
  padding: 10px 12px;
  resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--text-muted);
}
input[type=color].input {
  padding: 2px;
  width: 44px;
}
label.f {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--text-muted);
}
.seg {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  overflow: hidden;
}
.seg button {
  border: 0;
  background: var(--surface);
  padding: 5px 12px;
  cursor: pointer;
}
.seg button + button {
  border-left: 1px solid var(--border);
}
.seg button[aria-pressed=true] {
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
  font-weight: 600;
}
.alert {
  padding: 8px 12px;
  border-radius: var(--r2);
  border: 1px solid var(--border);
  background: var(--bg-subtle);
}
.alert.err {
  border-color: var(--danger);
  color: var(--danger);
}
.alert.warn {
  border-color: var(--warning);
}
.shell {
  min-height: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}
.topnav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 16px;
  height: 52px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 5;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 18px;
  text-decoration: none;
  margin-right: 16px;
}
.logo i {
  width: 9px;
  height: 9px;
  background: var(--brand);
  transform: rotate(45deg);
  display: inline-block;
}
.topnav nav {
  display: flex;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
}
.topnav nav a {
  padding: 6px 10px;
  border-radius: var(--r2);
  text-decoration: none;
  color: var(--text-muted);
  white-space: nowrap;
}
.topnav nav a:hover {
  background: var(--surface-raised);
  color: var(--text);
}
.topnav nav a[aria-current=page] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.page {
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 32px 16px 64px;
  display: grid;
  gap: 32px;
  align-content: start;
}
.hero h1 {
  font-size: clamp(34px, 6vw, 64px);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -0.04em;
  max-width: 14ch;
}
.hero h1 span {
  color: var(--brand-ink);
}
.hero p {
  max-width: 54ch;
  font-size: 16px;
  color: var(--text-muted);
  margin: 14px 0 0;
}
.ticks {
  height: 18px;
  margin: 22px 0 0;
  max-width: 520px;
  position: relative;
  background:
    repeating-linear-gradient(
      90deg,
      var(--border) 0 1px,
      transparent 1px 12px);
  border-bottom: 1px solid var(--border);
}
.ticks b {
  position: absolute;
  bottom: -5px;
  width: 9px;
  height: 9px;
  background: var(--brand);
  transform: rotate(45deg);
}
.promptbox {
  border: 1px solid var(--border);
  border-radius: var(--r3);
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 12px;
}
.promptbox .row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  justify-content: space-between;
}
.promptbox .opts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: var(--r2);
  padding: 6px 10px;
  cursor: pointer;
  text-align: left;
  font-size: 13px;
  max-width: 420px;
}
.chip:hover {
  border-color: var(--text-muted);
}
.section h2 {
  font-size: 15px;
  margin-bottom: 12px;
  text-transform: none;
}
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.card {
  border: 1px solid var(--border);
  border-radius: var(--r3);
  background: var(--surface);
  padding: 14px;
  display: grid;
  gap: 8px;
  align-content: start;
}
.card h3 {
  font-size: 15px;
}
.thumb {
  aspect-ratio: 16/9;
  border: 1px solid var(--border);
  border-radius: var(--r2);
  background: var(--canvas-bg);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 12px;
  position: relative;
  overflow: hidden;
}
.thumb::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 14px;
  height: 1px;
  background: var(--border);
}
.thumb b {
  position: absolute;
  bottom: 10px;
  left: 30%;
  width: 8px;
  height: 8px;
  background: var(--brand);
  transform: rotate(45deg);
}
.list {
  display: grid;
  border: 1px solid var(--border);
  border-radius: var(--r3);
  overflow: hidden;
}
.list > div {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  background: var(--surface);
}
.list > div + div {
  border-top: 1px solid var(--border);
}
.list .grow {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.empty {
  padding: 28px;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: var(--r3);
  color: var(--text-muted);
}
.narrow {
  max-width: 420px;
  margin: 0 auto;
  width: 100%;
}
.stack {
  display: grid;
  gap: 12px;
}
.kv {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
  align-items: center;
}
@media (max-width: 640px) {
  .kv {
    grid-template-columns: 1fr;
  }
  .topnav {
    padding: 0 8px;
  }
  .logo {
    margin-right: 6px;
  }
}
.editor {
  height: 100%;
  display: grid;
  grid-template-rows: 44px 1fr 268px;
  grid-template-columns: 244px 1fr 288px;
  grid-template-areas: "top top top" "lib stage insp" "tl tl tl";
  background: var(--bg-subtle);
}
.ed-top {
  grid-area: top;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.ed-top .name {
  width: 220px;
  font-weight: 600;
  border-color: transparent;
  background: transparent;
}
.ed-top .name:hover,
.ed-top .name:focus {
  border-color: var(--border);
  background: var(--bg);
}
.ed-top .sp {
  flex: 1;
}
.savestate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}
.savestate i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
}
.savestate[data-s=dirty] i,
.savestate[data-s=saving] i {
  background: var(--warning);
}
.savestate[data-s=offline] i,
.savestate[data-s=error] i,
.savestate[data-s=conflict] i {
  background: var(--danger);
}
.panel {
  background: var(--bg);
  overflow: auto;
  min-height: 0;
}
.ed-lib {
  grid-area: lib;
  border-right: 1px solid var(--border);
  padding: 10px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.ed-insp {
  grid-area: insp;
  border-left: 1px solid var(--border);
  display: grid;
  grid-template-rows: auto 1fr;
}
.ed-insp .tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.ed-insp .tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 9px;
  cursor: pointer;
  color: var(--text-muted);
}
.ed-insp .tabs button[aria-selected=true] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--brand);
}
.ed-insp .body {
  overflow: auto;
  padding: 12px;
  display: grid;
  gap: 14px;
  align-content: start;
}
.h {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  margin: 0 0 6px;
  font-weight: 600;
}
.tools {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.tools .btn {
  justify-content: flex-start;
  padding: 0 8px;
}
.layers {
  display: grid;
  gap: 1px;
}
.layer {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 6px;
  border-radius: var(--r2);
  cursor: pointer;
  border: 0;
  background: transparent;
  text-align: left;
  width: 100%;
}
.layer:hover {
  background: var(--surface-raised);
}
.layer[aria-selected=true] {
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
}
.layer small {
  color: var(--text-muted);
}
.stage {
  grid-area: stage;
  position: relative;
  background: var(--canvas-bg);
  overflow: hidden;
  display: grid;
  place-items: center;
  min-height: 0;
  min-width: 0;
  touch-action: none;
}
.stage .frame {
  position: relative;
  box-shadow: 0 0 0 1px var(--border);
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}
.stage svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  cursor: default;
}
.sel-outline {
  fill: none;
  stroke: var(--selection-outline);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.handle {
  fill: var(--bg);
  stroke: var(--selection-outline);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}
.fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.fields .wide {
  grid-column: 1 / -1;
}
.num {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px;
  align-items: end;
}
.kfbtn {
  width: 22px;
  height: 32px;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--text-muted);
  display: grid;
  place-items: center;
  padding: 0;
}
.kfbtn span {
  width: 9px;
  height: 9px;
  transform: rotate(45deg);
  border: 1.5px solid currentColor;
  display: block;
}
.kfbtn[data-s=animated] {
  color: var(--brand-ink);
}
.kfbtn[data-s=on] {
  color: var(--brand-ink);
}
.kfbtn[data-s=on] span {
  background: currentColor;
}
.stagehint {
  position: absolute;
  left: 10px;
  bottom: 8px;
  font-size: 12px;
  color: var(--text-muted);
  pointer-events: none;
}
.tl {
  grid-area: tl;
  border-top: 1px solid var(--border);
  background: var(--bg);
  display: grid;
  grid-template-rows: 36px 1fr;
  min-height: 0;
}
.tl-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border-bottom: 1px solid var(--border);
}
.tl-bar .time {
  margin: 0 8px;
  min-width: 150px;
}
.tl-scroll {
  overflow: auto;
  min-height: 0;
}
.tl-inner {
  position: relative;
  min-height: 100%;
}
.tl-r {
  display: flex;
  height: 26px;
  border-bottom: 1px solid var(--border);
}
.tl-area {
  position: relative;
  flex: none;
}
.tl-label {
  flex: none;
  width: 196px;
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--bg);
  border-right: 1px solid var(--border);
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 12px;
  cursor: pointer;
}
.tl-label.prop {
  padding-left: 24px;
  color: var(--text-muted);
  cursor: default;
}
.tl-label[aria-selected=true] {
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
}
.tl-ruler {
  background: var(--bg-subtle);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
}
.tl-ruler span {
  position: absolute;
  top: 5px;
  font-size: 10px;
  color: var(--text-muted);
  padding-left: 4px;
  border-left: 1px solid var(--border);
  height: 16px;
}
.tl-ruler i {
  display: none;
}
.tl-track {
  background: var(--timeline-track);
}
.tl-scene {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--r1);
  cursor: grab;
  font-size: 11px;
  padding: 2px 6px;
  overflow: hidden;
  white-space: nowrap;
  touch-action: none;
}
.tl-scene[aria-selected=true] {
  border-color: var(--brand);
}
.tl-scene .rz {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
}
.vclip {
  position: absolute;
  top: 2px;
  bottom: 2px;
  display: flex;
  align-items: center;
  padding: 0 9px;
  overflow: hidden;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--brand) 55%, var(--border));
  border-radius: var(--r1);
  background: color-mix(in srgb, var(--brand) 16%, var(--surface-raised));
  color: var(--text);
  cursor: grab;
  touch-action: none;
  font-size: 11px;
}
.vclip[aria-selected=true] {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.vclip .rz {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 8px;
  cursor: ew-resize;
  opacity: 0;
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
}
.vclip:hover .rz,
.vclip[aria-selected=true] .rz {
  opacity: 1;
}
.vclip .rz.l {
  left: 0;
}
.vclip .rz.r {
  right: 0;
}
.kf {
  position: absolute;
  top: 8px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  background: var(--brand);
  transform: rotate(45deg);
  border: 0;
  padding: 0;
  cursor: grab;
  touch-action: none;
}
.kf[aria-selected=true] {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}
.playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--brand);
  z-index: 4;
  pointer-events: none;
}
.playhead::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  width: 11px;
  height: 11px;
  background: var(--brand);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}
.tl-empty {
  padding: 12px 12px 12px 208px;
  color: var(--text-muted);
  font-size: 12px;
}
.modal-bg {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--bg) 60%, transparent);
  display: grid;
  place-items: center;
  z-index: 20;
  backdrop-filter: blur(2px);
}
.modal {
  width: min(440px, calc(100vw - 32px));
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 18px;
  display: grid;
  gap: 14px;
  box-shadow: 0 8px 28px rgb(0 0 0 / .18);
}
.bar {
  height: 6px;
  background: var(--surface-raised);
  border-radius: var(--r1);
  overflow: hidden;
}
.bar > i {
  display: block;
  height: 100%;
  background: var(--brand);
  transition: width .2s;
}
.small-screen {
  display: none;
}
.tl-r.tall {
  height: 40px;
}
.aclip {
  position: absolute;
  top: 2px;
  bottom: 2px;
  border: 1px solid var(--border);
  border-radius: var(--r1);
  background: var(--surface-raised);
  color: var(--text-muted);
  cursor: grab;
  overflow: hidden;
  touch-action: none;
}
.aclip[aria-selected=true] {
  border-color: var(--brand);
  color: var(--brand-soft-ink);
  background: var(--brand-soft);
}
.aclip[data-muted=true] {
  opacity: .6;
}
.aclip .rz {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 7px;
  cursor: ew-resize;
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
  opacity: 0;
}
.aclip:hover .rz,
.aclip[aria-selected=true] .rz {
  opacity: 1;
}
.aclip .rz.l {
  left: 0;
}
.aclip .rz.r {
  right: 0;
}
.snd {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 4px;
  align-items: center;
  padding: 2px 0;
}
.snd-name {
  min-width: 0;
  display: grid;
  line-height: 1.15;
}
.snd-name span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}
.snd-name small {
  color: var(--text-muted);
  font-size: 11px;
}
h4.h {
  margin: 6px 0 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  font-weight: 600;
}
input[type=range],
input[type=checkbox] {
  accent-color: var(--brand-ink);
}
ul.dl {
  margin: 0;
  padding-left: 18px;
}
.cue {
  position: absolute;
  top: 3px;
  bottom: 3px;
  border: 1px solid var(--border);
  border-radius: var(--r1);
  background: var(--surface-raised);
  color: var(--text);
  font-size: 11px;
  line-height: 18px;
  padding: 0 8px;
  overflow: hidden;
  white-space: nowrap;
  cursor: grab;
  touch-action: none;
}
.cue[aria-selected=true] {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
}
.cue .cue-t {
  pointer-events: none;
}
.cue .rz {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 7px;
  cursor: ew-resize;
  background: color-mix(in srgb, var(--text-muted) 35%, transparent);
  opacity: 0;
}
.cue:hover .rz,
.cue[aria-selected=true] .rz {
  opacity: 1;
}
details > summary {
  list-style: revert;
}
body {
  font-size: 15px;
  line-height: 1.5;
}
.btn {
  height: 40px;
  padding: 0 18px;
  font-weight: 500;
  transition:
    background .15s,
    transform .05s,
    box-shadow .15s;
}
.btn:active:not(:disabled) {
  transform: translateY(1px);
}
.btn.sm {
  height: 32px;
  padding: 0 12px;
}
.btn.lg {
  height: 48px;
  padding: 0 28px;
  font-size: 16px;
}
.btn.round {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
}
.btn.primary {
  box-shadow: 0 1px 0 rgb(255 255 255 / .18) inset, 0 6px 16px -8px var(--brand-ink);
}
.input,
.select {
  height: 40px;
  padding: 0 12px;
}
.textarea {
  padding: 12px 14px;
}
.seg {
  border-radius: var(--r2);
  background: var(--surface);
  flex-wrap: wrap;
}
.seg button {
  padding: 8px 14px;
  min-height: 38px;
}
.card {
  border-radius: var(--r3);
  padding: 18px;
  transition:
    box-shadow .2s,
    transform .2s,
    border-color .2s;
}
.card:hover {
  box-shadow: 0 10px 30px -18px rgb(0 0 0 / .35);
  border-color: color-mix(in srgb, var(--border) 60%, var(--text-muted));
}
.list > div {
  padding: 14px 16px;
}
.topnav {
  height: 60px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom-color: color-mix(in srgb, var(--border) 70%, transparent);
}
.logo {
  font-size: 20px;
}
.topnav nav a {
  padding: 8px 12px;
  border-radius: 999px;
}
.topnav nav a[aria-current=page] {
  box-shadow: none;
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
  font-weight: 600;
}
.page {
  padding: 40px 20px 96px;
  gap: 40px;
  max-width: 1040px;
}
.hero {
  display: grid;
  gap: 4px;
}
.eyebrow {
  display: inline-block;
  justify-self: start;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--brand-soft-ink);
  background: var(--brand-soft);
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(38px, 7vw, 72px);
  max-width: 16ch;
  line-height: 1;
}
.hero p {
  font-size: 18px;
  max-width: 52ch;
}
.promptbox {
  border-radius: var(--r4);
  padding: 22px;
  gap: 18px;
  box-shadow: 0 24px 60px -34px rgb(0 0 0 / .35);
}
.promptbox label.f.big {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.promptbox .textarea {
  font-size: 17px;
  min-height: 120px;
  line-height: 1.45;
  border-radius: var(--r3);
  background: var(--bg);
}
.promptbox .f {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  gap: 8px;
}
.promptbox .f .seg {
  font-weight: 400;
}
.chip {
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 13px;
  line-height: 1.35;
}
.chips {
  gap: 8px;
}
.styles {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.style {
  flex: none;
  width: 108px;
  display: grid;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  scroll-snap-align: start;
  text-align: center;
  font-weight: 500;
}
.style .sw {
  height: 68px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 800;
  position: relative;
  border: 2px solid transparent;
  outline: 1px solid var(--border);
  outline-offset: -1px;
  transition: transform .15s, outline-color .15s;
}
.style .sw i {
  position: absolute;
  bottom: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
}
.style .sw i:nth-of-type(1) {
  left: calc(50% - 12px);
}
.style .sw i:nth-of-type(2) {
  left: calc(50% + 3px);
}
.style.auto .sw {
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
}
.style:hover .sw {
  transform: translateY(-2px);
}
.style[aria-checked=true] .sw {
  outline: 3px solid var(--brand);
  outline-offset: 1px;
}
.style .nm {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}
.style[aria-checked=true] .nm {
  color: var(--text);
  font-weight: 700;
}
.promptbox .row {
  gap: 18px;
  align-items: end;
}
.promptbox .opts {
  gap: 18px;
}
.modal {
  border-radius: var(--r3);
  padding: 22px;
}
.alert {
  border-radius: var(--r2);
}
.empty {
  border-radius: var(--r3);
}
.editor-simple {
  height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  background: var(--bg-subtle);
  min-height: 0;
}
.sp-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.sp-bar .name {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  border-color: transparent;
  background: transparent;
}
.sp-bar .name:focus,
.sp-bar .name:hover {
  border-color: var(--border);
  background: var(--bg);
}
.sp {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 460px);
  min-height: 0;
}
.sp-top {
  padding: 16px;
  display: grid;
  gap: 12px;
  align-content: start;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: calc(100dvh - 58px);
}
.sp-preview {
  display: grid;
  place-items: center;
  background: var(--canvas-bg);
  border-radius: var(--r3);
  padding: 12px;
  min-height: 0;
}
.sp-frame {
  width: 100%;
  max-height: calc(100dvh - 190px);
  max-width: 100%;
  position: relative;
  box-shadow: 0 10px 40px -20px rgb(0 0 0 / .5);
  border-radius: 6px;
  overflow: hidden;
}
.sp-preview[data-vertical=true] .sp-frame {
  width: auto;
  height: min(calc(100dvh - 190px), 720px);
}
.sp-frame canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.sp-transport {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sp-scrub {
  flex: 1;
  height: 28px;
}
.sp-time {
  font-size: 12px;
  white-space: nowrap;
}
.sp-body {
  padding: 16px;
  overflow: auto;
  display: grid;
  gap: 14px;
  align-content: start;
  min-height: 0;
  border-left: 1px solid var(--border);
  background: var(--bg);
}
.sp-hint {
  margin: 0;
  font-size: 13px;
}
.sp-h {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-muted);
  margin: 6px 0 0;
  font-weight: 700;
}
.sp-scenes {
  display: grid;
  gap: 12px;
}
.sp-scene {
  border: 1px solid var(--border);
  border-radius: var(--r3);
  padding: 12px;
  display: grid;
  gap: 10px;
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.sp-scene[data-active=true] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.sp-scene-head {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  font-weight: 600;
  text-align: left;
}
.sp-num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
  display: grid;
  place-items: center;
  font-size: 13px;
}
.sp-dur {
  margin-left: auto;
  font-size: 12px;
  font-weight: 400;
}
.sp-text {
  min-height: 0;
  font-size: 16px;
  resize: none;
}
.sp-look {
  display: grid;
  gap: 10px;
}
.sp-slider {
  font-size: 13px;
}
.sp-slider input {
  width: 100%;
  height: 28px;
}
.sp-audio-clips {
  gap: 8px;
}
.sp-audio-clip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
}
.sp-audio-clip > button:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
}
.sp-audio-clip .f {
  margin: 0;
  font-size: 12px;
}
.sp-audio-clip input[type=range] {
  display: block;
  width: 100%;
}
.sp-audio-timing {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.hide-s {
}
@media (max-width: 900px) {
  .sp {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    overflow: hidden;
  }
  .sp-top {
    position: static;
    padding: 10px 12px 6px;
    max-height: none;
    background: var(--bg-subtle);
  }
  .sp-preview {
    padding: 8px;
  }
  .sp-frame {
    max-height: 38dvh;
  }
  .sp-preview[data-vertical=true] .sp-frame {
    height: min(38dvh, 420px);
  }
  .sp-body {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding-bottom: calc(24px + env(safe-area-inset-bottom));
  }
  .sp-audio-clip {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .sp-audio-clip > button:first-child {
    grid-column: 1 / -1;
  }
  .sp-audio-timing {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .editor {
    display: none;
  }
}
@media (max-width: 720px) {
  .hide-s {
    display: none;
  }
  .page {
    padding: 24px 16px 108px;
    gap: 28px;
  }
  .topnav {
    height: 52px;
    padding: 0 14px;
  }
  .topnav nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: color-mix(in srgb, var(--bg) 94%, transparent);
    backdrop-filter: blur(14px);
    border-top: 1px solid var(--border);
    overflow: visible;
  }
  .topnav nav a {
    text-align: center;
    padding: 10px 2px;
    font-size: 12px;
    border-radius: 12px;
  }
  .topnav nav a.hide-m {
    display: none;
  }
  .promptbox {
    padding: 16px;
    border-radius: 18px;
  }
  .promptbox .row {
    flex-direction: column;
    align-items: stretch;
  }
  .promptbox .opts {
    flex-direction: column;
  }
  .promptbox .btn.lg {
    width: 100%;
  }
  .seg button {
    flex: 1;
    padding: 8px 10px;
    font-size: 13px;
  }
  .hero p {
    font-size: 16px;
  }
  .grid {
    grid-template-columns: 1fr;
  }
  .list > div {
    flex-wrap: wrap;
  }
  .modal-bg {
    align-items: end;
  }
  .modal {
    width: 100%;
    border-radius: 22px 22px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom));
  }
  .kv {
    grid-template-columns: 1fr;
  }
  .sp-bar .savestate span {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .style .sw,
  .btn,
  .card {
    transition: none;
  }
}
html {
  scroll-padding-bottom: 96px;
  -webkit-text-size-adjust: 100%;
}
.page > *,
.promptbox > *,
.promptbox .row,
.promptbox .opts,
.card,
.hero {
  min-width: 0;
}
.promptbox .f {
  min-width: 0;
  max-width: 100%;
}
.chip {
  max-width: 100%;
  white-space: normal;
}
.hero h1,
.hero p {
  overflow-wrap: break-word;
}
.seg {
  max-width: 100%;
}
@media (max-width: 720px) {
  .seg {
    display: flex;
    width: 100%;
  }
  .promptbox .f .seg button {
    flex: 1 1 0;
    min-width: 0;
  }
  .hero h1 {
    font-size: clamp(34px, 11vw, 48px);
  }
}
.chip {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 720px) {
  .topnav {
    backdrop-filter: none;
    background: var(--bg);
  }
}
.imglib {
  display: grid;
  gap: 8px;
}
.imggrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
  gap: 8px;
}
.imgcell {
  position: relative;
}
.imgthumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  background: repeating-conic-gradient(var(--bg-subtle) 0 25%, var(--surface) 0 50%) 0 0 / 14px 14px;
}
.imgthumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.imgthumb:hover,
.imgthumb:focus-visible {
  border-color: var(--brand);
}
.imgdel {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  line-height: 1;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  font-size: 16px;
  opacity: .9;
}
.sp-pics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sp-pic {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: repeating-conic-gradient(var(--bg-subtle) 0 25%, var(--surface) 0 50%) 0 0 / 12px 12px;
}
.sp-pic img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.sp-pic button {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .62);
  color: #fff;
  cursor: pointer;
}
.check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  cursor: pointer;
}
.check input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
}
.topnav nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.topnav nav .ni {
  width: 18px;
  height: 18px;
  flex: none;
}
@media (max-width: 720px) {
  .topnav nav {
    left: 12px;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom));
    padding: 6px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: color-mix(in srgb, var(--surface) 90%, transparent);
    box-shadow: 0 10px 34px rgba(0, 0, 0, .28);
  }
  .topnav nav a {
    flex-direction: column;
    gap: 3px;
    padding: 7px 2px 6px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
  }
  .topnav nav a[aria-current=page] {
    color: var(--brand);
    background: var(--brand-soft);
  }
  .topnav nav a.nav-main {
    color: #fff;
    background:
      linear-gradient(
        135deg,
        var(--brand),
        var(--brand-2, var(--brand)));
    transform: translateY(-10px);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--brand) 50%, transparent);
    border-radius: 16px;
  }
  .topnav nav a.nav-main[aria-current=page] {
    color: #fff;
  }
  .page {
    padding-bottom: 120px;
  }
}
.tgrid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}
.tcard {
  gap: 10px;
}
.tthumb {
  position: relative;
  aspect-ratio: 4/5;
  display: grid;
  place-items: center;
  border-radius: var(--r2);
  overflow: hidden;
  background: var(--canvas-bg);
  border: 1px solid var(--border);
  outline-offset: 2px;
}
.tcard.horizontal .tthumb {
  aspect-ratio: 16/10;
}
.tcard.square .tthumb {
  aspect-ratio: 1;
}
.tthumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .35s;
}
.tthumb img.on {
  opacity: 1;
}
.tfmt {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  backdrop-filter: blur(6px);
}
@media (max-width: 720px) {
  .tgrid {
    grid-template-columns: repeat(2, 1fr);
  }
}
.sp-frame {
  cursor: pointer;
}
.sp-big {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  color: #fff;
  cursor: pointer;
  background: color-mix(in srgb, #000 55%, transparent);
  backdrop-filter: blur(8px);
  box-shadow: 0 6px 28px rgba(0, 0, 0, .4);
  opacity: 0;
  transform: scale(.8);
  transition: opacity .2s, transform .2s;
  pointer-events: none;
}
.sp-big[data-on=true] {
  opacity: 1;
  transform: none;
}
.sp-big svg {
  width: 24px;
  height: 24px;
}
.sp-transport {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 8px 10px;
  gap: 8px;
}
.sp-transport .ico {
  width: 18px;
  height: 18px;
}
.sp-transport .btn.icon {
  width: 36px;
  height: 36px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 10px;
}
.sp-transport .btn[aria-pressed=true] {
  color: var(--brand);
  background: var(--brand-soft);
}
.sp-track {
  position: relative;
  flex: 1;
  height: 28px;
  display: grid;
  align-items: center;
  min-width: 60px;
}
.sp-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}
.sp-fill {
  position: absolute;
  left: 0;
  height: 6px;
  border-radius: 3px;
  background:
    linear-gradient(
      90deg,
      var(--brand),
      var(--brand-2, var(--brand)));
  pointer-events: none;
}
.sp-mark {
  position: absolute;
  width: 2px;
  height: 10px;
  background: var(--surface);
  top: 9px;
  pointer-events: none;
}
.sp-track .sp-scrub {
  position: relative;
  width: 100%;
  margin: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.sp-scrub::-webkit-slider-runnable-track {
  background: transparent;
  height: 28px;
}
.sp-scrub::-moz-range-track {
  background: transparent;
}
.sp-scrub::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
  margin-top: 6px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.sp-scrub::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--brand);
}
#sp-player:fullscreen {
  background: #000;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 0;
}
#sp-player:fullscreen .sp-frame {
  max-height: 100dvh;
  height: 100dvh;
  width: auto;
  max-width: 100vw;
}
@media (max-width: 720px) {
  .sp-time {
    display: none;
  }
  .sp-transport {
    gap: 6px;
    padding: 6px 8px;
  }
}
.ex-spec {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ex-spec span {
  display: grid;
  gap: 2px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}
.ex-spec b {
  font-size: 14px;
}
.ex-spec small {
  color: var(--text-muted);
  font-size: 12px;
}
.ex-pct {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
.ex-pct strong {
  font-size: 28px;
}
.ex-video {
  width: 100%;
  max-height: 46dvh;
  border-radius: 12px;
  background: #000;
  object-fit: contain;
}
.ex-file {
  display: grid;
  gap: 2px;
  word-break: break-all;
}
.ex-more {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.ex-more .btn {
  flex: 1;
  text-align: center;
}
.ex-q {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.ex-q button {
  display: grid;
  gap: 2px;
  padding: 10px 6px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  cursor: pointer;
  text-align: center;
  color: var(--text);
}
.ex-q button small {
  color: var(--text-muted);
  font-size: 11px;
}
.ex-q button[data-on=true] {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.sec-head h2 {
  margin: 0;
}
.more {
  color: var(--brand);
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
}
.sec-sub {
  margin: 0 0 4px;
  font-size: 14px;
}
.trail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 220px);
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}
.trail > .card {
  scroll-snap-align: start;
}
.trail > .card p {
  font-size: 13px;
}
@media (max-width: 720px) {
  .trail {
    grid-auto-columns: 62%;
    margin: 0 -16px;
    padding-left: 16px;
    padding-right: 16px;
    scroll-padding-left: 16px;
  }
}
.ai-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
}
.ai-head h1 {
  font-size: 28px;
  margin: 4px 0;
}
.ai-head p {
  margin: 0;
  max-width: 54ch;
}
.quota {
  min-width: 150px;
  display: grid;
  gap: 2px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.quota b {
  font-size: 26px;
  line-height: 1;
}
.quota small {
  color: var(--text-muted);
  font-size: 12px;
}
.qbar {
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  margin-top: 6px;
  overflow: hidden;
}
.qbar i {
  display: block;
  height: 100%;
  background:
    linear-gradient(
      90deg,
      var(--brand),
      var(--brand-2, var(--brand)));
}
.ai-grid {
  display: grid;
  gap: 20px;
  align-items: start;
}
@media (min-width: 1000px) {
  .ai-grid:has(.ai-result) {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }
}
.count {
  display: block;
  text-align: right;
  margin-top: 4px;
}
.phases {
  list-style: none;
  margin: 0;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
}
.phases li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-muted);
  transition: color .3s;
}
.phases li i {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  flex: none;
}
.phases li[data-state=done] {
  color: var(--text);
}
.phases li[data-state=done] i {
  background: var(--brand);
  border-color: var(--brand);
}
.phases li[data-state=now] {
  color: var(--text);
  font-weight: 600;
}
.phases li[data-state=now] i {
  border-color: var(--brand);
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  50% {
    box-shadow: 0 0 0 5px var(--brand-soft);
  }
}
.ai-result {
  gap: 14px;
}
.ai-result-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ai-result-top h2 {
  margin: 0;
  font-size: 17px;
}
.chip-s {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
}
.ai-strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  align-items: center;
  min-height: 80px;
}
.ai-strip img {
  width: 100%;
  border-radius: 10px;
  border: 1px solid var(--border);
  display: block;
}
.ai-strip.v {
  grid-auto-columns: minmax(70px, 1fr);
}
.ai-strip.h {
  grid-auto-flow: row;
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 720px) {
  .ai-strip.v {
    overflow-x: auto;
    grid-auto-columns: 34%;
  }
}
.story {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.story li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.ai-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.chips {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.chips .chip {
  flex: none;
  max-width: 300px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topnav nav a {
  border-radius: 14px;
}
.tools .btn.tool {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-start;
  padding: 8px 10px;
}
.tools .btn.tool svg {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--brand);
}
.tools .btn.tool:hover {
  background: var(--brand-soft);
}
.ed-lib {
  overflow-x: hidden;
}
.ed-lib .tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.ed-lib .tools .btn {
  min-width: 0;
  padding: 8px;
  overflow: hidden;
}
.ed-lib .tools .btn span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ed-lib .btn {
  max-width: 100%;
  box-sizing: border-box;
}
.ed-lib p,
.ed-lib small {
  overflow-wrap: anywhere;
}
.pw-wrap {
  position: relative;
  display: block;
}
.pw-wrap .input {
  width: 100%;
  padding-right: 46px;
  box-sizing: border-box;
}
.pw-eye {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 38px;
  height: 38px;
  border: 0;
  background: none;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.pw-eye svg {
  width: 20px;
  height: 20px;
}
.pw-eye:hover {
  color: var(--text);
  background: var(--brand-soft);
}
.pw-meter {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
}
.pw-meter i {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
}
.pw-meter b {
  font-size: 12px;
  margin-left: 8px;
  color: var(--text-muted);
  min-width: 64px;
}
.pw-meter[data-s="1"] i:nth-child(-n+1) {
  background: #e5484d;
}
.pw-meter[data-s="2"] i:nth-child(-n+2) {
  background: #f5a524;
}
.pw-meter[data-s="3"] i:nth-child(-n+3) {
  background: #7bc043;
}
.pw-meter[data-s="4"] i {
  background: #2fb36d;
}
.rec-code {
  font-size: 26px;
  letter-spacing: .08em;
  text-align: center;
  padding: 18px 12px;
  border: 2px dashed var(--brand);
  border-radius: 16px;
  background: var(--brand-soft);
  color: var(--brand-soft-ink);
  user-select: all;
  word-break: break-all;
}
.rec-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (max-width: 720px) {
  .rec-code {
    font-size: 21px;
  }
}
.devs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.devs li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
}
.devs .chip-s {
  margin-left: 8px;
}
.danger-zone {
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.alert.ok {
  background: color-mix(in srgb, #2fb36d 14%, transparent);
  border: 1px solid #2fb36d;
  border-radius: 12px;
  padding: 10px 12px;
}
.board {
  column-count: 2;
  column-gap: 14px;
}
@media (min-width: 640px) {
  .board {
    column-count: 3;
  }
}
@media (min-width: 980px) {
  .board {
    column-count: 4;
  }
}
@media (min-width: 1320px) {
  .board {
    column-count: 5;
  }
}
.pin {
  break-inside: avoid;
  margin: 0 0 18px;
  display: block;
}
.pin-img {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background:
    linear-gradient(
      145deg,
      var(--surface-raised, var(--surface)),
      var(--border));
  cursor: pointer;
  isolation: isolate;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 6px 20px -10px rgba(0, 0, 0, .35);
  transition: transform .25s cubic-bezier(.2, .8, .2, 1), box-shadow .25s;
  outline-offset: 3px;
}
.pin-img:hover,
.pin-img:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .08), 0 18px 34px -14px rgba(0, 0, 0, .5);
}
.pin-img img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.2, .8, .2, 1), opacity .35s;
}
.pin-img:hover img.on,
.pin-img:hover > img:only-of-type {
  transform: scale(1.04);
}
.tpin .pin-img img {
  opacity: 0;
}
.tpin .pin-img img.on {
  opacity: 1;
}
.pin-ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 34px;
  font-weight: 800;
  color: var(--text-muted);
  opacity: .6;
}
.pin-tag {
  position: absolute;
  left: 10px;
  top: 10px;
  z-index: 2;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(0, 0, 0, .55);
  color: #fff;
  backdrop-filter: blur(8px);
}
.pin-more {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 3;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  cursor: pointer;
  background: rgba(255, 255, 255, .92);
  color: #111;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
  opacity: 0;
  transition: opacity .2s;
}
.pin-more svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}
.pin-img:hover .pin-more,
.pin-more:focus-visible,
.pin-more[aria-expanded=true] {
  opacity: 1;
}
@media (hover: none) {
  .pin-more {
    opacity: 1;
  }
}
.pin-menu {
  position: absolute;
  right: 8px;
  top: 48px;
  z-index: 4;
  min-width: 160px;
  display: grid;
  padding: 6px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.pin-menu button {
  text-align: left;
  padding: 10px 12px;
  border: 0;
  background: none;
  border-radius: 9px;
  cursor: pointer;
  font-size: 14px;
  color: var(--text);
}
.pin-menu button:hover {
  background: var(--brand-soft);
}
.pin-menu .danger {
  color: #e5484d;
}
.pin-meta {
  display: grid;
  gap: 2px;
  padding: 8px 4px 0;
  min-width: 0;
}
.pin-meta strong {
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pin-meta .muted {
  font-size: 12px;
}
.pin-over {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 2;
  padding: 38px 14px 14px;
  display: grid;
  gap: 6px;
  color: #fff;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, .78),
      rgba(0, 0, 0, 0));
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .25s, transform .25s;
}
.pin-over p {
  margin: 0;
  font-size: 12px;
  opacity: .85;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pin-over .btn {
  justify-self: start;
}
.pin-img:hover .pin-over,
.pin-img:focus-within .pin-over,
.pin-img:focus .pin-over {
  opacity: 1;
  transform: none;
}
@media (hover: none) {
  .pin-over {
    opacity: 1;
    transform: none;
  }
  .pin-over p {
    display: none;
  }
  .pin-over {
    padding-top: 28px;
  }
}
.tpin .pin-meta {
  display: none;
}
.trail {
  align-items: start;
  grid-auto-columns: minmax(150px, 190px);
}
.trail > .pin {
  margin: 0;
}
@media (max-width: 720px) {
  .trail {
    grid-auto-columns: 44%;
  }
}
.board-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.board-head h1 {
  font-size: 30px;
  margin: 0;
  letter-spacing: -.02em;
}
.board-head p {
  margin: 2px 0 0;
}
.board-tools {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.board-tools .search {
  flex: 1 1 220px;
  border-radius: 999px;
  padding-left: 16px;
}
.fchips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.fchips button {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  color: var(--text);
}
.fchips button[aria-pressed=true] {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.empty-board {
  text-align: center;
  padding: 56px 16px;
  display: grid;
  gap: 10px;
  justify-items: center;
}
.empty-board h2 {
  margin: 0;
  font-size: 22px;
}
.eb-art {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-bottom: 8px;
}
.eb-art i {
  width: 56px;
  border-radius: 14px;
  background:
    linear-gradient(
      160deg,
      var(--brand),
      var(--brand-2, var(--brand)));
  opacity: .85;
}
.eb-art i:nth-child(1) {
  height: 70px;
}
.eb-art i:nth-child(2) {
  height: 100px;
  opacity: .6;
}
.eb-art i:nth-child(3) {
  height: 82px;
  opacity: .4;
}
.page .btn {
  border-radius: 999px;
}
.page .btn.sm {
  padding-left: 14px;
  padding-right: 14px;
}
.hero {
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -40px -10% auto -10%;
  height: 320px;
  z-index: -1;
  background:
    radial-gradient(
      40% 60% at 20% 30%,
      color-mix(in srgb, var(--brand) 22%, transparent),
      transparent 70%),
    radial-gradient(
      35% 55% at 80% 20%,
      color-mix(in srgb, #7c5cff 18%, transparent),
      transparent 70%);
  filter: blur(10px);
  pointer-events: none;
}
.promptbox {
  border-radius: 26px;
}
.topnav nav a[aria-current=page] {
  border-radius: 14px;
}
.page:has(.board),
.page:has(.trail),
.page:has(.tboard) {
  max-width: 1320px;
}
.secret {
  display: block;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface-raised, var(--surface));
  border: 1px dashed var(--border);
  font-size: 16px;
  letter-spacing: .06em;
  word-break: break-all;
  user-select: all;
}
.row-btn {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
@media (hover: none) {
  .pin-over {
    display: none;
  }
}
/*# sourceMappingURL=app.css.map */
