/*
  Look of the whole site, redesigned on 17 November 2026.

  Layout after large hotel sites (InterContinental was the model): a dark contact bar, a white
  header that stays at the top with the menu and a "Book now" button, generous white space,
  serif headings over a plain sans-serif text, square buttons with spaced capitals.
  Colours of Rugby School Thailand (taken from rugbyschool.ac.th): navy, deep navy, blue,
  sage green and the gold of the crest.

  Guest pages load only fonts.css and this file. Staff pages load style.css first (the layout
  of their tables and tiles from the first design) and this file on top; the last section
  re-colours them.

  Sections, in order: colours and sizes, base, buttons, forms, messages, page frame (contact
  bar, header, phone menu, footer), home page, page headings, room list, reserve page, house
  rules, sign-in pages, account and bookings, one booking, staff pages, screen sizes.
*/

/* Colours, fonts and sizes used everywhere below. */
:root {
  --navy: #003050;
  --navy-deep: #00213c;
  --blue: #0068a0;
  --sage: #9ebba5;
  --gold: #efc515;
  --gold-dark: #d9b10b;
  --paper: #f8f8f6;
  --wash: #f2f3f1;
  --white: #fff;
  --ink: #1f2933;
  --ink-soft: #46525d;
  --muted: #66727c;
  --line: #dfe3e6;
  --line-strong: #c3cad0;
  --success: #2c6b45;
  --success-bg: #e9f2ec;
  --warning-bg: #fdf6d8;
  --danger: #a12a2a;
  --danger-bg: #fbecec;
  --serif: "Libre Caslon Text", "Noto Serif Thai", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Sarabun", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tracking-caps: 0.14em;
  --container: 1200px;
  --gutter: 40px;
  --masthead-height: 84px;
  --radius: 2px;
  --shadow-soft: 0 1px 2px rgba(0, 33, 60, 0.05), 0 4px 16px rgba(0, 33, 60, 0.06);
  --shadow-lift: 0 10px 34px rgba(0, 33, 60, 0.14);
}

/* Thai has no capitals, and spacing between its letters breaks the vowel marks. */
html[lang="th"] {
  --tracking-caps: 0.02em;
}

/* ---------------------------------------------------------------------------------------------
   Base: page, text, links, images
   --------------------------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Anchors (#houses, #contact...) stop below the header that stays at the top. */
  scroll-padding-top: calc(var(--masthead-height) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Long words such as email addresses wrap instead of widening the page on phones. */
  overflow-wrap: break-word;
}

html[lang="th"] body {
  line-height: 1.75;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.5em;
  color: var(--navy-deep);
  line-height: 1.2;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.005em;
}

h1 {
  font-size: clamp(2rem, 1.5rem + 1.8vw, 2.9rem);
}

h2 {
  font-size: clamp(1.6rem, 1.3rem + 1.1vw, 2.25rem);
}

h3,
h4 {
  font-family: var(--sans);
  font-weight: 600;
}

h3 {
  font-size: 1.2rem;
}

h4 {
  font-size: 1rem;
}

html[lang="th"] h1,
html[lang="th"] h2 {
  line-height: 1.4;
}

p {
  margin: 0 0 1em;
}

a {
  color: var(--blue);
  text-underline-offset: 3px;
}

img {
  max-width: 100%;
  display: block;
}

[hidden] {
  display: none !important;
}

svg.ui-icon {
  flex: none;
  width: 1.15em;
  height: 1.15em;
}

::selection {
  background: var(--gold);
  color: var(--navy-deep);
}

:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* A heading the page moves the focus to after a search (for screen readers) is not a control:
   no focus ring around it. Links, buttons and fields keep theirs. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
  outline: none;
}

.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--white);
  color: var(--navy-deep);
  font-weight: 600;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden,
.gallery-announcement {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Small label in spaced capitals above a heading. */
.eyebrow {
  display: block;
  margin-bottom: 10px;
  color: var(--blue);
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  line-height: 1.4;
  text-transform: uppercase;
}

.muted {
  color: var(--muted);
  font-size: 14px;
}

/* Countdowns (time left to pay, time until booking opens) never break in the middle. */
[data-countdown-seconds] {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------------------------------------------
   Buttons and links
   --------------------------------------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 28px;
  border: 1.5px solid var(--navy);
  border-radius: var(--radius);
  background: var(--navy);
  color: var(--white);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background-color 0.18s,
    border-color 0.18s,
    color 0.18s;
}

.btn:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--white);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Outlined button, as "Discover more" on hotel sites. "secondary" is its older name. */
.btn.outline,
.btn.secondary {
  background: transparent;
  color: var(--navy);
}

.btn.outline:hover,
.btn.secondary:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

/* Outlined white button on a dark background. */
.btn.light {
  border-color: var(--white);
  background: transparent;
  color: var(--white);
}

.btn.light:hover {
  background: var(--white);
  color: var(--navy-deep);
}

.btn.small {
  min-height: 40px;
  padding: 8px 16px;
  font-size: 12px;
}

.btn.full {
  width: 100%;
}

.btn svg.ui-icon {
  width: 18px;
  height: 18px;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.text-link,
.plain-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-weight: 600;
  text-decoration: underline;
}

.text-link svg.ui-icon {
  width: 16px;
  height: 16px;
}

.text-button {
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

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

/* ---------------------------------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------------------------------- */

label {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
  font-family: var(--sans);
  /* 16px keeps phones from zooming into the field. */
  font-size: 16px;
  font-weight: 400;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  outline: 2px solid rgba(0, 104, 160, 0.25);
  outline-offset: 0;
}

input[type="checkbox"],
input[type="radio"] {
  width: 20px;
  height: 20px;
  min-height: 0;
  margin: 2px 0 0;
  padding: 0;
  flex: none;
  accent-color: var(--navy);
}

input[type="file"] {
  min-height: 0;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font-size: 16px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0 20px;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-weight: 500;
  line-height: 1.5;
}

.password-field {
  position: static;
  display: flex;
}

.password-field input {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding-right: 14px;
  border-right: 0;
}

/* "Show" next to the password field (style.css of the first design placed it on top of it). */
.reveal {
  position: static;
  margin: 0;
  padding: 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--paper);
  color: var(--navy);
  font: 600 13px var(--sans);
  cursor: pointer;
}

