/* ============================================
   DragonSword: Awakening Wiki — Design System
   Dark fantasy anime theme
   ============================================ */

:root {
  /* Brand palette */
  --gold: #f5b942;
  --gold-bright: #ffd76a;
  --gold-deep: #c8891f;
  --ember: #ff7a3c;
  --dragon-red: #e84545;
  --azure: #4aa8ff;
  --arcane: #a06bff;
  --jade: #3ddc97;

  /* Surfaces */
  --bg-0: #0a0c14;
  --bg-1: #11141f;
  --bg-2: #181c2b;
  --bg-3: #212638;
  --bg-card: #161a28;
  --bg-card-hover: #1d2233;

  /* Text */
  --tx-0: #f4f6fb;
  --tx-1: #c3c9da;
  --tx-2: #8b92a8;
  --tx-3: #5c6379;

  /* Lines */
  --line: #262c40;
  --line-soft: #1c2133;

  /* Tier colors */
  --tier-ss: #ff5d73;
  --tier-s: #ffa53c;
  --tier-a: #ffd93c;
  --tier-b: #7bd88f;
  --tier-c: #4aa8ff;

  /* Radius / shadow */
  --r-sm: 8px;
  --r-md: 14px;
  --r-lg: 20px;
  --shadow: 0 8px 30px rgba(0,0,0,.45);
  --glow-gold: 0 0 24px rgba(245,185,66,.25);

  /* Layout */
  --maxw: 1240px;
  --nav-h: 64px;

  /* Fonts */
  --font-head: 'Cinzel', 'Noto Serif', Georgia, serif;
  --font-body: 'Inter', 'Noto Sans', system-ui, -apple-system, sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg-0);
  color: var(--tx-1);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

/* Ambient background glow */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(900px 500px at 80% -10%, rgba(160,107,255,.10), transparent 60%),
    radial-gradient(800px 500px at 10% 0%, rgba(245,185,66,.08), transparent 55%);
  pointer-events: none;
  z-index: 0;
}

a { color: var(--gold); text-decoration: none; transition: color .18s; }
a:hover { color: var(--gold-bright); }

img { max-width: 100%; display: block; }

