/* 리듬 탭 */
.stage.rt { touch-action: none; overscroll-behavior: none; background: #14152a; }
.rt-cv { position: absolute; inset: 0; display: block; touch-action: none; -webkit-touch-callout: none; }

.rt-pause { position: absolute; z-index: 5; top: 8px; right: 8px; width: 40px; height: 40px; border-radius: 12px; border: 1px solid rgba(143, 150, 255, 0.3);
  background: rgba(20, 22, 52, 0.75); display: flex; align-items: center; justify-content: center; gap: 5px; cursor: pointer; padding: 0; }
.rt-pause[hidden] { display: none; }
.rt-pause i { display: block; width: 5px; height: 16px; border-radius: 2px; background: #cfd3ff; }
.rt-pause:hover { background: rgba(60, 66, 140, 0.8); }

/* 시작 · 멈춤 · 끝 화면: 어두운 네온 판 */
.rt .overlay { background: rgba(12, 14, 34, 0.62); }
.rt .panel { background: linear-gradient(180deg, #252a5a, #1b1f45); color: #fff; border: 1px solid rgba(123, 108, 255, 0.45); touch-action: pan-y;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(123, 108, 255, 0.22); padding: 20px 20px 18px; }
.rt .panel h2 { color: #fff; margin: 2px 0 4px; font-size: 31px; }
.rt .panel p, .rt .panel ul { color: #cfd3ff; }
.rt .panel p { margin-bottom: 8px; }
.rt .panel ul { font-size: 14px; line-height: 1.5; margin-bottom: 10px; }
.rt .panel li::marker { color: #3ee0b5; }
.rt .big-btn { background: linear-gradient(135deg, #7b6cff, #4f5bea); box-shadow: 0 8px 22px rgba(123, 108, 255, 0.45); cursor: pointer; }
.rt .big-btn:hover { filter: brightness(1.08); }
.rt .sub-btn { background: rgba(255, 255, 255, 0.06); border-color: rgba(143, 150, 255, 0.25); color: #cfd3ff; text-decoration: none; cursor: pointer; font: inherit; font-size: 15px; }
.rt-robot { display: block; width: 132px; height: auto; margin: -4px auto 0; filter: drop-shadow(0 6px 16px rgba(123, 108, 255, 0.35)); }

/* 곡 고르기 */
.rt-songs { display: grid; gap: 6px; margin: 2px 0 8px; }
.rt-song { --sc: #6470ff; display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: 14px; cursor: pointer; text-align: left;
  border: 2px solid rgba(143, 150, 255, 0.2); background: rgba(255, 255, 255, 0.05); color: #cfd3ff; font: inherit; }
.rt-song i { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; font-family: 'Fredoka', var(--title); font-weight: 600; font-size: 16px;
  background: var(--sc); color: #1c2140; }
.rt-song span { flex: 1; min-width: 0; }
.rt-song b { display: block; font-family: var(--title); font-weight: 400; font-size: 18px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-song small { display: block; font-size: 12px; color: #a9afd6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rt-song.on { border-color: var(--sc); background: rgba(255, 255, 255, 0.11); box-shadow: 0 0 18px -6px var(--sc); }
.rt-sbest { flex: none; min-width: 26px; font-style: normal; font-family: 'Fredoka', var(--title); font-weight: 600; font-size: 19px; color: #5d6290; text-align: center; }

.rt .panel .rt-seg { margin: 0 0 8px; }
.rt .panel .rt-seg button { background: rgba(255, 255, 255, 0.05); border-color: rgba(143, 150, 255, 0.25); color: #cfd3ff; padding: 8px 2px; cursor: pointer; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--title); font-weight: 400; font-size: 17px; }
.rt .panel .rt-seg button.on { border-color: #3ee0b5; background: rgba(62, 224, 181, 0.15); color: #fff; }

.rt-off { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 8px; font-size: 13px; color: #a9afd6; margin: 0 0 6px; }
.rt-off button { width: 30px; height: 28px; border-radius: 9px; border: 1px solid rgba(143, 150, 255, 0.3); background: rgba(255, 255, 255, 0.06); color: #fff; font-size: 17px; line-height: 1; cursor: pointer; padding: 0; }
.rt-off b { min-width: 56px; text-align: center; color: #fff; font-family: 'Fredoka', var(--title); font-weight: 600; font-size: 15px; }
.rt-off small { flex-basis: 100%; text-align: center; font-size: 11.5px; color: #8a90b8; }
.rt .panel .rt-mute { font-size: 13px; line-height: 1.45; color: #ffe9a8; background: rgba(255, 200, 61, 0.1); border: 1px solid rgba(255, 200, 61, 0.35); border-radius: 12px; padding: 7px 10px; margin: 4px 0 4px; }
.rt .panel .rt-mute[hidden] { display: none; }

/* 결과 */
.rt-rank { display: flex; flex-direction: column; align-items: center; margin: -2px 0 0; }
.rt-rank b { font-family: 'Fredoka', var(--title); font-weight: 600; font-size: 76px; line-height: 1; color: #ffd23f; text-shadow: 0 0 28px rgba(255, 210, 63, 0.5); animation: rt-rank 0.5s ease-out; }
.rt-rank span { font-size: 12px; color: #a9afd6; letter-spacing: 0.05em; }
.rt-rank .r-S { color: #ffd23f; }
.rt-rank .r-A { color: #8ff7e2; text-shadow: 0 0 28px rgba(62, 224, 181, 0.5); }
.rt-rank .r-B { color: #b9c0ff; text-shadow: 0 0 24px rgba(123, 108, 255, 0.5); }
.rt-rank .r-C { color: #ffb8ad; text-shadow: 0 0 24px rgba(255, 107, 90, 0.4); }
@keyframes rt-rank { 0% { transform: scale(2.2); opacity: 0; } 70% { transform: scale(0.92); opacity: 1; } 100% { transform: scale(1); } }
.rt .panel .e-title { font-size: 26px; }
.rt .panel .stats { margin: 6px 0 8px; }
.rt .panel .stats div { background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(143, 150, 255, 0.18); min-width: 0; }
.rt .panel .stats b { color: #ffd23f; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: 'Fredoka', var(--title); font-weight: 600; font-size: 21px; line-height: 1.35; }
.rt .panel .stats span { color: #a9afd6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rt-counts { display: flex; justify-content: center; gap: 12px; font-size: 13px; color: #a9afd6; margin: 0 0 4px; flex-wrap: wrap; }
.rt-counts b { margin-right: 4px; font-family: 'Fredoka', var(--title); font-weight: 600; font-size: 15px; }
.rt-counts .c-p b { color: #ffe27a; }
.rt-counts .c-g b { color: #8ff7e2; }
.rt-counts .c-m b { color: #ff8a7d; }
.rt .panel .rt-ebest { font-size: 13px; color: #a9afd6; margin: 0 0 4px; }
.rt .panel .rt-fc { color: #8ff7e2; font-family: var(--title); font-size: 20px; margin: 0 0 4px; }
.rt .panel .rt-fc[hidden], .rt .panel .newbest[hidden] { display: none; }
.rt .panel .newbest { color: #ffd23f; margin: 0 0 4px; }
.rt .rt-small { width: min(320px, 100%); }

@media (max-height: 700px) {
  .rt-robot { width: 96px; margin-top: -8px; }
  .rt .panel { padding: 14px 16px; }
  .rt .panel h2 { font-size: 26px; margin: 0 0 2px; }
  .rt .panel p { margin-bottom: 6px; font-size: 14.5px; line-height: 1.4; }
  .rt .panel ul { font-size: 13px; line-height: 1.4; margin-bottom: 6px; }
  .rt-song { padding: 5px 9px; }
  .rt .big-btn { font-size: 21px; padding: 11px; }
}
/* 폰 세로: 규칙은 긴 노트 한 줄만(누르는 법은 소개 글에), 그림 작게 */
@media (max-width: 520px) {
  .rt-robot { width: 92px; margin-top: -8px; }
  .rt .ov-start .panel li:nth-child(1), .rt .ov-start .panel li:nth-child(3) { display: none; }
  .rt-off small { display: none; }
  .rt .panel { padding: 14px 14px 16px; }
}
@media (max-height: 660px) and (max-width: 520px) {
  .rt-robot { width: 74px; }
  .rt .ov-start .panel ul { display: none; }
  .rt .panel .stats { margin: 4px 0 6px; }
  .rt-rank b { font-size: 60px; }
}
/* 낮고 넓은 화면(폰 가로 · 작은 창): 판을 좌우 두 칸으로 */
@media (max-height: 520px) and (min-width: 560px) {
  .rt-robot { display: none; }
  .rt .rt-panel:not(.rt-small) { width: min(720px, 100%); display: flex; align-items: center; gap: 18px; padding: 12px 16px; }
  .rt .rt-c1 { flex: 1; min-width: 0; text-align: left; }
  .rt .rt-c2 { flex: 1.15; min-width: 0; }
  .rt .rt-panel h2 { font-size: 26px; margin: 0 0 4px; }
  .rt .rt-panel p { margin-bottom: 6px; font-size: 14px; line-height: 1.4; }
  .rt .rt-panel ul { display: block; font-size: 13px; line-height: 1.4; margin: 0; padding-left: 18px; }
  .rt .rt-panel .big-btn { font-size: 20px; padding: 9px; }
  .rt .rt-panel .sub-btn { padding: 7px; margin-top: 6px; }
  .rt-song { padding: 4px 8px; }
  .rt-song i { width: 26px; height: 26px; }
  .rt-songs { gap: 4px; margin-bottom: 6px; }
  .rt .ov-end .rt-c1 { text-align: center; }
  .rt-rank b { font-size: 64px; }
}
@media (max-height: 400px) and (min-width: 560px) {
  .rt .ov-start .rt-panel ul { display: none; }
  .rt .ov-start .rt-panel p { margin-bottom: 6px; }
  .rt .rt-panel h2 { font-size: 23px; }
  .rt-off small { display: none; }
  .rt .panel .stats { margin: 4px 0; }
  .rt .panel .stats div { padding: 4px; }
  .rt .panel .stats b { font-size: 18px; }
  .rt .rt-panel .sub-btn { padding: 6px; }
  .rt .rt-panel .big-btn { margin-top: 2px; }
}

/* ── 공통 틀(액션 · 타이밍 다섯 게임이 같은 단추 · HUD 느낌을 쓴다): 제목 화면 · PLAY 단추 · 알약 HUD · 손가락 안내 · 별 결과 ── */
.ax-title { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  padding: clamp(18px, 6vh, 64px) 16px clamp(18px, 6vh, 56px); pointer-events: none; text-align: center;
  background: radial-gradient(120% 80% at 50% 45%, transparent 40%, rgba(8, 10, 30, 0.45)); }
.ax-title[hidden] { display: none; }
.ax-title > * { pointer-events: auto; }
.ax-title.out { animation: ax-out 0.32s ease-in forwards; pointer-events: none; }
.ax-title.out > * { pointer-events: none; }
@keyframes ax-out { to { opacity: 0; transform: scale(1.06); } }
.ax-kicker { display: inline-block; padding: 5px 14px 4px; border-radius: 99px; font: 400 14px/1.2 "Fredoka", "Do Hyeon", system-ui, sans-serif; letter-spacing: 0.14em;
  color: var(--ax-k-ink, #fff); background: var(--ax-k-bg, rgba(0, 0, 0, 0.3)); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.35); margin-bottom: 10px; animation: ax-drop 0.6s 0.05s cubic-bezier(.2, 1.4, .4, 1) both; }
.ax-logo { margin: 0; max-width: 11em; font-family: "Black Han Sans", "Do Hyeon", var(--title), system-ui, sans-serif; font-weight: 400; font-size: clamp(42px, min(10vw, 11vh), 92px);
  line-height: 0.98; letter-spacing: -0.01em; text-wrap: balance; color: var(--ax-logo, #fff);
  -webkit-text-stroke: 0.16em var(--ax-logo-edge, #1c2140); paint-order: stroke fill;
  text-shadow: 0 0.05em 0 var(--ax-logo-edge, #1c2140), 0 0.09em 0 var(--ax-logo-edge, #1c2140), 0 0.13em 0 var(--ax-logo-edge, #1c2140), 0 0.22em 0.3em rgba(0, 0, 0, 0.4);
  transform: rotate(-2.5deg); animation: ax-drop 0.7s cubic-bezier(.2, 1.5, .4, 1) both, ax-bob 3.2s 0.7s ease-in-out infinite; }
.ax-logo em { display: block; font-style: normal; color: var(--ax-logo2, #ffd23f); font-size: 0.62em; letter-spacing: 0.02em; }
@keyframes ax-drop { from { opacity: 0; transform: translateY(-40px) scale(0.7) rotate(-2.5deg); } }
@keyframes ax-bob { 50% { transform: translateY(-6px) rotate(-1.5deg); } }
.ax-bottom { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.ax-best { display: inline-flex; align-items: center; gap: 8px; padding: 6px 16px 6px 8px; border-radius: 99px; color: #fff; font-weight: 800; font-size: 15px;
  background: rgba(10, 12, 36, 0.55); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.18), 0 6px 16px rgba(0, 0, 0, 0.25); animation: ax-rise 0.5s 0.25s ease-out both; }
.ax-best svg { width: 26px; height: 26px; flex: none; }
.ax-best small { font-size: 12px; letter-spacing: 0.08em; opacity: 0.75; }
.ax-best b { font-family: "Fredoka", var(--title), sans-serif; font-weight: 600; font-size: 20px; color: #ffd23f; }
@keyframes ax-rise { from { opacity: 0; transform: translateY(16px); } }

/* 크고 도톰한 입체 단추 (눌림 · 반짝임 · 숨쉬기) */
.ax-play { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 12px; min-width: 230px; padding: 16px 40px 18px; border: 0; border-radius: 22px; cursor: pointer;
  font: 400 32px/1 "Black Han Sans", "Do Hyeon", var(--title), system-ui, sans-serif; letter-spacing: 0.02em; color: #fff; overflow: hidden;
  background: linear-gradient(180deg, #ffe066 0%, #ffb31a 55%, #ff9500 100%);
  box-shadow: 0 7px 0 #c25e00, 0 14px 26px rgba(0, 0, 0, 0.35), inset 0 3px 0 rgba(255, 255, 255, 0.65), inset 0 -4px 0 rgba(180, 80, 0, 0.25);
  text-shadow: 0 2px 0 rgba(160, 70, 0, 0.75); -webkit-text-stroke: 1px rgba(160, 70, 0, 0.35);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s; animation: ax-rise 0.5s 0.15s ease-out both, ax-breathe 1.7s 0.7s ease-in-out infinite; }
.ax-play svg { width: 26px; height: 26px; flex: none; filter: drop-shadow(0 2px 0 rgba(160, 70, 0, 0.7)); }
.ax-play::after { content: ''; position: absolute; top: -20%; bottom: -20%; width: 36%; left: -50%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent); animation: ax-shine 2.8s 1s ease-in-out infinite; }
.ax-play:hover { filter: brightness(1.06) saturate(1.1); }
.ax-play:active { transform: translateY(6px) scale(0.98); box-shadow: 0 1px 0 #c25e00, 0 4px 10px rgba(0, 0, 0, 0.3), inset 0 3px 0 rgba(255, 255, 255, 0.5); animation: none; }
.ax-play:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@keyframes ax-breathe { 50% { transform: scale(1.045); } }
@keyframes ax-shine { 0%, 55% { left: -50%; } 100% { left: 130%; } }
.ax-tip { display: inline-flex; align-items: center; gap: 8px; max-width: 92vw; padding: 7px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: #fff;
  background: rgba(10, 12, 36, 0.45); animation: ax-rise 0.5s 0.35s ease-out both; }
.ax-tip svg { width: 22px; height: 22px; flex: none; }

/* 알약 HUD: 아이콘 + 숫자 */
.ax-hud { position: absolute; top: 10px; left: 10px; right: 10px; z-index: 3; display: flex; gap: 8px; align-items: flex-start; pointer-events: none; }
.ax-pill { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px 0 4px; border-radius: 99px; color: #fff; white-space: nowrap;
  background: rgba(10, 12, 36, 0.58); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.16), 0 4px 12px rgba(0, 0, 0, 0.2); }
.ax-pill > svg, .ax-pill > i { width: 28px; height: 28px; flex: none; display: grid; place-items: center; font-style: normal; }
.ax-pill b { font: 600 20px/1 "Fredoka", var(--title), system-ui, sans-serif; display: inline-block; }
.ax-pill small { font-size: 12px; font-weight: 700; opacity: 0.7; }
.ax-pill .bump, .ax-bump { animation: ax-bump 0.34s cubic-bezier(.3, 1.8, .5, 1); }
@keyframes ax-bump { 0% { transform: scale(1); } 35% { transform: scale(1.35); } 100% { transform: scale(1); } }

/* 처음 하는 사람 안내: 손가락이 직접 보여 준다 */
.ax-tut { position: absolute; z-index: 6; pointer-events: none; width: 0; height: 0; }
.ax-tut[hidden] { display: none; }
.ax-hand { position: absolute; left: -10px; top: -4px; width: 64px; height: 64px; filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.35)); transform-origin: 30% 10%; animation: ax-tap 1.1s ease-in-out infinite; }
.ax-tut .ax-ripple { position: absolute; left: -22px; top: -22px; width: 44px; height: 44px; border-radius: 50%; border: 3px solid #fff; opacity: 0; animation: ax-rip 1.1s ease-out infinite; }
.ax-tut b { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); white-space: nowrap; padding: 5px 12px; border-radius: 99px; font: 400 18px/1.1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif;
  color: #1c2140; background: #fff; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.18); }
.ax-tut.hold .ax-hand { animation: ax-hold 1.6s ease-in-out infinite; }
.ax-tut.hold .ax-ripple { animation: ax-rip 1.6s ease-out infinite; }
@keyframes ax-tap { 0%, 100% { transform: translate(8px, 14px) scale(1); } 40% { transform: translate(0, 0) scale(0.92); } 55% { transform: translate(0, 0) scale(0.92); } }
@keyframes ax-hold { 0%, 100% { transform: translate(8px, 14px); } 20%, 75% { transform: translate(0, 0) scale(0.9); } }
@keyframes ax-rip { 0%, 35% { opacity: 0; transform: scale(0.4); } 45% { opacity: 0.9; } 100% { opacity: 0; transform: scale(1.8); } }

/* 결과 화면: 별 세 개 · 올라가는 점수 · 새 기록 띠 */
.ax-end .panel { position: relative; overflow: visible; width: min(380px, 100%); padding: 30px 22px 18px; border-radius: 28px; text-align: center; color: #fff;
  background: linear-gradient(180deg, var(--ax-card1, #2e3470), var(--ax-card2, #1b1f45)); border: 0;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.12), inset 0 3px 0 rgba(255, 255, 255, 0.12), 0 10px 0 rgba(0, 0, 0, 0.25), 0 26px 60px rgba(0, 0, 0, 0.5);
  animation: ax-card 0.45s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes ax-card { from { transform: translateY(40px) scale(0.85); opacity: 0; } }
.ax-end h2 { margin: 0 0 4px; font: 400 32px/1.1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif; color: #fff; -webkit-text-stroke: 5px rgba(10, 12, 36, 0.6); paint-order: stroke fill; }
.ax-ribbon { position: absolute; left: 50%; top: -18px; transform: translateX(-50%) rotate(-3deg); white-space: nowrap; padding: 6px 22px 5px;
  font: 400 19px/1.1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif; color: #fff; background: linear-gradient(180deg, #ff6b8b, #e8365d);
  box-shadow: 0 4px 0 #a51f40, 0 8px 18px rgba(0, 0, 0, 0.3); border-radius: 8px; text-shadow: 0 2px 0 rgba(120, 10, 40, 0.6); animation: ax-ribbon 0.6s 1.4s cubic-bezier(.2, 1.6, .4, 1) both; }
.ax-ribbon[hidden] { display: none; }
@keyframes ax-ribbon { from { transform: translateX(-50%) rotate(-3deg) scale(0); } }
.ax-stars { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin: 6px 0 2px; height: 74px; }
.ax-star { width: 58px; height: 58px; display: block; }
.ax-star:nth-child(2) { width: 72px; height: 72px; }
.ax-star path { fill: rgba(0, 0, 0, 0.32); stroke: rgba(255, 255, 255, 0.12); stroke-width: 1.2; stroke-linejoin: round; }
.ax-star.on path { fill: url(#axStarG); stroke: #b86e00; }
.ax-star.on { animation: ax-star 0.5s cubic-bezier(.2, 1.8, .4, 1) both; filter: drop-shadow(0 3px 0 #a35e00) drop-shadow(0 0 10px rgba(255, 210, 63, 0.6)); }
@keyframes ax-star { 0% { transform: scale(2.2) rotate(-30deg); opacity: 0; } 60% { transform: scale(0.9) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(0); } }
.ax-score { margin: 2px 0 2px; }
.ax-score b { display: block; font: 600 64px/1 "Fredoka", var(--title), system-ui, sans-serif; color: #ffd23f; text-shadow: 0 4px 0 rgba(0, 0, 0, 0.3); }
.ax-score span { font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.7); }
.ax-next { display: inline-block; margin: 8px 0 4px; padding: 5px 14px; border-radius: 99px; font-size: 14px; font-weight: 700; color: #fff; background: rgba(255, 255, 255, 0.1); }
.ax-next b { color: #ffd23f; }
.ax-bar { height: 8px; margin: 6px auto 2px; width: 80%; border-radius: 99px; background: rgba(0, 0, 0, 0.3); overflow: hidden; }
.ax-bar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, #ffd23f, #ff9500); transition: width 0.9s 0.3s cubic-bezier(.2, .8, .3, 1); }
.ax-mini { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin: 10px 0 14px; }
.ax-mini span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px; border-radius: 99px; font-size: 13px; font-weight: 700; color: rgba(255, 255, 255, 0.8); background: rgba(0, 0, 0, 0.25); }
.ax-mini b { font: 600 16px/1 "Fredoka", var(--title), sans-serif; color: #fff; }
.ax-end .ax-play { width: 100%; min-width: 0; font-size: 28px; padding: 14px 20px 16px; animation: ax-breathe 1.7s 1.6s ease-in-out infinite; }
.ax-link { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 700; color: rgba(255, 255, 255, 0.65); text-decoration: none; }
.ax-link:hover { color: #fff; text-decoration: underline; }
.ax-row { display: flex; gap: 8px; }
.ax-row .ax-play { flex: 1; }
.ax-ghost { display: inline-flex; align-items: center; justify-content: center; min-width: 58px; border: 0; border-radius: 18px; cursor: pointer; color: #fff; font: 400 18px/1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif;
  background: rgba(255, 255, 255, 0.14); box-shadow: 0 5px 0 rgba(0, 0, 0, 0.25), inset 0 2px 0 rgba(255, 255, 255, 0.2); padding: 0 14px; }
.ax-ghost:active { transform: translateY(4px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); }

@media (max-height: 620px) {
  .ax-logo { font-size: clamp(34px, 9vh, 60px); }
  .ax-play { font-size: 26px; padding: 12px 30px 14px; min-width: 190px; }
  .ax-stars { height: 56px; } .ax-star { width: 44px; height: 44px; } .ax-star:nth-child(2) { width: 54px; height: 54px; }
  .ax-score b { font-size: 46px; }
  .ax-end .panel { padding: 16px 18px 12px; }
  .ax-end h2 { font-size: 26px; }
  .ax-mini { margin: 6px 0 10px; }
}
@media (prefers-reduced-motion: reduce) { .ax-logo, .ax-play, .ax-play::after, .ax-hand, .ax-tut .ax-ripple { animation: none !important; } }

.ax-play[hidden], .ax-best[hidden], .ax-ghost[hidden], .ax-next[hidden], .ax-bar[hidden] { display: none !important; }

/* ── 리듬 탭 AAA: 무대 제목 · 레코드판 곡 카드 · 판 ── */
.rt { --ax-logo: #fff; --ax-logo-edge: #3a1f8a; --ax-k-bg: linear-gradient(90deg, #ff6b5a, #7b6cff, #3ee0b5); --ax-card1: #33287e; --ax-card2: #1b1745; }
.rt .ax-title { background: radial-gradient(90% 70% at 50% 50%, rgba(10, 10, 34, 0.55), rgba(8, 8, 28, 0.82)); justify-content: center; gap: clamp(12px, 3vh, 28px); }
.rt .ax-head { display: flex; flex-direction: column; align-items: center; }
.rt .ax-logo { color: #fff; }
.rt-pick { width: min(720px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; animation: ax-rise 0.5s 0.15s ease-out both; }
.rt .rt-songs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; width: 100%; margin: 0; }
.rt .rt-song { flex-direction: column; text-align: center; gap: 6px; padding: 14px 8px 12px; border-radius: 20px; border: 0; position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.04)); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.1), 0 5px 0 rgba(0, 0, 0, 0.3);
  transition: transform 0.12s, box-shadow 0.12s; }
.rt .rt-song:hover { transform: translateY(-2px); }
.rt .rt-song.on { background: linear-gradient(180deg, color-mix(in srgb, var(--sc) 38%, transparent), rgba(255, 255, 255, 0.05)); box-shadow: inset 0 0 0 2.5px var(--sc), 0 5px 0 rgba(0, 0, 0, 0.3), 0 0 26px -6px var(--sc); transform: translateY(-3px); }
.rt .rt-song span { flex: none; width: 100%; }
.rt .rt-song b { font-family: "Black Han Sans", "Do Hyeon", var(--title), sans-serif; font-size: 19px; }
.rt-disc { position: relative; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  background: radial-gradient(circle, var(--sc) 0 30%, #1a1a2e 31% 33%, #26263f 34% 46%, #1c1c33 47% 60%, #2a2a45 61% 72%, #15152a 73%);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(255, 255, 255, 0.08); }
.rt-disc::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: conic-gradient(from 20deg, transparent 0 15%, rgba(255, 255, 255, 0.18) 20%, transparent 26% 65%, rgba(255, 255, 255, 0.12) 70%, transparent 76%); }
.rt-disc em { font: 600 16px/1 "Fredoka", sans-serif; font-style: normal; color: #1c2140; position: relative; z-index: 1; }
.rt .rt-song.on .rt-disc { animation: rt-spin 2.4s linear infinite; }
@keyframes rt-spin { to { transform: rotate(360deg); } }
.rt .rt-sbest { position: absolute; top: 8px; right: 10px; font-size: 17px; }
.rt .rt-sbest.r-S { color: #ffd23f; } .rt .rt-sbest.r-A { color: #8ff7e2; } .rt .rt-sbest.r-B { color: #b9c0ff; } .rt .rt-sbest.r-C { color: #ffb8ad; }
.rt .rt-seg { display: flex; gap: 6px; padding: 5px; border-radius: 99px; background: rgba(0, 0, 0, 0.35); box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.1); }
.rt .rt-seg button { min-width: 96px; height: 40px; padding: 0 16px; border: 0; border-radius: 99px; cursor: pointer; background: transparent; color: #cfd3ff;
  font: 400 18px/1 "Black Han Sans", "Do Hyeon", var(--title), sans-serif; white-space: nowrap; transition: background 0.15s, transform 0.1s; }
.rt .rt-seg button.on { background: linear-gradient(180deg, #3ee0b5, #17b39b); color: #0b2a24; box-shadow: 0 3px 0 #0b6e5f; }
.rt .rt-seg button:active { transform: translateY(2px); }
.rt .ax-title .rt-off { margin: 0; color: #a9afd6; }
.rt .ax-title .rt-off small { flex-basis: 100%; }
.rt .ax-title .rt-mute { max-width: 420px; font-size: 13px; line-height: 1.45; color: #ffe9a8; background: rgba(255, 200, 61, 0.12); border: 1px solid rgba(255, 200, 61, 0.35); border-radius: 12px; padding: 7px 10px; margin: 0; }
.rt .ax-title .rt-mute[hidden] { display: none; }
/* 판(멈춤 · 결과) */
.rt .ov-pause, .rt .ov-end { overflow-y: auto; place-items: safe center; }
.rt .ax-end .panel.rt-small { width: min(340px, 100%); }
.rt-row { display: flex; gap: 8px; margin-top: 10px; }
.rt-row .ax-ghost { flex: 1; height: 44px; font-size: 16px; }
.rt .rt-wide { width: 100%; height: 44px; gap: 6px; font-size: 16px; margin: 4px 0 12px; }
.rt .rt-wide svg { width: 18px; height: 18px; }
.rt .ax-end .rt-rank { position: absolute; top: 14px; right: 14px; width: 74px; height: 74px; border-radius: 50%; justify-content: center; transform: rotate(10deg);
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.18), rgba(0, 0, 0, 0.25)); box-shadow: inset 0 0 0 3px currentColor; }
.rt .ax-end .rt-rank b { font-size: 46px; animation: rt-rank 0.5s 0.9s ease-out both; }
.rt .ax-end .rt-rank span { font-size: 10px; margin-top: -2px; }
.rt .ax-end .rt-fc { font-family: "Black Han Sans", var(--title), sans-serif; color: #8ff7e2; font-size: 20px; margin: 0 0 6px; }
.rt .ax-end .rt-fc[hidden] { display: none; }
.rt .ax-end .end-msg, .rt .ax-end .rt-ebest { margin: 2px 0; font-size: 13px; color: rgba(255, 255, 255, 0.7); }
.rt .ax-end .rt-counts { margin: 0 0 4px; }
@media (max-width: 560px) {
  .rt .ax-title { justify-content: space-between; gap: 10px; }
  .rt .rt-songs { grid-template-columns: 1fr; gap: 8px; }
  .rt .rt-song { flex-direction: row; text-align: left; padding: 8px 12px; gap: 12px; }
  .rt-disc { width: 46px; height: 46px; }
  .rt .rt-sbest { position: static; }
  .rt .rt-seg button { min-width: 0; flex: 1; padding: 0 10px; font-size: 17px; }
  .rt .rt-seg { width: 100%; }
  .rt .ax-title .rt-off small { display: none; }
  .rt .ax-end .rt-rank { width: 62px; height: 62px; top: 10px; right: 10px; }
  .rt .ax-end .rt-rank b { font-size: 38px; }
}
@media (max-height: 620px) and (min-width: 561px) {
  .rt .rt-song { padding: 8px 8px; }
  .rt-disc { width: 46px; height: 46px; }
  .rt .ax-title .rt-off small { display: none; }
}
.rt .rt-song .rt-disc { width: 64px; height: 64px; border-radius: 50%; color: inherit; font-size: inherit;
  background: radial-gradient(circle, var(--sc) 0 30%, #1a1a2e 31% 33%, #26263f 34% 46%, #1c1c33 47% 60%, #2a2a45 61% 72%, #15152a 73%); }
@media (max-width: 560px) { .rt .rt-song .rt-disc { width: 46px; height: 46px; } }
@media (max-height: 620px) and (min-width: 561px) { .rt .rt-song .rt-disc { width: 46px; height: 46px; } }

/* 로고 글꼴(Black Han Sans)에 글자가 없는 언어: 굵은 시스템 글꼴로 */
html:is([lang="ru"], [lang="ja"], [lang="zh-TW"], [lang="zh-Hant"], [lang="th"], [lang="vi"]) :is(.ax-logo, .ax-play, .ax-ribbon, .ax-end h2, .ax-tut b, .ax-ghost, .pf-kc b, .rt-song b, .rt-seg button, .fs-rar, .fs-fname) { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; font-weight: 900; }
html:is([lang="ru"], [lang="ja"], [lang="zh-TW"], [lang="zh-Hant"], [lang="th"], [lang="vi"]) .ax-logo { letter-spacing: -0.02em; }
