:root {
  --bg: #f4efe7;
  --panel: rgba(255, 250, 244, 0.82);
  --panel-strong: rgba(255, 250, 244, 0.95);
  --panel-border: rgba(42, 24, 16, 0.12);
  --text: #211912;
  --muted: #695449;
  --accent: #e96f2d;
  --accent-soft: rgba(233, 111, 45, 0.15);
  --accent-strong: #b74915;
  --success: #24735b;
  --warning: #b07a1a;
  --danger: #b03a2e;
  --shadow: 0 18px 45px rgba(58, 38, 20, 0.14);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --header-height: 86px;
  --desktop-preview-width: 100%;
  --tablet-preview-width: 820px;
  --mobile-preview-width: 414px;
  font-synthesis-weight: none;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(233, 111, 45, 0.18), transparent 32%),
    radial-gradient(circle at top right, rgba(32, 107, 110, 0.16), transparent 28%),
    linear-gradient(160deg, #f9f3ec 0%, #f0e5d7 54%, #efe7dc 100%);
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", sans-serif;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.02) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at center, black, transparent 82%);
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: var(--header-height) 1fr;
  gap: 18px;
  padding: 16px;
}

.app-header {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(320px, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 18px 22px;
  border-radius: 30px;
  background: rgba(255, 251, 246, 0.8);
  border: 1px solid rgba(42, 24, 16, 0.08);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(145deg, rgba(233, 111, 45, 0.94), rgba(176, 58, 46, 0.96));
  color: white;
  font-family: Georgia, serif;
  font-size: 1.45rem;
  box-shadow: 0 14px 30px rgba(176, 58, 46, 0.24);
}

.brand-copy h1 {
  margin: 0;
  font-size: 1.45rem;
  line-height: 1.1;
  font-family: Georgia, serif;
  letter-spacing: 0.01em;
}

.brand-copy p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.header-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

.mode-switch,
.tool-cluster {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: 999px;
  background: rgba(255, 247, 238, 0.88);
  border: 1px solid rgba(42, 24, 16, 0.08);
}

.ghost-button,
.chip-button,
.icon-button,
.primary-button,
.secondary-button,
.danger-button {
  border: 0;
  border-radius: 999px;
  transition: transform 140ms ease, background 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.ghost-button,
.chip-button,
.icon-button,
.secondary-button {
  background: rgba(42, 24, 16, 0.06);
  color: var(--text);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  box-shadow: 0 12px 22px rgba(233, 111, 45, 0.22);
}

.danger-button {
  background: rgba(176, 58, 46, 0.14);
  color: var(--danger);
}

.ghost-button:hover,
.chip-button:hover,
.icon-button:hover,
.primary-button:hover,
.secondary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.chip-button,
.ghost-button,
.secondary-button,
.primary-button,
.danger-button {
  padding: 10px 14px;
  font-weight: 600;
}

.icon-button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
}

.mode-switch .chip-button.active,
.device-switch .chip-button.active {
  background: rgba(233, 111, 45, 0.18);
  color: var(--accent-strong);
}

.status-pill {
  justify-self: end;
  padding: 11px 16px;
  border-radius: 999px;
  background: rgba(36, 115, 91, 0.1);
  color: var(--success);
  font-weight: 600;
  font-size: 0.92rem;
}

.workspace-grid {
  min-height: calc(100vh - var(--header-height) - 48px);
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(420px, 1.35fr) minmax(320px, 1fr);
  gap: 18px;
}

.panel {
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  backdrop-filter: blur(18px);
}

.panel-head {
  padding: 20px 22px 14px;
  border-bottom: 1px solid rgba(42, 24, 16, 0.08);
  background: linear-gradient(180deg, rgba(255, 251, 247, 0.92), rgba(255, 248, 243, 0.62));
}

.panel-title {
  margin: 0;
  font-family: Georgia, serif;
  font-size: 1.18rem;
  letter-spacing: 0.01em;
}

.panel-kicker {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
}

.panel-subtitle {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.93rem;
}

.panel-body {
  min-height: 0;
  padding: 18px 18px 22px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.card,
.form-card,
.preview-shell,
.builder-dropzone,
.page-card,
.outline-card,
.empty-state,
.mini-stat {
  border-radius: var(--radius-md);
  border: 1px solid rgba(42, 24, 16, 0.08);
  background: var(--panel-strong);
  box-shadow: 0 12px 24px rgba(58, 38, 20, 0.06);
}

.card,
.form-card,
.outline-card,
.empty-state {
  padding: 16px;
}

.section-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-grid {
  display: grid;
  gap: 12px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 1px solid rgba(42, 24, 16, 0.12);
  border-radius: 14px;
  background: #fffdf9;
  color: var(--text);
  padding: 11px 13px;
  resize: vertical;
  min-height: 44px;
}

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

.field input[type="color"] {
  padding: 4px;
  min-height: 46px;
}

.field input[type="range"] {
  padding: 0;
  min-height: auto;
  accent-color: var(--accent);
  background: transparent;
}

.hint,
.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

.button-row,
.inline-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.button-row.spread {
  justify-content: space-between;
}

.site-tree {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tree-root-drop,
.tree-drop-target {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px dashed rgba(233, 111, 45, 0.4);
  background: rgba(233, 111, 45, 0.08);
  color: var(--accent-strong);
  font-weight: 700;
  text-align: center;
}

.tree-root-drop.drag-active,
.tree-drop-target.drag-active,
.block-row.drag-over {
  background: rgba(233, 111, 45, 0.15);
  border-color: rgba(233, 111, 45, 0.65);
}

.tree-branch {
  list-style: none;
  margin: 0;
  padding: 0 0 0 18px;
  position: relative;
  display: grid;
  gap: 14px;
}

.tree-branch::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 18px;
  width: 1px;
  background: rgba(42, 24, 16, 0.14);
}

.tree-node {
  position: relative;
}

.tree-node::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 30px;
  width: 11px;
  height: 1px;
  background: rgba(42, 24, 16, 0.14);
}

.page-card {
  position: relative;
  padding: 16px;
  display: grid;
  gap: 14px;
}

.page-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 18px 0 0 18px;
  background: var(--card-accent, var(--accent));
}

