﻿:root {
  color-scheme: dark;
  --bg: #080b0f;
  --panel: rgba(16, 22, 30, 0.88);
  --panel-2: rgba(33, 42, 52, 0.86);
  --line: rgba(214, 170, 79, 0.24);
  --text: #f2f5f8;
  --muted: #aeb7c5;
  --gold: #d6aa4f;
  --gold-bright: #f0cf7c;
  --steel: #6bb8c9;
  --danger: #df5c64;
  --leaf: #56c18f;
  --panel-soft: rgba(11, 15, 20, 0.74);
  --shadow-strong: 0 26px 70px rgba(0, 0, 0, 0.44);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 11, 15, 0.98) 0%, rgba(8, 11, 15, 0.82) 48%, rgba(8, 11, 15, 0.52) 100%),
    linear-gradient(180deg, rgba(8, 11, 15, 0.1) 0%, #080b0f 88%),
    var(--champion-splash, linear-gradient(135deg, #101820, #19222c)) center right / cover no-repeat;
}

.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, black 0%, transparent 76%);
}

body:not(.app-mode) .backdrop::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.2) 0%, rgba(125, 217, 236, 0.08) 26%, transparent 58%) left top / 34vw 38vh no-repeat,
    linear-gradient(45deg, rgba(181, 156, 255, 0.14) 0%, rgba(125, 217, 236, 0.08) 28%, transparent 62%) left bottom / 32vw 36vh no-repeat,
    linear-gradient(225deg, rgba(255, 95, 109, 0.2) 0%, rgba(240, 199, 109, 0.08) 30%, transparent 60%) right top / 36vw 38vh no-repeat,
    linear-gradient(315deg, rgba(97, 230, 162, 0.13) 0%, rgba(255, 95, 109, 0.08) 26%, transparent 60%) right bottom / 34vw 36vh no-repeat,
    linear-gradient(90deg, transparent 0%, rgba(125, 217, 236, 0.08) 28%, rgba(255, 95, 109, 0.1) 52%, rgba(240, 199, 109, 0.08) 74%, transparent 100%) center bottom / 62vw 180px no-repeat;
  opacity: 0.95;
  pointer-events: none;
}

button, select, input { font: inherit; }
a { color: inherit; }

.app-only {
  display: none !important;
}

body:not(.app-mode) [data-view="settings"],
body:not(.app-mode) [data-view="feedback"],
body:not(.app-mode) .account-menu,
body:not(.app-mode) .build-nav,
body:not(.app-mode) #settingsPanel,
body:not(.app-mode) .build-context-panel,
body:not(.app-mode) #liveDraftPanel {
  display: none !important;
}

body:not(.app-mode) .web-hide,
body.app-mode .web-only-card {
  display: none !important;
}

body.app-mode .app-only {
  display: revert !important;
}

body.app-mode .app-only.is-waiting,
body.app-mode .app-only.is-hidden {
  display: none !important;
}

body.app-mode:not(.has-build-context) .build-nav {
  display: none !important;
}

body.app-mode[data-view="explore"] #liveDraftPanel,
body.app-mode[data-view="explore"] .build-context-panel,
body.app-mode[data-view="explore"] #reviewPanel,
body.app-mode[data-view="explore"] .live-diagnostics,
body.app-mode[data-view="explore"] .draft-board {
  display: none !important;
}

body.app-mode[data-view="builds"] #explorePanel,
body.app-mode[data-view="settings"] #explorePanel,
body.app-mode[data-view="premium"] #explorePanel,
body.app-mode[data-view="feedback"] #explorePanel {
  display: none !important;
}

body.app-mode .app-shell {
  padding-top: 82px;
}

.live-build-widget {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 12000;
  width: min(292px, calc(100vw - 28px));
  padding: 9px;
  border: 1px solid rgba(240, 207, 124, 0.32);
  border-radius: 8px;
  background: rgba(8, 12, 17, 0.58);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(14px);
  opacity: 0.74;
  transition: opacity 160ms ease, background 160ms ease;
}

.live-build-widget:hover {
  opacity: 0.94;
  background: rgba(8, 12, 17, 0.78);
}

.widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.widget-head span {
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.widget-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
}

.widget-items {
  display: grid;
  grid-template-columns: repeat(6, 30px);
  gap: 5px;
  margin-top: 8px;
}

.widget-item {
  position: relative;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.04);
}

.widget-item.next {
  border-color: rgba(240, 207, 124, 0.85);
  box-shadow: 0 0 0 2px rgba(240, 207, 124, 0.12);
}

.widget-item img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
}

.widget-item span {
  position: absolute;
  right: -4px;
  bottom: -5px;
  min-width: 15px;
  height: 15px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  color: #090c10;
  background: var(--gold-bright);
  font-size: 0.62rem;
  font-weight: 950;
}

.live-build-widget p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.25;
}

.overlay-modules {
  display: grid;
  gap: 8px;
  margin-top: 9px;
}

.overlay-module {
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.overlay-module h3 {
  margin: 0 0 6px;
  color: var(--gold-bright);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.overlay-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.overlay-list {
  display: grid;
  gap: 5px;
}

.overlay-grid span,
.overlay-list span {
  min-height: 26px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.035);
}

.overlay-grid strong,
.overlay-list strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.72rem;
}

.overlay-grid em,
.overlay-list em {
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 900;
}

.live-build-widget {
  border-color: rgba(125, 217, 236, 0.42);
  border-radius: 14px;
  background:
    radial-gradient(circle at 18% 0%, rgba(125, 217, 236, 0.12), transparent 34%),
    radial-gradient(circle at 86% 12%, rgba(255, 95, 109, 0.08), transparent 36%),
    linear-gradient(180deg, rgba(15, 18, 26, 0.62), rgba(7, 9, 14, 0.58));
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.widget-head {
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.widget-head strong {
  color: #ffffff;
}

.widget-items {
  grid-template-columns: repeat(6, 30px);
  gap: 5px;
}

.widget-item {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background:
    linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.03)),
    rgba(9, 11, 16, 0.9);
}

.widget-item.next {
  border-color: rgba(240, 199, 109, 0.95);
  box-shadow: 0 0 0 2px rgba(240, 199, 109, 0.16), 0 0 22px rgba(240, 199, 109, 0.28);
}

.widget-item img {
  border-radius: 9px;
}

.overlay-module h3 {
  color: #7dd9ec;
}

.overlay-grid span,
.overlay-list span {
  border-color: rgba(226, 232, 240, 0.12);
  border-radius: 9px;
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.08), rgba(255,255,255,0.025)),
    rgba(255, 255, 255, 0.035);
}

.app-shell {
  width: 100%;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 18px;
  padding: 20px 22px 28px;
}

.side-rail {
  position: sticky;
  top: 20px;
  min-height: calc(100vh - 48px);
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  gap: 18px;
  padding: 12px 8px;
  border: 1px solid rgba(214, 170, 79, 0.22);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(13, 18, 25, 0.92), rgba(7, 10, 14, 0.88));
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(14px);
}

.rail-logo {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #080b0f;
  background: linear-gradient(135deg, #f0cf7c, #6bb8c9);
  font-size: 0.9rem;
  font-weight: 950;
}

.rail-nav {
  display: grid;
  gap: 10px;
  align-content: start;
  width: 100%;
}

.rail-item,
.rail-note {
  min-height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.rail-item {
  width: 100%;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.rail-item:hover,
.mode-tab:hover {
  color: #f6df9f;
  border-color: rgba(240, 207, 124, 0.24);
}

.rail-item.active {
  color: var(--gold-bright);
  border-color: rgba(240, 207, 124, 0.34);
  background: rgba(214, 170, 79, 0.12);
}

.rail-note {
  min-height: 30px;
  color: rgba(174, 183, 197, 0.68);
}

.workspace {
  width: 100%;
  min-height: calc(100vh - 48px);
}

.topbar,
.panel-head,
.builder-head,
.info-strip,
.top-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.topbar {
  min-height: 168px;
  padding: 18px 20px;
  margin-bottom: 14px;
  border: 1px solid rgba(214, 170, 79, 0.22);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(12, 17, 24, 0.9), rgba(12, 17, 24, 0.58)),
    linear-gradient(135deg, rgba(214, 170, 79, 0.08), rgba(107, 184, 201, 0.08));
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(14px);
}

.brand-block {
  display: grid;
  gap: 12px;
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  width: 52px;
  height: 52px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(240, 207, 124, 0.52);
  border-radius: 12px;
  color: #080b0f;
  background: linear-gradient(135deg, #f0cf7c, #6bb8c9);
  font-weight: 950;
  letter-spacing: 0.02em;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--gold-bright);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1, h2, p { margin: 0; }

h1 {
  font-size: clamp(2.35rem, 4.4vw, 5rem);
  line-height: 0.92;
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.55);
}

h2 {
  font-size: 0.92rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.subtitle {
  max-width: 520px;
  margin-top: 0;
  color: #dce4ef;
  font-size: 1rem;
}

.mode-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mode-tab {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(8, 12, 17, 0.46);
  font-size: 0.78rem;
  font-weight: 850;
  cursor: pointer;
}

.mode-tab.active {
  color: var(--gold-bright);
  border-color: rgba(240, 207, 124, 0.36);
  background: rgba(214, 170, 79, 0.12);
}

.top-actions {
  align-self: flex-start;
  padding-top: 12px;
}

.sync-card {
  min-width: 150px;
  min-height: 58px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  background: rgba(8, 12, 17, 0.5);
}

.sync-card span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.sync-card strong {
  color: var(--gold-bright);
  font-size: 0.9rem;
}

.app-download {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(240, 207, 124, 0.45);
  border-radius: 8px;
  color: #080b0f;
  background: linear-gradient(135deg, #f0cf7c, #6bb8c9);
  font-size: 0.84rem;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}

.app-mode .app-download {
  display: none;
}

.account-menu {
  position: relative;
  z-index: 10000;
}

.account-toggle {
  min-width: 128px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(255, 222, 154, 0.62);
  border-radius: 10px;
  color: #0b0f14;
  background: linear-gradient(135deg, #ffe493 0%, #ff9f8a 42%, #7dd9ec 100%);
  cursor: pointer;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.48);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.account-toggle:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.account-toggle strong {
  color: #0b0f14;
  font-size: 0.78rem;
  font-weight: 950;
}

.account-toggle .mini-pill {
  min-height: auto;
  padding: 0;
  color: #0b0f14;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0;
}

.account-toggle strong:empty {
  display: none;
}

body.license-premium .account-toggle .mini-pill {
  background: linear-gradient(135deg, #61e6a2, #7dd9ec);
}

.account-popover {
  position: fixed;
  top: 88px;
  right: 28px;
  z-index: 2147483647;
  width: min(390px, calc(100vw - 32px));
  max-height: none;
  overflow: visible;
  display: none;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 226, 158, 0.34);
  border-radius: 14px;
  background:
    radial-gradient(circle at 20% 0%, rgba(255, 228, 147, 0.18), transparent 34%),
    linear-gradient(145deg, rgba(20, 23, 29, 0.98), rgba(10, 12, 17, 0.99));
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.04) inset;
  backdrop-filter: blur(18px);
}

.account-menu.is-open .account-popover {
  display: grid;
}

body.account-open .account-popover {
  display: grid;
}

body.account-open::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0.18));
}

.account-popover-head {
  display: grid;
  gap: 5px;
  padding: 10px 10px 12px;
  border: 1px solid rgba(255, 226, 158, 0.18);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(255, 228, 147, 0.12), rgba(125, 217, 236, 0.08));
}

