/* Components: lists (sticky category heads, rows, multi-select), empty states, breadcrumbs, item and place
   pages with their accordions, photo galleries, pickers, menus, dialogs, the route planner and loot picker,
   settings, the tour, toasts and the photo viewer. */

/* ---------- list header and rows ---------- */
.lhead {
  display: flex;
  gap: var(--s2);
}
.lmeta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  margin: 0 0 6px;
  font-size: var(--t-xs);
  color: var(--text-3);
}
.lmeta .acts {
  display: flex;
  align-items: center;
  gap: 6px;
}
.rows {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
}
.row {
  display: flex;
  align-items: center;
  gap: var(--s1);
  border-radius: 11px;
  transition: background var(--fast);
}
.row:hover,
.row.hl {
  background: var(--surface-2);
}
.row.sel {
  background: var(--accent-soft);
}
.rmain {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 52px;
  padding: 7px 8px;
  border: 0;
  background: none;
  text-align: left;
  border-radius: 11px;
}
.rtext {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rtitle {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-weight: 600;
  font-size: var(--t-md);
  min-width: 0;
}
.rtitle > span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rsub {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--t-xs);
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rsub .sep {
  color: var(--text-3);
}
.ph-count {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--text-3);
}
.rtoggle {
  flex: none;
  display: grid;
  place-items: center;
  width: var(--tap);
  height: var(--tap);
  margin-right: 4px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  color: var(--text-2);
  transition: all var(--fast);
}
.rtoggle > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  transition: all var(--fast);
}
.rtoggle:hover:not(:disabled) > span {
  border-color: var(--accent);
  color: var(--accent);
}
.rtoggle[aria-pressed="true"] > span {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.rtoggle:disabled {
  opacity: 0.3;
}
.row .cb {
  margin: 0 4px 0 8px;
}
.thumb {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  color: var(--text-3);
}
.thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.catdots {
  display: inline-flex;
  gap: 3px;
  flex: none;
}
.catdots i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
}
.dist {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font: 500 var(--t-xs) var(--f-mono);
  color: var(--text-2);
  white-space: nowrap;
}
.dist.here {
  color: var(--ok);
}
.arr {
  width: 11px;
  height: 11px;
  color: var(--text-3);
}
/* a category's section in a list, its head stays put while you scroll */
.csec + .csec {
  margin-top: var(--s2);
}
.chead {
  position: sticky;
  top: calc(-1 * var(--s3));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--s2);
  width: calc(100% + 2 * var(--s4));
  margin: 0 calc(-1 * var(--s4));
  padding: 8px var(--s4);
  border: 0;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  backdrop-filter: blur(6px);
  text-align: left;
  color: var(--text);
  font-weight: 650;
  font-size: var(--t-sm);
}
.chead .catb {
  border-radius: 7px;
}
.chead .cnt {
  margin-left: auto;
}
.chead .chev {
  color: var(--text-3);
  transition: transform var(--fast) var(--ease);
}
.chead[aria-expanded="false"] .chev {
  transform: rotate(-90deg);
}
.shead {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: var(--s3) 0 2px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.shead::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.more-btn {
  display: flex;
  width: 100%;
  justify-content: center;
  margin: var(--s2) 0;
}
.cnt {
  font: 600 11px/18px var(--f-mono);
  min-width: 20px;
  padding: 0 6px;
  border-radius: 9px;
  text-align: center;
  letter-spacing: 0;
  background: var(--surface-3);
  color: var(--text-2);
}
/* multi-select bar */
.selbar {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
}
.selbar .n {
  font-weight: 600;
  margin-right: auto;
}

/* ---------- empty and loading states ---------- */
.empty {
  text-align: center;
  padding: 36px 12px 20px;
}
.empty-ic {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  border-radius: 16px;
  background: var(--surface-3);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--line-2);
}
.empty h3 {
  margin: 0 0 6px;
  font-size: var(--t-lg);
}
.empty p {
  margin: 0 auto;
  max-width: 320px;
  color: var(--text-2);
}
.empty-acts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--s2);
  margin-top: 18px;
}
.empty-hint {
  margin-top: 18px !important;
  font-size: var(--t-xs);
  color: var(--text-3) !important;
}
.skel {
  height: 52px;
  margin: 4px 0;
  border-radius: 11px;
  background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2));
  background-size: 200% 100%;
  animation: shimmer 1.2s linear infinite;
}
@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* ---------- item and place pages ---------- */
.crumbs {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
  margin: -4px -6px 0 -10px;
}
.crumbs .btn,
.crumbs .ibtn {
  flex: none;
}
.crumbs .crumb-x {
  color: var(--danger);
}
.crumbs .crumb-x:hover {
  background: var(--danger-soft);
  color: var(--danger);
}
.crumb-trail {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
  flex: 1;
  font-size: var(--t-xs);
  color: var(--text-3);
  overflow: hidden;
  white-space: nowrap;
}
.crumb-trail button {
  border: 0;
  background: none;
  padding: 4px 2px;
  color: var(--text-2);
  font-size: inherit;
  white-space: nowrap;
}
.crumb-trail button:hover {
  color: var(--accent);
  text-decoration: underline;
}
.crumb-trail .ic {
  color: var(--text-3);
}
.desc {
  margin: var(--s4) 0 0;
  color: var(--text-2);
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.desc.clamp {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.add-row {
  display: flex;
  gap: var(--s2);
  margin-top: 10px;
}
.combo-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}
.combo-wrap > .ic.lead {
  position: absolute;
  left: 12px;
  top: 12px;
  color: var(--text-3);
  pointer-events: none;
}
.inp.with-lead {
  padding-left: 36px;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s2);
}

/* ---------- accordion: an item with several spots on a place's page, one open at a time ---------- */
.acc {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
}
.acc > li {
  border-radius: 12px;
  transition: background var(--fast);
}
.acc-row {
  display: flex;
  align-items: center;
  gap: var(--s1);
}
.acc-btn {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 52px;
  padding: 6px 8px;
  border: 0;
  background: none;
  text-align: left;
  border-radius: 12px;
}
.acc-btn .chev {
  color: var(--text-3);
  transition: transform var(--fast) var(--ease);
}
.acc-btn[aria-expanded="true"] .chev {
  transform: rotate(90deg);
}
.num {
  flex: none;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c, var(--accent));
  color: #121517;
  font: 600 var(--t-sm) var(--f-mono);
}
.spot-acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: var(--s2);
}
.spot-acts .grow {
  flex: 1;
}
.filterbox {
  margin-bottom: var(--s2);
}

