/* ==========================================================================
   Mirrativ チアランク早見表 — Stylesheet
   ========================================================================== */

:root {
  /* ---- Core palette (Stadium Night) ---- */
  --bg-void:     #15112B;
  --bg-void-2:   #1B1638;
  --bg-panel:    #211B41;
  --bg-panel-2:  #281F4C;
  --line:        #38305E;
  --ink:         #F3EFFF;
  --ink-dim:     #ABA1D4;
  --ink-faint:   #7A7099;

  --cheer-coral: #FF5D7A;
  --cheer-coral-deep: #E8395A;
  --cheer-gold:  #F0C25E;

  /* ---- Tier colors (sampled from official チアランク一覧 reference image) ---- */
  --tier-none-a:     #4A4468; --tier-none-b:     #2C2650;
  --tier-rookie1-a:  #8DE0EC; --tier-rookie1-b:  #3FA9BA;
  --tier-rookie2-a:  #82E3CC; --tier-rookie2-b:  #2E9C86;
  --tier-leader1-a:  #FADD82; --tier-leader1-b:  #E0AC26;
  --tier-leader2-a:  #F7B384; --tier-leader2-b:  #DD742E;
  --tier-leader3-a:  #F79BDC; --tier-leader3-b:  #D0399F;
  --tier-leader4-a:  #DE94F9; --tier-leader4-b:  #9C2FD1;
  --tier-gold-1:     #F2D989; --tier-gold-2: #ECCF75; --tier-gold-3: #D2913F;
  --tier-platinum-1: #C3CEE5; --tier-platinum-2: #A8CCEA; --tier-platinum-3: #B29FD6;
  --tier-diamond-1:  #B98CF7; --tier-diamond-2: #6ED0D0; --tier-diamond-3: #5E9FD0;
  --tier-legend-1:   #EE4A3D; --tier-legend-2: #E23528; --tier-legend-3: #9B2B17;

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 26px;

  --font-display: 'Zen Kaku Gothic New', sans-serif;
  --font-num: 'Oswald', sans-serif;
  --font-body: 'Noto Sans JP', sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

body {
  margin: 0;
  background: var(--bg-void);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--font-display);
  margin: 0;
  color: var(--ink);
}

p { margin: 0; }

a { color: var(--cheer-coral); }

button, select, input {
  font-family: inherit;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 2.5px solid var(--cheer-gold);
  outline-offset: 3px;
}

/* ---- Ambient stadium glow ---- */
.stage-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
}
.stage-glow--a {
  width: 620px; height: 620px;
  top: -220px; left: -160px;
  background: radial-gradient(circle, var(--cheer-coral-deep), transparent 70%);
}
.stage-glow--b {
  width: 560px; height: 560px;
  top: 120px; right: -220px;
  background: radial-gradient(circle, #4E3FA6, transparent 70%);
}

main, header, footer { position: relative; z-index: 1; }

.eyebrow {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: var(--cheer-coral);
  margin: 0 0 10px;
}

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  padding: 72px 20px 40px;
}
.hero__inner {
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}
.hero__title {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 900;
  letter-spacing: 0.01em;
  background: linear-gradient(100deg, #FFFFFF 10%, var(--cheer-gold) 45%, var(--cheer-coral) 75%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lede {
  max-width: 620px;
  margin: 18px auto 0;
  color: var(--ink-dim);
  font-size: 15.5px;
}

/* ---- Ladder ---- */
.ladder {
  margin-top: 48px;
  position: relative;
}
.ladder__track {
  position: relative;
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 34px 6px 18px;
  scroll-snap-type: x proximity;
}
.ladder__track::before {
  content: '';
  position: absolute;
  left: 20px; right: 20px; top: 50%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 15%, var(--line) 85%, transparent);
  z-index: 0;
}
.ladder__track::-webkit-scrollbar { height: 6px; }
.ladder__track::-webkit-scrollbar-thumb { background: var(--line); border-radius: 10px; }

.ladder-badge {
  flex: 0 0 auto;
  scroll-snap-align: center;
  width: 112px;
  height: 134px;
  clip-path: polygon(50% 0%, 100% 26%, 100% 74%, 50% 100%, 0% 74%, 0% 26%);
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 10px 8px;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.ladder-badge:hover,
.ladder-badge:focus-visible { transform: translateY(-5px); }

.ladder-badge__icon {
  width: 22px;
  height: 22px;
  opacity: 0.9;
}
.ladder-badge__icon svg { width: 100%; height: 100%; display: block; }

.ladder-badge__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 13px;
  line-height: 1.25;
}
.ladder-badge__range {
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
}
.ladder-badge__bonus {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 600;
  opacity: 0.8;
  margin-top: -2px;
}

