:root {
  --ink: #111111;
  --muted: #6b7280;
  --line: #e8eaef;
  --surface: #f7f8fa;
  --white: #ffffff;
  --accent: #2563eb;
  --accent-soft: #60a5fa;
  --accent-deep: #1d4ed8;
  --sidebar-w: 4.75rem;
  --sidebar-w-expanded: 15.5rem;
  --font: "Poppins", system-ui, -apple-system, sans-serif;
  --font-display: "Poppins", system-ui, -apple-system, sans-serif;
  --radius-card: 1.15rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
}

.app {
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--white);
}

/* ========== SIDEBAR ========== */
.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: var(--sidebar-w);
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0.85rem 0.55rem 0.9rem;
  background: var(--surface);
  border-right: 1px solid var(--line);
  transition: width 0.22s ease, padding 0.22s ease;
  overflow: hidden;
}

.sidebar__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: 100%;
  margin-bottom: 0.85rem;
  min-height: 2.4rem;
}

.sidebar__logo-link {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.8rem;
  color: var(--accent);
  background: #eef3ff;
  flex-shrink: 0;
}

.sidebar__logo {
  display: grid;
  place-items: center;
}

.logo-c {
  display: inline-block;
  width: 1em;
  height: 1em;
  flex-shrink: 0;
  background-color: currentColor;
  -webkit-mask: url("./logo.svg") center / contain no-repeat;
  mask: url("./logo.svg") center / contain no-repeat;
}

.sidebar__logo .logo-c {
  width: 1.55rem;
  height: 1.55rem;
  color: var(--accent-deep);
}

.sidebar-toggle {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  color: #8b929e;
  transition: background 0.15s ease, color 0.15s ease;
}

.sidebar-toggle:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.05);
}

.sidebar-toggle svg {
  transform: scaleX(-1);
  transition: transform 0.2s ease;
}

.brand-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  margin-bottom: 0.85rem;
  padding: 0.35rem;
  border-radius: 0.75rem;
  background: transparent;
  transition: background 0.15s ease;
}

.brand-switcher:hover {
  background: rgba(0, 0, 0, 0.04);
}

.brand-switcher__avatar {
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.brand-switcher__meta {
  display: none;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
  flex: 1;
}

.brand-switcher__name {
  font-size: 0.84rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-switcher__chevron {
  color: #9aa1ad;
  flex-shrink: 0;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  width: 100%;
}

.nav-section {
  width: 100%;
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}

.nav-section__label {
  display: none;
  margin: 0 0 0.25rem 0.75rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #9aa1ad;
  align-self: flex-start;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  width: 100%;
  padding: 0.55rem 0.2rem;
  border-radius: 0.65rem;
  color: #6b7280;
  transition: background 0.15s ease, color 0.15s ease;
}

.nav-item:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.nav-item.is-active {
  color: var(--ink);
  background: #ebecef;
}

.nav-item--soon {
  opacity: 0.55;
  cursor: default;
}

.nav-item--soon:hover {
  color: #6b7280;
  background: transparent;
}

.nav-item--soon .nav-item__label {
  display: none;
}

.nav-item__soon {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.28rem;
  border-radius: 999px;
  background: #eef0f3;
  color: #6b7280;
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

.nav-item__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.nav-item__label {
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  white-space: nowrap;
}

.sidebar__tools {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  width: 100%;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--line);
}

.tool-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  border-radius: 0.5rem;
  color: #7a8190;
  transition: background 0.15s ease, color 0.15s ease;
}

.tool-btn:hover {
  color: var(--ink);
  background: rgba(0, 0, 0, 0.04);
}

.tool-btn__dot {
  position: absolute;
  top: 0.35rem;
  right: 0.4rem;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: #ef4444;
}

/* Expanded sidebar */
.app.is-sidebar-expanded {
  --sidebar-w: var(--sidebar-w-expanded);
}

.app.is-sidebar-expanded .sidebar {
  align-items: stretch;
  padding: 0.9rem 0.75rem 0.85rem;
}

.app.is-sidebar-expanded .sidebar__head {
  flex-direction: row;
  justify-content: space-between;
  padding: 0 0.15rem;
}

.app.is-sidebar-expanded .sidebar-toggle svg {
  transform: none;
}

.app.is-sidebar-expanded .brand-switcher {
  justify-content: flex-start;
  padding: 0.4rem 0.45rem;
  background: #eceef2;
}

.app.is-sidebar-expanded .brand-switcher__meta {
  display: flex;
}

.app.is-sidebar-expanded .sidebar__nav,
.app.is-sidebar-expanded .nav-section {
  align-items: stretch;
}

.app.is-sidebar-expanded .nav-section__label {
  display: block;
}

.app.is-sidebar-expanded .nav-item {
  flex-direction: row;
  justify-content: flex-start;
  gap: 0.75rem;
  padding: 0.62rem 0.7rem;
}

.app.is-sidebar-expanded .nav-item__label {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: -0.015em;
}

.app.is-sidebar-expanded .nav-item--soon {
  position: relative;
}

.app.is-sidebar-expanded .nav-item--soon .nav-item__label {
  display: inline;
}

.app.is-sidebar-expanded .nav-item__soon {
  margin-left: auto;
  font-size: 0.58rem;
  padding: 0.14rem 0.38rem;
}

.app.is-sidebar-expanded .sidebar__tools {
  flex-direction: row;
  justify-content: space-between;
  padding: 0.55rem 0.15rem 0.1rem;
}

/* ========== MAIN ========== */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fafbfc;
}

.main:has(.view--home.is-active):has([data-home-board]:not([hidden])) {
  position: relative;
  background: transparent;
}

.main:has(.view--home.is-active):has([data-home-board]:not([hidden])) .topbar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 8;
  padding: 1rem 1.2rem;
}

.main:has(.view--home.is-active):has([data-home-board]:not([hidden])) .icon-btn {
  display: none;
}

.main:has(.view--home.is-active):has([data-home-board]:not([hidden])) .btn-upgrade {
  color: #374151;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

.main:has(.view--home.is-active):has([data-home-board]:not([hidden])) .btn-upgrade:hover {
  filter: none;
  background: #f8fafc;
  border-color: #d1d5db;
}

.main:has(.view--home.is-active):has([data-home-board]:not([hidden])) .avatar {
  background: #111111;
}

.main:has(.view--home.is-active):has([data-home-board]:not([hidden])) .topbar__quota {
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  padding: 0.95rem 1.75rem 0.4rem;
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.topbar__quota {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 500;
  color: #374151;
  background: var(--surface);
  border: 1px solid var(--line);
}

.topbar__quota-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.55rem;
  color: #6b7280;
  background: var(--surface);
  border: 1px solid var(--line);
}

.icon-btn:hover {
  color: var(--ink);
  background: #eef0f4;
}

.btn-upgrade {
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.25);
}

.btn-upgrade:hover {
  filter: brightness(1.05);
}

.avatar {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.82rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ========== VIEWS ========== */
.view {
  display: none;
  width: min(1120px, calc(100% - 3rem));
  margin: 0 auto 3.5rem;
  padding-top: 0.5rem;
}

.view.is-active:not(.view--home):not(.view--agent) {
  display: block;
}

.page {
  padding-top: 0.75rem;
}

.page--empty {
  padding-top: 4rem;
  text-align: center;
}

.page--empty h1 {
  margin: 0 0 0.5rem;
  font-size: 1.6rem;
  letter-spacing: -0.03em;
}

.page--empty p {
  margin: 0;
  color: var(--muted);
}

/* ========== INFLUENCERS ========== */
.page--influencers {
  max-width: none;
  width: 100%;
  padding: 0.35rem 1.5rem 3rem;
}

.influencers-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.influencers-head h1 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: -0.04em;
  font-weight: 650;
}

.influencers-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.page--influencers .talent-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 0;
}

.page--influencers .talent-card {
  padding: 0;
  gap: 0;
  background: transparent;
  border: 2px solid transparent;
  border-radius: 1.15rem;
  overflow: hidden;
}

.page--influencers .talent-card:hover {
  border-color: transparent;
}

.page--influencers .talent-card:hover .talent-card__face {
  transform: translateY(-2px);
}

.page--influencers .talent-card.is-selected {
  border-color: transparent;
  box-shadow: none;
}

.page--influencers .talent-card.is-selected .talent-card__face {
  box-shadow: 0 0 0 2px #111;
}

.page--influencers .talent-card__face {
  aspect-ratio: 3 / 4;
  border-radius: 1.05rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

@media (prefers-reduced-motion: reduce) {
  .page--influencers .talent-card:hover .talent-card__face,
  .page--influencers .talent-card__face {
    transition: none;
    transform: none;
  }
}

.page--influencers .talent-card__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 2.1rem 0.7rem 0.7rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.62));
  color: #fff;
}

.page--influencers .talent-card__name {
  display: block;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.page--influencers .talent-card__meta {
  display: block;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
  font-weight: 500;
}

.talent-confirm {
  width: min(340px, 100%);
  text-align: center;
}

.talent-confirm .board-sheet__head {
  margin-bottom: 0.95rem;
}

.talent-confirm .board-sheet__head h2 {
  font-size: 1.15rem;
}

.talent-confirm__preview {
  width: 100%;
  aspect-ratio: 3 / 4;
  margin: 0 0 0.95rem;
  border-radius: 1rem;
  overflow: hidden;
  background: #f3f4f6;
}

.talent-confirm__preview img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.talent-confirm__lead {
  margin-bottom: 1.05rem;
  font-size: 0.95rem;
  color: var(--ink);
}

.talent-confirm__actions {
  display: flex;
  gap: 0.5rem;
}

.talent-confirm__actions .btn-secondary,
.talent-confirm__actions .btn-primary {
  flex: 1;
}

@media (max-width: 1100px) {
  .page--influencers .talent-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .influencers-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }

  .page--influencers .talent-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .page--influencers .talent-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ========== PROJECTS (minimal gallery) ========== */
.page--projects {
  max-width: 1080px;
  padding-top: 0.35rem;
}

.projects-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.6rem;
}

.projects-head h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: #0a0a0a;
}

.projects-status {
  margin: 0.28rem 0 0;
  font-size: 0.8rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: -0.01em;
}

