:root {
  color-scheme: light;
  --ink: #17202a;
  --muted: #5d6974;
  --line: #d9dee3;
  --paper: #f5f7f8;
  --surface: #ffffff;
  --soft: #edf2f4;
  --teal: #007f78;
  --teal-dark: #005f5a;
  --amber: #f0b429;
  --brick: #b4452f;
  --blue: #3d6f9f;
  --shadow: 0 14px 34px rgba(23, 32, 42, 0.13);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(61, 111, 159, 0.09), rgba(245, 247, 248, 0) 260px),
    var(--paper);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100svh;
  margin: 0 auto;
  padding: 18px clamp(14px, 3vw, 28px) 32px;
}

.app-header,
.section-head,
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.app-header {
  padding: 4px 0 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(1.65rem, 3vw, 2.35rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  line-height: 1.15;
}

h3 {
  margin-bottom: 8px;
  font-size: 1.02rem;
  line-height: 1.2;
}

.header-actions,
.section-actions,
.form-actions,
.archive-actions,
.status-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.save-status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  gap: 6px;
  padding: 0 7px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  white-space: nowrap;
}

.save-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

.save-status[data-state="saving"] .save-status-dot {
  background: var(--amber);
}

.save-status[data-state="error"] {
  color: var(--brick);
}

.save-status[data-state="error"] .save-status-dot {
  background: var(--brick);
}

.main-tabs {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  padding: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(14px);
}

.tab-button,
.primary-action,
.secondary-action,
.danger-action,
.icon-button,
.tool-button {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  font-weight: 760;
}

.tab-button {
  min-width: 0;
  padding: 0 10px;
}

.tab-button.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.primary-action,
.secondary-action,
.danger-action {
  padding: 0 14px;
  white-space: nowrap;
}

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

.primary-action:hover {
  background: var(--teal-dark);
}

.secondary-action {
  background: var(--soft);
}

.danger-action {
  border-color: rgba(180, 69, 47, 0.35);
  background: rgba(180, 69, 47, 0.09);
  color: var(--brick);
}

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

.icon-button span {
  font-size: 0.72rem;
  letter-spacing: 0;
}

.undo-button:not(:disabled) {
  border-color: rgba(0, 127, 120, 0.42);
  background: rgba(0, 127, 120, 0.1);
  color: var(--teal-dark);
}

.undo-button .undo-symbol {
  font-size: 1.35rem;
  line-height: 1;
}

.view {
  display: none;
}

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

.section-head {
  margin: 10px 0 14px;
}

.section-actions {
  justify-content: flex-end;
}

.controls-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.controls-band.single-control {
  grid-template-columns: 1fr;
}

.map-filter-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
}

.today-filter-band {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
}

.outing-controls {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.76);
}

.outing-controls .primary-action {
  grid-column: auto;
  min-width: 0;
  min-height: 42px;
  padding: 0 10px;
}

.compact-control > .planner-destination-inputs {
  display: flex;
  flex: 1 1 auto;
  min-width: 0;
  align-items: center;
  gap: 4px;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.planner-destination-inputs select {
  flex: 1 1 auto;
}

.planner-map-edit {
  flex: 0 0 42px;
  min-width: 42px;
  min-height: 32px;
  padding: 0 5px;
  border: 1px solid rgba(0, 127, 120, 0.28);
  border-radius: 5px;
  background: rgba(0, 127, 120, 0.09);
  color: var(--teal-dark);
  font-size: 0.66rem;
  font-weight: 900;
}

.planner-map-edit.is-hidden {
  display: none;
}

.shot-filter-band {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.shot-filter-band label:first-child {
  grid-column: span 2;
}

.shot-filter-summary {
  margin: -2px 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 750;
}

.merge-suggestions-toggle.is-active {
  border-color: var(--teal);
  background: rgba(0, 127, 120, 0.11);
  color: var(--teal-dark);
}

.merge-suggestions {
  margin: 0 0 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.82);
}

.merge-suggestions-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
}

.merge-suggestions-head h3,
.merge-suggestions-head p {
  margin-bottom: 0;
}

.merge-suggestions-head > div > p:last-child,
.merge-suggestions-empty,
.merge-suggestions-more {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
}

.merge-suggestion-list {
  display: grid;
  gap: 0;
}

