:root {
  --navy: #2f4352;
  --navy-deep: #233542;
  --orange: #ef7f23;
  --gold: #efa34a;
  --ink: #22313c;
  --muted: #687681;
  --line: #dfe5e9;
  --page: #f4f6f8;
  --white: #ffffff;
  --success: #197a4b;
  --success-soft: #eaf7f0;
  --danger: #b63d3d;
  --danger-soft: #fff0f0;
  --shadow: 0 18px 50px rgba(32, 48, 60, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--page);
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}

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

.site-header {
  background: linear-gradient(135deg, var(--navy-deep), var(--navy));
  color: var(--white);
  border-bottom: 4px solid var(--orange);
}

.header-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 420px) 1fr;
  gap: 56px;
  align-items: center;
  padding: 34px 0 38px;
}

.brand-logo {
  width: 100%;
  max-width: 420px;
  display: block;
  border-radius: 6px;
}

.header-copy {
  padding-left: 34px;
  border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.kicker,
.step-label {
  display: block;
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.kicker {
  color: var(--gold);
  margin-bottom: 10px;
}

.header-copy h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.03;
  letter-spacing: -0.035em;
}

.header-copy p {
  margin: 14px 0 0;
  max-width: 650px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 1.03rem;
  line-height: 1.6;
}

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 38px auto 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 28px;
  align-items: start;
}

