[hidden] { display: none !important; }
:root {
  --ground: #eef2ea;
  --ink: #1f3a2b;
  --muted: #3d5446;
  --accent: #e25c3b;
  --accent-press: #c4472a;
  --accent-deep: #a93b21;
  --surface: #b9d3a8;
  --paper: #fbfcf9;
  --track: rgba(31, 58, 43, 0.13);
  --line: rgba(31, 58, 43, 0.18);
  --shadow: 0 1px 0 rgba(31, 58, 43, 0.08), 0 8px 24px -12px rgba(31, 58, 43, 0.35);
  --r: 6px;
  --content: 1200px;
  --sans: 'Alegreya Sans', 'Segoe UI', system-ui, sans-serif;
  --hand: 'Kalam', 'Comic Neue', cursive;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
@media (min-width: 1600px) { :root { --content: 1360px; } }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 18px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration-color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
@media (hover: hover) { a:hover { text-decoration-color: var(--accent-press); text-decoration-thickness: 3px; } }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: calc(var(--content) + 80px); margin: 0 auto; padding: 0 20px; }
@media (min-width: 768px) { .wrap { padding: 0 40px; } }

.skip { position: absolute; left: 12px; top: -60px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: var(--r); z-index: 10; }
.skip:focus { top: 12px; }

/* header */
.top { padding: 14px 0; max-width: calc(var(--content) + 80px); margin: 0 auto; }
.top-in { display: flex; align-items: center; gap: 24px; min-height: 48px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 24px; letter-spacing: -0.01em; text-decoration: none; min-height: 44px; }
.mark { position: relative; width: 30px; height: 20px; background: var(--accent); clip-path: polygon(30% 0, 100% 0, 100% 100%, 30% 100%, 0 50%); transform: rotate(-8deg); }
.mark::after { content: ""; position: absolute; left: 8px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--ground); }
.site-nav { display: none; gap: 4px; margin-left: auto; }
.site-nav a { padding: 10px 12px; font-weight: 500; text-decoration: none; border-radius: var(--r); }
@media (hover: hover) { .site-nav a:hover { color: var(--ink); background: rgba(185, 211, 168, 0.6); } }
.top .btn-sm { margin-left: auto; }
@media (min-width: 900px) {
  .site-nav { display: flex; }
  .top .btn-sm { margin-left: 8px; }
}

/* buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: var(--r);
  font: 700 19px/1 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.12s ease;
}
.btn-primary { background: var(--accent-press); color: #fff; }
@media (hover: hover) { .btn-primary:hover { background: var(--accent-deep); color: #fff; } }
.btn:active { transform: scale(0.96); }
.btn-sm { min-height: 44px; padding: 0 16px; font-size: 17px; }
.btn-block { width: 100%; }
@media (hover: hover) { .link-strong:hover { text-decoration-color: var(--accent-press); text-decoration-thickness: 3px; } }
.link-strong {
  display: inline-flex; align-items: center; min-height: 44px;
  font: 700 19px/1 var(--sans); color: var(--ink); background: none; border: 0; padding: 0; cursor: pointer;
  text-decoration: underline; text-decoration-color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 5px;
}

/* hero */
.hero { padding: 20px 0 48px; }
.hero-in { display: grid; gap: 36px; }
h1 { font-size: clamp(46px, 12vw, 82px); line-height: 1.03; font-weight: 700; letter-spacing: -0.012em; max-width: 11ch; }
.lede { margin-top: 18px; font-size: 21px; line-height: 1.4; max-width: 30ch; text-wrap: pretty; }
.facts { margin-top: 24px; display: grid; gap: 10px; }
.facts div { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--line); }
.facts dt { font-size: 15px; font-weight: 700; color: var(--muted); }
.facts dd { font-size: 18px; }
.facts strong { font-size: 24px; font-weight: 700; }
.cta-row { margin-top: 26px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

@media (min-width: 1000px) {
  .hero { padding: 16px 0 40px; min-height: calc(100svh - 76px); display: grid; align-items: center; }
  .hero-in { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: center; }
  .lede { font-size: 23px; }
}

/* ward board */
.board { background: var(--surface); border-radius: var(--r); padding: 14px 0 16px; min-width: 0; }
.board-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 0 16px 12px; }
.board-title { font-size: 22px; font-weight: 700; }
.board-meta { font-size: 15px; font-weight: 500; line-height: 1.25; text-align: right; display: flex; flex-direction: column; }
.board-cards {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 84%);
  gap: 12px; padding: 4px 16px 8px; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: thin; scrollbar-color: rgba(31, 58, 43, 0.35) transparent;
}
.board-cards:focus-visible { outline-offset: -3px; }
@media (min-width: 640px) {
  .board-cards { grid-auto-flow: row; grid-template-columns: 1fr 1fr; overflow: visible; }
}
@media (min-width: 1000px) {
  .board { padding: 18px 0 18px; }
  .board-head { padding: 0 20px 14px; }
  .board-cards { gap: 14px; padding: 0 20px; }
}

