/* =========================================================
   Account Dossier — Genshin dark + gold
   ========================================================= */
:root {
  --bg: #070b16;
  --bg2: #0a1120;
  --panel: rgba(17, 27, 48, .66);
  --panel-solid: #101a30;
  --line: rgba(159, 216, 255, .13);
  --line-strong: rgba(159, 216, 255, .24);
  --gold: #e2c07d;
  --gold-2: #b88f4b;
  --gold-soft: rgba(226, 192, 125, .14);
  --ice: #9fd8ff;
  --ice-2: #5fb0ec;
  --text: #eaf1ff;
  --muted: #93a1c0;
  --muted-2: #6d7b9b;
  --green: #6fe3b6;
  --red: #ff7d84;
  --violet: #b99cff;
  --radius: 16px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, .9);
  --serif: "Cinzel", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, .brand, .seal-value, .spot-value, .kpi-value { font-family: var(--serif); font-weight: 600; letter-spacing: .02em; }
a { color: var(--ice); text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
::selection { background: rgba(226, 192, 125, .28); color: #fff; }

/* ---------- background ---------- */
.aurora {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 15% -8%, rgba(95, 176, 236, .20), transparent 65%),
    radial-gradient(ellipse 45% 32% at 85% -4%, rgba(150, 115, 230, .17), transparent 65%),
    radial-gradient(ellipse 50% 38% at 50% 108%, rgba(226, 192, 125, .07), transparent 70%),
    linear-gradient(180deg, #070b16 0%, #0a1120 45%, #070b16 100%);
  animation: auroraDrift 22s ease-in-out infinite alternate;
}
@keyframes auroraDrift {
  from { transform: translate3d(-1%, 0, 0) scale(1); }
  to { transform: translate3d(1.5%, 1%, 0) scale(1.05); }
}
.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .55;
  background-image:
    radial-gradient(1.4px 1.4px at 24px 38px, rgba(255,255,255,.9), transparent),
    radial-gradient(1px 1px at 132px 96px, rgba(207,232,255,.7), transparent),
    radial-gradient(1.6px 1.6px at 268px 52px, rgba(255,255,255,.8), transparent),
    radial-gradient(1px 1px at 340px 150px, rgba(226,192,125,.65), transparent),
    radial-gradient(1px 1px at 76px 186px, rgba(207,232,255,.6), transparent);
  background-size: 420px 240px;
  animation: snowFall 28s linear infinite;
  mask-image: linear-gradient(180deg, #000 0%, rgba(0,0,0,.55) 65%, transparent 100%);
}
@keyframes snowFall { to { background-position: 0 240px, 0 240px, 0 240px, 0 240px, 0 240px; } }

/* ---------- frame ---------- */
.wrap { width: min(1200px, 100%); margin-inline: auto; padding-inline: clamp(18px, 3vw, 34px); }
.topbar {
  position: sticky; top: 0; z-index: 40;
  background: rgba(7, 11, 22, .72);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(1.2);
}
.topbar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--serif); font-size: 14px; letter-spacing: .17em;
  color: var(--text); white-space: nowrap;
}
.brand em { font-style: normal; color: var(--gold); }
.brand-mark { width: 21px; height: 21px; color: var(--ice); filter: drop-shadow(0 0 8px rgba(95,176,236,.5)); }
.brand.small { font-size: 12px; }
.topbar-right { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 11px; font-weight: 600; letter-spacing: .12em; color: var(--ice);
  background: rgba(159, 216, 255, .05); white-space: nowrap;
}
.pill.ghost { color: var(--muted); border-color: var(--line); background: transparent; }

