@font-face {
  font-family: 'Michroma';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/studio-console/assets/fonts/michroma-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/studio-console/assets/fonts/poppins-latin-400-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/studio-console/assets/fonts/poppins-latin-500-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/studio-console/assets/fonts/poppins-latin-600-normal.woff2') format('woff2');
}

:root {
  --paper: #f5f4f3;
  --paper-soft: #ebeae7;
  --ink: #0d1a12;
  --studio-surface: #ffffff;
  --studio-surface-muted: #f7f7f5;
  --studio-surface-soft: #f2f1ef;
  --studio-border: rgba(13, 26, 18, 0.08);
  --studio-border-strong: rgba(13, 26, 18, 0.16);
  --studio-ink: #0d1a12;
  --studio-ink-2: rgba(13, 26, 18, 0.74);
  --studio-muted: rgba(13, 26, 18, 0.56);
  --studio-primary: #5fefaa;
  --studio-primary-hover: #4de59b;
  --studio-lime: #ccfd99;
  --studio-lime-ring: #b5f36c;
  --studio-emerald: #00d877;
  --studio-green: #007b44;
  --studio-green-bg: #effcf4;
  --studio-green-border: rgba(0, 123, 68, 0.22);
  --studio-ribbon-bg: #14271f;
  --studio-ribbon-ink: rgba(255, 255, 255, 0.92);
  --studio-ribbon-dot: #b3fa8e;
  --studio-warn-ink: #92400e;
  --studio-warn-bg: #fffbeb;
  --studio-warn-border: rgba(180, 83, 9, 0.22);
  --studio-danger-ink: #b91c1c;
  --studio-danger-bg: #fef2f2;
  --studio-danger-border: rgba(185, 28, 28, 0.22);
  --studio-info-ink: #1d4ed8;
  --studio-info-bg: #eff6ff;
  --studio-info-border: rgba(29, 78, 216, 0.2);
  --studio-neutral-ink: #3f4b43;
  --studio-neutral-bg: #f1f2f0;
  --studio-neutral-border: rgba(13, 26, 18, 0.11);
  --studio-focus-ring: 0 0 0 4px rgba(0, 216, 119, 0.16);
  --studio-shadow-sm: 0 1px 2px rgba(13, 26, 18, 0.04);
  --studio-shadow: 0 10px 30px rgba(13, 26, 18, 0.05);
  --studio-shadow-lg: 0 24px 64px rgba(13, 26, 18, 0.14);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --display: 'Michroma', 'Helvetica Neue', Arial, sans-serif;
  --sans: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SFMono-Regular', Menlo, Monaco, Consolas, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.22, 0.61, 0.36, 1);
  --motion-fast: 160ms;
  --motion-base: 260ms;
  --topbar-height: 60px;
  --ribbon-height: 36px;
  --sidebar-width: 248px;
}

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

html {
  background: var(--paper);
  color: var(--studio-ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--studio-ink);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--studio-green);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: none;
  box-shadow: var(--studio-focus-ring);
}

h1,
h2,
h3,
h4,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

.num,
.tabular {
  font-variant-numeric: tabular-nums;
}

.muted {
  color: var(--studio-muted);
}

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

.skip-link {
  position: fixed;
  top: -120px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  border-radius: var(--radius-pill);
  background: var(--studio-ribbon-bg);
  color: #ffffff;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--studio-shadow-lg);
  transition: top var(--motion-fast) var(--ease-out);
}

.skip-link:focus {
  top: 12px;
  text-decoration: none;
}

.brand-mark-tile {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #0d1a12;
  padding: 6px;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(95, 239, 170, 0.22);
}

.brand-mark-tile--lg {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  padding: 9px;
}

.brand-mark-tile img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.console-ribbon {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--ribbon-height);
  padding: 6px 24px;
  background: var(--studio-ribbon-bg);
  color: var(--studio-ribbon-ink);
  font-size: 12px;
  font-weight: 500;
}

.console-ribbon__left,
.console-ribbon__right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex-wrap: wrap;
}

.console-ribbon__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--studio-ribbon-dot);
  box-shadow: 0 0 0 3px rgba(179, 250, 142, 0.2);
  flex-shrink: 0;
}

.console-ribbon__env {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
}

.console-ribbon__sep {
  opacity: 0.35;
}

.console-ribbon__commit {
  font-family: var(--mono);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
}

.console-ribbon__guard {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.74);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--topbar-height);
  padding: 0 24px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--studio-border);
}

.topbar__left {
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: 0;
}

