:root {
  --bg: #080b10;
  --bg-2: #101722;
  --surface: rgba(14, 21, 31, 0.82);
  --surface-strong: rgba(20, 29, 42, 0.96);
  --border: rgba(141, 176, 210, 0.22);
  --border-strong: rgba(76, 183, 255, 0.48);
  --text: #f7fbff;
  --muted: #aab6c5;
  --gold: #e7be6d;
  --cyan: #38c8ff;
  --green: #57e373;
  --purple: #b37aff;
  --red: #ff6558;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.46);
  --radius: 8px;
  font-family: "Noto Sans JP", "Yu Gothic", "Meiryo", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  color: var(--text);
  background:
    linear-gradient(180deg, rgba(10, 14, 21, 0.92), rgba(8, 11, 16, 1) 42%),
    radial-gradient(circle at 28% 8%, rgba(56, 200, 255, 0.16), transparent 32%),
    linear-gradient(135deg, #090d13, #111623 48%, #0a0d12);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.ambient-line {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, transparent, rgba(56, 200, 255, 0.1), transparent) 50% 96px / min(720px, 80vw) 1px no-repeat,
    linear-gradient(180deg, rgba(231, 190, 109, 0.16), transparent 160px);
  opacity: 0.5;
}

.site-shell {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(1440px, calc(100% - 40px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 0 48px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 116px;
  padding: 6px 4px 22px;
  border-bottom: 1px solid rgba(84, 130, 168, 0.22);
  background: transparent;
}

.brand {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: min(460px, 40vw);
}

.brand-wordmark {
  display: block;
  width: 100%;
  height: auto;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border: 1px solid rgba(141, 176, 210, 0.18);
  border-radius: var(--radius);
  background: rgba(8, 13, 20, 0.52);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 14px 30px rgba(0, 0, 0, 0.2);
  color: var(--muted);
  backdrop-filter: blur(16px);
}

.site-nav__link {
  position: relative;
  min-height: 40px;
  padding: 10px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.site-nav__link.is-active {
  color: var(--text);
  border: 1px solid rgba(255, 218, 119, 0.28);
  background:
    linear-gradient(180deg, rgba(33, 66, 83, 0.76), rgba(12, 52, 70, 0.72));
  box-shadow:
    inset 0 -2px 0 var(--cyan),
    inset 0 1px 0 rgba(255, 232, 156, 0.16),
    0 0 18px rgba(56, 200, 255, 0.2);
}

.site-nav__link.is-muted {
  opacity: 0.56;
  cursor: not-allowed;
}

.site-nav__link[data-tooltip]::after {
  position: absolute;
  left: 50%;
  bottom: -42px;
  z-index: 20;
  min-width: max-content;
  padding: 8px 10px;
  border: 1px solid rgba(141, 176, 210, 0.28);
  border-radius: var(--radius);
  color: var(--text);
  background: rgba(7, 11, 17, 0.96);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.32);
  content: attr(data-tooltip);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -4px);
  transition: opacity 140ms ease, transform 140ms ease;
  white-space: nowrap;
}

.site-nav__link[data-tooltip]::before {
  position: absolute;
  left: 50%;
  bottom: -10px;
  z-index: 21;
  width: 8px;
  height: 8px;
  border-top: 1px solid rgba(141, 176, 210, 0.28);
  border-left: 1px solid rgba(141, 176, 210, 0.28);
  background: rgba(7, 11, 17, 0.96);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) rotate(45deg);
  transition: opacity 140ms ease;
}

.site-nav__link[data-tooltip]:hover::after,
.site-nav__link[data-tooltip]:focus-visible::after {
  opacity: 1;
  transform: translate(-50%, 0);
}

.site-nav__link[data-tooltip]:hover::before,
.site-nav__link[data-tooltip]:focus-visible::before {
  opacity: 1;
}

.app {
  flex: 1 0 auto;
  padding-top: 30px;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 72px;
  padding: 26px 4px 2px;
  border-top: 1px solid rgba(84, 130, 168, 0.22);
  color: var(--muted);
}

.site-footer__brand {
  display: inline-flex;
  align-items: center;
  width: min(220px, 42vw);
}

.site-footer__logo {
  display: block;
  width: 100%;
  height: auto;
  opacity: 0.86;
}

.site-footer__meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  font-weight: 700;
}

