:root {
  color-scheme: dark;
  --bg: #111111;
  --panel: rgba(26, 26, 26, 0.86);
  --line: rgba(255, 255, 255, 0.13);
  --text: #f4f7fb;
  --muted: #a8a8a8;
  --accent: #ffffff;
  --accent-2: #20d6b5;
  --danger: #ff5c7a;
  --warning: #ffc857;
  --radius: 22px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { scroll-behavior: smooth; }

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 255, 255, 0.13), transparent 32rem),
    radial-gradient(circle at 86% 10%, rgba(32, 214, 181, 0.13), transparent 26rem),
    linear-gradient(140deg, #0f0f0f 0%, #191919 52%, #0b0b0b 100%);
  color: var(--text);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  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: 52px 52px;
  mask-image: linear-gradient(to bottom, black, transparent 78%);
}

main,
.hero {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

main { padding-bottom: 96px; }

.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 42px 0 24px;
}

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

h1 {
  max-width: 820px;
  font-size: clamp(2.6rem, 7vw, 6.7rem);
  line-height: 0.88;
  letter-spacing: -0.08em;
}

.brand-title {
  position: relative;
  isolation: isolate;
  width: fit-content;
}

.brand-title img {
  position: absolute;
  right: -105px;
  bottom: -82px;
  z-index: -1;
  width: clamp(120px, 16vw, 230px);
  opacity: 0.24;
  filter: grayscale(1) contrast(1.15);
  pointer-events: none;
}

h2 { font-size: 1.35rem; letter-spacing: -0.03em; }
h3 { font-size: 1.05rem; letter-spacing: -0.02em; }