/* ========== SETTINGS ========== */
.page--settings {
  max-width: 40rem;
  padding: 0.35rem 0 3rem;
}

.settings-head {
  margin-bottom: 1.6rem;
}

.settings-head h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 650;
  letter-spacing: -0.04em;
  color: #0a0a0a;
}

.settings-head p {
  margin: 0.35rem 0 0;
  font-size: 0.92rem;
  color: var(--muted);
}

.settings-grid {
  display: grid;
  gap: 1rem;
}

.settings-card {
  padding: 1.15rem 1.25rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: #fff;
}

.settings-card--wide {
  grid-column: 1 / -1;
}

.settings-card h2 {
  margin: 0 0 0.85rem;
  font-size: 0.78rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #9ca3af;
}

.settings-dl {
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

.settings-dl div {
  display: grid;
  gap: 0.18rem;
}

.settings-dl dt {
  font-size: 0.75rem;
  font-weight: 500;
  color: #9ca3af;
}

.settings-dl dd {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #0a0a0a;
  word-break: break-word;
}

.settings-credits {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.04em;
}

.settings-hint {
  margin: 0.55rem 0 0;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #9ca3af;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.settings-guest {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem 1.35rem;
  border: 1px solid var(--line);
  border-radius: 1.1rem;
  background: #fff;
}

.settings-guest p {
  margin: 0;
  color: var(--muted);
}

.settings-guest .btn-primary {
  text-decoration: none;
}

@media (min-width: 720px) {
  .settings-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.projects-status.is-error {
  color: #b42318;
}

.projects-refresh {
  appearance: none;
  border: 0;
  padding: 0.35rem 0;
  background: none;
  color: #9ca3af;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 550;
  cursor: pointer;
  transition: color 0.15s ease;
}

.projects-refresh:hover {
  color: #111827;
}

.projects-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(10.5rem, 1fr));
  gap: 1.35rem 0.95rem;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
  text-align: left;
  color: inherit;
}

.project-card__stage {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  color: #111;
  background: #eceef2;
  border: 1px solid rgba(15, 23, 42, 0.04);
  box-shadow: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.project-card__stage:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.08);
}

.project-card__stage:focus-visible {
  outline: 2px solid #111;
  outline-offset: 2px;
}

.project-card.has-preview .project-card__stage {
  background: #f3f4f6;
}

.project-card.has-preview .project-card__stage::after {
  content: none;
}

.project-card__video,
.project-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #f3f4f6;
  cursor: pointer;
  z-index: 0;
}

.project-card__video[hidden],
.project-card__image[hidden],
.project-card__play[hidden] {
  display: none !important;
}

.project-card.is-image .project-card__play {
  display: none !important;
}

.project-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.4rem;
  height: 2.4rem;
  border: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  color: #0a0a0a;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s ease;
}

.project-card__stage:hover .project-card__play:not([hidden]):not(:disabled),
.project-card__stage:focus-within .project-card__play:not([hidden]):not(:disabled) {
  opacity: 1;
}

.project-card__play:hover:not(:disabled) {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.04);
}

.project-card__play:disabled {
  opacity: 0;
  cursor: wait;
}

.project-card__play-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 0.12rem;
  border-style: solid;
  border-width: 0.38rem 0 0.38rem 0.6rem;
  border-color: transparent transparent transparent currentColor;
}

.project-card.is-playing .project-card__play-icon {
  width: 0.6rem;
  height: 0.65rem;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) left / 0.18rem 100% no-repeat,
    linear-gradient(currentColor, currentColor) right / 0.18rem 100% no-repeat;
}

.project-card.is-playing .project-card__play {
  opacity: 0;
  pointer-events: none;
}

.project-card.is-playing .project-card__stage:hover .project-card__play,
.project-card.is-playing .project-card__stage:focus-within .project-card__play {
  opacity: 1;
  pointer-events: auto;
}

.project-card__placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: -0.01em;
}

.project-card.is-preview-failed .project-card__stage {
  background: #eceef2;
}

.project-card__body {
  min-width: 0;
  padding: 0 0.15rem;
}