.merge-suggestion-group {
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 1.28fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.merge-suggestion-anchor,
.merge-candidate {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  min-width: 0;
}

.merge-suggestion-anchor {
  align-content: start;
}

.merge-candidate-list {
  display: grid;
  gap: 7px;
}

.merge-candidate {
  grid-template-columns: 44px minmax(0, 1fr) auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}

.merge-suggestion-thumb {
  display: block;
  width: 48px;
  height: 48px;
}

.merge-candidate .merge-suggestion-thumb {
  width: 44px;
  height: 44px;
}

.merge-suggestion-thumb .gallery-thumb,
.merge-suggestion-thumb .gallery-empty-thumb {
  width: 100%;
  height: 100%;
  aspect-ratio: 1;
  font-size: 0.88rem;
}

.merge-suggestion-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.merge-suggestion-copy strong {
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.merge-suggestion-copy > span:not(.merge-reasons) {
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.3;
}

.merge-suggestion-copy .merge-role-label {
  color: var(--teal-dark);
  font-size: 0.64rem;
  font-weight: 850;
  text-transform: uppercase;
}

.merge-reasons {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 3px;
}

.merge-reasons em {
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 720;
}

.merge-candidate-actions {
  display: flex;
  gap: 5px;
  align-items: center;
}

.merge-candidate-actions .mini-action {
  min-height: 30px;
  padding: 0 7px;
  font-size: 0.7rem;
}

.merge-suggestions-more {
  margin: 8px 0 0;
  text-align: center;
}

.merge-compare-summary {
  display: grid;
  gap: 3px;
  margin-bottom: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.merge-compare-summary span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.merge-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.merge-compare-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.merge-compare-card-head {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.merge-compare-card-head .merge-suggestion-thumb {
  width: 58px;
  height: 58px;
}

.merge-compare-card h3,
.merge-compare-card p {
  margin-bottom: 3px;
  overflow-wrap: anywhere;
}

.merge-compare-note {
  flex: 1;
  font-size: 0.8rem;
}

.merge-compare-card > .primary-action {
  align-self: flex-start;
  margin-top: 6px;
}

.merge-compare-footer {
  display: flex;
  justify-content: center;
  margin-top: 10px;
}

.map-search-control {
  grid-column: auto;
}

.today-search-control {
  grid-column: auto;
}

.compact-control {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.compact-control > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.compact-control input,
.compact-control select {
  min-width: 0;
  min-height: 36px;
  margin-top: 0;
  padding: 0 4px;
  border: 0;
  background: transparent;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-control input:focus,
.compact-control select:focus {
  outline: 0;
}

.compact-filter-button {
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 850;
  white-space: nowrap;
}

label,
fieldset {
  min-width: 0;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: uppercase;
}

input,
select,
textarea {
  width: 100%;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

input,
select {
  min-height: 42px;
  padding: 0 11px;
}

textarea {
  min-height: 92px;
  padding: 10px 11px;
  resize: vertical;
}

.custom-preset-input[hidden] {
  display: none;
}

input[type="file"][hidden] {
  display: none;
}

fieldset {
  padding: 0;
  border: 0;
}

legend {
  padding: 0;
}

.chip-set {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.chip-set label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 0.78rem;
  text-transform: none;
}

.chip-set input {
  width: auto;
  min-height: 0;
  margin: 0;
}

.media-picker {
  display: grid;
  gap: 8px;
}

.form-photo-drop-zone {
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.media-picker-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  margin-top: 8px;
}

.media-picker-actions button {
  min-height: 44px;
}

.file-summary {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
  line-height: 1.35;
  text-transform: none;
}

.form-drop-hint {
  margin: -2px 0 0;
  font-size: 0.8rem;
  font-weight: 760;
  color: var(--muted);
}

.form-existing-photos:empty {
  display: none;
}

.form-photo-preview {
  display: grid;
  gap: 4px;
  padding-top: 2px;
}

.form-existing-label {
  color: var(--ink);
  font-size: 0.78rem;
}

.composition-fieldset {
  margin-top: -2px;
}

.composition-presets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.composition-preset {
  display: grid;
  gap: 6px;
  justify-items: center;
  min-height: 108px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 850;
  text-align: center;
}

.composition-preset:focus-visible,
.composition-preset:hover,
.composition-preset.is-active {
  border-color: rgba(0, 127, 120, 0.6);
  box-shadow: 0 0 0 3px rgba(0, 127, 120, 0.12);
}

.composition-preset.is-active {
  background: rgba(0, 127, 120, 0.07);
}

.composition-thumb {
  position: relative;
  display: block;
  width: min(104px, 100%);
  aspect-ratio: 1.55;
  overflow: hidden;
  border: 1px solid rgba(23, 32, 42, 0.24);
  border-radius: 6px;
  background:
    linear-gradient(90deg, transparent 32.8%, rgba(23, 32, 42, 0.1) 33%, transparent 33.6%, transparent 66.2%, rgba(23, 32, 42, 0.1) 66.6%, transparent 67.2%),
    linear-gradient(0deg, transparent 32.8%, rgba(23, 32, 42, 0.1) 33%, transparent 33.6%, transparent 66.2%, rgba(23, 32, 42, 0.1) 66.6%, transparent 67.2%),
    linear-gradient(180deg, rgba(61, 111, 159, 0.13), rgba(245, 247, 248, 0) 44%),
    #f7f9fa;
}

.composition-line,
.composition-subject,
.composition-frame,
.composition-shape,
.composition-horizon {
  position: absolute;
  display: block;
}

.composition-subject {
  z-index: 4;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.86), 0 1px 5px rgba(23, 32, 42, 0.18);
}

.composition-line {
  z-index: 3;
  width: 44px;
  height: 3px;
  border-radius: 99px;
  background: rgba(61, 111, 159, 0.75);
  transform-origin: center;
  opacity: 0;
}

.composition-frame {
  z-index: 2;
  inset: 11px 15px;
  border: 3px solid rgba(180, 69, 47, 0.78);
  border-radius: 4px;
  opacity: 0;
}

.composition-shape {
  z-index: 1;
  border-radius: 5px;
  background: rgba(23, 32, 42, 0.13);
  opacity: 0;
}

.composition-horizon {
  left: 0;
  right: 0;
  bottom: 24%;
  z-index: 1;
  height: 2px;
  background: rgba(23, 32, 42, 0.08);
}

.comp-thirds .composition-subject {
  left: 66%;
  top: 48%;
  transform: translate(-50%, -50%);
}

.comp-thirds .shape-a {
  left: 10%;
  top: 25%;
  width: 31%;
  height: 48%;
  opacity: 1;
}

.comp-thirds .line-a {
  left: 11%;
  top: 80%;
  width: 74%;
  opacity: 1;
}

.comp-center .composition-subject {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.comp-center .line-a {
  left: 16%;
  right: 16%;
  top: 50%;
  width: auto;
  opacity: 1;
}

.comp-center .line-b {
  left: 50%;
  top: 16%;
  width: 3px;
  height: 68%;
  opacity: 1;
}

.comp-center .shape-a,
.comp-center .shape-b {
  top: 22%;
  width: 14%;
  height: 56%;
  opacity: 0.55;
}

.comp-center .shape-a {
  left: 14%;
}

.comp-center .shape-b {
  right: 14%;
}

.comp-leading .composition-subject {
  right: 13%;
  top: 36%;
}

.comp-leading .line-a,
.comp-leading .line-b {
  width: 84%;
  left: 4%;
  bottom: 17%;
  opacity: 1;
}

.comp-leading .line-a {
  transform: rotate(-21deg);
}

.comp-leading .line-b {
  transform: rotate(21deg);
}

.comp-leading .line-c {
  left: 11%;
  top: 70%;
  width: 35%;
  opacity: 0.7;
}

.comp-leading .shape-a {
  left: 11%;
  bottom: 18%;
  width: 13%;
  height: 23%;
  opacity: 0.8;
}

.comp-leading .shape-b {
  left: 29%;
  bottom: 18%;
  width: 12%;
  height: 31%;
  opacity: 0.55;
}

.comp-frame .composition-frame {
  opacity: 1;
}

.comp-frame .composition-subject {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.comp-frame .shape-a {
  inset: 14px 18px;
  border-radius: 3px;
  background: rgba(61, 111, 159, 0.09);
  opacity: 1;
}

.comp-frame .line-a {
  left: 17%;
  right: 17%;
  bottom: 21%;
  width: auto;
  opacity: 0.75;
}

.comp-layers .composition-subject {
  left: 55%;
  top: 50%;
}

.comp-layers .line-a,
.comp-layers .line-b {
  left: 10%;
  right: 10%;
  width: auto;
  opacity: 1;
}

.comp-layers .line-a {
  top: 30%;
}

.comp-layers .line-b {
  bottom: 23%;
}

.comp-layers .shape-a,
.comp-layers .shape-b,
.comp-layers .shape-c {
  opacity: 1;
}

.comp-layers .shape-a {
  left: 7%;
  bottom: 8%;
  width: 28%;
  height: 22%;
  background: rgba(180, 69, 47, 0.2);
}

.comp-layers .shape-b {
  left: 43%;
  top: 38%;
  width: 20%;
  height: 30%;
  background: rgba(0, 127, 120, 0.17);
}

.comp-layers .shape-c {
  right: 8%;
  top: 14%;
  width: 20%;
  height: 24%;
  background: rgba(61, 111, 159, 0.18);
}

.comp-negative .composition-thumb {
  background:
    linear-gradient(180deg, rgba(61, 111, 159, 0.1), rgba(245, 247, 248, 0) 48%),
    #f7f9fa;
}

.comp-negative .composition-subject {
  width: 9px;
  height: 9px;
  right: 15%;
  bottom: 20%;
}

.comp-negative .line-a {
  right: 9%;
  bottom: 16%;
  width: 26%;
  opacity: 0.85;
}

.comp-negative .shape-a {
  left: 8%;
  top: 12%;
  width: 28%;
  height: 16%;
  border-radius: 999px;
  opacity: 0.28;
}

.comp-vertical_horizon_high .composition-thumb,
.comp-vertical_horizon_mid .composition-thumb,
.comp-vertical_horizon_low .composition-thumb,
.comp-vertical_negative .composition-thumb,
.comp-vertical_lines .composition-thumb {
  width: 58px;
  aspect-ratio: 0.68;
}

.comp-vertical_horizon_high .composition-horizon,
.comp-vertical_horizon_mid .composition-horizon,
.comp-vertical_horizon_low .composition-horizon {
  height: 3px;
  background: rgba(23, 32, 42, 0.24);
}

.comp-vertical_horizon_high .composition-horizon {
  bottom: 70%;
}

.comp-vertical_horizon_mid .composition-horizon {
  bottom: 50%;
}

.comp-vertical_horizon_low .composition-horizon {
  bottom: 24%;
}

.comp-vertical_horizon_high .composition-subject,
.comp-vertical_horizon_mid .composition-subject,
.comp-vertical_horizon_low .composition-subject {
  left: 50%;
  transform: translateX(-50%);
}

.comp-vertical_horizon_high .composition-subject {
  bottom: 18%;
}

.comp-vertical_horizon_mid .composition-subject {
  bottom: 36%;
}

.comp-vertical_horizon_low .composition-subject {
  bottom: 16%;
}

.comp-vertical_horizon_high .shape-a,
.comp-vertical_horizon_mid .shape-a,
.comp-vertical_horizon_low .shape-a {
  left: 13%;
  right: 13%;
  bottom: 7%;
  height: 33%;
  opacity: 0.72;
}

.comp-vertical_horizon_mid .shape-a {
  bottom: 27%;
  height: 25%;
}

.comp-vertical_horizon_low .shape-a {
  bottom: 6%;
  height: 17%;
}

.comp-vertical_negative .composition-thumb {
  background:
    linear-gradient(180deg, rgba(61, 111, 159, 0.1), rgba(245, 247, 248, 0) 44%),
    #f7f9fa;
}

.comp-vertical_negative .composition-subject {
  width: 9px;
  height: 9px;
  right: 18%;
  bottom: 14%;
}

.comp-vertical_negative .shape-a {
  left: 16%;
  top: 12%;
  width: 46%;
  height: 18%;
  border-radius: 999px;
  opacity: 0.22;
}

.comp-vertical_negative .line-a {
  right: 12%;
  bottom: 10%;
  width: 36%;
  opacity: 0.72;
}

.comp-vertical_lines .composition-subject {
  left: 52%;
  bottom: 18%;
}

.comp-vertical_lines .line-a,
.comp-vertical_lines .line-b,
.comp-vertical_lines .line-c {
  top: 10%;
  width: 3px;
  height: 80%;
  opacity: 1;
}

.comp-vertical_lines .line-a {
  left: 26%;
}

.comp-vertical_lines .line-b {
  left: 50%;
}

.comp-vertical_lines .line-c {
  left: 74%;
}

.comp-vertical_lines .shape-a {
  left: 8%;
  bottom: 7%;
  width: 20%;
  height: 28%;
  opacity: 0.45;
}

.mission-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
  scroll-margin-top: 78px;
}

.mission-strip > .empty-state {
  grid-column: 1 / -1;
}

.outing-option {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 4px solid var(--teal);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
}

.outing-option.outing-light {
  border-top-color: var(--amber);
}

.outing-option.outing-interesting {
  border-top-color: var(--blue);
}

.outing-option-head,
.route-head,
.outing-gear,
.route-meta,
.route-actions {
  display: flex;
  align-items: center;
}

.outing-option-head,
.route-head {
  justify-content: space-between;
  gap: 10px;
}

.outing-option-head .eyebrow {
  margin: 0;
}

.outing-option-head > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 820;
}

.outing-option h3 {
  margin: 7px 0 6px;
  font-size: 1.05rem;
  line-height: 1.2;
}

.outing-metrics,
.route-meta {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
}

.outing-metrics span,
.route-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 790;
}

.outing-travel-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  margin-top: 7px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.25;
}

.outing-travel-row > span:last-child {
  text-align: right;
}

.outing-travel-row strong {
  display: block;
  color: var(--ink);
  font-size: 0.64rem;
  text-transform: uppercase;
}

.outing-travel-row label {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink);
  font-weight: 820;
}

.outing-travel-row input {
  width: 48px;
  min-height: 32px;
  padding: 0 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 820;
  text-align: center;
}

.outing-travel-row > button {
  min-height: 32px;
  padding: 0 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--teal-dark);
  font-size: 0.68rem;
  font-weight: 850;
}

.outing-reason {
  min-height: 3.45em;
  margin: 8px 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.35;
}

.outing-gear {
  display: grid;
  gap: 2px;
  margin: 0 0 7px;
}

.outing-gear strong,
.outing-gear span {
  overflow-wrap: anywhere;
}

.outing-gear strong {
  font-size: 0.82rem;
}

.outing-gear span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.outing-shot-list {
  display: grid;
  gap: 4px;
  min-height: 74px;
  margin: 0 0 8px;
  padding-left: 20px;
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 720;
  line-height: 1.3;
}

.outing-shot-list li {
  padding-left: 2px;
  overflow-wrap: anywhere;
}

.outing-more {
  margin: -3px 0 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
}

.outing-option-actions {
  display: grid;
  grid-template-columns: 0.7fr 1.3fr;
  gap: 7px;
  margin-top: auto;
}

.outing-option-actions button {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
}

.today-route:empty {
  display: none;
}

.today-route {
  scroll-margin-top: 78px;
}

.today-active-route {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 2px solid var(--teal);
  border-radius: var(--radius);
  background: rgba(237, 248, 246, 0.96);
}

.today-active-route.is-complete {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.today-active-route h3,
.today-active-route p {
  margin-bottom: 0;
}

.today-active-route h3 {
  margin-top: 3px;
  font-size: 1.12rem;
  line-height: 1.22;
  overflow-wrap: anywhere;
}

.route-progress {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(18px, 1fr));
  gap: 5px;
}

.route-progress span {
  height: 7px;
  border-radius: 999px;
  background: #d7e0e2;
}

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

.route-progress .is-done {
  background: #3d8c5e;
}

.route-progress .is-skipped {
  background: #aeb8bf;
}

.route-gear {
  color: var(--muted);
  font-size: 0.8rem;
}

.route-gear strong {
  color: var(--ink);
}

.route-next {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
}

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

.route-actions button {
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
}

.today-planner-card {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.9);
}

.planner-main {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.planner-main h3 {
  margin-bottom: 5px;
}

.planner-main p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

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

.planner-pills span {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f7faf9;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.28;
}

.planner-pills strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
  color: var(--ink);
}

.light-countdown {
  display: inline-flex;
  min-height: 19px;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: rgba(0, 127, 120, 0.1);
  color: var(--teal);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 860;
  white-space: nowrap;
}

.planner-pills .is-live .light-countdown {
  background: rgba(201, 138, 19, 0.16);
  color: #8a5a00;
}

.planner-pills .is-soon .light-countdown {
  background: rgba(180, 69, 47, 0.12);
  color: #9d3827;
}

.planner-pills .is-past .light-countdown {
  background: rgba(100, 116, 139, 0.13);
  color: var(--muted);
}

.planner-light-note {
  margin: -2px 0 0;
  padding: 7px 9px;
  border-radius: 6px;
  background: rgba(255, 247, 227, 0.74);
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 760;
  line-height: 1.3;
}

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

.planner-focus article {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.planner-focus strong,
.planner-focus span {
  display: block;
}

.planner-focus strong {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 0.78rem;
}

.planner-focus span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 680;
  line-height: 1.3;
}

.planner-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.planner-tag-label {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 860;
  text-transform: uppercase;
}

.mission-card,
.shot-card,
.place-card,
.stat-card,
.detail-section {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
}

.mission-card {
  min-height: 98px;
  padding: 12px;
  border-left: 5px solid var(--teal);
}

.mission-card p,
.shot-card p,
.place-card p,
.detail-section p {
  color: var(--muted);
  line-height: 1.45;
}

.detail-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.detail-section-head .eyebrow {
  margin: 0;
}

.detail-section-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.drop-hint {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 760;
}

.mini-action {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 820;
}

.photo-drop-zone {
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.shot-media-top {
  padding: 10px;
}

.shot-media-top .media-picker-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.shot-media-top .form-drop-hint,
.shot-media-top .file-summary {
  margin: 6px 0 0;
}

.shot-media-top .photo-strip {
  margin-top: 6px;
}

.photo-drop-zone.is-drag-over,
.form-photo-drop-zone.is-drag-over {
  border-color: #2f6fed;
  background: rgba(47, 111, 237, 0.08);
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.15);
}

.photo-drop-zone.is-drag-over .drop-hint,
.form-photo-drop-zone.is-drag-over .drop-hint {
  color: #2f6fed;
}

.place-note-line {
  color: var(--ink);
}

.mission-card p {
  margin-bottom: 0;
  font-size: 0.9rem;
}

.shot-grid,
.place-grid,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.shot-card,
.place-card,
.stat-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 12px;
}

