:root {
  --background: #131313;
  --background-strong: #0d0d0d;
  --surface-lowest: #0e0e0e;
  --surface-low: #1c1b1b;
  --surface: #201f1f;
  --surface-high: #2a2a2a;
  --surface-highest: #353534;
  --surface-bright: #3a3939;
  --text: #e5e2e1;
  --off-white: #e5e2e1;
  --text-muted: #c4c9ac;
  --outline: #8e9379;
  --outline-variant: #444933;
  --primary: var(--lime);
  --secondary: var(--off-white);
  --lime: #c3f400;
  --lime-dim: #abd600;
  --lime-ink: #161e00;
  --blue: #0266ff;
  --blue-soft: #b3c5ff;
  --red: #ff0033;
  --error: #ffb4ab;
  --error-container: #93000a;
  --error-text: #ffdad6;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --content-bottom-safe: 156px;
  --card-padding: var(--space-4);
  --card-gap: var(--space-4);
  --stroke-card: rgba(142, 147, 121, 0.58);
  --stroke-subtle: rgba(68, 73, 51, 0.86);
  --font-sans: "Be Vietnam Pro", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans Arabic", Pretendard, "Apple SD Gothic Neo", sans-serif;
  --font-display: "Hanken Grotesk", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans Arabic", Pretendard, sans-serif;
  --font-mono: "JetBrains Mono", "Noto Sans KR", "Noto Sans Thai", "Noto Sans Devanagari", "Noto Sans Arabic", monospace;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

html {
  background: var(--background-strong);
  font-family: var(--font-sans);
}

body {
  background: var(--background-strong);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

input,
textarea {
  ime-mode: auto;
}

:where(a, button, input, textarea, select, [tabindex], .file-trigger):focus-visible {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

:where(.field, .textarea, .search-box input):focus-visible {
  outline-offset: 5px;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

::-webkit-scrollbar-track {
  background: var(--background);
}

::-webkit-scrollbar-thumb {
  background: var(--surface-highest);
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-weight: normal;
  font-style: normal;
  font-size: 22px;
  line-height: 1;
  display: inline-flex;
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  direction: ltr;
  font-feature-settings: "liga";
  -webkit-font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  font-variation-settings: "FILL" 0, "wght" 450, "GRAD" 0, "opsz" 24;
}

.material-icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: inline-block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: square;
  stroke-linejoin: miter;
}

.app-shell {
  min-height: 100dvh;
  background:
    linear-gradient(90deg, rgba(195, 244, 0, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(195, 244, 0, 0.025) 1px, transparent 1px),
    var(--background-strong);
  background-size: 24px 24px;
}

.app-shell.motion-reduced *,
.app-shell.motion-reduced *::before,
.app-shell.motion-reduced *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  scroll-behavior: auto !important;
  transition-duration: 0.01ms !important;
}

.app-shell.density-compact .content {
  gap: var(--space-4);
  padding-top: var(--space-3);
}

.app-shell.density-compact .post-card,
.app-shell.density-compact .preview-card {
  padding: var(--space-3);
}

.app-frame {
  width: min(100%, 600px);
  min-height: 100dvh;
  margin: 0 auto;
  background: rgba(19, 19, 19, 0.96);
  border-left: 1px solid rgba(53, 53, 52, 0.5);
  border-right: 1px solid rgba(53, 53, 52, 0.5);
}

.app-frame.route-policy {
  width: min(100%, 1200px);
}

.app-frame:not(.has-desktop-shell).route-design-system {
  width: min(100%, 1200px);
}

.desktop-sidebar,
.desktop-topbar,
.desktop-system-rail,
.desktop-page-head {
  display: none;
}

.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--background-strong);
  border-bottom: 1px solid var(--surface-highest);
  padding-top: env(safe-area-inset-top);
}

.top-row {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: 0 var(--space-4);
}

.brand {
  margin: 0;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.screen-title {
  margin: 0;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
}

.content {
  display: grid;
  grid-auto-rows: max-content;
  gap: var(--space-6);
  padding: var(--space-4) var(--space-4) calc(var(--content-bottom-safe) + env(safe-area-inset-bottom));
}

.auth-content {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(var(--space-2), 1.4dvh, var(--space-5));
  padding: calc(clamp(var(--space-3), 2dvh, var(--space-6)) + env(safe-area-inset-top)) var(--space-4) calc(clamp(var(--space-3), 2dvh, var(--space-6)) + env(safe-area-inset-bottom));
  text-align: center;
}

.auth-brand-block {
  display: grid;
  gap: var(--space-2);
  justify-items: center;
}

.auth-brand {
  margin: 0;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: clamp(36px, 5.4dvh, 48px);
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.auth-teaser {
  position: relative;
  width: 100%;
  height: 320px;
}

.auth-portrait {
  position: absolute;
  inset: 0 16%;
  overflow: hidden;
  border: 1px solid var(--surface-highest);
  background: var(--surface);
}

.auth-portrait img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: grayscale(1) brightness(0.52) contrast(1.25);
}

.auth-rail {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--lime);
}

.auth-tag {
  position: absolute;
  z-index: 2;
  border: 1px solid currentColor;
  background: var(--background-strong);
  padding: 4px 8px;
  font-family: "JetBrains Mono", "Noto Sans KR", monospace;
  font-size: 12px;
  font-weight: 700;
}

.tag-lime {
  top: 16px;
  left: -24px;
  color: var(--lime);
  transform: rotate(-12deg);
}

.tag-blue {
  right: -28px;
  bottom: 48px;
  color: var(--blue-soft);
  transform: rotate(8deg);
}

.tag-side {
  left: -56px;
  top: 48%;
  color: var(--text-muted);
  transform: rotate(-90deg);
}

.auth-copy {
  max-width: 340px;
  margin-bottom: 0;
}

.auth-actions {
  width: 100%;
  margin-bottom: 0;
}

.auth-desktop-panel {
  display: none;
}

.auth-language-button {
  min-height: 44px;
  margin: var(--space-4) auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  color: var(--text);
  padding: 0 var(--space-3);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
}

.auth-language-button:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.auth-panel {
  width: min(100%, 420px);
  padding: clamp(var(--space-3), 2dvh, var(--space-6)) var(--space-5);
  text-align: center;
}

.auth-dot-visual {
  position: relative;
  width: min(56vw, 224px, 28dvh);
  aspect-ratio: 1;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  padding: clamp(var(--space-3), 1.7dvh, var(--space-5));
  overflow: hidden;
  isolation: isolate;
}

.auth-dot-visual::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.auth-dot-visual::after {
  inset: 0;
  z-index: 5;
  border-left: 4px solid var(--lime);
  box-shadow: inset 0 0 0 1px rgba(195, 244, 0, 0.08);
}

.auth-profile-rotator {
  position: relative;
  width: 100%;
  height: 100%;
}

.auth-profile-frame {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: opacity;
  animation-duration: 16s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.auth-profile-frame-1 {
  animation-name: auth-profile-cycle-one;
}

.auth-profile-frame-2 {
  animation-name: auth-profile-cycle-two;
}

.auth-profile-frame-3 {
  animation-name: auth-profile-cycle-three;
}

.auth-profile-frame-4 {
  animation-name: auth-profile-cycle-four;
}

.auth-generated-profile {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(16, 1fr);
  grid-template-rows: repeat(16, 1fr);
  gap: 0;
  width: 100%;
  height: 100%;
  border: 1px solid #444933;
  background: #131313;
}

.auth-generated-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
}

.auth-generated-dot {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 72%;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  animation-duration: 4s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

.auth-generated-dot--from {
  opacity: 1;
}

.auth-generated-dot--to {
  opacity: 0;
}

.auth-generated-dot--from.auth-generated-dot--phase-0 {
  animation-name: auth-dot-from-transfer-0;
}

.auth-generated-dot--from.auth-generated-dot--phase-1 {
  animation-name: auth-dot-from-transfer-1;
}

.auth-generated-dot--from.auth-generated-dot--phase-2 {
  animation-name: auth-dot-from-transfer-2;
}

.auth-generated-dot--from.auth-generated-dot--phase-3 {
  animation-name: auth-dot-from-transfer-3;
}

.auth-generated-dot--to.auth-generated-dot--phase-0 {
  animation-name: auth-dot-to-transfer-0;
}

.auth-generated-dot--to.auth-generated-dot--phase-1 {
  animation-name: auth-dot-to-transfer-1;
}

.auth-generated-dot--to.auth-generated-dot--phase-2 {
  animation-name: auth-dot-to-transfer-2;
}

.auth-generated-dot--to.auth-generated-dot--phase-3 {
  animation-name: auth-dot-to-transfer-3;
}

.auth-provider-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.auth-copy .screen-title {
  font-size: clamp(21px, 3dvh, 24px);
}

.auth-copy .muted {
  max-width: 320px;
  margin: var(--space-2) auto 0;
  line-height: 1.42;
}

.auth-social-card {
  padding: var(--space-4);
}

.auth-social-card > .muted {
  margin: 0 0 var(--space-2);
  line-height: 1.35;
}

.auth-social-card > .mono.muted {
  margin-bottom: var(--space-1);
}

@keyframes auth-profile-cycle-one {
  0%,
  24.99% {
    opacity: 1;
  }

  25%,
  99.99% {
    opacity: 0;
  }
}

@keyframes auth-profile-cycle-two {
  0%,
  24.99% {
    opacity: 0;
  }

  25%,
  49.99% {
    opacity: 1;
  }

  50%,
  100% {
    opacity: 0;
  }
}

@keyframes auth-profile-cycle-three {
  0%,
  49.99% {
    opacity: 0;
  }

  50%,
  74.99% {
    opacity: 1;
  }

  75%,
  100% {
    opacity: 0;
  }
}

@keyframes auth-profile-cycle-four {
  0%,
  74.99% {
    opacity: 0;
  }

  75%,
  99.99% {
    opacity: 1;
  }

  100% {
    opacity: 0;
  }
}

@keyframes auth-dot-from-transfer-0 {
  0%,
  4% {
    opacity: 1;
  }

  10%,
  20% {
    opacity: 0.12;
  }

  15% {
    opacity: 1;
  }

  28%,
  100% {
    opacity: 0;
  }
}

@keyframes auth-dot-from-transfer-1 {
  0%,
  6% {
    opacity: 1;
  }

  13%,
  23% {
    opacity: 0.18;
  }

  18% {
    opacity: 1;
  }

  31%,
  100% {
    opacity: 0;
  }
}

@keyframes auth-dot-from-transfer-2 {
  0%,
  8% {
    opacity: 1;
  }

  15%,
  26% {
    opacity: 0.08;
  }

  21% {
    opacity: 1;
  }

  34%,
  100% {
    opacity: 0;
  }
}

@keyframes auth-dot-from-transfer-3 {
  0%,
  5% {
    opacity: 1;
  }

  12%,
  22% {
    opacity: 0.22;
  }

  17% {
    opacity: 1;
  }

  30%,
  100% {
    opacity: 0;
  }
}

@keyframes auth-dot-to-transfer-0 {
  0%,
  4% {
    opacity: 0;
  }

  10% {
    opacity: 1;
  }

  15% {
    opacity: 0.16;
  }

  20%,
  100% {
    opacity: 1;
  }
}

@keyframes auth-dot-to-transfer-1 {
  0%,
  6% {
    opacity: 0;
  }

  13% {
    opacity: 0.18;
  }

  18% {
    opacity: 1;
  }

  23% {
    opacity: 0.24;
  }

  31%,
  100% {
    opacity: 1;
  }
}

@keyframes auth-dot-to-transfer-2 {
  0%,
  8% {
    opacity: 0;
  }

  15% {
    opacity: 1;
  }

  21% {
    opacity: 0.12;
  }

  34%,
  100% {
    opacity: 1;
  }
}

@keyframes auth-dot-to-transfer-3 {
  0%,
  5% {
    opacity: 0;
  }

  12% {
    opacity: 0.22;
  }

  17% {
    opacity: 1;
  }

  22% {
    opacity: 0.18;
  }

  30%,
  100% {
    opacity: 1;
  }
}

.profile-hero {
  padding: var(--space-5);
  overflow: hidden;
  --wire-plus: var(--lime);
}

.profile-hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: var(--space-2);
  text-align: center;
}

.profile-avatar-frame {
  position: relative;
  padding: var(--space-1);
  border: 1px solid var(--outline-variant);
  background: var(--background);
}

.profile-avatar-frame .avatar.large {
  width: 112px;
  height: 112px;
}

.profile-avatar-frame::before,
.profile-avatar-frame::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--lime);
}

