:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;

  /* Primitive tokens: the only place for shared geometry and timing values. */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  --radius-2xl: 24px;
  --control-min: 48px;
  --duration-press: 120ms;
  --duration-state: 160ms;
  --duration-sheet: 240ms;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-drawer: cubic-bezier(.32, .72, 0, 1);

  /* Semantic tokens: directions and Telegram theme mapping override these. */
  --stage: #111311;
  --app-bg: #f5f6f3;
  --surface: #ffffff;
  --surface-soft: #eceee9;
  --surface-strong: #20231f;
  --text: #171a17;
  --text-soft: #686e68;
  --line: #d9ddd6;
  --line-strong: #bbc1b9;
  --action: #e5483f;
  --action-pressed: #c83a33;
  --trust: #27644a;
  --trust-soft: #dcebe2;
  --telegram: #2481cc;
  --warning: #a55b18;
  --danger: #b72d2d;
  --shadow-soft: 0 8px 24px rgb(30 40 32 / 8%);
  --shadow-sheet: 0 -18px 48px rgb(15 20 16 / 22%);
  --focus-ring: rgb(36 129 204 / 34%);

  /* Component contracts: shared controls consume these instead of literals. */
  --button-height: var(--control-min);
  --button-radius: var(--radius-md);
  --card-radius: var(--radius-md);
  --sheet-radius: var(--radius-lg);
  --interactive-transition:
    transform var(--duration-press) var(--ease-out),
    background-color var(--duration-state) ease,
    color var(--duration-state) ease,
    border-color var(--duration-state) ease;
  --safe-top: max(env(safe-area-inset-top), var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom), var(--tg-content-safe-area-inset-bottom, 0px));
  --safe-left: max(env(safe-area-inset-left), var(--tg-content-safe-area-inset-left, 0px));
  --safe-right: max(env(safe-area-inset-right), var(--tg-content-safe-area-inset-right, 0px));
  --content-max: 1120px;
  --form-max: 680px;
}

* {
  box-sizing: border-box;
}

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

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

body.is-telegram {
  overflow: hidden;
  background: var(--app-bg);
}

body.is-telegram .prototype-bar {
  display: none;
}

body.is-telegram .stage {
  min-height: var(--tg-viewport-stable-height, 100dvh);
  padding: 0;
}

body.is-telegram .app-shell {
  width: 100%;
  height: var(--tg-viewport-stable-height, 100dvh);
  min-height: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.is-web-staging {
  background: #e9eee8;
}

body.is-web-staging .prototype-bar {
  display: none;
}

body.is-web-staging .stage {
  min-height: 100dvh;
  padding: 0;
}

body.is-web-staging .app-shell {
  width: 100%;
  min-height: 100dvh;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

body.is-web-staging .app-shell.is-wide {
  grid-template-columns: 260px minmax(0, 1fr);
}

.web-staging-sidebar {
  display: none;
}

body.is-web-staging .web-staging-sidebar {
  display: flex;
  grid-row: 1 / -1;
  grid-column: 1;
  min-width: 0;
  flex-direction: column;
  gap: 22px;
  padding: 24px 16px 18px;
  border-right: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 64%, var(--app-bg));
}

body.is-web-staging .app-shell.is-wide .bottom-nav {
  display: none;
}

.web-sidebar-brand,
.web-sidebar-footer,
.web-sidebar-brand > span,
.web-sidebar-footer > span {
  display: flex;
  align-items: center;
}

.web-sidebar-brand,
.web-sidebar-footer {
  gap: 10px;
}

.web-sidebar-brand .brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.web-sidebar-brand > span:last-child,
.web-sidebar-footer > span:last-child {
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.web-sidebar-brand strong,
.web-sidebar-footer strong {
  font-size: 13px;
  line-height: 1.2;
}

.web-sidebar-brand small,
.web-sidebar-footer small {
  color: var(--text-soft);
  font-size: 10px;
}

.web-sidebar-new {
  width: 100%;
}

.web-sidebar-nav {
  display: grid;
  gap: 4px;
}

.web-sidebar-item {
  display: flex;
  min-height: 44px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border-radius: 7px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
}

.web-sidebar-item svg {
  width: 18px;
  height: 18px;
}

.web-sidebar-item.is-active {
  background: var(--trust-soft);
  color: var(--trust);
}

.web-sidebar-footer {
  margin-top: auto;
  padding: 10px 8px;
  border-top: 1px solid var(--line);
}

.web-sidebar-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--trust);
  box-shadow: 0 0 0 4px var(--trust-soft);
}

.preview-badge {
  display: none;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

body.is-telegram .preview-badge {
  display: inline;
}

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

button {
  border: 0;
  cursor: pointer;
}

button,
.pressable {
  -webkit-tap-highlight-color: transparent;
  transition: var(--interactive-transition);
}

button:active,
.pressable:active {
  transform: scale(.975);
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
}

.nb-icon {
  flex: 0 0 auto;
  overflow: visible;
}

.nb-icon--phosphor {
  stroke: none;
}

.nb-icon--tabler {
  fill: none;
}

.prototype-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 16px;
  border-bottom: 1px solid #30342f;
  background: rgb(17 19 17 / 92%);
  color: #f6f7f5;
  backdrop-filter: blur(16px);
}

.prototype-bar label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #aeb4ad;
  font-size: 12px;
  font-weight: 700;
}

.prototype-bar select {
  min-height: 36px;
  border: 1px solid #444943;
  border-radius: 6px;
  background: #252825;
  color: #fff;
  padding: 0 30px 0 10px;
}

.stage {
  display: grid;
  min-height: calc(100vh - 54px);
  place-items: start center;
  padding: 20px;
}

.app-shell {
  position: relative;
  display: grid;
  width: min(100%, 390px);
  height: min(844px, calc(100vh - 94px));
  min-height: 600px;
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 10%);
  border-radius: 8px;
  background: var(--app-bg);
  color: var(--text);
  box-shadow: 0 30px 90px rgb(0 0 0 / 42%);
}

.app-shell[data-theme="dark"] {
  color-scheme: dark;
  --app-bg: #151815;
  --surface: #1d211d;
  --surface-soft: #262b26;
  --surface-strong: #eef1ed;
  --text: #f2f4f1;
  --text-soft: #aab0aa;
  --line: #323832;
  --line-strong: #4b534b;
  --trust-soft: #203a2d;
  --shadow-soft: 0 8px 24px rgb(0 0 0 / 18%);
}

.app-header {
  position: relative;
  z-index: 20;
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding:
    calc(10px + var(--safe-top))
    calc(16px + var(--safe-right))
    10px
    calc(16px + var(--safe-left));
  border-bottom: 1px solid var(--line);
  background: rgb(from var(--app-bg) r g b / 94%);
  backdrop-filter: blur(18px);
}

.header-copy,
.header-actions,
.row,
.row-start,
.row-between {
  display: flex;
  align-items: center;
}

.header-copy {
  flex: 1 1 auto;
  min-width: 0;
  gap: 10px;
}

.header-copy > div {
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-strong);
  color: var(--app-bg);
  font-size: 12px;
  font-weight: 850;
}

.brand-symbol {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: square;
  stroke-width: 1.6;
}

.eyebrow {
  margin: 0 0 1px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
}

