:root {
  color-scheme: light;
  --red: #bb4052;
  --red-dark: #923141;
  --red-soft: #fff2f4;
  --navy: #082c58;
  --navy-2: #123d6c;
  --green: #0b9465;
  --green-soft: #e7f7f1;
  --amber: #ee9c17;
  --ink: #102c4e;
  --muted: #62748a;
  --line: #d8e4ec;
  --bg: #f3f8fa;
  --white: #fff;
  --shadow: 0 14px 35px rgba(11, 42, 75, 0.1);
  --radius: 24px;
  font-family:
    Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--bg);
  font-size: 17px;
  line-height: 1.45;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

a {
  color: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 999;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  color: white;
  background: var(--navy);
  border-radius: 10px;
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: none;
}

.shell {
  width: min(100% - 28px, 720px);
  margin-inline: auto;
}

.app-shell {
  min-height: 100vh;
}

.app-view {
  min-height: 100vh;
  padding-bottom: calc(94px + env(safe-area-inset-bottom));
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.84);
}

.eyebrow.navy {
  color: var(--navy-2);
}

.eyebrow.red {
  color: var(--red);
}

.home-hero {
  position: relative;
  min-height: 304px;
  overflow: hidden;
  color: white;
  background:
    url("./assets/hospital-linares.webp") center 48% / cover no-repeat,
    var(--navy);
}

.hero-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg, rgba(4, 28, 55, 0.92), rgba(6, 39, 73, 0.45)),
    linear-gradient(0deg, rgba(8, 32, 60, 0.5), transparent 55%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  padding-top: max(18px, env(safe-area-inset-top));
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 50px;
  height: 50px;
  border: 2px solid rgba(255, 255, 255, 0.65);
  border-radius: 14px;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
}

.brand div {
  display: grid;
  line-height: 1;
}

.brand span,
.brand strong {
  font-size: 1.3rem;
  font-weight: 900;
}

.brand strong {
  color: #ffd5dc;
}

.hero-copy {
  max-width: 590px;
  padding: 42px 2px 55px;
}

.hero-copy h1 {
  max-width: 580px;
  margin: 0;
  font-size: clamp(2.25rem, 10vw, 3.7rem);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.hero-copy > p:last-child {
  max-width: 430px;
  margin: 13px 0 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.02rem;
  font-weight: 600;
}

.home-overlap {
  position: relative;
  z-index: 3;
  margin-top: -35px;
}

.emergency-strip,
.mini-emergency {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid #f1cbd2;
  border-radius: 22px;
  background: rgba(255, 250, 251, 0.98);
  box-shadow: var(--shadow);
}

.ambulance-box {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 16px;
  background: #fffbe7;
}

.ambulance-box img,
.mini-emergency > img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}

.emergency-strip > div,
.mini-emergency > div {
  display: grid;
  min-width: 0;
}

