/* =========================================================================
   Steam Koshel — design system
   Premium minimalism: graphite, matte obsidian, one adaptive accent.
   ========================================================================= */

:root {
  --bg: #0a0a0c;
  --bg-soft: #0d0d10;
  --card: #121215;
  --card-2: #151519;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #f4f4f7;
  --text-soft: #c9c9d2;
  --muted: #8e8e9b;
  --muted-2: #6a6a76;
  --accent: #7c5cff;
  --accent-2: #55e6c8;
  --good: #4ade80;
  --warn: #fbbf24;
  --bad: #fb7185;
  --radius: 20px;
  --radius-sm: 13px;
  --shadow: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --maxw: 1240px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body.is-locked { overflow: hidden; }

::selection { background: rgba(124, 92, 255, 0.35); }

a { color: inherit; text-decoration: none; }

button { font-family: inherit; color: inherit; }

h1, h2, h3, h4, p { margin: 0; }

svg { display: block; }

[hidden] { display: none !important; }

.num,
.stat__value,
.money,
.metric b,
.passport__value {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "ss01" 1;
}

/* ------------------------------- aurora --------------------------------- */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora__blob {
  position: absolute;
  top: -260px;
  left: 50%;
  width: 1100px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 42%, transparent), transparent 72%);
  filter: blur(70px);
  opacity: 0.28;
  transition: background 1.4s var(--ease), opacity 1s var(--ease);
  animation: breathe 16s ease-in-out infinite;
}

.aurora__grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: 3px 3px;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 65%);
}

@keyframes breathe {
  0%, 100% { transform: translateX(-50%) scale(1); opacity: 0.24; }
  50% { transform: translateX(-50%) scale(1.08); opacity: 0.34; }
}

/* ------------------------------- topbar --------------------------------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(10, 10, 12, 0.72);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.topbar.is-stuck { border-bottom-color: var(--line); }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.brand__mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(150deg, rgba(124, 92, 255, 0.28), rgba(85, 230, 200, 0.14));
  border: 1px solid var(--line-strong);
  color: #efeaff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.brand__mark svg { width: 22px; height: 22px; }

.brand__text {
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

.brand__steam { color: #fff; }
.brand__koshel { color: var(--muted); }

.tab__dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.35;
}

.topbar__tools {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.seg__btn {
  padding: 5px 9px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.seg__btn:hover { color: var(--text-soft); }

.seg__btn.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* -------------------------------- page ---------------------------------- */

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) 40px;
}

/* -------------------------------- hero ---------------------------------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(52px, 9vh, 110px) 0 clamp(28px, 5vh, 56px);
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 13px;
  margin-bottom: 26px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.01em;
}

.hero__eyebrow::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
}

.hero__title {
  max-width: 820px;
  font-size: clamp(34px, 5.6vw, 66px);
  font-weight: 700;
  line-height: 1.04;
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.hero__accent {
  display: block;
  background: linear-gradient(96deg, #fff 12%, color-mix(in srgb, var(--accent) 72%, #fff) 52%, color-mix(in srgb, var(--accent-2) 62%, #fff) 96%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__sub {
  max-width: 590px;
  margin-top: 20px;
  color: var(--muted);
  font-size: clamp(14px, 1.5vw, 16.5px);
  line-height: 1.65;
  text-wrap: pretty;
}

/* ------------------------------- search --------------------------------- */

.search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  max-width: 660px;
  margin-top: 34px;
  padding: 7px 7px 7px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.018));
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), transform 0.25s var(--ease);
  backdrop-filter: blur(14px);
}

.search:focus-within {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  box-shadow: var(--shadow), 0 0 0 4px color-mix(in srgb, var(--accent) 14%, transparent);
}

.search__icon {
  flex: 0 0 auto;
  color: var(--muted-2);
}

.search__icon svg { width: 19px; height: 19px; }

.search__input {
  flex: 1 1 auto;
  min-width: 0;
  height: 40px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 15px;
  letter-spacing: -0.01em;
}

.search__input::placeholder { color: var(--muted-2); }

.search__go {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: 13px;
  background: #f4f4f7;
  color: #0a0a0c;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s var(--ease), background 0.18s var(--ease), box-shadow 0.18s var(--ease);
}

.search__go svg { width: 15px; height: 15px; }

.search__go:hover { background: #fff; box-shadow: 0 6px 20px -8px rgba(255, 255, 255, 0.5); }

.search__go:active { transform: scale(0.98); }

/* history dropdown */

.history {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 40;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(18, 18, 21, 0.97);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  animation: pop-in 0.18s var(--ease);
}

.history__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 10px 6px;
  color: var(--muted-2);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.history__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s var(--ease);
}