h1,h2,h3,h4 { font-family: var(--font-head); color: var(--tx-0); line-height: 1.2; font-weight: 700; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ---------- Top Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  background: rgba(10,12,20,.82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 100%; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; color: var(--tx-0); white-space: nowrap; }
.brand .mark { font-size: 1.5rem; filter: drop-shadow(0 0 8px rgba(245,185,66,.5)); }
.brand b { color: var(--gold); }
.nav-links { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav-links a {
  color: var(--tx-1); padding: 8px 13px; border-radius: var(--r-sm);
  font-size: .92rem; font-weight: 500;
}
.nav-links a:hover { color: var(--tx-0); background: var(--bg-2); }
.nav-links a.active { color: var(--gold); background: var(--bg-2); }
.lang-switch { display: flex; gap: 2px; margin-left: 8px; padding-left: 12px; border-left: 1px solid var(--line); }
.lang-switch a { font-size: .8rem; padding: 5px 8px; color: var(--tx-2); border-radius: 6px; }
.lang-switch a.active, .lang-switch a:hover { color: var(--gold); background: var(--bg-2); }
.nav-toggle { display: none; background: none; border: none; color: var(--tx-0); font-size: 1.5rem; cursor: pointer; margin-left: auto; }

/* ---------- Hero ---------- */
.hero {
  position: relative; padding: 96px 0 72px; text-align: center;
  overflow: hidden;
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(600px 300px at 50% 20%, rgba(245,185,66,.12), transparent 70%);
  pointer-events: none;
}
.hero .eyebrow {
  display: inline-block; font-size: .8rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line); padding: 6px 16px; border-radius: 999px;
  background: var(--bg-1); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(2.2rem, 6vw, 4rem); margin-bottom: 18px; }
.hero h1 .accent { color: var(--gold); text-shadow: var(--glow-gold); }
.hero p.lead { font-size: 1.18rem; color: var(--tx-1); max-width: 680px; margin: 0 auto 34px; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--r-sm); font-weight: 600; font-size: .98rem;
  cursor: pointer; border: 1px solid transparent; transition: all .2s;
}
.btn-primary { background: linear-gradient(135deg, var(--gold), var(--gold-deep)); color: #1a1204; box-shadow: var(--glow-gold); }
.btn-primary:hover { transform: translateY(-2px); color: #1a1204; box-shadow: 0 0 34px rgba(245,185,66,.4); }
.btn-ghost { background: var(--bg-2); color: var(--tx-0); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Sections ---------- */
.section { padding: 64px 0; }
.section-head { margin-bottom: 38px; }
.section-head .kicker { color: var(--gold); font-size: .82rem; letter-spacing: .15em; text-transform: uppercase; font-weight: 600; }
.section-head h2 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin-top: 8px; }
.section-head p { color: var(--tx-2); margin-top: 10px; max-width: 640px; }

/* ---------- Cards / Grids ---------- */
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 24px; transition: all .22s; position: relative; overflow: hidden;
}
.card:hover { background: var(--bg-card-hover); border-color: var(--gold-deep); transform: translateY(-3px); box-shadow: var(--shadow); }
.card .icon { font-size: 1.9rem; margin-bottom: 14px; }
.card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.card p { color: var(--tx-2); font-size: .94rem; }
.card .count { color: var(--gold); font-size: .82rem; font-weight: 600; margin-top: 12px; display: block; }

/* Hero (character) card */
.hero-card { text-align: center; padding: 20px 16px; }
.hero-card .avatar {
  width: 88px; height: 88px; border-radius: 50%; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--bg-3), var(--bg-1));
  border: 2px solid var(--line); display: flex; align-items: center; justify-content: center;
  font-size: 2rem; font-family: var(--font-head); color: var(--gold);
}
.hero-card .role { display: inline-block; font-size: .72rem; padding: 3px 10px; border-radius: 999px; margin-top: 8px; font-weight: 600; }
.role-dps { background: rgba(232,69,69,.15); color: #ff7a7a; }
.role-support { background: rgba(74,168,255,.15); color: var(--azure); }
.role-tank { background: rgba(61,220,151,.15); color: var(--jade); }

/* Hero card (roster grid) */
.hero-card { display: flex; align-items: center; gap: 14px; padding: 16px 18px; text-align: left; }

/* Element-themed avatar badge (shared: grid + detail) */
.hero-avatar, .hero-avatar-lg {
  position: relative; border-radius: 50%; flex-shrink: 0;
  background: radial-gradient(circle at 35% 30%, var(--e1, #8a919e), var(--e2, #565d68) 75%);
  border: 2px solid color-mix(in srgb, var(--e1, #8a919e) 60%, transparent);
  display: flex; align-items: center; justify-content: center;
  color: rgba(10,12,18,.85); overflow: hidden;
  transition: transform .22s cubic-bezier(.34,1.56,.64,1), box-shadow .22s;
}
.hero-avatar { width: 52px; height: 52px; }
.hero-avatar svg { width: 26px; height: 26px; position: relative; z-index: 1; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.hero-avatar .av-initial {
  position: absolute; bottom: 2px; right: 4px; z-index: 2;
  font-size: .62rem; font-family: var(--font-head); font-weight: 800;
  color: rgba(255,255,255,.95); text-shadow: 0 1px 3px rgba(0,0,0,.7);
  line-height: 1;
}
.hero-card:hover .hero-avatar {
  transform: scale(1.12) rotate(-4deg);
  box-shadow: 0 0 18px 3px var(--eglow, rgba(138,145,158,.3));
}
.hero-info h3 { font-size: 1.05rem; margin: 0 0 2px; }
.hero-info .role { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.status-tag { margin-left: auto; font-size: .72rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(245,185,66,.12); color: var(--gold-bright); white-space: nowrap; }
.status-tag.unverified { background: rgba(255,255,255,.06); color: var(--tx-3); }
.verify-dot { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--tx-3); opacity: .6; }

/* Filter bar */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.filter { background: var(--bg-1); border: 1px solid var(--line); color: var(--tx-2); padding: 8px 20px; border-radius: 999px; cursor: pointer; font-size: .88rem; font-weight: 600; transition: all .18s; }
.filter:hover { border-color: var(--gold-deep); color: var(--tx-1); }
.filter.active { background: var(--gold); color: var(--bg-0); border-color: var(--gold); }

/* Guide card */
.guide-card { display: flex; flex-direction: column; }
.guide-card .tag { display: inline-block; align-self: flex-start; font-size: .72rem; color: var(--gold); background: rgba(245,185,66,.1); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; font-weight: 600; }
.guide-card h3 { font-size: 1.1rem; }
.guide-card .count { margin-top: auto; padding-top: 12px; }

/* Callout */
.callout { border-radius: var(--r-md); padding: 16px 20px; margin: 0 0 28px; display: flex; gap: 14px; align-items: flex-start; border: 1px solid; }
.callout .t { font-weight: 700; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0; }
.callout.tip { background: rgba(61,220,151,.08); border-color: rgba(61,220,151,.3); }
.callout.tip .t { color: var(--jade); }
.callout.warn { background: rgba(255,165,60,.08); border-color: rgba(255,165,60,.3); }
.callout.warn .t { color: var(--tier-s); }

/* Hero detail */
.hero-detail-head { display: flex; align-items: center; gap: 22px; margin-bottom: 30px; }
.hero-avatar-lg {
  width: 96px; height: 96px; border-width: 3px;
  box-shadow: 0 0 24px 4px var(--eglow, rgba(138,145,158,.3));
}
.hero-avatar-lg svg { width: 44px; height: 44px; position: relative; z-index: 1; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.hero-avatar-lg .av-initial {
  position: absolute; bottom: 4px; right: 8px; z-index: 2;
  font-size: 1rem; font-family: var(--font-head); font-weight: 800;
  color: rgba(255,255,255,.95); text-shadow: 0 1px 4px rgba(0,0,0,.7);
  line-height: 1;
}
.hero-detail-head .kicker { color: var(--gold); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; font-weight: 600; }
.hero-meta { display: flex; gap: 10px; align-items: center; margin-top: 10px; }
.role-pill { font-size: .75rem; font-weight: 700; padding: 4px 14px; border-radius: 999px; text-transform: uppercase; letter-spacing: .05em; }
.split { display: grid; grid-template-columns: 1fr; gap: 32px; }

/* Tier list */
.tier-row { display: flex; gap: 18px; align-items: stretch; margin-bottom: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.tier-badge { display: flex; align-items: center; justify-content: center; min-width: 76px; font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; }
.tier-badge.tier-ss { background: rgba(255,93,115,.16); color: var(--tier-ss); }
.tier-badge.tier-s { background: rgba(255,165,60,.16); color: var(--tier-s); }
.tier-badge.tier-a { background: rgba(255,217,60,.16); color: var(--tier-a); }
.tier-badge.tier-b { background: rgba(123,216,143,.16); color: var(--tier-b); }
.tier-badge.tier-c { background: rgba(74,168,255,.16); color: var(--tier-c); }
.tier-body { padding: 16px 20px; flex: 1; }
.tier-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.tier-chip { background: var(--bg-3); border: 1px solid var(--line); color: var(--tx-1); padding: 6px 14px; border-radius: 8px; font-size: .88rem; font-weight: 600; transition: all .18s; }
.tier-chip:hover { border-color: var(--gold-deep); color: var(--gold-bright); transform: translateY(-2px); }
.tier-note { color: var(--tx-3); font-size: .82rem; margin-top: 12px; }
@media (max-width: 640px) {
  .tier-row { flex-direction: column; }
  .tier-badge { min-width: 0; padding: 10px; }
  .hero-detail-head { flex-direction: column; text-align: center; }
}

/* ---------- Team Builder ---------- */
.tb-slots { display: flex; align-items: stretch; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.tb-slot {
  flex: 1; min-width: 150px; min-height: 96px; border: 2px dashed var(--line);
  border-radius: var(--r-md); display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; position: relative; background: var(--bg-1); transition: all .2s; padding: 12px;
}
.tb-slot.filled { border-style: solid; border-color: var(--gold-deep); background: var(--bg-card); }
.slot-empty { color: var(--tx-3); font-weight: 700; font-size: .9rem; }
.slot-hint { color: var(--tx-3); font-size: .75rem; opacity: .7; }
.slot-avatar { width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(135deg, var(--bg-3), var(--bg-1)); border: 2px solid var(--gold-deep); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 1.2rem; color: var(--gold); }
.slot-name { font-weight: 700; font-size: .95rem; }
.slot-applies { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.slot-remove { position: absolute; top: 6px; right: 8px; background: none; border: none; color: var(--tx-3); cursor: pointer; font-size: .85rem; padding: 2px 6px; border-radius: 4px; }
.slot-remove:hover { color: var(--red); background: rgba(232,69,69,.12); }
.tb-arrow { display: flex; align-items: center; color: var(--gold); font-size: 1.4rem; font-weight: 700; }
.tb-score { min-width: 120px; border-radius: var(--r-md); background: var(--bg-card); border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 12px; }
.score-num { font-family: var(--font-head); font-size: 2.2rem; font-weight: 800; line-height: 1; color: var(--tx-3); transition: color .3s; }
.score-num.great { color: var(--jade); }
.score-num.ok { color: var(--gold); }
.score-num.low { color: var(--red); }
.score-lbl { color: var(--tx-2); font-size: .78rem; margin-top: 6px; text-align: center; }

.tb-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 28px; align-items: start; }
.tb-subhead { font-family: var(--font-head); font-size: 1.05rem; color: var(--gold-bright); margin-bottom: 16px; letter-spacing: .04em; }
.tb-roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.pick {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 12px; cursor: pointer; text-align: left; display: flex; flex-direction: column; gap: 8px;
  transition: all .18s; color: var(--tx-1);
}
.pick:hover { border-color: var(--gold-deep); transform: translateY(-2px); box-shadow: var(--shadow); }
.pick.in-team { border-color: var(--gold); background: rgba(245,185,66,.08); }
.pick-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--bg-3), var(--bg-1)); border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); color: var(--gold); }
.pick.in-team .pick-avatar { border-color: var(--gold); }
.pick-name { font-weight: 700; font-size: .92rem; }
.pick-applies { display: flex; gap: 4px; flex-wrap: wrap; }
.st { font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid; white-space: nowrap; }
.st.dim { color: var(--tx-3); border-color: var(--line); background: transparent; }

.tb-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; position: sticky; top: 90px; }
.relay-hint { color: var(--tx-3); font-size: .9rem; }
.relay-link { display: flex; gap: 12px; padding: 12px 14px; border-radius: var(--r-sm); margin-bottom: 10px; border-left: 3px solid; }
.relay-link.good { background: rgba(61,220,151,.07); border-color: var(--jade); }
.relay-link.bad { background: rgba(232,69,69,.07); border-color: var(--red); }
.relay-link.tbd { background: rgba(255,255,255,.04); border-color: var(--tx-3); }
.relay-icon { font-size: 1.1rem; flex-shrink: 0; }
.relay-link strong { font-size: .9rem; }
.relay-link p { color: var(--tx-2); font-size: .82rem; margin-top: 5px; }
.cov { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .tb-grid { grid-template-columns: 1fr; }
  .tb-panel { position: static; }
  .tb-arrow { display: none; }
}

/* ---------- Interactive Map ---------- */
.map-shell { display: grid; grid-template-columns: 1fr 300px; gap: 20px; align-items: start; }
.map-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.map-select { background: var(--bg-1); border: 1px solid var(--line); color: var(--tx-1); padding: 8px 14px; border-radius: var(--r-sm); font-size: .88rem; cursor: pointer; }
.map-count { color: var(--tx-3); font-size: .82rem; margin-left: auto; }
.map-zoom { display: flex; gap: 6px; }
.map-zoom button { width: 34px; height: 34px; background: var(--bg-1); border: 1px solid var(--line); color: var(--tx-1); border-radius: var(--r-sm); cursor: pointer; font-size: 1.1rem; transition: all .15s; }
.map-zoom button:hover { border-color: var(--gold-deep); color: var(--gold); }
.map-canvas { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: #0b0e1a; }
#map-svg { width: 100%; height: auto; display: block; cursor: grab; }
.region-label { font-family: var(--font-head); font-size: 15px; opacity: .55; letter-spacing: .05em; pointer-events: none; }
.poi { cursor: pointer; }
.poi-dot { stroke: #0b0e1a; stroke-width: 2; transition: all .15s; }
.poi:hover .poi-dot { stroke: var(--gold); stroke-width: 3; }
.poi-icon { font-size: 13px; pointer-events: none; }
.poi.selected .poi-dot { stroke: var(--gold); stroke-width: 3.5; filter: drop-shadow(0 0 6px var(--gold)); }

.map-side { display: flex; flex-direction: column; gap: 16px; }
.legend { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.legend-btn { display: flex; align-items: center; gap: 10px; background: none; border: 1px solid transparent; color: var(--tx-1); padding: 7px 10px; border-radius: var(--r-sm); cursor: pointer; font-size: .88rem; text-align: left; transition: all .15s; }
.legend-btn:hover { background: var(--bg-1); }
.legend-btn:not(.active) { opacity: .4; }
.legend-dot { width: 24px; height: 24px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: .8rem; flex-shrink: 0; }
.poi-detail { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px; }
.pd-head { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.pd-icon { width: 40px; height: 40px; border-radius: 10px; border: 1px solid; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }
.pd-type { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.pd-head h3 { font-size: 1.1rem; margin-top: 2px; }
.pd-region { color: var(--tx-3); font-size: .82rem; margin-bottom: 10px; }
.pd-desc { color: var(--tx-2); font-size: .9rem; line-height: 1.6; }
@media (max-width: 900px) {
  .map-shell { grid-template-columns: 1fr; }
}

/* ---------- Guides & Articles ---------- */
.guide-list { display: flex; flex-direction: column; gap: 14px; }
.guide-card { display: flex; align-items: center; gap: 18px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; text-decoration: none; color: inherit; transition: all .18s; }
.guide-card:hover { border-color: var(--gold-deep); transform: translateX(4px); background: var(--bg-1); }
.gc-icon { font-size: 1.8rem; width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: var(--bg-1); border: 1px solid var(--line); border-radius: 12px; flex-shrink: 0; }
.gc-cat { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--gold); }
.guide-card h3 { font-size: 1.15rem; margin: 4px 0 6px; }
.guide-card p { color: var(--tx-2); font-size: .9rem; line-height: 1.55; }
.gc-read { color: var(--tx-3); font-size: .8rem; white-space: nowrap; margin-left: auto; flex-shrink: 0; }
@media (max-width: 640px) { .gc-read { display: none; } .guide-card { flex-wrap: wrap; } }

.article { max-width: 800px; padding-top: 24px; padding-bottom: 60px; }
.article-head { margin-bottom: 32px; }
.article-head h1 { font-family: var(--font-head); font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.2; margin: 12px 0 14px; }
.article-head .lead { color: var(--tx-2); font-size: 1.05rem; line-height: 1.6; }
.article-body h2 { font-family: var(--font-head); font-size: 1.5rem; margin: 40px 0 16px; color: var(--gold); }
.article-body p { color: var(--tx-2); line-height: 1.75; margin-bottom: 16px; }
.article-body ul, .article-body ol { color: var(--tx-2); line-height: 1.75; margin: 0 0 18px 22px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--azure); text-decoration: none; border-bottom: 1px solid rgba(74,168,255,.3); }
.article-body a:hover { border-bottom-color: var(--azure); }
.article-body strong { color: var(--tx-1); }
.article-body em { color: var(--gold); font-style: normal; }
.article-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); }
.article-nav a { color: var(--tx-2); text-decoration: none; font-size: .92rem; transition: color .15s; }
.article-nav a:hover { color: var(--gold); }

/* ---------- Patch list ---------- */
.patch-list { display: flex; flex-direction: column; gap: 12px; }
.patch-row { display: grid; grid-template-columns: 110px 130px 1fr 30px; align-items: center; gap: 18px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 18px 22px; text-decoration: none; color: inherit; transition: all .18s; }
.patch-row:hover { border-color: var(--gold-deep); transform: translateX(4px); }
.pr-ver { font-family: var(--font-head); font-size: 1.25rem; font-weight: 700; color: var(--gold); }
.patch-tag { display: inline-block; font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; background: rgba(61,220,151,.15); color: var(--jade); border: 1px solid rgba(61,220,151,.3); border-radius: 4px; padding: 2px 7px; margin-left: 8px; vertical-align: middle; }
.pr-date { color: var(--tx-3); font-size: .85rem; }
.pr-sum { color: var(--tx-2); font-size: .9rem; line-height: 1.5; }
.pr-arrow { color: var(--tx-3); font-size: 1.1rem; }
.patch-block h3 { font-family: var(--font-head); font-size: 1.15rem; color: var(--azure); margin: 28px 0 12px; }
@media (max-width: 760px) { .patch-row { grid-template-columns: 1fr 30px; } .pr-date, .pr-sum { grid-column: 1 / -1; } }

/* ---------- World list ---------- */
.world-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.world-card { display: flex; align-items: center; gap: 16px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 20px 22px; text-decoration: none; color: inherit; transition: all .18s; }
.world-card:hover { border-color: var(--gold-deep); transform: translateY(-3px); }
.wc-icon { font-size: 2rem; width: 60px; height: 60px; display: flex; align-items: center; justify-content: center; background: var(--bg-1); border: 1px solid var(--line); border-radius: 14px; flex-shrink: 0; }
.world-card h3 { font-size: 1.1rem; margin-bottom: 6px; }
.world-card p { color: var(--tx-2); font-size: .88rem; line-height: 1.55; }
.wc-arrow { color: var(--tx-3); margin-left: auto; flex-shrink: 0; }

/* ---------- Search ---------- */
.search-wrap { max-width: 820px; }
.search-box { display: flex; align-items: center; gap: 12px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 6px 18px; margin-bottom: 14px; transition: border-color .15s; }
.search-box:focus-within { border-color: var(--gold-deep); }
.sb-icon { font-size: 1.1rem; opacity: .7; }
#search-input { flex: 1; background: none; border: none; outline: none; color: var(--tx-1); font-size: 1.05rem; padding: 14px 0; }
#search-input::placeholder { color: var(--tx-3); }
.search-count { color: var(--tx-3); font-size: .85rem; margin-bottom: 16px; min-height: 1.2em; }
.search-results { display: flex; flex-direction: column; gap: 10px; }
.search-item { display: flex; align-items: center; gap: 14px; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 18px; text-decoration: none; color: inherit; transition: all .15s; }
.search-item:hover { border-color: var(--gold-deep); transform: translateX(4px); }
.si-cat { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--gold); background: rgba(245,185,66,.1); border: 1px solid rgba(245,185,66,.25); border-radius: 4px; padding: 3px 8px; flex-shrink: 0; }
.si-title { font-size: .98rem; }
.si-arrow { margin-left: auto; color: var(--tx-3); }
.search-empty { color: var(--tx-3); padding: 30px 0; text-align: center; }

/* ---------- Tier badges ---------- */
.tier { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; font-weight: 800; font-family: var(--font-head); font-size: .95rem; }
.tier-ss { background: rgba(255,93,115,.18); color: var(--tier-ss); }
.tier-s { background: rgba(255,165,60,.18); color: var(--tier-s); }
.tier-a { background: rgba(255,217,60,.18); color: var(--tier-a); }
.tier-b { background: rgba(123,216,143,.18); color: var(--tier-b); }
.tier-c { background: rgba(74,168,255,.18); color: var(--tier-c); }

/* ---------- Stat strip ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--bg-1); border: 1px solid var(--line); border-radius: var(--r-md); padding: 22px; text-align: center; }
.stat .num { font-family: var(--font-head); font-size: 2rem; color: var(--gold); font-weight: 700; }
.stat .lbl { color: var(--tx-2); font-size: .85rem; margin-top: 4px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 13px 16px; text-align: left; border-bottom: 1px solid var(--line-soft); }
th { background: var(--bg-2); color: var(--tx-0); font-family: var(--font-head); font-weight: 600; font-size: .85rem; letter-spacing: .03em; }
tbody tr:hover { background: var(--bg-card-hover); }
td { color: var(--tx-1); }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; gap: 8px; align-items: center; font-size: .85rem; color: var(--tx-3); padding: 20px 0; flex-wrap: wrap; }
.crumbs a { color: var(--tx-2); }
.crumbs a:hover { color: var(--gold); }
.crumbs .sep { opacity: .5; }

/* ---------- Article ---------- */
.article { max-width: 820px; margin: 0 auto; }
.article h1 { font-size: clamp(1.9rem, 5vw, 2.8rem); margin-bottom: 14px; }
.article .meta { color: var(--tx-3); font-size: .88rem; margin-bottom: 30px; display: flex; gap: 16px; flex-wrap: wrap; }
.article h2 { font-size: 1.6rem; margin: 40px 0 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.article h3 { font-size: 1.25rem; margin: 28px 0 12px; color: var(--gold-bright); }
.article p { margin-bottom: 16px; }
.article ul, .article ol { margin: 0 0 18px 22px; }
.article li { margin-bottom: 8px; }
.article blockquote { border-left: 3px solid var(--gold); background: var(--bg-1); padding: 14px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 20px 0; color: var(--tx-1); }
.article code { background: var(--bg-3); padding: 2px 7px; border-radius: 5px; font-size: .88em; color: var(--gold-bright); }

.callout { border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--bg-1); border-radius: var(--r-sm); padding: 16px 20px; margin: 22px 0; }
.callout.tip { border-left-color: var(--jade); }
.callout.warn { border-left-color: var(--ember); }
.callout .t { font-weight: 700; color: var(--tx-0); margin-bottom: 6px; display: block; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line-soft); background: var(--bg-1); padding: 52px 0 30px; margin-top: 60px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 36px; }
.footer h4 { font-size: .95rem; margin-bottom: 16px; color: var(--tx-0); }
.footer ul { list-style: none; }
.footer li { margin-bottom: 9px; }
.footer a { color: var(--tx-2); font-size: .9rem; }
.footer a:hover { color: var(--gold); }
.footer .about p { color: var(--tx-2); font-size: .9rem; margin-top: 12px; max-width: 320px; }
.footer-bottom { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line-soft); color: var(--tx-3); font-size: .82rem; text-align: center; line-height: 1.7; }
.disclaimer { font-size: .78rem; color: var(--tx-3); max-width: 760px; margin: 14px auto 0; }

/* ---------- Search box ---------- */
.search-box { position: relative; max-width: 460px; margin: 0 auto; }
.search-box input {
  width: 100%; padding: 14px 18px 14px 46px; border-radius: var(--r-md);
  background: var(--bg-1); border: 1px solid var(--line); color: var(--tx-0); font-size: 1rem;
}
.search-box input:focus { outline: none; border-color: var(--gold); box-shadow: var(--glow-gold); }
.search-box .ico { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--tx-3); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; position: absolute; top: var(--nav-h); left: 0; right: 0; flex-direction: column; background: var(--bg-1); border-bottom: 1px solid var(--line); padding: 12px; gap: 2px; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px; }
  .lang-switch { border-left: none; padding-left: 0; margin-left: 0; flex-wrap: wrap; }
  .nav-toggle { display: block; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero { padding: 64px 0 48px; }
}

/* ============================================
   Homepage — wiki opening + asymmetric layout
   ============================================ */
.wiki-open { padding: 56px 0 40px; position: relative; }
.open-grid { display: grid; grid-template-columns: 1.55fr .95fr; gap: 44px; align-items: center; }
.open-left .eyebrow {
  display: inline-block; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); border: 1px solid var(--line); padding: 6px 15px; border-radius: 999px;
  background: var(--bg-1); margin-bottom: 20px;
}
.open-left h1 { font-size: clamp(2.4rem, 6vw, 4.2rem); line-height: 1.02; margin-bottom: 18px; }
.open-left h1 .accent { color: var(--gold); text-shadow: var(--glow-gold); }
.open-left h1 em { font-style: normal; color: var(--tx-2); font-size: .5em; vertical-align: middle; letter-spacing: .1em; }
.open-left .lead { font-size: 1.08rem; color: var(--tx-1); max-width: 560px; margin-bottom: 26px; }
.quick-tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }
.quick-tags a {
  font-size: .82rem; padding: 7px 14px; border-radius: 999px; background: var(--bg-2);
  border: 1px solid var(--line); color: var(--tx-1); font-weight: 500;
}
.quick-tags a:hover { border-color: var(--gold); color: var(--gold); }

