:root {
  --bg: #f4f6f3;
  --panel: #ffffff;
  --panel-muted: #eef2ec;
  --ink: #17201b;
  --muted: #657067;
  --line: #d9dfd7;
  --forest: #25352d;
  --forest-2: #3d5748;
  --copper: #a65f3f;
  --blue: #41647b;
  --yellow: #d6a33f;
  --danger: #a63d40;
  --shadow: 0 18px 50px rgba(20, 30, 25, 0.08);
  --radius: 8px;
  --control: 44px;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(180deg, rgba(37, 53, 45, 0.05), transparent 280px),
    var(--bg);
}

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.auth-card {
  display: grid;
  gap: 20px;
  width: min(520px, 100%);
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-brand {
  padding: 0;
}

.auth-card h1 {
  font-size: clamp(1.8rem, 7vw, 2.6rem);
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form .primary-action {
  width: 100%;
}

.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.app-shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid rgba(23, 32, 27, 0.1);
  background: #fbfcfa;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: var(--control);
  padding: 0 8px;
  color: var(--forest);
  font-size: 1.05rem;
  font-weight: 780;
  text-decoration: none;
}

.brand img {
  width: 32px;
  height: 32px;
}

.nav-tabs {
  display: grid;
  gap: 8px;
}

.nav-tab,
.icon-button,
.primary-action,
.secondary-action,
.ghost-action,
.file-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: var(--control);
  border: 1px solid transparent;
  border-radius: var(--radius);
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.nav-tab {
  justify-content: flex-start;
  width: 100%;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.nav-tab:hover,
.nav-tab.is-active {
  background: var(--panel-muted);
  color: var(--forest);
}

.nav-tab.is-active::before {
  position: absolute;
  left: 0;
  width: 3px;
  height: 24px;
  border-radius: 99px;
  background: var(--copper);
  content: "";
}

.sidebar-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.icon-button {
  width: 44px;
  background: #ffffff;
  border-color: var(--line);
  color: var(--forest);
}

.icon-button:hover,
.secondary-action:hover,
.ghost-action:hover,
.file-button:hover {
  border-color: rgba(37, 53, 45, 0.26);
  transform: translateY(-1px);
}

.main-panel {
  width: min(1220px, 100%);
  padding: 28px clamp(18px, 4vw, 44px) 42px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.topbar-actions {
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.workspace-control {
  width: min(280px, 30vw);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--copper);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  max-width: 820px;
  margin: 0;
  color: var(--forest);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.1rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.primary-action {
  padding: 0 16px;
  background: var(--forest);
  color: #ffffff;
  border-color: var(--forest);
  box-shadow: 0 12px 28px rgba(37, 53, 45, 0.18);
  font-weight: 780;
  white-space: nowrap;
}

.primary-action:hover {
  background: #1d2a23;
  transform: translateY(-1px);
}

.secondary-action,
.ghost-action,
.file-button {
  padding: 0 13px;
  background: #ffffff;
  border-color: var(--line);
  color: var(--forest);
  font-weight: 750;
  white-space: nowrap;
}

.ghost-action {
  background: transparent;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.metric {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 10px 28px rgba(20, 30, 25, 0.04);
}

.metric-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.metric strong {
  color: var(--forest);
  font-size: 1.8rem;
  line-height: 1;
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.entry-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  gap: 16px;
  align-items: start;
  min-width: 0;
}

.entry-core {
  grid-row: span 4;
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.activity-toggle {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  min-height: 44px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f8f5;
}

.view-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: min(320px, 100%);
  min-height: 44px;
  padding: 4px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f6f8f5;
}

.segment {
  min-width: 0;
  min-height: 34px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 760;
}

.segment.is-selected {
  background: var(--forest);
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 53, 45, 0.18);
}

.form-grid,
.filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 760;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--control);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

textarea {
  min-height: 128px;
  padding-top: 12px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(65, 100, 123, 0.14);
}

.geo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.geo-status {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.notes-field {
  margin-top: 8px;
}

.inline-editor {
  display: grid;
  gap: 10px;
  align-items: end;
}

.inline-editor.two-one {
  grid-template-columns: minmax(0, 1.3fr) minmax(120px, 0.8fr) auto;
}

.bag-editor {
  grid-template-columns: minmax(140px, 1fr) 82px minmax(130px, 0.9fr) minmax(160px, 1fr) auto auto;
}

.bag-photo-button {
  min-width: 156px;
}

.manual-location-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(180px, 0.8fr);
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.field-hint {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.bag-photo-tray {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 40px;
  margin-top: 12px;
}

.bag-photo-thumb {
  position: relative;
  overflow: hidden;
  width: 58px;
  height: 58px;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef2ec;
}

.bag-photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bag-photo-thumb button {
  position: absolute;
  top: 3px;
  right: 3px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 32, 27, 0.78);
  color: #ffffff;
}

.photo-geo-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  min-height: 18px;
  border-radius: 999px;
  background: var(--blue);
  color: #ffffff;
  padding: 2px 5px;
  font-size: 0.58rem;
  font-weight: 850;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 44px;
  margin-top: 14px;
}

.chip,
.tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  min-height: 32px;
  border: 1px solid rgba(61, 87, 72, 0.2);
  border-radius: 999px;
  background: #f2f6f1;
  color: var(--forest);
  padding: 0 10px;
  font-size: 0.82rem;
  font-weight: 760;
}

.chip button,
.row-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
}

.chip button:hover,
.row-action:hover {
  background: rgba(166, 61, 64, 0.08);
  color: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  max-width: 100%;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #f6f8f5;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-size: 0.92rem;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.file-button {
  overflow: hidden;
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  min-height: 84px;
}

.photo-tile {
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #eef2ec;
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-tile button {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 32, 27, 0.78);
  color: #ffffff;
}

.form-actions {
  display: none;
}

.record-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.record-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.record-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.record-title {
  display: grid;
  gap: 4px;
}

.record-title strong {
  color: var(--forest);
  font-size: 1rem;
}

.record-title span,
.record-meta,
.empty-state {
  color: var(--muted);
  font-size: 0.88rem;
}

.record-actions {
  display: flex;
  gap: 6px;
}

.record-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-notes {
  margin: 0;
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.45;
}

.record-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.record-photos img {
  width: 76px;
  height: 76px;
  border-radius: var(--radius);
  object-fit: cover;
}

.bag-photo-section {
  display: grid;
  gap: 8px;
  padding-top: 2px;
}

.bag-photo-section > div {
  display: grid;
  gap: 7px;
}

.bag-photo-section strong {
  color: var(--forest);
  font-size: 0.88rem;
}

.mini-photo-row {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 112px;
}

.mini-photo-wrap,
.mini-photo-row img,
.mini-photo-row span {
  width: 34px;
  height: 34px;
  border: 1px solid #ffffff;
  border-radius: 6px;
  background: var(--forest);
  color: #ffffff;
  object-fit: cover;
}

.mini-photo-wrap {
  position: relative;
  display: block;
  overflow: hidden;
  padding: 0;
}

.mini-photo-wrap img {
  display: block;
  border: 0;
  border-radius: 0;
}

.mini-photo-wrap i {
  position: absolute;
  right: 3px;
  bottom: 3px;
  width: 8px;
  height: 8px;
  border: 1px solid #ffffff;
  border-radius: 50%;
  background: var(--yellow);
}

.mini-photo-row > span:not(.mini-photo-wrap) {
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 850;
}

.shot-location {
  margin-top: 4px;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 760;
}

.map-album {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.field-map {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(33deg, rgba(65, 100, 123, 0.18) 0 12%, transparent 12% 100%),
    linear-gradient(145deg, transparent 0 52%, rgba(214, 163, 63, 0.18) 52% 64%, transparent 64%),
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.88), transparent 17%),
    linear-gradient(90deg, rgba(61, 87, 72, 0.18), rgba(255, 255, 255, 0.64)),
    #e8eee5;
}