.project-card__meta {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.projects-empty {
  padding: 4.5rem 1rem;
  text-align: center;
}

.projects-empty p {
  margin: 0 0 0.85rem;
  color: #9ca3af;
  font-size: 0.92rem;
  font-weight: 500;
}

@media (max-width: 720px) {
  .projects-list {
    grid-template-columns: repeat(auto-fill, minmax(8.5rem, 1fr));
    gap: 1.1rem 0.75rem;
  }
}

/* ========== HOME = HUB → WHITEBOARD ========== */
.view--home,
.view--agent {
  position: relative;
  width: 100%;
  flex: 1;
  min-height: 0;
  display: none;
  margin: 0;
  padding: 0;
}

.view--home.is-active,
.view--agent.is-active {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.home-hub {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background:
    radial-gradient(ellipse 70% 50% at 50% -10%, rgba(37, 99, 235, 0.06) 0%, transparent 55%),
    #f7f8fa;
}

.home-hub[hidden] {
  display: none;
}

.home-hub__inner {
  width: min(1120px, calc(100% - 2.4rem));
  margin: 0 auto;
  padding: 1.35rem 0 3rem;
}

.home-hub__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.home-hub__title {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0a0a0a;
}

.home-hub__board {
  display: flex;
  margin: 1.35rem auto 0;
  padding: 0.62rem 1.25rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.home-hub__board:hover {
  border-color: #d1d5db;
  background: #fafafa;
}

.home-hub__section-head {
  margin-bottom: 1rem;
}

.home-hub__section-head h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #111827;
}

.home-hub__section-head p {
  margin: 0;
  font-size: 0.9rem;
  color: #6b7280;
}

.home-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
}

.home-tool {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 0;
  border: 1px solid #e8eaef;
  border-radius: 1.15rem;
  background: #fff;
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.15s ease;
}

.home-tool:hover {
  border-color: #d5dae3;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.home-tool__media {
  position: relative;
  display: grid;
  place-items: center;
  height: 11.5rem;
  padding: 1rem;
  background-color: #f7f8fa;
  background-image: radial-gradient(#d4d7de 1px, transparent 1px);
  background-size: 18px 18px;
  overflow: hidden;
}

.home-tool__media img {
  display: block;
  object-fit: cover;
  border-radius: 0.85rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
}

.home-tool__media--image img {
  width: min(58%, 9.5rem);
  aspect-ratio: 4 / 5;
}

.home-tool__media--clone {
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: center;
  justify-items: center;
}

.home-tool__media--clone img {
  width: min(100%, 7.2rem);
  aspect-ratio: 3 / 4;
}

.home-tool__media--viral {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
  align-items: end;
  padding-inline: 1.1rem;
}

.home-tool__media--viral img {
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 0.7rem;
}

.home-tool__media--viral img:nth-child(2) {
  transform: translateY(-0.55rem);
}

.home-tool__media--talking img {
  width: min(46%, 7.8rem);
  aspect-ratio: 9 / 16;
}

.home-tool__body {
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  padding: 0.95rem 1rem 1.05rem;
}

.home-tool__name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.98rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: #0a0a0a;
}

.home-tool__new {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.home-tool__desc {
  font-size: 0.84rem;
  line-height: 1.35;
  color: #6b7280;
}

.home-tool__arrow {
  position: absolute;
  top: 0.85rem;
  right: 0.9rem;
  color: #9ca3af;
  font-size: 1rem;
  font-weight: 500;
}

.board-back {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 8;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(10px);
  color: #374151;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.board-back:hover {
  background: #fff;
  border-color: #d1d5db;
}

.create-opt--say [data-say-required] {
  color: #2563eb;
  font-style: normal;
  font-weight: 700;
}

.create-window.is-talking .create-say__input:required,
.create-window.is-talking .create-say__input {
  border-color: #c7d2fe;
}

.create-window.is-ad-clone .create-slot[data-open-add-shot] {
  outline: 2px solid rgba(37, 99, 235, 0.22);
  outline-offset: 1px;
}

@media (max-width: 820px) {
  .home-tools {
    grid-template-columns: 1fr;
  }

  .home-tool__media {
    height: 10rem;
  }
}

.view--agent.is-active {
  position: relative;
  overflow: auto;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse 90% 70% at 50% 42%, rgba(37, 99, 235, 0.07) 0%, transparent 58%),
    radial-gradient(ellipse 50% 40% at 12% 78%, rgba(56, 189, 248, 0.08) 0%, transparent 55%),
    radial-gradient(ellipse 45% 35% at 88% 18%, rgba(251, 146, 60, 0.06) 0%, transparent 50%),
    linear-gradient(180deg, #fbfcfe 0%, #f4f6fa 100%);
}

.agent-stage {
  position: relative;
  width: min(740px, calc(100% - 2.75rem));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 2.25rem;
  margin-top: -3.5vh;
  isolation: isolate;
}

.agent-stage__glow {
  position: absolute;
  z-index: -1;
  inset: -6% -18% 8%;
  background:
    radial-gradient(ellipse 52% 48% at 28% 38%, rgba(96, 165, 250, 0.55) 0%, transparent 64%),
    radial-gradient(ellipse 48% 44% at 74% 34%, rgba(37, 99, 235, 0.34) 0%, transparent 62%),
    radial-gradient(ellipse 42% 38% at 52% 78%, rgba(14, 165, 233, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 70% 55% at 50% 50%, rgba(29, 78, 216, 0.1) 0%, transparent 72%);
  filter: blur(36px);
  animation: aurora-drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora-drift {
  0% {
    transform: translate3d(-2.5%, -1.5%, 0) scale(1);
    opacity: 0.88;
  }
  50% {
    transform: translate3d(2%, 2.5%, 0) scale(1.05);
    opacity: 1;
  }
  100% {
    transform: translate3d(3.5%, -1%, 0) scale(1.02);
    opacity: 0.92;
  }
}

.agent-hero {
  text-align: center;
  margin-bottom: 1.55rem;
  animation: hero-rise 0.7s ease both;
}

@keyframes hero-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.agent-hero__title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.3rem 0.42rem;
  margin: 0 0 1.15rem;
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 4vw, 2.9rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.1;
  color: var(--ink);
  text-wrap: balance;
}

.agent-hero__accent {
  position: relative;
  display: inline-block;
  min-width: 5.2ch;
  text-align: left;
}

.agent-hero__accent-text {
  background: linear-gradient(
    115deg,
    #7dd3fc 0%,
    #3b82f6 32%,
    #1d4ed8 55%,
    #38bdf8 78%,
    #2563eb 100%
  );
  background-size: 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: gradient-shift 6s ease-in-out infinite;
}

@keyframes gradient-shift {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.agent-hero__help {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  margin-left: 0.1rem;
  border-radius: 999px;
  color: #9aa1ad;
  vertical-align: middle;
  transition: color 0.15s ease, background 0.15s ease;
}

.agent-hero__help:hover {
  color: var(--accent);
  background: #eaf0ff;
}

.mode-tabs {
  display: inline-flex;
  gap: 0.28rem;
  padding: 0.3rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(232, 234, 239, 0.95);
  backdrop-filter: blur(10px);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(37, 99, 235, 0.06);
}

.mode-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.05rem;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 600;
  color: #6b7280;
  transition: color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.mode-tab.is-active {
  color: var(--ink);
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

.create-box {
  width: 100%;
  padding: 1.2rem 1.2rem 0.95rem;
  border-radius: 1.55rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 22px 56px rgba(37, 99, 235, 0.12),
    0 10px 28px rgba(15, 23, 42, 0.06);
  animation: hero-rise 0.75s ease 0.08s both;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.create-box:focus-within {
  border-color: #c7d7f5;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.03),
    0 0 0 3px rgba(37, 99, 235, 0.1),
    0 24px 60px rgba(37, 99, 235, 0.14),
    0 12px 30px rgba(15, 23, 42, 0.06);
}

.create-box__input {
  width: 100%;
  resize: none;
  border: 0;
  outline: none;
  font: inherit;
  font-size: 1.06rem;
  line-height: 1.5;
  color: var(--ink);
  background: transparent;
  min-height: 4.6rem;
  padding: 0.2rem 0.25rem 0.9rem;
}

.create-box__input::placeholder {
  color: #9aa3b2;
}

.create-box__bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.create-box__plus {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  color: #5b6472;
  background: #f3f4f6;
  transition: background 0.15s ease, color 0.15s ease;
}

.create-box__plus:hover {
  background: #e8ebf0;
  color: var(--ink);
}

.create-box__plus-dot {
  position: absolute;
  top: 0.2rem;
  right: 0.2rem;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 2px #fff;
}

.create-box__modes,
.create-box__actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.create-box__actions {
  margin-left: auto;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.44rem 0.74rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
  transition: background 0.15s ease, color 0.15s ease;
}

.chip.is-active {
  color: var(--accent-deep);
  background: #e8efff;
}

.chip--ghost {
  background: transparent;
  color: #6b7280;
}

.chip--ghost:hover {
  background: #f3f4f6;
}

.create-box__send {
  display: grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border-radius: 999px;
  color: #fff;
  background: linear-gradient(145deg, var(--accent-soft) 0%, var(--accent) 45%, var(--accent-deep) 100%);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.32);
  transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.create-box__send:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(37, 99, 235, 0.38);
}

.quick-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.55rem;
  margin-top: 1.15rem;
  animation: hero-rise 0.8s ease 0.14s both;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.42rem;
  padding: 0.55rem 0.92rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #374151;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(226, 232, 240, 0.95);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.pill:hover {
  border-color: #c9d4e8;
  background: #fff;
  color: var(--accent-deep);
  transform: translateY(-1px);
}

.agent-disclaimer {
  margin: 1.45rem 0 0;
  text-align: center;
  font-size: 0.76rem;
  color: #9aa1ad;
}

.agent-thread {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin: 0 0 1rem;
  max-height: min(42vh, 22rem);
  overflow-y: auto;
  padding: 0.25rem 0.15rem;
}

.agent-msg {
  max-width: 92%;
  padding: 0.75rem 0.95rem;
  border-radius: 1.05rem;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--ink);
}

.agent-msg--user {
  align-self: flex-end;
  background: #e8efff;
  border: 1px solid #d7e3ff;
  border-bottom-right-radius: 0.35rem;
}

.agent-msg--ai {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
  border-bottom-left-radius: 0.35rem;
}

.agent-msg--ai strong {
  display: block;
  margin-bottom: 0.2rem;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.agent-stage.is-chatting {
  margin-top: 0;
  justify-content: flex-start;
  padding-top: 0.75rem;
  min-height: auto;
}

.agent-stage.is-chatting .agent-hero {
  margin-bottom: 0.85rem;
}

.agent-stage.is-chatting .agent-hero__title {
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
}

.agent-stage.is-chatting .quick-pills {
  display: none;
}

.agent-stage.is-chatting .mode-tabs {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .agent-stage__glow,
  .agent-hero__accent-text,
  .agent-hero,
  .create-box,
  .quick-pills {
    animation: none !important;
  }

  .agent-stage__glow {
    opacity: 0.75;
    transform: none;
  }

  .create-box__send:hover,
  .pill:hover {
    transform: none;
  }
}

@media (max-width: 720px) {
  .view--home,
  .view--agent {
    width: min(100%, calc(100% - 1.5rem));
    min-height: auto;
  }

  .view--agent.is-active {
    justify-content: flex-start;
  }

  .agent-stage {
    width: min(100%, calc(100% - 1.25rem));
    margin-top: 0;
    padding: 1.1rem 0 1.75rem;
    justify-content: flex-start;
  }

  .agent-stage__glow {
    inset: -2% -22% 20%;
  }

  .agent-hero__title {
    font-size: clamp(1.7rem, 7vw, 2.15rem);
  }

  .create-box__actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* ========== INSPIRATION ========== */
.inspire-block__head {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-bottom: 0.95rem;
}

.inspire-block__head h2 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.inspire-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  flex: 1;
}

.filter-pill {
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #4b5563;
  background: #f0f2f5;
}

.filter-pill.is-active {
  color: #fff;
  background: #374151;
}

.inspire-block__search {
  margin-left: auto;
}

.search-field {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--line);
  color: #6b7280;
}

.search-field input {
  border: 0;
  outline: none;
  font: inherit;
  font-size: 0.82rem;
  width: 9.5rem;
  background: transparent;
  color: var(--ink);
}

.inspire-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.template-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.template-card__tag,
.template-card__meta {
  position: absolute;
  top: 0.65rem;
  padding: 0.22rem 0.5rem;
  border-radius: 0.4rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: #fff;
  backdrop-filter: blur(6px);
}

.template-card__tag {
  left: 0.65rem;
  background: rgba(37, 99, 235, 0.85);
}

.template-card__meta {
  right: 0.65rem;
  background: rgba(15, 23, 42, 0.7);
}

.template-card--a {
  background:
    radial-gradient(ellipse 70% 55% at 30% 30%, #60a5fa 0%, transparent 55%),
    linear-gradient(160deg, #0b1b3a, #0a0a0a);
}

.template-card--video .template-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  background: transparent;
}

.template-card--video .template-card__tag,
.template-card--video .template-card__meta {
  z-index: 1;
}
.template-card--b {
  background:
    radial-gradient(ellipse 65% 50% at 70% 20%, #93c5fd 0%, transparent 55%),
    linear-gradient(160deg, #2563eb, #7c2d12);
}
.template-card--c {
  background:
    radial-gradient(ellipse 60% 50% at 40% 70%, #34d399 0%, transparent 55%),
    linear-gradient(160deg, #064e3b, #0f766e);
}
.template-card--d {
  background:
    radial-gradient(ellipse 70% 55% at 80% 40%, #f472b6 0%, transparent 55%),
    linear-gradient(160deg, #1e1b4b, #3730a3);
}
.template-card--e {
  background:
    radial-gradient(ellipse 65% 55% at 20% 80%, #60a5fa 0%, transparent 55%),
    linear-gradient(160deg, #2563eb, #1e3a8a);
}
.template-card--f {
  background:
    radial-gradient(ellipse 60% 50% at 50% 30%, #fbbf24 0%, transparent 55%),
    linear-gradient(160deg, #1f2937, #92400e);
}
.template-card--g {
  background:
    radial-gradient(ellipse 70% 55% at 30% 40%, #a78bfa 0%, transparent 55%),
    linear-gradient(160deg, #020617, #312e81);
}
.template-card--h {
  background:
    radial-gradient(ellipse 65% 50% at 70% 70%, #f87171 0%, transparent 55%),
    linear-gradient(160deg, #2563eb, #7f1d1d);
}

/* ========== EXPAND FLOW ========== */
.expand-flow {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 0.5rem 0 2.5rem;
}

.expand-flow__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.expand-flow__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
}

.expand-flow__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
}

.expand-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.expand-steps__item {
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #9aa1ad;
  background: #f0f2f5;
}

.expand-steps__item.is-active {
  color: #fff;
  background: var(--accent);
}

.expand-steps__item.is-done {
  color: var(--accent-deep);
  background: #e8efff;
}

.expand-panel[hidden] {
  display: none !important;
}

.expand-panel__head {
  margin-bottom: 1.15rem;
}

.expand-panel__head h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: -0.02em;
}

.expand-panel__head p [data-batch-meta]:not(:empty)::before {
  content: " · ";
}

.expand-panel__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.expand-start {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  gap: 1.25rem;
  align-items: stretch;
}

.expand-start__copy {
  padding: 1.5rem;
  border-radius: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.expand-start__copy h2 {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: 1.45rem;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.expand-start__copy p {
  margin: 0 0 1.25rem;
  color: #5b6472;
  line-height: 1.5;
}

.expand-start__card {
  padding: 1.35rem 1.4rem;
  border-radius: 1.25rem;
  color: #fff;
  background:
    radial-gradient(ellipse 70% 60% at 20% 20%, rgba(96, 165, 250, 0.45) 0%, transparent 55%),
    linear-gradient(145deg, #0b1b3a 0%, #0a0a0a 55%, #2563eb 100%);
}

.expand-start__badge {
  display: inline-block;
  margin-bottom: 0.85rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.18);
}

.expand-start__card ol {
  margin: 0;
  padding-left: 1.1rem;
  display: grid;
  gap: 0.75rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.65rem 1.1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-deep) 100%);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.25);
}

.btn-primary:hover {
  filter: brightness(1.05);
}

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

.btn-primary--full {
  width: 100%;
}

.btn-secondary {
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
}

.btn-secondary:hover {
  border-color: #c9d4e8;
  background: #f8fafc;
}

.btn-ghost {
  color: #4b5563;
  background: transparent;
}

.btn-ghost:hover {
  background: #f0f2f5;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 210px;
  margin-bottom: 1rem;
  padding: 1.5rem;
  border-radius: 1.25rem;
  border: 1.5px dashed #c5cddb;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.dropzone:hover,
.dropzone.is-dragover {
  border-color: var(--accent);
  background: #f5f8ff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.dropzone.is-ready {
  border-style: solid;
  border-color: #bfdbfe;
  background: #f8fbff;
  cursor: default;
}

.dropzone__idle,
.dropzone__ready {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  text-align: center;
}

.dropzone__ready {
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  text-align: left;
  gap: 0.85rem;
  align-items: center;
}

.dropzone__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  margin-bottom: 0.35rem;
  border-radius: 999px;
  font-size: 1rem;
  color: var(--accent);
  background: #e8efff;
}

.dropzone__title {
  margin: 0;
  font-weight: 700;
  font-size: 1.05rem;
}

.dropzone__hint {
  margin: 0 0 0.75rem;
  font-size: 0.84rem;
  color: #6b7280;
}

.dropzone__file-icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.75rem;
  color: #fff;
  background: var(--accent);
  flex-shrink: 0;
}

.dropzone__preview {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.dropzone__thumb {
  width: 3.1rem;
  height: 3.1rem;
  border-radius: 0.65rem;
  object-fit: cover;
  background: #e8efff;
  border: 1px solid #dbe4f3;
}

.dropzone__video-chip {
  display: inline-flex;
  align-items: center;
  max-width: 12rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone__link-chip {
  display: inline-flex;
  align-items: center;
  max-width: 16rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-deep);
  background: #e8efff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropzone__ready-copy {
  min-width: 0;
  flex: 1;
}

.dropzone__file-name {
  margin: 0;
  font-weight: 700;
}

.dropzone__file-meta {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.dropzone__ready .text-link {
  margin-left: auto;
}

.source-or {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.15rem 0 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9aa1ad;
}

.source-or::before,
.source-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.source-link {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: 1.25rem;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: text;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.source-link:focus-within,
.source-link.is-ready {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
}

.source-link.is-ready {
  border-style: solid;
}

.source-link__icon {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.85rem;
  flex-shrink: 0;
  font-size: 1.05rem;
  background: #e8efff;
}

.source-link__body {
  display: grid;
  gap: 0.2rem;
  flex: 1;
  min-width: 0;
}

.source-link__label {
  font-size: 0.95rem;
  font-weight: 700;
}

.source-link__hint {
  margin-bottom: 0.55rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.source-link .field__input {
  margin: 0;
}

.source-link__ready {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent-deep);
}

.expand-history {
  margin: 0 0 1.25rem;
  padding: 1rem 1.1rem 1.05rem;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: #fff;
}

.expand-history[hidden] {
  display: none !important;
}

.expand-history__head {
  margin-bottom: 0.75rem;
}

.expand-history__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
  letter-spacing: -0.02em;
}

.expand-history__sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: #6b7280;
}

.expand-history__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.6rem;
  border-radius: 0.85rem;
  border: 1px solid transparent;
  background: var(--surface);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.history-item:hover {
  border-color: #dbe4f3;
  background: #f5f8ff;
}

.history-item.is-active {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.history-item__thumb {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 0.65rem;
  flex-shrink: 0;
  font-size: 0.78rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent);
}

.history-item__body {
  min-width: 0;
  flex: 1;
}

.history-item__name {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-item__meta {
  margin: 0.1rem 0 0;
  font-size: 0.72rem;
  color: #6b7280;
}

.history-item__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.history-item__btn {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.35rem 0.55rem;
  border-radius: 0.55rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.history-item__btn:hover {
  background: #f0f2f5;
  border-color: #d0d5dd;
}

.history-item__btn--play {
  color: var(--accent-deep);
  border-color: #bfdbfe;
  background: #eef4ff;
}

.history-item__btn--play:hover {
  background: #e0ebff;
}

.media-player {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.media-player[hidden] {
  display: none !important;
}

.media-player__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}

.media-player__dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  padding: 0.85rem 0.9rem 0.95rem;
  border-radius: 1.15rem;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.media-player__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}

.media-player__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.media-player__close {
  appearance: none;
  border: none;
  background: var(--surface);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  color: #374151;
}

.media-player__close:hover {
  background: #e8eaef;
}

.media-player__video {
  display: block;
  width: 100%;
  max-height: min(70vh, 480px);
  border-radius: 0.75rem;
  background: #0b1220;
}

.field {
  display: grid;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.field__label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #374151;
}

.field__label em {
  font-style: normal;
  font-weight: 500;
  color: #9aa1ad;
}

.field__input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.85rem;
  border: 1px solid var(--line);
  font: inherit;
  font-size: 0.92rem;
  background: #fff;
  color: var(--ink);
}

.field__input:focus {
  outline: none;
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.pattern-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.pattern-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 1rem;
  border-radius: 1rem;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.pattern-card:hover {
  border-color: #c9d4e8;
}

.pattern-card.is-selected {
  border-color: var(--accent);
  background: #f5f8ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.pattern-card__tag {
  display: inline-block;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--accent-deep);
  background: #e8efff;
}

.pattern-card__tag--soft {
  color: #6b7280;
  background: #f0f2f5;
}

.pattern-card h3 {
  margin: 0.15rem 0 0;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.pattern-card p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #6b7280;
}

.expand-hint {
  margin: 0 0 1rem;
  font-size: 0.84rem;
  color: #6b7280;
}

.config-grid {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.config-block {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: #fff;
}

.config-block legend {
  padding: 0 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
}

.config-hint {
  margin: 0.65rem 0 0;
  font-size: 0.78rem;
  line-height: 1.35;
  color: #6b7280;
}

.config-block--wide {
  grid-column: 1 / -1;
}

.config-field {
  display: grid;
  gap: 0.4rem;
}

.config-field__label {
  font-size: 0.84rem;
  font-weight: 600;
  color: #4b5563;
}

.field__input--area {
  min-height: 4.5rem;
  resize: vertical;
  line-height: 1.4;
  font-family: inherit;
}

.config-toggle {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
}

.config-toggle input {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--accent);
}

.seg {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.seg__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #4b5563;
  background: #f3f4f6;
}

.seg__avatar {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 999px;
  object-fit: cover;
  object-position: center 20%;
}

.seg__btn.is-active {
  color: #fff;
  background: var(--accent);
}

.seg__btn[data-pro] {
  cursor: not-allowed;
  opacity: 0.72;
}

html.is-pro .seg__btn[data-pro] {
  cursor: pointer;
  opacity: 1;
}

.seg__btn .pro-badge {
  padding: 0.04rem 0.28rem;
  font-size: 0.52rem;
}

.expand-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-deep);
  background: #eef3ff;
}

.expand-nav {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

.generate-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1rem;
}

.generate-state__ring {
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  border: 3px solid #dbeafe;
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

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

.generate-state h2 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
}

.generate-state p {
  margin: 0 0 1.25rem;
  color: #6b7280;
  font-size: 0.92rem;
}

.progress {
  width: min(320px, 100%);
  height: 0.45rem;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.progress__bar {
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  transition: width 0.35s ease;
}

.results-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.results-toolbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.results-toolbar__meta {
  font-size: 0.82rem;
  color: #6b7280;
}

.results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.result-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  border: 2px solid transparent;
  border-radius: 0.95rem;
  cursor: pointer;
  color: #0a0a0a;
  background: transparent;
}

.result-card__stage {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 0.95rem;
  overflow: hidden;
  color: #fff;
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.25), rgba(7, 17, 31, 0.55)),
    radial-gradient(ellipse 70% 50% at 30% 20%, #60a5fa 0%, transparent 55%),
    linear-gradient(145deg, #0b1b3a, #0a0a0a);
}

.result-card:nth-child(3n) .result-card__stage {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.25), rgba(7, 17, 31, 0.55)),
    radial-gradient(ellipse 65% 50% at 70% 30%, #93c5fd 0%, transparent 55%),
    linear-gradient(145deg, #2563eb, #1e3a8a);
}

.result-card:nth-child(4n) .result-card__stage {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.25), rgba(7, 17, 31, 0.55)),
    radial-gradient(ellipse 60% 45% at 40% 70%, #60a5fa 0%, transparent 55%),
    linear-gradient(145deg, #2563eb, #2563eb);
}

.result-card.is-ready .result-card__stage {
  background: #0b1220;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
}

.result-card.is-ready .result-card__stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 30%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.5));
}

.result-card.has-preview .result-card__stage {
  background: #0b1220;
}

.result-card__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1220;
  cursor: pointer;
  z-index: 0;
}

.result-card__play {
  position: absolute;
  left: 50%;
  top: 46%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.85rem;
  height: 2.85rem;
  border: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  color: #0a0a0a;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.28);
  cursor: pointer;
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.15s ease;
}

.result-card__play:hover:not(:disabled) {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.04);
}

.result-card__play:disabled {
  opacity: 0.45;
  cursor: wait;
}

.result-card__play-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 0.15rem;
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.72rem;
  border-color: transparent transparent transparent currentColor;
}

.result-card.is-playing .result-card__play-icon {
  width: 0.72rem;
  height: 0.78rem;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) left / 0.22rem 100% no-repeat,
    linear-gradient(currentColor, currentColor) right / 0.22rem 100% no-repeat;
}

.result-card.is-playing .result-card__play {
  opacity: 0;
  pointer-events: none;
}

.result-card.is-playing .result-card__stage:hover .result-card__play,
.result-card.is-playing .result-card__stage:focus-within .result-card__play {
  opacity: 1;
  pointer-events: auto;
}

.result-card.is-pending .result-card__stage {
  outline: 1px dashed rgba(148, 163, 184, 0.55);
}

.result-card.is-selected .result-card__stage {
  box-shadow:
    0 0 0 3px rgba(37, 99, 235, 0.25),
    0 10px 28px rgba(15, 23, 42, 0.18);
  outline: 2px solid #93c5fd;
  outline-offset: -2px;
}

.result-card__check {
  position: absolute;
  top: 0.55rem;
  left: 0.55rem;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 0.35rem;
  font-size: 0.75rem;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.result-card.is-selected .result-card__check {
  background: var(--accent);
  border-color: transparent;
}

.result-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0 0.15rem 0.1rem;
  min-height: 2.4rem;
}

.result-card__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
}

.result-card__hook {
  margin: 0;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: #2563eb;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.result-card__type {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 3;
  padding: 0.2rem 0.45rem;
  border-radius: 0.35rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #6d8cff;
  color: #fff;
}

.result-card__type--smart {
  background: rgba(15, 23, 42, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.result-card__download {
  position: absolute;
  left: 50%;
  bottom: 0.7rem;
  z-index: 3;
  transform: translateX(-50%);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  color: #0a0a0a;
  background: #fff;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.result-card__download:hover {
  filter: brightness(0.96);
}

.result-card__pending {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  font-size: 0.72rem;
  font-weight: 600;
  opacity: 0.9;
  color: #fff;
}

.results-error {
  margin: 0 0 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.12);
  color: #7f1d1d;
  font-size: 0.86rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.result-card__error {
  position: absolute;
  left: 0.55rem;
  right: 0.55rem;
  bottom: 0.45rem;
  z-index: 2;
  max-height: 42%;
  overflow: auto;
  font-size: 0.62rem;
  line-height: 1.3;
  color: #fecaca;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.result-card.is-failed .result-card__stage {
  outline: 1px solid rgba(248, 113, 113, 0.55);
}

.result-card.is-ready {
  cursor: default;
}

.result-card.is-preview-failed .result-card__stage {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.35), rgba(7, 17, 31, 0.65)),
    linear-gradient(145deg, #0b1b3a, #0a0a0a);
}

.result-card__regen {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 4;
  padding: 0.28rem 0.45rem;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 600;
  color: #fff;
  background: rgba(15, 23, 42, 0.55);
  opacity: 0;
  transition: opacity 0.15s ease;
}

.result-card:hover .result-card__regen {
  opacity: 1;
}

.result-card.is-flash {
  animation: result-flash 0.55s ease;
}

@keyframes result-flash {
  0%,
  100% {
    filter: brightness(1);
  }
  40% {
    filter: brightness(1.35);
  }
}

.toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(calc(100% + 2.5rem));
  z-index: 50;
  max-width: min(42rem, calc(100vw - 2rem));
  padding: 0.75rem 1.15rem;
  border-radius: 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  transition: transform 0.25s ease, opacity 0.2s ease, visibility 0.2s ease;
  pointer-events: none;
  white-space: pre-wrap;
  word-break: break-word;
  text-align: center;
  line-height: 1.35;
  opacity: 0;
  visibility: hidden;
}

.toast.toast--error {
  background: #7f1d1d;
}

.toast.is-on {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
}

@media (prefers-reduced-motion: reduce) {
  .generate-state__ring,
  .result-card.is-flash,
  .progress__bar,
  .toast {
    animation: none !important;
    transition: none !important;
  }

  .generate-state__ring {
    border-top-color: var(--accent);
    opacity: 0.85;
  }
}

@media (max-width: 900px) {
  .expand-start,
  .pattern-grid {
    grid-template-columns: 1fr 1fr;
  }

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

@media (max-width: 720px) {
  .expand-start,
  .pattern-grid {
    grid-template-columns: 1fr;
  }

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

  .expand-steps {
    width: 100%;
  }
}

/* ========== SECTIONS (legacy cards) ========== */
.section {
  margin-bottom: 2.35rem;
}

.section__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.95rem;
}

.section__head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section__icon {
  display: grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.45rem;
  color: var(--accent);
  background: #eaf0ff;
}

.section__icon--play {
  color: #fff;
  background: var(--accent);
}

/* ========== CARDS ========== */
.card-grid {
  display: grid;
  gap: 1rem;
}

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

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

.feature-card {
  position: relative;
  display: block;
  min-height: 220px;
  border-radius: var(--radius-card);
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.feature-card--sm {
  min-height: 180px;
}

.feature-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.1);
}

.feature-card__media {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.feature-card__media--placeholder {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.35) 0%, rgba(7, 17, 31, 0.55) 100%),
    radial-gradient(ellipse 80% 70% at 20% 20%, #60a5fa 0%, transparent 55%),
    radial-gradient(ellipse 70% 60% at 85% 75%, #0a0a0a 0%, transparent 50%),
    linear-gradient(135deg, #0b1b3a 0%, #1e3a8a 55%, #2563eb 100%);
}

.feature-card__media--alt {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.3) 0%, rgba(7, 17, 31, 0.55) 100%),
    radial-gradient(ellipse 70% 65% at 80% 15%, #93c5fd 0%, transparent 55%),
    radial-gradient(ellipse 65% 55% at 15% 85%, #0ea5e9 0%, transparent 50%),
    linear-gradient(145deg, #0b1b3a 0%, #1e3a8a 60%, #3b82f6 100%);
}

.feature-card__media--warm {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.35) 0%, rgba(7, 17, 31, 0.55) 100%),
    radial-gradient(ellipse 75% 60% at 30% 80%, #f97316 0%, transparent 55%),
    linear-gradient(135deg, #1e293b 0%, #7c2d12 100%);
}

.feature-card__media--cool {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.3) 0%, rgba(7, 17, 31, 0.55) 100%),
    radial-gradient(ellipse 70% 60% at 70% 30%, #60a5fa 0%, transparent 55%),
    linear-gradient(135deg, #2563eb 0%, #1e3a8a 55%, #0ea5e9 100%);
}

.feature-card__media--deep {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.35) 0%, rgba(7, 17, 31, 0.6) 100%),
    radial-gradient(ellipse 65% 55% at 40% 40%, #818cf8 0%, transparent 55%),
    linear-gradient(135deg, #020617 0%, #1e1b4b 100%);
}

.feature-card__overlay {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  min-height: inherit;
  padding: 1.15rem 1.2rem 1.05rem;
  color: #fff;
}

.feature-card__title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 10px rgba(37, 99, 235, 0.25);
}

.feature-card__desc {
  margin: 0.45rem 0 0;
  max-width: 18rem;
  font-size: 0.86rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.88);
  text-shadow: 0 1px 8px rgba(37, 99, 235, 0.25);
}

.feature-card__cta {
  margin-top: auto;
  padding-top: 1.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.95);
}

.feature-card:hover .feature-card__cta {
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 960px) {
  .card-grid--3,
  .inspire-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .sidebar {
    position: fixed;
    bottom: 0;
    top: auto;
    left: 0;
    right: 0;
    width: 100%;
    min-height: 0;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
    border-right: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }

  .sidebar__head,
  .brand-switcher,
  .nav-section,
  .sidebar__tools {
    display: none;
  }

  .sidebar__nav {
    flex-direction: row;
    justify-content: space-around;
    gap: 0;
  }

  .nav-item {
    padding: 0.35rem 0.5rem;
  }

  .app {
    padding-bottom: 4.5rem;
  }

  .view {
    width: min(100%, calc(100% - 1.5rem));
  }

  .card-grid--2,
  .card-grid--3,
  .inspire-grid {
    grid-template-columns: 1fr;
  }

  .topbar {
    padding: 0.85rem 1rem 0.2rem;
  }

  .topbar__quota span:last-child {
    display: none;
  }

  .inspire-block__search {
    margin-left: 0;
    width: 100%;
  }

  .search-field {
    width: 100%;
  }

  .search-field input {
    width: 100%;
  }
}

/* ========== ONBOARD ========== */
.onboard {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(8px);
}

.onboard[hidden] {
  display: none !important;
  pointer-events: none;
}

.onboard__card {
  width: min(920px, 100%);
  max-height: min(92vh, 860px);
  overflow: auto;
  padding: 1.6rem 1.6rem 1.4rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.22);
}

.onboard__brand {
  margin: 0 0 1.1rem;
  color: var(--accent-deep);
}

.onboard__brand .logo-c {
  width: 2.2rem;
  height: 2.2rem;
}

.onboard-step h1 {
  margin: 0 0 0.4rem;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  letter-spacing: -0.03em;
}

.onboard__lead {
  margin: 0 0 1.25rem;
  color: #6b7280;
  line-height: 1.45;
}

.onboard-form {
  display: grid;
  gap: 0.85rem;
  max-width: 26rem;
}

.onboard__micro {
  margin: 0.85rem 0 0;
  font-size: 0.78rem;
  color: #9aa1ad;
}

.onboard__error {
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: #b42318;
}

.onboard-recents {
  margin-top: 1.35rem;
  padding-top: 1.15rem;
  border-top: 1px solid #eef0f4;
}

.onboard-recents[hidden] {
  display: none !important;
}

.onboard-recents__label {
  margin: 0 0 0.65rem;
  font-size: 0.78rem;
  font-weight: 650;
  color: #6b7280;
}

.onboard-recents__list {
  list-style: none;
  margin: 0;
  padding: 0.1rem 0;
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
}

.onboard-recents__list > li {
  flex: 0 0 4.85rem;
  width: 4.85rem;
}

.onboard-recent {
  appearance: none;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0.7rem;
  overflow: hidden;
  cursor: pointer;
  background: #0b1220;
  aspect-ratio: 9 / 16;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.onboard-recent:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.paywall {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.paywall[hidden] {
  display: none !important;
  pointer-events: none;
}

.paywall__backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 50% at 20% 10%, rgba(109, 140, 255, 0.22), transparent 55%),
    rgba(7, 17, 31, 0.52);
  backdrop-filter: blur(10px);
}

.paywall__dialog {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(15.5rem, 0.88fr) minmax(20rem, 1.12fr);
  width: min(860px, 100%);
  max-height: min(92vh, 640px);
  overflow: hidden;
  border-radius: 1.35rem;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.22);
}

.paywall__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  z-index: 3;
  width: 2.1rem;
  height: 2.1rem;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: #0a0a0a;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.paywall__art {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #0b1f3a;
}

