:root {
  color-scheme: light;
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #ffffff;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.14);
  --accent: #007aff;
  --accent-dark: #0066d6;
  --accent-soft: #eaf4ff;
  --warn: #9a6700;
  --warn-soft: #fff4d8;
  --danger: #d70015;
  --danger-soft: #ffebee;
  --blue: #32ade6;
  --blue-soft: #e8f7ff;
  --violet: #af52de;
  --violet-soft: #f7edff;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  --soft-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

* {
  box-sizing: border-box;
  touch-action: manipulation;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family:
    "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 28px 24px 18px;
}

.app-header h1,
.panel-heading h2,
.time-section h3,
.lookup-section h3,
.admin-section h3 {
  margin: 0;
  letter-spacing: 0;
}

.app-header h1 {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.05;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 1px solid rgba(60, 60, 67, 0.12);
  border-radius: 50%;
  background: white;
  box-shadow: var(--soft-shadow);
  overflow: hidden;
}

.brand-logo img {
  width: 30px;
  height: 30px;
  object-fit: contain;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.header-actions {
  display: grid;
  grid-template-columns: 40px minmax(145px, auto) 40px;
  align-items: center;
  gap: 10px;
}

.header-actions strong {
  text-align: center;
  font-size: 18px;
}

.mobile-quick-actions {
  display: none;
}

.icon-button,
.secondary-button,
.primary-button,
.danger-button {
  border: 1px solid transparent;
  border-radius: 12px;
  min-height: 40px;
  transition:
    transform 0.16s ease,
    background-color 0.16s ease,
    border-color 0.16s ease;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--line);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.icon-button span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.icon-button.add-button {
  background: var(--accent-soft);
  border-color: rgba(0, 122, 255, 0.18);
  color: var(--accent-dark);
  font-weight: 900;
}

.icon-button.close-button {
  background: var(--danger-soft);
  border-color: rgba(215, 0, 21, 0.16);
  color: var(--danger);
  font-weight: 900;
}

.secondary-button {
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.86);
  border-color: var(--line);
  color: var(--ink);
  font-weight: 750;
  white-space: nowrap;
}

.primary-button {
  width: 100%;
  padding: 0 16px;
  background: var(--accent);
  color: white;
  border-color: var(--accent);
  font-weight: 800;
}

.danger-button {
  width: 100%;
  padding: 0 16px;
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(215, 0, 21, 0.16);
  font-weight: 800;
}

.icon-button:hover,
.secondary-button:hover,
.primary-button:hover,
.danger-button:hover {
  transform: translateY(-1px);
}

.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 24px 34px;
}

.calendar-panel,
.notice-panel,
.booking-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.calendar-panel {
  padding: 18px;
}

.notice-panel {
  padding: 16px 18px;
}

.notice-panel h2 {
  margin: 0 0 10px;
  font-size: 20px;
}

.notice-panel ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.notice-panel a {
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.booking-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
  padding: 18px;
}

.booking-panel > .panel-heading {
  grid-column: 1 / -1;
}

