/* ============================================================
   Valora Roleplay – Website
   ============================================================ */
:root {
  --bg: #000000;
  --bg-2: #0a0a0b;
  --card: rgba(255, 255, 255, 0.025);
  --card-solid: #0e0e10;
  --card-hover: rgba(255, 255, 255, 0.045);
  --border: rgba(255, 255, 255, 0.07);
  --border-2: rgba(255, 255, 255, 0.13);
  --text: #f2f2f3;
  --muted: #a3a3a8;
  --dim: #6c6c72;
  --cyan: #8fdcf3;
  --teal: #7fe3cf;
  --coral: #ffab7a;
  --grad: linear-gradient(100deg, #ffffff 0%, #cfeefb 45%, #8fd6f0 100%);
  --grad-sun: linear-gradient(100deg, #ffe3c9 0%, #ffb488 55%, #ff8f78 100%);
  --r-lg: 20px;
  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.75);
  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Manrope", system-ui, sans-serif;
  --font-serif: "Instrument Serif", Georgia, serif;
  --header-h: 76px;
}

* { box-sizing: border-box; }
html { overflow-x: clip; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
::selection { background: rgba(143, 220, 243, 0.3); color: #fff; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  margin: 0;
}
h1 { letter-spacing: -0.035em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sun { background: var(--grad-sun); -webkit-background-clip: text; background-clip: text; color: transparent; }
h1 .grad, h2 .grad, h1 .sun, h2 .sun {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  font-size: 1.08em;
  letter-spacing: -0.01em;
  padding-right: 0.08em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.badge .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(143, 220, 243, 0.8);
}
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--cyan);
}
.kicker::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: 0.6; }

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 20px 50px -30px rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand img { width: 42px; height: 42px; border-radius: 12px; box-shadow: 0 0 0 1px var(--border-2); }
.brand-name { font-family: var(--font-head); font-weight: 800; font-size: 21px; letter-spacing: -0.01em; line-height: 1; }
.brand-sub { display: block; font-size: 11px; font-weight: 700; letter-spacing: 0.2em; color: var(--dim); margin-top: 3px; }
.nav {
  display: flex;
  gap: 2px;
  margin-left: auto;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
}
.nav a {
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s, background .15s;
}
.nav a:hover { color: var(--text); }
.nav a.active { color: var(--text); background: rgba(255, 255, 255, 0.08); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  padding: 0 24px;
  border: 1px solid transparent;
  border-radius: var(--r);
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  color: #061018;
  background: linear-gradient(180deg, #ffffff, #e3edf2);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 10px 30px -12px rgba(190, 230, 255, 0.45);
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-1px); box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12), 0 16px 36px -12px rgba(190, 230, 255, 0.6); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn.ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--border-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}
.btn.ghost:hover { background: rgba(255, 255, 255, 0.08); }
.btn.discord { color: #fff; background: linear-gradient(180deg, #6a76f5, #5865f2); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18), 0 10px 30px -14px rgba(88, 101, 242, 0.7); }
.btn.sm { height: 40px; padding: 0 16px; font-size: 14px; border-radius: var(--r-sm); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Kopierfeld ---------- */
.addr {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  max-width: 100%;
  padding: 6px 6px 6px 16px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: rgba(255, 255, 255, 0.02);
  font-size: 14px;
  color: var(--muted);
}
.addr code { font-family: ui-monospace, Consolas, monospace; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.addr button {
  flex: none;
  border: 0;
  border-radius: var(--r-sm);
  padding: 7px 12px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: 700 13px var(--font-body);
  cursor: pointer;
}
.addr button:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- Sections ---------- */
.section { padding: 90px 0; }
.section-head { max-width: 640px; margin-bottom: 44px; }
.section-head h2 { font-size: clamp(34px, 4.6vw, 52px); margin: 14px 0 14px; }
.section-head p { margin: 0; color: var(--muted); font-size: 17px; }
.section-head.center { margin-inline: auto; text-align: center; }

/* ============================================================
   STARTSEITE
   ============================================================ */
.hero { position: relative; padding: 70px 0 90px; }
.hero .wrap { display: grid; grid-template-columns: 1.08fr 0.92fr; gap: 64px; align-items: center; }
.hero h1 { font-size: clamp(46px, 6vw, 80px); margin: 24px 0 22px; line-height: 1; }
.hero-lead { color: var(--muted); font-size: 19px; max-width: 520px; margin: 0 0 36px; }
.hero .addr { margin-top: 24px; }

.hero-media {
  --rx: 0deg; --ry: 0deg;
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 480px;
  perspective: 1200px;
}
.hero-media::before {
  /* warmes Licht hinter dem Bild, passend zum Sonnenuntergang */
  content: "";
  position: absolute;
  inset: 8% -6% -4% 6%;
  z-index: -1;
  border-radius: 40px;
  background: radial-gradient(closest-side, rgba(255, 140, 100, 0.35), rgba(120, 170, 255, 0.12) 60%, transparent);
  filter: blur(40px);
}
.media-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .3s ease-out;
}
.media-frame img { width: 100%; height: 100%; object-fit: cover; object-position: center 32%; transform: scale(1.04); }
.media-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.85) 100%);
}
.media-caption {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(12, 12, 14, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.media-caption img { width: 40px; height: 40px; border-radius: 11px; }
.media-caption strong { display: block; font-family: var(--font-head); font-weight: 600; font-size: 16px; }
.media-caption span { font-size: 13px; color: var(--muted); }
.media-caption .live { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text); white-space: nowrap; }
.media-tag {
  position: absolute;
  top: 18px; left: 18px;
  z-index: 1;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(12, 12, 14, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

/* Timeline */
.timeline { --gap: 44px; display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); position: relative; }
/* Verbindungslinien nur in den Lücken zwischen den Karten (Höhe = Mitte der Nummer) */
.timeline::before, .timeline::after {
  content: "";
  position: absolute;
  top: 46px;
  width: var(--gap);
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.1));
  transform-origin: left;
  transition: transform .6s cubic-bezier(.2, .7, .2, 1) .5s;
}
.timeline::before { left: calc((100% - 2 * var(--gap)) / 3); }
.timeline::after { left: calc((100% - 2 * var(--gap)) / 3 * 2 + var(--gap)); transition-delay: 1s; }
.js .timeline:not(.in)::before, .js .timeline:not(.in)::after { transform: scaleX(0); }
.tl-step { position: relative; padding: 28px 28px 30px; display: flex; flex-direction: column; transition: border-color .2s, transform .2s; }
.tl-step:hover { border-color: var(--border-2); transform: translateY(-4px); }
.tl-num {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 12px;
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-2);
  margin-bottom: 22px;
  position: relative;
}
.tl-step h3 { font-size: 22px; margin-bottom: 8px; }
.tl-step p { margin: 0 0 22px; color: var(--muted); font-size: 15px; flex: 1; }
.tl-step .icon { position: absolute; top: 28px; right: 26px; width: 26px; height: 26px; color: var(--dim); }

