.map-workspace { min-width:0; }
.map-segments { display:flex; width:max-content; gap:4px; padding:5px; background:#e9eeeb; border:1px solid #e1e7e2; border-radius:13px; margin-bottom:26px; }
.map-segments button { padding:10px 30px; border-radius:9px; color:#7a8780; transition:background .15s; }
.map-segments button.active { background:#fff; box-shadow:0 2px 6px #233b3210; color:var(--ink); font-weight:600; }
.map-overview { display:flex; justify-content:space-between; align-items:center; gap:20px; margin-bottom:18px; }
.map-overview h2 { font-size:19px; font-weight:600; margin:0 0 9px; }
.map-overview p { margin:0; font-size:13px; color:#78887e; line-height:1.8; }
.map-read-hint { color:#72857c; font-size:12px; }
.map-legend { display:flex; gap:8px; align-items:center; flex-wrap:wrap; margin:20px 0 12px; font-size:11px; color:#829087; }
.map-legend > span:first-child { margin-right:4px; }
.map-frequency { display:inline-block; padding:2px 7px; border-radius:5px; font-size:10px; font-weight:500; line-height:1.6; white-space:nowrap; }
.frequency-once { background:#e7eee8; color:#526e59; }
.frequency-periodic { background:#fbefda; color:#9c7634; }
.frequency-continuous { background:#e6edf8; color:#627ea9; }
.frequency-early { background:#f9e9e1; color:#ae7960; }
.map-viewport { max-height:calc(100dvh - 180px); min-height:280px; overflow:auto; border:1px solid #e1e7e3; border-radius:16px; background:#f8faf9; scrollbar-color:#acbbb3 #edf1ee; scrollbar-width:thin; isolation:isolate; }
.map-matrix { width:100%; min-width:950px; border-collapse:separate; border-spacing:8px 10px; table-layout:fixed; padding:0 4px 2px; color:#344b42; }
.map-matrix thead { position:sticky; top:0; z-index:3; }
.map-matrix thead th { padding:15px 8px; background:#ecf1ee; box-shadow:0 -10px 0 0 #f8faf9,0 6px 0 0 #f8faf9; border:1px solid #e0e7e2; border-radius:9px; text-align:center; }
.map-matrix th b { display:block; font-size:13px; font-weight:600; }
.map-matrix th > span { display:block; font-size:11px; font-weight:400; color:#8a978e; margin-top:6px; }
.map-matrix .map-corner { width:108px; position:sticky; left:4px; z-index:4; font-size:12px; }
.map-matrix tbody tr { background:linear-gradient(var(--overview-tint),var(--overview-tint)),#fff; }
.map-matrix tbody th { position:sticky; left:4px; z-index:2; border-radius:9px; background:linear-gradient(var(--overview-tint),var(--overview-tint)),#f6f8f7; border:1px solid var(--overview-border,#dfe7e1); padding:15px 8px; text-align:center; box-shadow:-12px 0 0 #f8faf9; }
.map-matrix td { padding:0; vertical-align:middle; }
.map-cell { display:flex; flex-direction:column; justify-content:center; gap:5px; height:100%; min-height:94px; padding:9px 6px; border:1px solid var(--overview-border,#dfe7e1); border-radius:9px; background:var(--overview-tint,#f4f7f4); }
.map-cell-empty { border-style:dashed; background:transparent; text-align:center; color:#bbc5be; }
.map-process { width:100%; display:flex; flex-direction:column; align-items:center; gap:5px; padding:9px 4px; border:1px solid transparent; border-radius:7px; background:var(--overview-tint,#f0f5f1); font-size:12px; line-height:1.7; transition:background .15s,border-color .15s; }
.map-process > span:first-child { overflow-wrap:anywhere; }
.map-process:hover,.map-process.is-current { background:#ffffffc9; border-color:var(--overview-border,#c7d6cd); color:#244f3c; }
.map-footnote { font-size:11px; color:#8c9a91; margin:13px 3px 0; line-height:1.8; }
.map-domain-layout { display:grid; grid-template-columns:minmax(280px,.85fr) minmax(0,1.35fr); gap:24px; align-items:start; }
.map-domains { display:flex; flex-direction:column; gap:12px; }
.map-domain-card { display:flex; align-items:flex-start; gap:14px; padding:20px 18px; text-align:left; border:1px solid var(--overview-border,#dfe7e1); border-radius:14px; background:linear-gradient(var(--overview-tint),var(--overview-tint)),#fff; }
.map-domain-card:hover,.map-domain-card.is-current { box-shadow:0 3px 14px #233b3208; border-color:#8ba597; }
.map-domain-card.is-current { outline:2px solid #6d8a7a; outline-offset:2px; }
.map-domain-number { display:grid; place-items:center; flex-shrink:0; width:34px; height:34px; border:1px solid var(--overview-border); border-radius:10px; background:#ffffffb3; font-size:12px; color:#667d70; }
.map-domain-copy { flex:1; min-width:0; }
.map-domain-copy > b { display:block; font-size:15px; font-weight:600; padding:2px 0 8px; }
.map-domain-copy > span { display:block; color:#7b8981; font-size:12px; line-height:1.8; }
.map-domain-copy small { display:flex; flex-wrap:wrap; gap:6px; margin-top:12px; }
.map-domain-copy small span { border:1px solid var(--overview-border); background:#ffffff70; border-radius:5px; padding:3px 6px; color:#7b8981; font-size:10px; }
.map-domain-arrow { color:#8d9c93; padding-top:7px; }
.map-domain-detail { border:1px solid #dfe7e1; background:#fff; border-radius:16px; overflow:hidden; }
.map-domain-heading { background:linear-gradient(120deg,#edf3ef,#fafcfb); padding:30px; border-bottom:1px solid #e7ede9; }
.map-kicker { display:block; font-size:11px; color:#8b9a91; letter-spacing:1.5px; }
.map-domain-heading h2 { margin:12px 0 0; font-size:24px; font-weight:600; }
.map-detail-section { margin:24px 0; line-height:1.9; font-size:14px; }
.map-domain-detail > .map-detail-section { margin:0; padding:26px 30px; border-bottom:1px solid #edf0ed; }
.map-detail-section h3 { display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0 0 16px; font-size:15px; font-weight:600; }
.map-detail-section h3 small { font-size:11px; color:#8b9a91; font-weight:400; }
.map-detail-section p { margin:8px 0; line-height:1.9; }
.map-keypoints { display:flex; flex-wrap:wrap; gap:8px; }
.map-keypoints > span { background:#edf3ee; color:#536f5d; padding:5px 12px; border-radius:7px; font-size:12px; }
.map-keypoints > div { background:#f5f8f5; padding:15px; border-radius:8px; width:100%; }
.map-reading-list { list-style:none; margin:0; padding:0; counter-reset:reading; }
.map-reading-list li { display:flex; gap:12px; margin:12px 0; }
.map-reading-list li:before { content:counter(reading,decimal-leading-zero); counter-increment:reading; color:#92a297; font-size:11px; padding-top:3px; flex-shrink:0; }
.map-highlight { background:#f4f7f4; border-radius:8px; padding:14px 16px; margin-top:10px; }
.map-highlight b { color:#6c8475; font-size:12px; }
.map-pager { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:20px 0 0; border-top:1px solid #e7ede8; font-size:12px; }
.map-pager > span { font-size:11px; color:#8c9a91; white-space:nowrap; }
.map-domain-detail > .map-pager { padding:20px; border-top:0; }
dialog.map-detail-dialog { width:min(1040px,calc(100% - 48px)); max-height:90dvh; padding:26px 32px; border-color:#dce6df; }
.map-detail-dialog .modal-title { margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #e6ece7; }
.map-detail-dialog .modal-title h2 { font-size:12px; color:#8a9a8f; letter-spacing:1px; }
.map-detail-dialog .modal-close { padding:0 5px; }
.map-process-heading h2 { display:flex; align-items:center; flex-wrap:wrap; gap:14px; font-size:26px; font-weight:600; margin:10px 0 16px; }
.map-process-heading h2 .map-frequency { font-size:11px; }
.map-process-heading > p { font-size:12px; line-height:1.8; color:#8b9a91; }
.map-process-tags { display:flex; flex-wrap:wrap; gap:8px; }
.map-process-tags span { font-size:11px; border:1px solid #dfe7e2; border-radius:5px; padding:4px 9px; color:#6f8578; background:#f6f9f6; }
.map-memory { padding:18px 22px; border-radius:10px; background:#f7f4ed; border:1px solid #eae3d6; font-size:13px; line-height:1.9; margin:20px 0; }
.map-memory b { font-size:11px; color:#a08860; }
.map-memory p { margin:4px 0; }
.map-itto-head { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:15px; }
.map-itto-head h3 { margin:0; }
.map-itto-head > span { font-size:11px; color:#8b9a91; }
.map-itto-columns { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; align-items:start; }
.map-itto-column { min-width:0; border:1px solid #dee6e0; border-radius:12px; overflow:hidden; background:#fbfcfb; }
.map-itto-column header { padding:18px; background:#f0f4f1; border-bottom:1px solid #e4eae5; }
.map-itto-column header > span { font-size:9px; letter-spacing:1.4px; color:#8c9d91; }
.map-itto-column h3 { margin:4px 0 0; font-size:16px; }
.itto-tools header { background:#f3f1f7; }
.itto-outputs header { background:#eef5f8; }
.map-itto-column > ol { margin:0; padding:8px 15px; list-style:none; counter-reset:itto; }
.map-itto-column li { position:relative; padding:10px 0 10px 23px; border-bottom:1px solid #e9eee9; counter-increment:itto; }
.map-itto-column li:last-child { border:0; }
.map-itto-column li:before { position:absolute; left:0; top:13px; content:counter(itto,decimal-leading-zero); font-size:10px; color:#a0afa4; }
.map-itto-link { display:flex; align-items:baseline; justify-content:space-between; gap:6px; text-align:left; width:100%; padding:3px; line-height:1.8; font-size:13px; border-radius:4px; overflow-wrap:anywhere; }
.map-itto-link > span { color:#a5b5aa; }
.map-itto-link:hover { color:#32674b; background:#eaf1e9; }
.map-itto-children { border-left:1px solid #dee7df; margin:6px 0 0 3px; padding-left:9px; }
.map-itto-children .map-itto-link { color:#839389; font-size:12px; }
.map-explanation-dialog { max-width:760px; }
.map-itto-explanation > header { margin:26px 0; }
.map-itto-explanation h2 { font-size:26px; font-weight:600; margin:10px 0; }
.map-itto-explanation header p { font-size:12px; color:#8a9b90; }
.map-itto-explanation .map-detail-section { border-top:1px solid #e7ece8; padding-top:20px; }
.map-itto-explanation ul { padding-left:22px; }
.map-itto-explanation li { padding:5px 0; }
.map-itto-explanation strong { color:#527d3e; font-weight:600; }
.map-context { background:#edf3ee; border-radius:10px; padding:18px; margin:20px 0 0; }
.map-context b { font-size:12px; color:#6e8b77; }
@media(min-width:1600px) { .map-matrix { border-spacing:10px 12px; } .map-process { font-size:13px; padding:10px 5px; } }
@media(max-width:1050px) { .map-domain-layout { grid-template-columns:minmax(260px,.85fr) minmax(0,1fr); gap:18px; } .map-domain-heading,.map-domain-detail > .map-detail-section { padding:22px; } }
@media(max-width:760px) {
 .map-overview { align-items:flex-start; flex-direction:column; gap:8px; }
 .map-overview h2 { font-size:17px; }
 .map-segments { width:100%; } .map-segments button { flex:1; }
 .map-domain-layout { grid-template-columns:1fr; }
 .map-domains { max-height:340px; overflow:auto; padding:4px; }
 .map-domain-card { padding:15px; }
 .map-viewport { max-height:70dvh; }
 dialog.map-detail-dialog { width:calc(100% - 20px); padding:20px; max-height:92dvh; }
 .map-process-heading h2,.map-itto-explanation h2 { font-size:22px; }
 .map-itto-columns { grid-template-columns:1fr; }
 .map-pager { gap:6px; } .map-pager .ghost { padding:10px 12px; font-size:11px; }
 .map-itto-head { align-items:flex-start; flex-direction:column; gap:5px; }
}

@media(min-width:761px) { #map-domain-reading { position:sticky; top:100px; max-height:calc(100dvh - 120px); overflow:auto; border-radius:16px; scrollbar-width:thin; scrollbar-color:#acbbb3 transparent; } }