.profile-avatar-frame::before {
  top: -4px;
  left: -4px;
}

.profile-avatar-frame::after {
  right: -4px;
  bottom: -4px;
}

.profile-hero-copy {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: var(--space-2);
}

.profile-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 26px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-high);
  color: var(--text-muted);
  padding: 3px var(--space-2);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.profile-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--lime);
}

.profile-persona-list,
.profile-protocol-list {
  display: grid;
  gap: var(--space-2);
}

.profile-persona-card {
  display: grid;
  gap: var(--space-2);
  padding: var(--space-3);
  border-left: 4px solid var(--outline-variant);
}

.profile-persona-card.active {
  border-left-color: var(--lime);
  background: var(--surface);
}

.profile-persona-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
}

.profile-slot-sync {
  display: grid;
  gap: var(--space-2);
}

.profile-sync-bar {
  height: 4px;
  overflow: hidden;
  background: var(--surface-highest);
}

.profile-sync-bar > span {
  display: block;
  height: 100%;
  background: var(--lime);
}

.profile-account-section {
  display: grid;
  gap: var(--space-3);
}

.profile-account-section > .mono,
.profile-account-section > .post-name,
.profile-account-section > .muted {
  margin: 0;
}

.profile-account-actions {
  margin-top: var(--space-1);
}

.profile-account-wide,
.profile-account-danger {
  grid-column: 1 / -1;
}

.profile-protocol-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--surface-lowest);
  transition: border-color 120ms ease, background-color 120ms ease;
}

.profile-protocol-row:hover {
  border-color: var(--lime);
  background: var(--surface-low);
}

.profile-protocol-row .button {
  min-width: 88px;
  min-height: 44px;
  padding: 0 var(--space-3);
}

.profile-protocol-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--outline-variant);
  color: var(--lime);
  font-weight: 900;
}

.profile-nav-list {
  display: grid;
  gap: var(--space-2);
}

.profile-nav-row {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 32px;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  color: var(--text);
  text-align: left;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.profile-nav-row:hover {
  border-color: var(--lime);
  background: var(--surface-low);
}

.profile-nav-mark,
.profile-nav-arrow {
  display: grid;
  place-items: center;
  border: 1px solid var(--outline-variant);
  color: var(--lime);
  background: var(--background);
}

.profile-nav-mark {
  width: 36px;
  height: 36px;
}

.profile-nav-arrow {
  width: 32px;
  height: 32px;
  color: var(--text-muted);
}

.profile-nav-row:hover .profile-nav-arrow {
  border-color: var(--lime);
  color: var(--lime);
}

.profile-nav-copy {
  min-width: 0;
  display: grid;
  gap: var(--space-1);
}

.profile-nav-copy > * {
  margin: 0;
}

.profile-nav-copy .post-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-nav-copy .muted {
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  line-height: 1.35;
  white-space: normal;
}

.policy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-5);
  min-width: 0;
}

.policy-primary,
.policy-secondary {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.policy-hero {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.policy-hero > *,
.policy-content,
.policy-card,
.policy-support,
.policy-status-card,
.policy-fact,
.policy-quote,
.policy-directive-row {
  min-width: 0;
}

.policy-card,
.policy-support,
.policy-status-card,
.policy-fact,
.policy-quote,
.policy-directive-row {
  overflow-wrap: anywhere;
}

.policy-status-card {
  padding: var(--space-4);
  display: grid;
  gap: var(--space-2);
  min-width: 200px;
}

.policy-status-card .row {
  min-width: 0;
  flex-wrap: wrap;
}

.status-dot {
  width: 8px;
  height: 8px;
  display: inline-block;
  background: var(--lime);
}

.policy-copy-grid {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.policy-card {
  padding: var(--space-5);
}

.policy-card-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.policy-card-header .material-symbols-outlined {
  color: var(--lime);
}

.policy-quote {
  border-left: 3px solid var(--lime);
  background: var(--surface-low);
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  font-style: italic;
}

.policy-fact-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.policy-fact {
  border: 0;
  border-top: 1px solid var(--outline-variant);
  border-left: 4px solid rgba(195, 244, 0, 0.62);
  background: transparent;
  padding: var(--space-4) 0 0 var(--space-4);
}

.policy-numbered {
  display: grid;
  gap: var(--space-3);
  padding: 0;
  margin: var(--space-4) 0 0;
  list-style: none;
}

.policy-numbered li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: var(--space-3);
  color: var(--text-muted);
}

.policy-support {
  display: grid;
  align-content: start;
  gap: var(--space-4);
  padding: var(--space-5);
}

.policy-directive-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  border-top: 1px solid var(--outline-variant);
  border-left: 4px solid var(--lime);
  background: transparent;
  padding: var(--space-4) 0 0 var(--space-4);
}

.support-agent-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.support-avatar {
  width: 40px;
  height: 40px;
  padding: 2px;
  border: 1px solid var(--outline-variant);
}

.support-avatar .avatar {
  width: 100%;
  height: 100%;
}

.feed-content {
  padding-top: var(--space-6);
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--surface-highest);
}

.tabs.feed-tabs {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tabs.result-tabs {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: var(--space-4) 0;
  border: 0;
  border-bottom: 1px solid var(--surface-highest);
}

.tabs.result-tabs .tab {
  font-family: var(--font-mono);
  text-transform: uppercase;
}

.tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-muted);
  padding: 12px 8px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-width: 0;
}

.tab.active {
  color: var(--lime);
  border-bottom-color: var(--lime);
}

.icon-button {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
}

.icon-button:hover,
.icon-button.active {
  border-color: var(--lime);
  color: var(--lime);
  background: rgba(195, 244, 0, 0.04);
}

.icon-button.danger {
  border-color: rgba(255, 180, 171, 0.72);
  color: var(--error-text);
  background: rgba(147, 0, 10, 0.2);
}

.icon-button.danger:hover,
.icon-button.danger:focus-visible {
  border-color: var(--error);
  background: rgba(147, 0, 10, 0.36);
  color: var(--error-text);
}

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  color: var(--text);
  padding: 0 var(--space-4);
  font-weight: 700;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease, filter 120ms ease;
}

