:root {
  --bg: #0b0f14;
  --panel: #121922;
  --panel-2: #1a232e;
  --line: #243040;
  --text: #e7eef6;
  --muted: #8da2b5;
  --accent: #ffb347;
  --accent-2: #38bdf8;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overscroll-behavior: none; overflow: hidden; }
body {
  background: var(--bg); color: var(--text);
  font: 15px/1.4 -apple-system, "Segoe UI", Roboto, system-ui, sans-serif;
  display: flex; flex-direction: column; height: 100dvh; overflow: hidden;
}

/* auth gate */
.auth-gate {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card { width: 100%; max-width: 340px; text-align: center; }
.auth-brand { font-size: 13px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent); }
.auth-sub { font-size: 24px; font-weight: 700; margin: 4px 0 24px; }
#auth-form { display: flex; flex-direction: column; gap: 12px; }
#auth-form input {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 13px 14px; font-size: 16px; font-family: inherit;
}
#auth-form .btn.primary { padding: 13px; font-size: 16px; margin-top: 4px; }
.auth-remember { display: flex; align-items: center; gap: 9px; font-size: 14px; color: var(--muted); text-align: left; margin: 2px 0 2px; cursor: pointer; }
.auth-remember input { width: 18px; height: 18px; accent-color: var(--accent); }
.auth-err { color: #fca5a5; font-size: 13px; min-height: 16px; text-align: left; }
.auth-note { color: var(--muted); font-size: 12px; margin-top: 18px; }

/* header */
header {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  padding: calc(8px + var(--safe-top)) 10px 8px;
  background: linear-gradient(180deg, #0e141b, #0b0f14);
  border-bottom: 1px solid var(--line); z-index: 30;
}
.hdr-spacer { width: 40px; flex: 0 0 40px; }
.ranch-dd {
  flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 6px;
  background: none; border: 0; color: var(--text); cursor: pointer; padding: 6px 4px;
}
.ranch-dd .ranch { font-size: 17px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: .01em; }
.ranch-dd .caret { color: var(--muted); font-size: 12px; flex: 0 0 auto; }
.ranch-dd:active { opacity: .7; }
.icon-btn {
  width: 40px; height: 40px; flex: 0 0 40px; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; cursor: pointer; border-radius: 10px;
}
.icon-btn:active { background: var(--panel-2); }
.icon-btn .bars, .icon-btn .bars::before, .icon-btn .bars::after {
  content: ""; display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--text); position: relative;
}
.icon-btn .bars::before { position: absolute; top: -6px; }
.icon-btn .bars::after { position: absolute; top: 6px; }
.hdr-pop {
  position: absolute; top: calc(100% + 4px); z-index: 40; min-width: 180px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.55);
}
.hdr-pop { left: 50%; transform: translateX(-50%); max-height: 78vh; overflow-y: auto; }
.hdr-pop.right { left: auto; right: 8px; transform: none; }
.hdr-pop.left { left: 8px; right: auto; transform: none; min-width: 210px; }
.menu-sep { height: 1px; background: var(--line); margin: 5px 8px; }
.menu-lbl { font-size: 10px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; padding: 6px 12px 3px; }
.menu-item {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  background: none; border: 0; color: var(--text); font-size: 15px; font-weight: 600;
  padding: 11px 12px; border-radius: 9px; cursor: pointer; white-space: nowrap;
}
.menu-item:active, .menu-item.on { background: var(--panel-2); }
.menu-item.on { color: var(--accent); }
.menu-item .mi-ic { font-size: 17px; width: 22px; text-align: center; flex: 0 0 auto; }
.menu-item .check { margin-left: auto; color: var(--accent); }
.btn {
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line);
  border-radius: 10px; padding: 8px 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn.on { background: var(--accent); color: #0e1726; border-color: var(--accent); }

/* map */
.map-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; }
#map { width: 100%; height: 100%; display: block; touch-action: none; background: #05080c; cursor: grab; }
#map:active { cursor: grabbing; }
/* north compass (map is north-up, so a static indicator) */
.compass {
  position: absolute; left: 12px; top: 12px; z-index: 7; width: 42px; height: 42px; border-radius: 50%;
  background: rgba(12,18,26,.82); border: 1px solid var(--line); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.compass .needle {
  width: 0; height: 0; border-left: 6px solid transparent; border-right: 6px solid transparent;
  border-bottom: 15px solid #e5484d; position: absolute; top: 6px;
}
.compass .needle::after {
  content: ""; position: absolute; top: 15px; left: -6px;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 13px solid #cfd8e3;
}
.compass .n { position: absolute; bottom: 3px; font-size: 9px; font-weight: 800; color: var(--muted); letter-spacing: .05em; }

/* bottom map toolbar (HuntStand-style), sits just above the tab bar */
.map-toolbar {
  position: absolute; left: 0; right: 0; bottom: calc(10px + var(--safe-bottom)); z-index: 15;
  display: flex; align-items: flex-end; justify-content: center; gap: 14px; pointer-events: none;
}
.map-toolbar > * { pointer-events: auto; }
.tb-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 56px;
  background: rgba(12,18,26,.9); border: 1px solid var(--line); border-radius: 14px;
  padding: 8px 2px 6px; color: var(--text); cursor: pointer; backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px rgba(0,0,0,.45);
}
.tb-btn .tb-ic { font-size: 18px; line-height: 1; }
.tb-btn .tb-lbl { font-size: 9px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.tb-btn:active { transform: scale(.95); }
.tb-btn.on { border-color: var(--accent); }
.tb-btn.on .tb-ic, .tb-btn.on .tb-lbl { color: var(--accent); }
.tb-add {
  width: 62px; height: 62px; border-radius: 50%; margin: 0 2px 2px;
  background: var(--accent); color: #0e1726; border: 3px solid #0b0f14;
  font-size: 32px; font-weight: 400; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 18px rgba(0,0,0,.5);
}
.tb-add:active { transform: scale(.94); }
.tb-add.on { background: #e5484d; color: #fff; }
#status {
  position: absolute; right: 12px; top: 12px; z-index: 7; max-width: 52%;
  background: rgba(12,18,26,.82); border: 1px solid var(--line); border-radius: 8px;
  padding: 6px 10px; font-size: 11px; color: var(--muted); backdrop-filter: blur(4px); text-align: right;
}

/* legend — below the compass on the left */
.legend {
  position: absolute; left: 12px; top: 62px; display: flex; flex-wrap: wrap; gap: 6px 10px;
  max-width: 60%; background: rgba(12,18,26,.8); border: 1px solid var(--line);
  border-radius: 8px; padding: 7px 9px; backdrop-filter: blur(4px); z-index: 6;
}
.legend .li { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; border: 1px solid rgba(0,0,0,.5); }
.legend .li-toggle { cursor: pointer; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; margin-left: 2px; }
.legend .li-toggle:not(.on) { opacity: .5; text-decoration: line-through; }

/* bottom sheet (pin detail) */
.sheet {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--panel); border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0; padding: 14px 16px calc(16px + var(--safe-bottom));
  max-height: 82%; overflow-y: auto; -webkit-overflow-scrolling: touch;
  transform: translateY(110%); transition: transform .22s cubic-bezier(.2,.8,.2,1), visibility .22s;
  box-shadow: 0 -8px 30px rgba(0,0,0,.5);
  visibility: hidden;
}
.sheet.open { transform: translateY(0); visibility: visible; }
.sheet .grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 10px; }
.sheet .head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.sheet .head .dot { width: 14px; height: 14px; border-radius: 50%; }
.sheet .head b { font-size: 17px; flex: 1; }
.sheet .head .x { color: var(--muted); font-size: 22px; line-height: 1; padding: 2px 6px; cursor: pointer; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; text-align: right; }

