:root {
  --bg-0: #030b17;
  --bg-1: #071529;
  --bg-2: #0c233d;
  --surface-0: rgba(10, 28, 47, 0.76);
  --surface-1: rgba(14, 37, 61, 0.72);
  --surface-border: rgba(180, 222, 255, 0.25);
  --surface-border-soft: rgba(180, 222, 255, 0.16);
  --surface-shadow: 0 26px 56px rgba(0, 0, 0, 0.4);
  --surface-inner: inset 0 1px 0 rgba(255, 255, 255, 0.2), inset 0 -1px 0 rgba(255, 255, 255, 0.06);
  --text-main: #eef7ff;
  --text-soft: #b3c9de;
  --accent-cyan: #5ad8ff;
  --accent-mint: #58efc9;
  --accent-sand: #ffc688;
  --ok: #64e4af;
  --bad: #ff9a9a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  position: relative;
  overflow-x: hidden;
  color: var(--text-main);
  font-family: "Manrope", "Segoe UI", sans-serif;
  background:
    radial-gradient(1200px 720px at -20% -8%, #16456d 0%, transparent 60%),
    radial-gradient(1000px 640px at 110% 0%, #1d5f5e 0%, transparent 54%),
    radial-gradient(900px 560px at 50% 120%, #1a4f75 0%, transparent 56%),
    linear-gradient(160deg, var(--bg-0) 0%, var(--bg-1) 48%, var(--bg-2) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 255, 255, 0.06) 0, transparent 45%),
    radial-gradient(circle at 82% 16%, rgba(255, 255, 255, 0.05) 0, transparent 40%),
    linear-gradient(120deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0));
  mix-blend-mode: soft-light;
  opacity: 0.78;
  z-index: 0;
}

.bg-layers {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.bg-orb,
.bg-wave {
  position: absolute;
  pointer-events: none;
}

.bg-orb {
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.6;
  animation: floatOrb 18s ease-in-out infinite;
}

.orb-a {
  width: 300px;
  height: 300px;
  top: -100px;
  right: -110px;
  background: radial-gradient(circle at 40% 35%, rgba(90, 216, 255, 0.54), rgba(90, 216, 255, 0));
}

.orb-b {
  width: 360px;
  height: 360px;
  left: -160px;
  bottom: 2%;
  background: radial-gradient(circle at 48% 45%, rgba(88, 239, 201, 0.54), rgba(88, 239, 201, 0));
  animation-delay: -6s;
}

.orb-c {
  width: 230px;
  height: 230px;
  left: 50%;
  top: 34%;
  transform: translateX(-50%);
  background: radial-gradient(circle at 50% 50%, rgba(255, 198, 136, 0.46), rgba(255, 198, 136, 0));
  animation-delay: -11s;
}

.bg-wave {
  border-radius: 999px;
  border: 1px solid rgba(225, 244, 255, 0.16);
  background: linear-gradient(125deg, rgba(184, 225, 255, 0.1), rgba(184, 225, 255, 0.02));
  opacity: 0.46;
  transform-origin: center;
  animation: driftWave 24s linear infinite;
}

.wave-a {
  width: 640px;
  height: 220px;
  left: -210px;
  top: 20%;
}

.wave-b {
  width: 530px;
  height: 170px;
  right: -170px;
  bottom: 20%;
  animation-direction: reverse;
  animation-duration: 30s;
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.65), transparent 84%);
}

.app {
  position: relative;
  z-index: 1;
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 12px calc(34px + var(--safe-bottom));
}

.card-surface {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid var(--surface-border-soft);
  background:
    linear-gradient(142deg, rgba(217, 242, 255, 0.13), rgba(217, 242, 255, 0.03)),
    linear-gradient(142deg, var(--surface-0), var(--surface-1));
  box-shadow: var(--surface-shadow), var(--surface-inner);
  backdrop-filter: blur(18px) saturate(128%);
  -webkit-backdrop-filter: blur(18px) saturate(128%);
}

.card-surface::before {
  content: "";
  position: absolute;
  inset: -70% -45%;
  background: linear-gradient(
    112deg,
    rgba(255, 255, 255, 0) 20%,
    rgba(255, 255, 255, 0.12) 45%,
    rgba(255, 255, 255, 0) 72%
  );
  transform: translate3d(-30%, 0, 0) rotate(10deg);
  animation: sweepGlass 16s linear infinite;
  pointer-events: none;
}

.card-surface::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.16);
  pointer-events: none;
}

.hero {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
  padding: 22px;
}

.hero-kicker {
  margin: 0;
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

#hero-title {
  margin: 8px 0 6px;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(30px, 5.4vw, 44px);
  line-height: 1.04;
}

.hero-subtitle {
  margin: 0;
  max-width: 45ch;
  color: #d3e9fa;
  font-size: clamp(14px, 2vw, 17px);
}

.hero-status {
  display: inline-block;
  margin: 12px 0 0;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(226, 243, 255, 0.24);
  background: rgba(191, 227, 251, 0.08);
  color: var(--text-soft);
  font-size: 13px;
}

.hero-chips {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.hero-chip {
  border-radius: 16px;
  border: 1px solid rgba(226, 243, 255, 0.2);
  background: rgba(179, 219, 246, 0.08);
  padding: 10px 12px;
}

.hero-chip span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #b7d2e6;
}

.hero-chip strong {
  display: block;
  margin-top: 3px;
  color: #f6fcff;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.desktop-tabs {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.tab {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(223, 242, 255, 0.2);
  border-radius: 16px;
  padding: 11px 12px;
  background:
    linear-gradient(142deg, rgba(208, 238, 255, 0.1), rgba(208, 238, 255, 0.03)),
    linear-gradient(140deg, rgba(9, 25, 41, 0.54), rgba(8, 19, 33, 0.48));
  color: var(--text-main);
  font: 700 16px/1.2 "Sora", "Segoe UI", sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tab::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0.14) 56%, rgba(255, 255, 255, 0) 78%);
  transform: translateX(-120%);
  transition: transform 0.44s ease;
}