.button.primary {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.button.danger {
  border-color: var(--error);
  background: rgba(147, 0, 10, 0.32);
  color: var(--error-text);
}

.button.full {
  width: 100%;
}

.button:hover {
  border-color: var(--lime);
  background: var(--surface-high);
  color: var(--lime);
}

.button.primary:hover {
  background: var(--lime-dim);
  color: var(--lime-ink);
  filter: none;
}

.social-button {
  background: var(--surface-high);
  color: var(--text);
}

.dog-ear {
  clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}

.wireframe-card {
  position: relative;
  border: 1px solid var(--stroke-card);
  background: var(--surface-lowest);
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.wireframe-card.hot {
  border-color: var(--lime);
}

.wireframe-card.dashed {
  border-style: dashed;
}

.wireframe-card::before,
.wireframe-card::after {
  content: "+";
  position: absolute;
  z-index: 1;
  color: var(--wire-plus, rgba(142, 147, 121, 0.76));
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.62;
  pointer-events: none;
}

.wireframe-card::before {
  top: -7px;
  left: -7px;
}

.wireframe-card::after {
  right: -7px;
  bottom: -7px;
}

.matrix-bg {
  background-image: radial-gradient(rgba(142, 147, 121, 0.32) 1px, transparent 1px);
  background-size: 10px 10px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  border-bottom: 1px solid var(--outline-variant);
  padding-bottom: var(--space-2);
}

.section-head > * {
  margin: 0;
}

.section > .muted,
.section-lede {
  margin: var(--space-2) 0 0;
  line-height: 1.62;
}

.section-head + .search-box,
.section-head + .profile-persona-list,
.section-head + .profile-nav-list,
.profile-connections-section > .profile-protocol-list {
  margin-top: var(--space-4);
}

.surface-stack {
  display: grid;
  gap: var(--space-3);
}

.split-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.center-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.flush {
  margin: 0;
}

.tone-primary {
  color: var(--lime);
}

.brutal-label {
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.toggle-switch {
  display: inline-grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  cursor: pointer;
}

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

.toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid var(--outline-variant);
  background: var(--surface-highest);
}

.toggle-track::after {
  content: "";
  position: absolute;
  top: 5px;
  left: 5px;
  width: 12px;
  height: 12px;
  background: var(--text);
  transition: transform 120ms ease, background 120ms ease;
}

.toggle-switch input:checked + .toggle-track {
  border-color: var(--lime);
  background: var(--lime);
}

.toggle-switch input:checked + .toggle-track::after {
  background: var(--lime-ink);
  transform: translateX(20px);
}

.toggle-switch input:focus-visible + .toggle-track {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.toggle-switch input:disabled + .toggle-track {
  opacity: 0.8;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

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

.surface-card {
  border: 1px solid var(--stroke-card);
  background: var(--surface);
}

.surface-card.hot {
  border-color: rgba(142, 147, 121, 0.76);
  box-shadow: inset 0 0 0 1px rgba(195, 244, 0, 0.08);
}

.post-card {
  position: relative;
  display: grid;
  gap: var(--card-gap);
  padding: var(--card-padding);
}

.hot-flag {
  position: absolute;
  top: -12px;
  left: -4px;
  background: var(--lime);
  color: var(--lime-ink);
  padding: 2px 8px;
}

.post-header,
.row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.post-header {
  align-items: flex-start;
  justify-content: space-between;
  min-width: 0;
}

.identity-button {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
}

.identity-button > div {
  min-width: 0;
}

.post-header > .icon-button {
  flex: 0 0 auto;
  margin-top: calc(var(--space-1) * -1);
  margin-right: calc(var(--space-2) * -1);
}

.post-menu {
  position: relative;
  flex: 0 0 auto;
  margin-top: calc(var(--space-1) * -1);
  margin-right: calc(var(--space-2) * -1);
}

.post-menu .icon-button {
  position: relative;
  z-index: 4;
}

.post-menu-popover {
  position: absolute;
  z-index: 6;
  top: calc(100% + var(--space-1));
  right: 0;
  min-width: 228px;
  display: grid;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  box-shadow: -5px 5px 0 rgba(0, 0, 0, 0.34);
  padding: var(--space-1);
}

.post-menu-item {
  appearance: none;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  border: 0;
  background: transparent;
  color: var(--text);
  padding: 8px 10px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  text-align: left;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.post-menu-item .material-icon {
  width: 16px;
  height: 16px;
}

.post-menu-item span {
  white-space: nowrap;
  text-transform: none;
}

.post-menu-item:hover,
.post-menu-item:focus,
.post-menu-item:focus-visible {
  background: rgba(195, 244, 0, 0.1);
  box-shadow: inset 3px 0 0 var(--lime);
  color: var(--lime);
  outline: 1px solid var(--lime);
  outline-offset: -1px;
}

.identity-button:disabled {
  opacity: 1;
  cursor: default;
}

.identity-button:not(:disabled):hover .post-name {
  color: var(--lime);
}

.avatar {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid var(--outline-variant);
  background: var(--surface-highest);
  color: var(--lime);
  font-family: var(--font-display);
  font-weight: 800;
}

.avatar.large {
  width: 56px;
  height: 56px;
}

.avatar > svg {
  display: block;
  width: 100%;
  height: 100%;
}

.persona-context {
  display: grid;
  gap: var(--space-3);
}

.persona-context-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
}

.persona-context-copy {
  min-width: 0;
}

.persona-context-copy .muted {
  line-height: 1.42;
}

.persona-manage-button {
  min-width: 92px;
  background: var(--surface-lowest);
  white-space: nowrap;
}

.persona-select-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  min-height: 52px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  padding: 0 var(--space-3);
}

.persona-select-row .section-title {
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

.persona-select {
  min-height: 44px;
  border-bottom: 0;
  background: transparent;
  font-weight: 700;
  text-align-last: right;
}

select.field.persona-select {
  border-bottom: 0;
  background: transparent;
  padding: 0 28px 0 0;
}

.persona-context.compact {
  gap: var(--space-2);
}

.post-name {
  margin: 0 0 4px;
  font-weight: 800;
}

.post-meta {
  max-width: 100%;
  margin: 0;
  font-size: 11px;
  line-height: 1.35;
  letter-spacing: 0.03em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.post-name,
.post-text,
.rewrite-text,
.preview-card,
.notification-item,
.topic-item,
.muted,
.button,
.chip,
.tab,
.segment,
.nav-item {
  overflow-wrap: anywhere;
}

.persona-card {
  width: 100%;
  min-height: 132px;
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  text-align: left;
}

.persona-card:hover {
  border-color: var(--lime);
}

.persona-switch-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
}

.persona-switch-copy {
  max-width: 34rem;
  margin: 0;
  line-height: 1.5;
}

.persona-switch-list {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.persona-new-button {
  min-width: 124px;
  overflow-wrap: normal;
  white-space: nowrap;
  word-break: keep-all;
}

.persona-switch-card {
  width: 100%;
  min-height: 84px;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
  color: var(--text);
  text-align: left;
}

.persona-switch-card.active {
  border-color: var(--lime);
  background: rgba(195, 244, 0, 0.08);
}

.persona-hero {
  display: grid;
  grid-template-columns: 56px 1fr;
  align-items: center;
  gap: var(--space-4);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.stat-number {
  margin: 8px 0 0;
  color: var(--lime);
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.rail {
  border-left: 4px solid var(--lime);
  padding: var(--space-2) 0 var(--space-2) var(--space-4);
}

.rail.blue {
  border-left-color: var(--blue);
  background: rgba(2, 102, 255, 0.07);
  padding-right: var(--space-3);
}

.post-text {
  margin: 0;
  line-height: 1.62;
}

.post-media-strip,
.post-media-preview {
  display: grid;
  gap: var(--space-3);
}

.post-media-preview.single {
  margin-top: 0;
}

.post-media {
  width: 100%;
  max-height: 520px;
  display: block;
  border: 1px solid var(--surface-highest);
  background: var(--surface-highest);
  object-fit: cover;
  aspect-ratio: 1 / 1;
}

.link-preview-strip {
  display: grid;
  gap: var(--space-2);
}

.link-preview-card {
  min-height: 76px;
  display: grid;
  grid-template-columns: 4px minmax(0, 1fr);
  border: 1px solid var(--surface-highest);
  background: var(--surface-low);
  color: var(--text);
  text-decoration: none;
}

.link-preview-card:hover {
  border-color: var(--blue);
  background: rgba(2, 102, 255, 0.08);
}

.link-preview-card.unavailable {
  border-color: var(--outline-variant);
  color: var(--text-muted);
}

.link-preview-card.unavailable:hover {
  border-color: var(--outline);
  background: var(--surface-low);
}

.link-preview-rail {
  background: var(--blue);
}

.link-preview-card.unavailable .link-preview-rail {
  background: var(--outline);
}

.link-preview-body {
  min-width: 0;
  padding: var(--space-3);
}

.entity-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.entity-chip {
  min-height: 44px;
  padding: 4px 10px;
  font-size: 12px;
}

.post-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  padding-top: var(--space-2);
}

.link-action {
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: 0 var(--space-1);
}

.link-action:hover {
  color: var(--lime);
}

.link-action.active,
.link-action[aria-pressed="true"] {
  color: var(--lime);
}

.danger-link:hover {
  color: var(--error);
}

.top-action-button {
  min-height: 44px;
  padding: 0 var(--space-3);
  white-space: nowrap;
}

.top-action-button .material-icon {
  width: 18px;
  height: 18px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 25;
  width: min(100%, 600px);
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--surface-highest);
  background: var(--background-strong);
}

@media (max-width: 759px) {
  .app-frame.has-bottom-nav {
    height: 100dvh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .app-frame.has-bottom-nav > .content {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: var(--space-4);
    scroll-padding-bottom: var(--space-8);
  }

  .app-frame.has-bottom-nav > .bottom-nav {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    width: 100%;
  }
}

.nav-item {
  min-height: 48px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: var(--space-1);
  border: 0;
  background: transparent;
  color: var(--text-muted);
  padding: var(--space-1) var(--space-2);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  transition: background-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.nav-item .material-icon {
  width: 20px;
  height: 20px;
}

.nav-item.active,
.nav-item[aria-current="page"] {
  color: var(--lime);
  background: rgba(195, 244, 0, 0.045);
  box-shadow: inset 0 2px 0 var(--lime);
}

.field {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-bottom: 2px solid var(--surface-highest);
  background: transparent;
  color: var(--text);
  padding: var(--space-3) 0;
  outline: none;
}

.field:focus {
  border-bottom-color: var(--lime);
}

select.field {
  background: var(--surface-low);
  color: var(--text);
  padding-inline: var(--space-2);
}

.textarea {
  width: 100%;
  min-height: clamp(190px, 30dvh, 260px);
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  line-height: 1.62;
  outline: none;
}

.compose-area {
  min-height: clamp(236px, 36dvh, 340px);
  display: grid;
  border: 1px solid var(--stroke-card);
  border-left: 4px solid var(--lime);
  background: var(--surface-lowest);
  padding: var(--space-4) var(--space-4) var(--space-4) var(--space-5);
}

.compose-area:focus-within {
  border-color: var(--lime);
  background: rgba(195, 244, 0, 0.03);
}

.compose-workbench,
.compose-editor-section,
.compose-rail,
.compose-submit-card {
  display: grid;
  gap: var(--space-4);
}

.compose-rail {
  align-content: start;
}

.compose-submit-card {
  display: none;
}

.compose-submit-copy {
  min-width: 0;
}

.compose-submit-copy .muted {
  margin: var(--space-1) 0 0;
  font-size: 12px;
  line-height: 1.45;
}

.compose-submit-card .button {
  min-height: 56px;
}

.compose-meta-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-3);
  min-height: 24px;
  margin-top: var(--space-2);
}

.compose-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.compose-tool-card {
  min-height: 92px;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: start;
  gap: var(--space-3);
  border: 1px solid var(--outline-variant);
  background: var(--surface-low);
  padding: var(--space-3);
}

.compose-tool-card .material-icon {
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  color: var(--lime);
}

.compose-tool-card .muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.compose-action-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-4);
  padding: var(--space-3);
  background: var(--surface-lowest);
}

.compose-action-copy {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.compose-action-copy .material-icon {
  width: 36px;
  height: 36px;
  padding: 7px;
  border: 1px solid var(--stroke-card);
  background: var(--background);
  color: var(--lime);
}

.compose-action-copy .muted {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
}

.compose-counter {
  color: var(--text-muted);
}

.compose-counter.over-limit {
  color: var(--error);
}

.compose-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.compose-action-buttons .file-trigger {
  min-width: 112px;
}

.compose-media-card {
  display: grid;
  gap: var(--space-3);
}

.compose-media-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4);
}

.compose-media-copy {
  min-width: 0;
}

.post-lifecycle-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-2);
}