.pcard { scroll-snap-align: start; perspective: 1200px; }
.pcard-in { display: grid; height: 100%; transform-style: preserve-3d; transition: transform 0.7s var(--ease); }
.face {
  grid-area: 1 / 1; background: var(--paper); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 14px 16px 14px; backface-visibility: hidden; -webkit-backface-visibility: hidden;
  display: flex; flex-direction: column;
}
.back { transform: rotateY(180deg); align-items: flex-start; justify-content: center; gap: 10px; }
.pcard.flipped .pcard-in { transform: rotateY(180deg); }
.pc-top { display: flex; justify-content: space-between; gap: 8px; font-size: 15px; }
.bed { font-weight: 700; color: var(--ink); }
.adm { color: var(--muted); }
.pname { margin-top: 6px; font-size: 20px; font-weight: 700; line-height: 1.15; }
.nick { font-family: var(--hand); font-weight: 400; font-size: 0.95em; margin-left: 4px; white-space: nowrap; }
.dx { font-family: var(--hand); font-size: 18px; line-height: 1.3; margin-top: 8px; color: var(--ink); }
.vitals { margin-top: 10px; display: grid; gap: 6px; }
.vitals li { display: grid; grid-template-columns: 74px 1fr; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--muted); }
.bar {
  --fill: var(--ink);
  position: relative; display: block; height: 10px;
  background: repeating-linear-gradient(90deg, var(--track) 0 calc(10% - 3px), transparent 0 10%);
}
.bar::after {
  content: ""; position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, var(--fill) 0 calc(10% - 3px), transparent 0 10%);
  clip-path: inset(0 calc(100% - var(--v) * 10% + 2px) 0 0);
}
.bar.low { --fill: var(--accent); }
.eta { margin-top: auto; padding-top: 10px; font-size: 15px; color: var(--muted); }
.eta b { color: var(--ink); font-size: 20px; font-weight: 700; margin-left: 2px; font-variant-numeric: tabular-nums; }
.stamp {
  display: inline-block; color: var(--accent-press); border: 3px solid var(--accent);
  border-radius: var(--r); padding: 6px 12px 4px; font-weight: 700; font-size: 26px; line-height: 1.05;
  text-transform: uppercase; letter-spacing: 0.02em; transform: rotate(-4deg); transform-origin: left center;
}
.back .pname { margin-top: 8px; }
.back .dx { font-size: 19px; }
.back .eta { margin-top: 0; padding-top: 0; }

