/*
 * Ruta Foto native visual layer.
 *
 * This file intentionally sits after styles.css. It aligns the PWA with the
 * native iPhone product without coupling visual changes to data or map logic.
 */

:root {
  color-scheme: dark;
  --ink: #f4f6f8;
  --muted: #9ba5b2;
  --line: rgba(255, 255, 255, 0.12);
  --paper: #080b0f;
  --surface: #12171d;
  --soft: #1b232c;
  --teal: #4acc91;
  --teal-dark: #38ad79;
  --amber: #fbc344;
  --brick: #fa5c4f;
  --blue: #38add6;
  --panel: #12171d;
  --elevated: #1b232c;
  --shadow: 0 22px 56px rgba(0, 0, 0, 0.42);
  --radius: 16px;
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html,
body {
  background: #080b0f;
}

body {
  color: var(--ink);
  background: linear-gradient(180deg, #10151b 0, #080b0f 420px);
}

button,
input,
select,
textarea {
  color: var(--ink);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(251, 195, 68, 0.5);
  outline-offset: 2px;
}

.app-shell {
  width: min(1260px, 100%);
  padding: 16px clamp(16px, 3vw, 34px) 40px;
}

.app-header {
  min-height: 74px;
  padding: 7px 0 15px;
}

.brand-lockup {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.brand-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.32);
}

.eyebrow {
  margin-bottom: 3px;
  color: var(--amber);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0;
}

h1,
h2,
h3,
.tab-button,
.primary-action,
.secondary-action,
.danger-action {
  font-family: ui-rounded, "SF Pro Rounded", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

h1 {
  font-size: clamp(1.7rem, 3vw, 2.3rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.38rem, 2.5vw, 1.95rem);
  font-weight: 900;
}

h3 {
  font-weight: 850;
}

.header-actions {
  justify-content: flex-end;
  flex-wrap: nowrap;
}

.save-status {
  color: var(--muted);
}

.save-status-dot {
  box-shadow: 0 0 0 4px rgba(74, 204, 145, 0.10);
}

.save-status[data-state="saving"] .save-status-dot {
  box-shadow: 0 0 0 4px rgba(251, 195, 68, 0.12);
}

.icon-button {
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  border-color: var(--line);
  border-radius: 50%;
  background: var(--elevated);
  color: var(--ink);
}

.icon-button:hover:not(:disabled) {
  border-color: rgba(251, 195, 68, 0.55);
  background: #252e38;
}

.header-actions .header-import-button {
  display: inline-flex;
  width: auto;
  min-width: 42px;
  gap: 6px;
  padding: 0 12px;
  border-radius: 999px;
}

.header-import-button .header-import-symbol {
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.header-import-button .header-import-label {
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.google-maps-import-band {
  border-color: rgba(56, 174, 234, 0.28);
  background: rgba(56, 174, 234, 0.055);
}

.undo-button:not(:disabled) {
  border-color: rgba(74, 204, 145, 0.46);
  background: rgba(74, 204, 145, 0.13);
  color: var(--teal);
}

.main-tabs {
  top: 8px;
  gap: 5px;
  padding: 6px;
  margin-bottom: 22px;
  border-color: rgba(255, 255, 255, 0.13);
  border-radius: 20px;
  background: rgba(24, 30, 38, 0.88);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(22px) saturate(1.25);
}

.tab-button {
  display: flex;
  min-height: 50px;
  min-width: 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #dbe0e6;
  font-weight: 800;
}

.tab-button:hover {
  background: rgba(255, 255, 255, 0.06);
}

.tab-button.is-active {
  border-color: transparent;
  background: rgba(251, 195, 68, 0.16);
  color: var(--amber);
}

.tab-glyph {
  display: grid;
  width: 24px;
  height: 24px;
  align-items: center;
  justify-items: center;
  color: currentColor;
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.more-glyph {
  padding-bottom: 7px;
  font-size: 1.05rem;
}

.section-head {
  min-height: 66px;
  margin: 6px 0 16px;
}

.section-head .eyebrow {
  margin-bottom: 5px;
}

.primary-action,
.secondary-action,
.danger-action {
  min-height: 44px;
  border-radius: 14px;
  font-size: 0.83rem;
  font-weight: 900;
}

.primary-action {
  border-color: var(--teal);
  background: var(--teal);
  color: #07110d;
}

.primary-action:hover {
  border-color: #62dca7;
  background: #62dca7;
}

.secondary-action {
  border-color: var(--line);
  background: var(--elevated);
  color: var(--ink);
}

.secondary-action:hover {
  background: #252e38;
}

.danger-action {
  border-color: rgba(250, 92, 79, 0.42);
  background: rgba(250, 92, 79, 0.12);
  color: #ff8c83;
}

.controls-band,
.outing-controls,
.today-planner-card,
.today-active-route,
.archive-breakdowns,
.change-transfer-band,
.archive-table-card,
.overview-block,
.list-summary,
.map-summary,
.map-notice,
.empty-state {
  border-color: var(--line);
  background: rgba(18, 23, 29, 0.94);
  box-shadow: none;
}

.controls-band,
.outing-controls {
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
}

.compact-control,
.compact-filter-button {
  min-height: 44px;
  border-color: var(--line);
  border-radius: 12px;
  background: var(--elevated);
}

.compact-control > span {
  color: var(--amber);
  font-size: 0.64rem;
  font-weight: 900;
}

.compact-control input,
.compact-control select {
  color: var(--ink);
}

label,
fieldset {
  color: var(--muted);
  font-weight: 850;
}

input,
select,
textarea {
  border-color: var(--line);
  background: var(--elevated);
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #6f7a87;
}

select option {
  background: #1b232c;
  color: var(--ink);
}

.today-planner-card {
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
}

.planner-main h3 {
  margin-bottom: 6px;
  font-size: 1.35rem;
}

.planner-main p:last-child,
.planner-focus span,
.outing-gear span,
.shot-card p,
.place-card p,
.detail-section p {
  color: var(--muted);
}

.planner-pills span,
.planner-focus article {
  border-color: var(--line);
  border-radius: 12px;
  background: var(--elevated);
}

.planner-pills span {
  padding: 10px;
}

.planner-pills strong,
.planner-focus strong {
  color: var(--ink);
}

.planner-light-note {
  border: 1px solid rgba(251, 195, 68, 0.20);
  border-radius: 12px;
  background: rgba(251, 195, 68, 0.10);
  color: #ffe4a0;
}

.light-countdown {
  background: rgba(74, 204, 145, 0.14);
  color: var(--teal);
}

.mission-strip {
  gap: 12px;
}

.outing-option {
  overflow: hidden;
  border-color: var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: none;
}

.outing-option-head span,
.outing-metrics span,
.planner-tag,
.tag,
.archive-count-tag,
.overview-chip,
.subspot-list span {
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--soft);
  color: #dce1e6;
}

.outing-option-actions button {
  min-height: 44px;
  border-radius: 12px;
}

.today-active-route {
  border-color: var(--teal);
  border-radius: 18px;
  background: rgba(74, 204, 145, 0.08);
}

.route-progress span {
  background: #303844;
}

.route-progress .is-current {
  background: var(--amber);
}

.route-progress .is-done {
  background: var(--teal);
}

.mission-card,
.shot-card,
.place-card,
.stat-card,
.detail-section,
.gallery-card,
.archive-table-card,
.recovery-item,
.merge-suggestion-group,
.merge-compare-summary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

.shot-grid,
.place-grid {
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 14px;
}

.shot-card,
.place-card,
.stat-card {
  border-radius: 18px;
}

.shot-card {
  position: relative;
  overflow: hidden;
  padding: 12px;
}

.shot-card.has-media {
  padding-top: 0;
}

.shot-card-media {
  margin: 0 -12px 13px;
}

.shot-card-media .photo-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 2px;
  margin: 0;
}

.shot-card-media .photo-thumb {
  height: 132px;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
  background: var(--elevated);
}

.shot-card-media .photo-strip:has(.photo-thumb:nth-child(2):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shot-card-media .photo-thumb:first-child:last-child {
  grid-column: 1 / -1;
}

.shot-card.has-media .card-topline {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
  z-index: 3;
  pointer-events: none;
}

.shot-card.has-media .card-topline .tag {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(7, 10, 14, 0.76);
  color: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.shot-card h3 {
  margin-bottom: 6px;
  color: #fff;
  font-size: 1.08rem;
  font-weight: 900;
}

.meta-line {
  color: var(--muted);
}

.tag.priority-high,
.map-priority.priority-high {
  border-color: rgba(250, 92, 79, 0.30);
  background: rgba(250, 92, 79, 0.14);
  color: #ff8c83;
}

.tag.priority-medium,
.map-priority.priority-medium {
  border-color: rgba(251, 195, 68, 0.30);
  background: rgba(251, 195, 68, 0.13);
  color: #ffd56e;
}

.tag.priority-low,
.map-priority.priority-low {
  border-color: rgba(122, 174, 199, 0.30);
  background: rgba(122, 174, 199, 0.13);
  color: #9fd1e6;
}

.tag.status-done {
  background: rgba(74, 204, 145, 0.14);
  color: #7be0ae;
}

.tag.status-repeat {
  background: rgba(56, 173, 214, 0.15);
  color: #81d5f1;
}

.shot-map-button {
  border-color: var(--line);
  border-radius: 10px;
  background: var(--elevated);
  color: var(--amber);
}

.shot-map-button:hover,
.shot-map-button:focus-visible {
  border-color: rgba(251, 195, 68, 0.50);
  background: rgba(251, 195, 68, 0.12);
}

.card-actions button,
.mini-action {
  min-height: 34px;
  border-color: var(--line);
  border-radius: 10px;
  background: var(--elevated);
  color: var(--ink);
}

.status-action-button.is-status-active,
.status-actions .status-action-button.is-status-active {
  border-color: var(--blue);
  background: var(--blue);
  color: #071015;
  box-shadow: 0 0 0 3px rgba(56, 173, 214, 0.14);
}

.photo-thumb,
.gallery-thumb,
.gallery-empty-thumb,
.map-list-thumb,
.merge-suggestion-thumb {
  border-color: var(--line);
  background: var(--elevated);
}

.gallery-card {
  position: relative;
  border-radius: 16px;
}

.gallery-thumb,
.gallery-empty-thumb {
  border-radius: 12px;
}

.gallery-empty-thumb {
  color: var(--amber);
  background: linear-gradient(145deg, #29333e, #13191f);
}

.gallery-priority {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  width: 12px;
  height: 12px;
  border: 3px solid rgba(9, 12, 16, 0.78);
  border-radius: 50%;
  background: #7aaec7;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.gallery-priority.priority-medium {
  background: var(--amber);
}

.gallery-priority.priority-high {
  background: var(--brick);
}

.merge-suggestions.is-hidden {
  display: none;
}

.photo-thumb-action {
  background: rgba(8, 11, 15, 0.78);
  color: #fff;
  backdrop-filter: blur(8px);
}

.photo-remove-button {
  background: rgba(250, 92, 79, 0.90);
}

.place-card {
  min-height: 210px;
}

.place-card h3 {
  color: #fff;
  font-size: 1.1rem;
}

.places-overview {
  gap: 12px;
}

.overview-block {
  border-radius: 16px;
}

.stat-card {
  min-height: 96px;
  justify-content: center;
  background: var(--elevated);
}

.stat-card h2 {
  color: #fff;
}

.change-transfer-band {
  border-left-color: var(--teal);
  border-radius: 16px;
}

.account-sync-band {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--cyan);
  border-radius: 16px;
  background: rgba(18, 23, 29, 0.94);
}

.account-sync-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: var(--cyan);
  color: #071216;
  font-size: 1.25rem;
  font-weight: 950;
}

.account-sync-copy,
.account-sync-copy h3,
.account-sync-copy p {
  min-width: 0;
  margin: 0;
}

.account-sync-copy h3 {
  overflow: hidden;
  margin-top: 2px;
  color: #fff;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-sync-copy > p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

.account-sync-actions {
  display: grid;
  grid-template-columns: repeat(2, auto);
  align-items: center;
  justify-items: end;
  gap: 7px;
}

.account-sync-actions .account-sync-status {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
}

.account-sync-actions .account-sync-status.is-ready {
  color: var(--teal);
}

.account-sync-actions .account-sync-status.is-error {
  color: #ff8c83;
}

.account-sync-actions .is-hidden,
.account-auth-secondary-actions .is-hidden,
.account-signed-in-actions .is-hidden {
  display: none;
}

.account-panel {
  width: min(480px, 100%);
}

.account-modal-brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 11px;
}

.account-modal-brand img {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 11px;
}

.account-modal-brand h2,
.account-modal-brand p {
  margin: 0;
}

.account-modal .icon-button.is-hidden {
  display: none;
}

body.is-auth-gated {
  overflow: hidden;
  background: #070a0e;
}

body.is-auth-gated .app-shell {
  visibility: hidden;
}

.account-modal.is-auth-gate {
  align-items: center;
  padding: 24px;
  background: #070a0e;
  backdrop-filter: none;
}

.account-modal.is-auth-gate .account-panel {
  max-height: min(660px, calc(100svh - 48px));
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.account-modal.is-auth-gate .modal-head {
  position: static;
  display: block;
  margin-bottom: 10px;
  background: transparent;
  backdrop-filter: none;
  text-align: center;
}

.account-modal.is-auth-gate .account-modal-brand {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.account-modal.is-auth-gate .account-modal-brand img {
  width: 70px;
  height: 70px;
  border-radius: 17px;
}

.account-modal.is-auth-gate .account-auth-intro {
  text-align: center;
}

.account-auth-state {
  display: grid;
  gap: 14px;
  padding: 7px 2px 2px;
}

.account-auth-state.is-hidden,
.account-auth-message.is-hidden {
  display: none;
}

.account-auth-intro,
.account-auth-state p,
.account-auth-state h3 {
  margin: 0;
}

.account-auth-intro {
  color: var(--muted);
  line-height: 1.45;
}

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

.account-auth-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: none;
}

.account-auth-form input {
  min-height: 52px;
  margin: 0;
  border-color: var(--line);
  border-radius: 13px;
  background: var(--elevated);
  color: #fff;
  font-size: 1rem;
  text-transform: none;
}

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

.account-device-choice {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.account-device-choice legend {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  text-transform: none;
}

.account-device-option {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--elevated);
  cursor: pointer;
  text-transform: none;
}

.account-device-option.is-selected {
  border-color: var(--amber);
  background: rgba(251, 195, 68, 0.08);
}

.account-device-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--amber);
}

.account-device-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.035);
}

.account-device-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-device-option.is-selected .account-device-icon {
  border-color: rgba(251, 195, 68, 0.5);
  color: var(--amber);
  background: rgba(251, 195, 68, 0.12);
}

.account-device-copy,
.account-device-option strong,
.account-device-option small {
  display: block;
  min-width: 0;
}

.account-device-option strong {
  color: #fff;
  font-size: 0.86rem;
}

.account-device-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.account-auth-secondary-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-auth-secondary-actions > button {
  min-width: 0;
  white-space: normal;
}

.account-signed-in-actions {
  display: grid;
  gap: 9px;
}

.account-signed-in-actions > button {
  width: 100%;
  min-width: 0;
}

.account-modal-sync-progress {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
}

.account-modal-sync-progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--teal);
  transition: width 180ms ease-out;
}