/* Live data panel */
.data-panel { background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px 24px; box-shadow: var(--shadow); }
.data-head { display: flex; align-items: center; gap: 9px; font-family: var(--font-head); font-weight: 700; color: var(--tx-0); font-size: 1.05rem; margin-bottom: 16px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--jade); box-shadow: 0 0 10px var(--jade); animation: pulse 2s infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.data-row { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; font-size: .92rem; }
.data-row span { color: var(--tx-2); }
.data-row b { color: var(--tx-0); font-weight: 600; }
.data-row b.pos { color: var(--jade); }
.data-row b.gold { color: var(--gold); }
.data-steam { display: block; text-align: center; margin-top: 16px; padding: 11px; border-radius: var(--r-sm); background: var(--bg-2); border: 1px solid var(--line); color: var(--tx-1); font-weight: 600; font-size: .9rem; }
.data-steam:hover { border-color: var(--gold); color: var(--gold); }

/* Category grid — asymmetric feature layout */
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1fr; gap: 20px; }
.cat { display: flex; flex-direction: column; }
.cat .icon { font-size: 2.2rem; }
.cat-heroes { grid-column: span 2; background: linear-gradient(135deg, var(--bg-card), rgba(232,69,69,.06)); }
.cat-map { grid-row: span 2; background: linear-gradient(160deg, var(--bg-card), rgba(160,107,255,.08)); }
.cat .count { margin-top: auto; }

