:root {
  --ink: #17212b;
  --muted: #64727c;
  --line: #d8d5cb;
  --panel: #fffdf8;
  --panel-strong: #f8faf9;
  --blue: #2f6f9f;
  --green: #1f7a62;
  --yellow: #d5a11e;
  --red: #b94634;
  --shadow: 0 18px 50px rgba(26, 34, 41, 0.16);
  --map-top-offset: 96px;
  --map-bottom-offset: 86px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
}

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

.app-shell,
#weather-map {
  position: fixed;
  inset: 0;
}

#weather-map {
  z-index: 1;
  background: #dce7ec;
}

.leaflet-container {
  font: inherit;
}

.leaflet-popup-content {
  margin: 12px 14px;
}

.leaflet-popup-content-wrapper {
  border-radius: 8px;
}

.leaflet-top .leaflet-control {
  margin-top: calc(max(16px, env(safe-area-inset-top)) + var(--map-top-offset));
}

.leaflet-left .leaflet-control {
  margin-left: 12px;
}

.leaflet-right .leaflet-control {
  margin-right: 12px;
}

.leaflet-bottom .leaflet-control {
  margin-bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--map-bottom-offset));
}

.leaflet-control-zoom,
.leaflet-control-locate {
  box-shadow: 0 4px 12px rgba(23, 33, 43, 0.12);
}

.leaflet-control-locate {
  margin-left: 0;
  margin-top: 0;
}

.leaflet-control-locate-button {
  display: flex;
  width: 28px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 4px;
  background: #ffffff;
  color: var(--ink);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1;
  padding: 0;
}

.leaflet-control-locate-button:hover {
  background: var(--panel-strong);
}

.leaflet-control-zoom a,
.leaflet-control-locate-button,
.leaflet-control-attribution {
  border-color: rgba(23, 33, 43, 0.14);
}

.leaflet-control-zoom a {
  width: 28px;
  height: 28px;
  font-size: 1rem;
  line-height: 28px;
}

.leaflet-control-attribution {
  max-width: min(62vw, 420px);
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 253, 248, 0.9);
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-marker {
  display: inline-flex;
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: var(--marker-width, auto);
  min-width: 44px;
  height: 30px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--blue);
  box-shadow: 0 8px 18px rgba(23, 33, 43, 0.26);
  color: #fff;
  line-height: 1;
  padding: 0 18px 0 9px;
}

.map-marker-glyph {
  display: grid;
  min-width: 0;
  place-items: center;
  font-size: 1.02rem;
  line-height: 1;
}

.map-marker-temp {
  display: block;
  flex: 0 0 auto;
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.map-marker-wrap {
  position: relative;
  display: inline-grid;
  width: var(--marker-width, 44px);
  height: 34px;
  place-items: center;
  overflow: visible;
}

.map-marker-count {
  position: absolute;
  z-index: 2;
  top: -4px;
  right: -4px;
  display: grid;
  width: var(--marker-count-width, 19px);
  min-width: 17px;
  height: 17px;
  place-items: center;
  padding: 0 4px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: var(--red);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 850;
  line-height: 1;
}

.map-marker.rain,
.map-marker.drizzle {
  background: var(--blue);
}

.map-marker.fair,
.map-marker.clear {
  background: var(--yellow);
}

.map-marker.snow {
  background: #769bb5;
}

.map-marker.storm {
  background: var(--red);
}

.map-marker.fog,
.map-marker.cloudy {
  background: #687681;
}

.target-marker {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 6px rgba(31, 122, 98, 0.18);
  color: #fff;
  font-weight: 900;
}

.popup-weather-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
}

.popup-weather-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--blue);
  color: #ffffff;
  font-size: 0.84rem;
  line-height: 1;
}

.popup-weather-icon.rain,
.popup-weather-icon.drizzle {
  background: var(--blue);
}

.popup-weather-icon.fair,
.popup-weather-icon.clear {
  background: var(--yellow);
}

.popup-weather-icon.snow {
  background: #769bb5;
}

.popup-weather-icon.storm {
  background: var(--red);
}

.popup-weather-icon.fog,
.popup-weather-icon.cloudy {
  background: #687681;
}