.eyebrow {
  margin-bottom: 10px;
  color: var(--accent-2);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.subtitle {
  display: grid;
  gap: 4px;
  max-width: 760px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 1.05rem;
}

.patch-card,
.toolbar,
.tabs,
.tier-row,
.flow-sidebar,
.flow-card {
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(18px);
}

.tier-row {
  box-shadow: none;
  backdrop-filter: none;
}

.patch-card {
  min-width: 190px;
  padding: 20px;
  border-radius: var(--radius);
}

.patch-card span,
.patch-card small { display: block; color: var(--muted); }
.patch-card strong { display: block; margin: 4px 0; font-size: 2.25rem; }
code { color: #d8d0ff; }

button,
select,
input {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  font: inherit;
}

button {
  cursor: pointer;
  padding: 12px 16px;
  font-weight: 800;
}

button:hover,
.flow-card button:hover { border-color: rgba(32, 214, 181, 0.7); }
button.active { border-color: rgba(255, 255, 255, 0.72); background: rgba(255, 255, 255, 0.13); color: #ffffff; }

.tabs {
  display: inline-flex;
  gap: 8px;
  padding: 8px;
  border-radius: 18px;
}

.tab { min-width: 132px; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  margin: 16px 0 20px;
  padding: 18px;
  border-radius: var(--radius);
}

.search {
  display: grid;
  min-width: min(440px, 100%);
  gap: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.search input,
select { min-height: 46px; padding: 0 14px; }
select { min-width: 190px; }
select option { background: #f2f2f2; color: #111; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.view { display: none; }
.active-view { display: block; }

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 24px 0 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.tier-groups { display: grid; gap: 12px; }

.tier-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 14px;
  padding: 14px;
  border-radius: var(--radius);
}

.tier-label {
  display: grid;
  place-items: center;
  min-height: 112px;
  border-radius: 18px;
  background: var(--tier-color, var(--accent));
  color: #090909;
  font-weight: 950;
}

.tier-label strong {
  font-size: clamp(2.1rem, 4vw, 3.2rem);
  line-height: 1;
  text-align: center;
}

.tier-label strong {
  max-width: 100%;
  overflow-wrap: anywhere;
}

.tier-label-test strong {
  font-size: 1.45rem;
  letter-spacing: 0.02em;
}

.tier-cards {
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  min-width: 0;
  justify-content: flex-start;
  overflow-x: auto;
  padding-bottom: 4px;
}

.comp-tile {
  position: relative;
  isolation: isolate;
  display: grid;
  flex: 0 0 112px;
  width: 112px;
  height: 112px;
  place-items: center;
  gap: 4px;
  padding: 8px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: none;
  text-align: center;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.comp-tile:hover {
  z-index: 2;
  border-color: var(--tier-color, rgba(255, 255, 255, 0.22));
}

.comp-tile-content {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  align-content: center;
  min-width: 0;
  transition: transform 160ms ease;
}

.comp-tile-content > .icon {
  position: relative;
  z-index: 1;
}

.comp-tile:hover .comp-tile-content {
  transform: scale(1.08);
}

.comp-tile.has-tile-emblem .comp-tile-content::after {
  position: absolute;
  left: 50%;
  top: calc(50% + 31px);
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #ffd43b;
  border-radius: 6px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.9) var(--tile-emblem-image) center / cover no-repeat;
}

.comp-tile[data-comp-id="dark-star-emblem-flex"] .comp-tile-content::after,
.comp-tile[data-comp-id="viktor-nami"] .comp-tile-content::after {
  position: absolute;
  left: 50%;
  top: calc(50% + 31px);
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #ffd43b;
  border-radius: 6px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.9) url("mobalytics/items/dark-star-emblem.png") center / cover no-repeat;
}

.comp-tile[data-comp-id="viktor-nami"] .comp-tile-content::after {
  border-color: #18b7ff;
  background-image: url("mobalytics/items/drone-uplink.png");
}

.comp-tile[data-comp-id="space-groove"] .comp-tile-content::after {
  position: absolute;
  left: 50%;
  top: calc(50% + 31px);
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #b85cff;
  border-radius: 6px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.9) url("mobalytics/items/space-groove-emblem.png") center / cover no-repeat;
}

.comp-tile[data-comp-id="space-groove"] .comp-tile-content::after {
  border-color: #b85cff;
}

.comp-tile[data-comp-id="mighty-mech"] .comp-tile-content::after {
  position: absolute;
  left: 50%;
  top: calc(50% + 31px);
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #b85cff;
  border-radius: 6px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.9) url("mobalytics/augments/tft_augment_expedition.webp") center / cover no-repeat;
}

.comp-tile[data-comp-id="mighty-mech"] .comp-tile-content::after {
  border-color: #b85cff;
}

.comp-tile[data-comp-id="vex-fast-9"] .comp-tile-content::after {
  position: absolute;
  left: 50%;
  top: calc(50% + 31px);
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #ffd43b;
  border-radius: 6px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.9) url("mobalytics/augments/aurafarming_ii.webp") center / cover no-repeat;
}

.comp-tile[data-comp-id="yi-brawlers"] .comp-tile-content::after {
  position: absolute;
  left: 50%;
  top: calc(50% + 31px);
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #b85cff;
  border-radius: 6px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.9) url("mobalytics/items/malware-matrix.png") center / cover no-repeat;
}

.comp-tile[data-comp-id="primordian-reroll"] .comp-tile-content::after {
  position: absolute;
  left: 50%;
  top: calc(50% + 31px);
  z-index: 2;
  width: 26px;
  height: 26px;
  border: 1px solid #27f077;
  border-radius: 6px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.9) url("mobalytics/augments/portable-forge2.webp") center / cover no-repeat;
}

.comp-tile-emblem {
  position: absolute;
  right: 22px;
  bottom: 22px;
  z-index: 20;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.comp-tile-emblem img {
  display: block;
  width: 28px;
  height: 28px;
  border: 2px solid #ffd43b;
  border-radius: 8px;
  background: rgba(12, 14, 28, 0.9);
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.42);
  object-fit: cover;
}

.comp-tile.highlighted {
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: none;
}

.detail-carry-wrap {
  position: relative;
  display: grid;
  place-items: center;
}

.detail-carry-wrap.has-carry-emblem::after {
  position: absolute;
  top: 50%;
  left: calc(50% - 36px);
  z-index: 10;
  width: 30px;
  height: 30px;
  border: 2px solid #ffd43b;
  border-radius: 8px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.88) var(--detail-emblem-image) center / cover no-repeat;
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.36);
}

