:root {
  --bg: #111314;
  --bg-panel: #efe8dc;
  --cyan: #3ef0ff;
  --cyan-dim: #147a86;
  --cyan-deep: #062428;
  --ink: #ece7df;
  --muted: #9a9388;
  --matte: #efe8dc;
  --matte-2: #f6f1e8;
  --matte-ink: #1c1916;
  --matte-muted: #6b645c;
  --stone: #c8bfb0;
  /* Logo face — cream / light wood */
  --bone: #e8dfd0;
  --bone-deep: #c9bba8;
  --void: #050607;
  --line: rgba(62, 240, 255, 0.28);
  --line-matte: rgba(28, 25, 22, 0.14);
  --danger: #c45c4a;
  --font-ui: "Syne", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  --glow-cyan: 0 0 22px rgba(62, 240, 255, 0.35);
  --extrude: 0 1px 0 rgba(232, 223, 208, 0.12), 3px 4px 0 rgba(62, 240, 255, 0.18);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-mono);
}

body[data-mode="runtime"] {
  overflow: hidden;
}

body[data-mode="hub"],
body[data-mode="studio"],
body[data-mode="base"],
body[data-mode="welcome"] {
  height: auto;
  min-height: 100%;
  overflow: auto;
}

#app {
  position: relative;
  width: 100%;
  min-height: 100%;
}

body[data-mode="runtime"] #app {
  height: 100%;
}

#room {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  cursor: grab;
}

#room.is-dragging { cursor: grabbing; }

#label-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

#runtime-layer {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

#runtime-layer[hidden] { display: none; }

.chrome {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  min-height: 64px;
  overflow: visible;
  pointer-events: none;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}

body[data-mode="hub"] .chrome,
body[data-mode="studio"] .chrome,
body[data-mode="base"] .chrome {
  position: relative;
  background: var(--matte);
  border-bottom: 1px solid var(--line-matte);
  pointer-events: none;
}

body[data-mode="welcome"] .chrome {
  position: sticky;
  background: #050607;
  border-bottom: 1px solid rgba(62, 240, 255, 0.18);
  pointer-events: none;
}

body:not([data-mode="runtime"]) #runtime-layer {
  display: none !important;
  pointer-events: none !important;
}

body[data-mode="base"] {
  height: 100%;
  overflow: hidden;
}

body[data-mode="base"] #app {
  height: 100%;
  display: flex;
  flex-direction: column;
}

body[data-mode="base"] #page {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  z-index: 2;
}

body[data-mode="base"] #page-body {
  height: 100%;
  min-height: 0;
}

body[data-mode="hub"] .brand-text strong,
body[data-mode="studio"] .brand-text strong,
body[data-mode="base"] .brand-text strong,
body[data-mode="hub"] .modes button,
body[data-mode="studio"] .modes button,
body[data-mode="base"] .modes button {
  color: var(--matte-muted);
}

body[data-mode="welcome"] .modes button {
  color: var(--muted);
}

body[data-mode="welcome"] .modes button:hover {
  color: var(--ink);
}

body[data-mode="welcome"] .modes button.is-active {
  color: var(--cyan);
  border-bottom-color: var(--cyan);
}

body[data-mode="hub"] .modes button:hover,
body[data-mode="studio"] .modes button:hover,
body[data-mode="base"] .modes button:hover {
  color: var(--matte-ink);
}

body[data-mode="hub"] .modes button.is-active,
body[data-mode="studio"] .modes button.is-active,
body[data-mode="base"] .modes button.is-active {
  color: var(--matte-ink);
  border-bottom-color: var(--cyan);
}

body[data-mode="runtime"] .chrome {
  position: absolute;
  border-bottom: 0;
  background: linear-gradient(180deg, rgba(17, 19, 20, 0.88) 0%, rgba(17, 19, 20, 0) 100%);
}

.brand,
.modes,
.chrome-right,
.chrome-note,
.views,
.room-look { pointer-events: auto; }

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

.brand-logo {
  display: block;
  height: 36px;
  width: auto;
  max-width: 220px;
  padding: 0;
  object-fit: contain;
  object-position: left center;
  background: transparent;
  filter: drop-shadow(0 0 10px rgba(62, 240, 255, 0.22));
}

.brand-logo--matte {
  display: none;
}

body[data-mode="base"] .brand-logo--void,
body[data-mode="hub"] .brand-logo--void,
body[data-mode="studio"] .brand-logo--void {
  display: none;
}

body[data-mode="base"] .brand-logo--matte,
body[data-mode="hub"] .brand-logo--matte,
body[data-mode="studio"] .brand-logo--matte {
  display: block;
}

body[data-mode="base"] .brand-logo,
body[data-mode="hub"] .brand-logo,
body[data-mode="studio"] .brand-logo {
  height: 34px;
  /* Cream faces match bone — use the ink-face cut so letters sit on the paper. */
  filter: drop-shadow(0 1px 2px rgba(20, 28, 32, 0.22));
}

body[data-mode="welcome"] .brand-logo,
body[data-mode="runtime"] .brand-logo {
  height: 36px;
  filter: drop-shadow(0 0 12px rgba(62, 240, 255, 0.28));
}

.mark {
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--cyan);
  border-radius: 2px;
  box-shadow:
    0 0 12px rgba(62, 240, 255, 0.45),
    2px 2px 0 rgba(62, 240, 255, 0.35);
  background:
    linear-gradient(145deg, var(--bone) 0%, var(--bone-deep) 42%, transparent 43%),
    radial-gradient(circle at 40% 35%, #9ffff8, #0b3a40);
}

.brand-text {
  line-height: 1.05;
}

.brand-text strong {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.modes {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;
  padding: 0;
  border: 0;
  background: transparent;
  backdrop-filter: none;
}

.modes button {
  appearance: none;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 8px 2px 10px;
  cursor: pointer;
}

.modes button:hover { color: var(--ink); }

.modes button.is-active {
  color: var(--cyan);
  background: transparent;
  border-bottom-color: var(--cyan);
}

.beta-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 5px 0;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  vertical-align: 1px;
  color: #041014;
  background: var(--cyan);
  box-shadow: 1px 1px 0 rgba(62, 240, 255, 0.35);
}

.modes button.is-locked {
  opacity: 0.55;
}

.modes button.is-locked:hover {
  color: var(--muted);
}

.modes button.is-locked .beta-tag {
  opacity: 1;
}

body[data-beta="open"] .modes button[data-beta] .beta-tag {
  background: transparent;
  color: var(--cyan);
  border: 1px solid rgba(62, 240, 255, 0.45);
  box-shadow: none;
}

#beta-sheet {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 7, 0.72);
  backdrop-filter: blur(8px);
}

#beta-sheet[hidden] { display: none; }

.beta-card {
  position: relative;
  width: min(400px, 100%);
  padding: 28px 24px 24px;
  background: #0a0c0e;
  color: var(--bone);
  border: 1px solid rgba(62, 240, 255, 0.35);
  box-shadow:
    3px 4px 0 rgba(62, 240, 255, 0.28),
    0 0 40px rgba(62, 240, 255, 0.12);
}

.beta-card .page-kicker {
  color: var(--cyan);
}

.beta-card h2 {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.beta-card .lede {
  margin: 0 0 18px;
  color: rgba(232, 223, 208, 0.6);
  font-size: 13px;
}

.beta-close {
  position: absolute;
  top: 10px;
  right: 12px;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(232, 223, 208, 0.55);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.beta-close:hover { color: var(--cyan); }

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

.beta-form .field {
  color: rgba(232, 223, 208, 0.55);
}

.beta-form .field input {
  background: #06080a;
  border: 1px solid rgba(62, 240, 255, 0.28);
  color: var(--bone);
}

.beta-card .flash { color: var(--cyan); }
.beta-card .flash.error { color: var(--danger); }

#auth-sheet {
  position: fixed;
  inset: 0;
  z-index: 41;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5, 6, 7, 0.72);
  backdrop-filter: blur(8px);
}

#auth-sheet[hidden] { display: none; }

.auth-or {
  margin: 14px 0 10px;
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(232, 223, 208, 0.4);
}

#auth-microsoft {
  display: block;
  text-align: center;
  text-decoration: none;
}

#beta-to-auth {
  margin: 0 0 16px;
}

body[data-access="1"] .beta-tag {
  display: none;
}

#auth-microsoft[hidden] { display: none; }

.chrome-right {
  justify-self: end;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
}

#runtime-chrome {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

#runtime-chrome[hidden] { display: none; }

.account-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
  pointer-events: auto;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
}

.account-btn[hidden] {
  display: none !important;
}

body[data-mode="hub"] .account-btn,
body[data-mode="studio"] .account-btn,
body[data-mode="base"] .account-btn {
  border-color: var(--line-matte);
  color: var(--matte-ink);
}

#account-sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding: 72px 22px 22px;
  background: rgba(17, 19, 20, 0.45);
  pointer-events: auto;
  cursor: default;
}

#account-sheet[hidden] { display: none; }

.account-card {
  width: min(380px, 100%);
  padding: 22px 20px;
  background: var(--matte);
  color: var(--matte-ink);
  border: 1px solid var(--line-matte);
  pointer-events: auto;
  cursor: auto;
}

.account-card h2 {
  font-family: var(--font-ui);
  margin: 0 0 10px;
}

.account-card .lede { margin-bottom: 16px; }

.views {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  background: rgba(5, 12, 14, 0.7);
  backdrop-filter: blur(10px);
}

.views[hidden] { display: none; }

.views button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
}

.views button:hover { color: var(--ink); }

.views button.is-active {
  color: var(--bg);
  background: var(--cyan);
}

#leave-dive {
  appearance: none;
  border: 1px solid var(--cyan);
  background: transparent;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 12px;
  cursor: pointer;
  pointer-events: auto;
}

#leave-dive:hover {
  background: var(--cyan);
  color: var(--bg);
}

#leave-dive[hidden] { display: none; }

.room-look {
  position: relative;
  flex-shrink: 0;
}

#room-look-btn {
  appearance: none;
  border: 1px solid var(--line);
  background: rgba(5, 12, 14, 0.7);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 7px 12px;
  cursor: pointer;
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

#room-look-btn:hover,
#room-look-btn.is-open {
  border-color: var(--cyan);
  color: var(--cyan);
}

#room-look-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 8;
  width: min(320px, calc(100vw - 36px));
  max-height: min(74vh, 640px);
  overflow: auto;
  padding: 16px 16px 14px;
  border: 1px solid var(--line);
  background: rgba(8, 12, 16, 0.94);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  color: var(--ink);
}

#room-look-panel[hidden] { display: none; }

