/*
 * Core styles shared across the app. Propshaft serves every file in app/assets/stylesheets,
 * and `stylesheet_link_tag :app` includes them in alphabetical order, so feature files
 * (e.g. forecasts.css) load after this one and can build on it.
 */

:root {
  color-scheme: light;
  --color-accent: #2563eb;
  --color-accent-strong: #1d4ed8;
  --color-on-accent: #fff;
  --color-wash: #eff6ff;
  --color-border: #cbd5e1;
  --color-line: #e5e7eb;
  --color-ink: #1f2937;
  --color-muted: #6b7280;
  /* The theme boot script copies this into the theme-color meta before CSS loads. */
  --color-page: #f4f7fb;
  --color-surface: #fff;
  --color-surface-hover: #f8fafc;
  --color-prose: #374151;
  --color-hairline: #e2e8f0;
  --hour-day: transparent;
  --hour-night: #f3f4f6;
  --hour-ink: var(--color-ink);
  --map-land-muted: color-mix(in srgb, var(--map-land) 72%, var(--map-label));
  --map-land-edge: color-mix(in srgb, var(--map-land) 82%, var(--map-label));
  --map-land-muted-edge: color-mix(in srgb, var(--map-land-muted) 70%, var(--map-label));
  --focus-ring: 2px solid var(--color-accent);

  /* Phone layout is 40rem. The zodiac grid tightens again at 23rem, forecast
     periods go to two columns at 32rem, and the wide layout is 56rem.
     The map layer list tightens below 48rem of height. A map asks its own
     width with @container map. The photo card asks the scrim, which is an
     unnamed container. */
  --page-gutter: 1rem;
  --tile-pad: 1rem;
  --app-bar-clearance: 4.5rem;

  /* Photos and maps sit under these, so they look the same in both themes. */
  --overlay-rgb: 15 23 42;
  --color-tooltip: #111;
  --color-on-tooltip: #fff;
  --glass: rgb(255 255 255 / 55%);
  --glass-strong: rgb(255 255 255 / 82%);
  --glass-ink: #111;
  /* Frost: see-through, blurred controls over a moving picture (the map
     buttons, the map panel, the phone sort tabs on /pictures). The same
     colors as the shared button variants, thinned. --frost-*-busy is how
     solid they go when the blur is off while the map moves or plays. */
  --frost-blur: blur(10px) saturate(1.3);
  --frost-surface: color-mix(in srgb, var(--color-surface) 26%, transparent);
  --frost-surface-busy: color-mix(in srgb, var(--color-surface) 70%, transparent);
  --frost-surface-hover: color-mix(in srgb, var(--color-surface-hover) 48%, transparent);
  --frost-border: color-mix(in srgb, var(--color-border) 42%, transparent);
  --frost-accent: color-mix(in srgb, var(--color-accent) 50%, transparent);
  --frost-accent-busy: color-mix(in srgb, var(--color-accent) 80%, transparent);
  --frost-accent-border: color-mix(in srgb, var(--color-accent) 62%, transparent);
  --frost-accent-hover: color-mix(in srgb, var(--color-accent-strong) 62%, transparent);
  --frost-panel: color-mix(in srgb, var(--color-surface) 85%, transparent);
  --frost-panel-border: color-mix(in srgb, var(--color-border) 65%, transparent);
  /* Experiment buttons: magenta, darker while running. */
  --color-experiment: #d946ef;
  --color-experiment-hover: #c026d3;
  --color-experiment-border: #a21caf;
  --color-experiment-running: #86198f;
  --color-experiment-running-border: #701a75;
  --map-sheet: rgb(255 255 255 / 88%);
  --map-badge: #0f172a;
  --map-badge-ink: #fff;
  --map-panel: var(--color-surface);
  --map-panel-border: var(--color-line);
  /* Storm-report pin face: white face, type-colored tip and rim. Amount
     badge stays dark-on-white in both themes. Hail and ice use their own
     strokes so pale stones still read on white. */
  --map-report-face: #ffffff;
  --map-report-badge: #0f172a;
  --map-report-badge-ink: #fff;
  --map-report-count: #0f172a;
  --map-report-icon: var(--report-color);
  --map-report-hail-fill: #7dd3fc;
  --map-report-hail-stroke: #0284c7;
  --map-report-hail-streak: #64748b;
  --map-report-ice-cloud: #7e22ce;
  --map-report-ice-rain: #1e40af;
  --map-report-ice-ice: #0891b2;
  --map-report-rain-stroke: #1d6fd8;
  --map-report-rain-shine: #e8f4ff;
  --photo-fresh: #16a34a;
  --hover-wash: rgb(15 23 42 / 6%);
  --rule-soft: color-mix(in srgb, var(--color-border) 45%, var(--color-hairline));

  /* Notices, destructive buttons, and alert pills. Dark mode overrides these. */
  --notice-error-bg: #fef2f2;
  --notice-error-ink: #991b1b;
  --notice-error-border: #fecaca;
  --notice-success-bg: #ecfdf5;
  --notice-success-ink: #065f46;
  --notice-success-border: #a7f3d0;
  --notice-caution-bg: #fffbeb;
  --notice-caution-ink: #92400e;
  --notice-caution-border: #fde68a;
  --button-danger-bg: #fef2f2;
  --button-danger-ink: #991b1b;
  --button-danger-border: #fca5a5;
  --button-danger-hover-bg: #fee2e2;
  --button-danger-hover-ink: #7f1d1d;
  --alert-pill-bg: #f1f5f9;
  --alert-pill-ink: var(--color-ink);
  --alert-pill-active-bg: #fee2e2;
  --alert-pill-active-ink: #991b1b;
  --alert-pill-upcoming-bg: #fef9c3;
  --alert-pill-upcoming-ink: #854d0e;
  --review-flag: #b91c1c;

  /* Light blue at 32° holds through 32.5°, where yellow starts, so a 32°
     bar stays entirely blue. Colder readings darken through blue and
     purple to near-black at -20°. Warmer readings run amber, orange,
     and dark red at 105°. Pressure still uses blue, gray, and orange. */
  --scale-coldest: #140818;
  --scale-purple: #5b21b6;
  --scale-low: #2563eb;
  --scale-frost: #93c5fd;
  --scale-mid: #94a3b8;
  --scale-yellow: #fcd941;
  --scale-amber: #f59e0b;
  --scale-high: #d97706;
  --scale-hot: #7f1d1d;

  /* EPA AQI bands. Official colors for the air-quality chip and map later. */
  --aqi-good: #00e400;
  --aqi-moderate: #ffff00;
  --aqi-usg: #ff7e00;
  --aqi-unhealthy: #ff0000;
  --aqi-very-unhealthy: #8f3f97;
  --aqi-hazardous: #7e0023;
  /* Solid EPA bands on the 0–500 index: 50, 100, 150, 200, 300, 500. */
  --aqi-scale: linear-gradient(
    to right,
    var(--aqi-good) 0 10%,
    var(--aqi-moderate) 10% 20%,
    var(--aqi-usg) 20% 30%,
    var(--aqi-unhealthy) 30% 40%,
    var(--aqi-very-unhealthy) 40% 60%,
    var(--aqi-hazardous) 60% 100%
  );
  --temp-scale: linear-gradient(
    to right,
    var(--scale-coldest) 0%,
    var(--scale-purple) 16%,
    var(--scale-low) 28%,
    var(--scale-frost) 41.6%,
    var(--scale-frost) 42%,
    var(--scale-yellow) 42%,
    var(--scale-yellow) 62.4%,
    var(--scale-amber) 76.8%,
    var(--scale-high) 88%,
    var(--scale-hot) 100%
  );
}

