/* Intermission mini games: shared art (cards, cars, door, slot reels), then the
   main screen, then the phones. The main screen sizes in rem (20px at 1080p). */

/* ---------- playing cards ---------- */
.pcard { --w: 12rem; position: relative; width: var(--w); aspect-ratio: 5 / 7; transform-style: preserve-3d; transition: transform 0.5s cubic-bezier(0.3, 0.7, 0.3, 1); font-family: Georgia, 'Times New Roman', serif; }
.pcard.down { transform: rotateY(180deg); }
.pc-front, .pc-back { position: absolute; inset: 0; border-radius: calc(var(--w) * 0.08); backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 0.4em 1.2em rgba(0, 0, 0, 0.55); }
.pc-front { background: linear-gradient(160deg, #fbf4e2, #efe2c2); border: 2px solid #C9A227; color: #14110F; display: grid; place-items: center; }
.pcard.red .pc-front { color: #b0242c; }
.pc-back { transform: rotateY(180deg); border: 2px solid #E6C65C; background:
  repeating-linear-gradient(45deg, rgba(230, 198, 92, 0.35) 0 2px, transparent 2px 12px),
  repeating-linear-gradient(-45deg, rgba(230, 198, 92, 0.35) 0 2px, transparent 2px 12px),
  radial-gradient(circle at 50% 50%, #8C2A2F, #4a1518); }
.pc-back::after { content: ''; position: absolute; inset: 9%; border: 2px solid rgba(230, 198, 92, 0.7); border-radius: calc(var(--w) * 0.05); }
.pc-corner { position: absolute; display: flex; flex-direction: column; align-items: center; line-height: 1; font-size: calc(var(--w) * 0.15); }
.pc-corner b { font-size: calc(var(--w) * 0.19); }
.pc-corner.tl { left: 7%; top: 5%; }
.pc-corner.br { right: 7%; bottom: 5%; transform: rotate(180deg); }
.pc-pip { font-size: calc(var(--w) * 0.5); line-height: 1; }
.pc-face { position: absolute; top: 14%; font-size: calc(var(--w) * 0.34); line-height: 1; color: #8A6C14; }
.pc-face + .pc-pip { margin-top: 38%; font-size: calc(var(--w) * 0.3); }

/* ---------- cars ---------- */
.car { width: 100%; height: auto; overflow: visible; }
.running .lane-car .wheel { animation: spin 0.25s linear infinite; }
.car .siren { animation: pulse 0.4s infinite; }
.car .siren.b { animation-delay: 0.2s; }

/* ---------- slot reels ---------- */
.reels { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35em; padding: 0.45em; background: #0d0b09; border: 3px solid #8A6C14; border-radius: 0.5em; overflow: hidden; }
.reel { position: relative; height: calc(var(--cell) * 3); overflow: hidden; background: linear-gradient(180deg, #d9cba8, #fbf4e2 30%, #fbf4e2 70%, #d9cba8); border-radius: 0.3em; }
.reel-spin { position: absolute; left: 0; right: 0; top: 0; display: none; flex-direction: column; animation: reel 0.35s linear infinite; filter: blur(1.5px); }
.reel-spin .sym { height: var(--cell); width: 100%; flex: none; padding: 8%; }
.reel.spinning .reel-spin { display: flex; }
.reel.spinning .reel-stop { visibility: hidden; }
.reel-stop { display: grid; grid-template-rows: repeat(3, var(--cell)); animation: reel-land 0.25s ease-out; }
.reel .cell { display: grid; place-items: center; padding: 8%; }
.reel .cell .sym { width: 100%; height: 100%; }
@keyframes reel { from { transform: translateY(calc(var(--cell) * -6)); } to { transform: translateY(0); } }
@keyframes reel-land { 0% { transform: translateY(-12%); } 70% { transform: translateY(4%); } 100% { transform: none; } }
.shutter { position: absolute; inset: 0; display: grid; place-items: center; background: repeating-linear-gradient(180deg, #2B1D14 0 18px, #3B2617 18px 22px); border-bottom: 4px solid #C9A227; transform: translateY(-101%); transition: transform 0.45s cubic-bezier(0.5, 0, 0.3, 1); }
.shutter span { font-family: var(--font-display); color: var(--brass-light); font-size: 1.4em; text-align: center; }
.shutter.down { transform: none; }
.revealed .reel .cell.cherry { background: radial-gradient(circle, rgba(230, 198, 92, 0.85), transparent 72%); animation: cherry-glow 1.2s ease-in-out infinite; }
@keyframes cherry-glow { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }

/* ---------- knock strips ---------- */
.kstrip { position: relative; height: 1.4em; border-bottom: 2px dashed rgba(201, 162, 39, 0.35); }
.kstrip i { position: absolute; top: 50%; width: 0.9em; height: 0.9em; margin: -0.45em 0 0 -0.45em; border-radius: 50%; background: var(--cream); }
.kstrip.gold i { background: var(--brass-light); box-shadow: 0 0 0.5em rgba(230, 198, 92, 0.7); }
.kstrip.empty { opacity: 0.3; }

/* ================= main screen ================= */
.host .v-mini { display: grid; grid-template-rows: auto 1fr auto; grid-template-columns: minmax(0, 1fr); gap: 0.6rem; }
.mini-head { text-align: center; }
.mini-kicker { margin: 0; color: var(--brass); font-weight: 700; letter-spacing: 0.3em; text-transform: uppercase; font-size: 1.3rem; }
.mini-title { margin: 0.1rem 0 0; color: var(--brass-light); font-size: 3.6rem; line-height: 1.05; }
.mini-rules { margin: 0.3rem auto 0; font-size: 1.7rem; max-width: 80rem; }
.mini-stage { position: relative; display: grid; place-items: center; min-height: 0; }
.mini-foot { display: flex; align-items: center; gap: 1.4rem; min-height: 5rem; }
.mini-foot .answered { flex: 1; }
.mini-foot .chip-name small { display: block; font-size: 0.75em; font-weight: 600; opacity: 0.85; }
.mini-status { margin: 0; font-size: 2rem; font-weight: 700; color: var(--brass-light); max-width: 40rem; }
.mini-status:empty { display: none; }
.mini-clock { font-size: 2.4rem; font-weight: 700; color: var(--brass-light); min-width: 4ch; text-align: right; white-space: nowrap; }
.mini-foot .btn { font-size: 1.4rem; white-space: nowrap; }
.v-mini.intro .mini-head, .v-mini.intro .mini-stage, .v-mini.intro .mini-foot .answered { visibility: hidden; }

.mini-intro { position: absolute; inset: 0; display: grid; place-items: center; z-index: 5; animation: fade-up 0.5s both; }
.mini-sun { position: absolute; width: 70rem; max-width: none; opacity: 0.35; animation: spin 60s linear infinite; }
.mini-intro-card { position: relative; text-align: center; padding: 2.5rem 4rem; max-width: 75rem; background: rgba(20, 17, 15, 0.9); border: 2px solid var(--brass); border-radius: 0.6rem; box-shadow: inset 0 0 0 0.45rem rgba(20, 17, 15, 0.9), inset 0 0 0 0.5rem rgba(201, 162, 39, 0.4), 0 1rem 3rem rgba(0, 0, 0, 0.6); }
.mini-intro-kicker { margin: 0; letter-spacing: 0.45em; text-transform: uppercase; color: var(--brass); font-weight: 700; font-size: 1.8rem; }
.mini-intro-card h1 { margin: 0.4rem 0; font-size: 7rem; line-height: 1.05; color: var(--brass-light); text-shadow: 0 0 2rem rgba(230, 198, 92, 0.45); }
.mini-intro-rules { font-size: 2.3rem; line-height: 1.3; margin: 0.6rem 0; }
.mini-intro-prize { margin: 1rem 0 0; font-size: 1.9rem; font-weight: 700; color: var(--brass-light); letter-spacing: 0.1em; }

/* Find the Lady */
.host .lady { --gap: 22rem; --lift: 3.5rem; position: relative; width: 70rem; height: 26rem; }
.lady-card { position: absolute; left: 50%; top: 4rem; transform: translate(calc(-50% + var(--x, 0) * var(--gap)), calc(var(--y, 0) * var(--lift))); }
.host .lady-card .pcard { --w: 12.5rem; }
.lady-card.queen-win .pc-front { box-shadow: 0 0 0 4px var(--brass-light), 0 0 3rem rgba(230, 198, 92, 0.8); }
.lady-slots { position: absolute; left: 0; right: 0; bottom: -3.5rem; display: flex; justify-content: center; gap: calc(var(--gap) - 12.5rem); }
.lady-slot { width: 12.5rem; display: flex; flex-direction: column; align-items: center; gap: 0.4rem; }
.lady-letter { display: grid; place-items: center; width: 3.6rem; height: 3.6rem; border-radius: 50%; background: var(--tile); border: 2px solid var(--brass-light); font-weight: 700; font-size: 1.8rem; }
.lady-picks { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.3rem; }
.lady-picks span, .lane-bets span { background: var(--cream); color: var(--ink); font-size: 1.15rem; font-weight: 700; padding: 0.15em 0.6em; border-radius: 1em; animation: drop-in 0.4s both; }
.lady-slot.win .lady-letter { box-shadow: 0 0 0 4px var(--brass-light), 0 0 2rem rgba(230, 198, 92, 0.8); }

/* Rumrunner Race */
.host .race { position: relative; width: 100%; max-width: 110rem; display: grid; gap: 0.6rem; }
.lane { display: grid; grid-template-columns: 11rem 1fr 18rem; align-items: center; gap: 1rem; }
.lane-label { display: flex; align-items: center; gap: 0.6rem; padding: 0.4rem 0.8rem; border-radius: 0.5rem; background: var(--tile); border: 2px solid rgba(242, 230, 201, 0.3); font-size: 1.5rem; font-weight: 700; }
.lane-label b { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--cream); color: var(--ink); }
.lane-label.feds { background: #16120f; color: var(--smoke); justify-content: center; letter-spacing: 0.1em; text-transform: uppercase; font-size: 1.2rem; }
.lane-road { position: relative; height: 6.2rem; border-radius: 0.4rem; background: linear-gradient(180deg, #2a2420, #1b1714); border-top: 2px dashed rgba(242, 230, 201, 0.25); border-bottom: 2px dashed rgba(242, 230, 201, 0.25); }
.lane-car { --p: 0; position: absolute; top: 50%; left: calc(var(--p) * (100% - 11rem)); width: 11rem; transform: translateY(-55%); }
.finish { position: absolute; right: 0; top: 0; bottom: 0; width: 1.2rem; background: repeating-conic-gradient(var(--cream) 0 25%, #14110F 0 50%) 0 0 / 0.6rem 0.6rem; opacity: 0.85; }
.lane-bets { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.lane.win .lane-label { box-shadow: 0 0 0 3px var(--brass-light), 0 0 2rem rgba(230, 198, 92, 0.7); }
.lane.win .lane-road { box-shadow: inset 0 0 0 3px var(--brass-light); }
.feds-lane .lane-road { height: 4.6rem; opacity: 0.9; }
.feds-lane .lane-car { width: 8.5rem; left: calc(var(--p) * (100% - 11rem)); }
.race-count { position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); font-family: var(--font-display); font-size: 12rem; color: var(--brass-light); text-shadow: 0 0 3rem rgba(0, 0, 0, 0.9), 0 0 2rem rgba(230, 198, 92, 0.6); animation: stamp 0.4s both; }

/* The Secret Knock */
.host .knock { display: grid; grid-template-columns: 20rem 1fr; gap: 4rem; align-items: center; width: 100%; max-width: 100rem; }
.door-wrap { position: relative; width: 20rem; }
.door-wrap .door { width: 100%; height: auto; filter: drop-shadow(0 1rem 2rem rgba(0, 0, 0, 0.6)); }
.door-wrap.thud { animation: thud 0.18s ease-out; }
.door-wrap.thud .knock-burst { animation: burst 0.45s ease-out; }
.knock-burst { position: absolute; left: 50%; top: 55%; width: 6rem; height: 6rem; margin: -3rem; border-radius: 50%; border: 0.4rem solid var(--brass-light); opacity: 0; pointer-events: none; }
@keyframes thud { 0% { transform: translateX(0); } 30% { transform: translateX(-0.5rem) rotate(-0.6deg); } 60% { transform: translateX(0.4rem); } 100% { transform: none; } }
@keyframes burst { 0% { transform: scale(0.4); opacity: 0.9; } 100% { transform: scale(3); opacity: 0; } }
.knock-say { margin: 0 0 1.4rem; font-size: 3rem; font-family: var(--font-display); color: var(--brass-light); }
.kdots { display: flex; gap: 1.2rem; }
.kdots i { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 3px solid rgba(201, 162, 39, 0.5); transition: background 0.1s, box-shadow 0.1s; }
.kdots i:not(.on), .mp-listen i:not(.on) { visibility: hidden; } /* don't give away the count */
.mp-listen i.on { opacity: 1 !important; }
.kdots i.on { background: var(--brass-light); box-shadow: 0 0 1.4rem rgba(230, 198, 92, 0.8); border-color: var(--brass-light); }
.knock-results { display: grid; gap: 0.5rem; font-size: 1.5rem; }
.krow { display: grid; grid-template-columns: 12rem 1fr 15rem; gap: 1.2rem; align-items: center; padding: 0.2rem 0.8rem; border-radius: 0.4rem; }
.krow .kname { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.krow .knote { color: var(--smoke); font-size: 0.9em; }
.krow.won { background: rgba(31, 107, 79, 0.45); }
.krow.won .knote { color: #8fe0bb; }
.krow.pattern .kname { color: var(--brass-light); }

/* Higher or Lower */
.host .hilo { display: flex; flex-direction: column; align-items: center; gap: 1.2rem; }
.hilo-cards { display: flex; gap: 1.4rem; align-items: center; }
.hslot { width: 10rem; aspect-ratio: 5 / 7; display: grid; place-items: center; }
.hslot .pcard { --w: 10rem; }
.hslot.future { border: 2px dashed rgba(201, 162, 39, 0.25); border-radius: 0.8rem; }
.hslot.current { width: 12.5rem; }
.hslot.current .pcard { --w: 12.5rem; }
.hslot.current .pc-front { box-shadow: 0 0 0 4px var(--brass-light), 0 0 2.5rem rgba(230, 198, 92, 0.7); }
.hslot.fresh .pcard { animation: deal 0.5s cubic-bezier(0.3, 0.7, 0.3, 1.2) both; }
@keyframes deal { from { transform: rotateY(180deg) translateY(-1rem); } to { transform: none; } }
.hilo-ask { margin: 0; font-size: 2.6rem; text-align: center; }
.hilo-ask b { color: var(--brass-light); }
.hilo-players { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; max-width: 90rem; }
.hplayer { font-size: 1.6rem; font-weight: 700; padding: 0.3em 0.9em; border-radius: 1em; border: 1.5px solid rgba(201, 162, 39, 0.5); }
.hplayer.out { opacity: 0.4; text-decoration: line-through; }
.hplayer.right { background: var(--emerald); border-color: #3fa37c; }
.hplayer.wrong { background: var(--oxblood); border-color: #c45a60; }

/* Cherry Slots */
.host .slots { display: flex; justify-content: center; gap: 3rem; align-items: center; width: 100%; max-width: 110rem; }
.cabinet { --cell: 7.2rem; padding: 1rem 1.2rem 1.4rem; border-radius: 1.2rem; background: linear-gradient(180deg, #3B2617, #2B1D14); border: 3px solid var(--brass); box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.6); font-size: 1.6rem; }
.cab-plate { text-align: center; font-family: var(--font-display); color: var(--brass-light); font-size: 2.6rem; margin-bottom: 0.6rem; }
.host .reel { width: 6.6rem; }
.slot-choices { display: none; grid-template-columns: 1fr 1fr; width: 44rem; }
.slot-choices.open { display: grid; animation: fade-up 0.4s both; }
.slot-choices .tile .text { font-size: 4.4rem; }
.slot-choices .tile .badge { background: var(--cream); border-radius: 50%; width: 4.4rem; height: 4.4rem; }
.slots.revealed .tile.dim { opacity: 0.35; filter: saturate(0.5); }
.slots.revealed .tile.correct { border-color: var(--brass-light); box-shadow: 0 0 0 3px var(--brass-light), 0 0 2.5rem rgba(230, 198, 92, 0.7); }

/* ================= phones ================= */
.phone .v-mini { gap: 0.6rem; padding-top: 0.6rem; }
.phone .v-mini .kicker { font-size: 0.8rem; }
.mp-title { margin: 0; font-size: 1.9rem; }
.mp-rules { margin: 0; color: var(--cream); opacity: 0.85; line-height: 1.35; font-size: 0.95rem; }
.mp-top { width: 100%; display: flex; justify-content: space-between; align-items: baseline; }
.mp-area { width: 100%; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.8rem; min-height: 0; }
.mp-status { margin: 0; min-height: 1.4em; color: var(--brass-light); font-weight: 600; }
.mp-watch { font-size: 1.15rem; color: var(--smoke); }
.mp-buttons { width: 100%; display: grid; gap: 0.6rem; }
.mp-buttons.three { grid-template-columns: repeat(3, 1fr); }
.mp-buttons.four { grid-template-columns: 1fr 1fr; }
.mp-buttons.two { grid-template-rows: 1fr 1fr; flex: 1; max-height: 46dvh; }
.mbtn { position: relative; min-height: 88px; border-radius: 0.6rem; border: 3px solid rgba(242, 230, 201, 0.25); background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(0, 0, 0, 0.2)), var(--tile, var(--walnut)); color: var(--cream); font-size: 1.8rem; font-weight: 700; cursor: pointer; touch-action: manipulation; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.2rem; }
.mbtn small { font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.85; }
.mbtn .car { width: 80%; }
.mbtn:disabled { opacity: 0.4; }
.mbtn.picked { border-color: var(--brass-light); box-shadow: 0 0 0 3px var(--brass-light), 0 0 1.4rem rgba(230, 198, 92, 0.6); }
.mp-buttons.has-pick .mbtn:not(.picked) { opacity: 0.55; }
.mbtn.hi { --tile: var(--emerald); font-size: 2.2rem; }
.mbtn.lo { --tile: var(--oxblood); font-size: 2.2rem; }
.phone .lady { --gap: 27vw; --lift: 5vw; position: relative; width: 100%; height: calc(22vw * 1.4 + 12vw); max-width: 420px; }
.phone .lady-card { top: 6vw; }
.phone .lady-card .pcard { --w: 22vw; }
.phone .lady-slots { display: none; }
.phone .hilo-card .pcard { --w: 34vw; max-width: 160px; }
.mp-out { font-size: 1.2rem; color: var(--smoke); }
.knocker { width: min(62vw, 260px); aspect-ratio: 1; border-radius: 50%; border: 6px solid var(--brass); background: radial-gradient(circle at 40% 35%, #4a3020, #2B1D14 70%); color: var(--brass-light); font-family: var(--font-display); font-size: 2rem; box-shadow: 0 0 0 6px rgba(201, 162, 39, 0.25), 0 1rem 2rem rgba(0, 0, 0, 0.6); touch-action: manipulation; cursor: pointer; }
.knocker:active, .knocker.hit { transform: scale(0.96); background: radial-gradient(circle at 40% 35%, #6a4630, #3B2617 70%); }
.knocker:disabled { opacity: 0.45; }
.mp-taps { display: flex; gap: 0.5rem; min-height: 1.2rem; }
.mp-taps i { width: 1rem; height: 1rem; border-radius: 50%; background: var(--brass-light); }
.v-mini.flash { animation: kflash 0.25s ease-out; }
@keyframes kflash { 0% { background: rgba(230, 198, 92, 0.45); } 100% { background: transparent; } }
.phone .race { width: 100%; display: grid; gap: 0.35rem; }
.phone .lane { grid-template-columns: 2rem 1fr; gap: 0.4rem; }
.phone .lane-label { padding: 0; justify-content: center; font-size: 0.9rem; border-radius: 50%; width: 2rem; height: 2rem; }
.phone .lane-label span, .phone .lane-bets, .phone .feds-lane { display: none; }
.phone .lane-label b { background: none; color: var(--cream); width: auto; height: auto; }
.phone .lane-road { height: 2.6rem; }
.phone .lane-car { width: 4.4rem; left: calc(var(--p) * (100% - 4.4rem)); }
.phone .lane.win .lane-label { box-shadow: 0 0 0 3px var(--brass-light); }
.phone .cabinet { --cell: 13vw; padding: 0.5rem; font-size: 0.9rem; border-width: 2px; }
.phone .cab-plate { display: none; }
.phone .reels { gap: 0.2rem; padding: 0.25rem; }
.mp-result-art { width: min(40vw, 160px); }
.mp-result-art img { width: 100%; height: auto; }
.mp-result-art .stamp { animation: stamp 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
