/* --- modal --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.modal-overlay.hidden {
  display: none;
}

.modal {
  width: 100%;
  max-width: 360px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.modal h2 {
  margin-top: 0;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal-wide {
  max-width: 520px;
}

/* Weekday x time-band grid on the 対戦記録 screen. Cell shading runs off
   each cell's share of the grid's busiest cell (activity-level-0..4), so it
   reads the same shape whether the book holds a dozen matches or 5000. */
.activity-table {
  width: 100%;
  margin: 16px 0 0;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.activity-table th,
.activity-table td {
  padding: 8px 10px;
  text-align: center;
  border: 1px solid var(--shop-paper-line);
}
.activity-table thead th {
  color: var(--shop-ink-soft);
  font-weight: 600;
  font-size: 0.78rem;
}
.activity-table tbody th {
  text-align: left;
  color: var(--shop-ink);
  font-weight: 600;
  white-space: nowrap;
}
.activity-cell { color: var(--shop-ink-soft); }
.activity-level-1 { background: rgba(180, 144, 63, 0.12); }
.activity-level-2 { background: rgba(180, 144, 63, 0.24); }
.activity-level-3 { background: rgba(180, 144, 63, 0.4); }
.activity-level-4 { background: rgba(180, 144, 63, 0.58); color: var(--shop-ink); font-weight: 600; }
.activity-busiest { outline: 2px solid var(--shop-pine-deep); outline-offset: -2px; }


/* --- paper-styled modals (create room / join / promotion) --- */
.paper-modal {
  background: var(--shop-paper);
  color: var(--shop-ink);
  border: 1px solid var(--shop-brass);
  border-radius: 4px;
  font-family: var(--shop-font-body);
}
/* Every dialog wears the same head: mincho title over a brass rule. Scoped to
   the direct child so the 遊びかた sheet, whose head carries its own eyebrow and
   double rule, is not given a second one. */
.paper-modal h2 { font-family: var(--shop-font-display); color: var(--shop-ink); }
.paper-modal > h2 {
  letter-spacing: 0.08em;
  padding-bottom: 12px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--shop-brass);
}
.paper-modal label { color: var(--shop-ink-soft); }
/* A lighter sheet rather than pure white, which appears nowhere else in the shop */
.paper-modal input, .paper-modal select {
  background: var(--shop-paper-light);
  border: 1px solid var(--shop-paper-line);
  color: var(--shop-ink);
  box-shadow: inset 0 1px 2px rgba(36, 24, 16, 0.1);
}
.paper-modal input:focus, .paper-modal select:focus { outline: 2px solid var(--shop-pine); }
.paper-modal .primary-btn { background: var(--shop-pine); border: 1px solid var(--shop-brass); color: var(--shop-paper); }
.paper-modal .primary-btn:hover { background: var(--shop-pine-deep); }
.paper-modal .secondary-btn { background: transparent; border: 1px solid var(--shop-ink-soft); color: var(--shop-ink); }
.paper-modal .secondary-btn:hover { background: rgba(85, 73, 58, 0.1); }
.paper-modal .error-text, .paper-modal .required { color: var(--shop-burgundy); }
.paper-modal .empty-text { color: var(--shop-ink-soft); }

