/* Phone roulette: strip, board that takes all the height, chips and actions at the bottom */
.mrl{flex:1;min-height:0;display:flex;flex-direction:column;background:#0a4a2b;direction:rtl}
.mr-strip{flex:none;position:relative;display:flex;align-items:center;gap:6px;padding:4px 8px;background:#06301c;font-size:13px;min-height:34px}
.mr-timer{flex:none;min-width:52px;text-align:center;font-family:var(--display);color:var(--gold);background:linear-gradient(90deg,#f0c35a55,#f0c35a22) left/calc(var(--frac,1)*100%) 100% no-repeat #000a;border:1px solid var(--gold);border-radius:14px;padding:0 6px}
.mr-timer.off{visibility:hidden}
.mr-mine{flex:none;white-space:nowrap;font-size:12px}.mr-mine b{color:var(--gold);font-size:14px}
body.phone .mrl .mr-who{flex:none;display:inline-flex;align-items:center;gap:3px;height:26px;padding:0 7px;border-radius:13px;font-size:12px;color:var(--gold)}
.mrl .mr-hist{flex:1;min-width:0;display:flex;flex-wrap:nowrap;justify-content:flex-start;direction:ltr;gap:3px;overflow:hidden;max-width:none;max-height:none}
.mrl .mr-hist .num{flex:none;width:23px;height:23px;margin:0;font-size:11px;border-width:1px}
.mrl .mr-hist .newest{transform:none;box-shadow:0 0 8px var(--gold)}
.mr-note{position:absolute;left:50%;top:5px;transform:translateX(-50%);z-index:8;background:#fffdf4;color:#1a1218;border-radius:14px;padding:2px 12px;font-weight:800;font-size:13px;white-space:nowrap}

.mr-wrap{flex:1;min-height:0;position:relative}
.mr-board{position:absolute;inset:0;display:grid;gap:2px;padding:4px;direction:ltr;grid-template-columns:.75fr .75fr 1fr 1fr 1fr;grid-template-rows:repeat(14,minmax(0,1fr))}
.mrc{display:flex;align-items:center;justify-content:center;border:1px solid #f0c35a88;border-radius:6px;font-weight:800;font-size:clamp(13px,2.3dvh,19px);font-family:var(--display);min-height:0;overflow:hidden;color:#fff;cursor:pointer;direction:rtl;text-align:center;line-height:1.1}
.mrc.nred{background:linear-gradient(#c62828,#8e1313)}.mrc.nblack{background:linear-gradient(#26262c,#0d0d10)}.mrc.ngreen{background:linear-gradient(#1f9a40,#0d5a22)}
.mrc.out{font-family:var(--body);font-size:13px;direction:ltr}.mrc.out:not(.nred):not(.nblack){background:#0b3c24}
.mrc.winspot{position:relative;z-index:2;box-shadow:0 0 0 3px #fff3b0,0 0 18px var(--gold);animation:mrwin .6s ease-in-out infinite alternate}
@keyframes mrwin{to{filter:brightness(1.6)}}
.mr-stakes{position:absolute;inset:0;pointer-events:none;z-index:3;direction:ltr}
.mr-stk,.mr-oc{position:absolute;transform:translate(-50%,-50%);display:flex;align-items:center;justify-content:center;border-radius:50%;font-style:normal;font-weight:800;color:#fff;text-shadow:0 1px 2px #000;box-shadow:0 2px 5px #000b;white-space:nowrap}
.mr-stk{z-index:2;min-width:27px;height:27px;padding:0 2px;border:2px dashed #fff;font-size:9px}
.mr-stk.new{animation:mrdrop .22s ease-out}
.mr-oc{min-width:19px;height:19px;border:1.5px solid #fff;font-size:8px}.mr-oc.more{background:#333}
@keyframes mrdrop{from{transform:translate(-50%,-50%) scale(1.8);opacity:0}}
.mrl.closed .mr-btns button:not(.mr-more),.mrl.closed .mr-chips{opacity:.35;pointer-events:none}

/* the wheel over the dimmed board */
.mr-over{position:absolute;inset:0;z-index:5;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;background:#000000bf;opacity:0;visibility:hidden;transition:opacity .45s,visibility .45s}
.mr-over.on{opacity:1;visibility:visible}
.mr-say{min-height:48px;display:flex;align-items:flex-end;justify-content:center}
.mrl .rl-say{position:static;max-width:86vw;font-size:16px;padding:5px 18px;border-radius:18px}
.mrl .rl-say::before{display:none}
.mr-wheel canvas{display:block;filter:drop-shadow(0 14px 26px #000)}
.mr-res{min-height:70px;display:flex;align-items:center;justify-content:center}
.mr-res .big{animation:pop .5s cubic-bezier(.2,1.6,.4,1)}

.mr-dock{flex:none;display:flex;flex-direction:column;gap:6px;padding:7px 8px calc(env(safe-area-inset-bottom) + 8px);background:linear-gradient(#1a0a10,#0b0408);border-top:2px solid var(--gold2)}
.mr-chips{display:flex;justify-content:space-between;align-items:center;direction:ltr}
body.phone .mr-chips button{background:none;border:0;border-radius:50%;padding:1px;line-height:0;filter:drop-shadow(0 2px 2px #000a)}
body.phone .mr-chips button.sel{box-shadow:0 0 0 3px #fff3b0,0 0 12px var(--gold)}
.mr-chips svg{display:block}
.mr-btns{display:grid;grid-template-columns:repeat(5,1fr);gap:5px}
body.phone .mr-btns button{height:38px;padding:0;font-size:14px;white-space:nowrap}
.mr-more{border-color:var(--gold);color:var(--gold)}

.mr-sheet{position:fixed;inset:0;z-index:66;display:flex;align-items:flex-end;background:#000a}
.mr-sheet>div{width:100%;max-height:82dvh;overflow-y:auto;display:flex;flex-direction:column;gap:8px;text-align:center;border-radius:22px 22px 0 0;border:2px solid var(--gold);border-bottom:0;background:linear-gradient(#3a0b14,#14050a);padding:12px 14px calc(env(safe-area-inset-bottom) + 12px)}
.mr-sheet h3{margin:0;font-family:var(--display);color:var(--gold);font-size:21px}
.mr-sheet>div>*{flex:none}
.mr-sheet>div>button{height:44px}
.mr-sheet .rl-prow{text-align:start}
.mr-sps{display:grid;grid-template-columns:1fr 1fr;gap:6px}
body.phone .mr-sps button{display:flex;flex-direction:column;align-items:center;gap:1px;padding:8px 6px;min-width:0}
.mr-sps span{color:var(--gold);font-weight:800}
.mr-sps small{opacity:.75;font-size:10.5px;line-height:1.35;white-space:normal;direction:ltr}
body.phone .rl-rules{z-index:75}
@media(max-height:680px){.mr-btns button{height:32px!important}.mr-dock{gap:4px;padding-top:4px}.mr-strip{min-height:30px;padding-block:2px}.mrc.out{font-size:11px}}
/* taps reach the board as soon as the wheel starts to fade */
.mr-over:not(.on){pointer-events:none}
/* the nine chips always fit the width, also after the phone is turned */
.mr-chips button svg{width:min(44px,calc((100vw - 38px) / 9));height:auto}
