/* Layout: a roadside hotel sign on top, three room "keys" beside a month calendar, booking form and guest book below. */
:root {
  --bg: #9edfe0;
  --panel: #effbfb;
  --ink: #06303a;
  --muted: #2b5c65;
  --line: #66b8be;
  --sign: #06465a;
  --sign-ink: #eafcff;
  --brass: #ffc93c;
  --wave: #5fd3dc;
  --king: #1d6f8c;
  --double: #8a4f9e;
  --rec: #4d8a2f;
  --danger: #b3352b;
  --font-display: "Bungee", "Impact", sans-serif;
  --font-body: "DM Sans", system-ui, sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #06343d; --panel: #0c4753; --ink: #e6fbfc; --muted: #9ccfd3; --line: #1d6572;
    --sign: #032a32; --sign-ink: #eafcff; --brass: #ffd04a; --wave: #2aa5b3;
    --king: #4fb0d2; --double: #c08ad4; --rec: #86c15f; --danger: #ef7a6e;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #06343d; --panel: #0c4753; --ink: #e6fbfc; --muted: #9ccfd3; --line: #1d6572;
  --sign: #032a32; --sign-ink: #eafcff; --brass: #ffd04a; --wave: #2aa5b3;
  --king: #4fb0d2; --double: #c08ad4; --rec: #86c15f; --danger: #ef7a6e;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5;
  padding-block: 0 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.wrap { max-width: 1040px; margin: 0 auto; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }

/* sign */
.sign { background: var(--sign); color: var(--sign-ink); margin: 0 calc(-1 * max(16px, env(safe-area-inset-left, 0px))) 24px;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 24px max(16px, env(safe-area-inset-left, 0px)); border-bottom: 6px solid var(--brass); }
.sign-in { max-width: 1040px; margin: 0 auto; display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.sign h1 { font-family: var(--font-display); font-size: clamp(30px, 7vw, 56px); line-height: 1; letter-spacing: .02em; text-wrap: balance; }
.sign .sub { font-family: var(--font-mono); font-size: 12px; letter-spacing: .18em; text-transform: uppercase; opacity: .75; margin-top: 8px; }
.brand { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; min-width: 0; }
.logo { width: 460px; height: auto; max-width: 100%; flex: none; }
.vac { font-family: var(--font-display); text-align: center; border: 3px solid currentColor; border-radius: 6px; padding: 8px 18px 6px; line-height: 1.1; }
.vac b { display: block; font-size: 26px; font-weight: 400; letter-spacing: .06em; }
.vac small { display: block; font-family: var(--font-mono); font-size: 11px; letter-spacing: .1em; margin-top: 4px; }
.vac.yes { color: #7df0a8; text-shadow: 0 0 10px #7df0a888; }
.vac.no { color: #ff8b7d; text-shadow: 0 0 10px #ff8b7d88; }

.grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 24px; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: minmax(0, 1fr); } }
.col { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 18px; min-width: 0; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
h2 { font-family: var(--font-display); font-weight: 400; font-size: 20px; letter-spacing: .02em; }

/* rooms */
.rooms { display: flex; flex-direction: column; gap: 10px; }
.room { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 10px 0; overflow: hidden; background: var(--bg); }
.key { align-self: stretch; display: grid; place-items: center; background: var(--c); color: #fff; font-family: var(--font-mono); font-size: 20px; font-weight: 500; }
:root[data-theme="dark"] .key { color: #08161a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .key { color: #08161a; } }
.room h3 { font-size: 15px; font-weight: 700; }
.room p { font-size: 13px; color: var(--muted); }
.tonight { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 3px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.tonight.free { color: var(--rec); } .tonight.busy { color: var(--danger); }

/* calendar */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.cal-head h2 { text-align: center; flex: 1; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); cursor: pointer; font-size: 16px; }
.icon-btn:hover { border-color: var(--brass); }
.dow, .days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.dow span { font-family: var(--font-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); text-align: center; padding-bottom: 4px; }
.day { aspect-ratio: 1 / 1; min-height: 44px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); padding: 3px 4px; display: flex; flex-direction: column; justify-content: space-between; cursor: pointer; text-align: left; }
.day:hover { border-color: var(--brass); }
.day.out { opacity: .35; }
.day.past { opacity: .45; }
.day.today { box-shadow: inset 0 0 0 2px var(--brass); }
.day.sel { background: color-mix(in srgb, var(--brass) 30%, var(--bg)); border-color: var(--brass); }
.day .n { font-family: var(--font-mono); font-size: 12px; font-variant-numeric: tabular-nums; }
.bars { display: flex; flex-direction: column; gap: 2px; }
.bars i { display: block; height: 4px; border-radius: 2px; border: 1px solid var(--line); }
.bars i.on { border-color: transparent; background: var(--c); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 12px; color: var(--muted); }
.legend span::before { content: ""; display: inline-block; width: 14px; height: 4px; border-radius: 2px; background: var(--c); margin-right: 6px; vertical-align: middle; }

/* form */
form { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 420px) { .row2 { grid-template-columns: minmax(0, 1fr); } }
label.f { display: grid; gap: 4px; font-size: 13px; font-weight: 500; min-width: 0; }
input[type=text], input[type=date], select, textarea { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
textarea { resize: vertical; min-height: 60px; }
.chips { display: grid; gap: 8px; }
.chip { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; background: var(--bg); cursor: pointer; }
.chip input { accent-color: var(--c); width: 18px; height: 18px; }
.chip .nm { flex: 1; font-weight: 500; min-width: 0; }
.chip .st { font-family: var(--font-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.chip.off { opacity: .5; cursor: not-allowed; }
.chip.off .st { color: var(--danger); }
.chip:has(input:checked) { border-color: var(--c); box-shadow: inset 0 0 0 1px var(--c); }
.boat { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px 10px; margin: 0; display: flex; gap: 20px; flex-wrap: wrap; background: var(--bg); }
.acts-set { gap: 8px 20px; }
.boat legend { font-size: 13px; font-weight: 500; padding: 0 4px; }
.boat label { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.boat input { accent-color: var(--brass); width: 18px; height: 18px; }
.btn { background: var(--sign); color: var(--sign-ink); border: 0; border-radius: 8px; padding: 12px 18px; font-family: var(--font-display); letter-spacing: .05em; font-size: 15px; cursor: pointer; border-bottom: 4px solid var(--brass); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.small { padding: 5px 10px; font-size: 12px; border-bottom-width: 2px; }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); font-family: var(--font-body); letter-spacing: 0; font-weight: 500; }
.btn.warn { background: var(--danger); color: #fff; border-bottom-color: transparent; }
.msg { font-size: 13px; min-height: 20px; }
.msg.err { color: var(--danger); } .msg.ok { color: var(--rec); }

/* guest book */
.stays { display: flex; flex-direction: column; gap: 8px; }
.stay { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px 10px 0; background: var(--bg); overflow: hidden; }
.stay::before { content: ""; align-self: stretch; background: var(--c); grid-column: 1; }
.stay .who { font-weight: 700; overflow-wrap: anywhere; }
.stay .meta { font-size: 13px; color: var(--muted); }
.stay .acts { display: flex; gap: 6px; }
.empty { color: var(--muted); padding: 8px 0; }
.note-load { font-size: 12px; color: var(--muted); margin-top: 8px; }
.ro { font-size: 13px; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; }
@media (prefers-reduced-motion: no-preference) { .vac { transition: color .3s; } }

/* ---- shared reset for standalone pages ---- */
[hidden] { display: none !important; }
img { max-width: 100%; }
a { color: inherit; }
:root { -webkit-tap-highlight-color: transparent; }

/* ---- page tabs ---- */
.tabs { display: flex; gap: 8px; max-width: 1040px; margin: 0 auto 20px; }
.tabs a { flex: 1 1 0; text-align: center; text-decoration: none; color: var(--ink); background: var(--panel); border: 1px solid var(--line);
  border-radius: 8px; padding: 12px 10px; min-height: 44px; font-family: var(--font-display); letter-spacing: .04em; font-size: 14px; }
.tabs a[aria-current="page"] { background: var(--sign); color: var(--sign-ink); border-color: var(--sign); border-bottom: 4px solid var(--brass); }
@media (min-width: 600px) { .tabs a { flex: 0 0 auto; padding: 12px 28px; } }

/* ---- gallery ---- */
.sr { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.gal-bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
.gal-bar .f { flex: 1 1 220px; }
label.btn { display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sr:focus-visible + label.btn { outline: 3px solid var(--brass); outline-offset: 2px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; margin-top: 16px; }
.tile { aspect-ratio: 1 / 1; padding: 0; border: 0; border-radius: 8px; overflow: hidden; background: var(--line); cursor: pointer; display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb { position: fixed; inset: 0; z-index: 50; background: rgba(3, 24, 30, .95); color: #eafcff; display: flex; flex-direction: column;
  padding: env(safe-area-inset-top, 0px) max(12px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(12px, env(safe-area-inset-left, 0px)); }
.lb-top, .lb-bot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; flex-wrap: wrap; }
.lb-img { flex: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y; }
.lb-img img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 4px; }
.lb button { font: inherit; color: #eafcff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); border-radius: 8px; padding: 8px 14px; min-height: 44px; min-width: 44px; cursor: pointer; }
.lb button.danger { background: var(--danger); border-color: transparent; color: #fff; }
.lb button:focus-visible { outline: 3px solid var(--brass); outline-offset: 2px; }
.lb .cap { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }

/* ---- phone ---- */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .sign { padding-top: 16px; padding-bottom: 14px; margin-bottom: 16px; }
  .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
  .logo { width: 100%; }
  .vac { padding: 6px 14px 4px; } .vac b { font-size: 20px; }
  .panel { padding: 14px; }
  input[type=text], input[type=date], select, textarea { font-size: 16px; min-height: 44px; }
  .chip { min-height: 48px; }
  .boat label { min-height: 36px; }
  .room { grid-template-columns: 48px minmax(0, 1fr); padding-right: 12px; }
  .key { grid-row: 1 / span 2; }
  .room .tonight { grid-column: 2; justify-self: start; }
  .stay { grid-template-columns: 6px minmax(0, 1fr); padding-right: 12px; }
  .stay::before { grid-row: 1 / span 2; }
  .stay .acts { grid-column: 2; }
  .day { min-height: 46px; }
  .btn, .icon-btn { min-height: 44px; }
  .btn.small { min-height: 40px; }
  .photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}