/**
 * @file masa-stage.css
 * @description Futello Masası jersey avatars (.mk) and the full-screen steps: question pick (big offers + own hand), the question shown big, sabotage card choice (three big action cards + pass), target choice (big jersey avatars), the "who did what to whom" show with flying cards and the score table after each question (correct top 3, players by total, count-up, rank change). Short phones (≈375×500) get a compact version at the end.
 * @dependencies css/masa/masa-base.css, css/masa/masa-table.css
 */

/* Jersey avatar */
.mk { display: inline-block; width: 44px; height: 47px; flex: none; filter: drop-shadow(0 4px 6px rgba(0,0,0,.45)); }
.mk svg { display: block; width: 100%; height: 100%; overflow: visible; }
.mk.me { filter: drop-shadow(0 0 5px #00f2fe) drop-shadow(0 3px 5px rgba(0,0,0,.4)); }
.mk.lg { width: 72px; height: 77px; }
.ml-seats .mk { width: 36px; height: 39px; }
.me-pod .mk { display: block; width: 66px; height: 70px; margin: 0 auto 6px; }
.me-pod .mk.pod1 { width: 92px; height: 98px; }

/* Stage shell */
.ms-stage { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); text-align: center; }
.ms-stage > * { flex-shrink: 0; }
.ms-title { margin: 6px 0 0; font-family: var(--font-display, 'Rajdhani', sans-serif); font-size: 28px; letter-spacing: .06em; line-height: 1; color: #fff; text-shadow: 0 0 16px rgba(244,63,94,.9), 0 2px 0 rgba(0,0,0,.4); animation: mtPop .35s ease-out; }
.ms-sub { margin: 0; font-size: 13.5px; color: #fecdd3; }
.ms-stage.show .ms-sub { color: var(--m-mut); }
.ms-qstrip { display: flex; align-items: center; gap: 8px; max-width: 100%; padding: 7px 12px; border-radius: 12px; background: rgba(10,10,20,.72); border: 2px solid rgba(255,255,255,.35); font-size: 14px; }
.ms-qstrip span { font-size: 18px; }
.ms-qstrip b { text-align: left; line-height: 1.2; }

/* Question shown big */
.ms-stage.show { justify-content: center; gap: 16px; }
.ms-asker { display: flex; align-items: center; gap: 10px; font-weight: 900; letter-spacing: .1em; font-size: 13px; color: #c7d2fe; animation: mtPop .3s ease-out; }
.ms-qbig { width: 100%; max-width: 420px; padding: 22px 18px 20px; border-radius: 22px; background: rgba(10,20,50,.92); border: 4px solid #fff; box-shadow: 0 14px 36px rgba(0,0,0,.5); animation: msZoom .5s cubic-bezier(.2,.9,.3,1.3) both; }
.ms-qbig .ico { display: block; font-size: 46px; line-height: 1; }
.ms-qbig h2 { margin: 10px 0 0; font-family: var(--font-display, 'Rajdhani', sans-serif); font-size: 32px; line-height: 1.05; }
.ms-qbig p { margin: 10px 0 0; font-size: 13px; color: var(--m-mut); }

/* Step 1: sabotage card */
.ms-pcards { width: 100%; max-width: 440px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ms-pcard { position: relative; min-height: 150px; border-radius: 16px; border: 4px solid #fff; background: #0a0a0f; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 10px 6px; overflow: hidden; cursor: pointer; font-family: inherit; box-shadow: 0 10px 24px rgba(0,0,0,.5); animation: mtDeal .4s ease-out both; transition: transform .12s; }
.ms-pcard:nth-child(2) { animation-delay: .07s; } .ms-pcard:nth-child(3) { animation-delay: .14s; }
.ms-pcard:active { transform: scale(.96); }
.ms-pcard::before { content: ''; position: absolute; left: 8%; right: 8%; top: 6%; bottom: 40%; border-radius: 50%; background: conic-gradient(#e11d2a 0 25%, #facc15 0 50%, #16a34a 0 75%, #2563eb 0); transform: rotate(-28deg); opacity: .9; }
.ms-pcard span, .ms-pcard b, .ms-pcard small, .ms-pcard em { position: relative; }
.ms-pcard span { font-size: 38px; filter: drop-shadow(0 2px 3px rgba(0,0,0,.7)); }
.ms-pcard b { font-size: 15px; letter-spacing: .04em; text-shadow: 0 1px 3px #000, 0 0 6px #000; }
.ms-pcard small { margin-top: 10px; font-size: 11px; line-height: 1.2; color: #e2e8f0; }
.ms-pcard em { position: absolute; top: 5px; right: 7px; font-style: normal; font-weight: 900; font-size: 13px; }
.ms-pcard.gone { opacity: .28; filter: grayscale(.8); cursor: default; }
.ms-pass { width: 100%; max-width: 440px; }
.ms-chosen { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 14px 22px; border-radius: 18px; background: rgba(10,10,20,.72); border: 3px solid #fff; animation: mtPop .3s ease-out; }
.ms-chosen span { font-size: 40px; line-height: 1; }
.ms-chosen b { font-size: 20px; }
.ms-chosen small { font-size: 12.5px; color: #fecdd3; }


/* Step 2: target */
.ms-targets { width: 100%; max-width: 440px; display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 10px; }
.ms-target { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 6px 10px; border-radius: 16px; border: 3px solid rgba(255,255,255,.6); background: rgba(10,10,20,.7); color: #fff; font-family: inherit; cursor: pointer; animation: mtDeal .35s ease-out both; transition: transform .12s, border-color .12s; }
.ms-target:nth-child(2) { animation-delay: .05s; } .ms-target:nth-child(3) { animation-delay: .1s; } .ms-target:nth-child(4) { animation-delay: .15s; } .ms-target:nth-child(5) { animation-delay: .2s; }
.ms-target:active { transform: scale(.95); border-color: #fff; }
.ms-target b { max-width: 100%; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-target small { font-size: 11px; color: var(--m-mut); }

/* Sabotage show */
.ms-shots { width: 100%; max-width: 440px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.ms-shot { position: relative; display: grid; grid-template-columns: 72px 1fr 72px; align-items: center; padding: 8px 6px 10px; border-radius: 16px; background: rgba(10,10,20,.72); border: 2px solid rgba(255,255,255,.25); animation: mtPop .3s ease-out both; animation-delay: var(--d); }
.ms-shot.hit-me { border-color: #fff; box-shadow: 0 0 0 2px var(--m-red), 0 0 22px rgba(244,63,94,.7); }
.ms-end { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; }
.ms-end b { max-width: 70px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-end.to .mk { animation: msHit .4s ease-out both; animation-delay: calc(var(--d) + .55s); }
.ms-lane { position: relative; height: 54px; display: flex; align-items: flex-end; justify-content: center; }
.ms-lane::before { content: ''; position: absolute; left: 4px; right: 4px; top: 22px; border-top: 3px dashed rgba(255,255,255,.35); }
.ms-lane em { font-style: normal; font-weight: 900; font-size: 12px; letter-spacing: .06em; }
.ms-fly { position: absolute; top: 4px; left: calc(100% - 30px); font-size: 28px; filter: drop-shadow(0 2px 4px rgba(0,0,0,.6)); animation: msFly .55s cubic-bezier(.3,.7,.3,1) both; animation-delay: calc(var(--d) + .1s); }
.ms-shot.lock em { color: #fda4af; } .ms-shot.half em { color: #fde68a; } .ms-shot.bonus em { color: #86efac; }
.ms-shot.duplicate, .ms-shot.no_effect { background: rgba(30,30,40,.7); }
.ms-shot.duplicate .ms-fly, .ms-shot.no_effect .ms-fly { animation-name: msBurn; }
.ms-shot.duplicate .ms-end.to .mk, .ms-shot.no_effect .ms-end.to .mk { animation: none; }
.ms-burn { grid-column: 1 / -1; margin-top: 4px; font-size: 11.5px; color: #fdba74; }

/* Question pick (full screen) */
.ms-stage.ask { gap: 10px; }
.ms-teamline { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.ms-teamline .mt-team-big { width: 40px; height: 54px; border-width: 3px; border-radius: 8px; animation: none; }
.ms-teamline .mt-team-big b { font-size: 12px; }
.ms-note { color: #fde68a; font-size: 12px; }
.ms-offers { width: 100%; max-width: 460px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.ms-offer { position: relative; min-height: 150px; border-radius: 16px; border: 4px solid #fff; background: var(--qc); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; overflow: hidden; cursor: pointer; font-family: inherit; box-shadow: 0 10px 22px rgba(0,0,0,.4); animation: mtDeal .4s ease-out both; }
.ms-offer:nth-child(2) { animation-delay: .07s; } .ms-offer:nth-child(3) { animation-delay: .14s; }
.ms-offer:active { transform: scale(.96); }
.ms-offer::before { content: ''; position: absolute; inset: 12% 6%; border-radius: 50%; background: rgba(255,255,255,.18); transform: rotate(-28deg); }
.ms-offer span, .ms-offer b, .ms-offer small { position: relative; text-shadow: 0 1px 3px rgba(0,0,0,.6); }
.ms-offer span { font-size: 32px; }
.ms-offer b { font-size: 15px; line-height: 1.15; }
.ms-offer small { font-size: 10.5px; opacity: .9; }
.ms-stage.ask .mt-hand { width: 100%; max-width: 460px; }

/* Score table after each question */
.ms-stage.board { gap: 10px; }
.ms-qcard { width: 100%; max-width: 460px; padding: 12px 14px; border-radius: 18px; background: rgba(10,20,50,.92); border: 3px solid #fff; animation: mtPop .3s ease-out both; }
.ms-qcard > small { display: block; font-size: 10.5px; letter-spacing: .12em; color: var(--m-mut); font-weight: 800; text-transform: uppercase; }
.ms-qcard > b { display: block; margin-top: 4px; font-family: var(--font-display, 'Rajdhani', sans-serif); font-size: 22px; line-height: 1.1; }
.ms-truth { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; text-align: left; font-size: 13px; }
.ms-truth li { display: flex; gap: 6px; align-items: baseline; padding: 3px 8px; border-radius: 8px; background: rgba(255,255,255,.07); }
.ms-truth li b { flex: 1; }
.ms-truth li em { font-style: normal; color: #7dd3fc; font-weight: 700; }
.ms-truth li i { font-style: normal; font-weight: 900; color: #86efac; }
.ms-title.sm { font-size: 20px; margin: 2px 0 0; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.ms-board { width: 100%; max-width: 460px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; }
.ms-board li { display: grid; grid-template-columns: 24px 40px 1fr auto 74px 28px; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 14px; background: rgba(10,20,50,.85); border: 2px solid rgba(255,255,255,.18); text-align: left; animation: msSlide .35s ease-out both; animation-delay: var(--d); }
.ms-board li.me { border-color: #00f2fe; box-shadow: 0 0 14px rgba(0,242,254,.45); }
.ms-board li.off { opacity: .55; }
.ms-board .mk { width: 38px; height: 41px; }
.ms-board .rk { font-family: var(--font-display, 'Rajdhani', sans-serif); font-size: 20px; text-align: center; }
.ms-board .who { min-width: 0; }
.ms-board .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-board .who small { display: block; font-size: 11.5px; color: #cbd5e1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-board .who small em { font-style: normal; color: #7dd3fc; font-weight: 700; }
.ms-board .who .none { color: #94a3b8; font-style: italic; }
.ms-board .gain { font-weight: 900; font-size: 17px; color: #86efac; white-space: nowrap; }
.ms-board .gain small { font-size: 11px; color: #fde68a; }
.ms-board .gain.zero { color: #64748b; }
.ms-board li.best .gain { color: var(--m-gold); }
.ms-board .tot { justify-self: end; display: flex; align-items: baseline; gap: 2px; padding: 3px 7px; border-radius: 10px; background: #fff; color: #1e3a8a; }
.ms-board .tot b { font-family: var(--font-display, 'Rajdhani', sans-serif); font-size: 20px; line-height: 1; }
.ms-board .tot small { font-size: 10px; font-weight: 900; color: #64748b; }
.ms-board .mv { font-style: normal; font-size: 11px; font-weight: 900; text-align: center; }
.ms-board .mv.up { color: #4ade80; } .ms-board .mv.down { color: #f87171; } .ms-board .mv.same { color: #64748b; }

/* Viewer's own name (instead of "Sen") */
.me-name { color: #67e8f9; font-weight: 900; }

/* Score table: ready */
.ms-board li { position: relative; }
.ms-board .rdy { position: absolute; left: 10px; top: -9px; padding: 1px 7px; border-radius: 8px; font-style: normal; font-size: 9.5px; font-weight: 900; letter-spacing: .06em; background: var(--m-green); color: #03231a; border: 2px solid #fff; white-space: nowrap; }
.ms-readybar { width: 100%; max-width: 460px; display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 4px; }
.ms-readybar .masa-btn { width: 100%; font-size: 18px; letter-spacing: .08em; }
.ms-readybar small { font-size: 11.5px; color: var(--m-mut); }

/* Compact standings on the sabotage screens */
.ms-mini { width: 100%; max-width: 440px; padding: 8px 10px; border-radius: 14px; background: rgba(10,10,20,.6); border: 1px solid rgba(255,255,255,.2); text-align: left; }
.ms-mini > small { display: block; font-size: 10px; letter-spacing: .12em; font-weight: 900; color: #fecdd3; margin-bottom: 4px; }
.ms-mini ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 3px; }
.ms-mini li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; }
.ms-mini li.me { color: #67e8f9; }
.ms-mini li span { width: 18px; font-weight: 900; }
.ms-mini li .mk { width: 26px; height: 28px; filter: none; }
.ms-mini li b { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ms-mini li em { font-style: normal; font-family: var(--font-display, 'Rajdhani', sans-serif); font-weight: 900; font-size: 17px; }
.ms-mini li em small { font-size: 10px; margin-left: 3px; opacity: .7; }
.ms-target .pts { font-family: var(--font-display, 'Rajdhani', sans-serif); font-size: 26px; font-weight: 900; line-height: 1; padding: 2px 10px; border-radius: 10px; background: #fff; color: #7f1d1d; }
.ms-target .pts small { font-size: 12px; margin-left: 3px; }

/* End: add friend */
.me-rows .me-fr { flex: none; width: 40px; height: 30px; margin-left: 6px; border-radius: 10px; border: 2px solid #67e8f9; background: rgba(103,232,249,.12); color: #67e8f9; font-family: inherit; font-weight: 900; font-size: 12px; line-height: 1; cursor: pointer; display: grid; place-items: center; }
.me-rows span.me-fr { border-color: transparent; background: none; }
.me-rows span.me-fr.ok { color: var(--m-green); font-size: 16px; }

/* Re-render of the same phase (another player acted): no entry animation again */
.mt.still .ms-stage *, .mt.still .mt-plate, .mt.still .mt-tape, .mt.still .mt-banner, .mt.still .mt-team-big { animation: none !important; }

@keyframes msSlide { from { transform: translateX(-24px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes msZoom { from { transform: scale(.4) rotate(-6deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes msFly { from { left: 0; transform: rotate(-30deg) scale(.6); opacity: 0; } 30% { opacity: 1; } to { left: calc(100% - 30px); transform: rotate(0) scale(1); opacity: 1; } }
@keyframes msBurn { from { left: 0; opacity: 0; } 50% { left: 40%; opacity: 1; transform: scale(1.1); } to { left: 45%; opacity: .25; transform: scale(.6) rotate(25deg); filter: grayscale(1); } }
@keyframes msHit { 0%, 100% { transform: none; } 25% { transform: translateX(-5px) rotate(-6deg); } 60% { transform: translateX(5px) rotate(5deg); } }

/* Short phones (iPhone SE in Safari ≈ 375×500) */
@media (max-height: 600px) {
  .ms-offer { min-height: 112px; padding: 6px 4px; }
  .ms-offer span { font-size: 24px; }
  .ms-offer b { font-size: 12.5px; }
  .ms-offer small { font-size: 9px; }
  .ms-qcard { padding: 8px 10px; }
  .ms-readybar .masa-btn { padding: 10px; font-size: 16px; }
  .ms-mini { padding: 6px 8px; }
  .ms-mini li { font-size: 12.5px; }
  .ms-target .pts { font-size: 21px; }
  .me-pod .mk { width: 52px; height: 55px; }
  .me-pod .mk.pod1 { width: 70px; height: 75px; }
  .ms-qcard > b { font-size: 18px; }
  .ms-truth { font-size: 12px; margin-top: 5px; }
  .ms-title.sm { font-size: 16px; }
  .ms-board { gap: 4px; }
  .ms-board li { padding: 4px 6px; grid-template-columns: 20px 32px 1fr auto 66px 24px; gap: 5px; }
  .ms-board .mk { width: 30px; height: 32px; }
  .ms-board .rk { font-size: 17px; }
  .ms-board .who b { font-size: 13px; }
  .ms-board .gain { font-size: 15px; }
  .ms-board .tot b { font-size: 17px; }
  .ms-stage { gap: 8px; padding-top: 2px; }
  .ms-title { font-size: 22px; margin-top: 2px; }
  .ms-sub { font-size: 12px; }
  .ms-qstrip { padding: 5px 10px; font-size: 12.5px; }
  .ms-qbig { padding: 14px 12px; }
  .ms-qbig .ico { font-size: 36px; }
  .ms-qbig h2 { font-size: 25px; }
  .ms-pcard { min-height: 112px; padding: 6px 4px; }
  .ms-pcard span { font-size: 30px; }
  .ms-pcard b { font-size: 13px; }
  .ms-pcard small { margin-top: 6px; font-size: 10px; }
  .ms-chosen { padding: 10px 18px; }
  .ms-chosen span { font-size: 32px; }
  .mk.lg { width: 56px; height: 60px; }
  .ms-target { padding: 8px 4px; }
  .ms-shots { gap: 6px; }
  .ms-shot { grid-template-columns: 62px 1fr 62px; padding: 5px 4px 7px; }
  .ms-shot .mk { width: 36px; height: 39px; }
  .ms-lane { height: 44px; }
  .ms-fly { font-size: 24px; }
}