.admin-section {
  grid-column: 1 / -1;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading h2 {
  font-size: 22px;
  font-weight: 800;
}

.panel-heading p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.panel-heading.compact {
  align-items: center;
  margin-bottom: 12px;
}

.weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.weekdays {
  gap: 6px;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.calendar-grid {
  gap: 6px;
}

.calendar-grid.is-sliding-left {
  animation: calendarSlideLeft 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.calendar-grid.is-sliding-right {
  animation: calendarSlideRight 0.22s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.calendar-grid.is-entering-left {
  animation: calendarEnterLeft 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.calendar-grid.is-entering-right {
  animation: calendarEnterRight 0.24s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes calendarSlideLeft {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(-18px);
  }
}

@keyframes calendarSlideRight {
  from {
    opacity: 1;
    transform: translateX(0);
  }

  to {
    opacity: 0;
    transform: translateX(18px);
  }
}

@keyframes calendarEnterLeft {
  from {
    opacity: 0;
    transform: translateX(-18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes calendarEnterRight {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.day-cell {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 114px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  color: var(--ink);
  text-align: left;
}

.day-cell.is-muted {
  background: rgba(242, 242, 247, 0.72);
  color: #9b9ba0;
}

.day-cell.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1.5px var(--accent);
}

.day-cell.is-today .day-number {
  background: var(--accent);
  color: white;
}

.day-number {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  font-weight: 900;
}

.day-summary {
  display: grid;
  gap: 5px;
  margin-top: 8px;
  min-height: 52px;
}

.booking-pill {
  display: block;
  overflow: hidden;
  padding: 5px 7px;
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.booking-pill span {
  display: block;
}

.booking-pill.resource-hall {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.booking-pill.resource-toyota {
  background: var(--blue-soft);
  color: #0071a8;
}

.booking-pill.resource-kia {
  background: var(--violet-soft);
  color: #8e44bd;
}

.booking-pill.resource-other {
  background: #eef7f4;
  color: #08735f;
}

.blocked-pill {
  background: var(--warn-soft);
  color: var(--warn);
}

.blocked-pill.resource-hall {
  background: var(--warn-soft);
  color: var(--warn);
}

.more-pill {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.booking-form,
.time-section,
.lookup-section,
.admin-section,
.admin-login,
.admin-actions,
.resource-form,
.booking-fields,
.modal-schedule {
  display: grid;
  gap: 12px;
}

.booking-form,
.time-section,
.lookup-section,
.admin-section {
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.booking-form {
  border-top: 0;
  padding-top: 0;
}

.is-hidden {
  display: none !important;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font-size: 16px;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(0, 122, 255, 0.14);
}

.time-section h3,
.lookup-section h3,
.admin-section h3 {
  font-size: 16px;
}

.time-slots {
  display: grid;
  gap: 8px;
}

.schedule-item {
  display: grid;
  gap: 4px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.schedule-item.resource-hall,
.booking-item.resource-hall {
  border-left: 4px solid var(--accent);
}

.schedule-item.resource-toyota,
.booking-item.resource-toyota {
  border-left: 4px solid var(--blue);
}

.schedule-item.resource-kia,
.booking-item.resource-kia {
  border-left: 4px solid var(--violet);
}

.schedule-item.resource-other,
.booking-item.resource-other {
  border-left: 4px solid #34c759;
}

.schedule-item.is-blocked.resource-hall,
.booking-item.is-blocked.resource-hall {
  border-left-color: var(--warn);
}

.schedule-item strong {
  font-size: 17px;
}

.schedule-item span {
  color: var(--muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.schedule-item.is-blocked {
  background: #fffbf2;
}

.schedule-item.is-blocked.resource-toyota {
  background: #f6faff;
}

.schedule-item.is-blocked.resource-kia {
  background: #faf7ff;
}

.schedule-item.is-blocked.resource-other {
  background: #f4fbf7;
}

.print-preview {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.print-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-booking-list {
  display: grid;
  gap: 8px;
  align-content: start;
}

.admin-booking-list h4 {
  margin: 8px 0 0;
  font-size: 15px;
}

.admin-month-controls {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.admin-current-month-button,
.admin-month-controls .secondary-button {
  min-height: 36px;
  padding: 7px 12px;
}

.admin-current-month-button {
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.admin-current-month-button:hover {
  background: rgba(0, 122, 255, 0.08);
}

.admin-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

.admin-actions > .primary-button,
.admin-actions > .danger-button,
.admin-actions > .secondary-button {
  grid-column: span 1;
}

#exportButton,
#adminLogoutButton {
  grid-column: 1 / -1;
}

#adminResourceList,
.resource-form {
  grid-column: 1 / -1;
}

#adminBookingList,
#adminFixedList,
#developerAuditList {
  grid-column: 1 / -1;
}

.admin-booking-list .booking-item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.admin-booking-list .booking-item strong {
  font-size: 16px;
  line-height: 1.3;
}

.admin-booking-list .booking-item-actions {
  grid-column: 1 / -1;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  min-width: 0;
}

.resource-form {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.resource-form .primary-button {
  min-height: 42px;
}

.admin-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.admin-table {
  width: 100%;
  min-width: 760px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.admin-table th,
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  background: rgba(245, 245, 247, 0.92);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table td {
  color: var(--ink);
}

.admin-table td:nth-child(6),
.admin-table td:nth-child(5) {
  overflow-wrap: anywhere;
}

.admin-table tr.resource-hall td:first-child {
  border-left: 4px solid var(--accent);
}

.admin-table tr.resource-toyota td:first-child {
  border-left: 4px solid var(--blue);
}

.admin-table tr.resource-kia td:first-child {
  border-left: 4px solid var(--violet);
}

.admin-table tr.resource-other td:first-child {
  border-left: 4px solid #34c759;
}

.admin-table tr.is-blocked.resource-hall td:first-child {
  border-left-color: var(--warn);
}

.admin-table input {
  min-height: 36px;
  padding: 7px 9px;
  border-radius: 10px;
  font-size: 14px;
}

.resource-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.resource-status.is-unpublished {
  background: #f2f2f7;
  color: var(--muted);
}

.table-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(62px, 1fr));
  gap: 8px;
  min-width: 132px;
}

.resource-table .table-actions {
  grid-template-columns: repeat(3, minmax(62px, 1fr));
  min-width: 210px;
}

.table-actions button {
  min-height: 36px;
  padding: 7px 12px;
}

.table-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.print-preview {
  grid-column: 1 / -1;
}

.preview-table-wrap {
  overflow-x: auto;
}

.preview-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 12px;
}

.preview-table th,
.preview-table td {
  padding: 7px;
  border: 1px solid var(--line);
  text-align: left;
}

.preview-table th {
  background: #f5f5f7;
}

.slot-button {
  display: grid;
  grid-template-columns: minmax(82px, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  text-align: left;
}

.slot-time {
  font-weight: 900;
}

.slot-name {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
}

.slot-status {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 12px;
  font-weight: 900;
}

.slot-button.is-booked .slot-status {
  background: #f2f2f7;
  color: var(--muted);
}

.slot-button.is-blocked {
  background: #fffbf2;
}

.slot-button.is-blocked .slot-status {
  background: var(--warn-soft);
  color: var(--warn);
}

.slot-button:disabled {
  cursor: not-allowed;
  opacity: 0.76;
}

.lookup-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.booking-list {
  display: grid;
  gap: 8px;
}

.booking-item {
  display: grid;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.88);
}

.booking-item strong {
  overflow-wrap: anywhere;
}

.booking-item span {
  color: var(--muted);
  font-size: 13px;
}

.expired-note {
  margin: 0;
  padding: 9px 10px;
  border-radius: 10px;
  background: #f2f2f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.booking-item-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 40;
  max-width: min(360px, calc(100vw - 36px));
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--ink);
  color: white;
  font-weight: 800;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(29, 29, 31, 0.34);
}

.modal-backdrop:not(.is-hidden) {
  animation: modalBackdropFade 0.22s ease both;
}

.modal-panel {
  display: grid;
  gap: 14px;
  width: min(620px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.modal-backdrop:not(.is-hidden) .modal-panel {
  animation: modalPanelIn 0.28s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.notice-modal-panel {
  max-width: min(520px, 100%);
}

.notice-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.notice-list a {
  color: var(--accent-dark);
  font-weight: 850;
  text-underline-offset: 3px;
}

@keyframes modalBackdropFade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modalPanelIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-heading-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.modal-heading h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.18;
}

fieldset {
  min-width: 0;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

legend {
  padding: 0 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.time-picker-grid,
.modal-actions {
  display: grid;
  gap: 10px;
}

.time-picker-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.time-picker-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.modal-actions {
  grid-template-columns: 1fr 1fr;
}

@media (max-width: 940px) {
  .app-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .calendar-panel {
    overflow-x: auto;
  }

  .weekdays,
  .calendar-grid {
    min-width: 720px;
  }

  .booking-panel {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .admin-actions > .primary-button,
  .admin-actions > .danger-button,
  .admin-actions > .secondary-button {
    grid-column: span 1;
  }

  #exportButton,
  #adminLogoutButton {
    grid-column: 1 / -1;
  }

  .print-preview {
    grid-column: 1 / -1;
  }

  #adminBookingList,
  #adminFixedList,
  #developerAuditList {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  body {
    min-width: 0;
  }

  .app-header,
  .app-shell {
    padding-left: 12px;
    padding-right: 12px;
  }

  .app-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
  }

  .brand-logo {
    width: 48px;
    height: 48px;
    padding: 0;
  }

  .app-header h1 {
    font-size: 30px;
  }

  .header-actions {
    grid-column: 1 / -1;
    width: 100%;
    grid-template-columns: 40px 1fr 40px;
  }

  .mobile-quick-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  .mobile-quick-actions .icon-button {
    width: 38px;
    height: 38px;
    font-size: 24px;
  }

  .calendar-panel,
  .booking-panel {
    padding: 12px;
  }

  .calendar-panel {
    padding-bottom: 16px;
    overflow-x: visible;
  }

  .weekdays,
  .calendar-grid {
    min-width: 0;
    gap: 3px;
  }

  .calendar-grid {
    overscroll-behavior: contain;
    touch-action: none;
  }

  body.mobile-show-admin .calendar-grid {
    touch-action: pan-y;
  }

  .weekdays {
    font-size: 11px;
  }

  .booking-panel {
    grid-template-columns: 1fr;
  }

  body:not(.mobile-show-admin) .booking-panel {
    display: none;
  }

  body.mobile-show-admin .booking-panel > .panel-heading,
  body.mobile-show-admin .time-section {
    display: none;
  }

  .lookup-section,
  body:not(.mobile-show-admin) .admin-section {
    display: none;
  }

  body.mobile-show-admin .admin-section {
    display: grid;
  }

  .admin-actions {
    grid-template-columns: 1fr;
  }

  .admin-actions > *,
  .admin-actions > .admin-booking-list,
  #adminBookingList,
  #adminFixedList,
  #developerAuditList,
  .print-preview {
    grid-column: 1 / -1;
  }

  .admin-booking-list .booking-item {
    grid-template-columns: 1fr;
  }

  .admin-booking-list .booking-item-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .admin-month-controls {
    grid-template-columns: 1fr;
  }

  .resource-form,
  .table-actions,
  .resource-table .table-actions {
    grid-template-columns: 1fr;
  }

  .admin-table {
    min-width: 720px;
  }

  .day-cell {
    min-height: 58px;
    padding: 4px;
    border-radius: 6px;
  }

  .day-number {
    width: 22px;
    height: 22px;
    font-size: 13px;
  }

  .day-summary {
    min-height: 18px;
    gap: 3px;
    margin-top: 4px;
  }

  .booking-pill {
    min-width: 0;
    max-width: 100%;
    padding: 2px 3px;
    border-radius: 4px;
    font-size: 9px;
    line-height: 1.12;
    text-align: center;
  }

  .calendar-time {
    display: none !important;
  }

  .calendar-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .more-pill {
    font-size: 10px;
    line-height: 1;
  }

  .slot-button {
    grid-template-columns: 1fr;
  }

  .lookup-row,
  .booking-item-actions,
  .time-picker-grid,
  .modal-actions {
    grid-template-columns: 1fr;
  }

  .modal-backdrop {
    align-items: end;
    padding: 12px 10px calc(10px + env(safe-area-inset-bottom));
  }

  .modal-panel {
    width: 100%;
    max-height: min(92vh, calc(100dvh - 22px - env(safe-area-inset-bottom)));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px;
    border-radius: 22px;
  }

  .modal-backdrop:not(.is-hidden) .modal-panel {
    animation: modalSheetIn 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
  }

  .modal-heading {
    position: sticky;
    top: -12px;
    z-index: 2;
    margin: -12px -12px 0;
    padding: 12px;
    background: var(--surface-strong);
    border-bottom: 1px solid var(--line);
  }

  .modal-actions {
    position: sticky;
    bottom: 0;
    z-index: 2;
    margin: 0 -12px -12px;
    padding: 10px 12px calc(12px + env(safe-area-inset-bottom));
    background: var(--surface-strong);
    border-top: 1px solid var(--line);
    border-radius: 0 0 22px 22px;
  }

  .toast {
    right: 10px;
    bottom: 10px;
    left: 10px;
    max-width: none;
    text-align: center;
  }
}

@keyframes modalSheetIn {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}
