:root {
  color-scheme: light;
  --ink: #111525;
  --muted: #707780;
  --line: rgba(25, 29, 43, 0.08);
  --panel: rgba(255, 255, 255, 0.78);
  --paper: rgba(255, 255, 255, 0.58);
  --primary: #526f32;
  --primary-strong: #3d5523;
  --mint: #eef4e5;
  --rose: #efe2db;
  --peach: #f3e6d6;
  --lilac: #e5e4f2;
  --sage: #d7dfbf;
  --ok: #526f32;
  --danger: #a6312b;
  font-family: "Plus Jakarta Sans", "Aptos", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 16% 10%, rgba(238, 244, 229, 0.9), transparent 32%),
    radial-gradient(circle at 86% 14%, rgba(243, 230, 214, 0.82), transparent 34%),
    radial-gradient(circle at 50% 96%, rgba(229, 228, 242, 0.5), transparent 36%),
    linear-gradient(135deg, #f5ecdf 0%, #fbf7ef 46%, #eef5e8 100%);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

.app-shell {
  width: min(430px, calc(100% - 22px));
  margin: 0 auto;
  padding: 18px 0 102px;
}

.screen {
  min-height: calc(100vh - 120px);
}

.auth-screen,
.picker-screen {
  display: grid;
  grid-template-columns: 1fr;
  align-content: center;
  gap: 22px;
}

.brand-block {
  min-height: 260px;
  display: grid;
  align-content: end;
  padding: 26px 24px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 34px;
  background:
    radial-gradient(circle at 82% 18%, rgba(255, 255, 255, 0.9) 0 12%, transparent 13%),
    radial-gradient(circle at 16% 18%, rgba(79, 115, 7, 0.12) 0 10%, transparent 11%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.74), rgba(234, 243, 219, 0.8));
  box-shadow: 0 28px 74px rgba(72, 55, 42, 0.13);
  overflow: hidden;
  position: relative;
}

.brand-block::after {
  content: "";
  position: absolute;
  width: 178px;
  height: 178px;
  right: -42px;
  top: -44px;
  border-radius: 54px;
  background: linear-gradient(135deg, rgba(238, 244, 229, 0.78), rgba(243, 230, 214, 0.68));
  transform: rotate(16deg);
}

.brand-block.compact {
  min-height: 214px;
  background:
    radial-gradient(circle at 78% 22%, rgba(246, 222, 197, 0.86) 0 18%, transparent 19%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(238, 244, 229, 0.64));
}

.brand-block h1,
.topbar h1 {
  max-width: 10ch;
  font-size: clamp(3.15rem, 14vw, 4.2rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin: 0;
  position: relative;
  z-index: 1;
}

.brand-block.compact h1 {
  max-width: 11ch;
  font-size: clamp(2.5rem, 11vw, 3.5rem);
}

.brand-block.compact h1.notification-title {
  max-width: 6ch;
  font-size: clamp(3rem, 13vw, 4rem);
  line-height: 0.9;
}

.eyebrow {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  color: var(--primary);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 7px 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  margin: 0 0 16px;
  font-size: 0.74rem;
  line-height: 1;
  box-shadow: 0 12px 32px rgba(60, 53, 44, 0.08);
  position: relative;
  z-index: 1;
}

h2,
p {
  margin-top: 0;
}

.panel,
.waste-card {
  display: grid;
  gap: 18px;
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 30px;
  box-shadow: 0 24px 68px rgba(72, 55, 42, 0.13);
  padding: 22px;
  backdrop-filter: blur(20px);
}

.settings-panel h2 {
  font-size: 2rem;
  letter-spacing: -0.035em;
  margin: 0 0 4px;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 560;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  padding: 0 16px;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

input:focus {
  border-color: rgba(79, 115, 7, 0.42);
  box-shadow: 0 0 0 5px rgba(79, 115, 7, 0.12);
}

button {
  min-height: 52px;
  border-radius: 19px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 650;
  padding: 0 17px;
}

.primary {
  background: #171725;
  color: white;
  box-shadow: 0 16px 34px rgba(17, 21, 37, 0.22);
}

.primary:hover {
  background: #252538;
}

.secondary {
  background: var(--peach);
  color: #7b460b;
  border-color: rgba(255, 255, 255, 0.65);
}

.ghost {
  background: rgba(255, 255, 255, 0.62);
  border-color: rgba(255, 255, 255, 0.74);
  color: var(--ink);
}

.tertiary {
  min-height: auto;
  width: fit-content;
  justify-self: center;
  padding: 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  box-shadow: none;
}

.full {
  width: 100%;
}

.auth-form {
  gap: 14px;
}

.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  padding: 5px;
  border-radius: 999px;
  background: rgba(234, 243, 219, 0.72);
  border: 1px solid rgba(79, 115, 7, 0.12);
}

.mode-switch button {
  min-height: 42px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
}

.mode-switch button.active {
  background: white;
  color: var(--primary);
  box-shadow: 0 10px 24px rgba(79, 115, 7, 0.1);
}

.town-picker {
  display: grid;
  gap: 12px;
}

.onboarding-notification {
  display: grid;
  gap: 12px;
}

.onboarding-notification h2 {
  margin: 0;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.onboarding-notification p {
  margin: 0;
  color: var(--ink);
  font-size: 1.12rem;
  line-height: 1.45;
  font-weight: 620;
}

.town-choice {
  min-height: 88px;
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  text-align: left;
  background: rgba(255, 255, 255, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.82);
  color: var(--ink);
  box-shadow: 0 14px 34px rgba(72, 55, 42, 0.08);
}

.town-choice strong {
  font-size: 1.16rem;
  font-weight: 650;
}

.town-choice.active {
  background: linear-gradient(135deg, rgba(234, 243, 219, 0.96), rgba(207, 217, 166, 0.78));
  border-color: rgba(79, 115, 7, 0.22);
}

.town-choice span {
  min-width: 92px;
  border-radius: 999px;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.66);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 650;
  text-align: center;
}

.street-search {
  display: grid;
  gap: 12px;
}

.street-search input {
  margin-top: 2px;
}

.selected-street {
  width: fit-content;
  max-width: 100%;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 14px;
  background: rgba(238, 244, 229, 0.82);
  color: var(--primary);
  font-size: 0.86rem;
  font-weight: 650;
}

.street-results {
  display: grid;
  gap: 8px;
}

.street-result {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(255, 255, 255, 0.84);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(72, 55, 42, 0.06);
}

.street-result strong {
  min-width: 0;
  font-weight: 650;
}

.street-result span {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 7px 10px;
  background: rgba(238, 244, 229, 0.92);
  color: var(--primary);
  font-size: 0.78rem;
  font-weight: 650;
}

.street-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.street-chip {
  width: fit-content;
  max-width: 100%;
  margin: 12px 0 0;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.64);
  color: var(--primary);
  font-size: 0.82rem;
  font-weight: 650;
}