.page-card.selected {
  outline: 2px solid rgba(233, 111, 45, 0.32);
}

.page-card.dragging,
.block-row.dragging {
  opacity: 0.48;
}

.page-card-head,
.block-row-head,
.catalog-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.page-meta,
.catalog-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.page-title,
.block-title,
.catalog-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
}

.page-slug,
.micro-copy {
  color: var(--muted);
  font-size: 0.88rem;
}

.tag-list,
.info-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag,
.info-chip {
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  background: rgba(42, 24, 16, 0.06);
}

.tag.marketing {
  background: rgba(233, 111, 45, 0.14);
  color: #a44716;
}

.tag.product {
  background: rgba(36, 115, 91, 0.14);
  color: #1f5a48;
}

.tag.legal {
  background: rgba(80, 78, 126, 0.14);
  color: #433e77;
}

.tag.blog {
  background: rgba(176, 122, 26, 0.15);
  color: #8b6112;
}

.tag.docs {
  background: rgba(23, 102, 160, 0.14);
  color: #124f7c;
}

.tag.global {
  background: rgba(42, 24, 16, 0.1);
}

.catalog-card,
.block-row {
  padding: 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(42, 24, 16, 0.08);
  background: var(--panel-strong);
  box-shadow: 0 8px 18px rgba(58, 38, 20, 0.05);
}

.catalog-card {
  display: grid;
  gap: 14px;
}

.wireframe {
  display: grid;
  gap: 7px;
  padding: 14px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(42, 24, 16, 0.05), rgba(42, 24, 16, 0.02)),
    #fffdfa;
  min-height: 94px;
}

.wireframe-line {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(233, 111, 45, 0.54), rgba(32, 107, 110, 0.45));
}

.wireframe-line.small {
  width: 36%;
}

.wireframe-line.medium {
  width: 62%;
}

.wireframe-line.large {
  width: 100%;
}

.accordion {
  border-radius: var(--radius-md);
  border: 1px solid rgba(42, 24, 16, 0.08);
  background: rgba(255, 251, 247, 0.86);
  overflow: hidden;
}

.accordion > summary {
  list-style: none;
  padding: 16px;
  cursor: pointer;
  font-weight: 800;
}

.accordion > summary::-webkit-details-marker {
  display: none;
}

.accordion-body {
  display: grid;
  gap: 12px;
  padding: 0 16px 16px;
}

.outline-list,
.page-picker-list {
  display: grid;
  gap: 12px;
}

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

.outline-card.selected {
  outline: 2px solid rgba(233, 111, 45, 0.24);
}

.block-row {
  display: grid;
  gap: 12px;
}

.block-row.selected {
  outline: 2px solid rgba(233, 111, 45, 0.28);
}

.builder-dropzone {
  padding: 18px;
  text-align: center;
  color: var(--muted);
}

.tabs {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  background: rgba(42, 24, 16, 0.06);
  border-radius: 999px;
}

.tabs .chip-button {
  min-width: 90px;
}

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