.site-footer__meta span:first-child {
  color: var(--gold);
}

.home-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
}

.section-label {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 13px;
  font-weight: 800;
}

h1 {
  margin: 0;
  font-size: clamp(40px, 5vw, 72px);
  line-height: 1;
  letter-spacing: 0;
}

.home-title {
  color: #f6fbff;
  font-size: 42px;
  font-weight: 900;
  text-shadow:
    0 0 24px rgba(56, 200, 255, 0.16),
    0 2px 0 rgba(0, 0, 0, 0.36);
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 28px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 20, 30, 0.72);
  backdrop-filter: blur(18px);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  width: min(360px, 100%);
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid rgba(141, 176, 210, 0.28);
  border-radius: var(--radius);
  background: rgba(5, 8, 12, 0.56);
}

.search-box__icon {
  width: 14px;
  height: 14px;
  border: 2px solid var(--muted);
  border-radius: 50%;
  position: relative;
  opacity: 0.8;
}

.search-box__icon::after {
  position: absolute;
  right: -6px;
  bottom: -5px;
  width: 7px;
  height: 2px;
  content: "";
  background: var(--muted);
  transform: rotate(45deg);
}

.search-box input {
  width: 100%;
  color: var(--text);
  background: transparent;
  border: 0;
  outline: 0;
  font-size: 15px;
}

.search-box input::placeholder {
  color: #708093;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 260px));
  justify-content: start;
  gap: 28px;
}

.member-card {
  min-width: 0;
}

.member-card__image-link {
  display: block;
  aspect-ratio: 3 / 5;
  border: 1px solid rgba(231, 190, 109, 0.38);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: translateY(0);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.member-card__image-link:hover {
  border-color: rgba(56, 200, 255, 0.78);
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.48), 0 0 36px rgba(56, 200, 255, 0.2);
  transform: translateY(-3px);
}

.member-card.is-featured .member-card__image-link {
  box-shadow: 0 24px 76px rgba(0, 0, 0, 0.5), 0 0 48px rgba(231, 190, 109, 0.18);
}

.member-card__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 2px 0;
}