.history__item:hover { background: rgba(255, 255, 255, 0.06); }

.history__item img,
.history__avatar {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  object-fit: cover;
  background: linear-gradient(140deg, #2a2340, #16202a);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 700;
  color: #dcd7ff;
  flex: 0 0 auto;
}

.history__item small { margin-left: auto; color: var(--muted-2); font-size: 11px; }

.history__empty { padding: 12px; color: var(--muted-2); font-size: 12.5px; text-align: center; }

/* ------------------------------ hero meta ------------------------------- */

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 18px;
  margin-top: 24px;
}

.hint { position: relative; }

.hint__btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 0.2s var(--ease);
}

.hint__btn svg { width: 14px; height: 14px; }

.hint__btn:hover { color: var(--text-soft); border-color: var(--muted-2); }

.hint__pop {
  position: absolute;
  z-index: 45;
  top: calc(100% + 10px);
  left: 50%;
  width: min(330px, 86vw);
  padding: 14px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 15px;
  background: rgba(18, 18, 21, 0.98);
  box-shadow: 0 28px 60px -22px #000;
  text-align: left;
  animation: pop-in 0.18s var(--ease);
}

.hint__step {
  display: flex;
  gap: 10px;
  padding: 6px 2px;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.hint__step span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 19px;
  height: 19px;
  margin-top: 1px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.hero__privacy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 26px;
  color: var(--muted-2);
  font-size: 11.5px;
}

.hero__privacy svg { width: 13px; height: 13px; opacity: 0.8; }

/* ------------------------------- loader --------------------------------- */

.loader {
  width: 100%;
  max-width: 560px;
  margin: 8px auto 40px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  animation: pop-in 0.3s var(--ease);
}

.loader__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.loader__spinner {
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.6px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loader__title {
  flex: 1;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 500;
}

.loader__pct {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.loader__track {
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.loader__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 0.45s var(--ease);
  box-shadow: 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent);
}

.loader__steps {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.loader__steps li {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--muted-2);
  font-size: 12px;
  transition: color 0.3s var(--ease);
}

.loader__steps li::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.5;
}

.loader__steps li.is-done { color: var(--text-soft); }
.loader__steps li.is-done::before { content: "✓"; width: auto; height: auto; background: none; font-size: 10px; color: var(--accent-2); }
.loader__steps li.is-active { color: var(--text); }
.loader__steps li.is-active::before { background: var(--accent); opacity: 1; box-shadow: 0 0 8px var(--accent); }

/* -------------------------------- state --------------------------------- */

.state {
  width: 100%;
  max-width: 620px;
  margin: 10px auto 50px;
  padding: clamp(24px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(180deg, var(--card-2), var(--card));
  box-shadow: var(--shadow);
  text-align: center;
  animation: pop-in 0.35s var(--ease);
}

.state__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--warn);
}

.state__icon svg { width: 26px; height: 26px; }

.state__title {
  font-size: clamp(20px, 3vw, 25px);
  font-weight: 650;
  letter-spacing: -0.02em;
}

.state__sub {
  max-width: 430px;
  margin: 10px auto 0;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.6;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.steps li {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.5;
}

.steps li span {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}

.state__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

/* -------------------------------- buttons -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}

.btn svg { width: 15px; height: 15px; }

.btn--primary {
  background: #f4f4f7;
  color: #0a0a0c;
}

.btn--primary:hover { background: #fff; transform: translateY(-1px); }

.btn--ghost {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
}

.btn--ghost:hover { background: rgba(255, 255, 255, 0.07); color: var(--text); }

.btn--sm { height: 32px; padding: 0 12px; font-size: 12px; border-radius: 9px; }

.btn--block { width: 100%; }

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: color 0.15s var(--ease);
}

.link-btn:hover { color: var(--text); }

/* ------------------------------- profile -------------------------------- */

.results { animation: fade-up 0.45s var(--ease); }

.profile {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.012));
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 420px;
  height: 320px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 40%, transparent), transparent 70%);
  filter: blur(48px);
  opacity: 0.5;
  pointer-events: none;
}

.profile__avatar {
  position: relative;
  flex: 0 0 auto;
  width: 78px;
  height: 78px;
  border-radius: 20px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 60%, #14141a), #12141c);
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: 0 12px 34px -12px color-mix(in srgb, var(--accent) 70%, transparent);
}

.profile__avatar img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }

