/* Pokémon GO Helper
   Calm and easy to read: one typeface (Atkinson Hyperlegible, designed
   for low-vision readers), large text, strong contrast, one accent
   colour. The only bright colours are the 18 type labels. */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  src: url("fonts/atkinson-hyperlegible-next-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f3f4f6;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --text: #13161a;
  --muted: #4b5563;
  --line: #d6dae0;
  --accent: #1d4ed8;
  --accent-text: #ffffff;
  --accent-soft: #e6edfd;
  --danger: #b42318;
  --shadow: 0 1px 2px rgb(16 24 40 / 0.06), 0 2px 6px rgb(16 24 40 / 0.08);
  --radius: 14px;
  --tap: 52px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0d1013;
    --surface: #161a1f;
    --surface-2: #1f252c;
    --text: #eef1f4;
    --muted: #a9b2bd;
    --line: #2b323b;
    --accent: #8ab4ff;
    --accent-text: #0d1013;
    --accent-soft: #1b2a45;
    --danger: #ff8a80;
    --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0d1013;
  --surface: #161a1f;
  --surface-2: #1f252c;
  --text: #eef1f4;
  --muted: #a9b2bd;
  --line: #2b323b;
  --accent: #8ab4ff;
  --accent-text: #0d1013;
  --accent-soft: #1b2a45;
  --danger: #ff8a80;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4);
  color-scheme: dark;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* No text-size-adjust here on purpose: it would stop the phone's own
   "larger text" setting from applying to the app. */

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

/* Taps respond at once (no double-tap-to-zoom wait) and show they landed. */
button,
a,
select,
label {
  touch-action: manipulation;
}

.row-btn:active,
.result:active,
.counter:active,
.pill-btn:active,
.small-btn:active,
.secondary-btn:active,
.icon-btn:active,
.chip:active,
.nav-item:active {
  background: var(--surface-2);
}

.primary-btn:active {
  filter: brightness(0.92);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 28vh 0 0;
  text-align: center;
  color: var(--muted);
}

.loading p {
  margin: 0;
}

.panel-mark {
  display: block;
  margin-bottom: 14px;
}

/* Shown while the app is using the copy saved on the phone. */
.offline-note {
  margin: calc(10px + env(safe-area-inset-top)) 0 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 16px;
  font-weight: 700;
}

/* The note already sits below the phone's status bar. */
.offline-note:not([hidden]) + #page-search .topbar {
  padding-top: 12px;
}

.shell {
  max-width: 640px;
  margin: 0 auto;
  /* room at the bottom for the menu bar */
  padding: 0 16px calc(96px + env(safe-area-inset-bottom));
}

/* ---------------------------------------------------------------- top bar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 0 12px;
  background: var(--bg);
}

.search {
  position: relative;
  flex: 1;
  min-width: 0;
}

.search-icon {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 22px;
  height: 22px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: var(--tap);
  padding: 0 50px 0 48px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 20px;
  appearance: none;
}

.search input::placeholder {
  color: var(--muted);
  opacity: 1;
}

.search input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search input::-webkit-search-cancel-button {
  display: none;
}

.clear-btn {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
}

.clear-btn svg,
.icon-btn svg {
  width: 22px;
  height: 22px;
}

.icon-btn {
  flex: none;
  width: var(--tap);
  height: var(--tap);
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
}

/* ---------------------------------------------------------------- results */