.item-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(42, 24, 16, 0.08);
  background: #fffdfa;
  display: grid;
  gap: 12px;
}

.preview-stack {
  display: grid;
  gap: 16px;
  min-height: 0;
}

.preview-shell {
  padding: 16px;
  display: grid;
  gap: 14px;
  min-height: 320px;
}

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

.preview-frame-wrap {
  min-height: 0;
  display: grid;
  place-items: start center;
  padding: 18px;
  border-radius: 22px;
  background:
    radial-gradient(circle at top center, rgba(233, 111, 45, 0.12), transparent 42%),
    linear-gradient(180deg, #efe5d7, #e9dcc9);
  overflow: auto;
}

.preview-frame {
  width: min(100%, var(--desktop-preview-width));
  min-height: 620px;
  border: 0;
  border-radius: 26px;
  background: white;
  box-shadow: 0 20px 45px rgba(39, 24, 17, 0.18);
}

.preview-frame.device-tablet {
  width: min(100%, var(--tablet-preview-width));
}

.preview-frame.device-mobile {
  width: min(100%, var(--mobile-preview-width));
}

.empty-state {
  text-align: center;
  display: grid;
  gap: 10px;
  place-items: center;
  padding: 32px 18px;
}

.empty-state strong {
  font-size: 1rem;
}

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

.mini-stat {
  padding: 14px;
  display: grid;
  gap: 6px;
}

.mini-stat strong {
  font-size: 1.3rem;
  font-family: Georgia, serif;
}

.page-picker-item {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(42, 24, 16, 0.08);
  background: rgba(255, 253, 249, 0.92);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.page-picker-item.active {
  border-color: rgba(233, 111, 45, 0.4);
  background: rgba(233, 111, 45, 0.09);
}

.indent {
  padding-left: calc(var(--depth, 0) * 16px);
}

.sitemap-canvas {
  display: grid;
  gap: 18px;
}

.pill-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.note-box {
  padding: 14px;
  border-radius: 16px;
  border: 1px dashed rgba(42, 24, 16, 0.12);
  background: rgba(255, 251, 246, 0.9);
  color: var(--muted);
}

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

@media (max-width: 1220px) {
  .app-header {
    grid-template-columns: 1fr;
  }

  .status-pill {
    justify-self: start;
  }

  .workspace-grid {
    grid-template-columns: minmax(260px, 0.9fr) minmax(380px, 1.1fr);
  }

  .workspace-grid .panel:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .app-shell {
    padding: 12px;
  }

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

  .workspace-grid .panel:last-child {
    grid-column: auto;
  }

  .field-grid.two,
  .mini-grid {
    grid-template-columns: 1fr;
  }

  .preview-frame.device-tablet,
  .preview-frame.device-mobile {
    width: 100%;
  }
}

:root {
  --bg: #f7eef0;
  --panel: rgba(255, 250, 251, 0.9);
  --panel-strong: rgba(255, 255, 255, 0.96);
  --panel-border: rgba(71, 71, 71, 0.1);
  --text: #474747;
  --muted: #75646a;
  --accent: #dc475a;
  --accent-soft: rgba(220, 71, 90, 0.12);
  --accent-strong: #b93a4d;
  --success: #2d7a60;
  --warning: #9d6772;
  --danger: #b33c4d;
  --shadow: 0 24px 60px rgba(71, 71, 71, 0.14);
  --radius-lg: 30px;
  --radius-md: 22px;
  --radius-sm: 14px;
  --header-height: auto;
}

html,
body {
  background:
    radial-gradient(circle at top left, rgba(220, 71, 90, 0.18), transparent 30%),
    radial-gradient(circle at bottom right, rgba(71, 71, 71, 0.08), transparent 24%),
    linear-gradient(180deg, #fff9fa 0%, #f8eef0 100%);
  color: var(--text);
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
}

body::before {
  background-image:
    linear-gradient(rgba(71, 71, 71, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 71, 71, 0.018) 1px, transparent 1px);
  background-size: 32px 32px;
}

.app-shell {
  grid-template-rows: auto 1fr;
  gap: 20px;
  padding: 18px;
}

.app-header {
  grid-template-columns: minmax(260px, 1.2fr) minmax(420px, 1.2fr) minmax(280px, 0.9fr);
  gap: 18px;
  align-items: stretch;
  padding: 20px;
  border-radius: 34px;
  background:
    linear-gradient(145deg, rgba(71, 71, 71, 0.98), rgba(52, 52, 52, 0.96)),
    linear-gradient(180deg, rgba(220, 71, 90, 0.14), transparent);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 30px 70px rgba(32, 24, 27, 0.28);
}

.brand-lockup,
.snapshot-rack,
.header-actions {
  min-width: 0;
}

.brand-lockup {
  display: grid;
  gap: 18px;
  align-content: center;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 14px 18px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo img {
  display: block;
  width: 180px;
  max-width: 100%;
  height: auto;
}

.brand-copy {
  display: grid;
  gap: 8px;
}

.brand-kicker,
.snapshot-head .panel-kicker {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.74rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 800;
}

.brand-copy h1 {
  margin: 0;
  color: #ffffff;
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: clamp(2.1rem, 3vw, 3rem);
  line-height: 0.95;
  letter-spacing: 0.02em;
}

.brand-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.6;
  max-width: 48ch;
}

.snapshot-rack {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.snapshot-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

.snapshot-base {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.86rem;
}

.snapshot-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.snapshot-card {
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: grid;
  gap: 8px;
  min-width: 0;
}

.snapshot-label {
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 800;
}

.snapshot-value {
  color: #ffffff;
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 1rem;
  line-height: 1.1;
  word-break: break-word;
}

.header-actions {
  display: grid;
  gap: 14px;
  align-content: space-between;
}

.tool-cluster {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  padding: 10px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.status-pill {
  justify-self: end;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.ghost-button,
.secondary-button,
.icon-button {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.panel .ghost-button,
.panel .secondary-button,
.panel .icon-button,
.modal-card .ghost-button,
.modal-card .secondary-button,
.modal-card .icon-button {
  background: rgba(71, 71, 71, 0.06);
  color: var(--text);
}

.ghost-button,
.secondary-button,
.primary-button,
.danger-button {
  padding: 11px 16px;
  font-weight: 800;
}

.secondary-button {
  background: rgba(255, 255, 255, 0.12);
}

.primary-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  box-shadow: 0 16px 28px rgba(220, 71, 90, 0.28);
}

.danger-button {
  background: rgba(220, 71, 90, 0.12);
  color: var(--accent);
}

.workspace-grid {
  min-height: calc(100vh - 220px);
  grid-template-columns: minmax(320px, 0.92fr) minmax(0, 2.08fr);
  gap: 20px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: 32px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.panel-head {
  padding: 22px 24px 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 248, 250, 0.72)),
    linear-gradient(90deg, rgba(220, 71, 90, 0.06), transparent);
}

.panel-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
}

.panel-title {
  font-family: "Bahnschrift", "Arial Narrow", sans-serif;
  font-size: 1.32rem;
}

.panel-kicker {
  margin-bottom: 8px;
  color: var(--accent-strong);
}

.panel-subtitle {
  max-width: 70ch;
}

.planner-catalog {
  gap: 14px;
}

.accordion {
  border-radius: 20px;
  border: 1px solid rgba(71, 71, 71, 0.08);
  background: rgba(255, 255, 255, 0.74);
}

.accordion > summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 800;
}

.accordion > summary span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.catalog-card {
  gap: 12px;
}

.catalog-copy {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.catalog-card-footer {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.catalog-category {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.catalog-wireframe {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(71, 71, 71, 0.04), rgba(220, 71, 90, 0.04)),
    #fffdfd;
}

.catalog-wireframe-line,
.block-chip-line {
  display: block;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(220, 71, 90, 0.7), rgba(71, 71, 71, 0.28));
}

.catalog-wireframe-line.small,
.block-chip-line.small {
  width: 34%;
}

.catalog-wireframe-line.medium,
.block-chip-line.medium {
  width: 62%;
}

.catalog-wireframe-line.large,
.block-chip-line.large {
  width: 100%;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.74rem;
  font-weight: 800;
}

.planner-board-body {
  gap: 18px;
  padding-top: 20px;
}

.root-dropzone {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px dashed rgba(220, 71, 90, 0.34);
  background: rgba(220, 71, 90, 0.06);
  color: var(--accent-strong);
  font-weight: 800;
  text-align: center;
}

.planner-board {
  min-height: 0;
  overflow: auto;
  padding-bottom: 12px;
}

.planner-roots,
.map-children {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.planner-roots {
  min-width: max-content;
  padding: 6px 4px 20px;
}

.map-node {
  display: grid;
  gap: 18px;
  min-width: 320px;
}

.map-page-card {
  position: relative;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(71, 71, 71, 0.08);
  box-shadow: 0 16px 34px rgba(71, 71, 71, 0.08);
}

.map-page-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  border-radius: 24px 0 0 24px;
  background: var(--page-accent, var(--accent));
}

.map-page-card.selected {
  outline: 2px solid rgba(220, 71, 90, 0.24);
  outline-offset: 0;
}

.map-page-card.drag-over,
.map-block-lane.drag-over,
.root-dropzone.drag-over {
  background: rgba(220, 71, 90, 0.08);
  border-color: rgba(220, 71, 90, 0.34);
}

.map-page-head,
.map-page-meta-row,
.block-chip,
.block-chip-main {
  display: flex;
  gap: 12px;
}

.map-page-head,
.map-page-meta-row,
.block-chip {
  justify-content: space-between;
  align-items: flex-start;
}

.map-page-copy {
  display: grid;
  gap: 6px;
}

.map-page-copy h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 800;
}

.map-page-copy span,
.block-chip-meta span {
  color: var(--muted);
  font-size: 0.86rem;
}

.map-page-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.icon-button.compact {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 12px;
}

.icon-button.compact svg,
.icon-button svg {
  width: 16px;
  height: 16px;
}

.icon-button.danger {
  background: rgba(220, 71, 90, 0.12);
  color: var(--accent);
}

.tag-list {
  align-items: center;
}

.tag {
  background: rgba(71, 71, 71, 0.06);
  color: var(--text);
}

.tag.marketing {
  background: rgba(220, 71, 90, 0.12);
  color: #b93a4d;
}

.tag.product {
  background: rgba(71, 71, 71, 0.1);
  color: #474747;
}

.tag.legal {
  background: rgba(143, 107, 116, 0.14);
  color: #765660;
}

.tag.blog {
  background: rgba(184, 90, 104, 0.14);
  color: #9f4f5c;
}

.tag.docs {
  background: rgba(210, 143, 152, 0.14);
  color: #9a5f68;
}

.map-block-lane {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 20px;
  background: rgba(248, 236, 239, 0.46);
  border: 1px dashed rgba(220, 71, 90, 0.18);
}

.block-chip {
  align-items: center;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(71, 71, 71, 0.08);
}

.block-chip-main {
  align-items: center;
  min-width: 0;
}

.block-chip-wireframe {
  min-width: 78px;
  display: grid;
  gap: 6px;
}

.block-chip-meta {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.block-chip-meta strong {
  display: block;
  font-size: 0.95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-drop-hint {
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px dashed rgba(220, 71, 90, 0.2);
  color: var(--muted);
  font-size: 0.85rem;
  text-align: center;
}

.map-children-wrap {
  position: relative;
  padding-top: 18px;
  display: grid;
  gap: 18px;
  justify-items: center;
}

.map-link-vertical {
  width: 2px;
  height: 18px;
  background: rgba(220, 71, 90, 0.24);
}

.map-children {
  position: relative;
  padding-top: 18px;
}

.map-children::before {
  content: "";
  position: absolute;
  left: 24px;
  right: 24px;
  top: 0;
  height: 2px;
  background: rgba(220, 71, 90, 0.2);
}

.quick-actions {
  justify-content: flex-end;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(52, 41, 45, 0.34);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(760px, 100%);
  max-height: min(88vh, 980px);
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(71, 71, 71, 0.08);
  box-shadow: 0 30px 70px rgba(32, 24, 27, 0.24);
  overflow: hidden;
}

.modal-card.large {
  width: min(980px, 100%);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding: 22px 24px 16px;
  border-bottom: 1px solid rgba(71, 71, 71, 0.08);
}

.modal-body {
  overflow: auto;
  padding: 22px 24px 24px;
  display: grid;
  gap: 18px;
}

.modal-section {
  display: grid;
  gap: 14px;
}

.checkbox-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(248, 236, 239, 0.5);
  border: 1px solid rgba(220, 71, 90, 0.12);
}

.checkbox-row input {
  margin-top: 2px;
  accent-color: var(--accent);
}

.item-card {
  background: rgba(255, 255, 255, 0.9);
}

.note-box {
  border-color: rgba(220, 71, 90, 0.18);
  background: rgba(248, 236, 239, 0.38);
  color: var(--muted);
}

@media (max-width: 1480px) {
  .app-header {
    grid-template-columns: 1fr;
  }

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

  .header-actions {
    align-content: start;
  }

  .tool-cluster,
  .status-pill {
    justify-self: start;
  }
}

@media (max-width: 1100px) {
  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .planner-roots,
  .map-children {
    flex-direction: column;
    min-width: 0;
  }

  .map-node {
    min-width: 0;
  }

  .map-children::before {
    display: none;
  }
}

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

  .tool-cluster {
    justify-content: flex-start;
  }

  .modal-overlay {
    padding: 12px;
  }

  .modal-card,
  .modal-card.large {
    width: 100%;
  }
}
