/* Glopix — "light table at night": photos are prints on a dark slate table,
   one amber safelight accent, digiKam label colours for visibility. System fonts only (offline). */
:root {
  --ink: #1d2531;
  --deep: #141a23;
  --panel: #263040;
  --raised: #2f3a4c;
  --line: #3b475a;
  --fog: #e4e8ec;
  --muted: #9aa6b5;
  --amber: #f0a63c;
  --amber-ink: #2a1a04;
  --v0: #57b26f;
  --v1: #e5c344;
  --v2: #e0584f;
  --print: #f7f7f4;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", "URW Palladio L", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --bar-h: 52px;
  --r: 6px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
/* --tracking (letter spacing) and --leading (line height) come from the font settings in config.json */
html, body { margin: 0; height: 100%; background: var(--ink); color: var(--fog); font: 15px/var(--leading, 1.45) var(--sans); letter-spacing: var(--tracking, normal); }
body { display: flex; flex-direction: column; overflow: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
[hidden] { display: none !important; }
.spacer { flex: 1; }

/* ---------- buttons & inputs ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: var(--raised); color: var(--fog);
  padding: 6px 12px; border-radius: var(--r); cursor: pointer; white-space: nowrap; line-height: 1.3;
}
.btn:hover { border-color: var(--muted); }
.btn.ghost { background: transparent; }
.btn.primary { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); font-weight: 600; }
.btn.danger { border-color: var(--v2); color: #ffb3ad; background: transparent; }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { appearance: none; background: transparent; border: 0; color: var(--fog); padding: 8px; cursor: pointer; border-radius: var(--r); font-size: 18px; line-height: 1; }
.icon-btn:hover { background: rgba(255,255,255,.08); }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], select, textarea {
  background: var(--deep); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 9px; min-width: 0;
}
input:focus, select:focus, textarea:focus { border-color: var(--amber); outline: none; }

/* ---------- top bar ---------- */
.bar {
  height: var(--bar-h); flex: none; display: flex; align-items: center; gap: 10px; padding: 0 12px;
  background: var(--deep); border-bottom: 1px solid var(--line); z-index: 1100;
}
.brand { display: flex; align-items: center; gap: 8px; font: 600 19px/1 var(--serif); text-decoration: none; white-space: nowrap; max-width: 30vw; min-width: 0; }
.brand img { flex: none; height: 30px; width: auto; }
.brand span { overflow: hidden; text-overflow: ellipsis; }
.views { display: flex; gap: 2px; background: var(--panel); border-radius: var(--r); padding: 2px; }
.views a { padding: 5px 12px; border-radius: 4px; text-decoration: none; color: var(--muted); }
.views a.on { background: var(--raised); color: var(--fog); }
.search { flex: 1; min-width: 80px; max-width: 520px; }
.search input { width: 100%; }

.filters {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding: 10px 14px;
  background: var(--panel); border-bottom: 1px solid var(--line); z-index: 1050;
}
.filters input[type=number] { width: 84px; margin-left: 4px; }
.vis-filter { border: 0; padding: 0; margin: 0; display: flex; gap: 12px; align-items: center; }
.vis-filter legend { float: left; margin-right: 6px; color: var(--muted); padding: 0; }
.vis-filter label { display: flex; align-items: center; gap: 5px; }
.count { color: var(--muted); margin-left: auto; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.dot.v0 { background: var(--v0); } .dot.v1 { background: var(--v1); } .dot.v2 { background: var(--v2); } .dot.vn { background: transparent; border: 1px dashed var(--muted); }

main { flex: 1; position: relative; min-height: 0; }
.view { position: absolute; inset: 0; }

/* ---------- map ---------- */
#map { position: absolute; inset: 0; background: #1a2230; }
#map.gl { background: #0b0f15; }
.map-switch { position: absolute; top: 10px; right: 10px; z-index: 600; display: flex; background: rgba(20,26,35,.9); border: 1px solid var(--line); border-radius: var(--r); padding: 2px; }
.map-switch button { appearance: none; border: 0; background: transparent; color: var(--muted); padding: 5px 11px; border-radius: 4px; cursor: pointer; }
.map-switch button[aria-pressed="true"] { background: var(--raised); color: var(--fog); }
.layer-panel { position: absolute; top: 10px; right: 10px; z-index: 600; display: grid; gap: 6px; padding: 8px 10px; background: rgba(20,26,35,.9); border: 1px solid var(--line); border-radius: var(--r); font-size: 13px; }
.map-tools { position: absolute; top: 10px; left: 52px; z-index: 600; display: flex; align-items: center; gap: 10px; max-width: calc(100% - 330px); }
.map-tools .btn { background: rgba(20,26,35,.92); }
.map-tools .btn[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); font-weight: 600; }
.map-sel-hint { background: rgba(20,26,35,.92); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 10px; font-size: 13px; color: var(--fog); }
#mapView.selecting .pin-icon .pin { cursor: copy; }
.pin-icon.sel .pin { outline: 3px solid var(--amber); outline-offset: 3px; }
.pin-icon.part-sel .pin { outline: 3px dashed var(--amber); outline-offset: 3px; }
.pin-icon.sel::after { content: "✓"; position: absolute; left: -10px; bottom: -10px; width: 20px; height: 20px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); font: 700 12px/20px var(--sans); text-align: center; z-index: 3; pointer-events: none; }
.layer-panel .layer-label { color: var(--muted); font-size: 12px; margin-bottom: -2px; }
.map-unavailable { position: absolute; inset: 40% 20px auto; text-align: center; color: var(--muted); }
.map-unavailable a { color: var(--fog); }
.layer-panel label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.layer-bases { display: flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.layer-bases button { appearance: none; border: 0; background: transparent; color: var(--muted); padding: 4px 9px; cursor: pointer; flex: 1; }
.layer-bases button + button { border-left: 1px solid var(--line); }
.layer-bases button[aria-checked="true"] { background: var(--raised); color: var(--fog); }
#map.gl .maplibregl-ctrl-group { background: var(--panel); border: 1px solid var(--line); }
#map.gl .maplibregl-ctrl-group button + button { border-top-color: var(--line); }
#map.gl .maplibregl-ctrl-icon { filter: invert(.9); }
#map.gl .maplibregl-ctrl-attrib { background: rgba(20,26,35,.8); color: var(--muted); }
#map.gl .maplibregl-ctrl-attrib a { color: var(--fog); }
#map.gl .maplibregl-ctrl-attrib-button { filter: invert(.9); }
#map.gl .pin-icon { cursor: pointer; }
.leaflet-container { font: inherit; background: #1a2230; }
.leaflet-tile-pane { filter: brightness(.94); }
.leaflet-control-attribution { background: rgba(20,26,35,.8) !important; color: var(--muted) !important; }
.leaflet-control-attribution a { color: var(--fog) !important; }
.leaflet-bar a { background: var(--panel); color: var(--fog); border-color: var(--line); }
.leaflet-bar a:hover { background: var(--raised); }
.map-note {
  position: absolute; left: 12px; bottom: 26px; z-index: 500; margin: 0; padding: 7px 11px; max-width: calc(100% - 24px);
  background: rgba(20,26,35,.9); border: 1px solid var(--line); border-radius: var(--r); color: var(--muted); font-size: 13px;
}
.map-note a { color: var(--fog); }

/* the memorable thing: sets sit on the map as small prints */
.pin { position: relative; width: 64px; height: 52px; background: var(--print); padding: 3px 3px 9px; box-shadow: 0 3px 10px rgba(0,0,0,.55); transform: rotate(var(--tilt, -2deg)); transition: transform .12s; cursor: pointer; }
.pin:hover, .pin:focus-visible { transform: rotate(0) scale(1.12); z-index: 10; }
.pin.media { width: 46px; height: 38px; padding: 2px 2px 7px; }
.pin b.zoom { cursor: zoom-in; }
.pin b.zoom:hover { transform: scale(1.15); }
.zoom-box { position: absolute; z-index: 5; border: 2px solid var(--amber); background: rgba(240,166,60,.15); pointer-events: none; }
#map.ctrl-zoom, #map.ctrl-zoom canvas { cursor: crosshair; }
.film button.set-start { margin-left: 10px; box-shadow: -6px 0 0 -4px var(--muted); }
.film button.set-start:first-child { margin-left: 0; box-shadow: none; }
.pin.approx { background: #c9ced6; outline: 2px dashed var(--print); outline-offset: 2px; }
.pin img { width: 100%; height: 100%; object-fit: cover; display: block; background: #c9ccd1; }
.pin b { position: absolute; right: -8px; top: -8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; background: var(--amber); color: var(--amber-ink); font: 700 12px/22px var(--sans); text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
.pin.stack::before, .pin.stack::after { content: ""; position: absolute; inset: 0; background: var(--print); box-shadow: 0 2px 6px rgba(0,0,0,.45); z-index: -1; }
.pin.stack::before { transform: rotate(6deg) translate(4px, -2px); }
.pin.stack::after { transform: rotate(-5deg) translate(-4px, 2px); }
.pin-icon { background: none; border: 0; }
.leaflet-tooltip.pin-tip { background: var(--deep); color: var(--fog); border: 1px solid var(--line); box-shadow: none; padding: 6px 9px; }
.leaflet-tooltip.pin-tip::before { display: none; }
.pin-tip strong { font: 600 15px/1.2 var(--serif); display: block; }
.pin-tip span { color: var(--muted); font-size: 12px; }

/* ---------- grid of sets ---------- */
#gridView { overflow: auto; }
.grid-tools { position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px; background: var(--ink); border-bottom: 1px solid var(--line); }
.sel-info { color: var(--muted); }
.sort { color: var(--muted); display: flex; gap: 6px; align-items: center; }
#grid { padding: 6px 16px 90px; }
.year { font: 600 28px/1 var(--serif); margin: 22px 0 12px; color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px 16px; }
.card { position: relative; text-decoration: none; display: block; border-radius: var(--r); }
.card .ph { aspect-ratio: 4 / 3; background: var(--panel); border-radius: var(--r); overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card:hover img { filter: brightness(1.08); }
.card h3 { font: 600 17px/1.25 var(--serif); margin: 8px 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card p { margin: 0; color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .n { position: absolute; right: 8px; top: 8px; background: rgba(20,26,35,.82); padding: 1px 8px; border-radius: 10px; font-size: 12px; }
.card .vis { position: absolute; left: 8px; top: 8px; display: flex; gap: 4px; }
.card .chk { position: absolute; left: 8px; bottom: 58px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--print); background: rgba(0,0,0,.35); display: none; }
.selecting .card .chk { display: block; }
.card.sel .chk { background: var(--amber); border-color: var(--amber); }
.card.sel .chk::after { content: "✓"; color: var(--amber-ink); font-weight: 700; display: block; text-align: center; line-height: 22px; }
.card.sel .ph { outline: 3px solid var(--amber); outline-offset: 2px; }
.nophoto { display: grid; place-items: center; height: 100%; color: var(--muted); font-size: 28px; }

.empty { position: absolute; top: 40%; left: 50%; transform: translateX(-50%); z-index: 650; margin: 0; width: max-content; max-width: calc(100% - 32px); text-align: center; color: var(--fog); background: rgba(20,26,35,.92); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 16px; }

.selbar {
  position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); z-index: 1200; display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  background: var(--deep); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; box-shadow: 0 8px 30px rgba(0,0,0,.5); max-width: calc(100vw - 24px);
}
.sel-vis { display: flex; gap: 6px; align-items: center; color: var(--muted); }
body:not(.is-admin) .admin-only { display: none !important; }

/* ---------- rotation for previews the server could not orient ---------- */
.o3 { transform: rotate(180deg); } .o6 { transform: rotate(90deg); } .o8 { transform: rotate(-90deg); }
.o2 { transform: scaleX(-1); } .o4 { transform: scaleY(-1); } .o5 { transform: rotate(90deg) scaleX(-1); } .o7 { transform: rotate(-90deg) scaleX(-1); }

/* ---------- viewer ---------- */
.viewer { position: fixed; inset: 0; z-index: 2000; background: var(--deep); display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-columns: minmax(0, 1fr); }
.vhead { display: flex; align-items: center; gap: 6px; padding: 8px 10px 8px 16px; min-height: 52px; }
.vhead .t { flex: 0 1 auto; min-width: 0; }
.vhead .vspacer { flex: 1; }
.vhead h2 { font: 600 20px/1.2 var(--serif); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vhead .sub { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stage { position: relative; min-height: 0; display: grid; place-items: center; overflow: hidden; touch-action: pan-y pinch-zoom; }
.stage > img.main { user-select: none; -webkit-user-drag: none; transform-origin: center; will-change: transform; touch-action: none; }
.stage > video.main { background: #000; }
.stage.zoomable { cursor: zoom-in; }
.stage.zoomed { cursor: grab; }
.stage.zoomed:active { cursor: grabbing; }
.stage { touch-action: none; }
.zoom-badge { position: absolute; right: 12px; bottom: 12px; z-index: 2; appearance: none; border: 1px solid var(--line); background: rgba(20,26,35,.85); color: var(--fog); border-radius: var(--r); padding: 4px 10px; font-size: 13px; cursor: pointer; }
.stage .nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 80px; border: 0; background: rgba(20,26,35,.45); color: var(--fog); font-size: 28px; cursor: pointer; border-radius: var(--r); opacity: 0; transition: opacity .15s; }
.stage:hover .nav, .stage .nav:focus-visible { opacity: 1; }
.stage .prev { left: 10px; } .stage .next { right: 10px; }
.stage .loading { position: absolute; color: var(--muted); }
.stage .nav { z-index: 2; }
.info {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(330px, 90vw); background: rgba(20,26,35,.96); border-left: 1px solid var(--line);
  padding: 14px 16px; overflow: auto; font-size: 14px; z-index: 3;
}
.info dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.info dt { color: var(--muted); }
.info dd { margin: 0; word-break: break-word; }
.info h3 { font: 600 16px var(--serif); margin: 0 0 10px; }
.info .links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.vtools { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 6px 10px; flex-wrap: wrap; }
.stars { display: flex; gap: 2px; }
.stars button { appearance: none; background: none; border: 0; font-size: 24px; line-height: 1; color: var(--line); cursor: pointer; padding: 2px; }
.stars button.on { color: var(--amber); }
.stars button:hover { color: #ffd08a; }
.seg { display: flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.seg button { appearance: none; border: 0; background: transparent; padding: 6px 10px; cursor: pointer; display: flex; align-items: center; gap: 6px; color: var(--muted); }
.seg button + button { border-left: 1px solid var(--line); }
.seg button.on { background: var(--raised); color: var(--fog); }
.counter { color: var(--muted); font-size: 13px; min-width: 70px; text-align: center; }
.viewer .vgrid { display: none; }
.viewer.gridmode .stage, .viewer.gridmode .film { display: none; }
.viewer.gridmode .vgrid { display: grid; }
.vgrid { min-height: 0; overflow-y: auto; align-content: start; gap: 10px; padding: 4px 14px 14px; grid-template-columns: repeat(auto-fill, minmax(var(--g, 200px), 1fr)); scrollbar-width: thin; }
.vgrid.sm { --g: 150px; gap: 8px; }
.vgrid.md { --g: 200px; }
.vgrid.lg { --g: 320px; gap: 14px; }
.vgrid .gset { grid-column: 1 / -1; margin: 10px 0 0; font: 600 15px/1.3 var(--serif); color: var(--muted); }
.vgrid .gset:first-child { margin-top: 0; }
.gtile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gtile .gimg { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; padding: 0; border: 2px solid transparent; border-radius: 3px; background: var(--panel); cursor: zoom-in; overflow: hidden; }
.gtile.on .gimg { border-color: var(--amber); }
.gtile .gimg:hover, .gtile .gimg:focus-visible { border-color: var(--line); }
.gtile.on .gimg:hover { border-color: var(--amber); }
.gtile .gimg img { width: 100%; height: 100%; object-fit: contain; display: block; }
.gtile .vid, .gtile .raw { position: absolute; bottom: 4px; font-size: 11px; background: rgba(0,0,0,.6); padding: 0 4px; border-radius: 3px; }
.gtile .vid { left: 4px; } .gtile .raw { right: 4px; }
.gmeta { display: flex; align-items: center; gap: 6px; min-height: 26px; }
.vgrid.sm .gmeta { gap: 3px; }
.gmeta .stars { gap: 0; }
.gmeta .stars button { font-size: 16px; padding: 0 1px; }
.vgrid.sm .gmeta .stars button { font-size: 13px; padding: 0; }
.vgrid.lg .gmeta .stars button { font-size: 20px; }
.gmeta > .stars:not(div) { color: var(--amber); font-size: 13px; }
.seg.dots button { padding: 4px 5px; }
.vgrid.sm .seg.dots button { padding: 3px 3px; }
.vgrid.sm .seg.dots .dot { width: 7px; height: 7px; }
.seg.dots button:not(.on) .dot { opacity: .45; }
.gmeta .del { margin-left: auto; }
.icon-btn.del { font-size: 15px; }
.gmeta .del { padding: 4px; font-size: 14px; }
.vgrid.sm .gmeta .del { padding: 2px; font-size: 12px; }
.edit-btns { display: flex; gap: 2px; }
.edit-btns .icon-btn { font-size: 19px; }
.edit-btns .icon-btn:disabled { opacity: .35; cursor: default; }
.stage.busy::after { content: ''; position: absolute; top: 14px; right: 14px; width: 18px; height: 18px; border: 2px solid var(--muted); border-top-color: var(--amber); border-radius: 50%; animation: spin .8s linear infinite; z-index: 3; }
@keyframes spin { to { transform: rotate(360deg); } }
.del-confirm { display: flex; gap: 14px; align-items: flex-start; }
.del-thumb { width: 96px; height: 72px; object-fit: cover; border-radius: 3px; background: var(--panel); flex: none; display: grid; place-items: center; }
.del-confirm p { margin: 0 0 8px; word-break: break-all; }
.film { display: flex; gap: 4px; overflow-x: auto; padding: 6px 10px 10px; scrollbar-width: thin; cursor: grab; user-select: none; }
.film.dragging { cursor: grabbing; }
.film.dragging button { pointer-events: none; }
.film img { -webkit-user-drag: none; }
.film button { flex: none; position: relative; width: 84px; height: 62px; padding: 0; border: 2px solid transparent; border-radius: 3px; background: var(--panel); cursor: pointer; overflow: hidden; opacity: .62; }
.film button.on { border-color: var(--amber); opacity: 1; }
.film button:hover { opacity: 1; }
.film img { width: 100%; height: 100%; object-fit: cover; display: block; }
.film .vid { position: absolute; left: 4px; bottom: 3px; font-size: 11px; background: rgba(0,0,0,.6); padding: 0 4px; border-radius: 3px; }
.film .dot { position: absolute; right: 4px; top: 4px; width: 8px; height: 8px; }
.film .raw { position: absolute; right: 4px; bottom: 3px; font-size: 10px; background: rgba(0,0,0,.6); padding: 0 4px; border-radius: 3px; }

/* ---------- slideshow ---------- */
.show { position: fixed; inset: 0; z-index: 2100; background: #000; cursor: none; }
.show.cursor { cursor: default; }
.show .layer { position: absolute; inset: 0; display: grid; place-items: center; opacity: 0; transition: opacity .9s ease; }
.show .layer.on { opacity: 1; }
.show .layer { overflow: hidden; }
.show .layer img, .show .layer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.show .cap { position: absolute; left: 24px; bottom: 22px; max-width: 70vw; text-shadow: 0 1px 6px #000; transition: opacity .6s; }
.show .cap strong { font: 600 22px/1.2 var(--serif); display: block; }
.show .cap span { color: #c9d0d8; font-size: 14px; }
.show .ctl { position: absolute; top: 14px; right: 14px; display: flex; gap: 6px; opacity: 0; transition: opacity .3s; }
.show.cursor .ctl { opacity: 1; }
.show .ctl .icon-btn { background: rgba(20,26,35,.7); }

/* ---------- dialogs ---------- */
dialog { background: var(--panel); color: var(--fog); border: 1px solid var(--line); border-radius: 10px; padding: 0; width: min(640px, calc(100vw - 24px)); max-height: calc(100vh - 40px); box-shadow: 0 20px 60px rgba(0,0,0,.6); }
dialog::backdrop { background: rgba(8,11,16,.65); }
.dlg-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 18px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--panel); z-index: 1; }
.dlg-head h2 { flex: 1; margin: 0; font: 600 20px var(--serif); }
.dlg-body { padding: 16px 18px; }
.dlg-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px 16px; }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 4px; color: var(--muted); font-size: 13px; }
.form label > input, .form label > select, .form label > textarea { color: var(--fog); font-size: 15px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form .inline { display: flex; align-items: center; gap: 8px; color: var(--fog); font-size: 15px; }
.hint { color: var(--muted); font-size: 13px; margin: 0; }
.err { color: #ffb3ad; font-size: 14px; margin: 0; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px; word-break: break-all; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { appearance: none; background: none; border: 0; border-bottom: 2px solid transparent; padding: 10px 12px; cursor: pointer; color: var(--muted); white-space: nowrap; }
.tabs button.on { color: var(--fog); border-bottom-color: var(--amber); }
.list { display: grid; gap: 8px; }
.item { border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; display: grid; gap: 6px; background: var(--ink); }
.item .top { display: flex; align-items: center; gap: 8px; }
.item .top strong { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.item small { color: var(--muted); }
.progress { height: 6px; background: var(--deep); border-radius: 3px; overflow: hidden; }
.progress > i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .2s; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

.sec { font: 600 17px var(--serif); margin: 18px 0 10px; }
.sec:first-child { margin-top: 0; }
.drop { border: 2px dashed var(--line); border-radius: 8px; padding: 18px; display: grid; justify-items: center; gap: 8px; text-align: center; background: var(--ink); }
.drop p { margin: 0; }
.drop small { color: var(--muted); max-width: 46ch; }
.drop.over { border-color: var(--amber); background: rgba(240,166,60,.08); }
.folder-list { margin: 10px 0 12px; max-height: 300px; overflow: auto; }
.folder-list .item strong { font-weight: 600; }
.opts-wrap { display: grid; gap: 10px; }
fieldset.opts { border: 0; margin: 0; padding: 0; display: grid; gap: 10px; min-width: 0; }
fieldset.opts:disabled { opacity: .45; }
.switch { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; align-items: start; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 38px; height: 22px; border-radius: 11px; background: var(--line); position: relative; transition: background .15s; margin-top: 1px; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--fog); transition: transform .15s; }
.switch input:checked + .track { background: var(--amber); }
.switch input:checked + .track::after { transform: translateX(16px); background: var(--amber-ink); }
.switch input:focus-visible + .track { outline: 2px solid var(--amber); outline-offset: 2px; }
.sw-text { display: grid; gap: 1px; }
.sw-text small { color: var(--muted); font-size: 13px; }
fieldset.opts:disabled .switch { cursor: default; }
.switch.min-rating { cursor: default; }
.switch.min-rating .track-spacer { width: 38px; }
.switch.min-rating select { width: auto; margin-left: 8px; padding: 1px 4px; font-size: 13px; font-weight: normal; color: var(--amber); vertical-align: baseline; }
.compress-box { margin: 2px 0 4px 50px; display: grid; gap: 8px; }
.row4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.row4 label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.row4 input { width: 100%; color: var(--fog); }
.actions { display: flex; gap: 8px; margin: 16px 0 10px; }
details.loose { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 12px; }
details.loose summary { cursor: pointer; color: var(--muted); margin-bottom: 10px; }
.cs-list { display: grid; gap: 10px; margin-top: 12px; }
.cs-row { display: grid; grid-template-columns: auto 1fr; gap: 10px; align-items: start; border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; background: var(--ink); }
.cs-row.off { opacity: .45; }
.cs-inc { padding-top: 7px; }
.cs-main { display: grid; gap: 6px; min-width: 0; }
.cs-main input[type=text] { width: 100%; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 14px; color: var(--fog); }
.cs-main small { color: var(--muted); }
.cs-thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
.cs-thumbs img, .cs-tile, .cs-more { width: 54px; height: 40px; border-radius: 3px; object-fit: cover; background: var(--panel); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.cs-sum { margin-right: auto; color: var(--muted); align-self: center; }
.toasts { position: fixed; right: 14px; bottom: 14px; z-index: 3000; display: grid; gap: 8px; justify-items: end; }
.toast { background: var(--deep); border: 1px solid var(--line); border-left: 3px solid var(--amber); padding: 9px 13px; border-radius: var(--r); max-width: 360px; box-shadow: 0 6px 20px rgba(0,0,0,.4); }
.toast.bad { border-left-color: var(--v2); }

@media (max-width: 720px) {
  .map-tools { flex-direction: column; align-items: flex-start; top: 112px; left: 10px; max-width: calc(100% - 225px); }
  .map-sel-hint { font-size: 12px; }
  .bar { gap: 6px; padding: 0 8px; }
  .brand { flex: none; }
  .brand span { display: none; }
  .brand img { height: 26px; }
  #filtersBtn { padding: 6px 8px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 10px; }
  .film button { width: 64px; height: 48px; }
  .stage .nav { display: none; }
  .form .row { grid-template-columns: 1fr; }
  .row4 { grid-template-columns: 1fr 1fr; }
  .compress-box { margin-left: 0; }
  .vtools { gap: 10px; }
}
@media (max-width: 480px) {
  #slideBtn { display: none; }
  .views a { padding: 5px 8px; }
}
@media (hover: none) { .map-sel-hint .kb { display: none; } }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* place on map */
.place-bar { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; align-items: center; gap: 10px;
  max-width: min(720px, calc(100% - 32px)); padding: 8px 10px 8px 14px; border-radius: 8px; background: var(--panel); border: 1px solid var(--amber); box-shadow: 0 6px 24px rgba(0,0,0,.35); font-size: 14px; }
.place-bar .btn { flex: none; }
.pb-pin { font-size: 18px; }
#map.placing .maplibregl-canvas-container.maplibregl-interactive, #map.placing .maplibregl-canvas { cursor: crosshair; }
#map.placing .maplibregl-marker:not(.pick-marker) { pointer-events: none; opacity: .5; }
.pick-marker { width: 22px; height: 30px; pointer-events: none; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 30'%3E%3Cpath d='M11 29C11 29 2 17.5 2 11a9 9 0 0 1 18 0c0 6.5-9 18-9 18z' fill='%23f2a93b' stroke='%23181c24' stroke-width='1.5'/%3E%3Ccircle cx='11' cy='11' r='3.5' fill='%23181c24'/%3E%3C/svg%3E"); }
.place-opts { display: grid; gap: 4px; margin: 10px 0 14px; max-height: 46vh; overflow-y: auto; }
.place-opt { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; }
.place-opt:has(input:checked) { border-color: var(--amber); background: rgba(242,169,59,.08); }
.place-opt span { display: grid; min-width: 0; }
.place-opt small { color: var(--muted); }
.place-opt code { font-size: 12px; color: var(--muted); max-width: 46ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 640px) { .place-opt { grid-template-columns: auto minmax(0, 1fr); } .place-opt code { grid-column: 2; } .place-bar { font-size: 13px; } }
.place-name { display: grid; gap: 4px; }
.place-name input { width: 100%; font-family: var(--mono, ui-monospace, monospace); font-size: 13px; }

/* grid tiles: rotate buttons over the picture (on hover, keyboard focus, and always on touch screens) */
.gpic { position: relative; }
.grot { position: absolute; top: 6px; right: 6px; display: flex; gap: 4px; opacity: 0; transition: opacity .12s; }
.gtile:hover .grot, .gtile:focus-within .grot, .gtile.busy .grot { opacity: 1; }
@media (hover: none) { .grot { opacity: 1; } }
.grot button { width: 30px; height: 30px; border-radius: 50%; border: 0; background: rgba(12,15,20,.72); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.grot button:hover, .grot button:focus-visible { background: var(--amber); color: var(--amber-ink); }
.vgrid.sm .grot button { width: 24px; height: 24px; font-size: 14px; }
.gtile.busy .gimg::after { content: ''; position: absolute; left: 8px; top: 8px; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.5); border-top-color: var(--amber); border-radius: 50%; animation: spin .8s linear infinite; }

/* viewer messages (video conversion, files that can't be shown) */
.stage .vmsg { position: absolute; left: 50%; bottom: 18%; transform: translateX(-50%); z-index: 4; width: min(460px, calc(100% - 32px)); padding: 12px 16px; border-radius: 8px; background: rgba(12,15,20,.86); border: 1px solid var(--line); text-align: center; font-size: 14px; }
.stage .vmsg p { margin: 0; }
.stage .vbar { height: 4px; margin-top: 10px; border-radius: 2px; background: rgba(255,255,255,.12); overflow: hidden; }
.stage .vbar i { display: block; height: 100%; background: var(--amber); transition: width .6s; }
/* download choice */
.dl-list { display: grid; gap: 6px; min-width: min(420px, 80vw); }
.dl-opt { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; color: inherit; text-decoration: none; }
.dl-opt:hover, .dl-opt:focus-visible { border-color: var(--amber); background: rgba(240,166,60,.08); }
.dl-opt span { word-break: break-all; }
.dl-opt small { color: var(--muted); }

.stage .vtag { position: absolute; top: 12px; left: 12px; z-index: 3; padding: 3px 9px; border-radius: 4px; background: rgba(12,15,20,.78); border: 1px solid var(--amber); color: var(--amber); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; pointer-events: none; }

/* set editor: folder path, click to copy */
.path-copy { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; margin: 0 0 12px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; background: rgba(255,255,255,.03); color: inherit; font: inherit; text-align: left; cursor: copy; }
.path-copy:hover, .path-copy:focus-visible { border-color: var(--amber); }
.path-copy code { font-size: 12.5px; word-break: break-all; }
.path-copy .pc-label { color: var(--muted); font-size: 12px; }
.path-copy .pc-act { color: var(--amber); font-size: 12px; }
.path-copy.done .pc-act::after { content: ' ✓'; }

.place-how { border: 0; padding: 0; margin: 0 0 12px; display: grid; gap: 4px; }
.place-how legend { padding: 0; margin-bottom: 6px; font-weight: 600; }
.place-opt.how { grid-template-columns: auto minmax(0, 1fr); }
.place-how .inline { margin-top: 6px; }
.place-how .hint:empty { display: none; }
.place-name.off { opacity: .45; }

.del-confirm .del-also { display: flex; gap: 8px; align-items: center; margin: 0 0 6px; }

/* photo editor (viewer, filmstrip mode) */
.viewer.editing .vtools, .viewer.editing .film { display: none; }
/* photo editor: the picture and crop layer zoom and pan together (zoompan.js); handles keep their size */
.edit-frame { position: relative; transform-origin: 50% 50%; will-change: transform; }
.edit-frame .crop-layer { inset: 0; }
.edit-frame .crop-box { outline-width: calc(1px / var(--zs, 1)); }
.edit-frame .crop-box .ch { transform: scale(calc(1 / var(--zs, 1))); }
.stage.zp-zoomed { cursor: grab; }
.stage.zp-zoomed:active { cursor: grabbing; }
.er-actions .zoom-ctl { margin-top: 0; }
.edit-frame > canvas.edit-canvas { display: block; image-rendering: auto; box-shadow: 0 2px 18px rgba(0,0,0,.4); }
.editor { border-top: 1px solid var(--line); background: #07090c; padding: 10px 14px 12px; font-size: 13.5px; max-height: 46vh; overflow-y: auto; }
.er-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 4px 28px; }
.er-col { display: grid; gap: 2px; align-content: start; }
.er { display: grid; grid-template-columns: 158px minmax(80px, 1fr) 40px; align-items: center; gap: 10px; min-height: 30px; }
.er-label { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: default; }
.er-label input { margin: 0; }
.er output { text-align: right; font-variant-numeric: tabular-nums; color: var(--muted); }
.er input[type=range] { width: 100%; accent-color: var(--amber); }
.er .btn.sm, .er-crop .btn.sm { padding: 4px 10px; font-size: 13px; }
.er-crop { grid-template-columns: auto auto auto auto; justify-content: start; }
.er-crop select { padding: 4px 6px; }
.er-crop .btn[aria-pressed=true] { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
.er-usm { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 2px 22px; margin-top: 4px; padding-top: 6px; border-top: 1px dashed var(--line); }
.er-actions { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.er-actions .spacer { flex: 1; }
.er-file { color: var(--muted); }
.er-dirty { color: var(--amber); font-size: 12px; }
.crop-layer { position: absolute; overflow: hidden; touch-action: none; z-index: 3; }
.crop-box { position: absolute; box-shadow: 0 0 0 9999px rgba(0,0,0,.58); outline: 1px solid rgba(255,255,255,.9); cursor: move;
  background-image: linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), linear-gradient(rgba(255,255,255,.28), rgba(255,255,255,.28)), linear-gradient(90deg, rgba(255,255,255,.28), rgba(255,255,255,.28)), linear-gradient(90deg, rgba(255,255,255,.28), rgba(255,255,255,.28));
  background-size: 100% 1px, 100% 1px, 1px 100%, 1px 100%; background-position: 0 33.33%, 0 66.67%, 33.33% 0, 66.67% 0; background-repeat: no-repeat; }
.crop-box .ch { position: absolute; width: 16px; height: 16px; background: var(--amber); border: 2px solid #111; border-radius: 3px; }
.ch.nw { left: -8px; top: -8px; cursor: nwse-resize; } .ch.ne { right: -8px; top: -8px; cursor: nesw-resize; }
.ch.sw { left: -8px; bottom: -8px; cursor: nesw-resize; } .ch.se { right: -8px; bottom: -8px; cursor: nwse-resize; }
.ch.n { left: calc(50% - 8px); top: -8px; cursor: ns-resize; } .ch.s { left: calc(50% - 8px); bottom: -8px; cursor: ns-resize; }
.ch.w { top: calc(50% - 8px); left: -8px; cursor: ew-resize; } .ch.e { top: calc(50% - 8px); right: -8px; cursor: ew-resize; }
@media (max-width: 640px) { .er { grid-template-columns: 120px minmax(60px, 1fr) 36px; } .editor { max-height: 55vh; } }

/* selection in the filmstrip and grid (admins) */
.film > button.sel { outline: 3px solid var(--amber); outline-offset: -3px; }
.film > button.sel::after, .gtile.sel .gimg::before { content: '✓'; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--amber); color: var(--amber-ink); font: 700 12px/18px system-ui, sans-serif; text-align: center; z-index: 2; }
.film > button { position: relative; }
.gtile.sel .gimg { border-color: var(--amber); background: rgba(240,166,60,.12); }
.gtile.sel .gimg::before { top: 6px; left: 6px; width: 22px; height: 22px; line-height: 22px; font-size: 14px; }
.vsel { display: flex; align-items: center; gap: 8px; padding: 3px 4px 3px 12px; border-radius: 999px; background: rgba(240,166,60,.14); border: 1px solid var(--amber); }
.vsel .btn.sm { padding: 3px 10px; font-size: 13px; }
.move-list { display: grid; gap: 4px; max-height: 50vh; overflow-y: auto; margin-top: 8px; }
.move-list input[type=text] { width: 100%; margin-top: 6px; }
.move-sub { margin: 8px 0 2px; }
.film > button.sel { opacity: 1; }

.sel-btn[aria-pressed=true] { background: var(--amber); color: var(--amber-ink); border-color: var(--amber); }
/* select mode: every grid tile shows an empty check circle to tap */
.viewer.selecting .gtile:not(.sel) .gimg::before { content: ''; position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); z-index: 2; }
.viewer.selecting .gimg { cursor: pointer; }
/* information panel: GPS, keywords, people */
.info-more { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.info-more .hint { margin: 6px 0 0; }
.info-more dd > span { display: inline-flex; flex-wrap: wrap; align-items: baseline; gap: 2px 8px; }
.info .dms { color: var(--muted); font-variant-numeric: tabular-nums; }
.info .muted { color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline dotted; text-underline-offset: 3px; cursor: copy; font-variant-numeric: tabular-nums; }
.chips { display: flex !important; flex-wrap: wrap; gap: 4px; }
.chip { padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.08); border: 1px solid var(--line); font-size: 12.5px; }
.chip.person { border-color: rgba(240,166,60,.6); }
.chip.person::before { content: '👤 '; font-size: 11px; }

/* panoramas */
.pano-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 10px; }
.pano-item { position: relative; flex: none; width: 150px; display: grid; gap: 4px; color: inherit; text-decoration: none; }
.pano-item img { width: 150px; height: 112px; object-fit: contain; background: #000; border-radius: 4px; }
.pano-item span { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pano-item .icon-btn { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; background: rgba(0,0,0,.65); }
.pano-opts { gap: 16px; margin: 6px 0 10px; }
.pano-status { min-height: 1.3em; margin: 6px 0; }
.pano-preview img { max-width: 100%; max-height: 46vh; display: block; margin: 6px auto 0; border-radius: 4px; }
.pano-chip { border-color: var(--amber); color: var(--amber); }
.dialog-foot .spacer, .pano-foot .spacer { flex: 1; }
.hint.warn { color: var(--amber); }
.dlg-foot .spacer { flex: 1; }

.pano-frame { position: relative; width: fit-content; max-width: 100%; margin: 6px auto 0; }
.pano-frame img { display: block; max-width: 100%; max-height: 46vh; margin: 0; }
.pano-crop { position: absolute; outline: 2px dashed var(--amber); box-shadow: 0 0 0 9999px rgba(0,0,0,.45); pointer-events: none; }
.pano-frame { overflow: hidden; border-radius: 4px; }
.pano-status.warn { color: var(--amber); }

.pano-frame { touch-action: none; cursor: zoom-in; user-select: none; }
.pano-frame.zp-zoomed { cursor: grab; }
.pano-frame.zp-zoomed:active { cursor: grabbing; }
.pano-inner { position: relative; transform-origin: 50% 50%; will-change: transform; }
.pano-inner img { display: block; max-width: 100%; max-height: 46vh; pointer-events: none; }
.zoom-ctl { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 6px; }
.zoom-pct { min-width: 4.5em; text-align: center; font-variant-numeric: tabular-nums; opacity: .8; }

/* Sync archive: review tree */
.sync-dir-line { margin: 0 0 4px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sync-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.sync-chips .chip { appearance: none; border: 1px solid var(--line); background: var(--raised); color: var(--fog); border-radius: 999px; padding: 4px 11px; cursor: pointer; font: inherit; font-size: 13px; }
.sync-chips .chip b { margin-left: 2px; }
.sync-tree-wrap { max-height: min(52vh, 560px); overflow: auto; border: 1px solid var(--line); border-radius: var(--r); background: var(--deep); padding: 6px 4px; }
.sync-tree, .sync-kids { list-style: none; margin: 0; padding: 0; }
.sync-kids { padding-left: 22px; }
.sync-dir > .row { display: flex; align-items: center; gap: 6px; min-height: 30px; }
.sync-dir label, .sync-file label { display: flex; align-items: center; gap: 7px; min-width: 0; cursor: pointer; }
.sync-file label { min-height: 28px; padding-left: 28px; flex-wrap: wrap; }
.sync-tree .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch; }
.sync-tree small { color: var(--muted); font-size: 12px; }
.sync-dir .caret { width: 24px; height: 24px; padding: 0; }
.sync-dir .caret span { display: inline-block; transition: transform .12s; }
.sync-dir .caret[aria-expanded="true"] span { transform: rotate(90deg); }
.badge { display: inline-block; font-size: 11px; line-height: 1; padding: 3px 6px; border-radius: 4px; background: var(--raised); color: var(--fog); border: 1px solid var(--line); white-space: nowrap; }
.badge.act-new, .chip.act-new { border-color: var(--v0); }
.badge.act-update, .chip.act-update { border-color: #5aa0e0; }
.badge.act-meta, .chip.act-meta { border-color: var(--v1); }
.badge.act-del, .chip.act-del, .badge.act-drop, .chip.act-drop { border-color: var(--v2); }
.badge.act-new { color: #8fd6a2; } .badge.act-update { color: #9cc7f0; } .badge.act-meta { color: #f0d77a; } .badge.act-del, .badge.act-drop { color: #f0938c; }
small.err { color: #f0938c; }
@media (max-width: 600px) { .sync-tree .nm { max-width: 22ch; } .sync-kids { padding-left: 14px; } }

/* rating filter (front page and viewer) */
.rating-filter { display: inline-flex; align-items: center; gap: 6px; }
.rating-filter > span { color: var(--muted); }
.rating-filter .op { appearance: none; min-width: 34px; height: 32px; border-radius: var(--r); border: 1px solid var(--line); background: var(--raised); color: var(--fog); font: 600 16px/1 var(--sans, inherit); cursor: pointer; }
.rating-filter .op:hover { border-color: var(--v1); }
#filtersBtn.active::after { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--v1); margin-left: 6px; vertical-align: middle; }
/* viewer filter bar */
.vfilters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 6px 16px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.vfilters[hidden] { display: none; }
.vfilters label { display: inline-flex; align-items: center; gap: 5px; }
.vfilters .fnote { color: var(--muted); font-size: 13px; }
.vfilters .fnote.warn { color: var(--v1); }
.icon-btn.filter-btn[aria-pressed="true"] { background: var(--raised); box-shadow: inset 0 0 0 1px var(--v1); }
/* things to look at about a set, left of its title */
.vnotices { display: flex; gap: 6px; align-items: center; flex: none; margin-left: 10px; }
.vnotices[hidden] { display: none; }
/* stepping through possible panoramas */
.pano-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.pano-nav[hidden] { display: none; }
.pano-pos { color: var(--muted); font-variant-numeric: tabular-nums; }
/* admin: the archive can't be written to */
.archive-alert { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--r); background: rgba(217, 83, 79, .14); border: 1px solid #d9534f; color: #ffd4d1; font-size: 14px; line-height: 1.45; }
.archive-alert strong { color: #ffb3ad; }
.switch.min-rating .min-row { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px; }
.switch.min-rating .min-row select { margin-left: 0; }
.pub-always { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--fog); cursor: pointer; }
.pub-always input { position: static; opacity: 1; width: auto; height: auto; margin: 0; }
.pub-always.off { opacity: .45; }

/* Dates outside the time tag (admins) */
.date-bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 10px 0; font-size: 13px; color: var(--muted); }
.date-list { display: grid; gap: 6px; max-height: min(60vh, 560px); overflow: auto; }
.date-row { display: grid; grid-template-columns: auto 56px 1fr auto; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r); }
.date-row.changed { border-color: var(--v0); }
.date-row img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--deep); }
.date-info { display: grid; min-width: 0; }
.date-info strong, .date-info small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.date-edit { display: flex; gap: 6px; align-items: center; }
.dates-note .top { align-items: center; }
@media (max-width: 600px) {
  .date-row { grid-template-columns: auto 44px 1fr; }
  .date-row img { width: 44px; height: 44px; }
  .date-edit { grid-column: 1 / -1; flex-wrap: wrap; }
}
/* sidecars that differ from their files (Status) */
.sc-row { align-items: start; }
.sc-row.done { opacity: .6; }
.sc-diff { border-collapse: collapse; margin: 6px 0 2px; font-size: 13px; table-layout: fixed; width: 100%; }
.sc-diff tr > :first-child { width: 7.5em; }
.sc-diff th, .sc-diff td { text-align: left; padding: 2px 10px 2px 0; vertical-align: top; }
.sc-diff thead th { color: var(--muted); font-weight: 500; }
.sc-diff tbody th { color: var(--muted); font-weight: 500; white-space: nowrap; }
.sc-diff td { overflow-wrap: anywhere; }
.date-info .sc-diff, .date-info .sc-status { white-space: normal; }
.sc-status.ok { color: var(--v0); } .sc-status.err { color: var(--v2); }
.sc-actions { display: grid; gap: 6px; }
@media (max-width: 600px) { .sc-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; } }
/* info panel: editable name and date (admins) */
.info .edit-line { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.info .edit-line input { flex: 1 1 140px; min-width: 0; }
.info .pen { appearance: none; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 4px; font-size: 13px; }
.info .pen:hover { color: var(--fog); }
