:root {
  --burgundy: #7a0028;
  --burgundy-dark: #5c0020;
  --beige: #f7f0de;
  --beige-deep: #efe6cf;
  --white: #ffffff;
  --black: #1a1a1a;
  --muted: #6d6570;
  --shadow: 0 12px 30px rgba(70, 10, 25, 0.12);
  --radius-lg: 24px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Nunito Sans", "Helvetica Neue", Arial, sans-serif;
  color: var(--black);
  background: radial-gradient(1200px 600px at 10% -10%, #fff7e8, var(--beige));
}

.landing-body {
  background: var(--burgundy);
  color: var(--burgundy);
}

.masters-link {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(247, 240, 222, 0.92);
  color: var(--burgundy);
  text-decoration: none;
  font-weight: 600;
}

.landing {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.poster {
  width: min(720px, 96vw);
  background: var(--beige);
  border-radius: 32px;
  padding: 18px;
  box-shadow: 0 24px 60px rgba(40, 0, 12, 0.25);
  position: relative;
}

.poster::before {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 24px;
  border: 10px solid var(--burgundy);
}

.poster-inner {
  position: relative;
  border-radius: 20px;
  padding: 28px 30px 34px;
  background: var(--beige);
}

.poster-header {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.poster-logo {
  max-width: 340px;
  width: 100%;
  height: auto;
}

.poster-hero {
  text-align: center;
  margin: 12px auto 18px;
  padding: 16px 10px;
  border: 3px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  background: #f4ead4;
}

.poster-title {
  font-family: "Arsenal", serif;
  font-size: clamp(28px, 4vw, 40px);
  color: var(--burgundy);
  font-weight: 700;
}

.poster-subtitle {
  font-family: "Arsenal", serif;
  font-size: clamp(18px, 3vw, 26px);
  color: var(--burgundy);
  font-style: italic;
}

.poster-list {
  list-style: none;
  padding: 0;
  margin: 0 0 18px;
  display: grid;
  gap: 8px;
  text-align: center;
  color: var(--burgundy);
  font-weight: 600;
}

.poster-list li::before {
  content: "•";
  margin-right: 8px;
}

.poster-cta {
  text-align: center;
  font-family: "Arsenal", serif;
  font-size: 20px;
  color: var(--burgundy);
  margin-bottom: 16px;
}

.poster-location {
  display: flex;
  justify-content: center;
  gap: 10px;
  align-items: center;
  color: var(--burgundy);
  font-weight: 600;
  margin-bottom: 16px;
}

.poster-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  background: var(--burgundy);
  color: var(--beige);
  padding: 10px 18px;
  border-radius: 999px;
  margin: 0 auto 18px;
  width: fit-content;
}

.poster-links a {
  color: var(--beige);
  text-decoration: none;
  font-weight: 600;
}

.poster-links a:hover {
  text-decoration: underline;
}

.poster-footer {
  text-align: center;
  color: var(--burgundy);
  font-weight: 600;
  display: grid;
  gap: 8px;
}

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(1120px, 92%);
  margin: 0 auto;
}

.site-header {
  background: var(--burgundy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 20;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 0;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
  font-family: "Arsenal", serif;
  font-size: 22px;
  letter-spacing: 0.5px;
}

.brand-logo {
  height: 36px;
  width: auto;
  display: block;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.nav-link {
  text-decoration: none;
  color: var(--white);
  font-weight: 600;
  padding: 8px 10px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.14);
}

.btn {
  border: none;
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 700;
  cursor: pointer;
  font-size: 14px;
  letter-spacing: 0.3px;
}

.btn-primary {
  background: var(--burgundy);
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn-primary:hover {
  background: var(--burgundy-dark);
}

.btn-ghost {
  background: transparent;
  color: var(--burgundy);
  border: 1px solid rgba(122, 0, 40, 0.35);
}

.btn-ghost:hover {
  background: rgba(122, 0, 40, 0.08);
}

.inline-form {
  margin: 0;
}

.site-main {
  padding: 28px 0 60px;
  flex: 1;
}

.site-main section + section {
  margin-top: 24px;
}

.site-footer {
  background: var(--beige);
  border-top: 1px solid rgba(122, 0, 40, 0.12);
  padding: 16px 0;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--burgundy);
  font-weight: 600;
}

.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--burgundy);
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}

.landing-footer {
  display: flex;
  justify-content: center;
  gap: 24px;
  padding: 16px 0 28px;
  color: #f7f0de;
}

.landing-footer a {
  color: #f7f0de;
  text-decoration: none;
  font-weight: 600;
}

.landing-footer a:hover {
  text-decoration: underline;
}