.field-hint {
  margin: -8px 0 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

/* Heading inside a form. */
.form-section-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 18px;
  color: var(--navy-deep);
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0;
}

.upload-box {
  justify-items: center;
  gap: 6px;
  padding: 28px 20px;
  border: 1.5px dashed var(--line-strong);
  background: var(--paper);
  text-align: center;
  cursor: pointer;
}

.upload-box svg.ui-icon {
  width: 28px;
  height: 28px;
  color: var(--blue);
}

.upload-box small {
  color: var(--muted);
  font-weight: 400;
}

/* ---------------------------------------------------------------------------------------------
   Messages, notes, status labels, panels, empty lists
   --------------------------------------------------------------------------------------------- */

.alert {
  margin-block: 20px;
  padding: 14px 18px;
  border-left: 4px solid var(--blue);
  background: #eef5fa;
  color: var(--ink);
  font-weight: 500;
}

.alert.success {
  border-color: var(--success);
  background: var(--success-bg);
}

.alert.error {
  border-color: var(--danger);
  background: var(--danger-bg);
  color: var(--danger);
}

.notice {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
  background: var(--paper);
  font-size: 14px;
}

.notice strong {
  color: var(--navy-deep);
}

.notice p {
  margin: 4px 0 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: var(--radius);
  background: var(--wash);
  color: var(--ink-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.4;
  text-transform: uppercase;
  white-space: nowrap;
}

.badge.held {
  background: var(--warning-bg);
  color: #6b4e00;
}

.badge.review {
  background: #e6f0f7;
  color: var(--blue);
}

.badge.confirmed {
  background: var(--success-bg);
  color: var(--success);
}

.badge.cancelled,
.badge.expired {
  background: #eceeef;
  color: var(--muted);
}

.panel {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
}

.panel > h2 {
  font-size: 1.6rem;
}

.empty {
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 64px 24px;
  border: 1px dashed var(--line-strong);
  background: var(--white);
  text-align: center;
}

.empty svg.ui-icon {
  width: 40px;
  height: 40px;
  color: var(--sage);
}

.empty p {
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------------------------
   Page frame: contact bar, header, phone menu
   --------------------------------------------------------------------------------------------- */

/* Dark bar at the very top: phone, LINE, email, language, account. It scrolls away. */
.utility-bar {
  background: var(--navy-deep);
  color: var(--white);
  font-size: 13px;
  letter-spacing: 0.04em;
}

.utility-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 48px;
}

.utility-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.utility-contact a,
.utility-link,
.language-menu summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--white);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.utility-contact a:hover,
.utility-link:hover,
.language-menu summary:hover {
  text-decoration: underline;
}

.utility-contact svg.ui-icon,
.utility-link svg.ui-icon,
.utility-button svg.ui-icon {
  width: 17px;
  height: 17px;
}

.utility-account {
  display: flex;
  align-items: center;
  gap: 22px;
}

.utility-form {
  margin: 0;
}

/* "Join for free" (outlined) and "Sign in" (white), as on hotel sites. */
.utility-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 16px;
  border: 1px solid var(--white);
  border-radius: var(--radius);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.utility-button.outline {
  background: transparent;
  color: var(--white);
}

.utility-button.outline:hover {
  background: rgba(255, 255, 255, 0.14);
}

.utility-button.solid {
  background: var(--white);
  color: var(--navy-deep);
}

.utility-button.solid:hover {
  background: var(--paper);
}

.utility-bar :focus-visible,
.rules-band :focus-visible,
.foot-bottom :focus-visible,
.hero :focus-visible {
  outline-color: var(--gold);
}

/* Drop-downs made of <details>: the language menu and the phone menu. */
details[data-dropdown] > summary {
  list-style: none;
  cursor: pointer;
}

details[data-dropdown] > summary::-webkit-details-marker {
  display: none;
}

.language-menu {
  position: relative;
}

.language-menu summary svg.ui-icon {
  width: 17px;
  height: 17px;
}

.language-menu summary svg.ui-icon:last-child {
  width: 14px;
  height: 14px;
  transition: transform 0.18s;
}

.language-menu[open] summary svg.ui-icon:last-child {
  transform: rotate(180deg);
}

.language-options {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  z-index: 70;
  min-width: 190px;
  padding: 6px 0;
  border: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-lift);
}

.language-options a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 18px;
  color: var(--ink);
  font-size: 15px;
  letter-spacing: 0;
  text-decoration: none;
}

.language-options a:hover {
  background: var(--paper);
}

.language-options a[aria-current] {
  color: var(--navy);
  font-weight: 600;
}

.language-options svg.ui-icon {
  width: 16px;
  height: 16px;
  color: var(--navy);
}

/* White header with logo, menu and "Book now". It stays at the top of the screen. */
.masthead {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--line);
  background: var(--white);
  transition: box-shadow 0.2s;
}

.masthead.is-stuck {
  box-shadow: 0 6px 22px rgba(0, 33, 60, 0.1);
}

.masthead-inner {
  display: flex;
  align-items: center;
  gap: 28px;
  min-height: var(--masthead-height);
}

/* The logo: the brand name in serif capitals over a small spaced line, divided by gold. */
.brand-mark {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  flex: none;
  color: var(--navy-deep);
  line-height: 1;
  text-decoration: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: 30px;
  letter-spacing: 0.2em;
  margin-right: -0.2em;
}

.brand-sub {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px solid var(--gold);
  font-family: var(--sans);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.34em;
  margin-right: -0.34em;
}