/* Split section (latest + patches) */
.section.alt { background: var(--bg-1); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.split { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.latest-list { display: flex; flex-direction: column; gap: 12px; }
.latest { display: block; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 20px; transition: all .2s; }
.latest:hover { border-color: var(--gold-deep); transform: translateX(4px); background: var(--bg-card-hover); }
.latest .tag { display: inline-block; font-size: .72rem; color: var(--gold); background: rgba(245,185,66,.1); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px; font-weight: 600; }
.latest h4 { font-family: var(--font-body); font-size: 1.02rem; color: var(--tx-0); font-weight: 600; }
.latest .date { font-size: .8rem; color: var(--tx-3); }
.patch-feed { display: flex; flex-direction: column; gap: 12px; }
.patch-item { display: flex; gap: 16px; align-items: flex-start; background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--r-md); padding: 16px 18px; transition: all .2s; }
.patch-item:hover { border-color: var(--gold-deep); background: var(--bg-card-hover); }
.patch-item .ver { font-family: var(--font-head); font-weight: 700; color: var(--gold); background: var(--bg-2); padding: 6px 10px; border-radius: 8px; font-size: .85rem; white-space: nowrap; }
.patch-item h4 { font-family: var(--font-body); font-size: .98rem; color: var(--tx-0); font-weight: 600; }
.patch-item p { font-size: .85rem; color: var(--tx-2); margin-top: 3px; }

/* Tools band */
.tools-band { display: grid; grid-template-columns: 1.4fr 1fr; gap: 40px; align-items: center; background: linear-gradient(135deg, var(--bg-card), rgba(160,107,255,.06)); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 44px; }
.tools-band h2 { font-size: clamp(1.6rem, 4vw, 2.3rem); margin: 8px 0 14px; }
.tools-band p { color: var(--tx-2); }
.tools-cta { display: flex; flex-direction: column; gap: 12px; }
.tools-cta .btn { justify-content: center; }

@media (max-width: 900px) {
  .open-grid { grid-template-columns: 1fr; gap: 32px; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-heroes { grid-column: span 2; }
  .cat-map { grid-row: span 1; }
  .split { grid-template-columns: 1fr; gap: 36px; }
  .tools-band { grid-template-columns: 1fr; padding: 32px; }
}
@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr; }
  .cat-heroes { grid-column: span 1; }
}

