/* Psychology. Everything scoped under .pgy-*. */

.pgy-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; }

/* 0. the prison, the bars slam */
.pgy-cell { position: relative; flex: 1; width: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pgy-cell img { width: 100%; max-width: 520px; height: auto; filter: drop-shadow(0 14px 24px rgba(123, 92, 253, .3)); }
.pgy-bars { position: absolute; inset: 0; background: repeating-linear-gradient(90deg, transparent 0 34px, #5a5470 34px 44px, #8c86a6 44px 46px, transparent 46px 60px); transform: translateX(-102%); opacity: .92; }
.pgy-sc.slam .pgy-bars { animation: pgy-slam .45s cubic-bezier(.5, 0, .7, 1.4) forwards; }
@keyframes pgy-slam { to { transform: none; } }

/* teens */
.pgy-teen { position: relative; display: flex; justify-content: center; }
.pgy-teen img { height: 100%; width: auto; max-width: 100%; object-fit: contain; transition: filter .35s, opacity .35s; }

/* 1. the film's 17 */
.pgy-17 { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 6px 2px; width: 100%; max-width: 340px; }
.pgy-17 .pgy-teen { height: 64px; min-width: 0; }
.pgy-17 .pgy-teen img { width: 100%; object-fit: contain; }
.pgy-17 .pgy-teen img { filter: grayscale(1) brightness(.6); }
.pgy-17 .pgy-teen.ok img { filter: drop-shadow(0 0 8px rgba(255, 200, 80, .75)); }
.pgy-17 .pgy-teen.off img { filter: grayscale(1) brightness(.45); opacity: .55; }
.pgy-tally { font: 700 15px var(--sans); color: var(--dim); }
.pgy-tally b { color: var(--gold); font-size: 22px; }

/* 2. two cards */
.pgy-pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; width: 100%; max-width: 340px; }
.pgy-card { display: flex; flex-direction: column; align-items: center; gap: 4px; min-height: 170px; padding: 10px 8px; border-radius: 18px; background: var(--raised); border: 1.5px solid var(--line-strong); text-align: center; }
.pgy-card span { font: 800 12px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--dim); }
.pgy-card b { font: 700 24px var(--serif); color: var(--gold); }
.pgy-card small { font: 600 13px/1.2 var(--sans); color: var(--dim); }
.pgy-trio { display: flex; justify-content: center; height: 70px; }
.pgy-trio img { height: 100%; width: auto; margin: 0 1px; }
.pgy-card.home { justify-content: center; border-style: dashed; background: transparent; }
.pgy-card.home .pgy-q { font: 700 54px var(--serif); color: var(--faint); text-transform: none; letter-spacing: 0; }
.pgy-card.home.on { justify-content: flex-start; border-style: solid; background: var(--raised); animation: pgy-pop .4s cubic-bezier(.3, 1.4, .5, 1); }
.pgy-card.home.on .pgy-trio img { filter: grayscale(.4); }
.pgy-card.home.on b { color: var(--text); }
@keyframes pgy-pop { from { transform: scale(.92); opacity: .4; } }

.pgy-hero { width: 100%; max-width: 260px; height: auto; filter: drop-shadow(0 12px 22px rgba(123, 92, 253, .3)); }
.pgy-hero.wide { max-width: 330px; }

/* 4-5. the split */
.pgy-split { position: relative; width: 100%; max-width: 340px; height: 162px; }
.pgy-split .pgy-teen { position: absolute; width: 12.5%; height: 58px; transition: left .7s cubic-bezier(.5, 0, .3, 1), top .7s cubic-bezier(.5, 0, .3, 1); }
.pgy-zone { position: absolute; top: 0; bottom: 0; width: calc(50% - 4px); border-radius: 14px; border: 1.5px dashed var(--line-strong); opacity: 0; transition: opacity .4s .5s; }
.pgy-zone.v { left: 0; }
.pgy-zone.h { right: 0; }
.pgy-split.split .pgy-zone { opacity: 1; }
.pgy-zone span { position: absolute; left: 0; right: 0; top: 4px; display: flex; align-items: center; justify-content: center; gap: 5px; font: 800 12px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--text); }
.pgy-zone em { position: absolute; left: 0; right: 0; bottom: -26px; text-align: center; font: 800 16px var(--sans); font-style: normal; color: var(--gold); }
.pgy-face { position: absolute; top: -4px; right: 0; width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #ffe08a, var(--gold)); color: #3a2600; font: 800 12px/22px var(--sans); text-align: center; opacity: 0; transform: scale(.4) rotateY(180deg); transition: opacity .3s, transform .5s; }
.pgy-teen.flip .pgy-face, .pgy-split.split .pgy-face { opacity: 1; transform: none; }
.pgy-teen.caught img { filter: grayscale(1) brightness(.5); }
.pgy-teen.caught::after { content: ''; position: absolute; left: 50%; bottom: 2px; width: 26px; height: 26px; margin-left: -13px; border-radius: 50%; background: #2a2340 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='7' cy='12' r='4' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Ccircle cx='17' cy='12' r='4' fill='none' stroke='%23fff' stroke-width='2'/%3E%3Cpath d='M11 12h2' stroke='%23fff' stroke-width='2'/%3E%3C/svg%3E") center/18px no-repeat; border: 1.5px solid #fff; animation: pgy-pop .35s cubic-bezier(.3, 1.4, .5, 1); }
.pgy-ic { display: inline-block; width: 16px; height: 16px; background-position: center; background-repeat: no-repeat; background-size: contain; }
.pgy-ic.bars { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Crect x='1' y='1' width='14' height='14' rx='2' fill='none' stroke='%23c9c2e8' stroke-width='1.6'/%3E%3Cpath d='M5 1v14M8 1v14M11 1v14' stroke='%23c9c2e8' stroke-width='1.6'/%3E%3C/svg%3E"); }
.pgy-ic.house { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M2 8l6-6 6 6v7H2z' fill='none' stroke='%23c9c2e8' stroke-width='1.6' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.pgy-note { margin-top: 30px; font: 600 12px var(--sans); color: var(--faint); }

.pgy-coin { position: relative; width: 76px; height: 76px; margin-top: 4px; border-radius: 50%; border: none; background: radial-gradient(circle at 35% 30%, #fff2c2, #ffd36a 40%, var(--gold-deep) 100%); box-shadow: 0 8px 22px rgba(255, 190, 60, .35), inset 0 -4px 0 rgba(0, 0, 0, .15); cursor: pointer; }
.pgy-coin i { position: absolute; inset: 14px; border-radius: 50%; border: 2px solid rgba(120, 80, 0, .35); }
.pgy-coin.spin { animation: pgy-spin .9s cubic-bezier(.3, .6, .4, 1); }
.pgy-coin:disabled { opacity: .6; }
@keyframes pgy-spin { 0% { transform: translateY(0) rotateX(0); } 50% { transform: translateY(-50px) rotateX(900deg); } 100% { transform: translateY(0) rotateX(1800deg); } }

/* 3. three pickers */
.pgy-pickers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; }
.pgy-picker { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-height: 200px; padding: 8px 4px 10px; border-radius: 18px; background: var(--raised); border: 1.5px solid var(--line-strong); color: var(--text); font: 700 13px/1.2 var(--sans); cursor: pointer; }
.pgy-picker img { height: 150px; width: 100%; object-fit: contain; filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .45)); }
.pgy-coinface { display: block; width: 84px; height: 84px; margin-bottom: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff2c2, #ffd36a 40%, var(--gold-deep) 100%); box-shadow: 0 8px 22px rgba(255, 190, 60, .35), inset 0 -4px 0 rgba(0, 0, 0, .15); }
.pgy-picker.right { border-color: var(--mint); }
.pgy-picker.wrong { border-color: var(--red); }

@media (max-height: 700px) {
  .pgy-17 .pgy-teen { height: 54px; }
  .pgy-card { min-height: 150px; }
  .pgy-trio { height: 58px; }
  .pgy-picker { min-height: 168px; }
  .pgy-picker img { height: 120px; }
  .pgy-coinface { width: 70px; height: 70px; margin-bottom: 24px; }
}