.account-popover-head span {
  color: #ffe493;
  font-size: 0.68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.account-popover-head strong {
  color: #f4f7fb;
  font-size: 0.86rem;
  line-height: 1.28;
}

.account-popover .field {
  margin: 0;
  gap: 6px;
  color: #dbe7f2;
  font-size: 0.72rem;
  letter-spacing: 0;
  text-transform: none;
}

.account-popover input {
  min-height: 40px;
  padding: 0 11px;
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 760;
}

.account-popover .compact-field small {
  color: rgba(219, 231, 242, 0.72);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.25;
  text-transform: none;
}

.account-popover .ghost,
.account-popover .primary {
  min-height: 38px;
  border-radius: 10px;
  font-size: 0.78rem;
}

.danger-lite {
  color: #ffd0d0;
  border-color: rgba(255, 112, 112, 0.22);
  background: rgba(255, 112, 112, 0.06);
}

.danger-lite:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.lang-select {
  width: 62px;
  min-height: 34px;
  padding: 0 8px;
  color: var(--muted);
  background: rgba(8, 12, 17, 0.54);
  border-color: rgba(255, 255, 255, 0.12);
  font-size: 0.78rem;
  font-weight: 800;
}

.live-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--leaf);
  box-shadow: 0 0 18px rgba(86, 193, 143, 0.95);
}

.live-dot.idle {
  background: var(--muted);
  box-shadow: 0 0 10px rgba(174, 183, 197, 0.35);
}

.grid {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(620px, 1fr) minmax(260px, 320px);
  grid-template-areas:
    "explore explore explore"
    "setup build notes"
    "setup build notes"
    "review review review";
  gap: 16px;
  align-items: start;
}

.overview-strip {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr 1fr 1.2fr;
  gap: 12px;
  margin-bottom: 18px;
}

.overview-strip div {
  min-height: 66px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 28, 38, 0.86), rgba(8, 12, 17, 0.82));
  backdrop-filter: blur(10px);
}

.overview-strip span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.overview-strip strong {
  font-size: 1rem;
}

.panel {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(18, 25, 34, 0.94), rgba(9, 13, 18, 0.96));
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 18px;
  box-shadow: var(--shadow-strong);
  backdrop-filter: blur(12px);
}

.compact-panel {
  box-shadow: none;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.panel-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
}

.tight-head {
  align-items: flex-start;
}

.setup-panel { grid-area: setup; }
.explore-panel { grid-area: explore; }
.read-panel { grid-column: span 3; }
.recommendation-panel { grid-area: build; }
.recommendation-panel { min-height: 620px; }
body.app-mode .settings-panel {
  grid-column: 1 / -1;
  display: none !important;
}
body.app-mode[data-view="settings"] .settings-panel,
body.app-mode[data-view="premium"] .settings-panel,
body.app-mode[data-view="feedback"] .settings-panel {
  display: block !important;
  grid-area: explore;
}
body.app-mode[data-view="settings"] .settings-premium,
body.app-mode[data-view="settings"] .settings-feedback,
body.app-mode[data-view="premium"] .settings-panel > .panel-head,
body.app-mode[data-view="premium"] .settings-grid,
body.app-mode[data-view="premium"] .settings-feedback,
body.app-mode[data-view="feedback"] .settings-panel > .panel-head,
body.app-mode[data-view="feedback"] .settings-grid,
body.app-mode[data-view="feedback"] .settings-premium {
  display: none !important;
}
body.app-mode[data-view="premium"] .settings-premium {
  display: block !important;
  margin-top: 0;
}
body.app-mode[data-view="feedback"] .settings-feedback {
  display: grid !important;
  margin-top: 0;
}
.is-live-collapsed { display: none !important; }
.matchup-panel {
  grid-area: notes;
  position: sticky;
  top: 20px;
}
.review-panel { grid-area: review; }
.is-hidden { display: none !important; }
.is-waiting { display: none !important; }

.field {
  display: grid;
  gap: 7px;
  margin: 14px 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 760;
  text-transform: uppercase;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.search-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.search-field {
  margin: 0;
}

.search-field input {
  width: 100%;
  min-height: 44px;
  color: var(--text);
  background: rgba(8, 12, 17, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
}

.search-results {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.search-results.is-waiting {
  display: none;
}

.champion-result {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border: 1px solid rgba(214, 170, 79, 0.18);
  border-radius: 8px;
  text-align: left;
  background: rgba(8, 12, 17, 0.74);
}

.champion-result:hover {
  border-color: rgba(240, 207, 124, 0.48);
}

.result-avatar {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  border-radius: 8px;
  background-position: center;
  background-size: cover;
}

.champion-result span:last-child,
.player-search-note {
  display: grid;
  gap: 3px;
}

.champion-result strong,
.player-search-note strong {
  color: var(--text);
  font-size: 0.92rem;
}

.champion-result small,
.player-search-note span {
  color: var(--muted);
  font-size: 0.76rem;
}

.player-search-note {
  min-height: 62px;
  padding: 10px;
  border: 1px solid rgba(107, 184, 201, 0.26);
  border-radius: 8px;
  background: rgba(107, 184, 201, 0.08);
}

.player-search-note.warn {
  border-color: rgba(255, 141, 124, 0.34);
  background: rgba(255, 141, 124, 0.08);
}

.player-suggestions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.suggestion-group {
  display: grid;
  grid-column: span 2;
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(125, 217, 236, 0.2);
  border-radius: 12px;
  background: rgba(8, 12, 17, 0.62);
}

.suggestion-group > span {
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.player-suggestion {
  min-height: 46px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.09), rgba(255, 228, 147, 0.05)),
    rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.player-suggestion:hover {
  border-color: rgba(255, 228, 147, 0.36);
  background:
    linear-gradient(135deg, rgba(255, 228, 147, 0.13), rgba(125, 217, 236, 0.08)),
    rgba(255, 255, 255, 0.055);
}

.player-suggestion strong {
  font-size: 0.84rem;
}

.player-suggestion em {
  color: var(--muted);
  font-size: 0.74rem;
  font-style: normal;
}

.player-suggestion.quick strong {
  color: #ffe493;
}

.player-search-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(125, 217, 236, 0.28);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.12), rgba(255,255,255,0.035)),
    rgba(13, 16, 22, 0.88);
}

.player-search-head {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) minmax(120px, auto);
  align-items: center;
  gap: 12px;
}

.player-icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.18);
  border-radius: 14px;
  color: #08090c;
  background: linear-gradient(135deg, #ffffff, #7dd9ec);
  font-weight: 950;
}

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

.player-search-card span {
  color: #7dd9ec;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.player-search-card strong {
  display: block;
  color: var(--text);
}

.player-search-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.player-rank {
  display: grid;
  gap: 3px;
  justify-items: end;
  text-align: right;
}

.player-rank em,
.player-metric em,
.player-champ-chip em,
.recent-game em,
.recent-game small {
  color: var(--muted);
  font-size: 0.72rem;
  font-style: normal;
}

.player-search-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.player-metric {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}

.player-metric strong {
  font-size: 1rem;
}

.player-profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 10px;
}

.player-profile-grid section {
  display: grid;
  gap: 8px;
}

.player-section-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.player-champs,
.recent-games {
  display: grid;
  gap: 8px;
}

.player-champ-chip,
.recent-game {
  min-height: 48px;
  display: grid;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  background: rgba(8, 12, 17, 0.52);
}

.player-champ-chip {
  grid-template-columns: 38px minmax(0, 1fr);
}

