/* ---------- 클리어 연출 레이어 ---------- */
.fx-layer { position: fixed; inset: 0; z-index: 3000; cursor: pointer; transition: opacity .3s; }
.fx-layer canvas { display: block; }
.fx-layer.out { opacity: 0; }
.fx-skip { position: absolute; left: 0; right: 0; top: 52%; padding: 12px 0; text-align: center;
  background: linear-gradient(90deg, transparent, rgba(0,0,0,.55) 15%, rgba(0,0,0,.55) 85%, transparent);
  font-size: 20px; letter-spacing: .5px; pointer-events: none; animation: fx-skip-in .6s ease-out .6s both; }
@keyframes fx-skip-in { from { opacity: 0; } to { opacity: 1; } }

/* ---------- 결과 화면 ---------- */
.result { position: fixed; inset: 0; z-index: 2500; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 30% 50%, rgba(40, 30, 10, .82), rgba(3, 12, 16, .92) 70%); overflow: hidden; }
.result.show { animation: r-fade .4s ease-out both; }
@keyframes r-fade { from { opacity: 0; } to { opacity: 1; } }

.result-inner { position: relative; display: flex; align-items: center; justify-content: center; gap: 4vw;
  width: min(1100px, 94vw); }
.victory { position: relative; flex: 0 0 auto; width: min(48vw, 560px); aspect-ratio: 1100 / 669; }
.victory .badge { position: relative; display: block; width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 8px 18px rgba(0,0,0,.5)); }
.result.show .badge { animation: r-pop .7s cubic-bezier(.2, 1.6, .4, 1) .1s both; }
@keyframes r-pop { from { transform: scale(.2) rotate(-8deg); opacity: 0; } to { transform: none; opacity: 1; } }
.result.show .crown { animation: r-drop .6s cubic-bezier(.3, 1.5, .5, 1) .35s both; transform-box: fill-box; transform-origin: center bottom; }
@keyframes r-drop { from { transform: translateY(-60px) scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.ribbon-text { font: 700 42px Georgia, "Times New Roman", serif; letter-spacing: 3px; fill: #ffe9a8;
  paint-order: stroke; stroke: #7a1a14; stroke-width: 3px; }

.victory .halo { position: absolute; left: 50%; top: 45%; width: 70%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 120, .65), rgba(255, 180, 60, 0) 65%);
  animation: r-halo 2.4s ease-in-out infinite; }
@keyframes r-halo { 50% { transform: translate(-50%, -50%) scale(1.12); opacity: .75; } }
.victory .rays { position: absolute; left: 50%; top: 45%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: repeating-conic-gradient(rgba(255, 220, 140, .14) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 15%, transparent 62%); mask: radial-gradient(circle, #000 15%, transparent 62%);
  animation: r-spin 18s linear infinite; }
@keyframes r-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }

.result-bokeh i { position: absolute; left: calc(var(--i) * 6.3%); top: calc(10% + (var(--i) * 37 % 80) * 1%);
  width: calc(10px + (var(--i) * 7 % 26) * 1px); aspect-ratio: 1; border-radius: 50%;
  background: rgba(255, 210, 120, .22); filter: blur(1px);
  animation: r-float calc(5s + (var(--i) * 3 % 5) * 1s) ease-in-out calc(var(--i) * -.7s) infinite alternate; }
@keyframes r-float { to { transform: translateY(-40px); opacity: .35; } }

.result-side { flex: 1 1 auto; max-width: 440px; display: flex; flex-direction: column; }
.r-row { display: grid; grid-template-columns: 1fr auto 64px; align-items: center; gap: 12px;
  padding: 14px 4px; border-bottom: 1px solid rgba(255, 255, 255, .14); }
.r-label { font-size: 26px; color: #f1f1f1; }
.r-val { font-size: 34px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.r-best { font: italic 700 20px Georgia, serif; color: #ffd257; opacity: 0; text-shadow: 0 0 10px rgba(255, 190, 60, .7); }
.r-best.on { animation: r-best .5s cubic-bezier(.2, 1.8, .4, 1) 1.9s both; }
@keyframes r-best { from { opacity: 0; transform: scale(2.2); } to { opacity: 1; transform: none; } }
.r-sub { display: flex; justify-content: space-between; padding: 12px 4px 4px; font-size: 15px; opacity: .8; }
.r-sub b { color: #ffd257; }
.r-btn { margin-top: 22px; padding: 16px 0; border: 3px solid #f6d57a; border-radius: 18px; cursor: pointer;
  background: linear-gradient(#ffa64a, #f07a17 55%, #d9600d); color: #fff; font-size: 24px; font-weight: 700;
  text-shadow: 0 2px 0 rgba(120, 50, 0, .5); box-shadow: 0 6px 0 #9b4505, 0 10px 24px rgba(0, 0, 0, .4); }
.r-btn:active { transform: translateY(3px); box-shadow: 0 3px 0 #9b4505; }

.result.show .r-row, .result.show .r-sub, .result.show .r-streak:not(.hot), .result.show .r-btn { animation: r-slide .45s ease-out calc(.5s + var(--d) * .15s) both; }
@keyframes r-slide { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }

@media (max-aspect-ratio: 1/1) {
  .result-inner { flex-direction: column; gap: 10px; }
  .victory { width: min(88vw, 460px); }
  .result-side { width: min(86vw, 420px); }
  .r-label { font-size: 20px; } .r-val { font-size: 28px; }
}
@media (max-height: 500px) {
  .r-row { padding: 8px 4px; } .r-label { font-size: 20px; } .r-val { font-size: 26px; } .r-btn { padding: 10px 0; font-size: 20px; }
}
@media (max-width: 480px) {
  #hud { gap: 14px; padding: 0 14px; }
  .stat { gap: 6px; } .stat .label { font-size: 13px; } .stat .value { font-size: 18px; min-width: 0; }
}

/* ---------- 설정 버튼 (오른쪽 위) ---------- */
#btn-settings, #btn-stats { position: absolute; top: calc(6px + var(--ncq-top)); right: calc(10px + var(--ncq-right)); z-index: 2100;
  width: 44px; height: 44px; border: 0; border-radius: 50%; padding: 0; cursor: pointer; color: #c9d3d6;
  background: radial-gradient(circle at 35% 30%, #2b3d43, #0f1d22 75%); box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08); }
#btn-settings svg, #btn-stats svg { width: 28px; height: 28px; display: block; margin: auto; transition: transform .4s ease; }
#btn-settings:hover svg { transform: rotate(45deg); }
#btn-settings:active, #btn-stats:active { transform: scale(.94); }
@media (max-height: 500px) { #btn-settings, #btn-stats { width: 36px; height: 36px; top: 4px; } #btn-settings svg { width: 22px; height: 22px; } #btn-stats { right: calc(54px + var(--ncq-right)); } #btn-stats svg { width: 19px; height: 19px; } }

/* ---------- 설정 화면 ---------- */
.settings { position: fixed; inset: 0; z-index: 5000; display: flex; flex-direction: column;
  background: #0f4a52 url("../Resource/background/table_felt.jpg") center / cover; animation: set-in .22s ease-out; }
.settings.out { animation: set-out .22s ease-in forwards; }
@keyframes set-in { from { opacity: 0; transform: translateY(24px); } }
@keyframes set-out { to { opacity: 0; transform: translateY(24px); } }
.set-head { position: relative; flex: 0 0 auto; height: calc(64px + var(--ncq-top)); padding-top: var(--ncq-top);
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, rgba(255,255,255,.015) 0 2px, transparent 2px 4px), linear-gradient(#222b31, #161d22);
  border-bottom: 2px dashed rgba(120, 140, 150, .35); box-shadow: 0 3px 8px rgba(0,0,0,.45); }
.set-head h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: 1px;
  background: linear-gradient(#ffe7a1, #e9b84b); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 1px rgba(0,0,0,.6)); }
.set-back { position: absolute; left: calc(12px + var(--ncq-left)); top: calc(50% + var(--ncq-top) / 2); translate: 0 -50%;
  width: 46px; height: 46px; border: 0; border-radius: 50%; padding: 0; cursor: pointer; color: #7ed321;
  background: radial-gradient(circle at 35% 30%, #3a464c, #11191d 75%); box-shadow: 0 2px 6px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.1); }
.set-back svg { width: 26px; height: 26px; display: block; margin: auto; }
.set-body { flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: var(--ncq-bottom); touch-action: pan-y; }
.set-section { padding: 18px 28px 14px; font-size: 17px; color: rgba(190, 230, 225, .55); background: rgba(0, 20, 24, .32);
  border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(0,0,0,.25); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%;
  min-height: 72px; padding: 10px 28px; border: 0; border-bottom: 1px solid rgba(0, 0, 0, .22);
  box-shadow: 0 1px 0 rgba(255,255,255,.05); background: none; color: #eaf6e6; font: inherit; text-align: left; }
.set-label { font-size: 21px; font-weight: 600; display: flex; flex-direction: column; gap: 2px; }
.set-label small { font-size: 13px; font-weight: 400; opacity: .55; }
.set-link { cursor: pointer; }
.set-chev { width: 26px; height: 26px; color: #dfe8e6; } .set-chev svg { width: 100%; height: 100%; }

/* 토글 스위치 (켜짐: 초록) */
.set-switch { position: relative; flex: 0 0 auto; width: 74px; height: 38px; border: 0; border-radius: 19px; padding: 0; cursor: pointer;
  background: rgba(0, 30, 30, .55); box-shadow: inset 0 2px 5px rgba(0,0,0,.5); transition: background .2s; }
.set-switch[aria-checked="true"] { background: linear-gradient(#22d63a, #12a82a); }
.set-switch i { position: absolute; top: 3px; left: 3px; width: 44px; height: 32px; border-radius: 16px;
  background: radial-gradient(circle at 50% 45%, #f4f4f2 0 30%, #dcdcd8 60%, #c9c9c4); box-shadow: 0 2px 4px rgba(0,0,0,.45);
  transition: translate .2s cubic-bezier(.3,.7,.3,1); }
.set-switch[aria-checked="true"] i { translate: 24px 0; }

/* 드로우 1 / 드로우 3 */
.set-seg { display: flex; flex: 0 0 auto; padding: 3px; border-radius: 10px; background: rgba(0, 30, 30, .55); box-shadow: inset 0 2px 5px rgba(0,0,0,.5); }
.set-seg button { min-width: 96px; padding: 9px 14px; border: 0; border-radius: 8px; cursor: pointer; background: none;
  color: rgba(230, 240, 235, .45); font: 700 18px inherit; font-family: inherit; }
.set-seg button[aria-checked="true"] { background: linear-gradient(#1aa94a, #11873a); color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.35); }

/* 플레이 방법 */
.set-howto { padding: 8px 28px 28px; color: #e6f2ee; line-height: 1.65; }
.set-howto h2 { margin: 22px 0 6px; font-size: 19px; color: #f2d27a; }
.set-howto p { margin: 0 0 8px; font-size: 16px; opacity: .92; }
.set-howto b { color: #fff; }
@media (max-width: 480px) {
  .set-row { padding: 10px 18px; min-height: 62px; } .set-section { padding: 14px 18px 10px; }
  .set-label { font-size: 18px; } .set-seg button { min-width: 78px; font-size: 15px; } .set-howto { padding: 6px 18px 24px; }
}

/* 통계 */
.stat-row { min-height: 60px; }
.stat-val { font-size: 22px; font-weight: 800; color: #ffe08a; font-variant-numeric: tabular-nums; }
.stat-val small { font-size: 14px; font-weight: 500; color: rgba(255,255,255,.55); }
/* 결과 화면 연승 */
.r-streak { position: relative; margin-top: 16px; padding: 12px 18px; border-radius: 16px; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: linear-gradient(120deg, rgba(120, 60, 0, .55), rgba(255, 170, 40, .28) 50%, rgba(120, 60, 0, .55));
  border: 2px solid #f2c35a; box-shadow: 0 0 18px rgba(255, 190, 60, .45), inset 0 0 18px rgba(255, 200, 80, .25); }
.r-streak::after { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; transform: skewX(-20deg);
  background: linear-gradient(90deg, transparent, rgba(255, 245, 200, .35), transparent); animation: rs-shine 2.6s ease-in-out 2.6s infinite; pointer-events: none; }
@keyframes rs-shine { 0% { left: -60%; } 45%, 100% { left: 130%; } }
.rs-main { display: flex; align-items: center; gap: 8px; }
.rs-cup { width: 46px; height: 46px; filter: drop-shadow(0 0 8px rgba(255, 210, 90, .9)); animation: rs-cup 1.6s ease-in-out 2.4s infinite; }
@keyframes rs-cup { 50% { transform: rotate(-8deg) scale(1.08); } }
.rs-num { font-size: 46px; line-height: 1; font-weight: 900; color: #ffe27a; -webkit-text-stroke: 2px #9a4b06; paint-order: stroke fill;
  text-shadow: 0 3px 0 #6b3204, 0 0 16px rgba(255, 190, 40, .9); font-variant-numeric: tabular-nums; }
.rs-unit { font-size: 22px; font-weight: 900; color: #fff3c4; text-shadow: 0 2px 4px rgba(0,0,0,.5); }
.rs-side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 0; }
.rs-cups { display: flex; gap: 2px; }
.rs-cups i { width: 16px; height: 16px; background: url("../Resource/ui/icon_trophy.png") center / contain no-repeat;
  animation: rs-dot .35s cubic-bezier(.2,1.6,.4,1) calc(2s + var(--k) * .08s) both; }
.rs-cups em { color: #ffd257; font-style: normal; font-weight: 800; }
@keyframes rs-dot { from { transform: scale(0); opacity: 0; } }
.rs-best { font-size: 15px; color: #f1e3bd; }
.rs-best b { color: #ffd257; font-size: 18px; }
.rs-new { display: none; padding: 3px 10px; border-radius: 10px; background: linear-gradient(#ff6a4a, #d8261c); color: #fff; font-weight: 900; font-size: 14px;
  box-shadow: 0 0 10px rgba(255, 90, 60, .8); animation: rs-new .9s ease-in-out 2.4s infinite alternate; }
@keyframes rs-new { to { transform: scale(1.1); } }
.r-streak.best .rs-new { display: inline-block; }
.r-streak.best .rs-old { display: none; }
.r-streak.hot { animation: streak-pop .7s cubic-bezier(.2,1.6,.4,1) 1.8s both; }
@keyframes streak-pop { from { transform: scale(.4); opacity: 0; } 60% { transform: scale(1.08); opacity: 1; } }
@media (max-width: 480px) { .rs-num { font-size: 38px; } .rs-cup { width: 38px; height: 38px; } .rs-unit { font-size: 18px; } .r-streak { padding: 10px 14px; } }
/* 좁은 화면: 상단 정보 줄을 왼쪽으로 붙여 통계·설정 버튼과 겹치지 않게 */
@media (max-width: 480px) { #hud { margin-left: 10px; margin-right: auto; } }

/* ---------- 상단 줄: [빈칸] [무브·시간·점수] [연승·설정] — 화면 폭이 줄면 정보 줄이 줄어들어 겹치지 않아요 ---------- */
#topbar { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px;
  padding: 6px 10px 0; }
#topbar #hud { margin: 0; min-width: 0; height: clamp(38px, 5.2vw, 52px); padding: 0 clamp(12px, 3vw, 30px); gap: clamp(12px, 3.2vw, 32px); border-radius: 12px; }
#topbar .stat { gap: clamp(5px, 1.2vw, 10px); }
#topbar .stat .label { font-size: clamp(13px, 2.2vw, 17px); }
#topbar .stat .value { font-size: clamp(18px, 3.4vw, 28px); min-width: 0; }
.tb-right { display: flex; justify-content: flex-end; align-items: center; gap: 8px; min-width: 0; }
#topbar #btn-settings { position: static; flex: 0 0 auto; }
#streak-chip { display: flex; align-items: center; border: 0; border-radius: 19px; cursor: pointer; white-space: nowrap;
  background: linear-gradient(#1c2c31, #0f1d22); box-shadow: 0 2px 6px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.08), inset 0 0 0 1px rgba(232, 196, 110, .35); }
#streak-chip:active { transform: scale(.95); }
#topbar #streak-chip { position: static; flex: 0 0 auto; padding: 0 8px 0 12px; gap: 6px; height: 38px; }
.sc-label { font-size: 14px; font-weight: 800; color: #f3e6c4; }
.sc-cups { display: flex; flex-direction: row-reverse; align-items: center; }   /* 첫 트로피가 오른쪽, 새 트로피가 왼쪽에 쌓여요 */
.sc-cups img { width: 30px; height: 30px; margin-left: -13px; position: relative; filter: drop-shadow(1px 1px 2px rgba(0,0,0,.55)); }
.sc-cups img:last-of-type { margin-left: 0; }
.sc-more { margin-left: 2px; order: -1; font-size: 15px; color: #ffd257; font-variant-numeric: tabular-nums; }
#streak-chip.zero .sc-cups img { filter: grayscale(1) brightness(.75) opacity(.55); }
/* 좁은 화면: 정보 줄은 왼쪽 정렬, 오른쪽 그룹은 그대로 */
@media (max-width: 760px) {
  #topbar { grid-template-columns: minmax(0, auto) 1fr; }
  #topbar .tb-side:first-child { display: none; }
  #topbar #hud { justify-self: start; }
  .sc-label { display: none; }
  #topbar #streak-chip { padding: 0 8px; height: 34px; }
  .sc-cups img { width: 24px; height: 24px; margin-left: -11px; }
}
@media (max-width: 380px) { #topbar .stat .label { display: none; } }
@media (max-height: 500px) { #topbar { padding-top: 4px; } #topbar #hud { height: 34px; } #topbar #streak-chip { height: 32px; } }
@media (max-width: 900px) { .sc-label { display: none; } #topbar #streak-chip { padding: 0 8px; } }
/* 세로·좁은 화면: 진행 정보 줄이 남는 폭을 다 쓰고 글자를 크게 */
@media (max-width: 760px) {
  #topbar { grid-template-columns: minmax(0, 1fr) auto; }
  #topbar #hud { justify-self: stretch; justify-content: space-evenly; height: clamp(42px, 8vw, 54px); padding: 0 clamp(8px, 2vw, 18px); gap: 8px; }
  #topbar .stat .label { font-size: clamp(14px, 3.4vw, 17px); }
  #topbar .stat .value { font-size: clamp(22px, 5.8vw, 28px); }
}
.set-row[hidden] { display: none; }
/* 앱 버전: 설정 목록 맨 아래 작고 흐리게 */
.set-version { padding: 18px 28px 22px; text-align: right; font-size: 12px; color: rgba(220, 240, 236, .35); font-variant-numeric: tabular-nums; }

/* 결과 화면이 작은 세로 화면(360×640)에서도 '새 게임' 버튼까지 한 화면에 들어오게: 배지는 화면 높이에 맞춰 줄이고 줄 간격을 좁혀요 */
.r-sub { flex-wrap: wrap; gap: 4px 12px; }
@media (max-aspect-ratio: 1/1) {
  .victory { width: min(88vw, 460px, 44dvh); }
}
@media (max-aspect-ratio: 1/1) and (max-height: 760px) {
  .result-inner { gap: 4px; }
  .r-row { padding: 7px 4px; } .r-label { font-size: 18px; } .r-val { font-size: 24px; }
  .r-sub { padding-top: 8px; font-size: 13px; }
  .r-streak { margin-top: 10px; padding: 8px 14px; }
  .rs-num { font-size: 34px; } .rs-cup { width: 32px; height: 32px; } .rs-unit { font-size: 17px; }
  .r-btn { margin-top: 14px; padding: 11px 0; font-size: 20px; }
}

/* ---------- 연승: 다음 보상 게이지 + 최고 기록 도장 ---------- */
.r-streak { flex-wrap: wrap; }
.rs-goal { flex: 1 0 100%; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
.rs-pips { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); gap: 5px; }
.rs-pips i { height: 12px; border-radius: 6px; background: rgba(0, 0, 0, .35); box-shadow: inset 0 1px 2px rgba(0,0,0,.5); }
.rs-pips i.on { background: linear-gradient(#ffe68a, #f4a92a); box-shadow: 0 0 8px rgba(255, 200, 60, .8), inset 0 1px 0 rgba(255,255,255,.6); }
.rs-pips i.pop { animation: rs-pip .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes rs-pip { from { transform: scaleY(.2) scaleX(.6); filter: brightness(2); } }
.rs-gift { position: relative; display: flex; align-items: center; gap: 2px; padding: 2px 8px 2px 4px; border-radius: 12px;
  background: rgba(0, 0, 0, .3); filter: grayscale(.6) brightness(.85); transition: filter .3s; }
.rs-gift img { width: 26px; height: 26px; }
.rs-gift b { font-size: 15px; color: #ffe27a; }
.rs-goal-text { grid-column: 1 / -1; font-size: 13px; color: #f6e6bb; }
.rs-goal-text b { color: #ffd257; }
.rs-goal.full .rs-gift { filter: none; animation: rs-gift .7s cubic-bezier(.2, 1.8, .4, 1), rs-gift-glow 1.2s ease-in-out .7s infinite alternate; }
@keyframes rs-gift { from { transform: scale(.5) rotate(-20deg); } 60% { transform: scale(1.35) rotate(8deg); } }
@keyframes rs-gift-glow { to { box-shadow: 0 0 16px 4px rgba(255, 210, 80, .85); } }
.rs-goal.full .rs-goal-text { animation: rs-new .9s ease-in-out infinite alternate; transform-origin: left center; }

.rs-stamp { position: absolute; right: 12px; top: 6px; z-index: 2; pointer-events: none; opacity: 0; }
.rs-stamp span { display: inline-block; padding: 4px 12px; border: 3px solid #ff5a3c; border-radius: 10px; transform: rotate(-12deg);
  font: 900 20px/1.1 Georgia, "Apple SD Gothic Neo", sans-serif; letter-spacing: 1px; color: #ff6a4a; background: rgba(40, 0, 0, .35);
  text-shadow: 0 0 8px rgba(255, 80, 40, .8); box-shadow: 0 0 14px rgba(255, 80, 40, .6), inset 0 0 8px rgba(255, 80, 40, .5); white-space: nowrap; }
.r-streak.stamp .rs-stamp { animation: rs-stamp .45s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes rs-stamp { from { opacity: 0; transform: scale(3); } to { opacity: 1; transform: none; } }
.r-streak.stamp { animation: rs-shake .35s ease-out .1s; }
@keyframes rs-shake { 25% { transform: translate(-4px, 3px); } 50% { transform: translate(4px, -2px); } 75% { transform: translate(-2px, 1px); } }
/* 도장이 찍히면 '최고 기록!' 작은 배지 대신 도장이 말해 줘요 */
.r-streak.stamp .rs-new { display: none; }
.rs-stamp-fx { position: absolute; right: 70px; top: 22px; pointer-events: none; z-index: 3; }
.rs-stamp-fx i { position: absolute; width: 7px; height: 7px; border-radius: 2px; background: #ffd257; box-shadow: 0 0 6px #ffb020;
  animation: rs-bit .8s ease-out forwards; }
@keyframes rs-bit { to { transform: rotate(var(--a)) translateX(var(--d)) rotate(180deg); opacity: 0; } }
.rs-stamp { right: 6px; top: 4px; }
.rs-stamp span { font-size: 15px; padding: 3px 9px; border-width: 2px; }
.rs-stamp-fx { right: 50px; top: 16px; }
/* 가로로 낮은 화면: 연승 칸과 버튼까지 한 화면에 */
@media (min-aspect-ratio: 1/1) and (max-height: 500px) {
  .result-side { justify-content: center; }
  .r-row { padding: 4px 4px; } .r-label { font-size: 17px; } .r-val { font-size: 22px; }
  .r-sub { padding-top: 4px; font-size: 12px; }
  .r-streak { margin-top: 6px; padding: 6px 12px; gap: 4px 10px; }
  .rs-num { font-size: 30px; } .rs-cup { width: 28px; height: 28px; } .rs-unit { font-size: 15px; }
  .rs-pips i { height: 9px; } .rs-gift img { width: 20px; height: 20px; } .rs-goal-text { font-size: 12px; }
  .r-btn { margin-top: 10px; padding: 8px 0; font-size: 18px; }
}
.rs-stamp { top: auto; bottom: 4px; right: 8px; }
.rs-stamp-fx { top: auto; bottom: 18px; right: 60px; }
.result-inner { transform-origin: center center; }
/* 도장은 오른쪽 위(작은 트로피 줄·최고 기록 자리)에 찍고, 그 자리 내용은 도장 밑으로 숨겨요 */
.rs-stamp { top: 8px; bottom: auto; right: 8px; }
.rs-stamp span { font-size: 14px; transform: rotate(-8deg); }
.rs-stamp-fx { top: 18px; bottom: auto; right: 50px; }
.r-streak.stamp .rs-side { visibility: hidden; transition: visibility 0s .1s; }
@media (max-width: 400px) { .rs-stamp span { font-size: 12px; padding: 2px 7px; } }
