/* The twenty new mini-games of 2026-11-13 (js/puzzles.js, js/puzzleduel.js). The seventeen table rounds live in a card
   at the TOP OF THE TABLE CHAT — nothing here ever sits on the table, so the bottle, the kiss and its buttons are never
   covered. Everything is drawn in the page (no picture was added for any of the twenty). The three duels borrow the
   duel window's own look (phase5.css .du-win) and only add their own arena. */

.pz-win {
  margin: 6px 6px 8px;
  padding: 8px 10px 10px;
  border-radius: 14px;
  background: linear-gradient(160deg, rgba(123, 47, 247, .22), rgba(0, 0, 0, .35));
  border: 1px solid rgba(255, 255, 255, .14);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  animation: pz-in .25s ease-out;
}
@keyframes pz-in { from { opacity: 0; transform: translateY(-8px); } }
.pz-head { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.pz-cardico { font-size: 18px; }
.pz-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pz-time { font-variant-numeric: tabular-nums; opacity: .85; font-style: normal; }
.pz-odds { margin-inline-start: auto; }
.pz-body { margin: 8px 0 4px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.pz-note { font-size: 12.5px; opacity: .92; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: center; text-align: center; }
.pz-note .rw-chips { margin-inline-start: 4px; }
.pz-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 12px; }
.pz-answer { font-size: 12.5px; opacity: .9; margin: 2px 0 0; }
.pz-winners { font-size: 12.5px; margin: 2px 0 0; color: #ffd86b; text-align: center; }
.pz-win.done { filter: saturate(.9); }
.pz-body.pz-win:not(.pz-sent) { outline: none; }
.pz-lp { opacity: .85; }
.pz-sent button { opacity: .75; }

/* 1 — Heart knot */
.pz-knotwrap { display: block; width: 190px; height: 190px; }
.pz-knotsvg { width: 100%; height: 100%; }
.pz-knotwrap.pz-off { pointer-events: none; opacity: .75; }
.pz-knot-l line { stroke: #ff6aa2; stroke-width: 1.8; opacity: .85; }
.pz-knot-d { fill: #2a1740; stroke: #ff8fbb; stroke-width: 1.4; cursor: pointer; }
.pz-knot-d.on { fill: #ff6aa2; }
.pz-knot-t { fill: #fff; font-size: 7px; text-anchor: middle; pointer-events: none; font-weight: 700; }

/* 2 — Mirror heart */
.pz-grid16 { display: grid; grid-template-columns: repeat(4, 38px); gap: 5px; }
.pz-cell { width: 38px; height: 38px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .06); font-size: 17px; color: transparent; }
.pz-cell.lit { background: #ff4d7e; color: #fff; }
.pz-cell.on { background: rgba(255, 77, 126, .45); color: #fff; outline: 2px solid #ffd86b; }
.pz-grid16.hid .pz-cell:not(.on):not(.lit) { background: rgba(255, 255, 255, .06); }

/* 4 — Love scales */
.pz-scales { display: flex; align-items: center; gap: 6px; }
.pz-tray { flex: 1; min-width: 92px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .06); padding: 6px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.pz-tray-in { display: flex; flex-wrap: wrap; gap: 2px; justify-content: center; min-height: 34px; align-items: center; }
.pz-w { font-size: calc(9px + var(--w) * 2.6px); line-height: 1; }
.pz-pivot { font-size: 22px; }
.pz-tray:disabled { opacity: .7; }

/* 5 — Heart key */
.pz-locket { font-size: 34px; }
.pz-keys { display: flex; gap: 8px; }
.pz-key { width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); font-size: 20px; }
.pz-key.out { opacity: .35; }
.pz-key.right { background: #2eb872; }

/* 6 — Heart rhythm */
.pz-bar { position: relative; width: 100%; max-width: 260px; height: 34px; border-radius: 9px; background: rgba(255, 255, 255, .06); display: flex; align-items: center; justify-content: space-around; }
.pz-beat { width: 16px; height: 16px; border-radius: 50%; background: rgba(255, 255, 255, .2); transition: transform .12s, background .12s; }
.pz-beat.now { background: #ffd86b; transform: scale(1.5); }
.pz-beat.hit { background: #2eb872; }
.pz-bar .pz-line { position: absolute; inset-inline-start: 50%; top: 2px; bottom: 2px; width: 2px; background: rgba(255, 255, 255, .25); }
.pz-drum { font-size: 22px; padding: 4px 16px; }

/* 7 — Heart maze */
.pz-mazegrid { display: grid; grid-template-columns: repeat(var(--w), 30px); gap: 0; background: rgba(255, 255, 255, .05); border: 2px solid rgba(255, 255, 255, .3); }
.pz-mz { width: 30px; height: 30px; position: relative; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.pz-mz.wr { border-inline-end: 2px solid rgba(255, 255, 255, .3); }
.pz-mz.wb { border-bottom: 2px solid rgba(255, 255, 255, .3); }
.pz-walker { position: absolute; font-size: 15px; }
.pz-pad { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pz-pad > div { display: flex; gap: 22px; }
.pz-pad .btn { min-width: 34px; }

/* 8 — Love word */
.pz-mixed { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.pz-letter { width: 28px; height: 32px; border-radius: 7px; background: rgba(255, 255, 255, .1); display: flex; align-items: center; justify-content: center; font-size: 17px; font-weight: 700; }
.pz-word { width: 150px; padding: 5px 8px; border-radius: 8px; border: 1px solid rgba(255, 255, 255, .22); background: rgba(0, 0, 0, .25); color: #fff; font-size: 15px; text-align: center; }

/* 9 — The gift's shadow */
.pz-shadowbox { width: 76px; height: 76px; display: flex; align-items: center; justify-content: center; }
.pz-shadow-img { width: 100%; height: 100%; object-fit: contain; filter: brightness(0) drop-shadow(0 0 4px rgba(255, 255, 255, .25)); }
.pz-opts { display: flex; gap: 6px; }
.pz-opt { width: 52px; height: 52px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(255, 255, 255, .07); padding: 3px; }
.pz-opt-img { width: 100%; height: 100%; object-fit: contain; }
.pz-opt.right { border-color: #2eb872; background: rgba(46, 184, 114, .3); }

/* 10 — The odd one out · 14 — Chocolate box */
.pz-grid9 { display: grid; grid-template-columns: repeat(3, 44px); gap: 5px; }
.pz-tile, .pz-choc { width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07); font-size: 21px; }
.pz-tile.right, .pz-choc.right { border-color: #2eb872; background: rgba(46, 184, 114, .35); }
.pz-choc.on { outline: 2px solid #ffd86b; }
.pz-box .pz-choc { background: rgba(78, 52, 46, .6); }

/* 11 — Heart ink */
.pz-ink { display: flex; flex-direction: column; gap: 5px; }
.pz-ink-row { display: flex; align-items: center; gap: 8px; }
.pz-ink-w { min-width: 74px; font-size: 16px; font-weight: 800; text-transform: uppercase; }
.pz-ink-pick { display: flex; gap: 4px; }
.pz-ink-b { width: 26px; height: 26px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); }
.pz-ink-b.on { outline: 2px solid #fff; }
.pz-ink-b.right { border-color: #fff; box-shadow: 0 0 0 2px #2eb872; }

/* 12 — Count the hearts */
.pz-flash { position: relative; width: 100%; max-width: 260px; height: 110px; border-radius: 10px; background: rgba(0, 0, 0, .3); overflow: hidden; }
.pz-fh { position: absolute; font-size: 19px; animation: pz-fh .5s ease-out forwards; }
@keyframes pz-fh { from { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1.15); } to { opacity: 0; transform: scale(.9); } }
.pz-opts4 { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pz-opts4 .btn.right { background: #2eb872; }

/* 13 — The bottle's trail */
.pz-ladderwrap { display: block; }
.pz-ladder { width: 200px; height: 170px; }
.pz-ladder .pz-lane { stroke: rgba(255, 255, 255, .3); stroke-width: 1.2; }
.pz-ladder .pz-rung line { stroke: #4dd0e1; stroke-width: 2; }
.pz-ladder .pz-lb { font-size: 8px; text-anchor: middle; }

/* 15 — Love riddle */
.pz-ask { font-size: 13.5px; text-align: center; margin: 0; }
.pz-opts-v { display: flex; flex-direction: column; gap: 5px; width: 100%; max-width: 280px; }
.pz-ansb { text-align: center; }
.pz-ansb.right { background: #2eb872; }

/* 16 — Hearts race */
.pz-race { width: 100%; max-width: 270px; display: flex; flex-direction: column; gap: 4px; }
.pz-lane-r { position: relative; height: 26px; border-radius: 7px; background: rgba(255, 255, 255, .06); display: flex; align-items: center; }
.pz-runner { font-size: 17px; transform: translateX(0); transition-property: transform; transition-timing-function: ease-in; }
.pz-runner.run { transform: translateX(215px); }
html[dir="rtl"] .pz-runner.run { transform: translateX(-215px); }
.pz-runner.won { filter: drop-shadow(0 0 6px #ffd86b); }
.pz-flag { position: absolute; inset-inline-end: 4px; font-size: 14px; opacity: .8; }

/* 17 — The twin */
.pz-twins { position: relative; width: 100%; max-width: 270px; height: 130px; border-radius: 10px; background: rgba(0, 0, 0, .25); }
.pz-th { position: absolute; border: 0; background: none; color: var(--c); font-size: calc(var(--s) * .32px); transform: rotate(var(--r)); line-height: 1; padding: 0; }
.pz-th.on { filter: drop-shadow(0 0 5px #ffd86b); }
.pz-th.right { filter: drop-shadow(0 0 6px #2eb872); }

/* 18 — Love perfume */
.pz-perf { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pz-target { width: 40px; height: 40px; border-radius: 10px; border: 2px solid rgba(255, 255, 255, .4); display: inline-block; }
.pz-bottles { display: flex; gap: 8px; }
.pz-bottle { width: 44px; height: 44px; border-radius: 10px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 35%, transparent); font-size: 20px; }
.pz-bottle.on { outline: 2px solid #ffd86b; }
.pz-bottle.right { box-shadow: 0 0 0 2px #2eb872; }

/* the chat line a round's winner gets */
.sk-pz .sk-bag, .sk-pzd .sk-bag { font-size: 17px; }

/* ——— the three duels: only their own arena (the window is the duel window) ——— */
.pzd-arena { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 6px 0; }
.pzd-rope { position: relative; width: 100%; max-width: 240px; height: 22px; border-radius: 11px; background: linear-gradient(90deg, rgba(216, 27, 96, .5), rgba(255, 255, 255, .1)); }
.pzd-knot { position: absolute; top: 0; inset-inline-start: calc(var(--p, 0) * 86%); font-size: 20px; transition: inset-inline-start .12s; }
.pzd-count { font-variant-numeric: tabular-nums; }
.pzd-pull { min-width: 96px; font-size: 15px; }
.pzd-pads { display: grid; grid-template-columns: repeat(2, 54px); gap: 7px; }
.pzd-pad { width: 54px; height: 54px; border-radius: 12px; border: 2px solid var(--c); background: color-mix(in srgb, var(--c) 22%, transparent); color: var(--c); font-size: 22px; }
.pzd-pad.tap { background: var(--c); color: #fff; transform: scale(1.06); }
.pzd-mh-row { display: flex; gap: 6px; }
.pzd-mh-row.hid { display: none; }
.pzd-mh { width: 42px; height: 42px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .07); font-size: 20px; }
.pzd-mh.on { outline: 2px solid #ffd86b; }
.pzd-mh.guess { border-style: dashed; }
.pzd-mind-end { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; opacity: .95; text-align: center; }

@media (max-width: 420px) {
  .pz-grid16 { grid-template-columns: repeat(4, 34px); }
  .pz-cell { width: 34px; height: 34px; }
  .pz-mazegrid { grid-template-columns: repeat(var(--w), 26px); }
  .pz-mz { width: 26px; height: 26px; font-size: 13px; }
  .pz-knot { width: 160px; height: 160px; }
  .pz-ladder { width: 170px; height: 150px; }
  .pzd-pads { grid-template-columns: repeat(2, 48px); }
  .pzd-pad { width: 48px; height: 48px; }
}