.player-champ-img,
.recent-game-champ {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background-position: center;
  background-size: cover;
}

.recent-game {
  grid-template-columns: 26px 34px minmax(86px, 1fr) minmax(76px, auto);
}

.recent-game.empty {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.result-pill {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #07100d;
  font-size: 0.72rem;
  font-weight: 950;
}

.result-pill.win {
  background: #74e0a5;
}

.result-pill.loss {
  background: #ff8d7c;
}

.recent-game small {
  grid-column: 3 / -1;
}

.recent-game-stats {
  grid-column: 3 / -1;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 760;
  text-transform: none;
}

.recent-game-items {
  grid-column: 3 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.recent-game-items img {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  object-fit: cover;
}

@media (max-width: 760px) {
  .player-search-head,
  .player-profile-grid,
  .player-search-metrics,
  .player-suggestions {
    grid-template-columns: 1fr;
  }

  .player-search-head {
    align-items: start;
  }

  .player-rank {
    justify-items: start;
    text-align: left;
  }

  .recent-game {
    grid-template-columns: 26px 34px minmax(0, 1fr);
  }

  .recent-game em,
  .recent-game small {
    grid-column: 3;
  }
}

.setting-row {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid rgba(214, 170, 79, 0.18);
  border-radius: 8px;
  background: rgba(8, 12, 17, 0.72);
}

.setting-row span {
  display: grid;
  gap: 4px;
}

.setting-row strong {
  color: var(--text);
  font-size: 0.92rem;
}

.setting-row small {
  color: var(--muted);
  font-size: 0.76rem;
}

.setting-row input[type="checkbox"] {
  width: 42px;
  height: 22px;
  flex: 0 0 auto;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(33, 42, 52, 0.9);
  cursor: pointer;
}

.setting-row input[type="checkbox"]::before {
  content: "";
  width: 16px;
  height: 16px;
  display: block;
  margin: 2px;
  border-radius: 50%;
  background: var(--muted);
  transition: transform 140ms ease, background 140ms ease;
}

.setting-row input[type="checkbox"]:checked {
  border-color: rgba(240, 207, 124, 0.52);
  background: rgba(214, 170, 79, 0.22);
}

.setting-row input[type="checkbox"]:checked::before {
  transform: translateX(20px);
  background: var(--gold-bright);
}

select {
  width: 100%;
  min-height: 42px;
  color: var(--text);
  background: rgba(8, 12, 17, 0.74);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
}

button {
  min-height: 40px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

.rail-item {
  min-height: 38px;
  border-radius: 10px;
  background: transparent;
}

.mode-tab {
  min-height: 32px;
  border-radius: 999px;
}

.primary {
  background: linear-gradient(135deg, #f0cf7c, #b88631);
  color: #14100a;
  font-weight: 900;
  padding: 0 18px;
  box-shadow: 0 12px 24px rgba(214, 170, 79, 0.22);
}

.primary.active {
  background: linear-gradient(135deg, #74e0a5, #2f9c69);
  color: #06110b;
}

.ghost {
  background: rgba(33, 42, 52, 0.72);
  border-color: var(--line);
  padding: 0 12px;
}

.small { min-height: 32px; font-size: 0.86rem; }

.champion-card {
  min-height: 104px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid rgba(214, 170, 79, 0.32);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(8, 11, 15, 0.9), rgba(8, 11, 15, 0.32)),
    var(--champion-tile, linear-gradient(135deg, #101820, #19222c)) center right / cover no-repeat;
}

.champion-card strong {
  display: block;
  font-size: 1.75rem;
}

.champion-card span {
  color: var(--gold-bright);
  font-weight: 800;
}

.role-label {
  color: var(--muted) !important;
  font-size: 0.72rem;
  text-transform: uppercase;
}

.champion-list,
.signals,
.build-slots,
.plan-list,
.matchup-copy,
.ally-list {
  margin-top: 14px;
}

.champion-row {
  display: grid;
  grid-template-columns: 1fr 40px;
  gap: 8px;
  margin-top: 8px;
}

.remove-btn {
  width: 40px;
  padding: 0;
  color: var(--muted);
  background: rgba(33, 42, 52, 0.72);
  border-color: var(--line);
}

.ally-builder { margin-top: 18px; }

.draft-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-top: 18px;
}

.draft-column {
  display: grid;
  gap: 10px;
}

.draft-slots {
  display: grid;
  gap: 8px;
}

.draft-slot {
  min-height: 54px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid rgba(214, 170, 79, 0.18);
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(11, 15, 20, 0.86), rgba(33, 42, 52, 0.58));
}

.enemy-side .draft-slot {
  grid-template-columns: minmax(0, 1fr) 42px;
  background:
    linear-gradient(270deg, rgba(11, 15, 20, 0.86), rgba(48, 32, 39, 0.58));
}

.enemy-side .draft-avatar {
  order: 2;
}

.enemy-side .draft-main {
  text-align: right;
}

.enemy-side .draft-role {
  justify-self: end;
}

.draft-slot.filled {
  border-color: rgba(240, 207, 124, 0.42);
}

.draft-avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  color: rgba(174, 183, 197, 0.7);
  background-color: rgba(8, 12, 17, 0.74);
  background-position: center;
  background-size: cover;
  overflow: hidden;
  font-weight: 900;
}

.draft-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.draft-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.draft-main strong {
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.92rem;
}

.draft-main span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

.draft-role {
  min-width: 54px;
  display: inline-flex;
  justify-content: center;
  padding: 4px 8px;
  border: 1px solid rgba(240, 207, 124, 0.28);
  border-radius: 999px;
  color: var(--gold-bright);
  background: rgba(214, 170, 79, 0.1);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.live-diagnostics {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.live-diagnostics .builder-head {
  display: none;
}

.diagnostic-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.diagnostic-row {
  min-height: 36px;
  display: grid;
  grid-template-columns: 10px 1fr;
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(11, 15, 20, 0.62);
  color: var(--muted);
  font-size: 0.8rem;
}

.diagnostic-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.diagnostic-row.good .diagnostic-dot { background: var(--leaf); box-shadow: 0 0 12px rgba(86, 193, 143, 0.8); }
.diagnostic-row.warn .diagnostic-dot { background: var(--gold-bright); }
.diagnostic-row.bad .diagnostic-dot { background: var(--danger); }

.diagnostic-row strong {
  color: var(--text);
}

.ally-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.ally-chip {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(33, 42, 52, 0.74);
  color: var(--muted);
  font-size: 0.9rem;
}

.ally-chip strong {
  min-width: 48px;
  display: inline-flex;
  justify-content: center;
  padding: 3px 7px;
  border: 1px solid rgba(240, 207, 124, 0.28);
  border-radius: 999px;
  color: var(--gold-bright);
  background: rgba(214, 170, 79, 0.1);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.mini-pill {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 8px;
  color: var(--muted);
  font-size: 0.75rem;
}

.toggles {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  color: var(--muted);
}

.toggles label, .signal {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--gold);
}

.signals {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.signal {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(33, 42, 52, 0.74);
  color: var(--muted);
}

.build-slots {
  display: grid;
  grid-template-columns: repeat(6, minmax(96px, 1fr));
  gap: 10px;
  align-items: stretch;
}

.live-buy-card {
  min-height: 86px;
  display: grid;
  gap: 8px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid rgba(86, 193, 143, 0.3);
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(86, 193, 143, 0.14), rgba(107, 184, 201, 0.08)),
    rgba(11, 15, 20, 0.86);
}

.live-buy-card strong {
  display: block;
  margin-top: 4px;
  font-size: 1.08rem;
}

.live-buy-card p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.rune-panel {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
}

.rune-apply {
  width: 100%;
  margin-top: 12px;
  min-height: 48px;
  font-size: 0.96rem;
}

.rune-apply-status {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
}

.item-card {
  position: relative;
  min-height: 188px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 9px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(214, 170, 79, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), transparent 44%),
    rgba(8, 12, 17, 0.9);
  overflow: hidden;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.item-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(240, 207, 124, 0.12), transparent 38%);
  opacity: 0;
  transition: opacity 160ms ease;
}

.item-card.key-item {
  border-color: rgba(240, 207, 124, 0.62);
  background:
    linear-gradient(180deg, rgba(240, 207, 124, 0.16), transparent 48%),
    rgba(11, 15, 20, 0.94);
}

.item-card.waiting {
  border-style: dashed;
  opacity: 0.72;
}

.item-card:hover {
  transform: translateY(-2px);
  border-color: rgba(240, 207, 124, 0.56);
}

.item-card:hover::after {
  opacity: 1;
}

.item-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.item-index {
  color: rgba(174, 183, 197, 0.52);
  font-size: 0.72rem;
  font-weight: 900;
}

.item-visual {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(240, 207, 124, 0.16), rgba(107, 184, 201, 0.08)),
    rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(240, 207, 124, 0.28);
  box-shadow: inset 0 0 18px rgba(240, 207, 124, 0.08), 0 14px 24px rgba(0, 0, 0, 0.32);
}

.item-card.key-item .item-visual {
  width: 72px;
  height: 72px;
}

.item-card img {
  width: 52px;
  height: 52px;
  border-radius: 7px;
}

.item-card.key-item img {
  width: 60px;
  height: 60px;
}

.empty-item::before {
  content: "";
  width: 30px;
  height: 30px;
  border: 1px solid rgba(174, 183, 197, 0.25);
  border-radius: 7px;
  background: rgba(174, 183, 197, 0.08);
}

.item-name {
  font-weight: 850;
  line-height: 1.12;
  font-size: 0.9rem;
}

.item-note {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.3;
}

.slot-label {
  color: var(--gold-bright);
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.plan-list {
  display: grid;
  gap: 8px;
  padding-left: 22px;
  color: var(--muted);
  line-height: 1.45;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--gold-bright);
  background: linear-gradient(135deg, rgba(214, 170, 79, 0.18), rgba(107, 184, 201, 0.1));
  font-size: 0.8rem;
  font-weight: 850;
}

.matchup-copy {
  display: grid;
  gap: 10px;
  color: var(--muted);
  line-height: 1.46;
  background: var(--panel-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 12px;
}

.review-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.review-card {
  min-height: 132px;
  display: grid;
  gap: 8px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(11, 15, 20, 0.78);
}

.review-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.review-icon {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(240, 207, 124, 0.38);
  border-radius: 8px;
  color: var(--gold-bright);
  background: linear-gradient(135deg, rgba(240, 207, 124, 0.16), rgba(107, 184, 201, 0.12));
}

.review-icon svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.review-grade {
  font-size: 0.76rem;
  font-weight: 900;
  color: var(--muted);
  text-transform: uppercase;
}

.review-card.good .review-grade { color: var(--leaf); }
.review-card.bad .review-grade { color: var(--danger); }
.review-card.warn .review-grade { color: var(--gold-bright); }

.review-title {
  font-weight: 850;
}

.review-copy {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
}

.matchup-copy strong, .info-strip strong { color: var(--text); }

.info-strip {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 11, 15, 0.72);
  color: var(--muted);
  backdrop-filter: blur(10px);
}

.info-strip div {
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.035);
}

.info-strip div {
  display: grid;
  gap: 3px;
}

@media (max-width: 860px) {
  .app-shell {
    display: block;
    padding: 16px;
  }
  .side-rail { display: none; }
  .topbar {
    min-height: 220px;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .top-actions {
    width: 100%;
    padding-top: 0;
  }
  .sync-card { flex: 1; }
  .sync-card,
  .app-download,
  .account-menu,
  .account-toggle {
    min-width: 0;
  }
  .app-download,
  .account-menu {
    flex: 1;
  }
  .account-toggle {
    width: 100%;
  }
  .account-popover {
    top: 72px;
    right: 16px;
    left: 16px;
    width: auto;
    max-height: calc(100vh - 92px);
    overflow: auto;
  }
  .live-dot { display: none; }
  .overview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid { display: block; }
  .panel { margin-bottom: 14px; }
  .build-slots, .signals { grid-template-columns: 1fr; }
  .search-grid, .settings-grid { grid-template-columns: 1fr; }
  .draft-board { grid-template-columns: 1fr; }
  .item-card:first-child { grid-column: auto; }
  .review-grid { grid-template-columns: 1fr; }
  .ally-list { grid-template-columns: 1fr; }
  .info-strip { display: grid; }
}

@media (min-width: 861px) and (max-width: 1180px) {
  .overview-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "explore"
      "setup"
      "build"
      "notes"
      "review";
  }
  .matchup-panel { position: static; }
  .build-slots { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
}

@media (min-width: 1181px) and (max-width: 1320px) {
  .grid {
    grid-template-columns: minmax(280px, 310px) minmax(500px, 1fr) minmax(250px, 300px);
  }
  .item-card:first-child { grid-column: auto; }
}

/* Stable Valafuse redesign: warm crimson, compact and clean */
:root {
  --bg: #0b0506;
  --panel: rgba(28, 10, 12, 0.88);
  --panel-2: rgba(42, 16, 18, 0.86);
  --panel-soft: rgba(18, 7, 9, 0.74);
  --line: rgba(255, 122, 104, 0.24);
  --text: #fff9f5;
  --muted: #c5aeb0;
  --gold: #e6bd67;
  --gold-bright: #ffe5a3;
  --steel: #ff8d7c;
  --danger: #ff5163;
  --leaf: #65e0a1;
  --shadow-strong: 0 24px 70px rgba(31, 5, 8, 0.48);
}

body {
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 81, 99, 0.18), transparent 30%),
    radial-gradient(circle at 86% 8%, rgba(255, 229, 163, 0.15), transparent 28%),
    linear-gradient(135deg, #0b0506 0%, #1b070a 48%, #0f0507 100%);
}

.backdrop {
  background:
    linear-gradient(90deg, rgba(11, 5, 6, 0.96) 0%, rgba(18, 6, 8, 0.82) 48%, rgba(30, 8, 10, 0.5) 100%),
    linear-gradient(180deg, transparent 0%, #0b0506 88%),
    var(--champion-splash, linear-gradient(135deg, #22080c, #3a1014)) center right / cover no-repeat;
}

.backdrop::after {
  background-image:
    linear-gradient(rgba(255, 122, 104, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 229, 163, 0.038) 1px, transparent 1px);
  background-size: 54px 54px;
}

.app-shell {
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  padding: 18px;
}

.side-rail,
.topbar,
.panel,
.overview-strip div,
.info-strip,
.live-build-widget {
  border-color: var(--line);
  background:
    linear-gradient(180deg, rgba(36, 13, 15, 0.9), rgba(13, 5, 7, 0.92)),
    linear-gradient(135deg, rgba(255, 229, 163, 0.06), rgba(255, 81, 99, 0.06));
  box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255, 236, 210, 0.07);
}

.side-rail {
  min-height: calc(100vh - 36px);
  border-radius: 18px;
  padding: 14px;
}

.rail-logo,
.brand-mark,
.app-download,
.primary {
  color: #170607;
  border-color: rgba(255, 229, 163, 0.7);
  background: linear-gradient(135deg, #fff1bd 0%, #e6bd67 38%, #ff8d7c 72%, #ff5163 100%);
  box-shadow: 0 14px 34px rgba(255, 81, 99, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.42);
}

.rail-logo {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: 1rem;
}

.rail-nav { gap: 9px; }

.rail-item,
.rail-note {
  min-height: 42px;
  justify-content: start;
  place-items: center start;
  padding: 0 12px;
  border-radius: 13px;
  font-size: 0.7rem;
}

.rail-item.active,
.mode-tab.active,
.status-pill {
  color: var(--gold-bright);
  border-color: rgba(255, 229, 163, 0.46);
  background:
    linear-gradient(135deg, rgba(255, 229, 163, 0.15), rgba(255, 81, 99, 0.1)),
    rgba(24, 7, 9, 0.68);
}

.topbar {
  min-height: 180px;
  padding: 22px;
  border-radius: 20px;
  background:
    linear-gradient(105deg, rgba(18, 6, 8, 0.98) 0%, rgba(46, 12, 16, 0.86) 58%, rgba(95, 24, 24, 0.48) 100%),
    linear-gradient(135deg, rgba(255, 229, 163, 0.12), rgba(255, 81, 99, 0.14));
}

.brand-mark {
  width: 58px;
  height: 58px;
  border-radius: 17px;
}

h1 {
  font-size: clamp(2.7rem, 5vw, 5.6rem);
  text-shadow: 0 0 30px rgba(255, 81, 99, 0.18), 0 14px 38px rgba(0, 0, 0, 0.65);
}

.eyebrow,
.home-kicker,
.stack-card span,
.stack-row span {
  color: #ff9d8c;
}

.subtitle,
.home-copy p {
  color: #efd7d2;
}

.mode-tab {
  min-height: 34px;
  padding: 0 13px;
}

.app-download {
  min-height: 40px;
  border-radius: 12px;
}

.overview-strip {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.overview-strip div {
  min-height: 66px;
  border-radius: 14px;
  padding: 12px 14px;
}

.overview-strip strong { font-size: 0.98rem; }

.grid {
  grid-template-columns: minmax(280px, 0.9fr) minmax(520px, 1.35fr) minmax(250px, 0.8fr);
  gap: 14px;
}

.panel {
  border-radius: 16px;
  padding: 18px;
}

.home-command {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.72fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 16px;
}

.home-copy {
  display: grid;
  align-content: center;
  gap: 10px;
}

.home-kicker {
  width: max-content;
  min-height: 26px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid rgba(255, 122, 104, 0.28);
  border-radius: 999px;
  background: rgba(255, 122, 104, 0.08);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.home-copy h2 {
  max-width: 650px;
  margin: 0;
  color: var(--text);
  font-size: clamp(1.85rem, 3.2vw, 3.35rem);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: none;
}

.home-copy p {
  max-width: 600px;
  font-size: 0.92rem;
  line-height: 1.44;
}

.home-stack {
  display: grid;
  gap: 9px;
}

.stack-card,
.stack-row,
.home-feature-row article {
  border: 1px solid rgba(255, 122, 104, 0.2);
  border-radius: 15px;
  background:
    linear-gradient(180deg, rgba(36, 10, 13, 0.86), rgba(14, 5, 7, 0.84));
}

.stack-card {
  min-height: 118px;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 15px;
}

.stack-card strong { font-size: 1.28rem; }
.stack-card em { color: var(--muted); font-style: normal; }

.stack-row {
  min-height: 52px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
}

.search-field input {
  min-height: 48px;
  border-radius: 13px;
  background: rgba(14, 5, 7, 0.82);
}

.home-feature-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.home-feature-row article {
  min-height: 94px;
  padding: 13px;
}

.home-feature-row span {
  color: var(--gold-bright);
  font-size: 0.72rem;
  font-weight: 950;
}

.home-feature-row strong { color: var(--text); }
.home-feature-row p { color: var(--muted); font-size: 0.86rem; line-height: 1.34; }

.champion-result,
.setting-row,
.draft-slot,
.signal,
.ally-chip,
.review-card,
.matchup-copy,
.diagnostic-row,
.item-card {
  border-color: rgba(255, 122, 104, 0.2);
  background: linear-gradient(180deg, rgba(32, 9, 12, 0.88), rgba(13, 5, 7, 0.86));
}

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

.item-card {
  min-height: 176px;
  border-radius: 14px;
  padding: 11px;
}

.item-card:first-child { grid-column: span 1; }

.item-visual,
.item-card.key-item .item-visual {
  width: 54px;
  height: 54px;
  border-radius: 12px;
  border-color: rgba(255, 229, 163, 0.38);
  background: linear-gradient(135deg, rgba(255, 229, 163, 0.16), rgba(255, 81, 99, 0.12));
}

.item-card img,
.item-card.key-item img {
  width: 46px;
  height: 46px;
}

.item-card:first-child .item-name,
.item-name { font-size: 0.86rem; }
.item-note { font-size: 0.72rem; }

.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.review-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .rail-item, .rail-note { justify-content: center; padding: 0; font-size: 0.62rem; }
  .home-command, .home-feature-row { grid-template-columns: 1fr; }
  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "explore"
      "setup"
      "build"
      "notes"
      "review";
  }
  .overview-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Chrome spectrum polish */
:root {
  --bg: #08090c;
  --panel: rgba(16, 18, 23, 0.82);
  --panel-2: rgba(25, 28, 36, 0.84);
  --panel-soft: rgba(12, 14, 19, 0.74);
  --line: rgba(226, 232, 240, 0.14);
  --text: #fbfcff;
  --muted: #a9b2c0;
  --gold: #f0c76d;
  --gold-bright: #ffe6a6;
  --steel: #7dd9ec;
  --danger: #ff6475;
  --leaf: #61e6a2;
  --coral: #ff8d7c;
  --violet: #b59cff;
  --chrome: linear-gradient(135deg, rgba(255,255,255,0.18), rgba(255,255,255,0.035) 36%, rgba(125,217,236,0.1) 70%, rgba(255,230,166,0.12));
  --shadow-strong: 0 28px 80px rgba(0, 0, 0, 0.5);
}

body {
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 141, 124, 0.17), transparent 30%),
    radial-gradient(circle at 80% 10%, rgba(125, 217, 236, 0.16), transparent 28%),
    radial-gradient(circle at 68% 82%, rgba(240, 199, 109, 0.13), transparent 34%),
    linear-gradient(135deg, #08090c 0%, #11141b 48%, #090a0f 100%);
}

.backdrop {
  background:
    linear-gradient(90deg, rgba(8, 9, 12, 0.96) 0%, rgba(12, 14, 19, 0.82) 48%, rgba(17, 20, 27, 0.52) 100%),
    linear-gradient(180deg, transparent 0%, #08090c 88%),
    var(--champion-splash, linear-gradient(135deg, #151820, #252833)) center right / cover no-repeat;
}

.backdrop::after {
  background-image:
    linear-gradient(rgba(226, 232, 240, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(226, 232, 240, 0.045) 1px, transparent 1px);
}

.side-rail,
.topbar,
.panel,
.overview-strip div,
.info-strip,
.live-build-widget {
  border-color: rgba(226, 232, 240, 0.16);
  background:
    var(--chrome),
    linear-gradient(180deg, rgba(20, 23, 31, 0.9), rgba(9, 11, 16, 0.92));
  box-shadow:
    var(--shadow-strong),
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    inset 0 -1px 0 rgba(0, 0, 0, 0.24);
}

.topbar {
  background:
    linear-gradient(105deg, rgba(13, 15, 20, 0.98) 0%, rgba(24, 28, 37, 0.88) 56%, rgba(36, 45, 55, 0.56) 100%),
    linear-gradient(135deg, rgba(255, 141, 124, 0.12), rgba(125, 217, 236, 0.13), rgba(240, 199, 109, 0.09));
}

.rail-logo,
.brand-mark,
.app-download,
.primary {
  color: #08090c;
  background:
    linear-gradient(135deg, #ffffff 0%, #ffe6a6 24%, #ff8d7c 50%, #7dd9ec 78%, #dfe7ef 100%);
  border-color: rgba(255, 255, 255, 0.62);
  box-shadow:
    0 18px 40px rgba(125, 217, 236, 0.16),
    0 12px 36px rgba(255, 141, 124, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.eyebrow,
.home-kicker,
.stack-card span,
.stack-row span {
  color: var(--steel);
}

h1 {
  text-shadow: 0 0 34px rgba(125, 217, 236, 0.16), 0 14px 38px rgba(0, 0, 0, 0.65);
}

.subtitle,
.home-copy p {
  color: #d8dee8;
}

.rail-item,
.mode-tab,
.ghost,
.mini-pill,
.status-pill {
  border-color: rgba(226, 232, 240, 0.15);
  background: rgba(255, 255, 255, 0.045);
}

.rail-nav .rail-item {
  min-height: 46px;
  color: #d8dee8;
  border-color: rgba(226, 232, 240, 0.15);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(125, 217, 236, 0.035)),
    rgba(255, 255, 255, 0.045);
  font-size: 0.94rem;
  font-weight: 900;
}

.rail-nav .rail-item:hover {
  color: #ffffff;
  border-color: rgba(125, 217, 236, 0.32);
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.12), rgba(181, 156, 255, 0.07)),
    rgba(255, 255, 255, 0.055);
}

.rail-item.active,
.mode-tab.active {
  color: #ffffff;
  border-color: rgba(125, 217, 236, 0.38);
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.17), rgba(181, 156, 255, 0.1)),
    rgba(255, 255, 255, 0.045);
}

.status-pill {
  color: var(--gold-bright);
  border-color: rgba(240, 199, 109, 0.36);
  background: linear-gradient(135deg, rgba(240, 199, 109, 0.16), rgba(255, 141, 124, 0.08));
}

.overview-strip div:nth-child(1) {
  border-color: rgba(125, 217, 236, 0.28);
  background: linear-gradient(135deg, rgba(125, 217, 236, 0.13), rgba(255,255,255,0.04)), rgba(16,18,23,0.82);
}

.overview-strip div:nth-child(2) {
  border-color: rgba(240, 199, 109, 0.3);
  background: linear-gradient(135deg, rgba(240, 199, 109, 0.14), rgba(255,255,255,0.04)), rgba(16,18,23,0.82);
}

.overview-strip div:nth-child(3) {
  border-color: rgba(181, 156, 255, 0.28);
  background: linear-gradient(135deg, rgba(181, 156, 255, 0.14), rgba(255,255,255,0.04)), rgba(16,18,23,0.82);
}

.overview-strip div:nth-child(4) {
  border-color: rgba(97, 230, 162, 0.28);
  background: linear-gradient(135deg, rgba(97, 230, 162, 0.12), rgba(255,255,255,0.04)), rgba(16,18,23,0.82);
}

.overview-strip div:nth-child(5) {
  border-color: rgba(255, 141, 124, 0.3);
  background: linear-gradient(135deg, rgba(255, 141, 124, 0.13), rgba(255,255,255,0.04)), rgba(16,18,23,0.82);
}

.explore-panel {
  background:
    radial-gradient(circle at 82% 18%, rgba(125, 217, 236, 0.16), transparent 34%),
    radial-gradient(circle at 22% 82%, rgba(255, 141, 124, 0.13), transparent 34%),
    var(--chrome),
    linear-gradient(120deg, rgba(18, 21, 28, 0.95), rgba(9, 11, 16, 0.94));
}

.stack-card,
.stack-row,
.home-feature-row article,
.champion-result,
.setting-row,
.draft-slot,
.signal,
.ally-chip,
.review-card,
.matchup-copy,
.diagnostic-row,
.item-card {
  border-color: rgba(226, 232, 240, 0.14);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(13, 16, 22, 0.86);
}

.home-feature-row article:nth-child(1),
.stack-card {
  border-color: rgba(125, 217, 236, 0.26);
}

.home-feature-row article:nth-child(2) {
  border-color: rgba(255, 141, 124, 0.28);
}

.home-feature-row article:nth-child(3) {
  border-color: rgba(240, 199, 109, 0.3);
}

.search-field input,
select {
  border-color: rgba(226, 232, 240, 0.16);
  background: rgba(9, 11, 16, 0.82);
}

.search-field input:focus,
select:focus {
  border-color: rgba(125, 217, 236, 0.62);
  box-shadow: 0 0 0 3px rgba(125, 217, 236, 0.12);
}

.item-card.key-item {
  border-color: rgba(240, 199, 109, 0.62);
  background:
    linear-gradient(180deg, rgba(240, 199, 109, 0.13), rgba(255,255,255,0.025)),
    rgba(13, 16, 22, 0.9);
}

.item-visual,
.item-card.key-item .item-visual,
.review-icon {
  border-color: rgba(226, 232, 240, 0.22);
  background:
    linear-gradient(135deg, rgba(240, 199, 109, 0.17), rgba(125, 217, 236, 0.13), rgba(255, 141, 124, 0.1));
}

.live-buy-card {
  border-color: rgba(97, 230, 162, 0.32);
  background:
    linear-gradient(135deg, rgba(97, 230, 162, 0.13), rgba(125, 217, 236, 0.07)),
    rgba(13, 16, 22, 0.9);
}

.enemy-side .draft-slot {
  background:
    linear-gradient(270deg, rgba(255, 141, 124, 0.12), rgba(13, 16, 22, 0.88));
}

.ally-side .draft-slot {
  background:
    linear-gradient(90deg, rgba(125, 217, 236, 0.11), rgba(13, 16, 22, 0.88));
}

.live-dot {
  background: var(--leaf);
  box-shadow: 0 0 18px rgba(97, 230, 162, 0.9);
}

/* Game hub choices */
.game-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.game-card {
  min-height: 178px;
  display: grid;
  align-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px;
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--chrome-shadow);
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform 160ms ease, border-color 160ms ease;
}

.game-card::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 230px;
  height: 230px;
  border-radius: 999px;
  opacity: 0.42;
  filter: blur(12px);
  z-index: -1;
}

.game-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.16), transparent 44%, rgba(255, 255, 255, 0.06));
  opacity: 0.7;
  z-index: -1;
}

.league-card {
  border-color: rgba(125, 217, 236, 0.32);
  background:
    linear-gradient(145deg, rgba(22, 34, 46, 0.94), rgba(9, 14, 22, 0.96)),
    rgba(11, 15, 23, 0.92);
}

.league-card::before {
  background: #7dd9ec;
}

.game-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.86rem;
  font-weight: 950;
  letter-spacing: 0;
}

