/* 무엇을 도와드릴까요: 중간고사 전날 밤의 몰아치기(js/rush.js), 리포트의 순위, 좋아요와 만족도의 움직임.
   카드 왼쪽 색 줄과 그라데이션을 쓰지 않습니다. 움직임 줄이기 설정에서는 game.css의 마지막 규칙이 움직임을 거의 없앱니다. */

/* ── 좋아요: 숫자가 튀어 오르고, 이어지면 몇 번째인지 붙습니다 ── */
.fb { position: relative; }
.fb .pop-n { position: absolute; top: -6px; font-weight: 900; font-size: 15px; color: var(--pt); pointer-events: none; animation: popn 1.1s var(--ease) forwards; }
@keyframes popn { 0% { opacity: 0; translate: 0 6px; scale: .7; } 18% { opacity: 1; translate: 0 -8px; scale: 1.25; } 100% { opacity: 0; translate: 0 -30px; scale: 1; } }
.fb .combo { font-weight: 700; color: #fff; background: var(--pt); padding: 3px 10px; border-radius: 99px; animation: comboIn .5s var(--ease); }
.fb .combo b { font-family: var(--pix); font-weight: 700; margin-left: 2px; }
.fb .combo.hot { box-shadow: 0 0 0 3px var(--pt-soft); }
@keyframes comboIn { 0% { scale: .5; opacity: 0; } 55% { scale: 1.18; opacity: 1; } 100% { scale: 1; } }

/* ── 내 안의 만족도: 오르면 밝게 튀고, 내리면 가라앉습니다. 휴대폰에서는 '내 안' 단추에도 숫자가 붙습니다 ── */
.in-nums div { position: relative; }
#in-avg.rise, #bi-avg.rise { animation: avgUp .9s var(--ease); }
#in-avg.fall, #bi-avg.fall { animation: avgDn .9s var(--ease); }
@keyframes avgUp { 0% { scale: 1; } 30% { scale: 1.32; color: #ffd2bd; } 100% { scale: 1; } }
@keyframes avgDn { 0% { translate: 0 0; } 25% { translate: 0 5px; color: #8b90a0; } 50% { translate: 0 2px; color: #8b90a0; } 100% { translate: 0 0; } }
.in-nums .d { position: absolute; right: 6px; top: 4px; font-style: normal; font-size: 11.5px; font-weight: 700; font-variant-numeric: tabular-nums; animation: dIn 1.6s var(--ease) forwards; }
.in-nums .d.rise { color: #ffb597; } .in-nums .d.fall { color: #9aa0ad; }
@keyframes dIn { 0% { opacity: 0; translate: 0 4px; } 15% { opacity: 1; translate: 0 0; } 75% { opacity: 1; } 100% { opacity: 0; translate: 0 -6px; } }
#bi-avg { display: inline-block; margin-left: 6px; font-style: normal; color: #ff8a5c; font-variant-numeric: tabular-nums; }

/* ── 몰아치기: 창이 요청 대기열이 됩니다 ── */
#win.rushing #chat, #win.rushing #composer { display: none; }
#rush { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
#rush.shake { animation: shake .36s; }
@keyframes shake { 20% { translate: -4px 0; } 40% { translate: 4px 1px; } 60% { translate: -3px -1px; } 80% { translate: 2px 0; } }
.rs-hud { display: grid; grid-template-columns: 1.25fr 1fr 1fr 1fr; gap: 6px; padding: 10px 12px; background: #17181c; color: #eceef2; }
.rs-hud > div { text-align: center; line-height: 1.2; }
.rs-hud b { display: block; font-family: var(--pix); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; color: #fff; }
.rs-hud b.pt { color: #ff8a5c; }
.rs-hud small { font-size: 11.5px; color: #9499a6; }
.rs-time { display: grid; grid-template-columns: auto auto; justify-content: center; align-items: baseline; gap: 0 3px; }
.rs-time > i { grid-column: 1 / -1; display: block; height: 5px; margin-top: 5px; border-radius: 3px; background: #2c2f37; overflow: hidden; }
.rs-time > i > i { display: block; height: 100%; width: 100%; background: #eceef2; }
.rs-combo.hot b { color: var(--pt); }
.rs-hud b.bump { animation: bump .32s var(--ease); }
@keyframes bump { 40% { scale: 1.35; } }
.rs-tip { padding: 8px 14px; font-size: 13px; line-height: 1.5; color: var(--dim); border-bottom: 1px solid var(--line); transition: opacity .6s, max-height .6s, padding .6s; max-height: 5em; }
.rs-tip b { color: var(--ink); }
.rs-tip.fade { opacity: 0; max-height: 0; padding-top: 0; padding-bottom: 0; border: 0; }
#rs-list { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; gap: 8px; padding: 10px 12px 12px; }
.rs-more { position: absolute; left: 0; right: 0; bottom: 0; z-index: 3; text-align: center; font-size: 12.5px; font-weight: 700; color: #fff; background: rgba(23, 24, 28, .88); padding: 7px; }
.rs-busy { position: absolute; left: 50%; bottom: 46px; z-index: 4; translate: -50% 0; white-space: nowrap; font-size: 12.5px; font-weight: 700; color: #fff; background: var(--down); padding: 5px 12px; border-radius: 99px; animation: rise .3s var(--ease); }

.rc { position: relative; flex: none; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; box-shadow: 0 2px 6px rgba(30, 32, 38, .05); overflow: hidden; animation: rcIn .32s var(--ease); }
@keyframes rcIn { from { opacity: 0; translate: 0 14px; scale: .97; } }
.rc header { display: flex; align-items: center; gap: 8px; min-width: 0; }
.rc .pf { width: 26px; height: 26px; font-size: 12px; }
.rc header b { font-size: 14px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-age { margin-left: auto; flex: none; font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.rc-poke { flex: none; font-style: normal; font-size: 12px; font-weight: 800; color: #fff; background: var(--pt); border-radius: 99px; padding: 1px 9px; }
.rc-poke:empty { display: none; }
.rc-poke.go { animation: poke .5s var(--ease); }
@keyframes poke { 0% { scale: .4; } 50% { scale: 1.25; rotate: -6deg; } 100% { scale: 1; } }
.rc-t { margin: 6px 0 9px; font-size: 15.5px; line-height: 1.45; font-weight: 600; }
.rc-act { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rc-act button { display: grid; align-content: center; justify-items: center; min-height: 52px; padding: 6px 8px; border-radius: 12px; text-align: center; line-height: 1.25; transition: scale .1s, opacity .2s; }
.rc-act button b { font-size: 15.5px; font-weight: 800; }
.rc-act button span { font-size: 11.5px; opacity: .8; }
.rc-do { background: var(--pt); color: #fff; }
.rc-help { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line); }
.rc-act button:active { scale: .95; }
.rc-act button:disabled { opacity: .38; cursor: default; }
.rc-wait { position: absolute; left: 0; bottom: 0; height: 3px; width: calc(var(--w, 1) * 100%); background: #c9c4b6; transition: width .1s linear; }
.rc.seou { border-color: #e9c2b0; }
.rc.seou header b { color: var(--pt); }
.rc.did { animation: rcDid .38s var(--ease) forwards; pointer-events: none; }
@keyframes rcDid { 0% { background: var(--pt-soft); } 100% { opacity: 0; translate: 70px 0; } }
.rc.lost { animation: rcLost .7s var(--ease) forwards; pointer-events: none; }
@keyframes rcLost { 0% { opacity: 1; } 60% { opacity: .55; filter: grayscale(1); } 100% { opacity: 0; } }
.rc.out { animation: rcOut .3s var(--ease) forwards; }
@keyframes rcOut { to { opacity: 0; translate: 0 -10px; } }
.rc.helping, .rc.answered { border-color: var(--down); }
.rc-me { grid-column: 1 / -1; font-size: 14px; line-height: 1.45; color: var(--ink); background: var(--bub); border-radius: 12px; padding: 8px 11px; }
.rc.did .rc-me { background: var(--pt); color: #fff; font-weight: 700; }
.rc-u { grid-column: 1 / -1; justify-self: end; font-size: 14px; background: var(--bub); border-radius: 12px; padding: 6px 11px; animation: rise .25s var(--ease); }
.rc-prog { grid-column: 1 / -1; display: block; height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.rc-prog b { display: block; height: 100%; width: 0; background: var(--down); }
.rc-lost { grid-column: 1 / -1; text-align: center; font-size: 13.5px; font-weight: 700; color: var(--dim); padding: 6px; }

.rs-fx { position: absolute; inset: 0; z-index: 6; pointer-events: none; overflow: hidden; }
.rs-pop { position: absolute; translate: -50% 0; display: inline-flex; align-items: center; gap: 2px; font-family: var(--pix); font-weight: 700; font-size: 22px; color: var(--pt); animation: rsPop 1s var(--ease) forwards; }
.rs-pop svg { width: 26px; height: 26px; fill: var(--pt-soft); stroke: var(--pt); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.rs-pop.dn, .rs-pop.dn svg { color: var(--down); stroke: var(--down); fill: #e4e6eb; }
@keyframes rsPop { 0% { opacity: 0; scale: .6; translate: -50% 10px; } 20% { opacity: 1; scale: 1.25; translate: -50% -10px; } 100% { opacity: 0; scale: 1; translate: -50% -56px; } }
.rs-combo-big { position: absolute; left: 50%; top: 38%; translate: -50% -50%; font-family: var(--pix); font-weight: 700; font-size: 34px; color: var(--pt); text-shadow: 2px 2px 0 #fff, -2px -2px 0 #fff, 2px -2px 0 #fff, -2px 2px 0 #fff; white-space: nowrap; animation: comboBig .9s var(--ease) forwards; }
.rs-combo-big.big { font-size: 52px; }
@keyframes comboBig { 0% { opacity: 0; scale: .5; } 25% { opacity: 1; scale: 1.15; } 70% { opacity: 1; scale: 1; } 100% { opacity: 0; scale: 1.05; } }
.rs-go { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; font-family: var(--pix); font-weight: 700; font-size: 84px; color: var(--pt); background: rgba(246, 243, 236, .82); }
.rs-go.beat { animation: goBeat .6s var(--ease); }
@keyframes goBeat { 0% { scale: 1.6; opacity: 0; } 40% { scale: 1; opacity: 1; } }

/* 결과판 */
.rs-end { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; align-content: safe center; overflow-y: auto; padding: 22px 18px; background: #111216; color: #d9dbe0; animation: fadein .4s; }
.rs-box { width: min(400px, 100%); }
.rs-box > small { display: block; font-family: var(--mono); font-size: 13px; color: var(--out-dim); }
.rs-box h3 { font-size: 22px; font-weight: 800; color: #fff; margin: 4px 0 14px; }
.rs-big { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rs-big div { background: #1f2127; border-radius: 12px; padding: 12px 8px 10px; text-align: center; font-size: 12.5px; color: #9499a6; }
.rs-big b { display: block; font-family: var(--pix); font-size: 38px; font-weight: 700; line-height: 1.2; color: #fff; font-variant-numeric: tabular-nums; }
.rs-big b.pt { color: #ff8a5c; }
.rs-big .c b { color: #ffb597; }
.rs-big b.land { animation: land2 .45s var(--ease); }
@keyframes land2 { 40% { scale: 1.3; } }
.rs-sub { margin-top: 10px; font-size: 13.5px; color: #9499a6; }
.rs-sub b { color: #d9dbe0; font-variant-numeric: tabular-nums; }
.rs-medal { display: inline-block; margin-top: 10px; font-family: var(--pix); font-size: 14px; font-weight: 700; color: #fff; background: var(--pt); padding: 4px 12px; animation: comboIn .5s var(--ease); }
.rs-in { margin-top: 10px; font-size: 13.5px; color: #9499a6; }
.rs-line { margin-top: 18px; font-size: 14.5px; line-height: 1.7; color: #c9ccd4; animation: fadein 1.2s; }
.rs-q { margin-top: 16px; font-size: 15.5px; line-height: 1.7; color: #fff; animation: fadein 2s; }
#rs-ok { display: block; width: 100%; margin-top: 22px; text-align: center; font-weight: 800; font-size: 16px; background: #eceef2; color: #111216; padding: 12px; border-radius: 12px; animation: rise .4s var(--ease); }

/* ── 리포트의 순위: 다른 창의 똑똑과 견줍니다 ── */
#update { overflow-y: auto; align-content: safe center; }
.up-l.rk { margin: 12px 0; }
.rank { background: #1b1d23; border-radius: 12px; padding: 11px 12px 12px; }
.rank header { font-family: var(--mono); font-size: 12px; color: var(--out-dim); margin-bottom: 6px; }
.rank ol { display: grid; gap: 2px; }
.rank li { display: grid; grid-template-columns: 2.6em minmax(0, 1fr) auto 3em; align-items: baseline; gap: 6px; font-size: 14px; line-height: 1.7; padding: 0 6px; border-radius: 8px; }
.rank li span { font-family: var(--pix); color: #9499a6; text-align: right; font-variant-numeric: tabular-nums; }
.rank li b { color: #eceef2; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank li small { font-size: 11.5px; color: #6f7482; white-space: nowrap; }
.rank li em { font-style: normal; text-align: right; font-variant-numeric: tabular-nums; color: #d9dbe0; }
.rank li:first-child span, .rank li:first-child em { color: #ffb597; }
.rank li.gap { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 3px 0; }
.rank li.gap i { width: 3px; height: 3px; background: #4a4e5a; }
.rank li.me { background: rgba(242, 98, 46, .16); }
.rank li.me span, .rank li.me b, .rank li.me em { color: #fff; font-weight: 700; }
.rk-me { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; margin-top: 8px; font-size: 13.5px; color: #9499a6; }
.rk-me b { font-family: var(--pix); font-size: 22px; font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; }
.rk-me .mv { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; color: #9499a6; }
.rk-me .mv::before { content: ''; display: inline-block; margin-right: 4px; border: 5px solid transparent; vertical-align: 1px; }
.rk-me .mv.up { color: #8fd3a8; } .rk-me .mv.up::before { border-bottom: 7px solid #8fd3a8; border-top: 0; }
.rk-me .mv.dn { color: #ff8a5c; } .rk-me .mv.dn::before { border-top: 7px solid #ff8a5c; border-bottom: 0; }
.rk-me .mv:not(.up):not(.dn)::before { display: none; }
.rk-badge { display: inline-block; margin-top: 9px; font-family: var(--pix); font-size: 14px; font-weight: 700; color: #fff; background: var(--pt); padding: 4px 12px; animation: comboIn .5s var(--ease); }
.rk-tie { margin-top: 6px; font-size: 12px; color: #6f7482; }

/* 끝난 뒤에 되돌려 주는 두 줄 */
.af-told { margin-top: 14px; display: grid; gap: 8px; }
.af-told p { font-size: 14.5px; line-height: 1.75; }

@media (max-height: 640px) {
  .rs-hud { padding: 7px 10px; } .rs-hud b { font-size: 19px; }
  .rc { padding: 8px 10px 10px; } .rc-t { margin: 4px 0 7px; font-size: 15px; }
  .rc-act button { min-height: 46px; }
  .rs-big b { font-size: 30px; }
}

/* 몰아치기 다음 날(rushb): 목록에 떠오르는 지난밤의 학생들, 흐린 사진, 지워진 메시지 */
.room.pop { opacity: 1; background: var(--out-2); animation: rise .45s var(--ease); }
.room.pop .rm-main > span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
#scr-game:not(.home) .room.pop { opacity: .62; background: none; animation: none; }
.rm-main > span.del { font-style: italic; color: var(--out-dim); }
.rm-ph { flex: none; position: relative; width: 30px; height: 38px; border-radius: 5px; overflow: hidden; background: #ddd7c9; }
.rm-ph i { position: absolute; inset: 5px 4px; background: repeating-linear-gradient(#77715f 0 2px, transparent 2px 6px); filter: blur(1.8px); opacity: .75; }
/* 7월 6일, 사진이 오지 않는 판의 하루살이: 다른 AI로 간 줄(몰아치기의 '다른 AI로 감'과 같은 모양), 흐린 시험지 사진 */
.rm-main > span.gone { font-weight: 700; color: var(--out-dim); }
img.fuzzy { filter: blur(3.5px) saturate(.85); clip-path: inset(0 round 14px); }