.results {
  margin: 0 0 12px;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.result {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 60px;
  padding: 8px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  text-align: left;
}

.result[aria-selected="true"],
.result:hover {
  background: var(--surface-2);
}

.result-text {
  flex: 1;
  min-width: 0;
}

.result-name {
  display: block;
  font-weight: 700;
}

.result-sub {
  display: block;
  font-size: 16px;
  color: var(--muted);
}

.result-types {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
}

.no-results {
  padding: 14px 10px;
  color: var(--muted);
}

/* ---------------------------------------------------------------- type labels */

.type {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  background: var(--type-bg);
  color: var(--type-text, #111418);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.type.sm {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 14px;
}

.t-normal { --type-bg: #a8a77a; }
.t-fire { --type-bg: #ee8130; }
.t-water { --type-bg: #6390f0; }
.t-electric { --type-bg: #f7d02c; }
.t-grass { --type-bg: #7ac74c; }
.t-ice { --type-bg: #96d9d6; }
.t-fighting { --type-bg: #c22e28; --type-text: #fff; }
.t-poison { --type-bg: #a33ea1; --type-text: #fff; }
.t-ground { --type-bg: #e2bf65; }
.t-flying { --type-bg: #a98ff3; }
.t-psychic { --type-bg: #f95587; }
.t-bug { --type-bg: #a6b91a; }
.t-rock { --type-bg: #b6a136; }
.t-ghost { --type-bg: #735797; --type-text: #fff; }
.t-dragon { --type-bg: #6f35fc; --type-text: #fff; }
.t-dark { --type-bg: #705746; --type-text: #fff; }
.t-steel { --type-bg: #b7b7ce; }
.t-fairy { --type-bg: #d685ad; }

/* ---------------------------------------------------------------- Pokémon card */

.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.card-title {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.dex {
  flex: none;
  color: var(--muted);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.card-meta {
  margin: 2px 0 0;
  color: var(--muted);
}

.types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
}

.best {
  margin: 16px 0 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--accent-soft);
  font-size: 19px;
}

.best strong {
  font-weight: 800;
}

.matchup {
  margin-top: 20px;
}

.matchup h2 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--muted);
}

.tier {
  display: grid;
  grid-template-columns: 74px 1fr;
  align-items: start;
  gap: 12px;
  padding: 6px 0;
}

.tier + .tier {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.mult {
  padding-top: 4px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.mult-note {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--danger);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.card-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 17px;
}

/* ---------------------------------------------------------------- home */

.home {
  padding: 8px 4px;
}

.hint {
  margin: 8px 0 0;
  color: var(--muted);
}

.recent h2 {
  margin: 24px 0 10px;
  font-size: 17px;
  font-weight: 800;
  color: var(--muted);
}

.recent-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-btn {
  min-height: 44px;
  padding: 0 16px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-weight: 700;
}

/* ---------------------------------------------------------------- forms */

.panel {
  max-width: 420px;
  margin: 12vh auto 0;
  padding: 28px 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
}

.panel .intro {
  margin: 6px 0 20px;
  color: var(--muted);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-weight: 700;
}

.field input {
  width: 100%;
  height: var(--tap);
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  font-size: 20px;
}

.field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.field input[readonly] {
  background: var(--surface-2);
  border-color: transparent;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  margin: -4px 0 12px;
}

.check input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--accent);
}

.form-error {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  color: var(--danger);
  font-weight: 700;
}

.primary-btn {
  width: 100%;
  height: var(--tap);
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
  font-size: 19px;
}

.primary-btn:disabled {
  opacity: 0.6;
}

.secondary-btn {
  display: grid;
  place-items: center;
  width: 100%;
  min-height: var(--tap);
  padding: 6px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.small-btn {
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  font-size: 16px;
  font-weight: 800;
}

/* ---------------------------------------------------------------- settings sheet */

.sheet {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  margin: auto auto 12px;
  padding: 22px 20px calc(20px + env(safe-area-inset-bottom));
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  color: var(--text);
}

.sheet::backdrop {
  background: rgb(0 0 0 / 0.45);
}

.sheet h2 {
  margin: 0 0 16px;
  font-size: 24px;
  font-weight: 800;
}

.sheet h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 800;
  color: var(--muted);
}

.sheet section + section {
  margin-top: 22px;
}

.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: var(--surface-2);
}

.segmented button {
  min-height: 44px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  font-weight: 700;
}

.segmented button[aria-pressed="true"] {
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 800;
}

.sheet .small {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.sheet-actions {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

/* ---------------------------------------------------------------- counters */

.counters {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.counters-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.counters-head h2 {
  margin: 0;
  font-size: 21px;
  font-weight: 800;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 6px;
}

/* A switch-like button: outlined when off, filled with a tick when on. */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 16px;
  font-weight: 700;
}

.chip-check {
  display: none;
  width: 18px;
  height: 18px;
  margin-left: -2px;
  color: var(--accent);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.chip[aria-pressed="true"] .chip-check {
  display: block;
}

.select-wrap {
  position: relative;
  display: inline-flex;
}

.select-wrap select {
  min-height: 44px;
  padding: 0 38px 0 14px;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}

.select-chevron {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
}

.counter-list {
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.counter {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 2px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.counter:hover {
  background: var(--surface-2);
}

.rank {
  color: var(--muted);
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.counter-main {
  min-width: 0;
}

.counter-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}

.counter-name {
  font-weight: 800;
}

.counter-types {
  display: inline-flex;
  gap: 4px;
}

.counter-moves {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.3;
}

.counter-score {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.counter-score strong {
  display: block;
  font-size: 20px;
  font-weight: 800;
  line-height: 1.2;
}

.counter-score span {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.yours {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.show-more {
  margin-top: 12px;
}

.footnote {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
}

.empty {
  display: grid;
  gap: 12px;
  padding: 8px 0;
}

.empty p {
  margin: 0;
  color: var(--muted);
}

/* ---------------------------------------------------------------- bottom menu bar */

.bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  max-width: 640px;
  margin: 0 auto;
  padding: 6px 12px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--surface);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 56px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
}

.nav-item svg {
  width: 26px;
  height: 26px;
}

.nav-item[aria-current] {
  color: var(--accent);
  background: var(--accent-soft);
}

/* ---------------------------------------------------------------- My Pokémon */

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 0 4px;
}

.page-head h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
}

.mine-summary {
  margin: 0;
  font-weight: 700;
}

.save-status {
  color: var(--muted);
  font-weight: 400;
}

.save-status[data-status="error"] {
  color: var(--danger);
  font-weight: 700;
}

.mine-intro {
  margin: 6px 0 12px;
}

.mine-find input {
  width: 100%;
  height: var(--tap);
  padding: 0 14px 0 48px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 20px;
  appearance: none;
}

.mine-find input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.mine-find input::-webkit-search-cancel-button {
  display: none;
}

.mine-filter {
  margin: 10px 0;
}

.untick-rare {
  font-size: 16px;
}

.gen {
  margin-top: 22px;
  /* lets the phone skip drawing generations that are off screen */
  content-visibility: auto;
  contain-intrinsic-size: auto 3000px;
}

.gen-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-bottom: 8px;
}

.gen-head h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
}

.gen-count {
  color: var(--muted);
  font-size: 16px;
}

.gen-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.mine-rows {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.mine-row + .mine-row {
  border-top: 1px solid var(--line);
}

.mine-label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 12px;
  cursor: pointer;
}

.tick {
  flex: none;
  width: 28px;
  height: 28px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.mine-text {
  flex: 1;
  min-width: 0;
}

.mine-name {
  display: block;
  font-weight: 700;
}

.mine-sub {
  display: block;
  color: var(--muted);
  font-size: 15px;
}

.variants {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 0 12px 12px 52px;
}

.variants-label {
  color: var(--muted);
  font-size: 16px;
}

/* The detailed matchups sit below the counters. */
.counters + .matchup {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.whose {
  margin-top: 12px;
}

.weather-select select {
  min-height: 44px;
}

.counters-head h2 {
  white-space: nowrap;
}

.weather-select select {
  padding: 0 34px 0 12px;
}

@media (max-width: 400px) {
  .card {
    padding: 16px;
  }
}

.segmented button {
  padding: 4px 6px;
  line-height: 1.2;
}

/* Tighter spacing on the card so the top three counters fit above the
   menu bar on a phone (spec, section 6). */
.types {
  margin-top: 10px;
}

.best {
  margin-top: 12px;
  padding: 10px 14px;
  font-size: 18px;
}

.counters {
  margin-top: 16px;
  padding-top: 14px;
}

.whose {
  margin-top: 10px;
}

.filters {
  margin: 10px 0 2px;
}

.counter {
  padding: 8px 2px;
}

.counter-top {
  gap: 3px 8px;
  line-height: 1.25;
}

.counter-types .type.sm {
  height: 22px;
  padding: 0 7px;
  font-size: 13px;
}

.counter-moves {
  margin-top: 1px;
}

.counter {
  grid-template-columns: 22px 1fr auto;
  grid-template-areas:
    "rank top score"
    "rank moves moves";
  align-items: start;
  column-gap: 10px;
  row-gap: 2px;
}

.counter .rank {
  grid-area: rank;
  align-self: center;
}

.counter-top {
  grid-area: top;
  min-width: 0;
  padding-top: 2px;
}

.counter-score {
  grid-area: score;
}

.counter-score span {
  display: block;
  line-height: 1.2;
}

.counter-moves {
  grid-area: moves;
  margin-top: 0;
}

/* ---------------------------------------------------------------- Raids, Rocket and Data pages */

.page-title {
  min-width: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 36px;
  margin-left: -6px;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.back-link svg {
  width: 22px;
  height: 22px;
}

.page-sub {
  margin: 4px 0 0;
  color: var(--muted);
}

.page-sub .edited {
  color: var(--text);
}

.page-foot {
  margin-top: 22px;
}

.group {
  margin-top: 22px;
}

.group h2 {
  margin: 0 0 8px;
  font-size: 19px;
  font-weight: 800;
}

.row-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}

.row-list > li + li {
  border-top: 1px solid var(--line);
}

.row-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 60px;
  padding: 8px 10px 8px 14px;
  border: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}

.row-btn:hover {
  background: var(--surface-2);
}

.row-main {
  flex: 1;
  min-width: 0;
}

.row-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  font-weight: 800;
}

.row-sub {
  display: block;
  color: var(--muted);
  font-size: 16px;
}

.row-arrow {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--muted);
}

.row-missing {
  padding: 14px;
  color: var(--muted);
}

.catch {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 14px;
  font-weight: 800;
}

.edit-list {
  margin: 0 0 10px;
  padding: 0;
  list-style: none;
}

.edit-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  border-bottom: 1px solid var(--line);
}

.edit-add input {
  width: 100%;
  height: var(--tap);
  padding: 0 14px 0 48px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 18px;
}

.edit-slot .results {
  margin-top: 6px;
}

.source-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.source {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.source.bad {
  border-color: var(--danger);
}

.source-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.source-icon {
  flex: none;
  width: 22px;
  height: 22px;
  color: var(--accent);
}

.source.bad .source-icon {
  color: var(--danger);
}

.source-name {
  font-weight: 800;
}

.source-times {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 16px;
}

.source-error {
  margin: 6px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.source-notes {
  margin-top: 6px;
  font-size: 16px;
}

.source-notes summary {
  min-height: 36px;
  color: var(--accent);
  font-weight: 700;
  cursor: pointer;
}

.source-notes ul {
  margin: 4px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

/* Five buttons in the menu bar: labels may wrap onto two lines. */
.nav-item span {
  font-size: 14px;
  line-height: 1.1;
  text-align: center;
}

.bottom-nav {
  padding-left: 4px;
  padding-right: 4px;
}

.save-status[data-status="offline"] {
  color: var(--text);
  font-weight: 700;
}

/* Counter filters: which groups to include. */
.filters {
  gap: 4px 12px;
}

.include-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  font-size: 17px;
  font-weight: 700;
  cursor: pointer;
}

.include-box input {
  width: 24px;
  height: 24px;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

.counter {
  padding: 6px 2px;
}