.shot-card {
  min-height: 0;
  padding: 10px;
}

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

.archive-table-card {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(23, 32, 42, 0.03);
}

.archive-table-card summary {
  list-style: none;
}

.archive-table-card summary::-webkit-details-marker {
  display: none;
}

.archive-table-toggle,
.archive-table-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.archive-table-toggle {
  cursor: pointer;
}

.archive-table-toggle h3 {
  margin-bottom: 0;
}

.archive-table-toggle span {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 850;
  white-space: nowrap;
}

.archive-table-card[open] .archive-table-toggle {
  margin-bottom: 10px;
}

.archive-table-head {
  margin: 8px 0 10px;
}

.archive-table-head p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 680;
}

.archive-table-wrap {
  overflow-x: auto;
  overscroll-behavior-x: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.archive-edit-table {
  width: 100%;
  min-width: 1170px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 0.76rem;
}

.archive-edit-table th,
.archive-edit-table td {
  padding: 4px;
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  vertical-align: middle;
}

.archive-edit-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 820;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: 0;
}

.archive-edit-table th:first-child,
.archive-edit-table td:first-child {
  width: 170px;
}

.archive-edit-table th:nth-child(2),
.archive-edit-table td:nth-child(2) {
  width: 100px;
}

.archive-edit-table th:nth-child(3),
.archive-edit-table td:nth-child(3) {
  width: 92px;
}

