.rp-modes { display: flex; gap: 6px; justify-content: center; margin: 0 0 10px; }
.rp-mode { min-height: 44px; padding: 0 16px; border-radius: 99px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.rp-mode[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rp-mode:focus-visible, .rp-pad:focus-visible, .rp-key:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.rp-intro ul { padding-left: 1.1em; margin: 8px 0; }
.rp-intro li { margin: 4px 0; }
.rp-best { text-align: center; color: var(--muted); }
.rp-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; min-height: 64px; }
.rp-chico { width: 56px; flex: none; }
.rp-chico .mascot { width: 56px; }
.rp-msg { font-size: 1.35rem; font-weight: 800; line-height: 1.15; }
.rp-sub { color: var(--muted); font-size: .9rem; min-height: 1.3em; font-variant-numeric: tabular-nums; }
.rp-level { margin-left: auto; text-align: center; background: var(--card); border: 2px solid var(--line); border-radius: 14px; padding: 4px 12px; min-width: 70px; }
.rp-level small { display: block; color: var(--muted); font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.rp-level b { font-size: 1.5rem; font-variant-numeric: tabular-nums; }
.rp-dots { display: flex; gap: 5px; justify-content: center; min-height: 12px; margin: 0 0 10px; flex-wrap: wrap; }
.rp-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); transition: background .15s; }
.rp-dots i.on { background: var(--accent); }
.rp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: min(100%, 380px); margin: 0 auto; padding: 12px; background: var(--sky-bg); border-radius: var(--radius); border: 2px solid var(--edge); }
.rp-pad { position: relative; aspect-ratio: 1; min-height: 64px; border: 0; border-radius: 18px; background: var(--c); color: var(--ink-c); display: grid; place-items: center; cursor: pointer; padding: 0; font: inherit;
  box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 60%, #000), 0 8px 12px rgba(40, 20, 60, .12); filter: saturate(.62) brightness(.9); transform: translateY(0); transition: filter .12s, transform .12s, box-shadow .12s;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; user-select: none; -webkit-user-select: none; }
.rp-pad svg { width: 56%; height: 56%; fill: currentColor; pointer-events: none; }
.rp-pad kbd { position: absolute; left: 7px; top: 4px; font: 700 .72rem/1 var(--font); opacity: .6; pointer-events: none; }
.rp-pad.lit { filter: saturate(1.15) brightness(1.08); transform: translateY(3px) scale(1.07); box-shadow: 0 2px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 4px #fff, 0 0 22px 6px color-mix(in srgb, var(--c) 70%, #fff); animation: rp-bounce .32s cubic-bezier(.2, 1.7, .4, 1); z-index: 1; }
.rp-pad.nope { animation: rp-shake .35s; filter: grayscale(.7) brightness(.85); }
.rp-pad.hint { box-shadow: 0 5px 0 color-mix(in srgb, var(--c) 60%, #000), 0 0 0 4px var(--accent); filter: saturate(1) brightness(1); }
.rp-grid[data-phase="watch"] .rp-pad, .rp-grid[data-phase="between"] .rp-pad, .rp-grid[data-phase="end"] .rp-pad { cursor: default; }
@keyframes rp-bounce { 0% { transform: scale(.94); } 55% { transform: translateY(3px) scale(1.12); } 100% { transform: translateY(3px) scale(1.07); } }
@keyframes rp-shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.rp-num { text-align: center; }
.rp-show { position: relative; background: var(--sky-bg); border: 2px solid var(--edge); border-radius: var(--radius); padding: 18px 10px 22px; min-height: 130px; display: grid; place-items: center; overflow: hidden; }
.rp-digits { font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: .08em; word-break: break-all; color: var(--sky); line-height: 1.15; font-size: clamp(2rem, 11vw, 3.2rem); }
.rp-digits[data-n="long"] { font-size: clamp(1.4rem, 7vw, 2.2rem); }
.rp-bar { position: absolute; left: 0; bottom: 0; height: 7px; width: 100%; background: var(--accent); transform-origin: left; }
.rp-slots { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; }
.rp-slots span { min-width: 34px; height: 46px; padding: 0 2px; border-radius: 10px; border-bottom: 4px solid var(--edge); background: var(--card); display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.rp-slots span.cur { border-bottom-color: var(--accent); }
.rp-slots span.ok { background: color-mix(in srgb, var(--ok) 22%, var(--card)); }
.rp-slots span.bad { background: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.rp-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; width: min(100%, 320px); margin: 12px auto 0; }
.rp-key { min-height: 54px; border-radius: 14px; border: 2px solid var(--line); background: var(--card); color: var(--ink); font: inherit; font-size: 1.5rem; font-weight: 800; cursor: pointer; touch-action: manipulation; box-shadow: 0 3px 0 var(--line); }
.rp-key:active { transform: translateY(2px); box-shadow: none; }
.rp-key.go { background: var(--accent); color: var(--accent-ink); border-color: var(--accent-edge); box-shadow: 0 3px 0 var(--accent-edge); }
.rp-key:disabled { opacity: .45; }
.rp-cmp { display: grid; gap: 6px; margin: 8px 0; font-variant-numeric: tabular-nums; }
.rp-cmp div { display: flex; justify-content: space-between; gap: 8px; background: var(--bg); border-radius: 10px; padding: 6px 10px; word-break: break-all; }
.rp-cmp b { letter-spacing: .08em; }
.rp-detail { text-align: center; }
.rp-detail .rp-rate { font-weight: 800; margin: 4px 0; }
@media (prefers-reduced-motion: reduce) {
  .rp-pad, .rp-pad.lit, .rp-pad.nope { transition: none; animation: none; }
  .rp-pad.lit { transform: none; }
  .rp-bar { transition: none !important; }
}
.rp-keys[hidden] { display: none; }