/* ---------- hero ---------- */
.hero { padding: clamp(34px, 6vw, 72px) 0 26px; position: relative; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(240px, .65fr); gap: clamp(24px, 5vw, 72px); align-items: center; }
.eyebrow {
  display: flex; align-items: center; gap: 9px;
  font-size: 11px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  color: var(--gold);
}
.diamond { width: 7px; height: 7px; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 12px rgba(226,192,125,.7); }
.hero h1 {
  font-size: clamp(42px, 6.4vw, 82px); line-height: .98;
  margin: 16px 0 14px; letter-spacing: .01em;
  background: linear-gradient(160deg, #ffffff 8%, #dfeaff 42%, var(--gold) 105%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, .45));
  text-wrap: balance;
}
.hero h1 .gold { color: var(--gold); -webkit-text-fill-color: var(--gold); }
.hero-sub { color: var(--muted); max-width: 54ch; font-size: 15px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: rgba(159, 216, 255, .04);
  border-radius: 999px; padding: 6px 13px; font-size: 12px; color: #c6d6f2;
}
.chip b { color: var(--text); font-weight: 600; }
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.hero-meta {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px;
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line);
  max-width: 640px;
}
.meta-label { display: block; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 3px; }
.hero-meta strong { font-size: 13px; font-weight: 500; color: #d7e3f7; }

/* seal */
.hero-seal { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.seal-ring { position: relative; width: clamp(190px, 21vw, 240px); aspect-ratio: 1; }
.seal-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.seal-track { fill: none; stroke: rgba(159,216,255,.10); stroke-width: 5; }
.seal-progress {
  fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 603; stroke-dashoffset: 603;
  filter: drop-shadow(0 0 10px rgba(226,192,125,.55));
  transition: stroke-dashoffset 1.4s cubic-bezier(.22,.8,.28,1);
}
.seal-ring::before, .seal-ring::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.seal-ring::before { inset: 13px; border: 1px solid rgba(226,192,125,.16); }
.seal-ring::after {
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(226,192,125,.9) 0 2px, transparent 2.5px),
    radial-gradient(circle at 50% 100%, rgba(159,216,255,.8) 0 1.6px, transparent 2px);
}
.seal-core {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.seal-label { font-size: 9px; letter-spacing: .24em; color: var(--muted-2); }
.seal-value { font-size: clamp(38px, 4.5vw, 54px); line-height: 1.05; color: var(--gold); margin: 2px 0; }
.seal-note { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.seal-caption { display: flex; align-items: center; gap: 10px; font-size: 11px; color: var(--muted); }
.seal-caption b { color: var(--text); font-weight: 600; }
.seal-caption .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--muted-2); }

/* KPI */
.kpi-strip {
  display: grid; grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px; margin-top: clamp(28px, 4vw, 46px);
  background: var(--line); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.kpi {
  background: rgba(10, 17, 32, .92); padding: 16px 18px;
  display: flex; flex-direction: column; gap: 2px; position: relative;
  transition: background .25s ease;
}
.kpi:hover { background: rgba(18, 29, 51, .95); }
.kpi-label { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-2); }
.kpi-value { font-size: clamp(22px, 2.3vw, 29px); line-height: 1.2; color: var(--text); }
.kpi-value em { font-style: normal; color: var(--gold); }
.kpi-sub { font-size: 10.5px; color: var(--muted); }

/* ---------- tabs ---------- */
.tabs {
  position: sticky; top: 66px; z-index: 30;
  margin-top: 30px;
  background: rgba(7, 11, 22, .82);
  border-block: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.tabs.scrollable::after {
  content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 36px;
  background: linear-gradient(90deg, transparent, rgba(7, 11, 22, .96));
  pointer-events: none; z-index: 1;
}
.tabs-in { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.tabs-in::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: 0 0 auto;
  background: none; border: 0; padding: 16px 18px;
  font-size: 12.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted); transition: color .2s ease; white-space: nowrap;
}
.tab:hover { color: var(--text); }
.tab::after {
  content: ""; position: absolute; left: 16px; right: 16px; bottom: -1px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transform: scaleX(.5); transition: .25s ease;
}
.tab[aria-selected="true"] { color: var(--gold); }
.tab[aria-selected="true"]::after { opacity: 1; transform: scaleX(1); }
.tab .n { font-family: var(--sans); font-size: 10px; color: var(--muted-2); margin-left: 5px; }
.tab[aria-selected="true"] .n { color: var(--gold); }

/* ---------- panels & cards ---------- */
.panels { padding-block: 34px 70px; }
.panel { animation: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-bottom: 18px; }
.card {
  position: relative;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), transparent 38%),
    var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(18px, 2.4vw, 26px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(14px);
  overflow: hidden;
}
.card + .card { margin-top: 0; }
.chart-card { margin-bottom: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 20px; }
.card-head h2 { font-size: clamp(17px, 1.8vw, 21px); line-height: 1.25; color: #f2f7ff; }
.kicker { display: block; font-size: 9.5px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--gold); margin-bottom: 5px; white-space: nowrap; }
.badge {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  color: var(--gold); background: var(--gold-soft); border: 1px solid rgba(226,192,125,.28);
  white-space: nowrap;
}
.badge.soft { color: var(--ice); background: rgba(159,216,255,.07); border-color: rgba(159,216,255,.22); }
.badge.green { color: var(--green); background: rgba(111,227,182,.08); border-color: rgba(111,227,182,.28); }

