:root {
  --bg: #f5f6f8;
  --panel: #ffffff;
  --panel-2: #f9fafb;
  --ink: #202030;
  --muted: #667085;
  --muted-2: #98a2b3;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --brand: #1f6feb;
  --brand-2: #0b4fba;
  --accent: #148eff;
  --focus: #4d65ff;
  --dark: #202030;
  --dark-2: #171727;
  --changed: #c2410c;
  --success: #0f766e;
  --shadow: 0 20px 50px rgba(16, 24, 40, 0.10);
  --radius: 8px;
  --sidebar: 300px;
  --sidebar-collapsed: 72px;
  --panel-width: 380px;
  --row-label-width: 180px;
  --column-width: 260px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[contenteditable="true"]:focus-visible {
  outline: 0.125rem solid var(--focus);
  outline-offset: 0.125rem;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr) var(--panel-width);
  height: 100vh;
  overflow: hidden;
}

body.sidebar-collapsed .app-shell,
.app-shell.sidebar-collapsed {
  grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr) var(--panel-width);
}

body.detail-closed .app-shell,
.app-shell.detail-closed {
  grid-template-columns: var(--sidebar) minmax(0, 1fr) 0px;
}

body.sidebar-collapsed.detail-closed .app-shell,
.app-shell.sidebar-collapsed.detail-closed {
  grid-template-columns: var(--sidebar-collapsed) minmax(0, 1fr) 0px;
}

.sidebar {
  border-right: 1px solid var(--line);
  background: var(--dark);
  color: #fff;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: var(--sidebar);
  min-width: var(--sidebar);
  max-width: var(--sidebar);
  overflow: hidden;
  position: relative;
}

body.sidebar-collapsed .sidebar,
.app-shell.sidebar-collapsed .sidebar {
  padding: 18px 10px;
  align-items: center;
  width: var(--sidebar-collapsed);
  min-width: var(--sidebar-collapsed);
  max-width: var(--sidebar-collapsed);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  width: 100%;
  position: relative;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--dark);
  font-weight: 800;
  font-size: 13px;
}

.brand span {
  display: block;
  color: #b7c0cf;
  font-size: 12px;
  margin-top: 2px;
}

.sidebar-toggle,
.sidebar-expand {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 18px;
  line-height: 1;
}

.sidebar-toggle {
  margin-left: auto;
}

.sidebar-expand {
  position: static;
  margin-top: auto;
  background: #fff;
  color: var(--dark);
  border-color: rgba(255, 255, 255, 0.75);
  box-shadow: none;
  width: 42px;
  height: 42px;
  font-size: 22px;
}

body:not(.sidebar-collapsed) .sidebar-expand {
  display: none;
}

body.sidebar-collapsed .brand,
.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .sidebar-toggle,
body.sidebar-collapsed .nav-text,
body.sidebar-collapsed .nav-count,
body.sidebar-collapsed .sidebar-note,
body.sidebar-collapsed .artifact-nav-label,
body.sidebar-collapsed .artifact-browser .project-card,
body.sidebar-collapsed .artifact-browser .artifact-search,
body.sidebar-collapsed .artifact-tree,
body.sidebar-collapsed .artifact-switcher,
.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .sidebar-toggle,
.app-shell.sidebar-collapsed .nav-text,
.app-shell.sidebar-collapsed .nav-count,
.app-shell.sidebar-collapsed .sidebar-note,
.app-shell.sidebar-collapsed .artifact-nav-label,
.app-shell.sidebar-collapsed .artifact-browser .project-card,
.app-shell.sidebar-collapsed .artifact-browser .artifact-search,
.app-shell.sidebar-collapsed .artifact-tree,
.app-shell.sidebar-collapsed .artifact-switcher {
  display: none;
}

body.sidebar-collapsed .nav,
.app-shell.sidebar-collapsed .nav {
  width: 100%;
}

body.sidebar-collapsed .artifact-filter-grid,
.app-shell.sidebar-collapsed .artifact-filter-grid {
  grid-template-columns: 1fr;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  text-align: left;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.nav-count {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
}

.nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.08);
}

.nav-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 750;
}

body.sidebar-collapsed .nav-item,
.app-shell.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 10px;
}

.artifact-switcher {
  display: grid;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 12px;
}

.artifact-browser {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
}

body.sidebar-collapsed .artifact-browser,
.app-shell.sidebar-collapsed .artifact-browser {
  width: 100%;
}

.project-card {
  display: grid;
  gap: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 10px;
}

.project-card span,
.project-card label,
.artifact-search span,
.artifact-nav-label {
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
}

.project-card strong,
.project-card select {
  color: #fff;
  font-size: 12px;
  line-height: 1.25;
}

.project-card select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 6px;
  background: var(--dark-2);
  padding: 6px 8px;
}

.artifact-search {
  display: grid;
  gap: 7px;
}

.artifact-search input {
  width: 100%;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--dark-2);
  color: #fff;
  padding: 0 10px;
  font-size: 12px;
}

.artifact-search input::placeholder {
  color: #7f8aa0;
}

.artifact-type-nav {
  display: grid;
  gap: 7px;
}

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

.artifact-tree {
  min-height: 0;
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 10px;
  padding-right: 2px;
}

.artifact-group {
  display: grid;
  gap: 5px;
}

.artifact-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
}

.artifact-group-title strong {
  color: #b7c0cf;
  font-size: 10px;
}

.artifact-item {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  padding: 8px 9px;
  display: grid;
  gap: 4px;
  text-align: left;
  cursor: pointer;
}

.artifact-item:hover,
.artifact-item.active {
  border-color: rgba(147, 197, 253, 0.55);
  background: rgba(31, 111, 235, 0.20);
}

.artifact-title {
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1.25;
}

.artifact-meta {
  color: #b7c0cf;
  font-size: 10px;
  line-height: 1.25;
}

.empty-artifact-list {
  border: 1px dashed rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 12px;
  color: #b7c0cf;
  font-size: 12px;
  line-height: 1.35;
}

