/* ═══════════════════════════════════════════════════════════════════════════
   FINDMYSITE — app.css (Agent B)
   The logged-in product experience: watch forms, watch tables, past alerts,
   all five modals, auth gates, verify banner, pro bar, feature request.
   Morning-light aesthetic: cream/white cards, forest ink, ember CTAs.

   Depends on base.css tokens (§2 of REBUILD_SPEC):
     --night --day-cream --day-warm --forest --pine --ember --ember-deep
     --amber --ink --ink-soft --paper --mist --starlight
     --success --success-bg --danger --danger-bg --warn --warn-bg
     --radius-sm --radius --radius-lg --shadow-sm --shadow --shadow-lg
     --ease --ease-spring --t-fast --t-med --t-slow

   NOT styled here (base.css owns): toasts (#toast-container, .toast*),
   global .btn primitives, global reset/typography.

   TOC
   00  Compat aliases + safety net
   01  App cards (shell-agnostic) + headings/kickers
   02  Info note
   03  Mode toggle (segmented, sliding thumb)
   04  Auth gates
   05  Form primitives (labels, inputs, rows, checkbox toggles, PRO pill)
   06  Campground type-ahead (dropdown + preview card)
   07  Buttons (scoped to app surfaces) + btn spinner
   08  Form messages
   09  My Watches (toolbar, table, badges, actions, empty state)
   10  Past alerts (collapsible)
   11  Verify banner
   12  Pro member bar + pricing-compact
   13  Feature request card
   14  Modals (overlay, box, close, tabs, auth/account/upgrade specifics)
   15  Focus-visible
   16  Responsive: 980 / 640 (stacked-card table) / 400
   17  Reduced motion
   ═══════════════════════════════════════════════════════════════════════════ */


/* ── 00 · COMPAT ALIASES + SAFETY NET ──────────────────────────────────────
   The app-region markup (reproduced verbatim per contract) carries inline
   styles referencing legacy tokens that are NOT in the new base.css set.
   Alias them here so inline `var(--text-muted)` etc. keep resolving. */
:root {
  --muted:      var(--ink-soft, #4b5d52);
  --text-muted: var(--ink-soft, #4b5d52);
  --border:     color-mix(in oklab, var(--ink, #16241d) 12%, transparent);
}

/* base.css owns .hidden — duplicated verbatim so this file also stands alone.
   Identical declaration ⇒ zero conflict. */
.hidden { display: none !important; }


/* ── 01 · APP CARDS ────────────────────────────────────────────────────────
   Cards self-limit width so they look right regardless of the outer shell
   Agent A wraps them in. */
#watch-section,
#watches-section,
#past-alerts-section {
  max-width: 900px;
  margin: 0 auto 1.75rem;
  background: var(--paper);
  border: 1px solid color-mix(in oklab, var(--ink) 7%, transparent);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.5rem);
  box-shadow:
    0 1px 2px rgba(10, 18, 32, .05),
    0 8px 28px rgba(10, 18, 32, .07),
    0 28px 64px -28px rgba(10, 18, 32, .14);
}

#watch-section h2,
#watches-section h2,
.feature-request-card h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: clamp(1.45rem, 3vw, 1.9rem);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--forest);
  margin: 0 0 1.25rem;
}

/* Uppercase Inter kickers above the two main headings (decorative — the
   `/ ""` form silences screen readers; plain form is the older-browser
   fallback). Remove freely if Agent A's copy direction conflicts. */
#watch-section > h2::before,
#watches-section > h2::before {
  display: block;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ember-deep);
  margin-bottom: .55rem;
}
#watch-section > h2::before  { content: "Tonight's watch"; content: "Tonight's watch" / ""; }
#watches-section > h2::before { content: "While you slept"; content: "While you slept" / ""; }


/* ── 02 · INFO NOTE ────────────────────────────────────────────────────── */
.info-note {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  background: color-mix(in oklab, var(--forest) 6%, var(--paper));
  border: 1px solid color-mix(in oklab, var(--forest) 14%, transparent);
  border-radius: var(--radius-sm);
  padding: .8rem 1rem;
  font-size: .855rem;
  line-height: 1.55;
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}
.info-note strong { color: var(--forest); }
.info-note-icon { flex-shrink: 0; font-size: 1rem; line-height: 1.4; }