/* ---------- photo galleries ---------- */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: var(--s2);
  margin-top: 10px;
  border-radius: 12px;
  transition:
    outline-color var(--fast),
    background var(--fast);
  outline: 2px dashed transparent;
  outline-offset: 4px;
}
.gallery.compact {
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
}
.ph {
  position: relative;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background: var(--surface-3);
  cursor: zoom-in;
}
.ph img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s var(--ease);
}
.ph:hover img {
  transform: scale(1.05);
}
.ph.missing::after {
  content: "Missing";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--text-3);
}
.ph.add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1.5px dashed var(--line-2);
  background: transparent;
  color: var(--text-3);
  font-size: var(--t-xs);
  font-weight: 550;
  cursor: pointer;
  transition: all var(--fast);
}
.ph.add:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.dropzone {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: var(--s3);
  padding: 12px 14px;
  border-radius: 12px;
  border: 1.5px dashed var(--line-2);
  color: var(--text-3);
  cursor: pointer;
  transition: all var(--fast);
}
.dropzone:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.dropzone span {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.dropzone b {
  color: var(--text);
  font-weight: 600;
  font-size: var(--t-sm);
}
.dropzone small {
  font-size: var(--t-xs);
  color: var(--text-3);
}
body.dragging-files [data-drop] .dropzone,
body.dragging-files [data-drop] .ph.add {
  border-color: rgba(242, 163, 58, 0.6);
}
.drop-hot {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(242, 163, 58, 0.25);
}
.gallery.drop-hot {
  outline-color: var(--accent);
  background: var(--accent-soft);
}
/* putting photos in order */
.ph.sortable {
  cursor: grab;
  touch-action: pan-y;
  -webkit-touch-callout: none;
  user-select: none;
}
.ph-cover {
  position: absolute;
  left: 6px;
  top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 7px 2px 5px;
  border-radius: 999px;
  background: rgba(10, 14, 16, 0.78);
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
  pointer-events: none;
}
.ph.ph-placeholder {
  opacity: 0.3;
  outline: 2px dashed var(--accent);
  outline-offset: -2px;
}
.ph.ph-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 1000;
  pointer-events: none;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  border-color: var(--accent);
  cursor: grabbing;
}
body.ph-dragging,
body.ph-dragging * {
  cursor: grabbing !important;
  user-select: none;
}
.gal-hint {
  margin: 6px 0 0;
  font-size: var(--t-xs);
  color: var(--text-3);
}
.ph.mini {
  width: 96px;
  height: 72px;
  border-radius: 10px;
}
.ph.mini .more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  font-weight: 650;
  font-size: var(--t-sm);
}
.minis {
  display: flex;
  gap: 6px;
  margin-top: var(--s2);
}

/* ---------- pickers ---------- */
.combo-list {
  position: absolute;
  z-index: 60;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow-y: auto;
  margin: 0;
  padding: 5px;
  list-style: none;
  border-radius: 12px;
  background: #1a2328;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
}
.combo-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 40px;
  padding: 6px 9px;
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: var(--t-sm);
}
.combo-list li[aria-selected="true"] {
  background: var(--surface-4);
}
.combo-list li.none {
  cursor: default;
  color: var(--text-3);
  justify-content: center;
  padding: 12px;
}
.combo-list li.grp {
  min-height: 0;
  padding: 8px 9px 2px;
  cursor: default;
  font-size: 10.5px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.combo-list li.create .on {
  color: var(--accent);
  font-weight: 600;
}
.combo-list .on {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combo-list .on small {
  display: block;
  color: var(--text-3);
  font-size: var(--t-xs);
  overflow: hidden;
  text-overflow: ellipsis;
}
.combo-list > li > small {
  flex: none;
  color: var(--text-3);
  font-size: var(--t-xs);
}
.combo-list .catb {
  border-radius: 7px;
}
.oi {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--surface-3);
  color: var(--text-2);
}
.oi.photo {
  overflow: hidden;
}
.oi.photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.tokens {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: var(--s2);
}
.tokens:empty {
  display: none;
}
.token {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  padding: 0 4px 0 9px;
  border-radius: var(--r-sm);
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  font-size: var(--t-sm);
  max-width: 100%;
}
.token.grp {
  border-color: color-mix(in srgb, var(--c) 55%, var(--line-2));
  background: color-mix(in srgb, var(--c) 10%, var(--surface-3));
}
.token .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c);
  flex: none;
}

.token .tk-x {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--text-3);
}
.token .tk-x:hover {
  background: var(--surface-4);
  color: var(--text);
}
.catpick {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
}
.catopt {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px 10px;
  border-radius: 12px;
  border: 1.5px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-weight: 600;
  font-size: var(--t-sm);
  transition: all var(--fast);
}
.catopt .ic {
  color: var(--c);
}
.catopt:hover {
  border-color: color-mix(in srgb, var(--c) 50%, var(--line-2));
  color: var(--text);
}
.catopt[aria-checked="true"] {
  border-color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: var(--text);
}

/* ---------- menus ---------- */
.menu {
  position: fixed;
  z-index: 200;
  min-width: 220px;
  max-width: min(320px, calc(100vw - 16px));
  padding: 5px;
  border-radius: 12px;
  background: #1a2328;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  animation: pop-in var(--fast) var(--ease);
}
.mi {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 6px 10px;
  border: 0;
  border-radius: var(--r-sm);
  background: none;
  text-align: left;
  font-size: var(--t-sm);
  color: var(--text);
}
.mi span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.mi .ic {
  color: var(--text-2);
}
.mi:hover,
.mi:focus-visible {
  background: var(--surface-4);
  outline: none;
}
.mi.danger,
.mi.danger .ic {
  color: var(--danger);
}
.mi.danger:hover {
  background: var(--danger-soft);
}
.msep {
  height: 1px;
  margin: 5px 4px;
  background: var(--line-2);
}

/* ---------- dialogs ---------- */
.modal-wrap {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(4, 7, 9, 0.66);
  backdrop-filter: blur(3px);
  opacity: 0;
  transition: opacity 0.18s;
}
.modal-wrap.on {
  opacity: 1;
}
.modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100dvh - 40px);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  transform: translateY(8px) scale(0.98);
  transition: transform var(--mid) var(--ease);
}
.modal-wrap.on .modal {
  transform: none;
}
.modal.sm {
  max-width: 420px;
}
.modal.md {
  max-width: 560px;
}
.modal.lg {
  max-width: 720px;
}
.mhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 14px 4px 22px;
}
.mhead h2 {
  margin: 0;
  font-size: var(--t-lg);
}
.mbody {
  padding: 14px 22px 20px;
  overflow-y: auto;
  outline: none;
}
.mtext {
  margin: 0;
  color: var(--text-2);
}
.mtext b {
  color: var(--text);
}
.mfoot {
  display: flex;
  justify-content: flex-end;
  gap: var(--s2);
  padding: 14px 22px;
  border-top: 1px solid var(--line);
}

/* welcome */
.welcome .mbody {
  padding-top: 28px;
}
.wl-hero {
  text-align: center;
}
.wl-hero .logo {
  margin: 0 auto 16px;
}
.wl-hero h2 {
  margin: 0 0 6px;
  font: 700 30px/1.1 var(--f-cond);
  letter-spacing: 0.01em;
}
.wl-hero p {
  margin: 0 auto;
  max-width: 400px;
  color: var(--text-2);
}
.wl-choices {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}
.wl-choice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid var(--line-2);
  background: var(--surface-2);
  text-align: left;
  transition: all var(--fast);
}
.wl-choice:hover {
  border-color: var(--line-3);
  background: var(--surface-3);
}
.wl-choice.rec {
  border-color: var(--accent-line);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-2));
}
.wl-choice.rec:hover {
  border-color: var(--accent);
}
.wl-choice .wl-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.wl-choice b {
  display: block;
  font-size: 15px;
}
.wl-choice b em {
  font-style: normal;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin-left: 6px;
}
.wl-choice span {
  font-size: var(--t-sm);
  color: var(--text-2);
}
.wl-save,
.wl-legacy {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  margin: 18px 0 0;
  font-size: var(--t-xs);
  color: var(--text-3);
}
.wl-legacy {
  color: var(--ok);
}