.topbar__nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--radius-sm);
  background: var(--studio-surface);
  color: var(--studio-ink);
  cursor: pointer;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--studio-ink);
  text-decoration: none;
  flex-shrink: 0;
}

.brand:hover {
  text-decoration: none;
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-family: var(--display);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--studio-ink);
}

.brand__sub {
  font-size: 10.5px;
  font-weight: 500;
  color: var(--studio-muted);
  letter-spacing: 0.02em;
}

.surface-tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--studio-surface-soft);
  border: 1px solid var(--studio-border);
}

.surface-tabs a {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--studio-ink-2);
  text-decoration: none;
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.surface-tabs a:hover {
  color: var(--studio-ink);
  text-decoration: none;
}

.surface-tabs a.active {
  background: var(--studio-surface);
  color: var(--studio-ink);
  font-weight: 600;
  box-shadow: var(--studio-shadow-sm);
}

.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.topbar__actor {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 4px 12px 4px 5px;
  border-radius: var(--radius-pill);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
  max-width: 280px;
}

.topbar__actor-email {
  font-size: 12px;
  font-weight: 500;
  color: var(--studio-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.density-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: var(--radius-pill);
  background: var(--studio-surface-soft);
  border: 1px solid var(--studio-border);
}

.density-switch button {
  border: 0;
  background: transparent;
  color: var(--studio-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.density-switch button.is-active {
  background: var(--studio-surface);
  color: var(--studio-ink);
  box-shadow: var(--studio-shadow-sm);
}

.layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height) - var(--ribbon-height));
  position: relative;
}

.sidebar-backdrop {
  display: none;
}

.sidebar {
  background: var(--studio-surface);
  border-right: 1px solid var(--studio-border);
  padding: 20px 14px 28px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section__title {
  padding: 4px 12px 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--studio-muted);
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--studio-ink-2);
  text-decoration: none;
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard);
}

.nav-link:hover {
  background: var(--studio-surface-muted);
  color: var(--studio-ink);
  text-decoration: none;
}

.nav-link.active {
  background: var(--studio-green-bg);
  color: var(--studio-green);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--studio-green-border);
}

.sidebar__footer {
  margin-top: auto;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
  font-size: 11.5px;
  color: var(--studio-muted);
  line-height: 1.45;
}

.sidebar__footer strong {
  display: block;
  color: var(--studio-ink);
  font-size: 12px;
  margin-bottom: 3px;
}

.main {
  min-width: 0;
  padding: 28px 32px 64px;
}

.main__inner {
  max-width: 1360px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding-bottom: 4px;
}

.page-header__copy {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 780px;
}

.page-header__title {
  font-family: var(--display);
  font-size: clamp(20px, 2.2vw, 27px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--studio-ink);
}

.page-header__desc {
  font-size: 13.5px;
  color: var(--studio-muted);
  line-height: 1.55;
}

.page-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.login-shell {
  min-height: calc(100vh - var(--ribbon-height));
  display: grid;
  place-items: center;
  padding: 36px 20px;
  background:
    radial-gradient(circle at 18% 12%, rgba(95, 239, 170, 0.14), transparent 36%),
    radial-gradient(circle at 86% 82%, rgba(204, 253, 153, 0.16), transparent 40%),
    var(--paper);
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: 28px;
  padding: 36px 34px 32px;
  box-shadow: var(--studio-shadow);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.login-card__head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.login-card__title {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--studio-ink);
}

.login-card__subtitle {
  font-size: 13px;
  color: var(--studio-muted);
  line-height: 1.55;
}

.login-card__divider {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--studio-muted);
}

.login-card__divider::before,
.login-card__divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--studio-border);
}

.login-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 14px;
  border-top: 1px solid var(--studio-border);
  font-size: 11.5px;
  color: var(--studio-muted);
}

.studio-panel {
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  border-radius: var(--radius-xl);
  padding: 24px 26px;
  box-shadow: var(--studio-shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.studio-panel--soft {
  background: var(--studio-surface-muted);
}

.studio-panel--tight {
  padding: 18px 20px;
  gap: 14px;
}

.studio-panel__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.studio-panel__title {
  font-family: var(--display);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  color: var(--studio-ink);
}

.studio-panel__subtitle {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--studio-muted);
  line-height: 1.5;
}

.studio-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--studio-green);
}

.studio-eyebrow--chip {
  width: fit-content;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  background: var(--studio-green-bg);
  border: 1px solid var(--studio-green-border);
}

.scribble-wrap {
  display: block;
  margin-top: 2px;
}

.scribble {
  display: block;
  width: 148px;
  height: 16px;
  overflow: visible;
  color: var(--studio-emerald);
}

.scribble--green {
  color: var(--studio-green);
}

