:root{font-family:'Noto Sans Hebrew',Arial,sans-serif;color:#29251E;background:#FAF8F2;line-height:1.65;--teal:#A83A29}*{box-sizing:border-box}body{margin:0}main{max-width:1050px;margin:auto;padding:36px 28px;background:#FAF8F2;min-height:100vh}h1{font-size:clamp(28px,5vw,44px);font-weight:500;line-height:1.3;margin:8px 0 12px}h2{font-size:19px}.eyebrow,.legend,small,footer{color:#6E665A}.eyebrow{font-size:12px}header{margin-bottom:26px}button,input,select{font:inherit}button,select{min-height:44px;border:1px solid #C9C1AB;border-radius:2px;background:#FAF8F2;color:inherit;padding:6px 12px;cursor:pointer}button:hover,button:focus-visible{border-color:var(--teal);outline:2px solid #8FA7D8}a{color:#A83A29}.time-head{display:flex;justify-content:space-between;align-items:center}#year{font-size:40px;font-variant-numeric:tabular-nums;line-height:1.3}#workspace>label{font-size:12px;color:#6E665A}#time{display:block;width:100%;direction:rtl;margin:12px 0;height:24px;accent-color:var(--teal)}.ends,.steps{display:flex;justify-content:space-between;align-items:center;gap:8px}.ends{font-size:11px;color:#6E665A}.steps{margin:8px 0;font-size:12px}#count{text-align:center}.map{position:relative;border:1px solid #DCD5C2;border-radius:2px;overflow:hidden;margin-top:10px}svg{display:block;width:100%;height:auto;aspect-ratio:2/1}#land path{fill:#D8D4C4;stroke:#AFA78F;stroke-width:.55}.tools{position:absolute;left:8px;top:8px;display:flex;gap:4px;direction:ltr}.map small{position:absolute;bottom:3px;left:6px;font-size:9px;background:#F1ECDD;padding:0 3px}.pin{cursor:pointer}.pin:focus{outline:none}.pin .mark{fill:#7c7770;stroke:#fff;stroke-width:1}.pin.active .mark,.pin:focus .mark{fill:var(--teal);stroke:#7C271B;stroke-width:1.5}.pin .halo{fill:var(--teal);opacity:.2}.legend{font-size:11px;margin:6px 0 18px}details{border-block:1px solid #DCD5C2;margin:0 0 24px;padding:10px 0}summary{min-height:44px;cursor:pointer;font-weight:600;padding-top:8px}.selectors{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin:12px 0}label{display:block;font-size:13px}select,input[type=search]{display:block;width:100%;min-height:44px;margin:5px 0 12px;border:1px solid #C9C1AB;border-radius:2px;background:#FAF8F2;padding:8px}.check{display:flex;gap:8px;align-items:center;min-height:44px}#scope{font-size:12px;color:#6E665A}.results{display:grid;grid-template-columns:1fr 1fr;gap:30px;align-items:start}article{padding:24px;background:#f5f2ed;border-radius:2px}article h2{font-size:24px;line-height:1.4;margin:10px 0}article .date{color:var(--teal);font-size:13px;font-weight:bold}article a{overflow-wrap:anywhere}#events button{display:block;width:100%;border:0;border-bottom:1px solid #DCD5C2;border-radius:0;text-align:right;padding:13px 8px;background:transparent;font-size:13px}#events button.active{background:#F5E8E1;box-shadow:inset -3px 0 var(--teal)}#events b{display:inline-block;min-width:46px;font-variant-numeric:tabular-nums}#events small{display:block;padding-right:46px}footer{border-top:1px solid #DCD5C2;margin-top:36px;padding-top:20px;font-size:12px}#status{font-size:11px}@media(max-width:650px){main{padding:24px 18px}header{margin-bottom:18px}header p{font-size:13px}.results{grid-template-columns:1fr;gap:20px}#year{font-size:34px}.steps button{font-size:11px;padding:4px 8px}svg{height:210px;aspect-ratio:auto}.map{margin-top:6px}.tools button{font-size:11px;padding:4px 8px}.selectors{grid-template-columns:1fr;gap:0}article{padding:20px}}
.time-mode{display:flex;justify-content:space-between;align-items:center;gap:10px;border-top:1px solid #DCD5C2;font-size:11px}.time-mode label{font-size:12px}.time-mode input{accent-color:var(--teal)}.time-mode small{font-size:10px}.time-mode .check{margin:0}
.year-jump{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin:8px 0}.year-jump label{font-size:11px}.year-jump input{width:90px;min-height:44px;border:1px solid #C9C1AB;padding:6px;direction:ltr}.year-jump button{font-size:12px}.border-panel{font-size:12px;padding:8px 0;border-bottom:1px solid #DCD5C2}.border-panel p{margin:4px 0}.border-panel small{font-size:11px}#borders path{cursor:pointer}#borders path:hover,#borders path:focus{fill-opacity:.85;stroke:#29251E;outline:none}.time-mode{display:flex;justify-content:space-between;align-items:center;gap:6px}.time-mode small{font-size:10px}@media(max-width:650px){header{margin-bottom:10px}header .eyebrow{margin-top:0}header h1{font-size:26px}header p{margin:5px 0}.year-jump{gap:5px;margin:3px 0}.year-jump label{flex-basis:100%}.year-jump button{padding:5px 7px;font-size:11px}.year-jump input{width:75px}.time-mode .check{font-size:11px}.time-mode small{max-width:100px}svg{height:210px}.border-panel .check{margin:0}#territoryDetail{min-height:20px}}

.share-view{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:6px 0}.share-view button,.share-view a{font-size:11px}.share-view a{min-height:44px;display:inline-flex;align-items:center}.share-view small{flex-basis:100%;font-size:10px}.share-view span{font-size:11px;color:#A83A29}@media(max-width:650px){.share-view{gap:5px}.share-view button{min-height:44px;padding:4px 6px}.share-view a{min-height:44px}.share-view small{line-height:1.4}.year-jump label{font-size:10px}}

#contribute{border-block:1px solid #C9C1AB;padding:14px 0;margin:12px 0 22px}#contribute h2{margin:0;color:#A83A29}#contribute p{font-size:13px}#contribute details{margin:8px 0}#contributionPrompt{width:100%;min-height:210px;max-height:440px;resize:vertical;padding:12px;font:12px/1.6 Arial,sans-serif;border:1px solid #C9C1AB;border-radius:2px;background:#FAF8F2;color:inherit}#contribute nav{display:flex;gap:14px;flex-wrap:wrap;margin:12px 0;font-size:12px}.review-note{color:#6E665A}


/* Full-viewport map; controls and panels float above it. */
html,body,main{width:100%;height:100%;height:100dvh;overflow:hidden;margin:0;padding:0;max-width:none;background:#F1ECDD}header{position:fixed;z-index:4;right:50%;transform:translateX(50%);top:max(16px,env(safe-area-inset-top));margin:0;pointer-events:none;background:#FAF8F2e8;padding:6px 12px;border-radius:4px;box-shadow:none;border:1px solid #C9C1AB}header h1{font-size:16px;margin:0;white-space:nowrap}#workspace{position:fixed;inset:0}.map{position:absolute;inset:0;border:0;border-radius:0;margin:0;background:#F1ECDD}.map #world{height:100%;width:100%;min-height:0;max-height:none;aspect-ratio:auto;touch-action:none;user-select:none;cursor:grab}.map #world:active{cursor:grabbing}.map small{bottom:110px;left:8px;font-size:9px;max-width:calc(100% - 16px);pointer-events:none;background:#FAF8F2af}.basic-bar{position:fixed;top:max(16px,env(safe-area-inset-top));right:14px;z-index:6;display:flex;align-items:flex-start;gap:8px;padding:0}.basic-bar>button,#yearChooser>summary,#advanced>summary,#eventInfo>summary{background:#FAF8F2;border:1px solid #C9C1AB;box-shadow:none;border-radius:4px;height:46px;min-width:46px;padding:11px;display:flex;align-items:center;justify-content:center;cursor:pointer}.basic-bar>button svg,summary svg{display:block;width:22px;height:22px;aspect-ratio:1;height:22px}.basic-bar #copyView{position:fixed;left:14px;top:max(16px,env(safe-area-inset-top))}.basic-bar #reset{position:fixed;left:14px;top:72px}#yearChooser{border:0;margin:0;padding:0;position:relative}#yearChooser>summary{font-size:18px;min-width:76px;border-radius:2px;font-weight:600;list-style:none}summary::-webkit-details-marker{display:none}#yearChooser .year-jump{position:absolute;right:0;top:54px;width:280px;max-width:calc(100vw - 28px);padding:16px;background:#FAF8F2;border:1px solid #C9C1AB;border-radius:4px;box-shadow:none;border-top:3px solid #29251E;display:flex;flex-wrap:wrap;gap:8px}#yearChooser .year-jump label{flex-basis:100%}#yearChooser .year-jump input{min-width:100px;flex:1}.timeline{position:fixed;z-index:5;bottom:max(12px,env(safe-area-inset-bottom));left:14px;right:14px;padding:6px 14px 8px;background:#FAF8F2ed;border-radius:4px;box-shadow:none;border:1px solid #C9C1AB;border-top:3px solid #29251E}#time{height:34px;margin:0;touch-action:pan-x}.ends{font-size:10px}.map-hint{position:fixed;z-index:3;bottom:86px;left:50%;transform:translateX(-50%);white-space:nowrap;font-size:11px;margin:0;padding:3px 10px;border-radius:3px;background:#FAF8F2dd;border:1px solid #C9C1AB;pointer-events:none}#selectionHint{position:fixed;z-index:4;top:126px;left:50%;transform:translateX(-50%);max-width:calc(100% - 120px);text-align:center;font-size:11px;line-height:1.4;padding:5px 9px;border-radius:3px;background:#FAF8F2ee;border:1px solid #C9C1AB;pointer-events:none;margin:0;box-shadow:none}#eventInfo,#advanced{position:fixed;z-index:7;border:0;padding:0;margin:0;background:transparent}#eventInfo{top:72px;right:14px}#advanced{top:128px;left:14px}#eventInfo>summary,#advanced>summary{list-style:none}#eventInfo[open],#advanced[open]{inset:auto 12px 88px;max-height:65dvh;overflow:auto;overscroll-behavior:contain;background:#FAF8F2;border:1px solid #C9C1AB;border-radius:4px;padding:18px;box-shadow:none;border-top:3px solid #29251E}#eventInfo[open]>summary,#advanced[open]>summary{box-shadow:none;border:0;display:inline-flex}#advanced[open]>summary:after{content:'אפשרויות ומקורות';font-size:16px;font-weight:600;white-space:nowrap;margin-right:10px}#eventInfo[open]>summary:after{content:'אירועים ופרטים';font-size:16px;font-weight:600;white-space:nowrap;margin-right:10px}.close-panel{float:left;border:0;font-size:28px;min-width:44px;margin:0 0 5px}.results{clear:both;gap:20px}.results article{padding:16px}#advanced .tools{position:static;justify-content:flex-end}#shareStatus:empty{display:none}.quiet-map header,.quiet-map .map-hint{opacity:0}.quiet-map header{transition:opacity .2s}dialog{border:1px solid #C9C1AB;border-top:3px solid #29251E;border-radius:4px;background:#FAF8F2;color:inherit;width:360px;max-width:calc(100% - 28px);padding:24px;box-shadow:none}dialog::backdrop{background:#29251E44}dialog h2{margin-top:0}.close-share{position:absolute;left:10px;top:10px;border:0;font-size:24px}dialog p{font-size:13px}#shareUrl{width:100%;direction:ltr;border:1px solid #C9C1AB;padding:10px;min-height:44px;margin-bottom:12px}#copyShare{width:100%;background:#A83A29;color:white}button:focus-visible,summary:focus-visible{outline:3px solid #325EA3;outline-offset:2px}
.drawer-open #advanced:not([open])>summary,.drawer-open #eventInfo:not([open])>summary{visibility:hidden}
@media(max-width:650px){header{top:76px}header h1{font-size:14px}#selectionHint{top:181px;max-width:calc(100% - 28px)}.results{display:block}.selectors{grid-template-columns:1fr}.time-mode{flex-wrap:wrap}.map small{bottom:110px}.map-hint{bottom:86px}}
@media(max-height:500px) and (orientation:landscape){header{display:block;top:16px}.map-hint{display:none}.timeline{bottom:8px;padding-top:0;padding-bottom:3px}#selectionHint{top:70px;max-width:calc(100% - 240px)}.map small{bottom:84px}#eventInfo[open],#advanced[open]{bottom:74px;max-height:70dvh}}

#yearError{flex-basis:100%;font-size:12px;margin:0;color:#8b302a}#yearError:empty{display:none}

.year-editing header,.year-editing #selectionHint,.year-editing #copyView,.year-editing #reset,.year-editing #advanced,.year-editing #eventInfo{visibility:hidden}.year-editing .basic-bar{z-index:9}

#advanced[open]>.close-panel,#eventInfo[open]>.close-panel{position:absolute;top:14px;left:14px;float:none;margin:0}#advanced[open]>summary,#eventInfo[open]>summary{justify-content:flex-start;width:calc(100% - 54px);border-radius:0;padding:0;margin-bottom:12px}

/* Settings are a control surface, not a document. */
[hidden]{display:none!important}#advanced[open]{width:min(430px,calc(100vw - 24px));right:auto;left:12px;max-height:72dvh}#advanced[open]>summary:after{content:'הגדרות המפה'}
.settings-nav{display:grid;grid-template-columns:repeat(3,1fr);gap:4px;padding:4px;border-radius:4px;background:#ECE6D6;position:sticky;top:-18px;z-index:2;margin-bottom:18px}.settings-nav button{border:0;background:transparent;border-radius:2px;font-size:14px;padding:7px 4px}.settings-nav button[aria-pressed=true]{background:#FAF8F2;color:#7C271B;box-shadow:none;font-weight:bold}
.settings-page .selectors{grid-template-columns:1fr;gap:4px;margin:12px 0}.settings-page label{font-size:13px;font-weight:600}.settings-page select,.settings-page input[type=search]{border-radius:3px;font-weight:400;background:#fff;min-height:48px;margin-top:7px}.settings-page .legend{margin:8px 0 0;font-size:11px}.setting-label{font-size:13px;margin:16px 0 8px;color:#6E665A}.setting-label:first-child{margin-top:0}.layer-switch{display:flex;align-items:center;justify-content:space-between;flex-direction:row-reverse;min-height:52px;margin-top:14px}.layer-switch input{appearance:none;position:relative;width:44px;height:26px;flex-shrink:0;margin:0;background:#B7AF9C;border-radius:18px;cursor:pointer}.layer-switch input:before{content:'';position:absolute;width:20px;height:20px;top:3px;left:3px;background:white;border-radius:50%;transition:transform .15s}.layer-switch input:checked{background:#A83A29}.layer-switch input:checked:before{transform:translateX(18px)}.layer-switch input:focus-visible{outline:3px solid #325EA3;outline-offset:3px}.setting-caption{font-size:11px;color:#6E665A;margin:0 0 10px}.settings-page .steps button{font-size:12px;border-radius:10px}.settings-page .time-head button{width:100%;border-radius:3px}.zoom-row{display:flex;align-items:center;justify-content:space-between;font-size:12px;margin-top:16px}.zoom-row .tools{gap:8px}.settings-page details{border:0;border-top:1px solid #DCD5C2;margin:0;padding:4px 0}.settings-page details>summary{font-size:14px;display:flex;align-items:center;justify-content:space-between;padding:8px 0}.settings-page details>summary:after{content:'＋';font-size:18px;font-weight:400}.settings-page details[open]>summary:after{content:'−'}.settings-page details p,.settings-page details small{font-size:12px}.settings-page #contribute{border:0;margin:0;padding:0}.settings-page #contribute>p{font-size:12px}.settings-page .border-panel{border:0}.settings-page #scope{font-size:12px}.settings-page .share-view a{font-size:13px}.settings-page #status{font-size:11px}
@media(max-height:500px) and (orientation:landscape){#advanced[open]{max-height:74dvh;bottom:74px}.settings-nav{margin-bottom:10px}}

/* Event cues: exact temporal marks, grouped hit areas, bounded map titles. */
#eventTicks{height:36px;position:relative;margin:0 0 -5px;direction:ltr}.event-tick{position:absolute;bottom:6px;height:11px;width:4px;border-radius:50%;background:#A83A29;pointer-events:none}.event-tick.square{border-radius:1px;height:9px}.tick-hit{position:absolute;top:-4px;height:44px;min-height:44px;border:0;background:transparent!important;padding:0;box-shadow:none;border-radius:2px}.tick-hit:hover{background:#A83A2911!important}.tick-count{position:absolute;bottom:12px;transform:translateX(-50%);font-size:10px;line-height:15px;min-width:15px;border-radius:2px;background:#FAF8F2;border:1px solid #C9C1AB;color:#7C271B;font-weight:bold}.tick-count:empty{display:none}.timeline{padding-top:3px}.map small{bottom:143px}.map-hint{bottom:119px}#advanced[open],#eventInfo[open]{bottom:121px}#timelineEvents{max-height:65dvh;overflow:auto}#timelineEventChoices button{width:100%;text-align:right;border:0;border-bottom:1px solid #DCD5C2;border-radius:0;background:transparent;font-size:13px;padding:12px 4px}#timelineEventsTitle{font-size:16px;padding-left:24px}
@media(max-height:500px) and (orientation:landscape){#advanced[open],#eventInfo[open]{bottom:107px;max-height:66dvh}.map small{bottom:117px}.map-hint{display:none}}

.event-label{cursor:pointer}.event-label:focus{outline:none}.event-label:focus rect{stroke:#7C271B;stroke-width:2px}

.collection-choice{display:flex;align-items:center;gap:10px;min-height:72px;padding:10px 4px;border-bottom:1px solid #DCD5C2;cursor:pointer}.collection-choice input{width:20px;height:20px;flex-shrink:0;accent-color:#A83A29}.collection-choice i{width:8px;height:8px;border-radius:50%;flex-shrink:0}.collection-name{min-width:0}.collection-name strong{display:block;font-size:14px;font-weight:500}.collection-name small{display:block;font-size:11px;font-weight:400;color:#6E665A}#listChoiceStatus{font-size:11px;color:#6E665A;margin:12px 0 0}.pin .mark,.pin.active .mark,.pin:focus .mark{fill:var(--list-color,#A83A29)}

/* Boundary status belongs to settings, never a map-blocking floating badge. */
#settings-display #selectionHint{position:static;top:auto;left:auto;right:auto;bottom:auto;transform:none;max-width:none;text-align:right;padding:0;margin:0 0 12px;border-radius:0;background:transparent;box-shadow:none;font-size:11px;color:#6E665A;pointer-events:auto}



/* מגזין מפות: editorial serif hierarchy, rules instead of shadows */
h1,article h2,dialog h2,#year,#yearChooser>summary{font-family:'Noto Serif Hebrew','Noto Sans Hebrew',serif}
#yearChooser>summary{font-weight:600;letter-spacing:.5px}
article h2{font-weight:600}
a:hover{text-decoration:underline}
#events button.active{box-shadow:inset -3px 0 #A83A29}

/* One nearby-year window; the visible legend decodes each list's color and shape. */
.legend-row{display:flex;flex-wrap:wrap;justify-content:center;gap:1px 14px;font-size:12px;line-height:1.4;margin:0;color:#29251E}.legend-item{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}.legend-mark{width:13px;height:13px;border-radius:50%;flex-shrink:0}.legend-mark.square{border-radius:2px}.site-credit{display:block;text-align:center;font-size:12px;line-height:1.5;color:#6E665A;margin-top:2px}.site-credit a{color:#A83A29}.map-hint{display:none}#advanced[open],#eventInfo[open]{bottom:164px;max-height:calc(100dvh - 189px)}.map small{bottom:168px}@media(max-height:500px) and (orientation:landscape){#advanced[open],#eventInfo[open]{bottom:138px;max-height:calc(100dvh - 158px)}.map small{bottom:140px}.timeline{padding-bottom:2px}}

.wikipedia-intro{border-top:1px solid #C9C1AB;margin-top:20px;padding-top:12px}.wikipedia-intro h3{font-size:16px;margin:0}.wikipedia-intro p{white-space:pre-line;unicode-bidi:plaintext}.wikipedia-intro small{display:block;margin-top:6px;line-height:1.5}

.work-link{display:inline-flex;align-items:center;gap:6px;margin:4px 0;font-size:12px;color:#3A352C;text-decoration:none;min-height:28px}.work-link span{text-decoration:underline}.work-icon{background:#F5C518;color:#000;border-radius:3px;padding:1px 5px;font-size:11px;font-weight:700;font-family:Arial,sans-serif;text-decoration:none}
