:root {
  --bg: #f5f7f4;
  --surface: #ffffff;
  --surface-strong: #fdfefd;
  --text: #17201b;
  --muted: #5d6861;
  --soft: #edf2ee;
  --line: #dbe3dd;
  --green: #18705b;
  --green-dark: #105141;
  --teal: #0b8a8f;
  --coral: #d85f46;
  --gold: #a87924;
  --blue: #3868a6;
  --danger: #b94337;
  --shadow: 0 20px 45px rgba(20, 32, 27, 0.1);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 247, 244, 0.96)),
    var(--bg);
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
}

svg {
  display: block;
  flex: 0 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 72px;
  padding: 12px clamp(16px, 4vw, 44px);
  background: rgba(253, 254, 253, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  overflow: hidden;
  background: #0b1713;
  border: 0;
  border-radius: var(--radius);
  box-shadow: none;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1);
  transform-origin: center;
}

.brand-copy {
  display: grid;
  gap: 1px;
  line-height: 1;
}

.brand-copy strong {
  font-size: 1.08rem;
}

.brand-copy small {
  color: var(--muted);
}

.topnav {
  display: flex;
  gap: 4px;
  justify-content: center;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.topnav::-webkit-scrollbar {
  display: none;
}

.topnav a {
  min-height: 40px;
  padding: 10px 14px;
  color: var(--muted);
  border-radius: var(--radius);
  white-space: nowrap;
}

.topnav a:hover,
.topnav a:focus-visible,
.topnav a.is-active {
  color: var(--text);
  background: var(--soft);
  outline: none;
}

.top-actions {
  display: flex;
  gap: 8px;
  justify-content: end;
  align-items: center;
}

.auth-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--green-dark);
  background: #edf7f3;
  border: 1px solid rgba(24, 112, 91, 0.2);
  border-radius: var(--radius);
  font-weight: 800;
  white-space: nowrap;
}

.auth-link:hover,
.auth-link:focus-visible,
.auth-link.is-active {
  border-color: rgba(24, 112, 91, 0.46);
  outline: 3px solid rgba(24, 112, 91, 0.12);
}

.icon-button,
.filter-pill,
.primary-button,
.secondary-button,
.route-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  box-shadow: none;
}

.icon-button {
  width: auto;
  min-width: 44px;
  padding: 9px 11px;
}

.icon-button svg {
  width: 18px;
  height: 18px;
}

.language-picker {
  position: relative;
  display: inline-flex;
}

.language-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 80;
  display: grid;
  min-width: 150px;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

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

.language-menu button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 10px;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 750;
  text-align: left;
}

.language-menu button:hover,
.language-menu button:focus-visible,
.language-menu button.is-active {
  color: var(--green-dark);
  background: var(--soft);
  outline: none;
}

.language-menu button.is-active::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 14px;
  background: var(--green-dark);
  border-radius: 999px;
}

.primary-button {
  padding: 10px 16px;
  border-color: var(--green-dark);
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
}

.primary-button:hover,
.primary-button:focus-visible {
  background: #0c4537;
  outline: 3px solid rgba(24, 112, 91, 0.18);
}

.secondary-button,
.route-button {
  padding: 10px 14px;
  font-weight: 700;
}

.route-button {
  color: var(--green-dark);
}

.shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px clamp(16px, 4vw, 44px) 48px;
}

.control-band {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(360px, 1fr);
  gap: 22px;
  align-items: end;
  margin-bottom: 18px;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.find-heading {
  min-width: 0;
}

.eyebrow,
.panel-label {
  margin: 0 0 6px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.15;
}

.find-heading h1,
.form-intro h1 {
  font-size: clamp(2rem, 2.6rem, 2.6rem);
}

.find-heading p:last-child,
.form-intro p:last-child {
  max-width: 52ch;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
}

.search-box:focus-within {
  border-color: rgba(24, 112, 91, 0.4);
  box-shadow: 0 0 0 3px rgba(24, 112, 91, 0.12);
}

.search-box input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.filter-row {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 2px;
}

.filter-pill {
  padding: 8px 12px;
  color: var(--muted);
  font-weight: 700;
}

.filter-pill svg {
  width: 17px;
  height: 17px;
}

.filter-pill:hover,
.filter-pill:focus-visible,
.filter-pill.is-active {
  border-color: rgba(24, 112, 91, 0.38);
  background: #e7f3ee;
  color: var(--green-dark);
  outline: none;
}

.stats-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--line);
}

