:root {
  --bg: #0a0b10;
  --bg-2: #11131a;
  --panel: rgba(23, 25, 34, 0.92);
  --panel-2: rgba(28, 31, 42, 0.96);
  --panel-3: rgba(35, 39, 52, 0.98);
  --text: #f4f5f7;
  --muted: #b2b8c7;
  --line: rgba(216, 180, 106, 0.16);
  --line-strong: rgba(216, 180, 106, 0.30);
  --accent: #d8b46a;
  --accent-soft: #e3c98f;
  --accent-dim: #b8924d;
  --glow: rgba(216, 180, 106, 0.16);
  --glow-strong: rgba(216, 180, 106, 0.26);
  --danger: #d97f7f;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow:
    0 10px 30px rgba(0, 0, 0, 0.32),
    0 0 0 1px rgba(255,255,255,0.02);

  /* layout */
  --content-max: 800px;
  --pc-left-gutter: 130px;
  --page-gutter: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  line-height: 1.7;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic", sans-serif;
  background:
    radial-gradient(circle at top, rgba(216,180,106,.08), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(216,180,106,.05), transparent 20%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 100%);
  min-height: 100vh;
}

/* iPhone長押し時の強いハイライトを抑える */
a,
button,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

a {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ===== 共通レイアウト ===== */

.page,
.events-page,
.event-page,
.mc-page,
.rankings-page,
.mcs-page {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-max));
  margin-left: auto;
  margin-right: auto;
  padding:
    calc(28px + env(safe-area-inset-top))
    var(--page-gutter)
    72px;
}

header.page-header {
  margin-bottom: 28px;
}

header:not(.page-header) {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-max));
  margin-left: auto;
  margin-right: auto;
  padding:
    calc(28px + env(safe-area-inset-top))
    var(--page-gutter)
    0;
}

body > p:first-of-type {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--content-max));
  margin-left: auto;
  margin-right: auto;
  padding:
    calc(20px + env(safe-area-inset-top))
    var(--page-gutter)
    0;
}

/* ===== PCだけ左寄せ（疑似2カラム感） ===== */

@media (min-width: 1024px) {
  .page,
  .events-page,
  .event-page,
  .mc-page,
  .rankings-page,
  .mcs-page {
    width: min(var(--content-max), calc(100% - var(--pc-left-gutter) - var(--page-gutter)));
    margin-left: var(--pc-left-gutter);
    margin-right: auto;
  }

  header:not(.page-header),
  body > p:first-of-type {
    width: min(var(--content-max), calc(100% - var(--pc-left-gutter) - var(--page-gutter)));
    margin-left: var(--pc-left-gutter);
    margin-right: auto;
  }
}

/* ===== 共通トップ表示 ===== */

.page-top{
  margin-bottom: 18px;
}

.page-mini-logo{
  margin: 0 0 10px;
}

.page-mini-logo .site-mini-logo{
  display: inline-block;
  text-decoration: none;
  font-size: clamp(1.56rem, 5.9vw, 1.96rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}

.page-header-block{
  margin-bottom: 14px;
}

.page-header-block h1{
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.12;
  letter-spacing: -0.01em;
  font-weight: 700;
  color: var(--text);
}

.page-nav-pills{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px;
  max-width: 100%;
}

.page-nav-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--accent);
  text-decoration: none;
  font-size: 0.93rem;
  font-weight: 700;
  line-height: 1.2;
  transition:
    transform 0.18s ease,
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    opacity 0.18s ease;
}

.page-nav-pill:hover{
  text-decoration: none;
  transform: translateY(-1px);
  background: rgba(255,255,255,0.07);
  border-color: var(--line-strong);
  box-shadow: 0 0 18px var(--glow);
  opacity: 1;
}

.page-nav-break{
  flex-basis: 100%;
  height: 0;
}

/* ===== 基本文字 ===== */

h1 {
  margin: 0 0 10px;
  font-size: clamp(2.1rem, 4vw, 3.25rem);
  line-height: 1.04;
  letter-spacing: 0.01em;
  font-weight: 800;
  color: var(--accent);
  text-wrap: balance;
}

h2 {
  margin: 0 0 12px;
  font-size: 1.14rem;
  line-height: 1.3;
  font-weight: 750;
  letter-spacing: 0.02em;
  color: var(--accent);
}

h3 {
  margin: 0 0 10px;
  font-size: 1rem;
  line-height: 1.35;
  font-weight: 750;
  color: var(--accent);
}

p {
  margin: 0 0 12px;
}

section {
  margin-top: 24px;
}

strong {
  color: var(--accent);
}

.muted {
  color: var(--muted);
  font-size: 0.95rem;
}

