/* MuShop · 黑石 · 鎏金
 *
 * 与首页同一套主题：暖黑石底、羊皮纸字、鎏金强调色、衬线标题。
 * 变量名沿用早期的 cyan / violet，值已经换成金 / 铜，避免改动上百处引用；
 * 新代码请直接用 --mu-* 和 --gold*。
 * Backdrops in assets/ are extracted from the game client (see
 * tools/extract-mu-art.py) and sit under heavy gradients, so they read as
 * texture and rim light rather than competing with the text. All in-game art
 * is © WebZen; the footer carries the attribution notice.
 */

:root {
  --bg: #070504;
  --bg-2: #0f0b08;
  --panel: rgba(24, 18, 12, 0.72);
  --panel-solid: #14100b;
  --line: rgba(216, 178, 106, 0.20);
  --line-strong: rgba(216, 178, 106, 0.42);
  --text: #e9dcc4;
  --muted: #bda98a;
  --dim: #8f7f65;
  --cyan: #e2bd79;   /* accent：鎏金 */
  --violet: #c08d4a; /* secondary：铜 */
  --pink: #cf7a58;   /* ember：余烬 */
  --gold: #d8b26a;
  --green: #7fd08a;
  --red: #e0786a;
  --grad: linear-gradient(120deg, #f7e6bb, #d8b26a 55%, #a9793a);
  --radius: 4px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.6);

  /* 顶栏沿用首页的「黑石 · 鎏金」气质 */
  --mu-gold: #d8b26a;
  --mu-gold-hi: #f7e6bb;
  --mu-gold-dim: #8d7040;
  --mu-parch-2: #c8b79b;
  --mu-parch-3: #9c8d76;
  --mu-line: rgba(216, 178, 106, 0.24);
  --mu-serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans SC", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  background:
    radial-gradient(1100px 660px at 12% -10%, rgba(126, 32, 24, 0.20), transparent 62%),
    radial-gradient(900px 640px at 88% 2%, rgba(150, 105, 40, 0.14), transparent 62%),
    radial-gradient(760px 540px at 50% 112%, rgba(120, 60, 30, 0.12), transparent 66%),
    var(--bg);
  background-attachment: fixed;
}

/* Parchment grain from the game's map art, faded to a whisper. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url("assets/map-parchment.jpg") center / cover no-repeat;
  opacity: .05;
  mix-blend-mode: soft-light;
}

/* A faint grid keeps the large dark areas from looking flat. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(216, 178, 106, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(216, 178, 106, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 50% 20%, #000 0%, transparent 78%);
  z-index: 0;
}

::selection { background: rgba(216, 178, 106, 0.30); color: #fff6e2; }

a { color: var(--cyan); text-decoration: none; }
a:hover { color: var(--mu-gold-hi); text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.25; }

/* 鎏金主题的标题用衬线体，正文保持无衬线以便扫读。 */
body:not(.admin) h1,
body:not(.admin) h2,
body:not(.admin) h3 {
  font-family: var(--mu-serif);
  font-weight: 700;
}
p { margin: 0 0 12px; }

.wrap {
  position: relative;
  z-index: 1;
  width: min(1180px, 92vw);
  margin: 0 auto;
}

.page { padding: 38px 0 80px; }

