/* =====================================================================
   PLAYER CONTROLLER v2: one instruction at a time
   ===================================================================== */
.phone { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
.p-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 0 8px; }
.p-main { display: flex; flex-direction: column; gap: 16px; padding-bottom: 16px; }
.mission { border-radius: 16px; padding: 14px 16px; background: var(--panel); border: 1px solid #2c2922; display: grid; gap: 10px; }
.m-row { display: flex; align-items: center; gap: 12px; }
.m-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; background: var(--muted); }
.m-title { font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; line-height: 1; }
.m-sub { color: #bdb7a8; font-size: 14px; margin-top: 4px; line-height: 1.35; }
.m-secs { margin-left: auto; font-size: 22px; font-weight: 600; color: var(--gold-hi); }
.m-timer { height: 6px; border-radius: 3px; background: #24211c; overflow: hidden; }
.m-timer i { display: block; height: 100%; background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); transition: width .25s linear; }
.mission.go { border-color: rgba(216,184,121,.5); background: linear-gradient(180deg, rgba(216,184,121,.12), var(--panel)); }
.mission.go .m-dot { background: var(--gold-hi); animation: ping 1.4s infinite; }
.mission.hurry { border-color: var(--bad); }
.mission.hurry .m-timer i { background: var(--bad); }
.mission.hurry .m-secs { color: var(--bad); animation: pulse .5s ease-in-out infinite alternate; }
.mission.wait .m-dot { background: var(--blue); animation: ping 1.8s infinite; }
.mission.done { border-color: rgba(99,217,142,.45); }
.mission.done .m-dot { background: var(--ok); }
.mission.watch { border-color: rgba(157,212,236,.4); }
.mission.watch .m-dot { background: var(--ice); animation: ping 1.2s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(244,220,154,.7); } 70% { box-shadow: 0 0 0 10px rgba(244,220,154,0); } 100% { box-shadow: 0 0 0 0 rgba(244,220,154,0); } }
.dots { display: flex; gap: 6px; justify-content: center; }
.dots i { width: 28px; height: 6px; border-radius: 3px; background: #2a2722; transition: background .3s, width .3s; }
.dots i.done { background: var(--gold-lo); }
.dots i.now { background: var(--gold-hi); width: 44px; }
.ask { display: flex; flex-direction: column; gap: 12px; position: relative; }
.ask h2 { font-family: var(--display); font-weight: 800; font-size: 40px; line-height: .95; text-transform: uppercase; margin: 0; text-wrap: balance; }
.qnum { margin: 0; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.hint { margin: 0; color: #a9a396; font-size: 15px; line-height: 1.4; }
.holo-word { background: linear-gradient(90deg, #ff9be4, #9ef4ff, #f8ff9e, #9ef4ff); -webkit-background-clip: text; background-clip: text; color: transparent; background-size: 200% 100%; animation: shine 3s linear infinite; }
.gold-word { color: var(--gold-hi); }
.backbtn { align-self: flex-start; background: none; border: 0; color: var(--muted); font-size: 15px; padding: 4px 0; }
.backbtn::before { content: "\2039  "; }
.tiles { display: grid; gap: 10px; }
.tiles.two { grid-template-columns: 1fr 1fr; }
.tile { position: relative; border: 2px solid #2f2b25; background: var(--panel); border-radius: 18px; padding: 22px 16px; min-height: 120px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; text-align: center; transition: transform .12s, border-color .2s, background .2s; }
.tile:active { transform: scale(.97); }
.tile .t-big { font-family: var(--display); font-weight: 800; font-size: 40px; text-transform: uppercase; line-height: 1; }
.tile .t-sub { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.tile.yes { background: linear-gradient(135deg, rgba(255,155,228,.14), rgba(158,244,255,.14), rgba(248,255,158,.12)), var(--panel); }
.tile.row { min-height: 0; padding: 14px 16px; display: grid; grid-template-columns: 70px 1fr; grid-template-rows: auto auto; text-align: left; align-items: center; justify-items: start; column-gap: 12px; row-gap: 2px; }
.tile.row .t-gem { grid-row: 1 / 3; justify-self: center; font-size: 18px; letter-spacing: 1px; color: var(--gold); }
.tile.row .t-big { font-size: 30px; }
.t-gem.gL { color: var(--gold-hi); text-shadow: 0 0 10px rgba(244,220,154,.8); }
.tile.sel { border-color: var(--blue); background: #111a35; box-shadow: 0 0 0 4px rgba(76,125,255,.25); }
.tile.sel::after { content: "\2713"; position: absolute; top: 10px; right: 12px; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 700; display: grid; place-items: center; font-size: 15px; }
.big-btn { width: 100%; font-family: var(--display); font-weight: 800; font-size: 30px; letter-spacing: .04em; text-transform: uppercase; border: 0; border-radius: 16px; padding: 18px; color: #fff; background: linear-gradient(180deg, #6b93ff, var(--blue)); box-shadow: 0 10px 30px rgba(76,125,255,.35), inset 0 1px 0 rgba(255,255,255,.3); transition: transform .12s; }
.big-btn:active { transform: scale(.97); }
.link { background: none; border: 0; color: #9db6ff; font-weight: 600; font-size: 15px; padding: 8px; text-decoration: underline; text-underline-offset: 3px; }
.tip { margin: 0; font-size: 14px; color: #a9a396; line-height: 1.4; }
.tip b { color: var(--gold-hi); }
.fine { text-align: center; font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: .06em; margin: 0; }
.join { padding-top: 12px; }
.join-hero { text-align: center; display: grid; gap: 12px; }
.join-hero .fan { position: relative; height: 160px; }
.join-hero .fan img { position: absolute; left: 50%; top: 0; width: 100px; margin-left: -50px; border-radius: 8px; transform: rotate(calc(var(--i) * 12deg)) translateX(calc(var(--i) * 56px)); transform-origin: 50% 120%; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
.join-hero h1 { font-size: 52px; margin: 0; color: var(--paper); }
.join-hero h1 em { font-style: normal; color: var(--gold-hi); }
.join-hero p { margin: 0 auto; color: #bdb7a8; max-width: 30ch; line-height: 1.45; }
.join-form { display: grid; gap: 10px; }
.join-form label { font-weight: 600; font-size: 15px; }
.join-form input { font: 600 22px var(--body); color: var(--paper); background: var(--panel); border: 2px solid #34302a; border-radius: 14px; padding: 16px; }
.join-form input:focus { border-color: var(--blue); outline: none; }
.explain { display: grid; gap: 12px; }
.explain h2 { font-family: var(--display); font-weight: 800; font-size: 26px; text-transform: uppercase; margin: 0; color: var(--gold-hi); }
.flow { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: f; }
.flow li { counter-increment: f; display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; background: var(--panel); border-radius: 14px; padding: 12px 14px; }
.flow li::before { content: counter(f); grid-row: 1 / 3; font-family: var(--display); font-weight: 800; font-size: 34px; color: var(--gold); text-align: center; align-self: center; }
.flow b { font-family: var(--display); font-size: 24px; text-transform: uppercase; }
.flow span { color: #a9a396; font-size: 14px; }
.picks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pick { position: relative; background: var(--panel); border: 2px solid #2f2b25; border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 4px; min-height: 92px; overflow: hidden; cursor: pointer; transition: border-color .3s, background .3s; }
.pick img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .22; }
.pick small, .pick b, .pick em, .pick .state { position: relative; }
.pick small { font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.pick b { font-family: var(--display); font-size: 22px; text-transform: uppercase; line-height: 1; word-break: break-word; }
.pick em { font-style: normal; align-self: flex-start; font-family: var(--mono); font-size: 11px; font-weight: 600; background: var(--gold); color: #1a1205; padding: 1px 6px; border-radius: 4px; }
.pick .state { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--ice); }
.pick.ok { border-color: var(--ok); background: rgba(99,217,142,.12); }
.pick.ok::after { content: "\2713"; position: absolute; right: 8px; top: 6px; color: var(--ok); font-weight: 800; font-size: 18px; }
.pick.no { border-color: #5a2a2a; opacity: .7; }
.pick.no::after { content: "\2715"; position: absolute; right: 8px; top: 6px; color: var(--bad); font-weight: 800; font-size: 16px; }
.power { display: flex; flex-direction: column; gap: 10px; border: 1px dashed #4a412f; border-radius: 14px; padding: 12px 14px; }
.power b { font-family: var(--display); font-size: 20px; text-transform: uppercase; color: var(--gold-hi); display: block; }
.power span { font-size: 13px; color: #a9a396; }
.power-opts { display: flex; gap: 8px; flex-wrap: wrap; }
.chipbtn { border: 1px solid #4a412f; background: transparent; border-radius: 99px; padding: 10px 16px; font-weight: 700; color: #d8d1bf; }
.chipbtn.on { background: var(--gold); border-color: var(--gold); color: #1a1205; }
.result { text-align: center; }
.result .pts { font-family: var(--display); font-weight: 800; font-size: 104px; line-height: .9; color: var(--gold-hi); text-shadow: 0 0 30px rgba(216,184,121,.4); }
.result .pts.zero { color: #5b564c; text-shadow: none; }
.ptsl { margin: -4px 0 0; font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.lines li { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--panel); border-radius: 12px; padding: 10px 14px; border-left: 4px solid #3a352d; }
.lines li span { font-weight: 700; }
.lines li small { display: block; font-weight: 400; color: #a9a396; font-size: 13px; margin-top: 2px; }
.lines li b { font-family: var(--mono); font-size: 18px; }
.lines li.ok { border-left-color: var(--ok); } .lines li.ok b { color: var(--ok); }
.lines li.no b { color: #77706a; }
.me-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; gap: 10px; padding: 10px max(16px, env(safe-area-inset-right,0px)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left,0px)); background: rgba(10,10,12,.94); backdrop-filter: blur(8px); border-top: 1px solid #25221d; }
.me-name { font-weight: 700; flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-stat { display: flex; flex-direction: column; align-items: center; min-width: 56px; }
.me-stat small { font-family: var(--mono); font-size: 9px; letter-spacing: .12em; color: var(--muted); }
.me-stat b { font-family: var(--display); font-size: 22px; color: var(--gold-hi); display: inline-flex; align-items: center; gap: 3px; }
.me-stat b img { width: 14px; height: 14px; }
.me-stat.hot b { color: var(--blue); }
.me-stat.hot b img { animation: flick .6s ease-in-out infinite alternate; }
.me-help { width: 40px; height: 40px; border-radius: 50%; border: 1px solid #3a352d; background: var(--panel); font-weight: 800; font-size: 18px; color: var(--gold-hi); flex: none; }
.sheet { position: fixed; inset: 0; z-index: 60; background: rgba(0,0,0,.72); display: grid; align-items: end; padding: 0 max(12px, env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(12px, env(safe-area-inset-left,0px)); animation: fadein .25s; }
.sheet-card { max-width: 480px; width: 100%; margin: 0 auto; background: #111214; border: 1px solid #2f2b25; border-radius: 22px; padding: 22px; display: grid; gap: 14px; text-align: center; animation: rise .35s cubic-bezier(.2,.9,.2,1); }
.sheet-card h2 { font-family: var(--display); font-weight: 800; font-size: 36px; text-transform: uppercase; margin: 0; }
.sheet-card p { margin: 0; color: #bdb7a8; line-height: 1.45; }
@keyframes fadein { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
.rules { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.rules li { display: flex; justify-content: space-between; gap: 10px; background: var(--panel); border-radius: 10px; padding: 10px 12px; font-size: 14px; }
.rules li span { color: var(--gold); font-family: var(--mono); font-size: 12px; text-align: right; }
.t-art { height: 200px; display: grid; place-items: center; position: relative; }
.t-stack { position: relative; width: 120px; height: 166px; }
.t-stack img { position: absolute; inset: 0; width: 100%; border-radius: 8px; transform: rotate(calc((var(--i) - 1) * 9deg)) translateX(calc((var(--i) - 1) * 18px)); box-shadow: 0 8px 24px rgba(0,0,0,.6); }
.t-card { width: 130px; aspect-ratio: auto; perspective: none; }
.t-card .inner { position: relative; transform: none !important; }
.t-card .face { position: relative; transform: none; border-radius: 8px; overflow: hidden; backface-visibility: visible; }
.t-card .face img { width: 100%; display: block; }
.t-pts { font-family: var(--display); font-weight: 800; font-size: 110px; color: var(--gold-hi); text-shadow: 0 0 40px rgba(216,184,121,.5); animation: pulse 1s ease-in-out infinite alternate; }

/* =====================================================================
   HOST CONTROLLER v2
   ===================================================================== */
.host2 { max-width: 1180px; margin: 0 auto; padding: 16px max(16px, env(safe-area-inset-right,0px)) 40px max(16px, env(safe-area-inset-left,0px)); display: grid; gap: 16px; }
.hh { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.hh-t { font-family: var(--display); font-weight: 800; font-size: 30px; text-transform: uppercase; }
.hh-pack { margin-left: auto; font-family: var(--display); font-size: 26px; text-transform: uppercase; display: flex; align-items: center; gap: 10px; }
.hh-pack b { color: var(--gold-hi); }
.stages { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.stages li { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--panel); color: var(--muted); font-weight: 600; font-size: 14px; border: 1px solid #25221d; }
.stages li i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: #24211c; font-family: var(--mono); font-size: 12px; flex: none; }
.stages li.done { color: #8fbf9e; }
.stages li.done i { background: #1d3a27; color: var(--ok); }
.stages li.now { color: var(--paper); border-color: var(--gold); background: linear-gradient(180deg, rgba(216,184,121,.14), var(--panel)); }
.stages li.now i { background: var(--gold); color: #1a1205; }
.primary-zone { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: stretch; }
.go { border: 0; border-radius: 20px; padding: 22px 26px; text-align: left; display: grid; gap: 6px; color: #fff; min-height: 104px; transition: transform .12s, filter .2s; }
.go span { font-family: var(--display); font-weight: 800; font-size: 40px; text-transform: uppercase; line-height: 1; }
.go small { font-size: 15px; opacity: .85; }
.go:active { transform: scale(.985); }
.go.blue { background: linear-gradient(180deg, #6b93ff, var(--blue)); box-shadow: 0 12px 34px rgba(76,125,255,.35); }
.go.gold { background: linear-gradient(180deg, var(--gold-hi), var(--gold)); color: #1a1205; box-shadow: 0 12px 34px rgba(216,184,121,.3); }
.go.idle, .go.done { background: var(--panel); border: 2px dashed #3a352d; color: var(--paper); }
.go:disabled { cursor: default; }
.go-side { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.go-side .hbtn { padding: 14px 18px; font-size: 16px; }
.cards-zone { background: var(--panel); border: 1px solid #25221d; border-radius: 18px; padding: 16px; display: grid; gap: 12px; transition: opacity .3s; }
.cards-zone.off { display: none; }
.slots { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 8px; }
.entry { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.entry .search { max-width: 360px; flex: 1; }
.finish { display: inline-flex; border-radius: 12px; overflow: hidden; border: 1px solid #3b362d; }
.finish button { border: 0; background: transparent; padding: 12px 18px; font-weight: 800; font-size: 16px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.finish button small { font-family: var(--mono); font-size: 10px; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; opacity: .7; }
.finish button.on { background: var(--gold); color: #1a1205; }
.finish button[data-f="Foil"].on { background: linear-gradient(90deg, #ff9be4, #9ef4ff, #f8ff9e); color: #111; }
.entry-help { margin: 0; color: #a9a396; font-size: 14px; }
.entry-help b { color: var(--paper); }
.host2 .h-grid { max-height: 380px; }
.live-zone { display: grid; grid-template-columns: 1fr 320px; gap: 12px; }
.tiles3 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tiles3 > div { background: var(--panel); border: 1px solid #25221d; border-radius: 14px; padding: 14px; display: grid; gap: 4px; align-content: start; }
.tiles3 small { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.tiles3 b { font-family: var(--display); font-size: 36px; color: var(--gold-hi); line-height: 1; }
.tiles3 b.sm { font-size: 20px; line-height: 1.1; }
.mini-board { background: var(--panel); border: 1px solid #25221d; border-radius: 14px; padding: 14px; }
.mini-board h3 { margin: 0 0 8px; font-family: var(--display); font-size: 20px; text-transform: uppercase; color: var(--gold-hi); }
.mini-board ol { margin: 0; padding-left: 20px; display: grid; gap: 4px; }
.mini-board li { display: flex; justify-content: space-between; gap: 8px; }
.mini-board li span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-board li b { font-family: var(--mono); }
.tools { background: var(--panel); border: 1px solid #25221d; border-radius: 14px; padding: 12px 16px; }
.tools summary { cursor: pointer; font-weight: 700; color: var(--muted); }
.tool-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.tool-row label { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #bdb7a8; }
.tool-row input { width: 80px; font: 600 16px var(--body); color: var(--paper); background: var(--panel-2); border: 1px solid #3b362d; border-radius: 8px; padding: 8px; }
.keys { margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.keys b { color: var(--paper); font-family: var(--mono); }
@media (max-width: 760px) {
  .stages { grid-template-columns: repeat(2, 1fr); }
  .primary-zone, .live-zone { grid-template-columns: 1fr; }
  .go-side { flex-direction: row; }
  .slots { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .tiles3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .go span { font-size: 32px; }
}

/* cards always keep their shape inside any grid */
.card { width: 100%; height: auto; }
.card::before { content: ""; display: block; padding-top: 138.77%; }
.slots, .mini-pulls, .ov-pulls { grid-auto-rows: max-content; align-items: start; }
.tiles3 b .of { font-size: 18px; color: var(--muted); }
.t-card::before { display: none; }
.t-foil { width: 130px; position: relative; border-radius: 8px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.6), 0 0 30px rgba(158,244,255,.25); }
.t-foil img { display: block; width: 100%; }
.t-foil::after { content: ""; position: absolute; inset: 0; mix-blend-mode: color-dodge; opacity: .5; background: linear-gradient(115deg, transparent 20%, #ff7ad9 32%, #7af0ff 42%, #f6ff7a 52%, transparent 70%) 0 0/250% 250%; animation: holo 3.2s linear infinite; }

/* small-screen fixes (device matrix 22 Oct) */
html { scroll-padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px)); }
.sticky-cta { position: sticky; bottom: calc(70px + env(safe-area-inset-bottom, 0px)); z-index: 5; padding-top: 14px; margin-top: -2px; background: linear-gradient(to bottom, transparent, var(--bg) 35%); }
.backbtn { min-height: 44px; padding: 10px 12px 10px 0; }
.sheet-card { max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)); overflow-y: auto; }
.chipbtn { min-height: 44px; }
@media (max-width: 360px) {
  .m-title { font-size: 21px; }
  .m-secs { font-size: 18px; }
  .ask h2 { font-size: 32px; }
  .tile { min-height: 96px; padding: 16px 12px; }
  .tile .t-big { font-size: 34px; }
  .tile.row .t-big { font-size: 26px; }
  .pick b { font-size: 17px; }
  .join-hero h1 { font-size: 42px; }
  .me-stat { min-width: 46px; }
}
@media (max-height: 680px) {
  .mission { padding: 10px 14px; gap: 8px; }
  .m-sub { display: none; }
  .tile.row { padding: 10px 14px; }
  .join-hero .fan { height: 120px; }
  .join-hero .fan img { width: 78px; margin-left: -39px; }
  .t-art { height: 150px; }
}
@media (min-width: 900px) { .phone { max-width: 560px; } }
.sticky-cta { pointer-events: none; }
.sticky-cta .big-btn { pointer-events: auto; }

/* live stream embed */
.stream { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40; background: #000; max-width: 480px; margin: 0 auto; }
.stream-frame { position: relative; aspect-ratio: 16 / 9; background: #000; }
.stream-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.live-pill { position: absolute; left: 10px; top: 10px; font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .1em; background: #e5383b; color: #fff; padding: 2px 7px; border-radius: 4px; pointer-events: none; }
.stream-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px max(12px, env(safe-area-inset-left, 0px)); background: #0b0b0e; border-bottom: 1px solid #25221d; }
.stream-tabs { display: flex; gap: 4px; }
.stream-tabs button, .stream-toggle { border: 1px solid #34302a; background: transparent; color: var(--muted); font-weight: 700; font-size: 13px; border-radius: 99px; padding: 8px 12px; min-height: 36px; }
.stream-tabs button.on { background: var(--paper); color: #111; border-color: var(--paper); }
.stream.collapsed .stream-frame { display: none; }
@media (min-width: 900px) {
  #app.with-stream { display: grid; grid-template-columns: minmax(0, 1fr) 520px; align-items: start; min-height: 100vh; }
  #app.with-stream .stream { position: sticky; top: 0; max-width: none; margin: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 24px; background: #000; }
  #app.with-stream .stream-bar { border: 0; padding: 12px 0; }
  #app.with-stream .phone { max-width: 520px; margin: 0; height: 100vh; overflow-y: auto; }
  #app.with-stream .me-bar { left: auto; right: 0; width: 520px; }
  #app.with-stream .stream.collapsed { height: auto; }
}

/* flat card flip (replaces the 3D rotateY flip, whose face rendered black mid-turn) */
.card .inner { transform-style: flat; transition: none; transform: none !important; }
.card .face, .card .back { backface-visibility: visible; }
.card .face { transform: none; opacity: 0; }
.card .tag { transform: translateX(-50%); backface-visibility: visible; opacity: 0; }
.card.in .inner { animation: flip2d .46s cubic-bezier(.3,.7,.3,1); }
.card.in .back { animation: hideHalf .46s forwards; }
.card.in .face, .card.in .tag { animation: showHalf .46s forwards; }
.card.in.noanim .inner, .card.in.noanim .back, .card.in.noanim .face, .card.in.noanim .tag { animation: none; }
.card.in.noanim .back { opacity: 0; }
.card.in.noanim .face, .card.in.noanim .tag { opacity: 1; }
@keyframes flip2d { 0% { transform: scaleX(1); } 50% { transform: scaleX(0.02) scaleY(1.04); } 100% { transform: scaleX(1); } }
@keyframes hideHalf { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes showHalf { 0%, 49% { opacity: 0; } 50%, 100% { opacity: 1; } }
