:root {
  --bg: #100916;
  --panel: rgba(17, 17, 24, 0.72);
  --muted: #91a0b6;
  --text: #eef3fb;
  --str: #d33a19;
  --agi: #20c53c;
  --int: #19a6d8;
  --all: #d48922;
  --tile-w: 50px;
  --tile-h: 86px;
  --tile-gap: 8px;
}

* { box-sizing: border-box; }

html,
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, sans-serif;
  overflow-x: hidden;
}

body {
  background:
    radial-gradient(circle at 50% 18%, rgba(111, 88, 118, 0.42), transparent 25%),
    radial-gradient(circle at 58% 38%, rgba(77, 47, 89, 0.32), transparent 34%),
    linear-gradient(180deg, #17111f 0%, #130719 36%, #0b0611 100%);
}

button { font: inherit; }

.is-hidden { display: none !important; }

.app-shell {
  position: relative;
  min-height: 100vh;
}

.access-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 28px;
  text-align: center;
  background:
    linear-gradient(180deg, rgba(12, 9, 18, 0.72), rgba(9, 5, 13, 0.96)),
    radial-gradient(circle at center, rgba(99, 116, 135, 0.18), transparent 46%);
}

.access-kicker {
  color: #9baabd;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.28em;
}

.access-title {
  max-width: 640px;
  font-family: "Marcellus SC", serif;
  font-size: clamp(28px, 6vw, 58px);
  letter-spacing: 0.08em;
  text-shadow: 0 0 28px rgba(180, 215, 255, 0.25);
}

.access-copy {
  max-width: 520px;
  color: #aab4c3;
  font-size: 15px;
  line-height: 1.5;
}

.login-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 12px;
}

.login-button {
  min-width: 160px;
  height: 44px;
  border: 1px solid rgba(188, 204, 226, 0.28);
  background: linear-gradient(180deg, #263241, #151b23);
  color: #eff7ff;
  font-weight: 900;
  letter-spacing: 0.16em;
  cursor: pointer;
}

.login-button-kick {
  background: linear-gradient(180deg, #24452d, #142319);
}

.hero-stage {
  position: relative;
  min-height: 100vh;
  padding: clamp(38px, 6vh, 76px) clamp(12px, 3vw, 52px) 46px;
}

.stage-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(8, 5, 12, 0.7), transparent 16%, transparent 84%, rgba(8, 5, 12, 0.72)),
    linear-gradient(180deg, rgba(6, 4, 9, 0.32), transparent 18%, rgba(7, 3, 9, 0.82));
}

.session-chip {
  position: fixed;
  top: 14px;
  right: 16px;
  z-index: 20;
  min-width: 150px;
  padding: 8px 12px;
  border: 1px solid rgba(169, 188, 214, 0.18);
  background: rgba(10, 12, 17, 0.68);
  color: #b8c5d8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-align: center;
  backdrop-filter: blur(10px);
}

.hero-grid-wrap {
  position: relative;
  z-index: 1;
  width: min(1370px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(260px, 1.1fr) minmax(340px, 1.55fr) minmax(340px, 1.55fr) minmax(260px, 0.95fr);
  align-items: start;
  gap: clamp(18px, 2.2vw, 36px);
}

.hero-group {
  min-width: 0;
}

.hero-group-head {
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #8d99ad;
  font-size: 16px;
  font-weight: 900;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(150, 184, 216, 0.26);
}

.attr-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  box-shadow: 0 0 14px currentColor;
}

.hero-group[data-attr="str"] .hero-group-head { color: #b5a2a0; }
.hero-group[data-attr="str"] .attr-dot { color: var(--str); }
.hero-group[data-attr="agi"] .attr-dot { color: var(--agi); }
.hero-group[data-attr="int"] .attr-dot { color: var(--int); }
.hero-group[data-attr="all"] .attr-dot { color: var(--all); }

.hero-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), var(--tile-w));
  grid-auto-rows: var(--tile-h);
  gap: var(--tile-gap);
}

.hero-card {
  position: relative;
  width: var(--tile-w);
  height: var(--tile-h);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.055);
  background: #0b0b0e;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.38);
  transform: translateZ(0);
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  box-shadow: inset 0 -20px 18px rgba(0, 0, 0, 0.38), inset 0 0 0 1px rgba(255, 255, 255, 0.035);
  pointer-events: none;
}

.hero-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 180ms ease, filter 180ms ease;
}

.hero-card:hover img,
.hero-card.is-selected img {
  transform: scale(1.08);
  filter: saturate(1.18) contrast(1.08);
}

.hero-card.is-selected {
  outline: 2px solid #cfdff3;
  outline-offset: 1px;
  z-index: 2;
}

.hero-preview {
  position: fixed;
  z-index: 10;
  left: var(--preview-x, 50%);
  top: var(--preview-y, 50%);
  width: min(180px, 38vw);
  aspect-ratio: 0.68;
  transform: translate(-50%, -105%) scale(0.96);
  pointer-events: none;
  opacity: 0;
  border: 2px solid rgba(217, 229, 246, 0.62);
  background: #0a0a0d;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.65), 0 0 0 1px rgba(0, 0, 0, 0.8);
  transition: opacity 120ms ease, transform 120ms ease;
  overflow: hidden;
}

.hero-preview.is-visible {
  opacity: 1;
  transform: translate(-50%, -105%) scale(1);
}

.hero-preview-video,
.hero-preview-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-preview-img { opacity: 0; }

.hero-preview-name {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 12px 8px 10px;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.86));
  font-size: clamp(11px, 2.4vw, 14px);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
  text-shadow: 0 2px 5px #000;
}

@media (max-width: 1240px) {
  :root { --tile-w: 44px; --tile-h: 76px; --tile-gap: 6px; }
  .hero-grid-wrap { grid-template-columns: repeat(2, max-content); justify-content: center; }
}

@media (max-width: 720px) {
  :root { --tile-w: 38px; --tile-h: 66px; --tile-gap: 5px; }
  .hero-stage { padding-top: 54px; }
  .hero-grid-wrap { grid-template-columns: 1fr; justify-items: center; gap: 22px; }
  .hero-group { width: min-content; max-width: 100%; }
  .hero-group-head { font-size: 13px; height: 26px; }
  .session-chip { left: 12px; right: 12px; top: 10px; }
  .hero-preview { width: min(170px, 52vw); }
}