.card {
  background: var(--white);
  border: 1px solid rgba(27, 45, 58, 0.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.booking-card {
  padding: 32px;
}

.summary-card {
  padding: 28px;
  position: sticky;
  top: 24px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading.compact {
  margin-bottom: 20px;
}

.section-heading h2,
.summary-card h2,
.modal-box h2 {
  margin: 5px 0 0;
  color: var(--navy-deep);
  letter-spacing: -0.025em;
}

.section-heading h2 {
  font-size: 1.55rem;
}

.step-label {
  color: var(--orange);
}

.availability-note {
  white-space: nowrap;
  padding: 7px 11px;
  border-radius: 999px;
  background: #eef3f6;
  color: var(--navy);
  font-size: 0.78rem;
  font-weight: 700;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.field > span {
  font-size: 0.86rem;
  font-weight: 700;
  color: #41515d;
}

.field em {
  font-style: normal;
  font-weight: 500;
  color: #8a959d;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #cfd8de;
  border-radius: 10px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

input,
select {
  height: 48px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  min-height: 105px;
  padding: 12px 13px;
  line-height: 1.5;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(239, 127, 35, 0.14);
}

input::placeholder,
textarea::placeholder {
  color: #a0a9af;
}

.availability-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 2px;
}

.button {
  border: 0;
  border-radius: 10px;
  min-height: 46px;
  padding: 0 19px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, opacity 0.14s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.65;
  transform: none;
}

.button-primary {
  color: var(--white);
  background: linear-gradient(135deg, #e66f16, var(--orange));
  box-shadow: 0 8px 20px rgba(239, 127, 35, 0.24);
}

.button-secondary {
  color: var(--navy-deep);
  background: #edf2f5;
  border: 1px solid #d9e1e6;
  box-shadow: none;
}

.reserve-button {
  width: 100%;
  margin-top: 5px;
  min-height: 52px;
  font-size: 1rem;
}

.status {
  min-height: 22px;
  font-size: 0.9rem;
  font-weight: 700;
}

.status.ok,
.status.bad {
  padding: 9px 12px;
  border-radius: 9px;
}

.status.ok {
  color: var(--success);
  background: var(--success-soft);
}

.status.bad {
  color: var(--danger);
  background: var(--danger-soft);
}

.section-divider {
  height: 1px;
  background: var(--line);
  margin: 27px 0;
}

.fine-print {
  margin: 13px 0 0;
  text-align: center;
  color: #7a8790;
  font-size: 0.79rem;
  line-height: 1.5;
}

.summary-card h2 {
  font-size: 1.45rem;
  margin-bottom: 22px;
}

.summary-list {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-line {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.summary-line:last-child {
  border-bottom: 0;
}

.summary-line span {
  color: var(--muted);
  font-size: 0.86rem;
}

.summary-line strong {
  text-align: right;
  font-size: 0.92rem;
  color: var(--navy-deep);
}

.summary-info {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-top: 22px;
  padding: 14px;
  border-radius: 12px;
  background: #f6f8f9;
}

.info-icon {
  flex: 0 0 26px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-size: 0.8rem;
  font-weight: 900;
}

.summary-info p,
.muted {
  color: var(--muted);
  line-height: 1.55;
}

.summary-info p {
  margin: 0;
  font-size: 0.84rem;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 20px;
}

.modal.hidden {
  display: none;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 38, 48, 0.7);
  backdrop-filter: blur(5px);
}

.modal-box {
  position: relative;
  width: min(480px, 100%);
  padding: 34px;
  border-radius: 18px;
  background: var(--white);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.28);
  text-align: center;
}

.success-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success);
  font-size: 1.65rem;
  font-weight: 900;
}

.success-text {
  margin: 14px 0 6px;
  font-weight: 700;
  color: var(--navy-deep);
}

.modal-box .button {
  min-width: 150px;
  margin-top: 12px;
}

.site-footer {
  width: min(1180px, calc(100% - 40px));
  margin: -20px auto 34px;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #dde3e7;
  color: #87939c;
  font-size: 0.76rem;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .header-inner {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 0 32px;
  }

  .brand-logo {
    max-width: 360px;
  }

  .header-copy {
    padding-left: 0;
    border-left: 0;
  }

  .page-shell {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }
}

@media (max-width: 620px) {
  .header-inner,
  .page-shell,
  .site-footer {
    width: min(100% - 24px, 1180px);
  }

  .page-shell {
    margin-top: 20px;
  }

  .booking-card,
  .summary-card {
    padding: 22px;
    border-radius: 14px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .availability-row {
    align-items: stretch;
    flex-direction: column;
  }

  .button-secondary {
    width: 100%;
  }

  .brand-logo {
    max-width: 100%;
  }

  .header-copy h1 {
    font-size: 2rem;
  }

  .site-footer {
    flex-direction: column;
  }
}


/* =========================================
   Mobile hardening - added 2026-09-18
   CSS only. No booking fields or JS changed.
   ========================================= */

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 900px) {
  .page-shell,
  .availability-shell {
    width: min(100% - 28px, 1180px) !important;
  }

  .summary-card {
    position: static !important;
    top: auto !important;
  }

  .room-grid {
    grid-template-columns: 1fr !important;
  }

  .availability-intro {
    grid-template-columns: 1fr !important;
    display: grid !important;
    gap: 20px !important;
  }

  .availability-controls {
    width: 100% !important;
    max-width: none !important;
  }
}

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

  .site-header,
  .hero {
    overflow: hidden;
  }

  .header-inner,
  .hero-inner,
  .page-shell,
  .availability-shell,
  .site-footer,
  .wrap {
    width: calc(100% - 20px) !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .header-inner {
    padding-top: 20px !important;
    padding-bottom: 24px !important;
    gap: 16px !important;
  }

  .brand-logo,
  .bristol-logo {
    width: min(100%, 320px) !important;
    max-width: 320px !important;
    height: auto !important;
  }

  .header-copy {
    padding-left: 0 !important;
    border-left: 0 !important;
  }

  .header-copy h1,
  .availability-intro h1 {
    font-size: 1.8rem !important;
    line-height: 1.08 !important;
  }

  .header-copy p,
  .availability-intro .muted {
    font-size: .95rem !important;
    line-height: 1.5 !important;
  }

  .booking-nav,
  .top-nav {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
    width: 100% !important;
  }

  .booking-nav a,
  .top-nav a {
    justify-content: center !important;
    text-align: center !important;
    min-height: 44px !important;
    padding: 10px 8px !important;
    white-space: normal !important;
  }

  .page-shell {
    grid-template-columns: 1fr !important;
    gap: 16px !important;
    margin-top: 16px !important;
    margin-bottom: 28px !important;
  }

  .booking-card,
  .summary-card,
  .room-panel,
  #cancelCard {
    width: 100% !important;
    min-width: 0 !important;
    padding: 18px !important;
    border-radius: 14px !important;
  }

  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 0 !important;
  }

  .field {
    width: 100% !important;
    min-width: 0 !important;
    margin-bottom: 14px !important;
  }

  input,
  select,
  textarea {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    font-size: 16px !important;
  }

  input,
  select {
    min-height: 50px !important;
  }

  textarea {
    min-height: 110px !important;
  }

  .section-heading {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    margin-bottom: 18px !important;
  }

  .section-heading h2 {
    font-size: 1.35rem !important;
  }

  .availability-note {
    white-space: normal !important;
  }

  .availability-row {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 10px !important;
  }

  .button,
  .button-primary,
  .button-secondary,
  .reserve-button,
  #refreshAvailability {
    width: 100% !important;
    min-height: 50px !important;
  }

  .status {
    width: 100% !important;
  }

  .summary-card {
    order: 2;
  }

  .summary-line {
    gap: 12px !important;
  }

  .summary-line strong {
    text-align: right !important;
    overflow-wrap: anywhere;
  }

  .modal {
    padding: 12px !important;
  }

  .modal-box {
    width: 100% !important;
    max-width: 100% !important;
    padding: 24px 18px !important;
    border-radius: 14px !important;
  }

  .site-footer {
    flex-direction: column !important;
    gap: 6px !important;
    margin-top: 0 !important;
    margin-bottom: 22px !important;
    text-align: center !important;
  }

  /* Availability page */
  .hero-inner {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
  }

  .availability-shell {
    margin-top: 18px !important;
  }

  .availability-intro {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 16px !important;
  }

  .availability-controls {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
    width: 100% !important;
  }

  .availability-controls label,
  .availability-controls input,
  .availability-controls select {
    width: 100% !important;
    min-width: 0 !important;
  }

  .room-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 14px !important;
  }

  .room-panel-header {
    gap: 10px !important;
  }

  .room-panel-header h2 {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
  }

  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }

  .slot-grid button,
  .slot {
    min-width: 0 !important;
    width: 100% !important;
    min-height: 44px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
    font-size: .86rem !important;
  }

  .availability-legend {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 10px 14px !important;
  }

  /* Cancellation/manage page */
  .single {
    width: calc(100% - 20px) !important;
    max-width: 100% !important;
  }

  .cancel-row {
    grid-template-columns: 1fr !important;
    gap: 4px !important;
  }

  #cancelActions button,
  .danger {
    width: 100% !important;
    min-height: 50px !important;
  }
}

@media (max-width: 390px) {
  .slot-grid {
    grid-template-columns: 1fr !important;
  }

  .booking-nav,
  .top-nav {
    grid-template-columns: 1fr !important;
  }
}