[data-theme="dark"] {
  color-scheme: dark;
  --color-accent: #3b82f6;
  --color-accent-strong: #93c5fd;
  --color-on-accent: #f8fafc;
  --color-wash: #1e3a5f;
  --color-border: #475569;
  --color-line: #334155;
  --color-ink: #e5e7eb;
  --color-muted: #94a3b8;
  --color-page: #0b1220;
  --color-surface: #152033;
  --color-surface-hover: #1c2a42;
  --color-prose: #f3f4f6;
  --color-hairline: #94a3b8;
  --hour-day: #8e99a8;
  --hour-night: var(--color-page); /* the darkest the site goes; never pure black */
  --hour-ink: #0b1220;
  --map-sheet: rgb(0 0 0 / 72%);
  --map-badge: #f8fafc;
  --map-badge-ink: #0f172a;
  --map-panel: #000;
  --map-panel-border: var(--color-border);
  /* Same white pin face and type-colored rim as light mode. */
  --map-report-face: #ffffff;
  --map-report-badge: #0f172a;
  --map-report-badge-ink: #fff;
  --map-report-count: #0f172a;
  --map-report-icon: var(--report-color);
  --map-report-hail-fill: #7dd3fc;
  --map-report-hail-stroke: #0284c7;
  --map-report-hail-streak: #64748b;
  --map-report-ice-cloud: #7e22ce;
  --map-report-ice-rain: #1e40af;
  --map-report-ice-ice: #0891b2;
  --map-report-rain-stroke: #1d6fd8;
  --map-report-rain-shine: #e8f4ff;
  --hover-wash: rgb(248 250 252 / 8%);
  --rule-soft: color-mix(in srgb, var(--color-hairline) 55%, var(--color-ink));
  --notice-error-bg: #3f1a1a;
  --notice-error-ink: #fecaca;
  --notice-error-border: #7f1d1d;
  --notice-success-bg: #052e24;
  --notice-success-ink: #6ee7b7;
  --notice-success-border: #065f46;
  --notice-caution-bg: #3b2a0a;
  --notice-caution-ink: #fde68a;
  --notice-caution-border: #92400e;
  --button-danger-bg: #3f1a1a;
  --button-danger-ink: #fecaca;
  --button-danger-border: #7f1d1d;
  --button-danger-hover-bg: #5b2121;
  --button-danger-hover-ink: #fecaca;
  --alert-pill-bg: #1e293b;
  --alert-pill-ink: var(--color-ink);
  --alert-pill-active-bg: #3f1a1a;
  --alert-pill-active-ink: #fecaca;
  --alert-pill-upcoming-bg: #3b2a0a;
  --alert-pill-upcoming-ink: #fde68a;
  --review-flag: #fca5a5;
}