.brand-mark.light {
  color: var(--navy-deep);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-left: auto;
}

.primary-nav a {
  padding: 8px 0;
  border-bottom: 2px solid transparent;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

html[lang="th"] .primary-nav a {
  font-size: 15px;
}

.primary-nav a:hover {
  border-bottom-color: var(--gold);
  color: var(--navy-deep);
}

.primary-nav a[aria-current="page"] {
  border-bottom-color: var(--navy);
  color: var(--navy-deep);
}

/* "Book now" in the gold of the crest, like the coloured booking button of hotel sites. */
.btn.book-now {
  flex: none;
  min-height: 54px;
  padding: 0 30px;
  border-color: var(--gold);
  background: var(--gold);
  color: var(--navy-deep);
  font-weight: 700;
}

.btn.book-now:hover {
  border-color: var(--gold-dark);
  background: var(--gold-dark);
  color: var(--navy-deep);
}

/* Phones and tablets: a "Menu" button that opens a panel below the header. */
.mobile-menu {
  display: none;
}

.menu-toggle {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  color: var(--navy-deep);
}

.menu-toggle svg.ui-icon {
  width: 24px;
  height: 24px;
}

.menu-icon-close,
.mobile-menu[open] .menu-icon-open {
  display: none;
}

.mobile-menu[open] .menu-icon-close {
  display: block;
}

.mobile-menu-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  max-height: calc(100vh - var(--masthead-height));
  overflow-y: auto;
  border-top: 1px solid var(--line);
  background: var(--white);
  box-shadow: var(--shadow-lift);
}

.mobile-menu-panel nav a {
  display: block;
  padding: 16px var(--gutter);
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-decoration: none;
  text-transform: uppercase;
}

.mobile-menu-panel nav a[aria-current="page"] {
  border-left: 3px solid var(--navy);
  color: var(--navy-deep);
  font-weight: 600;
}

.mobile-menu-account {
  display: grid;
  gap: 4px;
  padding: 16px var(--gutter) 24px;
  background: var(--paper);
}

.mobile-menu-account > a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  color: var(--navy-deep);
  font-weight: 500;
  text-decoration: none;
}

.mobile-menu-account form {
  margin: 12px 0 0;
}

.mobile-menu-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

/* ---------------------------------------------------------------------------------------------
   Footer: link columns, "Book online or call", dark bottom bar
   --------------------------------------------------------------------------------------------- */

.site-foot {
  border-top: 1px solid var(--line);
  background: var(--white);
}

.foot-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
  padding-block: 64px 40px;
}

.foot-brand .brand-mark {
  align-items: flex-start;
}

.foot-brand p {
  max-width: 300px;
  margin-top: 20px;
  color: var(--ink-soft);
  font-size: 15px;
}

.foot-column h2 {
  margin: 0 0 20px;
  color: var(--navy-deep);
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.foot-column ul {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.foot-column a {
  color: var(--ink);
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
}

.foot-column a:hover {
  color: var(--blue);
  text-decoration-color: currentColor;
}

.foot-column small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.foot-callout {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 32px;
  padding-block: 32px 40px;
  border-top: 1px solid var(--line);
}

.foot-call {
  display: grid;
  margin: 0;
}

.foot-call span {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.foot-call a {
  color: var(--navy-deep);
  font-family: var(--serif);
  font-size: 30px;
  text-decoration: none;
}

.foot-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.foot-bottom {
  padding-block: 20px;
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.88);
  font-size: 14px;
  text-align: center;
}

/* ---------------------------------------------------------------------------------------------
   Home page
   --------------------------------------------------------------------------------------------- */

.section {
  padding-block: 96px;
}

.section.tinted {
  background: var(--paper);
}

.section-head {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-head p {
  color: var(--ink-soft);
  font-size: 17px;
}

/* Large aerial photo of the campus with the heading over its lower part. */
.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: clamp(520px, 80vh, 780px);
  overflow: hidden;
  background: var(--navy-deep);
  color: var(--white);
}

.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 45%;
}

/* A light navy shade at the bottom, where the search bar overlaps the photo. */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 33, 60, 0.45) 0%, transparent 35%);
}

/* The availability search, half over the photo, as on hotel home pages. */
.search-wrap {
  position: relative;
  z-index: 2;
  margin-top: -64px;
}

.booking-bar {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr auto;
  align-items: stretch;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--white);
  box-shadow: var(--shadow-lift);
}

.booking-bar label {
  min-width: 0;
  gap: 2px;
  margin: 0;
  padding: 10px 20px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.booking-bar label:focus-within {
  background: var(--paper);
}

.booking-bar select,
.booking-bar input {
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.booking-bar select:focus,
.booking-bar input:focus {
  outline: none;
}

.booking-bar .btn {
  min-height: 64px;
  margin-left: 8px;
  padding: 0 30px;
}

/* Introduction: a short centred text. */
.intro {
  text-align: center;
}

.intro-inner {
  max-width: 780px;
}

.intro p {
  color: var(--ink-soft);
  font-size: 18px;
}

.intro .btn {
  margin-top: 12px;
}

/* Key facts in a row of icons, like the amenities of a hotel page. */
.facts-band {
  border-block: 1px solid var(--line);
  background: var(--white);
}

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 40px;
  margin-block: 0;
  padding-block: 44px;
  padding-inline: 0;
  list-style: none;
}

.facts li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.facts svg.ui-icon {
  width: 30px;
  height: 30px;
  color: var(--blue);
}

.facts span {
  display: grid;
  gap: 2px;
  color: var(--ink-soft);
  font-size: 15px;
}

.facts strong {
  color: var(--navy-deep);
  font-weight: 600;
}

/* One card per boarding house. */
.house-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 28px;
}

.house-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  background: var(--white);
  color: inherit;
  text-decoration: none;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.house-card:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.house-photo {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
}