.profile__avatar span {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: grid;
  place-items: center;
  font-size: 25px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.profile__dot {
  position: absolute;
  right: 5px;
  bottom: 5px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #14141a;
  background: var(--muted-2);
}

.profile__dot.is-online { background: var(--good); box-shadow: 0 0 10px var(--good); }

.profile__main { flex: 1 1 260px; min-width: 0; }

.profile__name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  font-size: clamp(21px, 3vw, 27px);
  font-weight: 650;
  letter-spacing: -0.03em;
}

.profile__sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12.5px;
}

.profile__sub .sep { color: var(--muted-2); opacity: 0.6; }

.profile__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 100%;
  padding-top: 4px;
}

/* ------------------------------- bento ---------------------------------- */

.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--card-2), var(--card));
  overflow: hidden;
  transition: border-color 0.28s var(--ease), transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(600px 220px at var(--mx, 50%) -30%, rgba(255, 255, 255, 0.09), transparent 70%);
  opacity: 0;
  transition: opacity 0.35s var(--ease);
  pointer-events: none;
}

.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-2px);
  box-shadow: 0 24px 50px -34px rgba(0, 0, 0, 1);
}

.card:hover::before { opacity: 1; }

.card--accent { background: linear-gradient(160deg, color-mix(in srgb, var(--accent) 16%, var(--card)), var(--card) 62%); }
.card--glow { box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent), 0 30px 60px -40px color-mix(in srgb, var(--accent) 60%, transparent); }

.s3 { grid-column: span 3; }
.s4 { grid-column: span 4; }
.s5 { grid-column: span 5; }
.s6 { grid-column: span 6; }
.s7 { grid-column: span 7; }
.s8 { grid-column: span 8; }
.s9 { grid-column: span 9; }
.s12 { grid-column: span 12; }

.card__head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.card__title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-soft);
}

.card__hint {
  color: var(--muted-2);
  font-size: 11.5px;
  line-height: 1.5;
}

.card__aside {
  margin-left: auto;
  flex: 0 0 auto;
  color: var(--muted-2);
  font-size: 11px;
}

.card__body { flex: 1; }

.card__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  color: var(--muted-2);
  font-size: 11.5px;
}

/* stats */

.stat__label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.stat__value {
  font-size: clamp(26px, 3.4vw, 36px);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin-top: 2px;
  white-space: nowrap;
}

.stat__value small {
  margin-left: 3px;
  color: var(--muted);
  font-size: 0.46em;
  font-weight: 500;
  letter-spacing: 0;
}

.stat__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.stat__delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.stat__delta--neutral { background: rgba(255, 255, 255, 0.06); color: var(--muted); }

/* progress */

.progress {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
}

.progress--thin { height: 4px; }

.progress__fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transition: width 1s var(--ease);
}

.progress__caption {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 11px;
}

/* badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge svg { width: 11px; height: 11px; }

.badge--good { color: #86efac; border-color: rgba(74, 222, 128, 0.25); background: rgba(74, 222, 128, 0.08); }
.badge--warn { color: #fcd34d; border-color: rgba(251, 191, 36, 0.25); background: rgba(251, 191, 36, 0.08); }
.badge--bad { color: #fda4af; border-color: rgba(251, 113, 133, 0.25); background: rgba(251, 113, 133, 0.08); }
.badge--accent { color: color-mix(in srgb, var(--accent) 65%, #fff); border-color: color-mix(in srgb, var(--accent) 35%, transparent); background: color-mix(in srgb, var(--accent) 12%, transparent); }
.badge--gold { color: #f5d27a; border-color: rgba(245, 210, 122, 0.3); background: rgba(245, 210, 122, 0.09); }

.metric {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: var(--muted);
}

.metric:last-child { border-bottom: 0; }
.metric b { color: var(--text); font-weight: 600; font-size: 12.5px; }

/* genre compass */

.compass { display: flex; flex-direction: column; gap: 9px; }

.compass__row {
  display: grid;
  grid-template-columns: minmax(72px, 108px) 1fr auto;
  align-items: center;
  gap: 12px;
  font-size: 12px;
}

.compass__name { color: var(--text-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.compass__bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }

.compass__bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 80%, #fff 0%), var(--accent-2));
  opacity: 0.9;
  transition: width 1.1s var(--ease);
}

.compass__val { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; min-width: 42px; text-align: right; }

/* rhythm chart */

.rhythm { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 94px; }

.rhythm__col {
  position: relative;
  flex: 1;
  height: 100%;
  display: flex;
  align-items: flex-end;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.025);
  overflow: hidden;
}

.rhythm__col i {
  display: block;
  width: 100%;
  height: 0;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, var(--accent-2), color-mix(in srgb, var(--accent) 70%, transparent));
  transition: height 0.9s var(--ease);
}

