/* #343: single-surface Topic reference system. Layout authority remains #342. */
:root{--topic-title:24px;--topic-hook:17px;--topic-copy:15px;--topic-meta:12px;--topic-leading:1.75;--topic-space:20px;--topic-paper:#fffdfa;--topic-ink:#17372f;--topic-muted:#526c5e;--topic-rule:#dce5dc}
#primary-reading-surface{width:min(408px,42%)}
.map-topic-panel .map-wildlife-panel-head{grid-template-columns:52px minmax(0,1fr);padding:20px 20px 8px;gap:12px}
.map-topic-panel .map-wildlife-names h3{font-size:var(--topic-title);line-height:1.3;letter-spacing:.02em}
.map-topic-panel .map-wildlife-names>span,.map-topic-panel .map-wildlife-names i{font-size:var(--topic-meta);color:var(--topic-muted);line-height:1.5}
.map-topic-panel .map-wildlife-symbol{width:52px;height:52px;background:#edf1eb;border-radius:14px}
.map-topic-panel>.topic-hook{font-size:var(--topic-hook);line-height:1.6;font-weight:700;margin:0;padding:0 20px 14px;color:var(--topic-ink)}
.map-topic-panel .map-wildlife-panel-tools{padding:0 20px 14px}
.map-topic-panel .map-wildlife-origin{font-size:var(--topic-meta);font-weight:500;background:#f1f3ed;padding:4px 8px}
.map-topic-panel .map-topic-copy{padding:0 20px 24px!important;font-size:var(--topic-copy)!important;line-height:var(--topic-leading)!important}
.map-topic-panel .map-wildlife-photo{margin:0 0 var(--topic-space);border-radius:14px;background:#ebece4}
.map-topic-panel .map-wildlife-photo>img{width:100%!important;height:auto!important;max-height:280px!important;aspect-ratio:auto!important;object-fit:contain!important}
.map-topic-panel .map-wildlife-photo figcaption{display:block;font-size:11px;line-height:1.6;padding:10px 12px;color:var(--topic-muted)}
.map-topic-panel .map-wildlife-photo figcaption a{display:block;text-align:left;margin-top:4px}
.map-topic-panel .map-topic-intro{font-size:var(--topic-copy);font-weight:400;line-height:var(--topic-leading);margin:0 0 var(--topic-space)}
.map-topic-panel :is(.topic-current,.topic-knowledge){margin:20px 0;padding-top:16px;border-top:1px solid var(--topic-rule)}
.map-topic-panel h4{font-size:16px;line-height:1.5;margin:0 0 10px}
.topic-current p{margin:0 0 6px;font-weight:700}.topic-current small{display:block;font-size:var(--topic-meta);line-height:1.7;color:var(--topic-muted)}
.topic-knowledge summary{font-size:14px;min-height:44px;display:flex;align-items:center;cursor:pointer}.topic-knowledge summary::before{content:'＋';margin-right:8px}.topic-knowledge[open] summary::before{content:'−'}
.map-topic-panel .map-wildlife-facts{grid-template-columns:72px minmax(0,1fr);font-size:14px;gap:12px}.map-topic-panel .map-wildlife-facts dt{font-size:var(--topic-meta)}
.map-topic-panel .map-wildlife-places button{min-height:60px;padding:12px;font-size:14px;gap:5px}.map-topic-panel .map-wildlife-places small{font-size:var(--topic-meta);line-height:1.6}
.map-topic-panel :is(.map-wildlife-sources a,.map-wildlife-map-note){font-size:var(--topic-meta);line-height:1.7}
.map-topic-panel .map-harvest-species-rule-grid{font-size:14px;line-height:1.7;gap:10px}.map-topic-panel .map-harvest-species-rule-grid dt{font-size:12px}
.map-topic-options .map-topic-option{min-height:56px;font-size:14px;line-height:1.4;padding:10px;gap:10px}
.map-topic-options .map-topic-icon{width:36px;height:36px}.map-topic-icon img{width:32px;height:32px}.topic-option-copy{display:flex!important;flex-direction:column;align-items:flex-start;min-width:0;width:auto!important;height:auto!important}.topic-option-copy small{font-size:11px;font-weight:400;margin-top:3px}
.map-topic-option:hover{background:#e6eddf}.map-topic-option:focus-visible{outline:3px solid #23745a;outline-offset:3px}.map-topic-option[aria-pressed=true] .map-topic-icon{background:#fffdfa;border-radius:8px}
.exploration-intents>button[data-exploration-intent]{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:12px 16px;min-height:66px;min-width:0;gap:5px;flex:1;font-size:16px}
.exploration-intents>button small{font-size:12px;font-weight:400;line-height:1.4;color:#526c5e}.exploration-intents>button[aria-expanded=true] small{color:inherit}
.exploration-entry-teaser{font-size:12px;font-weight:600;line-height:1.5;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.experience-type{font-size:11px;color:#526c5e;font-weight:500}
.now-entry-context{font-size:13px;line-height:1.6;margin:0 0 12px;color:#526c5e}
.exploration-intents>button[data-exploration-intent=journey]{flex:0 0 auto;min-height:44px;padding:8px 12px;font-size:13px;background:transparent;border-color:transparent;align-items:center}
.exploration-menu .exploration-topic-card{display:flex;flex-direction:column;align-items:flex-start!important;justify-content:center;min-height:72px;padding:12px;text-align:left;gap:6px}.exploration-topic-card small{font-size:12px;font-weight:400;line-height:1.5;color:#526c5e}
/* Secondary list: copy sits after the title on one row (e.g. 海岸　…), never wraps to stretch the card. */
.exploration-secondary .exploration-topic-inline{flex-direction:row!important;align-items:center!important;justify-content:flex-start;min-height:44px!important;max-height:none;overflow:hidden;white-space:nowrap!important;gap:0.5em}
.exploration-secondary .exploration-topic-inline small{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12px;font-weight:400;line-height:1.2;color:#526c5e}
@media(max-width:760px){
 :root{--topic-title:23px;--topic-copy:16px;--topic-hook:17px}
 .exploration-intents .exploration-entry-teaser{display:none}
 #primary-reading-surface{width:auto}.map-topic-panel .map-wildlife-panel-head{padding:18px 16px 8px}.map-topic-panel>.topic-hook{padding:0 16px 12px}.map-topic-panel .map-wildlife-panel-tools{padding:0 16px 12px}.map-topic-panel .map-topic-copy{padding:0 16px 24px!important}
 .map-topic-panel .map-wildlife-photo>img{max-height:180px!important}.map-topic-panel .map-wildlife-photo{margin-bottom:8px}.map-topic-panel .map-wildlife-photo figcaption{padding:8px 12px}
 .exploration-intents>button[data-exploration-intent]{min-height:44px;padding:6px 7px;align-items:center;font-size:13px;gap:0}.exploration-intents>button small{display:none}.exploration-intents>button[data-exploration-intent=journey]{padding:6px 5px;font-size:12px;flex:0 0 auto}.exploration-menu .exploration-topic-card{min-height:70px;padding:10px}
}
/* Journey chooses briefly; the route remains a single line in map flow. */
.has-intent-menu #map-layer-chapters.is-open:has(#exploration-journey:not([hidden])){max-width:min(440px,100%)!important;max-height:min(72dvh,720px)!important;overflow:auto!important}
#exploration-journey .exploration-story-routes{grid-template-columns:1fr}
#exploration-journey .exploration-story-start{min-height:44px;gap:3px;padding:10px 12px}
#exploration-journey .exploration-story-start:has(img){display:grid;grid-template-columns:58px minmax(0,1fr);text-align:left}
#exploration-journey .exploration-story-start img{grid-row:1/4;width:58px;height:58px;object-fit:cover;border-radius:8px}
#exploration-journey .exploration-story-start b,#exploration-journey .exploration-story-start small{min-width:0;overflow-wrap:anywhere}
.journey-route-ribbon{flex:1;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;text-align:left!important}
.journey-route-ribbon[hidden]{display:none!important}
.journey-thread .journey-trail-list{position:static;max-height:72px;max-width:250px;padding:4px;box-shadow:none}
.journey-thread:has(.journey-trail[open]){align-items:flex-start}
.journey-thread :is(button,summary){min-height:44px}
.story-route-details{padding:12px;border:1px solid #dce5dc;border-radius:10px;margin:12px 0}
.story-route-details summary{min-height:44px;display:flex;align-items:center;cursor:pointer}
.story-route-details p,.story-route-details a{font-size:14px;line-height:1.7}
.story-route-return{display:block;width:100%;min-height:44px;margin:8px 0;padding:8px 12px;border:1px solid #23745a;border-radius:8px;background:#23745a;color:#fff;font:inherit;font-weight:700;cursor:pointer}
.story-route-return:hover{background:#1c5c48}
.story-route-return:focus-visible{outline:2px solid #17372f;outline-offset:2px}
.story-route-details .journey-panel-actions{flex-wrap:wrap}
.story-route-details h4{margin:0 0 6px;line-height:1.5}
.story-stage-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:8px 0 4px}
.story-stage-bar .story-stage-progress{margin:0;flex:1 1 8em}
.story-stage-bar .journey-panel-actions{flex-wrap:wrap;margin-top:0}
.story-stage-bar :is(.story-route-previous,.story-route-onward,.story-route-stops){display:inline-flex;align-items:center;width:auto;min-height:44px}
.story-stage-progress{color:#526c5e}
.story-stage-experience{margin:2px 0 0;color:#526c5e;font-size:14px;line-height:1.6}
.story-journey-heading{margin:6px 0;font-size:14px;line-height:1.5}
.map-float .story-stage-progress{color:#d4e6d8}
.map-float .story-stage-experience{color:#d4e6d8}
.map-float .story-route-details a{color:#e7c981;text-underline-offset:3px}
.story-route-free{min-height:44px;padding:8px 12px;border:1px solid #dce5dc;border-radius:8px;background:#fffdfa;color:#17372f;font:inherit;cursor:pointer}
.story-route-free:focus-visible,.story-route-onward:focus-visible{outline:2px solid #23745a;outline-offset:2px}
@media(max-width:760px){
 .has-intent-menu #map-layer-chapters.is-open:has(#exploration-journey:not([hidden])){max-width:100%!important;max-height:min(70dvh,640px)!important}
 .journey-thread .journey-inline-context{display:none}
 .journey-thread .journey-route-ribbon{font-size:11px;max-width:none}
 .journey-thread .journey-trail-list{max-width:110px}
 .journey-thread .journey-route-ribbon:not([hidden])~.journey-previous{display:none}
 body:has(#primary-reading-surface:not([hidden])) .journey-thread:has(.journey-route-ribbon:not([hidden])){position:fixed;left:8px;right:8px;bottom:calc(50dvh + 16px + env(safe-area-inset-bottom,0px));width:auto;z-index:79;background:#fffdfa;border:1px solid #dce5dc;border-radius:12px;padding:4px;gap:4px;max-height:126px}
 .journey-thread:has(.journey-route-ribbon:not([hidden])) .journey-source{display:none}
 body:has(#primary-reading-surface[data-reading-size=full]:not([hidden])) .journey-thread:has(.journey-route-ribbon:not([hidden])){display:none}
}
