:root {
  --ink: #0b0b0e;
  --ink-soft: #121216;
  --surface: #18181d;
  --surface-2: #202026;
  --surface-3: #29292f;
  --line: rgba(245, 240, 240, 0.11);
  --line-strong: rgba(245, 240, 240, 0.2);
  --ivory: #f5f0f0;
  --ivory-soft: #c9c2c4;
  --muted: #a09a9e;
  --accent: #ff626b;
  --accent-soft: #dc263b;
  --accent-solid: #bd142d;
  --danger: #ff786e;
  --warning: #efbb56;
  --info: #8ab6ff;
  --sidebar: 248px;
  --radius-xl: 30px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: #484149 var(--ink);
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 75% 0%, rgba(190, 14, 38, 0.15), transparent 28rem),
    var(--ink);
  color: var(--ivory);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

img,
video {
  display: block;
  max-width: 100%;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

::selection {
  background: var(--accent);
  color: var(--ink);
}

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

.is-hidden {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 300;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 750;
}

.skip-link:focus {
  transform: translateY(0);
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 50;
  inset: 0 auto 0 0;
  display: flex;
  width: var(--sidebar);
  padding: 30px 22px 24px;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: rgba(11, 11, 14, 0.94);
  backdrop-filter: blur(24px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0 7px;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(235, 35, 58, 0.32);
  border-radius: 13px;
  background: var(--accent-solid);
  color: #fff7f7;
  box-shadow: 0 0 30px rgba(235, 35, 58, 0.12);
}

.brand-mark svg {
  width: 28px;
  height: 28px;
  stroke: none;
}

.brand-mark.small {
  width: 29px;
  height: 29px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.05;
}

.brand-copy strong {
  font-size: 16px;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.side-nav {
  display: grid;
  gap: 6px;
  margin-top: 54px;
}

.nav-link {
  display: flex;
  min-height: 46px;
  align-items: center;
  gap: 13px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  transition: 160ms ease;
}

.nav-link svg {
  width: 18px;
  height: 18px;
}

.nav-link:hover,
.nav-link.is-active {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ivory);
}

.nav-link.is-active::after {
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
  content: "";
}

.sidebar-spacer {
  flex: 1;
}

.quota-note {
  position: relative;
  overflow: hidden;
  padding: 17px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(235, 35, 58, 0.07), rgba(255, 255, 255, 0.02));
}

.quota-note::after {
  position: absolute;
  width: 80px;
  height: 80px;
  right: -42px;
  bottom: -48px;
  border: 1px solid rgba(235, 35, 58, 0.16);
  border-radius: 50%;
  content: "";
}

.quota-note p {
  margin: 0;
}

.quota-note p + p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.quota-note strong {
  font-size: 12px;
}

.quota-icon {
  float: right;
  color: var(--accent);
}

.studio-signature {
  display: flex;
  justify-content: space-between;
  margin-top: 22px;
  padding: 0 4px;
  color: #827a80;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.app-column {
  min-height: 100vh;
  margin-left: var(--sidebar);
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  height: 76px;
  align-items: center;
  gap: 12px;
  padding: 0 clamp(24px, 4.2vw, 70px);
  border-bottom: 1px solid transparent;
  background: linear-gradient(to bottom, rgba(11, 11, 14, 0.96), rgba(11, 11, 14, 0.78), transparent);
  backdrop-filter: blur(13px);
}

.topbar-spacer {
  flex: 1;
}

.mobile-menu,
.mobile-brand {
  display: none;
}

.system-pill {
  display: inline-flex;
  height: 33px;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--ivory-soft);
  font-size: 11px;
  font-weight: 600;
}

.system-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(235, 35, 58, 0.7);
}

.system-dot.is-muted {
  background: var(--muted);
  box-shadow: none;
}

.system-dot.is-error {
  background: var(--danger);
  box-shadow: 0 0 8px rgba(255, 120, 110, 0.5);
}