.game-card strong {
  font-size: clamp(1.25rem, 2vw, 1.9rem);
  line-height: 1.02;
}

.game-card p {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.38;
}

.game-card em {
  width: max-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 900;
}

.game-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.28);
}

@media (max-width: 1180px) {
  .game-choice {
    grid-template-columns: 1fr;
  }
}

.game-section {
  margin-top: 14px;
}

.section-title {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.045);
}

.section-title span {
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.section-title strong {
  color: var(--text);
}

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

.tool-grid article {
  min-height: 138px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.025)),
    rgba(13, 16, 22, 0.86);
}

.tool-grid span {
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.game-tool-grid span {
  color: #7dd9ec;
}

.tool-grid strong {
  color: var(--text);
  font-size: 1.02rem;
}

.tool-grid p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.36;
}

.game-tool-grid article:nth-child(1),
.game-tool-grid article:nth-child(4) {
  border-color: rgba(125, 217, 236, 0.26);
}

.game-tool-grid article:nth-child(2),
.game-tool-grid article:nth-child(5) {
  border-color: rgba(240, 199, 109, 0.28);
}

.game-tool-grid article:nth-child(3),
.game-tool-grid article:nth-child(6) {
  border-color: rgba(97, 230, 162, 0.24);
}

@media (max-width: 1180px) {
  .tool-grid {
    grid-template-columns: 1fr;
  }
}