.look-kicker {
  margin: 0 0 4px;
  color: var(--look-primary, var(--cyan));
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.look-lede {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.look-section {
  margin: 0 0 14px;
}

.look-section:last-child { margin-bottom: 0; }

.look-section h3 {
  margin: 0 0 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.look-swatches,
.look-pills,
.look-floors {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.look-swatch {
  appearance: none;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

.look-swatch:hover { transform: scale(1.08); }

.look-swatch.is-on {
  box-shadow: 0 0 0 2px #0b1014, 0 0 0 4px var(--look-primary, var(--cyan));
}

.look-pill {
  appearance: none;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
}

.look-pill:hover { color: var(--ink); }

.look-pill.is-on {
  color: var(--bg);
  background: var(--look-primary, var(--cyan));
  border-color: var(--look-primary, var(--cyan));
}

.look-floor {
  appearance: none;
  flex: 1 1 calc(50% - 8px);
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  text-align: left;
}

.look-floor:hover { color: var(--ink); }

.look-floor.is-on {
  border-color: var(--look-primary, var(--cyan));
  color: var(--ink);
}

.look-floor-preview {
  display: block;
  height: 36px;
  border-radius: 2px;
}

.look-floor[data-floor="matte"] .look-floor-preview {
  background: radial-gradient(circle at 40% 35%, #e8eef4, #b8c2ce 70%, #8a96a4);
}

.look-floor[data-floor="laser"] .look-floor-preview {
  background:
    repeating-linear-gradient(0deg, transparent 0 7px, var(--look-primary, var(--cyan)) 7px 8px),
    repeating-linear-gradient(90deg, transparent 0 7px, var(--look-primary, var(--cyan)) 7px 8px),
    #07090c;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--look-primary, var(--cyan)) 45%, transparent);
}

.look-floor[data-floor="glass"] .look-floor-preview {
  background:
    radial-gradient(circle at 40% 30%, color-mix(in srgb, var(--look-primary, var(--cyan)) 35%, transparent), transparent 55%),
    linear-gradient(180deg, rgba(220, 230, 240, 0.35), rgba(8, 14, 20, 0.55));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--look-primary, var(--cyan)) 40%, transparent);
}

.look-floor[data-floor="frost"] .look-floor-preview {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.55), transparent 42%),
    linear-gradient(160deg, #e8eef4, #9aa8b4);
}

#room-look[hidden] { display: none; }

.chrome-note {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

#page {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 64px);
  background: var(--matte-2);
  color: var(--matte-ink);
}

#page[hidden] { display: none; }

.page-inner {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 28px 80px;
}

.page-hero {
  margin: 0 0 36px;
  max-width: 640px;
}

.page-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.page-hero h1,
#page h1 {
  font-family: var(--font-ui);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 12px;
  color: var(--matte-ink);
}

#page .lede,
.page-hero .lede {
  color: var(--matte-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 22px;
}

.card-grid {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.card-grid > li {
  border: 1px solid var(--line-matte);
  background: var(--matte);
  color: var(--matte-ink);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 168px;
}

.hub-page .hub-hero {
  max-width: 720px;
  margin-bottom: 48px;
}

.hub-section {
  margin: 0 0 48px;
}

.hub-section-head {
  margin: 0 0 18px;
  max-width: 560px;
}

.hub-h2 {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--matte-ink);
}

.hub-section-lede {
  margin: 0;
  color: var(--matte-muted);
  font-size: 13px;
  line-height: 1.5;
}

.hub-import {
  margin-top: 14px;
}

.hub-shelf {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  align-items: stretch;
}

.hub-shelf > li {
  padding: 0;
  border: none;
  background: transparent;
  min-height: 0;
  display: flex;
  height: 100%;
}

.kit-card {
  display: grid;
  gap: 12px;
}

.hub-kit {
  appearance: none;
  width: 100%;
  height: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  padding: 0;
  gap: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  transition: border-color 160ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.hub-kit:hover,
.hub-kit:focus-visible {
  border-color: var(--cyan);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(28, 26, 24, 0.08);
  outline: none;
}

.hub-kit:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

.kit-preview-wrap {
  position: relative;
  overflow: hidden;
  background: #141210;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.kit-preview-wrap .kit-preview {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: cover;
  object-position: center center;
  border: none;
  border-bottom: 1px solid var(--line-matte);
  transition: transform 280ms ease;
}

.hub-kit:hover .kit-preview-wrap .kit-preview {
  transform: scale(1.03);
}

.kit-float {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 12px;
  z-index: 1;
  max-width: calc(100% - 24px);
  padding: 8px 10px;
  border: 1px solid rgba(244, 240, 234, 0.08);
  background: rgba(20, 18, 16, 0.62);
  backdrop-filter: blur(8px);
  color: #f4f0ea;
  pointer-events: none;
  display: grid;
  gap: 3px;
}

.kit-float-title {
  font-family: var(--font-ui);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: #f4f0ea;
}

.kit-float-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.35;
  color: rgba(244, 240, 234, 0.62);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.kit-preview-empty {
  width: 100%;
  height: 100%;
  min-height: 0;
  background:
    radial-gradient(circle at 50% 45%, rgba(62, 240, 255, 0.16), transparent 42%),
    #141210;
}

.hub-kit .kit-card-body {
  padding: 12px 14px 14px;
  display: grid;
  grid-template-rows: minmax(2.9em, 2.9em) auto;
  gap: 8px;
  align-content: start;
  min-height: 0;
}

.hub-kit .pkg-does {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  min-height: 2.9em;
}

.hub-kit .pkg-meta {
  margin-top: auto;
  align-self: end;
}

.kit-holdings-note {
  margin: 0;
  color: var(--matte-ink);
  font-size: 12px;
  line-height: 1.45;
}

.hub-flash {
  position: sticky;
  bottom: 16px;
  z-index: 5;
}

.hub-sheet[hidden] {
  display: none !important;
}

.hub-sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.hub-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 18, 16, 0.55);
  backdrop-filter: blur(6px);
}

.hub-sheet-panel {
  position: relative;
  z-index: 1;
  width: min(920px, 100%);
  max-height: min(90vh, 820px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.9fr);
  background: var(--matte);
  border: 1px solid var(--line-matte);
  color: var(--matte-ink);
  box-shadow: 0 24px 60px rgba(20, 18, 16, 0.28);
  animation: hub-sheet-in 200ms ease;
}

@keyframes hub-sheet-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.hub-sheet-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  appearance: none;
  border: 1px solid var(--line-matte);
  background: rgba(244, 240, 234, 0.92);
  color: var(--matte-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
}

.hub-sheet-close:hover {
  border-color: var(--cyan);
}

.hub-sheet-media {
  background: #141210;
  min-height: 280px;
}

.hub-sheet-media img {
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hub-sheet-fallback {
  width: 100%;
  height: 100%;
  min-height: 280px;
  background:
    radial-gradient(circle at 50% 45%, rgba(62, 240, 255, 0.18), transparent 46%),
    #141210;
}

.hub-sheet-body {
  padding: 28px 24px 24px;
  display: grid;
  align-content: start;
  gap: 12px;
}

.hub-sheet-kicker {
  margin: 0;
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hub-sheet-body h3 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hub-sheet-does {
  margin: 0;
  color: var(--matte-muted);
  font-size: 14px;
  line-height: 1.55;
}

.hub-sheet-kit {
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line-matte);
  color: var(--matte-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.hub-sheet-actions {
  margin-top: 10px;
  flex-wrap: wrap;
}

@media (max-width: 760px) {
  .hub-sheet-panel {
    grid-template-columns: 1fr;
    max-height: 92vh;
  }

  .hub-sheet-media img,
  .hub-sheet-fallback {
    min-height: 200px;
  }
}

.kit-card-body {
  display: grid;
  gap: 6px;
}

.kit-preview {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line-matte);
  background: #1c1a18;
  display: block;
}

.kit-preview-chip {
  width: 72px;
  height: 44px;
  flex: 0 0 72px;
  aspect-ratio: auto;
}

.kit-chip {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  color: var(--matte-ink);
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.kit-chip strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 14px;
}

.kit-chip span {
  display: block;
  margin-top: 3px;
  color: var(--matte-muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.kit-chip:hover,
.kit-chip.is-active {
  border-color: var(--cyan);
}

.kit-chip-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.kit-sample-preview {
  margin: 0;
  color: var(--matte-muted);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  line-height: 1.45;
  text-transform: none;
}

.import-preview {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  color: var(--matte-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.45;
}

.studio-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px 48px;
  align-items: start;
}

.empty-honest {
  border: 1px solid var(--line-matte);
  background: var(--matte);
  padding: 28px 18px;
  text-align: center;
  color: var(--matte-ink);
  font-family: var(--font-ui);
  font-size: 20px;
  letter-spacing: -0.02em;
}

.empty-honest span {
  display: block;
  margin-top: 8px;
  color: var(--matte-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.04em;
}

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

.pkg-list button.pkg {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--cyan-deep);
  color: inherit;
  padding: 12px 12px 11px;
  cursor: pointer;
  font-family: inherit;
}

.pkg-list button.pkg:hover {
  border-color: var(--cyan);
}

.pkg-name {
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
}

.pkg-meta {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  color: var(--matte-muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

label.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--matte-muted);
}

input, select, textarea {
  appearance: none;
  width: 100%;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  color: var(--matte-ink);
  font-family: var(--font-mono);
  font-size: 13px;
  padding: 10px 11px;
  border-radius: 0;
}

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

.json-edit {
  min-height: 220px;
  font-size: 11px;
  line-height: 1.45;
}

.sample-flag {
  letter-spacing: 0.22em;
  font-size: 12px;
  padding: 5px 10px 6px;
  color: #eef4f8;
  background: rgba(4, 12, 14, 0.92);
  border: 1px solid rgba(180, 196, 208, 0.35);
  box-shadow: none;
}

.composed-flag {
  letter-spacing: 0.18em;
  font-size: 12px;
  padding: 5px 10px 6px;
  color: #061018;
  background: rgba(62, 240, 255, 0.88);
  border: 1px solid rgba(62, 240, 255, 0.95);
  box-shadow: none;
}

body:not([data-dive]) .district-tag,
body:not([data-dive]) .below-tag {
  display: none !important;
}

.time-plaque {
  text-align: center;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  pointer-events: none;
  white-space: nowrap;
}

.time-plaque-kicker {
  font-size: 9px;
  letter-spacing: 0.22em;
  color: rgba(180, 196, 208, 0.88);
  text-transform: uppercase;
}

.time-plaque-date {
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #eef4f8;
  margin-top: 2px;
}

.district-tag {
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(220, 232, 240, 0.92);
  padding: 2px 6px;
  background: rgba(4, 12, 18, 0.72);
  border: 1px solid rgba(180, 196, 208, 0.28);
}

#runtime-layer .name-tag.is-empty {
  color: #c4cdd6;
  background: rgba(16, 22, 30, 0.88);
  border: 1px solid rgba(196, 205, 214, 0.28);
}

input:focus, select:focus, textarea:focus {
  outline: 1px solid var(--cyan);
  border-color: var(--cyan);
}

.btn {
  appearance: none;
  border: 1px solid var(--cyan);
  background: var(--cyan);
  color: #041014;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 10px 14px;
  cursor: pointer;
}

.btn.ghost {
  background: transparent;
  color: var(--matte-ink);
  border-color: var(--matte-ink);
}

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

.btn.danger {
  border-color: var(--danger);
  background: transparent;
  color: var(--danger);
}

.flash {
  margin: 0 0 14px;
  font-size: 12px;
  color: var(--matte-ink);
}

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

.file-import {
  border: 1px solid var(--line-matte);
  background: var(--matte);
  padding: 16px;
  margin-bottom: 16px;
}

.file-import p {
  margin: 0 0 10px;
  color: var(--matte-muted);
  font-size: 11px;
  line-height: 1.5;
}

#hover-pin {
  position: absolute;
  z-index: 4;
  transform: translate(-50%, -130%);
  pointer-events: none;
  padding: 4px 8px 5px;
  border: 1px solid var(--cyan);
  background: rgba(4, 10, 12, 0.92);
  color: var(--cyan);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

#hover-pin.is-email {
  max-width: 280px;
  padding: 8px 10px 9px;
  letter-spacing: 0.04em;
  text-transform: none;
  white-space: normal;
  line-height: 1.35;
}

#hover-pin.is-email .pin-from {
  font-size: 10px;
  opacity: 0.72;
  letter-spacing: 0.06em;
  margin-bottom: 2px;
}

#hover-pin.is-email .pin-subject {
  font-size: 12px;
  font-weight: 600;
  color: #ecffff;
  margin-bottom: 3px;
}

#hover-pin.is-email .pin-gist {
  font-size: 11px;
  color: rgba(200, 236, 244, 0.88);
  letter-spacing: 0.02em;
}

.name-tag.email-life {
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: 0.75;
}

#sculpture-panel {
  position: relative;
  z-index: 4;
  pointer-events: auto;
  transform: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px 11px;
  border: 1px solid rgba(62, 240, 255, 0.5);
  background: rgba(4, 10, 12, 0.94);
  border-radius: 10px;
  min-width: 196px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  animation: handle-pop 0.16s ease-out;
}

.sculpture-handle-anchor {
  position: relative;
  pointer-events: auto;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 8px;
  transform: translate(0, -50%);
}

.sculpture-handle-anchor::before {
  content: "";
  position: absolute;
  top: 13px;
  right: 100%;
  width: 14px;
  height: 1px;
  background: rgba(62, 240, 255, 0.42);
}

.sculpture-handle-anchor[hidden] {
  display: none !important;
}

.orbit-enter {
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.orbit-enter[hidden] {
  display: none !important;
}

.orbit-enter-btn {
  appearance: none;
  margin: 0;
  border: 1px solid rgba(62, 240, 255, 0.45);
  background: rgba(8, 12, 14, 0.9);
  color: var(--cyan, #3ef0ff);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 10px 6px;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.orbit-enter-btn:hover {
  border-color: var(--cyan, #3ef0ff);
  background: rgba(10, 18, 22, 0.96);
}

.orbit-enter-btn:focus-visible {
  outline: 1px solid var(--cyan, #3ef0ff);
  outline-offset: 2px;
}

@keyframes handle-pop {
  from { opacity: 0; transform: translateX(-8px); }
  to { opacity: 1; transform: none; }
}

.city-display-fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

.city-display-fieldset legend {
  margin-bottom: 4px;
}

.city-display-modes {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.city-display-option {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--cyan);
  cursor: pointer;
}

.city-display-option input {
  accent-color: var(--cyan);
}

.city-finance-controls {
  border-bottom: 1px solid rgba(62, 240, 255, 0.22);
  padding-bottom: 8px;
  margin-bottom: 2px;
}

.city-finance-controls.is-busy,
.portfolio-menu.is-busy {
  opacity: 0.72;
  pointer-events: none;
}

.portfolio-menu {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 248px;
}

.portfolio-menu-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(183, 247, 255, 0.72);
}

.portfolio-menu-value {
  margin: 0;
  font-family: var(--font-display, "Syne", sans-serif);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--cyan);
}

.portfolio-time-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portfolio-time-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
}

.portfolio-time-current {
  font-size: 11px;
  color: var(--cyan);
  letter-spacing: 0.04em;
}

.portfolio-time-block input[type="range"] {
  width: 100%;
  accent-color: var(--cyan);
  pointer-events: auto;
  touch-action: none;
  cursor: ew-resize;
}

.portfolio-time-ticks {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(183, 247, 255, 0.55);
}

.portfolio-asof {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(183, 247, 255, 0.72);
}

.portfolio-display-block {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.portfolio-display-segments {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}

.portfolio-segment {
  appearance: none;
  border: 1px solid rgba(62, 240, 255, 0.28);
  border-radius: 6px;
  font-size: 10px;
  letter-spacing: 0.04em;
  text-align: center;
  color: rgba(183, 247, 255, 0.82);
  background: rgba(4, 10, 12, 0.55);
  padding: 6px 8px;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, color 0.12s ease;
}

.portfolio-segment:hover,
.portfolio-segment.is-active {
  border-color: var(--cyan);
  color: var(--cyan);
  background: rgba(62, 240, 255, 0.1);
}

.portfolio-menu-hint {
  margin: 0;
  font-size: 9px;
  letter-spacing: 0.08em;
  color: rgba(183, 247, 255, 0.5);
}

.city-finance-menu-slot {
  pointer-events: auto;
  position: relative;
  transform: translate(0, -50%);
}

.city-finance-menu-slot::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  width: 22px;
  height: 1px;
  background: rgba(62, 240, 255, 0.42);
}

#sculpture-panel.is-finance-dock {
  position: fixed;
  z-index: 8;
  margin: 0;
  animation: finance-dock-pop 0.18s ease-out;
  transform: translate(0, -50%);
  min-width: 228px;
}