/* A house without a photo shows its initials in gold on navy. */
.house-monogram {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
  color: var(--gold);
  font-family: var(--serif);
  font-size: 64px;
  letter-spacing: 0.1em;
  outline: 1px solid rgba(239, 197, 21, 0.45);
  outline-offset: -16px;
}

.house-body {
  display: grid;
  gap: 8px;
  padding: 26px 28px 30px;
}

.house-body .eyebrow {
  margin: 0;
}

.house-name {
  color: var(--navy-deep);
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1.2;
}

.house-meta {
  color: var(--muted);
  font-size: 14px;
}

.house-price {
  color: var(--ink-soft);
  font-size: 14px;
}

.house-price strong {
  color: var(--navy-deep);
  font-size: 20px;
  font-weight: 600;
}

.house-body .text-link {
  margin-top: 8px;
}

/* How booking works: four steps under a gold line, each with an icon. */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.steps li {
  padding-top: 24px;
  border-top: 2px solid var(--gold);
}

.step-icon {
  display: block;
  color: var(--blue);
}

.step-icon svg.ui-icon {
  width: 34px;
  height: 34px;
}

.steps h3 {
  margin: 14px 0 8px;
  font-size: 18px;
}

.steps p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

/* House rules in short: a deep navy band. */
.rules-band {
  background: var(--navy-deep);
  color: var(--white);
}

.rules-band-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: start;
}

.rules-band .eyebrow {
  color: var(--gold);
}

.rules-band h2 {
  color: var(--white);
}

.rules-band p {
  color: rgba(255, 255, 255, 0.84);
  font-size: 17px;
}

.check-list {
  display: grid;
  gap: 16px;
  margin: 0 0 32px;
  padding: 0;
  list-style: none;
}

.check-list li {
  position: relative;
  padding-left: 28px;
  line-height: 1.55;
}

.check-list li::before {
  content: "";
  position: absolute;
  top: 0.55em;
  left: 2px;
  width: 8px;
  height: 8px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* The gallery slideshow. */
.gallery-section .section-head p {
  font-size: 15px;
}

.stay-gallery {
  border: 1px solid var(--line);
  background: var(--white);
}

.gallery-top {
  display: flex;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  color: var(--navy-deep);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.gallery-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--navy-deep);
}

.gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.5s,
    visibility 0.5s;
}

.gallery-slide.is-active {
  opacity: 1;
  visibility: visible;
}

.gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gallery-enlarge {
  position: absolute;
  right: 16px;
  bottom: 16px;
  padding: 8px 14px;
  background: rgba(0, 33, 60, 0.78);
  color: var(--white);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
}

.gallery-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  color: var(--ink-soft);
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.gallery-buttons {
  display: flex;
  gap: 8px;
}

.gallery-buttons button {
  width: 44px;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--navy);
  font-size: 18px;
  cursor: pointer;
}

.gallery-buttons button:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: var(--white);
}

.gallery-empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 64px 24px;
  color: var(--muted);
}

.gallery-empty svg.ui-icon {
  width: 40px;
  height: 40px;
}

.gallery-lightbox {
  width: min(96vw, 1400px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  border: 0;
  background: #000;
  color: var(--white);
}

.gallery-lightbox::backdrop {
  background: rgba(0, 16, 30, 0.88);
}

.lightbox-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px 8px 16px;
  font-size: 14px;
}

.lightbox-toolbar button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

.lightbox-stage {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 56px;
  align-items: center;
}

.lightbox-stage img {
  width: 100%;
  max-height: calc(94vh - 64px);
  object-fit: contain;
}

.lightbox-stage button {
  height: 96px;
  border: 0;
  background: transparent;
  color: var(--white);
  font-size: 28px;
  cursor: pointer;
}

body.gallery-modal-open {
  overflow: hidden;
}

/* ---------------------------------------------------------------------------------------------
   Headings of inner pages
   --------------------------------------------------------------------------------------------- */

.guest-main {
  padding-block: 36px 96px;
}

.page-head {
  margin-bottom: 28px;
}

.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
}

.back-link:hover {
  text-decoration: underline;
}

.page-head h1 {
  margin-bottom: 10px;
}

.page-head p {
  max-width: 680px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
}

/* ---------------------------------------------------------------------------------------------
   Room list (step 1)
   --------------------------------------------------------------------------------------------- */

.browse {
  padding-top: 0;
  background: var(--wash);
}

.search-band {
  margin-bottom: 28px;
  padding-block: 24px;
  border-bottom: 1px solid var(--line);
  background: var(--white);
}

.search-band .booking-bar {
  border-color: var(--line-strong);
  box-shadow: none;
}

.results-title {
  margin-bottom: 24px;
}

.results-title h1 {
  margin-bottom: 6px;
}

.results-title p {
  margin: 0;
  color: var(--ink-soft);
}

.event-select {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
}

.countdown-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-bottom: 16px;
  padding: 20px 24px;
  background: var(--navy-deep);
  color: var(--white);
}

.countdown-panel span {
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.countdown-panel strong {
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 400;
}

.countdown-panel small {
  color: rgba(255, 255, 255, 0.75);
}

/* Controls of the room list, each with its label above it, as on a hotel results page. */
.results-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 20px 28px;
  margin-bottom: 28px;
}

.room-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 16px 20px;
  margin: 0;
  padding-left: 28px;
  border-left: 1px solid var(--line-strong);
}

.toolbar-field,
.results-toolbar .event-select label {
  gap: 8px;
  margin: 0;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
}

/* White boxes with a navy arrow, instead of the browser's own select style. */
.toolbar-field select,
.results-toolbar .event-select select {
  min-width: 210px;
  min-height: 46px;
  padding: 8px 42px 8px 16px;
  border-radius: 4px;
  background: var(--white)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23003050' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E")
    no-repeat right 14px center / 16px;
  font-size: 16px;
  cursor: pointer;
  appearance: none;
}

