/* Bacteria Forever V2 « Le second » — on top of bf.css (neon on black). Every game screen holds in 100svh without
   scrolling (CONSTATS E1): the dish takes the width, the hand what is left; small phones lose the hints first. */
.game.v2 { height: calc(100svh - 12px - max(18px, env(safe-area-inset-bottom))); display: flex; flex-direction: column; gap: 6px; overflow: hidden; }
#app.v2play { padding: 6px 8px 0; }
.top2 { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 14px; }
.top2 .rankme { text-align: center; color: var(--muted); }
.top2 .rankme b { color: #fff; font-size: 17px; text-shadow: 0 0 8px var(--cyan); }
.top2 .hdr { background: none; border: 1px solid var(--line); border-radius: 999px; width: 34px; height: 34px; padding: 0; }
.strip { display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.strip span { background: rgba(255, 61, 242, .08); border: 1px solid rgba(255, 61, 242, .45); border-radius: 10px; padding: 4px 8px; }
.strip .closing { background: rgba(255, 180, 46, .12); border-color: #ffb52e; color: #ffe2a8; font-weight: 700; text-align: center; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 14px rgba(255, 180, 46, .6); } }

.board2 { flex: 0 1 auto; min-height: 0; display: flex; justify-content: center; }
.board2 .dish.petri.v2 { width: min(100%, 50svh); max-width: none; height: auto; }
.board2.picking .dish { outline: 2px dashed var(--magenta); outline-offset: 4px; border-radius: 50%; }
.dish.v2 .hex.own.k0 { fill: color-mix(in srgb, var(--c) 48%, #04060c); }
.dish.v2 .hex.own.k1 { fill: color-mix(in srgb, var(--c) 14%, #04060c); stroke-width: 1.4; }
.dish.v2 .hex.own.k2 { fill: color-mix(in srgb, var(--c) 30%, #04060c); stroke-dasharray: 2 1.5; }
.hex.own.served { stroke: #fff; stroke-width: 2.4; filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 3px var(--c)); }
.hex.own.born { animation: hatch .5s ease-out both; }
@keyframes hatch { from { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
.hex.own.dead { animation: burst .6s ease-out forwards; }
@keyframes burst { to { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(1.8); } }
.clabel2 text { text-anchor: middle; font-weight: 800; paint-order: stroke; stroke: #04060c; stroke-width: 3.5px; }
.clabel2 .nm { fill: #fff; font-size: 13px; }
.clabel2.me .nm { fill: var(--cyan); }
.clabel2 .badge { fill: #ffe2a8; font-size: 10px; }
.clabel2 .sub { font-size: 13px; fill: #e9fbff; }
.clabel2 .sub.good { fill: var(--good); }
.clabel2 .sub.bad { fill: var(--bad); }

.hand { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; gap: 5px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 6px 8px 8px; overflow: hidden; }
.hand .phase { margin: 0; text-align: center; font-size: 15px; }
.hand .hint { font-size: 13px; }
.center { text-align: center; justify-content: center; }
.aim { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr); grid-template-rows: auto 1fr auto; gap: 4px; align-items: center; flex: 1 1 auto; min-height: 0; }
.aim .up { grid-column: 2; grid-row: 1; }
.aim .left { grid-column: 1; grid-row: 2; }
.aim .cardslot { grid-column: 2; grid-row: 2; display: flex; justify-content: center; align-items: center; min-height: 0; height: 100%; touch-action: none; -webkit-touch-callout: none; user-select: none; }
.aim .right { grid-column: 3; grid-row: 2; }
.aim .keep { grid-column: 2; grid-row: 3; }
.aimb { min-height: 40px; background: rgba(4, 6, 12, .6); border: 1px solid var(--line); border-radius: 12px; color: var(--ink); font-size: 13px; padding: 4px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.aimb span { font-weight: 700; }
.aimb.on { border-color: var(--cyan); box-shadow: 0 0 10px rgba(34, 240, 255, .55); color: #dffcff; }
.aimb:disabled { opacity: .35; }
.aim:not(.live) .cardslot { opacity: .85; }

/* The card: cyberpunk neon, its colour the temperature's regime (white, blue, yellow, orange, red). */
.card2 { position: relative; width: min(150px, 38vw); aspect-ratio: 5 / 6; max-height: 100%; border-radius: 16px; border: 2px solid var(--c); background:
  linear-gradient(160deg, color-mix(in srgb, var(--c) 22%, #04060c) 0%, #04060c 55%), repeating-linear-gradient(0deg, transparent 0 3px, rgba(255, 255, 255, .03) 3px 4px);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 18px color-mix(in srgb, var(--c) 30%, transparent);
  display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 2px; text-align: center; padding: 6px; transition: transform .12s; clip-path: polygon(0 0, 88% 0, 100% 12%, 100% 100%, 12% 100%, 0 88%); }
.card2 .kicker { position: absolute; top: 6px; left: 10px; font: 700 11px/1 ui-monospace, Menlo, monospace; color: var(--c); letter-spacing: 1px; }
.card2 .el { font-size: 18px; color: #fff; text-shadow: 0 0 8px var(--c); line-height: 1.1; }
.card2 .temp { font: 800 30px/1 ui-monospace, Menlo, monospace; color: var(--c); text-shadow: 0 0 12px var(--c); }
.card2 small { color: color-mix(in srgb, var(--c) 70%, #fff); font-size: 12px; }
.card2.bonus .icon { font-size: 30px; }
.card2.bonus small { font-size: 11px; line-height: 1.2; }
.card2.mini { width: 70px; padding: 3px; border-width: 1.5px; }
.card2.mini .el { font-size: 11px; } .card2.mini .temp { font-size: 15px; } .card2.mini small, .card2.mini .kicker { display: none; }
.cardslot.held .card2 { box-shadow: 0 0 26px var(--c); }
.verdict2 { margin: 0; text-align: center; font-size: 14px; }
.tools { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; }
.tools .chip { font-size: 13px; padding: 6px 10px; min-height: 36px; touch-action: none; -webkit-touch-callout: none; user-select: none; }
.tools .chip.bonus { border-color: #c77dff; box-shadow: 0 0 8px rgba(199, 125, 255, .5); }

/* The firing: the order, my window lit, the next one warned in orange. */
.firerow { display: flex; gap: 4px; justify-content: center; flex-wrap: wrap; font-size: 12px; }
.firerow span { border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); }
.firerow span.done { opacity: .45; }
.firerow span.now { color: #fff; border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.firerow span.me { font-weight: 800; }
.wbar { height: 6px; border-radius: 999px; background: #0e1a2e; overflow: hidden; }
.wbar i { display: block; height: 100%; width: 0; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.game.v2.mywindow { box-shadow: inset 0 0 0 4px var(--cyan), inset 0 0 40px rgba(34, 240, 255, .5); border-radius: 18px; }
.game.v2.mywindow .go { color: var(--cyan); text-shadow: 0 0 10px var(--cyan); font-size: 16px; }
.game.v2.soon { box-shadow: inset 0 0 0 4px #ffb52e, inset 0 0 30px rgba(255, 181, 46, .45); border-radius: 18px; }

.mine2 { margin: 0; text-align: center; font-size: 15px; }
.others { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; font-size: 13px; }
.others span { border: 1px solid color-mix(in srgb, var(--c) 60%, transparent); border-radius: 999px; padding: 2px 8px; }

/* My needs, while the finger holds the button. */
.sheet { position: fixed; left: 8px; right: 8px; bottom: calc(70px + env(safe-area-inset-bottom)); z-index: 8; background: #0a1020f2; border: 1px solid var(--cyan); border-radius: 16px; padding: 10px 12px; box-shadow: 0 0 20px rgba(34, 240, 255, .4); }
.sheet h3 { margin: 0 0 6px; }
.needs { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; font-size: 14px; }
.needs li { display: flex; justify-content: space-between; gap: 8px; border-left: 3px solid var(--line); padding-left: 8px; }
.needs .r-super, .needs .r-moyen, .needs .r-petit { border-color: var(--good); }
.needs .r-poison, .needs .r-lent { border-color: var(--bad); }

/* The cards in flight, outside #app (a new view never restarts them). */
.flight { position: fixed; left: 0; top: 0; z-index: 7; pointer-events: none; transition: transform .7s cubic-bezier(.2, .8, .2, 1), opacity .7s; }
.flight .card2 { width: 70px; }
.flight.big .card2 { width: 120px; }

/* The lobby: the table seen from above. */
.qr.small { width: min(200px, 56vw); }
.tablemap { width: 100%; max-height: 190px; }
.tablemap .tabletop { fill: rgba(34, 240, 255, .05); stroke: rgba(34, 240, 255, .4); stroke-width: 1.5; }
.tablemap .seat circle { fill: #0a1020; stroke: var(--magenta); stroke-width: 2; }
.tablemap .seat.me circle { stroke: var(--cyan); fill: rgba(34, 240, 255, .25); }
.tablemap text { fill: #e9fbff; font-size: 14px; font-weight: 700; }
.row.wrap { flex-wrap: wrap; }
.row2 { display: flex; gap: 8px; align-items: center; justify-content: center; }
.end.v2 { gap: 6px; }
.end.v2 .victory { margin-top: 4px; }
.end.v2 .victory h1 { font-size: 34px; }
.end.v2 .victory p { margin: 2px 0 0; font-size: 14px; }
.end.v2 .dish.petri { width: min(46vw, 24svh); max-width: none; margin: 0 auto; }
.end.v2 .ranks { gap: 3px; }
.end.v2 .rank { padding: 3px 10px; border-radius: 10px; grid-template-columns: 34px 1fr auto; row-gap: 0; font-size: 14px; }
.end.v2 .rank small { font-size: 11px; line-height: 1.25; }
.end.v2 .rank small b { color: #fff; text-shadow: none; }
.end.v2 .neon { padding: 10px 14px; }
.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* The end on a small phone: the dish goes first (the ranking is what one reads). */
@media (max-height: 600px) { .end.v2 .dish { display: none; } .end.v2 .victory h1 { font-size: 28px; } }
@media (max-height: 720px) { .end.v2.n7 .dish, .end.v2.n8 .dish { display: none; } }

/* Small phones (320 × 568, 375 × 667): the hints go first, then the verdict shrinks (E1: hide a whole element). */
@media (max-height: 700px) {
  .board2 .dish.petri.v2 { width: min(100%, 46svh); }
  .hand .hint:not(.center) { display: none; }
  .card2 { width: min(120px, 32vw); }
  .card2 .temp { font-size: 24px; }
  .aimb { min-height: 36px; }
}
@media (max-height: 600px) {
  .board2 .dish.petri.v2 { width: min(100%, 42svh); }
  .top2 { padding: 2px 4px 2px 10px; }
  .top2 .hdr { width: 30px; height: 30px; }
  .aimb { min-height: 32px; }
  .hand .hint.center { font-size: 12px; }
  .strip .ev { display: none; }
  .tools .chip small { display: none; }
  .verdict2 { font-size: 12px; }
}
