/* ================= Caption This =================
   A darkroom gallery: a big photo in a gold gallery frame under a spotlight, captions arriving as speech bubbles,
   the winning line stamped across the photo in meme letters. */
.cp { position: relative; flex: 1; margin: -1.5vh -3vw -2.5vh; padding: 1.5vh 3vw 2.5vh; min-height: 0; display: grid; overflow: hidden; font-family: var(--display);
    background: radial-gradient(ellipse 50% 60% at 40% 45%, color-mix(in srgb, var(--violet) 22%, transparent), transparent 70%); }
.cp i, .cp b, .cp em { font-style: normal; }
/* the frame */
.cp-frame { position: relative; display: grid; align-content: center; justify-items: center; padding: 2vh; border-radius: 1.4vh; background: linear-gradient(135deg, #6b4a1a, #c9a25a 30%, #7a5a22 55%, #d9b96a 80%, #6b4a1a);
    box-shadow: 0 0 0 .4vh #2a1c05, 0 3vh 8vh rgba(0, 0, 0, .7), inset 0 0 0 .6vh rgba(255, 240, 200, .35); }
.cp-photo { position: relative; width: 100%; aspect-ratio: 4 / 3; border-radius: .6vh; overflow: hidden; background: #0b0810; box-shadow: inset 0 0 0 .5vh #f5efe0, inset 0 0 4vh rgba(0, 0, 0, .6); }
.cp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-photo.blank { background: linear-gradient(135deg, #2a1f45, #120c22); display: grid; place-items: center; }
.cp-photo.blank i { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .25), transparent 70%); animation: cp-float 6s ease-in-out infinite alternate; }
.cp-photo.blank i:nth-child(1) { width: 40%; height: 50%; left: 8%; top: 20%; } .cp-photo.blank i:nth-child(2) { width: 30%; height: 40%; right: 10%; top: 10%; animation-delay: -2s; } .cp-photo.blank i:nth-child(3) { width: 50%; height: 30%; left: 25%; bottom: 5%; animation-delay: -4s; }
@keyframes cp-float { to { transform: translate(2vh, -1vh) scale(1.08); } }
.cp-stamp { position: absolute; left: 3vh; right: 3vh; bottom: 3.6vh; text-align: center; font-weight: 900; font-size: 5vh; line-height: 1.05; text-transform: uppercase; color: #fff; opacity: 0;
    text-shadow: 0 0 .4vh #000, .3vh .3vh 0 #000, -.3vh -.3vh 0 #000, .3vh -.3vh 0 #000, -.3vh .3vh 0 #000, 0 .8vh 1.6vh rgba(0, 0, 0, .8); text-wrap: balance; }
.cp-stamp.on { animation: cp-stamp .7s cubic-bezier(.2, 1.6, .4, 1) both; }
.cp-stamp.pop { animation: cp-stamp .6s cubic-bezier(.2, 1.6, .4, 1) both; }
@keyframes cp-stamp { 0% { opacity: 0; transform: scale(2.2) rotate(-6deg); } 60% { opacity: 1; transform: scale(.96) rotate(1deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
.cp-frame.demo .cp-stamp { font-size: 3.2vh; bottom: 3vh; }
.cp-by { margin-top: 1.2vh; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2vh; color: #2a1c05; }
.cp-winner { position: absolute; left: 50%; top: -3vh; transform: translateX(-50%); padding: .8vh 2vw; border-radius: 99px; white-space: nowrap; font-weight: 900; font-size: 3.4vh; color: #1a1000;
    background: linear-gradient(180deg, #fff6c8, var(--gold)); box-shadow: 0 0 4vh color-mix(in srgb, var(--gold) 70%, transparent); animation: cp-stamp .6s cubic-bezier(.2, 1.6, .4, 1) both; }
/* bubbles */
.cp-bubbles { display: grid; gap: 1vh; align-content: start; min-height: 0; overflow: hidden; }
.cp-bubble { position: relative; padding: 1.2vh 1.4vw 1.2vh 6.4vh; border-radius: 2vh 2vh 2vh .4vh; font-weight: 800; font-size: 2.6vh; line-height: 1.15; color: #150c2c; background: linear-gradient(180deg, #fffdf6, #efe6d2);
    box-shadow: 0 .8vh 2vh rgba(0, 0, 0, .45); animation: cp-bubblein .5s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: calc(var(--k) * .08s); }
@keyframes cp-bubblein { from { transform: translateX(-3vw) scale(.7); opacity: 0; } }
.cp-bubble .n { position: absolute; left: 1.2vh; top: 50%; transform: translateY(-50%); width: 4vh; height: 4vh; display: grid; place-items: center; border-radius: 50%; font-size: 2.2vh; color: #2a1800; background: var(--gold); }
.cp-bubble em { position: absolute; right: -1vh; top: -1.4vh; min-width: 4.2vh; height: 4.2vh; display: grid; place-items: center; padding: 0 .8vh; border-radius: 99px; font-size: 2.3vh; color: #fff; background: var(--pumpkin); box-shadow: 0 0 2vh color-mix(in srgb, var(--pumpkin) 60%, transparent); animation: cp-stamp .5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(.3s + var(--k) * .1s); }
.cp-bubble.win { background: linear-gradient(180deg, #fff6c8, #ffd97a); box-shadow: 0 0 0 .4vh var(--gold), 0 0 4vh color-mix(in srgb, var(--gold) 70%, transparent); font-size: 3vh; }
.cp-bubble.sm { font-size: 2vh; padding-top: .8vh; padding-bottom: .8vh; }
.cp-bubble.ghost { display: flex; gap: .8vh; padding-left: 1.6vw; background: rgba(255, 255, 255, .12); box-shadow: inset 0 0 0 .2vh rgba(255, 255, 255, .15); }
.cp-bubble.ghost i { width: 1.4vh; height: 1.4vh; border-radius: 50%; background: rgba(255, 255, 255, .7); animation: cp-dots 1.2s ease-in-out infinite; }
.cp-bubble.ghost i:nth-child(2) { animation-delay: .2s; } .cp-bubble.ghost i:nth-child(3) { animation-delay: .4s; }
@keyframes cp-dots { 0%, 60%, 100% { transform: translateY(0); opacity: .4; } 30% { transform: translateY(-.6vh); opacity: 1; } }
/* waiting */
.cp-wait { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) 46vh; gap: 2vw; align-items: center; min-height: 0; }
.cp-wait .wt-qr { z-index: 50; }
.cp-wmain { display: grid; justify-items: center; align-content: center; gap: 2vh; min-height: 0; }
.cp-sign { display: flex; align-items: center; gap: 1.4vw; }
.cp-sign span { font-size: 10vh; line-height: 1; filter: drop-shadow(0 1vh 2vh rgba(0, 0, 0, .6)); animation: cp-tilt 3s ease-in-out infinite alternate; }
@keyframes cp-tilt { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
.cp-sign b { font-weight: 900; font-size: 9vh; line-height: 1; color: #fff; text-shadow: 0 .8vh 0 rgba(0, 0, 0, .5), 0 0 5vh color-mix(in srgb, var(--gold) 50%, transparent); }
.cp-demo { display: grid; grid-template-columns: 40vh minmax(0, 1fr); gap: 2vw; align-items: center; width: min(100%, 100vh); }
.cp-bubbles.demo .cp-bubble { padding-left: 1.6vw; font-size: 2.3vh; animation: cp-demobub 8s ease-in-out infinite; animation-delay: calc(var(--k) * 2s); opacity: 0; }
@keyframes cp-demobub { 0% { opacity: 0; transform: translateX(-3vw); } 8%, 60% { opacity: 1; transform: none; } 70%, 100% { opacity: 0; transform: translateX(2vw); } }
.cp-how { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1vh 1.2vw; width: min(100%, 100vh); }
.cp-how span { padding: 1.1vh 1.4vw; border-radius: 1.6vh; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.2vh; color: #fff; background: rgba(10, 8, 30, .7); box-shadow: inset 0 0 0 .2vh rgba(255, 255, 255, .12); }
.cp-roster, .cp-note { padding: .9vh 2.2vw; border-radius: 99px; font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.4vh; color: #1a1000; background: linear-gradient(180deg, #fff6c8, var(--gold)); }
.cp-note { color: #fff; background: color-mix(in srgb, var(--blood) 60%, #000); }
/* playing */
.cp-play { position: relative; z-index: 2; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1.4vh; min-height: 0; }
.cp-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 2vw; }
.cp-top .wg-title span { font-size: 5.4vh; } .cp-top .wg-title b { font-size: 4.6vh; }
.cp-phase { justify-self: center; padding: 1vh 2.6vw; border-radius: 99px; font-weight: 900; font-size: 3.4vh; color: #fff; background: rgba(10, 8, 30, .75); box-shadow: 0 0 0 .3vh var(--gold); text-transform: uppercase; letter-spacing: .05em; }
.cp-clock { display: grid; justify-items: center; width: 11vh; height: 11vh; align-content: center; border-radius: 50%; background: rgba(10, 8, 30, .8); box-shadow: 0 0 0 .4vh var(--gold); }
.cp-clock b { font-weight: 900; font-size: 5vh; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.cp-clock small { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 1.5vh; color: var(--gold); }
.cp-clock.low { box-shadow: 0 0 0 .4vh var(--blood), 0 0 4vh var(--blood); animation: cp-tick .5s ease-in-out infinite alternate; }
@keyframes cp-tick { to { transform: scale(1.08); } }
.cp-body { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 2.4vw; align-items: center; min-height: 0; }
.cp-body .cp-frame { width: min(100%, 92vh); justify-self: center; }
.cp-side { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 1.4vh; min-height: 0; align-self: stretch; }
.cp-status { font-family: var(--body, Inter), sans-serif; font-weight: 800; font-size: 2.6vh; color: #e8e0ff; }
.cp-status b { font-family: var(--display); font-size: 4vh; color: var(--gold); }
.cp-play.reveal .cp-frame { box-shadow: 0 0 0 .4vh #2a1c05, 0 0 8vh color-mix(in srgb, var(--gold) 60%, transparent), 0 3vh 8vh rgba(0, 0, 0, .7), inset 0 0 0 .6vh rgba(255, 240, 200, .35); }
@media (prefers-reduced-motion: reduce) { .cp *, .cpp * { animation: none !important; } .cp-stamp { opacity: 1; } }

/* ================= phone ================= */
.cpp { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
.cpp > * { min-width: 0; }
.cpp-head { display: flex; align-items: center; gap: .6rem; font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1.1; }
.cpp-head .ic { width: 2.4rem; height: 2.4rem; display: grid; place-items: center; border-radius: 50%; font-size: 1.3rem; background: linear-gradient(135deg, #c9a25a, #7a5a22); }
.cpp-head small { display: block; font-family: var(--body, Inter), sans-serif; font-weight: 700; font-size: .8rem; color: var(--muted, #a7a2b0); }
.cpp-head > b { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--gold); }
.cpp-photo { position: relative; border-radius: 12px; overflow: hidden; background: #0b0810; box-shadow: 0 0 0 4px #c9a25a, 0 10px 24px rgba(0, 0, 0, .5); aspect-ratio: 4 / 3; }
.cpp-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cpp-stamp { position: absolute; left: .6rem; right: .6rem; bottom: .8rem; text-align: center; font-family: var(--display); font-weight: 900; font-size: 1.3rem; line-height: 1.05; text-transform: uppercase; color: #fff; text-shadow: 0 0 2px #000, 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000; }
.cpp-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; }
.cpp-form input { font-size: 16px; min-width: 0; }
.cpp-mine { padding: .7rem .9rem; border-radius: 12px; background: color-mix(in srgb, var(--ecto) 22%, var(--panel, #1c1c21)); font-weight: 700; }
.cpp-note { padding: .6rem .9rem; border-radius: 10px; font-weight: 700; } .cpp-note.warn { background: color-mix(in srgb, var(--blood) 30%, #0b0b10); }
.cpp-turn { padding: .75rem .9rem; border-radius: 12px; font-weight: 900; text-align: center; color: #140a00; background: linear-gradient(180deg, #fff6c8, var(--gold)); }
.cpp-list { display: grid; gap: .45rem; }
.cpp-list button { position: relative; min-height: 50px; padding: .6rem 3rem .6rem 1rem; border: 0; border-radius: 12px; font: inherit; font-weight: 800; font-size: 1rem; line-height: 1.2; color: #150c2c; background: linear-gradient(180deg, #fffdf6, #efe6d2); cursor: pointer; text-align: left; }
.cpp-list button.on { box-shadow: 0 0 0 3px var(--pumpkin); } .cpp-list button.mine { opacity: .55; }
.cpp-list button small { position: absolute; right: .8rem; top: 50%; transform: translateY(-50%); font-weight: 800; color: #6b5a8a; }
.cpp-list.small div { display: flex; gap: .6rem; align-items: center; padding: .5rem .7rem; border-radius: 8px; font-weight: 700; font-size: .9rem; background: rgba(0, 0, 0, .3); }
.cpp-list.small div.mine { box-shadow: inset 0 0 0 2px var(--gold); }
.cpp-list.small em { font-style: normal; min-width: 1.6rem; text-align: center; font-family: var(--display); color: var(--gold); }
.cpp-result { display: grid; justify-items: center; gap: .25rem; padding: 1rem; border-radius: 14px; text-align: center; background: var(--panel, #1c1c21); box-shadow: inset 0 0 0 2px var(--line, #333); }
.cpp-result.won { background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 35%, #1a1030), #0a0612); box-shadow: 0 0 0 3px var(--gold); }
.cpp-big { font-family: var(--display); font-weight: 900; font-size: 1.5rem; }
.cpp-result span { color: var(--muted, #a7a2b0); font-weight: 700; }

/* readability pass (Oct 28): the small projector text one size up so it reads from the back of the room */
.cp-how span { font-size: 2.5vh; }