body:not(.app-mode) .app-shell {
  grid-template-columns: 220px minmax(0, 1fr);
  max-width: 1720px;
  margin: 0 auto;
  padding-left: clamp(16px, 2.4vw, 38px);
  padding-right: clamp(16px, 2.4vw, 38px);
}

body:not(.app-mode) .side-rail {
  min-width: 0;
}

body:not(.app-mode) .rail-item {
  justify-content: start;
  text-align: left;
  white-space: normal;
}

body:not(.app-mode) .workspace {
  width: 100%;
}

body:not(.app-mode) .overview-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

body:not(.app-mode) .grid {
  grid-template-columns: minmax(0, 1fr);
}

@media (max-width: 860px) {
  body:not(.app-mode) .app-shell {
    display: block;
  }
}

/* Wider, airier website layout */
body:not(.app-mode) {
  font-size: 15px;
}

body:not(.app-mode) .app-shell {
  grid-template-columns: clamp(218px, 12.5vw, 250px) minmax(0, 1fr);
  max-width: 1880px;
  margin: 0 auto;
  padding:
    clamp(22px, 2.2vw, 44px)
    clamp(24px, 3vw, 58px)
    clamp(38px, 4vw, 76px);
  gap: clamp(18px, 1.7vw, 32px);
}

body:not(.app-mode) .workspace {
  width: 100%;
}