.field-map::before,
.field-map::after {
  position: absolute;
  inset: 28px 42px;
  border: 1px solid rgba(61, 87, 72, 0.2);
  border-radius: 42% 58% 55% 45%;
  content: "";
}

.field-map::after {
  inset: 86px 88px 44px 70px;
  border-color: rgba(166, 95, 63, 0.24);
  transform: rotate(-10deg);
}

.map-grid-lines {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    linear-gradient(rgba(37, 53, 45, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 53, 45, 0.08) 1px, transparent 1px);
  background-size: 46px 46px;
}

.album-pin {
  position: absolute;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  padding: 0;
  overflow: hidden;
  border: 3px solid #ffffff;
  border-radius: 16px;
  background: var(--forest);
  color: #ffffff;
  box-shadow: 0 16px 34px rgba(23, 32, 27, 0.26);
  transform: translate(-50%, -50%);
}

.album-pin img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.album-pin span {
  font-size: 1.35rem;
  font-weight: 850;
}

.album-pin::after {
  position: absolute;
  right: 8px;
  bottom: 5px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 2px #ffffff;
  content: "";
}

.album-pin.is-shot::after {
  background: var(--copper);
}

.map-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  margin: 0;
  color: var(--muted);
  font-weight: 780;
}

.map-card-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.map-card {
  display: grid;
  grid-template-columns: 74px minmax(180px, 1fr);
  gap: 10px;
  min-width: 290px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.map-card-image {
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--forest);
  color: #ffffff;
  font-size: 1.4rem;
  font-weight: 850;
}