.comp-details[data-detail-comp-id="dark-star-emblem-flex"] .detail-carry-wrap::after {
  position: absolute;
  top: 50%;
  left: calc(50% - 36px);
  z-index: 10;
  width: 30px;
  height: 30px;
  border: 2px solid #ffd43b;
  border-radius: 8px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.88) url("mobalytics/items/dark-star-emblem.png") center / cover no-repeat;
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.36);
}

.comp-details[data-detail-comp-id="viktor-nami"] .detail-carry-wrap::after {
  position: absolute;
  top: 50%;
  left: calc(50% - 36px);
  z-index: 10;
  width: 30px;
  height: 30px;
  border: 2px solid #18b7ff;
  border-radius: 8px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.88) url("mobalytics/items/drone-uplink.png") center / cover no-repeat;
  box-shadow: 0 0 10px rgba(24, 183, 255, 0.36);
}

.comp-details[data-detail-comp-id="space-groove"] .detail-carry-wrap::after {
  position: absolute;
  top: 50%;
  left: calc(50% - 36px);
  z-index: 10;
  width: 30px;
  height: 30px;
  border: 2px solid #b85cff;
  border-radius: 8px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.88) url("mobalytics/items/space-groove-emblem.png") center / cover no-repeat;
  box-shadow: 0 0 10px rgba(184, 92, 255, 0.36);
}

.comp-details[data-detail-comp-id="mighty-mech"] .detail-carry-wrap::after {
  position: absolute;
  top: 50%;
  left: calc(50% - 36px);
  z-index: 10;
  width: 30px;
  height: 30px;
  border: 2px solid #b85cff;
  border-radius: 8px;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
  background: rgba(12, 14, 28, 0.88) url("mobalytics/augments/tft_augment_expedition.webp") center / cover no-repeat;
  box-shadow: 0 0 10px rgba(184, 92, 255, 0.36);
}

.tier-expanded {
  grid-column: 1 / -1;
}

.tier-empty {
  display: grid;
  min-height: 112px;
  place-items: center;
  padding: 10px 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  color: var(--muted);
  font-size: 0.68rem;
}

.comp-meta { color: var(--muted); font-size: 0.82rem; }
.comp-force { color: #dce4ef; font-size: 0.78rem; }

.comp-details {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 12px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.28);
}