.scribble__path {
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 680ms var(--ease-out);
}

.scribble__path--secondary {
  stroke-width: 2.2;
  opacity: 0.55;
  transition-delay: 140ms;
}

[data-scribble='waiting'] .scribble__path {
  stroke-dashoffset: 1;
}

[data-scribble='drawn'] .scribble__path {
  stroke-dashoffset: 0;
}

.studio-button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface);
  color: var(--studio-ink);
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.studio-button:hover,
.btn:hover {
  background: var(--studio-surface-muted);
  border-color: rgba(13, 26, 18, 0.28);
  text-decoration: none;
}

.studio-button:active,
.btn:active {
  transform: translateY(1px);
}

.studio-button:disabled,
.btn:disabled,
.studio-button[aria-disabled='true'] {
  opacity: 0.52;
  cursor: not-allowed;
  transform: none;
}

.studio-button--primary,
.btn-primary {
  background: var(--studio-primary);
  border-color: transparent;
  color: #092014;
  box-shadow: 0 6px 18px rgba(0, 216, 119, 0.18);
}

.studio-button--primary:hover,
.btn-primary:hover {
  background: var(--studio-primary-hover);
  border-color: transparent;
  color: #06180f;
}

.studio-button--secondary {
  background: var(--studio-surface);
  border-color: var(--studio-border-strong);
  color: var(--studio-ink);
}

.studio-button--ghost {
  background: transparent;
  border-color: transparent;
  color: var(--studio-ink-2);
}

.studio-button--ghost:hover {
  background: var(--studio-surface-soft);
  border-color: transparent;
  color: var(--studio-ink);
}

.studio-button--danger,
.btn-warn {
  background: var(--studio-danger-bg);
  border-color: var(--studio-danger-border);
  color: var(--studio-danger-ink);
}

.studio-button--danger:hover,
.btn-warn:hover {
  background: #fee2e2;
  border-color: rgba(185, 28, 28, 0.36);
}

.studio-button--sm,
.btn-sm {
  min-height: 32px;
  padding: 0 13px;
  font-size: 12px;
}

.studio-button--full {
  width: 100%;
}

.badge,
.badge-ok,
.badge-warn,
.badge-danger,
.badge-info,
.badge-neutral {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.35;
  white-space: nowrap;
  border: 1px solid transparent;
}

.badge-ok {
  background: var(--studio-green-bg);
  color: var(--studio-green);
  border-color: var(--studio-green-border);
}

.badge-warn {
  background: var(--studio-warn-bg);
  color: var(--studio-warn-ink);
  border-color: var(--studio-warn-border);
}

.badge-danger {
  background: var(--studio-danger-bg);
  color: var(--studio-danger-ink);
  border-color: var(--studio-danger-border);
}

.badge-info {
  background: var(--studio-info-bg);
  color: var(--studio-info-ink);
  border-color: var(--studio-info-border);
}

.badge-neutral {
  background: var(--studio-neutral-bg);
  color: var(--studio-neutral-ink);
  border-color: var(--studio-neutral-border);
}

.flash-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid var(--studio-border);
}

.flash--ok {
  background: var(--studio-green-bg);
  border-color: var(--studio-green-border);
  color: #064e2c;
}

.flash--err {
  background: var(--studio-danger-bg);
  border-color: var(--studio-danger-border);
  color: #8f1616;
}

.flash--warn {
  background: var(--studio-warn-bg);
  border-color: var(--studio-warn-border);
  color: #7c350a;
}

.flash__dismiss {
  border: 0;
  background: transparent;
  color: inherit;
  opacity: 0.65;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
}

.flash__dismiss:hover {
  opacity: 1;
  background: rgba(13, 26, 18, 0.06);
}

.studio-toast-region {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 160;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.studio-toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  border-radius: var(--radius-md);
  background: var(--studio-ribbon-bg);
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 500;
  box-shadow: var(--studio-shadow-lg);
  animation: toast-in 220ms var(--ease-out);
}

.studio-toast--err {
  background: #7f1d1d;
}

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

.studio-stepper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  list-style: none;
  padding: 0;
}

.studio-stepper__item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
}

.studio-stepper__item.is-active {
  background: var(--studio-green-bg);
  border-color: var(--studio-green-border);
}

.studio-stepper__item.is-done {
  border-color: rgba(0, 123, 68, 0.18);
}

.studio-stepper__num {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--studio-surface-soft);
  color: var(--studio-muted);
  flex-shrink: 0;
}

.studio-stepper__item.is-active .studio-stepper__num {
  background: var(--studio-primary);
  color: #082014;
}