#sculpture-panel.is-finance-dock #handle-placement-controls {
  display: none;
}

#sculpture-panel.is-finance-dock .portfolio-time-block input[type="range"],
#sculpture-panel.is-finance-dock .portfolio-display-segments {
  pointer-events: auto;
}

@keyframes finance-dock-pop {
  from { opacity: 0; transform: translate(8px, -50%); }
  to { opacity: 1; transform: translate(0, -50%); }
}

.city-time-end {
  margin: 4px 0 0;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(183, 247, 255, 0.72);
}

.handle-field select {
  width: 100%;
  margin-top: 4px;
  background: rgba(4, 10, 12, 0.92);
  color: var(--cyan);
  border: 1px solid rgba(62, 240, 255, 0.35);
  border-radius: 6px;
  font-size: 11px;
  padding: 4px 6px;
}

#sculpture-panel[hidden] { display: none; }

.sculpture-toggle {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(62, 240, 255, 0.5);
  background: rgba(4, 10, 12, 0.94);
  color: var(--cyan);
  font-size: 18px;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  padding: 0;
}

.sculpture-toggle:hover,
.sculpture-toggle.is-open {
  border-color: var(--cyan);
  background: rgba(12, 40, 48, 0.96);
}

.handle-field {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: default;
}

.handle-label {
  color: var(--matte-muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.handle-field input[type="range"] {
  width: 100%;
  height: 14px;
  margin: 0;
  accent-color: var(--cyan);
  cursor: pointer;
}

.handle-val {
  color: var(--cyan);
  font-size: 10px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

#inspect-card {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 6;
  max-width: min(320px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 0;
  background: var(--matte);
  color: var(--matte-ink);
  pointer-events: none;
}

#inspect-card span {
  display: block;
  color: var(--matte-muted);
  font-size: 11px;
  letter-spacing: 0.06em;
  line-height: 1.45;
}

#inspect-card pre.source {
  margin: 10px 0 0;
  max-height: 220px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  color: var(--matte-ink);
  font-size: 11px;
  line-height: 1.4;
  white-space: pre-wrap;
}

#inspect-card.is-story {
  max-width: min(360px, calc(100vw - 44px));
}
#inspect-card.is-story strong {
  display: block;
  font-size: 15px;
  line-height: 1.3;
  letter-spacing: 0.01em;
}
#inspect-card.is-studio {
  max-width: min(420px, calc(100vw - 44px));
  pointer-events: auto;
}

#inspect-card textarea#organ-source {
  display: block;
  width: 100%;
  min-height: 180px;
  margin: 10px 0 0;
  padding: 8px;
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  color: var(--matte-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  resize: vertical;
}

#inspect-card .studio-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

#inspect-card .studio-actions button {
  appearance: none;
  border: 1px solid var(--matte-ink);
  background: transparent;
  color: var(--matte-ink);
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 6px 10px;
  cursor: pointer;
}

#inspect-card .studio-actions #organ-run {
  border-color: var(--cyan-dim);
  color: var(--cyan-dim);
}

.stock-card {
  position: fixed;
  z-index: 8;
  transform: translate(0, 0);
  min-width: 168px;
  max-width: min(240px, calc(100vw - 32px));
  padding: 10px 12px 11px;
  border: 1px solid rgba(62, 240, 255, 0.45);
  background: rgba(4, 10, 12, 0.94);
  color: #e8feff;
  pointer-events: auto;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  cursor: grab;
  touch-action: none;
  user-select: none;
}

.stock-card.is-dragging {
  cursor: grabbing;
  border-color: var(--cyan);
}

.stock-card-x {
  position: absolute;
  top: 4px;
  right: 6px;
  border: 0;
  background: transparent;
  color: rgba(62, 240, 255, 0.7);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  z-index: 1;
}

#stock-card-link {
  position: fixed;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

#stock-card-link[hidden] { display: none; }

#stock-card-link-line {
  stroke: rgba(62, 240, 255, 0.55);
  stroke-width: 1.25;
  stroke-dasharray: 3 4;
}

#stock-card-link-dot {
  fill: rgba(62, 240, 255, 0.9);
}

.stock-card-ticker {
  margin: 0 20px 2px 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

.stock-card-name {
  margin: 0 0 6px;
  font-size: 10px;
  color: rgba(232, 254, 255, 0.65);
  line-height: 1.35;
}

.stock-card-price {
  margin: 0 0 2px;
  font-size: 18px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stock-card-change {
  margin: 0 0 8px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.stock-card-change span {
  color: rgba(232, 254, 255, 0.45);
  font-size: 10px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.stock-card-change.is-up { color: #3dd68c; }
.stock-card-change.is-down { color: #f07178; }

.stock-card-stats {
  margin: 0;
  display: grid;
  gap: 4px;
}

.stock-card-stats div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 10px;
}

.stock-card-stats dt {
  margin: 0;
  color: rgba(232, 254, 255, 0.5);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.stock-card-stats dd {
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.stock-card-stats .is-up { color: #3dd68c; }
.stock-card-stats .is-down { color: #f07178; }

.stock-card-side {
  margin: 8px 0 0;
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(232, 254, 255, 0.38);
}

.stock-card[hidden] {
  display: none !important;
}

#inspect-card strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 16px;
  letter-spacing: 0.02em;
  margin-bottom: 6px;
}

#agent-line {
  position: absolute;
  z-index: 7;
  pointer-events: auto;
}

#agent-line[hidden] { display: none; }

/* To-do cylinder in-room compose */
.cylinder-compose {
  position: absolute;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 8;
  width: min(520px, calc(100vw - 28px));
  pointer-events: auto;
}

.cylinder-compose[hidden] {
  display: none !important;
}

.cylinder-composer {
  margin: 0;
  padding: 12px 14px 14px;
  border-radius: 16px;
  border: 1px solid rgba(62, 240, 255, 0.28);
  background: rgba(18, 22, 26, 0.9);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
}

.cylinder-compose-who {
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(235, 235, 245, 0.55);
}

.cylinder-compose-who #cylinder-compose-hint {
  color: rgba(62, 240, 255, 0.92);
}

.cylinder-compose-row {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.cylinder-compose-row select,
.cylinder-compose-row input {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 14px;
  color: #eef6f8;
  background: rgba(8, 12, 14, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  outline: none;
}

.cylinder-compose-row select {
  flex: 0 1 140px;
  max-width: 38%;
  padding: 0 10px;
}

.cylinder-compose-row input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
}

.cylinder-compose-row select:focus,
.cylinder-compose-row input:focus {
  border-color: rgba(62, 240, 255, 0.55);
}

.cylinder-compose-row button {
  flex: 0 0 42px;
  border: 1px solid rgba(62, 240, 255, 0.55);
  border-radius: 10px;
  background: rgba(62, 240, 255, 0.14);
  color: var(--cyan, #3ef0ff);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cylinder-compose-row button:hover {
  background: rgba(62, 240, 255, 0.24);
}

.cylinder-plus {
  width: 34px;
  height: 34px;
  margin: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(62, 240, 255, 0.7);
  background: rgba(8, 14, 16, 0.82);
  color: #3ef0ff;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 22px;
  line-height: 1;
  cursor: default;
  pointer-events: none;
  box-shadow: 0 0 18px rgba(62, 240, 255, 0.22);
}

.name-tag.cylinder-axis {
  letter-spacing: 0.18em;
  opacity: 0.9;
}

/* Program orbit dive — bottom dock (same family as planet chat) */
#agent-line.is-docked {
  left: 50% !important;
  right: auto !important;
  top: auto !important;
  bottom: max(16px, env(safe-area-inset-bottom, 0px)) !important;
  transform: translateX(-50%) !important;
  width: min(560px, calc(100vw - 28px));
  min-width: 0;
  max-width: calc(100vw - 28px);
  max-height: min(44vh, 440px);
  padding: 0;
  border: 0;
  background: transparent;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  pointer-events: none;
  z-index: 8;
}

#agent-line.is-docked .agent-composer {
  pointer-events: auto;
  margin: 0;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 12px 12px 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(22, 24, 28, 0.88);
  backdrop-filter: saturate(160%) blur(18px);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

#agent-line.is-docked .agent-who {
  display: block;
  flex: 0 0 auto;
  margin: 0 0 10px;
  padding: 0 2px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(235, 235, 245, 0.55);
  text-transform: none;
}

#agent-line.is-docked .agent-who #agent-organ {
  color: rgba(62, 240, 255, 0.92);
}

#agent-line.is-docked .agent-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1 1 auto;
  min-height: 72px;
  max-height: min(28vh, 260px);
  overflow-y: auto;
  margin: 0 0 12px;
  padding: 2px 2px 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 240, 255, 0.35) transparent;
}

#agent-line.is-docked .agent-thread[hidden] {
  display: none;
}

#agent-line.is-docked .agent-bubble {
  margin: 0;
  max-width: 94%;
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

#agent-line.is-docked .agent-bubble.is-user {
  align-self: flex-end;
  background: rgba(62, 240, 255, 0.18);
  border: 1px solid rgba(62, 240, 255, 0.35);
  color: #e8fbff;
}

#agent-line.is-docked .agent-bubble.is-assistant {
  align-self: flex-start;
  background: rgba(44, 44, 46, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f5f5f7;
}

#agent-line.is-docked .agent-bubble.is-pending {
  align-self: flex-start;
  background: rgba(44, 44, 46, 0.65);
  border: 1px solid rgba(62, 240, 255, 0.22);
  color: rgba(235, 235, 245, 0.65);
  animation: agent-pending-pulse 1.1s ease-in-out infinite;
}

#agent-line.is-docked .agent-bubble.is-error {
  align-self: stretch;
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 100, 100, 0.4);
  color: #ffb4b4;
}

@keyframes agent-pending-pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

#agent-line.is-docked .agent-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

#agent-line.is-docked #agent-input {
  flex: 1;
  min-width: 0;
  width: auto;
  border: 0;
  border-radius: 18px;
  background: rgba(44, 44, 46, 0.95);
  color: #f5f5f7;
  font-size: 15px;
  letter-spacing: 0;
  padding: 11px 14px;
  caret-color: var(--cyan, #3ef0ff);
  outline: none;
}

#agent-line.is-docked #agent-input::placeholder {
  color: rgba(235, 235, 245, 0.35);
}

#agent-line.is-docked #agent-input:disabled {
  opacity: 0.55;
}

#agent-line.is-docked #agent-send {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 17px;
  background: var(--cyan, #3ef0ff);
  color: #061014;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 1px;
}

#agent-line.is-docked #agent-send:disabled {
  opacity: 0.4;
  cursor: default;
}

#agent-line.is-docked .agent-x {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 14px;
  background: rgba(44, 44, 46, 0.55);
  color: rgba(235, 235, 245, 0.35);
  font-size: 16px;
  cursor: pointer;
  display: none; /* click-away deselects; X optional */
}

#agent-line.is-docked .agent-x:not([hidden]) {
  display: none;
}

#agent-speech-links {
  position: fixed;
  inset: 0;
  z-index: 7;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

#agent-speech-links[hidden] { display: none; }

#agent-speech-links line {
  stroke: rgba(62, 240, 255, 0.55);
  stroke-width: 1.25;
  stroke-dasharray: 4 5;
}

#agent-speech-links circle {
  fill: rgba(62, 240, 255, 0.9);
}

/* ——— Planet agent: Messages sheet (room) + persistent bottom dock (dive) ——— */
#planet-chat-sheet {
  position: absolute;
  inset: 0;
  z-index: 18;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 56px 14px max(14px, env(safe-area-inset-bottom, 0px));
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.22s ease;
}

#planet-chat-sheet.is-open {
  opacity: 1;
}

#planet-chat-sheet[hidden] {
  display: none;
}

#planet-chat-sheet.is-docked {
  inset: auto 0 0 0;
  height: auto;
  padding: 0 14px max(16px, env(safe-area-inset-bottom, 0px));
  pointer-events: none;
  opacity: 1;
}

#planet-chat-sheet.is-docked .planet-chat-backdrop {
  display: none;
}

#planet-chat-sheet.is-docked .planet-chat-card {
  pointer-events: auto;
  width: min(560px, 100%);
  max-height: min(44vh, 440px);
  margin: 0 auto;
  border-radius: 18px;
  transform: none;
  box-shadow: 0 14px 48px rgba(0, 0, 0, 0.5);
}