/* ── 03 · MODE TOGGLE — segmented control w/ sliding thumb ─────────────── */
.mode-toggle {
  position: relative;
  display: flex;
  padding: 4px;
  margin-bottom: 1.4rem;
  background: color-mix(in oklab, var(--forest) 8%, var(--day-cream));
  border: 1px solid color-mix(in oklab, var(--forest) 10%, transparent);
  border-radius: 999px;
  isolation: isolate;
}
.mode-btn {
  flex: 1 1 0;
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  padding: .72rem 1rem;
  background: transparent;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--t-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.mode-btn:hover:not(.active) { color: var(--forest); }
/* Fallback (no :has support): active button is its own pill */
.mode-btn.active {
  color: var(--forest);
  background: var(--paper);
  box-shadow: 0 2px 8px rgba(10, 18, 32, .12), 0 0 0 1px rgba(22, 36, 29, .05);
}
/* Enhanced: one thumb slides between the two segments */
@supports selector(:has(*)) {
  .mode-btn.active { background: transparent; box-shadow: none; }
  .mode-toggle::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(50% - 4px);
    border-radius: 999px;
    background: var(--paper);
    box-shadow: 0 2px 8px rgba(10, 18, 32, .12), 0 0 0 1px rgba(22, 36, 29, .05);
    transition: transform var(--t-med) var(--ease);
  }
  .mode-toggle:has(#mode-radius.active)::before { transform: translateX(100%); }
}


/* ── 04 · AUTH GATES (watch form gate + watches sign-in prompt) ────────── */
.auth-gate {
  text-align: center;
  padding: 2.2rem 1.5rem;
  background: var(--day-cream);
  border: 1.5px dashed color-mix(in oklab, var(--forest) 28%, transparent);
  border-radius: var(--radius);
}
.auth-gate p {
  margin: 0 0 1.1rem;
  font-size: .95rem;
  color: var(--ink-soft);
}
#auth-gate { margin-bottom: 1.4rem; }


/* ── 05 · FORM PRIMITIVES ──────────────────────────────────────────────── */
.form-group { margin-bottom: 1.15rem; }
.form-group:last-child { margin-bottom: 0; }

/* :not(.buddy-label) — checkbox-row labels (flexible/buddy toggles, SMS
   toggle) are full sentences and must NOT become uppercase kickers */
.form-group > label:not(.buddy-label) {
  display: block;
  margin-bottom: .45rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--forest);
}
.optional {
  font-weight: 500;
  font-size: .72rem;
  letter-spacing: .01em;
  text-transform: none;
  color: var(--ink-soft);
}

/* Side-by-side pairs on desktop (single child stretches full width) */
.form-row {
  display: flex;
  gap: 1rem;
}
.form-row .form-group { flex: 1 1 0; min-width: 0; }

/* Inputs / selects / textareas — scoped to app surfaces only */
:is(#watch-section, #watches-section, .feature-request-card, .modal-box)
:is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea) {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: .7rem .85rem;
  font-family: inherit;
  font-size: 1rem; /* ≥16px keeps iOS from zooming on focus */
  line-height: 1.4;
  color: var(--ink);
  background-color: var(--paper);
  border: 1.5px solid color-mix(in oklab, var(--ink) 16%, transparent);
  border-radius: var(--radius-sm);
  box-shadow: inset 0 1px 2px rgba(10, 18, 32, .03);
  transition:
    border-color var(--t-fast) ease,
    box-shadow var(--t-fast) ease,
    background-color var(--t-fast) ease;
}
:is(#watch-section, #watches-section, .feature-request-card, .modal-box)
:is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea)::placeholder {
  color: color-mix(in oklab, var(--ink-soft) 72%, transparent);
}
:is(#watch-section, #watches-section, .feature-request-card, .modal-box)
:is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea):hover:not(:disabled):not(:focus) {
  border-color: color-mix(in oklab, var(--forest) 38%, transparent);
}
:is(#watch-section, #watches-section, .feature-request-card, .modal-box)
:is(input:not([type="checkbox"]):not([type="hidden"]), select, textarea):focus {
  outline: none;
  border-color: var(--forest);
  box-shadow:
    inset 0 1px 2px rgba(10, 18, 32, .04),
    0 0 0 3px color-mix(in oklab, var(--forest) 15%, transparent);
}
:is(#watch-section, #watches-section, .feature-request-card, .modal-box)
:is(input, select, textarea):disabled {
  opacity: .55;
  cursor: not-allowed;
  background-color: var(--day-cream);
}

/* Selects: custom chevron */
:is(#watch-section, #watches-section, .feature-request-card, .modal-box) select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%234b5d52' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
}

:is(#watch-section, .feature-request-card, .modal-box) textarea {
  resize: vertical;
  min-height: 6.5rem;
}

/* Checkbox rows (buddy sites, flexible dates, offsite, SMS toggle) */
.buddy-label {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  font-size: .875rem;
  line-height: 1.55;
  color: var(--ink);
  cursor: pointer;
}
.buddy-label input[type="checkbox"] {
  flex-shrink: 0;
  width: 1.1rem;
  height: 1.1rem;
  margin: .15rem 0 0;
  accent-color: var(--forest);
  cursor: pointer;
}
.buddy-label em { font-style: italic; color: var(--forest); }

/* Pro-gated toggle rows read as soft cards */
.flexible-toggle .buddy-label,
.buddy-toggle .buddy-label {
  background: var(--day-cream);
  border: 1.5px solid color-mix(in oklab, var(--forest) 11%, transparent);
  border-radius: var(--radius-sm);
  padding: .8rem .95rem;
  transition: border-color var(--t-fast) ease, background-color var(--t-fast) ease;
}
.flexible-toggle .buddy-label:hover,
.buddy-toggle .buddy-label:hover {
  border-color: color-mix(in oklab, var(--forest) 32%, transparent);
}
.flexible-toggle .buddy-label:has(input:checked),
.buddy-toggle .buddy-label:has(input:checked) {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 6%, var(--day-cream));
}

/* PRO pill (radius tab, flexible dates, buddy sites, account beta tag) */
.pro-tag {
  display: inline-block;
  vertical-align: middle;
  padding: .18em .55em .16em;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--ember), var(--ember-deep));
  color: #fff;
  font-size: .6rem;
  font-weight: 800;
  letter-spacing: .09em;
  text-transform: uppercase;
  line-height: 1.3;
  box-shadow: 0 1px 3px rgba(224, 123, 0, .35);
}