/* settings */
.set-tabs {
  margin-bottom: var(--s4);
}
.set-sec h3 {
  margin: 0 0 var(--s2);
  font-size: var(--t-md);
}
.set-sec + .set-sec {
  margin-top: var(--s5);
}
.set-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3);
  padding: 10px 0;
  min-height: var(--tap);
}
.set-row + .set-row,
.set-row + .switch-row,
.switch-row + .set-row {
  border-top: 1px solid var(--line);
}
.set-row > span {
  flex: 1;
  min-width: 0;
}
.set-row b {
  display: block;
  font-weight: 550;
}
.set-row small {
  display: block;
  color: var(--text-3);
  font-size: var(--t-xs);
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s2);
}
.stats div {
  padding: 12px 10px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  text-align: center;
}
.stats b {
  display: block;
  font: 600 22px/1.2 var(--f-mono);
}
.stats span {
  font-size: var(--t-xs);
  color: var(--text-3);
}
.dm-status {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 12px 0 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--ok-soft);
  color: var(--ok);
  font-size: var(--t-sm);
}
.dm-status.nag {
  background: var(--accent-soft);
  color: var(--accent);
}
.dm-sec {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s4);
  padding: var(--s4) 0;
  border-top: 1px solid var(--line);
}
.dm-sec:first-of-type {
  margin-top: 12px;
}
.dm-sec h3 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 4px;
  font-size: var(--t-md);
  font-weight: 600;
}
.dm-sec h3 .ic {
  color: var(--text-2);
}
.dm-sec p {
  margin: 0 0 var(--s2);
  font-size: var(--t-sm);
  color: var(--text-2);
}
.dm-sec p:last-child {
  margin: 0;
}
.dm-sec .btn {
  flex: none;
}
.dm-sec.danger h3,
.dm-sec.danger h3 .ic {
  color: var(--danger);
}
.about p {
  color: var(--text-2);
  margin: 0 0 var(--s3);
}

/* help */
.help section + section {
  margin-top: var(--s4);
}
.help h3 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0 0 4px;
  font-size: var(--t-md);
}
.help h3 .ic {
  color: var(--accent);
}
.help p {
  margin: 0;
  color: var(--text-2);
}
.keys {
  border-collapse: collapse;
  width: 100%;
}
.keys td {
  padding: 5px 0;
  color: var(--text-2);
}
.keys td:first-child {
  width: 150px;
}

/* the tour: a small card pointing at one thing at a time */
.coach {
  position: fixed;
  z-index: 180;
  width: min(320px, calc(100vw - 24px));
  padding: var(--s4);
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--accent-line);
  box-shadow:
    var(--shadow),
    0 0 0 4px rgba(242, 163, 58, 0.1);
  animation: pop-in var(--mid) var(--ease);
}
.coach h3 {
  margin: 0 0 4px;
  font-size: 15px;
}
.coach p {
  margin: 0;
  color: var(--text-2);
  font-size: var(--t-sm);
}
.coach .acts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s3);
}
.coach .step {
  font: 500 var(--t-xs) var(--f-mono);
  color: var(--text-3);
}
.coach-ring {
  position: fixed;
  z-index: 179;
  border-radius: 12px;
  box-shadow:
    0 0 0 3px var(--accent),
    0 0 0 9999px rgba(4, 7, 9, 0.45);
  pointer-events: none;
  transition: all var(--mid) var(--ease);
}

/* ---------- toast ---------- */
.toast {
  position: fixed;
  z-index: 300;
  left: 50%;
  bottom: 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: calc(100vw - 32px);
  min-height: 46px;
  padding: 7px 7px 7px 18px;
  border-radius: 12px;
  background: #e9edeb;
  color: #11171a;
  font-weight: 550;
  box-shadow: var(--shadow);
  transform: translate(-50%, 140%);
  opacity: 0;
  transition:
    transform 0.25s var(--ease),
    opacity var(--mid);
  pointer-events: none;
}
.toast.on {
  transform: translate(-50%, 0);
  opacity: 1;
  pointer-events: auto;
}
/* while a route runs, toasts keep clear of the navigator (bottom left) and the map's top controls */
@media (min-width: 900px) {
  body.route-on .toast {
    left: auto;
    right: 70px;
    bottom: calc(var(--nav-h, 0px) + 14px);
    max-width: min(560px, calc(100vw - var(--panel-w) - 140px));
    transform: translateY(20px);
    opacity: 0;
  }
  body.route-on .toast.on {
    transform: none;
    opacity: 1;
  }
}
@media (max-width: 899px) {
  body.route-on .toast {
    bottom: auto;
    top: calc(var(--top-h) + 60px);
    transform: translate(-50%, -160%);
  }
  body.route-on .toast.on {
    transform: translate(-50%, 0);
  }
}
.toast .tmsg {
  padding: 4px 4px 4px 0;
}
.tbtn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-sm);
  background: #11171a;
  color: var(--accent);
  font-weight: 650;
  font-size: var(--t-sm);
  white-space: nowrap;
}
.tbtn:hover {
  background: #26333a;
}