.tab:hover {
  transform: translateY(-1px);
}

.tab:hover::before {
  transform: translateX(118%);
}

.tab-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(90, 216, 255, 0.72);
  box-shadow: 0 0 0 4px rgba(90, 216, 255, 0.14);
}

.tab.active {
  border-color: var(--surface-border);
  box-shadow: 0 10px 22px rgba(3, 14, 29, 0.36), inset 0 0 0 1px rgba(255, 255, 255, 0.13);
  background:
    radial-gradient(125% 170% at 84% -18%, rgba(255, 198, 136, 0.36), transparent 42%),
    linear-gradient(142deg, rgba(217, 241, 255, 0.14), rgba(217, 241, 255, 0.04)),
    linear-gradient(141deg, rgba(9, 25, 42, 0.65), rgba(8, 19, 33, 0.52));
}

.tab.active .tab-dot {
  background: var(--accent-sand);
  box-shadow: 0 0 0 4px rgba(255, 198, 136, 0.2);
}

.tab-label {
  white-space: nowrap;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
  animation: panelRise 0.32s ease;
}

.profile-card,
.leaderboard-card,
.settings-card,
.home-card {
  padding: 18px;
}

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

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field-button {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.fn-btn {
  width: 100%;
  margin-top: 10px;
}

.home-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.launch-pill {
  border: 1px solid rgba(200, 232, 255, 0.22);
  border-radius: 999px;
  background: rgba(183, 219, 243, 0.08);
  color: var(--text-soft);
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font: 700 12px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.launch-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(90, 216, 255, 0.8);
  box-shadow: 0 0 0 4px rgba(90, 216, 255, 0.16);
}

.launch-pill.active {
  color: #f3f9ff;
  border-color: rgba(255, 255, 255, 0.36);
  background:
    radial-gradient(150% 240% at 92% 10%, rgba(255, 198, 136, 0.34), transparent 50%),
    linear-gradient(135deg, rgba(222, 242, 255, 0.2), rgba(222, 242, 255, 0.07));
}

.launch-pill.active .launch-dot {
  background: var(--accent-sand);
  box-shadow: 0 0 0 4px rgba(255, 198, 136, 0.19);
}

.modern-function-grid {
  margin-top: 14px;
  gap: 14px;
}

.function-card-modern {
  border-radius: 18px;
  border: 1px solid rgba(226, 243, 255, 0.16);
  background:
    linear-gradient(136deg, rgba(201, 234, 255, 0.08), rgba(201, 234, 255, 0.02)),
    linear-gradient(140deg, rgba(9, 23, 37, 0.62), rgba(8, 18, 30, 0.52));
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.function-card-modern:hover {
  border-color: rgba(226, 243, 255, 0.28);
}

.function-card-modern.is-open {
  border-color: rgba(255, 255, 255, 0.34);
  box-shadow: 0 14px 28px rgba(2, 10, 20, 0.34);
}

.function-media {
  position: relative;
  min-height: 194px;
}

.function-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.03);
  transition: transform 0.35s ease;
}

.function-card-modern:hover .function-media img {
  transform: scale(1.08);
}

.function-media-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(3, 12, 22, 0.16) 12%, rgba(3, 12, 22, 0.72) 68%, rgba(3, 12, 22, 0.92) 100%),
    linear-gradient(120deg, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0));
}

.function-media-head {
  position: absolute;
  top: 12px;
  left: 12px;
  right: 12px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.function-badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(7, 22, 36, 0.56);
  color: #f4fbff;
  font: 800 10px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.09em;
}

.function-open {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  min-height: 28px;
  padding: 0 12px;
  background: rgba(8, 24, 39, 0.55);
  color: #ebf8ff;
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.function-open.active {
  border-color: rgba(255, 255, 255, 0.52);
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.1)),
    rgba(8, 24, 39, 0.55);
}

.function-media-copy {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  z-index: 2;
}

.function-media-copy .section-title {
  margin: 0;
  font-size: 22px;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #f7fcff;
}

.function-note {
  margin: 8px 0 0;
  color: #d5ebfa;
  line-height: 1.36;
  font-size: 14px;
  max-width: 35ch;
}

.function-body {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  border-top: 1px solid rgba(226, 243, 255, 0.14);
  padding: 0 12px;
  transition: max-height 0.32s ease, opacity 0.24s ease, padding 0.24s ease;
}

.function-card-modern.is-open .function-body {
  max-height: 520px;
  opacity: 1;
  padding: 12px;
}

.function-card-modern .fn-btn {
  margin-top: 0;
}

.prematch-mode-picker {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.prematch-mode-native {
  display: none;
}

.prematch-mode-option {
  width: 100%;
  text-align: left;
  border: 1px solid rgba(226, 243, 255, 0.18);
  border-radius: 16px;
  padding: 12px;
  background:
    linear-gradient(136deg, rgba(201, 234, 255, 0.08), rgba(201, 234, 255, 0.02)),
    linear-gradient(140deg, rgba(9, 23, 37, 0.58), rgba(8, 18, 30, 0.5));
  color: var(--text-main);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, background 0.2s ease;
}

.prematch-mode-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(226, 243, 255, 0.3);
}

.prematch-mode-option:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.prematch-mode-option.is-available {
  border-color: rgba(88, 239, 201, 0.44);
  background:
    radial-gradient(135% 170% at 18% 0%, rgba(88, 239, 201, 0.22), transparent 56%),
    linear-gradient(136deg, rgba(201, 234, 255, 0.08), rgba(201, 234, 255, 0.02)),
    linear-gradient(140deg, rgba(9, 23, 37, 0.58), rgba(8, 18, 30, 0.5));
  box-shadow: inset 0 0 0 1px rgba(88, 239, 201, 0.08);
}

.prematch-mode-option.is-active {
  border-color: rgba(88, 239, 201, 0.7);
  box-shadow: 0 12px 24px rgba(31, 102, 85, 0.24), inset 0 0 0 1px rgba(131, 255, 218, 0.14);
}