/* ------------------------------------------------------------------ topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: linear-gradient(180deg, rgba(10, 7, 5, 0.96), rgba(10, 7, 5, 0.84));
  border-bottom: 1px solid var(--mu-line);
  box-shadow: 0 1px 0 rgba(247, 230, 187, 0.05), 0 12px 34px rgba(0, 0, 0, 0.55);
}

.topbar-inner {
  width: min(1180px, 94vw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 26px;
  height: 68px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 38px;
  height: 38px;
  filter: sepia(0.85) saturate(2.4) hue-rotate(-14deg) brightness(1.02)
          drop-shadow(0 0 9px rgba(216, 178, 106, 0.45));
}

.brand-text { display: flex; flex-direction: column; line-height: 1.05; }

.brand-text b {
  font-family: var(--mu-serif);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 5px;
  background: linear-gradient(180deg, #f7e6bb 10%, #dcb46c 58%, #a9793a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-text em {
  font-style: normal;
  font-size: 10px;
  letter-spacing: 5px;
  color: var(--mu-gold-dim);
}

.nav {
  display: flex;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.nav a {
  position: relative;
  padding: 8px 13px;
  border-radius: 2px;
  color: var(--mu-parch-3);
  font-size: 14.5px;
  text-decoration: none;
  transition: color .18s, background .18s;
}

.nav a:hover { color: var(--mu-gold-hi); background: rgba(216, 178, 106, 0.08); text-decoration: none; }

.nav a.active {
  color: var(--mu-gold-hi);
  background: rgba(216, 178, 106, 0.10);
}

.nav a.active::after {
  content: "";
  position: absolute;
  left: 13px;
  right: 13px;
  bottom: 2px;
  height: 2px;
  border-radius: 0;
  background: linear-gradient(90deg, transparent, #d9b366 25%, #f3dda6 50%, #d9b366 75%, transparent);
  box-shadow: 0 0 12px rgba(216, 178, 106, 0.7);
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border: 1px solid var(--mu-line);
  border-radius: 2px;
  font-size: 12.5px;
  letter-spacing: 1px;
  color: var(--mu-parch-2);
  background: rgba(16, 12, 9, 0.82);
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--dim);
  box-shadow: 0 0 8px currentColor;
}

.status-pill.online { color: var(--green); border-color: rgba(127, 208, 138, 0.4); }
.status-pill.online::before { background: var(--green); }
.status-pill.offline { color: var(--red); border-color: rgba(224, 120, 106, 0.4); }
.status-pill.offline::before { background: var(--red); }

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(216, 178, 106, 0.3);
  border-radius: 2px;
  background: transparent;
  color: var(--mu-gold-hi);
  font-size: 18px;
  cursor: pointer;
}

/* ------------------------------------------------------------------ buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: 3px;
  border: 1px solid transparent;
  background: linear-gradient(180deg, #f3dda6, #d9b366 52%, #b98a3e);
  color: #1b1206;
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: .5px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 0 20px rgba(216, 178, 106, 0.22);
  transition: transform .15s, box-shadow .2s, filter .2s, opacity .2s;
}

.btn:hover { filter: brightness(1.08); box-shadow: 0 0 28px rgba(216, 178, 106, 0.4); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; }

.btn.ghost {
  background: rgba(20, 15, 11, 0.72);
  border-color: var(--line-strong);
  color: var(--text);
  font-weight: 500;
  box-shadow: none;
}

.btn.ghost:hover { border-color: var(--cyan); box-shadow: 0 0 18px rgba(216, 178, 106, 0.22); }

.btn.lg { padding: 13px 28px; font-size: 16px; border-radius: 4px; }

.btn.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 3px; }

.btn.danger {
  background: transparent;
  border-color: rgba(224, 120, 106, 0.45);
  color: var(--red);
  font-weight: 500;
  box-shadow: none;
}

/* -------------------------------------------------------------------- hero */

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(9, 6, 8, 0.38) 0%, rgba(10, 7, 6, 0.62) 52%, var(--bg) 100%),
    url("assets/hero-storm.jpg") center 42% / cover no-repeat;
}

/* Rim of forge-light along the bottom edge, where the storm's glow sits. */
.hero .wrap::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -84px;
  width: min(1200px, 120vw);
  height: 220px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 138, 60, 0.42), rgba(255, 88, 40, 0.14) 42%, transparent 72%);
  filter: blur(14px);
  pointer-events: none;
  z-index: 0;
}

.hero canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: .75;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 120%;
  background:
    conic-gradient(from 210deg at 50% 50%, transparent 0deg, rgba(216, 178, 106, 0.10) 60deg, transparent 120deg),
    conic-gradient(from 20deg at 60% 40%, transparent 0deg, rgba(143, 29, 29, 0.14) 70deg, transparent 150deg);
  filter: blur(40px);
  animation: aurora 22s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes aurora {
  from { transform: rotate(-4deg) scale(1); }
  to { transform: rotate(5deg) scale(1.08); }
}

.hero-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px;
  padding: 5px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-size: 12.5px;
  letter-spacing: 3px;
  color: var(--cyan);
  background: rgba(16, 12, 9, 0.6);
}