/* ---------- photo viewer ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 250;
  display: flex;
  flex-direction: column;
  background: rgba(3, 5, 6, 0.95);
  opacity: 0;
  transition: opacity 0.16s;
}
.lightbox.on {
  opacity: 1;
}
.lb-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 10px 10px 20px;
}
.lb-title {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-title span {
  color: var(--text-3);
  font-weight: 400;
}
.lb-acts {
  display: flex;
  gap: 2px;
}
.lb-acts .ibtn {
  color: #cfd6d3;
}
.lb-acts .ibtn:hover {
  background: rgba(255, 255, 255, 0.1);
}
.lb-acts [data-lb="delete"]:hover {
  color: var(--danger);
}
.lb-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
}
.lb-frame {
  flex: 1;
  height: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: 0 8px;
}
.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
  cursor: zoom-in;
  user-select: none;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
}
.lightbox.zoomed .lb-frame {
  overflow: auto;
  place-items: start center;
}
.lightbox.zoomed .lb-img {
  max-width: none;
  max-height: none;
  cursor: zoom-out;
}
.lb-nav {
  position: absolute;
  z-index: 2;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  backdrop-filter: blur(4px);
}
.lb-nav:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lb-nav.prev {
  left: 14px;
}
.lb-nav.next {
  right: 14px;
}
.lb-bottom {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(640px, calc(100% - 32px));
  margin: 12px auto 0;
}
.lb-count {
  flex: none;
  font: 500 var(--t-sm) var(--f-mono);
  color: var(--text-3);
}
.lb-count:empty {
  display: none;
}
.lb-cap {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  text-align: center;
}
.lb-cap:focus {
  outline: none;
  border-color: var(--accent);
  text-align: left;
}
.lb-order {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 12px auto 0;
  padding: 0 16px;
}
.lb-order[hidden] {
  display: none;
}
.lb-order .btn.on:disabled {
  opacity: 1;
  color: var(--accent);
  border-color: rgba(242, 163, 58, 0.45);
}
.lb-strip {
  display: flex;
  justify-content: safe center;
  gap: 6px;
  padding: 12px 16px 16px;
  padding-bottom: max(16px, env(safe-area-inset-bottom));
  overflow-x: auto;
}
.lb-th {
  flex: none;
  width: 56px;
  height: 56px;
  padding: 0;
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 2px solid transparent;
  background: var(--surface-3);
  opacity: 0.55;
  transition: all var(--fast);
}
.lb-th img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.lb-th:hover {
  opacity: 0.9;
}
.lb-th.on {
  border-color: var(--accent);
  opacity: 1;
}
body.lb-open .toast {
  bottom: 96px;
}

.psec {
  margin-top: var(--s4);
}
.psec:first-child {
  margin-top: 0;
}
.psec > h3 {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin: 0 0 var(--s2);
  font-size: var(--t-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.psec > h3 .linkbtn {
  text-transform: none;
  letter-spacing: 0;
  font-size: var(--t-xs);
}

.sumbar {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
}
.sumbar .line1 {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}
.sumbar .what {
  flex: 1;
  min-width: 0;
  font-size: var(--t-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sumbar .what b {
  color: var(--text);
}
.sumbar .what small {
  display: block;
  color: var(--text-3);
  font-size: var(--t-xs);
}
.sumbar .line2 {
  display: flex;
  gap: var(--s2);
}
.sumbar .line2 .btn {
  flex: 1;
  min-height: 42px;
  font-weight: 600;
}
/* Start route: big and unmissable; Clear: plain to see, in red */
.sumbar .sb-start {
  width: 100%;
  min-height: 54px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 20px color-mix(in srgb, var(--accent) 30%, transparent);
}
.sumbar .sb-clear {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line-2));
}
.sumbar .sb-clear:hover:not(:disabled) {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.ropts {
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.ropts summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--tap);
  padding: 0 12px;
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: var(--t-sm);
  color: var(--text-2);
}
.ropts summary {
  white-space: nowrap;
}
.ropts summary small {
  min-width: 0;
  margin-left: auto;
  font-weight: 450;
  color: var(--text-3);
  font-size: var(--t-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ropts summary::-webkit-details-marker {
  display: none;
}
.ropts summary .ic {
  flex: none;
  transition: transform var(--mid);
  transform: rotate(-90deg);
}
.ropts[open] summary .ic {
  transform: none;
}
.ropts[open] summary {
  border-bottom: 1px solid var(--line);
}
.ropts .body {
  padding: 4px 12px 8px;
}
.ropts .seg {
  margin: 8px 0 4px;
}
.callout {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: var(--s2) 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(242, 163, 58, 0.3);
  font-size: var(--t-sm);
}
.callout > .ic {
  color: var(--accent);
}
.callout > span {
  flex: 1;
  min-width: 0;
}
.callout.warn {
  background: var(--warn-soft);
  border-color: rgba(242, 193, 78, 0.3);
}
.callout.warn > .ic {
  color: var(--warn);
}
.callout.info {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--text-2);
}
.callout.info > .ic {
  color: var(--text-3);
}
/* Route tab while a route runs: a small progress card on top, then the loot */
.lv-card {
  padding: 10px 10px 12px 14px;
  border-radius: var(--r-lg);
  background: color-mix(in srgb, var(--ok) 6%, var(--surface-2));
  border: 1px solid color-mix(in srgb, var(--ok) 28%, var(--line));
}
.lv-top {
  display: flex;
  align-items: center;
  gap: 8px;
}
.lv-top .pulse-dot {
  flex: none;
  width: 9px;
  height: 9px;
  margin-right: 2px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 4px var(--ok-soft);
}
.lv-title {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.lv-title b {
  font-size: 15px;
}
.lv-title small {
  font-size: var(--t-xs);
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lv-card .progress {
  margin: 10px 4px 0 0;
}
.lv-note {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 0 12px;
  font-size: var(--t-xs);
  color: var(--text-2);
}
.lv-note .ic {
  color: var(--ok);
}
.progress {
  height: 6px;
  margin-top: 10px;
  border-radius: 6px;
  background: var(--surface-4);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: var(--ok);
  transition: width var(--mid) var(--ease);
}
.stoplist {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
  counter-reset: stop;
}
.stoplist li button {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  text-align: left;
}
.stoplist li button:hover {
  background: var(--surface-2);
}
.stoplist .sn {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface-4);
  font: 600 var(--t-xs) var(--f-mono);
}
.stoplist li.cur .sn {
  background: var(--accent);
  color: var(--accent-ink);
}
.stoplist li.door .sn {
  background: var(--door);
  color: #fff;
}
.stoplist .t {
  flex: 1;
  min-width: 0;
}
.stoplist .t b {
  display: block;
  font-size: var(--t-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stoplist .t small {
  display: block;
  font-size: var(--t-xs);
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.stoplist .leg {
  flex: none;
  font: 500 var(--t-xs) var(--f-mono);
  color: var(--text-2);
}
.icons-row {
  display: flex;
  align-items: center;
  gap: 3px;
  flex: none;
}
.icons-row .catb {
  border-radius: 6px;
}
.icons-row .more {
  font: 500 11px var(--f-mono);
  color: var(--text-3);
  margin-left: 2px;
}
.footbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: var(--t-sm);
  color: var(--text-2);
}
.footbar b {
  color: var(--accent);
  font-family: var(--f-mono);
}

/* ---------- a key's doors (item page, editing) ---------- */
.door-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1.2fr) auto;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
}
.door-ic {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: var(--r-sm);
  color: #fff;
  background: var(--door);
}
.door-row .sel,
.door-row .inp {
  min-width: 0;
}

/* ---------- small screens ---------- */
@media (max-width: 899px) {
  .modal-wrap {
    place-items: end center;
    padding: 0;
  }
  .modal {
    max-width: none !important;
    max-height: 92dvh;
    border-radius: 20px 20px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    transform: translateY(30px);
  }
  .mhead,
  .mbody,
  .mfoot {
    padding-left: 18px;
    padding-right: 18px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .dm-sec {
    flex-direction: column;
    gap: 10px;
  }
  .toast {
    bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  /* 16px text stops iPhones zooming in when a field is tapped */
  .inp,
  .ta,
  .sel,
  .searchbox input,
  .lb-cap {
    font-size: 16px;
  }
  .lb-nav {
    display: none;
  }
  .chead {
    top: calc(-1 * var(--s3));
  }
}
@media (max-width: 420px) {
  .door-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }
  .door-row .inp {
    grid-column: 2 / 4;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .catpick {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ---------- Explore: category cards and subgroup pills ---------- */
.lhead.in-cat {
  margin-top: var(--s2);
}
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.cat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  min-height: 120px;
  padding: 14px;
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: radial-gradient(
      120% 90% at 0% 0%,
      color-mix(in srgb, var(--c) 16%, transparent),
      transparent 60%
    ),
    var(--surface-2);
  text-align: left;
  transition:
    border-color var(--fast),
    transform var(--fast),
    background var(--fast);
}
.cat-card:hover {
  border-color: color-mix(in srgb, var(--c) 60%, var(--line-2));
  transform: translateY(-1px);
}
.cat-card .cc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-bottom: 8px;
}
.cat-card .cc-ic {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: color-mix(in srgb, var(--c) 20%, transparent);
  color: var(--c);
}
.cat-card .cc-go {
  color: var(--text-3);
}
.cat-card:hover .cc-go {
  color: var(--c);
}
.cat-card b {
  font-size: 15px;
}
.cat-card small {
  font-size: var(--t-xs);
  color: var(--text-2);
}
.cat-card .cc-subs {
  margin-top: 6px;
  font-size: 11.5px;
  line-height: 1.35;
  color: var(--text-3);
}
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: var(--s3);
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 34px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  font-size: var(--t-sm);
  font-weight: 550;
  transition:
    background var(--fast),
    color var(--fast),
    border-color var(--fast);
}
.pill:hover {
  color: var(--text);
  border-color: var(--line-3);
}
.pill .n {
  font: 500 11px var(--f-mono);
  color: var(--text-3);
}
.pill .ic {
  color: var(--c);
}
.pill[aria-pressed="true"] {
  background: color-mix(in srgb, var(--c, var(--text)) 20%, var(--surface-3));
  border-color: var(--c, var(--text));
  color: var(--text);
}
.pill[data-esub=""][aria-pressed="true"] {
  background: var(--text);
  border-color: var(--text);
  color: #0d1214;
}
.pill[data-esub=""][aria-pressed="true"] .n {
  color: #4b5753;
}

.shead .linkbtn {
  margin-left: auto;
  font-size: 11px;
  letter-spacing: 0;
  text-transform: none;
}
@media (pointer: coarse) {
  .pill {
    min-height: var(--tap);
  }
}

/* ---------- a spot's page (js/ui/spot.js): what, which spot, then cards for Location and Photos ---------- */
/* Spot 1 of 3, with previous / next beside the item */
/* where it is, in one line */
/* where exactly: the note and photos, quiet until you press Edit */
/* the photo of where it is: big enough to actually recognise the place */
/* the edit card */
/* lists of spots: one tap opens that spot */
.sp-list {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
}
.sp-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 54px;
  padding: 6px 8px;
  border: 0;
  border-radius: 12px;
  background: none;
  color: var(--text);
  text-align: left;
}
.sp-row:hover {
  background: var(--surface-2);
}
.sp-row.cur {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.sp-row .chev {
  flex: none;
  color: var(--text-3);
}
.sp-row .rtext {
  flex: 1;
  min-width: 0;
}
/* the app's own tooltips (js/ui/components.js) */
.tip {
  position: fixed;
  z-index: 1000;
  max-width: 280px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #0b0f12;
  border: 1px solid var(--line-3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  color: #eef2f0;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  pointer-events: none;
  animation: rise-in var(--fast) var(--ease);
}
/* ---------- the Fix tab (fix.js): groups of things to correct, and the bar while you work through one ---------- */
.fix-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 4px;
  font-size: 19px;
}
.fix-head h2 .ic {
  color: var(--accent);
}
.fix-head p {
  margin: 0 0 4px;
  color: var(--text-2);
  font-size: var(--t-sm);
}
.fix-cards {
  display: grid;
  gap: 8px;
}
.fix-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 64px;
  padding: 10px 14px 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--fast),
    border-color var(--fast);
}
.fix-card:hover {
  background: var(--surface-3);
  border-color: var(--accent-line);
}
.fix-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
}
.fix-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fix-t b {
  font-size: 15px;
}
.fix-t small {
  color: var(--text-3);
  font-size: 12.5px;
  line-height: 1.35;
}
.fix-n {
  flex: none;
  min-width: 40px;
  padding: 4px 10px;
  border-radius: 10px;
  background: var(--surface-4);
  font: 700 14px/1.2 var(--f-mono);
  text-align: center;
}
.fix-card.done .fix-ic {
  background: rgba(88, 196, 120, 0.15);
  color: #6fd08f;
}
.fix-card.done .fix-n {
  color: var(--text-3);
}
.fix-ghead {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 2px;
}
.fix-ghead .btn {
  flex: none;
}
/* over a page while you work through a group */
.fix-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: -2px 0 10px;
  padding: 8px 8px 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.fix-bar .fix-ic {
  width: 32px;
  height: 32px;
  border-radius: 9px;
}
.fix-bar .fix-t b {
  font-size: 14px;
}
.fix-bar.fixed {
  border-color: rgba(111, 208, 143, 0.5);
  background: rgba(88, 196, 120, 0.12);
}
.fix-bar.fixed .fix-ic {
  background: rgba(88, 196, 120, 0.2);
  color: #6fd08f;
}