/* ── 06 · CAMPGROUND TYPE-AHEAD + PREVIEW ──────────────────────────────── */
.cg-search-wrap { position: relative; }

.cg-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 60;
  max-height: 320px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--paper);
  border: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  animation: app-pop-in var(--t-fast) var(--ease) both;
}
.cg-dropdown:empty { display: none; }

.cg-option {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: .65rem .9rem;
  cursor: pointer;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 6%, transparent);
  transition: background-color var(--t-fast) ease;
}
.cg-option:last-child { border-bottom: none; }
.cg-option:hover,
.cg-option:active { background: color-mix(in oklab, var(--forest) 7%, var(--paper)); }
.cg-option-name {
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink);
}
.cg-option-loc {
  font-size: .78rem;
  color: var(--ink-soft);
}

/* Preview card (photo / location / maps link / description) */
.campground-preview {
  margin-top: .9rem;
  background: var(--day-cream);
  border: 1px solid color-mix(in oklab, var(--forest) 12%, transparent);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  animation: app-pop-in var(--t-med) var(--ease) both;
}
.preview-photo {
  display: block;
  width: 100%;
  max-height: 210px;
  object-fit: cover;
}
.preview-location {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem .9rem;
  padding: .85rem 1rem 0;
}
.preview-location-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--forest);
}
.preview-maps-link {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ember-deep);
  text-decoration: none;
  transition: color var(--t-fast) ease;
}
.preview-maps-link:hover { color: var(--ember); text-decoration: underline; }
.preview-desc {
  padding: .55rem 1rem 1rem;
  font-size: .84rem;
  line-height: 1.55;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.preview-loading {
  display: block;
  padding: .9rem 1rem;
  font-size: .85rem;
  color: var(--ink-soft);
}


/* ── 07 · BUTTONS (scoped) + SPINNER ───────────────────────────────────────
   base.css owns the global .btn family; these rules refine buttons ONLY
   inside app surfaces so this file cannot fight the landing. */
:is(#watch-section, #watches-section, #past-alerts-section, .feature-request-card,
    .modal-box, .auth-gate, .verify-banner) :is(.btn, .btn-share) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .78rem 1.4rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--t-fast) ease,
    border-color var(--t-fast) ease,
    color var(--t-fast) ease,
    box-shadow var(--t-fast) ease,
    transform var(--t-fast) ease;
}
:is(#watch-section, #watches-section, #past-alerts-section, .feature-request-card,
    .modal-box, .auth-gate, .verify-banner) :is(.btn, .btn-share):active:not(:disabled) {
  transform: translateY(1px);
}
:is(#watch-section, #watches-section, #past-alerts-section, .feature-request-card,
    .modal-box, .auth-gate, .verify-banner) :is(.btn, .btn-share):disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Neutral .btn (e.g. #account-manage-btn) */
:is(#watch-section, #watches-section, #past-alerts-section, .feature-request-card,
    .modal-box, .auth-gate, .verify-banner) .btn {
  background: var(--paper);
  border-color: color-mix(in oklab, var(--ink) 18%, transparent);
  color: var(--forest);
}
:is(#watch-section, #watches-section, #past-alerts-section, .feature-request-card,
    .modal-box, .auth-gate, .verify-banner) .btn:hover:not(:disabled) {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 5%, var(--paper));
}