.button,
.icon-button,
.avatar-button,
.back-link,
.modal-close {
  border: 0;
  cursor: pointer;
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 17px;
  border-radius: 11px;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.01em;
  transition: transform 150ms ease, background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.button svg {
  width: 18px;
  height: 18px;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.button-primary {
  background: var(--accent-solid);
  color: #fff7f7;
  box-shadow: 0 10px 30px rgba(235, 35, 58, 0.12);
}

.button-primary:hover:not(:disabled) {
  background: #d51d35;
}

.button-secondary,
.button-quiet {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--ivory);
}

.button-secondary:hover:not(:disabled),
.button-quiet:hover:not(:disabled) {
  border-color: rgba(235, 35, 58, 0.35);
  background: rgba(235, 35, 58, 0.07);
}

.button-quiet {
  min-height: 34px;
  padding: 0 13px;
  font-size: 11px;
}

.button-danger {
  border: 1px solid rgba(255, 120, 110, 0.28);
  background: rgba(255, 120, 110, 0.08);
  color: #ff9d96;
}

.button.compact {
  min-height: 36px;
  padding: 0 13px;
}

.button.full-width {
  width: 100%;
  margin-top: 18px;
}

.avatar-button {
  display: grid;
  width: 35px;
  height: 35px;
  place-items: center;
  border: 1px solid rgba(235, 35, 58, 0.4);
  border-radius: 50%;
  background: #32181e;
  color: var(--accent);
  font-size: 10px;
  font-weight: 850;
}

main {
  min-height: calc(100vh - 150px);
}

.hero-section {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  padding: clamp(76px, 10vw, 136px) clamp(24px, 7vw, 116px) 80px;
  border-bottom: 1px solid var(--line);
}

.hero-section::before {
  position: absolute;
  top: 10%;
  right: 7%;
  width: min(33vw, 440px);
  aspect-ratio: 1;
  border-radius: 44% 56% 63% 37% / 45% 31% 69% 55%;
  background: linear-gradient(145deg, rgba(235, 35, 58, 0.13), rgba(235, 35, 58, 0.01) 72%);
  filter: blur(1px);
  content: "";
  transform: rotate(18deg);
}

.hero-orbit {
  position: absolute;
  right: 11%;
  top: 19%;
  width: min(27vw, 360px);
  aspect-ratio: 1;
  border: 1px solid rgba(235, 35, 58, 0.14);
  border-radius: 50%;
}

.hero-orbit::after {
  position: absolute;
  width: 7px;
  height: 7px;
  top: 15%;
  left: 15%;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 20px var(--accent);
  content: "";
}

.hero-orbit-two {
  width: min(18vw, 235px);
  right: 16%;
  top: 28%;
  border-style: dashed;
  opacity: 0.65;
}

.hero-orbit-two::after {
  top: auto;
  left: auto;
  right: 3%;
  bottom: 30%;
  width: 4px;
  height: 4px;
}

.eyebrow,
.section-kicker {
  color: var(--muted);
  font-size: 10px;
  font-weight: 780;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.eyebrow span {
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero-section h1 {
  position: relative;
  z-index: 1;
  max-width: 810px;
  margin: 23px 0 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 6.2vw, 92px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.94;
}

.hero-section h1 em {
  color: var(--accent);
  font-weight: 400;
}

.hero-lede {
  position: relative;
  z-index: 1;
  max-width: 565px;
  margin: 29px 0 0;
  color: var(--ivory-soft);
  font-size: 16px;
  line-height: 1.7;
}

.hero-actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 27px;
  margin-top: 34px;
}

.text-link {
  color: var(--ivory-soft);
  font-size: 12px;
  font-weight: 700;
}

.text-link span {
  margin-left: 6px;
  color: var(--accent);
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 28px;
  margin-top: 50px;
  color: #898087;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-meta span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.hero-meta i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
}

.projects-section {
  padding: 72px clamp(24px, 5.3vw, 86px) 96px;
}

.section-heading,
.panel-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.section-kicker {
  margin: 0 0 9px;
}

.section-heading h2,
.panel-heading h2,
.story-section h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 16px;
}

.result-count {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.state-region:empty {
  display: none;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 35px;
}

.project-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(255,255,255,.014));
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(235, 35, 58, 0.22);
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.26);
}