body:not(.app-mode) .topbar {
  min-height: 196px;
  padding: clamp(20px, 1.8vw, 32px);
  margin-bottom: clamp(16px, 1.5vw, 26px);
}

body:not(.app-mode) h1 {
  font-size: clamp(2.45rem, 4vw, 4.9rem);
}

body:not(.app-mode) .subtitle {
  max-width: 760px;
  font-size: clamp(0.92rem, 0.95vw, 1.08rem);
}

body:not(.app-mode) .overview-strip {
  gap: clamp(12px, 1vw, 18px);
  margin-bottom: clamp(16px, 1.5vw, 26px);
}

body:not(.app-mode) .overview-strip div {
  min-height: 76px;
  padding: 14px 16px;
}

body:not(.app-mode) .grid {
  gap: clamp(16px, 1.4vw, 26px);
}

body:not(.app-mode) .explore-panel {
  padding: clamp(18px, 1.7vw, 30px);
}

body:not(.app-mode) .home-command {
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.72fr);
  gap: clamp(16px, 1.5vw, 28px);
}

body:not(.app-mode) .home-copy h2 {
  font-size: clamp(2rem, 3.4vw, 4rem);
}

body:not(.app-mode) .home-copy p {
  font-size: clamp(0.94rem, 0.95vw, 1.08rem);
}

body:not(.app-mode) .tool-grid {
  gap: clamp(12px, 1vw, 18px);
}

@media (min-width: 1500px) {
  body:not(.app-mode) .tool-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.ban-column {
  display: grid;
  gap: 8px;
}

.ban-column > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.ban-list {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
}

.ban-chip {
  min-width: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  padding: 6px;
  border: 1px solid rgba(226, 232, 240, 0.12);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.035);
}

.ban-chip i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.06);
  background-position: center;
  background-size: cover;
}

.ban-chip strong {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.72rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ban-chip.waiting {
  opacity: 0.62;
  border-style: dashed;
}

.draft-slot.waiting {
  opacity: 0.68;
  border-style: dashed;
}

.item-card {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 16px 34px rgba(0,0,0,0.2);
}

.item-card.key-item::before {
  content: "NEXT";
  position: absolute;
  top: 10px;
  right: 10px;
  padding: 4px 7px;
  border-radius: 999px;
  color: #08090c;
  background: linear-gradient(135deg, #ffffff, #f0c76d);
  font-size: 0.62rem;
  font-weight: 950;
}

.item-card.key-item .item-name {
  color: #ffffff;
}

.premium-section {
  margin-top: 18px;
  padding: 20px;
  border: 1px solid rgba(240, 199, 109, 0.24);
  border-radius: 18px;
  background:
    radial-gradient(circle at 16% 20%, rgba(240, 199, 109, 0.16), transparent 30%),
    radial-gradient(circle at 82% 24%, rgba(181, 156, 255, 0.13), transparent 34%),
    var(--chrome),
    linear-gradient(135deg, rgba(18, 21, 28, 0.94), rgba(11, 13, 18, 0.96));
  box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,0.1);
}

.premium-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(220px, 0.55fr);
  gap: 18px;
  align-items: stretch;
}

.premium-kicker {
  color: #f0c76d;
  border-color: rgba(240, 199, 109, 0.36);
  background: rgba(240, 199, 109, 0.1);
}

.premium-hero h2 {
  max-width: 860px;
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 3.2rem);
  line-height: 1;
}

.premium-hero p {
  max-width: 780px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.premium-price {
  min-height: 170px;
  display: grid;
  align-content: end;
  gap: 5px;
  padding: 18px;
  border: 1px solid rgba(240, 199, 109, 0.3);
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(240, 199, 109, 0.18), rgba(125, 217, 236, 0.08)),
    rgba(9, 11, 16, 0.74);
}

.premium-price span,
.premium-compare span,
.premium-grid span {
  color: #f0c76d;
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.premium-price strong {
  color: #ffffff;
  font-size: 2.4rem;
}

.premium-price em {
  color: var(--muted);
  font-style: normal;
}

.premium-checkout {
  width: 100%;
  min-height: 42px;
  margin-top: 8px;
  border-radius: 12px;
}

.premium-checkout-status {
  min-height: 34px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.28;
}

.license-card {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(260px, 1.2fr);
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  border: 1px solid rgba(125, 217, 236, 0.22);
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.1), rgba(255,255,255,0.03)),
    rgba(13, 16, 22, 0.82);
}

.license-card span {
  color: var(--steel);
  font-size: 0.72rem;
  font-weight: 950;
  text-transform: uppercase;
}

.license-card strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 1.5rem;
}

.license-card p,
.compact-field small {
  color: var(--muted);
  font-size: 0.82rem;
}

.license-controls {
  display: grid;
  gap: 10px;
}

.compact-field {
  gap: 5px;
}

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

body.license-premium .license-card {
  border-color: rgba(97, 230, 162, 0.38);
  background:
    linear-gradient(135deg, rgba(97, 230, 162, 0.13), rgba(125, 217, 236, 0.06)),
    rgba(13, 16, 22, 0.9);
}

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

.premium-roadmap article {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 7px;
  padding: 14px;
  border: 1px solid rgba(240, 199, 109, 0.2);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.065), rgba(255,255,255,0.02)),
    rgba(11, 13, 18, 0.78);
}

.premium-roadmap span {
  color: #f0c76d;
  font-size: 0.72rem;
  font-weight: 950;
}

.premium-roadmap strong {
  color: var(--text);
}

.premium-roadmap p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.34;
}

.premium-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  border: 1px solid rgba(240, 199, 109, 0.34);
  border-radius: 999px;
  color: #ffffff;
  background:
    linear-gradient(135deg, rgba(240, 199, 109, 0.2), rgba(125, 217, 236, 0.1)),
    rgba(255, 255, 255, 0.055);
  font-weight: 950;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12);
}