/* Primary — deep forest, the calm confident CTA */
:is(#watch-section, #watches-section, .feature-request-card, .modal-box, .auth-gate) .btn-primary {
  background: linear-gradient(180deg, color-mix(in oklab, var(--forest) 88%, #ffffff), var(--forest));
  border-color: var(--forest);
  color: var(--starlight);
  box-shadow: 0 2px 10px color-mix(in oklab, var(--forest) 35%, transparent);
}
:is(#watch-section, #watches-section, .feature-request-card, .modal-box, .auth-gate) .btn-primary:hover:not(:disabled) {
  background: linear-gradient(180deg, color-mix(in oklab, var(--forest) 72%, #ffffff), var(--forest));
  box-shadow: 0 4px 16px color-mix(in oklab, var(--forest) 42%, transparent);
  transform: translateY(-1px);
}

/* Ember — the upgrade/monetization CTA (upgrade + account modals) */
.modal-box .btn-amber,
#account-upgrade-btn {
  background: linear-gradient(180deg, #ffb14d, var(--ember));
  border-color: var(--ember-deep);
  color: #341c00;
  box-shadow: 0 2px 12px color-mix(in oklab, var(--ember) 45%, transparent);
}
.modal-box .btn-amber:hover:not(:disabled),
#account-upgrade-btn:hover:not(:disabled) {
  background: linear-gradient(180deg, #ffc06b, #ffa63f);
  box-shadow: 0 4px 18px color-mix(in oklab, var(--ember) 55%, transparent);
  transform: translateY(-1px);
}

/* Secondary — forest ghost (Check Now, Find Booking) */
:is(#watch-section, #watches-section, #past-alerts-section, .modal-box) .btn-secondary {
  background: transparent;
  border-color: color-mix(in oklab, var(--forest) 40%, transparent);
  color: var(--forest);
}
:is(#watch-section, #watches-section, #past-alerts-section, .modal-box) .btn-secondary:hover:not(:disabled) {
  border-color: var(--forest);
  background: color-mix(in oklab, var(--forest) 7%, var(--paper));
}

/* Success — Book Now */
:is(#watches-section, #past-alerts-section, .modal-box) .btn-success {
  background: linear-gradient(180deg, color-mix(in oklab, var(--success) 85%, #ffffff), var(--success));
  border-color: color-mix(in oklab, var(--success) 80%, var(--pine));
  color: #fff;
  box-shadow: 0 2px 10px color-mix(in oklab, var(--success) 35%, transparent);
}
:is(#watches-section, #past-alerts-section, .modal-box) .btn-success:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* Danger — quiet ghost until hovered (Cancel / Dismiss / Delete) */
:is(#watch-section, #watches-section, #past-alerts-section, .modal-box) .btn-danger {
  background: transparent;
  border-color: color-mix(in oklab, var(--danger) 38%, transparent);
  color: var(--danger);
}
:is(#watch-section, #watches-section, #past-alerts-section, .modal-box) .btn-danger:hover:not(:disabled) {
  background: var(--danger-bg);
  border-color: var(--danger);
}

/* Share — neutral chip button (generated in watch rows, no .btn class) */
.btn-share {
  background: transparent;
  border-color: color-mix(in oklab, var(--ink) 20%, transparent);
  color: var(--ink-soft);
}
.btn-share:hover:not(:disabled) {
  border-color: var(--forest);
  color: var(--forest);
  background: color-mix(in oklab, var(--forest) 5%, var(--paper));
}

/* Small buttons (row actions, toolbar) */
:is(#watch-section, #watches-section, #past-alerts-section, .modal-box) .btn-sm,
#watches-table .btn-share,
#watches-section .btn-share {
  padding: .42rem .75rem;
  font-size: .78rem;
  font-weight: 600;
  border-radius: 8px;
}

/* Full-width submit CTAs in the watch forms */
#submit-btn,
#radius-submit-btn {
  width: 100%;
  margin-top: .35rem;
  padding: .95rem 1.5rem;
  font-size: 1rem;
}

/* CSS spinner: the span carries an ⏳ emoji — hide it (font-size:0) and
   draw a ring. Reduced-motion restores the emoji (see §17). */
.btn-spinner {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
  line-height: 0;
}
.btn-spinner::after {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid color-mix(in oklab, currentColor 30%, transparent);
  border-top-color: currentColor;
  animation: app-spin .7s linear infinite;
}
@keyframes app-spin { to { transform: rotate(360deg); } }


/* ── 08 · FORM MESSAGES ───────────────────────────────────────────────────
   JS sets BOTH shorthand (.error/.success) and longhand
   (.form-message-error/-success) — all four are covered. */
.form-message {
  margin: .9rem 0;
  padding: .7rem .95rem;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--ink-soft);
  background: var(--day-cream);
}
.form-message.error,
.form-message.form-message-error {
  background: var(--danger-bg);
  border-color: color-mix(in oklab, var(--danger) 28%, transparent);
  color: var(--danger);
}
.form-message.success,
.form-message.form-message-success {
  background: var(--success-bg);
  border-color: color-mix(in oklab, var(--success) 28%, transparent);
  color: color-mix(in oklab, var(--success) 70%, var(--pine));
}


/* ── 09 · MY WATCHES ───────────────────────────────────────────────────── */
.watches-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1rem;
  min-height: 1.5rem;
}
.watches-status {
  font-size: .85rem;
  color: var(--ink-soft);
}
.watches-status:empty { display: none; }
.toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem 1rem;
  margin-left: auto;
}
.offsite-toggle {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  font-size: .82rem;
  color: var(--ink-soft);
  cursor: pointer;
  user-select: none;
}
.offsite-toggle input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  accent-color: var(--forest);
  cursor: pointer;
}

/* Table shell */
#watches-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid color-mix(in oklab, var(--ink) 9%, transparent);
  border-radius: 14px;
  background: var(--paper);
}
#watches-table,
#past-alerts-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .9rem;
}
#watches-table { min-width: 700px; }      /* scrolls inside wrap at mid widths */
#past-alerts-table { min-width: 560px; }