/* Features */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { padding: 26px; }
.feature .ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--cyan);
  margin-bottom: 18px;
}
.feature .ico svg { width: 22px; height: 22px; }
.feature h3 { font-size: 18px; margin-bottom: 6px; }
.feature p { margin: 0; color: var(--muted); font-size: 14px; }

/* FAQ */
.faq-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 60px; align-items: start; }
.faq-grid .section-head { margin-bottom: 26px; }
.accordion { display: grid; gap: 10px; }
.accordion details { border-radius: var(--r); overflow: hidden; transition: border-color .2s; }
.accordion details[open] { border-color: var(--border-2); }
.accordion summary {
  list-style: none;
  cursor: pointer;
  padding: 18px 22px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after {
  content: "+";
  flex: none;
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--cyan);
  font-size: 20px;
  font-weight: 500;
  transition: transform .2s;
}
.accordion details[open] summary::after { transform: rotate(45deg); }
.accordion details p { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 15px; }

/* CTA */
.cta { padding: 54px; text-align: center; position: relative; overflow: hidden; }
.cta {
  padding: 96px 54px;
  border-color: rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(ellipse 60% 85% at 50% 50%, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.85) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.6)),
    url("img/villa.jpg") center 62% / cover no-repeat;
}
.cta h2 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 14px; position: relative; }
.cta p { color: var(--muted); margin: 0 auto 28px; max-width: 520px; position: relative; }
.cta .btn-row { justify-content: center; position: relative; }