.stats-strip div {
  display: grid;
  gap: 3px;
  min-width: 0;
  padding: 12px;
  background: var(--surface-strong);
}

.stats-strip strong {
  font-size: 1.25rem;
}

.stats-strip span {
  color: var(--muted);
  font-size: 0.86rem;
}

.app-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 430px);
  gap: 18px;
  align-items: start;
}

.map-panel,
.results-panel,
.panel-form,
.rating-guide,
.detail-card,
.detail-side {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.map-panel {
  min-width: 0;
  overflow: hidden;
}

.panel-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-toolbar strong {
  display: block;
  min-width: 0;
}

.select-wrap {
  display: inline-grid;
  grid-template-columns: auto minmax(120px, 1fr);
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.select-wrap select,
.field select,
.field input,
.field textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-strong);
  color: var(--text);
}

.select-wrap select {
  min-height: 38px;
  padding: 6px 32px 6px 10px;
}

.map-canvas {
  position: relative;
  width: 100%;
  height: 590px;
  min-height: 420px;
  background: #d8e6df;
}

.map-fallback {
  position: relative;
  min-height: 420px;
  background:
    linear-gradient(90deg, rgba(24, 112, 91, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(56, 104, 166, 0.12) 1px, transparent 1px),
    #e7ece7;
  background-size: 54px 54px;
}

.map-fallback span {
  position: absolute;
  width: 18px;
  height: 18px;
  background: var(--coral);
  border: 3px solid #fff;
  border-radius: 999px;
  box-shadow: 0 10px 24px rgba(20, 32, 27, 0.2);
}

.map-fallback span:nth-child(1) {
  top: 24%;
  left: 32%;
}

.map-fallback span:nth-child(2) {
  top: 48%;
  left: 56%;
}

.map-fallback span:nth-child(3) {
  top: 67%;
  left: 42%;
}

.ruce-marker {
  border: 0;
  background: transparent;
}

.pin-dot {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: var(--green-dark);
  border: 3px solid #fff;
  border-radius: 50% 50% 50% 8px;
  box-shadow: 0 14px 30px rgba(20, 32, 27, 0.24);
  font-size: 0.78rem;
  font-weight: 900;
  transform: rotate(-45deg);
}

.pin-dot span {
  transform: rotate(45deg);
}

.pin-dot.is-closed {
  background: var(--muted);
}

.pin-dot.is-selected {
  background: var(--coral);
}

.map-brand-badge {
  position: absolute;
  z-index: 500;
  left: 14px;
  bottom: 14px;
  padding: 7px 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(20, 32, 27, 0.1);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(20, 32, 27, 0.12);
  font-size: 0.76rem;
  font-weight: 800;
}

.map-popover {
  display: grid;
  min-width: 180px;
  gap: 4px;
  color: var(--text);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.map-popover strong {
  font-size: 0.95rem;
}

.map-popover span,
.map-popover small {
  color: var(--muted);
}

.map-popover a {
  display: inline-flex;
  width: fit-content;
  margin-top: 4px;
  color: var(--green-dark);
  font-weight: 900;
}

.map-unavailable {
  display: grid;
  min-height: 100%;
  place-items: center;
  color: var(--muted);
  background:
    linear-gradient(90deg, rgba(24, 112, 91, 0.12) 1px, transparent 1px),
    linear-gradient(0deg, rgba(56, 104, 166, 0.12) 1px, transparent 1px),
    #e7ece7;
  background-size: 54px 54px;
  font-weight: 800;
}

.leaflet-container {
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
}

.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
  border: 0;
  box-shadow: 0 10px 28px rgba(20, 32, 27, 0.18);
}

.leaflet-bar a {
  color: var(--text);
  border-bottom-color: var(--line);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(20, 32, 27, 0.18);
}

.leaflet-control-attribution {
  font-size: 0.68rem;
}

.results-panel {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 112px);
  min-width: 0;
  overflow: hidden;
}

.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  padding: 16px 16px 8px;
}

.results-heading h2 {
  font-size: 1.28rem;
}

.context-line {
  padding: 0 16px 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.restroom-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 242px);
  min-height: 240px;
  overflow: auto;
  padding: 0 12px 14px;
}

.restroom-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.restroom-card.is-selected {
  border-color: rgba(216, 95, 70, 0.7);
  box-shadow: 0 0 0 3px rgba(216, 95, 70, 0.12);
}