.account-action-hint,
.account-danger-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.35;
}

.account-action-hint {
  margin-top: -3px;
  padding: 0 3px;
}

.account-danger-actions {
  display: grid;
  gap: 7px;
  margin-top: 5px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.account-danger-actions .danger-action {
  width: 100%;
}

.account-auth-success {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 16px;
  background: var(--teal);
  color: #06140f;
  font-size: 1.6rem;
  font-weight: 950;
}

.account-auth-message {
  margin: 14px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(74, 204, 145, 0.3);
  border-radius: 12px;
  background: rgba(74, 204, 145, 0.1);
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 750;
  line-height: 1.4;
}

.account-auth-message.is-error {
  border-color: rgba(250, 92, 79, 0.34);
  background: rgba(250, 92, 79, 0.1);
  color: #ff8c83;
}

.change-transfer-status > strong {
  background: rgba(74, 204, 145, 0.14);
  color: var(--teal);
}

.archive-breakdowns,
.archive-table-card {
  border-radius: 16px;
}

.library-danger-zone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 17px;
  border: 1px solid rgba(250, 92, 79, 0.28);
  border-radius: 16px;
  background: rgba(250, 92, 79, 0.055);
}

.library-danger-zone h3,
.library-danger-zone p {
  margin: 0;
}