.hero-title {
  margin: 0;
  font-size: clamp(46px, 9vw, 96px);
  font-weight: 900;
  letter-spacing: 14px;
  text-indent: 14px;
  background: linear-gradient(180deg, #fff8e8 8%, #f7e6bb 38%, #d9b366 72%, #a9793a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 26px rgba(216, 178, 106, 0.4));
}

.hero-sub {
  margin: 16px auto 0;
  max-width: 640px;
  color: #d9c9ab;
  font-size: 16px;
  letter-spacing: 1px;
  text-shadow: 0 1px 12px rgba(3, 2, 2, 0.9);
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 34px;
}

.hero-stats {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 46px;
}

.stat {
  min-width: 132px;
  padding: 14px 20px;
  border: 1px solid rgba(216, 178, 106, 0.22);
  border-radius: 3px;
  background: rgba(20, 14, 10, 0.6);
  backdrop-filter: blur(6px);
}

.stat b {
  display: block;
  font-size: 24px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span { font-size: 12.5px; color: var(--muted); letter-spacing: 2px; }

/* ----------------------------------------------------------------- section */

.section { padding: 60px 0 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 26px;
  letter-spacing: 5px;
}

.section-head h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 22px;
  margin-right: 12px;
  border-radius: 1px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(216, 178, 106, 0.5);
  vertical-align: -2px;
}

.section-head p { margin: 4px 0 0; color: var(--muted); }

.section-head a { font-size: 14px; }

/* --------------------------------------------------------------- world map */

.world {
  display: grid;
  grid-template-columns: 1fr 1.02fr;
  gap: 46px;
  align-items: center;
  padding: 64px 0 6px;
}

.world-copy h2 {
  margin: 0 0 14px;
  font-size: 26px;
  letter-spacing: 5px;
}

.world-copy h2::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 22px;
  margin-right: 12px;
  border-radius: 1px;
  background: var(--grad);
  box-shadow: 0 0 14px rgba(216, 178, 106, 0.5);
  vertical-align: -2px;
}

.world-copy p { color: var(--muted); }

.world-copy ul {
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}

.world-copy li {
  position: relative;
  padding-left: 20px;
  color: var(--muted);
  font-size: 14px;
}

.world-copy li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 9px;
  width: 7px;
  height: 7px;
  transform: rotate(45deg);
  background: linear-gradient(135deg, #d8b26a, #a9793a);
  box-shadow: 0 0 8px rgba(216, 178, 106, 0.55);
}

.world-map {
  position: relative;
  justify-self: end;
  width: min(440px, 100%);
  margin: 0;
  aspect-ratio: 400 / 512;
  border-radius: 4px;
  border: 1px solid rgba(216, 178, 106, 0.32);
  box-shadow:
    0 34px 74px rgba(0, 0, 0, 0.72),
    0 0 46px rgba(216, 178, 106, 0.10);
  transform: rotate(-1.2deg);
  transition: transform .4s ease, box-shadow .4s ease;
}

.world-map:hover {
  transform: rotate(0deg) scale(1.012);
  box-shadow:
    0 34px 80px rgba(0, 0, 0, 0.78),
    0 0 60px rgba(216, 178, 106, 0.18);
}

.world-map img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 3px;
  filter: saturate(.92) brightness(.94) contrast(1.04);
}

/* Soft vignette so the parchment sits in the dark page instead of on it. */
.world-map::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background:
    radial-gradient(120% 90% at 50% 45%, transparent 52%, rgba(7, 5, 4, 0.72) 100%),
    linear-gradient(180deg, rgba(7, 5, 4, 0.25), transparent 22%, transparent 78%, rgba(7, 5, 4, 0.42));
  pointer-events: none;
}

/* --------------------------------------------------------------- art band */

.art-band {
  /* Full-bleed out of .wrap without changing the markup order. */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: 70px;
  border-block: 1px solid var(--line);
  background:
    radial-gradient(900px 300px at 50% 0%, rgba(126, 32, 24, 0.12), transparent 70%),
    linear-gradient(180deg, #070504, #0b0806 48%, #070504);
}

.art-band-inner {
  width: min(1180px, 92vw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  padding: 34px 0;
}

.art-tile {
  position: relative;
  margin: 0;
  height: 230px;
  overflow: hidden;
  border-radius: 2px;
  background: #12100b;
  isolation: isolate;
}

.art-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(.72) saturate(1.08) contrast(1.1);
  transition: transform .6s ease, filter .6s ease;
}

.art-tile:hover img { transform: scale(1.06); filter: brightness(.92) saturate(1.2) contrast(1.06); }

/* Each sheet holds four turntable views; frame a single pose per tile. */
.art-tile:nth-child(1) img { object-position: 35% center; }
.art-tile:nth-child(2) img { object-position: 36% center; }
.art-tile:nth-child(3) img { object-position: 35% center; }
.art-tile:nth-child(4) img { object-position: 50% center; }

.art-tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 5, 4, 0.05) 30%, rgba(5, 4, 3, 0.9) 100%);
  pointer-events: none;
}

