/* Social Psychology. Everything scoped under .spy-*. */

.spy-sc { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.spy-sc.open { flex: 1; justify-content: center; }

/* a room with people standing in front of it */
.spy-room { position: relative; width: 100%; max-width: 360px; height: 250px; }
.spy-sc.open .spy-room { height: 340px; }
.spy-bg { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 150px; object-fit: contain; opacity: .9; transition: opacity .22s; }
.spy-sc.open .spy-bg { height: 210px; }
.spy-bg.out { opacity: 0; }
.spy-tag { position: absolute; left: 50%; top: 0; transform: translateX(-50%); padding: 3px 12px; border-radius: 99px; background: rgba(20, 14, 40, .78); border: 1px solid var(--line-strong); font: 800 12px var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--text); white-space: nowrap; }
.spy-ppl { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: center; align-items: flex-end; gap: 28px; }

/* Sam alone, on the first screen */
.spy-solo { position: relative; height: 230px; display: flex; justify-content: center; }
.spy-solo img { height: 100%; width: auto; filter: drop-shadow(0 12px 20px rgba(0, 0, 0, .45)); }
.spy-bub { position: absolute; right: -78px; top: 6px; padding: 6px 12px; border-radius: 16px 16px 16px 4px; background: #fff; color: #2a2340; font: 800 14px var(--sans); white-space: nowrap; transition: transform .3s, font-size .3s; }
.spy-solo.loud .spy-bub { font-size: 20px; animation: spy-shake .35s 4 alternate; }
@keyframes spy-shake { from { transform: rotate(-4deg) scale(1); } to { transform: rotate(4deg) scale(1.08); } }

/* a person and their volume */
.spy-p { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 120px; }
.spy-fig { height: 140px; display: flex; align-items: flex-end; }
.spy-fig img { height: 100%; width: auto; filter: drop-shadow(0 10px 16px rgba(0, 0, 0, .45)); }
.spy-p > b { font: 700 14px var(--sans); color: var(--text); }
.spy-vol { display: flex; align-items: center; gap: 6px; width: 100%; }
.spy-spk { flex: none; width: 18px; height: 18px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3 9h4l5-4v14l-5-4H3z' fill='%23c9c2e8'/%3E%3Cpath d='M16 8c1.5 1.2 1.5 6.8 0 8M19 5c3 2.5 3 11.5 0 14' stroke='%23c9c2e8' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat; }
.spy-bar { flex: 1; height: 12px; border-radius: 6px; background: rgba(255, 255, 255, .08); border: 1px solid var(--line-strong); overflow: hidden; }
.spy-bar i { display: block; height: 100%; width: 0; border-radius: 6px; background: linear-gradient(90deg, var(--violet), var(--violet-bright)); transition: width .6s cubic-bezier(.3, 1.3, .5, 1); }
.spy-p.loud .spy-bar i, .spy-card.loud .spy-bar i { background: linear-gradient(90deg, var(--gold-deep), #ffe08a); }
.spy-note { font: 600 12px var(--sans); color: var(--faint); }

/* room tiles under the thumb */
.spy-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 360px; margin: 0 auto 8px; }
.spy-tile { display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 64px; padding: 4px 2px 6px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line-strong); color: var(--text); font: 700 12px var(--sans); cursor: pointer; }
.spy-tile img { height: 36px; width: 100%; object-fit: contain; }
.spy-tile.on { border-color: var(--violet-bright); background: rgba(123, 92, 253, .25); }

/* two cards: who's louder */
.spy-two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; width: 100%; max-width: 340px; }
.spy-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 8px 10px; border-radius: 18px; background: var(--raised); border: 1.5px solid var(--line-strong); color: var(--text); cursor: pointer; overflow: hidden; }
.spy-cbg { width: 100%; height: 70px; object-fit: contain; opacity: .85; }
.spy-cp { height: 110px; width: auto; margin-top: -30px; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, .45)); }
.spy-card b { font: 700 14px var(--sans); }
.spy-card.right { border-color: var(--mint); }
.spy-card.wrong { border-color: var(--red); }

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