/* tab bar */
.tabs {
  display: flex; background: var(--panel); border-top: 1px solid var(--line);
  padding-bottom: var(--safe-bottom); z-index: 6;
}
.tab {
  flex: 1; text-align: center; padding: 10px 2px 12px; font-size: 10px; color: var(--muted);
  cursor: pointer; border: 0; background: none; font-weight: 600; min-width: 0;
}
.tab .ic { display: block; font-size: 18px; margin-bottom: 2px; }
.tab.on { color: var(--accent); }
.tab[data-soon] { opacity: .55; }

/* pin placement crosshair + action bar */
.crosshair {
  position: absolute; left: 50%; top: 50%; width: 42px; height: 42px;
  transform: translate(-50%, -50%); z-index: 14; pointer-events: none;
}
.crosshair::before, .crosshair::after {
  content: ""; position: absolute; background: var(--accent); box-shadow: 0 0 0 1px rgba(0,0,0,.5);
}
.crosshair::before { left: 50%; top: 0; width: 2px; height: 100%; transform: translateX(-50%); }
.crosshair::after { top: 50%; left: 0; height: 2px; width: 100%; transform: translateY(-50%); }
.crosshair > i {
  position: absolute; left: 50%; top: 50%; width: 14px; height: 14px; border: 2px solid var(--accent);
  border-radius: 50%; transform: translate(-50%, -50%); background: rgba(255,179,71,.15);
}
.placebar {
  position: absolute; left: 12px; right: 12px; bottom: calc(96px + var(--safe-bottom)); z-index: 16;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: rgba(12,18,26,.92); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; backdrop-filter: blur(5px);
}
.placebar span { font-size: 13px; color: var(--muted); }
.placebar-btns { display: flex; gap: 8px; flex: 0 0 auto; }