.art-tile figcaption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 13px;
  z-index: 1;
  font-size: 13px;
  letter-spacing: 1px;
  color: #e3d6bf;
}

.art-tile figcaption small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--dim);
}

/* ------------------------------------------------------------------- cards */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 18px;
}

.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }

.card {
  position: relative;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(26, 20, 14, 0.9), rgba(16, 12, 9, 0.92)),
    url("assets/tex-magi.jpg") center / cover no-repeat;
  backdrop-filter: blur(8px);
  transition: transform .2s, border-color .2s, box-shadow .2s;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(216, 178, 106, 0.7), transparent);
  opacity: .6;
}

.card:hover {
  transform: translateY(-3px);
  border-color: var(--line-strong);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.55), 0 0 24px rgba(216, 178, 106, 0.10);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: 1px;
}

.card p { color: var(--muted); margin: 0; font-size: 14px; }

.card-icon {
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  display: grid;
  place-items: center;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(160deg, rgba(216, 178, 106, 0.16), rgba(160, 105, 50, 0.14));
}

.card-icon svg { width: 24px; height: 24px; }

/* ------------------------------------------------------------- class cards */

.class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }

.class-card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(28, 22, 16, 0.88), rgba(15, 11, 8, 0.92)),
    url("assets/tex-magi.jpg") center / cover no-repeat;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.class-card:hover {
  border-color: rgba(216, 178, 106, 0.55);
  box-shadow: 0 0 28px rgba(216, 178, 106, 0.14);
  transform: translateY(-2px);
}

.class-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }

.emblem {
  width: 44px;
  height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: radial-gradient(circle at 30% 25%, rgba(216, 178, 106, 0.28), rgba(22, 16, 11, 0.9));
}

.emblem svg { width: 24px; height: 24px; }

.class-head h3 { margin: 0; font-size: 17px; }
.class-head span { display: block; font-size: 12px; color: var(--dim); letter-spacing: 2px; }

.path {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 10px 0 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.path i { font-style: normal; color: var(--dim); }
.path b { color: var(--cyan); font-weight: 500; }

.class-card p { font-size: 13.5px; color: var(--muted); margin: 0; }

/* -------------------------------------------------------------------- news */

.news-list { display: grid; gap: 12px; }

.news-item {
  display: grid;
  grid-template-columns: 92px 1fr auto;
  gap: 18px;
  align-items: center;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  transition: border-color .2s, background .2s;
  cursor: pointer;
}

.news-item:hover { border-color: var(--line-strong); background: rgba(34, 26, 18, 0.72); text-decoration: none; }

.news-date { color: var(--dim); font-size: 13px; letter-spacing: 1px; }

.news-title { font-size: 15.5px; }

.news-summary { color: var(--muted); font-size: 13px; margin-top: 3px; }

.news-empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: 3px; }

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 2px;
  border: 1px solid var(--line-strong);
  font-size: 12px;
  color: var(--cyan);
  background: rgba(216, 178, 106, 0.07);
  white-space: nowrap;
}

.tag.gold { color: var(--gold); border-color: rgba(216, 178, 106, 0.4); background: rgba(216, 178, 106, 0.07); }
.tag.pink { color: var(--pink); border-color: rgba(207, 122, 88, 0.4); background: rgba(207, 122, 88, 0.07); }
.tag.green { color: var(--green); border-color: rgba(127, 208, 138, 0.4); background: rgba(127, 208, 138, 0.07); }
.tag.red { color: var(--red); border-color: rgba(224, 120, 106, 0.4); background: rgba(224, 120, 106, 0.07); }
.tag.muted { color: var(--muted); border-color: var(--line); background: transparent; }