.emergency-strip > div span,
.mini-emergency > div span {
  color: var(--red);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.emergency-strip > div strong,
.mini-emergency > div strong {
  font-size: 1rem;
  line-height: 1.15;
}

.emergency-strip > a {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 12px;
  color: white;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 16px;
  background: linear-gradient(145deg, #cf5b6b, #a93749);
  box-shadow:
    0 5px 0 #7f2938,
    0 11px 22px rgba(94, 26, 40, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
  transform: translateY(-2px);
  transition:
    transform 120ms ease,
    box-shadow 120ms ease;
}

.emergency-strip > a:active {
  box-shadow:
    0 2px 0 #7f2938,
    0 5px 12px rgba(94, 26, 40, 0.2);
  transform: translateY(2px);
}

.emergency-strip > a img {
  display: block;
  width: 29px;
  height: 29px;
  object-fit: contain;
}

.call-phone {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: inset 0 -1px 2px rgba(8, 40, 78, 0.13);
  font-size: 1rem;
}

.emergency-strip > a span {
  display: grid;
  font-size: 0.72rem;
  font-weight: 800;
}

.emergency-strip > a b {
  font-size: 1.35rem;
  line-height: 1;
}

.home-content {
  padding-top: 17px;
}

.orientation-feature {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
  padding: 22px;
  color: white;
  border-radius: 26px;
  background:
    radial-gradient(circle at 100% 5%, rgba(255, 255, 255, 0.14), transparent 31%),
    linear-gradient(135deg, #0b4765 0%, #0b6575 58%, #118586 100%);
  box-shadow: 0 18px 40px rgba(7, 71, 99, 0.22);
}

.orientation-feature::after {
  position: absolute;
  top: -75px;
  right: -70px;
  width: 210px;
  height: 210px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 50%;
  content: "";
}

.orientation-symbol {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  color: var(--red);
  border-radius: 15px;
  background: white;
  font-size: 2rem;
  font-weight: 500;
}

.ecg-mark {
  display: block;
  width: 34px;
  height: 20px;
  background: currentColor;
  clip-path: polygon(
    0 46%,
    23% 46%,
    31% 59%,
    43% 8%,
    56% 88%,
    66% 46%,
    100% 46%,
    100% 58%,
    69% 58%,
    55% 100%,
    43% 32%,
    34% 73%,
    20% 58%,
    0 58%
  );
}

.orientation-feature h2 {
  margin: 0;
  font-size: clamp(1.45rem, 6vw, 2rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.orientation-feature div p:last-child {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.9rem;
}

.primary-cta {
  grid-column: 1 / -1;
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: var(--navy);
  border: 0;
  border-radius: 16px;
  background: white;
  font-weight: 900;
  cursor: pointer;
}

.primary-cta span {
  color: var(--red);
  font-size: 1.5rem;
}

.orientation-feature > small {
  grid-column: 1 / -1;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.72rem;
}

.dashboard-grid {
  display: grid;
  gap: 10px;
  margin-top: 13px;
}

.dashboard-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 86px;
  padding: 13px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: white;
  box-shadow: 0 8px 22px rgba(8, 44, 88, 0.06);
  cursor: pointer;
}

.dashboard-icon {
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border-radius: 16px;
  font-size: 1.4rem;
  font-weight: 900;
}

.hospital-icon {
  background: #eaf2fb;
}

.green-icon {
  color: var(--green);
  background: var(--green-soft);
}

.dashboard-copy {
  display: grid;
  min-width: 0;
}

.dashboard-copy small {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.dashboard-copy strong {
  overflow: hidden;
  font-size: 1.05rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-copy strong b {
  color: var(--red);
  font-size: 1.45rem;
}

.dashboard-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-arrow {
  color: #8fa0b1;
  font-size: 1.8rem;
}

.home-actions {
  display: grid;
  grid-template-columns: 1fr 58px;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
}

.install-action,
.share-action {
  min-height: 50px;
  color: var(--navy);
  border: 1px solid #bed9ca;
  border-radius: 18px;
  background: #f8fffb;
  cursor: pointer;
}

.install-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  text-align: center;
}

.install-phone {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid #c6dbe8;
  border-radius: 10px;
  background: #eef5fb;
  font-size: 1.05rem;
}

.install-action b {
  color: var(--green);
  font-size: 0.8rem;
  line-height: 1.15;
}

.install-download {
  color: var(--green);
  font-size: 1.2rem;
  font-weight: 950;
  line-height: 1;
}

.share-action {
  color: var(--green);
  font-size: 1.45rem;
  font-weight: 900;
}

.compact-section,
.education-section {
  margin-top: 30px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 7vw, 2.3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.phone-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.phone-pill {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 59px;
  padding: 8px 12px;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;
}

.phone-pill > img,
.phone-pill .emoji {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.phone-pill .emoji {
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: #f1f5f8;
  font-size: 1.3rem;
}

.phone-pill > span:nth-child(2) {
  display: grid;
}

.phone-pill b {
  font-size: 0.92rem;
}

.phone-pill small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.phone-pill > strong {
  color: var(--red);
  font-size: 0.8rem;
}

.samu-pill {
  border-color: #f2c9d0;
  background: #fffafb;
}

.education-intro {
  margin: 8px 0 13px;
  color: var(--muted);
  font-size: 0.88rem;
}

.category-list {
  display: grid;
  gap: 7px;
}

.category {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.category summary {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  list-style: none;
  cursor: pointer;
}

.category summary::-webkit-details-marker {
  display: none;
}

.category summary > span {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  border-radius: 12px;
  background: var(--navy);
  font-weight: 900;
}

.category.c1 summary > span {
  background: #b11830;
}

.category.c2 summary > span {
  background: #e35b26;
}

.category.c3 summary > span {
  color: #593c00;
  background: #f0ae23;
}

.category.c4 summary > span {
  background: #2f86bd;
}

.category.c5 summary > span {
  background: #1c966a;
}

.category summary div {
  display: grid;
}

.category summary strong {
  font-size: 0.9rem;
}

.category summary small {
  color: var(--muted);
  font-size: 0.72rem;
}

.category > p {
  margin: 0;
  padding: 0 14px 13px 66px;
  color: var(--muted);
  font-size: 0.82rem;
}

footer {
  margin-top: 34px;
}

.developer-card {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 23px;
  background: white;
  box-shadow: 0 9px 28px rgba(7, 45, 83, 0.07);
}

.developer-card > img {
  width: 66px;
  height: 66px;
  object-fit: cover;
  border: 4px solid white;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--line);
}

.developer-card div {
  display: grid;
  min-width: 0;
}

.developer-card span {
  color: var(--navy);
  font-size: 0.76rem;
  font-weight: 800;
}

.developer-card strong {
  color: #098b43;
  font-size: 1rem;
}

.developer-card p {
  margin: 2px 0 7px;
  color: var(--muted);
  font-size: 0.76rem;
}

.developer-card .portal-home-link {
  display: inline-flex;
  margin: 0 0 9px;
  color: #098b43;
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.developer-card nav {
  display: flex;
  gap: 16px;
}

.developer-card a {
  color: #098b43;
  font-size: 0.8rem;
  font-weight: 900;
  text-decoration: none;
}

.medical-note {
  margin: 14px auto 0;
  padding: 0 8px;
  color: var(--muted);
  text-align: center;
  font-size: 0.72rem;
}

.bottom-nav {
  position: fixed;
  z-index: 100;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 6px max(8px, env(safe-area-inset-right))
    calc(5px + env(safe-area-inset-bottom))
    max(8px, env(safe-area-inset-left));
  border-top: 1px solid rgba(185, 203, 215, 0.88);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 25px rgba(13, 44, 72, 0.09);
  backdrop-filter: blur(18px);
}

.bottom-nav button {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  min-width: 0;
  color: #77889a;
  border: 0;
  border-radius: 14px;
  background: transparent;
  cursor: pointer;
}

.bottom-nav button span {
  display: grid;
  width: 30px;
  height: 28px;
  place-items: center;
  font-size: 1.25rem;
}

.bottom-nav button b {
  font-size: 0.67rem;
}

.bottom-nav button.is-active {
  color: var(--red);
  background: var(--red-soft);
}

.bottom-nav .orientation-nav span {
  color: white;
  border-radius: 10px;
  background: var(--red);
  box-shadow: 0 6px 14px rgba(212, 33, 61, 0.27);
}

.bottom-nav .orientation-nav .ecg-mark {
  width: 22px;
  height: 14px;
  color: white;
}

.inner-header {
  color: white;
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, var(--red), var(--red-dark));
}

.centres-header {
  background:
    radial-gradient(circle at 85% 20%, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(135deg, var(--navy-2), var(--navy));
}

.inner-header-content {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  min-height: 125px;
  padding-top: env(safe-area-inset-top);
}

.inner-header h1 {
  margin: 0;
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  line-height: 1;
  letter-spacing: -0.045em;
}

.back-home,
.header-share {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 1.25rem;
  cursor: pointer;
}

.header-spacer {
  width: 42px;
}

.inner-content {
  padding-top: 14px;
}

.mini-emergency {
  min-height: 69px;
  padding: 8px 10px;
  border-radius: 19px;
  box-shadow: none;
}

.mini-emergency > img {
  width: 45px;
  height: 45px;
}

.mini-emergency > a {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 9px 12px;
  color: white;
  text-decoration: none;
  border-radius: 13px;
  background: var(--red);
  font-size: 0.8rem;
  font-weight: 900;
}

.mini-emergency > a img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.live-panel {
  margin-top: 13px;
}

.official-hospital-panel {
  display: grid;
  justify-items: center;
  gap: 10px;
  margin-top: 13px;
  padding: 30px 22px;
  text-align: center;
  border: 1px solid var(--line);
  border-radius: 25px;
  background: white;
  box-shadow: 0 18px 36px rgba(16, 50, 82, 0.1);
}

.official-hospital-icon {
  display: grid;
  width: 66px;
  height: 66px;
  place-items: center;
  border-radius: 20px;
  background: #fff0f3;
  font-size: 2rem;
}

.official-hospital-panel h2 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(1.75rem, 7vw, 2.35rem);
  letter-spacing: -0.05em;
}

.official-hospital-panel > p:not(.eyebrow) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.official-hospital-button {
  display: flex;
  width: min(100%, 440px);
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  padding: 16px 20px;
  color: white;
  border-radius: 17px;
  background: var(--red);
  box-shadow: 0 12px 22px rgba(186, 27, 52, 0.2);
  font-weight: 900;
  text-decoration: none;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.official-hospital-button span {
  font-size: 1.25rem;
}

.official-hospital-panel small {
  max-width: 520px;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.total-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 15px;
  padding: 22px;
  color: white;
  border-radius: 25px;
  background:
    radial-gradient(circle at 100% 5%, rgba(255, 255, 255, 0.13), transparent 31%),
    var(--red);
  box-shadow: 0 18px 36px rgba(186, 27, 52, 0.2);
}

.total-panel > div:first-child > span {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.total-panel p {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 2px 0 0;
}

.total-panel p strong {
  font-size: 4.5rem;
  line-height: 0.95;
  letter-spacing: -0.08em;
}

.total-panel p b {
  font-size: 1rem;
}

.source-status {
  align-self: start;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 900;
}

.source-status i {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 3px;
  border-radius: 50%;
  background: #4de1ac;
  box-shadow: 0 0 0 5px rgba(77, 225, 172, 0.15);
}

.source-status.error i {
  background: #ffcf65;
}

.updated-row {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.22);
  font-size: 0.78rem;
  font-weight: 700;
}

.refresh-button {
  flex: 0 0 auto;
  padding: 9px 12px;
  color: var(--red);
  border: 0;
  border-radius: 13px;
  background: white;
  font-size: 0.78rem;
  font-weight: 900;
}

.areas {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.area-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  min-height: 76px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.area-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 15px;
  background: #eef4fb;
}

.area-icon::before {
  font-size: 1.45rem;
}

.adults-icon::before {
  content: "👤";
}

.children-icon {
  background: #eaf9fb;
}

.children-icon::before {
  content: "🧒";
}

.maternity-icon {
  background: #fff0f6;
}

.maternity-icon::before {
  content: "🤰";
}

.area-main {
  display: grid;
}

.area-main strong {
  font-size: 1.08rem;
}

.area-main span {
  color: var(--muted);
  font-size: 0.76rem;
}

.area-main span b:first-child {
  color: var(--amber);
}

.area-main span b:last-child {
  color: var(--green);
}

.area-total {
  color: var(--navy);
  font-size: 2.2rem;
  letter-spacing: -0.06em;
}

.live-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
}

.live-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
}

.live-actions p span {
  color: var(--green);
}

.live-actions button {
  flex: 0 0 auto;
  padding: 8px 10px;
  color: var(--navy);
  border: 0;
  border-radius: 11px;
  background: #edf4fa;
  font-size: 0.72rem;
  font-weight: 900;
}

.source-error {
  display: grid;
  gap: 3px;
  margin-top: 9px;
  padding: 12px;
  color: #7d3d00;
  border: 1px solid #f2d39a;
  border-radius: 15px;
  background: #fff8e9;
  font-size: 0.8rem;
}

.source-error a {
  margin-top: 4px;
  font-weight: 900;
}

.orientation-note {
  margin: 12px 4px;
  color: var(--muted);
  font-size: 0.76rem;
}

.hospital-location-card {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.hospital-location-card > img {
  width: 108px;
  height: 100%;
  min-height: 145px;
  object-fit: cover;
}

.hospital-location-card > div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 13px;
}

.hospital-location-card strong {
  font-size: 1rem;
  line-height: 1.15;
}

.hospital-location-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.hospital-location-card div div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  font-size: 0.72rem;
}

.hospital-location-card a {
  color: var(--red);
  font-weight: 900;
}

.status-chip {
  width: fit-content;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 900;
}

.status-chip.open {
  color: #08744e;
  background: var(--green-soft);
}

.status-chip.closed {
  color: #9d2739;
  background: var(--red-soft);
}

.location-panel {
  display: grid;
  gap: 12px;
  padding: 17px;
  border: 1px solid #cbdfe9;
  border-radius: 21px;
  background: white;
}

.location-panel strong {
  font-size: 1rem;
}

.location-panel p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.79rem;
}

.location-panel button {
  min-height: 46px;
  color: white;
  border: 0;
  border-radius: 14px;
  background: var(--navy);
  font-weight: 900;
}

.location-help {
  margin: 8px 3px 12px;
  color: var(--muted);
  font-size: 0.75rem;
}

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

.facility-card {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  overflow: hidden;
  min-height: 155px;
  border: 1px solid var(--line);
  border-radius: 21px;
  background: white;
  box-shadow: 0 9px 24px rgba(11, 42, 75, 0.06);
}

.facility-card > img {
  width: 112px;
  height: 100%;
  object-fit: cover;
}

.facility-content {
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 13px;
}

.facility-title-row {
  display: grid;
  gap: 5px;
}

.facility-title-row h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.15;
}

.facility-hours,
.facility-address {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.facility-hours {
  color: var(--navy);
  font-weight: 800;
}

.facility-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 6px;
}

.distance {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.map-link {
  padding: 7px 8px;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  background: var(--navy);
  font-size: 0.69rem;
  font-weight: 900;
}

.questionnaire {
  position: fixed;
  z-index: 300;
  inset: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  color: var(--ink);
  background: var(--bg);
  box-shadow: 0 0 80px rgba(8, 40, 78, 0.2);
}

.questionnaire.is-opening {
  animation: questionnaire-rise 300ms cubic-bezier(0.22, 0.8, 0.32, 1) both;
  will-change: transform;
}

@keyframes questionnaire-rise {
  from {
    opacity: 0.96;
    transform: translateY(100%);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.orientation-open {
  overflow: hidden;
}

.questionnaire-header {
  position: relative;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
  padding: max(10px, env(safe-area-inset-top)) 14px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.questionnaire-header > div {
  display: grid;
  gap: 5px;
}

.questionnaire-header span {
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
  font-weight: 800;
}

.progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e4ebf0;
}

.progress-track i {
  display: block;
  width: 12%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--red), #ef5c72);
  transition: width 180ms ease;
}

.question-icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: white;
  font-size: 1.3rem;
}

#orientation-close {
  position: absolute;
  z-index: 3;
  top: max(10px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right));
}

.questionnaire-samu {
  display: grid;
  grid-template-columns: 35px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 5px 16px;
  color: var(--red-dark);
  text-decoration: none;
  border-bottom: 1px solid #f1cbd2;
  background: #fff8f9;
  font-size: 0.72rem;
}

.questionnaire-samu img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}

.questionnaire-samu strong {
  padding: 5px 9px;
  color: white;
  border-radius: 9px;
  background: var(--red);
}

.question-body {
  width: min(100%, 720px);
  margin-inline: auto;
  overflow-y: auto;
  padding: 24px 17px 32px;
  outline: none;
}

.question-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 8.7vw, 3.2rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
}

.question-copy > p:last-child {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.choice-list,
.choice-grid,
.symptom-list {
  display: grid;
  gap: 9px;
  margin-top: 23px;
}

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

.symptom-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.symptom-list .choice-button {
  min-height: 82px;
  align-content: center;
  padding: 10px 11px;
}

.symptom-list .choice-button span {
  font-size: 0.82rem;
  line-height: 1.22;
}

.symptom-list .choice-button b {
  display: none;
}

.choice-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 61px;
  padding: 12px 15px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
  box-shadow: 0 5px 15px rgba(8, 44, 88, 0.04);
  cursor: pointer;
}

.choice-button span {
  font-size: 1rem;
  font-weight: 850;
}

.choice-button small {
  grid-column: 1;
  color: var(--muted);
}

.choice-button b {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--red);
  font-size: 1.5rem;
}