.app-header h1 {
  overflow: hidden;
  margin: 0;
  font-size: 19px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.header-actions {
  flex: 0 0 auto;
  gap: 7px;
  margin-left: auto;
}

.credit-pill,
.avatar-button,
.icon-button {
  display: inline-flex;
  min-width: var(--control-min);
  min-height: var(--control-min);
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.credit-pill {
  gap: 5px;
  padding: 0 10px;
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.credit-pill svg {
  width: 16px;
  color: var(--action);
}

.avatar-button {
  background: var(--trust);
  color: #fff;
  font-size: 12px;
  font-weight: 800;
}

.app-body {
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}

.screen {
  width: min(100%, var(--content-max));
  min-height: 100%;
  margin: 0 auto;
  padding: 16px 14px 28px;
}

.screen.is-form {
  width: min(100%, var(--form-max));
}

.section {
  margin-top: 24px;
}

.section:first-child {
  margin-top: 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.section-heading h2,
.section-heading h3,
.question-title,
.sheet-title {
  margin: 0;
  letter-spacing: 0;
}

.section-heading h2 {
  font-size: 17px;
  font-weight: 760;
}

.section-heading p {
  margin: 3px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.web-staging-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin-bottom: 22px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
}

.web-staging-welcome h2,
.web-page-intro h2 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  font-weight: 780;
  letter-spacing: -.035em;
  line-height: 1.08;
}

.web-staging-welcome p:not(.question-kicker),
.web-page-intro > p:not(.question-kicker) {
  max-width: 620px;
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

.web-staging-welcome .secondary-button {
  white-space: nowrap;
}

.web-staging-welcome-points,
.web-flow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  grid-column: 1 / -1;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.web-staging-welcome-points span,
.web-flow-steps span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.web-staging-welcome-points b,
.web-flow-steps b {
  color: var(--action);
  font-size: 10px;
}

.web-page-intro {
  margin: 2px 0 22px;
  padding: 6px 0 22px;
  border-bottom: 1px solid var(--line);
}

.web-page-intro .web-flow-steps {
  margin-top: 20px;
}

.inspiration-filter {
  display: flex;
  gap: 6px;
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}

.inspiration-filter::-webkit-scrollbar {
  display: none;
}

.inspiration-filter button {
  min-height: 36px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
}

.inspiration-filter button.is-selected {
  border-color: var(--trust);
  background: var(--trust-soft);
  color: var(--trust);
}

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

.template-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.template-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.template-visual-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 1;
  min-height: 24px;
  padding: 5px 8px;
  border-radius: 5px;
  background: rgb(20 24 20 / 78%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

.template-card-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  padding: 13px 14px 14px;
}

.template-card-copy .question-kicker {
  margin-bottom: 4px;
}

.template-card-copy h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.2;
}

.template-card-copy > p:not(.question-kicker) {
  min-height: 58px;
  margin: 8px 0 14px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.template-card-footer {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
}

.template-card-footer small {
  min-width: 0;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.35;
}

.template-use {
  display: inline-flex;
  min-height: 34px;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
  padding: 0 9px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.template-use:hover {
  background: var(--trust-soft);
  color: var(--trust);
}

.template-use svg {
  width: 15px;
  height: 15px;
}

.catalog-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.catalog-note > svg {
  flex: 0 0 auto;
  width: 18px;
  margin-top: 1px;
  color: var(--trust);
}

.catalog-note span {
  display: grid;
  gap: 4px;
}

.catalog-note strong {
  color: var(--text);
  font-size: 12px;
}

.catalog-note small {
  font-size: 11px;
  line-height: 1.4;
}

.workflow-catalog-section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.workflow-catalog-section .section-heading {
  align-items: flex-end;
  margin-bottom: 14px;
}

.workflow-catalog-section .section-heading h2 {
  margin: 0;
  font-size: clamp(20px, 2.4vw, 28px);
}

.workflow-catalog-section .section-heading p:not(.question-kicker) {
  max-width: 620px;
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.catalog-count {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 760;
  white-space: nowrap;
}

.workflow-catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.catalog-workflow-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.catalog-workflow-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 7;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.catalog-workflow-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  max-width: calc(100% - 20px);
  padding: 5px 7px;
  overflow: hidden;
  border-radius: 5px;
  background: rgb(20 24 20 / 78%);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.catalog-workflow-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 12px 13px 13px;
}

.catalog-workflow-heading {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.catalog-workflow-heading h3 {
  margin: 0;
  font-size: 15px;
  line-height: 1.2;
}

.catalog-workflow-format {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 760;
}

.catalog-workflow-copy > p {
  min-height: 36px;
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

.catalog-workflow-note {
  color: var(--action);
  font-size: 10px;
  line-height: 1.35;
}

.catalog-workflow-copy .template-use {
  align-self: flex-start;
  margin-top: auto;
}

.workflow-limit-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 16px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--action) 35%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--action-soft) 62%, var(--surface));
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

.workflow-limit-note > svg {
  flex: 0 0 auto;
  width: 16px;
  color: var(--action);
}

.text-button {
  min-width: var(--control-min);
  min-height: var(--control-min);
  flex: 0 0 auto;
  background: transparent;
  color: var(--telegram);
  font-size: 13px;
  font-weight: 700;
}

.resume-row {
  display: grid;
  min-height: 72px;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.resume-thumb {
  width: 48px;
  height: 52px;
  border-radius: 5px;
}

.resume-copy {
  min-width: 0;
}

.resume-copy strong,
.result-copy strong,
.workflow-copy strong {
  display: block;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.25;
  text-overflow: ellipsis;
}

.resume-copy strong {
  display: -webkit-box;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.result-copy strong {
  white-space: normal;
}

.resume-copy span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
}

.mini-progress {
  height: 3px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 2px;
  background: var(--surface-soft);
}

.mini-progress span {
  display: block;
  width: 68%;
  height: 100%;
  background: var(--trust);
}

.composer {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.composer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 14px 0;
}

.composer-head strong {
  font-size: 15px;
}

.assistant-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--trust);
  font-size: 11px;
  font-weight: 700;
}

.assistant-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--trust);
  content: "";
}

.composer textarea {
  width: 100%;
  min-height: 92px;
  resize: vertical;
  border: 0;
  background: transparent;
  padding: 11px 14px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
}

.composer textarea::placeholder {
  color: var(--text-soft);
}

.composer textarea:focus {
  outline: 0;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  border-top: 1px solid var(--line);
}

.attachment-actions {
  display: flex;
  gap: 4px;
}

.attachment-actions .icon-button {
  min-width: var(--control-min);
  min-height: var(--control-min);
  border: 0;
  background: transparent;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  min-height: var(--button-height);
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 7px;
  padding: 0 15px;
  font-size: 14px;
  font-weight: 760;
}

.primary-button {
  background: var(--action);
  color: #fff;
}

.primary-button:hover {
  background: var(--action-pressed);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
}

.primary-button svg,
.secondary-button svg {
  width: 18px;
}

.label-short {
  display: none;
}

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

.workflow-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.workflow-card.is-coming-soon {
  cursor: default;
}

.workflow-card.is-coming-soon .workflow-visual {
  filter: saturate(.55);
  opacity: .72;
}

.primary-button:disabled {
  cursor: wait;
  opacity: .62;
}

.workflow-visual {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.workflow-visual::after {
  position: absolute;
  inset: auto 0 0;
  height: 28%;
  background: linear-gradient(to bottom, transparent, rgb(10 12 10 / 26%));
  content: "";
}

.workflow-meta {
  display: grid;
  min-height: 83px;
  align-content: start;
  padding: 10px;
}

.workflow-copy strong {
  white-space: normal;
}

.workflow-copy span {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.badge {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  border-radius: 4px;
  padding: 0 7px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.is-trust {
  background: var(--trust-soft);
  color: var(--trust);
}

.badge.is-action {
  background: rgb(229 72 63 / 12%);
  color: var(--action);
}

.sprite {
  background-image: url("assets/creative-results-contact-sheet.png");
  background-repeat: no-repeat;
  /* Every source cell is square. Scale from one axis only to preserve it. */
  background-size: auto 200%;
}

.sprite-1 { background-position: 0 0; }
.sprite-2 { background-position: 33.333% 0; }
.sprite-3 { background-position: 66.666% 0; }
.sprite-4 { background-position: 100% 0; }
.sprite-5 { background-position: 0 100%; }
.sprite-6 { background-position: 33.333% 100%; }
.sprite-7 { background-position: 66.666% 100%; }
.sprite-8 { background-position: 100% 100%; }

.bottom-nav {
  position: relative;
  z-index: 30;
  display: grid;
  min-width: 0;
  min-height: calc(62px + var(--safe-bottom));
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 4px calc(4px + var(--safe-right)) var(--safe-bottom) calc(4px + var(--safe-left));
  border-top: 1px solid var(--line);
  background: rgb(from var(--app-bg) r g b / 96%);
  backdrop-filter: blur(18px);
}

.web-only-nav {
  display: none;
}

body.is-web-staging .bottom-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

body.is-web-staging .web-only-nav {
  display: flex;
}

.app-action {
  position: relative;
  z-index: 31;
  display: grid;
  padding: 8px 14px;
  border-top: 1px solid var(--line);
  background: var(--app-bg);
}

.app-action[hidden] {
  display: none;
}

.app-action .primary-button {
  width: 100%;
}

.nav-item {
  display: flex;
  min-width: 0;
  min-height: 54px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
}

.nav-item span {
  max-width: 100%;
  overflow: hidden;
  font-size: 10px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item svg {
  width: 21px;
  height: 21px;
}

.nav-item.is-active {
  color: var(--action);
}

.progress-rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 20px;
}

.progress-rail span {
  height: 4px;
  border-radius: 2px;
  background: var(--line);
}

.progress-rail span.is-done,
.progress-rail span.is-current {
  background: var(--action);
}

.question-kicker {
  margin: 0 0 6px;
  color: var(--action);
  font-size: 11px;
  font-weight: 800;
}

.question-title {
  max-width: 18ch;
  font-size: 25px;
  font-weight: 780;
  line-height: 1.14;
}

.question-note {
  margin: 8px 0 18px;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.choice-list {
  display: grid;
  gap: 8px;
}

.brief-fields {
  display: grid;
  gap: 12px;
  margin: 20px 0 24px;
}

.brand-profile-inline {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--trust) 28%, var(--line));
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--trust) 7%, var(--surface));
}

.brand-profile-inline-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--trust) 16%, var(--surface));
  color: var(--trust);
}