/* -------------------------------------------------------------- article */

.article {
  max-width: 860px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(22, 17, 12, 0.94), rgba(12, 9, 6, 0.96)),
    url("assets/map-parchment.jpg") 78% 22% / 620px auto no-repeat;
  backdrop-filter: blur(8px);
}

.article h2 {
  margin: 34px 0 12px;
  font-size: 21px;
  letter-spacing: 2px;
  color: #f0e2c6;
}

.article h2:first-child { margin-top: 0; }

.article h3 { margin: 24px 0 8px; font-size: 16.5px; color: var(--cyan); }

.article p, .article li { color: var(--muted); }

.article ul, .article ol { padding-left: 22px; }

.article li { margin-bottom: 6px; }

.article strong { color: var(--text); }

.article code {
  padding: 1px 6px;
  border-radius: 2px;
  border: 1px solid var(--line);
  background: rgba(12, 9, 6, 0.8);
  font-family: Consolas, monospace;
  font-size: 13px;
  color: var(--gold);
}

.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 26px;
}

.toc a {
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 2px;
  font-size: 13px;
  color: var(--muted);
}

.toc a:hover { border-color: var(--cyan); color: var(--text); text-decoration: none; }

.note {
  margin: 18px 0;
  padding: 14px 16px;
  border-left: 3px solid var(--violet);
  border-radius: 0 3px 3px 0;
  background: rgba(192, 141, 74, 0.08);
  color: var(--muted);
  font-size: 14px;
}

/* ----------------------------------------------------------------- tables */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 3px; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }

th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); white-space: nowrap; }

th { color: var(--muted); font-weight: 500; background: rgba(12, 9, 6, 0.55); }

tbody tr:last-child td { border-bottom: 0; }

tbody tr:hover td { background: rgba(216, 178, 106, 0.05); }

td.mono, .mono { font-family: Consolas, monospace; }

.rate { font-weight: 700; color: var(--gold); }

/* ------------------------------------------------------------------- forms */

.form-card {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
}

.form-card.wide { width: min(860px, 100%); }

.form-title { margin: 0 0 6px; font-size: 22px; letter-spacing: 3px; }

.form-sub { margin: 0 0 26px; color: var(--muted); font-size: 13.5px; }

.field { display: block; margin-bottom: 16px; }

.field > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .5px;
}

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(10, 7, 5, 0.78);
  color: var(--text);
  font: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(216, 178, 106, 0.14);
}

input::placeholder, textarea::placeholder { color: #6f6250; }

textarea { resize: vertical; min-height: 88px; font-family: Consolas, monospace; font-size: 13px; }

select option { background: #0d0906; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.row.between { justify-content: space-between; }

.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 0 14px; }

.msg {
  display: none;
  margin-top: 18px;
  padding: 12px 14px;
  border-radius: 3px;
  border: 1px solid var(--line);
  background: rgba(10, 7, 5, 0.8);
  color: var(--muted);
  font-size: 14px;
  white-space: pre-wrap;
}

.msg.show { display: block; }
.msg.ok { border-color: rgba(127, 208, 138, 0.45); color: var(--green); background: rgba(127, 208, 138, 0.07); }
.msg.err { border-color: rgba(224, 120, 106, 0.45); color: var(--red); background: rgba(224, 120, 106, 0.07); }

.hint { color: var(--dim); font-size: 12.5px; }

/* ------------------------------------------------------------------- center */

.center-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.center-head h1 { margin: 0; font-size: 26px; letter-spacing: 4px; }

.center-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }

.coin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }

.coin {
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: linear-gradient(160deg, rgba(40, 31, 21, 0.85), rgba(15, 11, 8, 0.85));
}

.coin span { display: block; font-size: 12.5px; color: var(--muted); letter-spacing: 2px; }

.coin b { display: block; font-size: 28px; font-weight: 800; margin-top: 4px; }

.coin small { color: var(--gold); font-size: 12px; }

.coin.c b { color: var(--cyan); }
.coin.p b { color: var(--violet); }
.coin.g b { color: var(--gold); }

.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; border-bottom: 1px solid var(--line); }

.tab {
  padding: 10px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 14.5px;
  cursor: pointer;
}

.tab:hover { color: var(--text); }

.tab.active { color: var(--text); border-bottom-color: var(--cyan); }