.danger-list {
  display: grid;
  gap: 8px;
  margin: 18px 0;
  padding: 0;
  list-style: none;
}

.danger-list li {
  position: relative;
  padding: 10px 12px 10px 35px;
  border: 1px solid #f0d2d7;
  border-radius: 14px;
  background: white;
  font-size: 0.84rem;
  font-weight: 700;
}

.danger-list li::before {
  position: absolute;
  top: 10px;
  left: 12px;
  color: var(--red);
  content: "!";
  font-weight: 950;
}

.answer-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}

.answer {
  min-height: 54px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: white;
  font-weight: 900;
}

.answer.yes {
  color: white;
  border-color: var(--red);
  background: var(--red);
}

.answer.no {
  color: white;
  border-color: var(--green);
  background: var(--green);
}

.answer.unknown {
  color: var(--navy);
  background: #edf3f8;
}

.clinical-question {
  padding-top: 4vh;
}

.large-answers {
  margin-top: 30px;
}

.large-answers .answer {
  min-height: 64px;
  font-size: 1.05rem;
}

.questionnaire-note {
  margin: 0;
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--line);
  background: white;
  font-size: 0.66rem;
}

.result-card {
  position: relative;
  overflow: hidden;
  padding: 24px 21px;
  color: white;
  border-radius: 26px;
  background: linear-gradient(135deg, var(--navy-2), var(--navy));
  box-shadow: var(--shadow);
}