.brand-profile-inline-icon svg {
  width: 18px;
  height: 18px;
}

.brand-profile-inline > div:nth-child(2) {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.brand-profile-inline strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-profile-inline small {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}

.brand-profile-inline .text-button {
  min-height: 32px;
  padding: 0 8px;
  white-space: nowrap;
}

.brief-field {
  display: grid;
  gap: 7px;
}

.brief-field > span,
.form-subtitle {
  color: var(--text);
  font-size: 14px;
  font-weight: 700;
}

.brief-field textarea,
.brief-field select {
  box-sizing: border-box;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  padding: 12px 13px;
  font: inherit;
  line-height: 1.45;
}

.brief-field textarea {
  min-height: 72px;
  resize: vertical;
}

.brief-field select {
  min-height: 48px;
}

.brief-field textarea:focus,
.brief-field select:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 20%, transparent);
  outline-offset: 1px;
}

.brief-consent {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.4;
}

.brief-consent input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--action);
}

.photoshoot-contract {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.photoshoot-contract > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.photoshoot-contract strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
}

.photoshoot-contract p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.fact-contract-card {
  display: grid;
  gap: 10px;
  margin: 18px 0 22px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.fact-contract-card.is-pending {
  border-color: color-mix(in srgb, var(--action) 38%, var(--line));
}

.fact-contract-card.is-compact {
  margin: 14px 0;
}

.fact-contract-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
}

.fact-contract-icon {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--trust-soft);
  color: var(--trust);
}

.fact-contract-card.is-pending .fact-contract-icon {
  background: rgb(229 72 63 / 12%);
  color: var(--action);
}

.fact-contract-head strong,
.fact-contract-head small {
  display: block;
}

.fact-contract-head strong {
  color: var(--text);
  font-size: 14px;
}

.fact-contract-head small,
.fact-contract-note,
.fact-contract-empty,
.fact-contract-confirmed {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.fact-contract-note {
  margin: 0;
}

.fact-contract-list {
  display: grid;
  gap: 8px;
}

.fact-contract-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(132px, auto);
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.fact-contract-row strong,
.fact-contract-row small {
  display: block;
}

.fact-contract-row strong {
  color: var(--text);
  font-size: 12px;
}

.fact-contract-row small {
  overflow: hidden;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.fact-contract-row select {
  min-height: 42px;
  max-width: 180px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  padding: 7px 8px;
  font: inherit;
  font-size: 11px;
}

.fact-contract-confirm {
  min-height: 44px;
}

.fact-contract-confirmed {
  display: flex;
  align-items: center;
  gap: 6px;
}

.plan-story-detail {
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}

.plan-story-detail summary {
  width: fit-content;
  cursor: pointer;
  color: var(--trust);
  font-weight: 650;
}

.plan-story-detail p {
  margin: 4px 0 0;
}

.plan-story-detail p strong {
  color: var(--text);
}

@media (max-width: 420px) {
  .fact-contract-row {
    grid-template-columns: 1fr;
  }

  .fact-contract-row select {
    width: 100%;
    max-width: none;
  }
}

.product-lock-contract {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.product-lock-contract > div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.product-lock-contract strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 13px;
}

.product-lock-contract p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.preflight-estimate-card {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 13px;
  border: 1px solid color-mix(in srgb, var(--trust) 35%, var(--line));
  border-radius: 8px;
  background: var(--surface-soft);
}

.preflight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preflight-header strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text);
  font-size: 13px;
}

.preflight-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--trust);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

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

.preflight-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border-radius: 5px;
  background: var(--surface);
}

.preflight-label {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 600;
}

.preflight-val {
  color: var(--text);
  font-size: 12px;
  font-weight: 700;
}

.preflight-disclaimer {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}


.format-auto-note,
.format-override-note,
.copy-coverage-warning {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  margin: 0 0 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text);
}

.format-override-note {
  margin: 0 0 12px;
  border-color: rgba(234, 179, 8, 0.4);
}

.copy-coverage-warning {
  margin: 0 0 12px;
  border-color: rgb(165 91 24 / 48%);
}

.copy-coverage-warning > svg {
  color: var(--warning);
}

.format-auto-note strong,
.format-auto-note small,
.format-override-note strong,
.format-override-note small,
.copy-coverage-warning strong,
.copy-coverage-warning small {
  display: block;
}

.format-auto-note strong,
.format-override-note strong {
  font-size: 13px;
}

.copy-coverage-warning strong {
  font-size: 13px;
}

.format-auto-note small,
.format-override-note small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.copy-coverage-warning small {
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.4;
}

.form-subtitle {
  margin: 0 0 10px;
}

.choice {
  display: grid;
  min-height: 66px;
  grid-template-columns: 44px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.choice.is-selected {
  border-color: var(--trust);
  background: var(--trust-soft);
}

.choice-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text);
}

.choice strong,
.choice small {
  display: block;
}

.choice strong {
  font-size: 14px;
}

.choice small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
}

.choice-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
}

.choice.is-selected .choice-check {
  border-color: var(--trust);
  background: var(--trust);
  color: #fff;
}

.inline-field {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.inline-field label {
  font-size: 12px;
  font-weight: 740;
}

.inline-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  padding: 0 13px;
}

.advanced-disclosure {
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--text-soft);
  text-align: left;
}

.plan-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.plan-summary h2 {
  max-width: 16ch;
  margin: 0;
  font-size: 24px;
  line-height: 1.14;
}