.prematch-mode-option.is-locked {
  border-color: rgba(255, 154, 154, 0.24);
}

.prematch-mode-title {
  display: block;
  font: 800 14px/1.1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.prematch-mode-note {
  display: block;
  margin-top: 6px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.35;
}

.function-result {
  margin-top: 14px;
  border-radius: 16px;
  border: 1px solid rgba(226, 243, 255, 0.22);
  background:
    linear-gradient(136deg, rgba(201, 234, 255, 0.08), rgba(201, 234, 255, 0.02)),
    linear-gradient(140deg, rgba(9, 23, 37, 0.58), rgba(8, 18, 30, 0.5));
  padding: 12px;
}

.function-result.hidden {
  display: none;
}

.function-result-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

#fn-result-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(226, 243, 255, 0.18);
  display: block;
}

.result-extra-grid {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.result-extra-grid:empty {
  display: none;
}

.result-extra-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(226, 243, 255, 0.18);
  background: rgba(11, 27, 44, 0.58);
}

.result-extra-card img {
  width: 100%;
  display: block;
}

.result-extra-note {
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  color: #d4e9f9;
  line-height: 1.35;
}

.result-caption {
  margin: 10px 0 0;
  color: #d8edf9;
  line-height: 1.4;
  white-space: pre-wrap;
}

.result-caption:empty {
  display: none;
}

.result-browser.hidden {
  display: none;
}

.prematch-browser-shell {
  margin-top: 12px;
  display: grid;
  gap: 12px;
}

.prematch-hero,
.prematch-panel {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(226, 243, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(199, 229, 255, 0.08), rgba(199, 229, 255, 0.02)),
    linear-gradient(145deg, rgba(8, 19, 33, 0.84), rgba(6, 15, 26, 0.78));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.prematch-hero {
  padding: 18px;
}

.prematch-hero-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.prematch-kicker {
  color: var(--accent-cyan);
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.prematch-map-title {
  margin: 10px 0 8px;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(28px, 5vw, 42px);
  line-height: 1;
}

.prematch-summary,
.prematch-note {
  margin: 0;
  color: #d3e7f7;
  line-height: 1.5;
}

.prematch-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(90, 216, 255, 0.16);
  background: rgba(90, 216, 255, 0.08);
}

.prematch-metrics {
  display: grid;
  gap: 10px;
}

.prematch-metric {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(226, 243, 255, 0.12);
  background: rgba(177, 216, 244, 0.06);
}

.prematch-metric-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a9c7df;
}

.prematch-metric-value {
  display: block;
  margin-top: 6px;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 17px;
  color: #f3fbff;
}

.prematch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.prematch-panel {
  padding: 16px;
}

.prematch-panel-plan,
.prematch-panel-opponents,
.prematch-panel-recommendations {
  min-height: 100%;
}

.prematch-panel-title {
  margin: 0 0 14px;
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #a9c7df;
}

.prematch-weak-zone {
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.05;
  color: #fbfdff;
}

.prematch-weak-target,
.prematch-weak-reason,
.prematch-weak-plan {
  margin: 10px 0 0;
  color: #d4e7f7;
  line-height: 1.5;
}

.prematch-weak-plan {
  padding-top: 10px;
  border-top: 1px solid rgba(226, 243, 255, 0.1);
  color: #f2f9ff;
}

.prematch-opponent-spotlight {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.prematch-spotlight-chip {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: #f5fbff;
  background: rgba(194, 227, 249, 0.09);
  border: 1px solid rgba(194, 227, 249, 0.12);
}

.prematch-spotlight-chip.weakest {
  border-color: rgba(255, 154, 154, 0.22);
  background: rgba(255, 154, 154, 0.08);
}

.prematch-spotlight-chip.strongest {
  border-color: rgba(100, 228, 175, 0.22);
  background: rgba(100, 228, 175, 0.08);
}

.prematch-opponents-table {
  display: grid;
  gap: 8px;
}

.prematch-opponents-row {
  display: grid;
  grid-template-columns: minmax(180px, 2.2fr) repeat(5, minmax(0, 0.75fr));
  gap: 8px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(177, 216, 244, 0.05);
  border: 1px solid rgba(226, 243, 255, 0.08);
}

.prematch-opponents-head {
  background: transparent;
  border: none;
  padding: 0 4px;
  color: #98b8cf;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.prematch-opponents-head span:not(:first-child),
.prematch-opponents-row > span {
  text-align: right;
}

.prematch-opponent-player {
  min-width: 0;
}

.prematch-opponent-name {
  display: block;
  font-size: 14px;
  color: #f5fbff;
}

.prematch-opponent-meta {
  display: block;
  margin-top: 4px;
  color: #9fbcd2;
  font-size: 12px;
}

.prematch-panel-body {
  display: grid;
  gap: 8px;
}

.prematch-list-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(177, 216, 244, 0.05);
  border: 1px solid rgba(226, 243, 255, 0.08);
}

.prematch-list-copy {
  min-width: 0;
}

.prematch-list-title {
  color: #f5fbff;
  font-size: 14px;
  font-weight: 700;
}

.prematch-list-meta {
  margin-top: 4px;
  color: #a7c1d5;
  font-size: 12px;
  line-height: 1.45;
}

.prematch-list-accent {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  padding: 6px 8px;
  border-radius: 999px;
  border: 1px solid rgba(90, 216, 255, 0.18);
  background: rgba(90, 216, 255, 0.08);
  color: #eaf8ff;
  font-size: 12px;
}

.prematch-recommendation {
  position: relative;
  padding: 11px 12px 11px 18px;
  border-radius: 14px;
  background: rgba(177, 216, 244, 0.05);
  border: 1px solid rgba(226, 243, 255, 0.08);
  color: #f5fbff;
  line-height: 1.45;
}

.prematch-recommendation::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 16px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent-sand);
  box-shadow: 0 0 0 4px rgba(255, 198, 136, 0.12);
}

