/* Champions of the Rift: League of Legends client look. Hextech gold on the abyss blue, teal magic for anything live.
   Cinzel stands in for the client's display serif; Barlow for its interface sans. */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@500;700;900&family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600;700&display=swap');

:root {
  --abyss: #010a13; --navy: #0a1428; --navy-2: #091428; --steel: #1e2328; --steel-2: #1e282d;
  --gold: #c8aa6e; --gold-dk: #785a28; --gold-lt: #f0e6d2; --gold-hi: #c89b3c; --gold-dim: #a09b8c; --mute: #5b5a56;
  --teal: #0ac8b9; --teal-lt: #cdfafa; --teal-dk: #005a82; --teal-deep: #0a323c;
  --blue: #0acbe6; --red: #e84057;
  --display: "Cinzel", "Times New Roman", serif; --ui: "Barlow", system-ui, sans-serif; --num: "Barlow Condensed", "Barlow", sans-serif;
  --frame: linear-gradient(180deg, var(--gold-hi), var(--gold-dk));
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--abyss); color: var(--gold-lt); font: 500 15px/1.45 var(--ui); }
body { min-height: 100vh; }
a { color: var(--teal); }
img { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(10, 200, 185, .35); }

/* The client's backdrop: abyss blue, a teal bloom where the magic is, a faint hextech lattice, a heavy vignette. */
.abyss-bg { background:
    radial-gradient(ellipse 70% 55% at 50% 0%, rgba(0, 90, 130, .35), transparent 70%),
    radial-gradient(ellipse 50% 40% at 50% 110%, rgba(200, 155, 60, .12), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0 56 16v32L28 64 0 48V16zM28 64v33' fill='none' stroke='%23c8aa6e' stroke-opacity='.05'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #0a1428 0%, #010a13 60%); }

/* ---------------------------------------------------------------- frames: the gold border with chamfered corners */
.hx { position: relative; background: linear-gradient(180deg, rgba(30, 35, 40, .92), rgba(1, 10, 19, .94)); border: 1px solid transparent;
  border-image: var(--frame) 1; }
.hx.cut { clip-path: polygon(10px 0, calc(100% - 10px) 0, 100% 10px, 100% calc(100% - 10px), calc(100% - 10px) 100%, 10px 100%, 0 calc(100% - 10px), 0 10px); border: 0; padding: 1px; background: var(--frame); }
.hx.cut > .in { clip-path: inherit; background: linear-gradient(180deg, #1a1f24, #0b1018); height: 100%; }
.diamond { display: inline-block; width: 7px; height: 7px; transform: rotate(45deg); background: var(--gold); box-shadow: 0 0 8px rgba(200, 170, 110, .6); flex: none; }
.rule { display: flex; align-items: center; gap: 12px; color: var(--gold); }
.rule::before, .rule::after { content: ""; height: 1px; flex: 1; background: linear-gradient(90deg, transparent, var(--gold-dk) 30%, var(--gold) 50%, var(--gold-dk) 70%, transparent); }

/* ---------------------------------------------------------------- type */
.title { font-family: var(--display); font-weight: 700; letter-spacing: .04em; color: var(--gold-lt); text-transform: uppercase; line-height: 1.05; }
.gold-text { background: linear-gradient(180deg, #f0e6d2 0%, #c8aa6e 55%, #785a28 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.kicker { font: 600 12px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.muted { color: var(--gold-dim); }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- buttons: the client's teal-on-gold */
.btn { appearance: none; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 18px; min-height: 38px;
  font: 700 13px var(--ui); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-lt);
  background: linear-gradient(180deg, #1e2328, #0f1419); border: 2px solid transparent; border-image: var(--frame) 1; transition: color .15s, box-shadow .15s, background .15s; }
.btn:hover { color: #fff; background: linear-gradient(180deg, #2a3138, #141a20); box-shadow: 0 0 14px rgba(200, 170, 110, .25); }
.btn:active { background: #0b0f13; }
.btn:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.btn:disabled { opacity: .4; cursor: default; box-shadow: none; }
.btn.magic { color: var(--teal-lt); background: linear-gradient(180deg, #0a323c, #091428); border-image: linear-gradient(180deg, #0ac8b9, #005a82) 1; }
.btn.magic:hover { box-shadow: 0 0 18px rgba(10, 200, 185, .45); color: #fff; }
.btn.danger { color: #ffd1d8; border-image: linear-gradient(180deg, #e84057, #6b1a28) 1; }
.btn.sm { padding: 5px 10px; min-height: 30px; font-size: 11.5px; letter-spacing: .08em; }
.btn.ghost { border-image: none; border: 1px solid rgba(200, 170, 110, .3); background: transparent; }
.btn.ghost:hover { border-color: var(--gold); }
.btn.on { color: var(--abyss); background: linear-gradient(180deg, #f0e6d2, #c8aa6e); }

input.f, select.f, textarea.f { width: 100%; padding: 9px 11px; background: #010a13; border: 1px solid #3c3c41; color: var(--gold-lt); border-radius: 0; }
input.f:focus, select.f:focus, textarea.f:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 1px rgba(10, 200, 185, .35), 0 0 12px rgba(10, 200, 185, .2); }
label.lbl { display: grid; gap: 5px; font-size: 12.5px; color: var(--gold-dim); }

/* ---------------------------------------------------------------- art */
.art { width: 100%; height: 100%; object-fit: cover; }
.art.wide { object-position: 50% 22%; }
/* Riftbound card art: crop away the card frame and text box, keep the painting */
.art.rb { object-position: 50% 18%; transform: scale(1.32); transform-origin: 50% 22%; }
.crest { display: grid; place-items: center; width: 100%; height: 100%; font: 700 1.4em var(--display); color: var(--gold); background: radial-gradient(circle, #0a323c, #010a13); }

/* ---------------------------------------------------------------- a match plate (bracket cell) */
.plate { position: relative; width: var(--pw, 240px); background: linear-gradient(180deg, #161b20, #0b1016); border: 1px solid #463714; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.plate .row { display: grid; grid-template-columns: var(--ph, 34px) 1fr auto; align-items: center; height: var(--ph, 34px); }
.plate .row + .row { border-top: 1px solid #2a2a2e; }
.plate .tile { width: var(--ph, 34px); height: var(--ph, 34px); overflow: hidden; background: #010a13; position: relative; }
.plate .nm { padding: 0 10px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 14px var(--ui); color: var(--gold-lt); }
.plate .nm small { font-weight: 500; color: var(--gold-dim); margin-left: 6px; font-size: 11px; }
.plate .sc { width: 32px; height: 100%; display: grid; place-items: center; font: 700 17px var(--num); color: var(--gold-dim); background: #0a0e12; border-left: 1px solid #2a2a2e; }
.plate .row.win .nm { color: #fff; }
.plate .row.win .sc { color: var(--abyss); background: linear-gradient(180deg, #f0e6d2, #c8aa6e); }
.plate .row.lose { opacity: .45; }
.plate .row.tbd .nm { color: var(--mute); font-style: italic; font-weight: 500; }
.plate .row.bye .nm { color: var(--mute); }
.plate.live { border-color: var(--teal); box-shadow: 0 0 0 1px rgba(10, 200, 185, .4), 0 0 22px rgba(10, 200, 185, .35); }
.plate.live::after { content: "LIVE"; position: absolute; right: -1px; top: -16px; padding: 1px 6px; font: 700 10px var(--ui); letter-spacing: .14em; color: var(--abyss); background: var(--teal); }
.plate .tag { position: absolute; left: 0; top: -16px; font: 600 10.5px var(--ui); letter-spacing: .12em; color: var(--gold-dim); text-transform: uppercase; white-space: nowrap; }
.plate.changed { outline: 1px dashed var(--red); }
.plate.ghost-bye { visibility: hidden; }

/* ---------------------------------------------------------------- bracket layout */
.bracket { position: relative; display: flex; gap: var(--gap, 46px); align-items: stretch; padding: 22px 8px 8px; }
.bracket .col { display: flex; flex-direction: column; justify-content: space-around; gap: 18px; min-width: var(--pw, 240px); }
.bracket .colhead { position: absolute; top: 0; font: 600 12px var(--ui); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); white-space: nowrap; }
.bracket .slot { position: relative; padding-top: 16px; }
.bracket svg.links { position: absolute; inset: 0; pointer-events: none; overflow: visible; }
.bracket svg.links path { fill: none; stroke: #785a28; stroke-width: 1.5; }
.bracket svg.links path.hot { stroke: var(--gold); stroke-width: 2; filter: drop-shadow(0 0 3px rgba(200, 170, 110, .6)); }
.bk-section { margin-bottom: 26px; }
.bk-section > h3 { margin: 0 0 10px; color: var(--teal); }

/* ---------------------------------------------------------------- standings */
.stand { width: 100%; border-collapse: collapse; }
.stand th { font: 600 11.5px var(--ui); letter-spacing: .14em; text-transform: uppercase; color: var(--gold); text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--gold-dk); }
.stand td { padding: 7px 10px; border-bottom: 1px solid #1e2328; }
.stand td.n { font: 600 16px var(--num); text-align: right; }
.stand th.n { text-align: right; }
.stand tr.top td { background: linear-gradient(90deg, rgba(200, 170, 110, .1), transparent); }
.stand tr.drop td { opacity: .4; }
.stand .who { display: flex; align-items: center; gap: 10px; }
.stand .who .t { width: 34px; height: 34px; overflow: hidden; border: 1px solid #463714; flex: none; }
.stand .rk { font: 700 18px var(--display); color: var(--gold); width: 40px; }

/* ---------------------------------------------------------------- pairings */
.pairs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; }
.pair { display: grid; grid-template-columns: 58px 1fr; background: linear-gradient(180deg, #161b20, #0b1016); border: 1px solid #463714; }
.pair .tb { display: grid; place-content: center; text-align: center; background: linear-gradient(180deg, #0a323c, #091428); border-right: 1px solid #463714; }
.pair .tb b { font: 700 24px var(--display); color: var(--teal-lt); line-height: 1; }
.pair .tb small { font: 600 9.5px var(--ui); letter-spacing: .16em; color: var(--teal); }
.pair .sides { display: grid; }
.pair .side { display: grid; grid-template-columns: 36px 1fr auto; align-items: center; gap: 10px; padding: 5px 10px 5px 6px; }
.pair .side + .side { border-top: 1px solid #2a2a2e; }
.pair .side .t { width: 36px; height: 36px; overflow: hidden; }
.pair .side .nm { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pair .side .pts { font: 600 13px var(--num); color: var(--gold-dim); }
.pair .side.win .nm { color: #fff; } .pair .side.lose { opacity: .45; }
.pair.done .tb { background: #0b1016; } .pair.done .tb b { color: var(--gold-dim); }
.pair.live { border-color: var(--teal); box-shadow: 0 0 16px rgba(10, 200, 185, .3); }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; } }

/* ---------------------------------------------------------------- the Swiss stage, Worlds style */
.swiss-path { display: flex; gap: 22px; align-items: flex-start; }
.sp-col { display: grid; gap: 14px; min-width: var(--pw, 230px); }
.sp-head { font: 700 13px var(--ui); letter-spacing: .18em; text-transform: uppercase; color: var(--gold); text-align: center; padding-bottom: 6px; border-bottom: 1px solid var(--gold-dk); }
.sp-group { display: grid; gap: 6px; padding: 8px; background: linear-gradient(180deg, rgba(10, 50, 60, .25), rgba(1, 10, 19, .2)); border: 1px solid #1e2328; }
.sp-rec { font: 700 20px var(--display); color: var(--gold-lt); text-align: center; line-height: 1; padding: 2px 0 4px; }
.sp-group .plate { width: 100%; }
.sp-chip { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 8px; height: 32px; padding-right: 8px; background: #0b1016; border: 1px solid #2a2a2e; font-weight: 600; }
.sp-chip .tile { width: 30px; height: 30px; overflow: hidden; }
.sp-chip span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sp-chip em { font: 700 13px var(--num); font-style: normal; color: var(--gold-dim); }
.sp-chip.in { border-color: var(--teal); background: linear-gradient(90deg, rgba(10, 200, 185, .18), #0b1016 70%); }
.sp-chip.in em { color: var(--teal-lt); }
.sp-chip.out { opacity: .4; }
.sp-final .sp-group { background: linear-gradient(180deg, rgba(200, 170, 110, .08), rgba(1, 10, 19, .2)); }