.plan-summary p {
  margin: 7px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.plan-list {
  display: grid;
  gap: 8px;
}

.mode-segments {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.mode-segments button {
  min-height: var(--control-min);
  padding: 7px 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}

.mode-segments button.is-selected {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 4px color-mix(in srgb, var(--text) 10%, transparent);
}

.plan-item {
  display: grid;
  grid-template-columns: 68px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 11px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.plan-image {
  width: 68px;
  aspect-ratio: 1;
  border-radius: 5px;
}

.plan-copy {
  min-width: 0;
}

.plan-copy strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-copy span {
  display: block;
  margin-top: 4px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.3;
}

.plan-copy .plan-approved-copy {
  display: block;
  overflow: hidden;
  margin-top: 5px;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-copy .plan-approved-copy.is-empty {
  color: var(--text-soft);
  font-style: italic;
}

.consistency-band {
  margin-top: 14px;
  padding: 12px;
  border-left: 3px solid var(--trust);
  background: var(--trust-soft);
}

.consistency-band strong {
  display: block;
  font-size: 12px;
}

.consistency-band p {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

.results-head {
  margin-bottom: 14px;
}

.results-head h2 {
  margin: 0;
  font-size: 23px;
}

.results-head p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

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

.project-list {
  display: grid;
  gap: 18px;
}

.project-group {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
}

.project-group.is-active {
  border-color: color-mix(in srgb, var(--action) 36%, var(--line));
}

.project-group-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.project-group-head h3 {
  margin: 0;
  font-size: 16px;
}

.project-group-head p:not(.question-kicker) {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 11px;
}

.project-contract {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--trust) 22%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--trust) 5%, var(--surface));
}

.project-contract-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-contract-head .text-button {
  min-width: 0;
  min-height: 30px;
  padding: 0 4px;
  font-size: 11px;
}

.project-contract-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.project-contract-step {
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.project-contract-step b {
  color: var(--action);
  font-size: 10px;
  letter-spacing: .04em;
}

.project-contract-step span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.project-contract-step.is-success {
  border-color: color-mix(in srgb, var(--trust) 34%, var(--line));
}

.project-contract-step.is-processing,
.project-contract-step.is-assigned,
.project-contract-step.is-pending {
  border-color: color-mix(in srgb, var(--action) 28%, var(--line));
}

.project-contract-step.is-failed,
.project-contract-step.is-cancelled {
  border-color: color-mix(in srgb, var(--danger) 32%, var(--line));
}

.project-select {
  min-height: 34px;
  padding: 0 9px;
  font-size: 11px;
}

.project-group .result-grid {
  background: transparent;
}

.result-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  text-align: left;
}

.job-delete {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 6px;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgb(18 20 18 / 72%);
  color: #fff;
  backdrop-filter: blur(8px);
}

.job-delete svg {
  width: 17px;
  height: 17px;
}

.job-delete:disabled svg {
  animation: runtime-spin 1s linear infinite;
}

.result-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: inherit;
}

.result-open:disabled {
  cursor: default;
}

.result-image {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 3 / 4;
}

.result-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-content: center;
  justify-items: center;
  gap: 8px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.result-placeholder svg {
  width: 28px;
  height: 28px;
  opacity: .72;
}

.result-placeholder small {
  max-width: 110px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-placeholder.is-pending svg,
.result-placeholder.is-assigned svg,
.result-placeholder.is-processing svg {
  animation: runtime-spin 1s linear infinite;
}

.result-image > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: var(--surface-soft);
}

.result-progress {
  position: absolute;
  inset: 50% auto auto 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgb(18 20 18 / 74%);
  color: #fff;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(8px);
}

.result-progress svg,
.materials-placeholder .lucide-loader-circle {
  animation: runtime-spin 1s linear infinite;
}

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

.result-index {
  position: absolute;
  top: 7px;
  left: 7px;
  display: grid;
  min-width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 4px;
  background: rgb(18 20 18 / 74%);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.result-copy {
  display: block;
  min-height: 62px;
  padding: 9px;
}

.result-copy strong {
  font-size: 12px;
  white-space: normal;
}

.result-copy span {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: var(--trust);
  font-size: 10px;
  font-weight: 700;
}

.result-copy small {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.35;
}

.result-copy .job-status.is-failed {
  color: #c64b43;
}

.result-copy .job-status.is-cancelled {
  color: var(--text-soft);
}

.job-cancel {
  display: inline-flex;
  min-height: var(--control-min);
  align-items: center;
  margin-top: 7px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--action);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
}

.job-retry {
  display: inline-flex;
  min-height: var(--control-min);
  align-items: center;
  margin-top: 5px;
  padding: 0 9px;
  border: 1px solid color-mix(in srgb, var(--action) 35%, var(--line));
  border-radius: 5px;
  background: transparent;
  color: var(--action);
  font: inherit;
  font-size: 11px;
  font-weight: 750;
}

.job-retry:disabled {
  cursor: wait;
  opacity: .6;
}

.job-purpose {
  color: var(--text-soft);
}

.job-pipeline-hint {
  display: block;
  margin-top: 4px;
  color: var(--trust);
  font-size: 11px;
  line-height: 1.35;
}

.job-review-hint {
  display: block;
  margin-top: 4px;
  color: #9a5b22;
  font-size: 11px;
  line-height: 1.35;
}

.runtime-notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 12px;
}

.runtime-notice.is-error {
  border-color: #c64b43;
  color: #c64b43;
}

.runtime-notice > span {
  min-width: 0;
  flex: 1;
}

.runtime-notice > button {
  min-height: var(--control-min);
  flex: 0 0 auto;
  padding: 0 10px;
  border: 1px solid currentcolor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 750;
}

.runtime-notice .lucide-loader-circle {
  animation: runtime-spin 1s linear infinite;
}

.staging-access-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 12px;
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--trust) 32%, var(--line));
  border-radius: 14px;
  background: linear-gradient(145deg, var(--surface), var(--trust-soft));
  box-shadow: var(--shadow-soft);
}

.staging-access-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: var(--trust);
  color: #fff;
}

.staging-access-icon svg {
  width: 21px;
  height: 21px;
}

.staging-access-copy {
  min-width: 0;
}

.staging-access-label {
  display: block;
  color: var(--trust);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .07em;
}

.staging-access-copy h2 {
  margin: 3px 0 0;
  font-size: 20px;
  line-height: 1.2;
}

.staging-access-copy p {
  max-width: 600px;
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.45;
}

.staging-access-form {
  display: grid;
  grid-column: 1 / -1;
  gap: 7px;
}

.staging-access-form label {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.staging-password-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.staging-password-row input {
  width: 100%;
  min-height: var(--button-height);
  border: 1px solid var(--line-strong);
  border-radius: var(--button-radius);
  background: var(--surface);
  padding: 0 13px;
  color: var(--text);
}

.staging-password-row .primary-button {
  min-width: 116px;
}

.staging-access-form small {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}

.upload-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 12px 10px;
}

.source-drop-zone {
  display: flex;
  min-height: 68px;
  align-items: center;
  gap: 11px;
  margin: 0 12px 10px;
  padding: 10px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 9px;
  background: var(--surface-soft);
  color: var(--text-soft);
  cursor: pointer;
  transition: var(--interactive-transition);
}

.source-drop-zone:hover,
.source-drop-zone.is-dragging {
  border-color: var(--trust);
  background: var(--trust-soft);
  color: var(--trust);
}

.source-drop-zone > svg {
  width: 21px;
  color: currentcolor;
}

.source-drop-zone span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.source-drop-zone strong {
  color: var(--text);
  font-size: 12px;
}

.source-drop-zone small {
  color: currentcolor;
  font-size: 11px;
  line-height: 1.35;
}

.upload-chip {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: calc(var(--control-min) + 8px);
  grid-template-columns: 16px minmax(0, 1fr) 58px minmax(92px, 108px) var(--control-min);
  align-items: center;
  gap: 5px;
  padding: 4px 5px 4px 8px;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 11px;
}

.upload-chip-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.upload-chip-copy strong,
.upload-chip-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-chip-copy strong {
  font-size: 11px;
}

.upload-chip-copy small {
  color: var(--text-soft);
  font-size: 9px;
}

.upload-role-badge {
  overflow: hidden;
  border-radius: 4px;
  background: var(--trust-soft);
  color: var(--trust);
  font-size: 9px;
  font-weight: 800;
  line-height: 22px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-chip select {
  width: 100%;
  min-width: 0;
  height: var(--control-min);
  padding: 0 22px 0 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-soft);
  font: inherit;
}

.upload-chip svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.upload-chip button {
  display: grid;
  width: var(--control-min);
  height: var(--control-min);
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-soft);
}

.source-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.source-panel.is-required {
  border-color: color-mix(in srgb, var(--action) 42%, var(--line));
  background: color-mix(in srgb, var(--action) 4%, var(--surface));
}

.source-panel.is-compact {
  margin: 14px 0 0;
}

.source-panel-head {
  display: grid;
  min-width: 0;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.source-panel-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--action);
}

.source-panel-icon svg {
  width: 19px;
  height: 19px;
}

.source-panel-head strong,
.source-panel-head small {
  display: block;
}

.source-panel-head strong {
  font-size: 13px;
}

.source-panel-head small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}

.source-panel .upload-list {
  padding: 0;
}