.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadein .22s ease; }

@keyframes fadein { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.panel-box {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(22, 17, 12, 0.92), rgba(12, 9, 6, 0.94)),
    url("assets/panel-stone.jpg") center / cover no-repeat;
}

.package-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }

.package {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(18, 13, 9, 0.72);
  text-align: center;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}

.package:hover { border-color: var(--cyan); box-shadow: 0 0 24px rgba(216, 178, 106, 0.14); transform: translateY(-2px); }

.package h3 { margin: 0 0 4px; font-size: 17px; }

.package .amount {
  font-size: 26px;
  font-weight: 800;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin: 6px 0 2px;
}

.package .price { color: var(--gold); font-size: 16px; font-weight: 700; margin-bottom: 14px; }

.order-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: rgba(18, 13, 9, 0.65);
  margin-bottom: 12px;
}

.order-top { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; align-items: center; }

.order-no { font-family: Consolas, monospace; color: var(--cyan); font-size: 14px; }

.order-meta { color: var(--muted); font-size: 13px; margin-top: 4px; }

.order-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ footer */

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 80px;
  border-top: 1px solid var(--mu-line);
  background:
    linear-gradient(180deg, rgba(10, 7, 5, 0.72), rgba(5, 4, 3, 0.96)),
    url("assets/tex-magi.jpg") center / 420px repeat;
  background-blend-mode: multiply;
}

.footer-inner {
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding: 34px 0 40px;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 26px;
}

.footer-inner h4 {
  margin: 0 0 10px;
  font-family: var(--mu-serif);
  font-size: 14px;
  color: #e3c98e;
  letter-spacing: 4px;
}

.footer-inner p, .footer-inner a { color: var(--dim); font-size: 13px; }
.footer-inner a { display: block; margin-bottom: 6px; }
.footer-inner a:hover { color: var(--mu-gold-hi); }

.footer-bottom {
  border-top: 1px solid rgba(216, 178, 106, 0.12);
  padding: 14px 0 26px;
  text-align: center;
  color: #6e6152;
  font-size: 12.5px;
}

/* ------------------------------------------------------------------- toast */

.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 100;
  transform: translateX(-50%) translateY(20px);
  padding: 11px 20px;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: rgba(20, 15, 10, 0.96);
  color: var(--text);
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
}

.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { border-color: rgba(127, 208, 138, 0.5); color: var(--green); }
.toast.err { border-color: rgba(224, 120, 106, 0.5); color: var(--red); }

/* --------------------------------------------------------------- responsive */

@media (max-width: 1024px) {
  /* Tighten the bar so seven nav items still fit on one line. */
  .topbar-inner { gap: 16px; }
  .nav a { padding: 8px 9px; font-size: 14px; }
}

@media (max-width: 980px) {
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .world { grid-template-columns: 1fr; gap: 30px; padding-top: 52px; }
  .world-map { justify-self: center; width: min(420px, 100%); transform: none; }
}

@media (max-width: 820px) {
  .topbar-inner { height: auto; padding: 10px 0; flex-wrap: wrap; gap: 10px; }
  .topbar-right { margin-left: auto; }
  /* flex-basis, not width: the base rule is flex: 1 1 0%, so a width alone
     would let the open menu squeeze onto the brand's line. */
  .nav { order: 3; display: none; flex: 1 1 100%; justify-content: flex-start; padding-bottom: 8px; }
  .nav.open { display: flex; }
  .nav-toggle { display: block; }
  .status-pill { display: none; }
  .hero { padding: 66px 0 56px; }
  .hero-title { letter-spacing: 8px; text-indent: 8px; }
  .article { padding: 22px; background-size: 100% auto, 460px auto; }
  .form-card { padding: 22px; }
  .news-item { grid-template-columns: 1fr; gap: 6px; }
  .news-date { order: 2; }
  .news-item .tag { justify-self: start; }
  .art-band-inner { grid-template-columns: repeat(2, 1fr); padding: 26px 0; }
  .art-tile { height: 190px; }
}

@media (max-width: 560px) {
  .footer-inner { grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; }
  .stat { flex: 1 1 40%; min-width: 120px; }
  .art-band-inner { grid-template-columns: 1fr; }
  .art-tile { height: 170px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero canvas { display: none; }
}