.archive-edit-table th:nth-child(4),
.archive-edit-table td:nth-child(4) {
  width: 98px;
}

.archive-edit-table th:nth-child(5),
.archive-edit-table td:nth-child(5) {
  width: 88px;
}

.archive-edit-table th:nth-child(6),
.archive-edit-table td:nth-child(6),
.archive-edit-table th:nth-child(7),
.archive-edit-table td:nth-child(7) {
  width: 110px;
}

.archive-edit-table th:nth-child(8),
.archive-edit-table td:nth-child(8) {
  width: 90px;
}

.archive-edit-table th:nth-child(9),
.archive-edit-table td:nth-child(9) {
  width: 135px;
}

.archive-edit-table th:nth-child(10),
.archive-edit-table td:nth-child(10) {
  width: 177px;
}

.archive-edit-table input,
.archive-edit-table select,
.archive-edit-table textarea {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  margin-top: 0;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.76rem;
  line-height: 1.2;
}

.archive-edit-table textarea {
  height: 38px;
  min-height: 38px;
  max-height: 72px;
  resize: vertical;
}

.archive-place-cell strong,
.archive-place-cell span {
  display: block;
}

.archive-place-cell strong {
  margin-bottom: 2px;
  color: var(--ink);
  font-size: 0.75rem;
  line-height: 1.15;
}

.archive-place-cell span {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.15;
}