.rhythm__col.is-peak i { background: linear-gradient(180deg, #fff, var(--accent)); box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 70%, transparent); }

.rhythm__scale {
  display: flex;
  justify-content: space-between;
  margin-top: 7px;
  color: var(--muted-2);
  font-size: 10px;
}

/* chip filters */

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s var(--ease);
}

.chip:hover { color: var(--text-soft); border-color: var(--line-strong); }

.chip.is-active {
  color: #0a0a0c;
  background: #f4f4f7;
  border-color: transparent;
}

.chip__count { font-size: 10.5px; opacity: 0.6; font-variant-numeric: tabular-nums; }

/* game list */

.games { display: flex; flex-direction: column; }

.game {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 11px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.18s var(--ease);
}

.game:last-child { border-bottom: 0; }
.game:hover { background: rgba(255, 255, 255, 0.025); }

.game__cover {
  position: relative;
  width: 74px;
  height: 35px;
  border-radius: 8px;
  overflow: hidden;
  background: linear-gradient(140deg, #24202f, #171a20);
  flex: 0 0 auto;
}

.game__cover img { width: 100%; height: 100%; object-fit: cover; opacity: 0.92; }

.game__cover span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.55);
  font-size: 10px;
  font-weight: 700;
  text-align: center;
  padding: 0 4px;
}

.game__name {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.game__name em {
  font-style: normal;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #f5d27a;
  border: 1px solid rgba(245, 210, 122, 0.3);
  border-radius: 5px;
  padding: 1px 4px;
  flex: 0 0 auto;
}

.game__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-top: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.game__meta .dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.6; }

.game__mc {
  padding: 1px 5px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.game__mc--great { background: rgba(74, 222, 128, 0.12); color: #86efac; }
.game__mc--good { background: rgba(251, 191, 36, 0.12); color: #fcd34d; }
.game__mc--mixed { background: rgba(255, 255, 255, 0.07); color: var(--muted); }

.game__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.16s var(--ease);
}

.icon-btn svg { width: 14px; height: 14px; }

.icon-btn:hover { color: var(--text); border-color: var(--line-strong); background: rgba(255, 255, 255, 0.07); }

.game__hours {
  min-width: 58px;
  text-align: right;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.game__hours small { display: block; color: var(--muted-2); font-size: 10px; font-weight: 400; }

/* empty / note */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 34px 16px;
  color: var(--muted-2);
  text-align: center;
  font-size: 12.5px;
}

.empty__icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px dashed var(--line-strong);
  color: var(--muted);
  font-size: 16px;
}

.note {
  display: flex;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.note b { color: var(--text-soft); font-weight: 600; }

/* toggles / segmented control */

.switch {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  max-width: 100%;
}

.switch button {
  padding: 5px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.16s var(--ease);
  white-space: nowrap;
}

.switch button.is-active { color: var(--text); background: rgba(255, 255, 255, 0.08); }

/* achievements frames */

.frames { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }

.frame {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.015) 55%);
  overflow: hidden;
}

.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, 0.11) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.9s var(--ease);
}

.frame:hover::after { transform: translateX(120%); }

.frame__icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(150deg, #2a2233, #1a1c22);
  border: 1px solid var(--line-strong);
  color: #f5d27a;
  font-size: 15px;
}