.prematch-empty {
  margin: 0;
  padding: 12px;
  border-radius: 14px;
  background: rgba(177, 216, 244, 0.04);
  border: 1px dashed rgba(226, 243, 255, 0.12);
  color: #96b3c7;
}

.profile-top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.profile-avatar-wrap {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  position: relative;
  border: 1px solid rgba(226, 243, 255, 0.3);
  background: rgba(184, 219, 242, 0.12);
  overflow: hidden;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: #f4fcff;
}

#profile-user-handle {
  margin: 0;
}

.faceit-link-card {
  margin-top: 12px;
  border-radius: 16px;
  border: 1px solid rgba(226, 243, 255, 0.16);
  background:
    linear-gradient(136deg, rgba(201, 234, 255, 0.08), rgba(201, 234, 255, 0.02)),
    linear-gradient(140deg, rgba(9, 23, 37, 0.58), rgba(8, 18, 30, 0.5));
  padding: 12px;
}

.faceit-link-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.profile-headline h2 {
  margin: 0 0 12px;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(26px, 4.6vw, 38px);
}

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

.info-item,
.board-block,
.board-self {
  border-radius: 16px;
  border: 1px solid rgba(226, 243, 255, 0.16);
  background:
    linear-gradient(136deg, rgba(201, 234, 255, 0.08), rgba(201, 234, 255, 0.02)),
    linear-gradient(140deg, rgba(9, 23, 37, 0.58), rgba(8, 18, 30, 0.5));
  padding: 11px 12px;
}

.info-label {
  display: block;
  margin-bottom: 4px;
  color: var(--text-soft);
  font-size: 12px;
}

.info-value {
  display: block;
  color: #f7fdff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
  word-break: break-word;
}

.card-title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(22px, 4.2vw, 32px);
}

.leaderboard-card .muted {
  margin: 8px 0 14px;
}

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

.board-self {
  margin-top: 10px;
}

.section-title {
  margin: 0 0 8px;
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.rank-list,
.self-list {
  margin: 0;
  padding-left: 18px;
}

.rank-list li,
.self-list li {
  margin: 8px 0;
  line-height: 1.35;
}

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

.field {
  display: block;
}

.field span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-soft);
  font-size: 12px;
}