/* number strip */
.strip { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.strip-in { display: grid; grid-template-columns: 1fr 1fr; }
.strip p { padding: 20px 0; display: flex; flex-direction: column; gap: 4px; }
.strip p:nth-child(odd) { padding-right: 16px; border-right: 1px solid var(--line); }
.strip p:nth-child(even) { padding-left: 16px; }
.strip p:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
.strip b { font-variant-numeric: tabular-nums; font-size: 40px; font-weight: 700; line-height: 1.05; letter-spacing: -0.005em; }
.strip span { font-size: 16px; color: var(--muted); line-height: 1.3; }
@media (min-width: 900px) {
  .strip-in { grid-template-columns: repeat(4, 1fr); }
  .strip p { padding: 28px 24px; border: 0 !important; }
  .strip p:nth-child(n) { padding-left: 24px; padding-right: 24px; }
  .strip p + p { border-left: 1px solid var(--line) !important; }
  .strip p:first-child { padding-left: 0; }
  .strip b { font-variant-numeric: tabular-nums; font-size: 56px; }
}

/* sections shared */
section h2 { font-size: clamp(34px, 8vw, 52px); line-height: 1.08; font-weight: 700; letter-spacing: -0.008em; max-width: 20ch; text-wrap: balance; }
.sub { margin-top: 12px; font-size: 19px; max-width: 52ch; color: var(--muted); text-wrap: pretty; }
.track p, .notes p, .where p, .beds .dx, .form-note, .aside, figcaption { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }
.ward-photo img, .price-photo img, .dis-photo img { outline: 1px solid rgba(0, 0, 0, 0.08); outline-offset: -1px; }
.ward { padding: 64px 0 72px; }
.admission { padding: 64px 0; }
.prices { padding: 72px 0 48px; }
.discharged { padding: 48px 0 72px; }
@media (min-width: 1000px) {
  .ward { padding: 96px 0 120px; }
  .admission { padding: 88px 0 96px; }
  .prices { padding: 120px 0 56px; }
  .discharged { padding: 72px 0 120px; }
}
.cap, figcaption { margin-top: 10px; font-size: 17px; font-style: italic; color: var(--muted); line-height: 1.35; }

/* ward */
.ward-in { width: 100%; max-width: calc(var(--content) + 80px); margin: 0 auto; padding: 0 20px; display: grid; gap: 32px; }
.ward-photo img { border-radius: var(--r); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ward-list h2 { max-width: 14ch; }
.beds { margin-top: 28px; display: grid; gap: 20px; }
.beds li { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; }
.bn { font-size: 34px; font-weight: 700; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.beds h3 { font-size: 20px; font-weight: 700; line-height: 1.2; }
.beds .dx { margin-top: 2px; }
.when { margin-top: 2px; font-size: 15px; color: var(--muted); font-weight: 500; }
.aside { margin-top: 26px; font-size: 17px; color: var(--muted); font-style: italic; }
@media (min-width: 768px) { .ward-in { padding: 0 40px; } }
@media (min-width: 1000px) {
  .ward-in { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 64px; align-items: stretch; }
  .ward-photo { display: flex; }
  .ward-photo picture { display: block; width: 100%; }
  .ward-photo img { height: 100%; min-height: 620px; aspect-ratio: auto; object-position: 30% center; }
}
@media (min-width: 1280px) {
  .ward-in { max-width: none; padding-left: 0; padding-right: max(40px, calc((100% - var(--content)) / 2)); gap: 80px; }
  .ward-photo img { border-radius: 0 var(--r) var(--r) 0; }
}

/* admission track */
.admission { background: var(--paper); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.track { margin-top: 36px; display: grid; gap: 28px; }
.track li { display: grid; grid-template-columns: 1fr; align-content: start; }
.track h3 { font-size: 22px; font-weight: 700; line-height: 1.2; }
.track p { margin-top: 8px; font-size: 17px; line-height: 1.5; color: var(--muted); max-width: 46ch; }
@media (min-width: 1000px) {
  .track { grid-template-columns: repeat(4, 1fr); gap: 40px; margin-top: 44px; }
}

/* prices */
.price-grid { margin-top: 40px; display: grid; gap: 20px; }
.price-photo img { border-radius: var(--r); width: 100%; aspect-ratio: 1; object-fit: cover; }
.price-group { background: var(--paper); border-radius: var(--r); padding: 22px 20px 12px; box-shadow: var(--shadow); }
.price-group h3 { font-size: 22px; font-weight: 700; padding-bottom: 6px; }
.price-group li { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; }
.price-group li + li { border-top: 1px dashed var(--line); }
.price-group li span { font-size: 18px; line-height: 1.3; }
.price-group small { display: block; font-size: 15px; color: var(--muted); margin-top: 2px; }
.price-group b { font-size: 24px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.price-group em { font-style: normal; font-size: 15px; font-weight: 500; color: var(--muted); }
.price-group b em { margin-right: 3px; }
@media (min-width: 760px) {
  .price-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1100px) {
  .price-grid { grid-template-columns: 1fr 1fr 1.05fr; grid-template-rows: auto auto; gap: 24px; }
  .price-photo { grid-column: 3; grid-row: 1 / span 2; display: flex; flex-direction: column; }
  .price-photo picture, .price-photo > img { flex: 1; }
  .price-photo img { aspect-ratio: auto; height: 100%; min-height: 0; object-position: 65% center; }
  .price-group:nth-of-type(1) { grid-column: 1; grid-row: 1; }
  .price-group:nth-of-type(2) { grid-column: 2; grid-row: 1; }
  .price-group:last-child { grid-column: 1 / span 2; grid-row: 2; }
  .price-group:last-child ul { display: grid; grid-template-columns: 1fr 1fr; column-gap: 40px; }
  .price-group:last-child li + li { border-top: 0; }
  .price-group:last-child li:nth-child(n+3) { border-top: 1px dashed var(--line); }
}

/* discharged */
.dis-grid { margin-top: 32px; display: grid; gap: 32px; }
.dis-photo { max-width: 560px; }
.dis-photo img { border-radius: var(--r); width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: center 40%; }
.notes { display: grid; gap: 28px; align-content: start; }
.notes blockquote { border-top: 2px solid var(--ink); padding-top: 14px; }
.notes p { font-size: 21px; line-height: 1.4; font-weight: 500; }
.notes footer { margin-top: 12px; font-size: 16px; font-weight: 700; }
.notes footer span { font-weight: 400; color: var(--muted); }
@media (min-width: 640px) and (max-width: 1099px) {
  .dis-grid { grid-template-columns: 1fr 1fr; }
  .dis-photo { grid-column: 1 / -1; }
}
@media (min-width: 1100px) {
  .dis-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 440px) minmax(0, 1fr); gap: 48px; margin-top: 44px; align-items: start; }
  .dis-photo { grid-column: 2; grid-row: 1; max-width: none; }
  .dis-photo img { aspect-ratio: 2 / 3; }
  .notes-a { grid-column: 1; grid-row: 1; padding-top: 8px; }
  .notes-b { grid-column: 3; grid-row: 1; padding-top: 160px; }
  .notes { gap: 48px; }
}

/* visiting */
.visiting { background: var(--surface); padding-top: 72px; }
.vis-in { display: grid; gap: 40px; padding-bottom: 64px; }
.hours { margin-top: 28px; display: grid; }
.hours div { display: grid; grid-template-columns: 1fr; gap: 2px; padding: 14px 0; border-top: 1px solid rgba(31, 58, 43, 0.25); }
.hours dt { font-weight: 700; font-size: 19px; }
.hours dd { font-size: 19px; }
.ward-note {
  margin-top: 28px; max-width: 34ch; padding: 14px 18px 12px; background: var(--paper);
  font-family: var(--hand); font-size: 19px; line-height: 1.35; color: var(--ink);
  transform: rotate(-1.2deg); box-shadow: 0 1px 0 rgba(31, 58, 43, 0.08), 0 6px 14px -8px rgba(31, 58, 43, 0.4);
  position: relative;
}
.ward-note::before { content: ""; position: absolute; top: -9px; left: 50%; width: 72px; height: 18px; margin-left: -36px; background: rgba(226, 92, 59, 0.55); transform: rotate(2deg); }
.ward-note span { display: block; margin-top: 4px; text-align: right; }
.where { margin-top: 32px; }
.addr { margin-top: 0; font-size: 24px; line-height: 1.25; font-weight: 500; }
.where p { margin-top: 10px; }
.routes { margin-top: 16px; display: grid; gap: 10px; }
.routes b { display: inline-block; min-width: 0; margin-right: 6px; }
.mail { margin-top: 20px !important; }
.mail a { font-weight: 700; display: inline-block; padding: 8px 0; }
@media (min-width: 640px) {
  .hours div { grid-template-columns: 210px 1fr; gap: 16px; }
}
@media (min-width: 1000px) {
  .visiting { padding-top: 112px; }
  .vis-in { grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 80px; padding-bottom: 96px; align-items: start; }
}

.book { background: var(--paper); border-radius: var(--r); padding: 26px 20px; box-shadow: var(--shadow); }
@media (min-width: 640px) { .book { padding: 32px 32px; } }
.book h3 { font-size: 28px; font-weight: 700; line-height: 1.1; }
.form-note { margin-top: 6px; color: var(--muted); font-size: 17px; }
.field { margin-top: 18px; display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: 17px; }
.field input:hover, .field select:hover { border-color: var(--ink); }
.field input, .field select {
  width: 100%; min-height: 50px; padding: 10px 14px; font: 400 18px/1.3 var(--sans); color: var(--ink);
  background: #fff; border: 1.5px solid #6b7f71; border-radius: var(--r);
}
.field select {
  appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat;
}
.field input::placeholder { color: #5d7064; }
.field input:focus-visible, .field select:focus-visible { outline: 3px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
.field input[aria-invalid="true"] { border-color: var(--accent-press); }
.err { font-size: 15px; font-weight: 700; color: #a3361d; }
.book .btn-block { margin-top: 24px; }
.book-done { outline: none; }
.book-done .draft-label { display: block; margin-top: 14px; font-size: 15px; color: var(--muted); }
.book-done .draft { display: block; width: 100%; resize: vertical; border: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; margin: 14px 0 0; padding: 12px 14px; background: var(--ground); border-radius: 6px; font: 15px/1.5 ui-monospace, Menlo, Consolas, monospace; color: var(--ink); user-select: all; }
.book-done .stamp-sm { font-size: 22px; }
.done-title { margin-top: 20px; }
.book-done p:not(.stamp) { margin-top: 10px; font-size: 18px; }
.link-strong { margin-top: 14px; }

.foot { border-top: 1px solid rgba(31, 58, 43, 0.25); }
.foot-in { display: grid; gap: 18px; padding-top: 28px; padding-bottom: 32px; font-size: 16px; line-height: 1.45; }
.foot-brand { display: flex; gap: 12px; align-items: flex-start; }
.foot-brand .mark { flex: none; margin-top: 3px; }
.foot-brand b { font-size: 20px; }
.foot a { display: inline-block; padding: 6px 0; font-weight: 700; }
@media (min-width: 760px) { .foot-in { grid-template-columns: repeat(4, auto); justify-content: space-between; } }

/* scroll reveal: CSS scroll-driven, readable at its from-state */
@keyframes rise { from { transform: translateY(20px); opacity: 0.9; } to { transform: none; opacity: 1; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .reveal { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pcard-in, .btn { transition: none; }
}
.nw { white-space: nowrap; }
.pname .nick { display: block; margin-left: 0; margin-top: 1px; font-size: 19px; line-height: 1.2; }