.artifact-switcher label {
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
}

.artifact-switcher select {
  width: 100%;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: var(--dark-2);
  color: #fff;
  padding: 0 9px;
  font-size: 12px;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(255, 255, 255, 0.10);
  color: #fff;
}

.sidebar-note {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 8px;
  padding: 14px;
}

.note-label {
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-note p {
  margin: 8px 0 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.45;
}

.workspace {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.topbar {
  min-height: 92px;
  padding: 20px 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 700;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 21px;
}

h2 {
  font-size: 17px;
}

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

.save-status {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.save-status.is-error {
  max-width: 360px;
  color: #b42318;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
}

.button,
.segment,
.icon-button {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.button {
  min-height: 38px;
  padding: 0 13px;
  font-weight: 650;
}

.add-node-button {
  min-width: 42px;
  font-size: 20px;
  line-height: 1;
}

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

.button.primary:hover {
  border-color: var(--brand-2);
  background: var(--brand-2);
}

.button.danger {
  border-color: #b42318;
  background: #b42318;
  color: #fff;
}

.button.danger:hover:not(:disabled) {
  border-color: #912018;
  background: #912018;
}

.action-menu {
  position: relative;
}

.icon-menu-button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}

.icon-menu-button:hover {
  border-color: #b8c1d1;
}

.action-menu-popover {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 38px rgba(16, 24, 40, 0.16);
}

.action-menu-popover button {
  width: 100%;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--ink);
  text-align: left;
  padding: 9px 10px;
  cursor: pointer;
  font-weight: 650;
  font-size: 13px;
}

.action-menu-popover button:hover {
  background: #f8fafc;
}

.action-menu-popover button:disabled {
  color: var(--muted-2);
  cursor: not-allowed;
  background: transparent;
}

.menu-hint {
  max-width: 220px;
  padding: 8px 10px 9px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.add-node-menu .action-menu-popover {
  left: 0;
  right: auto;
  min-width: 230px;
}

.button.secondary:hover,
.segment:hover {
  border-color: #b8c1d1;
}

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

.control-strip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 26px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.artifact-context {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 26px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.context-item {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 7px 10px;
  white-space: nowrap;
}

.context-item span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
}

.context-item strong {
  color: var(--ink);
  font-size: 12px;
}

.context-related {
  min-width: 0;
  flex: 1;
  justify-content: flex-start;
}

.context-chips {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow: hidden;
}

.context-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  background: #eef4ff;
  color: #1849a9;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-2);
}

.segment {
  border: 0;
  background: transparent;
  padding: 7px 11px;
  font-size: 13px;
  color: var(--muted);
}

.segment.active {
  background: #fff;
  color: var(--ink);
  box-shadow: 0 1px 3px rgba(16, 24, 40, 0.10);
}

.search-box,
.density-control,
.tag-filter-control {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.search-box input,
.density-control select,
.tag-filter-control select {
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 0 10px;
  color: var(--ink);
}

.search-box input {
  width: 260px;
}

.tag-filter-control select {
  width: 138px;
}

.map-shell {
  --map-shell-edge: 26px;
  position: relative;
  min-height: 0;
  flex: 1;
  padding: 14px 26px 26px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.canvas-history-tools {
  position: absolute;
  left: calc(var(--map-shell-edge) + 16px);
  bottom: calc(var(--map-shell-edge) + 16px);
  z-index: 8;
  display: flex;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.14);
}

.canvas-history-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.canvas-history-button:hover:not(:disabled) {
  background: #eff6ff;
  color: #1d4ed8;
}

.canvas-history-button:disabled {
  color: var(--muted-2);
  cursor: not-allowed;
}

.emotion-shell {
  margin: 16px 26px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.07);
  overflow: hidden;
}

.emotion-shell.artifact-no-emotion {
  display: none;
}

body.emotion-collapsed .emotion-shell {
  margin-top: 12px;
}

.emotion-header {
  min-height: 48px;
  padding: 12px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.emotion-header strong {
  display: block;
  font-size: 14px;
}

.emotion-header span {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.emotion-legend {
  display: flex;
  gap: 16px;
  align-items: center;
  white-space: nowrap;
}

.mini-button {
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 0 10px;
  cursor: pointer;
  font-weight: 650;
  font-size: 12px;
}

.mini-button:hover {
  color: var(--ink);
  border-color: #b8c1d1;
}

.emotion-legend .line {
  display: inline-block;
  width: 24px;
  height: 3px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}

.emotion-legend .line.actual {
  background: var(--accent);
}

.emotion-legend .line.ideal {
  background: repeating-linear-gradient(
    to right,
    var(--success) 0,
    var(--success) 5px,
    transparent 5px,
    transparent 9px
  );
}

.emotion-chart {
  height: 156px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 10px 12px 4px;
}

body.emotion-collapsed .emotion-chart,
body.emotion-collapsed .emotion-scale {
  display: none;
}

body.emotion-collapsed .emotion-header {
  min-height: 46px;
}

.emotion-chart svg {
  display: block;
  min-width: 100%;
  height: 138px;
}

.empty-chart {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
}

.emotion-axis {
  stroke: #e4e7ec;
  stroke-width: 1;
}

.emotion-grid-line {
  stroke: #eef2f6;
  stroke-width: 1;
}

.emotion-line-actual {
  fill: none;
  stroke: var(--accent);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emotion-line-ideal {
  fill: none;
  stroke: var(--success);
  stroke-width: 2.5;
  stroke-dasharray: 7 5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.emotion-point-actual {
  fill: #fff;
  stroke: var(--accent);
  stroke-width: 2;
}

.emotion-point-ideal {
  fill: #fff;
  stroke: var(--success);
  stroke-width: 2;
}

.emotion-label {
  fill: #667085;
  font-size: 10px;
  font-weight: 650;
}

.emotion-y-label {
  fill: #98a2b3;
  font-size: 10px;
}

.emotion-scale {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

.emotion-scale div {
  padding: 8px 10px;
  border-right: 1px solid var(--line);
  min-width: 0;
}

.emotion-scale div:last-child {
  border-right: 0;
}

.emotion-scale strong {
  display: inline-block;
  margin-right: 6px;
  font-size: 12px;
}

.emotion-scale span {
  color: var(--muted);
  font-size: 11px;
}

.map-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
}

.map-meta strong {
  display: block;
  font-size: 14px;
}

.map-meta span {
  display: inline-block;
  color: var(--muted);
  font-size: 12px;
}

.legend {
  display: flex;
  gap: 14px;
}

.dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  margin-right: 6px;
}

.dot.changed {
  background: var(--changed);
}

.dot.filled {
  background: var(--success);
}

.map-viewport {
  min-height: 0;
  flex: 1;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

body.context-hidden .emotion-shell {
  margin-top: 12px;
}

body.artifact-document .control-strip,
body.artifact-document .artifact-context,
body.artifact-document .emotion-shell {
  display: none;
}

body.artifact-document .map-shell {
  padding-top: 14px;
}

body.artifact-document .map-viewport {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

body.artifact-document .legend {
  display: none;
}

.map-grid {
  display: grid;
  grid-template-columns: var(--row-label-width) repeat(var(--col-count), var(--column-width));
  width: max-content;
  min-width: 100%;
}

.empty-artifact {
  min-height: 360px;
  display: grid;
  place-items: center;
  padding: 40px;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}

.persona-view {
  --coral: #e8715a;
  --coral-light: #f5c4bb;
  --teal: #2d9cdb;
  --teal-light: #bde3f5;
  --navy: #1b2a4a;
  --green: #27ae60;
  --green-light: #c3ebd3;
  --purple: #7b61ff;
  --purple-light: #d9d3ff;
  --yellow: #f2c94c;
  --yellow-light: #fdf3cc;
  --orange: #f2994a;
  --orange-light: #fddfc3;
  --gray-bg: #f7f8fa;
  --gray-mid: #e4e7ee;
  --gray-text: #6b7280;
  --persona-coral: #e8715a;
  --persona-coral-light: #f5c4bb;
  --persona-teal: #2d9cdb;
  --persona-teal-light: #bde3f5;
  --persona-navy: #1b2a4a;
  --persona-green: #27ae60;
  --persona-green-light: #c3ebd3;
  --persona-purple: #7b61ff;
  --persona-purple-light: #d9d3ff;
  --persona-yellow: #f2c94c;
  --persona-yellow-light: #fdf3cc;
  --persona-orange: #f2994a;
  --persona-orange-light: #fddfc3;
  color: var(--ink);
  padding: 0 0 28px;
}

.document-block-view {
  --document-coral: #c75b48;
  --document-teal: #1f718f;
  --document-navy: #314569;
  --document-green: #2b7a4b;
  --document-purple: #7459a7;
  --document-yellow: #a36e12;
  --document-orange: #ad5d1e;
  display: grid;
  gap: 18px;
  padding: 0 0 28px;
}

.import-review-notice {
  display: flex;
  align-items: baseline;
  gap: 9px;
  border-left: 3px solid #ad5d1e;
  background: #fff8e9;
  color: #6a4a16;
  padding: 11px 13px;
  font-size: 13px;
}

.import-review-notice span {
  color: #795b29;
}

.document-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 24px;
  background: #202030;
  color: #fff;
}

.document-hero h2 {
  margin: 5px 0 0;
  color: #fff;
  font-size: 26px;
}

.document-tagline,
.document-context {
  margin: 7px 0 0;
  color: #d7deea;
  font-size: 14px;
  line-height: 1.45;
}

.document-context {
  color: #aeb9ca;
  font-size: 12px;
}

.document-block-list {
  display: grid;
  gap: 20px;
}

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

.document-block-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  border-left: 3px solid var(--document-navy);
  padding-left: 10px;
}

.document-block-heading > span {
  font-size: 17px;
}

.document-block-title {
  min-width: 0;
  flex: 1;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  color: var(--ink);
  padding: 3px 0;
  font: 700 16px/1.35 inherit;
}

.document-block-title:focus {
  outline: 0;
  border-bottom-color: var(--document-navy);
}

.document-editor-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: end;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: #f8fafc;
}

.document-editor-toolbar label,
.document-edit-card label,
.document-score-editor label {
  display: grid;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.document-editor-toolbar select,
.document-edit-list input,
.document-edit-list textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  padding: 7px 8px;
  font: inherit;
  font-size: 13px;
}

.document-edit-list textarea {
  min-height: 68px;
  resize: vertical;
}

.document-block-actions,
.document-edit-row,
.document-score-editor,
.document-chip-editor {
  display: flex;
  gap: 7px;
  align-items: center;
}

.document-block-actions {
  margin-left: auto;
}

.document-icon-button {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.document-icon-button:hover:not(:disabled) {
  border-color: var(--document-navy);
  color: var(--document-navy);
}

.document-icon-button:disabled {
  cursor: not-allowed;
  opacity: .42;
}

.document-icon-button.danger:hover:not(:disabled) {
  border-color: #b42318;
  color: #b42318;
}

.document-edit-card,
.document-score-editor,
.document-chip-editor {
  position: relative;
}

.document-edit-card {
  display: grid;
  gap: 8px;
}

.document-score-editor {
  display: grid;
  grid-template-columns: minmax(140px, 1fr) 100px minmax(140px, 1fr) auto;
  border: 1px solid var(--line);
  padding: 9px;
  background: #fff;
}

.document-chip-editor {
  border: 1px solid #d7dfec;
  border-radius: 999px;
  background: #edf2f8;
  padding: 3px 4px 3px 9px;
}

.document-chip-editor input {
  min-width: 120px;
  border: 0;
  background: transparent;
  padding: 2px 0;
}

.document-chip-editor .document-icon-button {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
  border: 0;
  background: transparent;
}

.document-add-item {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--document-navy);
  padding: 3px 0;
  font: 700 12px/1.4 inherit;
  cursor: pointer;
}

.document-add-item:hover {
  text-decoration: underline;
}

.document-text-block p {
  max-width: 920px;
  margin: 0;
  color: #344054;
  font-size: 14px;
  line-height: 1.6;
}

.document-key-value-grid,
.document-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.document-key-value-grid > div,
.document-mini-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
}

.document-key-value-grid dt,
.document-mini-card strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.document-key-value-grid dd,
.document-mini-card p {
  margin: 5px 0 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
}

.document-dot-list,
.document-score-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.document-dot-list li {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  color: #344054;
  font-size: 14px;
  line-height: 1.5;
}

.document-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--document-navy);
}

.document-score-row {
  display: grid;
  grid-template-columns: minmax(120px, 180px) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.document-score-row > span,
.document-score-row strong {
  color: var(--ink);
  font-size: 12px;
}

.document-score-row strong {
  color: var(--muted);
}

.document-score-row > div {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.document-score-row i {
  display: block;
  height: 100%;
  background: var(--document-navy);
}

.document-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.document-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid #d7dfec;
  border-radius: 999px;
  background: #edf2f8;
  color: var(--document-navy);
  padding: 5px 9px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
}

.document-raw-block {
  border: 1px solid #efcf9f;
  background: #fffaf0;
  padding: 14px;
}

.document-raw-block p {
  margin: 0;
  color: #7a4f15;
  font-size: 13px;
}

.document-raw-block pre {
  overflow: auto;
  margin: 0;
  padding: 10px;
  background: #fff;
  color: #344054;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre-wrap;
}

.document-import-footer {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 720px) {
  .document-editor-toolbar,
  .document-score-editor {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .document-editor-toolbar {
    display: grid;
  }

  .document-block-heading {
    flex-wrap: wrap;
  }

  .document-block-actions {
    width: 100%;
    margin-left: 0;
    justify-content: flex-end;
  }
}

.document-accent-coral { border-color: var(--document-coral); }
.document-accent-teal { border-color: var(--document-teal); }
.document-accent-navy { border-color: var(--document-navy); }
.document-accent-green { border-color: var(--document-green); }
.document-accent-purple { border-color: var(--document-purple); }
.document-accent-yellow { border-color: var(--document-yellow); }
.document-accent-orange { border-color: var(--document-orange); }
.document-dot.document-accent-coral, .document-score-row i.document-accent-coral { background: var(--document-coral); }
.document-dot.document-accent-teal, .document-score-row i.document-accent-teal { background: var(--document-teal); }
.document-dot.document-accent-navy, .document-score-row i.document-accent-navy { background: var(--document-navy); }
.document-dot.document-accent-green, .document-score-row i.document-accent-green { background: var(--document-green); }
.document-dot.document-accent-purple, .document-score-row i.document-accent-purple { background: var(--document-purple); }
.document-dot.document-accent-yellow, .document-score-row i.document-accent-yellow { background: var(--document-yellow); }
.document-dot.document-accent-orange, .document-score-row i.document-accent-orange { background: var(--document-orange); }
.document-chip.document-accent-coral { background: #f9e0db; color: #8a392b; }
.document-chip.document-accent-teal { background: #d9eef5; color: #15536a; }
.document-chip.document-accent-green { background: #deefe2; color: #215e37; }
.document-chip.document-accent-purple { background: #eee8f7; color: #5c468a; }
.document-chip.document-accent-yellow { background: #fff1cf; color: #825b0d; }
.document-chip.document-accent-orange { background: #fbe5d1; color: #82451b; }

.import-report-modal {
  width: min(620px, 100%);
}

.import-report-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.import-report-summary > div {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.import-report-summary strong {
  color: var(--ink);
  font-size: 22px;
}

.import-report-summary span,
.import-report-status,
.import-report-review li {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.import-report-status {
  margin: 16px 0 0;
}

.import-report-review {
  margin-top: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.import-report-review h3 {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.import-report-review ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 18px;
}

.persona-view .header {
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202030;
  color: #fff;
  padding: 22px 24px;
}

.persona-view .header-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.persona-view .header-avatar {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #fff;
  color: var(--dark);
  font-size: 24px;
}

.persona-view .header-eyebrow,
.persona-view .card-title,
.persona-view .section-label,
.persona-view .job-label,
.persona-view .ruptura-num,
.persona-view .need-title {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 11px;
  font-weight: 850;
}

.persona-view .header-eyebrow {
  color: #b7c0cf;
}

.persona-view h1 {
  margin-top: 5px;
  color: #fff;
  font-size: 26px;
}

.persona-view .header-tags,
.persona-view .chip-group {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.persona-view .header-tags {
  margin-top: 14px;
}

.persona-view .header-tag,
.persona-view .chip,
.persona-view .group-name {
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.persona-view .header-tag {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.persona-view .canvas-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(260px, 1fr));
  gap: 14px;
}

.persona-view .span-2 {
  grid-column: span 2;
}

.persona-view .span-3 {
  grid-column: 1 / -1;
}

.persona-view .card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.persona-view .card-accent-coral { border-top: 3px solid var(--persona-coral); }
.persona-view .card-accent-teal { border-top: 3px solid var(--persona-teal); }
.persona-view .card-accent-green { border-top: 3px solid var(--persona-green); }
.persona-view .card-accent-purple { border-top: 3px solid var(--persona-purple); }
.persona-view .card-accent-yellow { border-top: 3px solid var(--persona-yellow); }
.persona-view .card-accent-orange { border-top: 3px solid var(--persona-orange); }
.persona-view .card-accent-navy { border-top: 3px solid var(--persona-navy); }

.persona-view .card-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
}

.persona-view .card-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
}

.persona-view .icon-coral { background: var(--persona-coral-light); }
.persona-view .icon-teal { background: var(--persona-teal-light); }
.persona-view .icon-green { background: var(--persona-green-light); }
.persona-view .icon-purple { background: var(--persona-purple-light); }
.persona-view .icon-yellow { background: var(--persona-yellow-light); }
.persona-view .icon-orange { background: var(--persona-orange-light); }
.persona-view .icon-navy { background: #dde3f0; }

.persona-view .card-body,
.persona-view .dot-item,
.persona-view .job-note {
  color: #344054;
  font-size: 13px;
  line-height: 1.55;
}

.persona-view .quote-block {
  margin-top: 12px;
  border-left: 3px solid var(--persona-purple);
  border-radius: 0 8px 8px 0;
  background: #f8fafc;
  padding: 12px 14px;
  color: var(--ink);
  font-size: 13px;
  font-style: italic;
}

.persona-view .profile-block,
.persona-view .needs-grid,
.persona-view .two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.persona-view .profile-item,
.persona-view .dot-item,
.persona-view .need-item,
.persona-view .job-card,
.persona-view .ruptura-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
}

.persona-view .profile-item .label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
}

.persona-view .profile-item .value {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.persona-view .section-label {
  margin: 14px 0 7px;
}

.persona-view .chip-coral { background: var(--persona-coral-light); color: #8b2b1f; }
.persona-view .chip-teal { background: var(--persona-teal-light); color: #1a5f7a; }
.persona-view .chip-green { background: var(--persona-green-light); color: #145228; }
.persona-view .chip-purple { background: var(--persona-purple-light); color: #3d2ba0; }
.persona-view .chip-yellow { background: var(--persona-yellow-light); color: #7a5c00; }
.persona-view .chip-orange { background: var(--persona-orange-light); color: #7a3b00; }
.persona-view .chip-navy { background: #dde3f0; color: var(--persona-navy); }

.persona-view .group-item {
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.persona-view .group-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.persona-view .group-name {
  display: inline-flex;
  margin-bottom: 8px;
}

.persona-view .dot-grid {
  display: grid;
  gap: 8px;
}

.persona-view .dot-item {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  font-weight: 650;
}

.persona-view .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 8px;
  margin-top: 6px;
}

.persona-view .score-row {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr) 44px;
  gap: 9px;
  align-items: center;
  margin-top: 9px;
}

.persona-view .score-name,
.persona-view .score-val {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.persona-view .score-val {
  color: var(--muted);
  text-align: right;
}

.persona-view .score-bar {
  height: 7px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.persona-view .score-fill {
  height: 100%;
  border-radius: inherit;
}

.persona-view .job-card {
  margin-bottom: 10px;
}

.persona-view .job-card:last-child,
.persona-view .ruptura-item:last-child {
  margin-bottom: 0;
}

.persona-view .job-note {
  margin-top: 8px;
  color: var(--muted);
}

.persona-view .ruptura-item {
  margin-bottom: 10px;
  border-left: 3px solid var(--persona-coral);
}

.persona-view .ruptura-title {
  margin: 4px 0 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.persona-view .footer {
  margin-top: 16px;
  border-radius: 8px;
  background: #202030;
  color: #cbd5e1;
  padding: 16px;
  text-align: center;
  font-size: 12px;
}

.persona-view .footer strong {
  color: #fff;
}

.moment-architecture-view {
  padding-bottom: 28px;
}

.ma-hero {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #202030;
  color: #fff;
  padding: 22px 24px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.ma-hero h2 {
  color: #fff;
  font-size: 24px;
  margin-bottom: 7px;
}

.ma-hero p:not(.eyebrow) {
  max-width: 780px;
  margin: 0;
  color: #cbd5e1;
  font-size: 13px;
  line-height: 1.5;
}

.ma-summary {
  min-width: 132px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  padding: 12px;
  text-align: right;
}

.ma-summary strong {
  display: block;
  color: #fff;
  font-size: 28px;
  line-height: 1;
}

.ma-summary span {
  display: block;
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.ma-filters {
  margin: 0 0 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ma-filter {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 750;
}

.ma-filter.active,
.ma-filter:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.ma-filter strong {
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #eef2ff;
  color: inherit;
  display: grid;
  place-items: center;
  font-size: 10px;
}

.ma-type-guide {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
}

.ma-guide-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ma-guide-title span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 850;
}

.ma-guide-title strong {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 850;
}

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

.ma-type-item {
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 8px;
  background: #f8fafc;
  padding: 9px;
}

.ma-type-pico { border-top-color: #16a34a; }
.ma-type-vale { border-top-color: #dc2626; }
.ma-type-transicao { border-top-color: #2563eb; }
.ma-type-marco { border-top-color: #7c3aed; }
.ma-type-neutro { border-top-color: #94a3b8; }

.ma-type-item strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.ma-type-item span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

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

.ma-card {
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  box-shadow: 0 10px 28px rgba(16, 24, 40, 0.06);
}

.ma-pico { border-top-color: #16a34a; }
.ma-vale { border-top-color: #dc2626; }
.ma-transicao { border-top-color: #2563eb; }
.ma-marco { border-top-color: #7c3aed; }
.ma-neutro { border-top-color: #94a3b8; }

.ma-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.ma-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.25;
}

.ma-card-head span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.ma-badge {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: #f8fafc;
  font-size: 16px;
}

.ma-intensity {
  margin-top: 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}

.ma-intensity span,
.ma-intensity strong {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.ma-intensity div {
  height: 7px;
  border-radius: 999px;
  background: #e4e7ec;
  overflow: hidden;
}

.ma-intensity i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.ma-dimensions {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ma-dimension {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 8px;
  position: relative;
  cursor: help;
}

.ma-dimension span {
  display: block;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 9px;
  font-weight: 850;
}

.ma-dimension small {
  position: absolute;
  left: 8px;
  bottom: calc(100% + 8px);
  z-index: 12;
  width: max-content;
  max-width: 220px;
  border: 1px solid rgba(16, 24, 40, 0.10);
  border-radius: 8px;
  background: #202030;
  color: #fff;
  padding: 8px 9px;
  box-shadow: 0 14px 32px rgba(16, 24, 40, 0.20);
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.ma-dimension small::after {
  content: "";
  position: absolute;
  left: 12px;
  top: 100%;
  border: 6px solid transparent;
  border-top-color: #202030;
}

.ma-dimension:hover small,
.ma-dimension:focus-visible small {
  opacity: 1;
  transform: translateY(0);
}

.ma-dimension div {
  margin-top: 6px;
  display: flex;
  gap: 4px;
}

.ma-dimension i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--brand);
}

.ma-dimension i.empty {
  background: #d0d5dd;
}

.ma-analysis {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.ma-analysis section {
  border-left: 2px solid var(--line-strong);
  padding-left: 9px;
}

.ma-analysis strong {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 850;
}

.ma-analysis p {
  margin: 4px 0 0;
  color: #344054;
  font-size: 12px;
  line-height: 1.45;
}

.ma-footer {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
}

.ma-footer strong {
  color: var(--ink);
  font-size: 14px;
}

.ma-footer p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 1200px) {
  .persona-view .canvas-grid {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
  }

  .ma-grid {
    grid-template-columns: repeat(2, minmax(280px, 1fr));
  }

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

  .persona-view .span-3 {
    grid-column: span 2;
  }
}

@media (max-width: 820px) {
  .document-hero {
    display: grid;
  }

  .document-key-value-grid,
  .document-card-grid,
  .import-report-summary {
    grid-template-columns: 1fr;
  }

  .document-score-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .persona-view .canvas-grid,
  .persona-view .profile-block,
  .persona-view .needs-grid,
  .persona-view .two-col {
    grid-template-columns: 1fr;
  }

  .persona-view .span-2,
  .persona-view .span-3 {
    grid-column: auto;
  }

  .ma-hero,
  .ma-grid,
  .ma-type-grid {
    grid-template-columns: 1fr;
  }

  .ma-hero {
    display: grid;
  }

  .ma-summary {
    text-align: left;
  }
}

.corner,
.column-header,
.row-header,
.cell {
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.corner {
  position: sticky;
  left: 0;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  min-height: 86px;
  padding: 16px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.column-header {
  position: sticky;
  top: 0;
  z-index: 4;
  min-height: 86px;
  padding: 14px;
  background: #f8fafc;
  border-top: 0;
  border-left: 0;
  border-radius: 0;
  text-align: left;
  cursor: default;
}

.column-header.is-expandable {
  cursor: pointer;
}

.column-header-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

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

.node-delete,
.node-rename,
.node-move {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  opacity: 0.58;
  transition: opacity 0.14s ease, border-color 0.14s ease, color 0.14s ease, background 0.14s ease;
}

.column-header:hover .node-delete,
.column-header:hover .node-rename,
.column-header:hover .node-move,
.column-header:focus-within .node-delete,
.column-header:focus-within .node-rename,
.column-header:focus-within .node-move,
.node-delete:focus-visible,
.node-rename:focus-visible,
.node-move:focus-visible {
  opacity: 1;
}

.node-move:hover:not(:disabled) {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.node-move:disabled {
  cursor: not-allowed;
  opacity: 0.18;
}

.node-rename:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.node-delete:hover {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.node-phase {
  background: #f8fafc;
}

.node-stage {
  background: #f3f7ff;
}

.node-moment {
  background: #eef6ff;
}

.column-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 750;
}

.column-title {
  margin-top: 6px;
  font-weight: 750;
  font-size: 14px;
}

.column-desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.row-header {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #fcfcfd;
  padding: 14px 16px;
  min-height: 132px;
}

.row-title {
  font-size: 13px;
  font-weight: 760;
}

.row-desc {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.cell {
  min-height: 132px;
  padding: 10px;
  background: #fff;
  transition: background 0.15s ease, outline 0.15s ease;
}

.cell:hover {
  background: #fbfdff;
}

.cell.selected {
  outline: 2px solid var(--focus);
  outline-offset: -2px;
  background: #f8fbff;
}

.cell.dimmed {
  opacity: 0.24;
}

.cell.changed-cell {
  box-shadow: inset 3px 0 0 var(--changed);
}

.cell-card {
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px;
  background: #fff;
  cursor: text;
}

.cell-epistemic-meta {
  display: flex;
  justify-content: flex-end;
  min-height: 20px;
  margin-bottom: 5px;
}

.epistemic-badge {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 1px 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  white-space: nowrap;
}

.epistemic-evidenciado {
  border-color: #b8dac1;
  background: #edf8f0;
  color: #276749;
}

.epistemic-hipotese {
  border-color: #f3d6a2;
  background: #fff8e8;
  color: #9a5a0a;
}

.epistemic-proposta {
  border-color: #b9d1e3;
  background: #edf6fb;
  color: #285f84;
}

.epistemic-unclassified {
  border-color: #d7dce3;
  background: #f5f7f9;
  color: #596579;
}

.cell-card:focus {
  outline: 2px solid rgba(77, 101, 255, 0.28);
  border-color: var(--focus);
}

.cell-card p {
  margin: 0;
  color: #273043;
  font-size: 12px;
  line-height: 1.42;
}

.cell-list {
  display: grid;
  gap: 7px;
}

.cell-list-item {
  color: #273043;
  font-size: 12px;
  line-height: 1.42;
  padding-left: 10px;
  border-left: 2px solid var(--line-strong);
}

.wall-meta {
  display: none;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  border-radius: 999px;
  padding: 1px 7px;
  margin: 0 3px 3px 0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.4;
  vertical-align: baseline;
  white-space: nowrap;
}

.tag-critical {
  background: #171717;
  color: #fff;
}

.tag-severe {
  background: #fee2e2;
  color: #b42318;
}

.tag-light {
  background: #fef3c7;
  color: #92400e;
}

.tag-secretary {
  background: #fff1c2;
  color: #9a4b10;
}

.tag-it {
  background: #dbeafe;
  color: #1d4ed8;
}

.tag-coord {
  background: #fce7f3;
  color: #be185d;
}

.tag-teacher {
  background: #dbeafe;
  color: #2f55c8;
}

.tag-direction {
  background: #ede9fe;
  color: #6d28d9;
}

.tag-reception {
  background: #dcfce7;
  color: #166534;
}

.row-fail .cell-list-item,
.row-dores .cell-list-item {
  border-left-color: #fca5a5;
}

.row-kpi_op .cell-list-item,
.row-kpi_perc .cell-list-item,
.row-oportunidades .cell-list-item {
  border-left-color: #86efac;
}

.row-dores {
  background: #fffafa;
}

.row-oportunidades {
  background: #f7fffb;
}

.row-sentindo {
  background: #fffdf3;
}

.row-storyboard .cell-card p,
.row-pensando .cell-card p {
  font-style: italic;
}

.compare-stack {
  display: grid;
  gap: 8px;
}

.state-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.state-label {
  display: block;
  padding: 5px 8px;
  background: #f8fafc;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 10px;
  font-weight: 800;
}

.state-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  background: #f8fafc;
}

.state-header .state-label {
  padding: 0;
}

.state-body {
  padding: 8px;
  color: #273043;
  font-size: 12px;
  line-height: 1.42;
}

.density-compact {
  --column-width: 220px;
}

.density-compact .cell,
.density-compact .row-header {
  min-height: 104px;
}

.density-wall {
  --column-width: 160px;
  --row-label-width: 140px;
}

.density-wall .column-header,
.density-wall .corner {
  min-height: 68px;
  padding: 10px;
}

.density-wall .column-desc,
.density-wall .row-desc {
  display: none;
}

.density-wall .cell,
.density-wall .row-header {
  min-height: 78px;
  padding: 7px;
}

.density-wall .cell-card {
  min-height: 58px;
  padding: 7px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: #fff;
  border-color: #d7dce5;
  box-shadow: inset 0 0 0 1px rgba(16, 24, 40, 0.02);
}

.density-wall .cell-card p,
.density-wall .cell-list-item,
.density-wall .state-body {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #344054;
  font-size: 10px;
  line-height: 1.25;
}

.density-wall .cell-list {
  gap: 0;
}

.density-wall .cell-list-item {
  padding-left: 6px;
  border-left-width: 2px;
}

.density-wall .wall-meta {
  margin-top: auto;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.density-wall .wall-meta span {
  min-height: 16px;
  border-radius: 999px;
  background: #eef2ff;
  color: #344054;
  padding: 2px 6px;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}

.density-wall .changed-cell .cell-card {
  border-color: #fed7aa;
  background: #fff8f1;
}

.density-wall .row-fail .cell-card,
.density-wall .row-dores .cell-card {
  background: #fffafa;
}

.density-wall .row-kpi_op .cell-card,
.density-wall .row-kpi_perc .cell-card,
.density-wall .row-oportunidades .cell-card {
  background: #f7fffb;
}

.density-wall .row-sentindo .cell-card {
  background: #fffdf3;
}

.density-wall .tag-chip {
  min-height: 15px;
  padding: 1px 5px;
  margin: 0 2px 2px 0;
  font-size: 8px;
}

.density-wall .column-title {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.18;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.density-wall .column-kicker,
.density-wall .row-title {
  font-size: 9px;
}

.density-wall .node-actions {
  display: none;
}

.detail-panel {
  border-left: 1px solid var(--line);
  background: var(--panel);
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: var(--panel-width);
  max-width: var(--panel-width);
  overflow: hidden;
}

.detail-panel:not(.open) {
  display: none;
}

body.detail-closed .detail-panel,
.app-shell.detail-closed .detail-panel {
  width: 0;
  max-width: 0;
  border-left: 0;
}

.panel-header {
  min-height: 92px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
}

.icon-button {
  width: 32px;
  height: 32px;
}

.empty-panel {
  margin: 20px;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.panel-content {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px 24px;
  display: grid;
  grid-auto-rows: max-content;
  align-content: start;
  gap: 16px;
}

.panel-summary {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px 12px;
}

.panel-summary strong {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.3;
}

.panel-summary span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.panel-accordion {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.panel-accordion-toggle {
  width: 100%;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  background: #fff;
  color: var(--ink);
  padding: 10px 12px;
  font: inherit;
  font-size: 13px;
  font-weight: 750;
  text-align: left;
  cursor: pointer;
}

.panel-accordion-toggle:hover {
  background: #f8fafc;
}

.panel-accordion-indicator {
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  transition: transform 160ms ease;
}

.panel-accordion.is-open .panel-accordion-indicator {
  transform: rotate(180deg);
}

.panel-accordion-body {
  display: none;
  gap: 14px;
  border-top: 1px solid var(--line);
  padding: 14px 12px;
}

.panel-accordion.is-open .panel-accordion-body {
  display: grid;
}

.hidden {
  display: none;
}

.access-state {
  display: none;
  min-height: 100vh;
  place-items: center;
  padding: 32px;
  background: var(--canvas);
}

.access-state > div {
  width: min(440px, 100%);
  padding: 24px;
  border-left: 4px solid var(--accent);
}

.access-state h1 {
  margin: 8px 0;
  font-size: 24px;
}

.access-state p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

body.access-pending .app-shell,
body.access-denied .app-shell {
  display: none;
}

body.access-pending .access-state,
body.access-denied .access-state {
  display: grid;
}

.panel-content label {
  display: grid;
  gap: 7px;
}

.panel-content label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.panel-content textarea {
  min-height: 118px;
  resize: vertical;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 11px;
  color: var(--ink);
  line-height: 1.45;
}

.panel-content textarea:focus {
  outline: 2px solid rgba(77, 101, 255, 0.25);
  border-color: var(--focus);
}

.panel-hint {
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid var(--line);
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.panel-section-label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
}

.panel-tag-list {
  display: flex;
  flex-wrap: wrap;
}

.panel-link-list {
  display: grid;
  gap: 6px;
}

.panel-link-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--ink);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
}

.entity-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
}

.panel-entity-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.panel-entity-actions .button {
  flex: 1 1 150px;
}

.panel-tracking {
  min-width: 0;
}

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

.panel-epistemic-status {
  display: grid;
  gap: 8px;
}

.epistemic-control {
  display: grid;
  gap: 5px;
}

.epistemic-control > span,
.epistemic-note,
.epistemic-readonly > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.epistemic-control select {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
}

.epistemic-control select:focus {
  outline: 2px solid rgba(77, 101, 255, 0.25);
  border-color: var(--focus);
}

.epistemic-readonly {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
}

.epistemic-note {
  margin: 0;
}

.tracking-grid label {
  min-width: 0;
}

.tracking-grid input,
.tracking-grid select,
.tracking-grid textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--ink);
  background: var(--panel);
  font: inherit;
}

.tracking-grid textarea {
  min-height: 84px;
}

.tracking-grid input:focus,
.tracking-grid select:focus,
.tracking-grid textarea:focus {
  outline: 2px solid rgba(77, 101, 255, 0.25);
  border-color: var(--focus);
}

.tracking-decision,
.tracking-priority-note {
  grid-column: 1 / -1;
}

.tracking-evidence {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  color: var(--muted);
  font-size: 12px;
}

.tracking-evidence strong {
  color: var(--ink);
  font-size: 14px;
}

.tracking-priority-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.text-button {
  border: 0;
  padding: 0;
  color: var(--focus);
  background: transparent;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
}

.score-editor {
  display: grid;
  grid-column: 1 / -1;
  gap: 10px;
  border-top: 1px solid var(--line);
  padding-top: 16px;
}

.score-editor-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.score-editor-heading .panel-section-label {
  margin: 0;
}

.score-editor-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.score-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
}

.score-field > div:first-child {
  display: grid;
  gap: 3px;
}

.score-field strong {
  font-size: 13px;
}

.score-field span,
.score-field small,
.score-formula-note {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.star-score {
  display: flex;
  gap: 2px;
}

.star-score-button {
  width: 28px;
  height: 28px;
  border: 0;
  padding: 0;
  color: #cbd5e1;
  background: transparent;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.star-score-button.selected,
.star-score-button:hover,
.star-score-button:focus-visible {
  color: #d97706;
}

.star-score-button:focus-visible,
.text-button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.score-formula-note {
  margin: 0;
}

.score-weight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding-top: 2px;
}

.score-weight-grid > span {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.score-weight-grid label {
  display: grid;
  gap: 4px;
}

.score-weight-grid label span {
  color: var(--muted);
  font-size: 11px;
}

.score-weight-grid input {
  min-width: 0;
  padding: 7px;
}

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

  .score-field {
    grid-template-columns: 1fr;
  }

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

.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  justify-content: flex-end;
  background: rgba(23, 23, 39, 0.42);
}

.drawer-backdrop.hidden {
  display: none;
}

.entity-link-drawer {
  width: min(440px, 100vw);
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  box-shadow: -16px 0 36px rgba(16, 24, 40, 0.18);
}

.drawer-body {
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 20px;
}

.drawer-body label {
  display: grid;
  gap: 7px;
}

.drawer-body label span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.drawer-body input[type="search"] {
  min-height: 40px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 9px 11px;
}

.entity-link-results {
  display: grid;
  gap: 8px;
}

.entity-link-result {
  width: 100%;
  display: grid;
  gap: 5px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  color: var(--ink);
  cursor: pointer;
}

.entity-link-result:hover,
.entity-link-result.selected {
  border-color: var(--focus);
  background: #f7f8ff;
}

.entity-link-result strong {
  font-size: 14px;
}

.entity-link-result small {
  color: var(--muted);
  line-height: 1.35;
}

.entity-link-preview {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  color: var(--ink);
  line-height: 1.45;
}

.entity-link-preview.hidden {
  display: none;
}

.drawer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 16px 20px;
  border-top: 1px solid var(--line);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  background: rgba(23, 23, 39, 0.58);
  backdrop-filter: blur(6px);
  padding: 24px;
}

.modal-backdrop.hidden {
  display: none;
}

.modal-card {
  width: min(520px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 30px 70px rgba(16, 24, 40, 0.28);
  overflow: hidden;
}

.activity-history-modal {
  width: min(640px, 100%);
}

.activity-history-list {
  max-height: min(62vh, 620px);
  overflow-y: auto;
  padding: 8px 20px 20px;
}

.activity-history-empty {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.activity-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.activity-history-item:last-child {
  border-bottom: 0;
}

.activity-history-item p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.4;
}

.activity-history-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.activity-history-item .button {
  white-space: nowrap;
}

@media (max-width: 720px) {
  .map-shell {
    --map-shell-edge: 12px;
  }

  .canvas-history-tools {
    left: calc(var(--map-shell-edge) + 12px);
    bottom: calc(var(--map-shell-edge) + 12px);
  }

  .activity-history-item {
    grid-template-columns: 1fr;
  }
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.modal-body {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.delete-summary {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
}

.delete-impact {
  display: grid;
  gap: 6px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  padding: 12px;
  color: #7a271a;
  font-size: 13px;
  line-height: 1.4;
}

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

.delete-confirm-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delete-confirm-field input {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
}

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

.rename-field span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.rename-field input {
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0 10px;
  color: var(--ink);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
  background: #f8fafc;
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  body.sidebar-collapsed .app-shell,
  .app-shell.sidebar-collapsed {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .sidebar {
    padding: 16px 10px;
  }

  .brand div:not(.brand-mark),
  .nav-item,
  .sidebar-note,
  .artifact-switcher {
    display: none;
  }

  .detail-panel.open {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(420px, 92vw);
    z-index: 20;
    box-shadow: var(--shadow);
  }
}

@media (max-height: 820px) {
  .emotion-scale {
    display: none;
  }

  .emotion-chart {
    height: 120px;
  }

  .emotion-chart svg {
    height: 104px;
  }

}
