:root {
  --sand: #f9f3e8;
  --sand-2: #f3e5cc;
  --water: #5fc3e7;
  --water-deep: #2f7aa6;
  --foam: #f7fcff;
  --text: #12334a;
  --muted: #4a6a7f;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: rgba(255, 255, 255, 0.9);
  --line: rgba(47, 122, 166, 0.24);
  --confirmed: #1ea978;
  --pending: #cc8a1a;
  --open: #3b78d8;
  --shadow: 0 18px 50px rgba(25, 70, 98, 0.16);
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--text);
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  padding: 2rem 1rem 3rem;
  background:
    radial-gradient(circle at 20% -10%, rgba(149, 223, 255, 0.6) 0%, transparent 45%),
    radial-gradient(circle at 100% 0%, rgba(120, 205, 236, 0.45) 0%, transparent 35%),
    linear-gradient(180deg, #cbeefe 0%, #d8f6ff 22%, #eef9ff 48%, var(--sand) 68%, var(--sand-2) 100%);
}

.bg-wave {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  opacity: 0.35;
}

.bg-wave-1 {
  width: 120vw;
  height: 240px;
  left: -10vw;
  top: 54%;
  border-radius: 42% 58% 70% 30% / 36% 44% 56% 64%;
  background: linear-gradient(180deg, rgba(95, 195, 231, 0.15), rgba(47, 122, 166, 0.2));
  filter: blur(26px);
}

.bg-wave-2 {
  width: 95vw;
  height: 220px;
  right: -20vw;
  top: 62%;
  border-radius: 65% 35% 52% 48% / 55% 35% 65% 45%;
  background: linear-gradient(180deg, rgba(95, 195, 231, 0.2), rgba(47, 122, 166, 0.14));
  filter: blur(24px);
}

header, main, footer {
  max-width: 1120px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.6rem 1rem;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(47, 122, 166, 0.32);
  background-color: rgba(255, 255, 255, 0.75);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%235fc3e7'/%3E%3Cstop offset='1' stop-color='%232f7aa6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect x='2' y='2' width='60' height='60' rx='15' fill='url(%23g)'/%3E%3Cpath d='M11 40c8-10 15-10 22 0s14 10 20 0' fill='none' stroke='%23ffffff' stroke-width='4' stroke-linecap='round'/%3E%3Ccircle cx='21' cy='24' r='4' fill='%23ffffff' fill-opacity='.95'/%3E%3Ccircle cx='32' cy='20' r='3' fill='%23ffffff' fill-opacity='.8'/%3E%3Ccircle cx='41' cy='25' r='2.6' fill='%23ffffff' fill-opacity='.75'/%3E%3C/svg%3E");
  background-size: cover;
  box-shadow: 0 6px 18px rgba(38, 106, 146, 0.2);
}

.brand-wordmark {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.4px;
  color: #1a557d;
  text-transform: uppercase;
}

.hero {
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.82), rgba(238, 250, 255, 0.88));
  border: 1px solid rgba(47, 122, 166, 0.28);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.75rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(8px);
}

.hero h1 {
  margin: 0.45rem 0 0.4rem;
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  letter-spacing: 0.4px;
}

.hero p {
  margin: 0;
  color: var(--muted);
  max-width: 42rem;
}

.badge {
  display: inline-block;
  background: linear-gradient(120deg, rgba(95, 195, 231, 0.25), rgba(182, 235, 255, 0.5));
  color: #18537b;
  border: 1px solid rgba(47, 122, 166, 0.35);
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.stats-row {
  margin-top: 1.3rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 0.7rem;
}

.trip-meta {
  max-width: 1120px;
  margin: 0.75rem auto 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
  position: relative;
  z-index: 2;
}

.trip-meta-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(47, 122, 166, 0.26);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.65rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
}

.trip-meta-label {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.55px;
  color: #4a6a7f;
}

.trip-meta-value {
  font-size: 1.02rem;
  line-height: 1;
  color: #174f75;
}

.stat-card {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0.8rem;
}

.stat-value {
  display: block;
  font-weight: 700;
  font-size: 1.25rem;
  color: #184f72;
}

.stat-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat-open .stat-value { color: var(--open); }

.panel,
.roster,
.notes {
  margin-top: 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  padding: 1rem;
}

.panel-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  color: #2a6f97;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.panel-dots span {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  background: rgba(47, 122, 166, 0.45);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.dot {
  width: 0.62rem;
  height: 0.62rem;
  border-radius: 999px;
  display: inline-block;
  margin-right: 0.4rem;
}

.dot.confirmed { background: var(--confirmed); }
.dot.pending { background: var(--pending); }
.dot.open { background: var(--open); }

.floor-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 0.8rem;
}

.room-card {
  background: var(--panel-strong);
  border: 1px solid rgba(59, 120, 216, 0.2);
  border-radius: 16px;
  padding: 1rem;
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
  position: relative;
  overflow: hidden;
}

.room-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(95, 195, 231, 0.14), transparent 35%);
  pointer-events: none;
}

.room-card:hover {
  transform: translateY(-4px);
  border-color: rgba(47, 122, 166, 0.5);
  box-shadow: 0 16px 30px rgba(32, 93, 129, 0.2);
}