/* ============================================================
   REGELWERK
   ============================================================ */
.rb-hero { padding: 64px 0 36px; }
.rb-hero h1 { font-size: clamp(42px, 6vw, 72px); margin: 20px 0 16px; }
.rb-hero > p { color: var(--muted); font-size: 18px; max-width: 640px; margin: 0; }
.keypoints { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; }
.keypoint { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px; border-radius: var(--r); }
.keypoint .ico {
  flex: none;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  color: var(--cyan);
}
.keypoint .ico svg { width: 22px; height: 22px; }
.keypoint strong { display: block; font-family: var(--font-head); font-size: 17px; }
.keypoint span { color: var(--muted); font-size: 14px; }

.rb-layout { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 36px; align-items: start; padding-bottom: 40px; }
.rb-side { position: sticky; top: calc(var(--header-h) + 20px); display: flex; flex-direction: column; gap: 14px; }

.search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border-radius: var(--r);
  background: var(--card-solid);
  border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.search:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 4px rgba(143, 220, 243, 0.12); }
.search svg { width: 18px; height: 18px; color: var(--dim); flex: none; }
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: 0; color: var(--text); font: 500 15px var(--font-body); }
.search input::placeholder { color: var(--dim); }
.search kbd { font: 700 11px var(--font-body); color: var(--dim); border: 1px solid var(--border-2); padding: 1px 7px; border-radius: 6px; }
.search-count { font-size: 13px; color: var(--muted); padding: 0 4px; min-height: 0; }
.search-count:empty { display: none; }

.toc { border-radius: var(--r); overflow: hidden; }
.toc summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 18px;
  font-family: var(--font-head);
  font-weight: 600;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.toc summary::-webkit-details-marker { display: none; }
.toc summary span { color: var(--dim); font-weight: 500; font-size: 14px; }
.toc nav { max-height: calc(100vh - var(--header-h) - 190px); overflow-y: auto; padding: 8px 8px 12px; scrollbar-width: thin; scrollbar-color: var(--border-2) transparent; }
.toc .grp { padding: 12px 10px 6px; font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--dim); }
.toc a {
  display: flex;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: background .15s, color .15s;
}
.toc a .n { font-variant-numeric: tabular-nums; color: var(--dim); font-weight: 700; min-width: 20px; }
.toc a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.toc a.active { background: rgba(143, 220, 243, 0.1); color: var(--cyan); }
.toc a.active .n { color: var(--cyan); }

.group-title {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 0 0 18px;
  padding: 18px 22px;
  border-radius: var(--r);
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.05), transparent);
  border: 1px solid var(--border);
}
.group-title:not(:first-child) { margin-top: 56px; }
.group-title .part {
  font-family: var(--font-head);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(143, 220, 243, 0.1);
  white-space: nowrap;
}
.group-title h2 { font-size: 26px; }

.chapter { margin-bottom: 18px; }
.chapter-head { display: flex; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.ch-badge {
  flex: none;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border-radius: 14px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 17px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-2);
}
.chapter-head small { display: block; font-size: 12px; font-weight: 600; color: var(--dim); }
.chapter-head h3 { font-size: 22px; }
.ch-count { margin-left: auto; font-size: 13px; color: var(--dim); white-space: nowrap; }
.chapter-body { padding: 8px 24px 14px; }