.list-summary,
.map-summary {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #f7faf9;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.list-summary {
  grid-column: 1 / -1;
}

.places-overview {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.overview-block {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
}

.overview-block > strong {
  font-size: 0.86rem;
}

.overview-chips {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.overview-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 760;
}

.overview-chip strong {
  color: var(--muted);
  font-size: 0.72rem;
}

.list-summary strong,
.map-summary strong {
  display: block;
  margin-bottom: 2px;
  color: var(--ink);
}

.map-summary-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  flex-wrap: wrap;
}

.map-summary-head strong {
  display: inline;
  margin: 0;
}

.map-summary-head span {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 760;
}

.map-summary-read {
  margin-top: 6px;
  color: var(--ink);
  font-weight: 760;
}

.map-summary-groups {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.map-summary-group {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
}

.map-summary-group b {
  color: var(--ink);
  font-size: 0.76rem;
}

.map-summary-group span {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.map-summary-group em {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 5px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid rgba(23, 32, 42, 0.06);
  color: var(--ink);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 760;
}

.map-summary-chip::before {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: var(--pin-color, var(--teal));
}

.card-topline,
.meta-line,
.tag-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.card-topline {
  justify-content: space-between;
  margin-bottom: 8px;
}

.shot-card .card-topline {
  margin-bottom: 6px;
}

.meta-line {
  color: var(--muted);
  font-size: 0.86rem;
}

.shot-location-row,
.detail-place-row {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.shot-location-row .meta-line,
.detail-place-row .detail-place-line {
  min-width: 0;
  flex: 1;
}

.shot-map-button {
  display: inline-grid;
  width: 30px;
  min-width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--teal-dark);
  place-items: center;
}

.shot-map-button:hover,
.shot-map-button:focus-visible {
  border-color: var(--teal);
  background: rgba(0, 127, 120, 0.1);
}

.shot-map-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.shot-map-button circle {
  fill: currentColor;
  stroke: none;
}

.tag-row {
  margin: 8px 0;
}

.shot-card .tag-row {
  margin: 7px 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.76rem;
  font-weight: 760;
}

.tag.priority-high {
  background: rgba(180, 69, 47, 0.11);
  color: var(--brick);
}

.tag.priority-medium {
  background: rgba(240, 180, 41, 0.18);
  color: #755710;
}

.tag.status-done {
  background: rgba(0, 127, 120, 0.12);
  color: var(--teal-dark);
}

.tag.status-repeat {
  background: rgba(61, 111, 159, 0.13);
  color: #254d73;
}

.card-body {
  flex: 1;
  min-width: 0;
}

.card-body p {
  margin-bottom: 8px;
  overflow-wrap: anywhere;
}

.shot-card h3 {
  margin-bottom: 5px;
}

.shot-card .card-body p {
  margin-bottom: 5px;
}

.shot-note-line {
  display: -webkit-box;
  overflow: hidden;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.36;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.shot-compact-line {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.32;
}

.technical-details {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.78rem;
}

.technical-details summary {
  cursor: pointer;
  font-weight: 750;
}

.technical-details p {
  margin: 5px 0 0;
  overflow-wrap: anywhere;
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 10px 0;
}

.photo-strip-compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 6px 0 0;
}

.photo-strip-compact .photo-thumb:first-child:nth-last-child(1) {
  grid-column: 1 / -1;
}

.photo-thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.photo-thumb img,
.photo-thumb canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.photo-thumb img {
  object-fit: cover;
}

.photo-thumb canvas {
  pointer-events: none;
}

.photo-thumb-action {
  position: absolute;
  min-height: 28px;
  padding: 0 8px;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 32, 42, 0.78);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
}

.photo-annotate-button {
  right: 5px;
  bottom: 5px;
}

.photo-remove-button {
  top: 5px;
  right: 5px;
  min-width: 30px;
  padding: 0;
  background: rgba(177, 52, 42, 0.92);
}

.shot-grid.shot-gallery {
  grid-template-columns: repeat(auto-fill, minmax(136px, 1fr));
  gap: 10px;
}

.gallery-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.gallery-thumb,
.gallery-empty-thumb {
  position: relative;
  display: grid;
  width: 100%;
  overflow: hidden;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  place-items: center;
}

.gallery-empty-thumb {
  color: var(--muted);
  font-size: 1.35rem;
  font-weight: 850;
}

.gallery-thumb img,
.gallery-thumb canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.gallery-thumb img {
  object-fit: cover;
}

.gallery-thumb canvas {
  pointer-events: none;
}

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

.gallery-copy strong,
.gallery-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-copy span {
  color: var(--muted);
  font-size: 0.74rem;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.68);
  color: var(--muted);
  text-align: center;
}

.empty-state p {
  max-width: 450px;
  margin: 8px 0 16px;
  line-height: 1.45;
}

.empty-actions,
.subspot-list {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.subspot-list {
  justify-content: flex-start;
}

.subspot-list span {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 720;
}

.card-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.card-actions button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 760;
}

.shot-card .card-actions {
  gap: 6px;
  margin-top: 6px;
}

.shot-card .card-actions button {
  min-height: 30px;
  padding: 0 8px;
  font-size: 0.8rem;
}

.status-action-button.is-status-active {
  border-color: #2f6fed;
  background: #2f6fed;
  color: #fff;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, 0.16);
}

.status-actions .status-action-button.is-status-active {
  border-color: #2f6fed;
  background: #2f6fed;
  color: #fff;
}

.map-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(260px, 0.9fr);
  gap: 12px;
  align-items: start;
}

.map-board {
  position: relative;
  overflow: hidden;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  touch-action: none;
  user-select: none;
  background:
    linear-gradient(90deg, rgba(23, 32, 42, 0.08) 1px, transparent 1px) 0 0 / 58px 58px,
    linear-gradient(0deg, rgba(23, 32, 42, 0.08) 1px, transparent 1px) 0 0 / 58px 58px,
    linear-gradient(135deg, rgba(0, 127, 120, 0.12), rgba(61, 111, 159, 0.1)),
    #f8fafb;
}

.map-board .empty-state {
  min-height: 520px;
  border: 0;
  background: transparent;
}

.map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  cursor: grab;
}

.map-canvas:active {
  cursor: grabbing;
}

.map-canvas.is-adding-pin {
  cursor: crosshair;
}

