:root{--ink:#38291e;--sepia:#795a3a;--flood:#087eac;--giants:#bd432b;--worldtree:#168451}*{box-sizing:border-box}
html,body{margin:0;min-height:100%;font-family:Georgia,"Yu Mincho","Hiragino Mincho ProN",serif;background:#e8dbc1;color:var(--ink)}
button,select{font:inherit}a{color:#6e4727}a:hover{text-decoration:none}
.top{height:65px;display:flex;align-items:center;justify-content:space-between;background:#2d221e;color:#f4e2b7;padding:8px 18px;border-bottom:3px double #a88e61}
.logo{display:flex;align-items:center;gap:9px}.logo .star{font-size:33px}.logo b{font-size:23px;letter-spacing:2px;font-weight:normal}.logo small{display:block;font-size:10px;letter-spacing:.1em}
.back{color:#f9e2b5;text-decoration:none;border:1px solid #8c7559;padding:9px 12px;font-size:12px}.back:hover{background:#4d3d31}
.workspace{display:grid;grid-template-columns:260px minmax(0,1fr) 280px;min-height:calc(100dvh - 65px);height:calc(100dvh - 65px)}
.filters,.compare{padding:18px;overflow:auto;background:#f1e6ce}.filters{border-right:4px double #ad9876}.compare{border-left:4px double #ad9876}
.eyebrow{font-size:10px;letter-spacing:1.7px;font-weight:bold;color:#906e48}
h1{font-size:25px;font-weight:500;line-height:1.35;margin:11px 0}h2{font-size:14px;margin:20px 0 9px;border-bottom:1px solid #c5b391;padding-bottom:8px;letter-spacing:.04em}
.filters>p,.compare>p{font-size:12px;line-height:1.8}.mini{font-size:11px!important;color:#73634e;line-height:1.7!important}.theme-buttons{display:grid;gap:7px}
.theme-buttons button{color:var(--ink);background:#e4d5b7;border:1px solid #b5a181;text-align:left;padding:10px 11px;cursor:pointer;font-size:13px}
.theme-buttons button[aria-pressed=true]{background:#3b2f26;color:#f7eccd;border-color:#3b2f26}.flood{background:var(--flood)}.giants{background:var(--giants)}.worldtree{background:var(--worldtree)}
.source-item{padding:10px 0;border-bottom:1px solid #cab99a}.source-item b{font-size:12px;line-height:1.4;display:block}.source-item p{font-size:11px;line-height:1.6;margin:5px 0}.source-item a{font-size:11px;font-weight:bold}.licence{font-size:10px!important}
.maparea{display:flex;min-width:0;min-height:0;flex-direction:column;padding:9px;background:#d0bd96}
.map-head,.map-foot{font-size:10px;letter-spacing:1px;display:flex;justify-content:space-between;gap:10px;align-items:center;padding:4px 8px}.map-head{min-height:29px}.map-foot{min-height:22px;letter-spacing:0;text-align:center}
.mapframe{position:relative;flex:1;min-height:0;border:3px double #8e714d;overflow:hidden;background:#dbccaa}
#researchMap{height:100%;width:100%;background:#dccdaa}
.leaflet-container{font-family:Georgia,"Yu Mincho",serif;background:#dccdaa}
.leaflet-control-attribution{background:#e6d9b6b3!important;font-size:9px!important}
.compare label{font-size:11px;display:block;margin:11px 0 5px}.compare select{width:100%;padding:9px;border:1px solid #ae9973;background:#fff7e2;color:var(--ink);font-size:12px}
@media(max-width:1060px){.workspace{grid-template-columns:210px minmax(0,1fr) 225px}.filters,.compare{padding:12px}h1{font-size:22px}}
@media(max-width:790px){html,body{height:auto;overflow:auto}.top{height:auto;min-height:60px}.logo b{font-size:19px}.logo small{font-size:9px}.back{font-size:10px;padding:7px}.workspace{display:flex;flex-direction:column;height:auto;min-height:0}.filters,.compare{overflow:visible;border:0;padding:14px}.filters h1,.filters>p{display:none}.filters{order:0}.filters h2{margin:10px 0}.theme-buttons{display:flex;gap:4px;flex-wrap:wrap}.theme-buttons button{font-size:11px;padding:8px}.filters #studyList,.filters #motifList,.filters .licence{display:none}.maparea{height:min(62vh,540px);min-height:340px;order:1}.compare{order:2}.map-foot{font-size:9px}}

@media(max-width:790px){.filters h2:nth-of-type(n+2){display:none}.filters .mini{display:none}.filters{padding-bottom:7px}.top{gap:8px}.back{white-space:nowrap;font-size:10px}.logo b{font-size:17px}.logo small{letter-spacing:0;font-size:8px}}@media(max-width:790px){}

/* v0.2: prevent mobile clipping and keep text readable. */
html,body{max-width:100%}
.workspace,.filters,.maparea,.compare{min-width:0}
.compare .mini,.source-item{overflow-wrap:anywhere}
@media(max-width:790px){
 html,body{overflow-x:hidden}
 .top{padding:8px 10px}
 .logo{min-width:0;flex:1;gap:5px}
 .logo .star{font-size:20px;flex-shrink:0}
 .logo b{font-size:16px;white-space:nowrap;letter-spacing:.03em}
 .logo small{font-size:8px;white-space:nowrap}
 .back{display:block;flex:0 0 auto;max-width:110px;overflow:hidden;font-size:10px}
 .filters,.compare{width:100%;box-sizing:border-box}
 .compare{padding:16px}
.compare label,.compare select{font-size:13px;line-height:1.65}
 .map-foot{white-space:normal}
 .mapframe{min-width:0}
}
@media(max-width:390px){
 .logo b{font-size:15px}
 .logo small{font-size:7px}
 .back{padding:6px 5px;font-size:9px}
}

/* Keep the return link visible on narrow smartphone screens. */
@media(max-width:790px){
.top{position:relative;padding:8px 105px 8px 10px}
.logo{min-width:0;overflow:hidden;max-width:100%;width:100%}
.logo>div{min-width:0;overflow:hidden}
.logo b,.logo small{display:block;overflow:hidden;text-overflow:ellipsis;max-width:100%;white-space:nowrap}
.top .back{display:inline-block!important;position:absolute;right:9px;top:50%;transform:translateY(-50%);font-size:10px;max-width:90px;padding:7px 6px;white-space:nowrap;z-index:2}
}

/* Theme catalog v0.2 — automatic data-driven list, compact desktop/mobile. */
.theme-total{font-weight:normal;font-size:11px;color:#876b47}
.theme-buttons{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.theme-buttons button{font-size:11px;min-width:0;white-space:normal;overflow-wrap:anywhere;padding:8px 7px}
.theme-buttons button:first-child{grid-column:span 2}
.theme-buttons button[aria-pressed=true]{background:#3b2f26;color:#f7eccd;border-color:#3b2f26}
.theme-count{font-size:10px;opacity:.82;margin-left:5px}
.theme-search-label{display:block;font-size:10px;margin:11px 9px 5px}
.theme-entry{display:flex;align-items:center;text-align:left;gap:7px;padding:7px 7px;background:#f7ecd4;border:1px solid #bca584;color:#3e3021;cursor:pointer;min-width:0;width:100%;font-size:11px}
.theme-entry span.theme-name{flex:1;min-width:0;overflow-wrap:anywhere}
.theme-entry[aria-pressed=true]{background:#3b2f26;color:#fff0c7;border-color:#3b2f26}
.theme-entry:focus-visible,.theme-buttons button:focus-visible{outline:3px solid #087eac;outline-offset:1px}
.theme-empty{padding:0 10px 12px;font-size:11px}
@media(max-width:790px){
 .theme-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:4px}
 .theme-buttons button:first-child{grid-column:auto}
 .theme-buttons button{font-size:10px;padding:8px 4px;text-align:center}
 .theme-count{display:inline-block;margin-left:3px}
 .theme-entry{font-size:12px;min-height:37px}
}

/* Stage31 / research-first comparative interface. Keep parchment and mobile map. */
.workspace{grid-template-columns:288px minmax(0,1fr) 350px}
.filters,.compare{scrollbar-width:thin;padding:16px}
.filters h1{font-size:23px;letter-spacing:0}
.filters .intro{font-size:12px;line-height:1.7;color:#6b543a;margin-bottom:9px}
.scope-summary{border-left:3px solid #856841;background:#e8d8b7;padding:10px;margin:11px 0;color:#4c3b2a}
.scope-summary b,.scope-summary span{display:block;font-size:11px;line-height:1.65}
.scope-summary span{font-size:10px;color:#746046}
.theme-buttons{grid-template-columns:repeat(3,minmax(0,1fr));gap:5px}
.theme-buttons button,.theme-buttons button:first-child{grid-column:auto;display:flex;min-height:43px;padding:7px 5px;align-items:center;justify-content:center;flex-wrap:wrap;gap:3px;text-align:center;touch-action:manipulation}
.theme-buttons button .theme-name{font-size:12px;font-weight:bold}
.theme-buttons button .theme-count{font-size:9px}
.theme-buttons button .topic-dot{display:block;width:9px;height:9px;border-radius:50%;border:1px solid #fff8}
.theme-entry{min-height:35px;touch-action:manipulation}
.theme-entry .topic-dot{display:block;width:10px;height:10px;flex:0 0 auto;border:1px solid #fff8;border-radius:50%}
.theme-entry .theme-name{flex:1}
.hint{margin:4px 0 12px;font-size:10px;color:#745b3c}
.form-heading{display:flex;justify-content:space-between;gap:6px;font-size:12px;font-weight:bold;margin:12px 0 6px}
.form-heading span{font-size:10px;font-weight:400;color:#87664a}
#motifSelect{display:block;width:100%;max-width:100%;padding:8px 7px;background:#fff7e5;border:1px solid #aa926e;border-radius:3px;color:#423023;font-size:12px;min-height:39px;touch-action:manipulation}
.motif-definition{margin:6px 0 13px;font-size:10px!important;line-height:1.65!important;color:#70543c;background:#eee0c4;padding:8px;overflow-wrap:anywhere}
.research-notes{margin-top:14px;border:1px solid #bea584;padding:8px;background:#eee0c5;font-size:11px}
.research-notes summary{cursor:pointer;font-weight:bold;padding:3px 0}
.research-notes p{line-height:1.65;overflow-wrap:anywhere}
.research-notes h3{font-size:11px;border-bottom:1px solid #c7b08c;margin-top:12px}
.compare h2:first-of-type{font-size:16px;margin-top:7px}
.scope-note{font-size:10px;background:#f4ead4;padding:7px 8px;border-left:2px solid #7b6c53}
.source-link{font-size:10px;font-weight:bold;overflow-wrap:anywhere}
.source-rating{color:#7c6042;font-size:9px}
.method p{font-size:11px;line-height:1.7;overflow-wrap:anywhere}
.method{padding-bottom:15px}
.back-home{display:inline-block;margin:8px 0;padding:10px 12px;border:1px solid #997b53;background:#f8ead0;text-decoration:none;font-size:11px;min-height:40px}
button:focus-visible,select:focus-visible,summary:focus-visible{outline:2px solid #087eac;outline-offset:2px}
@media(min-width:1150px){.workspace{grid-template-columns:300px minmax(0,1fr) 410px}}
@media(max-width:1050px) and (min-width:791px){.workspace{grid-template-columns:220px minmax(0,1fr) 280px}.filters,.compare{padding:10px}.theme-buttons button .theme-name{font-size:10px}}
@media(max-width:790px){
 .workspace{display:flex;flex-direction:column}
 .filters{order:0;padding:12px 13px 8px}
 .filters h1{display:block;font-size:21px;margin:7px 0 5px}
 .filters .intro{display:block;font-size:11px}
 .filters h2{display:block!important}
 .scope-summary{margin:6px 0 9px;padding:7px 10px}
 .form-heading{margin:9px 0 5px}
 .theme-buttons{grid-template-columns:repeat(3,minmax(0,1fr))}
 .theme-buttons button{min-height:39px}
 .theme-buttons button .topic-dot{display:none}
 .theme-buttons button .theme-name{font-size:11px}
 .research-notes{display:none}
 #motifSelect{min-height:38px}
 .motif-definition{margin:5px 0;padding:6px 8px}
 .maparea{order:1;height:min(43vh,440px);min-height:240px}
 .compare{order:2;padding:15px}
 .compare>p.mini{display:block;font-size:11px!important}
 .map-foot{white-space:normal}
}
@media(max-width:390px){
 .maparea{min-height:235px}
}

/* Stage33: source-scoped scientific research UI. No automated correspondence verdict. */
.research-science{margin:20px 0 12px;padding:12px 9px;border:1px solid #b69a73;background:#eadbbf}
.research-science h2{margin:6px 0 8px}
.science-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:5px;margin:8px 0}
.science-filters button{font-size:10px;min-height:40px;padding:6px 2px;line-height:1.2;color:#4c3728;background:#faf0d9;border:1px solid #b9a17b;touch-action:manipulation;overflow-wrap:anywhere;cursor:pointer}
.science-filters button small{font-size:9px;opacity:.75}
.science-filters button[aria-pressed=true]{background:#3b4642;color:#f6e6ce;border-color:#3b4642}
.science-state{font-size:10px;line-height:1.6;color:#5d4c35;padding:6px 0}
.research-science-list{max-height:370px;overflow-y:auto;scrollbar-width:thin}
.study-catalog-card{border:1px solid #c5ad87;background:#f5ead4;margin:9px 0;padding:10px;overflow-wrap:anywhere}
.study-catalog-card b{font-size:11px;line-height:1.5}
.study-catalog-card p{font-size:10px;line-height:1.7;margin:5px 0}
.study-catalog-card .source-link{display:inline-block;margin:7px 9px 5px 0}
.science-warning{border-left:3px solid #85734e;color:#5e492c;background:#ecdfc4;padding:8px;font-size:10px;line-height:1.6}
.study-detail-open{display:block;border:1px solid #967958;padding:9px 10px;min-height:38px;color:#3b2b1f;background:#fffaeb;font-size:11px;text-align:left;cursor:pointer}
.study-detail-open:focus-visible{outline:2px solid #0e7598;outline-offset:2px}
.research-science-detail:not(:empty){border:1px solid #937653;background:#faf0d8;padding:10px;margin:12px 0;overflow-wrap:anywhere}
.research-science-detail h3{font-size:12px;margin:1px 0 9px}
.research-science-detail p{font-size:11px;line-height:1.7}
.research-science-detail>.source-link{display:block;margin:8px 0}
.science-literature{border-top:1px solid #b99c70;margin:12px 0;padding-top:9px}
.science-literature summary{font-size:11px;font-weight:bold;line-height:1.7;cursor:pointer}
@media(max-width:790px){.research-science{margin-top:17px;padding:11px}.research-science-list{max-height:none}.science-filters button{font-size:11px;min-height:43px}}

/* Stage35 date provenance: case-by-case, no misleading continuous BP/BCE scale. */
#chronologyArchive{margin:14px 0;border-top:2px solid #987a53}
#researchChronologyPolicy{margin:8px 0}
.chronology-case{margin:8px 0;background:#f5ead5;border:1px solid #bda27b;overflow-wrap:anywhere}
.chronology-case>summary{font-size:11px;line-height:1.6;cursor:pointer;padding:11px 9px;font-weight:bold;color:#4b3423}
.chronology-case[open]>summary{border-bottom:1px solid #c7b28d}
.chronology-body{padding:9px}
.chronology-hypothesis{font-size:11px;line-height:1.7}
.chronology-anchor{border-left:2px solid #967d61;margin:9px 0;padding:3px 8px 7px;background:#fbf1db}
.chronology-anchor .chronology-type{display:block;font-size:10px;color:#67573d;font-weight:bold;margin-bottom:3px}
.chronology-anchor strong{display:block;font-size:11px;line-height:1.6}
.chronology-anchor p{font-size:10px;line-height:1.65;margin:6px 0}
.chronology-unit{display:block;font-size:9px;line-height:1.5;color:#786044;margin:6px 0 2px}
.chronology-anchor a{display:inline-block;overflow-wrap:anywhere;font-size:10px}

/* Stage38: equal thematic browsing; scientific research takes priority over A/B pairs. */
.theme-buttons.theme-all{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;max-height:min(43vh,390px);overflow-y:auto;overscroll-behavior:contain;padding:4px;background:#ead9b9;border:1px solid #c3aa81}
.theme-all .theme-entry{display:flex;align-items:center;gap:5px;min-height:36px;line-height:1.35;padding:7px;white-space:normal;text-align:left}
.theme-all .theme-entry:first-child{grid-column:auto}
.theme-all .theme-count{margin-left:auto;flex:0 0 auto;font-size:10px}
.theme-all .theme-name{flex:1}
.theme-search-inline{width:100%;box-sizing:border-box;border:1px solid #b4a07d;background:#fff8ea;color:#443426;padding:9px;margin:0 0 8px;font-size:12px}
.research-panel>h2{font-size:16px;line-height:1.6;margin:12px 0 7px}
.research-region-peek{padding:11px 10px;border:1px solid #bca27a;background:#fff2d7;margin:12px 0;overflow-wrap:anywhere}
.research-region-peek[hidden]{display:none!important}
.research-region-peek h3{font-size:13px;margin:6px 0;line-height:1.5}
.region-myth-entry{font-size:11px;line-height:1.7;border-top:1px solid #bea88a;padding:8px 0}
.region-myth-entry p{margin:5px 0}
.peek-close{float:right;cursor:pointer;border:1px solid #a38c70;background:#f1dfba;padding:6px 10px;font-size:11px}
#motifSelect:disabled{opacity:.65}
.workspace{grid-template-columns:255px minmax(0,1fr) 350px}
.filters,.compare{padding:14px}
@media(max-width:1060px){.workspace{grid-template-columns:235px minmax(0,1fr) 310px}.filters,.compare{padding:11px}}
@media(max-width:790px){
.workspace{display:flex;flex-direction:column;height:auto}
.filters,.compare{width:100%;padding:13px 14px}
.filters h2:nth-of-type(n+2){display:block}
.filters .mini{display:block}
.theme-buttons.theme-all{grid-template-columns:repeat(3,minmax(0,1fr));max-height:190px}
.theme-all .theme-entry{padding:8px 5px;min-height:38px;font-size:11px}
.research-panel{order:2}
.research-panel>h2{display:block;font-size:15px}
}

/* Stage39 shared Japanese brand on the research page. */
.logo b{font-family:"Yu Mincho","Noto Serif JP",serif;font-weight:600;letter-spacing:.12em}

/* Stage41: first-visit discovery, evidence choice, scholarly detail on demand. */
.filters .eyebrow{font-size:11px}
.filters h1{font-size:23px;line-height:1.35}
.mystery-questions{display:grid;gap:7px;margin-top:10px}
.mystery-question{display:flex;gap:9px;align-items:center;width:100%;border:1px solid #baa17a;border-radius:3px;background:#f8efd9;padding:10px;text-align:left;color:#443124;cursor:pointer;min-height:54px;touch-action:manipulation}
.mystery-question[aria-pressed=true]{background:#3b332a;border-color:#3b332a;color:#fbe9c7}
.mystery-question>span:nth-child(2){min-width:0;flex:1}
.mystery-question strong{display:block;font-size:12px;line-height:1.45;font-weight:700}
.mystery-question small{display:block;font-size:10px;line-height:1.5;opacity:.8;margin-top:2px}
.mystery-glyph{display:grid;place-items:center;width:29px;height:29px;border-radius:50%;border:1px solid currentColor;flex:0 0 auto;font-size:16px}
.mystery-arrow{font-size:17px}
.mystery-caption{font-size:10px;line-height:1.5;color:#71583d;margin:6px 0 12px}
.mystery-question:focus-visible,.science-filters button:focus-visible{outline:3px solid #147ba0;outline-offset:2px}
.discovery-status{border-left:3px solid #7f6546;margin:9px 0 14px}
.discovery-status b{font-size:12px}
.discovery-guide{border-left:3px solid #6f8257;background:#f5ecd7;padding:10px;margin:12px 0;line-height:1.7}
.discovery-guide b{display:block;font-size:12px}
.discovery-guide p{font-size:11px;margin:5px 0 0;line-height:1.7}
.science-filters{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.science-filters button{min-height:71px;padding:9px 6px;text-align:center;line-height:1.4}
.science-filters button strong{display:block;font-size:11px;line-height:1.45}
.science-filters button small{display:block;font-size:9px;margin-top:4px;line-height:1.45}
.research-panel .mini{line-height:1.8!important}
@media(max-width:790px){
 .filters h1,.filters>p.intro{display:block}
 .filters h1{font-size:22px}
 .mystery-questions{display:flex;gap:8px;overflow-x:auto;scroll-snap-type:x mandatory;padding:3px 1px 7px;scrollbar-width:thin}
 .mystery-question{min-width:205px;max-width:225px;flex:0 0 auto;scroll-snap-align:start;min-height:67px}
 .mystery-caption{font-size:11px}
 .science-filters button{min-height:73px}
 .science-filters button strong{font-size:11px}
}
@media(max-width:390px){.science-filters button{padding:8px 4px}.science-filters button strong{font-size:10px}.science-filters button small{font-size:9px}}

/* Stage43B privacy & site information. */
.site-trust-links{text-align:center;font-size:11px;line-height:1.8;background:#352b22;padding:12px;color:#d7c3a5}.site-trust-links a{color:#f9e5bf;text-underline-offset:3px}.site-trust-links a:focus-visible{outline:3px solid #e9c58a;outline-offset:3px}
