/* OVER THE TOP! - the battle royal cabinet at Quarter Castle. Its own marquee, the pass after the bell and the board;
   the rest is cabinet.css. */
.ry .logo{font-size:44px;letter-spacing:.02em;color:var(--pink);text-shadow:3px 3px 0 var(--deep),-1px -1px 0 #fff,0 0 14px rgba(255,255,255,.8);white-space:nowrap}
.ry .qca{letter-spacing:.24em}
/* the Golden Token, spinning in the marquee: the last one in takes it */
.tok{flex:none;display:flex;align-items:center;justify-content:center;width:46px;height:46px}
.tk{display:block;width:40px;height:40px;border-radius:50%;background:radial-gradient(circle at 36% 32%,#fffbe0,#ffe86a 22%,var(--yellow) 52%,#d89a00 78%,#a86a00);
  box-shadow:0 0 0 2px var(--deep),inset 0 0 0 4px rgba(168,106,0,.55),inset 0 0 0 6px rgba(255,246,160,.6),0 0 14px rgba(255,212,0,.85)}
@media (prefers-reduced-motion:no-preference){
  .tk{animation:tokSpin 1.6s linear infinite}
  @keyframes tokSpin{0%{transform:scaleX(1)}25%{transform:scaleX(.08)}50%{transform:scaleX(1)}75%{transform:scaleX(.08)}100%{transform:scaleX(1)}}
}
.ry .new{width:66px}
@media (min-width:721px) and (max-height:940px){.ry .logo{font-size:36px}.tok{width:38px;height:38px}.tk{width:32px;height:32px}}
@media (max-width:720px){
  .ry .logo{font-size:28px}
  .tok{width:28px;height:28px}.tk{width:24px;height:24px}
  .ry .new{display:none}
}
@media (max-width:360px){
  .ry .logo{font-size:23px}
  .tok{width:20px;height:20px}.tk{width:17px;height:17px}
}
.cab.k1 .tok{width:26px;height:26px}
.cab.k1 .tk{width:22px;height:22px}
.ry .cab.k1 .logo{font-size:28px}

/* the pass after the bell: under the cabinet (beside it from 1220 px). Never on the game screen */
.rypass{flex:1 0 100%;position:relative;overflow-x:clip;display:grid;grid-template-columns:1fr;justify-items:center;gap:5px;max-width:420px;margin:2px auto 4px;padding:30px 16px 14px;
  border-radius:12px;background:linear-gradient(180deg,#fffdf4,var(--paper));color:var(--deep);text-align:center;
  box-shadow:0 0 0 3px var(--yellow),0 0 0 6px var(--deep),0 0 22px rgba(255,212,0,.45),5px 7px 0 6px rgba(0,0,0,.35)}
.rypass[hidden]{display:none}
.rypass::before{content:"";position:absolute;left:50%;top:9px;width:38px;height:8px;margin-left:-19px;border-radius:4px;background:var(--ink);box-shadow:inset 0 1px 2px rgba(0,0,0,.8)}
.ry-h{width:calc(100% + 32px);margin:0 -16px 4px;padding:4px 0;background:var(--deep);color:var(--yellow);font-family:var(--bg);font-weight:400;font-size:15px;letter-spacing:.12em;word-spacing:.3em}
.ry-word{margin:0;font-family:var(--lg);font-size:28px;line-height:1.05;letter-spacing:.03em;color:var(--pink-dk);transform:rotate(-3deg)}
.rypass.lost .ry-word{color:var(--deep)}
/* whose pass it is: her face, YOU, the royal, and how many she put out */
.ry-top{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;width:100%;margin-top:4px;text-align:left}
.ry-face{flex:none;width:60px;height:72px;border-radius:3px;background:#000 url(/portraits2.png) no-repeat;background-size:480px 360px;image-rendering:pixelated;box-shadow:0 0 0 3px var(--pink),0 0 0 5px var(--deep)}
.ry-who{margin:0;display:flex;flex-direction:column;gap:3px;min-width:0}
.ry-me{font-family:var(--lg);font-size:19px;line-height:1.05;letter-spacing:.02em;overflow-wrap:break-word}
.ry-tag{font-family:var(--bg);font-size:10px;letter-spacing:.16em;color:#4a4a58}
.ry-lv{font-family:var(--bg);font-size:11px;letter-spacing:.1em;color:var(--pink-dk)}
.ry-res{margin:0;display:flex;flex-direction:column;align-items:center}
.ry-n{font-family:var(--lg);font-weight:400;font-size:40px;line-height:1;color:#c8102e}
.ry-nl{font-family:var(--bg);font-size:10px;letter-spacing:.14em;color:#4a4a58}
.ry-by{margin:2px 0 0;font-weight:700;font-size:14px}
.ry-mine{margin:0;font-size:13px;line-height:1.35}
.ry-ml{font-family:var(--bg);font-size:11px;letter-spacing:.1em;color:var(--pink-dk)}
.ry-next{margin:0;padding:4px 8px;border-radius:6px;background:var(--deep);color:var(--yellow);font-family:var(--bg);font-size:11px;line-height:1.3;letter-spacing:.05em}
/* the whole royal, one by one: the first out at the top, the last one in at the bottom */
.ry-card{width:100%;margin:4px 0 0}
.ry-oh{margin:0 0 3px;font-family:var(--bg);font-weight:400;font-size:12px;letter-spacing:.14em;color:var(--pink-dk);cursor:pointer;list-style:none}
.ry-oh::-webkit-details-marker{display:none}
.ry-oh::after{content:" \25BE";letter-spacing:0}
.ry-card:not([open]) .ry-oh::after{content:" \25B8"}
.ry-oh:focus-visible{outline:2px solid var(--deep);outline-offset:2px;border-radius:3px}
.ry-list{width:100%;margin:0;padding:0;list-style:none;columns:2;column-gap:12px;text-align:left;font-size:11px;line-height:1.25}
.ry-list li{break-inside:avoid;display:flex;gap:4px;padding:1px 3px;border-radius:3px}
.ry-pl{flex:none;width:1.9em;text-align:right;font-weight:700;color:#4a4a58}
.ry-wn2{min-width:0}
.ry-who2{font-weight:700}
.ry-how{color:#4a4a58}
.ry-list li.ry-you{background:rgba(255,46,147,.18)}
.ry-list li.ry-you .ry-who2{color:var(--pink-dk)}
.ry-list li.ry-yours .ry-how{color:#a86a00;font-weight:700}
.ry-list li.ry-last{background:rgba(255,212,0,.35)}
.ry-go{display:grid;grid-template-columns:1fr 1fr;gap:8px;width:100%;margin-top:8px}
.ry-go a,.ry-go button{display:flex;align-items:center;justify-content:center;min-height:44px;padding:5px 8px;border-radius:10px;border:2px solid var(--pink);background:#0a0c3a;color:var(--yellow);
  font-family:var(--bg);font-size:12px;line-height:1.15;letter-spacing:.04em;word-spacing:.15em;text-decoration:none;cursor:pointer;box-shadow:0 0 10px rgba(255,46,147,.35)}
.ry-go a:hover,.ry-go button:hover{background:#151a66;color:#fff}
.ry-go .ry-hear{border-color:var(--cyan);color:#fff}
.ry-go .ry-share{border-color:var(--yellow)}
.ry-go .ry-again{border-color:var(--yellow);background:var(--yellow);color:var(--deep);box-shadow:0 0 10px rgba(255,212,0,.45)}
.ry-say{margin:0;min-height:1.3em;font-size:12px;font-weight:700;color:var(--deep)}
@media (prefers-reduced-motion:no-preference){
  .rypass.stamping .ry-word{animation:ryStamp .35s cubic-bezier(.2,1.4,.5,1) backwards}
  @keyframes ryStamp{0%{transform:rotate(-3deg) scale(2.2);opacity:0}100%{transform:rotate(-3deg) scale(1);opacity:1}}
}
@media (max-width:340px){.ry-list{columns:1}}
@media (min-width:1220px){
  .rypass{position:absolute;top:var(--cabtop,40px);left:calc(50% + 414px);width:min(250px,calc(50% - 430px));max-width:none;margin:0;padding:28px 12px 12px}
  body:has(.cab.k1) .rypass{left:calc(50% + 224px);width:min(250px,calc(50% - 240px))}
  .ry-h{width:calc(100% + 24px);margin:0 -12px 4px;font-size:13px}
  .ry-word{font-size:22px}
  .ry-top{grid-template-columns:auto minmax(0,1fr);gap:4px 8px}
  .ry-res{grid-column:1 / -1;flex-direction:row;gap:8px;align-items:baseline;justify-content:center}
  .ry-n{font-size:30px}
  .ry-me{font-size:15px}
  .ry-list{columns:1;font-size:10.5px}
  .ry-go{grid-template-columns:1fr}
}
.gdoors .gd-home{border-color:var(--yellow);color:#fff;box-shadow:0 0 12px rgba(255,212,0,.4)}
.gdoors .gd-more{border-color:var(--cyan);color:#fff;box-shadow:0 0 12px rgba(0,194,224,.4)}
#floor{scroll-margin-top:12px}

/* the high scores on this machine */
#ryboard{margin:0;padding:0;list-style:none;counter-reset:rk}
#ryboard li{counter-increment:rk;display:flex;align-items:baseline;gap:10px;padding:3px 0;font-family:var(--bg);font-size:15px;letter-spacing:.04em;color:var(--yellow)}
#ryboard li::before{content:counter(rk) ".";width:2.2em;flex:none;text-align:right;color:#9aa2c0;font-size:13px}
#ryboard li:nth-child(n+4){color:var(--cyan)}
.ryb-ini{width:3.2em;flex:none}
.ryb-who{flex:1;min-width:0}
.ryb-st{font-size:11px;color:#c8cce0;letter-spacing:.1em;white-space:nowrap}
.ryb-sc{margin-left:auto;font-variant-numeric:tabular-nums;white-space:nowrap}
.ryb-most{margin:10px 0 0;color:#c8cce0;font-size:14px}
.ryb-most b{color:var(--yellow);font-family:var(--bg);font-weight:400;letter-spacing:.04em}
.ryb-how{margin:6px 0 0;color:#9aa2c0;font-size:13px;line-height:1.4}
@media (max-width:560px){
  #ryboard li{flex-wrap:wrap;gap:2px 8px;font-size:13px}
  .ryb-st{order:3;flex:1 0 100%;padding-left:calc(2.2em + 10px)}
}

/* the panel's labels fit at every width; HER MOVE is 2 short lines */
.ry .bt.bc span{width:min-content;line-height:1;text-align:center}
@media (max-width:720px){.ry .bt.bc span{font-size:8px;letter-spacing:.02em}.ry .bt b{font-size:19px}}
@media (max-width:360px){.ry .bt.bc span{font-size:6.5px}.ry .bt.bb span{font-size:7.5px;letter-spacing:.02em}}
/* The DRAG strip, beside the stick on phones (royal.js): a thumb there is a stick that floats, so she walks the way the
   thumb has moved from where it went down, and the ring stays in view. The knob shows the way. Dragging on the screen
   works the same. Not on wider screens, where the screen itself is big enough to drag on. */
.drag{display:none}
@media (max-width:720px){
  .ry .panel,.ry .cab.k1 .panel{grid-template-columns:auto auto 1fr;grid-template-areas:"drag sys sys" "drag pad abc"}
  .ry .drag{grid-area:drag;align-self:stretch;position:relative;display:block;width:34px;min-height:120px;border-radius:17px;touch-action:none;cursor:move;
    background:linear-gradient(90deg,#0a0c3a,#1c2070 50%,#0a0c3a);box-shadow:inset 0 0 0 2px #3a40a0,inset 0 3px 8px #000,0 0 0 3px #0a0c3a}
  .ry .drag::before{content:"";position:absolute;left:50%;top:50%;width:14px;height:14px;margin:-7px 0 0 -7px;border-radius:50%;border:2px solid rgba(200,204,239,.3)}
  .drag-lab{position:absolute;left:50%;top:84%;transform:translate(-50%,-50%) rotate(-90deg);font-family:var(--bg);font-size:9px;letter-spacing:.32em;color:rgba(200,204,239,.55);pointer-events:none;white-space:nowrap}
  .drag-knob{position:absolute;left:calc(50% + var(--kx,0) * 6px);top:calc(50% + var(--ky,0) * (50% - 14px));width:24px;height:24px;margin:-12px 0 0 -12px;border-radius:50%;pointer-events:none;
    background:radial-gradient(circle at 35% 32%,#ff9ccf,var(--pink) 50%,#8a0050);box-shadow:0 3px 6px rgba(0,0,0,.6),0 0 0 2px #12155a}
  .ry .drag.on{box-shadow:inset 0 0 0 2px var(--yellow),inset 0 3px 8px #000,0 0 0 3px #0a0c3a,0 0 12px rgba(255,212,0,.55)}
  .ry .drag.on .drag-knob{box-shadow:0 3px 6px rgba(0,0,0,.6),0 0 0 2px #fff}
  .ry .dpad{width:112px;height:112px}
  .ry .dp{width:37px;height:37px}
  .ry .dp.up,.ry .dp.dn{left:37.5px}.ry .dp.lt,.ry .dp.rt{top:37.5px}
  .ry .stick{width:36px;height:36px;margin:-18px 0 0 -18px}
  .ry .abc{gap:6px}
  .ry .bt{width:54px;height:54px}
}
@media (max-width:360px){
  .ry .drag{width:28px}
  .ry .dpad{width:100px;height:100px}
  .ry .dp{width:33px;height:33px}
  .ry .dp.up,.ry .dp.dn{left:33.5px}.ry .dp.lt,.ry .dp.rt{top:33.5px}
  .ry .stick{width:32px;height:32px;margin:-16px 0 0 -16px}
  .ry .bt{width:46px;height:46px}
  .ry .abc{gap:4px}
}
/* the floor fixes, round 3: the panel's A button pulses while she's up on the ropes and a press can still pull her in
   (a steady glow with reduced motion) */
.ry .bt.ba.cue{box-shadow:0 5px 0 rgba(0,0,0,.55),inset 0 -4px 0 rgba(0,0,0,.25),inset 0 3px 0 rgba(255,255,255,.4),0 0 0 3px #39ff5a,0 0 16px 4px rgba(57,255,90,.75)}
@media (prefers-reduced-motion:no-preference){
  .ry .bt.ba.cue{animation:ryCue .5s ease-in-out infinite alternate}
  @keyframes ryCue{
    from{box-shadow:0 5px 0 rgba(0,0,0,.55),inset 0 -4px 0 rgba(0,0,0,.25),inset 0 3px 0 rgba(255,255,255,.4),0 0 0 1px rgba(57,255,90,.45),0 0 2px 0 rgba(57,255,90,.2)}
    to{box-shadow:0 5px 0 rgba(0,0,0,.55),inset 0 -4px 0 rgba(0,0,0,.25),inset 0 3px 0 rgba(255,255,255,.4),0 0 0 4px #39ff5a,0 0 18px 6px rgba(57,255,90,.8)}
  }
}