.member-card__name {
  margin: 0 0 4px;
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.member-card__level {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.member-card__monster {
  margin: 5px 0 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.text-action {
  flex: 0 0 auto;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 800;
}

.rules-page {
  display: grid;
  gap: 22px;
}

.rules-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
}

.rules-lead {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.8;
}

.rules-concepts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.rules-concept {
  min-height: 74px;
  padding: 14px;
  border: 1px solid rgba(141, 176, 210, 0.18);
  border-radius: var(--radius);
  background: rgba(13, 20, 30, 0.62);
}

.rules-concept span {
  display: block;
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.rules-concept strong {
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.rules-layout {
  display: grid;
  gap: 12px;
}

.rules-main {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.rules-role,
.rules-section,
.rules-status-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 20, 30, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.rules-role {
  min-height: 210px;
  overflow: hidden;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.rules-role:hover,
.rules-role.is-active {
  border-color: var(--border-strong);
  background: rgba(18, 29, 43, 0.88);
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.3), 0 0 22px rgba(56, 200, 255, 0.12);
}

.rules-role:hover {
  transform: translateY(-2px);
}

.rules-role__button {
  display: grid;
  align-content: stretch;
  gap: 12px;
  width: 100%;
  min-height: 210px;
  padding: 16px;
  color: inherit;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.rules-role__button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: -4px;
}

.rules-role__head,
.rules-section__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.rules-role__head {
  min-height: 32px;
}

.rules-role__title,
.rules-section__head h2,
.rules-status-panel h2 {
  margin: 0;
  font-size: 22px;
}

.rules-role__title {
  color: var(--text);
  font-weight: 900;
}

.rules-role__head > span:last-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.rules-role__summary {
  color: #dfe9f5;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
}

.rules-role__points {
  align-self: start;
  min-height: 34px;
  padding: 7px 10px;
  color: #071018;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--gold), #fff0b8);
  font-size: 13px;
  font-weight: 900;
}

.rules-role__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.rules-role__chips .rules-status-chip {
  min-height: 28px;
  padding: 5px 8px;
  font-size: 12px;
}

.rules-role__footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid rgba(141, 176, 210, 0.14);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rules-role__footer strong {
  color: var(--cyan);
  white-space: nowrap;
}

.rules-role.is-active .rules-role__footer strong {
  color: var(--gold);
}

.rules-role.is-eichi {
  border-left: 3px solid var(--purple);
}

.rules-role.is-denpa {
  border-left: 3px solid var(--cyan);
}

.rules-role.is-fukutsu {
  border-left: 3px solid var(--red);
}

.rules-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.rules-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.rules-table--compact {
  min-width: 560px;
}

.rules-table th,
.rules-table td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(141, 176, 210, 0.14);
  text-align: left;
  vertical-align: top;
  line-height: 1.55;
}

.rules-table th {
  color: var(--muted);
  background: rgba(5, 8, 12, 0.34);
  font-size: 12px;
  font-weight: 900;
}

.rules-table td {
  color: #dfe9f5;
  font-size: 14px;
}

.rules-table td:first-child {
  color: var(--text);
  font-weight: 900;
}

.rules-table tr:last-child td {
  border-bottom: 0;
}

.rules-expanded-panel,
.rules-expand-hint {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 20, 30, 0.72);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.24);
}

.rules-expanded-panel {
  overflow: hidden;
}

.rules-expanded-panel.is-eichi {
  border-left: 3px solid var(--purple);
}

.rules-expanded-panel.is-denpa {
  border-left: 3px solid var(--cyan);
}

.rules-expanded-panel.is-fukutsu {
  border-left: 3px solid var(--red);
}

.rules-expanded-panel__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 16px;
  border-bottom: 1px solid rgba(141, 176, 210, 0.16);
}

.rules-expanded-panel__head h2 {
  margin: 0;
  font-size: 24px;
}

.rules-expanded-panel__head p:last-child {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.rules-expanded-panel .rules-table-wrap {
  border: 0;
}

.rules-expand-hint {
  padding: 16px;
  color: var(--muted);
  border-style: dashed;
  font-size: 14px;
  line-height: 1.7;
}

.rules-status-panel {
  padding: 16px;
}

.rules-status-panel p:last-child {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.rules-status-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.rules-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid rgba(141, 176, 210, 0.24);
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 900;
}

.rules-status-chip.is-eichi {
  color: #eadcff;
  border-color: rgba(179, 122, 255, 0.42);
  background: rgba(179, 122, 255, 0.12);
}

.rules-status-chip.is-denpa {
  color: #d9f6ff;
  border-color: rgba(56, 200, 255, 0.42);
  background: rgba(56, 200, 255, 0.12);
}

.rules-status-chip.is-fukutsu {
  color: #ffd8d4;
  border-color: rgba(255, 101, 88, 0.42);
  background: rgba(255, 101, 88, 0.12);
}

.rules-status-chip.is-kyomei {
  color: #dbe5ff;
  border-color: rgba(92, 131, 255, 0.42);
  background: rgba(92, 131, 255, 0.12);
}

.rules-status-chip.is-sosei {
  color: #fff2c9;
  border-color: rgba(255, 208, 95, 0.42);
  background: rgba(255, 208, 95, 0.12);
}

.rules-section {
  padding: 16px;
}

.rules-section .rules-table-wrap {
  margin-top: 14px;
  border: 1px solid rgba(141, 176, 210, 0.16);
  border-radius: var(--radius);
}

.rules-section--secondary {
  margin-top: 2px;
}

.rules-lower-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.rules-reference-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 18px;
}

.detail-page {
  display: grid;
  grid-template-columns: minmax(300px, 480px) minmax(360px, 1fr);
  align-items: start;
  gap: clamp(28px, 5vw, 72px);
}

.detail-page__card {
  min-width: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.back-link::before {
  margin-right: 8px;
  content: "";
  width: 8px;
  height: 8px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
}

.detail-card-image {
  display: block;
  width: auto;
  max-width: 100%;
  height: min(800px, calc(100vh - 176px));
  aspect-ratio: 3 / 5;
  object-fit: cover;
  border: 1px solid rgba(231, 190, 109, 0.5);
  border-radius: var(--radius);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.52), 0 0 54px rgba(231, 190, 109, 0.14);
}

.certificate-panel {
  padding: clamp(22px, 3.6vw, 42px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(16, 24, 35, 0.94), rgba(10, 15, 22, 0.9));
  box-shadow: var(--shadow);
}

.certificate-panel__head {
  margin-bottom: 24px;
}

.certificate-panel h1 {
  margin-bottom: 16px;
  font-size: clamp(40px, 5vw, 68px);
  overflow-wrap: anywhere;
}

.badge-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.state-badge,
.stage-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 800;
}