.section-head {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 20px;
  margin-bottom: 24px; flex-wrap: wrap;
}
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
.section-head p { color: var(--muted); font-size: 13.5px; margin-top: 7px; max-width: 62ch; }
.section-figures { display: flex; gap: 26px; flex-wrap: wrap; }
.figure { text-align: right; }
.figure b { display: block; font-family: var(--serif); font-size: 26px; line-height: 1.1; color: var(--gold); }
.figure span { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); }

/* ---------- profile ---------- */
.profile-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.profile-list div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px solid rgba(159,216,255,.07); min-height: 38px;
}
.profile-list dt { font-size: 11.5px; color: var(--muted-2); white-space: nowrap; }
.profile-list dd { font-size: 12.5px; color: #dbe6f9; text-align: right; word-break: break-word; }
.profile-list dd.mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.pii-hidden { color: var(--muted); letter-spacing: .08em; }

/* heatmap */
.heatmap {
  display: grid; grid-auto-flow: column;
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: 4px; aspect-ratio: 13 / 7; max-height: 180px;
}
.hm {
  border-radius: 3px; background: rgba(159,216,255,.055);
  border: 1px solid rgba(159,216,255,.04);
  transition: transform .15s ease;
}
.hm:hover { transform: scale(1.22); border-color: rgba(226,192,125,.5); }
.hm.c0 { background: rgba(159,216,255,.055); }
.hm.c1 { background: rgba(95,176,236,.24); }
.hm.c2 { background: rgba(95,176,236,.44); }
.hm.c3 { background: rgba(111,227,182,.60); }
.hm.c4 { background: var(--gold); box-shadow: 0 0 9px rgba(226,192,125,.35); }
.heatmap-legend { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin-top: 10px; font-size: 9.5px; color: var(--muted-2); }
.heatmap-legend .hm { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.heatmap-legend span { margin-inline: 3px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-top: 18px; }
.mini-stats > div { background: rgba(10,17,32,.85); padding: 11px 13px; }
.mini-stats b { display: block; font-family: var(--serif); font-size: 19px; color: var(--text); line-height: 1.2; }
.mini-stats span { font-size: 9.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted-2); }

/* ---------- chart ---------- */
.seg { display: inline-flex; padding: 3px; background: rgba(5,9,18,.6); border: 1px solid var(--line); border-radius: 10px; gap: 2px; }
.seg button {
  border: 0; background: transparent; color: var(--muted); font-size: 11.5px; font-weight: 600;
  padding: 6px 13px; border-radius: 7px; transition: .2s ease;
}
.seg button.on { background: var(--gold-soft); color: var(--gold); box-shadow: inset 0 0 0 1px rgba(226,192,125,.24); }
.chart-legend { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: var(--muted); margin-bottom: 10px; flex-wrap: wrap; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 10px rgba(226,192,125,.6); }
.chart-peak { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--text); font-weight: 600; }
.linechart { position: relative; width: 100%; height: 250px; }
.linechart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.grid-line { stroke: rgba(159,216,255,.09); stroke-width: 1; }
.grid-text { fill: var(--muted-2); font-family: var(--sans); font-size: 9px; letter-spacing: .04em; }
.chart-empty { display: grid; place-items: center; height: 100%; color: var(--muted-2); font-size: 12px; }