.studio-stepper__item.is-done .studio-stepper__num {
  background: var(--studio-green);
  color: #ffffff;
}

.studio-stepper__label {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.studio-stepper__title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--studio-ink);
  line-height: 1.25;
}

.studio-stepper__meta {
  font-size: 11px;
  color: var(--studio-muted);
}

.studio-timeline {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  list-style: none;
  padding: 0;
}

.studio-timeline__step {
  position: relative;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.studio-timeline__step-num {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  color: var(--studio-green);
}

.studio-timeline__step strong {
  font-size: 13px;
  color: var(--studio-ink);
}

.studio-timeline__step span {
  font-size: 12px;
  color: var(--studio-muted);
  line-height: 1.45;
}

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

.pp-stat {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  box-shadow: var(--studio-shadow-sm);
  color: inherit;
  text-decoration: none;
  transition:
    transform var(--motion-fast) var(--ease-out),
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

a.pp-stat:hover {
  transform: translateY(-2px);
  border-color: var(--studio-green-border);
  box-shadow: var(--studio-shadow);
  text-decoration: none;
}

.pp-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 400;
  flex-shrink: 0;
}

.pp-icon--green {
  background: #e6faef;
  color: #007b44;
}

.pp-icon--purple {
  background: #f3eefe;
  color: #6d28d9;
}

.pp-icon--gold {
  background: #fef6e4;
  color: #b45309;
}

.pp-icon--pink {
  background: #fcecf3;
  color: #be185d;
}

.pp-stat__body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pp-stat__label {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--studio-muted);
}

.pp-stat__value {
  font-family: var(--display);
  font-size: 19px;
  line-height: 1.2;
  color: var(--studio-ink);
  font-variant-numeric: tabular-nums;
  word-break: break-word;
}

.pp-stat__sub {
  font-size: 11.5px;
  color: var(--studio-muted);
  margin-top: 2px;
}

.pp-portrait {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0d1a12 0%, #1c3d2c 100%);
  color: var(--studio-lime);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--display);
  font-size: 16px;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 2px rgba(95, 239, 170, 0.35);
}

.pp-portrait--sm {
  width: 28px;
  height: 28px;
  font-size: 10.5px;
}

.studio-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
}

.studio-summary__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.studio-summary__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--studio-muted);
}

.studio-summary__val {
  font-size: 13px;
  font-weight: 500;
  color: var(--studio-ink);
  overflow-wrap: anywhere;
}

.studio-segmented {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-pill);
  background: var(--studio-surface-soft);
  border: 1px solid var(--studio-border);
}

.studio-segmented__btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 0;
  background: transparent;
  color: var(--studio-ink-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition:
    background var(--motion-fast) var(--ease-standard),
    color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.studio-segmented__btn:hover {
  color: var(--studio-ink);
  text-decoration: none;
}

.studio-segmented__btn.is-active {
  background: var(--studio-surface);
  color: var(--studio-ink);
  font-weight: 600;
  box-shadow: var(--studio-shadow-sm);
}

.studio-segmented__count {
  font-family: var(--mono);
  font-size: 10.5px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--studio-surface-soft);
  color: var(--studio-muted);
}

.studio-segmented__btn.is-active .studio-segmented__count {
  background: var(--studio-green-bg);
  color: var(--studio-green);
}

.studio-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--studio-border);
  padding-bottom: 10px;
  flex-wrap: wrap;
}

.brand-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.brand-toolbar__group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.brand-search {
  min-width: 230px;
  max-width: 340px;
  flex: 1 1 220px;
}

.table-scroll {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--studio-border);
  background: var(--studio-surface);
}

.brand-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.brand-table thead th {
  text-align: left;
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--studio-muted);
  background: var(--studio-surface-muted);
  border-bottom: 1px solid var(--studio-border);
  white-space: nowrap;
}

.brand-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--studio-border);
  vertical-align: top;
  color: var(--studio-ink);
}

.brand-table tbody tr:last-child td {
  border-bottom: 0;
}

.brand-table tbody tr:hover {
  background: rgba(13, 26, 18, 0.018);
}

.brand-table tbody tr.is-clickable {
  cursor: pointer;
}

.brand-table tbody tr.is-hidden {
  display: none;
}

.studio-empty--large {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 10px;
  padding: 44px 24px;
  border-radius: var(--radius-lg);
  background: var(--studio-surface-muted);
  border: 1px dashed var(--studio-border-strong);
}

.studio-empty__title {
  font-family: var(--display);
  font-size: 15px;
  color: var(--studio-ink);
}