.library-danger-zone > div > p:last-child {
  margin-top: 5px;
  color: var(--muted);
  font-size: 0.82rem;
}

.library-danger-zone .danger-action {
  flex: 0 0 auto;
}

.delete-library-panel {
  width: min(520px, 100%);
}

.delete-library-panel > p {
  color: var(--muted);
}

.delete-library-panel label {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}

.archive-table-wrap {
  border-color: var(--line);
  background: var(--surface);
}

.archive-edit-table th {
  background: #202832;
  color: #c0c7cf;
}

.archive-edit-table input,
.archive-edit-table select,
.archive-edit-table textarea {
  border-color: var(--line);
  background: #171d24;
  color: var(--ink);
}

.map-layout {
  grid-template-columns: minmax(0, 1.85fr) minmax(320px, 0.8fr);
  gap: 14px;
}

.map-board {
  min-height: 590px;
  border-color: rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: #1b2630;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.32);
}

.map-board .empty-state {
  min-height: 590px;
  background: rgba(8, 11, 15, 0.48);
}

.map-tile-layer {
  background: #24303b;
}

.map-tile {
  filter: invert(0.88) hue-rotate(175deg) brightness(0.72) contrast(1.10) saturate(0.74);
}

.map-canvas.map-style-simple .map-tile-layer {
  background: #dce3e8;
}