.popup-weather-copy {
  display: grid;
  min-width: 0;
  gap: 8px;
}

.popup-title {
  min-width: 0;
  overflow: visible;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.popup-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: 1px solid rgba(216, 213, 203, 0.8);
}

.popup-advanced,
.collapsible-advanced {
  margin: 4px 0 0;
  border-top: 1px solid rgba(216, 213, 203, 0.8);
}

.popup-advanced > summary,
.collapsible-advanced > summary {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 0 6px;
  color: var(--blue);
  cursor: pointer;
  font-size: 0.74rem;
  font-weight: 780;
  list-style: none;
  text-transform: uppercase;
}

.popup-advanced > summary::-webkit-details-marker,
.collapsible-advanced > summary::-webkit-details-marker {
  display: none;
}

.popup-advanced > summary::after,
.collapsible-advanced > summary::after {
  content: "+";
  margin-left: auto;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1;
}

.popup-advanced[open] > summary::after,
.collapsible-advanced[open] > summary::after {
  content: "–";
}

.popup-advanced-metrics {
  border-top: 0;
}

.popup-metric {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  min-height: 27px;
  max-width: 100%;
  gap: 8px;
  padding: 5px 0;
  border: 0;
  border-bottom: 1px solid rgba(216, 213, 203, 0.72);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.25;
}

.popup-metric::before {
  content: attr(aria-label);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 780;
  letter-spacing: 0;
  line-height: 1.1;
  text-transform: uppercase;
}

.popup-metric-glyph {
  display: none;
}

.popup-metric-text {
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.popup-carousel {
  position: relative;
  width: min(304px, calc(100vw - 34px));
  min-width: 248px;
  padding: 0;
}

.popup-page-frame {
  min-height: 150px;
}

.popup-report-page[hidden] {
  display: none;
}

.popup-page-control {
  position: absolute;
  top: 54px;
  display: grid;
  width: 26px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--blue);
  cursor: pointer;
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1;
  padding: 0;
}

.popup-page-control.previous {
  left: -18px;
}

.popup-page-control.next {
  right: -18px;
}

.popup-page-count {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 720;
  text-align: center;
}

.signal-pill[hidden] {
  display: none;
}

.popup-feedback {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.popup-review-toggle {
  justify-self: start;
  min-height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 720;
}

.popup-review-toggle:hover,
.popup-review-toggle:focus-visible {
  color: var(--blue);
  text-decoration: underline;
}

.popup-feedback-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.popup-feedback-actions[hidden] {
  display: none;
}

.popup-thumb {
  display: inline-grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  font-size: 0.98rem;
  line-height: 1;
}

.popup-thumb:disabled {
  cursor: default;
  opacity: 0.55;
}

.popup-feedback-message {
  color: var(--muted);
  font-size: 0.78rem;
}

.signal-card {
  position: fixed;
  z-index: 20;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  width: min(720px, calc(100vw - 28px));
  max-height: min(72vh, 620px);
  overflow: hidden;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.signal-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 76px;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.signal-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.signal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
}

.signal-badges {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
}

.signal-copy strong {
  overflow: hidden;
  font-size: clamp(1.25rem, 4vw, 2rem);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-scope {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 720;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 27px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.signal-age-pill {
  color: var(--muted);
  font-weight: 720;
}

.signal-details {
  display: none;
  max-height: calc(min(72vh, 620px) - 76px);
  overflow: auto;
  padding: 0 12px 12px;
}

.signal-card.expanded .signal-details {
  display: block;
}

.eyebrow {
  margin: 0;
  color: var(--blue);
  font-size: 0.73rem;
  font-weight: 750;
  letter-spacing: 0;
  text-transform: uppercase;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--yellow);
  box-shadow: 0 0 0 4px rgba(213, 161, 30, 0.16);
}

.status-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 122, 98, 0.16);
}

.status-dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 4px rgba(185, 70, 52, 0.16);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 8px;
}