.paywall__art img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 18%, #000 100%);
}

.paywall__brand {
  position: absolute;
  left: 1.15rem;
  top: 0.95rem;
  z-index: 2;
  margin: 0;
  color: #fff;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.paywall__brand .logo-c {
  width: 2.35rem;
  height: 2.35rem;
}

.paywall__pill {
  position: absolute;
  left: 1.15rem;
  bottom: 1.15rem;
  z-index: 2;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.72);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.paywall__panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: auto;
  padding: 1.55rem 1.75rem 1.35rem;
}

.paywall__kicker {
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}

.paywall__panel h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.25rem, 2.2vw, 1.55rem);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #0a0a0a;
}

.paywall__lead {
  margin: 0 0 1.05rem;
  font-size: 0.88rem;
  line-height: 1.4;
  color: #52525b;
}

.paywall-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.paywall-plan {
  display: flex;
  flex-direction: column;
  padding: 0.95rem 0.95rem 0.9rem;
  border: 1px solid rgba(10, 10, 10, 0.08);
  border-radius: 1.05rem;
  background: #fff;
  cursor: pointer;
}

.paywall-plan--popular {
  border-color: rgba(79, 110, 247, 0.28);
  background: #f7f9ff;
}

.paywall-plan.is-picked {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109, 140, 255, 0.18);
}