.map-canvas.map-style-simple .map-tile {
  filter: grayscale(0.38) saturate(0.52) brightness(1.08) contrast(0.82);
  opacity: 0.88;
}

.map-controls {
  top: 12px;
  left: 12px;
  gap: 7px;
}

.map-controls button,
.map-route-notice,
.map-legend,
.map-add-hint,
.map-move-hint {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(15, 20, 26, 0.88);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(14px);
}

.map-controls button {
  min-width: 44px;
  min-height: 42px;
  border-radius: 12px;
}

.map-controls button.is-active {
  border-color: var(--amber);
  background: var(--amber);
  color: #090c10;
}

.map-route-overlay polyline {
  stroke: var(--amber);
}

.map-route-number,
.map-cluster {
  border-color: #11161c;
  background: var(--amber);
  color: #090c10;
}

.map-pin::before {
  border-color: #11161c;
}

.map-pin span,
.map-photo-gps-dot strong {
  background: rgba(14, 18, 24, 0.88);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.26);
  backdrop-filter: blur(10px);
}

.map-pin.is-selected::before {
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.48), 0 0 0 6px rgba(251, 195, 68, 0.24);
}

.map-attribution {
  background: rgba(12, 16, 21, 0.76);
  color: #aeb7c1;
}

.map-legend {
  bottom: 12px;
  left: 12px;
}

.map-list {
  gap: 9px;
  max-height: 590px;
}

.map-summary {
  border-radius: 16px;
}

.map-list-item {
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 12px;
  min-height: 82px;
  padding: 10px;
  border-color: var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
}

.map-list-item:has(.map-list-thumb) {
  grid-template-columns: 66px minmax(0, 1fr) 34px;
}

.map-list-item::after {
  content: ">";
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--amber);
  color: #090c10;
  font-size: 1.22rem;
  font-weight: 900;
  place-items: center;
}

.map-list-thumb {
  width: 66px;
  height: 62px;
  order: -1;
  border-radius: 12px;
}

.map-list-item.is-selected {
  border-color: var(--amber);
  background: rgba(251, 195, 68, 0.08);
  box-shadow: inset 0 0 0 1px rgba(251, 195, 68, 0.26);
}

.map-list-item .map-list-title-row {
  color: #fff;
}