.detail-side {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 9px;
  min-height: 560px;
  padding: 14px;
  border: 2px solid var(--tier-color, #fff);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 8%, color-mix(in srgb, var(--tier-color, #fff) 34%, transparent) 0, transparent 33%),
    linear-gradient(180deg, color-mix(in srgb, var(--tier-color, #fff) 22%, rgba(255, 255, 255, 0.05)) 0 24%, rgba(255, 255, 255, 0.045) 42%, rgba(255, 255, 255, 0.035) 100%);
  text-align: center;
}

.detail-side h3 {
  color: #fff;
  font-size: 1.05rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.detail-side p {
  color: var(--muted);
  font-size: 0.8rem;
}

.detail-side .playstyle {
  color: var(--tier-color);
  font-size: 0.76rem;
  font-weight: 950;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.detail-side strong {
  color: #fff;
  font-size: 0.8rem;
}

.side-icon-group {
  display: grid;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  justify-items: center;
  width: 100%;
}

.side-traits {
  display: grid;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  justify-items: center;
}

.side-traits > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-traits > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  width: 100%;
}

.trait-chip {
  position: relative;
  display: grid;
  grid-template-columns: 24px auto;
  grid-template-areas:
    "icon count"
    "name name";
  gap: 2px 5px;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 6px 5px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.24);
}

.trait-chip > img,
.trait-chip > em {
  grid-area: icon;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 950;
}

.trait-chip > strong {
  grid-area: count;
  color: #f2f2f2;
  font-size: 0.86rem;
  font-weight: 950;
  line-height: 1;
}

.trait-chip > small {
  grid-area: name;
  overflow: hidden;
  color: #d9d9d9;
  font-size: 0.56rem;
  font-weight: 850;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trait-chip:hover .icon-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.trait-tooltip {
  width: 320px;
}

.trait-bonuses {
  display: grid;
  gap: 5px;
  margin-top: 5px;
}

.trait-bonuses span {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  color: #dce4ef;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.25;
}

.trait-bonuses b {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  min-height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f0c94a;
  font-size: 0.68rem;
  font-weight: 950;
}

.side-icon-group > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
}

.side-icon-group > div {
  display: grid;
  grid-template-columns: repeat(3, 46px);
  gap: 9px;
  justify-content: center;
  justify-items: center;
  align-items: center;
  width: fit-content;
}

.side-notes {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-top: 8px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.side-notes span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 116px;
  min-height: 28px;
  padding: 4px 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.side-notes p {
  color: #f2f2f2;
  font-size: 0.78rem;
  line-height: 1.35;
}

.detail-main {
  display: grid;
  gap: 10px;
}

.detail-top-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-items: stretch;
}

.mini-segment,
.board-segment,
.notes-segment,
.stage-box {
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
}

.board-segment {
  overflow: hidden;
}

.mini-segment {
  display: grid;
  align-content: start;
  min-height: 132px;
  padding: 13px 12px;
}

.mini-segment .detail-label,
.notes-segment .detail-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  min-width: 104px;
  margin: 0 auto 8px;
  padding: 4px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0.08em;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.wide-segment {
  display: grid;
  min-height: 132px;
  align-content: center;
  justify-content: stretch;
}

.wide-segment .detail-label {
  display: none;
}

.wide-segment .detail-icons {
  min-height: 110px;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 3vw, 42px);
}

.detail-tabs {
  display: inline-flex;
  justify-self: start;
  gap: 8px;
  margin-bottom: 0;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
}

.detail-tabs button {
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 0.78rem;
}

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

.segment-header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.segment-header > span {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.board-stage {
  position: relative;
  display: grid;
  width: 100%;
  min-height: 360px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  padding: 14px;
  background:
    linear-gradient(30deg, transparent 42%, rgba(255,255,255,0.04) 42%, rgba(255,255,255,0.04) 58%, transparent 58%),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.08), transparent 18rem);
}

.board-stage::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  content: "";
  background: url("/logo-vk.png") center 46% / min(34%, 220px) no-repeat;
  opacity: 0.06;
  filter: grayscale(1) contrast(1.1);
}

.board-stage > * {
  position: relative;
  z-index: 1;
}

.board-icons {
  display: grid;
  grid-template-columns: repeat(7, 52px);
  gap: 12px;
  align-items: center;
  justify-content: center;
}

.tft-board {
  display: grid;
  width: min(100%, 680px);
  grid-template-columns: repeat(7, 74px);
  grid-template-rows: repeat(4, 82px);
  gap: 0 4px;
  justify-content: center;
  padding: 10px 42px 10px 6px;
}

.hex-cell {
  position: relative;
  display: grid;
  place-items: center;
  align-self: center;
  justify-self: center;
  width: 74px;
  height: 82px;
  padding: 3px;
  --hex-bg: rgba(255, 255, 255, 0.055);
  --hex-shadow: none;
}

.hex-cell::before {
  position: absolute;
  inset: 0;
  z-index: 0;
  content: "";
  clip-path: polygon(50% 0%, 100% 24%, 100% 76%, 50% 100%, 0% 76%, 0% 24%);
  background: var(--hex-bg);
  box-shadow: var(--hex-shadow);
}

.hex-cell:nth-child(14n + 8),
.hex-cell:nth-child(14n + 9),
.hex-cell:nth-child(14n + 10),
.hex-cell:nth-child(14n + 11),
.hex-cell:nth-child(14n + 12),
.hex-cell:nth-child(14n + 13),
.hex-cell:nth-child(14n + 14) {
  transform: translateX(37px);
}

.hex-cell.occupied {
  overflow: visible;
  --hex-bg: rgba(255, 255, 255, 0.2);
}

.hex-cell.occupied.cost-1 { --hex-bg: #d7dce2; --hex-shadow: 0 0 14px rgba(215, 220, 226, 0.28); }
.hex-cell.occupied.cost-2 { --hex-bg: #27f077; --hex-shadow: 0 0 14px rgba(39, 240, 119, 0.3); }
.hex-cell.occupied.cost-3 { --hex-bg: #18b7ff; --hex-shadow: 0 0 14px rgba(24, 183, 255, 0.32); }
.hex-cell.occupied.cost-4 { --hex-bg: #b85cff; --hex-shadow: 0 0 14px rgba(184, 92, 255, 0.34); }
.hex-cell.occupied.cost-5 { --hex-bg: #ffd43b; --hex-shadow: 0 0 14px rgba(255, 212, 59, 0.36); }

.board-unit-piece {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.board-stars {
  position: absolute;
  top: -18px;
  left: 50%;
  z-index: 3;
  color: #ffd84d;
  font-size: 0.74rem;
  font-weight: 950;
  letter-spacing: -1px;
  line-height: 1;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85), 0 0 8px rgba(255, 216, 77, 0.45);
  transform: translateX(-50%);
}

.board-unit-items {
  position: absolute;
  right: 50%;
  bottom: -12px;
  z-index: 3;
  display: flex;
  gap: 2px;
  padding: 0;
  transform: translateX(50%);
}

.board-unit-items .icon {
  min-width: 0;
  max-width: none;
}

.board-unit-items .icon strong,
.board-unit-items .icon img {
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.48rem;
  clip-path: none;
  transform: none;
}

.board-unit-items .icon small { display: none; }

.hex-cell .board-unit {
  width: 100%;
  height: 100%;
  min-width: 0;
  max-width: none;
}

.hex-cell .board-unit strong,
.hex-cell .board-unit img {
  width: 100%;
  height: 100%;
  border-width: 0;
  border-radius: 0;
  clip-path: polygon(50% 0%, 100% 24%, 100% 76%, 50% 100%, 0% 76%, 0% 24%);
  object-fit: cover;
  transform: none;
}

.unit-items {
  position: absolute;
  right: -14px;
  bottom: -8px;
  display: flex;
  gap: 2px;
}

.detail-label {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-2);
  font-size: 0.68rem;
  font-weight: 950;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.detail-icons {
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  align-items: center;
  justify-content: center;
  overflow: visible;
  min-height: 66px;
  padding-bottom: 2px;
}

.notes-segment {
  padding: 13px;
}

.notes-segment p,
.stage-box p {
  color: #f2f2f2;
  font-size: 0.82rem;
  line-height: 1.45;
}

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

.stage-box {
  display: grid;
  justify-items: center;
  align-content: start;
  min-height: 116px;
  padding: 13px;
  text-align: center;
}

.stage-box span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: 104px;
  min-height: 28px;
  margin-bottom: 8px;
  padding: 4px 14px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
}

.board-link,
.copy-code-button,
.disabled-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 11px;
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.copy-code-button {
  margin-left: auto;
  border-color: rgba(32, 214, 181, 0.42);
  background: linear-gradient(135deg, rgba(32, 214, 181, 0.2), rgba(136, 92, 255, 0.14));
  color: #ffffff;
  cursor: pointer;
}

.copy-code-button.missing-code {
  opacity: 0.45;
  cursor: not-allowed;
}

.disabled-link { color: var(--muted); }

.flow-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  align-items: start;
}

.flow-sidebar {
  position: sticky;
  top: 112px;
  padding: 12px;
  border-radius: var(--radius);
}

.flow-types { display: grid; gap: 8px; }
.flow-types button { display: flex; justify-content: space-between; }
.flow-types small { color: var(--muted); }

.flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.flow-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border-radius: var(--radius);
}

.flow-top {
  display: flex;
  gap: 12px;
  align-items: center;
}

.flow-type {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-2);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.flow-card p { color: #d6deec; line-height: 1.45; }

.recommended {
  display: grid;
  gap: 8px;
}

.recommended button {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  text-align: left;
}

.icon {
  position: relative;
  display: inline-grid;
  place-items: center;
  gap: 5px;
  min-width: 58px;
  max-width: 112px;
  color: #dce4ef;
  text-align: center;
}

.icon-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 80;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  width: 260px;
  padding: 11px 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: #101316;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.52);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  text-align: left;
  transform: translate(-50%, 6px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.icon:hover .icon-tooltip {
  opacity: 1;
  transform: translate(-50%, 0);
}

.tooltip-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
}

.tooltip-icon img,
.tooltip-icon strong {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  object-fit: cover;
}

.tooltip-icon strong {
  display: grid;
  place-items: center;
  color: #f1c232;
  font-size: 0.72rem;
  font-weight: 950;
}

.tooltip-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tooltip-title {
  color: #ffffff;
  font-size: 1rem;
  font-weight: 950;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.tooltip-subtitle,
.tooltip-effect {
  color: #c7cbd1;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.3;
}

.tooltip-subtitle {
  color: #f0c94a;
  font-weight: 800;
  text-transform: uppercase;
}

.tooltip-accent {
  color: #df4b35;
}

.item-tooltip {
  border-color: rgba(240, 201, 74, 0.72);
}

.artifact-tooltip {
  grid-template-columns: 50px minmax(0, 1fr);
  width: 360px;
  gap: 14px;
  padding: 12px 14px;
}

.artifact-tooltip-image {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
}

.artifact-tooltip-image img,
.artifact-tooltip-image strong {
  width: 50px;
  height: 50px;
  border-radius: 11px;
  object-fit: cover;
}

.artifact-tooltip-image strong {
  display: grid;
  place-items: center;
  color: #f1c232;
  font-size: 0.72rem;
  font-weight: 950;
}

.artifact-tooltip-copy {
  display: grid;
  gap: 4px;
  align-content: start;
}

.item-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin: 3px 0;
}

.item-stats b {
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #f2f2f2;
  font-size: 0.62rem;
  font-weight: 850;
}

.champion-tooltip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  width: 300px;
  padding: 12px;
  border-width: 2px;
}

.champion-tooltip.cost-1 { border-color: #d7dce2; }
.champion-tooltip.cost-2 { border-color: #27f077; }
.champion-tooltip.cost-3 { border-color: #18b7ff; }
.champion-tooltip.cost-4 { border-color: #b85cff; }
.champion-tooltip.cost-5 { border-color: #ffd43b; }

.champion-tooltip-top {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.champion-tooltip-title {
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.champion-role {
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
  color: #d9d9d9;
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}

.champion-tooltip-meta {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(39, 240, 119, 0.78);
}

.champion-traits {
  display: grid;
  gap: 5px;
  color: #f2f2f2;
  font-size: 0.78rem;
  font-weight: 800;
}

.champion-traits span::before {
  color: #f2f2f2;
  content: "✦ ";
}

.champion-cost {
  color: #f0c94a;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.champion-ability {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
}

.ability-icon img,
.ability-icon strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  object-fit: cover;
}

.ability-icon img {
  max-width: 34px;
  max-height: 34px;
}

.ability-copy {
  display: grid;
  gap: 4px;
}

.ability-name {
  color: #fff;
  font-size: 0.78rem;
  font-weight: 950;
}

.ability-text {
  color: #f2f2f2;
  font-size: 0.68rem;
  font-weight: 650;
  line-height: 1.3;
}

.side-mini,
.mini-detail {
  transition: transform 140ms ease;
}

.side-mini:hover,
.mini-detail:hover {
  z-index: 20;
  transform: scale(1.08);
}

.board-unit:hover,
.board-unit:hover .icon-tooltip {
  transform: none;
}

.icon strong,
.icon img {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(32, 214, 181, 0.12));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 950;
  object-fit: cover;
}

.icon img {
  object-position: center;
}

.icon img[src$="blitzcrank.png"] {
  object-position: center 28%;
}

.icon img + strong { display: none; }
.icon.image-error img { display: none; }
.icon.image-error img + strong { display: grid; }

.comp-tile .icon strong,
.comp-tile .icon img {
  width: 64px;
  height: 64px;
  border-width: 3px;
  border-radius: 12px;
}

.comp-tile .icon small { display: none; }

.comp-tile .comp-tile-emblem {
  right: 22px;
  bottom: 22px;
}

.comp-tile .comp-tile-emblem img {
  width: 26px;
  height: 26px;
  border: 2px solid #ffd43b;
  border-radius: 8px;
  background: rgba(12, 14, 28, 0.9);
  box-shadow: 0 0 10px rgba(255, 212, 59, 0.42);
}

.icon small {
  overflow: hidden;
  width: 100%;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.1;
  text-overflow: ellipsis;
}

.mini strong,
.mini img {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: 0.65rem;
}

.mini small { display: none; }

.mini-detail strong,
.mini-detail img {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  font-size: 0.68rem;
}

.wide-segment .mini-detail strong,
.wide-segment .mini-detail img {
  width: 58px;
  height: 58px;
  border-radius: 15px;
  font-size: 0.78rem;
}

.mini-detail small { display: none; }

.side-mini strong,
.side-mini img {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  font-size: 0.68rem;
}

.side-mini small { display: none; }

.board-unit strong,
.board-unit img {
  width: 50px;
  height: 50px;
  border-width: 4px;
  border-radius: 50%;
  transform: scale(1.14);
}

.cost-1 strong,
.cost-1 img { border-color: #d7dce2; box-shadow: 0 0 14px rgba(215, 220, 226, 0.28); }
.cost-2 strong,
.cost-2 img { border-color: #27f077; box-shadow: 0 0 14px rgba(39, 240, 119, 0.3); }
.cost-3 strong,
.cost-3 img { border-color: #18b7ff; box-shadow: 0 0 14px rgba(24, 183, 255, 0.32); }
.cost-4 strong,
.cost-4 img { border-color: #b85cff; box-shadow: 0 0 14px rgba(184, 92, 255, 0.34); }
.cost-5 strong,
.cost-5 img { border-color: #ffd43b; box-shadow: 0 0 14px rgba(255, 212, 59, 0.36); }
.cost-unknown strong,
.cost-unknown img { border-color: rgba(255, 255, 255, 0.22); }

.board-unit small { display: none; }

.item-dot strong,
.item-dot img {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  font-size: 0.45rem;
}

.item-dot small { display: none; }

.detail-carry strong,
.detail-carry img {
  width: 104px;
  height: 104px;
  border: 2px solid color-mix(in srgb, var(--tier-color, #fff) 78%, rgba(255, 255, 255, 0.24));
  border-radius: 24px;
  font-size: 1.25rem;
}

.detail-carry small { display: none; }

.empty {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1080px) {
  .hero,
  .flow-layout { grid-template-columns: 1fr; }
  .flow-sidebar { position: static; }
}

@media (max-width: 760px) {
  main,
  .hero { width: min(100% - 20px, 1440px); }
  .patch-card { width: 100%; }
  .toolbar { align-items: stretch; flex-direction: column; }
  .tabs { display: grid; grid-template-columns: 1fr 1fr; }
  .tier-row { grid-template-columns: 1fr; }
  .tier-label { min-height: 54px; }
  .tier-expanded { grid-column: 1; }
  .comp-details { grid-template-columns: 1fr; }
  .detail-side { min-height: auto; }
  .detail-top-grid,
  .stage-grid { grid-template-columns: 1fr; }
  .tft-board { grid-template-columns: repeat(7, 38px); grid-template-rows: repeat(4, 34px); gap: 8px 5px; }
  .hex-cell { width: 38px; height: 44px; }
  .hex-cell:nth-child(14n + 8),
  .hex-cell:nth-child(14n + 9),
  .hex-cell:nth-child(14n + 10),
  .hex-cell:nth-child(14n + 11),
  .hex-cell:nth-child(14n + 12),
  .hex-cell:nth-child(14n + 13),
  .hex-cell:nth-child(14n + 14) { transform: translateX(19px); }
  .board-unit strong,
  .board-unit img { width: 34px; height: 34px; }
  .board-icons { grid-template-columns: repeat(4, 52px); }
  .board-pane { grid-template-columns: 1fr; }
}