.paywall-plan h2 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #0a0a0a;
}

.paywall-plan__badge {
  margin: 0 0 0.3rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
  text-transform: uppercase;
}

.paywall-plan__tag {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: #71717a;
}

.paywall-plan__price {
  margin: 0.65rem 0 0.7rem;
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #0a0a0a;
}

.paywall-plan__price span {
  font-size: 0.78rem;
  font-weight: 500;
  color: #a1a1aa;
}

.paywall-plan ul {
  margin: 0 0 0.9rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.28rem;
  color: #3f3f46;
  font-size: 0.78rem;
  line-height: 1.35;
}

.paywall-plan__cta {
  margin-top: auto;
  width: 100%;
  min-height: 2.45rem;
  padding: 0.55rem 1rem;
  border: 1px solid rgba(10, 10, 10, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.paywall-plan__cta:hover {
  background: #fafafa;
}

.paywall-plan__cta--solid {
  background: #0a0a0a;
  border-color: #0a0a0a;
  color: #fff;
}

.paywall-plan__cta--solid:hover {
  background: #171717;
}

.paywall__micro {
  margin: 0.85rem 0 0;
  font-size: 0.74rem;
  color: #a1a1aa;
  text-align: center;
}

@media (max-width: 760px) {
  .paywall {
    padding: 0.65rem;
    align-items: end;
  }

  .paywall__dialog {
    grid-template-columns: 1fr;
    max-height: min(94vh, 820px);
    width: 100%;
  }

  .paywall__art {
    min-height: 9.5rem;
  }

  .paywall__panel {
    padding: 1.25rem 1.2rem 1.2rem;
  }

  .paywall-plans {
    grid-template-columns: 1fr;
  }
}

.onboard-recent:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.onboard-recent__video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0b1220;
  pointer-events: none;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}

@media (min-width: 720px) {
  .style-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .style-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.style-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  overflow: hidden;
  border-radius: 1rem;
  border: 2px solid transparent;
  background: #f6f7f9;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.style-card:hover {
  transform: translateY(-2px);
}

.style-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.style-card__media {
  min-height: 140px;
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.28) 0%, rgba(7, 17, 31, 0.5) 100%),
    radial-gradient(ellipse 80% 70% at 20% 20%, #60a5fa 0%, transparent 55%),
    linear-gradient(135deg, #0b1b3a 0%, #2563eb 100%);
}

.style-card__media--packshot {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.3) 0%, rgba(7, 17, 31, 0.5) 100%),
    radial-gradient(ellipse 70% 60% at 80% 20%, #93c5fd 0%, transparent 55%),
    linear-gradient(145deg, #0b1b3a 0%, #1e3a8a 100%);
}

.style-card__media--fashion {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.35) 0%, rgba(7, 17, 31, 0.55) 100%),
    radial-gradient(ellipse 70% 55% at 70% 30%, #94a3b8 0%, transparent 50%),
    radial-gradient(ellipse 50% 40% at 20% 80%, #ff4d2e55 0%, transparent 55%),
    linear-gradient(145deg, #020617 0%, #1e3a8a 55%, #0a0a0a 100%);
}

.style-card__media--web,
[data-slot="style-web"] {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.25) 0%, rgba(7, 17, 31, 0.45) 100%),
    #1e293b url("./influencers/maya-24/pose-present-laptop.png") center 22% / cover no-repeat;
}