.map-list-item span {
  color: var(--muted);
}

.modal {
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(8px);
}

.modal-panel {
  border-color: var(--line);
  border-radius: 22px;
  background: #11161c;
  color: var(--ink);
  box-shadow: var(--shadow);
}

.modal-head {
  position: sticky;
  top: -16px;
  z-index: 8;
  margin: -16px -16px 4px;
  padding: 16px;
  background: rgba(17, 22, 28, 0.94);
  backdrop-filter: blur(18px);
}

.modal-head-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
}

.modal-head-save {
  min-height: 42px;
  padding: 0 18px;
}

.detail-section {
  border-radius: 16px;
}

.annotation-toolbar {
  border-color: var(--line);
  background: var(--surface);
}

.tool-button {
  border-color: var(--line);
  border-radius: 11px;
  background: var(--elevated);
  color: var(--ink);
}

.tool-button.is-active {
  border-color: var(--amber);
  background: rgba(251, 195, 68, 0.15);
  color: var(--amber);
}

.annotation-stage {
  border-color: var(--line);
  background: #050709;
}

.toast {
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  background: rgba(22, 28, 35, 0.94);
  color: #fff;
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(16px);
}

.gps-prompt {
  border-color: var(--line);
  background: rgba(18, 23, 29, 0.96);
  color: var(--ink);
}

@media (max-width: 760px) {
  body {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
    background: #080b0f;
  }

  .app-shell {
    padding: 0 12px 28px;
  }

  .app-header {
    position: sticky;
    top: 0;
    z-index: 28;
    min-height: 68px;
    align-items: center;
    padding: calc(8px + env(safe-area-inset-top, 0px)) 2px 9px;
    background: rgba(8, 11, 15, 0.91);
    backdrop-filter: blur(20px) saturate(1.2);
  }

  .brand-lockup {
    gap: 9px;
  }

  .brand-icon {
    width: 40px;
    height: 40px;
    flex-basis: 40px;
    border-radius: 12px;
  }

  .app-header h1 {
    font-size: 1.3rem;
  }

  .app-header .eyebrow {
    display: none;
  }

  .header-actions {
    gap: 5px;
  }

  .header-actions .icon-button {
    width: 38px;
    min-width: 38px;
    min-height: 38px;
  }

  .header-actions .header-import-button {
    width: auto;
    min-width: 38px;
    padding: 0 9px;
  }

  .header-import-button .header-import-label {
    display: none;
  }

  .save-status {
    position: absolute;
    right: 4px;
    bottom: -10px;
    width: auto;
    min-height: 18px;
    padding: 0 4px;
    font-size: 0.60rem;
    background: #080b0f;
    border-radius: 999px;
  }

  .main-tabs {
    position: fixed;
    top: auto;
    right: 12px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    left: 12px;
    z-index: 45;
    width: auto;
    margin: 0;
    padding: 6px;
    border-radius: 22px;
    background: rgba(26, 32, 41, 0.90);
    box-shadow: 0 16px 44px rgba(0, 0, 0, 0.52);
  }

  .tab-button {
    min-height: 58px;
    flex-direction: column;
    gap: 2px;
    padding: 5px 2px 4px;
    border-radius: 17px;
    font-size: 0.68rem;
  }

  .tab-button.is-active {
    background: rgba(251, 195, 68, 0.18);
  }

  .tab-glyph {
    width: 22px;
    height: 25px;
    font-size: 1.22rem;
  }

  .section-head {
    min-height: 58px;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    margin: 12px 0;
  }

  .section-head > div:first-child {
    min-width: 0;
  }

  .section-head h2 {
    font-size: 1.5rem;
  }

  .section-actions,
  .section-head > .primary-action {
    width: auto;
    flex: 0 0 auto;
    align-self: center;
  }

  .section-actions {
    gap: 6px;
  }

  .section-actions > button {
    min-height: 40px;
    flex: 0 1 auto;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .controls-band,
  .outing-controls {
    margin-bottom: 12px;
  }

  .today-planner-card {
    padding: 15px;
    border-radius: 18px;
  }

  .planner-main {
    align-items: flex-start;
    flex-direction: row;
  }

  .planner-main .secondary-action {
    width: auto;
    flex: 0 0 auto;
  }

  .planner-main h3 {
    font-size: 1.18rem;
  }

  .shot-grid,
  .place-grid,
  .stats-grid {
    grid-template-columns: 1fr;
  }

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

  .shot-card-media .photo-thumb {
    height: 150px;
  }

  .shot-filter-band {
    gap: 6px;
    padding: 7px;
  }

  .shot-filter-band label {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 7px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--elevated);
    font-size: 0.62rem;
  }

  .shot-filter-band input,
  .shot-filter-band select {
    min-width: 0;
    min-height: 38px;
    margin: 0;
    padding: 0 4px;
    border: 0;
    background: transparent;
    font-size: 0.82rem;
  }

  .map-layout {
    grid-template-columns: 1fr;
  }

  .map-board,
  .map-board .empty-state {
    min-height: 52svh;
  }

  .map-board {
    border-radius: 18px;
  }

  .map-list {
    max-height: none;
  }

  .map-list-item {
    grid-template-columns: minmax(0, 1fr) 34px;
    min-height: 80px;
  }

  .map-list-item:has(.map-list-thumb) {
    grid-template-columns: 62px minmax(0, 1fr) 34px;
  }

  .map-list-thumb {
    width: 62px;
    height: 60px;
  }

  .modal {
    padding: 7px;
    align-items: end;
  }

  .modal.account-modal.is-auth-gate {
    align-items: center;
    padding: 14px;
  }

  .modal-panel {
    max-height: 94svh;
    border-radius: 24px 24px 16px 16px;
  }

  .planner-map-panel {
    border-radius: 20px;
  }

  .toast {
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }

  .gps-prompt {
    bottom: calc(94px + env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 430px) {
  .section-head .eyebrow {
    font-size: 0.58rem;
  }

  .section-head h2 {
    font-size: 1.32rem;
  }

  .section-head > .primary-action,
  .section-actions > button {
    min-height: 38px;
    padding: 0 9px;
    font-size: 0.68rem;
  }

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

  .change-transfer-actions,
  .archive-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .library-danger-zone {
    align-items: stretch;
    flex-direction: column;
  }

  .account-sync-band {
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 12px;
  }

  .account-sync-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }

  .account-sync-copy > p:last-child {
    display: none;
  }

  .account-sync-band .secondary-action {
    min-height: 40px;
    padding: 0 12px;
  }
}


/* Web Today and Places parity */
.today-walk-options {
  display: grid;
  gap: 16px;
}

.outing-option.is-featured {
  padding: 22px;
  border-color: rgba(251, 195, 68, 0.55);
  background:
    linear-gradient(135deg, rgba(251, 195, 68, 0.20), rgba(18, 23, 29, 0.96) 58%),
    var(--surface);
}

.outing-option.is-featured .outing-option-head h3 {
  margin: 4px 0 0;
  color: #fff;
  font-size: clamp(1.55rem, 3vw, 2.25rem);
}

.outing-stop-count {
  flex: 0 0 auto;
  border-color: rgba(251, 195, 68, 0.42) !important;
  background: rgba(251, 195, 68, 0.16) !important;
  color: var(--amber) !important;
  font-weight: 950;
}

.today-alternatives-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 2px 2px 0;
}

