@media (min-width: 1200px) and (max-width: 1439px) {
  :root {
    --cols: 104px minmax(0, 1fr) 104px 320px;
    --gap: 10px;
    --ban: 28px;
    --slot-icon: 52px;
    --tile: 50px;
    --tile-gap: 7px 6px;
    --bar-w: 64px;
    --item: 36px;
    --keystone: 32px;
    --build-group-gap: 14px;
    --item-gap: 5px;
    --dmg-gap: 14px;
  }
}
@media (max-width: 1199px) {
  :root {
    --cols: 80px minmax(0, 1fr) 80px 300px;
    --gap: 8px;
    --slot-gap: 6px;
    --slot-icon: 40px;
    --tile: 44px;
    --tile-gap: 6px 5px;
    --ban: 24px;
    --sug-icon: 32px;
    --sug-pad: 7px 10px;
    --bar-w: 60px;
    --bd-row: 24px;
    --item: 32px;
    --keystone: 30px;
    --style-icon: 18px;
    --spell: 26px;
    --build-pad: 8px 10px;
    --build-body: 54px;
    --build-group-gap: 14px;
    --item-gap: 5px;
    --dmg-pad: 8px 10px;
    --dmg-gap: 14px;
    --tip-w: 240px;
    --top-h: 46px;
  }
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(900px 420px at 18% -12%, color-mix(in oklch, var(--amber) 9%, transparent), transparent 70%),
    radial-gradient(700px 380px at 92% -10%, color-mix(in oklch, var(--ally) 6%, transparent), transparent 70%),
    var(--bg-app);
  background-attachment: fixed;
  color: var(--text-1);
  color-scheme: dark;
  font-family: var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button { font: inherit; color: inherit; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--line-soft); border-radius: var(--radius-sm); }
::-webkit-scrollbar-track { background: transparent; }
input::placeholder { color: var(--text-3); }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .3; } }
@keyframes land { from { transform: scale(.92); } to { transform: scale(1); } }

.label {
  font: 600 12px/1 var(--font-display);
  letter-spacing: var(--tracking-title);
  text-transform: uppercase;
}
.wide-only { display: flex; }
.compact-only { display: none !important; }
@media (max-width: 1199px) {
  .wide-only { display: none !important; }
  .compact-only { display: inline-flex !important; }
}
.initials { font: 600 12px var(--font-display); color: var(--line-2); }
.pic { position: relative; overflow: hidden; display: grid; place-items: center; background: var(--bg-bar); }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* an icon still on its way shows a light sweep instead of its initials, then fades in */
.pic:has(img.waiting) { background: linear-gradient(100deg, var(--bg-bar) 40%, var(--bg-raised-2) 50%, var(--bg-bar) 60%) 0 0 / 300% 100%; animation: cp-shimmer 1.2s linear infinite; }
.pic:has(img.waiting) .initials, .pic:has(img.shown) .initials { visibility: hidden; }
.pic img.waiting { opacity: 0; }
.pic img.shown { animation: icon-in 180ms ease-out; }
@keyframes icon-in { from { opacity: 0; } }

/* top bar */
.topbar {
  position: relative;
  flex: none;
  height: var(--top-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 var(--space-6) 0 var(--space-7);
  background: color-mix(in oklch, var(--bg-bar) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hairline);
}
.brand { display: flex; align-items: center; gap: var(--space-5); }
.brand-mark { width: 12px; height: 12px; transform: rotate(45deg); border: 2px solid var(--amber); border-radius: var(--radius-xs); }
.brand-name { font: 700 16px/1 var(--font-display); letter-spacing: var(--tracking-label); text-transform: uppercase; white-space: nowrap; }
.spacer { flex: 1; }
.bar-button {
  height: 30px;
  padding: 0 var(--space-6);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-slot);
  background: transparent;
  color: var(--text-2);
  font: 600 12px/1 var(--font-display);
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast);
}
.bar-button:hover { border-color: var(--line-2); color: var(--text-1); }
.bar-button:disabled, .bar-button:disabled:hover { border-color: var(--line-slot); color: var(--text-4); cursor: default; }
.bar-button.open { border-color: var(--line-3); background: var(--bg-raised-2); color: var(--text-1); }

.live-pill {
  --tone: var(--line-3);
  display: flex;
  align-items: center;
  gap: 9px;
  height: 30px;
  padding: 0 var(--space-6) 0 var(--space-3);
  border-radius: var(--radius-pill);
  border: 1px solid var(--line-slot);
  background: transparent;
  transition: background .15s, border-color .15s;
}
.live-pill.on { border-color: color-mix(in oklch, var(--tone) 45%, transparent); background: color-mix(in oklch, var(--tone) 8%, transparent); }
.live-word { font: 600 12px/1 var(--font-display); letter-spacing: var(--tracking-title); text-transform: uppercase; color: var(--text-2); }
.live-sep { width: 1px; height: 14px; background: var(--line-soft); }
.live-dot { width: 8px; height: 8px; border-radius: var(--radius-sm); flex: none; background: var(--tone); }
.live-pill.on .live-dot { box-shadow: 0 0 8px color-mix(in oklch, var(--tone) 60%, transparent); }
.live-pill.pulse .live-dot { animation: pulse 1.4s ease-in-out infinite; }
.live-text { font: 500 13px/1 var(--font-ui); color: var(--text-3); white-space: nowrap; }
.live-pill.on .live-text { color: var(--tone); }
.live-pill.on.waiting .live-text { color: var(--text-2); }
.tone-amber { --tone: var(--amber); }
.tone-live { --tone: var(--live); }
.tone-neg { --tone: var(--neg); }
.tone-quiet { --tone: var(--text-3); }

/* moving between the draft and the champion page: the portrait flies into the page header while the rest fades */
::view-transition-group(champ-portrait) { animation-duration: .38s; animation-timing-function: var(--ease-out); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .22s; }

.loading { position: fixed; inset: 0; display: grid; place-items: center; background: var(--bg-app); z-index: 100; font: 500 14px var(--font-ui); color: var(--text-3); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* read out by screen readers, never drawn */
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