.topbar {
  margin: 8px 2px 24px;
}

.topbar .eyebrow {
  display: none;
}

.cards-grid {
  display: grid;
  gap: 18px;
}

.waste-card {
  position: relative;
  overflow: hidden;
}

.waste-card:nth-child(odd) {
  background:
    radial-gradient(circle at 92% 10%, rgba(238, 244, 229, 0.8) 0 17%, transparent 18%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(234, 243, 219, 0.76));
}

.waste-card:nth-child(even) {
  background:
    radial-gradient(circle at 92% 10%, rgba(229, 228, 242, 0.62) 0 17%, transparent 18%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(246, 222, 197, 0.68));
}

.waste-card h2 {
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.03em;
  font-weight: 650;
  margin: 0;
}

.collection-toggle {
  position: relative;
  min-height: 112px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  box-shadow: 0 16px 34px rgba(72, 55, 42, 0.07);
}

.collection-toggle:nth-of-type(2) {
  background: rgba(238, 244, 229, 0.58);
}

.collection-toggle:nth-of-type(3) {
  background: rgba(246, 222, 197, 0.5);
}

.collection-toggle small {
  display: block;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

.collection-toggle strong {
  display: block;
  color: var(--ink);
  font-size: 1.23rem;
  line-height: 1.22;
  letter-spacing: -0.015em;
  font-weight: 650;
}

.switch-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch-ui {
  width: 58px;
  height: 34px;
  display: block;
  border-radius: 999px;
  background: rgba(151, 154, 149, 0.36);
  position: relative;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.switch-ui::after {
  content: "";
  position: absolute;
  width: 28px;
  height: 28px;
  top: 3px;
  left: 3px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 4px 12px rgba(15, 31, 29, 0.2);
  transition: transform 160ms ease;
}

.switch-input:checked + .switch-ui {
  background: #171725;
}

.switch-input:checked + .switch-ui::after {
  transform: translateX(24px);
}

.switch-input:focus-visible + .switch-ui {
  box-shadow: 0 0 0 5px rgba(17, 21, 37, 0.12);
}

.settings-panel {
  width: 100%;
  margin: 0 auto;
}

.danger {
  color: var(--danger);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 14px;
  z-index: 10;
  width: min(392px, calc(100% - 24px));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  transform: translateX(-50%);
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 22px 54px rgba(72, 55, 42, 0.18);
  backdrop-filter: blur(22px);
}

.bottom-nav button {
  min-height: 56px;
  display: grid;
  place-items: center;
  gap: 2px;
  border-radius: 22px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
}

.bottom-nav button.active {
  background: #171725;
  color: white;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
}

.nav-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.85;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.message {
  min-height: 22px;
  color: var(--ok);
  font-weight: 600;
  margin: 0;
}

.message.error {
  color: var(--danger);
}

.hidden {
  display: none !important;
}

@media (min-width: 900px) {
  .app-shell {
    padding-top: 38px;
  }

  .screen {
    min-height: calc(100vh - 140px);
  }
}

@media (max-width: 430px) {
  .app-shell {
    width: min(100% - 18px, 430px);
    padding-top: 9px;
  }

  .brand-block {
    min-height: 230px;
    border-radius: 30px;
  }

  .brand-block h1,
  .topbar h1 {
    font-size: clamp(2.8rem, 15vw, 3.8rem);
  }

  .panel,
  .waste-card {
    padding: 18px;
  }
}