/* Dark forest header band */
#watches-table thead th,
#past-alerts-table thead th {
  background: linear-gradient(180deg, var(--forest), color-mix(in oklab, var(--forest) 72%, var(--pine)));
  color: color-mix(in oklab, var(--starlight) 88%, var(--day-cream));
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-align: left;
  padding: .8rem .9rem;
  white-space: nowrap;
}

#watches-table td,
#past-alerts-table td {
  padding: .85rem .9rem;
  vertical-align: middle;
  border-bottom: 1px solid color-mix(in oklab, var(--ink) 7%, transparent);
  color: var(--ink);
  overflow-wrap: anywhere;
}
#watches-table tbody tr:last-child td,
#past-alerts-table tbody tr:last-child td { border-bottom: none; }

/* Comfortable zebra + hover (row backgrounds transition; found rows carry an
   inline #f0fdf4 background from JS, which reads as the success wash) */
#watches-table tbody tr,
#past-alerts-table tbody tr {
  background: var(--paper);
  transition: background-color var(--t-fast) ease, box-shadow var(--t-fast) ease;
}
#watches-table tbody tr:nth-child(even),
#past-alerts-table tbody tr:nth-child(even) {
  background: color-mix(in oklab, var(--day-cream) 55%, var(--paper));
}
@media (hover: hover) and (pointer: fine) {
  #watches-table tbody tr:hover,
  #past-alerts-table tbody tr:hover {
    background: color-mix(in oklab, var(--forest) 5%, var(--paper));
    box-shadow: inset 3px 0 0 var(--ember);
  }
}
/* Found rows: harmonize with the inline #f0fdf4 wash */
#watches-table tbody tr:has(.badge-found) {
  box-shadow: inset 3px 0 0 var(--success);
}

#watches-table a,
#past-alerts-table a:not(.btn) {
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--t-fast) ease;
}
#watches-table a:hover,
#past-alerts-table a:not(.btn):hover {
  color: var(--ember-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Status badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .4em;
  padding: .32em .72em;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
  line-height: 1.4;
}
.badge-watching {
  background: var(--warn-bg);
  border-color: color-mix(in oklab, var(--warn) 26%, transparent);
  color: var(--warn);
}
.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warn);
  animation: app-pulse 1.7s var(--ease) infinite;
}
@keyframes app-pulse {
  0%, 100% { transform: scale(1);   opacity: 1;  }
  50%      { transform: scale(.55); opacity: .45; }
}
.badge-found {
  background: var(--success-bg);
  border-color: color-mix(in oklab, var(--success) 30%, transparent);
  color: color-mix(in oklab, var(--success) 70%, var(--pine));
}
.badge-cancelled {
  background: color-mix(in oklab, var(--ink) 6%, var(--paper));
  border-color: color-mix(in oklab, var(--ink) 12%, transparent);
  color: var(--ink-soft);
}