.ladder__hint {
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-top: 6px;
}

/* Tier fills, shared by ladder badges, rank chips, table rank cells */
.tier-none      { background: linear-gradient(150deg, var(--tier-none-a), var(--tier-none-b)); color: var(--ink); }
.tier-rookie1   { background: linear-gradient(150deg, var(--tier-rookie1-a), var(--tier-rookie1-b)); color: #0B333D; }
.tier-rookie2   { background: linear-gradient(150deg, var(--tier-rookie2-a), var(--tier-rookie2-b)); color: #0B3A2E; }
.tier-leader1   { background: linear-gradient(150deg, var(--tier-leader1-a), var(--tier-leader1-b)); color: #3E2B03; }
.tier-leader2   { background: linear-gradient(150deg, var(--tier-leader2-a), var(--tier-leader2-b)); color: #3A1D05; }
.tier-leader3   { background: linear-gradient(150deg, var(--tier-leader3-a), var(--tier-leader3-b)); color: #3A0726; }
.tier-leader4   { background: linear-gradient(150deg, var(--tier-leader4-a), var(--tier-leader4-b)); color: #2B0740; }
.tier-gold {
  background: linear-gradient(120deg, var(--tier-gold-3), var(--tier-gold-2), var(--tier-gold-1), var(--tier-gold-3));
  background-size: 320% 320%;
  color: #3E2B03;
  animation: iridescent-shimmer 8s ease infinite;
}
.tier-platinum  {
  background: linear-gradient(120deg, var(--tier-platinum-1), var(--tier-platinum-2), var(--tier-platinum-3), var(--tier-platinum-1));
  background-size: 320% 320%;
  color: #241A42;
  animation: iridescent-shimmer 9s ease infinite;
}
.tier-legend {
  background: linear-gradient(120deg, var(--tier-legend-1), var(--tier-legend-2), var(--tier-legend-3), var(--tier-legend-1));
  background-size: 320% 320%;
  color: #FFF6F0;
  animation: iridescent-shimmer 8s ease infinite;
}
.tier-diamond {
  background: linear-gradient(120deg, var(--tier-diamond-1), var(--tier-diamond-2), var(--tier-diamond-3), var(--tier-diamond-1));
  background-size: 320% 320%;
  color: #0B333D;
  animation: iridescent-shimmer 7s ease infinite;
}
@keyframes iridescent-shimmer {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* ==========================================================================
   Section shell
   ========================================================================== */
main { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
section { padding: 64px 0; }
.section-head { max-width: 640px; margin: 0 auto 32px; text-align: center; }
.section-head h2 { font-size: clamp(24px, 3.6vw, 32px); font-weight: 900; }
.section-lede { color: var(--ink-dim); font-size: 14.5px; margin-top: 12px; }

/* ==========================================================================
   Search
   ========================================================================== */
.search-panel {
  max-width: 640px;
  margin: 0 auto;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.mode-toggle {
  display: flex;
  background: var(--bg-void-2);
  border-radius: 999px;
  padding: 5px;
  gap: 4px;
}
.mode-btn {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--ink-dim);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  padding: 11px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.mode-btn.is-active {
  background: linear-gradient(120deg, var(--cheer-coral), var(--cheer-coral-deep));
  color: #fff;
}

.mode-pane { margin-top: 22px; }
.field-label {
  display: block;
  font-size: 13px;
  color: var(--ink-dim);
  margin-bottom: 10px;
  font-weight: 500;
}

.select-input {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-void-2) url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23ABA1D4" stroke-width="2"><path d="M6 9l6 6 6-6"/></svg>') no-repeat right 14px center;
  background-size: 18px;
  color: var(--ink);
  font-size: 15px;
  appearance: none;
  cursor: pointer;
}

.level-stepper {
  display: flex;
  align-items: stretch;
  gap: 10px;
  touch-action: manipulation;
}
.level-stepper button {
  width: 52px;
  border: 1px solid var(--line);
  background: var(--bg-void-2);
  color: var(--cheer-gold);
  font-size: 22px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  touch-action: manipulation;
}
.level-input {
  flex: 1;
  text-align: center;
  font-family: var(--font-num);
  font-size: 26px;
  font-weight: 600;
  background: var(--bg-void-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink);
  -moz-appearance: textfield;
}
.level-input::-webkit-outer-spin-button,
.level-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---- Result area ---- */
.result-area {
  margin-top: 26px;
  padding-top: 24px;
  border-top: 1px dashed var(--line);
}
.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.result-head h3 {
  font-size: 18px;
  font-weight: 700;
}
.rank-chip {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  white-space: nowrap;
}
.result-note {
  color: var(--ink-faint);
  font-size: 13px;
  margin-top: 8px;
}
.result-bonus {
  font-size: 13px;
  color: var(--ink-dim);
  margin-top: 10px;
}
.result-bonus strong {
  color: var(--cheer-gold);
  font-family: var(--font-num);
  font-size: 15px;
}

.cond-cards {
  margin-top: 18px;
  display: flex;
  align-items: stretch;
  gap: 12px;
  flex-wrap: wrap;
}
.cond-card {
  flex: 1 1 160px;
  background: var(--bg-panel-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 16px 16px 14px;
  border-top: 3px solid var(--cheer-coral);
}
.cond-B { border-top-color: var(--cheer-gold); }
.cond-C { border-top-color: var(--tier-diamond-3); }

.cond-card__badge {
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-dim);
  letter-spacing: 0.05em;
}
.cond-card__list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cond-card__list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
}
.metric-icon {
  width: 18px; height: 18px;
  flex: 0 0 auto;
  color: var(--cheer-coral);
}
.metric-icon svg { width: 100%; height: 100%; display: block; }
.metric-label { color: var(--ink-dim); flex: 0 0 auto; }
.metric-value { color: var(--ink); font-weight: 600; margin-left: auto; text-align: right; }

.cond-or {
  align-self: center;
  color: var(--ink-faint);
  font-size: 12px;
  font-weight: 600;
  padding: 4px 10px;
}
.cond-or--break {
  flex-basis: 100%;
  text-align: center;
}

/* ==========================================================================
   Table
   ========================================================================== */

/* ---- 列の表示/非表示切り替え ---- */
.col-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  max-width: 900px;
  margin: 0 auto 16px;
}
.col-toggle__label {
  font-size: 12.5px;
  color: var(--ink-faint);
  margin-right: 2px;
}
.col-toggle__btn {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-faint);
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.col-toggle__btn.is-active {
  background: color-mix(in srgb, var(--cheer-coral) 22%, var(--bg-panel));
  border-color: var(--cheer-coral);
  color: var(--ink);
}

.table-scroll {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 640px;
  background: var(--bg-panel);
}

.cheer-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  table-layout: fixed;
  font-size: 13.5px;
  font-family: var(--font-num), var(--font-body);
}

.cheer-table th, .cheer-table td {
  padding: 10px 12px;
  text-align: center;
  white-space: normal;
  word-break: keep-all;
  border-bottom: 1px solid var(--line);
}

.cheer-table thead th {
  position: sticky;
  top: 0;
  background: var(--bg-panel-2);
  color: var(--ink-dim);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 12.5px;
  z-index: 3;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.cheer-table thead tr:first-child th { top: 0; }
.cheer-table thead tr:last-child th { top: 39px; }

.cheer-table thead th.group-a { background: color-mix(in srgb, var(--cheer-coral) 18%, var(--bg-panel-2)); }
.cheer-table thead th.group-b { background: color-mix(in srgb, var(--cheer-gold) 18%, var(--bg-panel-2)); }
.cheer-table thead th.group-c { background: color-mix(in srgb, var(--tier-diamond-3) 22%, var(--bg-panel-2)); }

.cheer-table .col-lv, .cheer-table td.lv-cell { width: 64px; }

.cheer-table td.lv-cell {
  text-align: center;
  font-family: var(--font-num);
  font-weight: 600;
  background: var(--bg-panel);
  color: var(--ink);
}

.cheer-table td.na { color: var(--ink-faint); text-align: center; }

.cheer-table tbody tr.tier-none     td.lv-cell { background: color-mix(in srgb, var(--tier-none-b) 18%, var(--bg-panel)); }
.cheer-table tbody tr.tier-rookie1  td.lv-cell { background: color-mix(in srgb, var(--tier-rookie1-b) 14%, var(--bg-panel)); }
.cheer-table tbody tr.tier-rookie2  td.lv-cell { background: color-mix(in srgb, var(--tier-rookie2-b) 14%, var(--bg-panel)); }
.cheer-table tbody tr.tier-leader1  td.lv-cell { background: color-mix(in srgb, var(--tier-leader1-b) 14%, var(--bg-panel)); }
.cheer-table tbody tr.tier-leader2  td.lv-cell { background: color-mix(in srgb, var(--tier-leader2-b) 14%, var(--bg-panel)); }
.cheer-table tbody tr.tier-leader3  td.lv-cell { background: color-mix(in srgb, var(--tier-leader3-b) 14%, var(--bg-panel)); }
.cheer-table tbody tr.tier-leader4  td.lv-cell { background: color-mix(in srgb, var(--tier-leader4-b) 14%, var(--bg-panel)); }
.cheer-table tbody tr.tier-gold     td.lv-cell { background: color-mix(in srgb, var(--tier-gold-3) 16%, var(--bg-panel)); }
.cheer-table tbody tr.tier-platinum td.lv-cell { background: color-mix(in srgb, var(--tier-platinum-3) 16%, var(--bg-panel)); }
.cheer-table tbody tr.tier-diamond  td.lv-cell { background: color-mix(in srgb, var(--tier-diamond-3) 16%, var(--bg-panel)); }
.cheer-table tbody tr.tier-legend   td.lv-cell { background: color-mix(in srgb, var(--tier-legend-3) 16%, var(--bg-panel)); }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  max-width: 760px;
  margin: 20px auto 0;
  padding: 30px 20px 70px;
  text-align: center;
  color: var(--ink-faint);
  font-size: 12.5px;
  line-height: 1.8;
}
.site-footer .credit {
  margin-top: 10px;
  font-family: var(--font-num);
  letter-spacing: 0.04em;
  color: var(--ink-dim);
}
.footer-notice {
  margin-bottom: 30px;
}
.footer-social {
  margin: 16px 0 0;
}
.footer-social a {
  display: inline-flex;
  opacity: 0.75;
  transition: opacity 0.15s ease;
}
.footer-social a:hover,
.footer-social a:focus-visible { opacity: 1; }
.footer-social img {
  width: 22px;
  height: 22px;
  display: block;
}
.footer-links {
  margin-top: 14px;
  font-size: 12.5px;
}
.footer-links a {
  color: var(--ink-dim);
  text-decoration: none;
}
.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--cheer-coral);
  text-decoration: underline;
}
.footer-links__divider {
  margin: 0 10px;
  color: var(--ink-faint);
}

/* ==========================================================================
   Subpages（プライバシーポリシー・免責事項）
   トップページのようなh1グラデーション（シャイン）演出は使わない
   ========================================================================== */
.subpage-header {
  padding: 56px 20px 8px;
}
.subpage-header__inner {
  max-width: 720px;
  margin: 0 auto;
  text-align: center;
}
.subpage-back {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-dim);
  text-decoration: none;
  margin-bottom: 22px;
}
.subpage-back:hover,
.subpage-back:focus-visible { color: var(--cheer-coral); }
.subpage-title {
  font-size: clamp(26px, 4.4vw, 36px);
  font-weight: 900;
  color: var(--ink);
  margin-top: 6px;
}

.policy-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 40px;
}
.policy-updated {
  color: var(--ink-faint);
  font-size: 12.5px;
  margin-bottom: 8px;
}
.policy-section {
  padding: 26px 0;
  border-top: 1px solid var(--line);
}
.policy-section:first-of-type { border-top: none; }
.policy-section h2 {
  font-size: 17px;
  font-weight: 700;
}
.policy-section h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink-dim);
  margin: 16px 0 6px;
}
.policy-section p {
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.9;
  margin-top: 10px;
}
.policy-section ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1.9;
}
.policy-section li + li { margin-top: 4px; }
.policy-section a { color: var(--cheer-coral); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 640px) {
  .hero { padding: 56px 16px 32px; }
  .subpage-header { padding: 44px 16px 4px; }
  .policy-main { padding: 20px 16px 32px; }
  section { padding: 48px 0; }
  main { padding: 0 14px; }
  .search-panel { padding: 20px; border-radius: var(--radius-md); }
  .cond-cards { flex-direction: column; }
  .cond-or { align-self: flex-start; padding-left: 2px; }
  .cond-or--break { flex-basis: auto; }
  .table-scroll { max-height: 70vh; }
  .ladder-badge { width: 98px; height: 120px; }
  .cheer-table th, .cheer-table td { padding: 9px 6px; font-size: 12.5px; }
}