.map-drag-layer {
  position: absolute;
  inset: 0;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.map-controls {
  position: absolute;
  left: 8px;
  top: 8px;
  z-index: 6;
  display: grid;
  gap: 6px;
}

.map-controls button {
  min-width: 42px;
  min-height: 38px;
  padding: 0 9px;
  border: 1px solid rgba(23, 32, 42, 0.16);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 6px rgba(23, 32, 42, 0.12);
  font-size: 0.82rem;
  font-weight: 850;
}

.map-controls button.is-active {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
}

.map-add-hint {
  position: absolute;
  left: 58px;
  top: 8px;
  z-index: 6;
  max-width: min(330px, calc(100% - 74px));
  padding: 9px 11px;
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(23, 32, 42, 0.12);
  font-size: 0.82rem;
  font-weight: 800;
}

.map-move-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  border-color: rgba(143, 79, 215, 0.3);
  background: rgba(255, 255, 255, 0.96);
}

.map-move-hint span {
  min-width: 0;
}

.map-move-hint button {
  min-height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 830;
  white-space: nowrap;
}

.map-canvas.is-moving-pin {
  cursor: crosshair;
}

.map-tile-layer {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(23, 32, 42, 0.08) 1px, transparent 1px) 0 0 / 58px 58px,
    linear-gradient(0deg, rgba(23, 32, 42, 0.08) 1px, transparent 1px) 0 0 / 58px 58px,
    #edf2f4;
}

.map-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  user-select: none;
  -webkit-user-drag: none;
}

.map-route-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.map-route-overlay polyline {
  fill: none;
  stroke: #007f78;
  stroke-width: 5;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-opacity: 0.82;
  vector-effect: non-scaling-stroke;
}

.map-route-number {
  position: absolute;
  z-index: 9;
  display: grid;
  width: 25px;
  height: 25px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.3);
  font-size: 0.7rem;
  font-weight: 900;
  transform: translate(-50%, -50%);
  place-items: center;
  pointer-events: none;
}

.map-route-notice {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 10;
  display: flex;
  max-width: calc(100% - 70px);
  min-height: 38px;
  align-items: center;
  gap: 8px;
  padding: 5px 6px 5px 9px;
  border: 1px solid rgba(0, 127, 120, 0.32);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 8px rgba(23, 32, 42, 0.14);
  color: var(--ink);
  font-size: 0.72rem;
}

.map-route-notice a {
  color: var(--teal-dark);
  font-weight: 850;
  white-space: nowrap;
}

.map-route-notice button {
  display: grid;
  width: 28px;
  min-width: 28px;
  height: 28px;
  min-height: 28px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--soft);
  color: var(--ink);
  font-weight: 850;
  place-items: center;
}

.map-attribution {
  position: absolute;
  right: 6px;
  bottom: 6px;
  z-index: 3;
  padding: 3px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.84);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.map-legend {
  position: absolute;
  left: 8px;
  bottom: 8px;
  z-index: 7;
  max-width: min(240px, calc(100% - 104px));
  border: 1px solid rgba(23, 32, 42, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  box-shadow: 0 1px 8px rgba(23, 32, 42, 0.12);
  font-size: 0.72rem;
  font-weight: 820;
}

.map-legend summary {
  min-height: 28px;
  padding: 6px 8px;
  cursor: pointer;
  list-style: none;
}

.map-legend summary::-webkit-details-marker {
  display: none;
}

.map-legend summary::after {
  content: "+";
  margin-left: 6px;
  color: var(--muted);
}

.map-legend[open] summary::after {
  content: "-";
}

.map-legend-body {
  display: grid;
  gap: 5px;
  padding: 0 8px 8px;
}

.map-legend-body strong {
  font-size: 0.66rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0;
}

.map-legend-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.map-legend-chips span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.map-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--pin-color, var(--brick));
}

.map-pin {
  position: absolute;
  z-index: 4;
  display: grid;
  justify-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  transform: translate(-50%, -50%);
}

.map-pin.has-label {
  width: 128px;
  min-height: 48px;
  z-index: 7;
}

.map-pin.is-selected {
  z-index: 8;
}

.map-pin::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pin-color, var(--brick));
  box-shadow: 0 2px 8px rgba(23, 32, 42, 0.28);
}

.map-pin.is-selected::before {
  width: 24px;
  height: 24px;
  border-width: 4px;
  box-shadow: 0 3px 14px rgba(23, 32, 42, 0.34), 0 0 0 5px rgba(0, 127, 120, 0.17);
}

.map-pin span {
  max-width: 118px;
  margin-top: 4px;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 0.7rem;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-cluster {
  position: absolute;
  z-index: 6;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 3px solid #fff;
  border-radius: 50%;
  background: var(--pin-color, var(--brick));
  color: #fff;
  box-shadow: 0 3px 13px rgba(23, 32, 42, 0.32);
  transform: translate(-50%, -50%);
  place-items: center;
}

.map-cluster strong {
  font-size: 0.88rem;
  line-height: 1;
}

.type-persona {
  --pin-color: #b4452f;
}

.type-arquitectura {
  --pin-color: #3d6f9f;
}

.type-decoracio {
  --pin-color: #8a5fba;
}

.type-detall {
  --pin-color: #007f78;
}

.type-menjar {
  --pin-color: #9b6a1f;
}

.type-reflex {
  --pin-color: #2b8bb8;
}

.type-llum {
  --pin-color: #c98a13;
}

.type-carrer {
  --pin-color: #68723b;
}

.type-textura {
  --pin-color: #7a6555;
}

.time-all {
  --pin-color: #6b7280;
}

.time-sortida_sol {
  --pin-color: #d7792f;
}

.time-mati {
  --pin-color: #c98a13;
}

.time-migdia {
  --pin-color: #b08a16;
}

.time-tarda {
  --pin-color: #9a6fbd;
}

.time-golden {
  --pin-color: #d08a00;
}

.time-nit {
  --pin-color: #3d5f91;
}

.time-pluja {
  --pin-color: #2b8bb8;
}

.look-classic {
  --pin-color: #5f6975;
}

.look-straight_lines {
  --pin-color: #3d6f9f;
}

.look-loose_artist {
  --pin-color: #8a5fba;
}

.look-graphic {
  --pin-color: #007f78;
}

.look-soft {
  --pin-color: #b7828f;
}

.look-grain {
  --pin-color: #7a6555;
}

.look-documental {
  --pin-color: #68723b;
}

.map-user-dot {
  position: absolute;
  z-index: 5;
  width: 26px;
  height: 26px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1f7aff;
  box-shadow: 0 2px 10px rgba(23, 32, 42, 0.28);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-user-dot span {
  position: absolute;
  inset: -9px;
  border: 2px solid rgba(31, 122, 255, 0.32);
  border-radius: 50%;
}

.map-photo-gps-dot {
  position: absolute;
  z-index: 9;
  display: grid;
  justify-items: center;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-photo-gps-dot span {
  width: 24px;
  height: 24px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #8f4fd7;
  box-shadow: 0 3px 13px rgba(23, 32, 42, 0.32), 0 0 0 6px rgba(143, 79, 215, 0.17);
}

.map-photo-gps-dot strong {
  max-width: 94px;
  margin-top: 3px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 5px rgba(23, 32, 42, 0.16);
  color: var(--ink);
  font-size: 0.66rem;
  font-weight: 860;
  line-height: 1;
  white-space: nowrap;
}

.map-list {
  display: grid;
  gap: 8px;
  max-height: 520px;
  overflow: auto;
}

.map-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  width: 100%;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.map-list-copy {
  display: block;
  min-width: 0;
}

.map-list-item.is-selected {
  border-color: rgba(0, 127, 120, 0.55);
  background: rgba(0, 127, 120, 0.08);
}

.map-list-item strong {
  display: block;
  margin-bottom: 3px;
}

.map-list-item .map-list-title-row {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
  color: var(--ink);
  font-size: inherit;
  line-height: 1.2;
}

.map-list-title-row strong {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.map-list-item .map-priority {
  display: inline-flex;
  min-height: 20px;
  flex: 0 0 auto;
  align-items: center;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 820;
  line-height: 1;
  white-space: nowrap;
}

.map-list-item .map-priority.priority-high {
  background: rgba(180, 69, 47, 0.11);
  color: var(--brick);
}

.map-list-item .map-priority.priority-medium {
  background: rgba(240, 180, 41, 0.18);
  color: #755710;
}

.map-list-item span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.map-list-thumb {
  position: relative;
  display: block;
  width: 52px;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--soft);
}

.map-list-thumb img,
.map-list-thumb canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-list-thumb img {
  object-fit: cover;
}

.map-list-thumb canvas {
  pointer-events: none;
}

.map-notice {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.84);
}

.map-notice strong,
.map-notice span {
  display: block;
}

.map-notice span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.4;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  padding: 18px;
  background: rgba(23, 32, 42, 0.42);
  place-items: center;
}

.modal.is-hidden {
  display: none;
}

.modal-panel {
  width: min(760px, 100%);
  max-height: min(88svh, 920px);
  overflow: auto;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow);
}