/* ---------- bars ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 54px; gap: 11px; align-items: center; }
.bar-row .label { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .track { height: 7px; border-radius: 99px; background: rgba(159,216,255,.07); overflow: hidden; }
.bar-row .fill {
  display: block;
  height: 100%; border-radius: 99px; width: 0;
  background: linear-gradient(90deg, rgba(95,176,236,.55), var(--ice));
  box-shadow: 0 0 12px rgba(95,176,236,.35);
  transform-origin: left center;
  animation: growX 1s cubic-bezier(.22,.8,.28,1) both;
}
@keyframes growX { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.bar-row .fill.gold { background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 12px rgba(226,192,125,.35); }
.bar-row .fill.green { background: linear-gradient(90deg, #2f9e7a, var(--green)); box-shadow: 0 0 12px rgba(111,227,182,.3); }
.bar-row .fill.red { background: linear-gradient(90deg, #a33a44, var(--red)); box-shadow: 0 0 12px rgba(255,125,132,.25); }
.bar-row .val { font-size: 11.5px; font-variant-numeric: tabular-nums; color: #cddcf4; text-align: right; }
.bars.compact { gap: 14px; }
.bars.compact .bar-row { grid-template-columns: 150px minmax(0, 1fr) 44px; }

/* ---------- timeline ---------- */
.timeline { position: relative; display: flex; flex-direction: column; gap: 0; padding-left: 4px; }
.tl-item { position: relative; padding: 0 0 17px 22px; border-left: 1px solid var(--line); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -4.5px; top: 5px; width: 8px; height: 8px;
  border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(226,192,125,.55);
}
.tl-item .tl-time { font-size: 10px; letter-spacing: .08em; color: var(--muted-2); text-transform: uppercase; }
.tl-item .tl-main { font-size: 13px; color: #dce7f9; margin-top: 1px; }
.tl-item .tl-main b { color: var(--gold); font-weight: 600; }

/* ---------- char grid ---------- */
.toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 20px;
}
.toolbar.slim { margin-top: 22px; }
.toolbar-note { margin-left: auto; font-size: 11px; color: var(--muted-2); }
.search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(5,9,18,.55); border: 1px solid var(--line); border-radius: 10px;
  padding: 0 12px; height: 40px; min-width: 220px; flex: 1 1 220px; max-width: 320px;
}
.search svg { width: 15px; height: 15px; color: var(--muted-2); flex: 0 0 auto; }
.search input { background: none; border: 0; outline: none; width: 100%; font-size: 12.5px; color: var(--text); }
.search input::placeholder { color: var(--muted-2); }
.search.slim { height: 36px; max-width: 220px; flex: 0 1 220px; }
.select { display: flex; align-items: center; gap: 8px; font-size: 10.5px; color: var(--muted-2); letter-spacing: .08em; text-transform: uppercase; }
.select select {
  background: rgba(5,9,18,.55); border: 1px solid var(--line); border-radius: 9px;
  padding: 9px 10px; font-size: 12px; color: var(--text); outline: none;
}
.chips.filter { margin: 0; gap: 6px; }
.chips.filter .chip { cursor: pointer; background: transparent; color: var(--muted); border-color: var(--line); padding: 6px 12px; font-size: 11.5px; transition: .2s ease; user-select: none; }
.chips.filter .chip:hover { color: var(--text); border-color: var(--line-strong); }
.chips.filter .chip.on { color: var(--gold); border-color: rgba(226,192,125,.42); background: var(--gold-soft); }