/* pin detail actions */
.sheet-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.sheet-actions .btn { flex: 1; }
.sheet-actions .act-wide { flex-basis: 100%; }
.btn.danger { color: #fca5a5; border-color: rgba(248,113,113,.4); }

/* conditions strip (Sits view) */
.conditions {
  position: absolute; left: 12px; right: 12px; top: 12px; z-index: 8;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: rgba(12,18,26,.88); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 12px; font-size: 13px; backdrop-filter: blur(5px);
}
.conditions b { font-size: 15px; color: var(--accent); }
.conditions small { font-size: 10px; color: var(--muted); font-weight: 600; }
.conditions .muted { color: var(--muted); font-size: 12px; }

/* ranked-sits panel */
.panel {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 15;
  max-height: 46%; display: flex; flex-direction: column;
  background: var(--panel); border-top: 1px solid var(--line);
  border-radius: 16px 16px 0 0; box-shadow: 0 -8px 30px rgba(0,0,0,.5);
  padding-bottom: var(--safe-bottom);
}
.panel .grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 6px; }
.panel-head { display: flex; align-items: baseline; gap: 10px; padding: 2px 16px 8px; }
.panel-head b { font-size: 15px; }
.panel-head .muted { color: var(--muted); font-size: 12px; }
#sits-list { overflow-y: auto; padding: 0 10px 8px; -webkit-overflow-scrolling: touch; }
.sit-empty { color: var(--muted); padding: 16px; text-align: center; font-size: 13px; }
.sit {
  display: flex; align-items: center; gap: 12px; padding: 10px 8px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.sit:active { background: var(--panel-2); }
.sit-rank {
  flex: 0 0 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; background: #0e1726; color: var(--accent); border: 1.5px solid var(--accent);
}
.sit-rank.top { background: var(--accent); color: #0e1726; border-color: #fff; }
.sit-body { flex: 1; min-width: 0; }
.sit-title { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sit-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.sit-q { text-align: center; min-width: 34px; }
.sit-q b { font-size: 17px; color: var(--accent); }
.sit-q small { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* full-screen content view (Log / Group) */
.fullview {
  position: absolute; inset: 0; z-index: 12; background: var(--bg);
  display: flex; flex-direction: column;
}
.fullview-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--line);
}
.fullview-head b { font-size: 18px; }
.head-btns { display: flex; gap: 8px; }

/* stand board */
.date-chips { display: flex; gap: 8px; padding: 10px 16px 4px; }
.date-chips button {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.date-chips button.on { background: var(--accent); color: #0e1726; border-color: var(--accent); }
#board-body { flex: 1; overflow-y: auto; padding: 8px 16px calc(16px + var(--safe-bottom)); }
.slot-sec { margin-top: 16px; }
.slot-head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin-bottom: 8px; }
.slot-empty { color: var(--muted); font-size: 13px; padding: 6px 0; }
.claim-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.claim-row .cdot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-2); flex: 0 0 auto; }
.claim-row .cspot { flex: 1; font-weight: 600; }
.claim-row .cwho { color: var(--muted); font-size: 13px; }
.claim-row .crel { color: #fca5a5; font-size: 12px; cursor: pointer; padding: 4px 8px; border: 1px solid rgba(248,113,113,.4); border-radius: 7px; }
.board-empty { color: var(--muted); text-align: center; padding: 30px 16px; line-height: 1.7; }
#claim-body, #dir-body { display: flex; flex-direction: column; gap: 14px; }
#claim-body label, #dir-body label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
#claim-body select, #dir-body select { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 11px 12px; font-size: 15px; width: 100%; }
#dir-body .dir-btns { display: flex; gap: 8px; }
#dir-body .dir-btns .btn { flex: 1; }

/* member permissions */
#member-body { display: flex; flex-direction: column; gap: 6px; }
#member-body .btn { margin-top: 10px; }
.perm-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 2px; border-bottom: 1px solid var(--line); font-size: 15px; }
.perm-row input[type=checkbox] { width: 22px; height: 22px; accent-color: var(--accent); }
.member.tappable { cursor: pointer; }
.member .chev { color: var(--muted); font-size: 18px; }

/* group / account */
#group-body { flex: 1; overflow-y: auto; padding: 14px 16px calc(16px + var(--safe-bottom)); }
.group-sec { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; margin: 18px 0 8px; }
.group-sec:first-child { margin-top: 0; }
.member { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.member .av { width: 34px; height: 34px; border-radius: 50%; background: var(--panel-2); display: grid; place-items: center; font-weight: 700; color: var(--accent); flex: 0 0 auto; }
.member .mn { flex: 1; font-weight: 600; }
.member .mr { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.group-ranch { font-size: 20px; font-weight: 700; }
.group-you { color: var(--muted); font-size: 13px; margin-top: 2px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.linkbtn { background: none; border: none; color: var(--accent); font-size: 13px; padding: 2px 0; cursor: pointer; text-decoration: underline; }
#group-body .btn { width: 100%; margin-top: 10px; }

/* import tray */
#import-body { display: flex; flex-direction: column; gap: 14px; }
#import-body label.photo-add { aspect-ratio: auto; padding: 16px; font-size: 14px; font-weight: 600; color: var(--text); }
.imp-hint { color: var(--muted); font-size: 13px; line-height: 1.5; }
#import-body select { background: var(--panel-2); border: 1px solid var(--line); color: var(--text); border-radius: 9px; padding: 11px 12px; font-size: 15px; width: 100%; }
#import-body label.fld { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
#imp-tray .ph.imp { cursor: pointer; }
#imp-tray .ph.imp::after { content: ""; position: absolute; inset: 0; border: 2.5px solid transparent; border-radius: 9px; }
#imp-tray .ph.imp.sel::after { border-color: var(--accent); }
#imp-tray .ph.imp.sel::before { content: "\2713"; position: absolute; top: 3px; right: 3px; z-index: 1; width: 18px; height: 18px; background: var(--accent); color: #0e1726; border-radius: 50%; font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.imp-date { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; text-align: center; padding: 2px; }
#log-list { flex: 1; overflow-y: auto; padding: 6px 12px calc(14px + var(--safe-bottom)); -webkit-overflow-scrolling: touch; }
.log-empty { color: var(--muted); text-align: center; padding: 40px 20px; line-height: 1.8; }

.log-item { display: flex; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.log-tag {
  flex: 0 0 auto; align-self: flex-start; font-size: 10px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; padding: 3px 7px; border-radius: 6px; margin-top: 2px;
}
.log-tag.sit { background: rgba(56,189,248,.18); color: #7dd3fc; }
.log-tag.sighting { background: rgba(74,222,128,.18); color: #86efac; }
.log-tag.harvest { background: rgba(251,146,60,.2); color: var(--accent); }
.log-body { flex: 1; min-width: 0; }
.log-title { font-weight: 600; font-size: 15px; }
.log-meta { color: var(--muted); font-size: 12px; margin-top: 2px; }
.log-notes { font-size: 13px; margin-top: 4px; color: #c7d3df; }

/* entry form */
.sheet.tall { max-height: 88%; overflow-y: auto; }
#entry-body, #pinform-body, #deerform-body { display: flex; flex-direction: column; gap: 14px; }
.seg { display: flex; background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button { flex: 1; padding: 9px 4px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 14px; border-radius: 8px; cursor: pointer; }
.seg button.on { background: var(--accent); color: #0e1726; }
#entry-body label, #pinform-body label, #deerform-body label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
#entry-body .row, #pinform-body .row, #deerform-body .row { display: flex; gap: 12px; }
#entry-body .row label, #pinform-body .row label, #deerform-body .row label { flex: 1; }
#entry-body input, #entry-body select, #entry-body textarea,
#pinform-body input, #pinform-body select, #pinform-body textarea,
#deerform-body input, #deerform-body select, #deerform-body textarea {
  background: var(--panel-2); border: 1px solid var(--line); color: var(--text);
  border-radius: 9px; padding: 11px 12px; font-size: 15px; font-family: inherit; width: 100%;
}
#entry-body textarea, #pinform-body textarea, #deerform-body textarea { resize: vertical; }
.btn.primary { background: var(--accent); color: #0e1726; border-color: var(--accent); font-size: 15px; padding: 12px; }
#entry-save { margin-top: 2px; }

/* deer list + cards */
#deer-list { flex: 1; overflow-y: auto; padding: 8px 12px calc(14px + var(--safe-bottom)); display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-content: start; }
.deer-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; cursor: pointer; }
.deer-card .thumb { width: 100%; aspect-ratio: 4/3; background: var(--panel-2) center/cover no-repeat; display: grid; place-items: center; color: var(--muted); font-size: 26px; }
.deer-card .cap { padding: 8px 10px; }
.deer-card .cap .nm { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deer-card .cap .loc { color: var(--muted); font-size: 11px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.status { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: 6px; }
.status.shoot { background: rgba(248,113,113,.2); color: #fca5a5; }
.status.pass { background: rgba(74,222,128,.18); color: #86efac; }
.status.unknown { background: rgba(148,163,184,.18); color: var(--muted); }
.deer-card .cap .status { margin-top: 6px; }
.deer-empty { grid-column: 1/-1; color: var(--muted); text-align: center; padding: 40px 20px; line-height: 1.8; }

/* deer form + detail */
#deerform-body, #deerdet-body { display: flex; flex-direction: column; gap: 14px; }
.photo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.photo-grid .ph { position: relative; aspect-ratio: 1; border-radius: 9px; overflow: hidden; background: var(--panel-2) center/cover no-repeat; }
.photo-grid .ph .rm { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; border: 0; font-size: 13px; line-height: 20px; cursor: pointer; }
.photo-add { aspect-ratio: 1; border: 1.5px dashed var(--line); border-radius: 9px; display: grid; place-items: center; color: var(--muted); font-size: 24px; cursor: pointer; }
.photo-add input { display: none; }
.gallery { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
.gallery img { height: 150px; border-radius: 10px; flex: 0 0 auto; }
.deerdet-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); }
.deerdet-row span { color: var(--muted); }
.seg.status-seg button.on[data-s="shoot"] { background: #f87171; color: #1a0e0e; }
.seg.status-seg button.on[data-s="pass"] { background: #4ade80; color: #0e1a0e; }

/* pin sheet: deer-at-spot mini list */
.pin-deer { margin-top: 12px; }
.pin-deer h4 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin: 0 0 7px; font-weight: 700; }
.pin-deer-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-top: 1px solid var(--line); cursor: pointer; }
.pin-deer-row .pdthumb { width: 40px; height: 40px; border-radius: 8px; background: var(--panel-2) center/cover no-repeat; flex: 0 0 auto; display: grid; place-items: center; color: var(--muted); font-size: 16px; }
.pin-deer-row .pdname { flex: 1; font-weight: 600; font-size: 14px; }

/* toast */
#toast {
  position: absolute; left: 50%; bottom: 76px; transform: translateX(-50%) translateY(10px);
  background: #0e141b; border: 1px solid var(--line); color: var(--text);
  padding: 9px 14px; border-radius: 10px; font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 30;
}
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