/* Row chips (generated) */
.badge-buddy {
  display: inline-block;
  margin-left: .3em;
  padding: .12em .5em;
  border-radius: 6px;
  background: color-mix(in oklab, var(--ember) 14%, var(--paper));
  border: 1px solid color-mix(in oklab, var(--ember-deep) 30%, transparent);
  color: var(--ember-deep);
  font-size: .68rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: help;
}
.flex-label {
  display: inline-block;
  margin-left: .3em;
  padding: .12em .45em;
  border-radius: 6px;
  background: color-mix(in oklab, var(--forest) 9%, var(--paper));
  color: var(--forest);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

/* Actions column */
.actions-cell {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .4rem;
}
.actions-cell:empty { padding: .85rem .9rem; }

/* Empty state */
.no-watches {
  text-align: center;
  padding: 2.4rem 1.25rem;
  background: var(--day-cream);
  border: 1.5px dashed color-mix(in oklab, var(--forest) 24%, transparent);
  border-radius: var(--radius);
  color: var(--ink-soft);
  font-size: .95rem;
}
.no-watches::before {
  content: "⛺";
  content: "⛺" / "";
  display: block;
  font-size: 1.8rem;
  margin-bottom: .5rem;
}


/* ── 10 · PAST ALERTS (collapsible) ────────────────────────────────────── */
#past-alerts-section { padding: .9rem 1.25rem; }

.past-alerts-toggle {
  display: flex;
  align-items: center;
  gap: .6rem;
  width: 100%;
  padding: .65rem .5rem;
  background: none;
  border: 0;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest);
  cursor: pointer;
  text-align: left;
  transition: background-color var(--t-fast) ease;
}
.past-alerts-toggle:hover { background: color-mix(in oklab, var(--forest) 5%, var(--paper)); }

.past-alerts-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.55em;
  padding: .1em .5em;
  border-radius: 999px;
  background: color-mix(in oklab, var(--forest) 10%, var(--paper));
  color: var(--forest);
  font-size: .74rem;
  font-weight: 700;
}
.past-alerts-count:empty { display: none; }

.past-alerts-toggle .chevron {
  margin-left: auto;
  font-size: .8rem;
  color: var(--ink-soft);
  transition: transform var(--t-med) var(--ease);
}
.past-alerts-toggle.open .chevron { transform: rotate(180deg); }

#past-alerts-body {
  margin-top: .6rem;
  padding: 0 .25rem .5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  animation: app-pop-in var(--t-med) var(--ease) both;
}
#past-alerts-body td { font-size: .85rem; color: var(--ink-soft); }
#past-alerts-body td:first-child { color: var(--ink); }


/* ── 11 · VERIFY BANNER ────────────────────────────────────────────────── */
.verify-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .6rem 1rem;
  max-width: min(900px, calc(100vw - 2rem));
  margin: 1rem auto 1.5rem;
  padding: .8rem 1.1rem;
  background: var(--warn-bg);
  border: 1.5px solid color-mix(in oklab, var(--warn) 30%, transparent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  font-size: .875rem;
  line-height: 1.5;
  color: var(--warn);
  animation: app-slide-down var(--t-med) var(--ease) both;
}
.verify-resend {
  flex-shrink: 0;
  padding: .45rem .95rem;
  background: var(--warn);
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: .78rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: background-color var(--t-fast) ease, transform var(--t-fast) ease;
}
.verify-resend:hover { background: color-mix(in oklab, var(--warn) 82%, black); transform: translateY(-1px); }
.verify-resend:active { transform: translateY(0); }


/* ── 12 · PRO MEMBER BAR + PRICING-COMPACT ─────────────────────────────── */
#pro-member-bar {
  width: fit-content;
  max-width: calc(100vw - 2rem);
  margin: 0 auto;
  background: var(--success-bg);
  border: 1px solid color-mix(in oklab, var(--success) 26%, transparent);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
/* Landing.css owns the pricing scene; this only shrinks it for Pro users. */
#pricing.pricing-compact { padding-top: 2rem; padding-bottom: 2rem; min-height: 0; }


/* ── 13 · FEATURE REQUEST ──────────────────────────────────────────────── */
.feature-request-section { padding: 1rem 1rem 3rem; }
.feature-request-card {
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid color-mix(in oklab, var(--ink) 7%, transparent);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 4vw, 2.25rem);
  box-shadow:
    0 1px 2px rgba(10, 18, 32, .05),
    0 8px 28px rgba(10, 18, 32, .07),
    0 28px 64px -28px rgba(10, 18, 32, .14);
}
.feature-request-card h2 { margin-bottom: .35rem; }
.feature-request-subtitle {
  margin: 0 0 1.4rem;
  font-size: .92rem;
  color: var(--ink-soft);
}
#fr-submit { min-width: 11rem; }


/* ── 14 · MODALS ───────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(10, 18, 32, .62);   /* solid fallback */
  animation: app-fade-in var(--t-fast) ease both;
}
@supports ((backdrop-filter: blur(10px)) or (-webkit-backdrop-filter: blur(10px))) {
  .modal-overlay {
    background: rgba(10, 18, 32, .45);
    -webkit-backdrop-filter: blur(10px) saturate(1.15);
    backdrop-filter: blur(10px) saturate(1.15);
  }
}