.premium-link.active,
.premium-link:hover {
  border-color: rgba(240, 199, 109, 0.62);
  background: linear-gradient(135deg, #ffffff, #f0c76d 42%, #7dd9ec);
  color: #08090c;
}

.premium-compare,
.premium-grid {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

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

.premium-feature-row,
.premium-tool-grid {
  margin-top: 14px;
}

.premium-table {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.premium-table > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(226, 232, 240, 0.13);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02)),
    rgba(13, 16, 22, 0.78);
}

.premium-table-head {
  border-color: rgba(240, 199, 109, 0.32) !important;
  background:
    linear-gradient(135deg, rgba(240, 199, 109, 0.14), rgba(125, 217, 236, 0.08)),
    rgba(13, 16, 22, 0.88) !important;
}

.premium-table span {
  color: #ffffff;
  font-weight: 950;
}

.premium-table strong {
  color: #f0c76d;
}

.premium-table em {
  color: var(--muted);
  font-size: 0.88rem;
  font-style: normal;
  line-height: 1.35;
}

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

.premium-compare article,
.premium-grid article {
  min-height: 128px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 15px;
  border: 1px solid rgba(226, 232, 240, 0.14);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.025)),
    rgba(13, 16, 22, 0.86);
}

.premium-compare article:nth-child(2),
.premium-grid article:nth-child(2),
.premium-grid article:nth-child(5) {
  border-color: rgba(125, 217, 236, 0.27);
}

.premium-compare article:nth-child(3),
.premium-grid article:nth-child(3),
.premium-grid article:nth-child(6) {
  border-color: rgba(181, 156, 255, 0.26);
}

.premium-compare strong,
.premium-grid strong {
  color: var(--text);
  font-size: 1rem;
}

.premium-compare p,
.premium-grid p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.36;
}

@media (max-width: 1180px) {
  .premium-hero,
  .premium-compare,
  .premium-grid,
  .premium-roadmap,
  .premium-table > div {
    grid-template-columns: 1fr;
  }
}

/* Public beta sidebar stability */
body.app-mode .app-shell {
  grid-template-columns: 172px minmax(760px, 1fr);
  min-width: 960px;
  gap: 18px;
  align-items: start;
}

body.app-mode .side-rail {
  width: 100%;
  min-width: 0;
  align-self: start;
  grid-template-rows: auto auto 1fr;
}

body.app-mode .rail-nav {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
}

body.app-mode .rail-nav .rail-item,
body.app-mode .rail-item,
body.app-mode .rail-note {
  width: 100%;
  min-width: 0;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  overflow: hidden;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  font-size: 0.88rem;
}

body.app-mode .rail-logo {
  margin: 0 auto 4px;
  flex: 0 0 auto;
}

@media (max-width: 1320px) {
  body.app-mode .grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "explore"
      "setup"
      "build"
      "notes"
      "review";
  }

  body.app-mode .read-panel {
    grid-column: auto;
  }

  body.app-mode .recommendation-panel {
    min-height: auto;
  }
}

@media (max-width: 980px) {
  body.app-mode .app-shell {
    grid-template-columns: 148px minmax(640px, 1fr);
    min-width: 820px;
  }

  body.app-mode .rail-nav .rail-item,
  body.app-mode .rail-item,
  body.app-mode .rail-note {
    min-height: 54px;
    padding: 0 8px;
    font-size: 0.78rem;
  }
}

/* Search, feedback and mobile polish */
.champion-profile-card,
.player-search-card {
  grid-column: 1 / -1;
}

.champion-profile-card {
  display: grid;
  gap: 14px;
  padding: 14px;
  border: 1px solid rgba(125, 217, 236, 0.28);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.12), rgba(255, 122, 104, 0.08)),
    rgba(10, 12, 18, 0.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.champion-profile-hero {
  min-height: 190px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(8, 10, 15, 0.94), rgba(8, 10, 15, 0.62)),
    center / cover no-repeat;
}

.result-avatar.large {
  width: 76px;
  height: 76px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
}

.champion-profile-hero span,
.champion-profile-grid section > span,
.champion-profile-footer strong {
  color: #7dd9ec;
  font-size: 0.74rem;
  font-weight: 950;
  text-transform: uppercase;
}

.champion-profile-hero strong {
  display: block;
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 3rem);
  line-height: 0.95;
}

.champion-profile-hero p,
.champion-profile-grid p,
.champion-profile-grid em,
.champion-profile-footer {
  color: var(--muted);
}

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

.champion-profile-grid section,
.feedback-card {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  background: rgba(8, 12, 17, 0.68);
}

.mini-item-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-item-pill {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 8px 5px 5px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.045);
}

.mini-item-pill img {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.mini-item-pill strong {
  color: var(--text);
  font-size: 0.78rem;
}

.compact-action {
  min-height: 34px;
  border-radius: 10px;
}

.champion-profile-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  font-size: 0.86rem;
}

.feedback-section {
  gap: 16px;
}

.feedback-hero {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(125, 217, 236, 0.24);
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(125, 217, 236, 0.16), rgba(255, 228, 147, 0.08)),
    rgba(8, 12, 17, 0.76);
}

.feedback-hero h2 {
  max-width: 780px;
  color: var(--text);
  font-size: clamp(1.8rem, 3vw, 3.1rem);
  line-height: 1;
}

.feedback-hero p {
  max-width: 720px;
  color: var(--muted);
  line-height: 1.45;
}

.feedback-hero .feedback-contact {
  width: fit-content;
  max-width: 100%;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  padding: 8px 10px;
  border: 1px solid rgba(255, 228, 147, 0.28);
  border-radius: 8px;
  background: rgba(255, 228, 147, 0.1);
}

.feedback-card {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 16px;
}

.feedback-message-field,
.feedback-card .primary,
.feedback-status {
  grid-column: 1 / -1;
}

.feedback-card textarea {
  width: 100%;
  min-height: 150px;
  resize: vertical;
  color: var(--text);
  background: rgba(8, 12, 17, 0.78);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.feedback-status {
  min-height: 24px;
  color: var(--muted);
  font-size: 0.84rem;
}

@media (max-width: 1180px) {
  .champion-profile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  html,
  body {
    overflow-x: hidden;
  }

  body:not(.app-mode) {
    font-size: 14px;
  }

  body:not(.app-mode) .app-shell {
    display: block;
    min-width: 0;
    width: 100%;
    padding: 12px;
  }

  body:not(.app-mode) .side-rail {
    position: relative;
    min-height: auto;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px;
    border-radius: 16px;
  }

  body:not(.app-mode) .rail-logo {
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    margin: 0;
    border-radius: 12px;
  }

  body:not(.app-mode) .rail-nav {
    display: flex;
    flex: 1 1 auto;
    flex-direction: row;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body:not(.app-mode) .rail-nav::-webkit-scrollbar {
    display: none;
  }

  body:not(.app-mode) .rail-item {
    min-width: max-content;
    min-height: 42px;
    justify-content: center;
    padding: 0 14px;
    white-space: nowrap;
    font-size: 0.78rem;
  }

  body:not(.app-mode) .rail-note {
    display: none;
  }

  body:not(.app-mode) .topbar,
  body:not(.app-mode) .home-command,
  body:not(.app-mode) .search-grid,
  body:not(.app-mode) .player-search-head,
  body:not(.app-mode) .champion-profile-footer,
  .feedback-card {
    grid-template-columns: 1fr;
  }

  body:not(.app-mode) .topbar {
    min-height: auto;
    padding: 16px;
    border-radius: 18px;
  }

  body:not(.app-mode) .brand-row {
    align-items: center;
  }

  body:not(.app-mode) h1 {
    font-size: 2.45rem;
  }

  body:not(.app-mode) .subtitle,
  body:not(.app-mode) .home-copy p {
    font-size: 0.9rem;
  }

  body:not(.app-mode) .top-actions {
    justify-content: start;
    flex-wrap: wrap;
  }

  body:not(.app-mode) .app-download,
  body:not(.app-mode) .lang-select {
    min-height: 42px;
  }

  body:not(.app-mode) .overview-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  body:not(.app-mode) .home-stack {
    display: none;
  }

  body:not(.app-mode) .panel {
    padding: 14px;
    border-radius: 16px;
  }

  body:not(.app-mode) .search-results,
  body:not(.app-mode) .champion-profile-grid,
  body:not(.app-mode) .player-search-metrics,
  body:not(.app-mode) .player-profile-grid,
  body:not(.app-mode) .player-suggestions {
    grid-template-columns: 1fr;
  }

  body:not(.app-mode) .champion-profile-hero {
    min-height: 220px;
    align-items: end;
    padding: 14px;
  }

  body:not(.app-mode) .champion-profile-hero strong {
    font-size: 2rem;
  }

  body:not(.app-mode) .player-rank {
    justify-items: start;
    text-align: left;
  }
}

/* Final app/account/overlay safety overrides */
body:not(.app-mode) .account-menu {
  display: none !important;
}

body.app-mode .account-menu {
  position: relative;
  z-index: 2147483647;
}

body.app-mode.account-open .account-popover,
body.app-mode .account-menu.is-open .account-popover {
  position: fixed !important;
  top: 76px !important;
  right: 22px !important;
  left: auto !important;
  z-index: 2147483647 !important;
  width: min(430px, calc(100vw - 44px)) !important;
  max-height: calc(100vh - 104px) !important;
  overflow-y: auto !important;
  display: grid !important;
  gap: 10px !important;
}

body.app-mode .account-popover .field,
body.app-mode .account-popover .license-actions,
body.app-mode .account-popover button {
  position: relative;
  z-index: 1;
}

body.app-mode .account-popover .compact-field small {
  max-width: 100%;
  line-height: 1.32;
}

body.app-mode .live-build-widget {
  pointer-events: auto;
}

body.app-mode #teamUltTimers {
  position: fixed;
  right: 18px;
  bottom: 126px;
  z-index: 11990;
  width: min(270px, calc(100vw - 36px));
  padding: 8px;
  border: 1px solid rgba(125, 217, 236, 0.16);
  border-radius: 10px;
  background: rgba(8, 12, 17, 0.44);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(12px);
  opacity: 0.66;
}

body.app-mode #teamUltTimers:hover {
  opacity: 0.9;
}

