:root {
  font-family: system-ui, sans-serif;
  color: #2d201e;
  background: #f8f2e7;
  --wine: #741f31;
  --paper: #fffaf2;
  --edge: #cabcac;
  --secondary: #60514b;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input, select, textarea { font: inherit; }
button {
  min-height: 48px;
  padding: .55rem .85rem;
  border: 1px solid var(--edge);
  border-radius: .5rem;
  color: var(--wine);
  background: var(--paper);
  font-weight: 650;
  cursor: pointer;
  -webkit-tap-highlight-color: #741f3129;
}
button:active { transform: translateY(1px); }
button:disabled { opacity: .62; cursor: default; }
:focus-visible { outline: 3px solid #9d5d31; outline-offset: 3px; }
.primary { color: #fff9ec; background: var(--wine); border-color: var(--wine); }
.danger { color: #881e2c; }
.wrap { width: min(100% - 2rem, 62rem); margin-inline: auto; }
.masthead { background: #f0e4d5; border-bottom: 1px solid var(--edge); padding: 1rem 0; }
.masthead-content, .toolbar, .form-heading, .form-actions {
  display: flex; justify-content: space-between; align-items: center; gap: .75rem;
}
.brand { font-size: .94rem; color: var(--wine); font-weight: 650; }
h1, h2 { font: normal 2rem/1.08 Georgia, serif; margin: 0; color: var(--wine); }
h1 { font-size: clamp(2.15rem, 7vw, 3rem); }
h2 { font-size: clamp(1.65rem, 5vw, 2rem); }
#staff, output { color: var(--secondary); }
main { padding-block: 1.25rem max(1.5rem, env(safe-area-inset-bottom)); }
.day-controls { display: flex; align-items: stretch; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.day-controls [aria-pressed="true"] { color: #fff9ec; background: var(--wine); border-color: var(--wine); }
.date-control {
  min-height: 48px; display: flex; flex-wrap: wrap; align-items: center; gap: .45rem;
  padding: 0 .65rem; border: 1px solid var(--edge); border-radius: .5rem; background: var(--paper);
}
.date-control input { min-width: 0; min-height: 44px; border: 0; background: transparent; color: inherit; }
#notice:empty { display: none; }
#notice { margin: .8rem 0 0; }
.board { display: grid; gap: .85rem; margin-top: 1rem; }
.room { border: 1px solid var(--edge); border-radius: .65rem; background: var(--paper); padding: 1rem; min-width: 0; }
.room h3 { margin: 0; color: var(--wine); font: 1.55rem Georgia, serif; }
.capacity { color: var(--secondary); margin: .3rem 0 .85rem; }
.shift + .shift { margin-top: 1rem; }
.shift h4 { margin: 0 0 .4rem; font-size: 1rem; }
.shift p { margin: .25rem 0 0; color: var(--secondary); }
.bookings { list-style: none; padding: 0; margin: 0; }
.booking {
  width: 100%; display: grid; grid-template-columns: 3.25rem minmax(0, 1fr) auto; gap: .45rem;
  margin-top: .3rem; text-align: left; color: #2d201e; padding: .55rem .65rem;
}
.booking span:nth-child(2) { overflow-wrap: anywhere; }
.booking time { color: var(--wine); font-variant-numeric: tabular-nums; }
.booking strong { font-weight: 650; }
.message { background: #f2e7d9; border: 1px solid var(--edge); border-radius: .5rem; padding: .65rem; margin-top: .75rem; }
.message p { margin: 0 0 .5rem; }
.account { position: relative; }
.account summary, .access-panel summary { color: var(--wine); cursor: pointer; font-weight: 650; padding: .45rem .2rem; }
.account button { position: absolute; z-index: 1; right: 0; min-width: 9.5rem; box-shadow: 0 3px 10px #25141128; }
.access-panel { margin-top: 1rem; }
.access-panel input, .access-panel select { min-height: 48px; padding-inline: .45rem; max-width: 100%; }
#invite-output { margin-top: .85rem; }
.sign-in { max-width: 30rem; margin: 1rem auto; }
#access-error { color: #881e2c; }
dialog {
  border: 1px solid var(--edge); border-radius: .75rem; padding: 1rem;
  width: min(35rem, 100% - 1.2rem); max-height: 90dvh; color: inherit; background: var(--paper);
}
dialog::backdrop { background: #271a1cb3; }
.form-fields { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .8rem; }
.form-fields label { min-width: 0; font-weight: 600; }
.form-fields span { color: var(--secondary); font-weight: 400; }
.form-fields .full { grid-column: span 2; }
.form-fields input, .form-fields select, .form-fields textarea {
  border: 1px solid #a89b8f; border-radius: .35rem; background: white; color: inherit;
  width: 100%; min-width: 0; min-height: 46px; padding: .37rem .5rem; margin-top: .23rem;
}
.form-actions { margin-top: .9rem; flex-wrap: wrap; justify-content: flex-start; }
#form-error { color: #881e2c; }
@media (min-width: 44rem) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 25rem) { .wrap { width: calc(100% - 1.25rem); } }