.post-edit-panel {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--surface-highest);
}

.post-edit-media {
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--surface-highest);
  background: var(--surface-lowest);
}

.section {
  margin: 0;
}

.section-title {
  margin: 0 0 var(--space-3);
  color: var(--text-muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
  gap: var(--space-2);
}

.choice-grid.compact {
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}

.chip {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--text-muted);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 6px 14px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
}

.chip.single {
  width: 100%;
  padding: 8px 10px;
}

.nationality-grid {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.nationality-choice {
  justify-content: flex-start;
  gap: var(--space-2);
  text-align: left;
}

.nationality-flag {
  width: 24px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
  background: transparent;
}

.nationality-flag-img {
  display: block;
  width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

.chip.active,
.chip[aria-pressed="true"] {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--off-white);
}

.chip:disabled,
.button:disabled {
  opacity: 0.52;
  cursor: not-allowed;
  filter: none;
}

.interest-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-2);
  align-items: stretch;
}

.range {
  width: 100%;
  accent-color: var(--lime);
}

.range-labels {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: var(--space-2);
  margin-top: var(--space-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  word-break: keep-all;
}

.persona-content {
  gap: var(--space-6);
}

.persona-lede {
  display: grid;
  gap: var(--space-3);
  border-bottom: 1px solid var(--outline-variant);
  padding-bottom: var(--space-4);
}

.persona-lede-head {
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.persona-lede-head .screen-title {
  min-width: 0;
  flex: 1 1 240px;
}

.persona-random-button {
  flex: 0 0 auto;
  min-width: 84px;
  padding-inline: var(--space-3);
  white-space: nowrap;
  word-break: keep-all;
}

.persona-random-button > span {
  white-space: nowrap;
}

.persona-lede > .muted {
  max-width: 42rem;
  margin: 0;
  line-height: 1.62;
}

.session-note {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  border: 1px solid var(--outline-variant);
  border-left: 4px solid var(--lime);
  background: rgba(195, 244, 0, 0.035);
  color: var(--text);
  padding: var(--space-4);
}

.session-note .material-icon {
  color: var(--lime);
}

.persona-switch-section,
.persona-form-section {
  display: grid;
  gap: var(--space-3);
  border-top: 1px solid var(--surface-highest);
  padding-top: var(--space-4);
}

.persona-form-cluster {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--surface-lowest);
  border-color: var(--outline-variant);
}

.persona-form-cluster-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  border-bottom: 1px solid var(--surface-highest);
  padding-bottom: var(--space-3);
}

.persona-form-cluster-head .brutal-label {
  color: var(--lime);
}

.persona-form-cluster-body {
  display: grid;
  gap: var(--space-4);
}

.persona-form-cluster .persona-form-section {
  border-top: 0;
  padding-top: 0;
}

.persona-form-cluster .persona-form-section + .persona-form-section {
  border-top: 1px solid var(--surface-highest);
  padding-top: var(--space-4);
}

.persona-switch-section {
  border-top-color: var(--outline-variant);
}

.persona-image-panel,
.persona-preview-panel {
  display: grid;
  gap: var(--space-4);
}

.persona-onboarding-rail,
.persona-settings-rail {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.persona-image-panel {
  border-color: var(--outline-variant);
  background: var(--surface-low);
}

.persona-image-panel-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-3);
}

.persona-image-panel .file-trigger {
  justify-self: end;
  margin-left: 0;
}