.modal-box {
  position: relative;
  width: min(460px, calc(100vw - 2rem));
  max-height: 90vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  background: var(--paper);
  border: 1px solid color-mix(in oklab, var(--ink) 6%, transparent);
  border-radius: var(--radius);
  padding: 2rem 1.75rem 1.75rem;
  box-shadow: var(--shadow-lg);
  animation: app-modal-in .5s var(--ease-spring) both;
}
.modal-box h2 {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-optical-sizing: auto;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--forest);
}

.modal-close {
  position: absolute;
  top: .8rem;
  right: .8rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  background: color-mix(in oklab, var(--ink) 5%, var(--paper));
  border: 0;
  border-radius: 50%;
  font-size: .85rem;
  line-height: 1;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background-color var(--t-fast) ease, color var(--t-fast) ease, transform var(--t-fast) ease;
}
.modal-close:hover {
  background: color-mix(in oklab, var(--ink) 10%, var(--paper));
  color: var(--ink);
  transform: rotate(90deg);
}

/* Auth tabs with animated underline */
.modal-tabs {
  display: flex;
  margin: 0 1.9rem 1.5rem 0;   /* right gap clears the close button */
  border-bottom: 1.5px solid color-mix(in oklab, var(--ink) 10%, transparent);
}
.modal-tab {
  position: relative;
  flex: 1 1 0;
  padding: .75rem .5rem .85rem;
  background: none;
  border: 0;
  font-family: inherit;
  font-size: .92rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color var(--t-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.modal-tab:hover:not(.active) { color: var(--forest); }
.modal-tab::after {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  bottom: -1.5px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ember);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform var(--t-med) var(--ease);
}
.modal-tab.active { color: var(--forest); }
.modal-tab.active::after { transform: scaleX(1); }

/* Auth form details */
.auth-form .form-group { margin-bottom: 1rem; }
.auth-switch {
  margin: .9rem 0 0;
  text-align: center;
  font-size: .84rem;
  color: var(--ink-soft);
}
.auth-switch a {
  color: var(--ember-deep);
  font-weight: 600;
  text-decoration: none;
}
.auth-switch a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* Account modal: separators + the inline-styled ghost test-SMS button */
.modal-box hr { opacity: .9; }
#test-sms-btn { font-weight: 700; }
#test-sms-btn:hover:not(:disabled) { background: color-mix(in oklab, var(--forest) 6%, var(--paper)) !important; }

/* Upgrade modal feature list */
#upgrade-modal ul li { padding: .05rem 0; }


/* ── 15 · FOCUS-VISIBLE (2px ember, offset 2) ──────────────────────────── */
:is(#watch-section, #watches-section, #past-alerts-section, .feature-request-card,
    .modal-overlay, .verify-banner, .auth-gate, #pro-member-bar)
:is(a, button, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--ember);
  outline-offset: 2px;
}


/* ── 16 · RESPONSIVE ───────────────────────────────────────────────────── */
@media (max-width: 980px) {
  #watch-section,
  #watches-section,
  #past-alerts-section { border-radius: var(--radius); }
}

@media (max-width: 640px) {
  /* Stacked date fields */
  .form-row { flex-direction: column; gap: 0; }

  /* Toolbar stacks; keep touch targets big */
  .watches-toolbar { flex-direction: column; align-items: stretch; }
  .toolbar-actions { margin-left: 0; justify-content: space-between; }
  #cancel-all-btn { min-height: 44px; }

  /* ── Watches table → stacked cards ──────────────────────────────────────
     JS always emits 7 tds in header order (Campground, Distance, Check-In,
     Check-Out, Nights, Status, Actions) so ::before labels are hardcoded by
     position. If loadWatches() column order ever changes, update these. */
  #watches-table-wrap { border: 0; border-radius: 0; overflow: visible; background: transparent; }
  #watches-table { min-width: 0; display: block; }
  #watches-table thead { display: none; }
  #watches-table tbody { display: block; }
  #watches-table tbody tr {
    display: block;
    margin-bottom: .9rem;
    padding: 1rem 1rem .85rem;
    background: var(--paper);
    border: 1px solid color-mix(in oklab, var(--ink) 10%, transparent);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }
  #watches-table tbody tr:nth-child(even) { background: var(--paper); } /* no zebra in card mode */
  #watches-table tbody tr:last-child { margin-bottom: 0; }
  #watches-table tbody tr:has(.badge-found) {
    border-color: color-mix(in oklab, var(--success) 40%, transparent);
    box-shadow: inset 0 3px 0 var(--success), var(--shadow-sm);
  }
  #watches-table tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .38rem 0;
    border-bottom: 0;
    font-size: .88rem;
  }
  #watches-table tbody td::before {
    flex-shrink: 0;
    font-size: .66rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  #watches-table tbody td:nth-child(2)::before { content: "Distance";  content: "Distance" / ""; }
  #watches-table tbody td:nth-child(3)::before { content: "Check-In";  content: "Check-In" / ""; }
  #watches-table tbody td:nth-child(4)::before { content: "Check-Out"; content: "Check-Out" / ""; }
  #watches-table tbody td:nth-child(5)::before { content: "Nights";    content: "Nights" / ""; }
  #watches-table tbody td:nth-child(6)::before { content: "Status";    content: "Status" / ""; }
  /* Campground cell = card title (no label) */
  #watches-table tbody td:first-child {
    display: block;
    padding: 0 0 .5rem;
    margin-bottom: .35rem;
    border-bottom: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
    font-size: 1.02rem;
    line-height: 1.4;
  }
  /* Actions = finger-friendly button row (no label) */
  #watches-table tbody td:last-child {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: .5rem;
    padding: .7rem 0 0;
    margin-top: .45rem;
    border-top: 1px dashed color-mix(in oklab, var(--ink) 12%, transparent);
  }
  #watches-table tbody td:last-child::before { content: none; }
  .actions-cell :is(.btn, .btn-share, a.btn) {
    flex: 1 1 calc(50% - .5rem);
    min-height: 44px;
    font-size: .85rem;
  }

  /* ── Past-alerts table → same stacked-card treatment (5 columns) ─────── */
  #past-alerts-table { min-width: 0; display: block; }
  #past-alerts-table thead { display: none; }
  #past-alerts-table tbody { display: block; }
  #past-alerts-table tbody tr {
    display: block;
    margin-bottom: .75rem;
    padding: .85rem .9rem;
    background: color-mix(in oklab, var(--day-cream) 55%, var(--paper));
    border: 1px solid color-mix(in oklab, var(--ink) 8%, transparent);
    border-radius: var(--radius-sm);
  }
  #past-alerts-table tbody tr:last-child { margin-bottom: 0; }
  #past-alerts-table tbody td {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    padding: .3rem 0;
    border-bottom: 0;
  }
  #past-alerts-table tbody td::before {
    flex-shrink: 0;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .11em;
    text-transform: uppercase;
    color: var(--ink-soft);
  }
  #past-alerts-table tbody td:nth-child(2)::before { content: "Check-In";  content: "Check-In" / ""; }
  #past-alerts-table tbody td:nth-child(3)::before { content: "Check-Out"; content: "Check-Out" / ""; }
  #past-alerts-table tbody td:nth-child(4)::before { content: "Result";    content: "Result" / ""; }
  #past-alerts-table tbody td:nth-child(5)::before { content: "Date";      content: "Date" / ""; }
  #past-alerts-table tbody td:first-child {
    display: block;
    padding-bottom: .4rem;
    font-size: .95rem;
  }

  /* Modals hug small screens */
  .modal-box { padding: 1.75rem 1.25rem 1.25rem; }

  /* Verify banner stacks */
  .verify-banner { flex-direction: column; text-align: center; }
}