.state-badge {
  color: #dfffe5;
  border: 1px solid rgba(87, 227, 115, 0.44);
  background: rgba(87, 227, 115, 0.12);
}

.state-badge.is-retired {
  color: #ffd8d4;
  border-color: rgba(255, 101, 88, 0.42);
  background: rgba(255, 101, 88, 0.12);
}

.stage-badge {
  color: #efe2ff;
  border: 1px solid rgba(179, 122, 255, 0.48);
  background: rgba(179, 122, 255, 0.12);
}

.monster-strip {
  display: grid;
  grid-template-columns: 86px 1fr;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
  padding: 0 0 22px;
  border-bottom: 1px solid rgba(141, 176, 210, 0.18);
}

.monster-strip__image {
  width: 86px;
  aspect-ratio: 5 / 6;
  object-fit: cover;
  border: 1px solid rgba(231, 190, 109, 0.34);
  border-radius: var(--radius);
}

.monster-strip span,
.monster-strip small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.monster-strip strong {
  display: block;
  margin: 4px 0;
  font-size: 24px;
  line-height: 1.1;
}

.monster-strip small {
  color: var(--gold);
}

.certificate-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin-bottom: 26px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.certificate-summary > div {
  padding: 16px;
  background: rgba(4, 8, 13, 0.34);
}

.certificate-summary span,
.certificate-meta dt {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.certificate-summary strong {
  font-size: 24px;
  line-height: 1;
}

.qr-block {
  display: grid;
  grid-template-columns: 1fr 156px;
  gap: 20px;
  align-items: center;
  margin-bottom: 24px;
  padding: 18px;
  border: 1px solid rgba(56, 200, 255, 0.26);
  border-radius: var(--radius);
  background: rgba(56, 200, 255, 0.07);
}

.qr-block h2 {
  margin: 0 0 8px;
  font-size: 26px;
}

.qr-block p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.qr-image {
  width: 156px;
  height: 156px;
  padding: 8px;
  border-radius: var(--radius);
  background: #fff;
}

.certificate-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 0 0 26px;
}

.certificate-meta div {
  min-width: 0;
}

.certificate-meta dd {
  margin: 0;
  color: var(--text);
  overflow-wrap: anywhere;
}

.status-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}

.status-row {
  display: grid;
  grid-template-columns: 64px 1fr 42px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}

.status-row span {
  color: var(--text);
  font-weight: 800;
}

.status-row strong {
  text-align: right;
}

.status-meter {
  height: 8px;
  border-radius: 999px;
  background: rgba(141, 176, 210, 0.13);
  overflow: hidden;
}

.status-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  box-shadow: 0 0 14px currentColor;
}

.action-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 800;
}

.primary-action {
  color: #071018;
  border: 0;
  background: linear-gradient(135deg, var(--cyan), #9be7ff);
  cursor: pointer;
}

.secondary-action {
  color: var(--text);
  border: 1px solid rgba(141, 176, 210, 0.28);
  background: rgba(255, 255, 255, 0.04);
}

.retired-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

.admin-login,
.admin-page {
  padding-top: 20px;
}

.admin-login {
  max-width: 560px;
}

.admin-login__form {
  display: grid;
  gap: 14px;
  margin-top: 24px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 20, 30, 0.72);
}

