*,:before,:after{box-sizing:border-box;margin:0;padding:0}:root{--bg:#1a1a2e;--surface:#16213e;--surface2:#1e2a4a;--accent:#e94560;--text:#eaeaea;--text2:#b0bac8;--muted:#8892a4;--border:#ffffff12;--border2:#ffffff20;--shadow:#00000060;--radius:12px;--header-h:52px;--status-h:44px}:root.light{--bg:#f5f0e8;--surface:#ede8dc;--surface2:#e4dece;--accent:#b5451b;--text:#2b2318;--text2:#4a3f32;--muted:#7a6f62;--border:#c8bfaf40;--border2:#b8ae9e60;--shadow:#2b231820}html,body,#app{background:var(--bg);width:100%;height:100%;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif;overflow:hidden}#header{height:var(--header-h);background:var(--surface);z-index:1000;border-bottom:1px solid var(--border);justify-content:space-between;align-items:center;padding:0 16px;display:flex;position:fixed;top:0;left:0;right:0}#mode-label{letter-spacing:.08em;text-transform:uppercase;color:var(--accent);font-size:.85rem;font-weight:600}#header-actions{gap:8px;display:flex}#map{top:var(--header-h);bottom:var(--status-h);z-index:0;position:fixed;left:0;right:0}#status-bar{height:var(--status-h);background:var(--surface);z-index:1000;border-top:1px solid var(--border);color:var(--muted);justify-content:space-between;align-items:center;padding:0 16px;font-size:.8rem;display:flex;position:fixed;bottom:0;left:0;right:0}button{background:var(--accent);color:#fff;cursor:pointer;border:none;border-radius:8px;padding:6px 14px;font-size:.82rem;font-weight:600;transition:opacity .15s}button:active{opacity:.75}button.disabled,button:disabled{background:var(--surface2);color:var(--muted);cursor:default}button.danger{background:#7a1a2e}button#btn-recenter{color:var(--text);background:0 0;padding:0;font-size:1.3rem;line-height:1}#btn-theme{color:var(--text);border:1px solid var(--border2);background:0 0;border-radius:6px;justify-content:center;align-items:center;width:28px;height:28px;padding:0 4px;font-size:1.1rem;line-height:1.6;display:flex}#poi-drawer{bottom:var(--status-h);z-index:800;background:var(--surface);border-top-left-radius:var(--radius);border-top-right-radius:var(--radius);box-shadow:0 -2px 12px var(--shadow);max-height:44px;transition:max-height .25s;position:fixed;left:0;right:0;overflow:hidden}#poi-drawer.open{max-height:52vh}#poi-drawer-handle{cursor:pointer;-webkit-user-select:none;user-select:none;border-bottom:1px solid var(--border);align-items:center;gap:10px;height:44px;padding:0 16px;display:flex}#poi-drawer-arrow{color:var(--accent);font-size:.7rem;transition:transform .2s}#poi-drawer.open #poi-drawer-arrow{transform:rotate(180deg)}#poi-drawer-label{color:var(--muted);font-size:.82rem}#poi-drawer-list{max-height:calc(52vh - 44px);padding:4px 0;list-style:none;overflow-y:auto}#poi-drawer-list li{cursor:pointer;border-bottom:1px solid var(--border);padding:10px 16px;position:relative}#poi-drawer-list li:active{background:var(--surface2)}.poi-row-name{margin-bottom:2px;font-size:.88rem;display:block}.poi-row-type{color:var(--accent);text-transform:uppercase;letter-spacing:.05em;font-size:.73rem}.poi-row-dist{color:var(--muted);float:right;margin-top:2px;font-size:.73rem}#flashcard{bottom:calc(var(--status-h) + 44px);background:var(--surface);z-index:900;max-height:72vh;box-shadow:0 -4px 32px var(--shadow);border-top-left-radius:16px;border-top-right-radius:16px;padding:0 0 32px;transition:transform .25s;position:fixed;left:0;right:0;overflow-y:auto}#flashcard.hidden{transform:translateY(110%)}#fc-drag-handle{background:var(--border2);border-radius:2px;width:36px;height:4px;margin:10px auto 0}#flashcard-close{background:var(--surface2);color:var(--text);border-radius:50%;justify-content:center;align-items:center;width:28px;height:28px;padding:0;font-size:.85rem;line-height:1;display:flex;position:absolute;top:10px;right:12px}#fc-header{justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:2px;padding:12px 48px 0 20px;display:flex}#fc-header-text{flex:1;min-width:0}#fc-name{color:var(--text);word-break:break-word;font-size:1.18rem;font-weight:700;line-height:1.25}#fc-type{color:var(--accent);text-transform:uppercase;letter-spacing:.07em;margin-top:3px;font-size:.72rem;font-weight:600}.fc-icon-btn{background:var(--surface2);color:var(--text2);border:1px solid var(--border2);border-radius:8px;flex-shrink:0;justify-content:center;align-items:center;width:32px;height:32px;padding:0;font-size:1rem;display:flex}.fc-icon-btn.active{background:var(--accent);color:#fff;border-color:#0000}#fc-image-wrap{padding:10px 20px 0}#fc-wiki-thumb{object-fit:cover;border-radius:10px;width:100%;max-height:160px;display:block}#fc-wiki-credit{color:var(--muted);margin-top:4px;font-size:.68rem}#flashcard-content{flex-direction:column;gap:12px;padding:10px 20px 0;display:flex}#fc-desc{color:var(--text2);font-size:.88rem;line-height:1.55}#fc-desc a{color:var(--accent);text-decoration:none}#fc-osm p{color:var(--muted);font-size:.82rem;font-style:italic;line-height:1.5}#fc-osm p:empty{display:none}#fc-basics,#fc-sheet,#fc-facts{flex-direction:column;gap:4px;display:flex}#fc-basics-list,#fc-facts-list,#fc-sheet-people{flex-direction:column;gap:4px;list-style:none;display:flex}#fc-basics-list li,#fc-facts-list li{color:var(--muted);gap:6px;font-size:.82rem;display:flex}#fc-basics-list li strong,#fc-facts-list li strong{color:var(--text);flex-shrink:0;min-width:90px}#fc-sheet-year{color:var(--muted);margin-bottom:4px;font-size:.82rem}#fc-sheet-year strong{color:var(--text);margin-right:4px}#fc-sheet-people li{flex-wrap:wrap;align-items:baseline;gap:6px;font-size:.82rem;line-height:1.4;display:flex}.person-name{color:var(--text);font-weight:600}.person-role{color:var(--accent);text-transform:uppercase;letter-spacing:.05em;font-size:.7rem}.person-dates{color:var(--muted);font-size:.76rem}.fc-section-label{letter-spacing:.09em;text-transform:uppercase;color:var(--muted);margin-bottom:4px;font-size:.68rem;font-weight:700}#fc-wiki-loading{color:var(--muted);font-size:.76rem;font-style:italic}#fc-wiki,#fc-web-search{flex-direction:column;gap:5px;display:flex}#fc-wiki-extract,#fc-ws-extract{color:var(--text2);-webkit-line-clamp:4;-webkit-box-orient:vertical;font-size:.84rem;line-height:1.55;display:-webkit-box;overflow:hidden}#fc-wiki-extract.expanded,#fc-ws-extract.expanded{-webkit-line-clamp:unset;overflow:visible}#fc-wiki-link,#fc-ws-link{color:var(--accent);font-size:.76rem;font-weight:600;text-decoration:none}#fc-notes-section{border-top:1px solid var(--border);flex-direction:column;gap:6px;padding-top:12px;display:flex}#fc-notes-display{color:var(--text);background:var(--surface2);border-left:3px solid var(--accent);white-space:pre-wrap;word-break:break-word;border-radius:8px;padding:8px 10px;font-size:.86rem;line-height:1.55}#fc-notes-input{background:var(--bg);border:1px solid var(--border2);color:var(--text);resize:none;border-radius:8px;width:100%;padding:8px 10px;font-family:inherit;font-size:.84rem;line-height:1.5;transition:border-color .15s}#fc-notes-input:focus{border-color:var(--accent);outline:none}#fc-notes-actions{gap:8px;display:flex}#fc-notes-save{padding:5px 14px;font-size:.78rem}.fc-notes-clear-btn{color:var(--muted);border:1px solid var(--border2);background:0 0;padding:5px 10px;font-size:.78rem;font-weight:400}#fc-faq{flex-direction:column;gap:6px;display:flex}#fc-faq-list{flex-direction:column;gap:6px;list-style:none;display:flex}.fc-faq-item{background:var(--surface);border-left:3px solid var(--accent);border-radius:8px;flex-direction:column;gap:2px;padding:8px 10px;display:flex}.fc-faq-q{text-transform:uppercase;letter-spacing:.09em;color:var(--muted);font-size:.67rem}.fc-faq-a{color:var(--text);font-size:.88rem;line-height:1.4}.fc-faq-link{color:var(--accent);word-break:break-all;text-decoration:none}.fc-faq-link:hover{text-decoration:underline}.tour-hint{color:var(--text2);background:var(--surface);border-left:3px solid var(--accent);border-radius:8px;margin-bottom:16px;padding:10px 12px;font-size:.84rem;line-height:1.5}.tour-hint strong{color:var(--text)}.tour-section-label{text-transform:uppercase;letter-spacing:.09em;color:var(--muted);margin-bottom:6px;font-size:.67rem}#tour-panel{top:var(--header-h);bottom:var(--status-h);background:var(--bg);z-index:950;padding:20px;transition:transform .25s;position:fixed;left:0;right:0;overflow-y:auto}#tour-panel.hidden{transform:translate(100%)}#tour-header{justify-content:space-between;align-items:center;margin-bottom:16px;display:flex}#tour-name-row,#tour-saved-row,#tour-transfer-row{align-items:center;gap:8px;margin-bottom:10px;display:flex}#tour-name-input,#tour-saved-select{background:var(--surface);border:1px solid var(--border2);color:var(--text);border-radius:8px;flex:1;min-width:0;padding:8px 12px;font-size:.85rem}#tour-saved-select option{background:var(--surface)}#tour-import-json-label{color:var(--muted);cursor:pointer;background:var(--surface);border:1px solid var(--border2);border-radius:8px;align-items:center;gap:6px;padding:6px 12px;font-size:.82rem;display:flex}#tour-import-json{display:none}#tour-add-section{border:1px solid var(--border2);border-radius:10px;margin-bottom:16px;overflow:hidden}#tour-add-section summary{cursor:pointer;color:var(--accent);-webkit-user-select:none;user-select:none;padding:10px 14px;font-size:.85rem;font-weight:600;list-style:none}#tour-add-section summary::-webkit-details-marker{display:none}#tour-add-form{flex-direction:column;gap:10px;padding:0 14px 14px;display:flex}#tour-add-form input,#tour-add-form textarea{background:var(--bg);border:1px solid var(--border2);color:var(--text);border-radius:8px;width:100%;padding:10px;font-family:inherit;font-size:.88rem}#tour-add-form textarea{resize:vertical}#add-poi-coords{gap:8px;display:flex}#add-poi-coords input{flex:1}#add-poi-pick{background:var(--surface);color:var(--text);border:1px solid var(--border2);font-weight:400}#tour-import{flex-direction:column;gap:8px;margin-bottom:14px;display:flex}#tour-import label{color:var(--muted);flex-direction:column;gap:6px;font-size:.82rem;display:flex}#tour-import input[type=file]{color:var(--text);font-size:.82rem}#tour-start{width:100%;margin-bottom:16px}#tour-list{counter-reset:tour;flex-direction:column;gap:10px;padding-left:0;list-style:none;display:flex}#tour-list li{counter-increment:tour;background:var(--surface);border-radius:8px;align-items:center;min-height:44px;padding:12px 80px 12px 42px;font-size:.9rem;display:flex;position:relative}#tour-list li:before{content:counter(tour);color:var(--accent);font-size:.85rem;font-weight:700;position:absolute;top:50%;left:14px;transform:translateY(-50%)}#tour-list li.visited{opacity:.45;text-decoration:line-through}#tour-list li.active{border:1px solid var(--accent)}.poi-name-btn{color:var(--text);text-align:left;cursor:pointer;background:0 0;border:none;flex:1;padding:0;font-size:.9rem;font-weight:400}.poi-actions{gap:6px;display:flex;position:absolute;right:10px}.poi-edit-btn,.poi-remove-btn{padding:4px 8px;font-size:.75rem;font-weight:400}.poi-edit-btn{background:var(--surface2);border:1px solid var(--border2);color:var(--muted)}.poi-remove-btn{background:#7a1a2e}.poi-edit-form{flex-direction:column;gap:8px;width:100%;display:flex}.poi-edit-form input,.poi-edit-form textarea{background:var(--bg);border:1px solid var(--border2);color:var(--text);border-radius:6px;width:100%;padding:8px;font-family:inherit;font-size:.85rem}.ef-actions{gap:8px;display:flex}.ef-cancel{background:var(--surface2);border:1px solid var(--border2);color:var(--muted);font-weight:400}#pick-hint{background:var(--surface);color:var(--text);z-index:9999;box-shadow:0 4px 20px var(--shadow);pointer-events:none;border-radius:10px;padding:14px 22px;font-size:.9rem;font-weight:600;position:fixed;top:50%;left:50%;transform:translate(-50%,-50%)}.leaflet-control-zoom{border:none!important}.leaflet-control-zoom a{background:var(--surface)!important;color:var(--text)!important;border:1px solid var(--border2)!important}.leaflet-popup-content-wrapper{background:var(--surface)!important;color:var(--text)!important;box-shadow:0 4px 20px var(--shadow)!important;border-radius:10px!important}.leaflet-popup-tip{background:var(--surface)!important}.leaflet-popup-content{margin:10px 14px!important;font-size:.88rem!important}.hidden{display:none!important}