.place-card .cc-ic {
  color: #9fb3bb;
}

/* an item opened in place in Find: its nearest spots, Details, Show on map */
.row-x {
  margin: -2px 0 8px 52px;
  padding: 6px 8px 10px;
  border-left: 2px solid var(--accent-line);
  list-style: none;
}
.rx-spots {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
}
.rx-spot {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.rx-spot:hover {
  background: var(--surface-3);
}
.rx-spot > .ic:first-child {
  flex: none;
  color: var(--accent);
}
.rx-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rx-t b {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
}
.rx-t small {
  color: var(--text-3);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rx-spot .chev {
  flex: none;
  color: var(--text-3);
}
.rx-none {
  margin: 4px 8px 10px;
  color: var(--text-3);
  font-size: var(--t-sm);
}
.rx-acts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 8px;
}

/* ---------- the route basket: at the foot of the panel on every tab but Route ---------- */
.basket {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--accent-line);
  background: linear-gradient(180deg, rgba(242, 163, 58, 0.1), rgba(242, 163, 58, 0.04));
}
.bk-what {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.bk-what:hover {
  background: var(--surface-3);
}
.bk-what > .ic {
  flex: none;
  color: var(--accent);
}
.bk-what > span {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.bk-what > span > b,
.bk-what > span > small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bk-what b {
  font-size: 14px;
}
.bk-what small {
  color: var(--text-2);
  font-size: 12px;
}
.bk-start {
  flex: none;
  height: 46px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 700;
}

/* ---------- the Route tab: what's on your route ---------- */
.rv-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.rv-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  font-size: 19px;
}
.rv-head h2 .ic {
  color: var(--accent);
}
.rl {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: grid;
  gap: 4px;
}
.rl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 4px 4px 4px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.rl-row .dot {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c);
}
.rl-row.grp .dot {
  border-radius: 3px;
}
.rl-name {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  font-weight: 600;
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
button.rl-name {
  cursor: pointer;
}
button.rl-name:hover {
  color: var(--accent);
}
.rl-row small {
  flex: none;
  color: var(--text-3);
  font-size: 12px;
}
.rl-x {
  flex: none;
  color: var(--text-3);
}
.rl-x:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

/* ---------- the Route tab's picker (picker.js): rows like Layers, a route button on each ---------- */
.pk-search {
  margin-top: 0;
}
.pk-item {
  gap: 11px;
  min-height: 52px;
  padding: 4px 6px 4px 12px;
}
.lp-items .pk-item {
  padding-left: 34px;
}
.pk-flat > li {
  border-radius: 12px;
  background: var(--surface-2);
}
.pk-btn {
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  border: 1.5px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  cursor: pointer;
  transition:
    background var(--fast),
    border-color var(--fast),
    transform 0.1s;
}
.pk-btn:hover {
  border-color: var(--accent);
}
.pk-btn:active {
  transform: scale(0.94);
}
.pk-btn.all {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
.pk-btn.some {
  background: color-mix(in srgb, var(--accent) 40%, transparent);
  border-color: var(--accent);
  color: var(--accent-ink);
}
/* a group's own pictures, overlapping */
.pk-stack {
  flex: none;
  display: inline-flex;
  align-items: center;
}
.pk-stack > .catb,
.pk-stack > .lg-icon {
  border-radius: 8px;
  box-shadow: 0 0 0 2px var(--surface-2);
}
.pk-stack > * + * {
  margin-left: -9px;
}
.pk-more {
  min-width: 26px;
  height: 26px;
  padding: 0 5px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-4);
  box-shadow: 0 0 0 2px var(--surface-2);
  color: var(--text-2);
  font: 700 10.5px/1 var(--f-mono);
}
.lp-open .pk-stack + .lp-chev {
  margin-left: 4px;
}

/* "Not confirmed yet" on a spot's or a place's page, with Confirm */
/* ---------- an item's icon ---------- */
.icon-edit {
  position: relative;
  flex: none;
  padding: 0;
  border: 0;
  background: none;
  border-radius: 14px;
  cursor: pointer;
}
.icon-edit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.ip-h {
  margin: var(--s3) 0 var(--s2);
  font-size: var(--t-xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ip-h small {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
}
.ip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(64px, 1fr));
  gap: 8px;
}
.ip-grid.syms {
  grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
}
.ip-opt {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 12px;
  border: 2px solid var(--line-2);
  background: var(--surface-3);
  color: var(--text-2);
  overflow: hidden;
  cursor: pointer;
  transition: all var(--fast);
}
.ip-opt img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ip-opt.sym {
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--surface-2));
}
.ip-opt:hover {
  border-color: var(--text-3);
}
.ip-opt:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ip-opt.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(242, 163, 58, 0.25);
}
.ip-opt.add {
  gap: 2px;
  border-style: dashed;
  background: transparent;
  font-size: var(--t-xs);
  font-weight: 550;
}
.ip-opt.add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- pages: one row of equal, labelled buttons under the title ---------- */
/* unconfirmed: a small amber ? beside the name */
.unc-dot {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 16px;
  height: 16px;
  margin-left: 6px;
  border-radius: 50%;
  border: 1px dashed rgba(242, 193, 78, 0.7);
  color: var(--warn);
  vertical-align: middle;
}
/* an item's icon on its page: click it to change it */
.icon-edit .icon-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 3px 0;
  border-radius: 0 0 14px 14px;
  background: rgba(10, 14, 16, 0.82);
  color: #fff;
  font-size: 10px;
  font-weight: 650;
  opacity: 0;
  transition: opacity var(--fast);
}
.icon-edit:hover .icon-hint,
.icon-edit:focus-visible .icon-hint {
  opacity: 1;
}

