:root {
  --bg: #f2f2f2;
  --bg-elev: #ffffff;
  --bg-row: #f6f6f6;
  --line: #d9d9d9;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --brand: #111111;
  --brand-deep: #000000;
  --brand-soft: #f0f0f0;
  --neg: #d23939;
  --topbar-offset: 5.6rem;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--bg);
  font-family: "Noto Sans JP", "Helvetica Neue", Arial, sans-serif;
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: #fff;
  color: var(--brand-deep);
  font-weight: 800;
  padding: 0.4rem 0.7rem;
  z-index: 50;
}

.skip:focus { top: 0.5rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--brand);
  border-bottom: 4px solid var(--brand-deep);
  padding: 0.55rem 1.25rem;
}

.topbar-inner {
  max-width: 1080px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  line-height: 1;
  color: #fff;
  text-decoration: none;
}

.brand-name {
  color: #fff;
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  line-height: 1;
  white-space: nowrap;
}

.brand-logo {
  height: 72px;
  width: auto;
  display: block;
  object-fit: contain;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.menu-btn {
  appearance: none;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  color: #fff;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.menu-btn:hover { background: rgba(255, 255, 255, 0.12); }

.menu-btn .menu-icon {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  width: 18px;
}

.menu-btn .menu-icon span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
}

.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.nav-drawer[hidden] { display: none; }
.nav-drawer:not([hidden]) { pointer-events: auto; }

.nav-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.nav-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 86vw);
  height: 100%;
  background: #fff;
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.18);
  padding: 1.25rem 1rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nav-panel h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.16em;
  color: var(--brand);
  text-transform: uppercase;
}

.nav-panel a {
  display: block;
  padding: 0.9rem 0.75rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  border-bottom: 1px solid var(--line);
}

.nav-panel a:hover,
.nav-panel a[aria-current="page"] {
  color: var(--brand);
  background: var(--brand-soft);
}

.nav-panel a.nav-external {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.external-icon {
  width: 1.05rem;
  height: 1.05rem;
  flex: 0 0 auto;
}

.nav-close {
  align-self: flex-end;
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
  margin-bottom: 0.5rem;
}

main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 3rem;
}

.hero {
  margin-bottom: 1.5rem;
  padding: 0.4rem 0 1.1rem;
  border-bottom: 2px solid var(--brand);
}

.sec-title {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin: 0 0 0.8rem;
  padding-bottom: 0.55rem;
  border-bottom: 3px solid var(--brand);
}

.hero .sec-title {
  border-bottom: 0;
  padding-bottom: 0;
  margin-bottom: 0.45rem;
}

.sec-title .en {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--brand);
}

.sec-title .ja {
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  color: var(--ink);
}

