:root {
  --ink: #151515;
  --muted: #666a70;
  --line: #d8dbe0;
  --soft: #f4f5f6;
  --paper: #fff;
  --accent: #20242a;
  font-family: "Segoe UI", "Yu Gothic", "Meiryo", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--soft); }
.topbar {
  min-height: 104px; padding: 20px clamp(16px, 4vw, 44px);
  background: #0f1114; color: #fff; display: flex; gap: 22px;
  align-items: center; justify-content: space-between;
}
.eyebrow { margin: 0 0 4px; color: #aeb4bd; font-size: 12px; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 28px; }
h2 { margin-bottom: 6px; font-size: 24px; }
main { padding: 20px clamp(12px, 3vw, 32px) 42px; }
.tabs, .admin-menu, .button-row { display: flex; flex-wrap: wrap; gap: 8px; }
button, .button, input, select { min-height: 42px; border-radius: 6px; font: inherit; }
button, .button { border: 0; background: var(--accent); color: #fff; padding: 0 16px; font-weight: 700; cursor: pointer; }
.tab, .admin-button { background: #24282e; color: #d8dde5; }
.tab.active, .admin-button.active { background: #fff; color: #101216; border: 1px solid var(--line); }
.view, .admin-panel { display: none; }
.view.active, .admin-panel.active { display: grid; gap: 18px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; }
.section-head p, .note { color: var(--muted); margin-bottom: 0; }
.event-board, .record-list, .mini-list { display: grid; gap: 12px; }
.venue-group, .panel, .table-wrap, .record-row, .stat-card, .empty {
  background: var(--paper); border: 1px solid var(--line); border-radius: 8px;
}
.venue-group, .panel, .record-row, .stat-card, .empty { padding: 16px; }
.event-card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.event-card { min-height: 118px; display: grid; gap: 6px; background: #fff; color: var(--ink); border: 1px solid var(--line); padding: 14px; text-align: left; justify-content: stretch; }
.event-card.selected { box-shadow: inset 0 0 0 2px #111; }
.event-card span, .event-card small { color: var(--muted); }
.event-card strong { font-size: 20px; }
.split { display: grid; grid-template-columns: minmax(320px, .9fr) minmax(320px, 1.1fr); gap: 18px; }
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
input, select { width: 100%; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 10px 11px; }
form button { width: 100%; margin-top: 12px; }
.segmented { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.segmented label { min-height: 38px; display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; background: #fff; }
.stats { display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 12px; }
.stat-card span { display: block; color: var(--muted); font-size: 12px; }
.stat-card strong { display: block; font-size: 28px; margin-top: 4px; }
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th, td { padding: 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { background: #f8f8f9; font-size: 12px; color: var(--muted); }
.record-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.row-actions { display: flex; gap: 8px; }
.danger { background: #7f1d1d; }
#toast { position: fixed; right: 16px; bottom: 16px; max-width: 340px; padding: 12px 14px; background: #0f1114; color: #fff; border-radius: 8px; opacity: 0; transform: translateY(8px); transition: .2s ease; }
#toast.show { opacity: 1; transform: translateY(0); }
@media (max-width: 920px) {
  .topbar, .section-head { align-items: stretch; flex-direction: column; }
  .split, .grid, .grid.two, .stats { grid-template-columns: 1fr; }
  .record-row { align-items: stretch; flex-direction: column; }
}