/* ============================================
   Visual Enhancement — Screenshot Gallery
   & Image-rich Cards  (2026-07-29)
   ============================================ */

/* --- Hero banner background image --- */
.wiki-open.has-bg {
  position: relative;
  overflow: hidden;
}
.wiki-open.has-bg::before {
  content: '';
  position: absolute; inset: 0;
  background: url('/assets/img/shots/ss01.jpg') center/cover no-repeat;
  opacity: .22;
  z-index: 0;
  pointer-events: none;
}
.wiki-open.has-bg::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,20,.55) 0%, rgba(10,12,20,.92) 100%);
  z-index: 0;
  pointer-events: none;
}
.wiki-open.has-bg .wrap { position: relative; z-index: 1; }

/* --- Screenshot Gallery --- */
.gallery-section { padding: 64px 0; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 16/9;
  cursor: pointer;
  transition: all .25s;
}
.gallery-item:hover {
  border-color: var(--gold-deep);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .35s;
}
.gallery-item:hover img { transform: scale(1.06); }
.gallery-item .g-cap {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 28px 14px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  font-size: .78rem; color: var(--tx-1);
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
}
.gallery-item:hover .g-cap { opacity: 1; }
/* Featured (wide) items span 2 cols */
.gallery-item.wide { grid-column: span 2; }