.results-toolbar .event-select .btn {
  min-height: 46px;
}

.free-only {
  margin: 0;
  font-size: 15px;
}

/* The deposit rule on a navy bar, like the member banner of a hotel booking page. */
.deposit-banner {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 32px;
  padding: 18px 24px;
  background: var(--navy);
  color: var(--white);
}

.deposit-banner > svg.ui-icon {
  width: 28px;
  height: 28px;
  color: var(--gold);
}

.deposit-banner strong {
  display: block;
}

.deposit-banner span {
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
}

.deposit-banner summary {
  margin-top: 4px;
  color: var(--gold);
  font-size: 14px;
  text-decoration: underline;
  cursor: pointer;
}

.deposit-banner .deposit-terms {
  max-width: 780px;
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
}

/* Refund conditions: one short point per line. */
.deposit-terms {
  margin: 10px 0 0;
  line-height: 1.55;
}

ul.deposit-terms {
  display: grid;
  gap: 8px;
  padding-left: 20px;
}

ul.deposit-terms li::marker {
  color: var(--gold);
}

.notice ul.deposit-terms li::marker {
  color: var(--blue);
}

.results-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin-bottom: 16px;
}

.results-heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
}

.room-list {
  display: grid;
  gap: 20px;
}

/* A room type: photo, details, and the price box with "Select", as on hotel booking pages. */
.room-card {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 270px;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: var(--white);
}

/* Without a photo uploaded by staff, the card has two columns: details and price. */
.room-card.no-photo {
  grid-template-columns: minmax(0, 1fr) 270px;
}

.room-media {
  min-height: 220px;
  background: var(--paper);
}

.room-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-body {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 26px 28px;
}

.room-body .eyebrow {
  margin: 0;
}

.room-body h3 {
  margin: 0;
  font-size: 22px;
  line-height: 1.3;
}

.room-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.room-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.room-facts svg.ui-icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.room-description {
  margin: 0;
  color: var(--ink-soft);
  font-size: 15px;
}

.room-rate {
  display: grid;
  align-content: start;
  gap: 10px;
  margin: 20px 20px 20px 0;
  padding: 20px;
  border: 1px solid var(--line);
}

.rate-left {
  margin: 0;
  color: var(--success);
  font-size: 14px;
  font-weight: 600;
}

.rate-price {
  display: grid;
  margin: 0;
}

.rate-price strong {
  color: var(--navy-deep);
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.rate-price small {
  color: var(--muted);
  font-size: 13px;
}

.room-rate .btn {
  width: 100%;
}

.rate-counts {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.rate-counts strong {
  color: var(--ink-soft);
}

/* ---------------------------------------------------------------------------------------------
   Reserve page (step 2)
   --------------------------------------------------------------------------------------------- */

.reservation-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 32px;
  align-items: start;
}

.reservation-main {
  display: grid;
  gap: 24px;
}

.selected-room {
  display: flex;
  gap: 24px;
}

.selected-room .room-image {
  width: 220px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.selected-room h2 {
  margin-bottom: 8px;
}

.selected-room p {
  color: var(--ink-soft);
}

.sign-in-gate {
  margin-bottom: 24px;
}

.sign-in-gate p {
  color: var(--ink-soft);
}

/* Summary on the right: stays in view while the guest scrolls through the form. */
.reservation-summary {
  position: sticky;
  top: calc(var(--masthead-height) + 24px);
  display: grid;
  gap: 14px;
}

.reservation-summary h2 {
  margin: 0;
}

.reservation-summary .eyebrow {
  margin: 0;
}

.summary-room-name {
  margin: 0;
  color: var(--ink-soft);
}

.booking-costs {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px 16px;
  margin: 0;
}

.booking-costs dt {
  color: var(--ink-soft);
}

.booking-costs dt small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.booking-costs dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  white-space: nowrap;
}

.price-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.price-summary span {
  color: var(--navy-deep);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.price-summary strong {
  color: var(--navy-deep);
  font-size: 26px;
  font-weight: 600;
}

.hold-note {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  background: var(--paper);
  font-size: 14px;
}

.hold-note svg.ui-icon {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  color: var(--blue);
}

.hold-note p {
  margin: 0;
}

.reservation-summary .field-hint {
  margin: -6px 0 0;
  text-align: center;
}

details.notice summary {
  color: var(--navy-deep);
  font-weight: 600;
  cursor: pointer;
}

details.notice p {
  margin-top: 8px;
}

/* ---------------------------------------------------------------------------------------------
   House rules: the box on the reserve page and the House rules page
   --------------------------------------------------------------------------------------------- */

.house-rules-panel .rules-copy {
  color: var(--ink);
  font-weight: 500;
}

/* The full rules in a box of their own, scrolled on their own. */
.rules-scroll {
  max-height: 440px;
  margin: 16px 0;
  padding: 22px 26px;
  overflow-y: auto;
  border: 1px solid var(--line-strong);
  background: var(--paper);
}

.house-rules {
  font-size: 15px;
  line-height: 1.65;
}

.house-rules .rules-title {
  margin-bottom: 14px;
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 400;
}

.rules-facts p {
  margin: 0 0 4px;
}

.rules-facts {
  margin-bottom: 18px;
}

.rules-section h2,
.rules-section h4 {
  margin: 24px 0 8px;
  color: var(--navy-deep);
}

.rules-section h4 {
  font-size: 15px;
}

.rules-section ul {
  margin: 0 0 12px;
  padding-left: 22px;
}

.rules-section li {
  margin: 6px 0;
}

.rules-section li::marker {
  color: var(--blue);
}

.rules-section p {
  margin: 10px 0;
}

.rules-section hr {
  margin: 22px 0;
  border: 0;
  border-top: 1px solid var(--line-strong);
}

.rules-section strong {
  color: var(--navy-deep);
}

.rules-translation-note {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-left: 3px solid var(--gold);
  background: var(--warning-bg);
  font-size: 14px;
}

.rules-translation-note svg.ui-icon {
  width: 18px;
  height: 18px;
  margin-top: 3px;
  color: var(--navy);
}

.rules-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  font-size: 14px;
}

.rules-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
}