#planet-chat-sheet.is-docked #planet-chat-close {
  display: none;
}

.planet-chat-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  margin: 0;
  padding: 0;
  background: rgba(0, 0, 0, 0.45);
  cursor: pointer;
}

.planet-chat-card {
  position: relative;
  z-index: 1;
  width: min(420px, 100%);
  max-height: min(78vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: 22px 22px 18px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(28, 28, 30, 0.92);
  backdrop-filter: saturate(180%) blur(28px);
  -webkit-backdrop-filter: saturate(180%) blur(28px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.55);
  overflow: hidden;
  transform: translateY(18px);
  transition: transform 0.28s cubic-bezier(0.2, 0.9, 0.2, 1);
}

#planet-chat-sheet.is-open:not(.is-docked) .planet-chat-card {
  transform: translateY(0);
}

.planet-chat-nav {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 10px 10px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(44, 44, 46, 0.55);
}

.planet-chat-nav-mid {
  min-width: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.planet-chat-nav-mid strong {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  color: #f5f5f7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planet-chat-nav-mid span {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  color: rgba(62, 240, 255, 0.85);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planet-chat-nav-right {
  display: flex;
  gap: 4px;
  justify-content: flex-end;
}

.planet-chat-nav-btn {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cyan, #3ef0ff);
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1;
}

.planet-chat-nav-btn:hover {
  background: rgba(62, 240, 255, 0.12);
}

.planet-chat-nav-btn.is-accent {
  font-size: 20px;
  font-weight: 400;
  padding: 2px 8px 4px;
}

.planet-chat-nav-btn[hidden] {
  visibility: hidden;
  pointer-events: none;
}

.planet-chat-banner {
  flex: 0 0 auto;
  margin: 0;
  padding: 8px 14px;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(235, 235, 245, 0.72);
  background: rgba(62, 240, 255, 0.08);
  border-bottom: 1px solid rgba(62, 240, 255, 0.18);
}

.planet-chat-banner[hidden] {
  display: none;
}

.planet-chat-history,
.planet-chat-thread {
  flex: 1 1 auto;
  min-height: 180px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(62, 240, 255, 0.3) transparent;
}

.planet-chat-history {
  padding: 6px 0;
}

.planet-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 12px 10px;
}

.planet-chat-history[hidden],
.planet-chat-thread[hidden],
.planet-chat-composer[hidden] {
  display: none;
}

.planet-chat-empty {
  margin: 24px 18px;
  text-align: center;
  font-size: 14px;
  line-height: 1.45;
  color: rgba(235, 235, 245, 0.45);
}

.planet-chat-row {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: transparent;
  color: #f5f5f7;
  padding: 12px 16px;
  cursor: pointer;
}

.planet-chat-row:hover,
.planet-chat-row.is-active {
  background: rgba(62, 240, 255, 0.08);
}

.planet-chat-row-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
  margin-bottom: 3px;
}

.planet-chat-row-top strong {
  font-family: var(--font-ui);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planet-chat-row-top time {
  flex: 0 0 auto;
  font-size: 12px;
  color: rgba(235, 235, 245, 0.4);
}

.planet-chat-row-gist {
  display: block;
  font-size: 13px;
  color: rgba(235, 235, 245, 0.48);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.planet-chat-bubble {
  margin: 0;
  max-width: 86%;
  padding: 9px 13px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.4;
  white-space: pre-wrap;
  word-break: break-word;
}

.planet-chat-bubble.is-user {
  align-self: flex-end;
  background: #0a84ff;
  color: #fff;
  border-bottom-right-radius: 5px;
}

.planet-chat-bubble.is-assistant {
  align-self: flex-start;
  background: rgba(58, 58, 60, 0.95);
  color: #f5f5f7;
  border-bottom-left-radius: 5px;
}

.planet-chat-bubble.is-pending {
  align-self: flex-start;
  background: rgba(58, 58, 60, 0.65);
  color: rgba(235, 235, 245, 0.55);
  animation: agent-pending-pulse 1.1s ease-in-out infinite;
}

.planet-chat-bubble.is-error {
  align-self: stretch;
  max-width: 100%;
  background: rgba(255, 69, 58, 0.16);
  border: 1px solid rgba(255, 69, 58, 0.35);
  color: #ffb4b4;
  border-radius: 12px;
}

.planet-chat-composer {
  flex: 0 0 auto;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  padding: 10px 12px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(22, 22, 24, 0.55);
}

.planet-chat-composer textarea {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  max-height: 120px;
  resize: none;
  border: 0;
  border-radius: 18px;
  background: rgba(58, 58, 60, 0.95);
  color: #f5f5f7;
  font-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.3;
  padding: 8px 14px;
  caret-color: var(--cyan, #3ef0ff);
  outline: none;
}

.planet-chat-composer textarea::placeholder {
  color: rgba(235, 235, 245, 0.35);
}

.planet-chat-composer textarea:disabled {
  opacity: 0.55;
}

.planet-chat-composer button[type="submit"] {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 17px;
  background: #0a84ff;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0 0 1px;
}

.planet-chat-composer button[type="submit"]:disabled {
  opacity: 0.4;
  cursor: default;
}

body.planet-chat-open #hover-pin,
body.planet-chat-open #sculpture-panel {
  pointer-events: none;
}

body.planet-chat-docked #inspect-card {
  bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + min(44vh, 440px) + 12px);
}

/* Source inspect sits left; chat docks at the bottom */
#inspect-card.is-program-dive {
  position: fixed;
  top: 64px;
  left: 18px;
  right: auto;
  bottom: calc(max(16px, env(safe-area-inset-bottom, 0px)) + min(44vh, 440px) + 12px);
  width: min(360px, 36vw);
  max-height: none;
  overflow: auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--cyan, #3ef0ff);
  pointer-events: auto;
  z-index: 6;
  display: flex;
  flex-direction: column;
  gap: 0;
}

#inspect-card.is-program-dive .organ-head {
  margin-bottom: 10px;
}

#inspect-card.is-program-dive .organ-id {
  font-size: 18px;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--cyan, #3ef0ff);
}

#inspect-card.is-program-dive .organ-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 0;
  flex: 1;
  overflow: auto;
}

#inspect-card.is-program-dive .kv {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 4px 10px;
  font-size: 11px;
  letter-spacing: 0.03em;
}

#inspect-card.is-program-dive .kv .k {
  color: #2a6a72;
  text-transform: lowercase;
}

#inspect-card.is-program-dive .kv .v {
  color: var(--cyan, #3ef0ff);
  word-break: break-word;
}

#inspect-card.is-program-dive .kv .v.empty {
  color: #2a6a72;
}

#inspect-card.is-program-dive .source-code,
#inspect-card.is-program-dive .source-missing {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #1e5c66;
  background: rgba(0, 8, 10, 0.88);
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  max-height: 42vh;
  overflow: auto;
  color: var(--cyan, #3ef0ff);
}

#inspect-card.is-program-dive .source-missing {
  color: #2a6a72;
}

#inspect-card.is-program-dive .studio-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

#inspect-card.is-program-dive .organ-source-edit {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.agent-who {
  margin: 0 0 6px;
  color: rgba(235, 235, 245, 0.55);
  font-size: 11px;
}

#agent-input {
  border-color: rgba(255, 255, 255, 0.12);
}

.agent-x {
  position: absolute;
  top: 4px;
  right: 6px;
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(235, 235, 245, 0.7);
  font-size: 16px;
  cursor: pointer;
}

.speech-tag {
  display: none !important;
}

.drop-zone {
  border: 1px dashed var(--line-matte);
  background: var(--matte);
  padding: 14px;
  margin-bottom: 14px;
}

.drop-zone.is-hot {
  border-color: var(--cyan);
  background: #e7fbfd;
}

.drop-zone p {
  margin: 0 0 10px;
  color: var(--matte-muted);
  font-size: 11px;
  line-height: 1.5;
}

.page-inner.studio-wide {
  max-width: 1280px;
}

.studio-board-page {
  padding-bottom: 48px;
}

.studio-board-hero {
  margin: 0 0 16px;
}

.studio-idea-first {
  margin: 0 0 18px;
}

.studio-idea-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.studio-idea-canvas {
  min-height: 72px;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.studio-idea-canvas.is-prior-over {
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(62, 240, 255, 0.22);
}

.studio-look-board {
  padding: 10px 12px 12px;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  border-radius: 12px;
}

.studio-look-lede,
.studio-look-status,
.studio-look-empty {
  margin: 0 0 8px;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.45;
}

.studio-look-status {
  margin: 8px 0 0;
}

.studio-look-hero {
  margin: 0 0 12px;
  border-radius: 10px;
  overflow: hidden;
  background: #101418;
  border: 1px solid var(--line-matte);
}
.studio-look-hero[hidden] {
  display: none;
}
.studio-look-hero img {
  display: block;
  width: 100%;
  height: 280px;
  object-fit: contain;
  background: #101418;
}
.studio-look-hero figcaption {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: var(--matte-muted);
}
.studio-look-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 10px;
}

.studio-look-thumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 92px;
  padding: 4px;
  border: 1px solid var(--line-matte);
  background: #f4efe6;
  border-radius: 8px;
  cursor: pointer;
  color: var(--matte-ink);
}

.studio-look-thumb img {
  display: block;
  width: 100%;
  height: 72px;
  object-fit: cover;
  border-radius: 4px;
  background: #0a1418;
}

.studio-look-thumb span {
  font-size: 10px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--matte-muted);
}

.studio-look-thumb.is-selected {
  border-color: var(--cyan, #3ef0ff);
  box-shadow: 0 0 0 1px rgba(62, 240, 255, 0.35);
}

.studio-look-thumb.is-approved span {
  color: #0a7f8c;
}

.studio-look-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: flex-end;
}

.studio-look-alter-label {
  display: grid;
  gap: 4px;
  flex: 1 1 180px;
  min-width: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--matte-muted);
}

.studio-look-alter-label input {
  text-transform: none;
  letter-spacing: 0;
  font-size: 13px;
}

.studio-guided {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.studio-guided[hidden] {
  display: none;
}

.studio-guided-label {
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--matte-muted);
}

.studio-guided-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.studio-guided-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid rgba(62, 240, 255, 0.45);
  background: #e7fbfd;
  color: var(--matte-ink);
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.studio-guided-chip em {
  font-style: normal;
  color: #0a7f8c;
  font-size: 11px;
}

.studio-priors {
  padding: 10px 12px 12px;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  border-radius: 12px;
}

.studio-priors-lede {
  margin: 0 0 8px;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.45;
}

.studio-priors-hint {
  margin-left: 6px;
  color: var(--matte-muted);
  font-size: 11px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.studio-prior-drawers {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.studio-prior-drawer {
  border: 1px solid var(--line-matte);
  border-radius: 10px;
  background: var(--matte-2);
  padding: 0 10px 8px;
}

.studio-prior-drawer > summary {
  cursor: pointer;
  list-style: none;
  padding: 8px 2px;
  font-size: 13px;
  font-weight: 600;
  color: var(--matte-ink);
}

.studio-prior-drawer > summary::-webkit-details-marker {
  display: none;
}

.studio-prior-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 4px;
}

.studio-prior-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line-matte);
  background: #fff;
  color: var(--matte-ink);
  border-radius: 999px;
  font-size: 12px;
  cursor: grab;
}

.studio-prior-chip:hover,
.studio-prior-chip.is-on {
  border-color: rgba(62, 240, 255, 0.55);
  background: #e7fbfd;
}

.studio-prior-chip em {
  font-style: normal;
  font-size: 10px;
  color: var(--matte-muted);
}

.studio-prior-thumb {
  width: 18px;
  height: 18px;
  object-fit: cover;
  border-radius: 4px;
}

.studio-prior-remix {
  margin-top: 8px;
}

.studio-iterate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}

.studio-iterate-row label {
  flex: 1 1 220px;
}

.studio-iterate-row input {
  width: 100%;
}

.studio-bind-status {
  margin: 4px 0 0;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.4;
}

.studio-spec-preview {
  color: var(--matte-ink);
}

.studio-board-hero h1 {
  margin: 4px 0 8px;
  font-family: var(--font-ui);
  font-size: 34px;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.studio-board {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(320px, 1.35fr) minmax(220px, 0.9fr);
  grid-template-areas:
    "looks proposal living"
    "data proposal light";
  gap: 16px 18px;
  min-height: 560px;
  margin-bottom: 22px;
}

.studio-pile {
  display: flex;
  flex-direction: column;
  min-height: 220px;
  padding: 16px 16px 14px;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  border-radius: 14px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.studio-pile[data-pile="looks"] { grid-area: looks; }
.studio-pile[data-pile="proposal"] { grid-area: proposal; }
.studio-pile[data-pile="living"] { grid-area: living; }
.studio-pile[data-pile="data"] { grid-area: data; }
.studio-pile[data-pile="light"] { grid-area: light; }

.studio-pile-proposal {
  min-height: 100%;
  background:
    radial-gradient(circle at 30% 18%, rgba(62, 240, 255, 0.1), transparent 46%),
    var(--matte-2);
  border-color: rgba(62, 240, 255, 0.28);
}

.studio-pile.is-over {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(62, 240, 255, 0.18);
}

.studio-pile-head h2 {
  margin: 0 0 3px;
  font-family: var(--font-ui);
  font-size: 15px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--matte-ink);
}

.studio-pile-head p {
  margin: 0 0 12px;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.4;
}

.studio-icon-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 12px;
  align-content: flex-start;
}

