/* Rift Runner (/tools/rift-runner/, owner 2026-12-02): the game box and the weekly board. Tools page blocks: tools.css. */
.rrp__top { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; margin-top: 16px; align-items: start; }
.rrp__title h1 { font: 800 clamp(28px, 3.6vw, 44px)/1.08 var(--display); letter-spacing: -.02em; margin: 0 0 6px; }
.rrp__title .tl__lead { font-size: 16px; margin-bottom: 14px; }
.tl section.rrp__game { margin-top: 0; min-width: 0; }

/* ---------- game ---------- */
.rr { border-radius: 22px; overflow: hidden; background: #0d0a1c; box-shadow: 0 20px 50px -24px rgba(122, 92, 255, .55); }
.rr__stage { position: relative; width: 100%; aspect-ratio: 16 / 10; max-height: 74vh; min-height: 300px; outline: none; user-select: none; -webkit-user-select: none; -webkit-tap-highlight-color: transparent; }
.rr__stage.is-on { touch-action: none; }
.rr__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.rr__stage.is-on canvas { cursor: default; }

.rr__hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: flex-start; gap: 10px; padding: 12px; pointer-events: none; color: #fff; }
.rr__hud[hidden] { display: none; }
.rr__score { display: flex; flex-direction: column; line-height: 1; padding: 8px 12px; border-radius: 12px; background: rgba(13, 10, 28, .55); }
.rr__score small { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.rr__score b { font: 800 24px var(--display); font-variant-numeric: tabular-nums; margin-top: 3px; }
.rr__pw { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.rr__chip { font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 999px; background: rgba(122, 92, 255, .85); }
.rr__chip--shield { background: rgba(0, 150, 180, .85); }
.rr__chip--x2 { background: rgba(255, 90, 31, .9); }
.rr__btns { display: flex; gap: 6px; pointer-events: auto; }
.rr__ib { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(13, 10, 28, .55); color: #fff; border: 1px solid rgba(255, 255, 255, .16); cursor: pointer; }
.rr__ib:hover { background: rgba(13, 10, 28, .8); }
.rr__mute .off { display: none; }
.rr__mute.is-off .off { display: inline; }
.rr__mute.is-off .on { display: none; }

.rr__ov { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 18px; text-align: center; color: #fff; background: rgba(10, 8, 22, .5); }
.rr__ov[hidden] { display: none; }
.rr__ov--start { justify-content: flex-start; padding-top: clamp(18px, 7%, 60px); background: linear-gradient(180deg, rgba(10, 8, 22, .55), rgba(10, 8, 22, .15) 70%); }
.rr__ov--over { background: rgba(10, 8, 22, .78); }
.rr__logo { font: 800 clamp(30px, 5vw, 52px)/1 var(--display); letter-spacing: -.02em; margin: 0; text-shadow: 0 0 24px rgba(255, 90, 31, .65); }
.rr__logo span { color: #ff8a3d; }
.rr__play { min-width: 170px; margin-top: 10px; }   /* the mode switch above it is gone (Hard only, 2026-12-02) */
.rr__best { margin: 0; min-height: 1.2em; font-weight: 700; color: #ffc83d; }
.rr__hint { margin: 0; font-size: 13px; color: rgba(255, 255, 255, .72); max-width: 420px; }
.rr__hint--phone { display: none; }
@media (pointer: coarse) { .rr__hint--pc { display: none; } .rr__hint--phone { display: block; } }
.rr__go { font: 800 clamp(24px, 4vw, 36px)/1 var(--display); margin: 0; }
.rr__new { margin: -4px 0 0; color: #ffc83d; font-weight: 800; }
.rr__new[hidden] { display: none; }
.rr__res { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: min(420px, 100%); }
.rr__res div { padding: 10px 6px; border-radius: 14px; background: rgba(255, 255, 255, .08); display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rr__res small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.rr__res b { font: 800 22px var(--display); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.rr__msg { margin: 0; min-height: 1.2em; font-size: 14px; color: rgba(255, 255, 255, .85); }
.rr__acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.rr__share { background: rgba(255, 255, 255, .12); color: #fff; border: 1px solid rgba(255, 255, 255, .2); }
.rr__share:hover { background: rgba(255, 255, 255, .2); }
.rr__cta { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; align-items: center; font-size: 13px; color: rgba(255, 255, 255, .7); }
.rr__cta a { color: #fff; padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .25); font-weight: 600; }
.rr__cta a:hover { border-color: #ff8a3d; }

/* ---------- weekly board ---------- */
.rrb { padding: 18px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.rrb__head h2 { font: 800 22px var(--display); margin: 0; }
.rrb__head p { margin: 4px 0 12px; color: var(--mute); font-size: 13px; }
.rrb ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.rrb li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 10px; font-size: 14px; }
.rrb li:nth-child(odd) { background: var(--paper); }
.rrb li.you { background: var(--brand-soft); }
.rrb li.you.is-new { animation: rrbMe 1.4s ease-out 2; }
@keyframes rrbMe { 0% { box-shadow: 0 0 0 0 var(--brand); } 70% { box-shadow: 0 0 0 5px rgba(0, 0, 0, 0); } 100% { box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .rrb li.you.is-new { animation: none; outline: 2px solid var(--brand); } }
.rrb li .n { width: 22px; text-align: center; font-weight: 800; color: var(--mute); flex: none; }
.rrb .rrb__top li:nth-child(1) .n { color: #d99a00; }
.rrb .rrb__top li:nth-child(2) .n { color: #8a8f99; }
.rrb .rrb__top li:nth-child(3) .n { color: #b86b2a; }
.rrb li .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.rrb li .nm small { color: var(--mute); font-weight: 600; }
.rrb li b { font-variant-numeric: tabular-nums; }
.rrb li.empty { justify-content: center; color: var(--mute); background: none; text-align: center; }
.rrb h3 { font: 700 14px var(--display); margin: 14px 0 6px; color: var(--ink-2); }
.rrb__me { margin: 10px 0 0; font-size: 14px; color: var(--ink-2); }
.rrb__nick { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 14px; }
.rrb__nick p { margin: 0; overflow-wrap: anywhere; }
.rrb__link { border: 0; background: none; padding: 0; color: var(--brand-ink); font-weight: 700; cursor: pointer; text-decoration: underline; }
.rrb__nick form { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.rrb__nick form[hidden] { display: none; }
.rrb__nick input { flex: 1 1 140px; min-width: 0; height: 36px; border: 2px solid var(--line); border-radius: 10px; padding: 0 10px; font: 600 15px var(--body); background: var(--paper); }
.rrb__err { flex-basis: 100%; margin: 0; color: #c62828; font-size: 13px; }
.rrb__err[hidden] { display: none; }
.rrb__join { margin-top: 14px; }
.rrb__join p { margin: 8px 0 0; font-size: 13px; color: var(--mute); text-align: center; }
.rrb__won { display: inline-block; margin-left: 4px; padding: 1px 6px; border-radius: 999px; background: #fff4d6; color: #8a5a00; font-size: 11px; font-weight: 800; vertical-align: 1px; }
.rrb__prize a { color: var(--brand-ink); font-weight: 700; }
.rrb__prize { margin: 12px 0 0; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); font-size: 13px; }

@media (max-width: 1000px) {
  .rrp__top { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .rrp__title .tl__lead { font-size: 15px; }
  .rr { border-radius: 18px; margin: 0 -6px; }
  .rr__stage { aspect-ratio: 4 / 5; max-height: 72vh; max-height: 72svh; min-height: 380px; }
  .rr__res b { font-size: 18px; }
  .rr__ov { gap: 10px; padding: 14px; }
}
