:root {
  color-scheme: light dark;
  --bg: #f3f6f8;
  --surface: #ffffff;
  --surface-alt: #edf3f5;
  --text: #18313b;
  --muted: #536a76;
  --border: #cddbe1;
  --accent: #096b62;
  --accent-hover: #07564f;
  --accent-soft: #e1f2ed;
  --danger: #b42332;
  --danger-soft: #fff0f1;
  --warning: #8a5107;
  --warning-soft: #fff6df;
  --focus: #2764ce;
  --shadow: 0 8px 28px rgb(23 50 64 / 6%);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); min-width: 280px; }
a { color: var(--accent); text-underline-offset: .2em; }
a:hover { color: var(--accent-hover); }
button, input, textarea, select { font: inherit; color: inherit; }
button, .button { touch-action: manipulation; }
button, .button, summary, select { cursor: pointer; }
button, .button {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 42px; padding: .55rem .9rem; border: 1px solid var(--border);
  border-radius: 9px; background: var(--surface); color: var(--text);
  font-size: .875rem; font-weight: 600; text-decoration: none; line-height: 1.35;
}
button:hover:not(:disabled), .button:hover { background: var(--surface-alt); border-color: var(--muted); color: var(--text); }
button:disabled { cursor: not-allowed; opacity: .48; }
.primary, button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }
.primary:hover:not(:disabled), button[aria-pressed="true"]:hover:not(:disabled) { background: var(--accent-hover); border-color: var(--accent-hover); color: #fff; }
.quiet { background: transparent; border-color: transparent; }
.danger { color: var(--danger); }
.danger:hover:not(:disabled) { color: var(--danger); background: var(--danger-soft); border-color: var(--danger); }
.danger.solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.danger.solid:hover:not(:disabled) { background: #911d29; color: #fff; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input, select, textarea { width: 100%; padding: .7rem .8rem; min-height: 44px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); font-size: 1rem; }
textarea { resize: vertical; min-height: 100px; }
input:read-only, textarea:read-only, select:disabled { background: var(--surface-alt); }
input[type="checkbox"], input[type="radio"] { width: 1.2rem; min-height: 1.2rem; accent-color: var(--accent); vertical-align: middle; }
label { display: grid; gap: .4rem; font-weight: 600; font-size: .875rem; }
fieldset { min-width: 0; }
h1, h2, h3, h4, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.6rem); letter-spacing: -.045em; line-height: 1.16; margin-bottom: .75rem; }
h2 { font-size: 1.22rem; letter-spacing: -.025em; line-height: 1.3; margin-bottom: .75rem; }
h3 { font-size: 1.1rem; line-height: 1.4; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted); }
.eyebrow { color: var(--accent); font-size: .7rem; font-weight: 750; text-transform: uppercase; letter-spacing: .13em; margin-bottom: .6rem; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 1rem; top: -100px; z-index: 100; padding: .7rem 1rem; background: var(--surface); border: 2px solid var(--focus); border-radius: 8px; }
.skip-link:focus { top: 1rem; }
.site-header { min-height: 78px; padding: 1rem max(1.25rem, env(safe-area-inset-left)); display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; border-bottom: 1px solid var(--border); background: var(--surface); }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-size: 1.3rem; font-weight: 800; letter-spacing: -.04em; text-decoration: none; color: var(--text); flex-shrink: 0; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px 13px 13px 3px; color: #fff; background: var(--accent); font-size: 1.4rem; }
.brand small { display: block; font-size: .64rem; letter-spacing: .04em; color: var(--muted); font-weight: 500; }
.main-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .75rem 1rem; font-size: .84rem; }
.main-nav > a { color: var(--muted); font-weight: 600; text-decoration: none; min-height: 38px; display: inline-flex; align-items: center; }
.main-nav > a:hover { color: var(--accent); text-decoration: underline; }
.main-nav form { margin: 0; }
.account-name { display: flex; align-items: center; flex-wrap: wrap; gap: .5rem; overflow-wrap: anywhere; }
.page-width { max-width: 1280px; width: calc(100% - 3rem); margin-inline: auto; }
.main-content { padding-block: 2.5rem 3rem; min-height: calc(100dvh - 160px); }
.site-footer { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; padding-block: 1.2rem; padding-bottom: max(1.2rem, env(safe-area-inset-bottom)); font-size: .75rem; color: var(--muted); border-top: 1px solid var(--border); }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 2rem; }
.page-heading p:last-child { margin-bottom: 0; max-width: 750px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 1.5rem; box-shadow: var(--shadow); min-width: 0; }
.stack { display: grid; gap: 1rem; }
.stack p { margin-bottom: 0; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.form-actions { margin-top: 1.5rem; }
.full-width { width: 100%; }
.badge { display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 100px; padding: .22rem .65rem; font-size: .7rem; background: var(--surface-alt); white-space: nowrap; }
.badge-large { font-size: .85rem; padding: .5rem 1rem; }
.badge-active { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.badge-inactive { background: var(--surface-alt); color: var(--muted); }
.messages { padding-top: 1rem; }
.notice { padding: .85rem 1rem; border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 9px; background: var(--accent-soft); font-size: .875rem; overflow-wrap: anywhere; }
.notice + .notice { margin-top: .6rem; }
.notice.error, .notice.danger { background: var(--danger-soft); color: var(--danger); border-color: var(--danger); }
.notice.warning { background: var(--warning-soft); color: var(--warning); border-color: var(--warning); }
.creation-grid { display: grid; grid-template-columns: 1.2fr 1fr .85fr; gap: 1.2rem; align-items: start; }
summary { font-size: .95rem; font-weight: 700; padding-block: .35rem; }
summary:hover { color: var(--accent); }
details[open] > summary { margin-bottom: 1rem; }
.import-card summary { font-size: 1.15rem; }
.demo-card { background: var(--accent-soft); }
.demo-symbol { display: block; font-size: 2rem; color: var(--accent); margin-bottom: .5rem; }
.section-space { margin-top: 2.5rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading h2 { margin: 0; }
.case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 315px), 1fr)); gap: 1.2rem; }
.case-card { display: flex; flex-direction: column; gap: 1rem; }
.case-card h3 { margin: 0; overflow-wrap: anywhere; }
.case-card h3 a { color: var(--text); text-decoration: none; }
.case-card h3 a:hover { color: var(--accent); text-decoration: underline; }
.case-card-top { display: flex; align-items: center; justify-content: space-between; }
.case-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--accent-soft); font-size: 1.65rem; color: var(--accent); }
.case-meta { display: grid; gap: .5rem; margin: 0 0 auto; font-size: .8rem; }
.case-meta div { display: flex; gap: .6rem; justify-content: space-between; }
.case-meta dt { color: var(--muted); }
.case-meta dd { margin: 0; text-align: right; overflow-wrap: anywhere; }
.owner-details { border-top: 1px solid var(--border); padding-top: .75rem; }
.empty-state { grid-column: 1 / -1; padding: 3rem; text-align: center; }
.empty-state > span { font-size: 3rem; color: var(--accent); }
.empty-state p { margin-bottom: 0; }
.auth-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(2rem, 8vw, 7rem); max-width: 1000px; margin: 2rem auto; align-items: center; }
.auth-intro h1 { font-size: clamp(2.5rem, 5vw, 4rem); }
.auth-intro > p { max-width: 400px; }
.auth-panel { padding: clamp(1.5rem, 4vw, 2.5rem); }
.auth-panel .stack { margin-block: 1.5rem; }
.network-art { position: relative; width: 250px; height: 145px; margin-block: 2rem; background: linear-gradient(29deg, transparent 49%, var(--border) 49%, var(--border) 50%, transparent 50%), linear-gradient(151deg, transparent 49%, var(--border) 49%, var(--border) 50%, transparent 50%); }
.network-center, .network-dot { position: absolute; border: 5px solid var(--bg); border-radius: 50%; background: var(--accent-soft); }
.network-center { left: 94px; top: 40px; display: grid; place-items: center; width: 66px; height: 66px; color: var(--accent); font-size: 2rem; font-weight: 800; }
.network-dot { width: 30px; height: 30px; background: var(--accent); }
.dot-one { left: 3px; top: 3px; }.dot-two { right: 3px; top: 3px; }.dot-three { right: 3px; bottom: 3px; }
.narrow-page { max-width: 690px; margin-inline: auto; }
.back-link { display: inline-flex; min-height: 40px; align-items: center; font-size: .85rem; text-decoration: none; margin-bottom: 1rem; }
.django-form p { display: grid; gap: .5rem; margin-bottom: 1.25rem; }
.django-form p label { font-size: .9rem; }
.helptext { font-size: .82rem; color: var(--muted); }
.helptext ul { padding-left: 1.2rem; }
.errorlist { list-style: none; padding: .65rem .85rem; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: .85rem; }
.confirmation-panel { padding: clamp(1.5rem, 4vw, 2.5rem); margin-top: 1.5rem; }
.confirmation-panel .actions { margin-top: 2rem; }
.warning-symbol { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 50%; background: var(--danger-soft); color: var(--danger); font-size: 1.8rem; font-weight: 750; margin-bottom: 1.5rem; }
.message-content { white-space: normal; overflow-wrap: anywhere; }
.role-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 2rem; }
.role-guide div { border-left: 3px solid var(--accent); padding-left: 1rem; font-size: .85rem; }
.role-guide strong { display: block; margin-bottom: .3rem; }.role-guide span { color: var(--muted); }
.table-panel { padding: 0; overflow: hidden; }
.table-title { padding: 1.5rem; margin: 0; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; text-align: left; }
th, td { padding: 1rem 1.5rem; border-top: 1px solid var(--border); vertical-align: middle; }
thead th { background: var(--surface-alt); color: var(--muted); font-size: .75rem; font-weight: 700; }
.table-subtitle { display: block; color: var(--muted); font-weight: 400; font-size: .8rem; margin-top: .2rem; }
.editor-page { min-height: 100dvh; }
.editor-page .site-header { min-height: 62px; padding-block: .65rem; }
.editor-main { padding: 0; }
.editor-heading { display: flex; align-items: center; gap: 1rem; padding: .9rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.case-title-field { flex: 1; min-width: 100px; max-width: 600px; }
.case-title-field label { margin-bottom: .25rem; }
.case-title-field input { background: transparent; font-size: 1.1rem; font-weight: 700; padding: .35rem .6rem; min-height: 38px; border-color: transparent; text-overflow: ellipsis; }
.case-title-field input:not(:read-only):hover { border-color: var(--border); }
.save-area { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: flex-end; }
.save-status { font-size: .75rem; color: var(--muted); display: inline-flex; align-items: center; gap: .45rem; }
.save-status::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.save-status[data-state="saved"], .save-status[data-state="readonly"] { color: var(--accent); }
.save-status[data-state="saved"]::before, .save-status[data-state="readonly"]::before { background: var(--accent); }
.save-status[data-state="pending"] { color: var(--warning); }.save-status[data-state="pending"]::before { background: var(--warning); }
.save-status[data-state="error"], .save-status[data-state="conflict"] { color: var(--danger); }.save-status[data-state="error"]::before, .save-status[data-state="conflict"]::before { background: var(--danger); }
.save-status[data-state="saving"]::before, .save-status[data-state="loading"]::before { animation: breathe 1.2s ease-in-out infinite alternate; }
@keyframes breathe { to { opacity: .25; } }
.small-button { min-height: 34px; padding: .4rem .65rem; font-size: .75rem; }
.editor-alert { margin: .8rem 1.2rem; }
.readonly-banner { padding: .5rem 1.2rem; font-size: .8rem; color: var(--accent); background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.editor-toolbar { display: flex; flex-wrap: wrap; gap: .6rem 1rem; padding: .6rem 1.2rem .8rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.tool-group { display: flex; align-items: center; flex-wrap: wrap; gap: .35rem; padding: 0 .8rem 0 0; margin: 0; border: 0; border-right: 1px solid var(--border); }
.tool-group:last-child { border-right: 0; }
.tool-group legend { padding: 0; margin-bottom: .3rem; color: var(--muted); font-size: .65rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.tool-group button { font-size: .74rem; padding: .4rem .6rem; min-height: 38px; }
.relationship-buttons { display: flex; flex-wrap: wrap; gap: .35rem; }
.relationship-buttons svg, .relationship-legend svg { width: 32px; height: 15px; flex-shrink: 0; }
.relationship-buttons button { gap: .3rem; }
.tabs-wrap { background: var(--surface); border-bottom: 1px solid var(--border); }
.service-tabs { display: flex; overflow-x: auto; gap: .35rem; padding: .6rem 1.2rem 0; scrollbar-width: thin; }
.service-tabs button { flex-shrink: 0; border-radius: 9px 9px 0 0; border-bottom: 0; background: transparent; white-space: nowrap; min-height: 42px; font-size: .8rem; }
.service-tabs button[aria-selected="true"] { background: var(--accent-soft); color: var(--accent); border-color: var(--border); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); display: inline-block; flex-shrink: 0; }
.status-dot.state-activo { background: #198154; }.status-dot.state-espera { background: #aa6500; }.status-dot.state-cerrado { background: #71818a; }
.map-info { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; padding: .5rem 1.2rem; background: var(--surface); border-bottom: 1px solid var(--border); }
.map-hint { font-size: .75rem; color: var(--muted); margin: 0; }
.canvas-wrap { position: relative; overflow: hidden; background: var(--bg); }
#map-canvas { display: block; width: 100%; height: clamp(360px, 60dvh, 850px); touch-action: none; user-select: none; background-image: radial-gradient(var(--border) .8px, transparent .8px); background-size: 22px 22px; }
#map-canvas.pan-mode { cursor: grab; }#map-canvas.pan-mode:active { cursor: grabbing; }
#map-canvas.link-mode { cursor: crosshair; }
.map-node { cursor: pointer; }.editable-map .map-node { cursor: move; }.link-mode .map-node { cursor: crosshair; }
.map-node .node-shape { stroke-width: 1.8; }
.map-node.node-selected .node-shape, .map-node.node-origin .node-shape { stroke: var(--focus); stroke-width: 3.5; }
.map-node:focus-visible { outline: none; }.map-node:focus-visible .node-shape { stroke: var(--focus); stroke-width: 3.5; stroke-dasharray: 3 2; }
.node-shape.person-shape { fill: var(--surface); stroke: var(--text); }
.node-shape.case-shape { fill: #f5dc71; stroke: #725a11; }
.node-shape.service-shape { fill: #deecff; stroke: #235b92; }
.node-shape.entity-shape { fill: #f8dfeb; stroke: #90375f; }
.node-shape.zone-shape { fill: none; stroke: #198154; stroke-width: 1.8; stroke-dasharray: 3 5; pointer-events: stroke; }
.node-label { fill: var(--text); font-size: 12px; text-anchor: middle; pointer-events: none; }
.case-label { fill: #392e0c; font-weight: 700; }
.zone-label { fill: #198154; text-anchor: start; font-weight: 600; pointer-events: auto; }
.resize-handle { fill: #198154; stroke: var(--surface); stroke-width: 2; cursor: nwse-resize; }
.node-hit { fill: transparent; stroke: none; }
.node-state { stroke: var(--surface); stroke-width: 1.5; fill: #71818a; }
.node-state.state-activo { fill: #198154; }.node-state.state-espera { fill: #aa6500; }.node-state.state-cerrado { fill: #71818a; }
.edge-style { fill: none; stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.relation-fam { stroke: #647580; }.relation-fuerte { stroke: #198154; stroke-width: 1.6; }
.relation-conf { stroke: #bc3446; }.relation-muy { stroke: #bc3446; stroke-dasharray: 5 3; stroke-width: 1.6; }
.relation-rup { stroke: #bc3446; }.relation-coord { stroke: #637883; stroke-dasharray: 2 4; }.relation-deb { stroke: #82949c; stroke-dasharray: 7 4; }
.edge-hit { fill: none; stroke: transparent; stroke-width: 20; pointer-events: stroke; cursor: pointer; }
.edge-selection { stroke: var(--focus); stroke-width: 12; opacity: .22; pointer-events: none; }
.map-edge:focus-visible { outline: none; }.map-edge:focus-visible .edge-hit { stroke: var(--focus); opacity: .25; }
.edge-label { fill: var(--muted); font-size: 11px; text-anchor: middle; pointer-events: none; paint-order: stroke; stroke: var(--bg); stroke-width: 4; stroke-linejoin: round; }
.edge-direction { fill: none; stroke-width: 1.8; pointer-events: none; }
.map-empty { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); width: min(85%, 380px); text-align: center; pointer-events: none; color: var(--muted); }
.map-empty > span { display: block; color: var(--accent); font-size: 3rem; }.map-empty strong { display: block; color: var(--text); }.map-empty p { font-size: .85rem; margin-top: .5rem; }
.view-controls { position: absolute; right: max(1rem, env(safe-area-inset-right)); bottom: 1rem; display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; padding: .35rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); max-width: calc(100% - 2rem); }
.view-controls button { min-height: 40px; padding: .4rem .65rem; }.view-controls output { min-width: 50px; text-align: center; font-size: .75rem; }
.map-legend { padding: .6rem 1.2rem; background: var(--surface); border-top: 1px solid var(--border); }
.map-legend summary { font-size: .75rem; color: var(--muted); }.map-legend p { margin-bottom: .5rem; margin-top: 1rem; }
.legend-grid, .relationship-legend { display: flex; flex-wrap: wrap; gap: .7rem 1.5rem; font-size: .75rem; margin-bottom: 1rem; }.relationship-legend > span { display: inline-flex; gap: .5rem; align-items: center; }
.service-panel { padding: 1.5rem; max-width: 1100px; margin-inline: auto; }
.service-panel .panel { margin-bottom: 1.2rem; }.service-panel h2 { margin-bottom: 1rem; }.service-panel textarea { min-height: 100px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.field-wide { grid-column: 1 / -1; }
.field-grid label { align-content: start; }.field-grid label > span { overflow-wrap: anywhere; }
.checkbox-field { display: flex; align-items: center; gap: .6rem; }
.service-panel .service-name { font-size: 1.2rem; font-weight: 700; }
.service-status { font-size: .8rem; color: var(--muted); margin-bottom: 1rem; }
dialog { width: min(660px, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.5rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 18px; box-shadow: 0 20px 80px rgb(0 0 0 / 25%); overscroll-behavior: contain; }
dialog::backdrop { background: rgb(10 28 39 / 60%); }
.dialog-heading { display: flex; gap: 1rem; justify-content: space-between; align-items: start; margin-bottom: 1.3rem; }.dialog-heading h2 { margin: 0; overflow-wrap: anywhere; }.dialog-heading .eyebrow { margin-bottom: .3rem; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; margin-top: 1.5rem; }.confirm-dialog { max-width: 490px; }
.editor-dialog .notice { margin-top: 1rem; }.editor-dialog form { margin: 0; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #101d26; --surface: #182a34; --surface-alt: #213742; --text: #e4edf1; --muted: #acbec8; --border: #3b535f; --accent: #77d6bd; --accent-hover: #a0e6d3; --accent-soft: #163d36; --danger: #ff9aaa; --danger-soft: #44242d; --warning: #f2cc7d; --warning-soft: #3f3420; --focus: #9bbfff; --shadow: 0 8px 28px rgb(0 0 0 / 10%); }
  .primary, button[aria-pressed="true"], .brand-mark { color: #0e2922; }
  .primary:hover:not(:disabled), button[aria-pressed="true"]:hover:not(:disabled) { color: #0e2922; }
  .danger.solid { color: #3f111c; }.danger.solid:hover:not(:disabled) { background: #ffb6c2; color: #3f111c; }
  .zone-label { fill: #71d2a0; }.node-shape.zone-shape { stroke: #71d2a0; }.resize-handle { fill: #71d2a0; }
  .relation-fam, .relation-coord { stroke: #a0b6c2; }.relation-fuerte { stroke: #71d2a0; }.relation-conf, .relation-muy, .relation-rup { stroke: #ff92a4; }.relation-deb { stroke: #9eafb6; }
  .status-dot.state-activo { background: #71d2a0; }.status-dot.state-espera { background: #f2cc7d; }.status-dot.state-cerrado { background: #aab9c1; }
  .node-state.state-activo { fill: #71d2a0; }.node-state.state-espera { fill: #f2cc7d; }.node-state.state-cerrado { fill: #aab9c1; }
}
@media (max-width: 1000px) {
  .creation-grid { grid-template-columns: 1fr 1fr; }.demo-card { grid-column: 1 / -1; }
  .site-header { align-items: flex-start; }.account-name { display: none; }
  .editor-heading { flex-wrap: wrap; }.save-area { max-width: 300px; }
  .relationship-buttons { max-width: 650px; }
}
@media (max-width: 640px) {
  .page-width { width: calc(100% - 2rem); }.main-content { padding-block: 1.5rem 2rem; }
  .site-header { padding: .85rem 1rem; gap: .7rem; flex-wrap: wrap; }.main-nav { width: 100%; justify-content: flex-start; gap: .2rem .8rem; }.main-nav > a, .main-nav .button { font-size: .75rem; }
  .main-nav form { margin-left: auto; }.brand small { display: none; }
  .page-heading { align-items: flex-start; flex-wrap: wrap; margin-bottom: 1.5rem; }
  .panel { padding: 1.15rem; border-radius: 12px; }.creation-grid { grid-template-columns: 1fr; }.demo-card { grid-column: auto; }
  .auth-layout { grid-template-columns: 1fr; margin-top: 0; gap: 1.5rem; }.auth-intro h1 { font-size: 2.4rem; }.auth-intro .network-art, .auth-intro > .muted { display: none; }
  .role-guide { grid-template-columns: 1fr; gap: 1rem; }.table-panel { padding: 0; }th, td { padding: .8rem 1rem; }
  .editor-heading { gap: .4rem .7rem; padding: .75rem .8rem; }.back-to-cases span { display: none; }.back-to-cases { padding-inline: .5rem; }.case-title-field { max-width: none; }.save-area { width: 100%; max-width: none; justify-content: flex-start; margin-left: 0; }
  .editor-toolbar { padding: .5rem .8rem; gap: .65rem; }.tool-group { padding-right: .4rem; }.tool-group button { min-height: 44px; font-size: .72rem; }.relationship-buttons { gap: .3rem; }
  .service-tabs { padding-inline: .8rem; }.service-tabs button { min-height: 44px; }.map-info { padding-inline: .8rem; }.map-hint { max-width: 100%; }
  #map-canvas { height: 56dvh; min-height: 370px; }.view-controls { right: .65rem; bottom: .65rem; }.view-controls button { min-height: 44px; }
  .service-panel { padding: 1rem; }.field-grid { grid-template-columns: 1fr; }.field-wide { grid-column: auto; }
  dialog { padding: 1.15rem; width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); border-radius: 12px; }.dialog-actions > button { flex: 1 1 auto; }
  .site-footer { font-size: .7rem; }.map-legend { padding-inline: .8rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { button, .button, input, textarea, select { border: 1px solid ButtonText; }.node-shape { fill: Canvas !important; stroke: CanvasText !important; }.node-label, .zone-label { fill: CanvasText; }.edge-style, .edge-direction { stroke: CanvasText; }.node-selected .node-shape { stroke: Highlight !important; }.save-status::before, .status-dot { border: 1px solid CanvasText; } }