.admin-login__form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.admin-login__form input,
.month-filter input {
  min-height: 42px;
  color: var(--text);
  border: 1px solid rgba(141, 176, 210, 0.28);
  border-radius: var(--radius);
  background: rgba(5, 8, 12, 0.64);
  outline: 0;
}

.admin-login__form input {
  padding: 0 12px;
}

.admin-note,
.admin-message {
  color: var(--muted);
  font-size: 14px;
}

.admin-message.is-error {
  color: #ffb1aa;
}

.admin-page__head,
.admin-history__toolbar,
.admin-history__summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(260px, 320px) 1fr;
  gap: 24px;
  margin-top: 24px;
}

.admin-member-list,
.admin-history {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(13, 20, 30, 0.72);
}

.admin-member-list {
  align-self: start;
  padding: 14px;
}

.admin-member-list .search-box {
  width: 100%;
}

.admin-member-list__items {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  max-height: 620px;
  overflow: auto;
}

.admin-member-button {
  display: grid;
  gap: 5px;
  width: 100%;
  min-height: 64px;
  padding: 10px 12px;
  color: var(--text);
  text-align: left;
  border: 1px solid rgba(141, 176, 210, 0.18);
  border-radius: var(--radius);
  background: rgba(5, 8, 12, 0.36);
  cursor: pointer;
}

.admin-member-button small {
  color: var(--muted);
}

.admin-member-button.is-selected {
  border-color: var(--border-strong);
  background: rgba(56, 200, 255, 0.12);
}

.admin-history {
  min-width: 0;
  padding: 18px;
}

.admin-history__toolbar h2 {
  margin: 0;
  font-size: 28px;
}