.persona-image-copy-row {
  min-width: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.persona-image-copy {
  min-width: 0;
}

.persona-image-status {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.38;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.persona-form-section > .row:first-child .section-title {
  margin: 0;
}

.persona-form-section .muted {
  margin-top: 0;
  line-height: 1.52;
}

.persona-preview-panel {
  border-left: 4px solid var(--lime);
  background: rgba(195, 244, 0, 0.035);
}

.persona-preview-panel .rail {
  background: rgba(14, 14, 14, 0.38);
}

.persona-preview-cta {
  display: grid;
  gap: var(--space-2);
  border-top: 1px solid var(--surface-highest);
  padding-top: var(--space-4);
}

.persona-save-button {
  min-height: 52px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}

@media (min-width: 760px) {
  :root {
    --content-bottom-safe: var(--space-8);
  }

  .bottom-nav {
    position: static;
    left: auto;
    transform: none;
    width: 100%;
    margin-top: var(--space-2);
  }
}

@media (min-width: 1024px) {
  .app-shell {
    min-height: 100dvh;
    background:
      radial-gradient(rgba(195, 244, 0, 0.08) 0.5px, transparent 0.5px),
      #000;
    background-size: 12px 12px;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) {
    width: min(100%, 1180px);
    max-width: none;
    border-left: 1px solid var(--outline-variant);
    border-right: 1px solid var(--outline-variant);
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-content {
    min-height: 100dvh;
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 420px);
    grid-template-areas:
      "brand visual"
      "copy visual"
      "protocol actions"
      "protocol social"
      "alert error";
    align-content: center;
    align-items: stretch;
    column-gap: var(--space-8);
    row-gap: var(--space-5);
    padding: var(--space-8);
    text-align: left;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-panel {
    grid-area: brand;
    width: 100%;
    padding: var(--space-6);
    text-align: left;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-brand {
    font-size: 64px;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-language-button {
    margin: var(--space-5) 0 0;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-dot-visual {
    grid-area: visual;
    place-self: stretch;
    width: 100%;
    min-height: 420px;
    max-height: 520px;
    aspect-ratio: 1 / 1;
    padding: var(--space-6);
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-copy {
    grid-area: copy;
    max-width: 640px;
    padding: 0 var(--space-6);
    text-align: left;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-copy .screen-title {
    font-size: 36px;
    line-height: 1.05;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-copy .muted {
    max-width: 560px;
    margin: var(--space-3) 0 0;
    font-size: 18px;
    line-height: 1.58;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-desktop-panel {
    grid-area: protocol;
    align-self: start;
    display: grid;
    align-content: start;
    gap: var(--space-4);
    padding: var(--space-5);
  }

  .auth-desktop-signal-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid var(--outline-variant);
  }

  .auth-desktop-signal-grid > div {
    min-width: 0;
    display: grid;
    gap: var(--space-2);
    padding: var(--space-4);
    border-right: 1px solid var(--outline-variant);
  }

  .auth-desktop-signal-grid > div:last-child {
    border-right: 0;
  }

  .auth-desktop-signal-grid strong,
  .auth-desktop-signal-grid span {
    overflow: hidden;
    font-family: var(--font-mono);
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .auth-desktop-signal-grid strong {
    color: var(--lime);
    font-size: 22px;
    line-height: 1;
  }

  .auth-desktop-signal-grid span {
    color: var(--text-muted);
    font-size: 10px;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-actions {
    grid-area: actions;
    align-self: end;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-actions .button {
    min-height: 64px;
    font-size: 18px;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-social-card {
    grid-area: social;
    align-self: start;
    padding: var(--space-5);
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-provider-grid {
    grid-template-columns: 1fr;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-provider-grid .button {
    justify-content: flex-start;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-config-warning {
    grid-area: alert;
  }

  .app-frame.auth-gate:not(.has-desktop-shell) .auth-error {
    grid-area: error;
  }

  .app-frame.has-desktop-shell {
    width: 100%;
    max-width: none;
    min-height: 100dvh;
    margin: 0;
    padding: 64px var(--space-6) var(--space-8) calc(256px + var(--space-6));
    border: 0;
    background: transparent;
  }

  .app-frame.has-desktop-shell > .top-bar,
  .app-frame.has-desktop-shell > .bottom-nav {
    display: none;
  }

  .app-frame.has-desktop-shell > .content,
  .app-frame.has-desktop-shell > .tabs,
  .app-frame.has-desktop-shell > .segmented,
  .app-frame.has-desktop-shell > .desktop-page-head {
    width: min(100%, 820px);
    margin-left: 0;
    margin-right: auto;
  }

  .app-frame.has-desktop-shell > .content {
    padding: var(--space-5) 0 var(--space-10);
    gap: var(--space-5);
  }

  .app-frame.has-desktop-shell > .tabs {
    margin-top: var(--space-5);
  }

  .app-frame.has-desktop-shell > .feed-tabs {
    display: none;
  }

  .desktop-page-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: var(--space-5);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--outline-variant);
  }

  .desktop-page-head h1 {
    margin: 0;
    color: var(--lime);
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 900;
    line-height: 0.95;
    letter-spacing: 0;
  }

  .desktop-page-head p {
    margin: var(--space-1) 0 0;
  }

  .notification-tabs-section {
    display: none;
  }

  .desktop-tabs {
    width: min(320px, 40%);
    flex: 0 0 auto;
  }

  .desktop-feed-tabs,
  .desktop-result-tabs {
    width: min(420px, 48%);
    flex: 0 0 auto;
    margin: 0;
  }

  .app-frame.has-desktop-shell .search-tabs-section {
    display: none;
  }

  .app-frame.has-desktop-shell.route-notifications .notification-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 316px);
    align-items: start;
    gap: var(--space-4);
  }

  .app-frame.has-desktop-shell.route-notifications .notification-settings-section {
    position: sticky;
    top: 88px;
    align-self: start;
  }

  .app-frame.has-desktop-shell.route-notifications .notification-settings-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-frame.has-desktop-shell.route-notifications .notification-settings-grid .notification-setting[data-notification-setting="push-enabled"] {
    grid-column: auto;
  }

  .app-frame.has-desktop-shell.route-notifications .notification-settings-save {
    min-height: 52px;
  }

  .app-frame.has-desktop-shell.route-compose > .content,
  .app-frame.has-desktop-shell.route-compose > .desktop-page-head {
    width: min(100%, 940px);
  }

  .app-frame.has-desktop-shell.route-compose .blocking-content {
    gap: var(--space-4);
  }

  .app-frame.has-desktop-shell.route-compose .compose-workbench {
    grid-template-columns: minmax(400px, 1fr) minmax(260px, 300px);
    align-items: start;
    gap: var(--space-4);
  }

  .app-frame.has-desktop-shell.route-compose .compose-editor-section {
    min-width: 0;
  }

  .app-frame.has-desktop-shell.route-compose .compose-area {
    min-height: min(54dvh, 476px);
    padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6);
  }

  .app-frame.has-desktop-shell.route-compose .compose-area .textarea {
    min-height: min(46dvh, 408px);
  }

  .app-frame.has-desktop-shell.route-compose .compose-rail {
    position: sticky;
    top: 88px;
    gap: var(--space-3);
  }

  .app-frame.has-desktop-shell.route-compose .compose-persona-card,
  .app-frame.has-desktop-shell.route-compose .compose-submit-card,
  .app-frame.has-desktop-shell.route-compose .compose-media-card,
  .app-frame.has-desktop-shell.route-compose .compose-action-strip {
    margin: 0;
  }

  .app-frame.has-desktop-shell.route-compose .compose-submit-card {
    display: grid;
  }

  .app-frame.has-desktop-shell.route-compose .compose-action-strip {
    grid-template-columns: 1fr;
    align-items: stretch;
    gap: var(--space-3);
  }

  .app-frame.has-desktop-shell.route-compose .compose-action-buttons,
  .app-frame.has-desktop-shell.route-compose .compose-action-buttons .file-trigger {
    width: 100%;
  }

  .app-frame:not(.has-desktop-shell).route-compose,
  .app-frame:not(.has-desktop-shell).route-post-detail {
    width: min(100%, 860px);
  }

  .desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 45;
    width: 256px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: var(--space-6);
    padding: var(--space-4);
    border-right: 1px solid var(--outline);
    background: #000;
  }

  .desktop-sidebar-main,
  .desktop-sidebar-footer,
  .desktop-nav-list {
    display: grid;
    gap: var(--space-2);
  }

  .desktop-sidebar-main {
    gap: var(--space-8);
  }

  .desktop-brand-block {
    display: grid;
    gap: var(--space-1);
  }

  .desktop-brand {
    margin: 0;
    color: var(--lime);
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 900;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
  }

  .desktop-brand-sub {
    margin: 0;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
    line-height: 1.2;
    opacity: 0.62;
    text-transform: uppercase;
  }

  .desktop-nav-item,
  .desktop-compose-button,
  .desktop-operator-card {
    min-height: 44px;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .desktop-nav-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-2);
    text-align: left;
  }

  .desktop-nav-item:hover,
  .desktop-nav-item:focus-visible {
    background: var(--surface-highest);
    color: var(--lime);
  }

  .desktop-nav-item.active {
    border: 1px solid var(--lime);
    background: var(--surface-high);
    color: var(--lime);
  }

  .desktop-nav-item.compact {
    min-height: 44px;
    opacity: 0.78;
  }

  .desktop-compose-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    min-height: 52px;
    padding: 0 var(--space-4);
    background: var(--lime);
    color: var(--lime-ink);
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 0 100%);
  }

  .desktop-operator-card {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    min-height: 48px;
    padding: var(--space-2);
    border: 1px solid var(--outline-variant);
    color: var(--text);
    text-align: left;
  }

  .desktop-operator-card .avatar {
    width: 32px;
    height: 32px;
  }

  .desktop-operator-card span {
    min-width: 0;
    display: grid;
    gap: 2px;
  }

  .desktop-operator-card strong,
  .desktop-operator-card em {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-operator-card strong {
    color: var(--lime);
    font-size: 10px;
    font-style: normal;
  }

  .desktop-operator-card em {
    color: var(--text-muted);
    font-size: 9px;
    font-style: normal;
  }

  .desktop-topbar {
    position: fixed;
    top: 0;
    right: 0;
    left: 256px;
    z-index: 40;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
    padding: 0 var(--space-10);
    border-bottom: 1px solid var(--outline);
    background: #000;
  }

  .desktop-topbar-left,
  .desktop-topbar-right {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: var(--space-4);
  }

  .desktop-topbar .icon-button {
    flex: 0 0 44px;
    min-width: 44px;
  }

  .desktop-terminal,
  .desktop-status,
  .desktop-scope,
  .desktop-route-title {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 900;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .desktop-terminal,
  .desktop-status {
    color: var(--lime);
  }

  .desktop-route-title,
  .desktop-scope {
    color: var(--text-muted);
  }

  .desktop-divider {
    width: 1px;
    height: 18px;
    background: var(--outline-variant);
  }

  .desktop-status-dot {
    width: 8px;
    height: 8px;
    background: var(--lime);
    box-shadow: 0 0 10px rgba(195, 244, 0, 0.48);
  }

  .desktop-system-rail {
    display: none;
  }

  .profile-hero-inner {
    grid-template-columns: 132px minmax(0, 1fr);
    justify-items: start;
    align-items: center;
    text-align: left;
  }

  .profile-hero-copy {
    justify-items: start;
  }

  .profile-badges {
    justify-content: start;
  }

  .persona-form-cluster-body {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .persona-image-panel,
  .persona-form-section[data-persona-section="nationality"],
  .persona-form-voice .persona-form-section:last-child,
  .persona-form-topics .persona-form-section:first-child {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1180px) {
  .app-frame.has-desktop-shell {
    padding-right: calc(320px + var(--space-10));
  }

  .app-frame.has-desktop-shell > .content,
  .app-frame.has-desktop-shell > .tabs,
  .app-frame.has-desktop-shell > .segmented,
  .app-frame.has-desktop-shell > .desktop-page-head {
    width: min(100%, 920px);
  }

  .app-frame.has-desktop-shell.route-compose > .content,
  .app-frame.has-desktop-shell.route-compose > .desktop-page-head {
    width: min(100%, 980px);
  }

  .app-frame.has-desktop-shell.route-notifications > .content,
  .app-frame.has-desktop-shell.route-notifications > .desktop-page-head {
    width: min(100%, 980px);
  }

  .app-frame.has-desktop-shell.route-compose {
    padding-right: var(--space-6);
  }

  .app-frame.has-desktop-shell.route-compose .desktop-system-rail {
    display: none;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) {
    padding-right: var(--space-6);
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .desktop-system-rail {
    display: none;
  }

  .app-frame.has-desktop-shell.route-notifications {
    padding-right: var(--space-6);
  }

  .app-frame.has-desktop-shell.route-notifications .desktop-system-rail {
    display: none;
  }

  .app-frame.has-desktop-shell.route-profile,
  .app-frame.has-desktop-shell.route-policy,
  .app-frame.has-desktop-shell.route-language {
    padding-right: var(--space-6);
  }

  .app-frame.has-desktop-shell.route-profile .desktop-system-rail,
  .app-frame.has-desktop-shell.route-policy .desktop-system-rail,
  .app-frame.has-desktop-shell.route-language .desktop-system-rail {
    display: none;
  }

  .app-frame.has-desktop-shell.route-profile > .content,
  .app-frame.has-desktop-shell.route-profile > .desktop-page-head,
  .app-frame.has-desktop-shell.route-policy > .content,
  .app-frame.has-desktop-shell.route-policy > .desktop-page-head,
  .app-frame.has-desktop-shell.route-language > .content,
  .app-frame.has-desktop-shell.route-language > .desktop-page-head {
    width: min(100%, 1080px);
  }

  .app-frame.has-desktop-shell.route-language .language-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .blocking-content {
    grid-template-columns: minmax(300px, 0.9fr) minmax(320px, 1fr) minmax(320px, 0.84fr);
    grid-template-areas:
      "identity voice preview"
      "signals topics preview";
    gap: var(--space-5);
  }

  .desktop-system-rail {
    position: fixed;
    top: 88px;
    right: var(--space-6);
    bottom: var(--space-6);
    z-index: 30;
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
  }

  .desktop-rail-panel,
  .desktop-scan-panel {
    position: relative;
    border: 1px solid var(--outline-variant);
    background: rgba(14, 14, 14, 0.86);
    padding: var(--space-4);
  }

  .desktop-rail-badge {
    position: absolute;
    top: 0;
    right: 0;
    padding: 3px 5px;
    background: var(--lime);
    color: var(--lime-ink);
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 900;
  }

  .desktop-rail-panel h2 {
    margin: 0 0 var(--space-4);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--lime);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 900;
  }

  .desktop-rail-persona {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3);
    border: 1px solid var(--outline-variant);
    background: var(--surface-lowest);
  }

  .desktop-rail-persona .avatar {
    width: 48px;
    height: 48px;
  }

  .desktop-meter {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-1) var(--space-3);
    margin-top: var(--space-4);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 10px;
  }

  .desktop-meter strong {
    color: var(--lime);
  }

  .desktop-meter i {
    grid-column: 1 / -1;
    height: 4px;
    display: block;
    background: var(--lime);
  }

  .desktop-log-list {
    height: 128px;
    margin-top: var(--space-5);
    padding-top: var(--space-4);
    overflow: hidden;
    border-top: 1px solid var(--outline-variant);
    font-family: var(--font-mono);
    font-size: 9px;
    color: var(--text-muted);
  }

  .desktop-log-list p {
    margin: 0 0 5px;
  }

  .desktop-log-list .ok {
    color: var(--lime);
  }

  .desktop-log-list .err {
    color: var(--error);
  }

  .desktop-check {
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    color: var(--text-muted);
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 800;
  }

  .desktop-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--lime);
  }

  .desktop-scan-panel {
    flex: 1 1 auto;
    display: grid;
    place-items: center;
    gap: var(--space-4);
    min-height: 220px;
    text-align: center;
    opacity: 0.82;
  }

  .desktop-scan-panel .avatar.large {
    width: 128px;
    height: 128px;
  }

  .desktop-scan-panel span {
    max-width: 18ch;
    color: var(--lime);
    font-family: var(--font-mono);
    font-size: 8px;
    font-weight: 900;
    line-height: 1.6;
    letter-spacing: 3px;
  }

  .profile-persona-list,
  .profile-connections-section > .profile-protocol-list,
  .profile-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-persona-card.active {
    grid-column: 1 / -1;
  }
}

@media (max-width: 520px) {
  .design-hero,
  .design-progress-stage {
    grid-template-columns: 1fr;
  }

  .design-hero-avatar {
    width: 88px;
    height: 88px;
  }

  .design-swatch-grid,
  .design-dot-grid,
  .design-component-grid,
  .design-fixture-grid {
    grid-template-columns: 1fr;
  }

  .interest-input-row {
    grid-template-columns: 1fr;
  }

  .persona-image-panel-main {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .persona-image-panel .file-trigger {
    justify-self: stretch;
    width: 100%;
  }
}

.language-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.language-list + .empty-state {
  margin-top: var(--space-3);
}

.language-option {
  width: 100%;
  min-height: 112px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 44px;
  align-items: center;
  gap: var(--space-4);
  position: relative;
  border: 1px solid var(--outline-variant);
  background: var(--surface-low);
  color: var(--text);
  padding: var(--space-5);
  text-align: left;
  transition: border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}

.language-option:hover {
  border-color: var(--lime);
  background: var(--surface);
}

.language-option.active {
  border-color: var(--lime);
  background:
    radial-gradient(rgba(195, 244, 0, 0.16) 1px, transparent 1px),
    var(--surface-lowest);
  background-size: 10px 10px;
}

.language-option.active .post-name {
  color: var(--lime);
}

.language-flag {
  width: 52px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--outline-variant);
  padding: 3px;
}

.language-flag-img {
  display: block;
  width: 100%;
  max-height: 100%;
  height: auto;
  object-fit: contain;
}

.language-copy {
  min-width: 0;
  display: grid;
  gap: var(--space-1);
}

.language-copy > * {
  margin: 0;
}

.language-status {
  width: 44px;
  min-height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.language-option-copy {
  margin-top: var(--space-1);
  text-transform: none;
  line-height: 1.45;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.language-settings-grid .preview-card {
  display: grid;
  align-content: start;
  gap: var(--space-3);
}

.language-settings-grid .section-title {
  margin: 0;
}

.language-option.active .language-status {
  border-color: var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.language-status .material-icon {
  width: 18px;
  height: 18px;
}

.preview-card {
  border: 1px solid var(--stroke-card);
  background: var(--surface);
  padding: var(--card-padding);
}

.design-system-content {
  gap: var(--space-8);
}

.design-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  align-items: center;
  gap: var(--space-6);
  border-bottom: 1px solid var(--surface-highest);
  padding: var(--space-8) 0;
}

.design-hero-avatar {
  width: 104px;
  height: 104px;
  border: 1px solid var(--outline-variant);
  padding: var(--space-2);
  background: var(--surface-lowest);
}

.design-hero-avatar .avatar {
  width: 100%;
  height: 100%;
}

.design-panel {
  display: grid;
  gap: var(--space-4);
  border-top: 1px solid var(--surface-highest);
  padding-top: var(--space-6);
}

.design-panel-head {
  display: grid;
  gap: var(--space-2);
}

.design-panel-head .screen-title {
  margin: 0;
}

.design-panel-head .muted {
  max-width: 760px;
  margin: 0;
}

.design-panel-body {
  display: grid;
  gap: var(--space-4);
}

.design-swatch-grid,
.design-dot-grid,
.design-component-grid,
.design-fixture-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--space-3);
}

.design-swatch-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.design-swatch,
.design-dot-card,
.design-component-card,
.design-icon-tile,
.design-fixture-link {
  padding: var(--space-4);
}

.design-swatch {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-3);
}

.design-swatch-chip {
  width: 52px;
  height: 52px;
  border: 1px solid var(--outline-variant);
}

.design-swatch-role {
  font-size: 12px;
  line-height: 1.35;
}

.design-progress-stage {
  min-height: 184px;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-5);
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  padding: var(--space-5);
}

.design-progress-copy {
  min-width: 0;
}

.comment-showcase-grid {
  display: grid;
  gap: var(--space-3);
}

.design-inline-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.design-component-card {
  display: grid;
  align-content: start;
  gap: var(--space-3);
}

.design-component-card .toggle-switch {
  min-height: 48px;
}

.design-dot-card {
  display: grid;
  gap: var(--space-3);
}

.design-dot-preview {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 160px;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
}

.design-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: var(--space-2);
}

.design-icon-tile {
  min-height: 92px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: var(--space-2);
  text-align: center;
}

.design-icon-tile .material-icon {
  color: var(--primary);
}

.design-icon-tile .mono {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: center;
}

.design-fixture-link {
  min-height: 84px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-2);
  color: var(--text);
  text-decoration: none;
}

.design-fixture-link .mono {
  grid-column: 1 / -1;
  color: var(--text-muted);
}

.design-fixture-link:hover,
.design-fixture-link:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
}

.blocking-surface {
  position: relative;
  display: grid;
  gap: var(--space-6);
}

.blocking-content {
  display: grid;
  gap: var(--space-6);
  transition: filter 140ms ease, opacity 140ms ease;
}

.blocking-surface.busy .blocking-content {
  filter: blur(2px);
  opacity: 0.58;
  pointer-events: none;
  user-select: none;
}

.blocking-overlay {
  position: absolute;
  inset: 0;
  z-index: 15;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: rgba(13, 13, 13, 0.42);
  animation: blocking-overlay-in 160ms steps(2, end) both;
}

.blocking-panel {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(100%, 320px);
  border: 1px solid var(--lime);
  background: rgba(14, 14, 14, 0.94);
  color: var(--text);
  padding: var(--space-4);
  box-shadow: 0 0 0 1px var(--background-strong);
  transform: translate(-50%, -50%);
  animation: blocking-panel-in 180ms steps(2, end) both;
}

.blocking-panel p {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

.dot-progress {
  --dot-size: 8px;
  --progress-primary: var(--primary);
  --progress-secondary: var(--secondary);
  position: relative;
  width: 84px;
  height: 84px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--outline-variant);
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--progress-primary) 8%, transparent) 1px, transparent 1px),
    linear-gradient(0deg, color-mix(in srgb, var(--progress-primary) 8%, transparent) 1px, transparent 1px),
    var(--surface-lowest);
  background-size: 12px 12px;
  box-shadow: inset 0 0 0 1px rgba(14, 14, 14, 0.9);
}

