/* ================= Round 1: Client en colère ================= */
.r1-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(260px, 340px) 1fr; gap: 18px; margin-top: 8px; }
.r1-radio { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 20px; position: relative; overflow: hidden; }
.r1-grille { position: absolute; left: 22px; right: 22px; bottom: 20px; height: 34px; border-radius: 10px; background: radial-gradient(circle, rgba(0, 0, 0, .55) 2px, transparent 2.5px) 0 0 / 9px 9px, rgba(0, 0, 0, .15); }
.r1-ham { position: relative; transition: transform .3s var(--ease-pop); }
.r1-ham.pop { animation: r1pop 1s var(--ease-pop); }
@keyframes r1pop { 0% { transform: scale(1) } 35% { transform: scale(1.55); filter: hue-rotate(-20deg) saturate(1.6) } 45% { transform: scale(.7) } 70% { transform: scale(1.08) } 100% { transform: scale(1) } }
.r1-ham.calm { animation: r1calm .9s ease; }
@keyframes r1calm { 40% { transform: scale(.9, 1.05) } }
.r1-name { text-align: center; } .r1-name b { font-family: Fredoka; font-size: 22px; display: block; } .r1-name small { color: var(--muted); }
.r1-meter-wrap { position: absolute; right: 20px; top: 20px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.r1-meter { position: relative; width: 30px; height: 150px; border-radius: 18px; background: rgba(0, 0, 0, .3); overflow: hidden; box-shadow: inset 0 2px 6px rgba(0, 0, 0, .5); }
.r1-fill { position: absolute; left: 0; right: 0; bottom: 0; height: 0; background: linear-gradient(0deg, #FFC54A, #FF5A6E 60%, #C9364B); transition: height .25s; }
.r1-emo { font-size: 34px; transition: transform .2s; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
.r1-meter.hot { animation: shk .42s infinite; }
.r1-heart { position: absolute; bottom: 40%; font-size: 28px; animation: heartUp 1.8s ease-out forwards; pointer-events: none; }
@keyframes heartUp { to { transform: translateY(-160px) scale(1.4); opacity: 0 } }
.r1-fez { position: absolute; top: 18%; left: 45%; animation: fezFly 2.2s cubic-bezier(.2, .7, .3, 1) forwards; pointer-events: none; z-index: 5; }
@keyframes fezFly { to { transform: translate(140px, -420px) rotate(900deg); opacity: .2 } }
.r1-chat { display: flex; flex-direction: column; padding: 18px 20px; min-height: 0; overflow: hidden; }
.r1-chat-head { font-family: Fredoka; font-size: 17px; color: var(--muted); display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; border-bottom: 2px dashed rgba(255, 244, 226, .15); }
.r1-led { width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px var(--mint); animation: blinkDot 1.2s steps(2) infinite; }
.r1-msgs { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; padding: 14px 6px; scrollbar-width: thin; }
.r1-msg { display: flex; animation: popIn .35s var(--ease-pop) both; }
.r1-msg.him { justify-content: flex-start; padding-left: 12px; } .r1-msg.me { justify-content: flex-end; }
.r1-msg.me .bubble { background: #C9F5E3; } .r1-msg.me .bubble::after { left: auto; right: 24px; border-top-color: #C9F5E3; }
.r1-msg .bubble { max-width: 78%; font-size: 20px; }
.r1-msg.typing .bubble { width: 70px; text-align: center; letter-spacing: 3px; animation: dotb 1s infinite; }
.r1-answers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-top: 10px; }
.r1-end { grid-column: 1 / -1; text-align: center; font-family: Fredoka; font-size: 22px; color: var(--gold); }
.r1-static { position: absolute; inset: 0; border-radius: inherit; background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .08) 0 2px, transparent 2px 4px), var(--noise-l); mix-blend-mode: screen; animation: staticA .12s steps(3) infinite; pointer-events: none; }
@keyframes staticA { 50% { background-position: 0 3px, 40px 20px } }
.r1-values { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.r1-slot { display: flex; align-items: center; gap: 10px; padding: 10px 12px; min-height: 64px; border-radius: 16px; border: 2px dashed rgba(255, 244, 226, .25); color: var(--muted); font-size: 14px; line-height: 1.25; }
.r1-slot-n { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-family: Fredoka; font-weight: 700; background: rgba(255, 255, 255, .08); }
.r1-slot.ok { border-style: solid; border-color: var(--mint); background: rgba(67, 224, 168, .12); color: var(--thread); animation: popIn .4s var(--ease-pop); }
.r1-slot.ok .r1-slot-n { background: var(--mint); color: #06301F; }
.r1-slot.ko { border-style: solid; border-color: var(--coral); background: rgba(255, 90, 110, .12); color: var(--thread); }
.r1-slot.ko .r1-slot-n { background: var(--coral); color: #fff; }
.r1-slot b { font-family: Fredoka; font-weight: 600; }

/* ================= Round 2: Qui est qui ? ================= */
.r2-wall { position: relative; flex: 1; min-height: 0; border-radius: 22px; overflow: hidden;
  background: repeating-linear-gradient(180deg, transparent 0 44px, rgba(255, 244, 226, .14) 44px 46px), var(--noise-d), linear-gradient(180deg, #4C4870, #36325A); padding: 14px 18px 0 58px; }
.r2-marks { position: absolute; left: 10px; top: 14px; bottom: 0; display: flex; flex-direction: column; justify-content: space-between; font-family: Fredoka; font-size: 13px; color: rgba(255, 244, 226, .5); }
.r2-line { height: 100%; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; align-items: end; }
.r2-suspect { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; padding-bottom: 12px; cursor: pointer; transition: transform .3s var(--ease-pop); }
.r2-suspect:focus-visible { outline-offset: -4px; }
.picking .r2-suspect:hover { transform: translateY(-6px); }
.picking .r2-suspect .r2-slot { border-color: var(--gold); color: var(--gold); }
.r2-clue { font-size: 15.5px; line-height: 1.3; margin-bottom: 10px; max-width: 230px; min-height: 64px; display: flex; align-items: center; }
.r2-clue.said { background: #FFE9A8; } .r2-clue.said::after { border-top-color: #FFE9A8; }
.r2-art { height: 160px; display: flex; align-items: flex-end; justify-content: center; }
.r2-trio { display: flex; align-items: flex-end; } .r2-trio .plush { margin: 0 -14px; }
.r2-slot { margin-top: 6px; min-height: 46px; min-width: 160px; padding: 6px 12px; border-radius: 14px; border: 2px dashed rgba(255, 244, 226, .35); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 14px; color: var(--muted); }
.r2-slot.on { border: 0; background: var(--noise-l), linear-gradient(180deg, #FFF8EC, #F1DFC0); color: var(--ink); font-family: Fredoka; font-size: 16px; box-shadow: 0 6px 12px rgba(0, 0, 0, .3); animation: popIn .4s var(--ease-pop); }
.r2-slot .patch { width: 28px; height: 28px; font-size: 14px; --c: var(--gold); box-shadow: 0 0 0 2px #8a6a20; }
.r2-slot .patch::after { inset: 3px; }
.r2-placard { margin-top: 8px; padding: 4px 12px; border-radius: 8px; background: #1B1830; font-family: Fredoka; font-size: 15px; color: var(--thread); }
.r2-suspect.nope { animation: shk .42s; }
.r2-suspect.ejected { animation: ejectS 2.2s ease-in forwards; pointer-events: none; }
@keyframes ejectS { 30% { transform: translateY(-20px) rotate(-10deg) } 100% { transform: translate(120vw, -40px) rotate(540deg); opacity: 0 } }
.r2-suspect.ears .r2-art { animation: shk .42s 3; }
.r2-tray { display: flex; flex-direction: column; gap: 8px; }
.r2-hint { font-size: 15px; text-align: center; }
.r2-badges { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.r2-badge { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 18px; text-align: left; touch-action: none;
  background: var(--noise-l), linear-gradient(180deg, #FFF8EC, #EAD5B0); background-blend-mode: soft-light, normal; color: var(--ink);
  box-shadow: inset 0 2px 0 #fff, inset 0 -5px 0 rgba(120, 72, 30, .2), 0 8px 18px rgba(0, 0, 0, .3); transition: transform .2s var(--ease-pop); position: relative; }
.r2-badge::before { content: ''; position: absolute; inset: 5px; border-radius: 13px; border: 2px dashed rgba(120, 72, 30, .25); pointer-events: none; }
.r2-badge .patch { width: 44px; height: 44px; font-size: 20px; flex: none; --c: var(--gold); }
.r2-badge.imp .patch { --c: var(--coral); }
.r2-badge b { font-family: Fredoka; font-weight: 600; font-size: 18px; display: block; }
.r2-badge small { color: #6E5A44; font-size: 13px; }
.r2-badge:hover { transform: translateY(-3px) rotate(-1deg); }
.r2-badge.sel { transform: translateY(-6px); box-shadow: 0 0 0 4px var(--gold), 0 14px 24px rgba(0, 0, 0, .35); }
.r2-badge.used { opacity: .3; transform: scale(.94); pointer-events: none; }
.drag-src { opacity: .35; }
.drag-ghost { box-shadow: 0 24px 40px rgba(0, 0, 0, .5) !important; }
.r2-keyboard { position: absolute; left: 50%; bottom: 70px; translate: -50% 0; width: 200px; z-index: 4; animation: popIn .4s var(--ease-pop); }
.r2-screen { background: #0C1A12; color: #6CFF9E; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 18px; padding: 8px 10px; border-radius: 8px 8px 0 0; border: 3px solid #3B3675; border-bottom: 0; min-height: 40px; }
.r2-caret { display: inline-block; width: 9px; height: 18px; background: #6CFF9E; vertical-align: middle; animation: blinkDot .8s steps(2) infinite; }
.r2-keys { height: 34px; border-radius: 0 0 10px 10px; background: radial-gradient(circle, #6E6A9A 3px, transparent 3.5px) 0 0 / 14px 11px, #3B3675; }
.r2-shock { position: absolute; left: 50%; top: 45%; pointer-events: none; z-index: 4; }
.r2-shock i { position: absolute; left: -40px; top: -40px; width: 80px; height: 80px; border-radius: 50%; border: 6px solid var(--gold); animation: ring 1s ease-out infinite; }
.r2-shock i:nth-child(2) { animation-delay: .25s } .r2-shock i:nth-child(3) { animation-delay: .5s }
@keyframes ring { to { transform: scale(7); opacity: 0 } }
.r2-prod { position: absolute; left: 50%; top: 40%; translate: -50% -50%; z-index: 6; font-family: Fredoka; font-weight: 700; font-size: 44px; color: #fff; background: var(--coral); padding: 10px 24px; border-radius: 18px; transform: rotate(-4deg); box-shadow: var(--shadow); animation: popIn .4s var(--ease-pop); }

/* ================= Round 3: Priority Rush ================= */
.r3 { padding: 0; overflow: hidden; touch-action: none; }
.r3-sky { position: absolute; inset: 0; }
.r3-crate { position: absolute; top: 0; width: 168px; padding: 12px 12px 14px; border-radius: 10px; text-align: center; color: #3B2615; will-change: transform;
  background: var(--fibers), var(--noise-d), linear-gradient(180deg, #D9A86C, #B9844E); background-blend-mode: soft-light, multiply, normal;
  box-shadow: inset 0 0 0 3px rgba(90, 59, 34, .35), 0 12px 20px rgba(0, 0, 0, .35); }
.r3-crate::before { content: ''; position: absolute; inset: 0; border-radius: 10px; background: linear-gradient(90deg, transparent 46%, rgba(90, 59, 34, .25) 46% 54%, transparent 54%); pointer-events: none; }
.r3-crate .r3-ico { display: block; font-size: 34px; position: relative; }
.r3-crate .r3-lbl { position: relative; display: block; font-family: Fredoka; font-weight: 600; font-size: 16px; line-height: 1.15; margin-top: 4px; background: #FFF6E9; border-radius: 6px; padding: 4px 6px; }
.r3-tape { position: absolute; left: 50%; top: -8px; translate: -50% 0; width: 70px; height: 18px; background: rgba(244, 233, 204, .9); clip-path: polygon(2% 0, 98% 6%, 100% 50%, 97% 100%, 3% 94%, 0 50%); }
.r3-crate.grabbed { animation: grab .45s ease-in forwards; }
@keyframes grab { to { scale: .3; opacity: 0; translate: 0 60px } }
.r3-beam { position: absolute; bottom: 0; left: 50%; translate: -50% 0; width: 200px; height: 190px; pointer-events: none; transition: left .05s linear; }
.r3-cone { position: absolute; left: 50%; bottom: 60px; translate: -50% 0; width: 190px; height: 130px; background: linear-gradient(0deg, rgba(77, 232, 255, .55), rgba(77, 232, 255, 0)); clip-path: polygon(38% 100%, 62% 100%, 100% 0, 0 0); animation: beamPulse 1s ease-in-out infinite; }
@keyframes beamPulse { 50% { opacity: .55 } }
.r3-emitter { position: absolute; left: 50%; bottom: 8px; translate: -50% 0; width: 110px; height: 58px; border-radius: 60px 60px 18px 18px; background: var(--noise-l), radial-gradient(circle at 40% 30%, #FFF3DF, #D9A86C 70%); box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .2), 0 0 30px rgba(77, 232, 255, .6); }
.r3-emitter::after { content: ''; position: absolute; left: 50%; top: 14px; translate: -50% 0; width: 22px; height: 16px; border-radius: 50%; background: #3B2615; }
.r3-beam.off .r3-cone { opacity: 0; animation: none; }
.r3-count { position: absolute; left: 18px; top: 22px; z-index: 4; display: flex; align-items: center; gap: 10px; font-family: Fredoka; font-size: 18px; }
.r3-count .patch { width: 44px; height: 44px; font-size: 22px; --c: var(--gold); }
.r3-unicorns { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.r3-unicorns span { position: absolute; left: -10%; font-size: 52px; animation: gallop 3.4s linear forwards; }
.r3-unicorns i { font-style: normal; position: absolute; right: 100%; top: 6px; font-size: 40px; opacity: .8; }
@keyframes gallop { 0% { transform: translateX(0) translateY(0) } 25% { transform: translateX(30vw) translateY(-14px) } 50% { transform: translateX(60vw) translateY(0) } 75% { transform: translateX(90vw) translateY(-14px) } 100% { transform: translateX(120vw) } }
.r3-coffee { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.r3-coffee i { position: absolute; top: 0; width: 7%; border-radius: 0 0 40px 40px; background: linear-gradient(180deg, #6B3E1F, #8B5A2B); animation: drip 2.6s ease-in forwards; transform-origin: top; }
@keyframes drip { from { transform: scaleY(0) } 60% { transform: scaleY(1) } to { transform: scaleY(1); opacity: 0 } }
.r3-lina { position: absolute; right: 18px; top: 70px; z-index: 6; display: flex; align-items: center; gap: 6px; animation: popIn .4s var(--ease-pop); }
.r3-lina .bubble { max-width: 260px; font-size: 17px; }
.r3-summary { position: absolute; inset: 0; z-index: 8; display: grid; place-items: center; background: rgba(12, 10, 36, .55); animation: screenIn .5s both; }
.r3-sum-card { padding: 28px 32px; width: min(860px, 92%); }
.r3-sum-card h3 { font-size: 26px; color: var(--ink); text-align: center; }
.r3-notes { display: flex; gap: 16px; justify-content: center; margin: 18px 0 10px; flex-wrap: wrap; }
.r3-note { width: 220px; min-height: 170px; padding: 14px 14px 12px; background: #FFF2A8; color: var(--ink); box-shadow: 0 10px 18px rgba(0, 0, 0, .25); transform: rotate(var(--r)); display: flex; flex-direction: column; gap: 6px; position: relative; }
.r3-note::before { content: ''; position: absolute; left: 50%; top: -10px; translate: -50% 0; width: 70px; height: 20px; background: rgba(244, 233, 204, .9); }
.r3-note.later { background: #CDEBFF; } .r3-note.trap { background: #FFC9D3; }
.r3-note b { font-family: Fredoka; font-size: 17px; } .r3-note span { font-size: 14.5px; line-height: 1.35; flex: 1; }
.r3-note em { font-style: normal; font-weight: 800; font-size: 13px; color: #6E5A44; }
.r3-truth { text-align: center; color: #3B2615; font-weight: 800; font-size: 16px; }

/* ================= Round 4: Réacteur ================= */
.r4-goal { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 4px 0; transition: transform .2s; }
.r4-goal.need .r4-goal-btn { box-shadow: 0 0 0 3px var(--coral); }
.r4-goal-btn { padding: 10px 16px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 2px dashed rgba(255, 244, 226, .3); font-weight: 800; font-size: 16px; }
.r4-goal-btn[aria-pressed="true"] { background: var(--gold); color: #3A2600; border: 2px solid var(--gold); }
.r4-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1.05fr 170px; gap: 16px; align-items: stretch; }
.r4-backlog h3, .r4-sprint h3 { font-size: 18px; margin-bottom: 8px; }
.r4-tasks { display: flex; flex-direction: column; gap: 8px; }
.r4-task { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 14px; text-align: left; font-weight: 800; font-size: 16px; color: var(--ink); touch-action: none;
  background: var(--fibers), linear-gradient(180deg, #F7E2BF, #E2BE88); background-blend-mode: soft-light, normal; box-shadow: inset 0 -4px 0 rgba(120, 72, 30, .2), 0 6px 12px rgba(0, 0, 0, .25); transition: transform .2s var(--ease-pop), opacity .2s; }
.r4-task:hover { transform: translateX(4px) rotate(-.5deg); }
.r4-task.in { opacity: .35; transform: scale(.97); }
.r4-pts { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-family: Fredoka; font-weight: 700; font-size: 18px; color: #fff; background: var(--felt-hi); box-shadow: 0 0 0 2px rgba(255, 244, 226, .8), inset 0 -3px 0 rgba(0, 0, 0, .25); }
.r4-reactor { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; }
.r4-gauge { width: min(280px, 100%); height: auto; overflow: visible; }
.r4-gauge .core-bg { fill: #120F33; stroke: #8A6A45; stroke-width: 6; }
.r4-gauge .seg { fill: rgba(255, 255, 255, .08); transition: fill .3s; }
.r4-gauge .seg.on { fill: var(--mint); } .r4-gauge .seg.over { fill: rgba(255, 90, 110, .18); } .r4-gauge .seg.over.on { fill: var(--coral); }
.r4-gauge .core { fill: url(#r4core); fill: #2B2665; stroke: rgba(255, 244, 226, .3); stroke-width: 2; stroke-dasharray: 5 4; transition: fill .4s; }
.r4-gauge .load { font-family: Fredoka; font-weight: 700; font-size: 58px; fill: var(--thread); }
.r4-gauge .cap { font-family: Nunito; font-weight: 800; font-size: 14px; fill: var(--muted); }
.r4-reactor.good .core { fill: #1F6D5A; } .r4-reactor.over .core { fill: #8E1E33; }
.r4-reactor.blue .core { fill: #1C5CA8; filter: drop-shadow(0 0 30px #4DE8FF); }
.r4-reactor.smoke .r4-gauge { animation: shk .42s 4; filter: drop-shadow(0 0 30px #FF5A6E); }
.r4-sprint { width: 100%; min-height: 0; }
.r4-in { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 10px; border-radius: 16px; border: 2px dashed rgba(255, 244, 226, .3); }
.r4-chip { padding: 6px 10px; border-radius: 12px; background: #FFF6E9; color: var(--ink); font-weight: 800; font-size: 14px; animation: popIn .3s var(--ease-pop); }
.r4-chip b { margin-left: 4px; color: var(--felt-hi); }
.r4-devs { display: flex; flex-direction: column; justify-content: space-around; gap: 6px; }
.r4-dev { display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.r4-energy { width: 110px; height: 12px; border-radius: 8px; background: rgba(0, 0, 0, .35); overflow: hidden; }
.r4-energy i { display: block; height: 100%; width: 100%; background: linear-gradient(90deg, var(--mint-2), var(--mint)); transition: width .4s; }
.r4-energy.low i { background: var(--coral); }
.r4-dev.zzz::after { content: 'z Z z'; position: absolute; right: 8px; top: 0; font-family: Fredoka; font-size: 20px; color: #CFE6FF; animation: zz 1.6s ease-in-out infinite; }
@keyframes zz { 50% { transform: translateY(-10px); opacity: .5 } }
.r4-dev.melt .plush { animation: melt 1.6s ease-in forwards; transform-origin: 50% 95%; }
@keyframes melt { to { transform: scale(1.5, .25) } }
.r4-foot { display: flex; justify-content: center; }
.r4-burnout { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; background: rgba(40, 6, 16, .78); animation: screenIn .4s both; }
.r4-burn-title { font-family: Fredoka; font-weight: 700; font-size: 92px; color: #FFE3E7; text-shadow: 0 6px 0 #8E1E33, 0 0 40px rgba(255, 90, 110, .8); transform: rotate(-4deg); }
.r4-burnout p { font-size: 20px; }
.r4-room { position: relative; padding: 10px 40px; } .r4-room .bubble { position: absolute; right: -90px; top: 6px; }
.r4-room .fl { position: absolute; font-size: 44px; animation: flick .5s ease-in-out infinite alternate; }
.r4-room .f1 { left: 0; bottom: 0 } .r4-room .f2 { right: 0; bottom: 10px; animation-delay: .2s } .r4-room .f3 { left: 40%; top: -20px; animation-delay: .1s }
@keyframes flick { to { transform: scale(1.15) translateY(-4px) } }
.r4-toast { position: absolute; left: 50%; bottom: 96px; translate: -50% 0; z-index: 9; padding: 16px 26px; font-family: Fredoka; font-size: 22px; display: flex; align-items: center; gap: 12px; animation: popIn .4s var(--ease-pop); }

/* ================= Round 5: Bug Attack ================= */
.r5-grid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 310px; gap: 16px; }
.r5-hull { position: relative; overflow: hidden; touch-action: none; cursor: crosshair; }
.r5-vents i { position: absolute; width: 54px; height: 30px; border-radius: 16px; background: repeating-linear-gradient(90deg, #0D0A26 0 6px, #2E2A60 6px 10px); box-shadow: inset 0 3px 6px rgba(0, 0, 0, .6), 0 0 0 4px rgba(255, 244, 226, .15); }
.r5-bugs { position: absolute; inset: 0; }
.r5-bug { position: absolute; left: 0; top: 0; padding: 0; will-change: transform; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .35)); }
.r5-bug .bug-legs { animation: legs .18s steps(2) infinite; }
@keyframes legs { 50% { transform: translateY(2px) } }
.r5-bug.splat { pointer-events: none; animation: splat .5s ease-out forwards; }
@keyframes splat { 30% { scale: 1.3 .4 } to { scale: 1.5 .1; opacity: 0 } }
.r5-bug.flee { pointer-events: none; animation: flee .5s ease-in forwards; }
@keyframes flee { to { opacity: 0; scale: .3 } }
.r5-bug.hurt svg { animation: shk .3s; filter: brightness(1.5); }
.r5-bug.hidden-behind { opacity: .25; pointer-events: none; }
.r5-banner { position: absolute; left: 50%; top: 22px; translate: -50% 0; z-index: 6; display: flex; align-items: center; gap: 14px; padding: 10px 18px; border-radius: 16px; background: #FFF6E9; color: var(--ink); font-family: Fredoka; font-size: 20px; box-shadow: var(--shadow); animation: popIn .35s var(--ease-pop); white-space: nowrap; }
.r5-banner.bad { background: #FFD6DC; } .r5-banner.warn { background: #FFE9A8; } .r5-banner.good { background: #C9F5E3; }
.r5-block { position: absolute; left: 0; top: 0; bottom: 0; width: 38%; z-index: 4; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 20px;
  background: repeating-linear-gradient(-45deg, rgba(255, 197, 74, .25) 0 18px, rgba(27, 24, 48, .5) 18px 36px); border-right: 4px dashed var(--gold); }
.r5-block p { font-family: Fredoka; font-size: 18px; } .r5-lock { font-size: 54px; }
.r5-block.freed { animation: fadeOut .6s ease 1s forwards; background: rgba(67, 224, 168, .25); border-color: var(--mint); }
.r5-daily { position: absolute; inset: 0; z-index: 7; display: grid; place-items: center; background: rgba(12, 10, 36, .55); animation: screenIn .3s both; }
.r5-daily-card { padding: 22px 26px; width: min(720px, 92%); }
.r5-daily-head { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.r5-daily-head h3 { font-size: 24px; } .r5-daily-head p { color: #6E5A44; }
.r5-opts { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.r5-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; }
.r5-chart { padding: 16px 16px 12px; position: relative; }
.r5-chart h3 { font-size: 18px; margin-bottom: 6px; }
.r5-svg { width: 100%; height: auto; }
.r5-svg .grid line { stroke: rgba(255, 244, 226, .1); }
.r5-svg .ax { font-size: 10px; fill: var(--muted); font-family: Nunito; font-weight: 700; }
.r5-svg .ideal { stroke: var(--muted); stroke-width: 2; stroke-dasharray: 6 5; }
.r5-svg .crew { fill: none; stroke: var(--crew); stroke-width: 4; stroke-linejoin: round; stroke-linecap: round; }
.r5-svg .me { fill: none; stroke: var(--thread); stroke-width: 2.5; stroke-dasharray: 2 4; stroke-linecap: round; }
.r5-legend { display: flex; gap: 12px; font-size: 13px; color: var(--muted); justify-content: center; }
.r5-legend i { display: inline-block; width: 18px; height: 4px; border-radius: 2px; vertical-align: middle; margin-right: 5px; }
.l-ideal { background: var(--muted); } .l-crew { background: var(--crew); } .l-me { background: var(--thread); }
.r5-stats { padding: 18px; display: grid; grid-template-columns: 1fr 1fr; text-align: center; gap: 10px; }
.r5-stats b { font-family: Fredoka; font-size: 44px; color: var(--gold); display: block; line-height: 1; }
.r5-stats span { color: var(--muted); font-size: 14px; }
.r5-dancer { position: absolute; right: 18px; top: 40px; animation: dance .4s ease-in-out infinite alternate; }

/* ================= Round 6: Boss ================= */
.r6-review { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; transition: opacity .5s, transform .5s; }
.r6-review.leave { opacity: 0; transform: scale(.95); }
.r6-demo { padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 18px; }
.r6-screen { width: 100%; padding: 18px; border-radius: 18px; background: #0B1730; box-shadow: inset 0 0 0 4px #3B3675, inset 0 0 40px rgba(77, 232, 255, .15); font-family: Fredoka; }
.r6-os { color: #4DE8FF; font-size: 22px; margin-bottom: 12px; letter-spacing: 2px; }
.r6-sys { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; margin-top: 8px; border-radius: 12px; background: rgba(255, 255, 255, .05); font-size: 20px; color: #8FA2C8; }
.r6-sys i { width: 14px; height: 14px; border-radius: 50%; background: #FF5A6E; box-shadow: 0 0 10px #FF5A6E; }
.r6-sys.on { color: #EAFBFF; } .r6-sys.on i { background: var(--mint); box-shadow: 0 0 12px var(--mint); }
.r6-client { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.r6-talk { width: 100%; display: flex; flex-direction: column; gap: 12px; align-items: stretch; }
.r6-choices { display: grid; gap: 10px; }
.r6-note { color: var(--gold); font-family: Fredoka; font-size: 18px; text-align: center; }
.r6-title { position: absolute; inset: 0; z-index: 10; display: flex; flex-direction: column; align-items: center; justify-content: center; background: rgba(12, 10, 36, .85); animation: screenIn .3s both; }
.r6-title b { font-family: Fredoka; font-size: 30px; color: var(--muted); } .r6-title span { font-family: Fredoka; font-weight: 700; font-size: 60px; color: #FFE3E7; text-shadow: 0 6px 0 #8E1E33, 0 0 40px rgba(255, 90, 110, .7); }
.r6-fight { flex: 1; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr) auto auto; gap: 10px; justify-items: center; }
.r6-bars { display: flex; gap: 14px; width: 100%; justify-content: center; }
.r6-bar { display: flex; flex-direction: column; gap: 5px; width: 230px; font-family: Fredoka; font-size: 16px; }
.r6-bar .hp { height: 18px; border-radius: 10px; background: rgba(0, 0, 0, .35); overflow: hidden; box-shadow: inset 0 2px 4px rgba(0, 0, 0, .5); }
.r6-bar .hp i { display: block; height: 100%; width: 100%; background: repeating-linear-gradient(-45deg, rgba(255, 255, 255, .2) 0 6px, transparent 6px 12px), linear-gradient(90deg, #C9364B, #FF5A6E); transition: width .5s; }
.r6-bar.ko span::after { content: ' · K.O.'; color: var(--mint); }
.r6-boss { --s: 1; display: grid; place-items: center; min-height: 0; height: 100%; transform: scale(var(--s)); transition: transform .5s var(--ease-pop); filter: drop-shadow(0 20px 30px rgba(0, 0, 0, .5)); }
.r6-boss.enter { animation: bossIn .9s var(--ease-pop); }
@keyframes bossIn { from { transform: translateY(-60px) scale(.4); opacity: 0 } }
.r6-boss.hit { animation: bossHit .5s; } @keyframes bossHit { 30% { translate: 18px 0; filter: brightness(2) } 60% { translate: -10px 0 } }
.r6-boss.grow { animation: bossGrow .7s var(--ease-pop); } @keyframes bossGrow { 40% { scale: 1.18 } }
.r6-card-slot { min-height: 96px; display: grid; place-items: center; }
.r6-card { width: 420px; max-width: 90%; padding: 14px 18px; border-radius: 16px; text-align: center; cursor: grab; touch-action: none; color: var(--ink);
  background: repeating-linear-gradient(180deg, transparent 0 23px, rgba(77, 124, 255, .18) 23px 24px), #FFFDF6; box-shadow: 0 12px 24px rgba(0, 0, 0, .35); animation: popIn .35s var(--ease-pop); position: relative; }
.r6-card::before { content: ''; position: absolute; left: 50%; top: -10px; translate: -50% 0; width: 80px; height: 20px; background: rgba(244, 233, 204, .9); }
.r6-card p { font-family: Fredoka; font-weight: 600; font-size: 22px; line-height: 1.25; }
.r6-card-n { font-size: 13px; color: #6E5A44; font-weight: 800; }
.r6-card.fly-ok { animation: flyOk .45s ease-in forwards; } @keyframes flyOk { to { transform: translateY(120px) scale(.4); opacity: 0 } }
.r6-card.fly-bad { animation: shk .42s, flyOk .4s ease-in .42s forwards; }
.r6-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; width: 100%; }
.r6-col { position: relative; padding: 18px 10px 14px; border-radius: 18px 18px 26px 26px; font-family: Fredoka; font-size: 22px; color: var(--ink);
  background: var(--fibers), linear-gradient(180deg, #F7E2BF, #D9A86C); background-blend-mode: soft-light, normal; box-shadow: inset 0 6px 10px rgba(0, 0, 0, .15), 0 8px 18px rgba(0, 0, 0, .3); transition: transform .2s var(--ease-pop); }
.r6-col:nth-child(1) { background: var(--fibers), linear-gradient(180deg, #C9F5E3, #5FD3A8); background-blend-mode: soft-light, normal; }
.r6-col:nth-child(2) { background: var(--fibers), linear-gradient(180deg, #FFD6DC, #FF8FA0); background-blend-mode: soft-light, normal; }
.r6-col:nth-child(3) { background: var(--fibers), linear-gradient(180deg, #DCE2FF, #8E9BFF); background-blend-mode: soft-light, normal; }
.r6-col:hover { transform: translateY(-4px); }
.r6-pocket-stitch { position: absolute; left: 10px; right: 10px; top: 8px; border-top: 2px dashed rgba(27, 24, 48, .3); }
.r6-col-count { position: absolute; right: 12px; top: 10px; font-size: 14px; color: #3B3675; }
.r6-star { position: fixed; z-index: 99; font-size: 34px; transition: transform .5s cubic-bezier(.3, .7, .3, 1); pointer-events: none; }
.r6-smoke { position: absolute; inset: 0; z-index: 9; pointer-events: none; background: radial-gradient(circle at 50% 40%, rgba(120, 116, 150, .85), rgba(80, 76, 110, .5) 40%, transparent 70%); animation: fadeOut 1.6s ease forwards; }
.r6-hint { position: absolute; left: 50%; top: 40%; translate: -50% 0; z-index: 10; padding: 12px 20px; border-radius: 16px; background: #FFD6DC; color: var(--ink); font-family: Fredoka; font-size: 20px; box-shadow: var(--shadow); animation: popIn .3s var(--ease-pop); }
.r6-done { font-family: Fredoka; font-size: 28px; color: var(--gold); }

/* ================= Finale ================= */
.reveal .rv-boss { position: relative; transition: transform 1.6s ease-in, opacity 1.6s; }
.reveal .rv-boss.deflate { transform: scale(.15, .05) translateY(600px); opacity: 0; }
.reveal .rv-mask { position: absolute; left: 50%; top: 40%; translate: -50% 0; font-size: 90px; animation: maskFall 2s ease-in 2.2s forwards; }
@keyframes maskFall { to { transform: translateY(260px) rotate(200deg); opacity: 0 } }
.reveal .rv-cap { font-family: Fredoka; font-size: 32px; margin-top: 20px; }
.rv-lines { gap: 10px; }
.rv-line { font-family: Fredoka; font-weight: 600; font-size: clamp(28px, 3.4vw, 46px); min-height: 1.2em; }
.rv-line.gold { color: var(--gold); }
.game.full .hud { background: transparent; }
.game.paused::after { content: 'Pause'; position: fixed; left: 50%; top: 50%; translate: -50% -50%; z-index: 60; font-family: Fredoka; font-size: 60px; padding: 16px 40px; border-radius: 26px; background: rgba(12, 10, 36, .85); box-shadow: var(--shadow); }

@media (max-width: 1180px) {
  .r1-grid { grid-template-columns: 1fr; } .r1-radio { display: none; }
  .r1-values { grid-template-columns: 1fr 1fr; }
  .r4-grid { grid-template-columns: 1fr 1fr; } .r4-devs { display: none; }
  .r5-grid { grid-template-columns: 1fr; } .r5-side { display: none; }
  .r6-bar { width: 160px; }
}
@media (max-height: 760px) {
  .r2-art { height: 120px; } .r2-art .plush { width: 110px; height: 110px; }
  .r1-values .r1-slot { min-height: 50px; }
}

.r6-boss svg { height: 100%; max-height: 240px; width: auto; }
.r2-art { height: 200px; }