/* two line-ups: the test's cheaters, then the game's */
.spy-line { position: relative; width: 100%; max-width: 330px; padding: 6px 8px 8px; border-radius: 16px; background: var(--raised); border: 1.5px solid var(--line-strong); }
.spy-line > span { display: block; font: 800 12px var(--sans); letter-spacing: .05em; text-transform: uppercase; color: var(--dim); text-align: center; }
.spy-line > div { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; margin-top: 4px; }
.spy-kid { position: relative; height: 92px; min-width: 0; display: flex; justify-content: center; }
.spy-kid img { height: 100%; width: 100%; object-fit: contain; filter: drop-shadow(0 6px 10px rgba(0, 0, 0, .4)); }
.spy-kid em { position: absolute; bottom: -2px; left: 50%; transform: translateX(-50%); padding: 1px 8px; border-radius: 99px; font: 800 12px var(--sans); font-style: normal; white-space: nowrap; }
.spy-kid em.again { background: var(--violet-bright); color: #fff; }
.spy-kid em.new { background: var(--gold); color: #2a1a00; }
.spy-line.game { border-style: dashed; background: transparent; }
.spy-line.game > div { opacity: 0; transition: opacity .5s; }
.spy-line.game::after { content: '?'; position: absolute; left: 0; right: 0; top: 34px; text-align: center; font: 700 44px var(--serif); color: var(--faint); transition: opacity .3s; }
.spy-line.game.on { border-style: solid; background: var(--raised); }
.spy-line.game.on > div { opacity: 1; }
.spy-line.game.on::after { opacity: 0; }

/* a strip of days */
.spy-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; max-width: 340px; }
.spy-day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 12px; background: var(--raised); border: 1.5px solid var(--line-strong); opacity: .55; transition: opacity .4s, border-color .4s; }
.spy-day img { width: 100%; height: 50px; object-fit: contain; }
.spy-day span { font: 700 12px var(--sans); color: var(--dim); }
.spy-strip.lit .spy-day { opacity: 1; border-color: var(--violet-bright); }

/* the kitchen and three fixes */
.spy-kit img { width: 100%; max-width: 230px; height: auto; filter: drop-shadow(0 10px 18px rgba(123, 92, 253, .25)); }
.spy-kit { display: flex; justify-content: center; width: 100%; }
.spy-notes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 340px; }
.spy-sticky { min-height: 84px; padding: 8px 6px; border-radius: 4px 4px 14px 4px; border: none; background: #fff3a8; color: #3b3010; font: 700 13px/1.25 var(--sans); text-align: left; box-shadow: 0 6px 14px rgba(0, 0, 0, .35); cursor: pointer; }
.spy-sticky.ad { background: #d9ecff; color: #14304d; transform: rotate(1.5deg); }
.spy-sticky.lazy { transform: rotate(-2deg); }
.spy-sticky.rack { background: #d8f5e1; color: #10361f; transform: rotate(-.8deg); }
.spy-sticky.right { outline: 3px solid var(--mint); }
.spy-sticky.wrong { outline: 3px solid var(--red); }

@media (max-height: 700px) {
  .spy-room { height: 226px; }
  .spy-sc.open .spy-room { height: 300px; }
  .spy-sc.open .spy-bg { height: 180px; }
  .spy-bg { height: 128px; }
  .spy-fig { height: 122px; }
  .spy-solo { height: 200px; }
  .spy-kid { height: 54px; }
  .spy-line { padding: 4px 8px 6px; }
  .spy-line > div { margin-top: 2px; }
  .spy-line.game::after { top: 18px; font-size: 36px; }
  .spy-cp { height: 92px; }
  .spy-kit img { max-width: 180px; }
}