.map-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.map-card div:last-child {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 0;
}

.map-card strong {
  color: var(--forest);
}

.map-card span {
  color: var(--muted);
  font-size: 0.84rem;
}

.calendar-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 16px;
}

.calendar-controls {
  display: flex;
  gap: 8px;
}

.month-title {
  margin: 0 0 14px;
  color: var(--forest);
  font-size: 1rem;
  letter-spacing: 0;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.calendar-weekday {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-align: center;
  text-transform: uppercase;
}

.calendar-day {
  display: grid;
  align-content: space-between;
  min-width: 0;
  min-height: 76px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
  color: var(--ink);
  text-align: left;
}

.calendar-day.is-empty {
  background: transparent;
  border-color: transparent;
  pointer-events: none;
}

.calendar-day.is-today {
  border-color: var(--copper);
  box-shadow: inset 0 0 0 1px rgba(166, 95, 63, 0.25);
}

.day-number {
  font-weight: 850;
}

.day-dots {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 8px;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.event-dot {
  background: var(--copper);
}

.record-dot {
  background: var(--blue);
}

.event-form {
  display: grid;
  gap: 12px;
}

.event-form .primary-action {
  width: 100%;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.event-card.is-past {
  opacity: 0.72;
}

.event-date-block {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: var(--radius);
  background: var(--forest);
  color: #ffffff;
}

.event-date-block strong {
  font-size: 1.45rem;
  line-height: 1;
}

.event-date-block span {
  font-size: 0.76rem;
  font-weight: 820;
  text-transform: uppercase;
}

.event-detail {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.event-detail strong {
  color: var(--forest);
}

.event-detail span,
.event-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.event-actions {
  display: flex;
  gap: 6px;
}

.account-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(360px, 1.2fr);
  gap: 16px;
  align-items: start;
}

.account-summary,
.member-list {
  display: grid;
  gap: 10px;
}

.account-row,
.member-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.account-row span,
.member-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.account-row strong,
.member-row strong {
  color: var(--forest);
}

.member-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.member-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 120px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.estate-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 16px;
  margin-bottom: 16px;
}

.estate-map {
  position: relative;
  overflow: hidden;
  height: 220px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(35deg, rgba(65, 100, 123, 0.15) 0 12%, transparent 12% 100%),
    linear-gradient(145deg, transparent 0 54%, rgba(214, 163, 63, 0.16) 54% 67%, transparent 67%),
    linear-gradient(90deg, rgba(61, 87, 72, 0.14), rgba(255, 255, 255, 0.66)),
    #eef2ec;
}

.estate-map::before,
.estate-map::after {
  position: absolute;
  inset: 22px 30px;
  border: 1px solid rgba(61, 87, 72, 0.22);
  border-radius: 36% 64% 52% 48%;
  content: "";
}

.estate-map::after {
  inset: 62px 70px 34px 52px;
  border-color: rgba(166, 95, 63, 0.26);
  transform: rotate(-8deg);
}

.map-line {
  position: absolute;
  height: 2px;
  background: rgba(65, 100, 123, 0.35);
  transform-origin: left center;
}

.map-line-one {
  top: 64px;
  left: 30px;
  width: 190px;
  transform: rotate(15deg);
}

.map-line-two {
  top: 148px;
  left: 92px;
  width: 250px;
  transform: rotate(-12deg);
}

.map-marker {
  position: absolute;
  width: 14px;
  height: 14px;
  border: 3px solid #ffffff;
  border-radius: 50%;
  background: var(--copper);
  box-shadow: 0 8px 18px rgba(23, 32, 27, 0.22);
}

.marker-one {
  top: 54px;
  left: 86px;
}

.marker-two {
  top: 126px;
  left: 194px;
  background: var(--blue);
}

.marker-three {
  right: 88px;
  bottom: 44px;
  background: var(--yellow);
}

.area-list,
.species-list {
  display: grid;
  gap: 10px;
}

.total-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fbfcfa;
}

.total-row strong {
  color: var(--forest);
}

.total-row span {
  color: var(--muted);
  font-size: 0.84rem;
}

.total-pill {
  min-width: 44px;
  border-radius: 999px;
  background: var(--forest);
  color: #ffffff;
  padding: 7px 10px;
  text-align: center;
  font-weight: 800;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: min(420px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--forest);
  color: #ffffff;
  box-shadow: 0 18px 44px rgba(23, 32, 27, 0.24);
  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  white-space: nowrap !important;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    z-index: 10;
    top: 0;
    flex-direction: row;
    align-items: center;
    height: auto;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(23, 32, 27, 0.1);
  }

  .brand span {
    display: none;
  }

  .nav-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    flex: 1;
  }

  .nav-tab {
    justify-content: center;
  }

  .nav-tab.is-active::before {
    display: none;
  }

  .sidebar-actions {
    margin-top: 0;
  }

  .entry-layout,
  .calendar-layout,
  .account-grid,
  .estate-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .entry-core {
    grid-row: auto;
  }

  .bag-editor {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-location-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .manual-location-row .field-hint {
    grid-column: 1 / -1;
  }
}