.studio-empty__desc {
  max-width: 480px;
  font-size: 13px;
  color: var(--studio-muted);
}

.brand-delete-confirm {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--studio-danger-bg);
  border: 1px solid var(--studio-danger-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.brand-delete-confirm[hidden] {
  display: none;
}

.brand-delete-confirm__text {
  font-size: 12px;
  color: var(--studio-danger-ink);
  font-weight: 500;
}

.brand-delete-confirm__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 16px;
}

.calendar-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  overflow: hidden;
  color: inherit;
  text-decoration: none;
  box-shadow: var(--studio-shadow-sm);
  transition:
    transform var(--motion-fast) var(--ease-out),
    box-shadow var(--motion-fast) var(--ease-standard),
    border-color var(--motion-fast) var(--ease-standard);
}

.calendar-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--studio-shadow);
  border-color: var(--studio-green-border);
  text-decoration: none;
}

.calendar-card.is-today {
  border-color: var(--studio-emerald);
  box-shadow: 0 0 0 1px var(--studio-emerald), var(--studio-shadow-sm);
}

.calendar-card.is-hidden {
  display: none;
}

.calendar-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, #102018 0%, #1c3529 100%);
  overflow: hidden;
}

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

.calendar-card__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.calendar-card__badges {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.calendar-card__day {
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  background: rgba(13, 26, 18, 0.82);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
}

.calendar-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.calendar-card__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--studio-ink);
  line-height: 1.3;
}

.calendar-card__sub {
  font-size: 12px;
  color: var(--studio-muted);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.calendar-card__foot {
  margin-top: auto;
  padding-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--studio-muted);
}

.library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.library-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  overflow: hidden;
  box-shadow: var(--studio-shadow-sm);
}

.library-card.is-hidden {
  display: none;
}

.library-card__media {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--studio-surface-muted);
  border-bottom: 1px solid var(--studio-border);
  padding: 16px;
  min-height: 156px;
}

.library-card__media--avatar img {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 6px 18px rgba(13, 26, 18, 0.12);
}

.library-card__media--logo {
  background-image:
    linear-gradient(45deg, rgba(13, 26, 18, 0.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(13, 26, 18, 0.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(13, 26, 18, 0.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(13, 26, 18, 0.04) 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.library-card__media--logo img {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.72);
  padding: 8px;
}

.library-card__media--cover {
  padding: 0;
  aspect-ratio: 16 / 9;
  min-height: 0;
}

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

.library-card__body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.library-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.library-card__label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--studio-ink);
}

.library-card__meta {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 11.5px;
  color: var(--studio-muted);
}

.hero-preview-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.hero-preview-stage[data-view='both'] {
  grid-template-columns: minmax(0, 1.5fr) minmax(160px, 0.85fr);
  align-items: start;
}

.hero-preview-stage[data-view='desktop'] .hero-preview-card--mobile {
  display: none;
}

.hero-preview-stage[data-view='mobile'] .hero-preview-card--desktop {
  display: none;
}

.hero-preview-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--studio-border-strong);
  background: var(--preview-surface, #0e1c16);
  color: #ffffff;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 220px;
}

.hero-preview-card--desktop {
  aspect-ratio: 16 / 10;
}

.hero-preview-card--mobile {
  aspect-ratio: 4 / 5;
}

.hero-preview-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-preview-card__scrim {
  position: relative;
  z-index: 2;
  padding: 18px 18px 16px;
  background: linear-gradient(180deg, rgba(10, 18, 14, 0.05) 0%, rgba(10, 18, 14, 0.88) 100%);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hero-preview-card__eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--preview-accent, #5fefaa);
}

.hero-preview-card__title {
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.25;
  color: #ffffff;
}

.hero-preview-card__sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.4;
}

.wallet-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  box-shadow: var(--studio-shadow-sm);
}

.wallet-bar__status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.wallet-bar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
  font-size: 13px;
}

.hero-strip__left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sign-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px 18px;
  border-radius: var(--radius-lg);
  background: var(--studio-green-bg);
  border: 1px solid var(--studio-green-border);
}

.sign-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.sign-panel__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.sign-status {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  font-size: 12.5px;
  color: var(--studio-ink);
  word-break: break-word;
}

.sign-status[hidden] {
  display: none;
}

.sign-status.is-ok {
  background: var(--studio-green-bg);
  border-color: var(--studio-green-border);
  color: #064e2c;
}

.sign-status.is-err {
  background: var(--studio-danger-bg);
  border-color: var(--studio-danger-border);
  color: #8f1616;
}

.sign-status.is-warn {
  background: var(--studio-warn-bg);
  border-color: var(--studio-warn-border);
  color: #7c350a;
}