.room-card:nth-child(1) { grid-column: span 7; min-height: 170px; }
.room-card:nth-child(2) { grid-column: span 5; min-height: 170px; }
.room-card:nth-child(3) { grid-column: span 5; min-height: 160px; }
.room-card:nth-child(4) { grid-column: span 7; min-height: 160px; }

.room-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.room-card h3 {
  margin: 0;
  font-size: 1.03rem;
}

.meta {
  margin: 0.5rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.occupants {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.person {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.32rem 0.6rem;
  font-size: 0.82rem;
  border: 1px solid transparent;
}

.person em {
  font-style: normal;
  margin-left: 0.35rem;
  opacity: 0.85;
  font-size: 0.75rem;
}

.confirmed {
  color: #0f6d4d;
  background: rgba(30, 169, 120, 0.14);
  border-color: rgba(30, 169, 120, 0.35);
}

.pending {
  color: #885807;
  background: rgba(204, 138, 26, 0.15);
  border-color: rgba(204, 138, 26, 0.32);
}

.open {
  color: #2159ae;
  background: rgba(59, 120, 216, 0.13);
  border-color: rgba(59, 120, 216, 0.35);
}

.room-open {
  border-style: dashed;
  border-color: rgba(59, 120, 216, 0.45);
}

.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.25rem 0.55rem;
  font-size: 0.74rem;
  letter-spacing: 0.2px;
  border: 1px solid;
}

.roster h2,
.notes h2 {
  margin: 0 0 0.85rem;
  font-size: 1.25rem;
}

.roster-sub {
  margin: -0.2rem 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.roster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 0.7rem;
}

.roster-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(47, 122, 166, 0.23);
  border-radius: 14px;
  padding: 0.85rem;
  display: flex;
  justify-content: space-between;
  gap: 0.6rem;
  align-items: center;
  transition: border-color 180ms ease, transform 180ms ease, opacity 180ms ease;
}

.roster-card:hover {
  border-color: rgba(47, 122, 166, 0.5);
  transform: translateY(-2px);
}

.roster-card.is-clickable {
  cursor: pointer;
}

.roster-card.is-clickable:focus-visible {
  outline: 2px solid rgba(47, 122, 166, 0.65);
  outline-offset: 2px;
}

.roster-card strong {
  font-size: 0.95rem;
}

.open-slot strong { color: #285ea8; }

.notes ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.notes li { margin: 0.3rem 0; }

.donation-placeholder {
  margin-top: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(47, 122, 166, 0.35);
  border-radius: 14px;
  padding: 0.9rem;
}

.donation-placeholder h3 {
  margin: 0 0 0.35rem;
  font-size: 0.95rem;
}

.donation-placeholder p {
  margin: 0 0 0.7rem;
  color: var(--muted);
}

.donate-btn {
  display: inline-block;
  text-decoration: none;
  border: 1px solid rgba(47, 122, 166, 0.35);
  background: linear-gradient(120deg, rgba(95, 195, 231, 0.24), rgba(228, 247, 255, 0.8));
  color: #164e75;
  border-radius: 10px;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
}

footer {
  margin-top: 1.2rem;
  text-align: center;
  color: #507082;
  font-size: 0.85rem;
}

.is-muted { opacity: 0.35; }

.is-linked {
  border-color: rgba(47, 122, 166, 0.65) !important;
  box-shadow: 0 0 0 1px rgba(47, 122, 166, 0.25) inset;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 520ms ease, transform 520ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-hidden {
  display: none;
}

.bio-modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.bio-modal[hidden] {
  display: none;
}

.bio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 28, 44, 0.45);
  backdrop-filter: blur(2px);
}

.bio-modal-card {
  position: relative;
  width: min(520px, 100%);
  background: rgba(255, 255, 255, 0.93);
  border: 1px solid rgba(47, 122, 166, 0.3);
  border-radius: 16px;
  box-shadow: 0 28px 70px rgba(15, 49, 74, 0.3);
  padding: 1.05rem 1rem 1rem;
}

.bio-modal-close {
  position: absolute;
  top: 0.7rem;
  right: 0.75rem;
  border: 1px solid rgba(47, 122, 166, 0.28);
  background: rgba(244, 251, 255, 0.9);
  color: #1a5278;
  border-radius: 9px;
  font-size: 0.76rem;
  padding: 0.28rem 0.5rem;
  cursor: pointer;
}

.bio-modal-card h3 {
  margin: 0.15rem 0 0.5rem;
  font-size: 1.15rem;
  color: #154d73;
}

.bio-modal-text p {
  margin: 0 0 0.62rem;
  color: #2f4f63;
  line-height: 1.45;
}

.bio-modal-text p:last-child {
  margin-bottom: 0;
}

@media (max-width: 900px) {
  .stats-row { grid-template-columns: repeat(2, minmax(120px, 1fr)); }
  .trip-meta { grid-template-columns: 1fr; }
  .floor-grid { grid-template-columns: 1fr; }
  .room-card:nth-child(n) { grid-column: auto; min-height: auto; }
  .roster-grid { grid-template-columns: repeat(2, minmax(130px, 1fr)); }
}

@media (max-width: 580px) {
  body { padding: 1rem 0.7rem 2rem; }
  .hero, .panel, .roster, .notes { padding: 0.85rem; }
  .roster-grid { grid-template-columns: 1fr; }
  .legend { font-size: 0.82rem; }
}