select,
input[type="number"],
input[type="text"],
textarea {
  width: 100%;
  border: 1px solid rgba(226, 243, 255, 0.24);
  border-radius: 14px;
  background:
    linear-gradient(132deg, rgba(206, 236, 255, 0.1), rgba(206, 236, 255, 0.03)),
    linear-gradient(138deg, rgba(7, 20, 32, 0.62), rgba(7, 20, 31, 0.52));
  color: var(--text-main);
  padding: 10px 12px;
  font: 600 15px/1.2 "Manrope", "Segoe UI", sans-serif;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

select:focus,
input[type="number"]:focus,
input[type="text"]:focus,
textarea:focus {
  border-color: rgba(88, 239, 201, 0.55);
  box-shadow: 0 0 0 4px rgba(88, 239, 201, 0.16);
  outline: none;
}

.actions {
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.config-vault {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(226, 243, 255, 0.16);
  background:
    linear-gradient(136deg, rgba(201, 234, 255, 0.08), rgba(201, 234, 255, 0.02)),
    linear-gradient(140deg, rgba(9, 23, 37, 0.58), rgba(8, 18, 30, 0.5));
  padding: 12px;
}

.config-vault .section-title {
  margin-bottom: 6px;
}

.config-vault .muted {
  margin: 0 0 10px;
}

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

.config-import {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.config-import textarea {
  min-height: 118px;
  resize: vertical;
}

#config-status {
  margin: 12px 0 0;
}

.config-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.config-item {
  border-radius: 12px;
  border: 1px solid rgba(226, 243, 255, 0.16);
  background: rgba(16, 37, 58, 0.48);
  padding: 10px;
  display: grid;
  gap: 8px;
}

.config-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.config-item-name {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: 13px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.config-item-meta {
  margin: 4px 0 0;
  color: var(--text-soft);
  font-size: 12px;
}

.config-item-actions {
  display: flex;
  gap: 8px;
}

.config-btn {
  border: 1px solid rgba(226, 243, 255, 0.28);
  border-radius: 10px;
  min-height: 32px;
  padding: 0 10px;
  background: rgba(182, 221, 248, 0.08);
  color: #edf7ff;
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
}

.config-btn.danger {
  border-color: rgba(255, 155, 155, 0.38);
  color: #ffd1d1;
  background: rgba(120, 34, 34, 0.25);
}

.btn {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 14px;
  padding: 11px 18px;
  font: 800 15px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.03em;
  color: #092234;
  background:
    linear-gradient(132deg, rgba(255, 255, 255, 0.86), rgba(220, 250, 255, 0.82) 35%, rgba(192, 255, 230, 0.86) 62%, rgba(255, 214, 171, 0.88) 100%);
  box-shadow: 0 10px 26px rgba(69, 205, 179, 0.24);
  cursor: pointer;
}

.btn::before {
  content: "";
  position: absolute;
  inset: -120% 42%;
  background: linear-gradient(110deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0));
  transform: rotate(20deg);
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

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

a.link {
  color: #bcecff;
  text-decoration: none;
  border-bottom: 1px dashed rgba(188, 236, 255, 0.52);
}

a.link:hover {
  color: #ecfbff;
}

.status-ok {
  color: var(--ok);
}

.status-bad {
  color: var(--bad);
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(10px + var(--safe-bottom));
  transform: translateX(-50%);
  width: min(560px, calc(100% - 16px));
  padding: 6px;
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  z-index: 30;
  border-radius: 20px;
}

.bottom-nav.card-surface::before {
  opacity: 0.42;
}

.bottom-nav.card-surface::after {
  opacity: 0.5;
}

.bottom-tab {
  border: 0;
  border-radius: 14px;
  min-height: 58px;
  padding: 7px 6px;
  background: transparent;
  color: var(--text-soft);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font: 700 11px/1.1 "Sora", "Segoe UI", sans-serif;
}

.bottom-tab::before {
  display: none;
}

.bottom-tab .tab-dot {
  display: none;
}

.bottom-icon {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #c7dcf0;
  background: linear-gradient(160deg, rgba(200, 233, 255, 0.12), rgba(200, 233, 255, 0.04));
  border: 1px solid rgba(198, 232, 255, 0.2);
}

.bottom-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-tab.active {
  color: var(--text-main);
  background:
    radial-gradient(100% 160% at 80% -20%, rgba(255, 198, 136, 0.24), transparent 48%),
    linear-gradient(145deg, rgba(201, 235, 255, 0.13), rgba(201, 235, 255, 0.03));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.bottom-tab.active .bottom-icon {
  color: #f3f9ff;
  border-color: rgba(255, 255, 255, 0.42);
  background:
    radial-gradient(120% 130% at 20% 20%, rgba(90, 216, 255, 0.35), transparent 62%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.05));
}

body.desktop-shell .app {
  width: min(1720px, 100%);
  padding: 22px 18px 34px;
}

body.desktop-shell .desktop-tabs {
  grid-template-columns: repeat(4, max-content);
  justify-content: flex-start;
  gap: 10px;
}

body.desktop-shell .home-toolbar {
  display: none;
}

body.desktop-shell .modern-function-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

body.desktop-shell .function-open {
  display: none;
}

body.desktop-shell .function-body {
  max-height: 580px;
  opacity: 1;
  padding: 12px;
}

body.desktop-shell .function-card-modern {
  border-color: rgba(226, 243, 255, 0.3);
}

body.desktop-shell .profile-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body.desktop-shell .settings-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body.desktop-shell .config-create {
  grid-template-columns: 1fr auto;
}

body.desktop-shell .prematch-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

body.desktop-shell .prematch-panel-plan {
  grid-column: span 4;
}

body.desktop-shell .prematch-panel-opponents {
  grid-column: span 8;
}

body.desktop-shell .prematch-panel-ct {
  grid-column: span 4;
}

body.desktop-shell .prematch-panel-recommendations {
  grid-column: span 8;
}

body.desktop-shell .bottom-nav {
  display: none !important;
}

.public-prematch-page {
  position: relative;
  z-index: 1;
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 24px 14px 40px;
}

.public-prematch-shell {
  padding: 22px;
}

.public-prematch-head {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.public-prematch-title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(30px, 5vw, 44px);
  line-height: 1.02;
}

.public-prematch-subtitle {
  margin: 0;
  max-width: 56ch;
  color: var(--text-soft);
}

.public-prematch-loader,
.public-prematch-error {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--surface-border-soft);
  background: rgba(8, 20, 37, 0.55);
}

.public-prematch-loader {
  grid-template-columns: auto 1fr;
}

.public-prematch-spinner {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  border: 3px solid rgba(255, 255, 255, 0.16);
  border-top-color: var(--accent-cyan);
  border-right-color: var(--accent-mint);
  animation: publicSpinner 0.95s linear infinite;
}

.public-prematch-loader-title {
  font: 700 18px/1.2 "Sora", "Segoe UI", sans-serif;
  color: var(--text-main);
}

.public-prematch-loader-note {
  margin: 6px 0 0;
  color: var(--text-soft);
}

.public-prematch-error {
  color: #ffd5d5;
  font-weight: 600;
}

.public-prematch-result {
  min-height: 280px;
}

.prematch-demo-assist {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
  padding: 20px;
  border-radius: 26px;
  border: 1px solid rgba(102, 210, 255, 0.24);
  background:
    radial-gradient(circle at top right, rgba(72, 181, 255, 0.16), transparent 34%),
    linear-gradient(180deg, rgba(10, 24, 43, 0.92), rgba(7, 18, 34, 0.88));
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.22);
}

.prematch-demo-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.prematch-demo-copy {
  display: grid;
  gap: 10px;
}

.prematch-demo-title {
  margin: 0;
  font: 800 24px/1.06 "Sora", "Segoe UI", sans-serif;
  color: var(--text-main);
}

.prematch-demo-body,
.prematch-demo-helper,
.prematch-demo-status {
  margin: 0;
  color: var(--text-soft);
}

.prematch-demo-helper {
  font-size: 13px;
}

.prematch-demo-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 10px;
  min-width: min(100%, 270px);
}

.prematch-demo-stat {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
}

.prematch-demo-stat span {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-fade);
}

.prematch-demo-stat strong {
  font: 800 24px/1 "Sora", "Segoe UI", sans-serif;
  color: var(--text-main);
}

.prematch-demo-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 22px;
  color: var(--text-main);
}

.prematch-demo-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.prematch-demo-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 16px;
  border: 1px solid rgba(92, 204, 255, 0.3);
  background: linear-gradient(180deg, rgba(57, 182, 255, 0.22), rgba(30, 138, 196, 0.12));
  color: #eef8ff;
  font: 700 14px/1 "Manrope", "Segoe UI", sans-serif;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.prematch-demo-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(114, 219, 255, 0.48);
  background: linear-gradient(180deg, rgba(57, 182, 255, 0.28), rgba(30, 138, 196, 0.18));
}

.prematch-demo-btn.ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.12);
}

.prematch-demo-script-wrap {
  display: grid;
  gap: 10px;
}

.prematch-demo-script-label {
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-fade);
}

.prematch-demo-script {
  width: 100%;
  min-height: 240px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(3, 9, 20, 0.86);
  color: #d9efff;
  font: 500 13px/1.55 "Consolas", "SFMono-Regular", monospace;
  resize: vertical;
}

.prematch-demo-status[data-state="success"] {
  color: #8fe4c8;
}

.prematch-demo-status[data-state="error"] {
  color: #ffd2d2;
}

@media (min-width: 1400px) {
  body.desktop-shell .modern-function-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@keyframes panelRise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, 20px, 0);
  }
}