.rules-links svg.ui-icon {
  width: 16px;
  height: 16px;
}

/* The tick that accepts the rules: framed in navy so nobody misses it. */
.rules-accept {
  margin: 0;
  padding: 16px 18px;
  border: 1.5px solid var(--navy);
  background: #f1f5f8;
  color: var(--navy-deep);
  font-weight: 600;
}

.rules-actions {
  margin-bottom: 36px;
}

.rules-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  gap: 56px;
  align-items: start;
}

/* List of the twelve sections: stays in view beside the text on large screens. */
.rules-toc {
  position: sticky;
  top: calc(var(--masthead-height) + 24px);
  max-height: calc(100vh - var(--masthead-height) - 48px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--line);
  background: var(--paper);
}

.rules-toc ol {
  margin: 0;
  padding-left: 22px;
  font-size: 14px;
}

.rules-toc li {
  margin: 8px 0;
}

.rules-toc li::marker {
  color: var(--muted);
}

.rules-toc a {
  color: var(--ink-soft);
  text-decoration: none;
}

.rules-toc a:hover {
  color: var(--blue);
  text-decoration: underline;
}

.rules-article {
  max-width: 780px;
}

.house-rules-page {
  font-size: 16px;
}

.house-rules-page .rules-section h2 {
  margin-top: 44px;
  font-size: 1.55rem;
}

.house-rules-page .rules-section:first-of-type h2 {
  margin-top: 28px;
}

/* ---------------------------------------------------------------------------------------------
   Sign-in pages: campus photo on the left, the form on the right
   --------------------------------------------------------------------------------------------- */

.guest-auth {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-block: 40px 96px;
  border: 1px solid var(--line);
  background: var(--white);
}

.auth-aside {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 560px;
  overflow: hidden;
  padding: 44px;
  background: var(--navy-deep);
  color: var(--white);
}

.auth-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-aside::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0, 33, 60, 0.92) 0%, rgba(0, 33, 60, 0.35) 65%);
}

.auth-aside-copy {
  position: relative;
  z-index: 1;
}

.auth-aside .eyebrow {
  color: var(--gold);
}

.auth-aside-title {
  margin: 0 0 12px;
  font-family: var(--serif);
  font-size: 34px;
  line-height: 1.15;
}

.auth-aside-copy p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.85);
}

.auth-form {
  padding: 52px 56px;
}

.form-intro {
  color: var(--ink-soft);
}

.auth-tabs {
  display: flex;
  gap: 28px;
  margin: 24px 0 28px;
  border-bottom: 1px solid var(--line);
}

.auth-tabs a {
  margin-bottom: -1px;
  padding: 12px 0;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-decoration: none;
  text-transform: uppercase;
}

.auth-tabs a.active {
  border-bottom-color: var(--navy);
  color: var(--navy-deep);
}

/* Section headings inside the sign-up form. */
.auth-form form h2.form-section-heading {
  margin: 28px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.forgot {
  display: inline-block;
  margin: -6px 0 22px;
  font-size: 14px;
}

.auth-links {
  margin-top: 24px;
  color: var(--ink-soft);
  font-size: 14px;
}

.auth-links a {
  font-weight: 600;
}

/* Installer and "database not ready" page: one card in the middle, laid out by style.css. */
.auth-card {
  border-radius: var(--radius);
}

.auth-card .brand-mark {
  margin-bottom: 32px;
}

.auth-card h1 {
  font-size: 2.1rem;
}

/* ---------------------------------------------------------------------------------------------
   Account and My bookings
   --------------------------------------------------------------------------------------------- */

.account-grid {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.account-overview p {
  color: var(--ink-soft);
}

.account-overview dl {
  margin: 0 0 24px;
}

.account-overview dt,
.stay-details > dl:not(.booking-costs) dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.account-overview dt {
  margin-top: 14px;
}

.account-overview dd {
  margin: 2px 0 0;
}

.guest-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 36px;
}

.guest-stats article {
  display: grid;
  gap: 4px;
  padding: 20px 24px;
  border: 1px solid var(--line);
  background: var(--white);
}

.guest-stats strong {
  color: var(--navy-deep);
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 400;
  line-height: 1;
}

.guest-stats span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.booking-list {
  display: grid;
  gap: 16px;
}

.booking-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 290px;
  border: 1px solid var(--line);
  background: var(--white);
  color: inherit;
  text-decoration: none;
  transition:
    border-color 0.18s,
    box-shadow 0.18s;
}

.booking-card:hover {
  border-color: var(--navy);
  box-shadow: var(--shadow-soft);
}

.booking-card-main {
  padding: 24px 28px;
}

.booking-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
}

.booking-card-top .eyebrow {
  margin: 0;
}

.booking-card h3 {
  margin: 12px 0 2px;
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 400;
}

.booking-room-type {
  margin: 0;
  color: var(--ink-soft);
}

.booking-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
}

.booking-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 14px;
}

.booking-meta svg.ui-icon {
  width: 18px;
  height: 18px;
  color: var(--blue);
}

.booking-card-action {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: var(--paper);
}

.booking-card-action small {
  color: var(--muted);
  font-size: 13px;
}

.booking-card-action strong {
  color: var(--navy-deep);
  font-size: 24px;
  font-weight: 600;
}

.booking-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-block: 8px 4px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.booking-next svg.ui-icon {
  width: 16px;
  height: 16px;
}

/* ---------------------------------------------------------------------------------------------
   One booking (step 3): status, stay, bank transfer, slips
   --------------------------------------------------------------------------------------------- */

.booking-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  margin-bottom: 24px;
  padding: 18px 24px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  background: var(--white);
}