.project-link {
  display: block;
}

.project-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background:
    linear-gradient(130deg, transparent 10%, rgba(235, 35, 58, 0.1)),
    radial-gradient(circle at 73% 25%, rgba(235, 35, 58, 0.2), transparent 25%),
    #26191f;
}

.project-media::before,
.project-media::after {
  position: absolute;
  border: 1px solid rgba(235, 35, 58, 0.18);
  border-radius: 50%;
  content: "";
}

.project-media::before {
  width: 150px;
  height: 150px;
  right: -25px;
  top: -54px;
}

.project-media::after {
  width: 90px;
  height: 90px;
  right: 19px;
  top: -24px;
}

.project-media img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 450ms ease;
}

.project-card:hover .project-media img {
  transform: scale(1.025);
}

.card-monogram {
  position: absolute;
  z-index: 0;
  left: 22px;
  bottom: 5px;
  color: rgba(245, 240, 240, 0.1);
  font-family: Georgia, serif;
  font-size: 76px;
  line-height: 1;
}

.card-status {
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 14px;
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 999px;
  background: rgba(10, 10, 13, 0.72);
  color: var(--ivory-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  backdrop-filter: blur(10px);
}

.status-badge::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-badge.status-completed {
  color: var(--accent);
}

.status-badge.status-running {
  color: var(--info);
}

.status-badge.status-failed,
.status-badge.status-cancelled {
  color: var(--danger);
}

.status-badge.status-waiting_quota {
  color: var(--warning);
}

.card-body {
  padding: 20px 20px 18px;
}

.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card-title-row h3 {
  overflow: hidden;
  margin: 0;
  font-size: 15px;
  font-weight: 680;
  letter-spacing: -0.015em;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-arrow {
  flex: 0 0 auto;
  color: var(--accent);
  transition: transform 180ms ease;
}

.project-card:hover .card-arrow {
  transform: translate(2px, -2px);
}

.card-topic {
  display: -webkit-box;
  min-height: 38px;
  overflow: hidden;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.card-meta,
.tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-meta {
  justify-content: space-between;
  margin-top: 17px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.tag {
  display: inline-flex;
  height: 22px;
  align-items: center;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ivory-soft);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-date {
  color: #8c848a;
  font-size: 9px;
}

.card-progress {
  height: 2px;
  background: rgba(255,255,255,.06);
}

.card-progress span,
.progress-track span,
.mini-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width 500ms ease;
}

.state-card {
  display: grid;
  min-height: 290px;
  margin-top: 35px;
  padding: 32px;
  place-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.016);
  text-align: center;
}

.state-card > div {
  max-width: 390px;
}

.state-icon {
  display: grid;
  width: 56px;
  height: 56px;
  margin: 0 auto 19px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(235, 35, 58, 0.05);
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 23px;
}

.state-card h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 24px;
  font-weight: 400;
}

.state-card p {
  margin: 9px 0 20px;
  color: var(--muted);
  font-size: 12px;
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-top: 35px;
}

.skeleton-card {
  height: 325px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(100deg, rgba(255,255,255,.02) 20%, rgba(255,255,255,.055) 35%, rgba(255,255,255,.02) 50%);
  background-size: 200% 100%;
  animation: shimmer 1.4s linear infinite;
}

@keyframes shimmer {
  to { background-position-x: -200%; }
}

.principles-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.principles-strip p {
  margin: 0;
  padding: 25px clamp(20px, 3vw, 44px);
  color: var(--muted);
  font-family: Georgia, serif;
  font-size: 13px;
  font-style: italic;
}

.principles-strip p + p {
  border-left: 1px solid var(--line);
}

.principles-strip span {
  margin-right: 12px;
  color: var(--accent);
  font-family: inherit;
  font-size: 9px;
  font-style: normal;
}

/* Detail */
.detail-view {
  padding: 28px clamp(24px, 4.5vw, 74px) 100px;
}

.detail-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 0;
  background: none;
  color: var(--ivory-soft);
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
}