.studio-icon {
  appearance: none;
  width: 92px;
  padding: 8px 6px 10px;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  cursor: grab;
  text-align: center;
  font-family: inherit;
  border-radius: 10px;
}

.studio-icon:hover,
.studio-icon.is-on {
  background: rgba(255, 255, 255, 0.55);
}

.studio-icon.is-empty {
  opacity: 0.62;
}
.studio-icon:disabled {
  cursor: default;
  opacity: 0.5;
}

.studio-icon.is-lifted {
  opacity: 0.35;
}

.studio-icon-thumb,
.studio-glyph {
  display: block;
  width: 56px;
  height: 56px;
  margin: 0 auto 6px;
  border-radius: 12px;
  object-fit: cover;
}

.studio-glyph {
  background: #12181c;
  box-shadow: inset 0 0 0 1px rgba(62, 240, 255, 0.28), 0 6px 14px rgba(16, 18, 20, 0.08);
  position: relative;
}

.studio-glyph::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: 50%;
  background: radial-gradient(circle, #3ef0ff 0%, transparent 70%);
  opacity: 0.85;
}

.studio-glyph-look::after { inset: 12px; border-radius: 4px; }
.studio-glyph-finance::after { inset: 16px 10px 10px; border-radius: 2px 2px 8px 8px; }
.studio-glyph-mail::after { inset: 16px 12px; border-radius: 2px; }
.studio-glyph-todo::after { inset: 14px 18px; border-radius: 2px; }
.studio-glyph-brief::after {
  inset: 14px 10px 14px 18px;
  border-radius: 0 50% 50% 0;
  background: radial-gradient(circle at 30% 50%, #3ef0ff 0%, transparent 68%);
}
.studio-glyph-sample::after { inset: 18px; opacity: 0.45; }
.studio-glyph-paste::after { inset: 12px 16px; border-radius: 1px; }
.studio-glyph-living::after {
  inset: 10px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #e8ffff, #3ef0ff 40%, transparent 72%);
}

.studio-icon strong {
  display: block;
  font-family: var(--font-ui);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.studio-icon em {
  display: block;
  margin-top: 2px;
  font-style: normal;
  color: var(--matte-muted);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.studio-icon .studio-pin-line,
.studio-card-wrote .studio-pin-line {
  display: block;
  margin-top: 4px;
  color: var(--cyan, #3ef0ff);
  font-size: 11px;
  font-style: normal;
  letter-spacing: 0;
  text-transform: none;
  line-height: 1.35;
}

.studio-gathered {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  margin-bottom: 10px;
}

.studio-gathered-hint,
.studio-well-empty {
  margin: 0;
  color: var(--matte-muted);
  font-size: 13px;
  line-height: 1.45;
}

.studio-well-empty {
  padding: 28px 12px;
  text-align: center;
  border: 1px dashed rgba(28, 25, 22, 0.16);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.28);
}

.studio-well-empty-sm {
  padding: 16px 10px;
  font-size: 12px;
}

.studio-proposal-well {
  flex: 1;
}

.studio-card {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(28, 25, 22, 0.1);
  cursor: grab;
}

.studio-card-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

.studio-card h3 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 22px;
  letter-spacing: -0.02em;
}

.studio-card-note {
  margin: 0;
  color: var(--matte-muted);
  font-size: 12px;
}

.studio-card-wrote {
  grid-template-columns: 56px 1fr;
  align-items: start;
  cursor: default;
}

.studio-light-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.studio-light-keys input {
  flex: 1 1 140px;
  min-width: 0;
}

.studio-keys {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  border-radius: 14px;
}

.studio-keys-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: end;
}

.studio-keys-idea textarea {
  min-height: 52px;
  resize: vertical;
}

.studio-keys-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.studio-keys-living {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
}

.studio-keys-living label {
  flex: 1 1 220px;
}

.studio-turns {
  margin-top: 16px;
  max-height: 140px;
}

.studio-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
  gap: 28px 32px;
  align-items: start;
  margin-bottom: 48px;
}

.studio-primary,
.studio-aside {
  display: grid;
  gap: 18px;
  min-width: 0;
}

.studio-block {
  padding: 18px 18px 16px;
  border: 1px solid var(--line-matte);
  background: var(--matte);
}

.studio-aside-block {
  background: var(--matte-2);
}

.studio-block-quiet {
  background: transparent;
  border-style: dashed;
}

.studio-block-head {
  margin-bottom: 14px;
}

.studio-block-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.studio-block .studio-h2 {
  margin: 0 0 4px;
}

.studio-step-lede {
  margin: 0;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.5;
}

.invent-kit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 8px;
}

.invent-kit.kit-chip {
  min-height: 64px;
  align-items: center;
}

.invent-kit-fallback {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  color: var(--matte-muted);
  font-family: var(--font-ui);
  font-size: 18px;
  text-transform: uppercase;
}

.invent-kit-pick {
  margin: 12px 0 0;
  padding: 8px 10px;
  border-left: 2px solid var(--cyan);
  color: var(--matte-ink);
  font-size: 12px;
  line-height: 1.45;
  background: rgba(62, 240, 255, 0.08);
}

.invent-kit-pick strong {
  font-weight: 600;
}

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

.invent-idea-field textarea {
  min-height: 96px;
  resize: vertical;
  line-height: 1.45;
}

.invent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.invent-proposal {
  border-color: rgba(62, 240, 255, 0.4);
  background: linear-gradient(180deg, rgba(62, 240, 255, 0.08), var(--matte));
}

.invent-proposal.is-written {
  border-color: rgba(28, 25, 22, 0.18);
  background: var(--matte-2);
}

.invent-proposal-card {
  display: grid;
  gap: 10px;
}

.invent-proposal-body {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 18px;
  align-items: flex-start;
}

.invent-reference-sketch {
  margin: 0;
  flex: 0 0 168px;
  max-width: 200px;
}

.invent-reference-img {
  display: block;
  width: 100%;
  max-height: 160px;
  object-fit: contain;
  height: auto;
  border-radius: 6px;
  border: 1px solid rgba(28, 25, 22, 0.12);
  background: #0a1418;
}

.invent-reference-caption {
  margin: 6px 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--matte-muted, #6a645c);
  font-style: italic;
}

.invent-reference-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--matte-muted, #6a645c);
}

.invent-proposal-detail {
  flex: 1 1 220px;
  min-width: 0;
  display: grid;
  gap: 8px;
}

.invent-bind {
  display: grid;
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid rgba(28, 25, 22, 0.08);
}

.invent-bind-lede,
.invent-bind-status {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--matte-muted, #6a645c);
}

.invent-bind-sources {
  display: grid;
  gap: 6px;
}

.invent-bind-option {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-size: 13px;
}

.invent-bind-option em {
  display: block;
  font-style: normal;
  color: var(--matte-muted, #6a645c);
  font-size: 12px;
}

.invent-bind-option.is-empty {
  opacity: 0.72;
}

.invent-bind-paste[hidden] {
  display: none !important;
}

.invent-bind-paste input[type="file"] {
  display: block;
  margin-top: 8px;
  font-size: 12px;
}

.invent-proposal-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 14px;
}

.invent-proposal-name {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--matte-ink);
  line-height: 1.15;
}

.invent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.invent-chip {
  display: inline-block;
  padding: 2px 7px 3px;
  border: 1px solid var(--line-matte);
  color: var(--matte-muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.35);
}

.invent-chip-accent {
  border-color: rgba(62, 240, 255, 0.55);
  color: var(--cyan-deep);
  background: rgba(62, 240, 255, 0.16);
}

.invent-proposal-does {
  margin: 0;
  color: var(--matte-ink);
  font-size: 13px;
  line-height: 1.5;
}

.invent-proposal-preview {
  margin: 0;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.45;
}

.invent-proposal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.invent-brief {
  margin: 0;
  padding: 10px 12px;
  white-space: pre-wrap;
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.45;
  color: var(--matte-ink);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line-matte);
  max-height: 180px;
  overflow: auto;
}

.invent-thread {
  max-height: 200px;
  overflow: auto;
  margin: 0;
  padding: 0;
}

.invent-thread-empty {
  margin: 0;
  color: var(--matte-muted);
  font-size: 12px;
}

.btn-tiny {
  padding: 4px 8px;
  font-size: 11px;
}

.pkg-does {
  margin: 6px 0 0;
  color: var(--matte-ink);
  font-size: 12px;
  line-height: 1.45;
}

.kit-line {
  letter-spacing: 0.04em;
  text-transform: none;
}

.pkg-list .pkg {
  border: 1px solid var(--line-matte);
  background: var(--matte);
  padding: 12px 12px 11px;
}

.kit-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 18px;
}

.sculpture-float {
  pointer-events: none;
}

.sculpture-float-card {
  /* CSS2D centers the wrap on the 3D point; sit the card fully above it. */
  transform: translateY(calc(-50% - 14px));
  max-width: 220px;
  padding: 7px 10px 8px;
  border: 1px solid rgba(244, 240, 234, 0.1);
  background: rgba(8, 10, 12, 0.72);
  backdrop-filter: blur(6px);
  color: #f4f0ea;
  text-align: center;
  display: grid;
  gap: 3px;
}

.sculpture-float-title {
  font-family: var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: #f4f0ea;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.sculpture-float-sub {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.03em;
  line-height: 1.35;
  color: rgba(200, 220, 228, 0.62);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  max-width: 200px;
}

.name-tag {
  padding: 3px 7px 4px;
  border: 1px solid rgba(62, 240, 255, 0.55);
  background: rgba(4, 10, 12, 0.78);
  color: var(--cyan);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}

.name-tag.look-organ-tag {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  white-space: normal;
  line-height: 1.2;
  padding: 4px 8px 5px;
  pointer-events: none;
}

.name-tag.look-organ-tag small {
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0.7;
  text-transform: uppercase;
}

.name-tag.look-plaza-tag {
  border: none;
  background: transparent;
  padding: 0;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-shadow: 0 0 8px rgba(62, 240, 255, 0.55);
}

.name-tag--day {
  font-size: 12px;
  letter-spacing: 0.16em;
  pointer-events: none;
}

.name-tag--story {
  max-width: 260px;
  white-space: normal;
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 13px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
  color: #e8f7fb;
}

.name-tag.is-empty {
  color: var(--matte-ink);
  background: var(--matte);
  border: 0;
}

.kind-chip {
  display: inline-block;
  border: 1px solid var(--line-matte);
  padding: 1px 6px;
}

.kind-chip.origin-imported {
  border-color: var(--cyan);
  color: var(--matte-ink);
}

.base-shell {
  height: 100%;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr) minmax(260px, 320px);
  min-height: 0;
}

.base-nav {
  min-height: 0;
  overflow: auto;
  padding: 16px 12px 24px;
  border-right: 1px solid var(--line-matte);
  background: var(--matte);
}

.rail-label {
  margin: 0 0 8px;
  color: var(--matte-muted);
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.nav-tree {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
}

.nav-tree ul {
  list-style: none;
  margin: 0;
  padding: 0 0 6px 12px;
}

.tree-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 4px;
}

.tree-row > .tree-kids {
  flex-basis: 100%;
  width: 100%;
}

.tree-place,
.tree-project,
.tree-note,
.rail-section {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-muted);
  font-family: inherit;
  cursor: pointer;
  padding: 6px 8px;
}

.tree-twist {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-muted);
  font-family: inherit;
  font-size: 11px;
  width: 22px;
  flex-shrink: 0;
  cursor: pointer;
  padding: 4px 0;
}

.tree-place {
  font-size: 14px;
  color: var(--matte-ink);
}

.tree-row > .tree-place,
.tree-row > .tree-project,
.tree-row > .tree-note {
  flex: 1;
  width: auto;
  min-width: 0;
}

.tree-project,
.tree-note {
  font-size: 13px;
}

.tree-row .btn-del {
  opacity: 1;
}

.tree-row:hover > .btn-del,
.tree-row:focus-within > .btn-del {
  opacity: 1;
}

.btn-del {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-muted);
  font-family: inherit;
  font-size: 11px;
  cursor: pointer;
  padding: 4px 6px;
  flex-shrink: 0;
}

.btn-del:hover {
  color: #b42318;
}

.item-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.item-row .note-row,
.item-row .info-row,
.item-row .page-link {
  flex: 1;
  min-width: 0;
}

.project-orbit .project-del {
  position: absolute;
  top: 6px;
  right: 6px;
  z-index: 2;
}

.tree-place.is-active,
.tree-project.is-active,
.tree-note.is-active,
.rail-section.is-active {
  color: var(--matte-ink);
  background: var(--matte-2);
  box-shadow: inset 2px 0 0 var(--cyan);
}

.rail-section {
  margin-top: 8px;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rail-new {
  width: 100%;
  margin: 0 0 14px;
}

.nav-find-wrap {
  margin: 0 0 12px;
  padding: 0 8px;
  text-transform: none;
  letter-spacing: 0;
}

.nav-find {
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  letter-spacing: 0;
  text-transform: none;
}

.mail-body {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.45;
  padding: 16px;
  background: #f3ead8;
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.08);
  margin: 12px 0 18px;
  max-height: 52vh;
  overflow: auto;
}