.today-alternatives-head h3,
.today-alternatives-head p {
  margin: 0;
}

.today-alternatives-head > span {
  color: var(--amber);
  font-weight: 950;
}

.today-alternatives {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.outing-option.is-compact {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.outing-option.is-compact .outing-metrics {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.outing-option.is-compact .outing-shot-list {
  margin: 0;
}

.outing-option.is-compact .outing-option-actions {
  margin-top: auto;
}

#placesList {
  display: block;
}

.places-area-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 0 2px;
  color: var(--muted);
}

.places-area-summary strong {
  color: var(--ink);
}

.places-area-list {
  display: grid;
  gap: 9px;
}

.place-area-card {
  display: grid;
  width: 100%;
  min-height: 78px;
  grid-template-columns: 46px minmax(0, 1fr) auto 22px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.place-area-card:hover {
  border-color: rgba(251, 195, 68, 0.48);
  background: #1a222b;
}

.place-area-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(251, 195, 68, 0.14);
  color: var(--amber);
  font-size: 1.35rem;
}

.place-area-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.place-area-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-area-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.place-area-map-count {
  min-width: 36px;
  padding: 7px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--amber);
  font-weight: 950;
  text-align: center;
}

.place-area-chevron {
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
}

.place-area-detail {
  display: grid;
  gap: 14px;
}

.place-area-detail-head {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.place-area-detail-head h3,
.place-area-detail-head p {
  margin: 0;
}

.place-area-detail-head h3 {
  color: #fff;
  font-size: 1.45rem;
}

.place-area-detail-head p:last-child {
  margin-top: 4px;
  color: var(--muted);
}

.place-area-back {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--elevated);
  color: var(--ink);
  font-size: 1.75rem;
}

.place-area-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.place-area-metrics span {
  display: grid;
  gap: 2px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--elevated);
  color: var(--muted);
  font-size: 0.76rem;
}

.place-area-metrics strong {
  color: var(--ink);
  font-size: 1.2rem;
}