.back-link svg {
  width: 14px;
  height: 14px;
}

.detail-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-top: 33px;
  padding-bottom: 34px;
  border-bottom: 1px solid var(--line);
}

.detail-title-group h1 {
  max-width: 820px;
  margin: 14px 0 0;
  font-family: Georgia, serif;
  font-size: clamp(38px, 5vw, 64px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1;
}

.detail-title-group > p {
  max-width: 720px;
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.detail-header-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(270px, 335px) minmax(0, 1fr);
  gap: clamp(34px, 5vw, 76px);
  margin-top: 42px;
  align-items: start;
}

.preview-column {
  position: sticky;
  top: 95px;
  min-width: 0;
}

.phone-stage {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 35px;
  background: linear-gradient(150deg, #34252d, #151419 60%);
  box-shadow: var(--shadow);
}

.phone-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 24px;
  background: #08080b;
}

.phone-speaker {
  position: absolute;
  z-index: 5;
  width: 48px;
  height: 4px;
  top: 9px;
  left: 50%;
  border-radius: 99px;
  background: rgba(255,255,255,.3);
  transform: translateX(-50%);
}

.video-player,
.video-placeholder,
.poster-image {
  width: 100%;
  height: 100%;
}

.video-player,
.poster-image {
  object-fit: cover;
}

.video-placeholder {
  position: relative;
  display: grid;
  overflow: hidden;
  place-items: center;
  background:
    linear-gradient(160deg, transparent 10%, rgba(235,35,58,.09)),
    #181216;
}

.poster-image {
  position: absolute;
  inset: 0;
  opacity: .42;
}

.poster-glow {
  position: absolute;
  width: 210px;
  height: 210px;
  right: -90px;
  top: 12%;
  border: 1px solid rgba(235,35,58,.3);
  border-radius: 50%;
  box-shadow: 0 0 80px rgba(235,35,58,.07) inset;
}

.poster-glow::after {
  position: absolute;
  inset: 35px;
  border: 1px dashed rgba(235,35,58,.18);
  border-radius: inherit;
  content: "";
}

.placeholder-content {
  position: relative;
  z-index: 2;
  width: 72%;
  text-align: center;
}

.placeholder-mark {
  display: grid;
  width: 48px;
  height: 48px;
  margin: auto;
  place-items: center;
  border: 1px solid rgba(235,35,58,.45);
  border-radius: 15px;
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 22px;
}

.placeholder-content p {
  margin: 15px 0 13px;
  color: var(--ivory-soft);
  font-size: 11px;
}

.mini-progress {
  height: 2px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.12);
}

.phone-overlay-top {
  position: absolute;
  z-index: 4;
  top: 25px;
  left: 14px;
}

.phone-overlay-bottom {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 16px;
  left: 16px;
  color: white;
  font-family: Georgia, serif;
  font-size: 18px;
  line-height: 1.15;
  text-shadow: 0 2px 12px rgba(0,0,0,.8);
}

.language-switch {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 4px;
  margin-top: 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}

.language-switch button {
  height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
}

.language-switch button.is-active {
  background: var(--ivory);
  color: var(--ink);
}

.language-switch button:only-child {
  grid-column: 1 / -1;
}

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

.preview-actions .button {
  width: 100%;
}

.export-note,
.unofficial-note {
  color: #8c848a;
  font-size: 9px;
  line-height: 1.5;
  text-align: center;
}

.export-note {
  margin: 11px 0 0;
}

.platform-chips {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 13px;
  flex-wrap: wrap;
}

.platform-chips span {
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 700;
}

.unofficial-note {
  margin: 12px 0 0;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.production-column {
  display: grid;
  min-width: 0;
  gap: 52px;
}

.panel {
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.022);
}

.panel-heading {
  align-items: center;
}