.scale-sample {
  background-image: var(--temp-scale);
  background-repeat: no-repeat;
  background-size: 401em 100%;
  background-position: calc(var(--temp) * -400em) 0;
}

.scale-pressure {
  max-width: 16rem;
}

.scale-pressure-sample {
  width: 8.5rem;
}

.scale-pressure-sample .forecast-pressure-ends {
  justify-content: center;
}

.scale-pressure .forecast-pressure-track {
  width: 100%;
}

.scale-temperature {
  max-width: 24rem;
}

.scale-temperature-ramp {
  display: block;
  height: 0.75rem;
  border-radius: 999px;
  background: var(--temp-scale);
}

.scale-ticks {
  display: block;
  position: relative;
  height: 1rem;
  margin-top: 0.2rem;
  font-size: 0.625rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--color-muted);
}

.scale-ticks span {
  white-space: nowrap;
}

.scale-ticks span:first-child {
  position: absolute;
  left: 0;
}

.scale-ticks span:last-child {
  position: absolute;
  right: 0;
}

.scale-ticks .is-freeze {
  position: absolute;
  transform: translateX(-50%);
}

.scale-aqi {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.scale-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.scale-swatch {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-ink);
}

.scale-swatch-bar {
  display: block;
  width: 1.15rem;
  height: 2.5rem;
  border-radius: 0.3rem;
}

/* Fronts specimen: each mark on a patch of map land. The letters keep their
   map markup, so Leaflet's absolute marker position is undone here. */
.admin-pressure-land {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 5.5rem;
  height: 3.25rem;
  padding: 0 0.35rem;
  border-radius: 0.3rem;
  background: var(--map-land);
}

.admin-pressure-land .leaflet-marker-icon.map-pressure-mark {
  position: static;
  cursor: default;
}

.report-icon {
  display: inline-flex;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--report-color, currentColor);
}

.report-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.report-icon.is-stale {
  opacity: 0.45;
}

.report-icon.is-peak {
  width: 1.75rem;
  height: 1.75rem;
}

.admin-lightning-bolt {
  width: 2rem;
  height: 2rem;
  overflow: visible;
}

.admin-lightning-bolt polygon {
  fill: var(--bolt);
  stroke: rgb(17 24 39 / 0.9);
  stroke-width: 1.75;
  stroke-linejoin: round;
}

.admin-lightning-bolt.is-older {
  opacity: 0.65;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--color-page);
  color: var(--color-ink);
  line-height: 1.5;
}

/* Flex items default to the width of their content. The forecast map's
   controls are wider than a phone, and that was stretching the whole page. */
body > * {
  min-width: 0;
}

a {
  color: var(--color-accent-strong);
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="file"],
textarea {
  box-sizing: border-box;
  padding: 0.75rem 0.875rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 1rem;
  background: var(--color-surface);
  color: var(--color-ink);
}