.frame__name {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.frame__game { color: var(--muted-2); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.frame__rare { margin-top: auto; color: #f5d27a; font-size: 10.5px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* capsule / timeline */

.capsule {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%), rgba(255, 255, 255, 0.02);
}

.capsule__seal {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: rgba(10, 10, 12, 0.5);
  color: color-mix(in srgb, var(--accent) 70%, #fff);
  font-size: 17px;
  flex: 0 0 auto;
}

.capsule__t { font-size: 13px; font-weight: 600; }
.capsule__s { color: var(--muted); font-size: 11.5px; margin-top: 3px; }
.capsule__date { margin-left: auto; color: var(--muted-2); font-size: 11px; font-variant-numeric: tabular-nums; }

.timeline { display: flex; flex-direction: column; gap: 5px; }

.tl-row {
  display: grid;
  grid-template-columns: 44px 1fr 74px;
  align-items: center;
  gap: 10px;
  padding: 7px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.16s var(--ease);
}

.tl-row:hover { background: rgba(255, 255, 255, 0.04); }
.tl-row.is-active { background: rgba(255, 255, 255, 0.06); }
.tl-row__year { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.tl-row.is-active .tl-row__year { color: var(--text); font-weight: 600; }
.tl-row__bar { height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.tl-row__bar i { display: block; height: 100%; border-radius: 999px; background: color-mix(in srgb, var(--accent) 70%, transparent); }
.tl-row.is-active .tl-row__bar i { background: var(--accent-2); }
.tl-row__val { color: var(--muted-2); font-size: 10.5px; text-align: right; font-variant-numeric: tabular-nums; }

/* compare */

.compare-inputs {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  gap: 10px;
}

.field { display: flex; flex-direction: column; gap: 6px; }

.field > label { color: var(--muted-2); font-size: 10.5px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

.input {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  outline: none;
  transition: border-color 0.18s var(--ease);
}

.input:focus { border-color: color-mix(in srgb, var(--accent) 55%, transparent); }

.input::placeholder { color: var(--muted-2); }

.duel { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }

.duel__head {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.duel__side { display: flex; align-items: center; gap: 9px; min-width: 0; }
.duel__side--r { justify-content: flex-end; text-align: right; }

.duel__ava {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  background: linear-gradient(150deg, #2b2440, #171a20);
  border: 1px solid var(--line-strong);
}

.duel__name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel__meta { color: var(--muted-2); font-size: 10.5px; }

.duel__vs {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.duel__row { display: grid; grid-template-columns: minmax(52px, 78px) 1fr 1fr minmax(52px, 78px); align-items: center; gap: 10px; }
.duel__label { color: var(--muted); font-size: 10.5px; text-align: center; margin: 4px 0 -4px; }

.duel__bar { position: relative; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.05); overflow: hidden; }
.duel__bar i { position: absolute; top: 0; bottom: 0; display: block; border-radius: 999px; }
.duel__bar--l i { right: 0; background: var(--accent); }
.duel__bar--r i { left: 0; background: var(--accent-2); }
.duel__label { color: var(--muted); font-size: 10.5px; text-align: center; white-space: nowrap; }
.duel__val { color: var(--text-soft); font-size: 11px; font-variant-numeric: tabular-nums; }
.duel__val--l { text-align: right; }
.duel__val--r { text-align: left; }

.verdict {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  border-radius: 13px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  font-size: 12.5px;
  color: var(--text-soft);
}

.verdict b { color: var(--text); }

/* friends */

.friends { display: flex; flex-direction: column; gap: 9px; }

.friends--scroll {
  max-height: 420px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
  scrollbar-width: thin;
}

.friends--scroll::-webkit-scrollbar { width: 6px; }
.friends--scroll::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.12); border-radius: 999px; }

.friend {
  display: grid;
  grid-template-columns: 14px 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.02);
  cursor: grab;
  transition: all 0.18s var(--ease);
}

.friend:active { cursor: grabbing; }
.friend.is-dragging { opacity: 0.45; }
.friend.is-drop { border-color: var(--accent); background: rgba(124, 92, 255, 0.12); }

.friend__grip {
  color: var(--muted-2);
  font-size: 10px;
  line-height: 1;
  letter-spacing: -2px;
  writing-mode: vertical-rl;
  user-select: none;
}

.friend:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.04); }

.friend__ava {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: linear-gradient(150deg, #2b2440, #171a20);
  font-size: 13px;
  font-weight: 700;
  color: #dcd7ff;
  overflow: hidden;
}

.friend__ava img { width: 100%; height: 100%; object-fit: cover; }

.friend__name { font-size: 12.5px; font-weight: 600; }
.friend__sub { color: var(--muted-2); font-size: 10.5px; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.friend__score { text-align: right; }
.friend__score b { display: block; font-size: 14px; font-weight: 650; color: var(--accent-2); font-variant-numeric: tabular-nums; }
.friend__score small { color: var(--muted-2); font-size: 9.5px; }

/* -------------------------------- footer --------------------------------- */

.footer {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 22px clamp(16px, 4vw, 40px) 34px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--muted-2);
  font-size: 11.5px;
}

.footer__left { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.footer__brand { color: var(--muted); font-weight: 600; letter-spacing: 0.12em; font-size: 10.5px; }
.footer__sep { opacity: 0.5; }

/* ------------------------------- toasts --------------------------------- */

.toasts {
  position: fixed;
  z-index: 200;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column-reverse;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 13px;
  background: rgba(20, 20, 24, 0.96);
  box-shadow: 0 20px 50px -18px #000;
  backdrop-filter: blur(18px);
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toast-in 0.28s var(--ease);
}

.toast.is-out { animation: toast-out 0.24s var(--ease) forwards; }

.toast__icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 10px;
  color: var(--accent-2);
}

.toast--warn .toast__icon { color: var(--warn); }
.toast--error .toast__icon { color: var(--bad); }

@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px) scale(0.98); } }

@keyframes pop-in { from { opacity: 0; transform: translateY(6px) scale(0.985); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(10px); } }

/* -------------------------------- modals --------------------------------- */

.modal { position: fixed; inset: 0; z-index: 250; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal__backdrop { position: fixed; inset: 0; background: rgba(5, 5, 8, 0.72); backdrop-filter: blur(8px); animation: fade-in 0.2s var(--ease); }

.modal__panel {
  position: relative;
  width: min(920px, 100%);
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--bg-soft);
  box-shadow: 0 50px 120px -40px #000;
  animation: pop-in 0.25s var(--ease);
  overflow: hidden;
}

.modal__panel--narrow { width: min(520px, 100%); }

.modal__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.modal__title { font-size: 14px; font-weight: 650; letter-spacing: -0.01em; }
.modal__sub { color: var(--muted-2); font-size: 11px; }
.modal__close { margin-left: auto; }

.modal__body { padding: 18px; }

.passport-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 300px); gap: 18px; align-items: start; }