.result-card.critical {
  background: linear-gradient(135deg, var(--red), var(--red-dark));
}

.result-card.urgent {
  background: linear-gradient(135deg, #cb591e, #9f3818);
}

.result-card.same-day {
  color: var(--navy);
  background: linear-gradient(135deg, #ffe38c, #ffc84b);
}

.result-card.primary {
  background: linear-gradient(135deg, #0e9868, #08704e);
}

.result-card.support {
  background: linear-gradient(135deg, #6948a5, #443074);
}

.result-symbol {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 13px;
  place-items: center;
  color: var(--navy);
  border-radius: 16px;
  background: white;
  font-size: 1.5rem;
  font-weight: 950;
}

.result-card .eyebrow {
  color: rgba(255, 255, 255, 0.82);
}

.result-card.same-day .eyebrow {
  color: #7e4b00;
}

.result-card h1 {
  margin: 0;
  font-size: clamp(2rem, 8vw, 3rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.result-destination {
  display: block;
  margin-top: 10px;
  font-size: 0.92rem;
}

.result-card > p:last-child {
  margin: 12px 0 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: 0.88rem;
}

.result-card.same-day > p:last-child {
  color: #5e4309;
}

.result-call {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 11px;
  padding: 11px;
  text-decoration: none;
  border: 1px solid #f1c9d0;
  border-radius: 19px;
  background: white;
}

.result-call img {
  width: 50px;
  height: 50px;
  object-fit: contain;
}

.result-call > span {
  display: grid;
}

.result-call small {
  color: var(--muted);
}

.result-call > strong {
  padding: 9px 11px;
  color: white;
  border-radius: 12px;
  background: var(--red);
  font-size: 0.78rem;
}

.health-call {
  grid-template-columns: minmax(0, 1fr) auto;
  border-color: #ccdcea;
}

.result-call-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 11px;
}

.result-call-grid a {
  display: grid;
  min-height: 75px;
  align-content: center;
  padding: 11px;
  text-decoration: none;
  border: 1px solid #d9cfeb;
  border-radius: 17px;
  background: white;
}

.result-call-grid span {
  color: var(--muted);
  font-size: 0.75rem;
}

.result-notice {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #075e42;
  border-radius: 13px;
  background: var(--green-soft);
  font-size: 0.8rem;
  font-weight: 750;
}

.result-notice.fallback {
  color: #754500;
  background: #fff3d5;
}

.result-facility {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  overflow: hidden;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: white;
}

.result-facility > img {
  width: 105px;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
}

.result-facility > div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px;
}

.result-facility strong {
  font-size: 1rem;
  line-height: 1.15;
}

.result-facility p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

.result-facility div div {
  display: grid;
  gap: 7px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
}

.result-facility a {
  width: fit-content;
  padding: 7px 9px;
  color: white;
  text-decoration: none;
  border-radius: 10px;
  background: var(--navy);
  font-weight: 900;
}

.result-live-count {
  display: grid;
  grid-template-columns: 1fr auto;
  width: 100%;
  gap: 2px 10px;
  margin-top: 9px;
  padding: 13px 14px;
  text-align: left;
  border: 1px solid #efccd2;
  border-radius: 16px;
  background: #fff7f8;
}

.result-live-count span {
  color: var(--red);
  font-size: 0.74rem;
  font-weight: 900;
}

.result-live-count strong {
  grid-row: 1 / span 2;
  grid-column: 2;
  color: var(--red);
  font-size: 1.15rem;
}

.result-live-count small {
  color: var(--muted);
}

.aps-options {
  margin-top: 11px;
  padding: 15px;
  border: 1px solid #c8e5d9;
  border-radius: 18px;
  background: white;
}

.aps-options ul {
  display: grid;
  gap: 5px;
  margin: 9px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 0.82rem;
}

.result-details {
  margin-top: 11px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: white;
}

.result-details summary {
  font-size: 0.84rem;
  font-weight: 900;
  cursor: pointer;
}

.result-details p {
  color: var(--muted);
  font-size: 0.8rem;
}

.result-footer-actions {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.result-footer-actions button {
  min-height: 49px;
  color: var(--navy);
  border: 1px solid #c6d7e3;
  border-radius: 14px;
  background: white;
  font-weight: 900;
}

.result-footer-actions button:first-child:not(:last-child) {
  color: white;
  border-color: var(--navy);
  background: var(--navy);
}

.result-disclaimer {
  margin: 14px 4px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.7rem;
}

.modal-backdrop {
  position: fixed;
  z-index: 500;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
  background: rgba(3, 22, 43, 0.66);
  backdrop-filter: blur(7px);
}

.install-modal {
  position: relative;
  width: min(100%, 430px);
  padding: 25px;
  border-radius: 26px;
  background: white;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

.install-modal > img {
  display: block;
  margin: 0 auto;
  border-radius: 18px;
}

.install-modal h2 {
  margin: 14px 0 8px;
  text-align: center;
  font-size: 1.55rem;
  line-height: 1.1;
}

.install-modal p,
.install-modal li {
  color: var(--muted);
  font-size: 0.9rem;
}

.install-modal ol {
  display: grid;
  gap: 10px;
  padding-left: 24px;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 0;
  border-radius: 12px;
  background: #edf3f7;
  font-size: 1.2rem;
}

.modal-primary {
  width: 100%;
  min-height: 50px;
  margin-top: 8px;
  color: white;
  border: 0;
  border-radius: 15px;
  background: var(--green);
  font-weight: 900;
}

.urgency-status-modal {
  position: relative;
  width: min(100%, 850px);
  max-height: min(90vh, 740px);
  overflow: auto;
  padding: 30px 22px 24px;
  border-radius: 26px;
  background: white;
  box-shadow: 0 25px 70px rgba(0, 0, 0, 0.28);
}

.urgency-status-modal h2 { margin: 3px 38px 7px 0; color: var(--navy); font-size: clamp(1.45rem, 5vw, 2rem); }
.urgency-status-intro, .urgency-status-note, .urgency-status-updated { color: var(--muted); font-size: .85rem; line-height: 1.45; }
.urgency-status-loading, .urgency-status-error { padding: 14px; border-radius: 14px; background: #edf3f7; color: var(--navy); font-weight: 700; }
.urgency-status-error { background: #fff0f3; color: #9d1830; }
.urgency-total { display: flex; align-items: baseline; justify-content: space-between; margin: 18px 0 10px; padding: 15px 18px; border-radius: 16px; background: var(--navy); color: white; font-weight: 800; }
.urgency-total strong { font-size: 2rem; }
.urgency-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
.urgency-table-wrap table { width: 100%; min-width: 620px; border-collapse: collapse; }
.urgency-table-wrap th, .urgency-table-wrap td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: center; font-size: .82rem; }
.urgency-table-wrap thead { background: #eaf2fb; color: var(--navy); }
.urgency-table-wrap tbody tr:last-child th, .urgency-table-wrap tbody tr:last-child td { border-bottom: 0; }
.urgency-table-wrap tbody th { color: var(--navy); text-align: left; }
.urgency-status-actions { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; margin-top: 15px; }
.urgency-status-actions .modal-primary { margin: 0; }
.urgency-status-actions a { color: var(--navy); font-size: .82rem; font-weight: 800; text-align: center; }

.ios-share {
  color: #1476db;
  font-size: 1.25rem;
}

.toast {
  position: fixed;
  z-index: 700;
  right: 16px;
  bottom: calc(86px + env(safe-area-inset-bottom));
  left: 16px;
  width: fit-content;
  max-width: min(430px, calc(100% - 32px));
  margin-inline: auto;
  padding: 11px 14px;
  color: white;
  text-align: center;
  border-radius: 14px;
  background: #0a2849;
  box-shadow: var(--shadow);
  font-size: 0.8rem;
  font-weight: 800;
}

@media (min-width: 560px) {
  .home-hero {
    min-height: 360px;
  }

  .hero-copy {
    padding-top: 65px;
  }

  .emergency-strip > a img {
    width: 35px;
    height: 35px;
  }

  .dashboard-grid,
  .phone-grid,
  .choice-grid {
    grid-template-columns: 1fr 1fr;
  }

  .location-panel {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .location-panel button {
    padding-inline: 18px;
  }

  .facility-card {
    grid-template-columns: 180px minmax(0, 1fr);
  }

  .facility-card > img {
    width: 180px;
  }

  .facility-title-row {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .result-footer-actions {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 721px) {
  .questionnaire {
    top: 18px;
    right: calc((100vw - 720px) / 2);
    bottom: 18px;
    left: calc((100vw - 720px) / 2);
    border-radius: 30px;
    overflow: hidden;
  }
}

@media (max-width: 374px) {
  body {
    font-size: 16px;
  }

  .shell {
    width: min(100% - 20px, 720px);
  }

  .hero-copy h1 {
    font-size: 2.15rem;
  }

  .emergency-strip {
    gap: 7px;
    padding: 8px;
  }

  .ambulance-box {
    width: 46px;
    height: 46px;
  }

  .emergency-strip > a {
    padding-inline: 9px;
  }

  .orientation-feature {
    padding: 18px;
  }

  .facility-card {
    grid-template-columns: 95px minmax(0, 1fr);
  }

  .facility-card > img {
    width: 95px;
  }

  .answer-row {
    gap: 5px;
  }
}

@media (max-width: 359px) {
  .symptom-list {
    grid-template-columns: 1fr;
  }

  .symptom-list .choice-button {
    min-height: 58px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
