/* DP◎◇道極表 証真道途 — cloud theme (upper table preview) */
:root {
  --ink: #24323f;
  --ink-soft: #41576b;
  --muted: #6b8094;
  --line: rgba(78, 112, 146, 0.18);
  --line-strong: rgba(78, 112, 146, 0.32);
  --sky-1: #fbfdff;
  --sky-2: #edf5fc;
  --sky-3: #dceaf8;
  --gold: #b8893f;
  --gold-soft: #efdcb8;
  --card: rgba(255, 255, 255, 0.74);
  --card-solid: #ffffff;
  --shadow: 0 20px 60px rgba(64, 106, 148, 0.13);
  --shadow-soft: 0 8px 26px rgba(64, 106, 148, 0.09);
  --radius: 20px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: "Noto Serif CJK JP", "Noto Serif JP", "Yu Mincho", "Hiragino Mincho ProN",
    "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
  line-height: 1.75;
  background: var(--sky-2);
  overflow-x: hidden;
}

/* layered clouds */
body::before,
body::after {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: -2;
  pointer-events: none;
}
body::before {
  background:
    radial-gradient(ellipse 46% 20% at 10% 14%, rgba(255, 255, 255, 0.96), transparent 70%),
    radial-gradient(ellipse 38% 16% at 82% 10%, rgba(255, 255, 255, 0.92), transparent 72%),
    radial-gradient(ellipse 52% 18% at 52% 82%, rgba(255, 255, 255, 0.78), transparent 72%),
    radial-gradient(ellipse 30% 13% at 18% 88%, rgba(255, 255, 255, 0.85), transparent 70%),
    linear-gradient(180deg, var(--sky-1) 0%, var(--sky-2) 46%, var(--sky-3) 100%);
}
body::after {
  z-index: -1;
  opacity: 0.55;
  background:
    radial-gradient(ellipse 34% 12% at 68% 30%, rgba(255, 255, 255, 0.75), transparent 70%),
    radial-gradient(ellipse 26% 10% at 30% 52%, rgba(255, 255, 255, 0.6), transparent 72%),
    radial-gradient(ellipse 40% 14% at 88% 68%, rgba(255, 255, 255, 0.55), transparent 74%);
  animation: cloud-drift 46s ease-in-out infinite alternate;
}
@keyframes cloud-drift {
  from { transform: translate3d(-1.2%, 0, 0); }
  to { transform: translate3d(1.6%, -1.2%, 0); }
}

a { color: inherit; }

.wrap {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

/* top bar */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 0 8px;
  font-size: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-decoration: none;
  color: inherit;
}
.brand .mark {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: rgba(255, 255, 255, 0.7);
  font-size: 16px;
}
.brand-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  color: var(--gold);
  font-size: 15px;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(184, 137, 63, .55);
  border-radius: 50%;
}
.nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--ink-soft);
}
.nav a { text-decoration: none; }
.nav a:hover { color: var(--gold); }
.nav .lang {
  padding: 4px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .06em;
  color: var(--muted);
}
.nav .lang:hover { color: var(--gold); border-color: var(--gold); }

