.showing-annotations { grid-template-rows:var(--header) minmax(0,1fr); }
.showing-annotations .statusbar { display:none; }
.annotations { grid-column:1/-1; min-height:0; display:grid; grid-template-columns:minmax(0,1fr) clamp(282px,26vw,370px); background:#f6f6f3; }
.annotation-map-column { position:relative; min-width:0; min-height:0; display:flex; flex-direction:column; }
.annotation-head,.record-head,.an-dlg-head,.an-dlg-foot,.an-actions,.an-position { display:flex; align-items:center; gap:10px; }
.annotation-head { justify-content:space-between; min-height:76px; padding:12px clamp(16px,3vw,42px); background:#fff; border-bottom:1px solid var(--line); }
.annotation-head h1 { font-size:clamp(22px,2vw,30px); letter-spacing:.03em; }
.annotation-surface { position:relative; min-height:0; flex:1; isolation:isolate; }
.annotation-records { min-height:0; border-left:1px solid #dddbe5; display:flex; flex-direction:column; background:#fff; }
.record-head { min-height:76px; justify-content:space-between; padding:12px clamp(14px,1.6vw,25px); border-bottom:1px solid var(--line); }
.record-head h2,.an-images h3 { display:flex; align-items:center; gap:8px; font-size:17px; }
.pin-scopes { display:flex; margin:12px 16px 0; padding:3px; gap:4px; border:1px solid #e2dfe8; border-radius:10px; background:#f7f6fa; }
.pin-scopes button { display:flex; align-items:center; justify-content:center; gap:6px; flex:1; min-height:34px; padding:5px; color:#615970; border-radius:7px; font-size:13px; font-weight:600; transition:background 90ms,color 90ms,transform 90ms; }
.pin-scopes button[aria-pressed=true] { color:var(--deep); background:white; box-shadow:0 1px 5px #34234a19; }
.pin-scopes button:hover:not(:disabled) { color:var(--deep); background:var(--tint); }
.pin-scopes button:active:not(:disabled) { transform:scale(.98); }
.pin-scopes button:disabled { opacity:.55; }
.an-helper,.an-promote small { color:#655d74; font-size:13px; line-height:1.55; }
.an-images .an-helper { display:block; margin-top:7px; }
.an-promote { display:grid; justify-items:start; gap:5px; }
.an-type:disabled span { cursor:default; }
#pinCount,#attachmentCount { font-size:14px; font-weight:600; color:var(--deep); }
.an-primary,.an-btn,.an-danger,.an-position button { display:inline-flex; justify-content:center; align-items:center; gap:7px; min-height:40px; padding:8px 13px; border-radius:9px; font-size:14px; font-weight:600; line-height:1.4; }
.an-primary { color:white; background:var(--deep); }
.an-primary:hover:not(:disabled) { background:#5134ad; }
.an-btn { background:white; color:#4b415e; border:1px solid #d8d3e3; }
.an-btn:hover:not(:disabled) { background:var(--tint); border-color:#b7a4db; }
.an-danger { color:#9d3845; margin-right:auto; }
.an-danger:hover { background:#ffedf0; }
.an-btn:disabled,.an-primary:disabled { cursor:default; opacity:.52; }
.annotations svg.lucide,.annotation-dialog svg.lucide { width:16px; height:16px; }
.records-body { min-height:0; flex:1; overflow:auto; padding:16px; }
.record-empty { display:grid; place-items:center; text-align:center; gap:13px; margin:clamp(16px,5vh,59px) auto; color:#655d74; max-width:22ch; line-height:1.75; }
.record-empty svg.lucide { box-sizing:content-box; width:24px; height:24px; padding:13px; border-radius:50%; background:var(--tint); color:var(--deep); }
.record-list { list-style:none; margin:0; padding:0; display:grid; gap:5px; }
.record-list button { display:flex; align-items:center; width:100%; text-align:left; padding:11px 8px; gap:10px; border-radius:9px; }
.record-list button:hover,.record-list button:focus-visible { background:#f5f2fb; }
.record-glyph { color:var(--deep); background:var(--tint); border-radius:9px; padding:8px; display:grid; place-items:center; flex:none; }
.record-caption { min-width:0; flex:1; }
.record-caption b,.record-caption small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.record-caption small,.record-footer small,.an-position,.an-feedback { color:#6b6377; font-size:13px; line-height:1.55; }
.record-caption small { margin-top:3px; }
.record-footer { border-top:1px solid var(--line); padding:16px 20px; display:grid; gap:8px; }
.an-feedback { padding:10px 18px 0; }
.an-feedback:empty { display:none; }
.an-map-notice { position:absolute; top:85px; left:50%; transform:translateX(-50%); z-index:5; width:max-content; max-width:calc(100% - 24px); display:flex; align-items:center; gap:8px; background:#332a49; color:white; padding:7px 9px 7px 13px; border-radius:10px; box-shadow:0 3px 16px #35264d24; }
.an-map-notice button { color:white; border:1px solid #ffffff70; padding:5px 9px; border-radius:6px; flex:none; }
.an-map-notice button:hover { background:#ffffff24; }
.annotation-dialog { padding:0; width:min(540px,calc(100% - 24px)); max-height:calc(100dvh - 24px); }
#pinForm { display:flex; flex-direction:column; max-height:calc(100dvh - 30px); overflow:hidden; }
.an-dlg-head,.an-dlg-foot { padding:15px 20px; background:#fff; }
.an-dlg-head { justify-content:space-between; border-bottom:1px solid var(--line); }
.an-dlg-head h2 { margin:0; font-size:21px; }
.an-dlg-foot { border-top:1px solid var(--line); justify-content:flex-end; }
.an-fields { display:grid; gap:16px; padding:18px 20px; overflow-y:auto; min-height:0; }
.an-type { margin:0; border:0; padding:0; display:flex; flex-wrap:wrap; gap:8px; }
.an-type legend,.an-inputs label,.an-note,.an-images h3 { font-size:14px; font-weight:650; }
.an-type legend { padding:0 0 7px; }
.an-type label { position:relative; }
.an-type input { position:absolute; width:1px; height:1px; opacity:0; }
.an-type span { display:flex; align-items:center; gap:6px; padding:8px 12px; border:1px solid #dad5e1; border-radius:8px; cursor:pointer; }
.an-type input:checked + span { color:#52379c; background:var(--tint); border-color:#ac94de; }
.an-type input:focus-visible + span { outline:3px solid #9274d8; outline-offset:2px; }
.an-inputs { display:grid; grid-template-columns:1fr 1fr; gap:11px; }
.an-inputs label,.an-note { display:grid; gap:6px; }
.an-inputs input,.an-note textarea { width:100%; min-width:0; padding:9px 10px; font-family:inherit; font-size:15px; font-weight:400; line-height:1.45; border:1px solid #d9d4e2; border-radius:7px; color:var(--ink); background:white; }
.an-note textarea { resize:vertical; min-height:62px; }
.an-position { justify-content:space-between; }
.an-position button { color:var(--deep); background:#f6f3fd; min-height:32px; padding:5px 9px; }
.an-images h3 { margin-bottom:8px; }
.an-thumbs:not(:empty) { display:grid; grid-template-columns:repeat(auto-fill,minmax(80px,1fr)); gap:8px; margin-bottom:10px; }
.an-thumb { position:relative; min-width:0; }
.an-thumb-open { display:block; width:100%; text-align:left; padding:0; }
.an-thumb-open img { display:block; width:100%; height:66px; object-fit:cover; background:#f0edf4; border-radius:6px; }
.an-thumb-open small { display:block; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; margin-top:3px; color:#655c70; }
.an-thumb-remove { position:absolute; right:3px; top:3px; display:grid; place-items:center; width:26px; height:26px; border-radius:50%; background:#342b42df; color:white; }
.an-error { color:#99384b; line-height:1.5; }
.an-preview { width:min(900px,calc(100% - 24px)); }
.an-preview img { display:block; width:100%; height:auto; max-height:calc(100dvh - 105px); object-fit:contain; background:#f3f1f6; }
.an-confirm { width:min(360px,calc(100% - 28px)); }
.an-confirm p { padding:16px 20px; line-height:1.65; }
@media(max-width:760px) {
  .annotations { height:100%; display:flex; flex-direction:column; overflow:auto; }
  .annotation-map-column { flex:0 0 clamp(250px,56%,600px); }
  .annotation-head,.record-head { min-height:51px; padding:7px 14px; }
  .annotation-head h1 { font-size:21px; }
  .annotation-records { flex:1 0 auto; border-left:0; border-top:1px solid #d9d4e2; }
  .records-body { flex:1 0 auto; padding:5px 12px; }
  .record-empty { display:flex; gap:8px; margin:8px 0; max-width:none; text-align:left; font-size:13px; }
  .record-empty svg.lucide { width:16px; height:16px; padding:6px; }
  .record-footer { padding:10px 14px; }
  .an-map-notice { top:56px; font-size:13px; }
  .an-dlg-head,.an-dlg-foot { padding:11px 14px; }
  .an-fields { padding:13px 14px; gap:12px; }
}
@media(max-width:480px) {
  .topbar { gap:5px; padding-inline:8px; }
  .main-nav { gap:8px; }
  .top-actions { margin:0; }
  .main-nav .nav-btn svg { display:none; }
  .nav-btn { white-space:nowrap; }
}
@media(max-width:350px) { .brand img { width:26px; }.brand { gap:5px; }.brand strong { font-size:13px; }.main-nav { gap:5px; } }