.panel-heading h2 {
  font-size: 26px;
}

.panel-heading.simple {
  align-items: flex-start;
}

.progress-number {
  color: var(--accent);
  font-family: Georgia, serif;
  font-size: 27px;
  font-weight: 400;
}

.progress-track {
  height: 3px;
  margin-top: 23px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(255,255,255,.075);
}

.pipeline-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.stage-item {
  min-width: 0;
}

.stage-marker {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 9px;
  font-weight: 800;
}

.stage-item.is-completed .stage-marker {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.stage-item.is-running .stage-marker {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(235,35,58,.07);
}

.stage-label {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-item.is-completed .stage-label,
.stage-item.is-running .stage-label {
  color: var(--ivory-soft);
}

.job-error,
.form-error {
  padding: 12px 14px;
  border: 1px solid rgba(255,120,110,.22);
  border-radius: 9px;
  background: rgba(255,120,110,.07);
  color: #ffaaa3;
  font-size: 11px;
}

.job-error {
  margin-top: 20px;
}

.story-section {
  min-width: 0;
}

.inset-heading {
  margin-bottom: 25px;
}

.storyboard-summary {
  margin-bottom: 22px;
  padding: 20px 22px;
  border-left: 2px solid var(--accent);
  background: rgba(235,35,58,.035);
}

.storyboard-summary h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 22px;
  font-weight: 400;
}

.storyboard-summary p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

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

.scene-card {
  overflow: hidden;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,.018);
}

.scene-image-wrap {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(circle at 80% 20%, rgba(235,35,58,.12), transparent 25%),
    #23181f;
}

.scene-image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scene-image-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(245,240,240,.13);
  font-family: Georgia, serif;
  font-size: 38px;
}