/* ---------- Change icon ---------- */
.ip-preview {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s3);
  border-radius: 14px;
  background: var(--surface-2);
}
.ip-pv-big .catb {
  border-radius: 16px;
}
.ip-pv-where {
  display: flex;
  flex-direction: column;
  gap: var(--s2);
  min-width: 0;
}
.ip-pv-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}
.ip-pv-t {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ip-pv-t b {
  font-size: var(--t-sm);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ip-pv-t small {
  font-size: var(--t-xs);
  color: var(--text-3);
}
.ip-marker {
  display: grid;
  place-items: center;
  flex: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid var(--c);
  background: #11181c;
  color: var(--c);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(11, 15, 18, 0.9);
}
.ip-marker img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ip-tabs {
  display: flex;
  gap: 4px;
  margin: var(--s4) 0 var(--s3);
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
}
.ip-tabs [role="tab"] {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text-2);
  font: inherit;
  font-weight: 600;
  font-size: var(--t-sm);
  cursor: pointer;
}
.ip-tabs [role="tab"][aria-selected="true"] {
  background: var(--surface-3);
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}
.ip-tabs [role="tab"]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}
.ip-note {
  margin: 0 0 var(--s2);
  font-size: var(--t-xs);
  color: var(--text-3);
}
.ip-modal .mbody {
  min-height: 0;
}

/* Undo / Redo in the top bar */
.histbtns {
  display: flex;
  gap: 2px;
  margin-right: var(--s2);
}
.histbtns .btn:disabled {
  opacity: 0.35;
}

/* ---------- detail pages (item, place, spot, door): one structure for all of them (js/ui/panel.js) ----------
   navigation, identity (picture, title, subtitle, status chips), actions, then sections divided by a rule */