.style-card__media--motion {
  background:
    linear-gradient(160deg, rgba(7, 17, 31, 0.3) 0%, rgba(7, 17, 31, 0.55) 100%),
    radial-gradient(ellipse 70% 60% at 50% 80%, #34d399 0%, transparent 55%),
    linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
}

.style-card__body {
  padding: 0.85rem 0.9rem 1rem;
}

.style-card__body h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.style-card__body p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #6b7280;
}

.talent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 168px));
  justify-content: start;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.talent-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  padding: 0.55rem;
  border-radius: 1rem;
  border: 2px solid transparent;
  background: #f6f7f9;
  cursor: pointer;
  text-align: left;
}

.talent-card.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.talent-card__face {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.7rem;
  overflow: hidden;
  background:
    radial-gradient(circle at 30% 20%, #93c5fd 0%, transparent 45%),
    linear-gradient(160deg, #1e3a8a 0%, #0a0a0a 100%);
  background-size: cover;
  background-position: center 20%;
}

.talent-card__face img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.talent-card__face--a,
[data-slot="talent-maya"] {
  background: #1e293b url("./influencers/maya-24/id.png") center 18% / cover no-repeat;
}

.talent-card__face--jen,
[data-slot="talent-jen"] {
  background: #1e293b url("./influencers/jen-25/id.png") center 18% / cover no-repeat;
}

.talent-card__face--clara,
[data-slot="talent-clara"] {
  background: #1e293b url("./influencers/clara-23/id.png") center 18% / cover no-repeat;
}

.talent-card__face--jeny,
[data-slot="talent-jeny"] {
  background: #1e293b url("./influencers/jeny-23/id.png") center 18% / cover no-repeat;
}

.talent-card__face--amara,
[data-slot="talent-amara"] {
  background: #1e293b url("./influencers/amara-24/id.png") center 18% / cover no-repeat;
}

.talent-card__face--hana,
[data-slot="talent-hana"] {
  background: #1e293b url("./influencers/hana-25/id.png") center 18% / cover no-repeat;
}

.talent-card__face--noor,
[data-slot="talent-noor"] {
  background: #1e293b url("./influencers/noor-26/id.png") center 18% / cover no-repeat;
}

.talent-card__face--freya,
[data-slot="talent-freya"] {
  background: #1e293b url("./influencers/freya-24/id.png") center 18% / cover no-repeat;
}

.talent-grid--config {
  margin-bottom: 0;
}

.talent-card__name {
  font-size: 0.9rem;
  font-weight: 700;
}

.talent-card__meta {
  font-size: 0.75rem;
  color: #6b7280;
}

@media (max-width: 960px) {
  .talent-grid,
  .talent-grid--config {
    grid-template-columns: repeat(auto-fill, minmax(128px, 156px));
  }
}

/* Sidebar width:100% MUST stay inside this max-width:720px query.
   Outside it, the sidebar covers the page and clicks die. */
@media (max-width: 720px) {
  .style-grid {
    grid-template-columns: 1fr;
  }

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

  .app.is-sidebar-expanded .sidebar {
    width: 100%;
    align-items: stretch;
    padding: 0.45rem 0.5rem calc(0.45rem + env(safe-area-inset-bottom));
  }

  .app.is-sidebar-expanded .nav-item {
    flex-direction: column;
    gap: 0.28rem;
    padding: 0.35rem 0.5rem;
  }

  .app.is-sidebar-expanded .nav-item__label {
    font-size: 0.62rem;
  }
}

/* ========== CREATE WHITEBOARD CANVAS ========== */
.board-stage {
  position: relative;
  width: 100%;
  height: 100%;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  overflow: hidden;
}

.board-stage[hidden] {
  display: none !important;
}

.board-canvas {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  cursor: grab;
  background-color: #f7f8fa;
  background-image: radial-gradient(#d4d7de 1px, transparent 1px);
  background-size: 22px 22px;
  touch-action: none;
}

.board-canvas.is-panning {
  cursor: grabbing;
}

.board-world {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
}

.ad-paths {
  display: flex;
  flex-direction: column;
  gap: 2.6rem;
  padding: 2.4rem 2rem 8rem;
  min-width: max-content;
}

.ad-path {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ad-path__fork {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.7rem;
}

.ad-path__fork-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ad-arrow {
  display: grid;
  place-items: center;
  width: 2.8rem;
  color: #9aa3b2;
  flex-shrink: 0;
}

.ad-arrow svg {
  width: 2.05rem;
  height: 2.05rem;
}

.ad-node {
  width: 7.4rem;
  flex-shrink: 0;
  padding: 0;
  border: 1px solid #eceef2;
  border-radius: 0.95rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
  text-align: left;
  cursor: grab;
}

.ad-node--click {
  cursor: pointer;
}

.ad-node--click:hover {
  border-color: #dbe3f0;
}

.ad-node__media {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #111827;
  overflow: hidden;
}

.ad-node__media img,
.ad-node__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
}

.ad-node.is-ready .ad-node__media::after,
.ad-node.is-pending .ad-node__media::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: 38%;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.55));
}

.ad-node__gen {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 18%, rgba(96, 165, 250, 0.18), transparent 58%),
    linear-gradient(165deg, #1c2434 0%, #111827 52%, #0b1220 100%);
}

.ad-node__gen-glow {
  position: absolute;
  left: 12%;
  right: 12%;
  top: 22%;
  height: 42%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(147, 197, 253, 0.32), transparent 68%);
  filter: blur(2px);
  animation: ad-gen-pulse 2.6s ease-in-out infinite;
}

.ad-node__gen-shimmer {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 0%,
    transparent 38%,
    rgba(255, 255, 255, 0.09) 50%,
    transparent 62%,
    transparent 100%
  );
  background-size: 220% 100%;
  animation: ad-gen-shimmer 2.1s ease-in-out infinite;
}

