:root {
  color-scheme: dark;
  font-family: "Inter", system-ui, sans-serif;
  background: #101312;
  color: #f1f2ed;
  --subtle: #b0b8b2;
  --border: #343c37;
  --green: #a1e6af;
  --red: #ffaba5;
}
* { box-sizing: border-box; }
body { margin: 0; background: radial-gradient(ellipse at 13% 14%, #1d2b22 0%, transparent 47%), #101312; }
.wrap { max-width: 1160px; width: calc(100% - 48px); margin-inline: auto; }
.top { background: #101312; border-bottom: 1px solid var(--border); }
.top-inner, .brand { display: flex; align-items: center; }
.top-inner { justify-content: space-between; gap: 12px; padding-block: 12px; }
.brand { gap: 10px; }
.brand img { object-fit: contain; }
.brand strong, .brand span { display: block; }
.brand strong { font-size: .88rem; }
.brand span { color: var(--subtle); font-size: .78rem; margin-top: 3px; }
button, select { font: inherit; }
button, select { color: inherit; border: 1px solid #4a574f; border-radius: 8px; background: #222a25; min-height: 44px; cursor: pointer; }
button:hover:not(:disabled), select:hover { border-color: var(--green); }
button:focus-visible, select:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
button:disabled { opacity: .35; cursor: default; }
.share { padding: 0 14px; font-size: .82rem; white-space: nowrap; }
.hero { overflow: hidden; display: grid; grid-template-columns: 1fr 1.05fr; align-items: stretch; border: 1px solid #465048; border-radius: 16px; margin-block: 28px 22px; background: linear-gradient(120deg, #262e29, #171c19); box-shadow: 0 18px 55px #0004; }
.hero-copy { align-self: center; padding: 29px clamp(20px, 4.1vw, 48px); }
.hero h1 { font-family: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif; font-size: clamp(2rem, 3.7vw, 3.55rem); letter-spacing: -.045em; line-height: 1.02; margin: 0; }
.hero h1 span { display: block; color: var(--green); margin-top: 6px; }
.hero p { color: var(--subtle); margin: 14px 0 0; font-size: .94rem; }
.hero img { width: 100%; height: 100%; object-fit: cover; min-height: 200px; }
.layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.panel { background: #191e1b; border: 1px solid var(--border); border-radius: 14px; padding: 20px; min-width: 0; }
.month-nav, .agenda-head, .jump { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
h2 { margin: 0; font-size: clamp(1.1rem, 2.3vw, 1.45rem); letter-spacing: -.025em; }
.month-nav { margin-bottom: 14px; }
.month-nav button { width: 46px; font-size: 1.6rem; line-height: 1; }
.week, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
.week { text-align: center; color: var(--subtle); font-size: .75rem; margin-bottom: 7px; }
.days > * { min-width: 0; min-height: 45px; }
.days button { position: relative; display: grid; place-items: center; padding: 0 0 4px; border-color: #303a33; background: #212824; }
.days button.is-event { color: var(--green); }
.days button.is-holiday { color: var(--red); }
.days button[aria-pressed="true"] { background: #334d3b; border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.event-dot, .holiday-dot { background: var(--green); width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.holiday-dot { background: var(--red); }
.days .event-dot { position: absolute; bottom: 5px; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--subtle); margin-block: 13px 17px; font-size: .73rem; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.jump { padding-top: 14px; border-top: 1px solid var(--border); color: var(--subtle); font-size: .85rem; }
.jump select { padding: 0 10px; min-width: 130px; }
.agenda-head { min-height: 44px; margin-bottom: 12px; flex-wrap: wrap; }
.agenda-head button { font-size: .8rem; padding: 0 10px; }
.entry { display: grid; grid-template-columns: 55px minmax(0, 1fr); gap: 13px; padding: 13px 0; border-top: 1px solid var(--border); }
.date-tile { align-self: start; display: grid; text-align: center; padding: 6px 1px; border-radius: 8px; background: #24362b; color: var(--green); }
.date-tile strong { font-size: 1.1rem; line-height: 1.2; }
.date-tile span { font-size: .72rem; }
.entry h3 { margin: 0 0 4px; font-size: 1.06rem; }
.entry p, .empty { color: var(--subtle); font-size: .88rem; line-height: 1.5; margin: 0; }
.entry img { width: 100%; height: auto; display: block; border-radius: 6px; margin-top: 9px; }
#month-ranges { margin-top: 14px; }
#month-ranges .entry { padding-bottom: 0; }
#month-ranges .date-tile { background: #3c3221; color: #f5d596; }
.entry.holiday .date-tile { color: var(--red); background: #392a29; }
.empty { padding-block: 13px; border-top: 1px solid var(--border); }
footer { color: var(--subtle); padding-block: 24px; font-size: .78rem; }
.toast { position: fixed; z-index: 2; bottom: 18px; left: 50%; translate: -50% 0; background: #26382d; color: #fff; padding: 11px 14px; border-radius: 8px; border: 1px solid #62776a; width: max-content; max-width: calc(100% - 32px); }
[hidden] { display: none !important; }
@media (max-width: 760px) {
  .wrap { width: calc(100% - 28px); }
  .hero { margin-block: 16px; }
  .hero-copy { padding: 18px 14px; }
  .hero img { min-height: 0; object-fit: contain; }
  .layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .panel { padding: 15px; }
}
@media (max-width: 420px) {
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(1.65rem, 7.1vw, 2rem); }
  .hero h1 span { display: inline; }
  .hero p { margin-top: 8px; }
  .hero img { max-height: 154px; object-fit: contain; background: #111412; }
}

.view-nav { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 0 0 15px; }
.view-toggle, .period, .dialog-head { display: flex; align-items: center; gap: 8px; }
.view-toggle button, .view-nav select, .admin-actions button, #cancel-edit, #refresh { padding: 0 12px; }
.view-toggle button[aria-pressed="true"] { background: #334d3b; border-color: var(--green); }
.period button, .dialog-head button { min-width: 44px; font-size: 1.45rem; }
.period h2 { min-width: 10ch; text-align: center; }
#week { display: grid; gap: 10px; max-width: 760px; }
.week-day h3 { font-size: 1.05rem; margin: 0 0 8px; }
.calendar-item { display: grid; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
.calendar-item h4 { margin: 0; font-size: 1rem; }
.calendar-item img { width: 100%; max-width: 620px; height: auto; display: block; border-radius: 5px; }
.week-range .calendar-item { border: 0; margin: 0; padding: 0; }
.action { display: inline-flex; align-items: center; justify-content: center; width: fit-content; padding: 8px 14px; min-height: 44px; border: 1px solid #709d7a; background: #2a4332; border-radius: 8px; color: #effff2; text-decoration: none; }
.action:hover { background: #395742; }
.muted { margin: 0; color: var(--subtle); font-size: .88rem; line-height: 1.45; }
.closure { border: 1px solid; border-radius: 7px; padding: 8px 10px; margin-block: 8px; font-weight: 650; }
.closed, .days .closed-cell { background: #462523; color: #ffd2cc; border-color: #b4625a; }
.partial, .days .partial-cell { background: #472f1a; color: #ffdaac; border-color: #b5804e; }
.holiday-text { color: var(--red); }
.closed-dot, .partial-dot { border-radius: 50%; width: 6px; height: 6px; background: #ff8e83; }
.partial-dot { background: #ffba76; }
.days button { min-height: 61px; padding: 3px 0 7px; align-content: center; gap: 1px; }
.days button small { font-size: .64rem; line-height: 1.06; overflow-wrap: anywhere; }
.days button.continues-before { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: -5px; border-left: 0; }
.days button.continues-after { border-top-right-radius: 0; border-bottom-right-radius: 0; border-right: 0; }
footer a { color: var(--subtle); margin-left: 12px; }
dialog { width: min(530px, calc(100% - 24px)); max-height: 90dvh; overflow: auto; border-radius: 14px; padding: 18px; border: 1px solid var(--border); background: #1b221e; color: inherit; }
dialog::backdrop { background: #000a; }
.dialog-head { justify-content: space-between; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.form-grid label, .admin-actions label { display: grid; gap: 5px; color: var(--subtle); font-size: .86rem; }
input, .form-grid select { width: 100%; min-height: 44px; padding: 8px; border: 1px solid #566459; border-radius: 7px; color: inherit; background: #222a25; font: inherit; }
#booking-form .action { margin-top: 12px; }
.admin-page { padding-block: 16px 30px; display: grid; gap: 16px; }
.admin-page h1, .admin-entry h3, .admin-entry p { margin: 0 0 6px; }
.admin-entry { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); overflow-wrap: anywhere; }
.admin-actions { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
.admin-actions input { max-width: 130px; }
.top a { color: inherit; }
@media (max-width: 620px) {
  .period { width: 100%; justify-content: space-between; order: 3; }
  .view-nav select { margin-left: auto; }
}

.login-page { max-width: 670px; }
.login-page h2 { margin-bottom: 9px; }
.remember { display: flex; align-items: center; gap: 9px; width: fit-content; margin: 10px 0; }
.remember input { width: 19px; min-height: 19px; accent-color: #6eb781; }
#logout { padding-inline: 12px; }
#operators-panel form, #password-form { margin-bottom: 12px; }

.buffet-preview {
  display: block;
  overflow: hidden;
  width: min(33px, 88%);
  aspect-ratio: 1;
  border-radius: 4px;
  border: 1px solid #738079;
  position: relative;
}
.buffet-preview img {
  position: absolute;
  top: -17%;
  left: -22%;
  height: 134%;
  width: auto;
  max-width: none;
}

.booking-calendar { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 6px; }
.booking-calendar > button { min-width: 34px; padding: 0 6px; font-size: 1.4rem; }
#booking-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
#booking-week button { padding: 4px 1px; font-size: clamp(.69rem, 2.1vw, .9rem); }
#booking-week .buffet-day { border-bottom-color: #86bb90; }
#booking-week button[aria-pressed="true"] { border-color: var(--green); background: #334d3b; }
.booking-date-line { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.booking-date-line input { width: min(170px, 100%); }
#booking-buffet { margin-bottom: 5px; }
.booking-total { margin: 0 0 14px; font-size: 1.05rem; font-weight: 700; }
.reservation-group + .reservation-group { margin-top: 14px; }
.reservation-group h4 { margin: 0 0 7px; font-size: .89rem; color: var(--subtle); }
.reservation-names { display: flex; flex-wrap: wrap; gap: 7px; }
.reservation-name { padding: 5px 13px; font-weight: 650; overflow-wrap: anywhere; }
.reservation-name.pending, .reservation-status.pending { background: #4a3812; border-color: #ab8739; color: #ffe5a0; }
.reservation-name.confirmed, .reservation-status.confirmed { background: #223f2d; border-color: #669a73; color: #c1f2ca; }
.reservation-name.closed, .reservation-status.declined, .reservation-status.cancelled { background: #482623; border-color: #a95853; color: #ffcbc3; }
.reservation-status { display: inline-block; padding: 3px 8px; margin-bottom: 0; border: 1px solid; border-radius: 6px; }
.reservation-history { padding-left: 20px; }
.reservation-history li + li { margin-top: 8px; }
.reservation-history span { display: block; }

.admin-page { max-width: 780px; }
.booking-month-nav, .booking-day-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.booking-month-nav { margin: 12px 0 8px; }
.booking-month-nav button { min-width: 44px; font-size: 1.45rem; }
.booking-month-nav h3 { margin: 0; }
#booking-month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 5px; }
#booking-month-grid button { min-height: clamp(42px, 8vw, 65px); font-weight: 650; padding: 3px; }
#booking-month-grid button.today { border-color: #96a697; }
#booking-month-grid button[aria-pressed="true"], #booking-week button[aria-pressed="true"] { background: #375740; border-color: #93d1a0; }
.booking-dots { display: flex; justify-content: center; align-items: center; min-height: 9px; gap: 4px; }
.pending-mark, .confirmed-mark { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #ffd56b; }
.confirmed-mark { background: #85d69a; }
.booking-legend { display: flex; gap: 13px; margin: 8px 0 14px; color: var(--subtle); font-size: .8rem; }
#booking-week-title { margin: 0 0 6px; font-size: 1rem; }
#booking-week button { min-height: 51px; }
#booking-week small { display: block; font-size: clamp(.58rem, 1.65vw, .78rem); line-height: 1.1; margin-top: 3px; }
#booking-today { padding-inline: 9px; }
.booking-day-heading { margin-top: 18px; flex-wrap: wrap; }
#booking-buffet { margin: 0; }
#booking-day-events { margin: 7px 0; }
#manual-form .action { margin-top: 10px; }
#custom-event-form, #booking-options-form { margin-bottom: 12px; }

.guest-request-button { margin-top: 9px; padding: 6px 13px; color: #d7e6da; }
.guest-wish-label { display: grid; gap: 6px; margin-bottom: 10px; color: var(--subtle); font-size: .86rem; }
.guest-wish-label textarea { width: 100%; box-sizing: border-box; resize: vertical; padding: 9px; border: 1px solid #566459; border-radius: 7px; color: inherit; background: #222a25; font: inherit; }
.reservation-wish { overflow-wrap: anywhere; }
.admin-actions select { min-height: 44px; max-width: 165px; }

.booking-total > span { display: block; }
.booking-total > span + span { margin-top: 4px; }
.guest-rooms { min-width: 0; border: 1px solid var(--border); border-radius: 8px; margin: 10px 0; }
.room-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; }
.room-card { display: grid; grid-template-columns: auto 1fr; align-content: start; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 7px; cursor: pointer; }
.room-card:has(input:checked) { border-color: var(--green); background: #263d2c; }
.room-card input { width: 16px; min-height: 16px; accent-color: #6eb781; }
.room-card img, .room-card > span { grid-column: 1 / -1; }
.room-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 5px; }
#room-profile-preview { width: min(100%, 260px); max-height: 170px; object-fit: contain; border-radius: 6px; }