.card-top,
.card-actions,
.meta-row,
.facility-row,
.score-line,
.detail-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.card-top {
  justify-content: space-between;
  align-items: start;
}

.card-kicker {
  margin: 0 0 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.card-title {
  font-size: 1rem;
}

.card-address {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.save-button.is-saved {
  color: var(--gold);
  border-color: rgba(168, 121, 36, 0.42);
  background: #fff8e6;
}

.meta-row {
  flex-wrap: wrap;
}

.metric {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 8px;
  color: var(--muted);
  background: var(--soft);
  border-radius: var(--radius);
  font-size: 0.86rem;
  font-weight: 700;
}

.metric strong {
  color: var(--text);
}

.status-open {
  color: var(--green-dark);
  background: #e7f3ee;
}

.status-closed {
  color: var(--danger);
  background: #fbecea;
}

.status-limited {
  color: var(--gold);
  background: #fff5dc;
}

.score-stack {
  display: grid;
  gap: 7px;
}

.score-line {
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.82rem;
}

.score-line span:first-child {
  min-width: 88px;
}

.bar {
  position: relative;
  flex: 1 1 auto;
  height: 8px;
  overflow: hidden;
  background: #dfe6e1;
  border-radius: 999px;
}

.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green));
  border-radius: inherit;
}

.facility-row {
  flex-wrap: wrap;
}

.facility-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.82rem;
}

.facility-chip.is-good {
  color: var(--green-dark);
  border-color: rgba(24, 112, 91, 0.28);
  background: #edf7f3;
}

.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.card-actions > * {
  width: 100%;
}