.error {
  color: var(--danger);
  font-weight: 700;
}

/* ===== リンク ===== */

a {
  color: var(--accent);
  text-decoration: none;
  transition:
    color 0.18s ease,
    opacity 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.top-link {
  display: inline-block;
  margin-bottom: 18px;
}

.site-mini-logo {
  display: inline-block;
  font-family:
    "Times New Roman",
    Georgia,
    "Baskerville",
    "Hiragino Mincho ProN",
    "Yu Mincho",
    serif;
  font-style: italic;
  font-weight: 700;
  letter-spacing: -0.02em;
  font-size: 1rem;
  line-height: 1;
  color: var(--accent);
  text-decoration: none;
  text-shadow: 0 0 18px rgba(216, 180, 106, 0.08);
}

.site-mini-logo:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ===== カード ===== */

.card {
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.015) 100%),
    linear-gradient(180deg, var(--panel) 0%, rgba(14, 18, 28, 0.98) 100%);
  box-shadow: var(--shadow);
  padding: 18px;
}

/* ===== リスト ===== */

.meta-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.meta-list li {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.meta-list li:last-child {
  border-bottom: none;
}

.meta-label {
  color: var(--muted);
  font-weight: 700;
}

.list-tight {
  list-style: none;
  padding: 0;
  margin: 0;
}

.list-tight li {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.list-tight li:last-child {
  border-bottom: none;
}

/* ===== ボタン風リンク ===== */

.button-like-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.button-like-link:hover {
  text-decoration: none;
  background: rgba(255,255,255,0.07);
  border-color: var(--line-strong);
  box-shadow: 0 0 18px var(--glow);
  transform: translateY(-1px);
}

.spec-link-card {
  display: block;
  margin: 14px 0;
  padding: 14px 16px;
  border: 1px solid rgba(216,180,106,.30);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(216,180,106,.12), rgba(216,180,106,.05));
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    opacity 0.18s ease,
    border-color 0.18s ease,
    background-color 0.18s ease,
    box-shadow 0.18s ease;
}

.spec-link-card:hover {
  text-decoration: none;
  transform: translateY(-1px);
  opacity: 0.98;
  background: linear-gradient(180deg, rgba(216,180,106,.18), rgba(216,180,106,.08));
  border-color: rgba(216,180,106,.48);
  box-shadow: 0 0 18px var(--glow);
}

/* ===== テーブル ===== */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.02);
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--accent);
  font-weight: 800;
  background: rgba(255,255,255,0.03);
}

tr:last-child td {
  border-bottom: none;
}

/* ===== バッジ ===== */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
  color: var(--accent-soft);
  font-size: 0.88rem;
  font-weight: 700;
}

/* ===== フォーム ===== */

.input,
select,
textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.04);
  color: var(--text);
  outline: none;
}

.input:focus,
select:focus,
textarea:focus {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px rgba(216, 180, 106, 0.10);
}

/* ===== 区切り ===== */

hr {
  border: none;
  border-top: 1px solid var(--line);
  margin: 24px 0;
}

/* ===== モバイル ===== */

@media (max-width: 640px) {
  :root {
    --page-gutter: 12px;
  }

  .page,
  .events-page,
  .event-page,
  .mc-page,
  .rankings-page,
  .mcs-page {
    padding:
      calc(20px + env(safe-area-inset-top))
      12px
      56px;
  }

  header:not(.page-header) {
    padding:
      calc(20px + env(safe-area-inset-top))
      12px
      0;
  }

  body > p:first-of-type {
    padding:
      calc(16px + env(safe-area-inset-top))
      12px
      0;
  }

  .page-top{
    margin-bottom: 14px;
  }

  .page-mini-logo{
    margin-bottom: 8px;
  }

  .page-mini-logo .site-mini-logo{
    font-size: clamp(1.42rem, 6.15vw, 1.74rem);
    line-height: 1.06;
  }

  .page-header-block{
    margin-bottom: 12px;
  }

  .page-header-block h1{
    font-size: 0.98rem;
    line-height: 1.12;
    font-weight: 700;
  }

  .page-nav-pills{
    gap: 7px;
    margin-bottom: 12px;
  }

  .page-nav-pill{
    min-height: 34px;
    padding: 0 12px;
    font-size: 0.86rem;
  }

  h1 {
    font-size: clamp(1.8rem, 8vw, 2.4rem);
  }

  h2 {
    font-size: 1.02rem;
  }

  .card {
    padding: 14px;
    border-radius: 14px;
  }

  th,
  td {
    padding: 10px 10px;
  }

  .site-mini-logo {
    font-size: 0.95rem;
  }
}