:root {
  --bg: #f5efe2;
  --bg-strong: #eadfc7;
  --surface: rgba(255, 250, 242, 0.74);
  --surface-strong: rgba(255, 248, 236, 0.94);
  --line: rgba(92, 63, 31, 0.18);
  --text: #21160d;
  --muted: #6f5d4d;
  --shadow: 0 28px 60px rgba(69, 42, 18, 0.16);
  --radius-xl: 32px;
  --radius-lg: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(249, 202, 132, 0.5), transparent 28%),
    radial-gradient(circle at 85% 12%, rgba(148, 196, 177, 0.5), transparent 22%),
    linear-gradient(180deg, #f8f2e7 0%, #efe5d2 100%);
}

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

.page-shell {
  width: min(1380px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 20px 0 32px;
}

.hero,
.workspace,
.panel,
.map-stage {
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.hero {
  padding: 24px;
  border: 1px solid rgba(112, 84, 49, 0.12);
  border-radius: 40px;
  background: linear-gradient(180deg, rgba(255, 249, 240, 0.82), rgba(244, 232, 210, 0.65));
  box-shadow: var(--shadow);
}

.topbar,
.hero-grid,
.stage-header,
.meta-grid,
.form-actions {
  display: flex;
}

.topbar,
.stage-header {
  align-items: center;
  justify-content: space-between;
}

.brand-lockup {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  font-weight: 700;
  color: white;
  background: linear-gradient(135deg, #0d7a67, #eb8a3b);
}

.eyebrow,
.hero-kicker {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.74rem;
  color: var(--muted);
}

h1,
h2,
h3,
dd,
dt,
p,
ul {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: "Fraunces", serif;
  line-height: 0.96;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: clamp(3rem, 7vw, 6rem);
  max-width: 9ch;
  margin-top: 14px;
}

.ghost-link,
.primary-button,
.secondary-button,
.chip-button,
.danger-button,
.breadcrumb-button {
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.ghost-link,
.chip-button,
.breadcrumb-button {
  color: var(--text);
  background: rgba(255, 250, 245, 0.75);
  border: 1px solid rgba(100, 71, 42, 0.14);
}

.ghost-link,
.primary-button,
.secondary-button,
.chip-button,
.danger-button {
  padding: 12px 18px;
  border-radius: 999px;
}

.hero-grid {
  gap: 28px;
  margin-top: 32px;
  align-items: center;
}

.hero-grid > * {
  flex: 1;
}

.hero-copy {
  display: grid;
  gap: 18px;
}

.hero-text,
.panel-copy,
label {
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button {
  color: white;
  background: linear-gradient(135deg, #156f5f, #e28436);
  box-shadow: 0 14px 34px rgba(21, 111, 95, 0.22);
}

.secondary-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(100, 71, 42, 0.16);
}

.small {
  padding: 10px 14px;
}

.danger-button {
  color: #7d1d11;
  background: rgba(188, 62, 32, 0.1);
}

.hero-points {
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--muted);
}

.hero-preview {
  position: relative;
  min-height: 440px;
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.4), transparent 42%),
    linear-gradient(180deg, rgba(11, 45, 51, 0.92), rgba(13, 31, 46, 0.94));
  overflow: hidden;
}

.preview-orbit {
  position: absolute;
  inset: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.preview-orbit-a {
  width: 270px;
  height: 270px;
}

.preview-orbit-b {
  width: 420px;
  height: 420px;
}

.preview-card {
  position: absolute;
  display: grid;
  place-items: center;
  min-width: 120px;
  padding: 18px;
  border-radius: 22px;
  color: white;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.preview-core {
  top: 50%;
  left: 50%;
  width: 168px;
  height: 168px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(235, 138, 59, 0.92), rgba(241, 201, 110, 0.92));
  color: #1c1209;
  transform: translate(-50%, -50%);
}

.preview-card-a { top: 9%; left: 50%; transform: translateX(-50%); }
.preview-card-b { top: 48%; right: 8%; transform: translateY(-50%); }
.preview-card-c { bottom: 10%; left: 50%; transform: translateX(-50%); }
.preview-card-d { top: 48%; left: 8%; transform: translateY(-50%); }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.9fr);
  gap: 20px;
  margin-top: 22px;
}

.map-stage,
.panel {
  border-radius: var(--radius-xl);
  border: 1px solid rgba(112, 84, 49, 0.12);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.map-stage {
  padding: 22px;
}

.stage-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.chip-button-strong {
  background: rgba(21, 111, 95, 0.12);
}

.breadcrumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.breadcrumb-button {
  padding: 8px 12px;
  border-radius: 999px;
}

.map-canvas {
  position: relative;
  min-height: 720px;
  margin-top: 18px;
  border-radius: 28px;
  overflow: hidden;
  cursor: grab;
  background:
    radial-gradient(circle at center, rgba(248, 193, 104, 0.18), transparent 12%),
    radial-gradient(circle at center, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
  background-size: auto, 32px 32px;
}

.map-canvas.is-dragging {
  cursor: grabbing;
}

.ghost-link:hover,
.primary-button:hover,
.secondary-button:hover,
.chip-button:hover,
.danger-button:hover,
.breadcrumb-button:hover {
  transform: translateY(-2px);
}

#mindmap-svg {
  display: block;
}

.inspector {
  display: grid;
  gap: 20px;
}

.panel {
  padding: 20px;
}

.meta-grid {
  gap: 12px;
  margin-top: 18px;
}

.meta-grid > div {
  flex: 1;
  padding: 14px;
  border-radius: 18px;
  background: var(--surface-strong);
}

dt {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

dd {
  margin-top: 6px;
  font-size: 1.8rem;
}

.node-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.palette-block {
  display: grid;
  gap: 10px;
}

.palette-label {
  font-size: 0.92rem;
  color: var(--muted);
}

.color-palette {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.color-chip {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 18px rgba(36, 26, 17, 0.14);
}

.color-chip.active {
  outline: 2px solid rgba(21, 111, 95, 0.4);
  outline-offset: 2px;
}

label {
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
}

input,
textarea,
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(96, 71, 48, 0.14);
  background: rgba(255, 251, 245, 0.88);
  color: var(--text);
}

textarea {
  resize: vertical;
}

@media (max-width: 1080px) {
  .workspace,
  .hero-grid {
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .map-canvas {
    min-height: 620px;
  }
}

@media (max-width: 720px) {
  .page-shell {
    width: min(100vw - 18px, 100%);
    padding-top: 10px;
  }

  .hero,
  .map-stage,
  .panel {
    padding: 16px;
    border-radius: 26px;
  }

  .topbar,
  .stage-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .map-canvas {
    min-height: 540px;
  }
}