.rail-empty {
  color: var(--matte-muted);
  font-size: 12px;
  padding: 6px 8px;
}

.place-page {
  max-width: 720px;
}

.finance-page .finance-toolbar {
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px;
  margin: 14px 0 18px;
}

.finance-add {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px 12px;
  align-items: end;
  margin-bottom: 18px;
}

.finance-table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 13px;
}

.finance-table th,
.finance-table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.finance-table th {
  color: var(--matte-muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

.finance-table .is-up { color: #3dd68c; }
.finance-table .is-down { color: #f07178; }

.finance-note {
  margin-top: 16px;
  font-size: 11px;
}

.finance-privacy {
  font-size: 11px;
  color: var(--matte-muted);
  margin: 0 0 14px;
}

.finance-shot-drop.is-busy {
  opacity: 0.55;
  pointer-events: none;
}

.finance-scan-preview {
  border: 1px solid var(--line-matte);
  background: var(--matte);
  padding: 12px 14px;
  margin: 0 0 16px;
}

.finance-scan-actions {
  margin-top: 10px;
  gap: 8px;
}

.place-page.is-doc {
  padding-top: 12px;
}

.page-body {
  width: 100%;
  min-height: 46vh;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.6;
  resize: none;
  padding: 8px 0 32px;
}

.page-body:focus {
  outline: none;
}

.page-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 8px 0 12px;
}

.page-link {
  flex: 1;
  min-width: 0;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  cursor: pointer;
  padding: 8px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-link:hover,
.page-link:focus {
  background: var(--matte);
}

.page-ico {
  width: 14px;
  height: 16px;
  flex-shrink: 0;
  border: 1px solid var(--stone);
  border-radius: 2px;
  box-shadow: 1px 1px 0 rgba(28, 25, 22, 0.08);
}

.page-add {
  margin-top: 4px;
}

.page-title {
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin: 0 0 8px;
}

.page-title-input {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: var(--font-ui);
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
  padding: 0;
}

.page-title-input:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--cyan);
}

.page-block {
  margin: 28px 0 0;
}

.tray-attach {
  padding: 14px 16px;
  background: var(--matte);
  border: 1px solid var(--line-matte);
  margin: 16px 0 20px;
}

.tray-attach .work-sub {
  margin: 0 0 8px;
}

.tray-attach-pick {
  margin-top: 10px;
  gap: 8px;
  align-items: center;
}

.tray-attach .field-select {
  min-width: 220px;
}

.board > .tray-attach {
  margin: 0 0 18px;
}

.studio-kit-deploy {
  margin: 16px 0 4px;
}

.studio-kits-lede {
  margin: 0 0 8px;
  font-size: 14px;
  color: var(--ink-dim, #4a5560);
}

.studio-kit-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.studio-kit-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 160px;
  padding: 10px 12px;
  background: var(--matte);
  border: 1px solid var(--line-matte);
}

.studio-kit-card strong {
  font-size: 14px;
}

.studio-kit-card em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-dim, #4a5560);
}

.hub-sheet-bind {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--line-matte);
}

.hub-sheet-bind .row {
  margin-top: 8px;
  gap: 8px;
}

.note-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 10px 0 12px;
}

.note-row {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: var(--matte);
  color: var(--matte-ink);
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  display: grid;
  gap: 4px;
}

.note-row.is-active,
.note-row:hover {
  box-shadow: inset 2px 0 0 var(--cyan);
}

.project-orbit {
  position: relative;
  min-height: 140px;
  padding: 36px 28px 8px;
}

.todo-pulse {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0;
}

.project-orbit .todo-pulse {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(calc(var(--i) * 360deg / var(--n))) translateY(-78px) rotate(calc(var(--i) * -360deg / var(--n)));
}

.pulse-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(62, 240, 255, 0.7);
  animation: pulse-breathe 1.8s ease-in-out infinite;
  flex-shrink: 0;
}

.todo-pulse.is-done .pulse-dot {
  background: var(--stone);
  box-shadow: none;
  animation: none;
}

.todo-pulse.is-enlarged .pulse-dot {
  width: 16px;
  height: 16px;
}

.pulse-name {
  font-size: 11px;
  max-width: 90px;
  line-height: 1.2;
  text-align: left;
}

.pulse-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  margin: 8px 0 16px;
}

.pulse-enlarge {
  padding: 14px 16px;
  background: var(--matte-2);
  margin-bottom: 18px;
}

.soma-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 10px 0 4px;
}

.soma-card {
  padding: 12px 14px;
  background: var(--matte);
  display: grid;
  gap: 8px;
}

.soma-card .pkg-name {
  display: block;
}

.programs-page .programs-toolbar {
  margin: 0 0 14px;
  gap: 10px;
}

.program-card-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.program-mark {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan, #3ef0ff);
}

.folder-pick {
  display: grid;
  gap: 8px;
  margin: 0 0 10px;
}

.folder-pick.is-compact {
  margin: 0;
  width: 100%;
}

.folder-pick.is-compact summary {
  cursor: pointer;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--matte-muted);
  list-style: none;
}

.folder-pick.is-compact summary::-webkit-details-marker {
  display: none;
}

.folder-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.folder-pick.is-compact .folder-chips {
  max-height: 140px;
  overflow: auto;
  margin: 6px 0 0;
}

.folder-chip {
  appearance: none;
  text-align: left;
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 12px;
  line-height: 1.3;
  padding: 6px 10px;
  cursor: pointer;
  max-width: 100%;
}

.folder-chip:hover,
.folder-chip.is-on {
  border-color: var(--cyan);
}

.folder-chip.is-origin {
  box-shadow: inset 3px 0 0 var(--cyan);
}

.folder-chip-name {
  display: block;
}

.folder-chip-path {
  display: block;
  font-size: 10px;
  color: var(--matte-muted);
  letter-spacing: 0;
  text-transform: none;
}

.folder-unmatched {
  list-style: none;
  padding: 0;
  margin: 0 0 14px;
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--matte-muted);
}

.folder-unmatched code {
  font-size: 11px;
  color: var(--matte-ink);
}

.pin-story-title {
  color: var(--matte-ink);
}

.pin-story-card .pin-story-title {
  color: var(--cyan, #3ef0ff);
}

.field-select {
  min-width: 180px;
  font-family: inherit;
  font-size: 13px;
  padding: 8px 10px;
  background: var(--matte);
  color: var(--matte-ink);
  border: 1px solid var(--line-matte);
}

@keyframes pulse-breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.35); opacity: 0.75; }
}

.project-box-card {
  min-height: 96px;
  padding: 14px;
  text-align: left;
  appearance: none;
  border: 0;
  background: #f3ead8;
  color: var(--matte-ink);
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
  cursor: pointer;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-box-card.is-add {
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--stone);
  color: var(--matte-muted);
  align-items: center;
  justify-content: center;
}

.project-box {
  margin-top: 8px;
  padding: 20px 18px 24px;
  background: #f3ead8;
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
}

.base-main {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  background: var(--matte-2);
}

.base-trays {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  padding: 14px 22px 0;
}

.base-trays button {
  appearance: none;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  color: var(--matte-muted);
  font-family: inherit;
  font-size: 12px;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  cursor: pointer;
}

.base-trays button.is-active {
  color: var(--matte-ink);
  border-color: var(--cyan);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.base-hint {
  margin: 8px 22px 0;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.45;
}

.base-main > .flash {
  margin: 8px 22px 0;
}

.base-canvas {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 22px 40px;
}

.base-chat {
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 28px;
  border-left: 1px solid var(--line-matte);
  background: var(--matte);
}

.sticky-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(176px, 1fr));
  gap: 16px;
  align-items: start;
}

.sticky {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 148px;
  padding: 16px 14px 14px;
  border: 0;
  background: #f3ead8;
  color: var(--matte-ink);
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
  text-align: left;
  cursor: pointer;
  font-family: inherit;
}

.sticky:hover {
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1), 0 0 0 1px var(--cyan);
}

.sticky .pin {
  position: absolute;
  top: 8px;
  right: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(62, 240, 255, 0.55);
}

.sticky.is-add {
  min-height: 148px;
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--stone);
  color: var(--matte-muted);
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.sticky.is-add:hover {
  border-color: var(--cyan);
  color: var(--matte-ink);
  box-shadow: none;
}

.sticky-title {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: var(--font-ui);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  padding: 0 16px 0 0;
  resize: none;
}

.sticky-title:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--cyan);
}

.sticky-meta {
  margin: auto 0 0;
  color: var(--matte-muted);
  font-size: 11px;
  line-height: 1.4;
}

.paper-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
  padding: 16px 18px;
  background: #f3ead8;
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
}

.paper-head .sticky-title {
  font-size: 26px;
}

.purpose-edit {
  width: 100%;
  min-height: 64px;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 13px;
  line-height: 1.45;
  resize: vertical;
}

.purpose-edit:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--cyan);
}

.board {
  max-width: 980px;
}

.project-boxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px 16px;
  align-items: start;
}

.click-off {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-muted);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  padding: 0 0 14px;
}

.click-off:hover {
  color: var(--matte-ink);
}

.enlarge-where {
  margin: -6px 0 12px;
}

.sticky-wrap {
  position: relative;
}

.sticky-wrap .btn-del {
  position: absolute;
  top: 6px;
  left: 6px;
  z-index: 2;
  opacity: 0;
}

.sticky-wrap:hover .btn-del,
.sticky-wrap:focus-within .btn-del {
  opacity: 1;
}

.sticky.is-sheet {
  min-height: 52vh;
  max-width: 560px;
  cursor: default;
}

.sticky.is-sheet:hover {
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
}

.sticky-body {
  width: 100%;
  min-height: 36vh;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.sticky-body:focus {
  outline: none;
}

.note-file {
  margin-top: auto;
}

.project-box.is-enlarged {
  padding: 24px 22px 28px;
  min-height: 56vh;
}

.crumb {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  color: var(--matte-muted);
  font-size: 12px;
}

.crumb-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--cyan-dim);
  font-family: inherit;
  font-size: 12px;
  padding: 0;
  cursor: pointer;
}

.crumb-link:hover { color: var(--matte-ink); }

.work-sub {
  font-family: var(--font-ui);
  font-size: 16px;
  margin: 8px 0 12px;
}

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

.todo-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  background: #f3ead8;
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.08);
}

.todo-check {
  width: 22px;
  height: 22px;
  appearance: none;
  border: 1px solid var(--matte-ink);
  background: #f6f1e8;
  color: var(--matte-ink);
  cursor: pointer;
  font-size: 12px;
  line-height: 1;
  padding: 0;
}

.todo-row.is-done .todo-check {
  background: var(--cyan);
  border-color: var(--cyan);
}

.todo-title {
  width: 100%;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 14px;
  text-align: left;
  padding: 0;
}

.todo-due {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-muted);
  font-family: inherit;
  font-size: 12px;
  padding: 2px 0;
  max-width: 140px;
}

.company-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 0 0 22px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--matte-ink);
}

.company-name {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: var(--font-ui);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  padding: 0;
}

.company-name.is-item {
  font-size: 28px;
}

.company-name:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--cyan);
}

.item-floor {
  position: relative;
  min-height: 320px;
  margin: 0 0 28px;
}

.item-float {
  position: absolute;
  width: 210px;
  z-index: 1;
  overflow: visible;
  touch-action: none;
}

.item-float.is-dragging {
  z-index: 6;
  cursor: grabbing;
}

.item-float.is-add {
  min-height: 140px;
  height: 140px;
  background: transparent;
  box-shadow: none;
  border: 1px dashed var(--stone);
  color: var(--matte-muted);
  font-size: 28px;
  cursor: pointer;
  appearance: none;
  font-family: inherit;
}

.item-float.is-add:hover {
  border-color: var(--cyan);
  color: var(--matte-ink);
}

.item-card {
  position: relative;
  z-index: 2;
  min-height: 140px;
  padding: 18px 16px 40px;
  background: #f3ead8;
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
  cursor: grab;
}

.item-float.is-dragging .item-card {
  cursor: grabbing;
}

.item-grip {
  display: block;
  width: 18px;
  height: 12px;
  margin: 0 0 8px;
  padding: 0;
  border: 0;
  background-color: transparent;
  background-image: radial-gradient(circle, var(--stone) 1px, transparent 1.4px);
  background-size: 6px 5px;
  opacity: 0.7;
  cursor: grab;
}

.item-hang {
  position: absolute;
  left: calc(50% + var(--dx, 0px));
  top: calc(100% + var(--dy, 36px));
  width: var(--hang-w, 140px);
  max-width: 220px;
  transform: translate(-50%, 0);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  z-index: 3;
  cursor: grab;
  touch-action: none;
}

.item-hang.is-dragging {
  cursor: grabbing;
  z-index: 8;
}

.item-hang-line {
  position: absolute;
  left: 50%;
  top: 5px;
  width: 1.5px;
  height: var(--stem, 36px);
  margin: 0;
  background: var(--cyan);
  opacity: 0.55;
  pointer-events: none;
  transform-origin: top center;
  transform: translateX(-50%) rotate(var(--angle, 180deg));
}