.form-stack {
  display: grid;
  gap: 13px;
}

.form-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, max-content);
  align-items: end;
  gap: 10px;
}

.form-row.form-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.inline-form-button {
  margin-bottom: 0;
}

.form-spacer {
  flex: 1;
}

.detail-modal .modal-panel {
  width: min(900px, 100%);
}

.import-panel {
  width: min(980px, 100%);
}

.sync-conflict-panel {
  width: min(560px, 100%);
}

.recovery-panel {
  width: min(620px, 100%);
}

.recovery-list {
  display: grid;
  gap: 9px;
  margin-top: 14px;
}

.recovery-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}

.recovery-item-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.recovery-item-copy strong,
.recovery-item-copy span {
  overflow-wrap: anywhere;
}

.recovery-item-copy span {
  color: var(--muted);
  font-size: 0.78rem;
}

.recovery-empty {
  margin: 0;
  padding: 18px 4px;
  color: var(--muted);
}

.planner-map-modal {
  padding: 8px;
}

.planner-map-panel {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: min(1100px, 100%);
  height: min(94svh, 900px);
  max-height: 94svh;
  overflow: hidden;
  gap: 9px;
}

.planner-map-help {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.planner-map-board {
  position: relative;
  min-height: 360px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #edf2f4;
  touch-action: none;
  user-select: none;
}

.planner-map-crosshair {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 12;
  width: 34px;
  height: 34px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: rgba(0, 127, 120, 0.14);
  box-shadow: 0 2px 10px rgba(23, 32, 42, 0.32);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.planner-map-crosshair::before,
.planner-map-crosshair::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  background: var(--teal-dark);
  transform: translate(-50%, -50%);
}

.planner-map-crosshair::before {
  width: 22px;
  height: 2px;
}

.planner-map-crosshair::after {
  width: 2px;
  height: 22px;
}

.planner-map-crosshair span {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal-dark);
  transform: translate(-50%, -50%);
}

.planner-map-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
}

.planner-map-summary {
  display: grid;
  min-width: 0;
  line-height: 1.25;
}

.planner-map-summary strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.planner-map-summary span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.planner-map-footer button {
  min-height: 42px;
}

.sync-conflict-message {
  margin: 12px 0;
  color: var(--muted);
}

.sync-conflict-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.sync-conflict-options section {
  display: grid;
  align-content: start;
  gap: 5px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--soft);
}

.sync-conflict-options span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sync-conflict-options strong {
  overflow-wrap: anywhere;
}

.sync-conflict-actions {
  margin-top: 14px;
}

.import-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  gap: 10px;
  align-items: end;
  margin: 12px 0;
}

.import-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.import-list {
  display: grid;
  gap: 8px;
  max-height: min(48svh, 470px);
  overflow: auto;
  padding-right: 2px;
  margin-bottom: 12px;
}

.import-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-transform: none;
}

.import-row input {
  width: auto;
  min-height: 0;
  margin-top: 3px;
}

.import-row strong,
.import-row span {
  display: block;
}

.import-row span {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.38;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.detail-section {
  padding: 12px;
}

.detail-classification {
  padding: 10px 12px;
}

.detail-classification .tag-row {
  margin: 6px 0 0;
}

.detail-place-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
}

.detail-place-row {
  align-items: flex-start;
}

.detail-map-button {
  margin-top: -3px;
}

.detail-place-line span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 860;
  text-transform: uppercase;
}

.detail-place-line strong {
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.detail-place-subline {
  margin: 6px 0 0;
  font-size: 0.86rem;
}

.detail-location .technical-details {
  margin-top: 7px;
}

.detail-photos {
  align-self: start;
}

.detail-photos .detail-section-head {
  gap: 8px;
  margin-bottom: 6px;
}

.detail-photos .detail-section-actions {
  gap: 6px;
}

.detail-photos .drop-hint {
  font-size: 0.68rem;
}

.detail-photos .mini-action {
  min-height: 30px;
  padding: 0 8px;
}

.detail-section.full {
  grid-column: 1 / -1;
}

.annotator-panel {
  display: flex;
  flex-direction: column;
  width: min(1100px, 100%);
  height: min(92svh, 900px);
}

.annotation-toolbar {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  padding: 10px 0;
}

.tool-button {
  min-height: 36px;
  padding: 0 10px;
  font-size: 0.86rem;
}

.tool-button.is-active {
  border-color: var(--blue);
  background: rgba(61, 111, 159, 0.12);
}

.swatch {
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--swatch);
  box-shadow: 0 0 0 1px var(--line);
}