.ad-node__gen-bar {
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  bottom: 1.72rem;
  z-index: 1;
  height: 0.16rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.ad-node__gen-bar::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -40%;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-soft), var(--accent));
  animation: ad-gen-bar 1.7s ease-in-out infinite;
}

@keyframes ad-gen-pulse {
  0%,
  100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes ad-gen-shimmer {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -20% 0;
  }
}

@keyframes ad-gen-bar {
  0% {
    left: -42%;
  }
  100% {
    left: 100%;
  }
}

.ad-node--product .ad-node__media {
  background: #fff;
}

.ad-node--product .ad-node__media img,
.ad-node--product .ad-node__media video {
  box-sizing: border-box;
  object-fit: contain;
  object-position: center;
  padding: 0.55rem;
}

.ad-node--product .ad-node__tag {
  color: #374151;
  text-shadow: none;
}

.ad-node__ph {
  width: 100%;
  height: 100%;
  background: #eef0f4;
}

.ad-node__tag {
  position: absolute;
  left: 0.4rem;
  bottom: 0.38rem;
  z-index: 2;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 650;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.ad-node--click .ad-node__media img,
.ad-node--click .ad-node__media video {
  pointer-events: none;
}

.ad-node__play {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
  pointer-events: none;
}

.ad-node__play::before {
  content: "";
  width: 0;
  height: 0;
  margin-left: 0.12rem;
  border-style: solid;
  border-width: 0.55rem 0 0.55rem 0.9rem;
  border-color: transparent transparent transparent #fff;
  filter: drop-shadow(0 1px 10px rgba(0, 0, 0, 0.55));
}

.ad-node--recipe {
  aspect-ratio: 9 / 16;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0.85rem 0.7rem;
}

.ad-node--recipe strong {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  letter-spacing: -0.03em;
}

.ad-node--recipe p {
  margin: 0;
  color: #6b7280;
  font-size: 0.72rem;
  line-height: 1.4;
}

.ad-node--recipe em {
  display: -webkit-box;
  margin-top: 0.4rem;
  color: #374151;
  font-style: normal;
  font-size: 0.72rem;
  line-height: 1.35;
  overflow: hidden;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.ad-node--pack .ad-node__media {
  color: #fff;
}

.ad-node--pack .ad-node__count {
  position: absolute;
  top: 0.45rem;
  right: 0.45rem;
  z-index: 2;
  min-width: 1.35rem;
  padding: 0.08rem 0.35rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-align: center;
}

.ad-node--pack .ad-node__tag {
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.ad-node.is-pending .ad-node__media {
  background: #111827;
}

.ad-node.is-pending .ad-node__play {
  display: none;
}

.ad-node.is-pending .ad-node__tag {
  color: #fff;
}

.ad-node.is-failed .ad-node__media {
  background: #fef2f2;
}

.ad-node.is-failed .ad-node__tag {
  color: #b91c1c;
  text-shadow: none;
}

.board-sheet__card--pack {
  width: min(560px, 100%);
}

.pack-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  overflow: auto;
  min-height: 0;
}

.pack-grid .ad-node {
  width: auto;
}

.ad-preview {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 1.5rem 1rem;
}

.ad-preview[hidden] {
  display: none !important;
}

.ad-preview__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(247, 248, 250, 0.86);
  backdrop-filter: blur(10px);
}

.ad-preview__shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.85rem, 3vw, 1.75rem);
  width: min(920px, 100%);
}

.ad-preview__side {
  appearance: none;
  flex-shrink: 0;
  border: 1px solid rgba(15, 23, 42, 0.08);
  padding: 0.72rem 1.15rem;
  border-radius: 999px;
  background: #fff;
  color: #0a0a0a;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
  transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
}

.ad-preview__side:hover:not(:disabled) {
  background: #fafafa;
  border-color: rgba(15, 23, 42, 0.14);
  transform: translateY(-1px);
}

.ad-preview__side:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.ad-preview__dialog {
  position: relative;
  width: min(320px, calc(100vw - 10.5rem));
  padding: 0;
  border-radius: 1.35rem;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.ad-preview__close {
  position: absolute;
  top: 0.65rem;
  right: 0.65rem;
  z-index: 4;
  appearance: none;
  border: none;
  background: rgba(255, 255, 255, 0.92);
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
  color: #374151;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
}

.ad-preview__close:hover {
  background: #fff;
}

.ad-preview__stage {
  position: relative;
  aspect-ratio: 9 / 16;
  max-height: min(72vh, 640px);
  margin: 0;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #eceef2;
  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.1);
}

.ad-preview__video,
.ad-preview__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #eceef2;
  cursor: pointer;
}

.ad-preview__video[hidden],
.ad-preview__image[hidden],
.ad-preview__play[hidden] {
  display: none !important;
}

.ad-preview__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  display: grid;
  place-items: center;
  width: 3.1rem;
  height: 3.1rem;
  border: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  color: #0a0a0a;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

.ad-preview__play:hover {
  background: #fff;
  transform: translate(-50%, -50%) scale(1.04);
}

.ad-preview__play-icon {
  display: block;
  width: 0;
  height: 0;
  margin-left: 0.14rem;
  border-style: solid;
  border-width: 0.45rem 0 0.45rem 0.72rem;
  border-color: transparent transparent transparent currentColor;
}

.ad-preview.is-playing .ad-preview__play {
  opacity: 0;
  pointer-events: none;
}

.ad-preview.is-playing .ad-preview__stage:hover .ad-preview__play {
  opacity: 1;
  pointer-events: auto;
}

.ad-preview.is-playing .ad-preview__play-icon {
  width: 0.7rem;
  height: 0.75rem;
  margin-left: 0;
  border: 0;
  background:
    linear-gradient(currentColor, currentColor) left / 0.2rem 100% no-repeat,
    linear-gradient(currentColor, currentColor) right / 0.2rem 100% no-repeat;
}

.ad-preview__empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 1rem;
  color: #9ca3af;
  font-size: 0.85rem;
  font-weight: 550;
  text-align: center;
}

.ad-preview__empty[hidden] {
  display: none !important;
}

.ad-preview__caption {
  margin: 0.7rem 0.15rem 0;
  font-size: 0.78rem;
  font-weight: 500;
  color: #9ca3af;
  letter-spacing: -0.01em;
  text-align: left;
}

.ad-preview__hint {
  margin: 0.35rem 0.15rem 0;
  font-size: 0.72rem;
  color: #9ca3af;
}

.ad-preview__hint[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .ad-preview__shell {
    flex-direction: column;
    gap: 0.85rem;
  }

  .ad-preview__dialog {
    width: min(320px, calc(100vw - 2rem));
  }

  .ad-preview__side {
    width: min(320px, calc(100vw - 2rem));
  }
}

.board-cluster {
  padding: 2.5rem 2rem 8rem;
  min-width: max-content;
}

.whiteboard__slots {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  margin-bottom: 1.35rem;
}

.board-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.35rem;
  width: 5.6rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.board-slot__media {
  position: relative;
  display: grid;
  place-items: center;
  width: 5.6rem;
  height: 5.6rem;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #f4f5f7;
  border: 1px solid #eceef2;
}

.board-slot__media img,
.board-slot__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.board-slot__count {
  position: absolute;
  right: 0.28rem;
  bottom: 0.28rem;
  z-index: 1;
  min-width: 1.15rem;
  height: 1.15rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.88);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.15rem;
  text-align: center;
}

.board-slot__plus {
  font-size: 1.35rem;
  font-weight: 400;
  color: #9aa3b2;
  line-height: 1;
}

.board-slot__label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink);
}

.board-slot__hint {
  margin-top: -0.15rem;
  font-size: 0.68rem;
  color: #8b929c;
}

.shot-board {
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.shot-row__head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.55rem;
}

.shot-row__head img {
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  object-fit: cover;
}

.shot-row__head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 650;
}

.shot-row__grid {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
}

.shot-card {
  position: relative;
  display: block;
  flex: 0 0 108px;
  width: 108px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.95rem;
  overflow: hidden;
  background: #f4f5f7;
  cursor: pointer;
  aspect-ratio: 9 / 16;
}

.shot-card.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.shot-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.shot-card__label {
  position: absolute;
  left: 0.45rem;
  bottom: 0.45rem;
  z-index: 1;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.shot-card--prompt {
  display: flex;
  align-items: flex-end;
  background: linear-gradient(165deg, #1e3a8a, #0a0a0a);
}

.shot-card--prompt .shot-card__label {
  position: static;
  padding: 0.55rem;
  text-shadow: none;
}

.shot-card--add {
  display: grid;
  place-items: center;
  flex: 0 0 108px;
  width: 108px;
  aspect-ratio: 9 / 16;
  border: 1.5px dashed #d5d8de;
  background: rgba(255, 255, 255, 0.72);
  color: #6b7280;
  font-size: 0.78rem;
  font-weight: 650;
  text-align: center;
  padding: 0.6rem;
  line-height: 1.3;
}

.shot-card--add .pro-badge {
  display: block;
  margin: 0.25rem auto 0;
}

.board-generate {
  margin-top: 1.05rem;
}

.board-generate:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.board-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2.6rem;
  z-index: 5;
  display: flex;
  justify-content: center;
  pointer-events: none;
}

.board-stage:has(.create-window-layer:not([hidden])) .board-dock {
  opacity: 0;
  pointer-events: none;
}

.board-dock__create {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
  padding: 1.05rem 1.9rem 1.05rem 1.15rem;
  border-radius: 999px;
  background: #111111;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 650;
  letter-spacing: -0.035em;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 18px 44px rgba(15, 23, 42, 0.22);
  transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.board-dock__create:hover {
  background: #1c1c1c;
  transform: translateY(-2px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.14) inset,
    0 22px 50px rgba(15, 23, 42, 0.26);
}

.board-dock__plus {
  display: grid;
  place-items: center;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1;
}

@media (prefers-reduced-motion: reduce) {
  .board-dock__create,
  .board-dock__create:hover {
    transition: none;
    transform: none;
  }

  .ad-node__gen-glow,
  .ad-node__gen-shimmer,
  .ad-node__gen-bar::after {
    animation: none !important;
  }

  .ad-node__gen-glow {
    opacity: 0.7;
    transform: none;
  }

  .ad-node__gen-shimmer {
    background-position: 50% 0;
  }

  .ad-node__gen-bar::after {
    left: 18%;
    width: 36%;
  }
}

.create-window-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  pointer-events: none;
}

.create-window-layer[hidden] {
  display: none;
}

.create-window {
  position: relative;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  width: min(420px, 100%);
  max-height: min(86vh, 760px);
  padding: 1.15rem 1.15rem 1.05rem;
  border-radius: 1.5rem;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.06);
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 28px 64px rgba(15, 23, 42, 0.12);
}