.place-area-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .today-alternatives {
    grid-template-columns: 1fr;
  }

  .outing-option.is-featured {
    padding: 17px;
  }

  .place-area-detail-head {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .place-area-detail-head .primary-action {
    grid-column: 1 / -1;
  }

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


/* Simplified Today and progressive More disclosure */
.today-primary-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.today-primary-controls .compact-control {
  min-width: 0;
  min-height: 60px;
  padding: 8px 12px;
}

.today-primary-controls .compact-control > span:first-child {
  font-size: 0.68rem;
}

.today-primary-controls select {
  min-width: 0;
  font-size: 0.96rem;
  font-weight: 900;
}

.today-plan-action {
  width: 100%;
  min-height: 50px;
  margin-bottom: 10px;
  font-size: 0.92rem;
}

.today-more-options {
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.today-more-options > summary {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 850;
  list-style: none;
}

.today-more-options > summary::-webkit-details-marker {
  display: none;
}

.today-more-options > summary::after {
  content: "+";
  color: var(--amber);
  font-size: 1.1rem;
}

.today-more-options[open] > summary::after {
  content: "-";
}

.today-more-options-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 0 10px;
}

.today-more-options-grid .compact-control,
.today-more-options-grid .compact-filter-button {
  min-width: 0;
}

.today-search-control {
  grid-column: span 2;
}

.today-mini-map-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.today-mini-map-canvas {
  position: relative;
  height: 260px;
  overflow: hidden;
  background: #24313d;
  pointer-events: none;
}

.today-mini-map-canvas .map-drag-layer {
  position: absolute;
  inset: 0;
}

.today-mini-map-cluster,
.today-mini-map-pin {
  position: absolute;
  z-index: 5;
  display: grid;
  border: 3px solid #11161c;
  border-radius: 50%;
  background: var(--pin-color, var(--amber));
  color: #090c10;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.44);
  transform: translate(-50%, -50%);
  place-items: center;
}

.today-mini-map-cluster {
  width: 36px;
  height: 36px;
  font-size: 0.78rem;
  font-weight: 950;
}

.today-mini-map-pin {
  width: 18px;
  height: 18px;
}

.today-mini-map-footer {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
}

.today-mini-map-footer > span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.today-mini-map-footer strong {
  color: var(--ink);
}

.today-mini-map-footer small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.today-mini-map-footer .primary-action {
  min-width: 132px;
  flex: 0 0 auto;
}

.today-mini-map-empty {
  display: flex;
  min-height: 84px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.today-mini-map-empty > span {
  display: grid;
  gap: 2px;
}

.today-mini-map-empty small {
  color: var(--muted);
}

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

.today-walk-options {
  width: 100%;
  grid-column: 1 / -1;
}

.today-alternatives {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.more-primary-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  margin-bottom: 12px;
}

.more-group-card {
  margin: 0;
  border-top: 1px solid var(--line);
}

.more-group-card:last-of-type {
  border-bottom: 1px solid var(--line);
}

.more-group-card > summary {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 4px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}

.more-group-card > summary::-webkit-details-marker {
  display: none;
}

.more-group-card > summary > span {
  display: grid;
  gap: 3px;
}

.more-group-card > summary strong {
  font-size: 1rem;
}

.more-group-card > summary small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.more-group-card > summary::after {
  content: "+";
  width: 30px;
  flex: 0 0 30px;
  color: var(--amber);
  font-size: 1.35rem;
  font-weight: 700;
  text-align: center;
}

.more-group-card[open] > summary::after {
  content: "-";
}

.more-group-content {
  padding: 2px 0 16px;
}

.more-secondary-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.more-safety-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

.more-group-content .archive-breakdowns {
  margin-bottom: 0;
}

.more-group-content .change-transfer-band {
  margin-top: 0;
}

.more-safety-actions {
  margin: 10px 0;
}

@media (max-width: 720px) {
  .today-primary-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .today-primary-controls .compact-control {
    min-height: 56px;
  }

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

  .today-search-control {
    grid-column: 1 / -1;
  }

  .today-mini-map-canvas {
    height: 220px;
  }

  .today-mini-map-footer {
    min-height: 62px;
  }

  .more-secondary-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 430px) {
  .today-mini-map-footer .primary-action {
    min-width: 112px;
  }

  .today-mini-map-empty {
    align-items: stretch;
    flex-direction: column;
  }

  .more-primary-stats,
  .more-safety-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .more-primary-stats .stat-card:first-child {
    grid-column: 1 / -1;
  }
}


/* Native-style light meter cards, exposure metadata and editor controls */
.shot-exposure-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin: 9px 0;
}

.shot-exposure-metrics > span {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--elevated);
}

.shot-exposure-metrics small {
  color: var(--amber);
  font-size: 0.62rem;
  font-weight: 900;
  text-transform: uppercase;
}

.shot-exposure-metrics strong {
  overflow: hidden;
  color: #fff;
  font-size: 1rem;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 10px;
}

.detail-metric {
  display: grid;
  min-width: 0;
  min-height: 84px;
  align-content: start;
  gap: 9px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--elevated);
}

.detail-metric-label {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}

.detail-metric-label > span {
  color: var(--amber);
  font-size: 1rem;
  font-weight: 900;
}

