/* Plain shared timetable */
:root { font: 15px/1.4 Arial, Helvetica, sans-serif; color: #000; background: #fff; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
button, input, select { font: inherit; color: #000; background: #fff; border: 1px solid #000; border-radius: 0; }
button { min-height: 44px; min-width: 44px; padding: 8px 12px; cursor: pointer; }
button:hover { color: #fff; background: #000; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible, [tabindex]:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 24px; }
h2 { font-size: 18px; }
h3 { font-size: 14px; }
.shell { max-width: 1500px; margin: 0 auto; padding: 24px; }
header { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
nav { display: flex; gap: 6px; }
.status:empty { display: none; }
.status { margin: 12px 0; }
.failed, .error { font-weight: bold; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid #000; }
.day { min-width: 0; border-right: 1px solid #000; padding-bottom: 10px; }
.day:last-child { border-right: 0; }
.day-header { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 12px 10px; border-bottom: 1px solid #000; }
.is-today .day-header { color: #fff; background: #000; }
.day-content { min-height: 210px; display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.empty { font-size: 12px; }
.booking { display: block; width: 100%; text-align: left; padding: 8px; overflow-wrap: anywhere; }
.booking span { display: block; }
.booking-time { font-size: 12px; margin-bottom: 6px; }
.booking-name { font-weight: bold; }
.booking-title, .booking-tag { font-size: 12px; margin-top: 4px; }
.booking.owned { border-left-width: 4px; }
.booking-tag { text-decoration: underline; }
.day-add { margin: 0 10px; width: calc(100% - 20px); }
.skip { position: absolute; top: -100px; left: 10px; padding: 10px; background: #fff; z-index: 10; }
.skip:focus { top: 10px; }
dialog { width: min(460px, calc(100% - 24px)); max-height: calc(100dvh - 24px); margin: auto; padding: 20px; border: 1px solid #000; border-radius: 0; overflow-y: auto; box-shadow: none; }
dialog::backdrop { background: #0008; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
#readonly-note { margin-bottom: 12px; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
label { display: block; margin: 12px 0 5px; }
input:not([type="checkbox"]), select { display: block; width: 100%; min-width: 0; min-height: 44px; padding: 8px; }
input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: #000; }
input[readonly] { border-style: dashed; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.error, .delete-confirm { border: 1px solid #000; padding: 12px; margin-top: 16px; }
.delete-confirm p { margin-bottom: 10px; }
.delete-confirm button { margin: 4px 0; }
.dialog-actions { display: flex; align-items: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.spacer { flex: 1; }
#save, #confirm-delete { background: #000; color: #fff; }
#save:hover, #confirm-delete:hover { background: #fff; color: #000; }
@media (max-width: 900px) and (min-width: 641px) {
  .shell { padding: 16px; }
  .day-content { padding: 6px; }
  .day-header { padding: 10px 6px; }
  .booking { padding: 6px; }
  .booking-time { font-size: 11px; }
  .day-add { margin: 0 6px; width: calc(100% - 12px); }
}
@media (max-width: 640px) {
  .shell { padding: 16px; }
  header { align-items: center; gap: 12px; margin-bottom: 20px; }
  h1 { font-size: 20px; }
  header button { font-size: 13px; padding: 8px; }
  .calendar-toolbar { align-items: flex-start; flex-direction: column; gap: 10px; }
  nav { width: 100%; }
  #today { flex: 1; }
  .week-grid { display: block; }
  .day { border-right: 0; border-bottom: 1px solid #000; }
  .day:last-child { border-bottom: 0; }
  .day-header { justify-content: flex-start; gap: 8px; }
  .day-content { min-height: 0; }
  .booking { padding: 10px; }
  dialog { padding: 16px; }
  .dialog-actions button { font-size: 13px; padding: 8px; }
  .dialog-actions .spacer { display: none; }
  #dismiss { margin-left: auto; }
}
