:root{--bg: #0b0b0d;--panel: #121216;--line: rgba(255, 255, 255, .08);--text: #ededf0;--muted: #8e8e99;--dim: #6b6b75;--green: #34d399;--amber: #d08a1e;--city-fill: #232329;--city-hover: #34343d}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:PingFang SC,Hiragino Sans GB,Microsoft YaHei,system-ui,-apple-system,Segoe UI,sans-serif;-webkit-font-smoothing:antialiased;overscroll-behavior:none}button{font-family:inherit}.app{position:fixed;inset:0;display:flex;flex-direction:column}.topbar{position:relative;z-index:30;flex:0 0 auto;display:flex;align-items:center;gap:14px;padding:10px 18px;background:#0d0d10;border-bottom:1px solid rgba(255,255,255,.06)}.brand{display:flex;align-items:center;gap:8px;flex:0 0 auto}.brand-dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px #34d39926}.brand-name{font-size:14px;font-weight:600;letter-spacing:.02em}.search-wrap{position:relative;flex:0 1 260px;min-width:140px}.search-input{width:100%;height:34px;padding:0 12px;border-radius:9px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);font-size:13px;outline:none}.search-input::placeholder{color:var(--dim)}.search-input:focus{border-color:#34d39973;background:rgba(255,255,255,.06)}.search-results{position:absolute;top:40px;left:0;right:0;margin:0;padding:6px;list-style:none;background:rgba(18,18,22,.98);border:1px solid var(--line);border-radius:10px;box-shadow:0 18px 40px #0000008c;max-height:320px;overflow:auto;z-index:40}.search-results button{width:100%;display:flex;align-items:center;gap:8px;padding:8px 10px;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer;text-align:left}.search-results button:hover{background:rgba(255,255,255,.06)}.sr-name{font-size:13.5px}.sr-prov{font-size:11.5px;color:var(--dim);margin-left:auto}.search-empty{position:absolute;top:40px;left:0;right:0;padding:10px 12px;font-size:12.5px;color:var(--muted);background:rgba(18,18,22,.98);border:1px solid var(--line);border-radius:10px;z-index:40}.stats{display:flex;align-items:center;gap:6px;font-size:12.5px;color:var(--muted);white-space:nowrap;flex:0 0 auto}.stats b{color:var(--text);font-weight:600}.stats .sep{color:#3a3a44}.stats .total{color:var(--dim);font-weight:400}.actions{display:flex;gap:8px;margin-left:auto;flex:0 0 auto}.ghost-btn{height:34px;padding:0 12px;border-radius:9px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);font-size:13px;cursor:pointer;white-space:nowrap}.ghost-btn:hover{background:rgba(255,255,255,.09)}.primary-btn{height:38px;padding:0 16px;border-radius:10px;border:0;background:var(--green);color:#06231a;font-size:13px;font-weight:600;cursor:pointer}.primary-btn:hover{filter:brightness(1.06)}.icon-btn{height:30px;padding:0 10px;border-radius:8px;border:1px solid var(--line);background:transparent;color:var(--muted);font-size:12.5px;cursor:pointer}.icon-btn:hover{color:var(--text);background:rgba(255,255,255,.06)}.map-canvas{position:relative;flex:1 1 auto;min-height:0;overflow:hidden;touch-action:none;cursor:grab;user-select:none;background:radial-gradient(120% 80% at 50% 0%,#131318 0%,#0b0b0d 60%)}.map-canvas:active{cursor:grabbing}.map-svg{display:block;width:100%;height:100%}.city-shape{fill:var(--city-fill);stroke:#0e0e12;stroke-width:.6;vector-effect:non-scaling-stroke;cursor:pointer;transition:fill .18s ease}.city-shape:hover{fill:#3d3d48;stroke:#34d39999;stroke-width:1.2}.dot-layer{pointer-events:none}.city-dot{pointer-events:auto;cursor:pointer}.dot-core{stroke:#0000008c;stroke-width:.5;vector-effect:non-scaling-stroke}.city-dot.visited .dot-core{fill:var(--green)}.city-dot.story .dot-core{fill:var(--amber)}.dot-halo{transform-box:fill-box;transform-origin:center;animation:dot-breathe 2.8s ease-out infinite}.city-dot.visited .dot-halo{fill:var(--green)}.city-dot.story .dot-halo{fill:var(--amber)}@keyframes dot-breathe{0%{transform:scale(.45);opacity:.55}70%,to{transform:scale(1.75);opacity:0}}.map-tooltip{position:absolute;width:264px;padding:12px 14px;border-radius:12px;background:rgba(20,20,25,.97);border:1px solid var(--line);box-shadow:0 16px 40px #0000008c;pointer-events:none;z-index:20;font-size:13px;line-height:1.55}.tt-head{display:flex;align-items:baseline;gap:8px;margin-bottom:6px}.tt-name{font-size:15px;font-weight:600}.tt-prov{font-size:11.5px;color:var(--dim)}.tt-tag{display:inline-block;font-size:11px;padding:1px 7px;border-radius:999px;margin-bottom:7px}.tt-tag.visited{color:#a7f3d0;background:rgba(52,211,153,.14)}.tt-tag.story{color:#f2cd94;background:rgba(208,138,30,.16)}.tt-line{font-size:12px;color:var(--muted);margin-bottom:6px}.tt-memory{color:#d9d9e0;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.tt-story{margin-top:6px;padding-top:6px;border-top:1px dashed rgba(255,255,255,.08);font-size:12.5px;color:#a9a9b4;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.tt-hint{font-size:12px;color:var(--dim)}.sheet-backdrop{position:fixed;inset:0;z-index:50;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(0,0,0,.55);backdrop-filter:blur(3px)}.sheet{width:min(1040px,100%);max-height:min(86vh,820px);display:flex;flex-direction:column;background:var(--panel);border:1px solid var(--line);border-radius:18px;box-shadow:0 30px 80px #000000a6;overflow:hidden}.sheet-head{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 22px;border-bottom:1px solid rgba(255,255,255,.06)}.sheet-title{display:flex;align-items:baseline;gap:10px;min-width:0}.sheet-title h2{margin:0;font-size:19px;font-weight:600}.sheet-prov{font-size:12.5px;color:var(--dim)}.sheet-tabs{display:none;flex:0 0 auto;gap:6px;padding:0 16px;border-bottom:1px solid rgba(255,255,255,.06)}.sheet-tabs button{flex:1;height:40px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--muted);font-size:13px;cursor:pointer}.sheet-tabs button.active{color:var(--text);border-bottom-color:var(--green)}.sheet-body{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr);gap:22px;padding:20px 22px 24px;overflow:auto}.col{min-width:0;display:flex;flex-direction:column}.col-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.col-head h3{margin:0;font-size:12.5px;font-weight:600;letter-spacing:.06em;color:var(--muted)}.story-summary{margin:0 0 14px;padding:10px 12px;border-radius:10px;border-left:2px solid rgba(52,211,153,.5);background:rgba(52,211,153,.06);color:#b9e8d6;font-size:13px;line-height:1.7}.story-html{font-size:14.5px;line-height:1.8;color:#d9d9e0;word-break:break-word}.story-view{overflow:auto}.story-html p{margin:0 0 12px}.story-html h1,.story-html h2,.story-html h3,.story-html h4{margin:18px 0 10px;line-height:1.4;color:var(--text)}.story-html h1{font-size:20px}.story-html h2{font-size:17px}.story-html h3{font-size:15.5px}.story-html ul,.story-html ol{margin:0 0 12px;padding-left:22px}.story-html li{margin-bottom:6px}.story-html blockquote{margin:14px 0;padding:10px 14px;border-left:2px solid var(--green);background:rgba(255,255,255,.03);color:#b4b4bf;border-radius:0 8px 8px 0}.story-html img{display:block;max-width:100%;height:auto;margin:14px 0;border-radius:10px;background:#1b1b21}.story-html a{color:#6ee7b7}.story-html hr{border:0;border-top:1px solid var(--line);margin:18px 0}.editor{display:flex;flex-direction:column;gap:10px;min-height:0}.editor-tools{display:flex;flex-wrap:wrap;gap:6px}.tool-btn{width:34px;height:32px;border-radius:8px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:#d9d9e0;font-size:12.5px;cursor:pointer;padding:0}.tool-btn:hover{background:rgba(255,255,255,.1)}.editor-area{min-height:280px;max-height:44vh;overflow:auto;padding:14px;border-radius:12px;border:1px solid var(--line);background:rgba(255,255,255,.02);outline:none}.editor-area:focus{border-color:#34d39973}.editor-area:empty:before{content:attr(data-placeholder);color:var(--dim)}.editor-actions{display:flex;align-items:center;gap:10px}.editor-hint{margin-right:auto;font-size:12px;color:var(--dim)}.empty-state{display:flex;flex-direction:column;align-items:flex-start;gap:10px;padding:26px 20px;border-radius:14px;border:1px dashed rgba(255,255,255,.1);background:rgba(255,255,255,.015)}.empty-title{margin:0;font-size:14px;color:var(--text)}.empty-hint{margin:0 0 6px;font-size:12.5px;line-height:1.65;color:var(--muted)}.switch-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 14px;border-radius:12px;border:1px solid rgba(255,255,255,.07);background:rgba(255,255,255,.03);font-size:14px}.switch{position:relative;width:46px;height:26px;flex:0 0 auto;padding:0;border:0;border-radius:999px;background:#2c2c34;cursor:pointer;transition:background .2s ease}.switch.on{background:#1f7a5a}.switch .knob{position:absolute;top:3px;left:3px;width:20px;height:20px;border-radius:50%;background:#fff;transition:transform .2s ease}.switch.on .knob{transform:translate(20px)}.field{display:flex;flex-direction:column;gap:6px;margin-top:16px}.field label{font-size:12px;letter-spacing:.04em;color:var(--muted)}.field input,.field textarea{width:100%;padding:10px 12px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.03);color:var(--text);font:inherit;font-size:14px;outline:none}.field textarea{min-height:132px;line-height:1.65;resize:vertical}.field input:disabled{opacity:.45}.field input:focus,.field textarea:focus{border-color:#34d39973}.field-note{margin-top:12px;font-size:12px;color:var(--dim)}.drawer-backdrop{position:fixed;inset:0;z-index:45;display:flex;justify-content:flex-end;background:rgba(0,0,0,.5);backdrop-filter:blur(2px)}.drawer{width:min(400px,100%);height:100%;display:flex;flex-direction:column;background:var(--panel);border-left:1px solid var(--line)}.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.06)}.drawer-head h2{margin:0;font-size:15px;font-weight:600}.drawer-empty{margin:0;padding:24px 18px;font-size:13px;line-height:1.7;color:var(--muted)}.drawer-list{flex:1;margin:0;padding:8px;list-style:none;overflow:auto}.drawer-list button{width:100%;display:flex;align-items:flex-start;gap:10px;padding:10px 12px;border:0;border-radius:10px;background:transparent;color:inherit;text-align:left;cursor:pointer}.drawer-list button:hover{background:rgba(255,255,255,.05)}.mini-dot{width:8px;height:8px;margin-top:6px;flex:0 0 auto;border-radius:50%;background:#3a3a44}.mini-dot.visited{background:var(--green);box-shadow:0 0 0 3px #34d39929}.mini-dot.story{background:var(--amber);box-shadow:0 0 0 3px #d08a1e29}.dl-main{display:flex;flex-direction:column;gap:3px;min-width:0}.dl-name{display:flex;align-items:baseline;gap:8px;font-size:14px}.dl-name em{font-style:normal;font-size:11.5px;color:var(--dim)}.dl-date{margin-left:auto;font-size:11.5px;color:var(--dim);font-variant-numeric:tabular-nums}.dl-snippet{font-size:12.5px;color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toast{position:fixed;left:50%;bottom:calc(28px + env(safe-area-inset-bottom,0px));transform:translate(-50%);z-index:80;max-width:min(90vw,480px);padding:10px 16px;border-radius:10px;border:1px solid rgba(255,255,255,.12);background:rgba(24,24,29,.97);color:var(--text);font-size:13px;line-height:1.5;text-align:center;box-shadow:0 16px 40px #00000080}.boot-screen{height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:24px;text-align:center}.boot-screen h1{margin:0;font-size:18px}.boot-screen p{margin:0;max-width:440px;font-size:13px;line-height:1.75;color:var(--muted)}.boot-screen code{padding:1px 5px;border-radius:4px;background:rgba(255,255,255,.07);font-size:12px}.boot-loading{color:var(--muted)}.boot-stack{max-width:min(90vw,720px);max-height:200px;overflow:auto;margin:0;padding:12px;border-radius:10px;border:1px solid var(--line);background:rgba(255,255,255,.03);color:var(--muted);font-size:11.5px;line-height:1.6;text-align:left;white-space:pre-wrap}.boot-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.login-screen{min-height:100%;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(120% 90% at 50% 0%,#14141a 0%,#0b0b0d 60%)}.login-card{width:min(360px,100%);display:flex;flex-direction:column;gap:12px;padding:28px 24px;border-radius:18px;border:1px solid var(--line);background:var(--panel);box-shadow:0 24px 60px #0000008c}.login-dot{width:10px;height:10px;border-radius:50%;background:var(--green);box-shadow:0 0 0 5px #34d39924}.login-card h1{margin:4px 0 0;font-size:20px;font-weight:600}.login-hint{margin:0 0 6px;font-size:13px;line-height:1.7;color:var(--muted)}.login-message{margin:0;padding:8px 10px;border-radius:8px;font-size:12.5px;color:#f2cd94;background:rgba(208,138,30,.14)}.login-input{width:100%;height:44px;padding:0 14px;border-radius:11px;border:1px solid var(--line);background:rgba(255,255,255,.04);color:var(--text);font-size:15px;outline:none}.login-input:focus{border-color:#34d39980}.login-error{margin:0;font-size:12.5px;color:#fca5a5}.login-btn{height:44px;width:100%;font-size:14px}.login-btn:disabled{opacity:.7;cursor:default}.login-offline{margin-top:2px;padding:4px;border:0;background:transparent;color:var(--dim);font-size:12.5px;cursor:pointer;text-decoration:underline;text-underline-offset:3px}.login-offline:hover{color:var(--muted)}.sync-chip{display:flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:999px;border:1px solid var(--line);background:rgba(255,255,255,.03);color:var(--muted);font-size:12px;cursor:pointer;white-space:nowrap;flex:0 0 auto}.sync-chip:disabled{cursor:default}.sync-dot{width:7px;height:7px;border-radius:50%;background:var(--dim)}.sync-chip.idle .sync-dot{background:var(--green)}.sync-chip.syncing .sync-dot{background:#eab308;animation:sync-pulse 1s ease-in-out infinite}.sync-chip.offline .sync-dot{background:var(--amber)}.sync-chip.error .sync-dot{background:#ef4444}.sync-chip.local{color:var(--dim)}@keyframes sync-pulse{0%,to{opacity:1}50%{opacity:.25}}.drawer-foot{flex:0 0 auto;padding:12px 16px calc(12px + env(safe-area-inset-bottom,0px));border-top:1px solid rgba(255,255,255,.06);display:flex;justify-content:flex-end}@media (max-width: 767px){.topbar{flex-wrap:wrap;gap:8px;padding:max(8px,env(safe-area-inset-top,0px)) 12px 8px}.brand-name{font-size:13px}.search-wrap{flex:1 1 100%;order:3}.stats{font-size:11.5px;margin-left:auto}.actions{order:2;margin-left:auto;gap:6px}.ghost-btn{height:30px;padding:0 9px;font-size:12px}.sheet-backdrop{padding:0;align-items:stretch}.sheet{width:100%;max-height:100%;height:100%;border:0;border-radius:0}.sheet-head{padding:14px 16px}.sheet-tabs{display:flex}.sheet-body{display:block;padding:14px 16px calc(24px + env(safe-area-inset-bottom,0px))}.sheet-body[data-tab=story] .col-meta,.sheet-body[data-tab=meta] .col-story{display:none}.editor-area{max-height:52vh}}@media (prefers-reduced-motion: reduce){.dot-halo{animation:none;opacity:.3}.city-shape{transition:none}}
