/* Snack rating game (sections/cp-taste.liquid, layout/cp-taste.liquid). Couch Panda dark theme, one phone column.
   Ported from the approved mock. Only this page loads this file. */
@font-face { font-family: "CP Vina Sans"; src: url("cp-vina-sans-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "CP Oswald"; src: url("cp-oswald-400.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "CP Oswald"; src: url("cp-oswald-700.ttf") format("truetype"); font-weight: 700; font-display: swap; }
:root {
  color-scheme: dark;
  --bg: #1A2247; --bg-raised: #293668; --fg: #F1E8D6; --fg-muted: #B5B1AE; --accent: #F7E75F;
  --outline: #F1E8D6; --line: rgba(241,232,214,.2); --action: #F7E75F; --on-action: #293668;
  --hover: #FE873D; --on-hover: #293668; --ink: #0B0F24; --scrim: rgba(5,8,20,.6);
  --orange: #FE873D; --red: #C63027; --sofa: #AA1F23; --panda: #F2EDE7; --white: #FFFFFF;
  --display: "CP Vina Sans", Impact, "Arial Narrow", sans-serif;
  --label: "CP Oswald", "Arial Narrow", Arial, sans-serif;
  --text: var(--cp-taste-body, Arial, sans-serif);
  --hard-sm: 3px 3px 0 var(--ink); --hard-lg: 6px 6px 0 var(--ink);
  --r-sm: .25rem; --r-md: .75rem; --r-lg: 1rem;
  --fast: .2s; --enter: .5s; --bounce: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 1rem/1.5 var(--text); -webkit-text-size-adjust: 100%; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
p, h1, h2, h3 { margin: 0; }
h1, h2 { font-family: var(--display); font-weight: 400; text-transform: uppercase; text-wrap: balance; }
h1 { font-size: clamp(3.25rem, 15vw, 4rem); line-height: .92; color: var(--accent); }
h2 { font-size: 2.125rem; line-height: .95; }
.cp-taste__app { width: min(100%, 430px); margin-inline: auto; padding-block: 20px 48px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.logo { width: 132px; display: block; }
.mascot { width: 148px; height: 148px; border-radius: 50%; background: var(--accent); align-self: center; display: block; }
.btn { font: 700 1.0625rem/1.2 var(--label); letter-spacing: .05em; text-transform: uppercase; background: var(--action); color: var(--on-action); border: 3px solid var(--outline); border-radius: 999px; padding: 14px 22px; box-shadow: var(--hard-sm); width: 100%; transition: background var(--fast), color var(--fast), transform var(--fast); }
.btn:hover { background: var(--hover); color: var(--on-hover); transform: translateY(-2px); }
.btn[disabled] { background: transparent; border-color: var(--line); color: var(--fg-muted); box-shadow: none; transform: none; cursor: not-allowed; }
.btn--secondary { background: transparent; color: var(--fg); border-width: 2px; }
.link { background: none; border: 0; padding: 4px 0; color: var(--fg); text-decoration: underline; text-underline-offset: 3px; font-size: .9375rem; align-self: center; }
.link--back { align-self: flex-start; }
.field { display: flex; flex-direction: column; gap: 8px; }
.eyebrow, .field label { font: 700 .875rem/1.3 var(--label); letter-spacing: .08em; text-transform: uppercase; }
.input { width: 100%; background: var(--bg-raised); border: 2px solid var(--outline); border-radius: var(--r-md); padding: 12px 14px; font-size: 1.0625rem; }
.input::placeholder { color: var(--fg-muted); }
.code { font-family: var(--display); font-size: 2rem; letter-spacing: .08em; text-transform: uppercase; text-align: center; }
.hint { color: var(--fg-muted); font-size: .875rem; }
.error { color: var(--orange); font-size: .875rem; font-weight: 500; }
.found { background: var(--accent); color: var(--on-action); border-radius: var(--r-md); padding: 10px 14px; font-weight: 500; }
.steps { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.steps li { display: flex; gap: 10px; align-items: flex-start; }
.steps b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: var(--on-action); font: 700 .875rem/28px var(--label); text-align: center; }
.avatar-row { display: flex; align-items: center; gap: 16px; }
/* Avatar: a DiceBear face inside the panda hood (assets/cp-panda-hood.svg). The face box matches the
   skin square in Jiao's reference layer (design/panda_hood_square.svg). */
.avatar { position: relative; flex: none; width: 76px; height: 76px; }
.avatar::before { content: ""; position: absolute; inset: 5.6%; border-radius: 50%; background: var(--accent); }
.avatar img { position: absolute; display: block; }
.avatar .face { left: 26.7%; top: 33.74%; width: 47.47%; height: 47.38%; }
.avatar .hood { inset: 0; width: 100%; height: 100%; }
.avatar-row .avatar { width: 120px; height: 120px; }
.who .avatar { width: 92px; height: 92px; }
.pills { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pills--3 { grid-template-columns: repeat(3, 1fr); }
.pills > .pill:last-child:nth-child(odd) { grid-column: 1 / -1; }
.pills--3 > .pill:last-child:nth-child(odd) { grid-column: auto; }
.pill { min-width: 0; background: transparent; border: 2px solid var(--outline); border-radius: 999px; padding: 9px 6px; font-size: .875rem; font-weight: 500; line-height: 1.2; text-align: center; }
.pill[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.seats { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--bg-raised); border: 2px solid var(--line); border-radius: var(--r-md); padding: 10px 12px; display: flex; justify-content: space-between; gap: 8px; box-shadow: 0 6px 0 var(--bg); }
.seats div { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.seats span { font: 700 .75rem/1 var(--label); letter-spacing: .05em; text-transform: uppercase; }
.seats i { display: flex; flex-wrap: wrap; gap: 3px; font-style: normal; }
.seat { width: 15px; height: 13px; border-radius: 4px 4px 2px 2px; border: 1.5px solid var(--fg); }
.seat--amazing.on { background: var(--accent); border-color: var(--accent); }
.seat--love.on { background: var(--orange); border-color: var(--orange); }
.seat--no.on { background: var(--fg); }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--bg-raised); color: var(--fg); border: 2px solid var(--outline); border-radius: var(--r-lg); padding: 0; text-align: left; box-shadow: var(--hard-sm); }
.card .pic { aspect-ratio: 1; width: 100%; display: grid; place-items: center; background: var(--white); border-radius: 14px 14px 0 0; overflow: hidden; }
.card .pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .pic .ph { width: 44%; height: auto; opacity: .25; }
.card .name { padding: 8px 10px 10px; font-size: .875rem; font-weight: 500; line-height: 1.25; flex: 1; }
.card--no .pic { filter: grayscale(1); opacity: .6; }
.card--amazing { border-color: var(--accent); animation: halo 2.2s ease-in-out infinite; }
.reveal .card { animation: rise var(--enter) var(--bounce) both; animation-delay: calc(var(--i) * 60ms); }
.tag { position: absolute; top: 8px; left: 8px; font: 700 .75rem/1 var(--label); letter-spacing: .04em; text-transform: uppercase; border-radius: var(--r-sm); padding: 5px 8px; transform: rotate(-2deg); }
.tag--love { background: var(--orange); color: var(--on-hover); }
.tag--no { background: var(--bg-raised); color: var(--fg); border: 2px solid var(--outline); }
/* Amazing sticker: glow is this game's one soft effect. The green Starburst stays reserved for savings. */
.sticker { position: absolute; top: -12px; right: -8px; z-index: 2; width: 72px; height: 72px; border-radius: 50%; background: var(--accent); border: 3px solid var(--fg); display: grid; place-items: center; transform: rotate(-12deg); animation: glow 2.2s ease-in-out infinite; }
.sticker::before { content: ""; position: absolute; inset: -9px; border-radius: 50%; border: 3px dashed var(--accent); animation: spin 9s linear infinite; }
.sticker b { font: 700 .75rem/1 var(--label); letter-spacing: .02em; text-transform: uppercase; color: var(--on-action); }
.stamp .sticker { animation: stamp .55s var(--bounce), glow 2.2s .55s ease-in-out infinite; }
@keyframes glow { 0%, 100% { box-shadow: 0 0 6px 1px var(--accent); } 50% { box-shadow: 0 0 22px 6px var(--accent); } }
@keyframes halo { 0%, 100% { box-shadow: 0 0 6px 1px var(--accent); } 50% { box-shadow: 0 0 18px 4px var(--accent); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes stamp { from { transform: rotate(-40deg) scale(3.2); opacity: 0; } to { transform: rotate(-12deg) scale(1); opacity: 1; } }
@keyframes rise { from { transform: translateY(26px) scale(.92); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet-back { position: fixed; inset: 0; z-index: 20; background: var(--scrim); display: flex; align-items: flex-end; justify-content: center; }
.sheet { width: min(100%, 430px); max-height: 85%; overflow-y: auto; background: var(--bg-raised); border-radius: var(--r-lg) var(--r-lg) 0 0; border-top: 2px solid var(--outline); display: flex; flex-direction: column; gap: 12px; padding-block: 18px calc(18px + env(safe-area-inset-bottom, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.sheet h3 { font: 700 1.1875rem/1.25 var(--label); letter-spacing: .02em; }
.opt { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 14px 16px; border: 2px solid var(--outline); border-radius: var(--r-lg); background: transparent; color: var(--fg); font: 700 1.0625rem/1.2 var(--label); letter-spacing: .04em; text-transform: uppercase; text-align: left; }
.opt small { font: 400 .8125rem/1 var(--text); letter-spacing: 0; text-transform: none; opacity: .85; }
.opt--amazing { background: var(--accent); color: var(--on-action); }
.opt--love { background: var(--orange); color: var(--on-hover); }
.opt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.opt--square { flex-direction: column; justify-content: center; gap: 8px; aspect-ratio: 1.45; padding: 8px; text-align: center; }
.opt[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--ink), 0 0 0 5px var(--fg); }
.add { border-top: 2px dashed var(--line); padding-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.results { display: flex; flex-direction: column; gap: 8px; }
.results button { text-align: left; background: var(--bg-raised); border: 2px solid var(--line); border-radius: var(--r-md); padding: 9px 12px; font-size: .875rem; }
.who { display: flex; align-items: center; gap: 12px; }
.who strong { font: 700 1.3125rem/1.15 var(--label); display: block; overflow-wrap: anywhere; }
.panel { background: var(--bg-raised); border: 2px solid var(--outline); border-radius: var(--r-lg); box-shadow: var(--hard-lg); padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.sofa { background: var(--sofa); border: 2px solid var(--outline); border-radius: 26px 26px var(--r-md) var(--r-md); padding: 14px 16px 12px; }
.sofa .eyebrow { color: var(--white); margin-bottom: 8px; }
.sofa-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sofa-seat { min-width: 0; background: var(--panda); color: var(--on-action); border: 2px solid var(--ink); border-radius: 10px; overflow: hidden; }
.sofa-seat--amazing { position: relative; overflow: visible; grid-column: 1 / -1; background: var(--accent); display: flex; align-items: center; gap: 10px; padding-right: 66px; }
.sofa-seat--amazing .thumb { width: 72px; flex: none; border-radius: 8px 0 0 8px; overflow: hidden; }
.sofa-seat--amazing .sticker { width: 58px; height: 58px; top: 50%; right: 2px; margin-top: -29px; }
.sofa-seat--amazing .sticker b { font-size: .625rem; }
.thumb { aspect-ratio: 1; background: var(--white); display: grid; place-items: center; }
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .ph { width: 50%; height: auto; opacity: .25; }
.sofa-seat > span:not(.sticker) { display: block; padding: 4px 5px 5px; font-size: .6875rem; line-height: 1.2; font-weight: 500; }
.sofa-seat--amazing > span:not(.sticker) { padding: 0; font-size: .875rem; }
.sofa-seat em { display: block; font: 700 .75rem/1.2 var(--label); letter-spacing: .05em; text-transform: uppercase; font-style: normal; margin-bottom: 2px; }
.floor { font-size: .875rem; color: var(--fg-muted); }
.persona { font-family: var(--display); font-size: 2.25rem; line-height: .95; text-transform: uppercase; color: var(--accent); text-wrap: balance; }
.rank { margin: 0; padding-left: 22px; font-size: .9375rem; }
.badge { display: inline-block; font: 700 .75rem/1 var(--label); letter-spacing: .05em; text-transform: uppercase; color: var(--fg); border: 2px solid var(--fg); border-radius: var(--r-sm); padding: 3px 6px; margin-left: 6px; vertical-align: 2px; }
.badges { display: flex; flex-wrap: wrap; gap: 8px; }
.badges .badge { margin: 0; }
.badge--on { background: var(--accent); border-color: var(--accent); color: var(--on-action); }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .9375rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.group-code { font-family: var(--display); font-size: 2.5rem; letter-spacing: .12em; text-align: center; color: var(--accent); }
.buddies { display: flex; align-items: center; }
.buddies .avatar + .avatar { margin-left: -16px; }
.pct { margin-left: auto; font-family: var(--display); font-size: 3.625rem; line-height: 1; color: var(--accent); font-variant-numeric: tabular-nums; }
.group-sofa { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px; }
.group-sofa > div { min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--white); font: 700 .8125rem/1.1 var(--label); letter-spacing: .03em; text-align: center; }
.group-sofa span { max-width: 100%; overflow-wrap: anywhere; }
.group-sofa .avatar { width: 100%; max-width: 62px; height: auto; aspect-ratio: 1; }
.matches { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.matches li { display: flex; justify-content: space-between; gap: 10px; border: 2px solid var(--line); border-radius: var(--r-md); padding: 9px 14px; font-size: .9375rem; }
.matches b { font: 700 1.125rem/1.3 var(--label); font-variant-numeric: tabular-nums; }
.minis { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.minis li { min-width: 0; background: var(--panda); color: var(--on-action); border-radius: 10px; overflow: hidden; font-size: .6875rem; line-height: 1.2; font-weight: 500; }
.minis span { display: block; padding: 4px 5px 5px; }
.split { display: flex; gap: 12px; align-items: center; }
.split .thumb { width: 72px; flex: none; border-radius: var(--r-md); overflow: hidden; }
.split p { min-width: 0; font-size: .875rem; }
details { border-top: 2px dashed var(--line); padding-top: 12px; font-size: .9375rem; }
summary { font: 700 .875rem/1.3 var(--label); letter-spacing: .08em; text-transform: uppercase; cursor: pointer; }
details p, details ul { margin: 8px 0 0; }
details ul { padding-left: 18px; }
.demo-btn { background: none; border: 2px dashed var(--fg); border-radius: var(--r-md); padding: 9px; font-size: .875rem; }
.toast { position: fixed; z-index: 30; left: 50%; transform: translateX(-50%); bottom: calc(20px + env(safe-area-inset-bottom, 0px)); width: min(calc(100% - 32px), 398px); background: var(--ink); color: var(--fg); border-radius: var(--r-md); padding: 10px 14px; font-size: .875rem; text-align: center; }
.foot { position: sticky; bottom: env(safe-area-inset-bottom, 0px); padding-block: 10px; background: var(--bg); display: flex; flex-direction: column; gap: 6px; }

/* Box opening: wiggle, lid flies off, snacks jump out, then the grid rises in. */
.stage { position: fixed; inset: 0; z-index: 40; background: var(--bg); display: grid; place-items: center; overflow: hidden; border: 0; width: 100%; padding: 0; animation: leave .35s 2.35s ease forwards; }
.scene { position: relative; width: 260px; height: 330px; }
.sun { position: absolute; left: 50%; top: 150px; width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%; background: var(--accent); transform: scale(0); animation: sun .6s .95s var(--bounce) forwards; }
.crate { position: absolute; left: 20px; bottom: 20px; width: 220px; height: 150px; animation: drop .5s var(--bounce) both, wiggle .45s .5s ease-in-out; }
.crate-back { position: absolute; left: 0; right: 0; top: 0; height: 34px; background: var(--ink); border: 3px solid var(--on-action); border-radius: 8px 8px 0 0; }
.crate-front { position: absolute; left: 0; right: 0; bottom: 0; height: 132px; background: var(--orange); border: 3px solid var(--on-action); border-radius: 0 0 12px 12px; display: flex; align-items: center; justify-content: center; }
.crate-front span { max-width: 180px; background: var(--red); color: var(--white); font: 700 1rem/1.15 var(--label); letter-spacing: .04em; text-transform: uppercase; text-align: center; padding: 6px 10px; border-radius: var(--r-sm); transform: rotate(-2deg); }
.lid { position: absolute; left: -10px; right: -10px; top: -12px; height: 50px; background: var(--accent); border: 3px solid var(--on-action); border-radius: 10px; animation: lid .8s .92s cubic-bezier(.3, .7, .4, 1) forwards; }
.pop { position: absolute; left: 50%; top: 18px; width: 76px; height: 76px; margin-left: -38px; background: var(--white); border: 3px solid var(--on-action); border-radius: var(--r-md); overflow: hidden; display: grid; place-items: center; opacity: 0; animation: pop .6s var(--bounce) forwards; animation-delay: var(--d); }
.pop img { width: 100%; height: 100%; object-fit: cover; }
.pop .ph { width: 56%; height: auto; opacity: .3; }
.skip { position: absolute; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: .8125rem; color: var(--fg-muted); }
@keyframes drop { from { transform: translateY(-260px) scale(.85); } to { transform: none; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-4deg); } 40% { transform: rotate(4deg); } 60% { transform: rotate(-3deg); } 80% { transform: rotate(2deg); } }
@keyframes lid { 40% { opacity: 1; } to { transform: translate(120px, -300px) rotate(38deg); opacity: 0; } }
@keyframes sun { to { transform: scale(1); } }
@keyframes pop { from { transform: translateY(150px) scale(.5); opacity: 1; } to { transform: translate(var(--x), var(--y)) rotate(var(--r)); opacity: 1; } }
@keyframes leave { to { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .sticker, .stamp .sticker, .sticker::before, .card--amazing, .reveal .card { animation: none; }
  .sticker, .card--amazing { box-shadow: 0 0 12px 3px var(--accent); }
}

.cp-taste__hint { color: var(--fg-muted); text-align: center; padding-top: 40vh; }
.cp-taste__foot { width: min(100%, 430px); margin: 0 auto; padding: 8px 16px 32px; color: var(--fg-muted); font-size: .75rem; line-height: 1.5; text-align: center; }
.cp-taste__robot { position: fixed; z-index: 35; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); }
.btn.is-busy { opacity: .7; cursor: progress; }
.legal { font-size: .8125rem; color: var(--fg-muted); }