@media (max-width: 720px) {
  .main-panel {
    padding: 18px 12px 88px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar .primary-action {
    display: none;
  }

  .topbar-actions {
    align-items: stretch;
  }

  .workspace-control {
    width: 100%;
  }

  .summary-strip,
  .form-grid,
  .filters,
  .inline-editor.two-one,
  .bag-editor {
    grid-template-columns: 1fr;
  }

  .manual-location-row {
    grid-template-columns: 1fr;
  }

  .summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip .metric:last-child {
    grid-column: span 2;
  }

  .activity-toggle {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .geo-row,
  .record-head {
    align-items: stretch;
    flex-direction: column;
  }

  .photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-map {
    min-height: 330px;
  }

  .calendar-grid {
    gap: 4px;
  }

  .calendar-day {
    min-height: 58px;
    padding: 7px;
  }

  .event-card {
    grid-template-columns: 54px minmax(0, 1fr);
  }

  .member-form {
    grid-template-columns: 1fr;
  }

  .event-date-block {
    width: 54px;
    height: 54px;
  }

  .event-actions {
    grid-column: 1 / -1;
    justify-content: flex-end;
  }

  .form-actions {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 11;
    display: block;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(23, 32, 27, 0.12);
    background: rgba(251, 252, 250, 0.94);
    backdrop-filter: blur(14px);
  }

  .form-actions .primary-action {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .sidebar {
    gap: 8px;
  }

  .nav-tab {
    padding: 0 6px;
  }

  .nav-tab span,
  .sidebar-actions {
    display: none;
  }

  .panel {
    padding: 14px;
  }

  h1 {
    font-size: 1.7rem;
  }

  .metric {
    padding: 12px;
  }
}
