/* Krillion Ranked: pick a game, find a match, six leaderboards and the master Elo. */
*{box-sizing:border-box}
html{background:#0a1529}
body{margin:0;font-family:"Atkinson Hyperlegible",system-ui,sans-serif;background:#0a1529;color:#fff;-webkit-text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
a{color:inherit}
button{font:inherit;color:inherit;border:0;border-radius:0;background:none;padding:0;cursor:pointer;text-align:inherit;touch-action:manipulation}
button:focus-visible,a:focus-visible,input:focus-visible{outline:4px solid #fff;outline-offset:3px}
img,canvas{image-rendering:pixelated;display:block}
h1,h2,p,ol{margin:0;padding:0;font-weight:400}
ol{list-style:none}
[hidden]{display:none!important}
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.t5{font-family:"Tiny5",monospace;font-weight:400}
.g0{--c:#b79cff}.g1{--c:#ff4f8b}.g2{--c:#ffcf3a}.g3{--c:#3fd3ff}.g4{--c:#5fdc7c}.g5{--c:#ff9138}.g6{--c:#6f9dff}

/* you against whoever is next */
.arena{position:relative;background:var(--c);transition:background .25s;color:#0a1529;overflow:hidden;padding:24px 40px 0}
.arena:before{content:"";position:absolute;inset:0;background:#0f2348;clip-path:polygon(54% 0,100% 0,100% 100%,46% 100%,46% 88%,47% 88%,47% 72%,48% 72%,48% 58%,49% 58%,49% 46%,50% 46%,50% 34%,51% 34%,51% 22%,52% 22%,52% 11%,53% 11%,53% 5%,54% 5%)}
.arena>*{position:relative}
.arena>.top{position:static}
.top{min-height:44px;display:flex;justify-content:space-between;align-items:center;gap:16px}
h1{font-size:clamp(36px,5vw,72px);line-height:.85;max-width:50%}
/* the Everythingle tile: top middle like every Krillion game (../krillads.css --nav-w/--nav-b), the title starts below it */
.arena{padding-top:calc(var(--nav-b,50px) + 12px)}
.top a{position:absolute;top:14px;left:0;right:0;margin:0 auto;box-sizing:border-box;width:var(--nav-w,190px);padding:11px 13px;background:#fff;border-radius:10px;box-shadow:0 6px 14px rgb(0 0 0/.25)}
.top a:after{content:"";position:absolute;inset:-6px -4px}
.top picture{display:contents}
.top img{width:100%;height:auto;image-rendering:auto}
/* how many are playing: its line is always there, so nothing moves when the number arrives */
.now{display:flex;align-items:center;gap:12px;height:30px;margin:10px 0 0 4px;font-size:30px;line-height:1;letter-spacing:.02em;white-space:nowrap;visibility:hidden}
.now.on{visibility:visible}
.now i{flex:none;width:16px;height:16px;background:#5fdc7c;box-shadow:0 0 0 4px #0a1529}
.ring{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px;min-height:352px}
.side{position:relative;text-align:center;min-width:0}
.side.r{color:#fff}
.krill{display:block;margin:0 auto;width:min(340px,30vw)}
.krill canvas{width:100%;animation:sw 2.4s steps(5) infinite alternate}
#meCv{cursor:pointer}
.side.r .krill canvas{transform:scaleX(-1);animation:none}
.side.r.who .krill canvas{filter:brightness(0) invert(1);opacity:.25}
@keyframes sw{to{transform:translateX(16px)}}
.name{display:block;font-size:30px;line-height:1.3;font-weight:700;margin:36px auto 0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
button.name{position:relative;display:flex;width:fit-content;min-height:44px;align-items:center;overflow:visible}
button.name span{min-width:0;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
button.name svg{position:absolute;left:calc(100% + 10px);top:11px;width:22px;height:22px;opacity:.7}
button.name:hover span{text-decoration:underline;text-decoration-thickness:3px;text-underline-offset:5px}
button.name:hover svg{opacity:1}
.side.r .name{min-height:44px;padding-top:2px}
.name+strong{margin-top:-2px}
.side strong{display:block;font-weight:400;font-size:88px;line-height:.9}
.vs{font-size:clamp(90px,14vw,200px);line-height:.8;color:#fff;text-shadow:8px 8px 0 #0a1529}

/* the address: white with a thin black stroke, so it reads on every colour */
.mark{padding:6px 0 18px;text-align:center;color:#fff;font-size:24px;line-height:1.2;font-weight:700;white-space:nowrap;-webkit-text-stroke:3px #000;paint-order:stroke fill;stroke-linejoin:round}

/* looking, and found */
.seek .side.r .krill canvas{animation:seek 1.6s steps(4) infinite alternate}
@keyframes seek{from{transform:scaleX(-1) translateX(14px)}to{transform:scaleX(-1) translateX(-14px)}}
.seek .side.r strong{animation:blink 1s steps(2,jump-none) infinite}
@keyframes blink{50%{opacity:1}100%{opacity:.35}}
.found .side.r .krill canvas{animation:in .36s steps(6) both}
@keyframes in{from{transform:scaleX(-1) translateX(-60%)}to{transform:scaleX(-1)}}
.found .vs{animation:hit .36s steps(4) both}
@keyframes hit{from{transform:scale(1.5)}to{transform:none}}

/* your name and krill */
.edit{display:grid;gap:12px;justify-items:center;margin-top:18px}
.edit div{display:flex;gap:8px;width:100%;max-width:360px}
.edit input{flex:1;min-width:0;height:52px;border:4px solid #0a1529;border-radius:0;background:#fff;color:#0a1529;font:700 22px "Atkinson Hyperlegible",system-ui,sans-serif;padding:0 10px}
.edit .ok{height:52px;padding:0 18px;background:#0a1529;color:#fff;font-size:20px;font-weight:700}
.edit .ok:hover{background:#fff;color:#0a1529}
.looks{display:grid!important;grid-template-columns:repeat(8,1fr);gap:4px!important}
.looks button{aspect-ratio:1;display:grid;place-items:center;background:#0a1529;border:4px solid #0a1529}
.looks button:hover{background:#24406f}
.looks button[aria-pressed=true]{background:#fff;border-color:#0a1529}
.looks img{width:100%}
.edit p{font-size:18px;font-weight:700}

/* the six games, and the way in */
.ctl{display:grid;grid-template-columns:minmax(0,1fr) 400px;margin:0 -40px -1px;background:#0a1529;color:#fff}
.pick{display:grid;grid-template-columns:repeat(6,minmax(0,1fr))}
.pick button{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;text-align:center;padding:18px 8px;min-height:156px;font-size:20px;line-height:1.1;font-weight:700}
.pick button:focus-visible,.find:focus-visible{outline-offset:-8px}
.pick button:focus-visible{outline-color:#fff}
.find:focus-visible{outline-color:#0a1529}
.pick .on:focus-visible{outline-color:#0a1529}
.pick img{width:56px;height:56px}
.pick span{min-height:42px;display:grid;place-items:center}
.pick .on{background:var(--c);color:#0a1529}
.find{background:#ffcf3a;color:#0a1529;font-size:60px;line-height:.9;text-align:center;letter-spacing:.03em}
.find small{display:block;font:700 20px/1.2 "Atkinson Hyperlegible",system-ui,sans-serif;letter-spacing:0;margin-top:8px}
.find:disabled{cursor:default}
/* the two unrated ways in, for the picked game */
.also{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px;padding-top:4px;background:#0a1529;color:#fff}
.also a{display:flex;align-items:center;gap:20px;min-height:84px;padding:0 40px;background:#172a4d;text-decoration:none}
.also span{font-size:40px;line-height:1;color:var(--c);white-space:nowrap}
.also svg{flex:none;width:27px;height:27px;margin-left:auto;color:var(--c)}
.also a:focus-visible{outline-offset:-8px}
.say{background:#fff;color:#0a1529;font-size:20px;font-weight:700;padding:14px 40px;text-align:center}

/* leaderboards and your Elo */
.low{max-width:1240px;margin:0 auto;padding:72px 40px 80px;display:grid;grid-template-columns:minmax(0,1fr) 400px;gap:88px;align-items:start}
h2{font-size:64px;line-height:.9;margin-bottom:22px}
.tabs{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:18px}
.tabs button{min-height:48px;padding:0 13px;font-size:18px;font-weight:700;flex:1 0 auto;text-align:center;background:#172a4d}
.tabs .on{background:var(--c);color:#0a1529}
.row{display:grid;grid-template-columns:56px 60px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:60px;font-size:24px;border-bottom:2px solid #24406f}
.row img{width:46px}
.row .r{font-size:34px;color:#a9c8e8}
.row .e{font-size:38px}
.row .n{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.row.you{background:#ff4f8b;color:#0a1529;margin:0 -14px;padding:0 14px;border-color:transparent}
.you .r{color:#0a1529}
.row.out{margin-top:14px}
.row.no{color:#24406f}.row.no .r{color:#24406f}
.note{font-size:20px;line-height:1.35;color:#a9c8e8;padding-top:18px}
.note:empty{display:none}
.sum div{display:flex;align-items:center;min-height:58px;gap:14px;font-size:22px}
.sum img{width:40px;height:40px}
.sum b{margin-left:auto;font-weight:400;font-size:38px;color:var(--c)}
.eq{border-top:4px solid #fff;margin-top:10px;padding-top:14px;display:flex;align-items:flex-end;justify-content:space-between;gap:12px}
.eq span{font-size:20px;line-height:1.25}
.eq b{font-size:96px;line-height:.8;font-weight:400}
.up{animation:up .8s steps(4) 2}
@keyframes up{50%{opacity:.25}}

@media (hover:hover){
  .pick button:hover{background:#16294c}.pick .on:hover{background:var(--c)}
  .find:hover:enabled{background:#fff}
  .tabs button:hover{background:#24406f}.tabs .on:hover{background:var(--c)}
  .also a:hover{background:var(--c);color:#0a1529}.also a:hover>*{color:inherit}
}
@media (max-width:1120px){.ctl{grid-template-columns:minmax(0,1fr)}.find{min-height:110px}}
@media (max-width:1000px){.low{grid-template-columns:minmax(0,1fr);gap:56px}}
@media (max-width:1180px){.also a{flex-wrap:wrap;gap:4px 16px;align-content:center;position:relative;padding:12px 80px 12px 40px;min-height:100px}.also span{width:100%}.also span{font-size:36px}.also svg{position:absolute;right:40px;top:calc(50% - 13px)}}
@media (max-width:760px){.pick{grid-template-columns:repeat(3,minmax(0,1fr))}.pick button{min-height:132px}}
@media (max-width:560px){
  .arena{padding:calc(var(--nav-b,36px) + 10px) 16px 0}.ctl{margin:0 -16px -1px}.also{grid-template-columns:minmax(0,1fr)}.also a{padding:10px 60px 10px 16px;min-height:88px}.also span{font-size:32px}.also svg{right:16px;width:24px;height:24px}.say{padding:14px 16px}
  .now{height:20px;margin:10px 0 0 3px;gap:9px;font-size:min(19px,4.4vw);letter-spacing:0}.now i{width:10px;height:10px;box-shadow:0 0 0 3px #0a1529}
  .ring{min-height:242px;gap:6px}.mark{font-size:20px;padding:4px 0 14px}
  .name{font-size:19px;margin-top:18px}.name,.side.r .name{min-height:44px;margin-bottom:-9px;padding-top:0;line-height:44px}
  button.name{position:static}button.name svg{left:0;top:0;width:18px;height:18px}
  .side strong{font-size:52px}.vs{font-size:64px;text-shadow:4px 4px 0 #0a1529}
  .editing .ring{grid-template-columns:1fr}.editing .vs,.editing .side.r{display:none}.editing:before{clip-path:none;display:none}
  .top a{top:10px;padding:8px 10px;border-radius:8px}
  .pick{grid-template-columns:repeat(2,minmax(0,1fr))}.pick button{flex-direction:row;justify-content:flex-start;min-height:72px;padding:8px 8px 8px 14px;gap:10px;font-size:19px}.pick span{text-align:left;justify-items:start}.pick img{width:38px;height:38px;flex:none}
  .low{padding:48px 16px 56px}
  .row{grid-template-columns:36px 46px minmax(0,1fr) auto;font-size:20px}.row img{width:38px}.row .e{font-size:30px}
  .eq b{font-size:84px}h2{font-size:44px}
}
@media (max-width:370px){.pick button{padding-left:10px;gap:8px;font-size:17px}.pick img{width:32px;height:32px}.mark{font-size:17px}.name{font-size:16px}.side strong{font-size:44px}.vs{font-size:54px}h2{font-size:38px}.eq b{font-size:68px}.row{grid-template-columns:30px 42px minmax(0,1fr) auto}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* back from a match: the two halves that closed over the game open again, and the result stands where VS was */
.back body:before,.back body:after{content:"";position:fixed;top:0;bottom:0;width:56%;z-index:99;pointer-events:none}
.back body:before{left:0;background:#ff4f8b;z-index:100;clip-path:polygon(0 0,100% 0,100% 25%,97% 25%,97% 50%,94% 50%,94% 75%,91% 75%,91% 100%,0 100%);animation:openl .36s steps(10) .12s both}
.back body:after{right:0;background:#0f2348;animation:openr .36s steps(10) .12s both}
@keyframes openl{to{transform:translateX(-100%)}}
@keyframes openr{to{transform:translateX(100%)}}
.side .d{display:block;height:0;font-style:normal;font-size:44px;line-height:1}
.side .d.gn:before,.side .d.dn:before{content:"";display:inline-block;width:.5em;height:.36em;margin-right:.16em;vertical-align:.14em;background:currentColor;clip-path:polygon(40% 0,60% 0,60% 33%,80% 33%,80% 66%,100% 66%,100% 100%,0 100%,0 66%,20% 66%,20% 33%,40% 33%)}
.side .d.dn:before{transform:scaleY(-1)}
.vs.word{font-size:clamp(64px,10vw,140px)}
@media (max-width:820px){.side .d{font-size:30px}.vs.word{font-size:44px;text-shadow:4px 4px 0 #0a1529;transform:translateY(-48px)}}
@media (max-width:560px){.vs.word{font-size:30px;text-shadow:3px 3px 0 #0a1529;transform:translateY(-40px)}}
@media (min-width:561px) and (max-width:860px){.also a{padding-left:24px;padding-right:64px}.also span{font-size:25px}.also svg{right:20px}}
@media (prefers-reduced-motion:reduce){.back body:before,.back body:after{display:none}}

/* wide windows: the ads have both sides, everything else stays between them (--rail, krillads.css) */
.rail-guard{z-index:0}
.arena,.also,.low,.say,.game-article,body>footer{position:relative;z-index:1}
@media (min-width:1200px){
  .arena{padding-left:calc(40px + var(--rail,0px));padding-right:calc(40px + var(--rail,0px));pointer-events:none}
  .arena>*{pointer-events:auto}
  .krill{max-width:100%}
  h1{font-size:min(72px,calc((100vw - 2 * var(--rail,0px) - 80px) * .056));white-space:nowrap}
  .ctl{margin:0 0 -1px;box-shadow:calc(-40px - var(--rail,0px)) 0 #0a1529,calc(40px + var(--rail,0px)) 0 #0a1529}
  .also{padding-left:calc(40px + var(--rail,0px));padding-right:calc(40px + var(--rail,0px));pointer-events:none}
  .low{max-width:min(1240px,calc(100vw - 2 * var(--rail,0px)));pointer-events:none}
  .also a,.low>*{pointer-events:auto}
}
@media (min-width:1200px) and (max-width:1700px){
  .ctl{grid-template-columns:minmax(0,1fr)}.find{min-height:110px}
  .low{grid-template-columns:minmax(0,1fr);gap:56px}
  .also a{flex-wrap:wrap;gap:4px 16px;align-content:center;position:relative;padding:12px 80px 12px 40px;min-height:100px}.also span{width:100%}.also span{font-size:36px}.also svg{position:absolute;right:40px;top:calc(50% - 13px)}
}
@media (min-width:1200px) and (max-width:1700px) and (max-height:920px){
  .ring{min-height:270px}.krill{width:min(250px,100%)}.name{margin-top:20px}.side strong{font-size:72px}
  .pick button{min-height:124px;padding:12px 8px}.find{min-height:84px;font-size:48px}
}
@media (min-width:1200px) and (max-width:1560px){.also a{padding-left:24px;padding-right:64px}.also span{font-size:28px}.also svg{right:22px}}
@media (min-width:1200px){.also{margin-top:-2px;padding-top:6px}}
