:root {
  color-scheme: light;
  --blue: #0d48e8;
  --blue-dark: #0834b0;
  --blue-soft: #e9efff;
  --yellow: #ffc928;
  --green: #26a765;
  --red: #f0442d;
  --paper: #f7f6f2;
  --white: #fff;
  --ink: #17191f;
  --muted: #747983;
  --line: #e1e4e9;
  --shadow: 0 14px 34px rgba(24, 41, 84, .1);
  font-family: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Hiragino Sans", "Yu Gothic", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .38; }
a { color: inherit; text-decoration: none; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 244px; min-height: 100vh; flex: 0 0 244px; display: flex; flex-direction: column; padding: 30px 18px 18px; background: var(--blue); color: #fff; }
.brand { display: inline-flex; align-items: center; gap: 9px; color: inherit; }
.brand-logo { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; object-fit: cover; object-position: 50% 55%; filter: grayscale(1) contrast(1.35) invert(1); }
.brand strong { display: block; font-size: 19px; font-weight: 850; letter-spacing: .06em; }
.brand small { display: block; margin-top: 3px; color: rgba(255,255,255,.66); font-size: 8px; letter-spacing: .13em; }
.sidebar .brand { padding: 0 10px; }
.sidebar-new { width: 100%; margin-top: 38px; border: 0; border-radius: 999px; padding: 14px 16px; background: #fff; color: var(--blue); font-size: 13px; font-weight: 800; box-shadow: 0 8px 18px rgba(0,0,0,.12); }
.sidebar-new:hover { background: #f2f5ff; transform: translateY(-1px); }
.nav-links { display: grid; gap: 4px; margin-top: 29px; }
.nav-link, .settings-button { display: flex; align-items: center; gap: 12px; width: 100%; border: 0; border-radius: 12px; padding: 11px 13px; background: transparent; color: rgba(255,255,255,.92); text-align: left; transition: .16s ease; }
.nav-link span, .settings-button span { width: 19px; color: currentColor; font-size: 13px; text-align: center; }
.nav-link:hover, .settings-button:hover { background: rgba(255,255,255,.13); }
.nav-link.is-active { background: rgba(255,255,255,.18); color: #fff; font-weight: 800; }
.settings-button { margin-top: auto; color: #fff; }

.main-content { display: flex; flex: 1; min-width: 0; }
.view { width: 100%; min-width: 0; padding: 18px 30px 24px; }
.mobile-header, .mobile-nav { display: none; }
.workspace-page { display: grid; grid-template-columns: minmax(0, 1fr) 315px; gap: 21px; min-height: calc(100vh - 42px); }
.map-shell { min-width: 0; display: flex; flex-direction: column; }
.map-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; min-height: 65px; padding: 5px 3px 13px; }
.map-header > div:first-child { min-width: 0; flex: 1; }
.map-header h1 { max-width: 100%; margin: 8px 0 0; overflow: hidden; font-size: clamp(22px, 2.5vw, 34px); font-weight: 800; letter-spacing: -.045em; text-overflow: ellipsis; white-space: nowrap; }
.map-header-actions { display: flex; align-items: center; gap: 9px; }
.eyebrow { color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.canvas-surface { position: relative; flex: 1; min-height: calc(100vh - 112px); overflow: hidden; background: transparent; outline: none; touch-action: none; }
.canvas-surface:focus-visible { box-shadow: 0 0 0 3px rgba(13,72,232,.2); }
.canvas-surface::before, .canvas-surface::after { content: ""; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--ink); opacity: .72; box-shadow: 17px 0 var(--ink), 34px 0 var(--ink), 0 17px var(--ink), 17px 17px var(--ink), 34px 17px var(--ink), 0 34px var(--ink), 17px 34px var(--ink), 34px 34px var(--ink); }
.canvas-surface::before { top: 29px; right: 28px; }
.canvas-surface::after { bottom: 37px; left: 32px; transform: scale(.7); opacity: .35; }
.canvas-surface.is-dragging { cursor: grabbing; }
.canvas-surface[data-mode="pan"] { cursor: grab; }
.canvas-hint { position: absolute; top: 19px; left: 22px; z-index: 2; color: var(--muted); font-size: 10px; }
.canvas-toolbar { position: absolute; right: 20px; bottom: 20px; z-index: 5; display: flex; align-items: center; gap: 4px; padding: 7px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.96); box-shadow: 0 8px 18px rgba(20,30,60,.08); }
.tool-button { display: grid; place-items: center; min-width: 32px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--ink); font-size: 13px; }
.tool-button:hover, .tool-button.is-active { background: var(--blue-soft); color: var(--blue); }
.tool-button[data-action="fit-map"] { width: auto; padding: 0 10px; border-radius: 999px; font-size: 10px; }
.toolbar-divider { width: 1px; height: 20px; margin: 0 4px; background: var(--line); }
.zoom-label { min-width: 43px; color: var(--muted); font-size: 10px; text-align: center; }
.map-world { position: absolute; top: 50%; left: 50%; width: 1px; height: 1px; transform-origin: center; transition: transform .12s ease-out; }
.canvas-surface.is-dragging .map-world { transition: none; }
.map-edge { position: absolute; z-index: 1; height: 2px; transform-origin: left center; background: #191b21; pointer-events: none; }
.canvas-node { position: absolute; z-index: 3; display: grid; align-content: center; justify-items: center; width: 144px; height: 144px; transform: translate(-50%, -50%); border: 0; border-radius: 50%; padding: 20px; background: var(--blue); color: #fff; text-align: center; box-shadow: 0 9px 17px rgba(23,31,54,.12); transition: box-shadow .16s ease, outline .16s ease; }
.canvas-node:hover { box-shadow: 0 14px 26px rgba(23,31,54,.2); }
.canvas-node.is-selected { outline: 4px solid rgba(13,72,232,.2); outline-offset: 5px; }
.canvas-node.is-root { width: 190px; height: 190px; padding: 28px; }
.canvas-node.color-blue { background: var(--blue); color: #fff; }
.canvas-node.color-yellow { background: var(--yellow); color: #17191f; }
.canvas-node.color-green { background: var(--green); color: #fff; }
.canvas-node.color-red { background: var(--red); color: #fff; }
.canvas-node.color-neutral { border: 1px solid #bdc1c8; background: #fff; color: var(--ink); }
.canvas-node.is-due { outline-color: rgba(240,68,45,.36); }
.node-kind { margin-bottom: 8px; font-size: 9px; font-weight: 800; letter-spacing: .13em; opacity: .74; }
.canvas-node strong { max-width: 100%; overflow: hidden; font-size: 13px; line-height: 1.5; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4; }
.canvas-node.is-root strong { font-size: 17px; }
.canvas-node small { margin-top: 8px; font-size: 9px; opacity: .75; }
.map-empty-orbit { position: absolute; z-index: 3; top: 0; left: 0; display: grid; place-items: center; width: 170px; height: 170px; transform: translate(-50%, -50%); border: 1px dashed var(--blue); border-radius: 50%; background: #fff; color: var(--blue); text-align: center; }
.map-empty-orbit span { display: grid; place-items: center; width: 31px; height: 31px; border: 1px solid currentColor; border-radius: 50%; font-size: 18px; }
.map-empty-orbit strong { font-size: 14px; }
.map-empty-orbit small { color: var(--muted); font-size: 10px; }
.canvas-add { position: absolute; right: 22px; top: 22px; z-index: 3; border: 1px solid var(--blue); border-radius: 999px; padding: 9px 13px; background: #fff; color: var(--blue); font-size: 11px; font-weight: 800; }
.canvas-add:hover { background: var(--blue-soft); }

.inspector { min-width: 0; align-self: stretch; overflow: auto; border-left: 1px solid var(--line); padding: 9px 0 20px 22px; }
.inspector-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 4px 2px 18px; }
.inspector-header h2 { margin: 7px 0 0; font-size: 19px; letter-spacing: -.035em; }
.focus-badge { border-radius: 999px; padding: 5px 7px; background: var(--blue-soft); color: var(--blue); font-size: 8px; font-weight: 800; letter-spacing: .1em; }
.inspector-tabs { display: flex; gap: 20px; border-bottom: 1px solid var(--line); }
.inspector-tabs button { position: relative; border: 0; padding: 0 2px 11px; background: transparent; color: var(--muted); font-size: 11px; }
.inspector-tabs button.is-active { color: var(--ink); font-weight: 800; }
.inspector-tabs button.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--blue); }
.inspector-section { padding-top: 22px; }
.inspector-question-status { display: flex; align-items: center; gap: 8px; font-size: 10px; font-weight: 800; }
.color-dot { display: inline-block; width: 9px; height: 9px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }
.color-blue { --dot-color: var(--blue); }
.color-yellow { --dot-color: var(--yellow); }
.color-green { --dot-color: var(--green); }
.color-red { --dot-color: var(--red); }
.color-neutral { --dot-color: #a5aab3; }
.color-dot.color-blue, .color-dot.color-yellow, .color-dot.color-green, .color-dot.color-red, .color-dot.color-neutral { background: var(--dot-color); }

/* Public entry: explain the practice before asking for an account. */
.landing-page { min-height: 100vh; padding: 0 clamp(20px, 5vw, 76px); background: var(--paper); }
.landing-header { display: flex; align-items: center; justify-content: space-between; max-width: 1180px; margin: 0 auto; border-bottom: 1px solid var(--line); padding: 25px 0 21px; }
.landing-brand { display: inline-flex; align-items: center; gap: 10px; }
.landing-brand img { width: 35px; height: 35px; border-radius: 50%; object-fit: cover; filter: grayscale(1) contrast(1.35); }
.landing-brand strong { display: block; color: var(--ink); font-size: 16px; letter-spacing: .08em; }
.landing-brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 7px; letter-spacing: .16em; }
.landing-hero { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); align-items: center; gap: clamp(50px, 10vw, 150px); max-width: 1180px; min-height: min(690px, calc(100vh - 85px)); margin: 0 auto; padding: 70px 0 90px; }
.landing-copy { max-width: 720px; }
.landing-copy > .eyebrow { color: var(--blue); font-size: 12px; letter-spacing: .06em; }
.landing-copy h1 { margin: 18px 0 22px; font-size: clamp(43px, 6.4vw, 82px); line-height: 1.2; letter-spacing: -.07em; }
.landing-copy h1 em { color: var(--blue); font-style: normal; }
.landing-copy > p { max-width: 560px; margin: 0; color: var(--muted); font-size: 16px; line-height: 2; }
.landing-actions { display: flex; align-items: center; gap: 14px; margin-top: 34px; }
.landing-actions .primary-button { min-height: 52px; padding: 0 24px; font-size: 14px; }
.landing-actions > span { color: var(--muted); font-size: 12px; }
.landing-signal { display: grid; gap: 0; border-left: 1px solid #c8cdd6; padding-left: 28px; }
.landing-signal > div { display: grid; grid-template-columns: 35px 1fr; column-gap: 13px; padding: 18px 0; }
.landing-signal span { grid-row: span 2; color: var(--blue); font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.landing-signal strong { font-size: 22px; letter-spacing: -.04em; }
.landing-signal small { margin-top: 5px; color: var(--muted); font-size: 13px; }
.landing-signal i { display: block; width: 1px; height: 30px; margin-left: 4px; background: var(--line); }
.landing-principles { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(45px, 9vw, 130px); max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--line); padding: 70px 0 90px; }
.landing-principles h2 { margin: 14px 0 0; font-size: clamp(28px, 4vw, 47px); line-height: 1.35; letter-spacing: -.06em; }
.landing-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.landing-steps article { border-top: 3px solid var(--blue); padding-top: 16px; }
.landing-steps article > span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .1em; }
.landing-steps h3 { margin: 23px 0 11px; font-size: 19px; }
.landing-steps p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.8; }
.landing-note { display: flex; align-items: center; justify-content: space-between; gap: 24px; max-width: 1180px; margin: 0 auto; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 28px 0; }
.landing-note p { flex: 1; margin: 0; font-size: 16px; line-height: 1.7; }
.landing-footer { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; max-width: 1180px; margin: 0 auto; padding: 25px 0 30px; color: var(--muted); }
.landing-footer span { color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .13em; }
.landing-footer small { font-size: 10px; }
.inspector-question-text { margin: 17px 0 20px; font-size: 20px; font-weight: 800; line-height: 1.5; letter-spacing: -.035em; overflow-wrap: anywhere; white-space: pre-wrap; }
.inspector-facts { display: grid; gap: 10px; margin: 0; padding: 15px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.inspector-facts div { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; }
.inspector-facts dt { color: var(--muted); }
.inspector-facts dd { margin: 0; text-align: right; }
.inspector-understanding { margin: 17px 0; padding: 14px; border-left: 3px solid var(--green); background: #eef8f2; }
.inspector-understanding span { color: var(--green); font-size: 9px; font-weight: 800; }
.inspector-understanding p { margin: 8px 0 0; font-size: 12px; line-height: 1.7; }
.inspector-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 18px; }
.inspector-actions .primary-button, .inspector-actions .secondary-button { min-height: 36px; padding: 0 12px; font-size: 10px; }
.inspector-actions .text-button { margin: 5px 5px 0 0; font-size: 10px; }
.danger-text { color: var(--red); }
.node-settings { display: grid; gap: 11px; margin-top: 23px; padding-top: 17px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.node-settings > div { display: flex; gap: 8px; }
.inspector .section-heading { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.inspector .section-heading h3 { margin: 0; font-size: 12px; }
.inspector .section-heading span { color: var(--muted); font-size: 10px; }
.inspector-node { display: flex; align-items: center; gap: 9px; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 12px 2px; background: transparent; color: var(--ink); text-align: left; }
.inspector-node > span:nth-child(2) { display: grid; gap: 4px; flex: 1; min-width: 0; }
.inspector-node strong { font-size: 10px; }
.inspector-node small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.inspector-node:hover { color: var(--blue); }
.inspector-muted { color: var(--muted); font-size: 11px; line-height: 1.7; }
.inspector-record .timeline { margin: 0; border-top: 0; }
.inspector-record .timeline-item { grid-template-columns: 60px 1fr; gap: 8px; padding: 14px 0; }
.inspector-record .timeline-body { font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; white-space: pre-wrap; }
.inspector-record .timeline-type { font-size: 8px; }
.inspector-record .source-title { font-size: 11px; }
.inspector-empty { display: grid; align-content: center; justify-items: start; padding-right: 25px; color: var(--muted); }
.inspector-home { align-content: start; padding-right: 2px; }
.inspector-lead { display: grid; grid-template-columns: 10px 1fr auto; align-items: center; gap: 10px; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 8px 2px 18px; background: transparent; color: var(--ink); text-align: left; }
.inspector-lead:hover { color: var(--blue); }
.lead-marker { width: 10px; height: 10px; border-radius: 50%; background: var(--dot-color); }
.inspector-lead > span:nth-child(2) { display: grid; gap: 6px; min-width: 0; }
.inspector-lead strong { font-size: 14px; line-height: 1.55; }
.inspector-lead small { color: var(--muted); font-size: 10px; }
.home-inspector-section { padding-top: 27px; }
.inspector-stat-row { display: flex; justify-content: space-between; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.inspector-stat-row strong { color: var(--ink); font-size: 12px; }
.home-empty-copy { padding: 21px 0 4px; }
.home-empty-copy h2 { margin: 17px 0 5px; color: var(--ink); font-size: 18px; }
.home-empty-copy p { margin: 0 0 18px; font-size: 11px; line-height: 1.8; }
.inspector-empty h2 { margin: 18px 0 5px; color: var(--ink); font-size: 18px; }
.inspector-empty p { margin: 0 0 18px; font-size: 11px; line-height: 1.8; }
.inspector-orbit { display: grid; place-items: center; width: 76px; height: 76px; border: 1px dashed var(--blue); border-radius: 50%; color: var(--blue); font-size: 23px; }
.child-record { padding: 18px 2px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.8; }
.child-record p { margin: 0; white-space: pre-wrap; }
.child-record strong { display: block; margin-bottom: 10px; }
.inspector-parent { width: 100%; border: 0; padding: 17px 2px; background: transparent; color: var(--blue); text-align: left; font-size: 11px; }

.search-page { max-width: 850px; padding: 20px 4px; }
.search-header { max-width: 700px; margin-bottom: 34px; }
.search-header h1 { margin: 8px 0 0; font-size: 38px; letter-spacing: -.045em; }
.search-header p { margin: 8px 0 0; color: var(--muted); font-size: 12px; }
.search-input-wrap { position: relative; margin-top: 22px; }
.search-input { width: 100%; height: 52px; border: 1px solid var(--line); border-radius: 12px; outline: none; padding: 0 16px 0 42px; background: var(--white); color: var(--ink); }
.search-input:focus, .field:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(13,72,232,.12); }
.search-input-wrap::before { content: "⌕"; position: absolute; top: 12px; left: 15px; z-index: 1; color: var(--muted); font-size: 22px; }
.search-results { border-top: 1px solid var(--line); }
.search-result { display: block; width: 100%; border: 0; border-bottom: 1px solid var(--line); padding: 17px 2px; background: transparent; text-align: left; }
.search-result:hover { padding-left: 8px; color: var(--blue); }
.search-result-top { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 10px; }
.search-result h3 { margin: 8px 0 5px; font-size: 17px; }
.search-result p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.highlight { background: #fff0ab; }
.empty-state { padding: 25px 20px; border: 1px dashed #cbd1dd; color: var(--muted); font-size: 12px; line-height: 1.8; }
.empty-state strong { display: block; margin-bottom: 5px; color: var(--ink); font-size: 15px; }
.seo-home { max-width: 760px; margin: 0 auto; padding: 16vh 0 18vh; }
.seo-home h1 { margin: 18px 0 22px; color: var(--ink); font-size: clamp(42px, 7vw, 84px); line-height: 1.18; letter-spacing: -.07em; }
.seo-home h1 em { color: var(--blue); font-style: normal; }
.seo-home p { max-width: 600px; margin: 0 0 14px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.seo-home a { color: var(--blue); font-weight: 800; }

.primary-button, .secondary-button, .danger-button, .text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 40px; border-radius: 999px; padding: 0 15px; font-size: 11px; font-weight: 800; transition: .16s ease; }
.primary-button { border: 1px solid var(--blue); background: var(--blue); color: #fff; }
.primary-button:hover { background: var(--blue-dark); border-color: var(--blue-dark); }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.secondary-button:hover { border-color: var(--blue); color: var(--blue); }
.danger-button { border: 1px solid #f0c7c0; background: #fff3f1; color: #b73625; }
.text-button { min-height: auto; border: 0; padding: 4px 0; background: transparent; color: var(--blue); }
.icon-button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 50%; background: #fff; color: var(--ink); }
.icon-button:hover { border-color: var(--blue); color: var(--blue); }

.modal-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(12,25,62,.32); }
.modal { width: min(560px, 100%); max-height: min(750px, 92vh); overflow: auto; padding: 27px; background: #fff; box-shadow: 0 24px 70px rgba(20,30,60,.2); }
.modal h2 { margin: 0 0 8px; font-size: 25px; }
.modal-intro { margin: 0 0 21px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.modal-close { float: right; width: 30px; height: 30px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); font-size: 23px; }
.modal-close:hover { background: var(--blue-soft); color: var(--blue); }
.form-grid { display: grid; gap: 17px; }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.field { display: block; width: 100%; border: 1px solid var(--line); border-radius: 9px; outline: none; padding: 12px 13px; background: #fbfcff; color: var(--ink); line-height: 1.65; }
textarea.field { min-height: 145px; resize: vertical; }
textarea.field.short { min-height: 100px; }
input.field { height: 44px; }
select.field { height: 44px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 23px; }
.error-message { min-height: 15px; margin: 8px 0 -4px; color: #b73625; font-size: 11px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-bottom: 18px; }
.preset-button { min-height: 58px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink); font-size: 11px; }
.preset-button:hover, .preset-button.is-selected { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.preset-button strong { display: block; margin-bottom: 3px; font-size: 13px; }
.settings-list { display: grid; gap: 12px; margin-top: 22px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.settings-row strong { display: block; font-size: 12px; }
.settings-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.6; }
.button-row { display: flex; gap: 7px; }
.privacy-note { margin-top: 24px; padding: 15px; background: var(--blue-soft); color: var(--blue-dark); font-size: 11px; line-height: 1.7; }
.toast-root { position: fixed; right: 22px; bottom: 22px; z-index: 30; display: grid; gap: 8px; }
.toast { padding: 12px 16px; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); font-size: 11px; }

@media (max-width: 1120px) {
  .sidebar { width: 218px; flex-basis: 218px; }
  .workspace-page { grid-template-columns: minmax(0, 1fr) 280px; }
  .canvas-node { width: 126px; height: 126px; padding: 17px; }
  .canvas-node.is-root { width: 170px; height: 170px; }
}
@media (max-width: 780px) {
  .app-shell { display: block; padding-bottom: 68px; }
  .sidebar { display: none; }
  .main-content { display: block; min-height: 100vh; }
  .mobile-header { display: flex; align-items: center; justify-content: space-between; padding: 17px 19px 0; }
  .mobile-header .brand { color: var(--ink); }
  .mobile-header .brand-logo { width: 29px; height: 29px; filter: grayscale(1) contrast(1.35); }
  .mobile-header .brand strong { font-size: 14px; }
  .mobile-header .brand small { color: var(--muted); font-size: 7px; }
  .view { padding: 22px 13px 32px; }
  .workspace-page { display: block; min-height: 0; }
  .map-header { min-height: 65px; padding: 0 3px 14px; }
  .map-header h1 { max-width: 55vw; font-size: 21px; }
  .map-header .icon-button { width: 34px; height: 34px; }
  .map-header .secondary-button { min-height: 34px; padding: 0 10px; font-size: 9px; }
  .canvas-surface { min-height: 570px; }
  .canvas-toolbar { right: 9px; bottom: 9px; }
  .canvas-hint { top: 14px; left: 13px; font-size: 9px; }
  .canvas-node { width: 112px; height: 112px; padding: 13px; }
  .canvas-node.is-root { width: 148px; height: 148px; padding: 20px; }
  .canvas-node strong { font-size: 10px; }
  .canvas-node.is-root strong { font-size: 13px; }
  .inspector { margin-top: 16px; border-top: 1px solid var(--line); border-left: 0; padding: 20px 4px 25px; }
  .inspector-empty { min-height: 210px; }
  .mobile-nav { position: fixed; right: 0; bottom: 0; left: 0; z-index: 6; display: flex; justify-content: space-around; padding: 8px 24px max(8px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.97); }
  .mobile-nav .nav-link { display: grid; justify-items: center; gap: 3px; width: auto; padding: 5px 20px; color: var(--muted); font-size: 10px; }
  .mobile-nav .nav-link.is-active { background: var(--blue-soft); color: var(--blue); }
  .search-page { padding: 12px 4px; }
  .settings-row { align-items: flex-start; flex-direction: column; }
  .landing-page { padding: 0 18px; }
  .landing-header { padding: 19px 0 16px; }
  .landing-hero { display: block; min-height: auto; padding: 70px 0 66px; }
  .landing-copy h1 { font-size: clamp(40px, 11vw, 56px); }
  .landing-copy > p { font-size: 14px; line-height: 1.9; }
  .landing-actions { align-items: flex-start; flex-direction: column; }
  .landing-actions .primary-button { width: 100%; }
  .landing-actions > span { padding-left: 4px; }
  .landing-signal { margin-top: 62px; padding-left: 19px; }
  .landing-signal strong { font-size: 20px; }
  .landing-principles { display: block; padding: 55px 0 66px; }
  .landing-steps { grid-template-columns: 1fr; gap: 30px; margin-top: 38px; }
  .landing-steps h3 { margin-top: 14px; }
  .landing-note { align-items: flex-start; flex-direction: column; padding: 25px 0; }
  .landing-note p { font-size: 14px; }
  .landing-footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}
@media (max-width: 410px) {
  .preset-grid { grid-template-columns: 1fr; }
  .modal-actions { justify-content: stretch; }
  .modal-actions button { flex: 1; }
  .canvas-surface { min-height: 520px; }
  .canvas-node { width: 96px; height: 96px; padding: 10px; }
  .canvas-node.is-root { width: 130px; height: 130px; }
  .canvas-node.is-root strong { font-size: 11px; }
  .node-kind, .canvas-node small { font-size: 8px; }
}

/* Thought-first experience */
button:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(13,72,232,.28);
  outline-offset: 3px;
}

.content-page, .detail-page { width: min(100%, 1040px); margin: 0 auto; padding: 34px 28px 70px; }
.page-header { max-width: 760px; margin-bottom: 38px; }
.page-header h1 { margin: 10px 0 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.13; letter-spacing: -.055em; }
.page-header p { max-width: 620px; margin: 15px 0 0; color: var(--muted); font-size: 15px; line-height: 1.8; }

.today-new-question { display: flex; align-items: center; gap: 16px; width: min(100%, 620px); min-height: 74px; border: 1px solid rgba(13,72,232,.2); border-radius: 18px; padding: 13px 18px; background: var(--blue-soft); color: var(--blue-dark); text-align: left; }
.today-new-question > span:first-child { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); color: #fff; font-size: 23px; }
.today-new-question strong { font-size: 16px; }
.today-new-question:hover { border-color: var(--blue); }

.question-section { margin-top: 52px; }
.due-section { margin-top: 44px; }
.section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 14px; }
.section-title h2 { margin: 7px 0 0; font-size: 22px; letter-spacing: -.035em; }
.section-title > span, .index-actions > span { color: var(--muted); font-size: 13px; }
.question-list { display: grid; }
.question-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; align-items: center; gap: 16px; width: 100%; min-height: 94px; border: 0; border-bottom: 1px solid var(--line); padding: 18px 5px; background: transparent; color: var(--ink); text-align: left; }
.question-row:hover { color: var(--blue); }
.question-row-marker { width: 11px; height: 11px; border-radius: 50%; background: var(--dot-color); }
.question-row-main { display: grid; gap: 7px; min-width: 0; }
.question-row-main strong { font-size: 17px; line-height: 1.55; }
.question-row-main small { color: var(--muted); font-size: 13px; line-height: 1.5; }
.question-row-main > span { overflow: hidden; color: #505660; font-size: 14px; line-height: 1.55; text-overflow: ellipsis; white-space: nowrap; }
.question-row-arrow { color: var(--muted); font-size: 25px; }
.index-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.clean-empty { border-width: 0 0 1px; padding: 34px 5px; background: transparent; font-size: 14px; }

.detail-page { width: min(100%, 1180px); }
.detail-header { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto; align-items: start; gap: 26px; border-bottom: 1px solid var(--line); padding-bottom: 34px; }
.detail-back { min-height: 44px; border: 0; padding: 0; background: transparent; color: var(--blue); font-size: 14px; text-align: left; }
.detail-heading { max-width: 760px; }
.detail-heading h1 { margin: 14px 0 0; font-size: clamp(32px, 4vw, 50px); line-height: 1.32; letter-spacing: -.05em; overflow-wrap: anywhere; }
.detail-heading > p { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
.detail-status { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; }
.detail-status .color-dot, .inspector-question-status .color-dot { background: var(--dot-color); }
.detail-layout { display: grid; grid-template-columns: minmax(0, 760px) 250px; justify-content: space-between; gap: 60px; padding-top: 42px; }
.detail-main { min-width: 0; }
.current-understanding { border-left: 4px solid var(--green); padding: 6px 0 8px 22px; }
.current-understanding h2 { margin: 8px 0 0; font-size: 18px; }
.current-understanding p { margin: 12px 0 0; font-size: 16px; line-height: 1.9; white-space: pre-wrap; }
.quick-thought { display: grid; gap: 12px; margin-top: 34px; }
.quick-thought label { font-size: 15px; font-weight: 800; }
.quick-thought textarea { width: 100%; min-height: 132px; border: 1px solid #cfd4dd; border-radius: 14px; outline: none; padding: 16px; background: rgba(255,255,255,.72); color: var(--ink); font-size: 16px; line-height: 1.7; resize: vertical; }
.quick-thought textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(13,72,232,.12); }
.quick-thought > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.quick-thought .error-message { flex: 1; }
.mobile-detail-actions { display: none; }
.thought-journey { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 42px; }
.thought-journey > div { display: grid; gap: 6px; border-top: 3px solid #cfd4dd; padding: 14px 12px 0 0; opacity: .55; }
.thought-journey > div.is-reached { border-color: var(--blue); opacity: 1; }
.thought-journey span { color: var(--blue); font-size: 10px; font-weight: 800; letter-spacing: .08em; }
.thought-journey strong { font-size: 14px; line-height: 1.5; }
.thought-journey small { color: var(--muted); font-size: 12px; }
.thought-journey + .current-understanding { margin-top: 42px; }
.record-section { margin-top: 54px; }
.detail-timeline { display: grid; }
.detail-timeline .timeline-item { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; border-bottom: 1px solid var(--line); padding: 24px 0; }
.detail-timeline .timeline-date { color: var(--muted); font-size: 12px; }
.detail-timeline .timeline-type { display: block; margin-bottom: 7px; color: var(--blue); font-size: 11px; font-weight: 800; }
.detail-timeline .timeline-body, .detail-timeline .source-title { font-size: 15px; line-height: 1.8; white-space: pre-wrap; }
.detail-timeline .source-link { display: inline-block; max-width: 100%; margin-top: 8px; overflow: hidden; color: var(--blue); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.detail-aside { display: grid; align-content: start; gap: 28px; }
.detail-aside h2 { margin: 8px 0 0; font-size: 18px; }
.detail-actions { display: grid; gap: 9px; margin-top: 18px; }
.detail-actions button { width: 100%; min-height: 44px; }
.more-actions { border-top: 1px solid var(--line); padding-top: 18px; }
.more-actions summary { min-height: 44px; color: var(--muted); font-size: 13px; cursor: pointer; }
.more-actions > div { display: grid; justify-items: start; gap: 14px; padding-top: 8px; }
.archived-notice { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 30px; border: 1px solid var(--line); padding: 16px; color: var(--muted); font-size: 14px; }

.map-workspace { grid-template-columns: minmax(0, 1fr); }
.map-workspace.has-inspector { grid-template-columns: minmax(0, 1fr) 315px; }
.map-header p { margin: 8px 0 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.canvas-surface::before, .canvas-surface::after { content: none; }
.canvas-toolbar .tool-button { min-width: 44px; height: 44px; }
.canvas-toolbar .tool-button[data-action="fit-map"] { min-width: auto; }
.map-inspector .inspector-question-text { font-size: 22px; }
.inspector-count { color: var(--muted); font-size: 13px; }

.primary-button, .secondary-button, .danger-button { min-height: 44px; font-size: 13px; }
.text-button { min-height: 36px; font-size: 13px; }
.modal-close, .icon-button { width: 44px; height: 44px; }
.modal-intro, .settings-row strong { font-size: 14px; }
.field, .settings-row small, .privacy-note { font-size: 13px; }

@media (max-width: 780px) {
  .app-shell { padding-bottom: 72px; }
  .view { padding: 0; }
  .mobile-header { padding: 17px 18px; border-bottom: 1px solid var(--line); }
  .content-page, .detail-page { padding: 28px 18px 54px; }
  .page-header { margin-bottom: 28px; }
  .page-header h1 { font-size: 34px; }
  .page-header p { font-size: 14px; }
  .question-section { margin-top: 40px; }
  .question-row { min-height: 90px; gap: 12px; padding: 16px 2px; }
  .question-row-main strong { font-size: 16px; }
  .question-row-main small { font-size: 12px; }
  .question-row-main > span { font-size: 13px; }
  .mobile-nav { padding-right: 8px; padding-left: 8px; }
  .mobile-nav .nav-link { min-width: 68px; min-height: 50px; padding: 5px 9px; font-size: 11px; }

  .detail-header { display: flex; flex-wrap: wrap; gap: 16px; padding-bottom: 26px; }
  .detail-back { width: 100%; }
  .detail-heading { order: 2; width: 100%; }
  .detail-heading h1 { font-size: 32px; line-height: 1.4; }
  .detail-header > .secondary-button { order: 3; }
  .detail-layout { display: flex; flex-direction: column; gap: 36px; padding-top: 30px; }
  .quick-thought { margin-top: 30px; }
  .quick-thought textarea { min-height: 120px; }
  .mobile-detail-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
  .mobile-detail-actions button { min-width: 0; padding: 0 8px; font-size: 12px; }
  .thought-journey { grid-template-columns: 1fr; gap: 16px; margin-top: 36px; }
  .thought-journey > div { padding-top: 10px; }
  .thought-journey + .current-understanding { margin-top: 36px; }
  .record-section { margin-top: 44px; }
  .detail-timeline .timeline-item { grid-template-columns: 1fr; gap: 8px; padding: 20px 0; }
  .detail-aside > section { display: none; }
  .more-actions { border-top: 0; border-bottom: 1px solid var(--line); padding: 0 0 14px; }

  .map-workspace, .map-workspace.has-inspector { display: block; }
  .map-workspace .inspector { display: none; }
  .map-shell { min-height: calc(100vh - 145px); padding: 20px 14px 0; }
  .map-header { min-height: 80px; }
  .map-header h1 { max-width: 48vw; white-space: normal; }
  .map-header p { display: none; }
  .canvas-surface { min-height: calc(100vh - 225px); }
  .canvas-toolbar { right: 8px; bottom: 8px; left: 8px; justify-content: center; overflow-x: auto; }
  .canvas-toolbar .tool-button[data-action="toggle-pan"], .canvas-toolbar .tool-button[data-action="undo"], .canvas-toolbar .tool-button[data-action="redo"], .canvas-toolbar .toolbar-divider { display: none; }
  .canvas-node { width: 118px; height: 118px; }
  .canvas-node.is-root { width: 154px; height: 154px; }
  .canvas-node strong { font-size: 11px; }
  .canvas-node.is-root strong { font-size: 14px; }
  .canvas-add { top: auto; right: 9px; bottom: 70px; min-height: 44px; }
  .toast-root { right: 14px; bottom: 86px; left: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
