:root{color-scheme:light;--ink:#27372f;--muted:#66736a;--paper:#f6f3eb;--green:#254d3e;--line:#dcded2;--copper:#a65d33;font-family:"Microsoft YaHei","PingFang SC",system-ui,sans-serif}*{box-sizing:border-box}html{scroll-behavior:smooth;scroll-padding-top:90px}body{margin:0;background:var(--paper);color:var(--ink);line-height:1.75}button,input{font:inherit}button,a,input{touch-action:manipulation}a{color:var(--green);text-underline-offset:4px}button{cursor:pointer;border:1px solid var(--line);border-radius:7px;background:#fffdf7;color:var(--ink);padding:8px 13px}button:hover{border-color:var(--green)}button:disabled{cursor:default;opacity:.5}[hidden]{display:none!important}:focus-visible{outline:3px solid #b76f3d;outline-offset:3px}.skip{position:absolute;left:10px;top:-100px}.skip:focus{top:10px;background:white;z-index:20}.topbar{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px max(5vw,20px);border-bottom:1px solid var(--line);background:var(--paper)}.brand{font-weight:800;text-decoration:none;font-size:15px}.topbar nav{display:flex;align-items:center;gap:16px;font-size:14px}.quiet{background:transparent}main{width:min(1280px,90vw);margin:auto}.hero{display:grid;grid-template-columns:1.2fr 1fr;align-items:center;gap:40px;padding:64px 0 40px}.eyebrow{letter-spacing:.2em;color:var(--copper);font-size:12px;font-weight:700}h1{font-family:"Noto Serif SC","Songti SC",SimSun,serif;font-size:clamp(32px,4.2vw,55px);line-height:1.24;margin:18px 0 22px;font-weight:800;letter-spacing:.03em}h1 span{display:block;font-size:.65em;font-weight:500;margin-top:10px}.lead{color:var(--muted);font-size:15px;line-height:2}.stats{display:flex;flex-wrap:wrap;gap:28px;margin-top:25px;font-size:12px;color:var(--muted)}.stats b{font-size:24px;color:var(--green);margin-right:6px;font-family:Georgia,serif}.city-art{height:260px;position:relative;overflow:hidden;background:#dfe6d9;border:1px solid #c9d2c3;border-radius:140px 140px 8px 8px}.city-art:before{content:"";position:absolute;inset:16px;border:1px solid #b7c4af;border-radius:130px 130px 0 0}.pillar{position:absolute;bottom:45px;background:#62796a;clip-path:polygon(25% 0,75% 0,100% 100%,0 100%)}.p1{left:12%;height:150px;width:60px}.p2{left:43%;height:205px;width:80px;background:#345b49}.p3{left:75%;height:130px;width:58px}.forge{position:absolute;bottom:55px;width:68px;height:55px;background:#c88c5a;clip-path:polygon(0 100%,0 50%,20% 50%,20% 0,80% 0,80% 50%,100% 50%,100% 100%)}.f1{left:10%}.f2{left:47%;height:75px}.f3{left:73%}.water{position:absolute;bottom:0;height:46px;left:0;right:0;background:repeating-linear-gradient(0deg,#9eafa1 0 2px,#dfe6d9 2px 8px)}.city-art>span{position:absolute;bottom:7px;left:20px;letter-spacing:.25em;font:11px Georgia;color:#395947}.notice{border-left:3px solid #a17744;padding:12px 18px;background:#ecebdd;font-size:14px;margin:6px 0 25px}.notice.error{border-color:#a03930;color:#8d2d26}.layout{display:grid;grid-template-columns:225px 1fr;gap:40px;align-items:start;padding-bottom:60px}aside{position:sticky;top:20px;max-height:calc(100vh - 40px);overflow:auto;padding-right:8px}.search-label{font-size:13px;font-weight:700}.search-box{display:flex;margin-top:9px;border:1px solid #bdc9bc;border-radius:7px;background:#fffdf7}.search-box input{min-width:0;width:100%;border:0;padding:10px;background:transparent;font-size:13px}.search-box button{border:0;background:transparent;padding:6px 12px}.muted{color:var(--muted);font-size:12px}#filters{display:flex;flex-wrap:wrap;gap:6px;margin:20px 0}#filters button{font-size:12px;padding:4px 10px;border-radius:30px}button[aria-pressed=true]{background:var(--green);color:white;border-color:var(--green)}#family-index{display:flex;flex-direction:column;gap:2px;border-top:1px solid var(--line);padding-top:14px}#family-index a{font-size:13px;padding:5px 9px;text-decoration:none;border-radius:4px}#family-index a:hover{background:#e5eadf}.tabs{display:flex;gap:8px;border-bottom:1px solid var(--line);padding-bottom:18px;margin-bottom:22px;position:relative}.tabs button{border-radius:5px;padding:8px 16px;font-size:14px}.family{border:1px solid var(--line);border-radius:9px;padding:25px 27px;background:#fffdf7;margin-bottom:20px;scroll-margin-top:25px}.family-head{display:flex;align-items:start;justify-content:space-between;gap:16px}.family h2{margin:0;font-family:SimSun,serif;font-size:26px;line-height:1.4}.tag{font-size:11px;color:var(--copper);border:1px solid #dfcbb7;border-radius:4px;padding:2px 7px;white-space:nowrap}.trade{font-size:12px;color:var(--muted);margin:5px 0 0}.summary{font-size:14px;line-height:1.9;margin:16px 0 20px}.subheading{font-size:12px;color:var(--muted);margin:18px 0 10px;padding-top:16px;border-top:1px solid var(--line);font-weight:700}.npc{background:#f4f4ec;border:1px solid #e2e5d8;border-radius:7px;padding:15px 17px;margin:10px 0}.npc-header{display:flex;align-items:start;justify-content:space-between;gap:14px}.npc h3{font-size:17px;margin:0 0 2px}.role,.location{color:var(--muted);font-size:12px;margin:0}.npc p:not(.role):not(.location){font-size:13px;margin:10px 0}.reveal{font-size:12px;display:flex;align-items:center;gap:8px;white-space:nowrap}.reveal input{accent-color:var(--green);width:17px;height:17px}.private{border-left:2px solid #b38b59;padding:2px 0 2px 12px;margin-top:13px}.private p{color:#69513c}.private-label{font-size:11px;font-weight:700;color:#8a6236}.story{border:1px solid var(--line);border-radius:6px;margin:10px 0;padding:12px 16px;background:white}.story summary{cursor:pointer;font-size:14px;font-weight:600}.story p{font-size:13px;line-height:1.95}.story-tools{display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-top:12px}.source{font-size:11px}.editor-note{font-size:12px;color:#785b3a}.empty{color:var(--muted);font-size:13px;padding:15px 0}.primary{background:var(--green);border-color:var(--green);color:white}.primary:hover{background:#1c3e31}.admin{padding:20px 24px;border:1px solid #c5bb9e;background:#eeeddd;border-radius:8px;margin-bottom:28px}.admin b{font-size:16px}.admin p{font-size:13px;margin:5px 0}.admin-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px}#save-status{color:var(--green);min-height:1em}footer{border-top:1px solid var(--line);font-size:12px;color:var(--muted);padding:25px 0 40px}footer p{margin:3px 0}dialog{width:min(440px,90vw);border:1px solid #bec8b7;border-radius:10px;background:var(--paper);padding:30px;color:var(--ink)}dialog::backdrop{background:#172b2380}dialog h2{font:700 27px SimSun,serif;margin:12px 0}dialog p{font-size:13px}dialog label{font-size:13px}dialog input{display:block;width:100%;padding:10px 12px;border:1px solid #b9c6b6;border-radius:5px;background:#fffdf7;margin:6px 0 12px}dialog .primary{width:100%}.close{position:absolute;right:10px;top:10px;border:0;background:transparent}#login-error{color:#a13b2c;min-height:1em}.family .source{display:inline-block;margin-top:5px}.preview-badge{color:#a66a34;font-weight:700}
@media(max-width:850px){main{width:92vw}.hero{gap:22px;padding-top:36px}.city-art{height:220px}.layout{grid-template-columns:185px 1fr;gap:22px}.family{padding:20px}.family-head{gap:10px}.npc-header{flex-wrap:wrap}.stats{gap:15px}}
@media(max-width:620px){.topbar{padding:14px 4vw;align-items:start}.topbar nav{gap:10px;font-size:12px;flex-wrap:wrap;justify-content:flex-end}.brand{max-width:130px;font-size:13px}.topbar button{font-size:12px;padding:4px 7px}.hero{grid-template-columns:1fr;gap:10px;padding:26px 0 22px}.city-art{display:none}.lead{font-size:13px}.stats{margin-top:16px}.layout{display:block}aside{position:static;max-height:none;overflow:visible;padding:0}#family-index{display:none}#filters{margin:13px 0 22px}.tabs{gap:6px}.tabs button{flex:1;font-size:12px;padding:9px 5px}.family{padding:18px;margin-bottom:14px}.family h2{font-size:23px}.family-head{flex-wrap:wrap}.summary{font-size:13px}.npc{padding:13px}.npc h3{font-size:16px}.admin{padding:17px}.admin-actions{gap:7px}.admin-actions button{font-size:12px}.reveal{white-space:normal}.notice{font-size:12px;padding:10px 13px}.story{padding:11px 12px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}}