@keyframes driftWave {
  0% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
  50% {
    transform: rotate(6deg) translate3d(14px, -8px, 0);
  }
  100% {
    transform: rotate(0deg) translate3d(0, 0, 0);
  }
}

@keyframes sweepGlass {
  0% {
    transform: translate3d(-38%, 0, 0) rotate(10deg);
  }
  100% {
    transform: translate3d(42%, 0, 0) rotate(10deg);
  }
}

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

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .hero-chips {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .desktop-tabs {
    display: none;
  }

  .bottom-nav {
    display: grid;
  }

  .app {
    padding-bottom: calc(106px + var(--safe-bottom));
  }
}

@media (max-width: 760px) {
  .home-toolbar {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .home-toolbar::-webkit-scrollbar {
    display: none;
  }

  .launch-pill {
    flex: 0 0 auto;
  }

  .function-media {
    min-height: 176px;
  }

  .public-prematch-shell {
    padding: 18px;
  }

  .public-prematch-loader {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .prematch-demo-head {
    grid-template-columns: 1fr;
  }

  .prematch-demo-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    min-width: 0;
  }

  .public-prematch-spinner {
    width: 46px;
    height: 46px;
  }

  .function-media-copy .section-title {
    font-size: 20px;
  }

  .profile-grid,
  .function-grid,
  .settings-grid,
  .leaderboard-grid {
    grid-template-columns: 1fr;
  }

  .prematch-demo-script {
    min-height: 300px;
  }

  .row-2,
  .faceit-link-row,
  .config-create,
  .prematch-mode-picker {
    grid-template-columns: 1fr;
  }

  .hero-chips {
    grid-template-columns: 1fr;
  }

  .result-extra-grid {
    grid-template-columns: 1fr;
  }

  .prematch-grid,
  .prematch-hero-top {
    grid-template-columns: 1fr;
  }

  .prematch-opponents-row {
    grid-template-columns: minmax(0, 1.8fr) repeat(5, minmax(36px, 1fr));
    padding: 10px;
    font-size: 12px;
  }
}

@media (max-width: 500px) {
  .app {
    padding: 16px 10px calc(102px + var(--safe-bottom));
  }

  .card-surface {
    border-radius: 20px;
  }

  .profile-card,
  .leaderboard-card,
  .settings-card,
  .home-card {
    padding: 14px;
  }

  .actions {
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .prematch-demo-actions {
    flex-direction: column;
  }

  .prematch-demo-btn {
    width: 100%;
  }

  .function-media {
    min-height: 164px;
  }

  .function-media-copy {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .function-media-copy .section-title {
    font-size: 18px;
  }

  .function-note {
    margin-top: 6px;
    font-size: 13px;
  }

  .function-open {
    min-height: 26px;
    font-size: 10px;
  }

  .config-item-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .config-item-actions {
    width: 100%;
  }

  .config-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .bottom-nav {
    width: calc(100% - 12px);
    bottom: calc(6px + var(--safe-bottom));
  }

  .bottom-tab {
    min-height: 56px;
    font-size: 10px;
  }

  .prematch-map-title {
    font-size: 26px;
  }

  .prematch-opponents-row {
    grid-template-columns: 1.5fr repeat(5, minmax(28px, 1fr));
    gap: 6px;
    padding: 8px;
  }

  .prematch-opponent-name {
    font-size: 13px;
  }

  .prematch-opponent-meta,
  .prematch-list-meta {
    font-size: 11px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .bg-orb,
  .bg-wave,
  .card-surface::before {
    animation: none;
  }

  .tab,
  .tab::before {
    transition: none;
  }
}

.public-prematch-page {
  position: relative;
  z-index: 1;
  width: min(1240px, 100%);
  margin: 0 auto;
  padding: 28px 18px 56px;
  display: grid;
  gap: 28px;
}

.public-prematch-hero {
  display: grid;
  gap: 24px;
}

.public-prematch-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #eef8ff;
  font: 800 13px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.public-prematch-brand-mark {
  width: 38px;
  height: 18px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.2)),
    linear-gradient(90deg, rgba(90, 216, 255, 0.8), rgba(88, 239, 201, 0.38));
  box-shadow: 0 0 26px rgba(90, 216, 255, 0.3);
}

.public-prematch-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: 22px;
  align-items: stretch;
}

.public-prematch-copy {
  display: grid;
  align-content: start;
  gap: 18px;
  max-width: 720px;
}

.public-prematch-eyebrow {
  margin: 0;
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.public-prematch-title {
  margin: 0;
  max-width: 12ch;
  font-family: "Sora", "Segoe UI", sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: -0.03em;
}

.public-prematch-subtitle {
  margin: 0;
  max-width: 62ch;
  color: #d4e6f5;
  font-size: clamp(15px, 2vw, 18px);
  line-height: 1.62;
}

.public-prematch-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.public-prematch-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-prematch-trust-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(180, 222, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #ecf8ff;
  font-size: 13px;
}

.public-prematch-showcase {
  position: relative;
}

.public-prematch-showcase-shell {
  position: relative;
  height: 100%;
  min-height: 360px;
  padding: 22px;
  border-radius: 28px;
  border: 1px solid rgba(181, 226, 255, 0.16);
  background:
    radial-gradient(circle at 80% 20%, rgba(255, 160, 160, 0.12), transparent 26%),
    radial-gradient(circle at 20% 18%, rgba(90, 216, 255, 0.15), transparent 24%),
    linear-gradient(145deg, rgba(10, 24, 41, 0.9), rgba(5, 14, 27, 0.88));
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.public-prematch-showcase-shell::before,
.public-prematch-showcase-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.public-prematch-showcase-shell::before {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.76), transparent 100%);
}

.public-prematch-showcase-shell::after {
  background:
    radial-gradient(circle at center, rgba(90, 216, 255, 0.14), transparent 44%),
    radial-gradient(circle at center, rgba(88, 239, 201, 0.08), transparent 60%);
}

.public-prematch-showcase-top {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #eaf7ff;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.public-prematch-showcase-grid {
  position: relative;
  z-index: 1;
  display: grid;
  align-content: end;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-height: calc(100% - 26px);
  padding-top: 96px;
}

.public-prematch-showcase-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(180, 222, 255, 0.14);
  background: rgba(7, 18, 31, 0.62);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.public-prematch-showcase-card span {
  display: block;
  color: #9bc5dd;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.public-prematch-showcase-card strong {
  display: block;
  margin-top: 10px;
  color: #f8fcff;
  font: 700 20px/1.08 "Sora", "Segoe UI", sans-serif;
}

.public-prematch-showcase-card p {
  margin: 10px 0 0;
  color: #cfe2f0;
  line-height: 1.45;
  font-size: 13px;
}

.public-prematch-showcase-card.tone-hot {
  border-color: rgba(255, 162, 122, 0.22);
}

.public-prematch-showcase-card.tone-cool {
  border-color: rgba(90, 216, 255, 0.22);
}

.public-prematch-value-grid,
.public-prematch-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.public-prematch-value-card,
.public-prematch-step {
  padding: 22px;
  border-radius: 24px;
  border: 1px solid rgba(180, 222, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(13, 29, 48, 0.8), rgba(8, 20, 35, 0.84)),
    rgba(6, 15, 28, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.public-prematch-value-card h3,
.public-prematch-step h3,
.public-prematch-how-head h2,
.public-prematch-live-title {
  margin: 0;
  font-family: "Sora", "Segoe UI", sans-serif;
}

.public-prematch-value-card p,
.public-prematch-step p {
  margin: 12px 0 0;
  color: #c8dcec;
  line-height: 1.55;
}

.public-prematch-how {
  display: grid;
  gap: 18px;
}

.public-prematch-how-head {
  display: grid;
  gap: 10px;
  max-width: 760px;
}

.public-prematch-how-head h2 {
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.02;
}

.public-prematch-step {
  position: relative;
  overflow: hidden;
}

.public-prematch-step-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(180, 222, 255, 0.2);
  background: rgba(255, 255, 255, 0.05);
  color: #f4fbff;
  font: 700 14px/1 "Sora", "Segoe UI", sans-serif;
}

.public-prematch-step h3 {
  margin-top: 18px;
  font-size: 20px;
  line-height: 1.18;
}

.public-prematch-shell {
  scroll-margin-top: 18px;
  padding: 28px;
  border-radius: 30px;
}

.public-prematch-head {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.public-prematch-live-title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.02;
}

.public-prematch-loader,
.public-prematch-error {
  display: grid;
  gap: 14px;
  align-items: center;
  padding: 20px;
  border-radius: 24px;
  border: 1px solid rgba(180, 222, 255, 0.14);
  background: rgba(6, 16, 29, 0.58);
}

.public-prematch-loader {
  grid-template-columns: auto 1fr;
}

.public-prematch-loader-title {
  font: 700 20px/1.12 "Sora", "Segoe UI", sans-serif;
  color: var(--text-main);
}

.public-prematch-loader-note {
  margin: 8px 0 0;
  color: #bdd3e6;
}

.public-prematch-error {
  color: #ffd4d4;
  font-weight: 600;
}

.public-prematch-result {
  min-height: 240px;
}

.prematch-browser-shell-v2 {
  display: grid;
  gap: 18px;
}

.prematch-command,
.prematch-browser-shell-v2 .prematch-panel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  border: 1px solid rgba(180, 222, 255, 0.14);
  background:
    linear-gradient(145deg, rgba(13, 30, 49, 0.9), rgba(7, 17, 30, 0.88)),
    rgba(8, 20, 35, 0.84);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.prematch-command {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 18px;
  padding: 24px;
}

.prematch-command-copy {
  display: grid;
  align-content: start;
  gap: 16px;
}

.prematch-command-title {
  margin: 0;
  font: 800 clamp(34px, 5vw, 52px)/0.92 "Sora", "Segoe UI", sans-serif;
  letter-spacing: -0.04em;
}

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

.prematch-command-metric {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(180, 222, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.prematch-command-metric span {
  display: block;
  color: #96b7cf;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prematch-command-metric strong {
  display: block;
  margin-top: 8px;
  color: #f8fcff;
  font: 700 17px/1.08 "Sora", "Segoe UI", sans-serif;
}

.prematch-command-note {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(90, 216, 255, 0.16);
  background: rgba(90, 216, 255, 0.08);
  color: #ecf8ff;
  line-height: 1.55;
}

.prematch-command-stage {
  position: relative;
  min-height: 320px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(180, 222, 255, 0.12);
  background: rgba(5, 12, 23, 0.56);
}

.prematch-stage-backdrop,
.prematch-stage-grid,
.prematch-stage-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.prematch-stage-backdrop {
  overflow: hidden;
  border-radius: inherit;
}

.prematch-stage-grid {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), transparent 100%);
}

.prematch-stage-glow {
  background:
    radial-gradient(circle at 25% 20%, rgba(90, 216, 255, 0.18), transparent 24%),
    radial-gradient(circle at 76% 24%, rgba(255, 156, 132, 0.14), transparent 24%),
    radial-gradient(circle at 50% 72%, rgba(88, 239, 201, 0.12), transparent 30%);
}

.prematch-stage-chip-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: end;
  min-height: calc(100% - 30px);
  padding-top: 92px;
}

.prematch-stage-chip {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(180, 222, 255, 0.14);
  background: rgba(7, 17, 29, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.prematch-stage-chip-kicker {
  display: block;
  color: #95b7ce;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prematch-stage-chip strong {
  display: block;
  margin-top: 8px;
  color: #f7fcff;
  font: 700 18px/1.08 "Sora", "Segoe UI", sans-serif;
}

.prematch-stage-chip small {
  display: block;
  margin-top: 8px;
  color: #cfe1ee;
  font-size: 12px;
  line-height: 1.35;
}

.prematch-stage-chip.tone-hot {
  border-color: rgba(255, 165, 142, 0.26);
}

.prematch-stage-chip.tone-warm {
  border-color: rgba(255, 214, 117, 0.24);
}

.prematch-stage-chip.tone-cool {
  border-color: rgba(90, 216, 255, 0.24);
}

.prematch-stage-legend {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  color: #b8d1e4;
  font-size: 13px;
}

.prematch-core-grid,
.prematch-intel-grid {
  display: grid;
  gap: 16px;
}

.prematch-core-grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
}

.prematch-intel-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.prematch-panel {
  padding: 18px;
}

.prematch-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.prematch-panel-heading {
  display: grid;
  gap: 8px;
}

.prematch-panel-title {
  margin: 0;
  color: #eef8ff;
  font: 700 13px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.prematch-panel-subtitle {
  margin: 0;
  color: #a9c3d7;
  line-height: 1.5;
  font-size: 13px;
}

.prematch-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(180, 222, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: #f0f9ff;
  font: 700 13px/1 "Sora", "Segoe UI", sans-serif;
}

.prematch-weak-zone {
  font-size: clamp(28px, 4vw, 38px);
  line-height: 0.98;
}

.prematch-weak-target,
.prematch-weak-reason,
.prematch-weak-plan {
  margin: 12px 0 0;
  color: #d0e3f1;
  line-height: 1.6;
}

.prematch-weak-plan {
  color: #eef8ff;
}

.prematch-action-rail {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(180, 222, 255, 0.12);
}

.prematch-action-rail-label {
  display: inline-flex;
  color: #8dcfff;
  font: 700 11px/1 "Sora", "Segoe UI", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prematch-action-list {
  margin: 12px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: #eef8ff;
}

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

.prematch-signal-card {
  padding: 16px;
  border-radius: 18px;
  border: 1px solid rgba(180, 222, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.prematch-signal-card.tone-hot {
  border-color: rgba(255, 165, 142, 0.24);
}

.prematch-signal-card.tone-warm {
  border-color: rgba(255, 214, 117, 0.24);
}

.prematch-signal-card.tone-cool {
  border-color: rgba(90, 216, 255, 0.24);
}

.prematch-signal-label {
  display: block;
  color: #96b7cf;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prematch-signal-value {
  display: block;
  margin-top: 10px;
  color: #f8fcff;
  font: 700 20px/1.08 "Sora", "Segoe UI", sans-serif;
}

.prematch-signal-meta {
  margin: 10px 0 0;
  color: #bfd5e7;
  line-height: 1.5;
  font-size: 13px;
}

.prematch-opponent-spotlight {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.prematch-spotlight-chip {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
}

.prematch-opponent-deck {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.prematch-opponent-card {
  padding: 16px;
  border-radius: 20px;
  border: 1px solid rgba(180, 222, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.prematch-opponent-card.tone-weak {
  border-color: rgba(255, 154, 154, 0.22);
}

.prematch-opponent-card.tone-strong {
  border-color: rgba(100, 228, 175, 0.22);
}

.prematch-opponent-card-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.prematch-opponent-card-label,
.prematch-opponent-card-role,
.prematch-opponent-card-stats span {
  color: #97b8cf;
}

.prematch-opponent-card-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.prematch-opponent-card-name {
  display: block;
  margin-top: 8px;
  color: #f8fcff;
  font: 700 18px/1.08 "Sora", "Segoe UI", sans-serif;
}

.prematch-opponent-card-role {
  margin: 8px 0 0;
  font-size: 13px;
}

.prematch-opponent-card-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(180, 222, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: #eff8ff;
  font-size: 12px;
}

.prematch-opponent-card-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.prematch-opponent-card-stats div {
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.prematch-opponent-card-stats span {
  display: block;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.prematch-opponent-card-stats strong {
  display: block;
  margin-top: 8px;
  color: #f5fbff;
  font-size: 15px;
}

.prematch-panel-body {
  display: grid;
  gap: 10px;
}

.prematch-list-item,
.prematch-recommendation,
.prematch-empty {
  border-radius: 18px;
  border: 1px solid rgba(180, 222, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
}

.prematch-list-item {
  padding: 14px;
}

.prematch-list-title {
  font-size: 15px;
}

.prematch-list-meta {
  margin-top: 6px;
  color: #bbd0e2;
  line-height: 1.5;
}

.prematch-list-accent {
  min-width: 52px;
  font-weight: 700;
}

.prematch-recommendation {
  padding: 14px 14px 14px 22px;
}

.prematch-empty {
  padding: 14px;
  color: #9eb9cd;
}

.prematch-panel-span-2 {
  grid-column: 1 / -1;
}

@media (max-width: 1120px) {
  .public-prematch-hero-grid,
  .prematch-command,
  .prematch-core-grid {
    grid-template-columns: 1fr;
  }

  .public-prematch-value-grid,
  .public-prematch-steps,
  .prematch-intel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .public-prematch-showcase-shell {
    min-height: 300px;
  }
}

@media (max-width: 820px) {
  .public-prematch-page {
    padding: 20px 14px 42px;
    gap: 20px;
  }

  .public-prematch-value-grid,
  .public-prematch-steps,
  .prematch-intel-grid,
  .prematch-signal-grid,
  .prematch-command-metrics {
    grid-template-columns: 1fr;
  }

  .public-prematch-shell,
  .prematch-command,
  .prematch-browser-shell-v2 .prematch-panel {
    padding: 18px;
  }

  .prematch-opponent-card-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .prematch-stage-chip-grid {
    grid-template-columns: 1fr;
    padding-top: 76px;
  }
}

@media (max-width: 560px) {
  .public-prematch-title {
    max-width: none;
    font-size: clamp(34px, 12vw, 52px);
  }

  .public-prematch-showcase-grid {
    grid-template-columns: 1fr;
  }

  .public-prematch-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .prematch-demo-btn {
    width: 100%;
  }

  .prematch-opponent-deck {
    grid-template-columns: 1fr;
  }
}