.create-window__body {
  overflow: auto;
  min-height: 0;
  margin: 0 0 0.75rem;
  padding-right: 0.1rem;
}

.create-window__close {
  position: absolute;
  top: 0.55rem;
  right: 0.55rem;
  z-index: 1;
  width: 1.7rem;
  height: 1.7rem;
  border: 0;
  border-radius: 999px;
  background: #f3f4f6;
  color: #6b7280;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
}

.create-window__slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.create-slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.3rem;
  padding: 0;
  text-align: left;
}

.create-slot__media {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 0.85rem;
  overflow: hidden;
  background: #f3f4f6;
}

.create-slot__media img,
.create-slot__media video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.create-slot__plus {
  color: #9aa3b2;
  font-size: 1.2rem;
}

.create-slot__label {
  font-size: 0.72rem;
  font-weight: 600;
  color: #6b7280;
}

.create-window__product {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  margin-bottom: 0.7rem;
  padding: 0.45rem 0.65rem;
  border-radius: 0.8rem;
  border: 1px solid #e8eaef;
  background: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  text-align: left;
}

.create-window__product-thumb {
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 0.4rem;
  overflow: hidden;
  background: #f3f4f6;
  flex-shrink: 0;
}

.create-window__product-thumb img,
.create-window__product-thumb video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.create-window__chevron {
  margin-left: auto;
  color: #9aa3b2;
  font-size: 1.15rem;
}

.create-window__prompt {
  position: relative;
  display: block;
  margin-bottom: 0.65rem;
}

.create-window__prompt textarea {
  width: 100%;
  min-height: 4.4rem;
  resize: none;
  padding: 0.7rem 0.8rem 1.35rem;
  border-radius: 0.9rem;
  border: 1px solid #e8eaef;
  background: #fff;
  font: inherit;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--ink);
}

.create-window__prompt textarea:focus {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 1px;
}

.create-window__count {
  position: absolute;
  right: 0.7rem;
  bottom: 0.45rem;
  font-size: 0.68rem;
  color: #9aa3b2;
}

.create-window__chips {
  display: flex;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.create-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.32rem 0.62rem;
  border-radius: 999px;
  border: 1px solid #e8eaef;
  background: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  color: #4b5563;
}

.create-opts {
  display: grid;
  gap: 0.55rem;
  padding-top: 0.15rem;
}

.create-opt {
  display: grid;
  grid-template-columns: 3.4rem minmax(0, 1fr);
  align-items: center;
  gap: 0.45rem;
}

.create-opt[hidden] {
  display: none !important;
}

.create-opt > span {
  font-size: 0.72rem;
  font-weight: 650;
  color: #6b7280;
}

.create-opt--type {
  grid-template-columns: 1fr;
  align-items: start;
  gap: 0.4rem;
}

.create-opt--type > span {
  font-size: 0.82rem;
  font-weight: 700;
  color: #374151;
}

.create-opt--type .create-pill {
  padding: 0.46rem 0.8rem;
  font-size: 0.82rem;
}

.create-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.28rem;
}

.create-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.22rem;
  padding: 0.28rem 0.52rem;
  border-radius: 999px;
  border: 1px solid #e8eaef;
  background: #f7f8fa;
  color: #4b5563;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.2;
}

.create-pill.is-on {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.create-pill[data-pro] {
  cursor: not-allowed;
  opacity: 0.72;
}

html.is-pro .create-pill[data-pro],
html.is-pro .seg__btn[data-pro],
html.is-pro .home-tool[data-pro] {
  cursor: pointer;
  opacity: 1;
}

html.is-pro .create-pill[data-pro] .pro-badge,
html.is-pro .seg__btn[data-pro] .pro-badge,
html.is-pro .home-tool[data-pro] .pro-badge {
  display: none;
}

.home-tool[data-pro].is-pro-locked {
  cursor: not-allowed;
  opacity: 0.72;
}

.home-tool .pro-badge {
  margin-left: 0.25rem;
  vertical-align: middle;
}

.create-pill .pro-badge {
  padding: 0.02rem 0.26rem;
  font-size: 0.5rem;
}

.create-pill.is-on .pro-badge {
  background: rgba(255, 255, 255, 0.18);
}

.create-opt--say {
  align-items: stretch;
}

.create-say {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-width: 0;
}

.create-say__input {
  flex: 1;
  min-width: 0;
  height: 2.15rem;
  padding: 0 0.7rem;
  border-radius: 0.7rem;
  border: 1px solid #e8eaef;
  background: #fff;
  font: inherit;
  font-size: 0.8rem;
  color: var(--ink);
}

.create-say__input:focus {
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 1px;
}

.create-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 650;
  color: #6b7280;
  cursor: pointer;
  user-select: none;
}

.create-switch input {
  width: 0.95rem;
  height: 0.95rem;
  accent-color: var(--accent);
}

.create-window__go {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  flex-shrink: 0;
  width: 100%;
  padding: 0.82rem 1rem;
  border-radius: 999px;
  background: #111111;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 650;
}

.create-window__go:hover {
  filter: brightness(1.08);
}

.create-window__go:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: none;
}

.create-window__cost {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  font-size: 0.82rem;
  opacity: 0.88;
}

.pro-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.08rem 0.38rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.board-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.25rem;
  background: rgba(15, 23, 42, 0.38);
}

.board-sheet[hidden] {
  display: none;
}

.board-sheet__card {
  width: min(480px, 100%);
  padding: 1.25rem 1.2rem 1.15rem;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.board-sheet--float {
  background: transparent;
  pointer-events: none;
  padding: 1.25rem 1.25rem 5.5rem;
  align-items: center;
}

.board-sheet--float .board-sheet__card {
  pointer-events: auto;
  width: min(520px, 100%);
  max-height: min(84vh, 740px);
  display: flex;
  flex-direction: column;
  padding: 1.15rem 1.15rem 1.05rem;
}

.board-sheet__scroll {
  overflow: auto;
  min-height: 0;
  margin: 0 0 0.95rem;
  padding-right: 0.2rem;
}

.board-sheet__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.board-sheet__head h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}

.board-sheet__close {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  border: 0;
  background: #f3f4f6;
  font-size: 1.2rem;
  line-height: 1;
  color: #6b7280;
  cursor: pointer;
}

.board-sheet__lead {
  margin: 0 0 0.85rem;
  color: #6b7280;
  font-size: 0.88rem;
  line-height: 1.45;
}

.ref-poses {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0.45rem 0 1.05rem;
}

.ref-poses__empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 0.7rem 0.4rem;
  color: #8b929c;
  font-size: 0.8rem;
  text-align: center;
}

.ref-pose {
  position: relative;
  display: block;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 0.7rem;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  background: #111;
  cursor: pointer;
}

.ref-pose img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 16%;
}

.ref-pose span {
  position: absolute;
  left: 0.4rem;
  bottom: 0.38rem;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 650;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.ref-pose.is-on {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.16);
}

.ref-new {
  padding-top: 0.15rem;
}

.ref-new .field__label {
  margin-bottom: 0.45rem;
}

.ref-new__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  align-items: stretch;
}

.ref-new .field {
  margin: 0;
}

.ref-new__prompt {
  display: flex;
}

.ref-new__prompt,
.ref-new .board-upload {
  min-height: 6.4rem;
}

.ref-new .field__input--area {
  height: 100%;
  min-height: 6.4rem;
  resize: none;
  font-size: 0.86rem;
  line-height: 1.4;
}

.ref-new .board-upload {
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 0.8rem 0.85rem;
}

.board-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border-radius: 1rem;
  border: 1px dashed #d5d8de;
  background: #fafbfc;
  cursor: pointer;
  text-align: left;
}

.board-upload strong {
  display: block;
  font-size: 0.9rem;
}

.board-upload small {
  color: #8b929c;
}

.board-upload__icon {
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 0.7rem;
  background: #eef2ff;
  color: var(--accent);
}

.models-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 1.35rem;
  background: rgba(15, 23, 42, 0.38);
  overflow: auto;
}

.models-overlay[hidden] {
  display: none;
}

.models-overlay__window {
  width: min(560px, 100%);
  max-height: min(82vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 1.25rem;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

.models-overlay__bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.05rem 0.8rem;
  background: #fff;
  border-bottom: 1px solid #eef0f3;
}

.models-overlay__bar h2 {
  margin: 0 0 0.15rem;
  font-size: 1.08rem;
  letter-spacing: -0.03em;
}

.models-overlay__bar p {
  margin: 0;
  color: #6b7280;
  font-size: 0.8rem;
}

.models-overlay__actions {
  display: flex;
  gap: 0.45rem;
  flex-shrink: 0;
}

.models-masonry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.85rem 1rem 1.05rem;
  overflow: auto;
}

.model-pin {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0.7rem;
  overflow: hidden;
  background: #111;
  cursor: pointer;
}

.model-pin img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  object-position: center 14%;
}

.model-pin__name {
  position: absolute;
  left: 0.45rem;
  bottom: 0.4rem;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 650;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.model-pin.is-selected {
  box-shadow: 0 0 0 2.5px var(--accent);
}

.model-pin.is-selected::after {
  content: "";
  position: absolute;
  top: 0.35rem;
  right: 0.35rem;
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round' d='M2.5 6.2l2.3 2.3 4.7-5'/%3E%3C/svg%3E") center / 0.62rem no-repeat;
}

@media (max-width: 640px) {
  .models-masonry {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0.75rem 0.75rem 1rem;
  }

  .models-overlay__bar {
    flex-direction: column;
    align-items: stretch;
    padding: 0.85rem 0.85rem 0.7rem;
  }
}