.preflight-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.preflight-check {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
}

.preflight-check__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.preflight-check__title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--studio-ink);
}

.preflight-check__detail {
  font-size: 12px;
  color: var(--studio-muted);
  overflow-wrap: anywhere;
}

.op-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.code-block {
  margin: 0;
  padding: 13px 15px;
  border-radius: var(--radius-md);
  background: #101d16;
  color: #e6f4ec;
  font-family: var(--mono);
  font-size: 11.5px;
  line-height: 1.55;
  overflow-x: auto;
  max-height: 320px;
  white-space: pre-wrap;
  word-break: break-all;
}

.copy-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
}

.copy-row__val {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.prose-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}

.prose-card {
  padding: 20px 22px;
  border-radius: var(--radius-lg);
  background: var(--studio-surface);
  border: 1px solid var(--studio-border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.prose-card ul,
.prose-card ol {
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--studio-ink-2);
  font-size: 13px;
}

.details-fallback {
  border-radius: var(--radius-md);
  border: 1px solid var(--studio-border);
  background: var(--studio-surface-muted);
  padding: 12px 15px;
}

.details-fallback summary {
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--studio-ink);
}

.details-fallback[open] summary {
  margin-bottom: 12px;
}

.legacy-banner {
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--studio-warn-bg);
  border: 1px solid var(--studio-warn-border);
  color: #7c350a;
  font-size: 12.5px;
  line-height: 1.5;
}

.support-message {
  font: inherit;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

.studio-split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.95fr);
  gap: 22px;
  align-items: start;
}

.studio-split__sticky {
  position: sticky;
  top: calc(var(--topbar-height) + 22px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

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

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

.studio-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.studio-field--full {
  grid-column: 1 / -1;
}

.studio-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.studio-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--studio-ink);
}

.studio-counter {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--studio-muted);
}

.studio-counter.is-over {
  color: var(--studio-danger-ink);
  font-weight: 600;
}

.studio-input,
.studio-select,
.studio-textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface);
  color: var(--studio-ink);
  font-size: 13.5px;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.studio-textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

.studio-input:focus,
.studio-select:focus,
.studio-textarea:focus {
  outline: none;
  border-color: var(--studio-emerald);
  box-shadow: var(--studio-focus-ring);
}

.studio-input:disabled,
.studio-select:disabled,
.studio-textarea:disabled {
  background: var(--studio-surface-soft);
  color: var(--studio-muted);
  cursor: not-allowed;
}

.studio-hint {
  font-size: 11.5px;
  color: var(--studio-muted);
  line-height: 1.45;
}

.studio-error {
  font-size: 12px;
  font-weight: 500;
  color: var(--studio-danger-ink);
}

.studio-success {
  font-size: 12px;
  font-weight: 500;
  color: var(--studio-green);
}

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

.color-pair__swatch {
  width: 42px;
  height: 42px;
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface);
  cursor: pointer;
  flex-shrink: 0;
}

.studio-count-stepper {
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface);
  overflow: hidden;
  width: 100%;
}

.studio-count-stepper__btn {
  width: 40px;
  min-height: 40px;
  border: 0;
  background: var(--studio-surface-muted);
  color: var(--studio-ink);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--motion-fast) var(--ease-standard);
}

.studio-count-stepper__btn:hover:not([aria-disabled='true']) {
  background: var(--studio-surface-soft);
}

.studio-count-stepper__btn[aria-disabled='true'] {
  opacity: 0.35;
  cursor: not-allowed;
}

.studio-count-stepper__input {
  border: 0;
  border-left: 1px solid var(--studio-border);
  border-right: 1px solid var(--studio-border);
  border-radius: 0;
  text-align: center;
  font-family: var(--mono);
  font-weight: 600;
  min-width: 0;
  flex: 1;
}

.studio-count-stepper__input:focus {
  box-shadow: none;
}

.studio-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.studio-option {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-md);
  border: 2px solid var(--studio-border);
  background: var(--studio-surface);
  overflow: hidden;
  cursor: pointer;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard),
    transform var(--motion-fast) var(--ease-out);
}

.studio-option:hover {
  transform: translateY(-1px);
  border-color: var(--studio-border-strong);
}

.studio-option:has(input:checked),
.studio-option.is-selected {
  border-color: var(--studio-lime-ring);
  box-shadow: 0 0 0 3px rgba(181, 243, 108, 0.35);
}

.studio-option input[type='radio'] {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 2;
  accent-color: var(--studio-green);
}

.studio-option__img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
}

.studio-option__meta {
  padding: 8px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--studio-muted);
}

