:root {
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color-scheme: light;
  --ui-font-size: 14px;
  --text-ui-xl: calc(var(--ui-font-size) + 4px);
  --text-ui-lg: calc(var(--ui-font-size) + 2px);
  --text-ui-base: var(--ui-font-size);
  --text-ui-caption: calc(var(--ui-font-size) - 1px);
  --text-ui-sm: calc(var(--ui-font-size) - 2px);
  --text-ui-xs: calc(var(--ui-font-size) - 4px);
  --ink: #182334;
  --muted: #647184;
  --line: #dfe4eb;
  --blue: #2460a9;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: #f5f6f8;
  color: var(--ink);
  line-height: 1.6;
}
.text-ui-xl {
  font-size: var(--text-ui-xl);
}
.text-ui-lg {
  font-size: var(--text-ui-lg);
}
.text-ui-base {
  font-size: var(--text-ui-base);
}
.text-ui-caption {
  font-size: var(--text-ui-caption);
}
.text-ui-sm {
  font-size: var(--text-ui-sm);
}
.text-ui-xs {
  font-size: var(--text-ui-xs);
}
h1,
h2,
p {
  margin: 0;
}
h1 {
  letter-spacing: -0.025em;
}
h2 {
  font-weight: 650;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
button,
a {
  transition:
    background 0.15s,
    color 0.15s;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
:focus-visible {
  outline: 3px solid #71a8e7;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.muted {
  color: var(--muted);
}
.topbar {
  height: 68px;
  padding: 0 4vw;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-weight: 700;
}
.mark {
  background: var(--blue);
  color: white;
  border-radius: 7px;
  padding: 3px 6px;
}
.local {
  color: var(--muted);
}
.local span {
  color: #54876c;
  margin-left: 7px;
}
main {
  max-width: 1390px;
  margin: auto;
  padding: 32px 4vw;
}
.intro {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 26px;
  gap: 20px;
}
.intro p {
  margin-top: 8px;
}
.eyebrow {
  color: var(--blue);
  font-weight: 600;
  letter-spacing: 0.07em;
}
.format {
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 6px 12px;
  background: white;
}
.studio {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.panel {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
  min-width: 0;
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}
.step {
  color: #8893a1;
  font-variant-numeric: tabular-nums;
}
.drop {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  position: relative;
  padding: 23px 12px;
  border: 1px dashed #aebdce;
  border-radius: 8px;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  overflow: hidden;
}
.drop:hover,
.drop.drag {
  background: #edf3fb;
  border-color: var(--blue);
}
.drop:focus-within {
  outline: 3px solid #71a8e7;
  outline-offset: 3px;
}
.drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.drop strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}
.upload-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--blue);
}
#source-info {
  margin: 11px 0 18px;
  overflow-wrap: anywhere;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
  font-size: var(--text-ui-caption);
  font-weight: 500;
}
.field input,
.field select {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid #cfd6e0;
  border-radius: 6px;
  color: var(--ink);
  background: white;
}
.row {
  display: flex;
  gap: 10px;
}
.row > * {
  min-width: 0;
  flex: 1;
}
.divider {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 22px;
}
#loop-note {
  margin-top: 8px;
}
.recipe ul {
  padding-left: 18px;
  margin: 8px 0 18px;
}
.recipe li {
  margin: 5px 0;
}
.primary,
.secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  border-radius: 7px;
  padding: 10px 14px;
  font-weight: 600;
  white-space: nowrap;
}
.primary {
  background: var(--blue);
  color: white;
  border: 1px solid var(--blue);
}
.primary:hover {
  background: #1c4e8c;
}
.secondary {
  background: white;
  color: #35465b;
  border: 1px solid var(--line);
}
.secondary:hover {
  background: #f0f3f7;
}
#generate,
.full {
  width: 100%;
}
#generate {
  justify-content: space-between;
}
#cancel {
  margin-top: 10px;
}
.status {
  margin-top: 12px;
  color: var(--muted);
}
.error {
  margin-top: 10px;
  color: #a02d38;
  background: #fff1f1;
  padding: 10px;
  border-radius: 6px;
  overflow-wrap: anywhere;
}
.preview-panel {
  min-width: 0;
}
.preview-toolbar,
.preview-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.segments {
  display: flex;
  padding: 3px;
  background: #e9edf2;
  border-radius: 7px;
  gap: 2px;
}
.segments button {
  padding: 5px 10px;
  border: 0;
  border-radius: 5px;
  color: #647184;
  background: transparent;
  font-size: var(--text-ui-sm);
  min-height: 32px;
}
.segments button[aria-pressed="true"] {
  color: #182334;
  background: white;
  box-shadow: 0 1px 3px #18233415;
}
.workspace {
  --background: #101318;
  --surface: #171e27;
  --sidebar: #141b24;
  --foreground: #f5f7fa;
  --mutedForeground: #b8c1cf;
  --accent: #91b7e9;
  --accentForeground: #101318;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  min-height: 460px;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  grid-template-rows: 35px 1fr;
  border: 1px solid #55617044;
  border-radius: 12px;
  background: var(--background);
  color: var(--foreground);
  box-shadow: 0 12px 38px #1823340b;
}
.workspace > img,
.workspace > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -3;
}
.workspace-tint {
  position: absolute;
  inset: 0;
  background: color-mix(in srgb, var(--background) 24%, transparent);
  z-index: -2;
}
.workspace-top {
  grid-column: 1/-1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 13px;
  border-bottom: 1px solid #8b95a033;
  background: color-mix(in srgb, var(--surface) 62%, transparent);
  backdrop-filter: blur(10px);
}
.workspace-top > span:first-child {
  letter-spacing: 3px;
  opacity: 0.6;
}
.workspace-sidebar {
  position: relative;
  padding: 20px 12px;
  background: color-mix(in srgb, var(--sidebar) 72%, transparent);
  backdrop-filter: blur(10px);
  border-right: 1px solid #8b95a033;
}
.workspace-sidebar strong {
  display: block;
  margin: 0 0 22px 8px;
}
.fake-nav {
  padding: 8px;
  border-radius: 6px;
  margin-bottom: 5px;
}
.selected {
  color: var(--accent);
  background: color-mix(in srgb, var(--surface) 85%, transparent);
}
.sidebar-bottom {
  position: absolute;
  bottom: 20px;
  left: 20px;
  color: var(--mutedForeground);
}
.workspace-main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: 30px;
  min-width: 0;
  padding: 30px 24px;
}
.workspace-main h2 {
  margin: 13px 0 7px;
}
.workspace-main p {
  color: var(--mutedForeground);
}
#empty-preview {
  text-align: center;
  padding: 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--background) 70%, transparent);
  backdrop-filter: blur(8px);
}
.preview-symbol {
  color: var(--accent);
  font-size: var(--text-ui-xl);
}
.composer {
  border: 1px solid #8893a166;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  backdrop-filter: blur(15px);
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--mutedForeground);
}
.send {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  color: var(--accentForeground);
  background: var(--accent);
}
.message {
  padding: 16px;
  margin: 12px 0;
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}
.message p {
  margin-top: 8px;
}
.message.user {
  margin-left: 20px;
}
.empty-media {
  position: absolute;
  bottom: 10px;
  right: 14px;
  color: var(--mutedForeground);
}
.preview-bottom {
  margin-top: 14px;
}
.palette {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 18px 0;
  color: var(--muted);
  font-size: var(--text-ui-sm);
}
.swatch {
  width: 22px;
  height: 22px;
  border: 1px solid #8490a044;
  border-radius: 50%;
}
.result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  margin-top: 18px;
}
.result p {
  margin-top: 4px;
}
.howto {
  border-top: 1px solid var(--line);
  padding-top: 18px;
  margin-top: 24px;
}
.howto p {
  margin-top: 6px;
  line-height: 1.8;
}
footer {
  margin-top: 30px;
  text-align: center;
}
@media (max-width: 1000px) {
  .studio {
    grid-template-columns: 280px minmax(0, 1fr);
    gap: 16px;
  }
  .panel {
    padding: 18px;
  }
  .workspace {
    grid-template-columns: 120px minmax(0, 1fr);
  }
  .workspace-main {
    padding: 22px 16px;
  }
  .workspace-sidebar {
    padding: 20px 8px;
  }
}
@media (max-width: 760px) {
  main {
    padding: 22px 18px;
  }
  .topbar {
    padding: 0 18px;
  }
  .intro {
    align-items: start;
  }
  .format {
    display: none;
  }
  .studio {
    grid-template-columns: 1fr;
  }
  .workspace {
    min-height: 380px;
    grid-template-columns: 82px minmax(0, 1fr);
  }
  .workspace-sidebar {
    font-size: var(--text-ui-xs);
  }
  .workspace-sidebar strong {
    margin-left: 2px;
  }
  .fake-nav {
    padding: 5px 2px;
  }
  .sidebar-bottom {
    left: 10px;
  }
  .workspace-main {
    padding: 18px 12px;
    gap: 20px;
  }
  .workspace-main h2 {
    font-size: var(--text-ui-lg);
  }
  .workspace-main p {
    font-size: var(--text-ui-sm);
  }
  .result {
    align-items: stretch;
    flex-direction: column;
  }
  .field input,
  .field select {
    font-size: 16px;
  }
  .preview-toolbar {
    flex-wrap: wrap;
  }
  .empty-media {
    font-size: var(--text-ui-xs);
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
