/* Reading controls stay on the paper margin, outside the painted river. */
.historical-date{white-space:nowrap}
body{background:#f5eddd}
.river-overview{margin:12px 3vw 0;display:flex;align-items:center;gap:18px;color:#7b6b51;font-size:12px}
.river-overview[hidden],.polity-peek[hidden]{display:none}
.river-overview svg{display:block;width:min(560px,65vw);height:40px;background:#ede1c8;cursor:crosshair;touch-action:none;overflow:hidden}
.overview-land{fill:#ac9471;stroke:#f4ead7;stroke-width:3;pointer-events:none}
.overview-window{fill:#a55e3620;stroke:#9a4b31;stroke-width:1.5;vector-effect:non-scaling-stroke;cursor:grab}
.river-overview svg:active .overview-window{cursor:grabbing}.river-overview svg:focus-visible{outline:2px solid #9a4b31;outline-offset:3px}
.overview-hint{font-size:11px;color:#8c7a5e}
.polity-peek{position:absolute;z-index:4;pointer-events:none;background:#fff8e9f5;border:1px solid #cab68f;padding:10px 14px;box-shadow:0 3px 12px #30231319;white-space:nowrap;color:#3a3022}
.polity-peek strong{display:block;font:23px KaiTi,serif;letter-spacing:2px}.polity-peek span{display:block;font:14px Georgia,serif;color:#856448;margin-top:5px}
.b-label.dimmed{opacity:.64}.b-label.selected text{filter:drop-shadow(0 1px 2px #513b29)}
.periods>button,.zoom-controls button{font-size:13px;min-height:40px}.search input{font-size:13px}
.stage-actions button{font-size:12px;min-height:34px;padding:6px 11px}.read-hint{font-size:11px}
.reader #selected-note{font-size:15px;line-height:1.85;color:#655c4d;text-wrap:pretty}.reader a{font-size:13px}
.context-heading button{font-size:13px;min-height:36px}.relation-row .relation-note{font-size:14px;line-height:1.8;color:#655c4d}.relation-row .relation-kind{font-size:12px}
.contemporary button{font-size:13px;min-height:32px}.journey-title p{font-size:12px}.journey-steps button span{font-size:12px}.journey-steps button{min-height:98px}
@media(max-width:800px){
 .periods{display:grid;grid-template-columns:repeat(7,max-content);overflow-x:auto;flex-wrap:nowrap;gap:0;padding:7px 14px 0;scrollbar-width:thin}
 .periods>button{padding:10px 12px;font-size:13px;min-height:44px;white-space:nowrap}
 .zoom-controls{grid-column:1/-1;position:sticky;left:0;width:calc(100vw - 28px);justify-content:flex-end;border-top:1px solid #dfd2b9;margin:6px 0 0;background:#f5eddd;min-height:44px}
 .zoom-controls button{font-size:14px;min-width:44px;min-height:44px}.zoom-controls span{font-size:13px}
 .stage-actions{left:10px;bottom:12px;gap:4px}.stage-actions button{font-size:12px;min-height:40px;padding:8px 10px}.read-hint{display:none}
 .river-overview{margin:10px 16px 0;gap:12px;font-size:12px}.river-overview>span:first-child{white-space:nowrap}.river-overview svg{flex:1;width:0;height:36px}.overview-hint{display:none}
 .reader{padding:22px 0;gap:15px}.reader #selected-note{font-size:15px;line-height:1.85}.reader a{font-size:13px}.reader #selected-years{font-size:14px}
 .relation-row .relation-note{font-size:14px;padding-left:0}.relation-row time{width:auto;min-width:50px;font-size:14px}.relation-row button{font-size:21px;min-height:36px}.relation-row .relation-kind{font-size:12px;margin-left:0}
 .contemporary button{font-size:14px;min-height:36px}.contemporary>div{gap:4px 17px}#sources{font-size:13px}
 .journey-steps{display:grid;grid-template-columns:repeat(3,1fr);row-gap:22px;overflow:visible}.journey-steps button{min-width:0;min-height:94px}.journey-steps button strong{font-size:23px}.journey-steps button time{font-size:14px}.journey-steps button span{font-size:12px}
}

html[lang="en"] .periods{gap:2px;padding:10px 14px}
html[lang="en"] .periods>button{padding:7px 9px;font-size:12px;min-height:34px;white-space:nowrap}
html[lang="en"] .zoom-controls button{min-height:34px;padding:6px 9px}
html[lang="en"] .reader{grid-template-columns:minmax(220px,280px) 1fr auto;gap:20px}
html[lang="en"] .reader h1{font-size:21px;letter-spacing:.2px;line-height:1.25}
html[lang="en"] .reader a{white-space:nowrap}
