:root{font-family:system-ui,'Malgun Gothic',sans-serif;color:#e5edf9;background:#070e1b;color-scheme:dark}*{box-sizing:border-box}html,body{height:100%}body{margin:0;height:100dvh;display:flex;flex-direction:column;overflow:hidden;padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right)}
header{padding:calc(8px + env(safe-area-inset-top)) 14px 6px;border-bottom:1px solid #283b58}h1{font-size:18px;margin:0}header p{margin:3px 0 0;color:#becde1;font-size:11px;line-height:1.4}
nav{display:flex;gap:6px;padding:6px 10px;align-items:center;overflow-x:auto;flex-shrink:0}nav label{display:flex;align-items:center;gap:4px;min-height:44px;min-width:44px;padding:0 6px;font-size:13px;white-space:nowrap}nav input{width:20px;height:20px}
#stage{position:relative;flex:1;min-height:160px;overflow:hidden}canvas{width:100%;height:100%;display:block;touch-action:none}
#labels-layer{position:absolute;inset:0;pointer-events:none;overflow:hidden}
/* Labels are read-only on phones: taps go to the canvas, where Rust picks the nearest node within 44 px. */
.globe-label{position:absolute;pointer-events:none;min-height:0;min-width:0;padding:2px 6px;font-size:11px;white-space:nowrap;background:#12243eeb;border:1px solid #526c90;border-radius:5px;color:inherit}
button,input,select{font:inherit}button{min-height:44px;min-width:44px;border:1px solid #385378;background:#1a2d49;color:inherit;border-radius:8px;padding:8px 10px;white-space:nowrap}button:active,button:focus-visible{background:#29466f;outline:2px solid #91b8ed}
#sheet{flex-shrink:0;background:#101b2d;border-top:1px solid #283b58;padding:0 12px calc(8px + env(safe-area-inset-bottom))}
#sheet-head{display:flex;align-items:center;gap:10px;min-height:60px}.summary{flex:1;min-width:0}#name{font-size:17px;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}#peek{margin:3px 0 0;font-size:12px;color:#becde1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#sheet-body{display:none;max-height:44dvh;overflow:auto;overscroll-behavior:contain;padding-bottom:8px}body.sheet-open #sheet-body{display:block}
#detail p{margin:6px 0;line-height:1.7;font-size:14px}#detail p:empty{display:none}#notice{color:#ffd27f}#neighbors{display:flex;flex-wrap:wrap;gap:6px;margin:8px 0}
h3{font-size:14px;margin:16px 0 6px;color:#becde1}label{display:block;font-size:13px}input[type=search],select{width:100%;min-height:44px;padding:8px;margin:6px 0 10px;font-size:16px}
#nodes,#annotations{display:grid;grid-template-columns:1fr 1fr;gap:6px}#nodes button,#annotations button{text-align:left;white-space:normal}
details{margin:14px 0 4px}summary{min-height:44px;display:flex;align-items:center}#error{padding:14px;background:#502a30}#loading{position:fixed;top:30%;left:50%;transform:translateX(-50%);z-index:5}a{color:#a6c9ff}details a{display:inline-flex;align-items:center;min-height:44px}[hidden]{display:none!important}