.empty-state {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  background: var(--surface-strong);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.module-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.module-link {
  display: flex;
  gap: 12px;
  align-items: start;
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.module-link:hover,
.module-link:focus-visible {
  border-color: rgba(11, 138, 143, 0.45);
  outline: 3px solid rgba(11, 138, 143, 0.12);
}

.module-link svg {
  width: 22px;
  height: 22px;
  color: var(--teal);
}

.module-link span {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.module-link small {
  color: var(--muted);
  line-height: 1.45;
}

.detail-shell,
.form-shell {
  max-width: 1180px;
}

.back-link {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  margin-bottom: 14px;
  color: var(--green-dark);
  font-weight: 800;
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(310px, 360px);
  gap: 18px;
  align-items: start;
}

.detail-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.detail-card {
  padding: 18px;
}

.detail-header {
  display: grid;
  gap: 12px;
}

.detail-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
}

.detail-header h1 {
  font-size: clamp(1.8rem, 2.3rem, 2.3rem);
}

.detail-address {
  margin: 6px 0 0;
  color: var(--muted);
}

.score-badge {
  display: grid;
  place-items: center;
  width: 84px;
  min-width: 84px;
  height: 84px;
  color: #fff;
  background: var(--green-dark);
  border-radius: var(--radius);
}

.score-badge strong {
  font-size: 1.7rem;
}

.score-badge span {
  font-size: 0.76rem;
}

.detail-map {
  position: relative;
  height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #d8e6df;
}

.section-title {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 1.04rem;
}

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

.score-tile,
.amenity-tile,
.review-item {
  min-width: 0;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.score-tile {
  display: grid;
  gap: 8px;
}

.score-tile header,
.amenity-tile {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.score-tile strong {
  font-size: 1.1rem;
}

.amenity-tile.is-good {
  border-color: rgba(24, 112, 91, 0.25);
  background: #f2faf6;
}

.amenity-tile.is-missing {
  color: var(--muted);
}

.review-list {
  display: grid;
  gap: 10px;
}

.photo-card {
  display: grid;
  gap: 14px;
}

.photo-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.photo-head p {
  max-width: 58ch;
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.photo-upload {
  position: relative;
  min-width: max-content;
  overflow: hidden;
}

.photo-upload input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

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

.restroom-photo {
  position: relative;
  min-width: 0;
  aspect-ratio: 4 / 3;
  margin: 0;
  overflow: hidden;
  background: var(--soft);
  border-radius: var(--radius);
}

.restroom-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.restroom-photo figcaption {
  position: absolute;
  right: 8px;
  bottom: 8px;
  max-width: calc(100% - 16px);
  padding: 4px 7px;
  color: #fff;
  background: rgba(16, 81, 65, 0.78);
  border-radius: 6px;
  font-size: 0.75rem;
}

.photo-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 7px;
  min-height: 190px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(24, 112, 91, 0.08), rgba(56, 104, 166, 0.08)),
    var(--surface-strong);
  border-radius: var(--radius);
}

.photo-empty svg {
  width: 34px;
  height: 34px;
  color: var(--green-dark);
}

.photo-empty span {
  color: var(--text);
  font-weight: 800;
}

.photo-empty small {
  max-width: 34ch;
  line-height: 1.45;
}

.review-item {
  display: grid;
  gap: 7px;
  line-height: 1.55;
}

.review-item header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.detail-side {
  position: sticky;
  top: 92px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.detail-actions {
  display: grid;
  grid-template-columns: 1fr;
}

.hours-block,
.access-block {
  display: grid;
  gap: 8px;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.hours-block span,
.access-block span {
  color: var(--muted);
}

.form-intro {
  margin-bottom: 18px;
}

.form-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.panel-form,
.rating-guide {
  padding: 18px;
}

.panel-form {
  display: grid;
  gap: 16px;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 500;
  resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(24, 112, 91, 0.45);
  outline: 3px solid rgba(24, 112, 91, 0.12);
}

.score-controls {
  display: grid;
  gap: 12px;
}

.slider-row {
  display: grid;
  grid-template-columns: minmax(130px, 0.8fr) minmax(120px, 1fr) 44px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.slider-row span {
  font-weight: 800;
}

.slider-row input {
  width: 100%;
  accent-color: var(--green-dark);
}

.slider-row output {
  text-align: right;
  color: var(--green-dark);
  font-weight: 900;
}

.toggle-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.toggle-fieldset legend {
  padding: 0 6px;
  color: var(--muted);
  font-weight: 800;
}

.toggle-fieldset label {
  display: inline-flex;
  gap: 7px;
  align-items: center;
  min-height: 34px;
  padding: 6px 9px;
  background: var(--soft);
  border-radius: var(--radius);
}

.toggle-fieldset input {
  accent-color: var(--green-dark);
}

.submit-button {
  width: 100%;
}

.rating-guide {
  position: sticky;
  top: 92px;
}

.rating-guide h2 {
  font-size: 1.2rem;
}

.rating-guide ul {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.rating-guide li {
  display: grid;
  gap: 5px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.rating-guide li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.rating-guide span {
  color: var(--muted);
  line-height: 1.55;
}

.form-status {
  min-height: 24px;
  margin: 0;
  color: var(--green-dark);
  font-weight: 800;
}

.auth-shell,
.profile-shell {
  max-width: 1180px;
}

.auth-hero {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.auth-hero h1 {
  font-size: clamp(2rem, 2.5rem, 2.5rem);
}

.auth-hero p:last-child {
  max-width: 56ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.auth-layout,
.profile-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
  gap: 18px;
  align-items: start;
}

.auth-card,
.account-aside,
.profile-card,
.profile-empty {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  overflow: hidden;
}

.account-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
}

.account-mode button {
  min-height: 42px;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 900;
}

.account-mode button.is-active,
.account-mode button:hover,
.account-mode button:focus-visible {
  color: var(--green-dark);
  background: var(--mint);
  border-color: rgba(0, 107, 91, 0.18);
  outline: none;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  padding: 8px;
  background: var(--soft);
  border-bottom: 1px solid var(--line);
}

.segmented button {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 44px;
  padding: 8px 10px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: var(--radius);
  font-weight: 800;
}

.segmented button.is-active,
.segmented button:hover,
.segmented button:focus-visible {
  color: var(--green-dark);
  background: var(--surface);
  outline: none;
}

.auth-form {
  box-shadow: none;
  border: 0;
  border-radius: 0;
}

.auth-panel {
  display: none;
  gap: 12px;
}

.auth-panel.is-active {
  display: grid;
}

.compact {
  align-items: end;
}

.code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.provider-grid {
  display: grid;
  gap: 10px;
}

.provider-button {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  width: 100%;
  color: var(--text);
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-weight: 800;
}

.provider-button:hover,
.provider-button:focus-visible {
  border-color: rgba(56, 104, 166, 0.42);
  outline: 3px solid rgba(56, 104, 166, 0.12);
}

.terms-line {
  display: inline-flex;
  gap: 9px;
  align-items: start;
  color: var(--muted);
  line-height: 1.45;
}

.terms-line input {
  margin-top: 3px;
  accent-color: var(--green-dark);
}

.auth-switch-copy {
  display: inline-flex;
  justify-content: center;
  gap: 7px;
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.auth-switch-copy button {
  padding: 0;
  color: var(--green-dark);
  background: transparent;
  border: 0;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.recaptcha-slot {
  min-height: 1px;
}

.account-aside {
  position: sticky;
  top: 92px;
  padding: 18px;
}

.account-aside h2,
.profile-card h2,
.profile-empty h2 {
  font-size: 1.2rem;
}

.account-aside ul {
  display: grid;
  gap: 14px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
}

.account-aside li {
  display: grid;
  gap: 5px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.account-aside li:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.account-aside span {
  color: var(--muted);
  line-height: 1.55;
}

.profile-layout {
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
}

.profile-main-card,
.preference-card,
.saved-card {
  padding: 18px;
}

.profile-main-card {
  grid-column: 1 / -1;
  display: grid;
  gap: 16px;
}

.account-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  min-width: 0;
}

.avatar {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  color: #fff;
  background: var(--green-dark);
  border-radius: var(--radius);
  font-size: 1.45rem;
  font-weight: 900;
}

.account-summary h2 {
  font-size: clamp(1.45rem, 2rem, 2rem);
}

.account-summary p:last-child {
  margin: 5px 0 0;
  color: var(--muted);
}

.account-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.account-meta span,
.stat-grid div {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.account-meta strong,
.stat-grid strong {
  color: var(--text);
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
}

.stat-grid div {
  place-items: start;
}

.stat-grid strong {
  font-size: 1.7rem;
}

.preference-card,
.saved-card {
  display: grid;
  gap: 14px;
}

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

.preference-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 42px;
  padding: 10px;
  background: var(--soft);
  border-radius: var(--radius);
  font-weight: 800;
}

.preference-grid input {
  accent-color: var(--green-dark);
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.saved-list {
  display: grid;
  gap: 10px;
}

.saved-place {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: var(--surface-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.saved-place:hover,
.saved-place:focus-visible {
  border-color: rgba(11, 138, 143, 0.42);
  outline: 3px solid rgba(11, 138, 143, 0.12);
}

.saved-place span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.saved-place small {
  color: var(--muted);
}

.saved-place b {
  display: grid;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  color: #fff;
  background: var(--green-dark);
  border-radius: var(--radius);
}

.profile-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 320px;
  padding: 28px;
  text-align: center;
}

.profile-empty svg {
  width: 42px;
  height: 42px;
  color: var(--green-dark);
}

.profile-empty p {
  max-width: 42ch;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

@media (max-width: 1080px) {
  .control-band,
  .app-grid,
  .detail-layout,
  .form-layout {
    grid-template-columns: 1fr;
  }

  .results-panel,
  .detail-side,
  .rating-guide {
    position: static;
    max-height: none;
  }

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

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .topnav {
    grid-column: 1 / -1;
    justify-content: start;
    order: 3;
  }

  .search-row,
  .stats-strip,
  .module-row,
  .two-col,
  .score-grid,
  .amenity-grid,
  .photo-grid,
  .auth-layout,
  .profile-layout,
  .account-meta {
    grid-template-columns: 1fr;
  }

  .account-aside {
    position: static;
  }

  .control-band,
  .panel-form,
  .rating-guide,
  .detail-card {
    padding: 14px;
  }

  .map-canvas,
  .map-fallback {
    height: 410px;
    min-height: 360px;
  }

  .card-actions,
  .slider-row,
  .code-row,
  .profile-actions,
  .preference-grid,
  .stat-grid {
    grid-template-columns: 1fr;
  }

  .slider-row output {
    text-align: left;
  }

  .detail-title-row {
    display: grid;
  }

  .photo-head {
    display: grid;
  }

  .photo-upload {
    min-width: 0;
    width: 100%;
  }

  .score-badge {
    width: 100%;
    min-width: 0;
    height: auto;
    min-height: 72px;
  }
}

@media (max-width: 460px) {
  .shell {
    padding-inline: 12px;
  }

  .brand-copy small {
    display: none;
  }

  .primary-button,
  .secondary-button,
  .route-button,
  .filter-pill,
  .auth-link {
    width: 100%;
  }

  .top-actions {
    grid-column: 1 / -1;
    order: 2;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    justify-content: stretch;
  }

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

  .panel-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .select-wrap {
    grid-template-columns: 1fr;
  }

  .segmented {
    grid-template-columns: 1fr;
  }
}