.scene-number {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 10px;
  padding: 4px 7px;
  border-radius: 5px;
  background: rgba(10,10,13,.73);
  color: var(--accent);
  font-size: 8px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.scene-body {
  padding: 17px;
}

.scene-title-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.scene-title-row h3 {
  margin: 0;
  font-size: 13px;
}

.scene-accent {
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 50%;
  background: var(--accent);
}

.scene-copy {
  margin: 10px 0 0;
  padding-left: 12px;
  border-left: 1px solid var(--line-strong);
  color: var(--ivory-soft);
  font-family: Georgia, serif;
  font-size: 12px;
  font-style: italic;
  line-height: 1.55;
}

.scene-details {
  display: grid;
  gap: 6px;
  margin-top: 13px;
}

.scene-details p {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.45;
}

.scene-details strong {
  color: #b5abb2;
  font-size: 8px;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.inline-state {
  color: var(--muted);
  font-size: 12px;
}

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

.session-list,
.event-list {
  display: grid;
  gap: 0;
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
}

.session-item,
.event-item {
  min-width: 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.session-main,
.event-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.session-stage,
.event-stage {
  color: var(--ivory-soft);
  font-size: 10px;
  font-weight: 730;
  text-transform: capitalize;
}

.session-status {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.session-id {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: #898087;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.event-list {
  max-height: 320px;
  overflow: auto;
  padding-right: 5px;
}

.event-head time {
  color: #857b83;
  font-size: 8px;
}

.event-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.event-kind-error .event-stage {
  color: var(--danger);
}

.event-kind-success .event-stage {
  color: var(--accent);
}

.live-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.live-indicator i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.live-indicator.is-off i {
  background: var(--muted);
  box-shadow: none;
}

.detail-loading .state-card {
  margin-top: 70px;
}

/* Modals */
.modal-layer {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  overflow-y: auto;
  padding: 30px 18px;
  place-items: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 8, 0.74);
  backdrop-filter: blur(12px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 690px);
  padding: clamp(26px, 4vw, 46px);
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background: #1b181e;
  box-shadow: var(--shadow);
}

.modal-small {
  width: min(100%, 450px);
}

.modal-close {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255,255,255,.025);
  color: var(--muted);
}

.modal-close svg {
  width: 15px;
  height: 15px;
}

.modal-intro h2 {
  margin: 8px 42px 0 0;
  font-family: Georgia, serif;
  font-size: clamp(30px, 4vw, 43px);
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1.05;
}

.modal-intro > p:last-child {
  max-width: 530px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.modal-card form {
  margin-top: 27px;
}

.field-label,
fieldset legend {
  display: block;
  margin-bottom: 9px;
  color: var(--ivory-soft);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.textarea-wrap {
  position: relative;
}

textarea,
.text-input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  outline: none;
  background: #141217;
  color: var(--ivory);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

textarea {
  min-height: 142px;
  padding: 15px 16px 31px;
  resize: vertical;
  font-size: 13px;
  line-height: 1.6;
}

.text-input {
  height: 48px;
  padding: 0 14px;
}

textarea:focus,
.text-input:focus {
  border-color: rgba(235,35,58,.55);
  box-shadow: 0 0 0 3px rgba(235,35,58,.06);
}

textarea::placeholder {
  color: #887b85;
}

.char-count {
  position: absolute;
  right: 12px;
  bottom: 9px;
  color: #8d7f89;
  font-size: 9px;
}

.field-hint {
  margin: 6px 0 0;
  color: #95878f;
  font-size: 9px;
}

fieldset {
  min-width: 0;
  margin: 22px 0 0;
  padding: 0;
  border: 0;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.choice-card {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 64px;
  align-items: center;
  gap: 11px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.018);
  cursor: pointer;
}

.choice-card:has(input:checked) {
  border-color: rgba(235,35,58,.35);
  background: rgba(235,35,58,.05);
}

.choice-card input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.choice-card span {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
}

.choice-card strong {
  font-size: 11px;
}

.choice-card small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.choice-card i {
  color: var(--accent);
  font-size: 9px;
  font-style: normal;
  font-weight: 800;
}

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

.duration-choices label {
  cursor: pointer;
}

.duration-choices input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.duration-choices span {
  display: grid;
  height: 41px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
}

.duration-choices input:checked + span {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--ink);
}

.duration-choices input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.form-error {
  margin-top: 17px;
}

.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 25px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.modal-actions p {
  margin: 0;
  color: #8f828a;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.popover {
  position: fixed;
  z-index: 90;
  top: 66px;
  right: clamp(24px, 4.2vw, 70px);
  width: 210px;
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: #241d24;
  box-shadow: 0 16px 50px rgba(0,0,0,.38);
}

.popover p {
  display: flex;
  margin: 0;
  flex-direction: column;
  font-size: 11px;
}

.popover p span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.popover button {
  width: 100%;
  margin-top: 12px;
  padding: 9px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  color: var(--danger);
  cursor: pointer;
  font-size: 10px;
  text-align: left;
}

.toast-region {
  position: fixed;
  z-index: 200;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: min(350px, calc(100vw - 40px));
  gap: 8px;
}

.toast {
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #2a2129;
  box-shadow: 0 15px 40px rgba(0,0,0,.35);
  color: var(--ivory-soft);
  font-size: 11px;
  animation: toast-in 200ms ease-out;
}

.toast.is-error {
  border-color: rgba(255,120,110,.28);
  color: #ffaaa3;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.site-footer {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 clamp(24px, 5.3vw, 86px);
  color: #867880;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-footer p {
  margin: 0;
}

.site-footer span {
  margin: 0 5px;
  color: var(--accent);
}

@media (max-width: 1100px) {
  :root { --sidebar: 84px; }

  .sidebar { padding-inline: 13px; align-items: center; }
  .brand { padding: 0; }
  .brand-copy,
  .nav-link span,
  .quota-note,
  .studio-signature { display: none; }
  .side-nav { width: 100%; }
  .nav-link { justify-content: center; padding: 0; }
  .nav-link.is-active::after { position: absolute; right: 9px; }
  .project-grid,
  .skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-layout { grid-template-columns: 285px minmax(0, 1fr); gap: 32px; }
  .storyboard-grid,
  .lower-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  :root { --sidebar: 250px; }

  .sidebar {
    z-index: 80;
    width: var(--sidebar);
    align-items: stretch;
    padding: 24px 18px;
    transform: translateX(-105%);
    transition: transform 200ms ease;
  }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar .brand { padding: 0 7px; }
  .sidebar .brand-copy,
  .sidebar .nav-link span,
  .sidebar .quota-note,
  .sidebar .studio-signature { display: flex; }
  .sidebar .quota-note { display: block; }
  .sidebar .nav-link { justify-content: flex-start; padding: 0 13px; }
  .sidebar .nav-link.is-active::after { position: static; right: auto; }
  .app-column { margin-left: 0; }
  .topbar { height: 64px; padding: 0 17px; background: rgba(11,11,14,.9); border-bottom-color: var(--line); }
  .mobile-menu { display: grid; width: 36px; height: 36px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: transparent; }
  .mobile-menu svg { width: 18px; height: 18px; }
  .mobile-brand { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; }
  .system-pill { width: 33px; padding: 0; justify-content: center; }
  .system-pill span:last-child { display: none; }
  .button-quiet { padding-inline: 10px; }
  .hero-section { min-height: 540px; padding-top: 82px; }
  .hero-section::before { width: 280px; right: -120px; top: 12%; }
  .hero-orbit { width: 220px; right: -90px; top: 23%; }
  .hero-orbit-two { width: 150px; right: -50px; top: 31%; }
  .hero-section h1 { max-width: 560px; font-size: clamp(43px, 13vw, 68px); }
  .hero-lede { max-width: 480px; font-size: 14px; }
  .hero-meta { gap: 13px; flex-wrap: wrap; }
  .projects-section { padding-block: 58px 70px; }
  .project-grid,
  .skeleton-grid { grid-template-columns: 1fr; }
  .principles-strip { grid-template-columns: 1fr; }
  .principles-strip p + p { border-top: 1px solid var(--line); border-left: 0; }
  .detail-view { padding-top: 22px; }
  .detail-header { align-items: flex-start; flex-direction: column; }
  .detail-layout { grid-template-columns: 1fr; }
  .preview-column { position: static; width: min(100%, 310px); margin: 0 auto; }
  .production-column { gap: 40px; }
  .pipeline-stages { grid-template-columns: 1fr; gap: 0; }
  .stage-item { display: flex; min-height: 39px; align-items: center; gap: 10px; border-left: 1px solid var(--line); padding-left: 12px; }
  .stage-item:last-child { border-left-color: transparent; }
  .stage-label { margin: 0; }
  .modal-layer { place-items: start center; }
  .modal-actions { align-items: stretch; flex-direction: column; }
  .modal-actions p { text-align: center; }
  .site-footer { align-items: flex-start; flex-direction: column; padding-block: 24px; }
  .mobile-scrim { position: fixed; z-index: 70; inset: 0; display: block; background: rgba(0,0,0,.6); }
}

@media (max-width: 480px) {
  .mobile-brand > span:last-child { display: none; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .hero-meta { display: grid; gap: 8px; }
  .section-heading { align-items: flex-start; }
  .section-tools .result-count { display: none; }
  .card-body { padding-inline: 17px; }
  .panel { padding: 20px; }
  .choice-grid { grid-template-columns: 1fr; }
  .modal-card { border-radius: 19px; }
  .duration-choices { gap: 5px; }
  .detail-header-actions { width: 100%; }
  .detail-header-actions .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Export bundle and optional production notes */
.export-links{display:flex;gap:16px;justify-content:center;flex-wrap:wrap;margin-top:12px;font-size:12px}.export-links a{color:var(--text-muted,#bdb1b9);text-decoration:underline;text-underline-offset:4px}.export-meta{text-align:center;font-size:11px;color:#aaa0a7;margin:12px 0}.scene-details summary{cursor:pointer;color:#baa5b2;font-size:11px;margin:8px 0}.scene-details[open] summary{margin-bottom:14px}