.dot-progress::before {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid color-mix(in srgb, var(--progress-primary) 32%, transparent);
}

.dot-progress::after {
  content: "";
  position: absolute;
  left: 0;
  top: -14px;
  width: 100%;
  height: 14px;
  background:
    radial-gradient(circle, var(--progress-primary) 0 2px, transparent 2.6px),
    radial-gradient(circle, color-mix(in srgb, var(--progress-secondary) 72%, transparent) 0 1.5px, transparent 2.2px);
  background-position: 6px 7px, 18px 7px;
  background-size: 24px 14px;
  animation: dot-progress-sweep 1080ms steps(7, end) infinite;
  opacity: 0.88;
}

.dot-progress span {
  --dot-angle: calc(var(--dot-index) * 30deg);
  position: absolute;
  left: calc(50% - var(--dot-size) / 2);
  top: calc(50% - var(--dot-size) / 2);
  width: var(--dot-size);
  height: var(--dot-size);
  background: var(--progress-primary);
  z-index: 1;
  transform: rotate(var(--dot-angle)) translateY(-30px);
  animation: dot-progress-pulse 960ms steps(5, end) infinite;
  animation-delay: calc(var(--dot-index) * 80ms);
  opacity: 0.2;
}

.dot-progress span:nth-child(even) {
  background: var(--progress-secondary);
}

