:root{--bg:#16130f;--panel:#1e1a15eb;--panel-solid:#1e1a15;--border:#3b342a;--text:#ece6dc;--muted:#a99f90;--accent:#d9a55b;--focus:#f0c27a;--radius:10px;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}*{box-sizing:border-box}html,body{height:100%;margin:0}body{background:var(--bg);color:var(--text);overscroll-behavior:none;flex-direction:column;font:15px/1.4 system-ui,-apple-system,Segoe UI,Roboto,sans-serif;display:flex}.topbar{padding:max(8px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 8px max(16px, env(safe-area-inset-left));background:var(--panel-solid);border-bottom:1px solid var(--border);flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px 24px;display:flex}.brand h1{letter-spacing:.02em;color:var(--accent);margin:0;font-size:1.25rem}.tagline{color:var(--muted);margin:0;font-size:.85rem}.top-end{align-items:center;gap:8px;display:flex}.help-link{border:1px solid var(--border);width:36px;height:36px;color:var(--text);border-radius:8px;place-items:center;display:grid}.help-link:hover{background:#ffffff14}.help-link:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.help-link svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:22px;height:22px}.selectors{flex-wrap:wrap;gap:8px 16px;display:flex}.field{color:var(--muted);align-items:center;gap:8px;font-size:.85rem;display:flex}select{border:1px solid var(--border);background:var(--bg);max-width:70vw;min-height:36px;color:var(--text);font:inherit;border-radius:8px;padding:4px 8px;font-size:.95rem}select:focus-visible,button:focus-visible{outline:2px solid var(--focus);outline-offset:2px}.stage{background:#000;flex:1;min-height:0;position:relative}.viewer{position:absolute;inset:0}.status{border-radius:var(--radius);background:var(--panel);border:1px solid var(--border);text-align:center;pointer-events:none;max-width:calc(100% - 32px);padding:8px 16px;position:absolute;top:16px;left:50%;transform:translate(-50%)}.controls{right:max(12px, env(safe-area-inset-right));bottom:max(12px, env(safe-area-inset-bottom));border-radius:var(--radius);background:var(--panel);border:1px solid var(--border);flex-direction:column;gap:6px;padding:6px;display:flex;position:absolute}.controls button{width:44px;height:44px;color:var(--text);cursor:pointer;touch-action:manipulation;background:0 0;border:0;border-radius:8px;place-items:center;padding:0;display:grid}.controls button[hidden]{display:none}.controls button:hover{background:#ffffff14}.controls svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:22px;height:22px}.segmented{border:1px solid var(--border);background:var(--bg);border-radius:8px;padding:2px;display:inline-flex}.segmented button{min-height:32px;color:var(--muted);font:inherit;cursor:pointer;touch-action:manipulation;background:0 0;border:0;border-radius:6px;padding:4px 12px;font-size:.9rem}.segmented button[aria-pressed=true]{background:var(--accent);color:#1a1408;font-weight:600}.segmented button:not([aria-pressed=true]):not(:disabled):hover{color:var(--text)}.segmented.fixed{opacity:.55}.segmented button:disabled{cursor:not-allowed}.viewer.inverted canvas{filter:invert()}.controls .tools{flex-direction:column;gap:6px;display:flex}.controls .tool[aria-pressed=true]{background:var(--accent);color:#1a1408}.controls .sep{background:var(--border);height:1px;margin:2px 6px}.viewer[data-tool=measure] .openseadragon-canvas,.viewer[data-tool=draw] .openseadragon-canvas{cursor:crosshair!important}.annot-layer{pointer-events:none;width:100%;height:100%;position:absolute;inset:0;overflow:visible}.annot-layer polyline{fill:none;stroke-linecap:round;stroke-linejoin:round}.annot-layer polyline.halo{stroke:#000000bf;stroke-width:5px}.annot-layer polyline.measure:not(.halo){stroke:#ffd23f;stroke-width:2.5px}.annot-layer polyline.rubber:not(.halo){stroke-dasharray:6 5}.annot-layer polyline.drawing:not(.halo){stroke:#ff4d4d;stroke-width:2.5px}.annot-layer .highlight polyline.measure:not(.halo),.annot-layer .highlight polyline.drawing:not(.halo){stroke:#5ce1ff;stroke-width:3.5px}.annot-layer .measure-dot{fill:#ffd23f;stroke:#000c;stroke-width:1.5px}.annot-layer .measure-dot.highlight{fill:#5ce1ff}.annot-layer .label rect{fill:#14110dd9;stroke:#ffd23f99}.annot-layer .label.highlight rect{stroke:#5ce1ff}.annot-layer .label text{fill:#fff;font:600 13px/1 system-ui,-apple-system,Segoe UI,Roboto,sans-serif}.annot-layer .label.live rect{fill:#ffd23ff2}.annot-layer .label.live text{fill:#1a1408}.hint{left:50%;bottom:max(12px, env(safe-area-inset-bottom));border-radius:var(--radius);background:var(--panel);border:1px solid var(--border);text-align:center;width:max-content;max-width:min(640px,100% - 150px);padding:8px 12px;font-size:.85rem;position:absolute;transform:translate(-50%)}.hint p{margin:0}.hint-live{color:#ffd23f;font-variant-numeric:tabular-nums;font-weight:600;margin-top:4px!important}.hint-actions{justify-content:center;gap:8px;margin-top:8px;display:flex}.hint-actions[hidden]{display:none}.hint-actions button,.panel-toggle,.link{border:1px solid var(--border);background:var(--bg);min-height:32px;color:var(--text);font:inherit;cursor:pointer;touch-action:manipulation;border-radius:8px;padding:4px 12px}.hint-actions button.icon{place-items:center;width:40px;padding:0;display:grid}.hint-actions button.icon svg{fill:none;stroke:currentColor;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round;width:20px;height:20px}.hint-actions button.primary{background:var(--accent);border-color:var(--accent);color:#1a1408;font-weight:600}.hint-actions button:disabled{opacity:.5;cursor:not-allowed}.annot-panel{top:12px;left:max(12px, env(safe-area-inset-left));border-radius:var(--radius);background:var(--panel);border:1px solid var(--border);width:min(300px,100% - 100px);max-height:calc(100% - 200px);padding:8px;font-size:.85rem;position:absolute;overflow:auto}.annot-panel-head{justify-content:flex-end;display:flex}.panel-toggle,.link{min-height:28px;color:var(--muted);padding:2px 8px;font-size:.8rem}.section-head{justify-content:space-between;align-items:center;margin-top:8px;display:flex}.annot-panel h2{color:var(--accent);margin:0;font-size:.85rem}.annot-panel ul{margin:4px 0 0;padding:0;list-style:none}.annot-panel li{border-radius:6px;grid-template-columns:1fr auto;align-items:center;column-gap:8px;padding:4px 6px;display:grid}.annot-panel li:hover{background:#ffffff0f}.item-label{font-variant-numeric:tabular-nums}.item-detail{color:var(--muted);grid-column:1;font-size:.78rem}.item-detail:empty{display:none}.item-delete{width:32px;height:32px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:6px;grid-area:1/2/span 2;font-size:1.2rem}.item-delete:hover{color:#ff8080;background:#ff4d4d26}.annot-layer polygon.zone{fill:var(--zone-color);fill-opacity:.12;stroke:var(--zone-color);stroke-width:1.5px}.annot-layer polygon.zone.highlight{fill-opacity:.3;stroke-width:3px}.controls #btn-layers[aria-pressed=true]{color:var(--accent)}.controls #btn-layers[aria-expanded=true]{background:#ffffff1a}.layers-panel{right:calc(max(12px, env(safe-area-inset-right)) + 66px);bottom:max(12px, env(safe-area-inset-bottom));z-index:5;border-radius:var(--radius);background:var(--panel-solid);border:1px solid var(--border);width:min(320px,100% - 100px);padding:10px 12px;font-size:.9rem;position:absolute;box-shadow:0 8px 24px #00000073}.layers-panel h2{color:var(--accent);margin:0 0 6px;font-size:.9rem}.layers-panel ul{margin:0;padding:0;list-style:none}.layers-panel label{cursor:pointer;align-items:center;gap:10px;min-height:40px;display:flex}.layers-panel input{width:18px;height:18px;accent-color:var(--accent)}.layers-panel input:disabled+.swatch,.layers-panel input:disabled~span{opacity:.4}.layers-panel .swatch{border-radius:3px;flex:none;width:14px;height:14px}.layers-panel .layer-name{flex:1}.layers-panel .layer-count{color:var(--muted);font-variant-numeric:tabular-nums}.muted{color:var(--muted)}.tooltips{pointer-events:none;position:absolute;inset:0;overflow:hidden}.tooltip-lines{width:100%;height:100%;position:absolute;inset:0}.tooltip-lines line{stroke-width:1.5px}.tooltip-card{border-radius:var(--radius);background:var(--panel-solid);border:1px solid var(--border);border-top:3px solid var(--zone-color);width:max-content;max-width:min(340px,100vw - 32px);padding:8px 10px 10px;font-size:.85rem;line-height:1.45;position:absolute;top:0;left:0;box-shadow:0 8px 24px #00000080}.tooltip-card.pinned{pointer-events:auto}.tooltip-card.hover{z-index:1000;max-width:min(300px,100vw - 32px)}.tooltip-card[hidden]{display:none}.tooltip-head{align-items:flex-start;gap:8px;display:flex}.tooltip-card.pinned .tooltip-head{cursor:move;touch-action:none}.tooltip-card h3{flex:1;margin:0;font-size:.9rem}.tooltip-close{width:28px;height:28px;color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:6px;margin:-4px -6px 0 0;font-size:1.2rem}.tooltip-close:hover{color:var(--text);background:#ffffff14}.tooltip-card p{margin:6px 0 0}.tooltip-sub{color:var(--muted);font-size:.8rem}.tooltip-hint{color:var(--muted);font-size:.75rem;font-style:italic}.tooltip-card img{border-radius:6px;width:100%;max-width:320px;height:auto;margin-top:6px;display:block}.tooltip-card.hover img{max-width:280px}.dialog{border:1px solid var(--border);border-radius:var(--radius);background:var(--panel-solid);width:min(560px,100vw - 32px);color:var(--text);padding:16px}.dialog::backdrop{background:#0000008c}.dialog h2{color:var(--accent);margin:0 0 8px;font-size:1.05rem}.dialog p{color:var(--muted);margin:0 0 10px;font-size:.9rem}.dialog textarea{border:1px solid var(--border);background:var(--bg);width:100%;color:var(--text);word-break:break-all;resize:vertical;border-radius:8px;padding:8px;font:.8rem/1.4 ui-monospace,SFMono-Regular,Menlo,monospace}.dialog-actions{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}.dialog-actions button{border:1px solid var(--border);background:var(--bg);min-height:36px;color:var(--text);font:inherit;cursor:pointer;border-radius:8px;padding:4px 14px}.dialog-actions button[hidden]{display:none}.dialog-actions button.primary{background:var(--accent);border-color:var(--accent);color:#1a1408;font-weight:600}.navigator{border:1px solid var(--border)!important;background:#0009!important}@media (max-width:600px){.tagline{display:none}.field span{clip:rect(0 0 0 0);width:1px;height:1px;position:absolute;overflow:hidden}.brand{order:1}.top-end{order:2}.selectors{order:3;width:100%}.photo-field{flex:100%}.photo-field select{width:100%;max-width:none}.hint{width:auto;max-width:none;left:12px;right:76px;transform:none}.annot-panel{max-height:40%}.segmented{flex:1 1 0;min-width:0}.segmented button{white-space:nowrap;text-overflow:ellipsis;flex:1;min-width:0;min-height:36px;padding:4px 2px;font-size:.85rem;overflow:hidden}}.stage{direction:ltr}[dir=rtl] .status,[dir=rtl] .annot-panel,[dir=rtl] .hint,[dir=rtl] .layers-panel,[dir=rtl] .tooltip-card{direction:rtl}#permalink-url{text-align:left;direction:ltr}
