:root {
  --ink: #24232a;
  --muted: #76727d;
  --line: #e9e7ec;
  --purple: #7046bb;
  --tint: #f2ecfb;
  font-family:
    -apple-system, BlinkMacSystemFont, "Hiragino Kaku Gothic ProN", Meiryo,
    sans-serif;
  color: var(--ink);
  background: #fff;
  -webkit-font-smoothing: antialiased;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
select {
  font: inherit;
  min-height: 44px;
}
button,
select,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
a {
  color: var(--muted);
  text-underline-offset: 3px;
}
button:focus-visible,
a:focus-visible,
select:focus-visible,
input:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
.site-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 0 16px 24px;
}
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 0 16px;
  border-bottom: 1px solid var(--line);
}
.site-header h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}
.site-header h1 span {
  margin-left: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.site-header a {
  font-size: 11px;
  white-space: nowrap;
  text-decoration: none;
}
.month-navigation {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0 4px;
}
.icon-button {
  display: grid;
  place-items: center;
  width: 44px;
  flex-shrink: 0;
  border: 0;
  background: transparent;
  border-radius: 5px;
  font-size: 25px;
  color: var(--ink);
}
.icon-button:hover:not(:disabled) {
  background: #f6f5f7;
}
#month-select {
  border: 0;
  background: #fff;
  color: var(--ink);
  padding: 0 10px;
  font-size: 18px;
  font-weight: 600;
}
.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.filter-row {
  display: flex;
  gap: 4px;
}
.filter {
  border: 0;
  border-radius: 5px;
  padding: 0 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
}
.filter.active {
  background: #f0eef3;
  color: var(--ink);
  font-weight: 600;
}
.section-meta {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
}
.s-only {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-bottom: 8px;
  font-size: 12px;
  cursor: pointer;
}
.s-only input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--purple);
}
.scan-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
.scan-error {
  color: #a42f43;
  font-size: 12px;
  margin: 0 0 12px;
}
.days-grid {
  border-top: 1px solid var(--line);
}
.date-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 57px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-align: left;
}
.date-card:hover:not(:disabled) {
  background: #faf9fc;
}
.date-card.has-s {
  background: var(--tint);
}
.date-card.has-s:hover {
  background: #ebe1f9;
}
.date-card.pending {
  background: #f8f7fa;
}
.card-top,
.card-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
}
.day-number {
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.day-week {
  margin-left: 10px;
  font-size: 12px;
  color: var(--muted);
}
.day-week.saturday {
  color: #4a6ba5;
}
.day-week.sunday {
  color: #b46b7e;
}
.status-badge {
  font-size: 12px;
  color: var(--muted);
}
.has-s .status-badge,
.has-s .card-action {
  color: var(--purple);
  font-weight: 600;
}
.card-action {
  font-size: 12px;
  color: var(--muted);
}
.status-error .status-badge {
  color: #a14b46;
}
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid #e2d9f0;
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
.skeleton-card {
  height: 57px;
  border-bottom: 1px solid var(--line);
  background: #fafafa;
}
.empty-state {
  color: var(--muted);
  padding: 24px 0;
  text-align: center;
  font-size: 12px;
}
.error-box {
  margin: 12px 0;
  padding: 12px;
  background: #fff5f3;
  color: #9b534b;
  font-size: 12px;
  line-height: 1.7;
}
.error-box p {
  margin: 0 0 5px;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 0 4px;
  color: var(--purple);
  font-size: 12px;
}
dialog {
  width: min(520px, calc(100% - 32px));
  max-height: 88dvh;
  margin: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  color: var(--ink);
  overscroll-behavior: contain;
}
dialog::backdrop {
  background: #0005;
}
.dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.dialog-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}
.dialog-loading {
  padding: 24px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.result-summary {
  margin: 0 0 16px;
  font-size: 17px;
  font-weight: 600;
  color: var(--purple);
}
.result-summary.neutral {
  color: var(--ink);
}
.performance-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
}
.performance-tabs button {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
}
.performance-tabs button[aria-pressed="true"] {
  border-color: var(--purple);
  color: var(--purple);
  background: var(--tint);
}
.seat-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 12px 0;
}
.seat-filter {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
}
.seat-filter.active {
  background: #f0eef3;
  color: var(--ink);
  border-color: #d6d2dd;
}
.seat-filter span {
  margin-left: 6px;
}
.seat-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.seat-table th {
  text-align: left;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.seat-table td {
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
}
.seat-table th:last-child,
.seat-table td:last-child {
  text-align: right;
  white-space: nowrap;
}
.grade-label {
  color: var(--purple);
}
.more-seats {
  width: 100%;
  border: 0;
  background: #f7f6f9;
  margin-top: 10px;
  color: var(--purple);
  font-size: 12px;
}
.official-link {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 44px;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--ink);
  text-decoration: none;
  font-size: 12px;
}
.result-note {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.7;
  margin: 10px 0;
}
.result-timestamp {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  font-size: 10px;
  color: var(--muted);
}
.dialog-error {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.sr-only {
  position: absolute;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
@media (max-width: 599px) {
  dialog {
    position: fixed;
    bottom: 0;
    top: auto;
    margin: 0;
    width: 100%;
    max-width: none;
    max-height: 90dvh;
    border-radius: 10px 10px 0 0;
    padding: 12px 16px max(16px, env(safe-area-inset-bottom));
  }
}
@media (max-width: 359px) {
  .site-shell {
    padding-left: 12px;
    padding-right: 12px;
  }
  .site-header h1 {
    font-size: 14px;
  }
  .filter {
    padding: 0 9px;
  }
  .seat-table {
    font-size: 11px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
  }
}
