@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&display=swap');

/* ── Design tokens ─────────────────────────────────────── */
:root {
  --bg: #ece7db;
  --card: #ffffff;
  --ink: #433d39;
  --brand: #7f9485;
  --brand-dark: #6f8578;
  --line: #d7d0c3;
  --muted: #6f6964;
  --soft: #f0e6d6;
  --green: #2e7d41;
  --green-light: #e8f8e8;
  --green-border: #8fd39a;
  --red: #cb3131;
  --red-dark: #a91d1d;
  --orange: #e2872f;
}

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

body {
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  margin: 0;
  background: var(--bg) url('/theme/theme-bg.png') no-repeat top center fixed;
  background-size: cover;
  color: var(--ink);
}

/* ── Typography hierarchy ──────────────────────────────── */
h1 { font-size: 26px; font-weight: 700; line-height: 1.25; margin: 0 0 14px; }
h2 { font-size: 21px; font-weight: 700; line-height: 1.3;  margin: 0 0 10px; }
h3 { font-size: 17px; font-weight: 700; line-height: 1.3;  margin: 0 0 8px;  }
p  { margin: 0 0 10px; line-height: 1.55; }
a  { color: var(--brand-dark); font-weight: 700; text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--brand); }

/* ── Header / nav ──────────────────────────────────────── */
header {
  position: relative;
  z-index: 1100;
  background: rgba(248,244,236,.92);
  color: var(--ink);
  padding: 14px 16px;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
header .header-logo {
  height: 30px;
  width: auto;
  margin-right: 8px;
  vertical-align: middle;
  border-radius: 4px;
}
header a.site-name {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.menu-wrap { position: relative; z-index: 1200; }
.menu-btn {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background .15s ease;
}
.menu-btn:hover { background: rgba(0,0,0,.04); }
.menu-panel {
  position: absolute;
  right: 0;
  top: 38px;
  min-width: 170px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,.12);
  display: none;
  z-index: 1300;
}
.menu-panel.open { display: block; }
.menu-panel a {
  display: block;
  padding: 10px 12px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a:hover { background: rgba(0,0,0,.03); }

/* ── Layout ────────────────────────────────────────────── */
main {
  max-width: 900px;
  margin: 16px auto;
  padding: 0 12px;
}

/* ── Card ──────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  transition: box-shadow .2s ease;
}

/* ── Text utilities ────────────────────────────────────── */
.title { font-weight: 700; font-size: 17px; margin-bottom: 4px; }
.meta  { font-size: 14px; color: var(--muted); margin-bottom: 4px; }
.muted { color: var(--muted); font-size: 13px; }

/* ── Form elements ─────────────────────────────────────── */
label {
  display: block;
  margin-top: 10px;
  margin-bottom: 6px;
  font-weight: 700;
}
input,
select,
textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  background: var(--card);
  color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }

/* ── Buttons ───────────────────────────────────────────── */
button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: var(--brand);
  color: #fff;
  transition: background .15s ease, box-shadow .15s ease;
}
button:hover { background: var(--brand-dark); }
button.brand,
.btn-brand {
  background: var(--brand);
  color: #fff;
}
button.brand:hover,
.btn-brand:hover {
  background: var(--brand-dark);
}
button.book {
  background: var(--green);
  color: #fff;
  border: 1px solid #1a5a27;
}
button.book:hover { box-shadow: 0 2px 8px rgba(0,0,0,.15); }
button.booked {
  background: var(--green-light);
  color: var(--green);
  border: 1px solid var(--green-border);
  cursor: default;
}
button.full {
  background: var(--red);
  color: #fff;
  cursor: pointer;
  white-space: pre-line;
  line-height: 1.2;
}
button.waitlisted {
  background: var(--orange);
  color: #fff;
  cursor: default;
  white-space: pre-line;
  line-height: 1.2;
}
button.closed {
  background: #aaa;
  color: #fff;
  cursor: default;
}
.btn-secondary { background: #8a7f76; color: #fff; }
.btn-secondary:hover { background: #7a706a; }
.tiny-btn {
  padding: 6px 10px;
  font-size: 12px;
  border-radius: 7px;
  margin-left: 6px;
  background: var(--brand);
  color: #fff;
  border: 0;
  cursor: pointer;
}

/* ── Badges & pills ────────────────────────────────────── */
.badge {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.badge.available {
  color: var(--green);
  background: var(--green-light);
  border-color: var(--green-border);
  font-weight: 700;
}
.badge.full {
  color: #fff;
  background: var(--red);
  border-color: var(--red-dark);
  font-weight: 700;
}
.badge.default { color: #415748; background: #dfe8df; }

.price-pill {
  display: inline-block;
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 999px;
  margin-right: 6px;
  border: 1px solid transparent;
  vertical-align: middle;
}
.price-pill.free {
  background: var(--green-light);
  color: var(--green);
  border-color: var(--green-border);
  font-weight: 700;
}

/* ── Status notices ────────────────────────────────────── */
.ok {
  color: var(--green);
  background: var(--green-light);
  border: 1px solid var(--green-border);
  border-radius: 8px;
  padding: 10px;
  font-size: 13px;
}
.warn { color: #8a5a00; font-size: 13px; }
.hint { color: var(--muted); font-size: 13px; }

/* ── Event rows (home, bookings) ───────────────────────── */
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: var(--card);
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  transition: box-shadow .2s ease;
}
.row:hover { box-shadow: 0 3px 14px rgba(0,0,0,.11); }
.row.full    { background: #e8e1d5; }
.row.private { background: #e0d7c7; }
.row.with-qr {
  grid-template-columns: 1fr 120px;
  align-items: stretch;
}

/* ── QR code box ───────────────────────────────────────── */
.qr-box {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  overflow: hidden;
}
.qr-box img { width: 100%; height: 100%; object-fit: contain; }

/* ── Homepage hero ─────────────────────────────────────── */
.hero-wrap {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.hero-logo {
  width: min(360px, 90%);
  height: auto;
  display: block;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.22));
}
.hero-text {
  max-width: 760px;
  background: var(--card);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
  padding: 12px 14px;
  text-align: center;
  font-size: 15px;
  line-height: 1.5;
}

/* ── Schedule day headers ──────────────────────────────── */
.day-header {
  margin: 14px 2px 8px;
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  display: inline-block;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.day-group { margin-bottom: 14px; }

/* ── Profile/help icons ────────────────────────────────── */
.help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid var(--brand);
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-left: 4px;
  user-select: none;
}
.help:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

/* ── Profile entry blocks ──────────────────────────────── */
.entry {
  border: 1px solid rgba(0,0,0,.08);
  border-radius: 10px;
  padding: 10px;
  margin-top: 10px;
  background: var(--card);
}

/* ── Empty state ───────────────────────────────────────── */
.empty { color: var(--muted); font-size: 14px; }

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  main { padding: 0 8px; }
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row.with-qr { grid-template-columns: 1fr; }
  .qr-box { max-width: 140px; margin: 0 auto; }
  button { min-height: 44px; }
}