.hero-lead,
.block-note {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.block { margin-bottom: 1.8rem; }

.month-switch {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

.month-switch a {
  border: 2px solid #d5d5d5;
  background: #fff;
  color: var(--ink);
  text-decoration: none;
  font-weight: 800;
  padding: 0.45rem 0.95rem;
}

.month-switch a[aria-current="page"] {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

.banner {
  background: var(--brand-soft);
  border-left: 4px solid var(--brand);
  color: var(--brand-deep);
  padding: 0.75rem 0.9rem;
  margin: 0 0 1rem;
  font-size: 0.88rem;
  font-weight: 700;
}

.banner.error {
  background: #fdecec;
  border-left-color: var(--neg);
  color: #8a1f1f;
}

.face-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.25rem;
}

.face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.face img,
.col-head img {
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
}

.face img {
  width: 64px;
  height: 64px;
  border: 2px solid var(--brand);
}

.month-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.month-card {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 4px solid var(--brand);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
  text-decoration: none;
  color: inherit;
  padding: 1.15rem 1.15rem 1rem;
}

.month-card:hover { background: var(--brand-soft); }

.month-card .en {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brand);
}

.month-card .ja {
  display: block;
  margin-top: 0.15rem;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.steps {
  margin: 0;
  padding-left: 1.3rem;
  font-weight: 700;
  line-height: 1.8;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.2rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.sample {
  display: inline-grid;
  place-items: center;
  width: 1.55rem;
  height: 1.55rem;
  margin-right: 0.3rem;
  border: 1px dashed #c5c5c5;
  background: #fff;
  font-weight: 900;
  vertical-align: middle;
}

.sample.is-o,
.mark.is-o {
  background: var(--brand-soft);
  color: var(--brand-deep);
  border: 1px solid #c8c8c8;
}

.sample.is-d,
.mark.is-d {
  background: #fff6e5;
  color: #9a6400;
  border: 1px solid #f0d7a2;
}

.sample.is-x,
.mark.is-x {
  background: #fdecec;
  color: var(--neg);
  border: 1px solid #f3c7c7;
}

.table-wrap {
  width: 100%;
  max-height: min(72vh, 920px);
  overflow: auto;
  border: 1px solid var(--line);
  background: var(--bg-elev);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.day-table {
  table-layout: fixed;
  width: 100%;
  min-width: 46rem;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88rem;
}

.col-date { width: 16%; }
.col-member { width: 12%; }
.col-count { width: 8%; }
.col-confirm { width: 16%; }

.day-table th,
.day-table td {
  padding: 0.55rem 0.4rem;
  border-bottom: 1px solid var(--line);
  text-align: center;
  vertical-align: middle;
  background: #fff;
}

.day-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--brand);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.day-table .slot-cell {
  text-align: left;
  white-space: normal;
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 2px 0 0 var(--line);
}

.day-table thead .slot-cell {
  z-index: 3;
  background: var(--brand);
  box-shadow: 2px 0 0 var(--brand-deep);
}

.day-table tbody tr:nth-child(odd) th,
.day-table tbody tr:nth-child(odd) td { background: var(--bg-row); }

.day-table tbody tr.is-ready th,
.day-table tbody tr.is-ready td { background: #ececec; }

.slot-date {
  display: block;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.slot-kind {
  display: block;
  margin-top: 0.12rem;
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
}

.slot-note,
.past-tag {
  display: block;
  margin-top: 0.12rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

tr.is-past .slot-date { color: var(--muted); }

.col-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.col-head img {
  width: 36px;
  height: 36px;
  border: 2px solid #fff;
}

.confirm-btn {
  appearance: none;
  width: 100%;
  max-width: 6.5rem;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 0.45rem 0.4rem;
  cursor: pointer;
  touch-action: manipulation;
}

.confirm-btn[aria-pressed="true"] {
  background: var(--brand);
  color: #fff;
}

.empty-note {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.confirmed-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.8rem;
}

.confirmed-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  padding: 0.85rem 1rem;
}

.confirmed-date {
  display: block;
  color: inherit;
  text-decoration: none;
  min-width: 9rem;
}

.confirmed-people {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.confirmed-people li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 800;
}

.confirmed-people img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--brand);
}

.confirmed-none {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.confirm-btn:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 2px;
}

.count-o,
.count-d {
  display: block;
  font-variant-numeric: tabular-nums;
}

.count-o {
  font-size: 1.15rem;
  font-weight: 900;
}

.count-o.is-hot { color: var(--brand-deep); }

.count-d {
  font-size: 0.68rem;
  font-weight: 700;
  color: #9a6400;
}

.mark {
  width: 2.75rem;
  height: 2.75rem;
  border: 1px dashed #c5c5c5;
  background: #fff;
  color: transparent;
  font-family: inherit;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

.mark.is-o,
.mark.is-d,
.mark.is-x { color: inherit; }

.mark:focus-visible,
.month-switch a:focus-visible,
.menu-btn:focus-visible {
  outline: 2px solid var(--brand-deep);
  outline-offset: 2px;
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

footer {
  margin-top: 1rem;
  background: var(--brand);
  border-top: 4px solid var(--brand-deep);
  color: #fff;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 1.1rem 1.25rem;
}

@media (max-width: 640px) {
  :root { --topbar-offset: 4.5rem; }
  .brand-logo { height: 56px; }
  .brand-name { font-size: 1.05rem; letter-spacing: 0.08em; }
  .sec-title .ja { font-size: 1.35rem; }
  .month-grid { grid-template-columns: 1fr; }
  main { padding: 1.25rem 0.85rem 2.5rem; }
}
