*{box-sizing:border-box}body{margin:0;background:#f2efe7;color:#273b49;font:16px/1.65 'Malgun Gothic',sans-serif;word-break:keep-all}header{height:64px;display:flex;align-items:center;gap:16px;padding:0 1.2%;background:#fffdf7;border-bottom:1px solid #c8b282}header strong{font-size:20px;white-space:nowrap}nav{display:flex;gap:5px;margin-left:auto}button,select,input{font:inherit;color:inherit}button{cursor:pointer;background:#fffdf8;border:1px solid #c7b88e;border-radius:7px;padding:7px 13px}button:hover,button:focus-visible{background:#eee1c5;outline:2px solid #b49a62}.brand{color:#8b6b30;font-weight:bold}main{width:98%;height:calc(100dvh - 80px);margin:8px auto;display:flex;flex-direction:column;gap:10px;min-height:0}h1,h2,h3,p{margin:0 0 10px}h1{font-size:clamp(26px,3vw,58px);line-height:1.3}h2{font-size:22px}h3{font-size:18px}small,.muted{color:#6d716e}.hero{flex:1;min-height:0;display:grid;grid-template-columns:64% 36%;background:#fffdf8;border:1px solid #c8b282;border-radius:14px;overflow:hidden}.hero img{width:100%;height:100%;min-height:0;object-fit:contain;background:#e9e3d5}.heading{display:flex;flex-direction:column;justify-content:center;text-align:center;padding:20px}.heading h1{color:#293f52}.heading b{color:#967438;letter-spacing:3px}.tiles{display:grid;grid-template-columns:repeat(6,1fr);gap:12px;flex:0 0 29%}.tile{padding:0;overflow:hidden;display:flex;flex-direction:column;align-items:stretch;text-align:center}.tile .art{height:48%;min-height:48%;background:#e7ddc5;display:grid;place-items:center;font:clamp(30px,5vw,78px) Georgia,serif;color:#8c7143}.tile b{font-size:clamp(16px,1.4vw,26px);padding:8px}.tile span{padding:0 7px 6px;font-size:clamp(12px,1vw,18px)}.era{display:flex;gap:6px}.era button{flex:1;font-size:14px}.toolbar{display:flex;align-items:center;gap:9px;flex-wrap:wrap;background:#fffdf8;border:1px solid #d4c6a7;padding:8px 14px;border-radius:9px}.toolbar h2{margin:0;margin-right:auto}select,input{background:white;border:1px solid #c7b88e;border-radius:5px;padding:6px 10px}.body{flex:1;min-height:0;overflow:auto}.countries{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;flex:1;min-height:0}.country,.article,.summary{background:#fffdf8;border:1px solid #d4c6a7;border-radius:9px;padding:15px}.country{overflow:auto;border-top:5px solid var(--c)}.country h2{color:var(--c)}.summary{flex:0 0 auto;max-height:23%;overflow:auto}.label{font-size:13px;color:#876a38;font-weight:bold;letter-spacing:.5px;margin-top:13px}.eventlink{display:block;width:100%;text-align:left;margin:6px 0}.split{display:grid;grid-template-columns:minmax(220px,24%) 1fr;gap:12px;flex:1;min-height:0}.sidebar,.reader{overflow:auto;background:#fffdf8;border:1px solid #d4c6a7;border-radius:9px;padding:14px}.sidebar button{width:100%;text-align:left;margin:3px 0}.reader{padding:24px}.reader p{max-width:115ch;line-height:1.9}.reader h3{color:#876a38;margin-top:20px}.active{background:#e7d7b5}.graph{position:relative;min-height:440px;height:100%;background:#fffdf8;border:1px solid #d4c6a7;border-radius:10px;overflow:auto}.graph svg{width:100%;height:100%;min-width:650px;min-height:440px}.graph g[tabindex]{cursor:pointer}.graph g[tabindex]:hover rect{fill:#ead7b1}.legend{font-size:14px}.mapframe{display:grid;grid-template-columns:1fr 1fr;gap:15px;height:100%}.mapframe svg{width:100%;height:100%;min-height:340px;background:#e2edf0;border-radius:12px}dialog{max-width:850px;width:90%;border:1px solid #ad9462;border-radius:12px;background:#fffdf8;color:inherit;padding:24px}dialog::backdrop{background:#26374799}dialog>button{float:right}a{color:#315b89}footer{font-size:12px;color:#6d716e;text-align:right} @media(max-width:1050px){header strong{display:none}nav{overflow:auto}nav button{white-space:nowrap} .tiles{grid-template-columns:repeat(3,1fr)}main{height:auto;min-height:90vh}.hero{min-height:300px}.tile{min-height:150px}.countries{grid-template-columns:repeat(2,1fr)}.country{max-height:600px}.split{min-height:70vh}.era{flex-wrap:wrap}.era button{min-width:20%}}@media(max-width:650px){.hero,.countries,.split,.mapframe{grid-template-columns:1fr}.hero img{max-height:240px}.tiles{grid-template-columns:repeat(2,1fr)}.sidebar{max-height:230px}.reader{padding:15px}.country{max-height:none}.summary{max-height:none}}

body{background: url(texture.svg) center/cover fixed; color:#243b4b}header,.toolbar,.reader,.sidebar,.country,.summary,.article,.graph,dialog{background:linear-gradient(115deg,#fffdf5ed,#f7efdfdf),url(texture.svg) center/cover;box-shadow:0 3px 14px #59432112}.hero{display:block;flex:1;background:transparent;box-shadow:0 4px 16px #59432130;border:2px solid #b79b62}.hero img{display:block;object-fit:contain;background:linear-gradient(110deg,#e7d6b5,#faf4e5)}.tiles{flex:0 0 35%;gap:12px}.tile{background:linear-gradient(150deg,#fffdf7,#e9dec4);border:1px solid #b49a65;box-shadow:0 4px 10px #59432120}.tile .art{width:100%;height:58%;min-height:0;object-fit:cover}.tile b{font-family:Batang,serif;font-size:clamp(18px,1.55vw,30px);padding:5px}.tile span{line-height:1.45}.era{position:relative;padding-top:12px}.era:before{content:"";position:absolute;top:5px;left:4%;right:4%;height:2px;background:#b89b62}.era button{position:relative;background:linear-gradient(#fffdf6,#eee2c8);font-size:13px}.era button:before{content:"";position:absolute;top:-12px;left:50%;width:9px;height:9px;background:#a88849;border-radius:50%}.era strong{color:#89652d}.reader p{max-width:none}.country button{white-space:normal}.graph svg{min-height:540px}@media(max-width:1050px){.hero img{height:auto}.tile .art{height:100px}.era:before,.era button:before{display:none}}body{background:url(country1.webp) center/cover fixed} .country{background-image:url(country0.webp);background-size:100% 100%;background-attachment:local}.country:nth-child(2){background-image:url(country1.webp)}.country:nth-child(3){background-image:url(country2.webp)}.country:nth-child(4){background-image:url(country3.webp)}.reader,.article,.graph,.sidebar,.summary,dialog{background-image:linear-gradient(#fffaf0a8,#fffaf0a8),url(country1.webp);background-size:cover;background-position:center bottom}.toolbar,header{background-image:url(country0.webp);background-position:center 30%;background-size:cover}.country p{background:#fffaf0b0;padding:5px;border-radius:4px}.mapframe{grid-template-columns:65% 35%;gap:8px}.mapframe .article{overflow:auto}.mapframe svg{background:none}.mapframe .article p{font-size:15px}.mapnote{font-size:12px;color:#6d716e}@media(max-width:650px){.mapframe{grid-template-columns:1fr}}

.nationtabs{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.nationtabs button{background:linear-gradient(#fffaf055,#fffaf0aa),var(--bg) center/cover;border:2px solid var(--c);color:var(--c);font-size:20px;font-weight:bold;padding:15px}.nationtabs button.chosen{box-shadow:inset 0 -5px var(--c),0 2px 8px #3333}.nationtabs small{font-size:13px}#rolebar{display:flex;gap:5px;flex-wrap:wrap}#plist small{display:block;color:#746a57}.mapframe{grid-template-columns:minmax(0,65fr) minmax(0,35fr)}
/* V7: independent photographic illustration, paper and engraved ornament layers */
body{background:#d9d0bc url(landscape.webp) center/cover fixed;color:#233b43}header,.toolbar{background:linear-gradient(100deg,#faf4e6e8,#e4d1a9a8),url(ornament.webp) right center/auto 180%;border:1px solid #a88a50;box-shadow:0 3px 12px #34281738,inset 0 1px #fff9e8}header strong,h1,h2,h3,.tile b{font-family:'Noto Serif KR',Batang,serif}header strong{color:#253d43}.reader,.sidebar,.article,.summary,.country,.graph,dialog{background:linear-gradient(120deg,#fffdf5f0,#f5ead6e8),url(paper.webp) center/700px 400px;border:1px solid #b69a65;box-shadow:0 5px 18px #34281735,inset 0 0 0 3px #fff9e880;border-radius:10px}.reader{background:linear-gradient(100deg,#fffdf5f5,#f8efdef0),url(paper.webp) center/700px 400px;padding:25px 32px}.country{border-top:4px solid var(--c);background:linear-gradient(180deg,#fffdf5ed 0%,#fff8e8eb 55%,#f7e9cbb0 100%),url(landscape.webp) center bottom/auto 100%}.country:nth-child(n){background-image:linear-gradient(180deg,#fffdf5ed,#fff8e8eb 55%,#f7e9cbb0),url(landscape.webp)}.country p{background:none;padding:0}.country h2,.reader h3,.article h3{border-bottom:1px solid #c6aa72;padding-bottom:7px}.reader h3{margin-top:24px;color:#80602c}.reader p{line-height:1.95}button,select,input{background:linear-gradient(175deg,#fffdf5e8,#e6d4ace0),url(paper.webp) center/cover;border:1px solid #b39963;box-shadow:inset 0 1px 1px #fff,0 2px 4px #4d382322;border-radius:6px}button:hover,button:focus-visible,.active{background:linear-gradient(165deg,#fff4d3,#c7a76a),url(ornament.webp) center/cover;box-shadow:inset 0 1px #fff,0 3px 7px #4d382344}nav button,.brand{font-weight:bold}.nationtabs button{background:linear-gradient(110deg,#fff8e5e8,#e6d4a9a0),url(ornament.webp) right center/cover;box-shadow:inset 0 1px #fff,0 4px 9px #34281730}.nationtabs button.chosen{background:linear-gradient(110deg,#fff9e4d9,#d9c28ab0),url(landscape.webp) center 65%/cover;box-shadow:inset 0 -5px var(--c),0 4px 12px #34281744}.tile{background:linear-gradient(140deg,#fff8e5e8,#d8c093b0),url(ornament.webp) center/cover;box-shadow:0 5px 15px #34281744,inset 0 0 0 3px #fff7df70}.era button{background:linear-gradient(160deg,#fff8e6e8,#d6bf8cc0),url(paper.webp) center/cover}.legend{background:linear-gradient(100deg,#fff9e8ed,#e7d5b1e0),url(paper.webp);padding:8px 14px;border-radius:6px}.biohead{padding:22px 24px;background:linear-gradient(90deg,#fff9e9f5,#fff6e0b0 60%,#fff6e045),url(landscape.webp) center 60%/cover;border:1px solid #b69a65;border-radius:9px;box-shadow:inset 0 0 0 3px #fff9e870}.biohead h2{font-size:30px;margin-bottom:4px}.biohead p{margin:0}.biosection{padding:0 5px}.sidebar button.selected{border-color:#80602c;background:linear-gradient(110deg,#e9d4a7,#fff4d9);box-shadow:inset 4px 0 #98733d}.hero{box-shadow:0 6px 18px #34281755}.hero img{background:url(paper.webp) center/cover}footer{background:#fff8e3d9;padding:2px 8px;border-radius:4px}.graph g[tabindex] rect{fill:url(#nodepaper)}