.booking-status-bar p {
  margin: 8px 0 0;
  color: var(--ink-soft);
}

.deadline {
  display: grid;
  text-align: right;
}

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

.deadline strong {
  color: var(--navy-deep);
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 400;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

.stay-details h2,
.payment-details h2 {
  margin-bottom: 4px;
}

.stay-dates {
  display: flex;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
  padding: 16px 0;
  border-block: 1px solid var(--line);
}

.stay-dates div {
  display: grid;
}

.stay-dates span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.stay-dates strong {
  color: var(--navy-deep);
  font-size: 18px;
  font-weight: 600;
}

.stay-dates > svg.ui-icon {
  color: var(--muted);
}

.stay-details > dl:not(.booking-costs) {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 12px 16px;
  margin: 0;
}

.stay-details dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.summary-divider {
  margin: 22px 0;
  border-top: 1px solid var(--line);
}

.stay-details h3 {
  color: var(--navy);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.cancel-booking {
  margin-top: 18px;
}

/* The bank account in a navy box, the number large. */
.bank-box {
  display: grid;
  gap: 4px;
  margin: 18px 0 24px;
  padding: 24px;
  background: var(--navy-deep);
  color: var(--white);
}

.bank-label {
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.bank-box strong {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.04em;
  font-variant-numeric: tabular-nums;
}

.bank-amount {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.bank-amount small {
  color: rgba(255, 255, 255, 0.8);
}

.bank-amount b {
  font-size: 22px;
}

.payment-details > form .btn.full {
  margin-top: 6px;
}

.confirmation-note {
  display: flex;
  gap: 14px;
  padding: 18px;
  border: 1px solid #cfe2d5;
  background: var(--success-bg);
}

.confirmation-note svg.ui-icon {
  width: 24px;
  height: 24px;
  color: var(--success);
}

.confirmation-note strong {
  color: var(--success);
}

.confirmation-note p {
  margin: 4px 0 0;
}

.payment-history {
  margin-top: 24px;
  border-top: 1px solid var(--line);
}

.payment-history summary {
  padding: 14px 0;
  color: var(--navy-deep);
  font-weight: 600;
  cursor: pointer;
}

.payment-history summary span {
  margin-left: 6px;
  padding: 2px 8px;
  background: var(--wash);
  font-size: 12px;
}

.payment-record {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.slip-preview {
  width: 96px;
  height: 120px;
  object-fit: cover;
  border: 1px solid var(--line);
}

.payment-record p {
  margin: 2px 0;
}

.review-note {
  padding: 8px 10px;
  border-left: 3px solid var(--gold);
  background: var(--paper);
}

.staff-review-form {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.staff-review-form small {
  display: block;
  margin-top: 12px;
  color: var(--muted);
}

.deposit-panel {
  margin-top: 24px;
}

/* ---------------------------------------------------------------------------------------------
   Staff pages: the first design's layout from style.css, in the new colours and type
   --------------------------------------------------------------------------------------------- */

.staff-interface {
  --teal: var(--navy);
  --soft: #eef2f5;
  --text: var(--ink);
  background: var(--wash);
}

.staff-interface main,
.admin-main {
  padding-block: 8px 80px;
}

.admin-nav {
  display: flex;
  gap: 4px;
  margin-top: 20px;
  padding: 0;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.admin-nav a {
  margin-bottom: -1px;
  padding: 12px 10px;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: none;
  color: var(--ink-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-decoration: none;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-nav a:hover {
  background: none;
  color: var(--navy-deep);
}

.admin-nav a.active {
  border-bottom-color: var(--navy);
  background: none;
  color: var(--navy-deep);
}

.page-title {
  margin: 28px 0 24px;
}

.page-title h1 {
  margin-bottom: 6px;
}

.page-title p {
  margin: 0;
  color: var(--ink-soft);
}

.staff-interface .panel {
  margin-bottom: 24px;
  box-shadow: none;
}

.stats-grid article {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: none;
}

.stats-grid strong {
  color: var(--navy-deep);
  font-family: var(--serif);
  font-weight: 400;
}

/* The last tile of each row is dark: its figure in the gold of the crest. */
.stats-grid article:last-child {
  border-color: var(--navy-deep);
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.85);
}

.stats-grid article:last-child strong {
  color: var(--gold);
}

.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: none;
}

.staff-interface th {
  background: var(--paper);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.staff-interface td {
  border-color: var(--line);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 12px 16px;
}

.filter-bar label {
  margin: 0;
}

/* ---------------------------------------------------------------------------------------------
   Screen sizes: large laptops first, then tablets, then phones
   --------------------------------------------------------------------------------------------- */

/* Below 1180px the menu folds into the "Menu" button. */
@media (max-width: 1180px) {
  .primary-nav {
    display: none;
  }

  .mobile-menu {
    display: block;
  }

  .masthead-inner {
    gap: 16px;
  }

  .btn.book-now {
    margin-left: auto;
  }
}

@media (max-width: 1024px) {
  :root {
    --gutter: 32px;
  }

  .section {
    padding-block: 80px;
  }

  .booking-bar {
    grid-template-columns: 1fr 1fr;
  }

  .booking-bar .field-house {
    grid-column: 1 / -1;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .booking-bar .field-check_out {
    border-right: 0;
  }

  .booking-bar .btn {
    grid-column: 1 / -1;
    min-height: 54px;
    margin: 8px 0 0;
  }

  .facts {
    grid-template-columns: repeat(2, 1fr);
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 40px 32px;
  }

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

  .room-card.no-photo {
    grid-template-columns: minmax(0, 1fr);
  }

  .room-rate {
    grid-column: 1 / -1;
    grid-template-columns: auto auto 1fr;
    align-items: center;
    gap: 8px 24px;
    margin: 0 20px 20px;
  }

  .room-rate .btn {
    justify-self: end;
    width: auto;
    min-width: 160px;
  }

  .rate-counts {
    grid-column: 1 / -1;
  }

  .reservation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .reservation-summary {
    position: static;
  }

  .foot-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Below 900px the account buttons move from the contact bar into the "Menu" panel. */
@media (max-width: 900px) {
  .utility-bookings,
  .utility-staff,
  .utility-profile,
  .utility-form,
  .utility-button,
  .utility-contact .contact-email {
    display: none;
  }

  .rules-band-inner,
  .detail-grid,
  .account-grid,
  .rules-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .rules-band-inner {
    gap: 8px;
  }

  .rules-layout {
    gap: 28px;
  }

  .rules-toc {
    position: static;
    max-height: none;
  }

  .guest-auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-aside {
    min-height: 240px;
    padding: 28px;
  }

  .auth-aside-title {
    font-size: 26px;
  }

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

  .booking-card-action {
    border-top: 1px solid var(--line);
    border-left: 0;
  }
}

/* Phones. */
@media (max-width: 640px) {
  :root {
    --gutter: 16px;
    --masthead-height: 64px;
  }

  .utility-bar {
    font-size: 12.5px;
    letter-spacing: 0.02em;
  }

  .utility-inner {
    min-height: 42px;
    gap: 10px;
  }

  .utility-contact {
    gap: 4px 16px;
  }

  .utility-contact .contact-detail {
    display: none;
  }

  .utility-contact svg.ui-icon,
  .language-menu summary svg.ui-icon {
    width: 15px;
    height: 15px;
  }

  .masthead-inner {
    gap: 10px;
  }

  .brand-name {
    font-size: 22px;
  }

  .brand-sub {
    margin-top: 4px;
    padding-top: 4px;
    font-size: 8.5px;
    letter-spacing: 0.26em;
    margin-right: -0.26em;
  }

  .btn.book-now {
    min-height: 42px;
    padding: 0 16px;
    font-size: 12px;
  }

  .menu-toggle {
    width: 42px;
    height: 42px;
  }

  .section {
    padding-block: 64px;
  }

  .section-head {
    margin-bottom: 32px;
  }

  .hero {
    min-height: 520px;
  }

  .hero-image {
    object-position: 45% 50%;
  }

  .search-wrap {
    margin-top: -56px;
  }

  .booking-bar {
    padding: 6px;
  }

  .booking-bar label {
    padding: 10px 12px;
  }

  .intro p,
  .rules-band p {
    font-size: 16px;
  }

  .facts,
  .steps {
    grid-template-columns: minmax(0, 1fr);
  }

  .facts {
    gap: 24px;
    padding-block: 36px;
  }

  .house-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .gallery-stage {
    aspect-ratio: 4 / 3;
  }

  .gallery-controls {
    padding: 10px 12px;
  }

  .lightbox-stage {
    grid-template-columns: 40px minmax(0, 1fr) 40px;
  }

  .panel {
    padding: 20px;
  }

  .guest-main {
    padding-block: 24px 64px;
  }

  .browse {
    padding-top: 0;
  }

  .room-filters {
    width: 100%;
    padding-left: 0;
    border-left: 0;
  }

  /* Phones: each control on its own row, wide enough for its whole text. */
  .toolbar-field {
    flex: 1 1 100%;
  }

  .results-toolbar .event-select {
    flex-wrap: wrap;
    width: 100%;
  }

  .results-toolbar .event-select label {
    flex: 1 1 100%;
  }

  .toolbar-field select,
  .results-toolbar .event-select select {
    width: 100%;
    min-width: 0;
  }

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

  .room-media {
    min-height: 0;
    aspect-ratio: 16 / 9;
  }

  .room-body {
    padding: 20px;
  }

  .room-rate {
    grid-template-columns: minmax(0, 1fr) auto;
    margin: 0 16px 16px;
    padding: 16px;
  }

  .room-rate .btn {
    grid-column: 1 / -1;
    width: 100%;
  }

  .rate-price strong {
    font-size: 24px;
  }

  .selected-room {
    flex-direction: column;
  }

  .selected-room .room-image {
    width: 100%;
  }

  .rules-scroll {
    max-height: 380px;
    padding: 16px;
  }

  .guest-auth {
    margin-block: 20px 64px;
  }

  .auth-form {
    padding: 28px 20px;
  }

  .guest-stats {
    gap: 8px;
  }

  .guest-stats article {
    padding: 14px;
  }

  .guest-stats strong {
    font-size: 28px;
  }

  .guest-stats span {
    font-size: 11px;
  }

  .booking-card-main,
  .booking-card-action {
    padding: 20px;
  }

  .deadline {
    text-align: left;
  }

  .stay-details > dl:not(.booking-costs) {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .stay-details > dl:not(.booking-costs) dd {
    margin-bottom: 10px;
  }

  .foot-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    padding-block: 48px 32px;
  }

  .foot-call a {
    font-size: 26px;
  }
}

/* Small phones: the search bar in one column, the three counters of My bookings as rows. */
@media (max-width: 480px) {
  .booking-bar {
    grid-template-columns: minmax(0, 1fr);
  }

  .booking-bar label,
  .booking-bar .field-check_in {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .guest-stats {
    grid-template-columns: minmax(0, 1fr);
  }

  .guest-stats article {
    display: flex;
    align-items: baseline;
    gap: 12px;
    padding: 12px 16px;
  }

  /* Price lines: the label above the amount, so a long amount never widens the page. */
  .booking-costs {
    grid-template-columns: minmax(0, 1fr);
    gap: 2px;
  }

  .booking-costs dd {
    margin-bottom: 10px;
    text-align: left;
  }
}

/* Very narrow phones (320px): the logo text gets a little smaller still. */
@media (max-width: 360px) {
  .brand-name {
    font-size: 19px;
  }

  .btn.book-now {
    padding: 0 12px;
    letter-spacing: 0.08em;
  }

  .utility-contact a span {
    font-size: 12px;
  }
}

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