.item-hang-dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(62, 240, 255, 0.7);
  animation: pulse-breathe 1.8s ease-in-out infinite;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.item-hang.is-done .item-hang-dot {
  background: var(--stone);
  box-shadow: none;
  animation: none;
}

.item-hang.is-done .item-hang-line {
  background: var(--stone);
  opacity: 0.4;
}

.item-hang-name {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  padding: 0 2px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  field-sizing: content;
  position: relative;
  z-index: 1;
  cursor: grab;
}

.item-hang.is-done .item-hang-name {
  text-decoration: line-through;
  color: var(--matte-muted);
}

.item-hang-name:focus {
  outline: none;
  cursor: text;
  box-shadow: 0 1px 0 var(--cyan);
}

.item-hang.is-pulse .item-hang-name {
  box-shadow: 0 0 0 2px var(--cyan, #3ef0ff);
}

.item-card.is-hot {
  outline: 1px dashed var(--cyan);
}

.item-x {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  font-size: 16px;
  line-height: 1;
}

.item-label {
  width: calc(100% - 28px);
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: var(--font-ui);
  font-size: 16px;
  font-weight: 600;
  padding: 0;
  cursor: text;
}

.item-label:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--cyan);
}

.item-todos {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.item-todo {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--matte-muted);
  font-family: inherit;
  font-size: 12px;
  text-align: left;
  padding: 0;
  cursor: pointer;
  display: flex;
  gap: 8px;
  align-items: baseline;
}

.item-todo.is-done {
  text-decoration: line-through;
}

.item-due {
  font-size: 10px;
  letter-spacing: 0.04em;
}

.item-plus {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  appearance: none;
  border: 1px solid var(--cyan);
  background: #f6f1e8;
  color: var(--matte-ink);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

.item-plus:hover {
  background: var(--cyan);
}

.item-plus.is-inline {
  position: static;
  margin-top: 10px;
}

.item-attach {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-right: 36px;
}

.item-chip {
  appearance: none;
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line-matte);
  background: #f6f1e8;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 11px;
  line-height: 1.3;
  padding: 3px 8px;
  cursor: pointer;
  text-decoration: none;
}

.item-chip.is-program {
  border-color: var(--cyan);
}

.item-chip.is-sculpture {
  border-color: rgba(62, 240, 255, 0.55);
  color: var(--cyan);
}

.item-chip.is-add {
  border-style: dashed;
  color: var(--matte-muted);
}

.item-chip.is-file {
  color: var(--matte-muted);
}

.item-bind {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  width: 100%;
}

.item-bind-input {
  flex: 1 1 120px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 11px;
  padding: 2px 0;
  box-shadow: 0 1px 0 var(--line-matte);
}

.item-bind-input:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--cyan);
}

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

.file-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: var(--matte);
}

.file-thumb {
  width: 36px;
  height: 36px;
  object-fit: cover;
  background: var(--matte-2);
  flex: 0 0 auto;
}

.file-name {
  color: var(--matte-ink);
  font-size: 13px;
  text-decoration: none;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-name:hover {
  box-shadow: 0 1px 0 var(--cyan);
}

.company-notebook {
  margin-top: 8px;
  padding: 16px 18px 20px;
  background: #f3ead8;
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
}

.notebook-body {
  width: 100%;
  min-height: 140px;
  border: 0;
  background: transparent;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 15px;
  line-height: 1.5;
  resize: vertical;
}

.notebook-body:focus {
  outline: none;
  box-shadow: 0 1px 0 var(--cyan);
}

.notebook-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.notebook-page {
  appearance: none;
  border: 1px solid var(--line-matte);
  background: #f6f1e8;
  color: var(--matte-ink);
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
}

.notebook-page.is-add {
  border-style: dashed;
  color: var(--matte-muted);
}

.project-sheet {
  padding: 4px 0 24px;
}

.sticky-wrap .btn-del {
  opacity: 1;
}

.link-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--matte);
  border: 1px solid var(--line-matte);
}

.note-sheet {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  background: #f3ead8;
  box-shadow: 1px 2px 0 rgba(28, 25, 22, 0.1);
  max-width: 640px;
}

.note-sheet .json-edit {
  min-height: 280px;
  background: transparent;
  border: 0;
  box-shadow: 0 1px 0 var(--line-matte);
}

.info-list {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.info-row {
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  color: var(--matte-ink);
  padding: 10px 12px;
  cursor: pointer;
  font-family: inherit;
  display: grid;
  gap: 4px;
}

.info-row:hover {
  border-color: var(--cyan);
}

.info-row.is-active {
  border-color: var(--cyan);
}

.info-read {
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  padding: 14px 16px;
  max-height: 320px;
  overflow: auto;
  margin-bottom: 18px;
}

.info-read pre {
  white-space: pre-wrap;
  font-size: 12px;
  line-height: 1.45;
  margin: 8px 0 0;
  color: var(--matte-ink);
}

.suggest-card {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  color: var(--matte-ink);
  padding: 14px 14px 12px;
  margin-bottom: 8px;
  cursor: pointer;
  font-family: inherit;
}

.suggest-card:hover,
.suggest-card.is-ready {
  border-color: var(--cyan);
}

.suggest-card strong {
  font-family: var(--font-ui);
  font-size: 16px;
  display: block;
  margin-bottom: 4px;
}

.suggest-card p {
  margin: 8px 0 0;
  color: var(--matte-muted);
  font-size: 12px;
  line-height: 1.45;
}

.discuss-thread {
  max-height: 220px;
  overflow: auto;
  margin-bottom: 12px;
  border: 1px solid var(--line-matte);
  padding: 10px 12px;
  background: var(--matte-2);
}

.chat-toolbar {
  margin: 0 0 8px;
  gap: 8px;
}

.chat-list {
  list-style: none;
  margin: 0 0 10px;
  padding: 0;
  max-height: 120px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line-matte);
  background: var(--matte-2);
  color: var(--matte-ink);
  padding: 8px 10px;
  cursor: pointer;
  font: inherit;
}

.chat-list-item:hover,
.chat-list-item.is-active {
  border-color: var(--cyan);
}

.chat-list-item strong {
  font-size: 12px;
  font-weight: 600;
}

.chat-list-model {
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--matte-muted);
}

.chat-thread {
  min-height: 240px;
  max-height: 42vh;
}

#chat-say {
  min-height: 88px;
}

.discuss-line {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.45;
  color: var(--matte-ink);
}

.discuss-line span {
  display: block;
  color: var(--cyan);
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

@media (max-width: 720px) {
  .chrome {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 10px;
  }

  .chrome-note { display: none; }
  .chrome-right { justify-self: start; }

  .page-inner { padding: 24px 18px 64px; }
  .studio-cols { grid-template-columns: 1fr; gap: 28px; }
  .studio-shell { grid-template-columns: 1fr; gap: 20px; }
  .studio-board {
    grid-template-columns: 1fr;
    grid-template-areas:
      "proposal"
      "looks"
      "data"
      "living"
      "light";
  }
  .studio-keys-form { grid-template-columns: 1fr; }
  .invent-kit-grid { grid-template-columns: 1fr 1fr; }
  .invent-proposal-name { font-size: 20px; }
  .base-shell { grid-template-columns: 1fr; }
  .base-nav { border-right: 0; border-bottom: 1px solid var(--line-matte); }
  .base-chat { border-left: 0; border-top: 1px solid var(--line-matte); }
}

/* ——— Daily brief dive chrome ——— */
.brief-title {
  text-align: center;
  pointer-events: none;
  white-space: nowrap;
}
.brief-title strong {
  display: block;
  font-family: Syne, system-ui, sans-serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #f2f6f8;
  text-shadow: 0 0 18px rgba(62, 240, 255, 0.35);
}
.brief-title span,
.brief-title em {
  display: block;
  margin-top: 4px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  color: rgba(180, 196, 208, 0.78);
  font-style: normal;
}
.brief-title em {
  color: #3ef0ff;
}

#brief-dive-chrome {
  position: absolute;
  left: 50%;
  bottom: max(18px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 16;
  width: min(720px, calc(100% - 28px));
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}
#brief-dive-chrome.is-open {
  opacity: 1;
  pointer-events: auto;
}
#brief-dive-chrome[hidden] {
  display: none;
}

.brief-lane-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}
.brief-lane-pill {
  appearance: none;
  border: 1px solid rgba(62, 240, 255, 0.28);
  background: rgba(8, 14, 20, 0.72);
  color: rgba(210, 224, 232, 0.88);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  backdrop-filter: blur(10px);
}
.brief-lane-pill:hover {
  border-color: rgba(62, 240, 255, 0.55);
  color: #fff;
}
.brief-lane-pill.is-active {
  background: rgba(62, 240, 255, 0.18);
  border-color: rgba(62, 240, 255, 0.9);
  color: #e8f9ff;
  box-shadow: 0 0 18px rgba(62, 240, 255, 0.2);
}

.brief-ask {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(62, 240, 255, 0.28);
  background: rgba(8, 14, 20, 0.78);
  backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}
.brief-ask-meta {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}
.brief-ask-kicker {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(62, 240, 255, 0.85);
  flex: 0 0 auto;
}
.brief-ask-focus {
  font-family: Syne, system-ui, sans-serif;
  font-size: 12px;
  color: rgba(220, 230, 236, 0.82);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.brief-ask-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
}
.brief-ask-input {
  appearance: none;
  border: 1px solid rgba(120, 140, 156, 0.28);
  background: rgba(4, 10, 14, 0.65);
  color: #f2f6f8;
  font-family: Syne, system-ui, sans-serif;
  font-size: 15px;
  padding: 11px 14px;
  border-radius: 12px;
  outline: none;
}
.brief-ask-input:focus {
  border-color: rgba(62, 240, 255, 0.55);
}
.brief-ask-send,
.brief-ask-open {
  appearance: none;
  border: 1px solid rgba(62, 240, 255, 0.45);
  background: rgba(62, 240, 255, 0.14);
  color: #e8f9ff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
}
.brief-ask-send {
  min-width: 44px;
  font-size: 16px;
}
.brief-ask-send:hover,
.brief-ask-open:hover {
  background: rgba(62, 240, 255, 0.24);
}

body.planet-chat-open #brief-dive-chrome {
  opacity: 0;
  pointer-events: none;
}

body[data-embed="1"] header.chrome,
body[data-embed="1"] #page,
body[data-embed="1"] #runtime-chrome {
  display: none !important;
}
body[data-embed="1"] {
  background: #14181c;
}

.page-inner.studio-wide.studio-line-page {
  max-width: 720px;
}
.studio-line-page {
  max-width: 720px;
  padding-bottom: 72px;
}
.studio-line-hero h1 {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 32px;
}
.studio-line-rail {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  margin: 0 0 18px;
  padding: 0 0 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line-matte);
}
.studio-line-rail li {
  display: flex;
  align-items: center;
}
.studio-line-rail li + li::before {
  content: "";
  width: 18px;
  height: 1px;
  margin: 0 6px;
  background: var(--line-matte);
}
.studio-line-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: transparent;
  color: var(--matte-muted);
  font: inherit;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 6px 0;
  cursor: pointer;
  white-space: nowrap;
}
.studio-line-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 99px;
  border: 1px solid var(--line-matte);
  font-size: 10px;
  letter-spacing: 0;
}
.studio-line-step.is-on {
  color: var(--matte-ink);
}
.studio-line-step.is-on .studio-line-num {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #102026;
}
.studio-line-step.is-done:not(.is-on) {
  color: var(--cyan-dim);
}
.studio-line-step.is-done:not(.is-on) .studio-line-num {
  border-color: var(--cyan);
  color: var(--cyan);
}
.studio-line-status {
  margin: 0 0 12px;
  color: var(--matte-muted);
  font-size: 13px;
}
.studio-line-frame {
  position: relative;
  min-height: 280px;
  overflow: hidden;
}
.studio-line-stage.is-entering {
  animation: studio-line-in 320ms ease;
}
.studio-line-stage h2 {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 22px;
}
.studio-line-lede {
  margin: 0 0 16px;
  color: var(--matte-muted);
  font-size: 14px;
  line-height: 1.45;
}
.studio-line-form,
.studio-line-card {
  display: grid;
  gap: 12px;
}
.studio-line-card {
  padding: 14px 16px;
  background: var(--matte);
  border: 1px solid var(--line-matte);
  border-radius: 12px;
}
.studio-line-optional {
  margin: 16px 0;
  padding: 8px 0 0;
  border-top: 1px solid var(--line-matte);
  color: var(--matte-muted);
}
.studio-line-optional summary {
  cursor: pointer;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
/* Studio start gate — new invent vs iterate existing */
.studio-start-paths {
  display: grid;
  gap: 16px;
  margin: 18px 0 10px;
}
.studio-start-path {
  justify-self: start;
}
.studio-start-iterate {
  display: grid;
  gap: 10px;
  padding: 14px 0 0;
  border-top: 1px solid var(--line-matte);
}
.studio-start-iterate-label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--matte-muted);
}
.studio-start-iterate-label select {
  max-width: 420px;
  font: inherit;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--line-matte);
  background: var(--matte);
  color: var(--matte-ink);
}
.studio-line-nav {
  display: flex;
  gap: 10px;
  margin-top: 22px;
  position: sticky;
  bottom: 12px;
}
.studio-orbit-frame {
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  background: #101418;
  border: 1px solid var(--line-matte);
}
.studio-orbit-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
.studio-line-host {
  font-size: 15px;
  margin: 0 0 12px;
}
.studio-data-trays {
  margin: 12px 0 8px;
}
.studio-line-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}
@keyframes studio-line-in {
  from { opacity: 0; transform: translateX(18px); }
  to { opacity: 1; transform: none; }
}