body.app-mode #teamUltTimers h3 {
  margin-bottom: 5px;
  font-size: 0.62rem;
}

body.app-mode #teamUltTimers .overlay-list {
  gap: 4px;
}

body.app-mode #teamUltTimers .overlay-list span {
  min-height: 22px;
  padding: 3px 6px;
  background: rgba(255, 255, 255, 0.03);
}

body.app-mode #teamUltTimers .overlay-list strong,
body.app-mode #teamUltTimers .overlay-list em {
  font-size: 0.68rem;
}

@media (max-width: 760px) {
  body.app-mode.account-open .account-popover,
  body.app-mode .account-menu.is-open .account-popover {
    top: 68px !important;
    right: 12px !important;
    left: 12px !important;
    width: auto !important;
    max-height: calc(100vh - 84px) !important;
  }

body.app-mode #teamUltTimers {
    right: 10px;
    bottom: 96px;
    width: min(250px, calc(100vw - 20px));
  }
}

/* Keep the app surface to one compact live widget. The separate LoL HUD is rendered by the Windows overlay. */
body.app-mode .live-build-widget {
  top: 12px !important;
  left: 12px !important;
  width: min(250px, calc(100vw - 24px)) !important;
  padding: 7px !important;
  border-radius: 10px !important;
  opacity: 0.68 !important;
}

body.app-mode .live-build-widget:hover {
  opacity: 0.88 !important;
}

body.app-mode .live-build-widget .widget-head {
  padding-bottom: 5px !important;
}

body.app-mode .live-build-widget .widget-head span {
  font-size: 0.62rem !important;
}

body.app-mode .live-build-widget .widget-head strong {
  font-size: 0.74rem !important;
}

body.app-mode .live-build-widget .widget-items {
  grid-template-columns: repeat(6, 25px) !important;
  gap: 4px !important;
  margin-top: 6px !important;
}

body.app-mode .live-build-widget .widget-item {
  width: 25px !important;
  height: 25px !important;
  border-radius: 7px !important;
}

body.app-mode .live-build-widget .widget-item img {
  border-radius: 6px !important;
}

body.app-mode .live-build-widget p {
  margin-top: 6px !important;
  font-size: 0.64rem !important;
  line-height: 1.2 !important;
}

body.app-mode .live-build-widget .overlay-modules,
body.app-mode #objectiveTimers,
body.app-mode #teamUltTimers,
body.app-mode #csGoldPanel,
body.app-mode #threatPanel,
body.app-mode #enemyItemPanel {
  display: none !important;
}

/* Legacy popover styles stay disabled; Premium login lives as a normal card in the Premium tab. */
body.app-mode.account-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 2147483645;
  background:
    radial-gradient(circle at 50% 18%, rgba(125, 217, 236, 0.18), transparent 34%),
    rgba(3, 5, 8, 0.66);
  backdrop-filter: blur(8px);
}

body.app-mode .account-popover {
  display: none !important;
}

body.app-mode.account-open .account-popover,
body.app-mode .account-menu.is-open .account-popover {
  position: fixed !important;
  top: 18px !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%) !important;
  z-index: 2147483647 !important;
  width: min(520px, calc(100vw - 28px)) !important;
  max-height: calc(100vh - 36px) !important;
  overflow-y: auto !important;
  display: grid !important;
  gap: 14px !important;
  padding: 18px !important;
  border-radius: 18px !important;
  border-color: rgba(255, 226, 158, 0.42) !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255, 228, 147, 0.2), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(125, 217, 236, 0.16), transparent 32%),
    linear-gradient(145deg, rgba(20, 23, 29, 0.99), rgba(8, 10, 14, 0.99)) !important;
  box-shadow: 0 34px 110px rgba(0, 0, 0, 0.72), inset 0 1px 0 rgba(255,255,255,0.08) !important;
}

body.app-mode .account-popover-head {
  padding-bottom: 12px !important;
}

body.app-mode .account-popover-head span {
  font-size: 0.74rem !important;
}

body.app-mode .account-popover-head strong {
  display: block !important;
  margin-top: 4px !important;
  color: #f8fafc !important;
  font-size: 1rem !important;
  line-height: 1.28 !important;
}

body.app-mode .account-popover .field {
  gap: 7px !important;
}

body.app-mode .account-popover input {
  min-height: 46px !important;
  width: 100% !important;
  color: #f8fafc !important;
  background: rgba(255, 255, 255, 0.08) !important;
}

body.app-mode .account-popover .license-actions {
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px !important;
}

body.app-mode .account-popover button {
  min-height: 44px !important;
}

/* No floating live widget inside the app. The live HUD belongs only over the League game window. */
body.app-mode .live-build-widget {
  display: none !important;
}

/* Premium login now lives as a normal card inside the Premium tab. */
body.app-mode .premium-login-card {
  position: static !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 12px !important;
  order: -1 !important;
  margin: 0 0 10px !important;
  padding: 18px !important;
}

body.app-mode[data-view="premium"] .premium-section {
  display: grid !important;
  gap: 14px !important;
}

body.app-mode[data-view="settings"] .overview-strip,
body.app-mode[data-view="premium"] .overview-strip,
body.app-mode[data-view="feedback"] .overview-strip {
  display: none !important;
}

body.app-mode[data-view="settings"] .topbar,
body.app-mode[data-view="premium"] .topbar,
body.app-mode[data-view="feedback"] .topbar {
  min-height: 0 !important;
  margin-bottom: 12px !important;
  padding: 18px !important;
}

body.app-mode[data-view="settings"] .titleblock h1,
body.app-mode[data-view="premium"] .titleblock h1,
body.app-mode[data-view="feedback"] .titleblock h1 {
  font-size: clamp(2.2rem, 4vw, 4rem) !important;
}

body.app-mode:not([data-view="premium"]) .premium-login-card {
  display: none !important;
}

body.app-mode .premium-login-card .account-popover-head,
body.app-mode .premium-login-card .oauth-login-row,
body.app-mode .premium-login-card .license-actions,
body.app-mode .premium-login-card .danger-lite {
  grid-column: 1 / -1 !important;
}

body.app-mode .premium-login-card #loginStartBtn {
  align-self: end !important;
}

body.app-mode .premium-login-card .license-actions {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

body.app-mode .oauth-login-row,
.oauth-login-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.oauth-login {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px;
  min-height: 48px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #f8fafc;
  background: rgba(255, 255, 255, 0.07);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.07);
  cursor: pointer;
}

.oauth-login span {
  min-width: 30px;
  height: 30px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 900;
}

.oauth-login strong {
  font-size: 0.88rem;
  line-height: 1.1;
}

.google-login span {
  color: #16202a;
  background: linear-gradient(135deg, #ffffff, #ffe59a 34%, #ff7d68 58%, #7df1ff);
}

.discord-login span {
  color: #ffffff;
  background: linear-gradient(135deg, #5865f2, #8d7cff);
}

.oauth-login:hover {
  border-color: rgba(125, 217, 236, 0.44);
  background: rgba(125, 217, 236, 0.1);
}

.oauth-login:disabled,
.oauth-login.is-disabled {
  opacity: 0.52;
  cursor: not-allowed;
  filter: grayscale(0.35);
}

.oauth-login:disabled:hover,
.oauth-login.is-disabled:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
}

@media (max-width: 620px) {
  body.app-mode .oauth-login-row,
  .oauth-login-row {
    grid-template-columns: 1fr;
  }

  body.app-mode .premium-login-card {
    grid-template-columns: 1fr !important;
  }
}

body.app-mode.account-open::before {
  display: none !important;
}

body.app-mode[data-view="premium"] .premium-login-card {
  display: grid !important;
  position: static !important;
  inset: auto !important;
  transform: none !important;
  width: 100% !important;
  max-width: none !important;
  max-height: none !important;
  overflow: visible !important;
  z-index: 1 !important;
  border-radius: 18px !important;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 226, 147, 0.16), transparent 34%),
    radial-gradient(circle at 96% 10%, rgba(125, 217, 236, 0.13), transparent 30%),
    linear-gradient(145deg, rgba(24, 28, 34, 0.95), rgba(13, 16, 21, 0.96)) !important;
}

body.app-mode.signed-in .premium-login-card .login-email-field,
body.app-mode.signed-in .premium-login-card .login-code-field,
body.app-mode.signed-in .premium-login-card .login-start-action,
body.app-mode.signed-in .premium-login-card .login-oauth-row,
body.app-mode.signed-in .premium-login-card #loginVerifyBtn {
  display: none !important;
}

body.app-mode.license-premium #premiumCheckoutBtn,
body.app-mode.license-premium .premium-checkout {
  display: none !important;
}

body.app-mode.signed-in .premium-login-card .license-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

body.app-mode.signed-in .premium-login-card .account-popover-head {
  min-height: 0 !important;
}