.pg-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin: -4px -6px 0 -10px;
}
.pg-back {
  min-width: 0;
  max-width: calc(100% - 44px);
}
.pg-back > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* identity */
.pg-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 2px;
}
.pg-hero .catb {
  border-radius: 14px;
}
.pg-media {
  display: grid;
  place-items: center;
  flex: none;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--accent-soft);
  color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent-line);
}
.pg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* a place's photo: a wide banner above its name */
.pg-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 240px;
  margin: 4px 0 14px;
  padding: 0;
  border: 0;
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  cursor: zoom-in;
}
.pg-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pg-cover:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.pg-cover-n {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgb(0 0 0 / 0.62);
  color: #fff;
  font-size: var(--t-xs);
  font-weight: 600;
}
.pg-id {
  flex: 1;
  min-width: 0;
}
.pg-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.25;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.pg-title:focus {
  outline: none;
}
.pg-title-link {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.pg-title-link:hover {
  color: var(--accent);
}
.pg-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 5px 0 0;
  font-size: var(--t-xs);
  color: var(--text-2);
}
.pg-cat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  min-height: 22px;
  padding: 0 8px;
  border: 0;
  border-radius: 6px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  color: var(--c);
  font-size: var(--t-xs);
  font-weight: 600;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-cat svg {
  flex: none;
}
.pg-cat:hover {
  background: color-mix(in srgb, var(--c) 24%, transparent);
}
.pg-kind {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pg-kind.door {
  color: var(--door);
}
/* ‹ Spot 3 of 12 at Salem ›, a full-width row under the title */
.pg-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 3px;
  border-radius: 11px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pg-of {
  flex: 1;
  min-width: 0;
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 6px;
  padding: 0 4px;
  line-height: 1.2;
  white-space: nowrap;
  font-size: var(--t-sm);
}
.pg-of b {
  flex: none;
}
.pg-of small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: var(--t-sm);
  color: var(--text-2);
}
.pg-step {
  display: grid;
  place-items: center;
  width: 34px;
  height: 36px;
  border: 1px solid var(--line-2);
  border-radius: 8px;
  background: var(--surface-3);
  color: var(--text);
}
.pg-step:hover:not(:disabled) {
  background: var(--surface-4);
  color: var(--accent);
}
.pg-step:disabled {
  opacity: 0.35;
  cursor: default;
}
/* status chips */
.pg-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}
.pchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  max-width: 100%;
  padding: 0 10px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: var(--t-xs);
  font-weight: 550;
  white-space: nowrap;
}
.pchip > span {
  overflow: hidden;
  text-overflow: ellipsis;
}
.pchip .arr {
  width: 11px;
  height: 11px;
  flex: none;
  color: var(--accent);
}
.pchip.link {
  color: var(--text);
  cursor: pointer;
}
.pchip.link > .ic:first-child {
  color: var(--accent);
}
.pchip.link .chev {
  color: var(--text-3);
}
.pchip.link:hover {
  border-color: var(--accent-line);
  background: var(--surface-3);
}
.pchip.mono > span {
  font-family: var(--f-mono);
  font-size: 11.5px;
}
.pchip.ok {
  color: var(--ok);
  border-color: rgba(63, 203, 156, 0.4);
  background: var(--ok-soft);
}
.pchip.warn {
  padding-right: 3px;
  border-style: dashed;
  border-color: rgba(242, 193, 78, 0.6);
  background: var(--warn-soft);
  color: var(--warn);
}
.pchip.warn:not(:has(.pchip-btn)) {
  padding-right: 10px;
}
.pchip-btn {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  height: 22px;
  margin-left: 3px;
  padding: 0 9px;
  border: 0;
  border-radius: 11px;
  background: var(--warn);
  color: #241a00;
  font-size: 11.5px;
  font-weight: 700;
}
.pchip-btn:hover {
  background: #f7d16f;
}
.pchip.dim {
  border-style: dashed;
  color: var(--text-3);
  background: transparent;
}
/* actions: Show on map first, Edit last */
.pg-acts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  margin: 14px 0 2px;
}
.pg-acts .btn {
  flex: 1 1 auto;
  justify-content: center;
  white-space: nowrap;
}
/* sections, each under a rule */
.pg-sec,
.pg-fold {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.pg-sec-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.pg-sec-h h3,
.pg-fold summary {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 0;
  font-size: var(--t-xs);
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-2);
}
.pg-sec-note {
  font-size: var(--t-xs);
  color: var(--text-3);
}
.pg-empty {
  margin: 0;
  font-size: var(--t-sm);
  color: var(--text-3);
}
.pg-note {
  margin: 0;
  font-size: var(--t-md);
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.pg-sec .desc {
  margin: 0;
}
.pg-facts + .desc,
.pg-sec .desc + .pg-photos {
  margin-top: 14px;
}
.pg-more-t {
  margin-top: 6px;
  font-size: var(--t-sm);
}
/* a group inside a section (a category on a place's page); it stays put while you scroll its list */
.pg-group {
  position: sticky;
  top: calc(-1 * var(--s3));
  z-index: 2;
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin: 12px 0 2px;
  padding: 6px 0;
  background: var(--surface);
  font-size: var(--t-sm);
  font-weight: 600;
  color: var(--text);
}
.pg-sec-h + .pg-group,
.filterbox + .pg-group {
  margin-top: 0;
}
/* Details: a list of facts */
.pg-facts {
  display: grid;
  gap: 14px;
  margin: 0;
}
.pg-facts dt {
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pg-facts dd {
  margin: 0;
}
.pg-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pg-tag {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  color: var(--text);
  font-size: var(--t-sm);
}
.pg-tag.link:hover {
  border-color: var(--accent-line);
  color: var(--accent);
}
/* doors: a key's, or the ones at a place */
.pg-doors {
  list-style: none;
  margin: 0 -8px;
  padding: 0;
}
.pg-door {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 6px 8px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--text);
  text-align: left;
}
.pg-door > .ic:first-child {
  flex: none;
  color: var(--door);
}
.pg-door > span {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.pg-door b {
  font-size: var(--t-sm);
  font-weight: 600;
}
.pg-door small {
  font-size: var(--t-xs);
  color: var(--text-2);
}
.pg-door .chev {
  flex: none;
  color: var(--text-3);
}
.pg-door:hover {
  background: var(--surface-2);
}
/* photos to look at: big enough to recognise the place */
.pg-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}
.pg-photos .ph {
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}
.pg-photos.one {
  grid-template-columns: 1fr;
}
.pg-photos.one .ph {
  aspect-ratio: 16 / 10;
}
.pg-photos .more {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  font-weight: 650;
}
.pg-note + .pg-photos {
  margin-top: 12px;
}
/* a place's items: one row each; one with several spots opens to a row per spot */
.pg-rows > li.open {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  margin: 4px 0;
}
.pg-rows .acc-row > .sp-row {
  flex: 1;
  min-width: 0;
}
.pg-rows .acc-btn[aria-expanded="true"] .chev {
  transform: rotate(180deg);
}
.pg-row-act {
  flex: none;
  margin-right: 4px;
}
.pg-subrows {
  list-style: none;
  margin: 0;
  padding: 0 0 6px 18px;
}
.pg-subrows .sp-row {
  min-height: 46px;
}
.num.sm {
  width: 22px;
  height: 22px;
  font-size: 11px;
}
/* Edit: a grouped list, like a settings screen. Sections are rounded cards with their title just above;
   rows inside are split by hairlines. Nothing spills out: long values shorten with …, fields fill the row. */
.ef {
  margin-top: 18px;
  min-width: 0;
}
.ef-sec + .ef-sec {
  margin-top: 18px;
}
.ef-cap {
  margin: 0 0 7px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.ef-card {
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  overflow: hidden;
}
.ef-card > * + * {
  border-top: 1px solid var(--line);
}
.ef-note {
  margin: 7px 4px 0;
  font-size: var(--t-xs);
  line-height: 1.45;
  color: var(--text-3);
}
/* a field: its label over the box */
.ef-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  padding: 12px 14px;
}
.ef-fl {
  font-size: var(--t-xs);
  font-weight: 600;
  color: var(--text-2);
}
.ef-fl:empty {
  display: none;
}
.ef-field .inp,
.ef-field .sel,
.ef-field .ta {
  width: 100%;
  min-width: 0;
}
/* two fields side by side (category and group); one above the other on a narrow panel */
.ef-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.ef-pair > .ef-field + .ef-field {
  border-left: 1px solid var(--line);
}
/* a row: icon, label (and a line under it), its value, › */
.ef-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-width: 0;
  min-height: 52px;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.ef-row:hover,
label.ef-row:hover {
  background: var(--surface-3);
}
.ef-row .ef-ic {
  flex: none;
  color: var(--text-2);
}
.ef-l {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  font-size: var(--t-sm);
  font-weight: 550;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.ef-l small {
  margin-top: 2px;
  font-size: var(--t-xs);
  font-weight: 400;
  color: var(--text-3);
}
.ef-v {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 55%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: var(--t-sm);
  color: var(--text-2);
}
.ef-chev {
  flex: none;
  color: var(--text-3);
}
/* a switch row; a toggle button draws the same switch */
.ef-sw[aria-pressed="true"] .ef-ic,
.ef-sw:has(.switch:checked) .ef-ic {
  color: var(--accent);
}
.sw-ui {
  flex: none;
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 22px;
  background: #33424a;
  transition: background 0.18s;
}
.sw-ui::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #dfe5e2;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: transform 0.18s var(--ease);
}
.ef-sw[aria-pressed="true"] .sw-ui {
  background: var(--accent);
}
.ef-sw[aria-pressed="true"] .sw-ui::after {
  transform: translateX(16px);
  background: #fff;
}
/* a key's door: its place (with ✕) over which door */
.ef-door-h {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.ef-door-h .ef-ic {
  flex: none;
  color: var(--door);
}
.ef-door-h .sel {
  flex: 1;
  min-width: 0;
}
/* removing: red rows in a card of their own */
.ef-danger {
  margin-top: 24px;
}
.ef-red .ef-ic,
.ef-red .ef-l {
  color: #f08a7e;
}
.ef-red:hover {
  background: rgba(224, 88, 74, 0.08) !important;
}
/* Done */
.ef-done {
  display: flex;
  margin-top: 18px;
}
.ef-done .btn {
  flex: 1;
  justify-content: center;
  min-height: 46px;
  font-size: 15px;
}
.pg-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.flabel-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2);
  margin-bottom: 4px;
}
.flabel-row .flabel {
  margin: 0;
}
/* Taken out: folded away until you want it */
.pg-fold summary {
  min-height: 34px;
  cursor: pointer;
  list-style: none;
}
.pg-fold summary::-webkit-details-marker {
  display: none;
}
.pg-fold summary .chev {
  color: var(--text-3);
  transition: transform var(--fast) var(--ease);
}
.pg-fold[open] summary .chev {
  transform: rotate(90deg);
}
.pg-fold summary:hover {
  color: var(--text);
}
.pg-hint {
  margin: 4px 0 8px;
  font-size: var(--t-xs);
  color: var(--text-3);
}
.pg-fold .row .pg-row-act {
  align-self: center;
}
/* the page's last line: a link elsewhere */
.pg-foot {
  margin-top: 20px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.pg-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-2);
  font-size: var(--t-sm);
  font-weight: 550;
  text-decoration: none;
}
.pg-link .chev {
  color: var(--text-3);
}
.pg-link:hover {
  color: var(--accent);
}
/* phones: a little tighter, so the title, status and actions fit in the half-open sheet */
@media (max-width: 899px) {
  .pg-hero {
    gap: 12px;
  }
  .pg-hero .catb,
  .pg-hero .pg-media {
    width: 48px !important;
    height: 48px !important;
  }
  .pg-title {
    font-size: 18px;
  }
  .pg-status {
    margin-top: 10px;
  }
  .pg-acts {
    margin-top: 12px;
  }
  .pg-acts .btn {
    min-height: 44px;
    padding: 0 12px;
  }
}
@media (max-width: 420px) {
  .pg-acts .btn {
    font-size: var(--t-sm);
    gap: 6px;
  }
}