/* hero */
.hero {
  position: relative;
  display: block;
  text-align: center;
  padding: 64px 0 42px;
}
.hero > div:first-child { position: relative; z-index: 1; }
.hero-symbol {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 15px;
  letter-spacing: 0.3em;
}
.hero h1 {
  margin: 12px 0 8px;
  font-size: clamp(46px, 7vw, 76px);
  line-height: 1.12;
  letter-spacing: 0.12em;
  text-indent: 0.12em;
  font-weight: 600;
}
.hero .sub {
  margin: 0;
  color: var(--ink-soft);
  font-size: 17px;
}
.version {
  display: inline-block;
  margin-left: 10px;
  padding: 1px 8px;
  border: 1px solid rgba(184, 137, 63, .45);
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--gold);
  font-weight: 600;
  vertical-align: .12em;
}
.hero .meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.hero .meta b { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  font-size: 15px;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, #2e4256, #44607a);
  color: #fff;
  box-shadow: 0 12px 28px rgba(46, 66, 86, 0.22);
}
.btn-primary:hover { box-shadow: 0 16px 34px rgba(46, 66, 86, 0.28); }
.btn-ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}
.btn-ghost:hover { background: #fff; }

/* cloud band above the two tables */
.cloud-band {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -50px;
  height: 190px;
  pointer-events: none;
  z-index: 0;
}
.cloud-band .sun {
  position: absolute;
  right: 6%;
  bottom: 20px;
  width: 132px;
  height: 132px;
  font-size: 46px;
}
.cloud-band .cloud { opacity: 0.72; }
.cloud.c3 { width: 190px; height: 48px; left: 1%; bottom: 50px; }
.cloud.c3::before { width: 80px; height: 80px; left: 24px; bottom: 10px; }
.cloud.c3::after { width: 56px; height: 56px; right: 28px; bottom: 4px; }
.cloud.c4 { width: 140px; height: 36px; left: 25%; bottom: 96px; opacity: 0.75; }
.cloud.c4::before { width: 60px; height: 60px; left: 20px; bottom: 8px; }
.cloud.c4::after { width: 44px; height: 44px; right: 20px; bottom: 2px; }
.cloud.c5 { width: 170px; height: 44px; left: 48%; bottom: 56px; }
.cloud.c5::before { width: 72px; height: 72px; left: 22px; bottom: 10px; }
.cloud.c5::after { width: 50px; height: 50px; right: 26px; bottom: 4px; }
.cloud.c6 { width: 120px; height: 32px; left: 68%; bottom: 104px; opacity: 0.7; }
.cloud.c6::before { width: 52px; height: 52px; left: 18px; bottom: 6px; }
.cloud.c6::after { width: 38px; height: 38px; right: 18px; bottom: 2px; }
.sun {
  width: 112px;
  height: 112px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold);
  font-size: 40px;
  background: radial-gradient(circle at 35% 30%, #fffdf6, #f6e8c8 62%, #e3c98f);
  box-shadow: 0 0 0 14px rgba(255, 255, 255, 0.4), 0 24px 60px rgba(184, 137, 63, 0.24);
}
.sun-mark {
  width: 26px;
  height: 26px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  position: relative;
}
.sun-mark::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: var(--gold);
}
.cloud {
  position: absolute;
  background: #fff;
  border-radius: 999px;
  filter: blur(0.2px);
  opacity: 0.92;
}
.cloud::before,
.cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud.c1 { width: 180px; height: 46px; left: 4%; bottom: 30%; box-shadow: var(--shadow-soft); }
.cloud.c1::before { width: 76px; height: 76px; left: 26px; bottom: 10px; }
.cloud.c1::after { width: 54px; height: 54px; right: 30px; bottom: 4px; }
.cloud.c2 { display: none; }
.cloud.c2::before { width: 62px; height: 62px; left: 20px; bottom: 8px; }
.cloud.c2::after { width: 44px; height: 44px; right: 22px; bottom: 2px; }

/* cards */
.section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 26px 0 16px;
}
.section-title h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: 0.06em;
  font-weight: 600;
}
.section-title span { color: var(--muted); font-size: 13px; }