.source-guidance {
  margin: 10px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.source-add {
  width: 100%;
}

.source-add .lucide-loader-circle {
  animation: runtime-spin 1s linear infinite;
}

.material-list {
  display: grid;
  gap: 8px;
}

.material-row {
  display: grid;
  min-width: 0;
  grid-template-columns: 22px minmax(0, 1fr) var(--control-min);
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.material-row span,
.material-row strong,
.material-row small {
  min-width: 0;
}

.material-row strong,
.material-row small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.material-row strong {
  font-size: 12px;
}

.material-row small {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10px;
}

.material-add {
  width: 100%;
  margin-top: 12px;
}

@media (prefers-reduced-motion: reduce) {
  .result-progress svg,
  .runtime-notice .lucide-loader-circle,
  .materials-placeholder .lucide-loader-circle {
    animation: none;
  }
}

.result-copy svg {
  width: 13px;
  height: 13px;
}

.artifact-screen {
  display: grid;
  height: 100%;
  min-height: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  padding: 0;
  background: #141714;
}

.app-shell.is-artifact {
  grid-template-rows: minmax(0, 1fr);
}

.app-shell.is-artifact .app-header,
.app-shell.is-artifact .app-action,
.app-shell.is-artifact .bottom-nav {
  display: none;
}

.app-shell.is-artifact .app-body {
  min-height: 0;
  overflow: hidden;
}

.artifact-canvas {
  position: relative;
  display: grid;
  min-height: 0;
  place-items: center;
  overflow: hidden;
  padding:
    var(--safe-top)
    var(--safe-right)
    0
    var(--safe-left);
  touch-action: pan-y;
}

.artifact-canvas img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.artifact-loading {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #cbd0ca;
  font-size: 12px;
  font-weight: 700;
}

.artifact-loading svg {
  width: 28px;
  height: 28px;
  animation: runtime-spin 1s linear infinite;
}

.artifact-step {
  position: absolute;
  top: 50%;
  display: grid;
  width: var(--control-min);
  min-height: var(--control-min);
  height: 52px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 16%);
  background: rgb(20 23 20 / 76%);
  color: #fff;
  transform: translateY(-50%);
  backdrop-filter: blur(8px);
}

.artifact-step:active {
  transform: translateY(-50%) scale(.96);
}

.artifact-step:disabled {
  visibility: hidden;
}

.artifact-step.is-previous {
  left: calc(8px + var(--safe-left));
  border-radius: 8px 16px 16px 8px;
}

.artifact-step.is-next {
  right: calc(8px + var(--safe-right));
  border-radius: 16px 8px 8px 16px;
}

.artifact-toolbar {
  padding: 10px 12px calc(12px + var(--safe-bottom));
  border-top: 1px solid #303530;
  background: #1b1e1b;
  color: #f6f7f5;
}

.artifact-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.artifact-title strong {
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.tool-row.is-two-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.tool-row.is-two-actions .tool-button {
  min-height: 48px;
  flex-direction: row;
  border: 1px solid #3a403a;
  font-weight: 750;
}

.tool-row.is-two-actions .tool-button span {
  font-size: 12px;
}

.tool-row.is-two-actions .tool-button.is-primary {
  border-color: transparent;
}

.tool-row.artifact-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-button:disabled {
  cursor: wait;
  opacity: .58;
}

.app-toast {
  position: absolute;
  z-index: 120;
  right: calc(12px + var(--safe-right));
  bottom: calc(82px + var(--safe-bottom));
  left: calc(12px + var(--safe-left));
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface-strong);
  color: var(--app-bg);
  box-shadow: 0 12px 30px rgb(0 0 0 / 24%);
  font-size: 12px;
  font-weight: 750;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 160ms ease-out, transform 160ms ease-out;
}

.app-shell.is-artifact .app-toast {
  bottom: calc(90px + var(--safe-bottom));
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.tool-button {
  display: flex;
  min-width: 0;
  min-height: 52px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border-radius: 6px;
  background: transparent;
  color: #cbd0ca;
}

.tool-button span {
  overflow: hidden;
  max-width: 100%;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tool-button.is-primary {
  background: var(--action);
  color: #fff;
}

.settings-group {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.settings-row {
  display: grid;
  width: 100%;
  min-height: 62px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.settings-row:last-child {
  border-bottom: 0;
}

.settings-row > svg {
  color: var(--text-soft);
}

.settings-copy strong,
.settings-copy span {
  display: block;
}

.settings-copy strong {
  font-size: 13px;
}

.settings-copy span {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
}

.brand-form {
  display: grid;
  gap: 12px;
}

.brand-field {
  display: grid;
  gap: 6px;
}

.brand-field > span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

.brand-field input,
.brand-field textarea {
  width: 100%;
  min-height: 42px;
  box-sizing: border-box;
  padding: 10px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  outline: none;
  resize: vertical;
}

.brand-field input:focus,
.brand-field textarea:focus {
  border-color: var(--action);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 18%, transparent);
}

.brand-storage-note {
  display: block;
  margin: 14px 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

.sheet-save-button {
  width: 100%;
}

.sheet-backdrop {
  position: absolute;
  z-index: 80;
  inset: 0;
  background: rgb(13 16 13 / 44%);
  opacity: 0;
  transition: opacity 180ms ease-out;
}

.sheet-backdrop.is-open {
  opacity: 1;
}

.bottom-sheet {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: min(82%, 620px);
  overflow-y: auto;
  border-radius: var(--sheet-radius) var(--sheet-radius) 0 0;
  background: var(--app-bg);
  box-shadow: var(--shadow-sheet);
  padding: 8px 14px calc(18px + var(--safe-bottom));
  transform: translateY(100%);
  transition: transform var(--duration-sheet) var(--ease-drawer);
}

.sheet-backdrop.is-open .bottom-sheet {
  transform: translateY(0);
}

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 14px;
  border-radius: 2px;
  background: var(--line-strong);
}

.sheet-title {
  font-size: 20px;
}

.sheet-note {
  margin: 6px 0 16px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.45;
}

.language-option {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: transparent;
  font-size: 14px;
  font-weight: 700;
}

.language-option svg {
  color: var(--trust);
}

.materials-placeholder {
  display: grid;
  min-height: 60vh;
  place-items: center;
  color: var(--text-soft);
  text-align: center;
}

.materials-placeholder svg {
  width: 38px;
  height: 38px;
  margin-bottom: 8px;
}

@media (min-width: 720px) {
  .stage {
    padding: 28px;
  }

  .app-shell.is-wide {
    width: min(1180px, 100%);
    height: min(820px, calc(100vh - 110px));
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .app-shell.is-wide .app-header {
    grid-column: 2;
  }

  .app-shell.is-wide .app-body {
    grid-column: 2;
  }

  .app-shell.is-wide .app-action {
    grid-column: 2;
  }

  .app-shell.is-wide .bottom-nav {
    grid-row: 1 / -1;
    grid-column: 1;
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 72px);
    align-content: start;
    padding: 76px 8px 8px;
    border-top: 0;
    border-right: 1px solid var(--line);
  }

  .app-shell.is-wide .nav-item {
    min-height: 68px;
  }

  .app-shell.is-wide .screen:not(.is-form) {
    padding: 24px;
  }

  .app-shell.is-wide .create-layout {
    display: grid;
    grid-template-columns: minmax(320px, .85fr) minmax(420px, 1.15fr);
    gap: 28px;
    align-items: start;
  }

  .app-shell.is-wide .create-layout .section {
    margin-top: 0;
  }

  .app-shell.is-wide .workflow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell.is-wide .result-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .app-shell.is-wide .plan-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-shell.is-wide .bottom-sheet {
    left: auto;
    width: min(440px, 100%);
    border-radius: var(--sheet-radius) 0 0;
  }

  body.is-web-staging .app-shell.is-wide .inspiration-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 719px) {
  body.is-web-staging .web-staging-sidebar {
    display: none;
  }

  /* The web staging shell is wide on desktop so it can expose the VibePlus-like
     workspace rail.  On phones that rail is hidden, so the content grid must
     collapse back to one column as well.  Without this reset the body remained
     in column 2 of a 224px + content grid and the page looked clipped even
     though document.scrollWidth did not grow past the viewport. */
  body.is-web-staging .app-shell.is-wide {
    grid-template-columns: minmax(0, 1fr);
  }

  body.is-web-staging .app-shell.is-wide .app-header,
  body.is-web-staging .app-shell.is-wide .app-body,
  body.is-web-staging .app-shell.is-wide .app-action,
  body.is-web-staging .app-shell.is-wide .bottom-nav {
    grid-column: 1;
  }

  body.is-web-staging .app-shell.is-wide .bottom-nav {
    display: grid;
    grid-row: auto;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-template-rows: none;
    padding: 4px calc(4px + var(--safe-right)) var(--safe-bottom) calc(4px + var(--safe-left));
    border-top: 1px solid var(--line);
    border-right: 0;
  }

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

  .web-staging-welcome {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .web-staging-welcome-points {
    grid-column: 1;
  }
}

@media (max-width: 430px) {
  .prototype-bar {
    display: none;
  }

  .stage {
    min-height: 100vh;
    padding: 0;
  }

  .app-shell {
    width: 100% !important;
    height: 100dvh;
    min-height: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.is-web-staging .stage {
    padding: 0;
  }

  body.is-web-staging .app-shell {
    min-height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }
}

@media (max-width: 600px) {
  .staging-access-card {
    padding: 15px;
  }

  .staging-password-row {
    grid-template-columns: 1fr;
  }

  .staging-password-row .primary-button {
    width: 100%;
  }

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

  .workflow-catalog-grid {
    grid-template-columns: 1fr;
  }

  .workflow-catalog-section .section-heading {
    align-items: flex-start;
  }

  .template-card-copy > p:not(.question-kicker) {
    min-height: 0;
  }

  .project-contract-head {
    align-items: flex-start;
  }

  .project-contract-rail {
    grid-auto-columns: minmax(112px, 1fr);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .web-page-intro h2,
  .web-staging-welcome h2 {
    font-size: 28px;
  }

  .brand-profile-inline {
    grid-template-columns: 34px minmax(0, 1fr);
  }

  .brand-profile-inline .text-button {
    grid-column: 2;
    justify-self: start;
  }
}

@media (min-width: 601px) and (max-width: 900px) {
  .workflow-catalog-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 340px) {
  .app-header {
    padding-right: 10px;
    padding-left: 10px;
  }

  .app-header .brand-mark,
  .app-header .avatar-button {
    display: none;
  }

  .screen {
    padding-right: 10px;
    padding-left: 10px;
  }

  .workflow-grid {
    gap: 7px;
  }

  .workflow-meta {
    min-height: 91px;
    padding: 8px;
  }

  .composer-actions .primary-button {
    padding: 0 11px;
    font-size: 13px;
  }

  .composer-actions .label-full {
    display: none;
  }

  .composer-actions .label-short {
    display: inline;
  }

  .nav-item span {
    font-size: 9px;
  }
}

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

/* Direction 01: Calm Workspace
   Inspired by Claude's quiet, conversational working environment. */
.app-shell[data-direction="calm"] {
  --app-bg: #f5f1e8;
  --surface: #fbf9f4;
  --surface-soft: #ebe5d9;
  --surface-strong: #2f2a25;
  --text: #2e2925;
  --text-soft: #746d65;
  --line: #d9d0c3;
  --line-strong: #bdb2a5;
  --action: #a94c31;
  --action-pressed: #8e3c26;
  --trust: #526657;
  --trust-soft: #dfe6dd;
  --shadow-soft: 0 5px 18px rgb(70 56 41 / 7%);
}

.app-shell[data-direction="calm"] .app-header {
  min-height: 72px;
  border-bottom: 0;
  background: var(--app-bg);
  backdrop-filter: none;
}

.app-shell[data-direction="calm"] .brand-mark {
  border-radius: 50%;
  background: var(--action);
  color: #fff8ee;
}

.app-shell[data-direction="calm"] .brand-symbol {
  width: 20px;
  height: 20px;
}

.app-shell[data-direction="calm"] .eyebrow {
  display: none;
}

.app-shell[data-direction="calm"] .app-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 23px;
  font-weight: 500;
}

.app-shell[data-direction="calm"] .credit-pill,
.app-shell[data-direction="calm"] .avatar-button,
.app-shell[data-direction="calm"] .icon-button {
  background: transparent;
}

.app-shell[data-direction="calm"] .avatar-button {
  border-color: var(--text);
  color: var(--text);
}

.app-shell[data-direction="calm"] .resume-row {
  min-height: 58px;
  padding: 8px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.app-shell[data-direction="calm"] .resume-thumb {
  border-radius: 50%;
}

.app-shell[data-direction="calm"] .composer {
  overflow: visible;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgb(69 53 39 / 9%);
}

.app-shell[data-direction="calm"] .composer-head strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
  font-weight: 500;
}

.app-shell[data-direction="calm"] .assistant-status {
  color: var(--text-soft);
}

.app-shell[data-direction="calm"] .assistant-status::before {
  background: var(--action);
}

.app-shell[data-direction="calm"] .primary-button {
  background: var(--text);
  color: #fffaf1;
}

.app-shell[data-direction="calm"] .primary-button:hover {
  background: var(--action-pressed);
}

.app-shell[data-direction="calm"] .section-heading {
  align-items: baseline;
}

.app-shell[data-direction="calm"] .section-heading h2,
.app-shell[data-direction="calm"] .question-title,
.app-shell[data-direction="calm"] .plan-summary h2,
.app-shell[data-direction="calm"] .results-head h2,
.app-shell[data-direction="calm"] .sheet-title {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 500;
}

.app-shell[data-direction="calm"] .section-heading h2 {
  font-size: 22px;
}

.app-shell[data-direction="calm"] .workflow-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.app-shell[data-direction="calm"] .workflow-card {
  display: grid;
  min-height: 96px;
  grid-template-columns: 92px minmax(0, 1fr);
  align-items: stretch;
  border-width: 1px 0 0;
  border-radius: 0;
  background: transparent;
}

.app-shell[data-direction="calm"] .workflow-card:last-child {
  border-bottom: 1px solid var(--line);
}

.app-shell[data-direction="calm"] .workflow-visual {
  height: 100%;
  aspect-ratio: auto;
  border: 0;
  filter: saturate(.62) sepia(.08);
}

.app-shell[data-direction="calm"] .workflow-visual::after {
  display: none;
}

.app-shell[data-direction="calm"] .workflow-meta {
  display: grid;
  min-height: 0;
  align-content: center;
  padding: 12px 8px 12px 14px;
}

.app-shell[data-direction="calm"] .workflow-copy strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 17px;
  font-weight: 500;
}

.app-shell[data-direction="calm"] .badge {
  order: 2;
  width: fit-content;
  min-height: 18px;
  margin-top: 7px;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--action);
}

.app-shell[data-direction="calm"] .bottom-nav {
  border-top: 1px solid var(--line);
  background: var(--app-bg);
  backdrop-filter: none;
}

.app-shell[data-direction="calm"] .nav-item.is-active {
  color: var(--action);
}

.app-shell[data-direction="calm"] .choice,
.app-shell[data-direction="calm"] .plan-item,
.app-shell[data-direction="calm"] .result-card {
  box-shadow: none;
}

.app-shell[data-direction="calm"] .question-title {
  font-size: 29px;
  line-height: 1.1;
}

.app-shell[data-direction="calm"] .question-kicker {
  color: var(--action);
}

@media (min-width: 760px) {
  .app-shell.is-wide[data-direction="calm"] .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
  }
}

@media (max-width: 360px) {
  .app-shell[data-direction="calm"] .question-title {
    font-size: 26px;
  }
}

/* Direction 02: Soft Geometry
   Rounded, tactile modules with a quiet professional palette. */
.app-shell[data-direction="soft"] {
  --app-bg: #edf0ea;
  --surface: #ffffff;
  --surface-soft: #dde4dc;
  --surface-strong: #23302a;
  --text: #1e2924;
  --text-soft: #5b6660;
  --line: #d3dad4;
  --line-strong: #aeb9b1;
  --action: #c84f2f;
  --action-pressed: #ad3f23;
  --trust: #316b55;
  --trust-soft: #d9e9df;
}

.app-shell[data-direction="soft"] .app-header {
  min-height: 76px;
  border: 0;
  background: var(--app-bg);
  backdrop-filter: none;
}

.app-shell[data-direction="soft"] .brand-mark {
  border-radius: 14px 14px 5px;
  background: var(--text);
  color: #fff;
}

.app-shell[data-direction="soft"] .eyebrow {
  color: var(--trust);
}

.app-shell[data-direction="soft"] .credit-pill,
.app-shell[data-direction="soft"] .avatar-button,
.app-shell[data-direction="soft"] .icon-button {
  border: 0;
  border-radius: 14px;
  box-shadow: 0 2px 10px rgb(45 62 53 / 7%);
}

.app-shell[data-direction="soft"] .avatar-button {
  background: #f6b442;
  color: #2f281d;
}

.app-shell[data-direction="soft"] .resume-row {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 3px 14px rgb(45 62 53 / 7%);
}

.app-shell[data-direction="soft"] .resume-thumb {
  border-radius: 12px;
}

.app-shell[data-direction="soft"] .composer {
  border: 0;
  border-radius: 24px 24px 9px;
  box-shadow: 0 12px 32px rgb(44 61 52 / 10%);
}

.app-shell[data-direction="soft"] .composer-head {
  padding: 17px 17px 0;
}

.app-shell[data-direction="soft"] .composer textarea {
  padding-right: 17px;
  padding-left: 17px;
}

.app-shell[data-direction="soft"] .composer-actions {
  margin: 0 8px 8px;
  border-top: 1px solid var(--line);
}

.app-shell[data-direction="soft"] .primary-button,
.app-shell[data-direction="soft"] .secondary-button {
  border-radius: 16px;
}

.app-shell[data-direction="soft"] .workflow-grid {
  gap: 12px;
}

.app-shell[data-direction="soft"] .workflow-card {
  border: 0;
  border-radius: 22px 22px 8px;
  box-shadow: 0 3px 16px rgb(45 62 53 / 7%);
}

.app-shell[data-direction="soft"] .workflow-card:nth-child(2n) {
  border-radius: 8px 22px 22px;
}

.app-shell[data-direction="soft"] .workflow-visual {
  aspect-ratio: 1;
  border: 0;
  border-radius: inherit;
  border-bottom-right-radius: 7px;
  border-bottom-left-radius: 7px;
}

.app-shell[data-direction="soft"] .workflow-visual::after {
  display: none;
}

.app-shell[data-direction="soft"] .workflow-meta {
  min-height: 94px;
  padding: 11px;
}

.app-shell[data-direction="soft"] .badge {
  border-radius: 9px;
}

.app-shell[data-direction="soft"] .bottom-nav {
  min-height: calc(68px + var(--safe-bottom));
  margin: 0 8px 8px;
  border: 0;
  border-radius: 20px;
  background: var(--surface);
  backdrop-filter: none;
  box-shadow: 0 8px 28px rgb(33 48 40 / 14%);
}

.app-shell[data-direction="soft"] .nav-item {
  border-radius: 16px;
}

.app-shell[data-direction="soft"] .nav-item.is-active {
  color: var(--action);
}

.app-shell[data-direction="soft"] .choice,
.app-shell[data-direction="soft"] .plan-item,
.app-shell[data-direction="soft"] .result-card,
.app-shell[data-direction="soft"] .inline-field input {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 3px 14px rgb(45 62 53 / 6%);
}

.app-shell[data-direction="soft"] .choice.is-selected {
  background: var(--trust-soft);
  box-shadow: inset 0 0 0 2px var(--trust);
}

.app-shell[data-theme="dark"][data-direction="calm"] {
  --app-bg: #1d1a17;
  --surface: #28231f;
  --surface-soft: #342e29;
  --surface-strong: #f1eae1;
  --text: #f1eae1;
  --text-soft: #b9aea4;
  --line: #413a34;
  --line-strong: #61574e;
  --action: #e07856;
  --action-pressed: #ee8b69;
  --trust: #93b29d;
  --trust-soft: #293b31;
  --shadow-soft: none;
}

.app-shell[data-theme="dark"][data-direction="calm"] .app-header,
.app-shell[data-theme="dark"][data-direction="calm"] .bottom-nav {
  background: var(--app-bg);
}

.app-shell[data-theme="dark"][data-direction="calm"] .composer {
  box-shadow: 0 12px 36px rgb(0 0 0 / 20%);
}

.app-shell[data-theme="dark"][data-direction="calm"] .primary-button {
  background: #f1eae1;
  color: #28231f;
}

.app-shell[data-theme="dark"][data-direction="calm"] .avatar-button {
  border-color: var(--line-strong);
  color: var(--text);
}

.app-shell[data-theme="dark"][data-direction="soft"] {
  --app-bg: #151a17;
  --surface: #202822;
  --surface-soft: #2a352e;
  --surface-strong: #eef3ef;
  --text: #eef3ef;
  --text-soft: #aeb9b1;
  --line: #354239;
  --line-strong: #536359;
  --action: #ff7650;
  --action-pressed: #ff8968;
  --trust: #8bbca3;
  --trust-soft: #263c31;
  --shadow-soft: none;
}

.app-shell[data-theme="dark"][data-direction="soft"] .app-header {
  background: var(--app-bg);
}

.app-shell[data-theme="dark"][data-direction="soft"] .bottom-nav {
  background: var(--surface);
  box-shadow: 0 8px 28px rgb(0 0 0 / 28%);
}

.app-shell[data-theme="dark"][data-direction="soft"] .credit-pill,
.app-shell[data-theme="dark"][data-direction="soft"] .icon-button {
  background: var(--surface);
  color: var(--text);
}

.app-shell[data-theme="dark"][data-direction="soft"] .avatar-button {
  background: #f6b442;
  color: #2f281d;
}

.app-shell[data-theme="dark"][data-direction="soft"] .brand-mark {
  background: var(--action);
  color: #241c18;
}

.app-shell[data-theme="dark"][data-direction="soft"] .primary-button,
.app-shell[data-theme="dark"][data-direction="soft"] .tool-button.is-primary {
  color: #241c18;
}

/* Web-first staging direction: use the public VibePlus information architecture
   as the visual reference (rail, hero, idea rail, tools and account surfaces),
   while keeping NB's own copy, assets and runtime contracts. */
body.is-web-staging {
  background: #f3eee6;
}

body.is-web-staging .app-shell[data-theme="light"] {
  --app-bg: #f8f4ed;
  --surface: #fffefd;
  --surface-soft: #eee8df;
  --surface-strong: #263246;
  --text: #1e2a40;
  --text-soft: #687388;
  --line: #ddd5c9;
  --line-strong: #c7b9a6;
  --action: #a8752d;
  --action-pressed: #8f5f20;
  --trust: #2d6850;
  --trust-soft: #e3eee8;
  --shadow-soft: 0 10px 26px rgb(45 48 53 / 7%);
}

body.is-web-staging .app-shell {
  border-radius: 22px;
}

body.is-web-staging .web-staging-sidebar {
  padding: 26px 16px 18px;
  background: #fffefd;
}

body.is-web-staging .web-sidebar-brand {
  padding: 0 8px 8px;
}

body.is-web-staging .web-sidebar-brand strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.055em;
}

body.is-web-staging .web-sidebar-brand small {
  letter-spacing: .08em;
  text-transform: uppercase;
}

body.is-web-staging .web-sidebar-new {
  min-height: 48px;
  border-radius: 14px;
  letter-spacing: .01em;
}

body.is-web-staging .web-sidebar-section-title {
  margin: 2px 12px -14px;
  color: color-mix(in srgb, var(--text-soft) 66%, transparent);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .13em;
  text-transform: uppercase;
}

body.is-web-staging .web-sidebar-nav {
  gap: 2px;
}

body.is-web-staging .web-sidebar-item {
  min-height: 46px;
  border-radius: 0 10px 10px 0;
  font-weight: 650;
}

body.is-web-staging .web-sidebar-item.is-active {
  background: var(--surface-soft);
  color: var(--text);
}

body.is-web-staging .app-header {
  min-height: 76px;
  padding-right: 28px;
  padding-left: 28px;
  background: var(--app-bg);
  border-bottom-color: transparent;
}

body.is-web-staging .app-header .brand-mark,
body.is-web-staging .app-header .eyebrow {
  display: none;
}

body.is-web-staging .app-header h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -.035em;
}

body.is-web-staging .credit-pill,
body.is-web-staging .avatar-button {
  min-height: 40px;
  border-radius: 20px;
}

body.is-web-staging .credit-pill {
  padding: 0 14px;
  background: var(--surface-soft);
  border-color: transparent;
}

body.is-web-staging .avatar-button {
  min-width: 40px;
}

body.is-web-staging .web-search-trigger {
  display: inline-flex;
  width: min(300px, 28vw);
  min-width: 0;
  min-height: 40px;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 13px;
  text-align: left;
}

body.is-web-staging .web-search-trigger svg {
  width: 17px;
  flex: 0 0 17px;
}

body.is-web-staging .web-search-trigger span {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-web-staging .web-search-trigger kbd {
  display: inline-flex;
  min-width: 26px;
  height: 22px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}

body.is-web-staging .web-search-trigger:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

body.is-web-staging .web-sidebar-promo {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

body.is-web-staging .web-sidebar-referral,
body.is-web-staging .web-sidebar-account {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

body.is-web-staging .web-sidebar-referral {
  display: flex;
  min-height: 78px;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  gap: 10px;
  padding: 11px;
  color: var(--text);
  font-size: 12px;
  text-align: left;
}

body.is-web-staging .web-sidebar-referral span:last-child {
  align-self: flex-end;
  padding: 5px 12px;
  border: 1px solid var(--text);
  border-radius: 6px;
  font-size: 10px;
}

body.is-web-staging .web-sidebar-account {
  display: grid;
  gap: 8px;
  padding: 12px;
}

body.is-web-staging .web-sidebar-account button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

body.is-web-staging .web-sidebar-account button:first-child {
  border-color: var(--action);
  background: var(--action);
  color: #fff;
}

body.is-web-staging .web-sidebar-account .web-sidebar-pricing {
  min-height: 28px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 600;
}

body.is-web-staging .web-sidebar-account .web-sidebar-pricing span {
  color: var(--action);
}

body.is-web-staging .screen {
  padding: 4px 28px 40px;
}

body.is-web-staging .create-layout {
  gap: 24px;
}

body.is-web-staging .vibeplus-hero {
  display: grid;
  grid-template-columns: minmax(260px, .8fr) minmax(340px, 1.2fr);
  gap: 24px;
  align-items: stretch;
  margin: 0 0 24px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

body.is-web-staging .vibeplus-hero-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

body.is-web-staging .vibeplus-hero h2 {
  margin: 0;
  color: var(--text);
  font-size: clamp(28px, 3vw, 44px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
}

body.is-web-staging .vibeplus-hero h2 em {
  color: var(--action);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.06em;
  font-weight: 500;
  letter-spacing: -.055em;
}

body.is-web-staging .vibeplus-hero-copy > p:not(.question-kicker) {
  max-width: 430px;
  margin: 14px 0 0;
  color: var(--text-soft);
  font-size: 14px;
  line-height: 1.5;
}

body.is-web-staging .vibeplus-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 22px;
}

body.is-web-staging .vibeplus-hero-actions .primary-button {
  min-height: 46px;
  border-radius: 12px;
}

body.is-web-staging .vibeplus-hero-actions > span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

body.is-web-staging .vibeplus-hero-preview {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface-soft);
}

body.is-web-staging .vibeplus-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text);
  font-size: 13px;
}

body.is-web-staging .vibeplus-preview-head span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
}

body.is-web-staging .vibeplus-preview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin: 14px 0 10px;
}