/* Shared-scene authoring slice (Studio Structure + living tools) */
.studio-author-panel {
  margin: 0.85rem 0 1.1rem;
  padding: 0.85rem 1rem 1rem;
  border: 1px solid rgba(62, 240, 255, 0.22);
  background: linear-gradient(180deg, rgba(255, 252, 247, 0.96), rgba(244, 240, 232, 0.9));
}
.studio-author-title {
  margin: 0 0 0.25rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #1a1f24;
}
.studio-author-lede,
.studio-author-status {
  margin: 0 0 0.65rem;
  color: #4a5560;
  font-size: 0.88rem;
}
.studio-author-inspect {
  max-height: 10rem;
  overflow: auto;
  margin: 0.5rem 0 0.75rem;
  padding: 0.55rem 0.7rem;
  font-size: 0.75rem;
  line-height: 1.35;
  background: rgba(18, 22, 26, 0.92);
  color: #d7ecef;
  border: 1px solid rgba(62, 240, 255, 0.25);
}
.studio-author-sliders {
  display: grid;
  gap: 0.45rem;
  margin: 0.55rem 0 0.7rem;
}
.studio-author-sliders label {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  color: #2a3238;
}
.studio-author-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  margin: 0.35rem 0;
}
.studio-author-row input {
  flex: 1 1 12rem;
  min-width: 10rem;
}

/* ——— Welcome / open beta ——— */
body[data-mode="welcome"] #page {
  background:
    radial-gradient(ellipse 70% 42% at 50% -8%, rgba(62, 240, 255, 0.16), transparent 58%),
    radial-gradient(ellipse 50% 30% at 80% 20%, rgba(232, 223, 208, 0.04), transparent 50%),
    var(--void);
  color: var(--ink);
}

body[data-mode="welcome"] .chrome {
  background: linear-gradient(180deg, #050607 0%, rgba(5, 6, 7, 0.92) 100%);
  border-bottom-color: rgba(62, 240, 255, 0.22);
  box-shadow: 0 1px 0 rgba(232, 223, 208, 0.04);
}

body[data-mode="welcome"] .brand-text strong {
  color: var(--bone);
  text-shadow: 0 0 18px rgba(62, 240, 255, 0.25);
}

body[data-mode="welcome"] .page-kicker {
  color: var(--cyan);
  text-shadow: 0 0 14px rgba(62, 240, 255, 0.35);
}

body[data-mode="welcome"] #page h1,
body[data-mode="welcome"] #page h2,
body[data-mode="welcome"] #page h3 {
  color: var(--bone);
  font-family: var(--font-ui);
  text-shadow:
    0 0 24px rgba(62, 240, 255, 0.18),
    1px 2px 0 rgba(62, 240, 255, 0.12);
}

body[data-mode="welcome"] #page .lede {
  color: rgba(232, 223, 208, 0.62);
}

body[data-mode="welcome"] .account-btn {
  color: var(--muted);
  border-color: rgba(62, 240, 255, 0.28);
}

body[data-mode="welcome"] .account-btn:hover {
  color: var(--cyan);
}

.welcome-page {
  max-width: 1120px;
}

.welcome-hero {
  text-align: center;
  padding: 28px 0 48px;
  max-width: 640px;
  margin: 0 auto;
}

.welcome-hero-logo {
  display: block;
  width: min(100%, 560px);
  height: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 0 28px rgba(62, 240, 255, 0.28));
}

.welcome-tagline {
  margin: 0 0 28px;
  font-family: var(--font-ui);
  font-size: clamp(20px, 3.2vw, 28px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--bone);
  text-shadow:
    0 0 28px rgba(62, 240, 255, 0.22),
    2px 3px 0 rgba(62, 240, 255, 0.14);
}

.welcome-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 0;
}

.welcome-cta {
  text-decoration: none;
  display: inline-block;
}

body[data-mode="welcome"] .btn {
  border-color: var(--cyan);
  background: var(--cyan);
  color: #041014;
  box-shadow: var(--extrude), var(--glow-cyan);
}

body[data-mode="welcome"] .btn:hover {
  filter: brightness(1.06);
}

body[data-mode="welcome"] .btn.ghost {
  background: transparent;
  color: var(--bone);
  border-color: rgba(232, 223, 208, 0.4);
  box-shadow: 2px 3px 0 rgba(62, 240, 255, 0.16);
}

body[data-mode="welcome"] .btn.ghost:hover {
  border-color: var(--cyan);
  color: var(--cyan);
}

.welcome-section {
  margin: 0 0 56px;
}

.welcome-section-head {
  max-width: 560px;
  margin: 0 0 16px;
}

.welcome-section-head h2 {
  margin: 0;
  font-size: clamp(22px, 3vw, 30px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.welcome-section-head .lede {
  margin: 8px 0 0;
}

.welcome-carousel {
  position: relative;
  max-width: none;
  width: 100%;
  margin: 0;
  border: 1px solid rgba(62, 240, 255, 0.32);
  background: #06080a;
  padding: 0;
  overflow: hidden;
  box-shadow:
    3px 4px 0 rgba(62, 240, 255, 0.35),
    0 0 36px rgba(62, 240, 255, 0.12);
}

.welcome-carousel-label {
  position: absolute;
  top: 14px;
  left: -6px;
  z-index: 6;
  margin: 0;
  padding: 9px 36px 9px 22px;
  font-family: var(--font-ui);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0a0c0e;
  background: var(--bone);
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 0 100%);
  box-shadow:
    3px 4px 0 var(--cyan),
    0 0 22px rgba(62, 240, 255, 0.35);
  transform: rotate(-11deg);
  transform-origin: left center;
  pointer-events: none;
}

.welcome-stage {
  position: relative;
  isolation: isolate;
  aspect-ratio: 16 / 9;
  min-height: 0;
  background: #0c1218;
}

.welcome-stage-after {
  margin: 0;
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.welcome-stage-after img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transform: none;
  filter: contrast(1.06) saturate(1.08) brightness(1.03);
}

.welcome-stage-after::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(5, 6, 7, 0.55) 0%, transparent 38%),
    linear-gradient(0deg, rgba(5, 6, 7, 0.72) 0%, transparent 42%),
    radial-gradient(ellipse 70% 60% at 60% 45%, transparent 40%, rgba(5, 6, 7, 0.35) 100%);
}

.welcome-stage-after-label {
  position: absolute;
  right: 18px;
  bottom: 16px;
  z-index: 2;
  margin: 0;
  padding: 8px 12px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bone);
  background: rgba(5, 6, 7, 0.72);
  border: 1px solid rgba(62, 240, 255, 0.35);
  box-shadow: 0 0 24px rgba(62, 240, 255, 0.2);
}

.welcome-stage-from {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 3;
  width: min(200px, 36vw);
  display: grid;
  gap: 6px;
  justify-items: start;
}

.welcome-stage-from-kicker {
  margin: 0;
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  text-shadow: 0 0 12px rgba(62, 240, 255, 0.45);
}

.welcome-stage-before {
  margin: 0;
  width: 100%;
  border: 1px solid rgba(232, 223, 208, 0.35);
  background: #0a0c0e;
  box-shadow:
    0 18px 40px rgba(0, 0, 0, 0.55),
    3px 4px 0 rgba(62, 240, 255, 0.28),
    0 0 28px rgba(62, 240, 255, 0.18);
  transform: rotate(-2.5deg);
}

.welcome-stage-before img {
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: cover;
  object-position: top center;
}

.welcome-stage-before figcaption {
  margin: 0;
  padding: 6px 8px 7px;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 223, 208, 0.7);
  background: rgba(5, 6, 7, 0.88);
  text-align: center;
}

.welcome-stage-arrow {
  position: absolute;
  left: calc(100% + 4px);
  bottom: 42%;
  margin: 0;
  font-family: var(--font-ui);
  font-size: 22px;
  color: var(--cyan);
  text-shadow:
    0 0 22px rgba(62, 240, 255, 0.75),
    2px 2px 0 rgba(232, 223, 208, 0.25);
}

.welcome-stage-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  margin: 0;
  padding: 5px 8px;
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(232, 223, 208, 0.65);
  background: rgba(5, 6, 7, 0.65);
  border: 1px solid rgba(62, 240, 255, 0.2);
  backdrop-filter: blur(8px);
}

.welcome-carousel-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px 12px;
}

.welcome-dots {
  display: flex;
  gap: 8px;
}

.welcome-dot {
  appearance: none;
  width: 8px;
  height: 8px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(62, 240, 255, 0.55);
  background: transparent;
  cursor: pointer;
}

.welcome-dot.is-active {
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(62, 240, 255, 0.55);
}

.welcome-pages {
  display: grid;
  gap: 18px;
}

.welcome-page-card {
  display: grid;
  grid-template-columns: minmax(140px, 220px) 1fr;
  gap: 18px;
  align-items: stretch;
  border: 1px solid rgba(62, 240, 255, 0.22);
  background:
    linear-gradient(135deg, rgba(232, 223, 208, 0.05), transparent 40%),
    rgba(12, 14, 16, 0.85);
  padding: 12px;
  box-shadow: 2px 3px 0 rgba(62, 240, 255, 0.1);
}

.welcome-page-still {
  margin: 0;
  overflow: hidden;
  background: #0a0c0e;
  border: 1px solid rgba(232, 223, 208, 0.08);
}

.welcome-page-still img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 120px;
  object-fit: cover;
}

.welcome-page-copy {
  padding: 8px 8px 8px 0;
}

.welcome-page-copy h3 {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.welcome-page-copy p:last-child {
  margin: 0;
  color: rgba(232, 223, 208, 0.55);
  font-size: 13px;
  line-height: 1.5;
}

.welcome-signup {
  border-top: 1px solid rgba(62, 240, 255, 0.2);
  padding-top: 40px;
}

.welcome-form {
  max-width: 420px;
  display: grid;
  gap: 12px;
}

body[data-mode="welcome"] .field {
  color: rgba(232, 223, 208, 0.55);
}

body[data-mode="welcome"] .field input {
  background: #0a0c0e;
  border: 1px solid rgba(62, 240, 255, 0.28);
  color: var(--bone);
  box-shadow: inset 0 0 0 1px rgba(232, 223, 208, 0.04);
}

.welcome-form-note {
  margin: 0;
  font-size: 11px;
  color: rgba(232, 223, 208, 0.45);
  letter-spacing: 0.04em;
}

.welcome-belief {
  border-top: 1px solid rgba(62, 240, 255, 0.16);
  padding-top: 36px;
  max-width: 560px;
}

.welcome-belief-copy {
  margin: 0;
  font-size: 15px;
  line-height: 1.55;
  color: rgba(232, 223, 208, 0.7);
}

.welcome-footer {
  margin-top: 56px;
  padding: 40px 16px 28px;
  border-top: 1px solid rgba(62, 240, 255, 0.22);
  display: grid;
  gap: 18px;
  justify-items: center;
  text-align: center;
}

.welcome-footer-brand {
  display: grid;
  gap: 10px;
  justify-items: center;
  max-width: 420px;
}

.welcome-footer-logo {
  display: block;
  width: min(100%, 240px);
  height: auto;
  margin: 0 auto;
  filter: drop-shadow(0 0 18px rgba(62, 240, 255, 0.22));
}

.welcome-footer-tag {
  margin: 0;
  font-size: 13px;
  line-height: 1.4;
  color: rgba(232, 223, 208, 0.55);
}

.welcome-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
}

.welcome-footer-links a {
  color: var(--bone);
  text-decoration: none;
  font-size: 13px;
  letter-spacing: 0.02em;
  border-bottom: 1px solid transparent;
}

.welcome-footer-links a:hover {
  color: var(--cyan);
  border-bottom-color: rgba(62, 240, 255, 0.45);
}

body[data-mode="welcome"] .flash {
  color: var(--cyan);
}

body[data-mode="welcome"] .flash.error {
  color: var(--danger);
}

@media (max-width: 720px) {
  .brand-logo {
    height: 28px;
    max-width: 150px;
  }

  .welcome-stage {
    aspect-ratio: 4 / 3;
  }

  .welcome-stage-from {
    width: min(156px, 42vw);
    left: 10px;
    bottom: 10px;
  }

  .welcome-carousel-label {
    top: 12px;
    left: -8px;
    padding: 8px 28px 8px 18px;
    font-size: 10px;
  }

  .welcome-stage-arrow {
    font-size: 22px;
    left: calc(100% + 2px);
  }

  .welcome-stage-after-label {
    right: 12px;
    bottom: 12px;
    font-size: 10px;
  }

  .welcome-page-card {
    grid-template-columns: 1fr;
  }

  .welcome-page-still img {
    min-height: 160px;
    max-height: 200px;
  }

  .welcome-hero-logo {
    width: min(100%, 380px);
  }
}