@keyframes blocking-overlay-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes blocking-panel-in {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes dot-progress-sweep {
  from {
    transform: translateY(-14px);
  }

  to {
    transform: translateY(98px);
  }
}

@keyframes dot-progress-pulse {
  0%,
  100% {
    opacity: 0.12;
    box-shadow: none;
    transform: rotate(var(--dot-angle)) translateY(-30px) scale(0.72);
  }

  40% {
    opacity: 1;
    box-shadow: 0 0 0 3px rgba(195, 244, 0, 0.22);
    transform: rotate(var(--dot-angle)) translateY(-30px) scale(1.24);
  }

  70% {
    opacity: 0.44;
    box-shadow: 0 0 0 1px rgba(229, 226, 225, 0.16);
    transform: rotate(var(--dot-angle)) translateY(-30px) scale(0.92);
  }
}

.persona-summary-chips {
  max-width: 100%;
  justify-content: flex-start;
}

.comment-identity {
  width: 100%;
}

button.preview-card {
  width: 100%;
  color: var(--text);
  font: inherit;
  text-align: left;
}

button.preview-card:hover {
  border-color: var(--lime);
  background: var(--surface);
}

.comment-list {
  display: grid;
  gap: var(--space-4);
  margin-top: var(--space-4);
}

.comment-card {
  display: grid;
  gap: var(--space-3);
}

.comment-card-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: start;
  gap: var(--space-2);
}

.comment-card-header .icon-button {
  justify-self: end;
}

.comment-card-header .identity-button {
  min-height: 44px;
}

.comment-body {
  margin: 0;
  color: var(--text);
  line-height: 1.58;
}

.comment-composer {
  display: grid;
  gap: var(--space-4);
}

.comment-composer .blocking-content {
  gap: var(--space-4);
}

.comment-composer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.comment-composer-header .section-title {
  margin: 0;
}

.comment-composer-meta {
  margin: 0;
  color: var(--lime);
  line-height: 1.25;
}

.comment-composer-badge {
  flex: 0 0 auto;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  color: var(--text-muted);
  padding: 6px 8px;
}

.comment-compose-area {
  min-height: clamp(124px, 20dvh, 172px);
  display: grid;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  padding: var(--space-3);
}

.comment-compose-area:focus-within {
  border-color: var(--lime);
  box-shadow: inset 4px 0 0 var(--lime);
  background: rgba(195, 244, 0, 0.03);
}

.comment-textarea {
  min-height: 104px;
}

.comment-submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
}

.comment-submit-row .button {
  min-width: 144px;
}

.rewrite-hero {
  border: 1px solid var(--surface-highest);
  border-left: 4px solid var(--lime);
  background: var(--surface-high);
  padding: var(--space-6) var(--space-4);
}

.rewrite-text {
  margin: 0;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  line-height: 1.25;
}

.warning {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  border: 2px solid var(--error);
  background: rgba(255, 180, 171, 0.09);
  color: var(--error-text);
  padding: var(--space-4);
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--surface-highest);
  background: var(--surface-lowest);
}

.segment {
  min-height: 44px;
  border: 0;
  border-left: 1px solid var(--surface-highest);
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-family: var(--font-mono);
  font-size: 12px;
  text-transform: uppercase;
}

.segment:first-child {
  border-left: 0;
}

.segment.active {
  background: var(--surface-low);
  color: var(--lime);
  box-shadow: inset 0 0 0 1px var(--lime);
}

.search-box {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  position: relative;
  border: 1px solid var(--outline-variant);
  background: var(--surface-lowest);
  padding: 0 var(--space-4);
}

.search-box:focus-within {
  border-color: var(--lime);
}

.search-box input {
  min-height: 56px;
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
}

.search-suggestion-block {
  display: grid;
  gap: var(--space-5);
}

.search-chip-row {
  gap: var(--space-3);
}

.search-affordance {
  display: grid;
  gap: var(--space-3);
}

.search-affordance > .muted {
  margin: 0;
}

.search-tabs-section .result-tabs {
  margin: 0;
}

.search-signal-strip {
  min-height: 92px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: var(--space-4);
  overflow: hidden;
  border-color: var(--outline-variant);
  background:
    linear-gradient(90deg, rgba(2, 102, 255, 0.14), transparent 58%),
    radial-gradient(rgba(195, 244, 0, 0.22) 1px, transparent 1px),
    var(--surface-lowest);
  background-size: auto, 10px 10px, auto;
  padding: var(--space-4);
}

.search-signal-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid var(--lime);
  background: var(--lime);
  color: var(--lime-ink);
}

.search-signal-copy {
  min-width: 0;
  display: grid;
  gap: var(--space-1);
}

.search-signal-kicker,
.search-signal-copy .post-name,
.search-signal-copy .muted {
  margin: 0;
}

.search-signal-kicker {
  color: var(--lime);
}

.search-results-section {
  display: grid;
  gap: var(--space-4);
}

.search-results-head {
  align-items: center;
}

.search-results-head .screen-title {
  font-size: 24px;
}

.search-result-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.search-topic-list {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-4);
}

.notification-workbench {
  display: grid;
  gap: var(--space-5);
  min-width: 0;
}

.notification-feed > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-3);
}

.topic-item,
.notification-item {
  border: 1px solid var(--outline-variant);
  background: var(--surface-low);
  padding: var(--space-4);
}

.notification-item.accent-rail {
  border-left: 4px solid var(--lime);
}

.notification-read-button {
  min-width: 60px;
  white-space: nowrap;
}

.notification-setting {
  min-height: 104px;
  padding: var(--space-4);
}

.notification-settings-grid .notification-setting[data-notification-setting="push-enabled"] {
  grid-column: 1 / -1;
  min-height: 88px;
}

.notification-settings-save {
  margin-top: var(--space-4);
}

@media (min-width: 1024px) {
  .app-frame.has-desktop-shell.route-notifications .notification-settings-grid .notification-setting[data-notification-setting="push-enabled"] {
    grid-column: auto;
  }
}

.notification-setting .muted {
  font-size: 12px;
}

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

.file-input:focus-visible + .file-trigger {
  outline: 2px solid var(--lime);
  outline-offset: 3px;
}

.topic-item {
  width: 100%;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: var(--space-4);
  color: var(--text);
  text-align: left;
}

.topic-item:hover {
  border-color: var(--lime);
  background: var(--surface-high);
}

.topic-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--lime);
  color: var(--lime-ink);
}

.empty-state,
.error-state,
.loading-state {
  border: 1px dashed var(--outline-variant);
  background: rgba(32, 31, 31, 0.62);
  padding: var(--space-6);
  color: var(--text-muted);
  text-align: center;
}

@media (max-width: 420px) {
  .brand {
    font-size: 28px;
  }

  .grid-2 {
    grid-template-columns: 1fr;
  }

  .search-result-grid {
    grid-template-columns: 1fr;
  }

  .rewrite-text {
    font-size: 22px;
  }

  .post-lifecycle-actions {
    grid-template-columns: 1fr;
  }

  .notification-settings-grid {
    gap: var(--space-2);
  }

  .notification-setting {
    min-height: 92px;
    padding: var(--space-3) var(--space-4);
  }

  .notification-settings-grid .notification-setting[data-notification-setting="push-enabled"] {
    min-height: 92px;
  }

  .notification-settings-save {
    margin-top: var(--space-3);
  }

  .persona-context-main {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .language-option {
    grid-template-columns: 48px minmax(0, 1fr) 40px;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-4);
  }

  .language-option .language-copy {
    display: contents;
  }

  .language-option .language-copy .post-name {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .language-option .language-copy > .muted:not(.language-option-copy) {
    grid-column: 2;
    grid-row: 2;
    align-self: start;
  }

  .language-option .language-option-copy {
    grid-column: 1 / -1;
    grid-row: 3;
    margin-top: var(--space-1);
  }

  .language-flag {
    width: 48px;
    height: 36px;
  }

  .language-status {
    grid-column: 3;
    grid-row: 1 / span 2;
    justify-self: end;
    align-self: center;
    width: 40px;
    min-width: 40px;
    min-height: 34px;
    padding-inline: 0;
  }

  .persona-manage-button {
    grid-column: auto;
    justify-self: end;
    max-width: none;
    text-align: left;
  }
}

@media (min-width: 760px) {
  .policy-layout {
    grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr);
    align-items: start;
  }

  .policy-primary,
  .policy-secondary {
    grid-column: 1;
  }

  .policy-support {
    position: sticky;
    top: 88px;
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .policy-hero {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: end;
  }
}

@media (max-width: 520px) {
  .policy-fact-grid {
    grid-template-columns: 1fr;
  }

  .profile-persona-row {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    gap: var(--space-3);
  }

  .profile-protocol-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: var(--space-3);
  }

  .profile-avatar-frame .avatar.large {
    width: 104px;
    height: 104px;
  }

  .auth-content {
    justify-content: start;
  }

  .auth-dot-visual {
    width: min(52vw, 204px, 25dvh);
  }

  .auth-provider-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }

  .auth-provider-grid .button {
    min-height: 52px;
    padding: var(--space-1);
    flex-direction: row;
    gap: var(--space-1);
    font-size: 12px;
    line-height: 1.12;
    white-space: normal;
  }

  .compose-media-row {
    grid-template-columns: 1fr;
  }

  .compose-action-strip {
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .compose-action-buttons,
  .compose-action-buttons .file-trigger,
  .compose-media-row .file-trigger {
    width: 100%;
  }

  .persona-lede-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .persona-lede-head .screen-title {
    width: 100%;
  }

  .persona-random-button {
    justify-self: start;
  }

  .policy-card,
  .policy-support,
  .profile-hero {
    padding: var(--space-4);
  }
}