.summary-grid div {
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

dt {
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.15;
}

dd {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 760;
  line-height: 1.15;
}

.feed {
  display: grid;
  gap: 6px;
}

.empty-state {
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
}

.report-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 8px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.report-row strong {
  display: block;
  margin-bottom: 2px;
  font-size: 0.9rem;
  line-height: 1.15;
}

.report-row small {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.25;
}

.report-note {
  margin-top: 3px;
  font-size: 0.78rem;
  line-height: 1.25;
}

.distance {
  color: var(--blue);
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
}

.app-message {
  position: fixed;
  z-index: 31;
  left: 50%;
  bottom: calc(max(14px, env(safe-area-inset-bottom)) + 82px);
  max-width: min(520px, calc(100vw - 28px));
  min-height: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 12px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.94);
  box-shadow: 0 8px 24px rgba(26, 34, 41, 0.14);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
}

.app-message[hidden] {
  display: none;
}

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

#app-message-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

.app-message-close {
  display: grid;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(23, 33, 43, 0.08);
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-weight: 850;
  line-height: 1;
  padding: 0;
}

.app-message-close:hover {
  background: rgba(23, 33, 43, 0.14);
}

.bottom-toolbar {
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: max(14px, env(safe-area-inset-bottom));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(620px, calc(100vw - 28px));
  padding: 8px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.toolbar-button {
  display: grid;
  min-width: 0;
  min-height: 58px;
  place-items: center;
  gap: 3px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 720;
}

.toolbar-button.primary {
  background: var(--blue);
  color: #fff;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  padding: 0 14px;
}

.secondary-button:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.skeleton-button {
  background: linear-gradient(90deg, rgba(216, 213, 203, 0.35), rgba(216, 213, 203, 0.18));
  color: var(--muted);
}

.toolbar-icon {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
}

.sheet {
  position: fixed;
  z-index: 40;
  left: 50%;
  bottom: 0;
  width: min(680px, 100vw);
  max-height: min(84vh, 760px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0 18px 18px;
  border: 1px solid rgba(23, 33, 43, 0.12);
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 253, 248, 0.98);
  box-shadow: var(--shadow);
  transform: translate(-50%, calc(100% + 10px));
  transition: transform 180ms ease;
}

.sheet.open {
  transform: translate(-50%, 0);
}

.compact-sheet {
  max-width: 460px;
}

.sheet-heading {
  position: relative;
  z-index: 1;
  margin: 0 -18px 14px;
  padding: 10px 18px 12px;
  background: linear-gradient(rgba(255, 253, 248, 0.98), rgba(255, 253, 248, 0.94));
  backdrop-filter: blur(16px);
}

.sheet-body {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.login-form {
  display: grid;
  gap: 14px;
}

.preferences-actions {
  display: grid;
  gap: 10px;
  margin-top: 6px;
}

.preferences-actions .primary-button,
.preferences-actions .secondary-button {
  margin-top: 0;
}

.sheet-handle {
  width: 46px;
  height: 5px;
  margin: 0 auto 12px;
  border-radius: 999px;
  background: var(--line);
}

.sheet-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h2,
p {
  margin-top: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.2rem;
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  cursor: pointer;
  font-size: 1.35rem;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

label,
.option-row {
  display: grid;
  gap: 7px;
}

label span,
.option-row > span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  resize: vertical;
  padding: 12px;
  line-height: 1.4;
}

.wide-field,
.option-row {
  margin-bottom: 12px;
}

.report-locality input[readonly] {
  background: var(--panel-strong);
  color: var(--ink);
  font-weight: 750;
}

.detail-grid {
  margin-bottom: 12px;
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ece9df;
}

.segmented label {
  display: block;
}

.segmented input {
  position: absolute;
  width: auto;
  height: auto;
  opacity: 0;
  pointer-events: none;
}

.segmented span {
  display: grid;
  min-height: 36px;
  place-items: center;
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
}

.segmented input:checked + span {
  background: #ffffff;
  color: var(--ink);
  box-shadow: 0 1px 7px rgba(23, 33, 43, 0.12);
}

.primary-button {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--blue);
  border-radius: 8px;
  background: var(--blue);
  color: white;
  cursor: pointer;
  font-weight: 750;
}

.form-message {
  min-height: 22px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

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

@media (max-width: 720px) {
  .signal-card {
    top: max(10px, env(safe-area-inset-top));
    width: calc(100vw - 20px);
  }

  .leaflet-top .leaflet-control {
    margin-top: calc(max(10px, env(safe-area-inset-top)) + var(--map-top-offset));
  }

  .leaflet-left .leaflet-control {
    margin-left: 10px;
  }

  .leaflet-right .leaflet-control {
    margin-right: 10px;
  }

  .leaflet-bottom .leaflet-control {
    margin-bottom: calc(max(12px, env(safe-area-inset-bottom)) + var(--map-bottom-offset));
  }

  .leaflet-control-locate {
    margin-top: 0;
    margin-left: 0;
  }

  .leaflet-control-zoom a {
    width: 26px;
    height: 26px;
    font-size: 0.95rem;
    line-height: 26px;
  }

  .leaflet-control-attribution {
    max-width: calc(100vw - 24px);
    font-size: 0.64rem;
  }

  .signal-toggle {
    min-height: 66px;
    padding: 12px;
  }

  .signal-copy strong {
    font-size: 1.25rem;
  }

  .signal-heading {
    gap: 8px;
  }

  .signal-badges {
    gap: 4px;
  }

  .signal-pill {
    min-height: 25px;
    padding: 5px 7px;
    font-size: 0.72rem;
  }

  .signal-age-pill {
    font-weight: 720;
  }

  .popup-carousel {
    width: calc(100vw - 46px);
    min-width: 0;
  }

  .popup-weather-row {
    grid-template-columns: 28px minmax(0, 1fr);
    gap: 8px;
  }

  .popup-title {
    font-size: 0.94rem;
  }

  .popup-metric {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 7px;
    font-size: 0.8rem;
  }

  .popup-page-frame {
    min-height: 148px;
  }

  .popup-page-control {
    top: 52px;
    width: 24px;
    height: 34px;
    border-color: rgba(216, 213, 203, 0.82);
    box-shadow: 0 4px 12px rgba(23, 33, 43, 0.08);
  }

  .popup-page-control.previous {
    left: -13px;
  }

  .popup-page-control.next {
    right: -13px;
  }

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

  .bottom-toolbar {
    width: calc(100vw - 18px);
    gap: 4px;
    padding: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .toolbar-button {
    min-height: 54px;
    font-size: 0.72rem;
  }

  .sheet {
    width: 100vw;
    max-height: 86vh;
    padding: 0 14px 18px;
  }

  .sheet-heading {
    margin: 0 -14px 12px;
    padding: 8px 14px 10px;
  }
}

@media (min-width: 721px) {
  .leaflet-top .leaflet-control {
    margin-top: calc(max(16px, env(safe-area-inset-top)) + var(--map-top-offset));
  }

  .leaflet-bottom .leaflet-control {
    margin-bottom: calc(max(14px, env(safe-area-inset-bottom)) + var(--map-bottom-offset));
  }

  .signal-card {
    width: min(640px, calc(100vw - 40px));
    max-height: min(64vh, 520px);
  }

  .signal-toggle {
    min-height: 68px;
    padding: 12px 14px;
  }

  .signal-copy strong {
    font-size: 1.35rem;
  }

  .signal-pill {
    min-height: 25px;
    padding: 5px 8px;
    font-size: 0.72rem;
  }

  .bottom-toolbar {
    width: min(580px, calc(100vw - 40px));
    padding: 7px;
  }

  .toolbar-button {
    min-height: 52px;
    font-size: 0.74rem;
  }

  .sheet {
    width: min(600px, calc(100vw - 40px));
    max-height: min(76vh, 640px);
    padding: 0 14px 18px;
  }

  .compact-sheet {
    width: min(420px, calc(100vw - 40px));
  }

  .sheet-heading {
    margin: 0 -14px 16px;
    padding: 8px 14px 10px;
  }

  .sheet-handle {
    margin: 10px auto 10px;
  }

  .eyebrow {
    font-size: 0.7rem;
  }

  h2 {
    font-size: 1.08rem;
  }

  .icon-button {
    width: 38px;
    height: 38px;
    font-size: 1.2rem;
  }

  .field-grid {
    gap: 10px;
  }

  input,
  select {
    height: 40px;
  }

  textarea {
    padding: 10px 12px;
  }

  .primary-button {
    min-height: 42px;
  }
}