/* Lightbox (CSS-only via :target) */
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9999;
  background: rgba(0,0,0,.92);
  align-items: center; justify-content: center;
  flex-direction: column; gap: 12px;
}
.lightbox-overlay:target { display: flex; }
.lightbox-overlay img {
  max-width: 92vw; max-height: 82vh;
  border-radius: var(--r-md);
  box-shadow: 0 0 60px rgba(0,0,0,.6);
}
.lightbox-overlay .lb-cap { color: var(--tx-1); font-size: .9rem; }
.lightbox-overlay .lb-close {
  position: absolute; top: 18px; right: 24px;
  color: var(--tx-1); font-size: 2rem; text-decoration: none;
  line-height: 1;
}
.lightbox-overlay .lb-close:hover { color: var(--gold); }

/* --- Image-enhanced category cards --- */
.cat-img {
  position: relative;
  overflow: hidden;
}
.cat-img .cat-bg {
  position: absolute; inset: 0;
  object-fit: cover; width: 100%; height: 100%;
  opacity: .18;
  transition: opacity .3s, transform .4s;
  z-index: 0;
}
.cat-img:hover .cat-bg { opacity: .3; transform: scale(1.05); }
.cat-img > *:not(.cat-bg) { position: relative; z-index: 1; }

/* --- World card with scene thumbnail --- */
.world-card .wc-thumb {
  width: 80px; height: 56px; border-radius: 10px;
  object-fit: cover; flex-shrink: 0;
  border: 1px solid var(--line);
}

/* --- Responsive gallery --- */
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item.wide { grid-column: span 2; }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-item.wide { grid-column: span 1; }
}