textarea {
  display: block;
  width: 100%;
  min-height: 9rem;
  resize: vertical;
  font: inherit;
  line-height: 1.5;
}

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.notice {
  margin-top: 1.5rem;
  padding: 0.875rem 1rem;
  border-radius: 0.5rem;
}

.notice a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.notice-error {
  background: var(--notice-error-bg);
  color: var(--notice-error-ink);
  border: 1px solid var(--notice-error-border);
}

.notice-success {
  background: var(--notice-success-bg);
  color: var(--notice-success-ink);
  border: 1px solid var(--notice-success-border);
}

.notice-caution {
  background: var(--notice-caution-bg);
  color: var(--notice-caution-ink);
  border: 1px solid var(--notice-caution-border);
}

/* iOS 27 lays a blur over the top of a home screen web app unless the page
   has a solid, full-width bar pinned to the very top; WebKit then extends
   that bar's color into the status bar instead. This strip is that bar. It is
   the page color, so it reads as background. Only in the installed iPhone app
   (.ios-app, set by shared/_theme_boot). It needs the default status bar
   style: black-translucent defeats it. See docs/how-to-home-screen.md. */
.standalone-top-edge {
  display: none;
}

.ios-app .standalone-top-edge {
  display: block;
  position: fixed;
  z-index: 1000;
  top: 0;
  right: 0;
  left: 0;
  height: 12px;
  background-color: var(--color-page);
}

.app-bar {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  margin: 0;
  padding: 0.75rem 1rem;
  pointer-events: none;
}

.app-bar a,
.app-bar button {
  pointer-events: auto;
}

.app-logo {
  display: flex;
  justify-content: center;
  margin: 0 1rem 3rem;
  line-height: 0;
}

.app-logo img {
  display: block;
  width: 15.625rem;
  max-width: 100%;
  height: auto;
}

.site-footer {
  margin-top: auto;
  padding: 0 var(--page-gutter) 1.5rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
  text-align: center;
}

.site-footer p {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.9rem;
  margin: 0;
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

@media (max-width: 40rem) {
  .site-footer p {
    flex-wrap: nowrap;
    column-gap: 0.55rem;
  }
}

.app-bar-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0 0.25rem;
  color: var(--color-accent-strong);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.app-bar-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.account-menu {
  position: relative;
  pointer-events: auto;
}

.account-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border-radius: 50%;
  line-height: 0;
}