.swatch.is-active {
  box-shadow: 0 0 0 3px var(--ink);
}

.annotation-stage {
  position: relative;
  flex: 1;
  min-height: 320px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111820;
}

.annotation-stage img,
.annotation-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.annotation-stage img {
  object-fit: contain;
  pointer-events: none;
}

.annotation-stage canvas {
  touch-action: none;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 80;
  transform: translateX(-50%) translateY(24px);
  min-width: min(420px, calc(100vw - 32px));
  padding: 11px 14px;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  font-weight: 700;
  opacity: 0;
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.has-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  pointer-events: auto;
}

.toast-action {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  white-space: nowrap;
}

.gps-prompt {
  position: fixed;
  left: 50%;
  bottom: 72px;
  z-index: 90;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  width: min(620px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid rgba(23, 32, 42, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 10px 30px rgba(23, 32, 42, 0.18);
  color: var(--ink);
  transform: translateX(-50%);
}

.gps-prompt.is-hidden {
  display: none;
}

.gps-prompt strong {
  display: block;
  margin-bottom: 3px;
  font-size: 0.88rem;
}

.gps-prompt p,
.gps-prompt span {
  display: block;
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.gps-prompt-actions {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.gps-prompt-actions button {
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

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

@media (max-width: 760px) {
  .gps-prompt {
    grid-template-columns: 1fr;
    bottom: 70px;
    gap: 9px;
  }

  .gps-prompt-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .app-header {
    align-items: flex-start;
  }

  .save-status {
    width: 100%;
    min-height: 20px;
    justify-content: flex-end;
    order: 5;
    padding: 0 2px;
  }

  .main-tabs {
    top: env(safe-area-inset-top, 0);
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-actions,
  .section-head > .primary-action {
    width: 100%;
    align-self: stretch;
  }

  .section-actions > button {
    flex: 1 1 150px;
  }

  .controls-band,
  .mission-strip,
  .map-layout,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .map-filter-band {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
    padding: 6px;
  }

  .map-filter-band .compact-control {
    min-width: 0;
  }

  .map-filter-band .compact-control > span {
    font-size: 0.62rem;
  }

  .map-filter-band .compact-control input,
  .map-filter-band .compact-control select {
    font-size: 0.82rem;
  }

  .today-filter-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 6px;
  }

  .outing-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 6px;
  }

  .outing-controls .compact-control,
  .outing-controls .primary-action {
    min-width: 0;
  }

  .outing-controls .primary-action {
    grid-column: auto;
  }

  .outing-controls .compact-control > span {
    font-size: 0.62rem;
  }

  .outing-controls .compact-control select {
    font-size: 0.8rem;
  }

  .today-search-control {
    grid-column: auto;
  }

  .today-filter-band .compact-control,
  .today-filter-band .compact-filter-button {
    min-width: 0;
  }

  .today-filter-band .compact-control > span {
    font-size: 0.62rem;
  }

  .today-filter-band .compact-control input,
  .today-filter-band .compact-control select {
    font-size: 0.82rem;
  }

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

  .shot-filter-band label:first-child {
    grid-column: 1 / -1;
  }

  .merge-suggestion-group,
  .merge-compare-grid {
    grid-template-columns: 1fr;
  }

  .merge-suggestion-group {
    gap: 9px;
  }

  .merge-candidate {
    grid-template-columns: 44px minmax(0, 1fr);
  }

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

  .merge-suggestions-head {
    align-items: stretch;
  }

  .merge-suggestions-head .secondary-action {
    min-height: 36px;
    padding: 0 10px;
  }

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

  .planner-main .secondary-action {
    width: 100%;
  }

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

  .today-active-route.is-complete {
    grid-template-columns: 1fr;
  }

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

  .places-overview {
    grid-template-columns: 1fr;
  }

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

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

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

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

  .main-tabs {
    gap: 4px;
    padding: 6px;
  }

  .tab-button {
    padding: 0 6px;
    font-size: 0.88rem;
  }

  .map-board,
  .map-board .empty-state {
    min-height: 390px;
  }

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

  .import-tools {
    grid-template-columns: 1fr;
  }

  .sync-conflict-options {
    grid-template-columns: 1fr;
  }

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

  .modal-panel {
    width: 100%;
    max-height: 92svh;
  }

  .planner-map-modal {
    padding: 4px;
    align-items: center;
  }

  .planner-map-panel {
    height: 96svh;
    max-height: 96svh;
    padding: 12px;
  }

  .planner-map-board {
    min-height: 0;
  }

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

  .planner-map-summary {
    grid-column: 1 / -1;
  }

  .planner-map-footer button {
    width: 100%;
  }

  .annotator-panel {
    height: 94svh;
  }

  .annotation-stage {
    min-height: 260px;
  }

  .primary-action,
  .secondary-action,
  .danger-action {
    white-space: normal;
  }
}

#view-archive .stats-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#view-archive .stat-card {
  min-height: 0;
  padding: 10px;
}

#view-archive .stat-card .eyebrow {
  font-size: 0.66rem;
  line-height: 1.1;
}

#view-archive .stat-card h2 {
  font-size: 1.45rem;
  line-height: 1.05;
}

.archive-breakdowns {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.62);
}

.change-transfer-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  align-items: center;
  margin: 10px 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--teal);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.change-transfer-status {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.change-transfer-status h3,
.change-transfer-status p {
  margin-bottom: 0;
}

.change-transfer-status > strong {
  flex: 0 0 auto;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(0, 127, 120, 0.11);
  color: var(--teal-dark);
  font-size: 0.74rem;
}

.change-transfer-meta {
  display: flex;
  gap: 6px 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.72rem;
}

.change-transfer-meta span {
  white-space: nowrap;
}

.change-transfer-actions {
  display: flex;
  grid-column: 2;
  grid-row: 1 / span 2;
  gap: 7px;
}

@media (max-width: 700px) {
  .change-transfer-band {
    grid-template-columns: 1fr;
  }

  .change-transfer-actions {
    grid-column: 1;
    grid-row: auto;
  }

  .change-transfer-actions > button {
    flex: 1 1 0;
  }
}

.archive-breakdown {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.archive-breakdown-title {
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 850;
  text-transform: uppercase;
}

.archive-count-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.archive-count-tag {
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--ink);
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.archive-count-tag strong {
  color: var(--accent);
}

.archive-count-empty {
  color: var(--muted);
  font-size: 0.76rem;
}