body.is-web-staging .vibeplus-preview-card {
  display: block;
  min-width: 0;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border: 1px solid rgb(255 255 255 / 70%);
  border-radius: 12px;
  background-color: var(--surface);
  box-shadow: 0 4px 12px rgb(30 36 40 / 9%);
}

body.is-web-staging .vibeplus-hero-preview > p {
  margin: 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

body.is-web-staging .vibeplus-hero .web-staging-welcome-points {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

body.is-web-staging .vibeplus-quick-section {
  margin-top: 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

body.is-web-staging .vibeplus-quick-section .section-heading {
  margin-bottom: 16px;
}

body.is-web-staging .vibeplus-quick-section .section-heading h2,
body.is-web-staging .vibeplus-tool-teaser .section-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -.035em;
}

body.is-web-staging .vibeplus-hit {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin-left: 5px;
  padding: 0 7px;
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-family: inherit;
  font-size: 9px;
  font-weight: 800;
  vertical-align: middle;
}

body.is-web-staging .vibeplus-quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.is-web-staging .vibeplus-quick-section .workflow-card {
  border-radius: 16px;
  box-shadow: none;
}

body.is-web-staging .vibeplus-quick-section .workflow-meta {
  min-height: 92px;
  padding: 12px;
}

body.is-web-staging .vibeplus-tool-teaser {
  padding: 4px 0 0;
}

body.is-web-staging .vibeplus-tool-links {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

body.is-web-staging .vibeplus-tool-links > button {
  display: grid;
  min-width: 0;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 0 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  text-align: left;
}

body.is-web-staging .vibeplus-tool-links > button:hover {
  border-color: var(--action);
  transform: translateY(-1px);
}

body.is-web-staging .vibeplus-tool-links .sprite {
  display: block;
  width: 44px;
  height: 44px;
  grid-row: 1 / span 2;
  border-radius: 10px;
}

body.is-web-staging .vibeplus-tool-links strong {
  min-width: 0;
  font-size: 12px;
}

body.is-web-staging .vibeplus-tool-links small {
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.is-web-staging .vibeplus-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--line);
}

body.is-web-staging .vibeplus-stats > div {
  display: grid;
  gap: 4px;
  padding: 16px;
  background: var(--surface);
}

body.is-web-staging .vibeplus-stats strong {
  color: var(--action);
  font-size: 24px;
  letter-spacing: -.04em;
}

body.is-web-staging .vibeplus-stats span {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.35;
}

body.is-web-staging .inspiration-filter button.is-selected {
  border-color: var(--action);
  background: var(--action);
  color: #fff;
}

@media (max-width: 719px) {
  body.is-web-staging .app-shell {
    height: 100dvh;
    min-height: 100dvh;
  }

  body.is-web-staging .app-body {
    min-height: 0;
  }

  body.is-web-staging .app-header {
    min-height: 64px;
    padding-right: 14px;
    padding-left: 14px;
  }

  body.is-web-staging .screen {
    padding: 12px 14px 26px;
  }

  body.is-web-staging .vibeplus-hero {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 18px;
    border-radius: 18px;
  }

  body.is-web-staging .vibeplus-hero h2 {
    font-size: 34px;
  }

  body.is-web-staging .vibeplus-hero-preview {
    padding: 14px;
  }

  body.is-web-staging .vibeplus-hero .web-staging-welcome-points {
    margin-top: 0;
  }

  body.is-web-staging .vibeplus-quick-section {
    padding: 16px;
    border-radius: 16px;
  }

  body.is-web-staging .vibeplus-quick-section .workflow-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.is-web-staging .vibeplus-tool-links {
    grid-template-columns: 1fr;
  }

  body.is-web-staging .vibeplus-stats > div {
    padding: 12px 10px;
  }

  body.is-web-staging .vibeplus-stats strong {
    font-size: 20px;
  }
}

@media (max-width: 360px) {
  body.is-web-staging .vibeplus-hero h2 {
    font-size: 30px;
  }
  body.is-web-staging .vibeplus-stats span {
    font-size: 10px;
  }
}

/* Final web-staging parity pass: mirror the public VibePlus shell geometry
   while keeping NB's own components, copy and runtime routes. */
body.is-web-staging .create-layout {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

body.is-web-staging .app-shell.is-wide .create-layout {
  display: flex;
  grid-template-columns: none;
  align-items: stretch;
}

body.is-web-staging .create-layout > div,
body.is-web-staging .vibeplus-quick-section {
  display: contents;
}

body.is-web-staging .create-layout > div > .section {
  order: 3;
}

body.is-web-staging .vibeplus-quick-section > * {
  order: 1;
}

body.is-web-staging .vibeplus-quick-section > .section-heading {
  margin-bottom: 28px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

body.is-web-staging .app-shell.is-wide .vibeplus-quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 0;
}

body.is-web-staging .vibeplus-tool-teaser,
body.is-web-staging .vibeplus-stats {
  order: 2 !important;
}

@media (min-width: 720px) {
  body.is-web-staging .stage {
    padding: 0;
  }

  body.is-web-staging .app-shell {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.is-web-staging .app-shell.is-wide {
    grid-template-columns: 260px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  body.is-web-staging .app-shell.is-wide .app-header,
  body.is-web-staging .app-shell.is-wide .app-body,
  body.is-web-staging .app-shell.is-wide .app-action {
    grid-column: 2;
  }

  body.is-web-staging .app-body {
    min-height: 0;
  }
}

@media (max-width: 719px) {
  body.is-web-staging .web-search-trigger {
    width: 40px;
    padding: 0;
    justify-content: center;
    border-radius: 20px;
  }

  body.is-web-staging .web-search-trigger span,
  body.is-web-staging .web-search-trigger kbd {
    display: none;
  }

  body.is-web-staging .app-shell.is-wide .vibeplus-quick-grid {
    grid-template-columns: 1fr;
  }
}