/* a spot's tags: how it turns up (Dropped by infected, Random event…) */
.sp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}
.sp-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: var(--surface-3);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: var(--t-xs);
  font-weight: 600;
}
.sp-tag .ic {
  color: var(--text-2);
}
.sp-tag.t-infected .ic {
  color: #93d46b;
}
.sp-tag.t-event .ic {
  color: #f28bc4;
}
.sp-tag.t-locked .ic {
  color: var(--door);
}
.sp-tag.t-underground .ic {
  color: #b193f0;
}
.nav-spot .sp-tags {
  margin: 4px 0 6px;
}
/* "Also right here": other loot at the spot, its own block apart from the item above. A labelled line
   where the item's page ends, then a card with a header band and a row per thing. */
.pg-near {
  margin-top: 26px;
}
.pn-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.pn-rule::before,
.pn-rule::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line-2);
}
.pn-card {
  border-radius: var(--r-lg);
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
}
.pn-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface-3);
  border-bottom: 1px solid var(--line-2);
}
.pn-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pn-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}
.pn-t h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}
.pn-t small {
  font-size: var(--t-xs);
  color: var(--text-2);
}
.pn-head .cnt {
  flex: none;
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-4);
  font: 600 12px var(--f-mono);
  text-align: center;
}
.pn-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pn-list li + li {
  border-top: 1px solid var(--line);
}
.pn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 58px;
  padding: 10px 14px;
  border: 0;
  background: none;
  color: var(--text);
  text-align: left;
}
.pn-row:hover {
  background: var(--surface-3);
}
.pn-row .catb {
  flex: none;
}
.pn-row .chev {
  color: var(--text-3);
}
.pn-more {
  display: block;
  padding: 10px 14px;
  border-top: 1px solid var(--line);
}
/* rows scrolled into view (keyboard, a link) stop clear of the sticky category heading above them */
.pg-rows > li,
.pg-subrows > li {
  scroll-margin-top: 44px;
}
/* a running route: what's left and how long, a quiet line under the progress */
.lv-title small.lv-eta {
  color: var(--text-3);
  white-space: normal; /* wraps rather than being cut off */
}

.trip-live {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.trip-live > .btn {
  align-self: flex-start;
}

/* ---------- the Route tab: time first, options, saved routes ---------- */
/* the estimate: "40 min running · 44 stops · 52,950 studs", each part kept whole, the time standing out */
.est {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
}
.est > span {
  white-space: nowrap;
}
.est > span + span::before {
  content: "·";
  margin: 0 6px;
  color: var(--text-3);
}
.est-t {
  color: var(--accent);
  font-size: 1.2em;
  font-weight: 750;
}
.est-p {
  font-style: normal;
  color: var(--text-3);
}
.sumbar .what small#estimate,
.basket small#estimate {
  display: block;
  white-space: normal;
}
/* the basket (on the other tabs): the estimate's parts stay on a line, wrapping as whole pieces */
.basket .est {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: baseline;
}
.sb-start kbd {
  margin-left: 6px;
  background: rgba(31, 19, 0, 0.12);
  border-color: rgba(31, 19, 0, 0.4);
  color: var(--accent-ink);
}
/* a running route: how long is left, running, big; then walking and studs */
.lv-title .lv-eta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 6px;
  margin-top: 8px;
}
.lv-eta > b {
  font-size: 22px;
  font-weight: 750;
  line-height: 1.1;
  color: var(--accent);
  white-space: nowrap;
}
.lv-eta > span {
  font-size: 12.5px;
  color: var(--text-2);
  white-space: nowrap;
}
.lv-title .lv-eta small {
  flex-basis: 100%;
  color: var(--text-3);
  white-space: nowrap;
}
/* the stops to come: when you'd get there (running), and how far */
.stoplist .leg {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  white-space: nowrap;
}
.stoplist .leg b {
  color: var(--text);
  font-weight: 650;
}
.stoplist .leg small {
  font-size: 11px;
  color: var(--text-3);
}
/* Save, in the heading of what's on your route */
.psec > h3:has(.h3-act, .h3-note) {
  justify-content: flex-start;
}
.psec > h3 .h3-act,
.psec > h3 .h3-note {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font: 600 12px/1.2 var(--f-sans, inherit);
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}
.psec > h3 .h3-act {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.psec > h3 .h3-act:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.psec > h3 .h3-note {
  color: var(--text-3);
}
.psec > h3 .h3-note .ic,
.psec > h3 .h3-act .ic {
  color: var(--accent);
}
/* saved routes: one row of chips, scrolling sideways when there are many */
/* the limit */
/* phones: messages come in at the top, so they never cover Start route, Next or the sheet */
@media (max-width: 899px) {
  .toast {
    bottom: auto;
    top: calc(var(--top-h, 56px) + 10px);
    transform: translate(-50%, -160%);
  }
  .toast.on {
    transform: translate(-50%, 0);
  }
}
/* a route running on a wide screen: messages sit bottom left of the map, clear of the "At this stop"
   window (top right) and the navigator's Next */
@media (min-width: 900px) {
  body.route-on .toast {
    left: calc(var(--panel-w, 0px) + 20px);
    right: auto;
  }
}

/* saved routes: one card, a row per route (its name, what's on it, its options); ✕ deletes */
.pre-list {
  margin: 0 0 4px;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: var(--surface-2);
  overflow: hidden;
}
.pre-item {
  display: flex;
  align-items: center;
}
.pre-item + .pre-item {
  border-top: 1px solid var(--line);
}
.pre-pick {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 6px 10px 12px;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pre-pick:hover {
  background: var(--surface-3);
}
.pre-pick > .ic {
  flex: none;
  color: var(--text-3);
}
.pre-ic {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
}
.pre-t {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pre-t b {
  font-size: var(--t-sm);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pre-t small {
  font-size: var(--t-xs);
  color: var(--text-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pre-on {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-weight: 650;
  color: var(--accent);
}
.pre-item.on {
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.pre-del {
  flex: none;
  margin-right: 6px;
  color: var(--text-3);
}
.pre-del:hover {
  color: var(--danger);
}