.hero {
  padding: 48px 0 32px;
}

.hero-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.hero-title {
  font-family: "Arsenal", serif;
  font-size: clamp(28px, 4vw, 42px);
  color: var(--burgundy);
  margin: 0;
}

.hero-sub {
  color: var(--muted);
  font-size: 16px;
  margin: 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.login-card {
  max-width: 420px;
  margin: 0 auto;
}

.login-note {
  margin-top: 16px;
}

.link {
  color: var(--burgundy);
  text-decoration: underline;
}

.section-stack {
  display: grid;
  gap: 24px;
}

.two-col {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 24px;
  align-items: start;
}

.stats-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 24px;
  align-items: start;
}

.section-title {
  font-family: "Arsenal", serif;
  font-size: 24px;
  color: var(--burgundy);
  margin: 0 0 16px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap .table {
  min-width: 720px;
}

.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.calendar-range {
  font-weight: 700;
  color: var(--burgundy);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.calendar-scroll {
  overflow-x: auto;
  border: 1px solid rgba(122, 0, 40, 0.15);
  border-radius: var(--radius-md);
  background: var(--white);
}

.calendar-grid {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.calendar-grid th,
.calendar-grid td {
  border-bottom: 1px solid rgba(122, 0, 40, 0.08);
  padding: 8px;
  text-align: center;
}

.calendar-grid th {
  background: var(--beige-deep);
  color: var(--burgundy);
  font-weight: 700;
  position: sticky;
  top: 0;
}

.time-col {
  font-weight: 700;
  color: var(--burgundy);
  background: #fffdf6;
  position: sticky;
  left: 0;
}

.slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  border: 1px solid rgba(122, 0, 40, 0.25);
  background: transparent;
  color: var(--burgundy);
  font-size: 12px;
  min-width: 70px;
}

.slot-free {
  cursor: pointer;
}

.slot-booked {
  background: #f1f1f1;
  color: #8b8b8b;
  border-color: #d8d8d8;
}

.slot-disabled {
  background: #f7f1e2;
  color: #b0a594;
  border-color: #e5dbc5;
}

.slot-mine {
  background: #7a0028;
  color: #fff;
  border-color: #7a0028;
}

.slot-selected {
  background: #7a0028;
  color: #fff;
  border-color: #7a0028;
}

.selected-slot {
  font-weight: 600;
  color: var(--burgundy);
}

label {
  font-weight: 600;
  color: var(--burgundy);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid rgba(122, 0, 40, 0.2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(122, 0, 40, 0.6);
  box-shadow: 0 0 0 3px rgba(122, 0, 40, 0.15);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--black);
  -webkit-box-shadow: 0 0 0px 1000px var(--white) inset;
  transition: background-color 9999s ease-in-out 0s;
}

.table {
  width: 100%;
  border-collapse: collapse;
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(122, 0, 40, 0.08);
  text-align: left;
}

.table th {
  background: var(--beige-deep);
  color: var(--burgundy);
  font-weight: 700;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  background: rgba(122, 0, 40, 0.12);
  color: var(--burgundy);
}

.badge.confirmed {
  background: #dff4e5;
  color: #1f6a3a;
}

.table .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action-form {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.action-select {
  width: auto;
  min-width: 160px;
}

.btn-xs {
  padding: 6px 12px;
  font-size: 12px;
}

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

.message {
  background: var(--beige-deep);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}

.message.error {
  background: #f7d9db;
  color: #7a0028;
}

@media (max-width: 720px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-nav {
    width: 100%;
    justify-content: flex-start;
    gap: 8px;
  }
  .site-nav .btn,
  .site-nav .nav-link {
    width: auto;
    text-align: center;
    padding: 6px 10px;
    font-size: 13px;
  }
  .hero-card {
    padding: 22px;
  }
  .two-col {
    grid-template-columns: 1fr;
  }
  .stats-row {
    grid-template-columns: 1fr;
  }
  .card {
    padding: 18px;
  }
  .table-wrap .table {
    min-width: 640px;
  }
  .table-wrap {
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .card {
    overflow: hidden;
  }
  .action-form {
    width: 100%;
  }
  .action-select {
    width: 100%;
  }
  .calendar-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .calendar-grid {
    min-width: 680px;
  }
  .form-grid .btn {
    width: 100%;
  }
  .footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .landing-footer {
    flex-direction: column;
    align-items: center;
  }
  .poster {
    padding: 12px;
  }
  .poster-inner {
    padding: 20px 18px 26px;
  }
  .poster-links {
    flex-direction: column;
    gap: 8px;
  }
}