.account-link:focus-visible {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

@media (hover: hover) {
  .account-link:hover {
    background: var(--hover-wash);
  }
}

.menu-panel {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgb(var(--overlay-rgb) / 12%);
}

.account-menu-panel {
  position: absolute;
  z-index: 1;
  top: calc(100% + 0.125rem);
  right: 0;
  min-width: 11.5rem;
  max-width: calc(100vw - 1.5rem);
  max-height: calc(100dvh - 4.5rem);
  margin: 0;
  padding: 0.25rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.account-menu-panel[hidden] {
  display: none;
}

.account-menu-sample .account-menu-panel {
  position: static;
  margin-top: 0.35rem;
  max-height: none;
  overflow: visible;
}

/* Styling-page copies of menus that are positioned in the real page.
   Two classes, so this wins over the single-class position in forecasts.css. */
.menu-panel.menu-sample,
.forecast-location-menu.menu-sample {
  position: static;
  top: auto;
  max-height: none;
}

.forecast-location-menu.menu-sample {
  margin-top: 0.35rem;
}

.menu-sample + .menu-sample {
  margin-top: 0.75rem;
}

.account-menu-form {
  margin: 0;
}

.account-menu-group {
  margin-top: 0.25rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--color-line);
}

.account-menu-item {
  display: flex;
  align-items: center;
  box-sizing: border-box;
  width: 100%;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.625rem 0.875rem;
  border: 0;
  border-radius: 0.375rem;
  background: transparent;
  color: var(--color-ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.account-menu-item[aria-current="page"] {
  color: var(--color-accent-strong);
}

.account-menu-item:focus-visible,
.account-menu-item:active {
  background: var(--color-wash);
  color: var(--color-ink);
  outline: var(--focus-ring);
  outline-offset: -2px;
}

@media (hover: hover) {
  .account-menu-item:hover {
    background: var(--color-wash);
    color: var(--color-ink);
  }
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--color-border);
  background: var(--color-line);
}

.user-avatar-fallback {
  background: var(--color-accent-strong);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 28px;
  text-align: center;
}

/* The account button is primary nav. Its avatar matches the crosshairs
   locate button beside it: a 1.5rem icon, 0.5rem padding, 1px border.
   The avatar's own 1px border makes up the same 2px. */
.app-bar .user-avatar {
  width: 2.5rem;
  height: 2.5rem;
}

.app-bar .user-avatar-fallback {
  line-height: 2.5rem;
  font-size: 1.05rem;
}

.flash-wrap {
  position: fixed;
  z-index: 3;
  top: 0.75rem;
  left: 50%;
  width: min(22rem, calc(100% - 2 * var(--app-bar-clearance)));
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  pointer-events: none;
}

.flash-wrap .notice {
  margin: 0;
  pointer-events: auto;
  box-shadow: 0 8px 24px rgb(var(--overlay-rgb) / 18%);
}

.flash-wrap .notice + .notice {
  margin-top: 0.5rem;
}

.flash-message {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.flash-message-text {
  flex: 1 1 auto;
  min-width: 0;
}

.flash-dismiss {
  display: flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: -0.6rem -0.65rem -0.6rem 0;
  border-radius: 999px;
  color: inherit;
}

.flash-dismiss svg {
  width: 0.9rem;
  height: 0.9rem;
}

.flash-dismiss:focus-visible {
  outline: var(--focus-ring);
  outline-offset: -2px;
}

.auth-page {
  --auth-max: 24rem;
  box-sizing: border-box;
  width: 100%;
  max-width: var(--auth-max);
  margin: 0 auto;
  padding: 1rem var(--page-gutter) 3rem;
}

.auth-page h1 {
  margin: 0 0 0.5rem;
  font-size: 1.75rem;
}

/* Two equal choices on sign in and create account. The current one is filled. */
.auth-tabs {
  display: flex;
  margin: 0 0 1.25rem;
}

/* Menu is fixed at the top right. These tabs are the top row of sign in and
   create account, so stop their right edge before that button. */
.auth-page > .auth-tabs {
  width: auto;
  margin-right: max(
    0px,
    calc(var(--app-bar-clearance) - var(--page-gutter) - (100vw - min(100vw, var(--auth-max))) / 2)
  );
}

.auth-tabs a {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}

.auth-tabs a:first-child {
  border-radius: 0.5rem 0 0 0.5rem;
}

.auth-tabs a + a {
  margin-left: -1px;
  border-radius: 0 0.5rem 0.5rem 0;
}

/* A middle tab, when there are three or more, is square on both sides. */
.auth-tabs a + a:not(:last-child) {
  border-radius: 0;
}

.auth-tabs a:hover {
  background: var(--color-surface-hover);
  text-decoration: none;
}

.auth-tabs a[aria-current="page"] {
  z-index: 1;
  border-color: var(--color-accent);
  background: var(--color-accent);
  color: var(--color-on-accent);
}

.auth-tabs a[aria-current="page"]:hover {
  border-color: var(--color-accent-strong);
  background: var(--color-accent-strong);
  color: var(--color-on-accent);
}

.auth-tabs a:focus-visible {
  z-index: 1;
  outline: var(--focus-ring);
  outline-offset: 2px;
}

/* On a phone the row also leaves room for the menu button, so the tabs are
   compact and a label stays on one line. */
@media (max-width: 40rem) {
  .auth-tabs a {
    min-height: 2.25rem;
    padding: 0.375rem 0.5rem;
    font-size: 0.875rem;
    white-space: nowrap;
  }
}

.auth-page h2 {
  margin: 1.25rem 0 0.75rem;
  font-size: 1.125rem;
}

.auth-lead,
.auth-note {
  margin: 0 0 1rem;
  color: var(--color-muted);
}

/* PayPal's button frames carry their own z-index, which put them over the
   fixed app bar and its menus. Their own stacking context keeps them below. */
.donate-buttons {
  position: relative;
  z-index: 0;
  isolation: isolate;
}

.auth-divider {
  margin: 1rem 0;
  color: var(--color-muted);
  text-align: center;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"],
.auth-form textarea,
.auth-form select {
  width: 100%;
  margin-bottom: 0.75rem;
}

.google-form {
  margin: 0;
}

.google-logo {
  width: 1.125rem;
  height: 1.125rem;
  flex: none;
}

.auth-links {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
}

.profile-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 1.25rem;
  row-gap: 1rem;
  align-items: center;
}

.profile-email {
  grid-column: 1 / -1;
  margin: 0;
}

.profile-photo-manage {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.profile-photo-label {
  margin-bottom: 0.35rem;
}

.profile-photo-manage .file-picker {
  margin: 0;
}

.profile-photo-manage .auth-note {
  margin: 0.35rem 0 0;
  font-size: 0.8125rem;
}

.profile-photo {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  margin-right: 1rem;
}

.profile-form {
  grid-column: 1 / -1;
  grid-row: 3;
  width: 100%;
}

.profile-form .theme-toggle {
  margin: 0.25rem 0 1rem;
}

.map-experiments-name {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.map-experiments-name svg {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  color: var(--color-experiment);
}

.profile-terms {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
  margin-bottom: 0.75rem;
}

.profile-terms-accepted {
  white-space: nowrap;
}

.profile-photo .user-avatar {
  width: 8rem;
  height: 8rem;
}

.profile-photo .user-avatar-fallback {
  line-height: 8rem;
  font-size: 2.5rem;
}

@media (max-width: 40rem) {
  .profile-photo .user-avatar {
    width: 6.5rem;
    height: 6.5rem;
  }

  .profile-photo .user-avatar-fallback {
    line-height: 6.5rem;
    font-size: 2rem;
  }
}

.field-hint {
  display: block;
  margin-top: 0.15rem;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 400;
}

.file-picker {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.visually-hidden,
input.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
  background: transparent;
}

/* The name of an icon control, where the device can hover. Touch reads the
   aria-label, so a control whose name matters on a phone shows it as text. */
[data-tooltip] {
  position: relative;
}

@media (hover: hover) {
  [data-tooltip]:is(:hover, :focus-visible)::after {
    content: attr(data-tooltip);
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: calc(100% + 0.2rem);
    padding: 0.15rem 0.4rem;
    border-radius: 0.3rem;
    background: var(--color-tooltip);
    color: var(--color-on-tooltip);
    font-size: 0.6875rem;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    pointer-events: none;
    transform: translateX(-50%);
  }

  .tooltip-end[data-tooltip]:is(:hover, :focus-visible)::after {
    right: 0;
    left: auto;
    transform: none;
  }
}

.file-picker:focus-within .button {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.file-picker-name {
  min-width: 0;
  overflow: hidden;
  color: var(--color-muted);
  font-size: 0.875rem;
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.panel {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.5rem;
}

.tile {
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 0.75rem;
  padding: var(--tile-pad);
}

.kicker {
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.kicker-accent {
  color: var(--color-accent-strong);
}

.admin-style-contents {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0 0 1.25rem;
  font-size: 0.875rem;
}

.admin-style-section {
  margin: 0 0 1rem;
  padding: 1rem;
}

.admin-style-section h2 {
  margin-top: 0;
  scroll-margin-top: var(--app-bar-clearance);
}

.admin-style-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

/* A map-dock specimen laid out as a row, over radar colors, so the frosted
   map buttons and the Bases and Overlays switch show as they do on a map. */
.map-dock.admin-map-glass {
  position: relative;
  z-index: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: 0.75rem 0;
  padding: 1rem;
  border-radius: 0.5rem;
  background: linear-gradient(110deg, #1e3a8a 0%, #16a34a 30%, #facc15 55%, #dc2626 75%, #7e22ce 100%);
}

.color-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
}

.theme-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  font-weight: 600;
  cursor: pointer;
}

.theme-toggle-track {
  position: relative;
  width: 2.5rem;
  height: 1.4rem;
  flex: none;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  background: var(--color-line);
}

.theme-toggle-track::after {
  content: "";
  position: absolute;
  top: 0.125rem;
  left: 0.125rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: var(--color-surface);
  transition: transform 0.15s ease;
}

.theme-toggle:has(input:checked) .theme-toggle-track {
  background: var(--color-accent);
  border-color: var(--color-accent);
}

.theme-toggle:has(input:checked) .theme-toggle-track::after {
  transform: translateX(1.1rem);
}

.theme-toggle:focus-within .theme-toggle-track {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.horoscope-opt-in {
  justify-content: space-between;
  margin-bottom: 0;
}

.horoscope-opt-in-panel {
  margin-top: 0.75rem;
}

.horoscope-signs {
  margin: 0;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.horoscope-signs legend {
  margin: 0 0 0.5rem;
  padding: 0;
  font-weight: 600;
}

.horoscope-signs .zodiac-grid {
  margin-bottom: 0;
}

.account-menu-item.theme-toggle {
  justify-content: space-between;
  gap: 0.75rem;
}

.admin-style-note {
  margin: 0.75rem 0 0;
}

.admin-style-section > .auth-tabs {
  margin-top: 1rem;
}

.admin-weather-icons {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: 0.75rem;
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.admin-weather-icons li {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8125rem;
}

.admin-weather-icons .weather-icon svg {
  width: 3rem;
  height: 3rem;
}

.admin-weather-icons .admin-chrome-icon {
  width: 1.5rem;
  height: 1.5rem;
}

.admin-map-pins {
  grid-template-columns: repeat(auto-fill, minmax(4.5rem, 1fr));
}

.admin-map-pin {
  position: relative;
  display: block;
  width: 40px;
  overflow: visible;
}

.admin-pin-fill {
  display: block;
  width: 36px;
  height: 36px;
  background: linear-gradient(#38bdf8 0 58%, #4ade80 58% 100%);
}

.admin-weather-icons .picture-status-icon {
  width: 2.25rem;
  height: 2.25rem;
}

/* Mascot specimens: each drawing scaled into the same box, as the engine
   fits it (mascots/drawings.js). */
.admin-mascots li[hidden] {
  display: none;
}

.admin-mascot-art,
.admin-mascot-stack {
  display: block;
  position: relative;
  width: 5rem;
  height: 4.375rem;
}

.admin-mascot-art.is-turned {
  transform: scaleX(-1);
}

.admin-mascot-stack > .admin-mascot-art {
  position: absolute;
  inset: 0;
}

.admin-mascot-stack > .is-tint {
  mix-blend-mode: multiply;
}

img.admin-mascot-art {
  object-fit: contain;
}

.admin-mascot-place {
  color: var(--color-muted);
  font-size: 0.75rem;
}

.admin-compass {
  display: inline-flex;
  width: 4rem;
  height: 4rem;
  color: var(--color-ink);
}

.admin-compass svg {
  width: 4rem;
  height: 4rem;
}

.account-section {
  margin: 0 0 0.75rem;
}

.account-section-toggle {
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 1rem;
  background: var(--color-surface);
  color: var(--color-ink);
  border: 0;
  border-radius: 0.5rem;
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.account-section-toggle:hover {
  background: var(--color-surface-hover);
}

.account-section-toggle::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-right: 2px solid var(--color-muted);
  border-bottom: 2px solid var(--color-muted);
  transform: rotate(45deg);
}

.account-section-toggle[aria-expanded="true"] {
  border-radius: 0.5rem 0.5rem 0 0;
}

.account-section-toggle[aria-expanded="true"]::after {
  transform: rotate(-135deg);
}

.account-section-panel {
  padding: 0.25rem 1rem 1rem;
  border-top: 1px solid var(--color-line);
}

.account-section-panel h2 {
  margin-top: 0.75rem;
}

/* The Home screen section on the account page. See home_screen_controller.js. */
.home-screen {
  padding-top: 0.75rem;
}

.home-screen-device h3 {
  margin: 0.5rem 0;
  font-size: 1rem;
}

.home-screen-steps {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.home-screen-steps li + li {
  margin-top: 0.35rem;
}

.home-screen-already {
  margin-top: 0.75rem;
}

.home-screen-other {
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--color-line);
}

.home-screen-other summary {
  color: var(--color-muted);
  cursor: pointer;
}

.home-screen-other[open] summary {
  margin-bottom: 0.5rem;
}

.map-preferences {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.map-preference-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.map-preference-group-label {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-muted);
}

.map-preference-group-note {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.map-preferences input[type="hidden"] {
  display: none;
}

.map-preference-line,
.map-preference-aside {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
}

.map-preference-side {
  margin-inline-start: 1rem;
}

.map-preference-side,
.map-preference-side.theme-toggle,
.map-preference-side .theme-toggle {
  font-weight: 400;
}

.map-preference-radio {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-weight: 400;
}

.map-preference-name {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.map-preference-play {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: none;
  color: var(--color-muted);
}

.map-preference-play svg + svg {
  margin-left: -0.4rem;
}

.map-preference-play svg {
  display: block;
  width: 0.9rem;
  height: 0.9rem;
}

.map-preferences .button-block {
  margin-top: 1rem;
}

.account-places {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.account-place {
  border: 1px solid #bfdbfe;
  border-radius: 0.5rem;
  padding: 0.75rem 0.875rem;
}

.account-place + .account-place {
  margin-top: 0.75rem;
}

.account-place-primary {
  background: var(--color-wash);
}

.account-place-mark {
  margin-bottom: 0.5rem;
}

.account-place-where {
  margin: 0 0 0.75rem;
  color: var(--color-muted);
}

.account-place-form {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.account-place-save {
  flex: none;
}

.account-place-save[hidden] {
  display: none;
}

.account-place-name {
  flex: 1 1 12rem;
  min-width: 0;
}

.account-place-name input[type="text"] {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}

.account-place-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.account-place-action {
  display: inline-block;
  margin: 0;
}

.zodiac-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 40rem) {
  .zodiac-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .zodiac-choice {
    padding: 0.4rem 0.1rem;
    font-size: 0.6875rem;
  }
}

@media (max-width: 23rem) {
  .zodiac-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.zodiac-choice {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  margin: 0;
  padding: 0.5rem 0.25rem;
  border: 1px solid var(--color-hairline);
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-align: center;
  line-height: 1.2;
  cursor: pointer;
}

.zodiac-choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice:has(:checked),
.choice-selected {
  border-color: var(--color-accent);
  background: var(--color-wash);
}

/* Two answers in one control, such as issue or idea. */
.choice-row {
  display: flex;
  margin: 0 0 1rem;
  padding: 0;
  border: 0;
  min-inline-size: 0;
}

.choice-row .choice {
  position: relative;
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  font-weight: 600;
  cursor: pointer;
}

.choice-row .choice:first-of-type {
  border-radius: 0.5rem 0 0 0.5rem;
}

.choice-row .choice + .choice {
  margin-left: -1px;
  border-radius: 0 0.5rem 0.5rem 0;
}

.choice-row .choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice-row .choice:hover {
  background: var(--color-surface-hover);
}

.choice-row .choice:has(:checked),
.choice-row .choice:has(:checked):hover {
  z-index: 1;
  border-color: var(--color-accent);
  background: var(--color-wash);
}

.choice-row .choice:focus-within {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.zodiac-choice:focus-within {
  outline: var(--focus-ring);
  outline-offset: 2px;
}

.zodiac-none {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
  font-weight: 600;
}

.zodiac-none input {
  margin: 0;
}

.auth-page-wide {
  --auth-max: 40rem;
}

.terms-section {
  margin: 0 0 1rem;
  padding: 0.75rem 0.875rem;
}

.terms-section h2,
.terms-disclosure summary {
  font-size: 1rem;
  font-weight: 700;
}

.terms-disclosure summary {
  cursor: pointer;
}

.terms-copy p {
  margin: 0.75rem 0 0;
  color: var(--color-ink);
  font-size: 0.9375rem;
}

.terms-sources {
  list-style: none;
  margin: 0.35rem 0 0;
  padding: 0;
}

.terms-sources li {
  margin: 0.55rem 0 0;
  color: var(--color-ink);
  font-size: 0.9375rem;
}

.terms-sources a {
  font-weight: 600;
}

.terms-agreement {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin: 0.75rem 0 0;
  font-weight: 600;
}

.terms-section > .terms-agreement {
  margin-top: 0;
}

.terms-agreement input {
  margin-top: 0.25rem;
  flex: none;
}

.terms-reaccept.button {
  margin-top: 0.5rem;
}

@media (max-width: 40rem) {
  .app-logo {
    margin-bottom: 1rem;
  }

  .app-bar {
    align-items: flex-start;
    padding-top: 0.25rem;
  }

  .auth-page > .forecast-place-tools.is-stretch {
    width: auto;
    margin-right: 3.75rem;
  }

  .account-link {
    width: 3.25rem;
    height: 3.25rem;
  }

  .app-bar .user-avatar {
    width: 2.25rem;
    height: 2.25rem;
  }

  .app-bar .user-avatar-fallback {
    line-height: 2.25rem;
    font-size: 0.95rem;
  }

  /* Content keeps the page gutter. Only cards and photo grids run to the
     screen edges, so a new piece of a page is inset unless it asks.
     body outranks a feature file's own margin on the same element. */
  body .page-bleed,
  .auth-page .panel {
    margin-inline: calc(-1 * var(--page-gutter));
    border-inline: 0;
    border-radius: 0;
  }

  .account-section-toggle,
  .account-section-toggle[aria-expanded="true"] {
    border-radius: 0;
  }
}
