/* Puzzle exchange (widgets/puzzle/puzzle.js) */
.pz { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px 22px; padding: 16px 22px 16px 16px; }
.pz__table { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-items: center; min-height: 0; }
.pz__case { display: flex; flex-direction: column; align-items: center; gap: 6px; min-height: 0; height: 100%; justify-content: center; }
.pz__who { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pz__case.is-you .pz__who { color: var(--ink); font-weight: 600; }
.pz__phone { position: relative; display: flex; flex-direction: column; gap: 3px; width: min(100%, calc((100cqh - 90px) * .5)); aspect-ratio: .5; padding: 14% 9% 9%; border-radius: 18px; background: #f4f4f2; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12), 0 6px 14px rgba(0,0,0,.08); }
[data-theme=dark] .pz__phone { background: #e9e9e6; }
.pz__case.is-you .pz__phone { box-shadow: inset 0 0 0 2px var(--a-teal), 0 8px 20px rgba(63,177,189,.25); }
.pz__slot { flex: 1; min-height: 0; padding: 0; border: 0; background: none; perspective: 400px; cursor: pointer; }
.pz__slot:disabled { cursor: default; }
.pz__chip { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .5s ease; }
.pz__chip.is-open { transform: rotateX(180deg); }
.pz__front, .pz__back { position: absolute; inset: 0; border-radius: 2px; backface-visibility: hidden; }
.pz__front { background: var(--img) center calc(var(--s) * 33.333%) / 100% 400% no-repeat; }
.pz__back { display: grid; place-items: center; padding: 2px 4px; transform: rotateX(180deg); background: #222 var(--img) center / cover; background-blend-mode: luminosity; color: #ffd54a; font-size: 8px; line-height: 1.1; text-align: center; overflow: hidden; }
.pz__back::before { content: ''; position: absolute; inset: 0; background: rgba(0,0,0,.6); z-index: -1; }
.pz__slot:not(:disabled):hover .pz__front, .pz__slot:not(:disabled):focus-visible .pz__front { box-shadow: inset 0 0 0 2px #fff, 0 0 0 2px var(--ink); }
.pz__slot:focus-visible { outline: none; }
.is-you .pz__slot.is-goal .pz__front { box-shadow: inset 0 0 0 2px var(--a-teal); }
.pz__side { align-self: center; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pz__tabs { display: flex; gap: 5px; flex-wrap: wrap; }
.pz__panel { display: flex; flex-direction: column; gap: 8px; }
.pz__panel p { margin: 0; }
.pz__goal { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.pz__thumb { width: 34px; height: 52px; border-radius: 4px; background: var(--img) center / cover; }
.pz__hint { font-size: 12.5px; color: var(--ink-2); }
.pz__stat { font-size: 12px; color: var(--muted); }
.pz__q { font-size: clamp(16px, 5.4cqh, 22px); line-height: 1.2; font-weight: 600; letter-spacing: -.01em; }
.pz__btns { display: flex; gap: 6px; flex-wrap: wrap; }
.pz__aha { font-size: clamp(36px, 14cqh, 60px) !important; line-height: 1; font-weight: 800; letter-spacing: -.03em; color: var(--a-teal); animation: pz-pop .6s cubic-bezier(.3,.8,.3,1.5) both; }
@keyframes pz-pop { from { transform: scale(.4); opacity: 0; } }
.pz__qs { margin: 0; padding: 0 0 0 16px; font-size: 12px; color: var(--ink-2); display: grid; gap: 3px; }
.pz.is-done .is-you .pz__phone { animation: pz-glow 1.2s ease 2; }
@keyframes pz-glow { 50% { box-shadow: inset 0 0 0 2px var(--a-teal), 0 0 0 10px rgba(63,177,189,.25); } }
.pz__said ul { margin: 4px 0 0; padding: 0; list-style: none; display: flex; flex-wrap: wrap; gap: 4px; }
.pz__said li { padding: 3px 9px; border-radius: 100px; font-size: 11.5px; }
.pz__said .aha-eye { display: flex; align-items: center; gap: 5px; }
.pz__said--merit li { background: color-mix(in srgb, var(--a-teal) 20%, transparent); }
.pz__said--defect li { background: color-mix(in srgb, #f15a24 16%, transparent); }
.pz__said--seen li { background: color-mix(in srgb, #f7931e 22%, transparent); }
.pz__said--next li { background: color-mix(in srgb, var(--ink) 9%, transparent); }
/* Narrow frames (≤ 640px; class set by widgets/aha-kit/kit.js). */
.pz.aha--w640 { grid-template-columns: 1fr; grid-template-rows: auto auto; align-content: start; padding: 12px; }
.aha--w640 .pz__case { height: auto; }
.aha--w640 .pz__table { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.aha--w640 .pz__phone { width: 100%; border-radius: 12px; }
.aha--w640 .pz__who { font-size: 10px; }
.aha--w640 .pz__back { font-size: 6.5px; }
.is-vertical .pz { grid-template-rows: auto auto; align-content: start; }
.is-vertical .pz__case { height: auto; }
.is-vertical .pz__phone { width: 100%; max-width: 150px; }