.char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 12px; }
.char-card {
  position: relative; padding: 15px;
  background: linear-gradient(160deg, rgba(255,255,255,.035), transparent 55%), rgba(13,22,40,.8);
  border: 1px solid var(--line); border-radius: 13px;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
  overflow: hidden;
}
.char-card::after {
  content: ""; position: absolute; width: 90px; height: 90px; right: -38px; top: -42px;
  border-radius: 50%; background: var(--hue, #5fb0ec); opacity: .12; filter: blur(14px);
}
.char-card:hover { transform: translateY(-3px); border-color: rgba(226,192,125,.32); box-shadow: 0 18px 34px -22px rgba(0,0,0,.9); }
.char-top { display: flex; align-items: center; gap: 11px; }
.avatar {
  width: 42px; height: 42px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 18px; font-weight: 700; color: #fff;
  background:
    linear-gradient(145deg, hsla(var(--hue, 205), 70%, 58%, .38), hsla(var(--hue, 205), 70%, 30%, .18)),
    rgba(9, 15, 28, .9);
  border: 1px solid hsla(var(--hue, 205), 70%, 70%, .28);
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
}
.char-name { font-size: 13.5px; font-weight: 600; line-height: 1.25; color: #f0f6ff; }
.char-tags { display: flex; align-items: center; gap: 5px; margin-top: 2px; min-height: 16px; }
.tag-mini { font-size: 9px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.tag-mini.gold { color: var(--gold); }
.char-level { margin-left: auto; text-align: right; }
.char-level b { font-family: var(--serif); font-size: 20px; line-height: 1; color: var(--text); }
.char-level span { display: block; font-size: 8.5px; letter-spacing: .12em; color: var(--muted-2); text-transform: uppercase; }
.char-card.maxed .char-level b { color: var(--gold); }
.cons-row { display: flex; gap: 6px; margin: 12px 0 10px; align-items: center; }
.cons-pip { width: 6px; height: 6px; border-radius: 50%; background: rgba(159,216,255,.16); }
.cons-pip.on { background: var(--gold); box-shadow: 0 0 7px rgba(226,192,125,.55); }
.talents { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.talent {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(5,9,18,.42); border: 1px solid rgba(159,216,255,.07);
  border-radius: 7px; padding: 5px 2px;
}
.talent span { font-size: 8px; letter-spacing: .1em; color: var(--muted-2); }
.talent b { font-size: 12.5px; font-weight: 600; color: #ccdbf3; }
.talent.top b { color: var(--gold); }
.char-note { font-size: 9.5px; color: var(--muted-2); margin-top: 9px; }

/* ---------- pity ---------- */
.pity-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.pity-banner {
  border: 1px solid var(--line); border-radius: 13px;
  background: linear-gradient(165deg, rgba(255,255,255,.03), transparent 60%), rgba(9, 15, 28, .55);
  padding: 16px 18px;
}
.pity-banner.guaranteed { border-color: rgba(226,192,125,.4); background: linear-gradient(165deg, rgba(226,192,125,.08), transparent 60%), rgba(9, 15, 28, .55); }
.pity-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.pity-type { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); }
.pity-head h3 { font-family: var(--serif); font-size: 18px; font-weight: 600; color: #f2f7ff; line-height: 1.2; margin-top: 2px; }
.pity-main { display: flex; align-items: center; gap: 16px; }
.pity-number { display: flex; align-items: baseline; gap: 3px; flex: 0 0 auto; }
.pity-number b { font-family: var(--serif); font-size: 34px; line-height: 1; color: var(--gold); }
.pity-number span { font-size: 11px; color: var(--muted-2); }
.pity-body { flex: 1 1 auto; min-width: 0; }
.pity-track { position: relative; height: 8px; border-radius: 99px; background: rgba(159,216,255,.08); overflow: hidden; }
.pity-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--ice-2), var(--ice)); transition: width .9s cubic-bezier(.22,.8,.28,1); }
.pity-fill.hot { background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 12px rgba(226,192,125,.5); }
.pity-soft { position: absolute; top: -3px; bottom: -3px; width: 2px; background: rgba(226,192,125,.55); }
.pity-hint { font-size: 10.5px; color: var(--muted); margin-top: 7px; }
.pity-4 { display: flex; align-items: center; gap: 10px; margin-top: 14px; font-size: 10.5px; color: var(--muted-2); }
.pity-4-track { flex: 1 1 auto; height: 4px; border-radius: 99px; background: rgba(159,216,255,.08); overflow: hidden; }
.pity-4-track i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7b6bc4, var(--violet)); }
.pity-4 b { font-variant-numeric: tabular-nums; color: #cddcf4; font-weight: 600; font-size: 11px; }
.pity-meta { font-size: 10px; letter-spacing: .05em; color: var(--muted-2); margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(159,216,255,.07); }
.pity-last5 { margin-top: 10px; }
.pity-label { display: block; font-size: 8.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.pity-history-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: baseline; gap: 8px; padding: 4px 0; border-bottom: 1px solid rgba(159,216,255,.05); font-size: 11.5px; }
.pity-history-row:last-child { border-bottom: 0; }
.pity-history-row b { color: var(--gold); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pity-history-row span { color: var(--muted-2); font-size: 10px; }
.pity-history-row em { font-style: normal; color: #cddcf4; font-variant-numeric: tabular-nums; }
.pity-guarantee { margin-top: 11px; padding: 8px 11px; border-radius: 9px; background: var(--gold-soft); border: 1px solid rgba(226,192,125,.26); font-size: 10.5px; color: var(--gold); line-height: 1.5; }
.data-table .rarity { letter-spacing: -.1em; font-size: 11px; color: var(--muted-2); }
.wish-time { white-space: nowrap; }
.wa-type { display: none; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-2); margin-top: 3px; }
@media (max-width: 700px) {
  .wish-time .tw { display: none; }
  #wish-table th:nth-child(2), #wish-table .wish-type-col { display: none; }
  #wish-table th, #wish-table td { padding: 9px 8px; }
  #wish-table { font-size: 11.5px; }
  .wa-type { display: block; }
  .data-table .rarity { letter-spacing: 0; font-size: 10px; }
  .data-table .rarity.r5 { font-size: 11px; }
}
.data-table .rarity.r5 { color: var(--gold); font-size: 13px; text-shadow: 0 0 9px rgba(226,192,125,.5); }
.data-table .rarity.r4 { color: var(--violet); }
.data-table tr.row-five { background: rgba(226,192,125,.07); }
.data-table tr.row-four { background: rgba(185,156,255,.05); }

@media (max-width: 620px) {
  .pity-main { flex-wrap: wrap; gap: 10px; }
  .pity-body { flex-basis: 100%; }
  .pity-number b { font-size: 30px; }
}

/* ---------- data table ---------- */
.table-card { padding-bottom: 12px; }
.table-scroll { overflow-x: auto; margin-inline: -6px; padding-inline: 6px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.data-table th {
  text-align: left; font-size: 9.5px; letter-spacing: .13em; text-transform: uppercase;
  color: var(--muted-2); font-weight: 600; padding: 9px 12px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table th.num { text-align: right; }
.data-table th.sortable { cursor: pointer; user-select: none; }
.data-table th.sortable:hover { color: var(--text); }
.data-table th.sorted { color: var(--gold); }
.data-table th.sorted::after { content: " ↓"; }
.data-table th.sorted.asc::after { content: " ↑"; }
.data-table td { padding: 9px 12px; border-bottom: 1px solid rgba(159,216,255,.06); color: #d5e1f5; }
.data-table td.num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table tbody tr { transition: background .15s ease; }
.data-table tbody tr:hover { background: rgba(159,216,255,.035); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .soft { color: var(--muted); }
.data-table .gold { color: var(--gold); font-weight: 600; }
.mini-bar { display: inline-block; width: 90px; height: 4px; border-radius: 99px; background: rgba(159,216,255,.09); vertical-align: middle; margin-right: 8px; overflow: hidden; }
.mini-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--ice-2), var(--gold)); border-radius: 99px; }

/* ---------- donut ---------- */
.donut-wrap { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 20px; align-items: center; }
.donut-wrap.single { grid-template-columns: 180px minmax(0, 1fr); }
.donut { position: relative; width: 100%; aspect-ratio: 1; max-width: 200px; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 16; transition: stroke-dasharray 1s ease; }
.donut .donut-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center;
}
.donut .donut-center b { font-family: var(--serif); font-size: 24px; line-height: 1.1; color: var(--text); }
.donut .donut-center span { font-size: 8.5px; letter-spacing: .13em; text-transform: uppercase; color: var(--muted-2); }
.donut-legend { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.dl-item { display: grid; grid-template-columns: 8px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 11.5px; }
.dl-item i { width: 8px; height: 8px; border-radius: 2px; background: var(--c, var(--ice)); }
.dl-item span { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dl-item b { font-weight: 600; color: #d9e5f8; font-variant-numeric: tabular-nums; }

/* ---------- explore ---------- */
.spotlight { display: flex; flex-direction: column; justify-content: center; background: radial-gradient(ellipse at 20% 0%, rgba(226,192,125,.10), transparent 60%), var(--panel); }
.spot-value { font-size: clamp(52px, 7vw, 76px); line-height: 1; color: var(--gold); }
.spot-note { font-size: 12px; color: var(--muted); margin-top: 6px; }
.spot-meter { height: 5px; border-radius: 99px; background: rgba(159,216,255,.09); margin-top: 20px; overflow: hidden; }
.spot-meter i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--ice-2), var(--gold)); border-radius: 99px; transform-origin: left center; animation: growX 1.2s cubic-bezier(.22,.8,.28,1) both; }
.explore-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 26px; }
.explore-row { padding: 10px 0; border-bottom: 1px solid rgba(159,216,255,.06); }
.explore-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.explore-name { font-size: 12px; color: #d6e2f6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.explore-pct { font-size: 11.5px; font-variant-numeric: tabular-nums; color: var(--muted); flex: 0 0 auto; }
.explore-pct.perfect { color: var(--gold); font-weight: 600; }
.explore-track { height: 4px; border-radius: 99px; background: rgba(159,216,255,.08); overflow: hidden; }
.explore-track i { display: block; height: 100%; border-radius: 99px; background: rgba(159,216,255,.45); }
.explore-track i.high { background: linear-gradient(90deg, #3d9f80, var(--green)); }
.explore-track i.perfect { background: linear-gradient(90deg, var(--gold-2), var(--gold)); box-shadow: 0 0 9px rgba(226,192,125,.35); }
.explore-track i.low { background: linear-gradient(90deg, #923a42, var(--red)); }

/* ---------- quests ---------- */
.quest-list { list-style: none; display: flex; flex-direction: column; counter-reset: q; max-height: none; overflow: visible; padding-right: 0; }
.quest-list.open { max-height: none; }
.quest-list li {
  counter-increment: q; position: relative; padding: 8px 0 8px 34px;
  border-bottom: 1px solid rgba(159,216,255,.06); font-size: 12.5px; color: #d4e0f4;
}
.quest-list li::before {
  content: counter(q, decimal-leading-zero); position: absolute; left: 0; top: 9px;
  font-size: 9.5px; letter-spacing: .05em; color: var(--gold); opacity: .75;
  font-variant-numeric: tabular-nums;
}
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line-strong); background: rgba(159,216,255,.04);
  color: var(--ice); border-radius: 9px; padding: 9px 16px;
  font-size: 12px; font-weight: 600; transition: .2s ease;
}
.btn:hover { background: rgba(159,216,255,.1); border-color: rgba(159,216,255,.4); }
.btn.tiny { padding: 6px 11px; font-size: 10.5px; letter-spacing: .02em; }
.btn.ghost { background: transparent; color: var(--muted); border-color: var(--line); }
.btn.ghost:hover { color: var(--text); border-color: var(--line-strong); }
.btn.w { width: 100%; margin-top: 14px; }
.btn[hidden] { display: none; }

/* ---------- wish ---------- */
.wish-top { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(200px, .6fr); gap: 22px; align-items: center; margin-bottom: 20px; }
.wish-chart { display: flex; align-items: flex-end; gap: 7px; height: 170px; padding-top: 10px; }
.wish-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; min-width: 0; }
.wish-track { flex: 1 1 auto; width: 100%; min-height: 0; display: flex; align-items: flex-end; justify-content: center; }
.wish-bar { display: block; width: 100%; max-width: 44px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, rgba(226,192,125,.75), rgba(226,192,125,.18)); border: 1px solid rgba(226,192,125,.25); min-height: 4px; transition: height .8s ease; }
.wish-col span { font-size: 9px; color: var(--muted-2); letter-spacing: .04em; white-space: nowrap; }
.wish-col b { font-size: 10.5px; color: var(--text); font-weight: 600; }
.wish-summary { display: flex; flex-direction: column; gap: 10px; }
.wish-summary .ws { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 9px; border-bottom: 1px solid rgba(159,216,255,.07); font-size: 12px; color: var(--muted); }
.wish-summary .ws b { font-family: var(--serif); font-size: 21px; color: var(--gold); }
.wish-summary .ws:last-child { border-bottom: 0; }
.mark-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mark-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px; background: rgba(5,9,18,.35); font-size: 12px; }
.mark-item span { text-transform: capitalize; color: var(--muted); }
.mark-item b { color: var(--gold); }

/* ---------- misc ---------- */
.empty { text-align: center; color: var(--muted-2); font-size: 12.5px; padding: 34px 0; }
.footnote { font-size: 10.5px; color: var(--muted-2); margin-top: 14px; }
.footer { border-top: 1px solid var(--line); padding: 28px 0 40px; background: rgba(5,9,18,.5); }
.footer-in { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.foot-note { font-size: 10.5px; color: var(--muted-2); margin-top: 9px; max-width: 66ch; line-height: 1.7; }
.foot-note b { color: var(--muted); font-weight: 500; }
.foot-note.right { text-align: right; flex: 0 0 auto; }

/* reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .tab .n { display: none; }
  .tab { padding: 15px 14px; font-size: 11.5px; }
}
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-seal { flex-direction: row; justify-content: flex-start; gap: 26px; }
  .seal-ring { width: 170px; }
  .kpi-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .wish-top { grid-template-columns: 1fr; }
  .wish-chart { height: 130px; }
  .explore-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .section-figures { gap: 20px; }
  .figure { text-align: left; }
  .footer-in { flex-direction: column; }
  .foot-note.right { text-align: left; }
}
@media (max-width: 620px) {
  .topbar-in { height: 58px; }
  .pill.ghost { display: none; }
  .tabs { top: 58px; }
  .hero { padding-top: 30px; }
  .hero h1 { font-size: clamp(38px, 11vw, 54px); }
  .hero-seal { flex-direction: column; align-items: flex-start; gap: 12px; }
  .seal-ring { width: 148px; }
  .seal-caption { font-size: 10px; }
  .hero-meta { grid-template-columns: 1fr 1fr; }
  .hero-meta > div:last-child { grid-column: 1 / -1; }
  .kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi { padding: 13px 14px; }
  .profile-list { grid-template-columns: 1fr; }
  .donut-wrap, .donut-wrap.single { grid-template-columns: 1fr; justify-items: center; }
  .donut-legend { width: 100%; }
  .bar-row { grid-template-columns: 78px minmax(0, 1fr) 44px; gap: 8px; }
  .bars.compact .bar-row { grid-template-columns: 110px minmax(0, 1fr) 40px; }
  .char-grid { grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); }
  .char-level b { font-size: 17px; }
  .toolbar { gap: 9px; }
  .search { max-width: none; }
  .select { margin-left: auto; }
  .tabs-in { padding-inline: 4px; }
  .tab { padding: 13px 12px; font-size: 11px; }
  .section-head h2 { font-size: 30px; }
  .linechart { height: 200px; }
}
@media (max-width: 380px) {
  .brand { font-size: 11px; letter-spacing: .1em; gap: 7px; }
  .brand-mark { width: 17px; height: 17px; }
  .pill { padding: 4px 8px; font-size: 9.5px; letter-spacing: .08em; }
  .hero h1 { font-size: 36px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print {
  .aurora, .stars, .topbar, .tabs, .hero-seal, .btn, .search, .select, .chips.filter, .pii-toggle { display: none !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
  body { background: #fff; color: #111; }
  .panel[hidden] { display: block !important; }
  .panel + .panel { break-before: page; }
  .card { background: #fff !important; border-color: #ddd; box-shadow: none; break-inside: avoid; }
  .card, .card * { color: #1a1a1a !important; text-shadow: none !important; }
  .kpi { background: #fff !important; }
  .kpi-strip, .mini-stats, .mark-item { background: #f4f4f4 !important; border-color: #ddd; }
  .data-table th, .data-table td { border-color: #e4e4e4; }
  .hero h1 { color: #111 !important; -webkit-text-fill-color: #111 !important; background: none !important; filter: none; }
  .badge { border: 1px solid #bbb !important; }
  a { color: #111; }
  .foot-note { color: #555 !important; }
}