.studio-options.is-loading .studio-option::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.2s infinite;
}

@keyframes shimmer {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(100%);
  }
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--studio-surface-muted);
  border: 1px solid var(--studio-border);
}

.identity-row__main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.identity-row__copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.identity-row__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--studio-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.identity-row__sub {
  font-size: 11.5px;
  color: var(--studio-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rich-picker {
  position: relative;
}

.rich-picker__native {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.rich-picker__trigger {
  width: 100%;
  min-height: 46px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface);
  color: var(--studio-ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    box-shadow var(--motion-fast) var(--ease-standard);
}

.rich-picker__trigger:hover {
  border-color: rgba(13, 26, 18, 0.3);
}

.rich-picker__trigger[aria-expanded='true'] {
  border-color: var(--studio-emerald);
  box-shadow: var(--studio-focus-ring);
}

.rich-picker__value {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.rich-picker__label {
  font-size: 13px;
  font-weight: 600;
  color: var(--studio-ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rich-picker__meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--studio-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rich-picker__chev {
  color: var(--studio-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.rich-picker__popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 65;
  background: var(--studio-surface);
  border: 1px solid var(--studio-border-strong);
  border-radius: var(--radius-md);
  box-shadow: var(--studio-shadow-lg);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.rich-picker__popover[hidden] {
  display: none;
}

.rich-picker__search {
  min-height: 36px;
  padding: 6px 10px;
  font-size: 12.5px;
}

.rich-picker__list {
  list-style: none;
  padding: 0;
  max-height: 250px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rich-picker__opt {
  padding: 9px 11px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rich-picker__opt:hover,
.rich-picker__opt.is-highlighted {
  background: var(--studio-surface-muted);
}

.rich-picker__opt[aria-selected='true'] {
  background: var(--studio-green-bg);
  box-shadow: inset 0 0 0 1px var(--studio-green-border);
}

.rich-picker__opt-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rich-picker__opt-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--studio-ink);
}

.rich-picker__opt-meta {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--studio-muted);
  word-break: break-all;
}

.rich-picker__empty {
  padding: 14px 10px;
  text-align: center;
  font-size: 12px;
  color: var(--studio-muted);
}

.studio-dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 18px;
  border-radius: var(--radius-lg);
  border: 2px dashed var(--studio-border-strong);
  background: var(--studio-surface-muted);
  text-align: center;
  transition:
    border-color var(--motion-fast) var(--ease-standard),
    background var(--motion-fast) var(--ease-standard);
}

.studio-dropzone.is-dragover {
  border-color: var(--studio-emerald);
  background: var(--studio-green-bg);
}

.studio-dropzone.is-error {
  border-color: var(--studio-danger-ink);
  background: var(--studio-danger-bg);
}

.studio-dropzone__preview {
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--studio-border-strong);
  background: var(--studio-surface);
}

.studio-dropzone__preview.has-image {
  display: flex;
}

.studio-dropzone__preview.is-avatar {
  width: 112px;
  height: 112px;
  border-radius: 50%;
}

.studio-dropzone__preview.is-logo {
  width: 112px;
  height: 112px;
  border-radius: 16px;
  padding: 8px;
  background-image:
    linear-gradient(45deg, rgba(13, 26, 18, 0.05) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(13, 26, 18, 0.05) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(13, 26, 18, 0.05) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(13, 26, 18, 0.05) 75%);
  background-size: 14px 14px;
  background-position: 0 0, 0 7px, 7px -7px, -7px 0;
}

.studio-dropzone__preview.is-cover {
  width: 100%;
  max-width: 340px;
  aspect-ratio: 16 / 9;
  border-radius: 14px;
}

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

.studio-dropzone__preview.is-logo img {
  object-fit: contain;
}

.studio-dropzone__bar {
  width: 100%;
  max-width: 320px;
  height: 6px;
  border-radius: var(--radius-pill);
  background: rgba(13, 26, 18, 0.1);
  overflow: hidden;
}

.studio-dropzone__bar-fill {
  height: 100%;
  width: 0%;
  background: var(--studio-emerald);
  transition: width var(--motion-fast) var(--ease-standard);
}

.studio-dropzone__bar-fill.is-over {
  background: var(--studio-danger-ink);
}

dialog.slide-drawer {
  margin: 0 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  width: min(680px, 100vw);
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  overflow: visible;
  color: var(--studio-ink);
}

dialog.slide-drawer--wide {
  width: min(780px, 100vw);
}

dialog.slide-drawer::backdrop {
  background: rgba(13, 26, 18, 0.42);
  backdrop-filter: blur(4px);
}

dialog.slide-drawer[open] .slide-drawer__frame {
  animation: drawer-in 300ms var(--ease-out);
}

dialog.slide-drawer.is-closing .slide-drawer__frame {
  animation: drawer-out 180ms var(--ease-standard) forwards;
}

dialog.slide-drawer.slide-drawer--covered .slide-drawer__sheet {
  transform: translateX(-18px) scale(0.985);
  filter: brightness(0.96);
}

@keyframes drawer-in {
  from {
    transform: translateX(48px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes drawer-out {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(48px);
    opacity: 0;
  }
}

.slide-drawer__frame {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  height: 100%;
  width: 100%;
}

.slide-drawer__rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
}

.slide-drawer__close {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.28);
  background: #ffffff;
  color: var(--studio-ink);
  font-size: 20px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--studio-shadow-lg);
  transition: transform var(--motion-fast) var(--ease-out);
}

.slide-drawer__close:hover {
  transform: scale(1.06);
}

.slide-drawer__sheet {
  background: var(--studio-surface);
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(13, 26, 18, 0.16);
  border-left: 1px solid var(--studio-border);
  overflow: hidden;
  transition: transform var(--motion-base) var(--ease-out);
}

.slide-drawer__head {
  padding: 22px 26px 16px;
  border-bottom: 1px solid var(--studio-border);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.slide-drawer__title {
  font-family: var(--display);
  font-size: 16px;
  color: var(--studio-ink);
}

.slide-drawer__sub {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--studio-muted);
}

.slide-drawer__body {
  padding: 22px 26px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.slide-drawer__foot {
  padding: 16px 26px;
  border-top: 1px solid var(--studio-border);
  background: var(--studio-surface-muted);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.drawer-mobile-close {
  display: none;
}

@media (max-width: 1180px) {
  .pp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .studio-split {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-split__sticky {
    position: static;
  }

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

@media (max-width: 960px) {
  .topbar {
    padding: 0 16px;
  }

  .topbar__nav-toggle {
    display: inline-flex;
  }

  .surface-tabs {
    display: none;
  }

  .topbar__actor-email {
    display: none;
  }

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

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(290px, 84vw);
    z-index: 120;
    transform: translateX(-104%);
    transition: transform var(--motion-base) var(--ease-out);
    box-shadow: var(--studio-shadow-lg);
    overflow-y: auto;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  body.nav-open .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(13, 26, 18, 0.38);
    backdrop-filter: blur(2px);
  }

  .main {
    padding: 20px 18px 56px;
  }
}

@media (max-width: 760px) {
  .console-ribbon {
    padding: 6px 14px;
  }

  .console-ribbon__guard {
    display: none;
  }

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

  .hero-preview-stage[data-view='both'] {
    grid-template-columns: minmax(0, 1fr);
  }

  .studio-timeline {
    grid-template-columns: minmax(0, 1fr);
  }

  dialog.slide-drawer,
  dialog.slide-drawer--wide {
    width: 100vw;
  }

  .slide-drawer__frame {
    grid-template-columns: minmax(0, 1fr);
  }

  .slide-drawer__rail {
    display: none;
  }

  .drawer-mobile-close {
    display: inline-flex;
  }
}

@media (max-width: 640px) {
  .pp-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .density-switch {
    display: none;
  }

  .studio-panel {
    padding: 18px 16px;
    border-radius: var(--radius-lg);
  }

  .login-card {
    padding: 26px 22px;
  }
}

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

  [data-scribble='waiting'] .scribble__path {
    stroke-dashoffset: 0;
  }
}

body.density-compact {
  font-size: 13px;
}

body.density-compact .main {
  padding: 18px 22px 44px;
}

body.density-compact .main__inner {
  gap: 14px;
}

body.density-compact .studio-panel {
  padding: 16px 18px;
  gap: 12px;
  border-radius: var(--radius-lg);
}

body.density-compact .pp-stat {
  padding: 13px 15px;
}

body.density-compact .pp-stat__value {
  font-size: 16px;
}

body.density-compact .brand-table thead th {
  padding: 8px 11px;
}

body.density-compact .brand-table tbody td {
  padding: 8px 11px;
  font-size: 12.5px;
}

body.density-compact .studio-input,
body.density-compact .studio-select {
  min-height: 36px;
  padding: 6px 11px;
  font-size: 12.5px;
}

body.density-compact .studio-button,
body.density-compact .btn {
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
}

body.density-compact .nav-link {
  padding: 7px 10px;
  font-size: 12.5px;
}

body.density-compact .calendar-card__body,
body.density-compact .library-card__body {
  padding: 11px 13px;
}
