[hidden]{display:none!important}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#0B1220;color:#F3EAD7;font-family:Inter,system-ui,sans-serif;-webkit-tap-highlight-color:transparent}
body{overscroll-behavior:none}
a{color:#F0A93B}
#shell{max-width:520px;margin:0 auto;height:100dvh;display:flex;flex-direction:column;overflow:hidden;position:relative;background:#0B1220}
#strip svg{width:100%;height:14px}
.mono{font-family:'JetBrains Mono',monospace}
.fed{font-family:Federo,serif;font-weight:400}
.kick{font-family:'JetBrains Mono',monospace;font-size:11px;letter-spacing:.16em;color:#33C2B0;margin:0}
.kick.o{color:#F0A93B}.kick.r{color:#F08A75}
.muted{color:#A9B4CC}
h1,h2{margin:0;font-family:Federo,serif;font-weight:400;line-height:1.1}
h1{font-size:38px}h2{font-size:28px}
p{margin:0;line-height:1.5}
.page{flex:1;overflow-y:auto;padding:24px 20px 24px;display:flex;flex-direction:column;gap:14px}
.card{background:#141E33;border:1px solid #2A3A5E;border-radius:16px;padding:16px 18px;display:flex;flex-direction:column;gap:8px}
.card.o{border:2px solid #F0A93B}.card.t{background:#12282A;border-color:#33C2B0}.card.r{background:#2A1512;border:2px solid #E0634B}
.card.dark{background:#070C16}
.btn{min-height:52px;border:0;border-radius:14px;background:#F0A93B;color:#0B1220;font:700 16px Inter,sans-serif;cursor:pointer;display:flex;align-items:center;justify-content:center;gap:8px;text-decoration:none;padding:0 16px;width:100%;position:relative}
.btn.ghost{background:transparent;border:1px solid #2A3A5E;color:#C9D1E2;font-weight:600;font-size:14px}
.btn.line{background:transparent;border:1px solid #F0A93B;color:#F0A93B}
.btn.teal{background:transparent;border:1px solid #33C2B0;color:#33C2B0;font-size:14px}
.btn:disabled{opacity:.45;cursor:not-allowed}
.btn input[type=file]{position:absolute;inset:0;opacity:0;cursor:pointer}
.row{display:flex;gap:10px;align-items:center}
.grow{flex:1}
label.f{font-size:12px;letter-spacing:.14em;color:#A9B4CC;font-weight:600;display:flex;flex-direction:column;gap:8px}
input.in{min-height:56px;padding:0 16px;border-radius:14px;border:2px solid #2A3A5E;background:#141E33;color:#F3EAD7;font:20px Inter,sans-serif;width:100%}
input.in:focus{outline:none;border-color:#F0A93B}
.chip{min-height:34px;padding:0 12px;border-radius:999px;border:1px solid #2A3A5E;background:transparent;color:#C9D1E2;font:13px Inter,sans-serif;cursor:pointer}
.err{color:#F08A75;font-weight:600;font-size:14px}
.ok{color:#33C2B0;font-weight:600;font-size:14px}
.opt{min-height:52px;padding:12px 16px;border-radius:12px;text-align:left;font:16px Inter,sans-serif;cursor:pointer;color:#F3EAD7;background:#141E33;border:1px solid #2A3A5E;width:100%}
.opt.bad{color:#8794B0;background:#1A1418;border-color:#E0634B;text-decoration:line-through}
#hdr{display:flex;align-items:center;justify-content:space-between;padding:10px 16px;border-bottom:1px solid #22304F;flex-shrink:0}
#hdr .c{display:flex;flex-direction:column;gap:2px}
#hdr .lab{font-size:10px;letter-spacing:.16em;color:#A9B4CC}
#tabs{flex-shrink:0;height:64px;display:grid;grid-template-columns:repeat(4,1fr);border-top:1px solid #22304F;background:#0B1220}
#tabs button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;border:0;background:transparent;cursor:pointer;color:#A9B4CC;font:600 11px Inter,sans-serif;border-top:2px solid transparent}
#tabs button.on{color:#F0A93B;border-top-color:#F0A93B}
#mapview{flex:1;display:flex;flex-direction:column;min-height:0}
#map{flex:1;min-height:240px;background:#0E1628}
#sheet{background:#141E33;border-top:1px solid #2A3A5E;border-radius:20px 20px 0 0;margin-top:-16px;position:relative;z-index:500;padding:16px 20px 16px;display:flex;flex-direction:column;gap:8px}
.leaflet-container{background:#0E1628;font-family:Inter,sans-serif}
.leaflet-tile-pane{filter:invert(1) hue-rotate(180deg) brightness(.8) contrast(.9) saturate(.6)}
.mk{width:34px;height:34px;border-radius:50%;display:flex;align-items:center;justify-content:center;font:700 14px 'JetBrains Mono',monospace;box-sizing:border-box}
.mk.done{background:#33C2B0;color:#0B1220}.mk.cur{background:#F0A93B;color:#0B1220}.mk.lock{background:#0B1220;color:#A9B4CC;border:2px solid #4A5A7E}
.me{width:20px;height:20px;border-radius:50%;background:#7FA6FF;border:3px solid #F3EAD7;box-shadow:0 0 0 7px rgba(127,166,255,.25)}
.mate{width:14px;height:14px;border-radius:50%;background:#C9D1E2;border:2px solid #0B1220}
.startmk{padding:3px 8px;border-radius:999px;background:#F3EAD7;color:#0B1220;font:700 11px Inter,sans-serif;white-space:nowrap}
.slots{display:grid;grid-template-columns:repeat(6,1fr);gap:6px;width:100%}
.slot{display:flex;flex-direction:column;align-items:center;gap:2px;padding:6px 0;border-radius:10px;background:#141E33;border:1px solid #2A3A5E}
.slot.have{border-color:#33C2B0}.slot.new{border:2px solid #F0A93B;color:#F0A93B}
.slot small{font-size:10px;color:#8794B0}.slot b{font-family:Federo,serif;font-weight:400;font-size:24px}
.dslot{height:64px;border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;cursor:pointer;background:#070C16;border:2px dashed #2A3A5E;color:#F3EAD7;font-family:Inter}
.dslot.fill{border:2px solid #33C2B0}.dslot.target{border-color:#F0A93B}
.dtile{position:relative;width:52px;height:60px;border-radius:12px;cursor:pointer;color:#F3EAD7;background:#141E33;border:2px solid #2A3A5E;font:28px Federo,serif}
.dtile.sel{background:#2A3A5E;border-color:#F0A93B}.dtile:disabled{opacity:.3}
.dtile small{position:absolute;top:3px;left:6px;font:11px 'JetBrains Mono',monospace;color:#F0A93B}
.gal{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}
.gal figure{margin:0;display:flex;flex-direction:column;gap:4px}
.gal img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:14px;border:1px solid #2A3A5E;background:#1C2945}
.gal figcaption{font-size:12px;color:#A9B4CC}.gal figcaption b{color:#F3EAD7;font-size:13px;display:block}
.brow{display:flex;align-items:center;gap:12px;min-height:56px;padding:0 10px;border-top:1px solid #22304F;border-radius:10px}
.brow.me{background:#1C2945}
.brow .pen{font:700 20px 'JetBrains Mono',monospace;color:#F08A75}
.av{width:36px;height:36px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-weight:700;color:#0B1220;flex-shrink:0}
.vgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.vcard{display:flex;flex-direction:column;gap:6px;padding:6px;border-radius:12px;cursor:pointer;text-align:left;font:600 12px Inter,sans-serif;color:#F3EAD7;background:#141E33;border:2px solid #2A3A5E}
.vcard.sel{background:#2A3A5E;border-color:#F0A93B}.vcard:disabled{opacity:.45}
.vcard img{width:100%;aspect-ratio:1/1;object-fit:cover;border-radius:10px}
#overlay{position:fixed;inset:0;z-index:2000;background:#0B1220;display:none;flex-direction:column;overflow:hidden}
#overlay.on{display:flex}
#overlay .inner{max-width:520px;width:100%;margin:0 auto;flex:1;display:flex;flex-direction:column;align-items:center;overflow-y:auto}
.stage{width:390px;max-width:100%;flex-shrink:0}
.stage svg{max-width:100%;height:auto}
.bar{height:4px;border-radius:2px;background:#22304F;overflow:hidden;width:calc(100% - 56px);margin:0 28px 20px}
.bar i{display:block;height:100%;background:#F0A93B;transition:width 1s linear}
.toast{position:fixed;left:50%;bottom:84px;transform:translateX(-50%);background:#141E33;border:1px solid #33C2B0;border-radius:12px;padding:10px 14px;font-size:14px;z-index:3000;max-width:90%;display:none}
.toast.on{display:block}.toast.e{border-color:#E0634B}
.photo-box{height:210px;border-radius:16px;overflow:hidden;border:2px dashed #2A3A5E;display:flex;align-items:center;justify-content:center;background:#0E1628;color:#A9B4CC}
.photo-box img{width:100%;height:100%;object-fit:cover}
@keyframes pulse{0%{box-shadow:0 0 0 0 rgba(240,169,59,.7)}70%{box-shadow:0 0 0 14px rgba(240,169,59,0)}100%{box-shadow:0 0 0 0 rgba(240,169,59,0)}}
.pulse{animation:pulse 1.6s infinite}
@keyframes rise{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.rise{animation:rise .35s ease-out}
@keyframes draw{to{stroke-dashoffset:0}}
.draw{stroke-dasharray:1600;stroke-dashoffset:1600;animation:draw 2.4s ease-in-out forwards}
@keyframes tileIn{from{opacity:0;transform:scale(.3)}to{opacity:1;transform:none}}
svg .tile,svg .node{opacity:0;transform-box:fill-box;transform-origin:center;animation:tileIn .5s ease-out forwards}
@keyframes fadeUp{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
.cap{animation:fadeUp .9s ease-out both}
@keyframes pop{0%{opacity:0;transform:scale(1.5)}35%{opacity:1;transform:scale(1)}100%{opacity:1}}
.pop{transform-box:fill-box;transform-origin:center;animation:pop .9s ease-out both}
@media (prefers-reduced-motion: reduce){.draw{animation:none;stroke-dashoffset:0}svg .tile,svg .node,.cap,.pop,.rise{animation:none;opacity:1;transform:none}.pulse{animation:none}}
