:root {
  --header-height: 44px;
  --header-bg: #2c3138;
  --page-bg: #ffffff;
  --border: #b9bdc4;
  --border-strong: #6f747c;
  --text: #1e2329;
  --slot-w: 11px;
  --slot-h: 26px;
  --col-store-w: 130px;
  --col-address-w: 280px;
  --c-full: #ec6e1a;
  --c-empty: #b8def0;
  --c-closed: #9a9da3;
  --c-unknown: #ffffff;
  --c-hour-label-bg: #f3f4f5;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Yu Gothic UI", "BIZ UDPGothic", "Meiryo", sans-serif;
  font-size: 13px;
}

.top-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--header-bg);
  color: #ffffff;
  z-index: 1000;
  box-shadow: 0 1px 0 #000;
}

.header-inner {
  height: 100%;
  padding: 0 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-icon {
  font-size: 18px;
  line-height: 1;
}

.logout-btn {
  background: transparent;
  border: none;
  padding: 4px;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.logout-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.logout-btn:focus-visible {
  outline: 2px solid #4ea1ff;
  outline-offset: 2px;
}

.logout-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.system-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.header-right {
  margin-left: auto;
  font-size: 13px;
  font-weight: 700;
}

.page-content {
  padding: calc(var(--header-height) + 14px) 20px 24px;
  text-align: center;
}

.section-title {
  margin: 0 0 12px;
  font-size: 18px;
  font-weight: 700;
}

.legend {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: inline-flex;
  gap: 18px;
  font-size: 13px;
}

.legend li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-box {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 1px solid var(--border-strong);
  vertical-align: middle;
  text-align: center;
  line-height: 16px;
  font-size: 12px;
  font-weight: 700;
  background: #ffffff;
}

.legend-full {
  background: var(--c-full);
}

.legend-empty {
  background: var(--c-empty);
}

.legend-closed {
  background: var(--c-closed);
}

.legend-unknown {
  background: #ffffff;
}

.table-wrap {
  margin: 0 auto;
  max-width: 100%;
  overflow: auto;
  border: 1px solid var(--border-strong);
  background: #ffffff;
  max-height: calc(100vh - 200px);
}

.capacity-table {
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}

.capacity-table th,
.capacity-table td {
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0;
  margin: 0;
  height: var(--slot-h);
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
  background: #ffffff;
}

.header-cell {
  background: var(--c-hour-label-bg);
  font-weight: 700;
  padding: 4px 8px;
}

.date-header {
  background: #ffffff;
  font-weight: 700;
  text-align: center;
  padding: 4px 0;
  border-bottom: 1px solid var(--border-strong);
}

.time-header {
  background: var(--c-hour-label-bg);
  font-weight: 400;
  font-size: 11px;
  text-align: left;
  padding-left: 4px;
  border-left: 1px solid var(--border-strong);
}

.fixed-col {
  position: sticky;
  left: 0;
  z-index: 3;
  background: #ffffff;
  text-align: left;
  padding: 4px 8px;
  border-right: 1px solid var(--border-strong);
}

.fixed-col-store {
  left: 0;
  width: var(--col-store-w);
  min-width: var(--col-store-w);
  max-width: var(--col-store-w);
}

.fixed-col-address {
  left: var(--col-store-w);
  width: var(--col-address-w);
  min-width: var(--col-address-w);
  max-width: var(--col-address-w);
}

thead .fixed-col {
  z-index: 6;
  background: var(--c-hour-label-bg);
}

thead th {
  position: sticky;
  top: 0;
  z-index: 4;
}

thead tr:nth-child(2) th {
  top: var(--slot-h);
}

.slot {
  width: var(--slot-w);
  min-width: var(--slot-w);
  max-width: var(--slot-w);
  padding: 0;
}

.slot.hour-start {
  border-left: 1px solid var(--border-strong);
}

.capacity-table td.cell-full {
  background: var(--c-full);
}

.capacity-table td.cell-empty {
  background: var(--c-empty);
}

.capacity-table td.cell-closed {
  background: var(--c-closed);
}

.capacity-table td.cell-unknown {
  background: var(--c-unknown);
  font-size: 10px;
  color: #333;
}

.error-message {
  padding: 16px;
  color: #a11212;
  font-weight: 700;
  text-align: center;
}