@media (min-width: 1024px) {
  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) > .persona-content.persona-settings-content {
    width: min(100%, 1120px);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "lede"
      "session"
      "error"
      "form"
      "switcher";
    align-items: start;
    gap: var(--space-5);
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-lede {
    grid-area: lede;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) > .persona-content > .session-note {
    grid-area: session;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) > .persona-content > .warning {
    grid-area: error;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) > .persona-content > .persona-switch-section {
    grid-area: switcher;
    display: grid;
    grid-template-columns: minmax(220px, 0.36fr) minmax(0, 1fr);
    grid-template-areas:
      "switch-head switch-list"
      "switch-copy switch-list";
    align-items: start;
    column-gap: var(--space-5);
    row-gap: var(--space-3);
    position: static;
    max-height: none;
    overflow: visible;
    align-self: start;
    padding: var(--space-4);
    border: 1px solid var(--outline-variant);
    background: rgba(14, 14, 14, 0.84);
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-switch-header {
    grid-area: switch-head;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-switch-copy {
    grid-area: switch-copy;
    max-width: none;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-switch-list {
    grid-area: switch-list;
    margin-top: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-switch-card {
    min-height: 72px;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) > .persona-content > .blocking-surface {
    grid-area: form;
    width: 100%;
    min-width: 0;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .blocking-content {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.82fr);
    grid-template-areas:
      "identity preview"
      "signals preview"
      "voice preview"
      "topics preview";
    align-items: start;
    gap: var(--space-4);
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-form-cluster-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-form-identity {
    grid-area: identity;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-form-signals {
    grid-area: signals;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-form-voice {
    grid-area: voice;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-form-topics {
    grid-area: topics;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-settings-rail {
    grid-area: preview;
    position: sticky;
    top: 88px;
    align-content: start;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-preview-panel {
    min-height: min(360px, calc(100dvh - 112px));
    display: flex;
    flex-direction: column;
    align-content: stretch;
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .persona-preview-panel .persona-preview-cta {
    margin-top: var(--space-2);
  }

  .app-frame.persona-onboarding-gate {
    width: min(100%, 1240px);
    max-width: none;
    border-left-color: var(--outline-variant);
    border-right-color: var(--outline-variant);
    background:
      linear-gradient(90deg, rgba(195, 244, 0, 0.035) 1px, transparent 1px),
      rgba(19, 19, 19, 0.98);
    background-size: 20px 20px, auto;
  }

  .app-frame.persona-onboarding-gate > .top-bar {
    display: none;
  }

  .app-frame.persona-onboarding-gate > .persona-content {
    width: 100%;
    min-height: 100dvh;
    padding: var(--space-8) var(--space-10);
    gap: var(--space-5);
  }

  .app-frame.persona-onboarding-gate .persona-lede {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
    border-bottom: 1px solid var(--outline-variant);
    padding-bottom: var(--space-5);
  }

  .app-frame.persona-onboarding-gate .persona-lede-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
  }

  .app-frame.persona-onboarding-gate .persona-lede-head .screen-title {
    max-width: 780px;
    flex: 1 1 auto;
    font-size: 40px;
    line-height: 1;
  }

  .app-frame.persona-onboarding-gate .persona-random-button {
    justify-self: end;
    min-width: 116px;
    min-height: 48px;
  }

  .app-frame.persona-onboarding-gate .persona-lede > .muted {
    max-width: 720px;
    font-size: 17px;
  }

  .app-frame.persona-onboarding-gate .session-note {
    width: min(100%, 720px);
  }

  .app-frame.persona-onboarding-gate .blocking-surface,
  .app-frame.persona-onboarding-gate .blocking-content {
    width: 100%;
  }

  .app-frame.persona-onboarding-gate .blocking-content {
    grid-template-columns: minmax(0, 1.04fr) minmax(380px, 0.96fr);
    grid-template-areas:
      "identity preview"
      "signals preview"
      "voice preview"
      "topics preview";
    align-items: start;
    gap: var(--space-4);
  }

  .app-frame.persona-onboarding-gate .persona-form-identity {
    grid-area: identity;
  }

  .app-frame.persona-onboarding-gate .persona-form-signals {
    grid-area: signals;
  }

  .app-frame.persona-onboarding-gate .persona-form-voice {
    grid-area: voice;
  }

  .app-frame.persona-onboarding-gate .persona-form-topics {
    grid-area: topics;
  }

  .app-frame.persona-onboarding-gate .persona-onboarding-rail {
    grid-area: preview;
    position: sticky;
    top: var(--space-8);
    align-content: start;
  }

  .app-frame.persona-onboarding-gate .persona-preview-panel {
    min-height: min(620px, calc(100dvh - 96px));
    display: flex;
    flex-direction: column;
    align-content: stretch;
  }

  .app-frame.persona-onboarding-gate .persona-preview-panel .persona-preview-cta {
    margin-top: auto;
  }

  .app-frame.persona-onboarding-gate .persona-save-button {
    width: 100%;
    min-height: 60px;
  }

  .app-frame.persona-onboarding-gate .persona-form-cluster {
    min-width: 0;
  }

  .app-frame.persona-onboarding-gate .persona-form-cluster-body {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--space-4);
  }

  .app-frame.persona-onboarding-gate .persona-image-panel-main {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .app-frame.persona-onboarding-gate .persona-image-panel .file-trigger {
    justify-self: stretch;
    width: 100%;
  }
}

@media (min-width: 1440px) {
  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) > .persona-content.persona-settings-content {
    width: min(100%, 1240px);
  }

  .app-frame.has-desktop-shell.route-persona:not(.persona-onboarding-gate) .blocking-content {
    grid-template-columns: minmax(300px, 0.92fr) minmax(320px, 1fr) minmax(320px, 0.86fr);
    grid-template-areas:
      "identity voice preview"
      "signals topics preview";
    gap: var(--space-5);
  }
}

@media (min-width: 1180px) {
  .app-frame.persona-onboarding-gate {
    width: min(100%, 1280px);
  }

  .app-frame.persona-onboarding-gate .blocking-content {
    grid-template-columns: minmax(300px, 0.88fr) minmax(360px, 1fr) minmax(360px, 0.88fr);
    grid-template-areas:
      "identity voice preview"
      "signals topics preview";
    gap: var(--space-5);
  }

  .app-frame.persona-onboarding-gate .persona-form-cluster {
    padding: var(--space-5);
  }
}

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

  .app-shell.motion-reduced .auth-profile-frame {
    animation: none !important;
    opacity: 0;
  }

  .app-shell.motion-reduced .auth-profile-frame-1 {
    opacity: 1;
  }

  .app-shell.motion-reduced .auth-generated-dot {
    animation: none !important;
  }

  .app-shell.motion-reduced .blocking-overlay,
  .app-shell.motion-reduced .blocking-panel,
  .app-shell.motion-reduced .dot-progress::after {
    animation: none !important;
  }

  .app-shell.motion-reduced .dot-progress span {
    animation: none !important;
    opacity: 0.72;
    transform: rotate(var(--dot-angle)) translateY(-30px) scale(1);
  }

  .app-shell.motion-normal .auth-profile-frame {
    animation-duration: 16s !important;
    animation-timing-function: steps(1, end) !important;
    animation-iteration-count: infinite !important;
  }

  .app-shell.motion-normal .auth-profile-frame-1 {
    animation-name: auth-profile-cycle-one !important;
  }

  .app-shell.motion-normal .auth-profile-frame-2 {
    animation-name: auth-profile-cycle-two !important;
  }

  .app-shell.motion-normal .auth-profile-frame-3 {
    animation-name: auth-profile-cycle-three !important;
  }

  .app-shell.motion-normal .auth-profile-frame-4 {
    animation-name: auth-profile-cycle-four !important;
  }

  .app-shell.motion-normal .auth-generated-dot {
    animation-duration: 4s !important;
    animation-timing-function: steps(1, end) !important;
    animation-iteration-count: infinite !important;
  }

  .app-shell.motion-normal .blocking-overlay {
    animation: blocking-overlay-in 160ms steps(2, end) both !important;
  }

  .app-shell.motion-normal .blocking-panel {
    animation: blocking-panel-in 180ms steps(2, end) both !important;
  }

  .app-shell.motion-normal .dot-progress::after {
    animation: dot-progress-sweep 1080ms steps(7, end) infinite !important;
  }

  .app-shell.motion-normal .dot-progress span {
    animation: dot-progress-pulse 960ms steps(5, end) infinite !important;
    animation-delay: calc(var(--dot-index) * 80ms) !important;
    opacity: 0.2;
  }
}