.cards {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  padding-bottom: 20px;
}
.card {
  position: relative;
  overflow: hidden;
  padding: 22px 20px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.card .num {
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.24em;
}
.card h3 {
  margin: 6px 0 4px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.card p { margin: 0; color: var(--muted); font-size: 13px; }
.card .count {
  position: absolute;
  right: 18px;
  top: 18px;
  color: var(--ink-soft);
  font-size: 13px;
}
.card.domain { background: rgba(255, 250, 240, 0.82); border-color: rgba(184, 137, 63, 0.28); }

/* mode cards (EASY / HARD) */
.cards.modes { grid-template-columns: repeat(2, minmax(0, 1fr)); }
a.card {
  display: block;
  color: inherit;
  text-decoration: none;
  transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
a.card:hover {
  transform: translateY(-2px);
  border-color: rgba(184, 137, 63, 0.45);
  box-shadow: var(--shadow);
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.card-symbol { font-size: 21px; letter-spacing: 0.08em; color: var(--gold); }
.card-mode { font-size: 11px; letter-spacing: 0.18em; color: var(--muted); }
.card-stats { display: flex; gap: 26px; margin: 16px 0 14px; }
.card-stats .stat b { display: block; font-size: 22px; font-weight: 600; color: var(--ink); }
.card-stats .stat span { font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.card-cta { font-size: 12px; letter-spacing: 0.12em; color: var(--gold); }

/* EASY / HARD accent colours (same as the realm counts) */
.card[data-symbol="◎◇"] .card-stats .stat b,
.card[data-symbol="◎◇"] .card-cta { color: #2f6f5d; }
.card[data-symbol="◎◆"] .card-stats .stat b,
.card[data-symbol="◎◆"] .card-cta { color: #b4553f; }
.url-label.easy { color: #2f6f5d; }
.url-label.hard { color: #b4553f; }

/* big symbol watermark on the mode cards */
.card[data-symbol]::after {
  content: attr(data-symbol);
  position: absolute;
  right: -10px;
  bottom: -30px;
  z-index: 0;
  font-size: 150px;
  line-height: 1;
  letter-spacing: -0.14em;
  color: var(--gold);
  opacity: 0.06;
  pointer-events: none;
}
.card[data-symbol] > * { position: relative; z-index: 1; }

/* band grid (realms) */
.band-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  padding-bottom: 20px;
}
.band-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 18px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
  text-align: center;
}
.band-cell .no {
  font-size: 11px;
  letter-spacing: 0.18em;
  color: var(--gold);
}
.band-cell .name {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.band-cell .desc {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}
.band-cell .counts {
  display: flex;
  gap: 14px;
  margin-top: 4px;
  font-size: 14px;
  font-weight: 600;
}
.band-cell .count-easy { color: #2f6f5d; }
.band-cell .count-hard { color: #b4553f; }
.band-cell.wide {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  padding: 20px 18px;
  background: rgba(255, 250, 240, 0.82);
  border-color: rgba(184, 137, 63, 0.28);
}
.band-cell.wide .desc { font-size: 12.5px; }

/* note */
.note {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 14px;
  margin: 18px 0 46px;
  color: var(--ink-soft);
  font-size: 14px;
}
.note::before {
  content: "";
  border-radius: 999px;
  background: linear-gradient(180deg, var(--gold-soft), var(--gold));
}
.note b { color: var(--ink); }

/* import */
.import {
  margin: 10px 0 46px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-soft);
}
.import h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: .04em; }
.import p { margin: 8px 0; color: var(--ink-soft); font-size: 14px; }
.url-box {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}
.url-box code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  word-break: break-all;
  color: var(--ink);
}
.url-label {
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--gold);
  min-width: 44px;
}
.copy-btn {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.copy-btn:hover { border-color: var(--gold); color: var(--gold); }
.hint { color: var(--muted); font-size: 12.5px; }

/* footer */
footer {
  margin-top: 30px;
  padding: 26px 0 46px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
}

/* table page */
.page-head { padding: 44px 0 10px; }
.page-head h1 { margin: 8px 0 4px; font-size: clamp(28px, 4vw, 42px); font-weight: 600; }
.page-head .sub { margin: 0; color: var(--muted); }
.mode-switch { display: flex; gap: 8px; margin: 14px 0 0; }
.mode-switch a {
  padding: 5px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  letter-spacing: 0.14em;
}
.mode-switch a:hover { color: var(--gold); border-color: var(--gold); }
.mode-switch a.active { color: var(--gold); border-color: var(--gold); }
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 26px 0 18px;
}
.toolbar input,
.toolbar select {
  padding: 10px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  min-width: 200px;
}
.toolbar .stat { color: var(--muted); font-size: 13px; margin-left: auto; }

details.level {
  margin: 10px 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}
details.level > summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  font-size: 15px;
}
details.level > summary::-webkit-details-marker { display: none; }
details.level > summary .lv { font-weight: 600; letter-spacing: 0.04em; }
details.level > summary .cnt { margin-left: auto; color: var(--muted); font-size: 13px; }
details.level > summary .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold);
  opacity: 0.75;
}
details.level[open] > summary { border-bottom: 1px solid var(--line); }
.rows { padding: 8px 20px 14px; }
.row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(78, 112, 146, 0.12);
  font-size: 14px;
}
.row:last-child { border-bottom: 0; }
.row .t { color: var(--ink); }
.row .h { color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }

.loading, .error {
  padding: 26px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  color: var(--muted);
}
.error { color: #8a3b3b; border-color: rgba(138, 59, 59, 0.25); }

/* FAQ */
.faq-body { padding-bottom: 40px; }
.faq-body section {
  margin: 22px 0;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  backdrop-filter: blur(8px);
  box-shadow: var(--shadow-soft);
}
.faq-body > .page-head.plain {
  margin: 0;
  padding: 34px 0 4px;
  border: 0;
  background: none;
  box-shadow: none;
  backdrop-filter: none;
}
.faq-body h2 { margin: 0 0 10px; font-size: 20px; letter-spacing: 0.04em; }
.faq-body h3 { margin: 18px 0 6px; font-size: 16px; }
.faq-body p, .faq-body li { color: var(--ink-soft); font-size: 14.5px; }
.faq-body ul, .faq-body ol { padding-left: 1.3em; }
.faq-body code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(78, 112, 146, 0.1);
  font-size: 0.9em;
}
.faq-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 14px;
}
.faq-body th, .faq-body td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.faq-body th { color: var(--muted); font-weight: 500; }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .sun { width: 88px; height: 88px; font-size: 32px; }
  .cloud-band { height: 90px; }
  .cloud-band .sun { width: 96px; height: 96px; font-size: 34px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wrap { width: calc(100% - 28px); }
  .cards { grid-template-columns: 1fr; }
  .cards.modes { grid-template-columns: 1fr; }
  .band-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band-cell.wide { flex-direction: column; }
  .topbar { flex-wrap: wrap; }
  .nav { gap: 12px; font-size: 13px; }
  .hero h1 { font-size: 32px; }
  .row { grid-template-columns: 1fr; gap: 2px; }
}