.rule, .term {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 8px;
}
.chapter-body > :last-child { border-bottom: 0; }
.rule-id {
  align-self: start;
  justify-self: start;
  margin-top: 1px;
  padding: 2px 8px;
  border: 1px solid var(--border-2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font: 700 12px var(--font-body);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.rule-id:hover { color: var(--cyan); border-color: var(--cyan); }
.rule-text, .term-text { color: #c8dbe3; }
.rule-text strong, .term-text strong { color: var(--text); font-weight: 700; }
.term-name {
  display: inline-block;
  margin-right: 8px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255, 171, 122, 0.12);
  color: var(--coral);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.02em;
}
.rule.flash, .term.flash { animation: flash 1.8s ease; }
@keyframes flash { 0%, 45% { background: rgba(143, 220, 243, 0.12); } 100% { background: transparent; } }

.rule-sub {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 4px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--teal);
}
.rule-sub::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.rule-sub:first-child { margin-top: 10px; }

.rule-note { margin: 12px 0; padding: 14px 18px; border-radius: var(--r-sm); background: rgba(255, 171, 122, 0.07); border: 1px solid rgba(255, 171, 122, 0.2); color: var(--muted); font-size: 15px; }

.dict { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 12px 0 14px; padding-left: 70px; }
.dict div { padding: 10px 14px; border-radius: var(--r-sm); background: rgba(0, 0, 0, 0.2); border: 1px solid var(--border); }
.dict dt { font-size: 12px; font-weight: 700; color: var(--dim); }
.dict dd { margin: 0; font-weight: 600; }

mark { background: rgba(255, 179, 107, 0.3); color: #fff; border-radius: 3px; }
.hidden { display: none !important; }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }

.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 60;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  border: 1px solid var(--border-2);
  border-radius: 14px;
  color: var(--cyan);
  background: rgba(16, 16, 18, 0.92);
  backdrop-filter: blur(10px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.to-top:hover { transform: translateY(-2px); }
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 70;
  transform: translate(-50%, 20px);
  padding: 12px 20px;
  border-radius: 999px;
  background: var(--card-solid);
  border: 1px solid var(--border-2);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  margin-top: 80px;
  border-top: 1px solid var(--border);
  padding: 56px 0 30px;
  color: var(--muted);
  font-size: 14px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.02), transparent);
}
.site-footer::before {
  content: "";
  position: absolute;
  top: -1px; left: 50%;
  width: min(600px, 80%);
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footer-grid p { margin: 14px 0 0; max-width: 340px; color: var(--dim); }
.footer-grid h4 { font-size: 14px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text); margin-bottom: 14px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { transition: color .15s; }
.footer-grid a:hover { color: var(--cyan); }
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 30px;
  margin-top: 44px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--dim);
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 48px; }
  .hero-media { justify-self: center; max-width: 440px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .faq-grid { grid-template-columns: 1fr; gap: 10px; }
  .keypoints { grid-template-columns: 1fr; }
  .rb-layout { grid-template-columns: 1fr; gap: 20px; }
  html { scroll-padding-top: 150px; }
  .rb-side { position: static; }
  .search-box { position: sticky; top: var(--header-h); z-index: 30; padding: 10px 0; margin: -10px 0; background: var(--bg); }
  .toc nav { max-height: 360px; }
}
@media (max-width: 760px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline { --gap: 16px; }
  .timeline::before, .timeline::after { display: none; }
}
@media (max-width: 640px) {
  :root { --header-h: 64px; }
  .brand img { width: 36px; height: 36px; }
  .brand-sub { display: none; }
  .nav a { padding: 6px 12px; }
  .nav a.hide-sm { display: none; }
  .hero { padding: 36px 0 60px; }
  .hero-lead { font-size: 17px; }
  .hero h1 br { display: none; }
  .media-frame { aspect-ratio: 4 / 4.6; border-radius: 22px; }
  .section { padding: 64px 0; }
  .features { grid-template-columns: 1fr; }
  .cta { padding: 56px 22px; }
  .chapter-head { padding: 16px; }
  .ch-count { display: none; }
  .chapter-body { padding: 4px 16px 10px; }
  .rule, .term { grid-template-columns: 1fr; gap: 4px; }
  .dict { grid-template-columns: 1fr; padding-left: 0; }
  .search kbd { display: none; }
  .group-title { flex-direction: column; align-items: flex-start; gap: 8px; }
}