.month-filter {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.month-filter input {
  padding: 0 10px;
}

.admin-history__summary {
  margin: 16px 0;
  color: var(--muted);
  font-size: 13px;
}

.admin-event-list {
  display: grid;
  gap: 12px;
}

.admin-event-card {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(260px, 1.2fr);
  gap: 16px;
  padding: 14px;
  border: 1px solid rgba(141, 176, 210, 0.2);
  border-radius: var(--radius);
  background: rgba(5, 8, 12, 0.36);
}

.admin-event-card time {
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
}

.admin-event-card h3,
.admin-event-card p {
  margin: 0;
}

.admin-event-card h3 {
  margin-top: 6px;
  font-size: 20px;
}

.admin-event-card p {
  margin-top: 8px;
  color: var(--muted);
}

.admin-event-card__stats {
  color: #d8eaff;
}

.admin-event-card__details {
  color: var(--muted);
}

.admin-event-card__details summary {
  color: var(--text);
  cursor: pointer;
  font-weight: 800;
}

.admin-event-card__details ul {
  display: grid;
  gap: 6px;
  margin: 10px 0 0;
  padding-left: 18px;
  word-break: break-word;
}

.admin-empty {
  margin: 0;
  color: var(--muted);
}

.loading-view,
.empty-state {
  display: grid;
  place-items: center;
  min-height: 48vh;
  padding: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.loading-view {
  gap: 16px;
}

.loading-view__ring {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(56, 200, 255, 0.2);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.loading-view p,
.empty-state p {
  margin: 0;
  color: var(--muted);
}

.empty-state {
  gap: 12px;
}

.empty-state h1,
.empty-state h2 {
  margin: 0;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 981px) {
  .certificate-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
    column-gap: 28px;
    align-items: start;
  }

  .certificate-panel__head {
    grid-column: 1;
    grid-row: 1;
  }

  .monster-strip {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    width: 100%;
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 24px;
    padding: 0 0 0 18px;
    border-bottom: 0;
    border-left: 1px solid rgba(141, 176, 210, 0.18);
  }

  .monster-strip__image {
    width: 74px;
  }

  .monster-strip strong {
    overflow-wrap: anywhere;
  }

  .certificate-summary,
  .qr-block,
  .certificate-meta,
  .status-list,
  .action-row,
  .retired-note {
    grid-column: 1 / -1;
  }
}

@media (max-width: 980px) {
  .site-shell {
    width: min(100% - 28px, 760px);
  }

  .site-header,
  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .site-header {
    gap: 16px;
  }

  .brand {
    width: min(420px, 100%);
    align-self: flex-start;
  }

  .home-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .rules-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rules-concepts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rules-main,
  .rules-lower-layout,
  .rules-reference-grid {
    grid-template-columns: 1fr;
  }

  .rules-status-panel {
    position: static;
  }

  .site-nav {
    overflow-x: auto;
  }

  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer__meta {
    justify-content: flex-start;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(170px, 220px));
    gap: 22px;
  }

  .detail-page {
    grid-template-columns: 1fr;
  }

  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-member-list__items {
    max-height: 320px;
  }

  .admin-event-card {
    grid-template-columns: 1fr;
  }

  .detail-page__card {
    width: min(460px, 100%);
    margin: 0 auto;
  }
}

@media (max-width: 620px) {
  .site-shell {
    width: min(100% - 20px, 480px);
    padding-top: 12px;
  }

  .brand {
    width: min(340px, 100%);
  }

  .site-footer__brand {
    width: min(260px, 100%);
  }

  .home-title {
    font-size: 34px;
  }

  .home-hero {
    margin-bottom: 18px;
  }

  .toolbar {
    padding: 12px;
  }

  .rules-concepts {
    grid-template-columns: 1fr;
  }

  .rules-role__head,
  .rules-section__head,
  .rules-expanded-panel__head {
    align-items: flex-start;
    flex-direction: column;
  }

  .rules-table {
    min-width: 0;
  }

  .rules-table--compact {
    min-width: 520px;
  }

  .rules-table:not(.rules-table--compact) thead {
    display: none;
  }

  .rules-table:not(.rules-table--compact),
  .rules-table:not(.rules-table--compact) tbody,
  .rules-table:not(.rules-table--compact) tr,
  .rules-table:not(.rules-table--compact) td {
    display: block;
  }

  .rules-table:not(.rules-table--compact) tbody {
    display: grid;
    gap: 10px;
    padding: 10px;
  }

  .rules-table:not(.rules-table--compact) tr {
    border: 1px solid rgba(141, 176, 210, 0.16);
    border-radius: var(--radius);
    background: rgba(5, 8, 12, 0.32);
  }

  .rules-table:not(.rules-table--compact) td {
    padding: 10px 12px;
    border-bottom: 1px solid rgba(141, 176, 210, 0.12);
  }

  .rules-table:not(.rules-table--compact) td:last-child {
    border-bottom: 0;
  }

  .rules-table:not(.rules-table--compact) td::before {
    display: block;
    margin-bottom: 5px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 900;
  }

  .rules-table:not(.rules-table--compact) td:nth-child(1)::before {
    content: "加点対象";
  }

  .rules-table:not(.rules-table--compact) td:nth-child(2)::before {
    content: "加点点数";
  }

  .rules-table:not(.rules-table--compact) td:nth-child(3)::before {
    content: "加点ステータス";
  }

  .rules-table:not(.rules-table--compact) td:nth-child(4)::before {
    content: "基準";
  }

  .admin-page__head,
  .admin-history__toolbar,
  .admin-history__summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-history__toolbar h2 {
    font-size: 22px;
  }

  .month-filter {
    width: 100%;
  }

  .month-filter input {
    width: 100%;
  }

  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 18px;
  }

  .member-card__meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .member-card__name {
    font-size: 15px;
  }

  .member-card__monster {
    font-size: 11px;
  }

  .certificate-panel {
    padding: 20px;
  }

  .certificate-panel h1 {
    font-size: clamp(32px, 11vw, 44px);
    line-height: 1.08;
  }

  .detail-page__card {
    width: min(320px, 100%);
  }

  .detail-card-image {
    width: 100%;
    height: auto;
  }

  .certificate-summary,
  .certificate-meta,
  .qr-block {
    grid-template-columns: 1fr;
  }

  .monster-strip {
    grid-template-columns: 74px 1fr;
  }

  .monster-strip__image {
    width: 74px;
  }

  .qr-image {
    width: 180px;
    height: 180px;
  }

  .status-row {
    grid-template-columns: 52px 1fr 36px;
    gap: 10px;
  }
}