/* passport card */

.passport {
  position: relative;
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 22px;
  background:
    radial-gradient(120% 100% at 12% 0%, color-mix(in srgb, var(--accent) 34%, transparent), transparent 58%),
    radial-gradient(100% 100% at 100% 100%, color-mix(in srgb, var(--accent-2) 18%, transparent), transparent 52%),
    linear-gradient(165deg, #17171c, #0c0c0f);
  box-shadow: 0 30px 70px -30px #000, inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.passport::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 7px);
  opacity: 0.5;
  pointer-events: none;
}

.passport__top { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.passport__brand { font-size: 9.5px; font-weight: 700; letter-spacing: 0.22em; color: rgba(255, 255, 255, 0.7); }
.passport__tier { margin-left: auto; padding: 3px 8px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.18); font-size: 9px; font-weight: 700; letter-spacing: 0.1em; color: #fff; background: rgba(255, 255, 255, 0.08); }

.passport__id { display: flex; align-items: center; gap: 13px; }
.passport__ava { position: relative; width: 58px; height: 58px; border-radius: 15px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.2); display: grid; place-items: center; background: linear-gradient(150deg, color-mix(in srgb, var(--accent) 55%, #1a1a20), #15161b); flex: 0 0 auto; }
.passport__ava img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
.passport__ava span { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.passport__name { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.passport__handle { color: rgba(255, 255, 255, 0.5); font-size: 9.5px; letter-spacing: 0.08em; margin-top: 3px; }

.passport__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.passport__cell { padding: 9px 10px; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; background: rgba(255, 255, 255, 0.04); }
.passport__k { color: rgba(255, 255, 255, 0.45); font-size: 8px; letter-spacing: 0.09em; text-transform: uppercase; }
.passport__value { margin-top: 3px; font-size: 13px; font-weight: 650; letter-spacing: -0.02em; color: #fff; }

.passport__dna { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgba(255, 255, 255, 0.14); }
.passport__dna-label { color: rgba(255, 255, 255, 0.4); font-size: 8px; letter-spacing: 0.12em; text-transform: uppercase; }
.passport__dna-code { font-family: ui-monospace, "SFMono-Regular", Menlo, monospace; font-size: 11px; letter-spacing: 0.12em; color: rgba(255, 255, 255, 0.82); }
.passport__note { margin-top: 10px; color: rgba(255, 255, 255, 0.35); font-size: 8px; letter-spacing: 0.05em; }

.passport__genres { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 12px; }
.passport__genre { padding: 3px 7px; border-radius: 5px; border: 1px solid rgba(255, 255, 255, 0.12); font-size: 8.5px; color: rgba(255, 255, 255, 0.65); }

.passport-actions { display: flex; flex-direction: column; gap: 8px; }

.bb {
  width: 100%;
  min-height: 190px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.35);
  color: var(--muted);
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 10.5px;
  line-height: 1.55;
  resize: vertical;
  outline: none;
}

/* ------------------------------ utilities -------------------------------- */

.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.muted { color: var(--muted); }
.tiny { font-size: 10.5px; }
.strong { color: var(--text); font-weight: 600; }
.center { text-align: center; }

/* ------------------------------ responsive ------------------------------- */

@media (max-width: 1080px) {
  .s3 { grid-column: span 4; }
  .s5 { grid-column: span 6; }
  .s7 { grid-column: span 12; }
  .s8 { grid-column: span 7; }
  .s9 { grid-column: span 12; }
  .passport-layout { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 900px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .brand__text { font-size: 12.5px; }
  .seg--lang .seg__btn, .seg--cur .seg__btn { padding: 5px 7px; font-size: 10.5px; }
  .topbar__tools { gap: 6px; }
  .s4, .s6, .s8 { grid-column: span 12; }
  .s3 { grid-column: span 6; }
  .s5 { grid-column: span 12; }
}

@media (max-width: 680px) {
  body { font-size: 14px; }
  .hero { padding-top: 34px; }
  .hero__sub { font-size: 13.5px; }
  .search { flex-wrap: wrap; padding: 10px; gap: 8px; }
  .search__icon { display: none; }
  .search__input { flex: 1 1 100%; height: 34px; padding: 0 6px; }
  .search__go { flex: 1 1 100%; justify-content: center; }
  .hero__meta { gap: 10px; }
  .frames { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .profile { padding: 16px; gap: 14px; }
  .profile__avatar { width: 62px; height: 62px; border-radius: 17px; }
  .profile__name { font-size: 20px; }
  .game { grid-template-columns: 62px minmax(0, 1fr) auto; gap: 10px; }
  .game__cover { width: 62px; height: 30px; }
  .game__hours { min-width: 46px; font-size: 11.5px; }
  .duel__row { grid-template-columns: 46px 1fr 1fr 46px; gap: 6px; }
  .compare-inputs { grid-template-columns: 1fr; }
  .compare-inputs .duel__vs { display: none; }
  .passport__grid { grid-template-columns: repeat(2, 1fr); }
  .modal { padding: 2vh 10px 10px; }
  .footer { font-size: 10.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
  html { scroll-behavior: auto; }
}

/* --------------------------- print / capture ----------------------------- */

@media print {
  .topbar, .footer, .hero, .toasts, .modal__backdrop { display: none !important; }
  body, .card, .profile { background: #0a0a0c !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =========================================================================
   Refactor layer — header ticker, sidebar, presence, profile backdrop
   ========================================================================= */

/* ---- sticky header (topbar + ticker move together) ---------------------- */

.site-head { position: sticky; top: 0; z-index: 60; }

.topbar {
  position: relative;
  top: auto;
  z-index: 61;
}

/* ---- global hall-of-fame ticker ---------------------------------------- */

.ticker {
  position: relative;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  height: 46px;
  padding-left: clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
  background: rgba(10, 10, 12, 0.82);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
}

.ticker__label {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.ticker__label i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 9px var(--good);
  animation: ticker-pulse 2.4s ease-in-out infinite;
}

@keyframes ticker-pulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.ticker__viewport {
  flex: 1 1 auto;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 28px, #000 calc(100% - 28px), transparent);
}

.ticker__track {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 7px 0;
  animation: ticker-scroll 76s linear infinite;
  will-change: transform;
}

.ticker:hover .ticker__track { animation-play-state: paused; }
.ticker.is-empty .ticker__track { animation: none; }

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.tick-card {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  margin-right: 10px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.2s var(--ease), background 0.2s var(--ease);
}

.tick-card:hover { border-color: var(--line-strong); background: rgba(255, 255, 255, 0.065); }

.tick-card__k {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tick-card__v {
  color: var(--text);
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.tick-card__who { color: var(--muted); font-size: 10.5px; }

.tick-event {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  cursor: pointer;
}

.tick-event:hover { color: var(--text-soft); }
.tick-event b { color: var(--text-soft); font-weight: 600; }
.tick-event__dot { width: 4px; height: 4px; border-radius: 50%; background: var(--accent-2); }

.tick-empty {
  padding-left: 8px;
  color: var(--muted-2);
  font-size: 11.5px;
  white-space: nowrap;
}

/* ---- shell + sidebar ---------------------------------------------------- */

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.shell.has-nav { grid-template-columns: 196px minmax(0, 1fr); }

.content { min-width: 0; }

.sidebar {
  position: sticky;
  top: 122px;
  z-index: 20;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.012));
  box-shadow: 0 20px 44px -30px rgba(0, 0, 0, 0.9);
}

.side-tab {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 11px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.side-tab:hover { color: var(--text-soft); background: rgba(255, 255, 255, 0.035); }

.side-tab.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.075);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.side-tab .tab__dot { opacity: 0.35; }
.side-tab.is-active .tab__dot {
  opacity: 1;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}

/* when a profile is open, the hero is gone — tighten the top spacing */
.shell.has-nav .content > .results { margin-top: clamp(18px, 3vw, 30px); }

/* ---- profile background in the gutters --------------------------------- */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s var(--ease);
}

body.has-profile-bg .backdrop { opacity: 1; }

.backdrop__side {
  position: absolute;
  top: 0;
  bottom: 0;
  width: min(19vw, 320px);
  background-image: var(--profile-bg);
  background-size: cover;
  background-position: center;
  filter: blur(26px) saturate(1.15) brightness(0.52);
  opacity: 0.62;
}

.backdrop__side--l {
  left: 0;
  mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
}

.backdrop__side--r {
  right: 0;
  mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(270deg, #000 0%, rgba(0, 0, 0, 0.45) 55%, transparent 100%);
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 10, 12, 0.35), rgba(10, 10, 12, 0.12) 45%, rgba(10, 10, 12, 0.85));
}

/* ---- animated avatar + presence ---------------------------------------- */

.profile__avatar video {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.profile__dot.is-online { background: var(--good); box-shadow: 0 0 10px var(--good); }
.profile__dot.is-away { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
.profile__dot.is-busy { background: var(--bad); box-shadow: 0 0 10px var(--bad); }
.profile__dot.is-muted { background: var(--muted-2); }

.presence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12.5px;
}

.presence__dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted-2);
}

.presence__dot.is-online { background: var(--good); box-shadow: 0 0 9px var(--good); }
.presence__dot.is-away { background: var(--warn); box-shadow: 0 0 9px var(--warn); }
.presence__dot.is-busy { background: var(--bad); box-shadow: 0 0 9px var(--bad); }
.presence__dot.is-offline { background: var(--muted-2); }

.presence--muted .presence__text,
.presence--offline .presence__text { color: var(--muted); }

.presence__join {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border: 1px solid color-mix(in srgb, var(--good) 40%, transparent);
  border-radius: 999px;
  color: var(--good);
  font-size: 11px;
  font-weight: 600;
  transition: background 0.18s var(--ease);
}

.presence__join:hover { background: color-mix(in srgb, var(--good) 14%, transparent); }

/* ---- overview additions ------------------------------------------------ */

.curator {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 72ch;
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.68;
}

.curator__lead { color: var(--text-soft); font-size: 14px; }

.acc-list { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.acc-list .metric b { color: var(--bad); }

.value-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.value-rows .metric { align-items: center; gap: 10px; }
.value-rows .metric span { flex: 0 0 auto; }
.value-rows .metric b {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.promo {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.promo__code {
  margin-top: 3px;
  font-family: ui-monospace, "SFMono-Regular", Menlo, monospace;
  font-size: 16px;
  letter-spacing: 0.16em;
  color: #fff;
}

.promo__text { flex: 1 1 260px; }

/* ---- library smart pick ------------------------------------------------ */

.pick {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
}

.pick__cover {
  flex: 0 0 auto;
  display: block;
  width: 168px;
  height: 79px;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(140deg, #24202f, #171a20);
  border: 1px solid var(--line);
  box-shadow: 0 12px 26px -16px rgba(0, 0, 0, 0.9);
}

.pick__meta { flex: 1 1 260px; min-width: 0; }

.pick__name {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.pick__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.tag-soft {
  margin-left: 7px;
  padding: 1px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted-2);
  font-size: 9px;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}

/* ---- passport cleanup -------------------------------------------------- */

.passport__tier { letter-spacing: 0.08em; text-transform: uppercase; }

/* ---- responsive -------------------------------------------------------- */

@media (max-width: 1080px) {
  .shell.has-nav { grid-template-columns: 172px minmax(0, 1fr); gap: 20px; }
  .side-tab { padding: 9px 10px; font-size: 12px; }
}

@media (max-width: 900px) {
  .shell.has-nav { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .sidebar { position: static; z-index: 1; }
  .side-nav {
    flex-direction: row;
    gap: 4px;
    padding: 5px;
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: 14px;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-tab { padding: 8px 12px; font-size: 12px; border-radius: 10px; }
  .tick-card__k { display: none; }
  .backdrop__side { width: 26vw; opacity: 0.45; }
}

@media (max-width: 680px) {
  .ticker { height: 42px; gap: 9px; }
  .ticker__label span { display: none; }
  .ticker__label { padding-right: 9px; }
  .tick-card { padding: 6px 10px; }
  .tick-card__who { display: none; }
  .pick__cover { width: 100%; height: 118px; }
  .pick__actions { width: 100%; margin-left: 0; }
  .pick__actions .btn { flex: 1 1 0; justify-content: center; }
  .promo { align-items: flex-start; }
  .promo .btn { width: 100%; justify-content: center; }
  .presence { font-size: 12px; }
  .friend { grid-template-columns: 12px 34px minmax(0, 1fr) auto; gap: 8px; padding: 9px 10px; }
  .friend__ava { width: 34px; height: 34px; }
  .friends--scroll { max-height: 330px; }
}

@media print {
  .site-head, .sidebar, .backdrop { display: none !important; }
  .shell.has-nav { grid-template-columns: minmax(0, 1fr); }
}