.detail-metric-label small {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.detail-metric > strong {
  color: #fff;
  font-size: 1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.detail-gear-notes {
  margin: 10px 0 0;
}

.meter-details {
  margin-top: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(251, 195, 68, 0.06);
}

.meter-details summary {
  color: var(--amber);
  font-size: 0.76rem;
  font-weight: 900;
}

.meter-details p {
  margin: 8px 0 0;
  line-height: 1.55;
}

.chip-set label {
  border-color: var(--line);
  background: var(--elevated);
  color: var(--ink);
}

.chip-set label:has(input:checked) {
  border-color: rgba(251, 195, 68, 0.62);
  background: rgba(251, 195, 68, 0.14);
  color: #ffe19a;
}

.chip-set input {
  accent-color: var(--amber);
}

.composition-preset {
  border-color: var(--line);
  background: var(--elevated);
  color: var(--ink);
}

.composition-preset > span:last-child {
  color: var(--ink);
}

.composition-preset:focus-visible,
.composition-preset:hover {
  border-color: rgba(251, 195, 68, 0.48);
  background: rgba(251, 195, 68, 0.08);
  box-shadow: none;
}

.composition-preset.is-active {
  border-color: var(--amber);
  background: rgba(251, 195, 68, 0.14);
  box-shadow: inset 0 0 0 1px rgba(251, 195, 68, 0.22);
}

.composition-thumb {
  border-color: rgba(255, 255, 255, 0.20);
  background:
    linear-gradient(90deg, transparent 32.8%, rgba(255, 255, 255, 0.10) 33%, transparent 33.6%, transparent 66.2%, rgba(255, 255, 255, 0.10) 66.6%, transparent 67.2%),
    linear-gradient(0deg, transparent 32.8%, rgba(255, 255, 255, 0.10) 33%, transparent 33.6%, transparent 66.2%, rgba(255, 255, 255, 0.10) 66.6%, transparent 67.2%),
    linear-gradient(180deg, rgba(56, 173, 214, 0.14), transparent 48%),
    #252e38;
}

@media (max-width: 560px) {
  .detail-metric {
    min-height: 76px;
    padding: 11px;
  }

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


/* Compact detail media stack and icon annotation toolbar */
.detail-modal .detail-grid {
  align-items: start;
}

.detail-modal .detail-photos,
.detail-modal .detail-location-compact {
  width: min(100%, 820px);
  justify-self: center;
}

.detail-modal .detail-photos .photo-strip-compact {
  width: min(100%, 760px);
  margin: 6px auto 0;
}

.detail-modal .detail-location-compact {
  padding: 10px 12px;
}

.detail-modal .detail-location-compact .technical-details {
  margin-top: 5px;
}

.annotation-toolbar {
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.annotation-icon-button {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  place-items: center;
}

.annotation-icon {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.annotation-toolbar #undoMark {
  margin-left: 2px;
}

.annotation-save-button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
}

.annotation-save-button .annotation-icon {
  width: 18px;
  height: 18px;
}

@media (max-width: 760px) {
  .annotation-toolbar {
    gap: 6px;
    padding: 7px;
  }

  .annotation-icon-button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
  }
}


/* Recently Deleted */
.recently-deleted-band {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 13px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--amber);
  border-radius: 16px;
  background: rgba(18, 23, 29, 0.94);
}

.recently-deleted-band-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 14px;
  background: rgba(251, 195, 68, 0.16);
  color: var(--amber);
  font-size: 1.35rem;
  font-weight: 950;
}

.recently-deleted-band h3,
.recently-deleted-band p {
  margin: 0;
}

.recently-deleted-band h3 {
  color: #fff;
  font-size: 1rem;
}

.recently-deleted-band p:last-child {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.recently-deleted-band > strong {
  display: grid;
  min-width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 17px;
  background: rgba(251, 195, 68, 0.14);
  color: var(--amber);
}

.recently-deleted-panel {
  width: min(720px, 100%);
}

.recently-deleted-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0 14px;
}

.recently-deleted-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.recently-deleted-menu {
  position: relative;
  flex: 0 0 auto;
}

.recently-deleted-menu > summary {
  display: grid;
  place-items: center;
  list-style: none;
}

.recently-deleted-menu > summary::-webkit-details-marker {
  display: none;
}

.recently-deleted-menu > .danger-action {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 12;
  width: max-content;
  max-width: min(250px, 75vw);
  min-height: 42px;
  border: 1px solid rgba(250, 92, 79, 0.45);
  background: #211719;
  box-shadow: var(--shadow);
}

.recently-deleted-list {
  display: grid;
  gap: 9px;
}

.recently-deleted-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}

.recently-deleted-thumb {
  display: grid;
  width: 72px;
  height: 72px;
  overflow: hidden;
  place-items: center;
  border-radius: 10px;
  background: var(--elevated);
  color: var(--muted);
  font-size: 1.4rem;
}

.recently-deleted-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recently-deleted-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.recently-deleted-copy span {
  color: var(--amber);
  font-size: 0.65rem;
  font-weight: 900;
  text-transform: uppercase;
}

.recently-deleted-copy strong {
  overflow: hidden;
  color: #fff;
  font-size: 0.96rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recently-deleted-copy small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.recently-deleted-empty {
  min-height: 190px;
}

@media (max-width: 640px) {
  .recently-deleted-band {
    grid-template-columns: 48px minmax(0, 1fr) auto;
  }

  .recently-deleted-band .secondary-action {
    grid-column: 2 / -1;
    width: 100%;
  }

  .recently-deleted-item {
    grid-template-columns: 58px minmax(0, 1fr) 40px;
  }

  .recently-deleted-thumb {
    width: 58px;
    height: 58px;
  }

  .recently-deleted-item > .primary-action {
    grid-column: 2 / 3;
    width: 100%;
  }

  .recently-deleted-item > .recently-deleted-menu {
    grid-column: 3 / 4;
    grid-row: 1 / 3;
  }
}
