:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #1c2430;
  --muted: #5b6470;
  --line: #dfe3e8;
  --accent: #1e5aa8;
  --accent-text: #ffffff;
  --accent-soft: #e6eef8;
  --error: #a4262c;
  --error-soft: #fbeaea;
  --ok: #2e6b3a;
  --ok-soft: #e7f3e9;
  --warn: #8a5a00;
  --warn-soft: #fdf3dc;
  --radius: 10px;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --card: #1b2129;
    --text: #e8ecf1;
    --muted: #9aa4b1;
    --line: #2e3640;
    --accent: #7fb0ec;
    --accent-text: #0d1b2e;
    --accent-soft: #1f2e42;
    --error: #f2a3a3;
    --error-soft: #3a2224;
    --ok: #9fd4a8;
    --ok-soft: #1f3324;
    --warn: #f0c46a;
    --warn-soft: #3a3020;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.page { max-width: 720px; margin: 0 auto; padding: 24px 16px 40px; }

.head h1 { margin: 0 0 4px; font-size: 1.6rem; }
.head p { margin: 0 0 20px; }

h2 { margin: 0 0 12px; font-size: 1.2rem; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.intro { white-space: pre-line; margin-top: 0; }

label { display: block; margin-bottom: 12px; font-weight: 500; font-size: 0.95rem; }
.optional { font-weight: 400; color: var(--muted); }

input, select, textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
  color: var(--text);
  font: inherit;
}
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > label { flex: 1 1 160px; min-width: 0; }
.row > label.narrow { flex: 0 1 110px; }

.room {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 12px 0;
  margin-bottom: 12px;
}
.room-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-weight: 600; }
.room .row > label { flex: 1 1 90px; }

button {
  font: inherit;
  border-radius: 8px;
  padding: 10px 18px;
  border: 1px solid transparent;
  cursor: pointer;
}
button:disabled { opacity: 0.5; cursor: default; }
.primary { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.secondary { background: transparent; color: var(--text); border-color: var(--line); }
.danger { background: transparent; color: var(--error); border-color: var(--error); }
.link { background: none; border: none; padding: 4px 0; margin: 0 0 16px; color: var(--accent); }

.actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin-top: 8px; }
form > .primary { width: 100%; }

.notice { border-radius: 8px; padding: 10px 12px; margin: 12px 0; }
.notice.error { background: var(--error-soft); color: var(--error); }

.offer-group { margin-bottom: 16px; }
.offer-group h3 { font-size: 1rem; margin: 0 0 8px; }
.offer {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 8px;
  font-weight: 400;
  cursor: pointer;
}
.offer input { width: auto; margin: 4px 0 0; }
.offer.selected { border-color: var(--accent); background: var(--accent-soft); }
.offer.unavailable { cursor: default; opacity: 0.6; }
.offer-body { flex: 1; }
.offer-name { font-weight: 600; }
.offer-price { text-align: right; white-space: nowrap; }
.offer-price strong { display: block; }

.summary { background: var(--accent-soft); border-radius: 8px; padding: 12px; margin-bottom: 16px; }
.summary p { margin: 0 0 4px; }
.summary p:last-child { margin-bottom: 0; }

.conditions {
  white-space: pre-line;
  font-size: 0.875rem;
  border-left: 3px solid var(--line);
  padding-left: 12px;
  margin: 8px 0 12px;
}

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { width: auto; margin-top: 4px; flex: none; }

.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.booking-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.booking-head h2 { margin: 0; }
.badge { border-radius: 999px; padding: 2px 12px; font-size: 0.875rem; font-weight: 600; white-space: nowrap; }
.badge.Requested { background: var(--warn-soft); color: var(--warn); }
.badge.Confirmed { background: var(--ok-soft); color: var(--ok); }
.badge.Cancelled, .badge.Declined { background: var(--error-soft); color: var(--error); }

.foot { margin-top: 24px; text-align: center; }
.foot p { margin: 4px 0; }
a { color: var(--accent); }

[hidden] { display: none !important; }