@media (max-width: 400px) {
  #watch-section,
  #watches-section,
  #past-alerts-section,
  .feature-request-card { padding: 1.25rem 1rem; }

  .mode-btn { font-size: .8rem; padding: .62rem .4rem; gap: .3rem; }
  .actions-cell :is(.btn, .btn-share, a.btn) { flex-basis: 100%; }
  .modal-tabs { margin-right: 1.5rem; }
  .modal-tab { font-size: .85rem; }
}


/* ── 17 · REDUCED MOTION ───────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-box,
  .cg-dropdown,
  .campground-preview,
  .verify-banner,
  #past-alerts-body { animation: none !important; }

  .pulse-dot { animation: none !important; }

  .mode-toggle::before,
  .modal-tab::after,
  .past-alerts-toggle .chevron,
  .modal-close { transition: none !important; }

  .modal-close:hover { transform: none; }

  :is(#watch-section, #watches-section, #past-alerts-section, .feature-request-card,
      .modal-box, .auth-gate, .verify-banner) :is(.btn, .btn-share) {
    transition: none !important;
    transform: none !important;
  }
  .verify-resend { transition: none !important; transform: none !important; }

  /* Spinner ring would sit frozen — show the original ⏳ glyph instead */
  .btn-spinner { font-size: inherit; line-height: 1; }
  .btn-spinner::after { display: none; }
}


/* ── SHARED KEYFRAMES ──────────────────────────────────────────────────── */
@keyframes app-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes app-modal-in {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
@keyframes app-pop-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}
@keyframes app-slide-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: none; }
}
