/* Pink portraits, clear white surfaces, and a cool blue page. */
:root {
  --paper: #f3faff;
  --ink: #263c4a;
  --soft: #687985;
  --line: #d5e6ef;
  --red: #c83269;
  --deep: #a51d50;
  --white: #ffffff;
  --portrait-pink: #ffd5e3;
}
body {
  min-height: 100svh;
  background: linear-gradient(155deg, #ffffff 0%, #edf8ff 58%, #f7fcff 100%);
}
.game-bar { background: #fff; border-bottom-color: var(--line); }
.hero:before { background: radial-gradient(ellipse at 50% 47%, #fff 10%, #ffffff00 64%); }
.thread path { stroke: #dc83a2; opacity: .75; }
.thread .light { stroke: #8dc4dc; opacity: .8; }
.floating { background: #ffe0eb; border-radius: 50%; }
.floating img { filter: drop-shadow(0 .6rem .7rem #526f8415); }
.segments { background: #e8f4fb; border-color: #caddE9; }
.segments input:checked+span { color: var(--deep); box-shadow: 0 2px 5px #57799018; }
.primary { border-radius: 9px; }
.primary:hover { border-color: var(--deep); }
.secondary { border-color: #b9cedc; background: #fff; border-radius: 8px; color: var(--ink); }
.secondary:hover { background: #f0f8fd; border-color: #89b5cc; }
.progress { background: #dbeaf3; height: 5px; }
.progress span { background: linear-gradient(90deg, #e886a7, var(--red)); }
.artcard { border-color: #fff; border-radius: 18px; box-shadow: 0 14px 34px -20px #557d9a55; }
.portrait-box { border-radius: 11px; background: var(--portrait-pink); }
.portrait-box img, .portrait-box canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.portrait-box img { opacity: 0; }
.portrait-box.portrait-fallback img { opacity: 1; }
.reveal .portrait-box canvas { animation: focus-in .33s ease-out; }
.reveal .portrait-box:after { display: none; }
.artcap { padding-inline: 4px; }
.qpanel { padding: 24px; background: #fff; border: 1px solid #dfedf5; border-radius: 18px; }
.answer { background: #f8fcff; border-color: #c4dce9; border-radius: 8px; }
.answer:hover { background: #fff1f6; border-color: #d96a91; }
.answer.chosen, .answer.chosen:hover { background: var(--red); border-color: var(--red); }
.result { max-width: 1000px; }
.resultgrid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.07fr); gap: 32px; }
.summary { padding: 24px; background: #fff; border: 1px solid #dfedf5; border-radius: 18px; }
.summary h2 { color: #364d5b; }
.summary .scene { color: #536b7a; font-size: 1.04rem; }
.actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 18px; }
.actions .share-primary {
  grid-column: 1 / -1;
  min-height: 58px;
  background: #ca2866;
  border-color: #ca2866;
  color: #fff;
  font: 750 1.125rem/1.4 var(--sans);
  letter-spacing: .04em;
  box-shadow: 0 7px 17px -7px #bd286875;
}
.actions .share-primary:hover { background: #ab1d52; border-color: #ab1d52; }
.share-primary svg { width: 22px; height: 22px; fill: currentColor; flex: 0 0 auto; }
.actions .secondary { min-height: 44px; padding: 9px 12px; font-size: .9rem; }
.shared-actions { grid-template-columns: 1fr; }
.traits { margin: 20px 0 14px; }
.traits span { background: #f3f9fd; border-color: #dceaf2; color: #4a626f; line-height: 1.6; }
.status:not(:empty) { padding-top: 9px; }
.explain-link { font-size: .94rem; text-underline-offset: .2em; }
.result .compact-part { background: #fff; border-color: #d5e6ef; }
.result .compact-visual { background: var(--portrait-pink); }
.result .compact-copy .physiognomy-copy { color: #536b7a; }
.result .compact-copy .source-link { color: #9e3c62; }
.quote { background: #edf7fc; border-left-color: #8dbcd4; }
.pagefoot { border-top-color: #d5e6ef; }
@media (max-width: 690px) {
  /* Like the preceding game, give the changing portrait the available space.
     Keep a readable 280px card on short screens; let the page scroll naturally. */
  .quiz { padding: 4px clamp(13px, 4vw, 22px) 14px; }
  .quiz .playgrid { gap: 10px; margin: 8px auto 0; }
  .quiz .artcard {
    width: min(100%, 360px, max(280px, calc(100svh - 460px)));
    padding: 5px 5px 0;
    border-radius: 13px;
  }
  .quiz .portrait-box { border-radius: 8px; }
  .quiz .artcap {
    display: flex;
    min-height: 26px;
    gap: 6px;
    padding: 3px 2px;
    text-align: left;
    font-size: .75rem;
    line-height: 1.35;
    letter-spacing: 0;
  }
  .quiz .artcap span { display: inline; }
  .quiz .artcap span:last-child { flex-shrink: 0; font-size: .69rem; white-space: nowrap; }
  .qpanel { padding: 12px; border-radius: 14px; }
  .qmeta b { font-size: 1.35rem; }
  .question { margin: 6px 0 10px; font-size: 1.1875rem; line-height: 1.45; }
  .answer { min-height: 64px; padding: 8px 10px; font-size: 1rem; line-height: 1.45; }
  .resultgrid { gap: 16px; }
  .resultgrid .artcard { width: min(86%, 320px); }
  .summary { padding: 18px 16px; border-radius: 16px; }
  .summary .scene { margin-bottom: 12px; }
  .actions { width: 100%; margin-top: 14px; }
  .actions .share-primary { min-height: 56px; }
  .traits { margin-top: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .floating img, .reveal .portrait-box canvas { animation: none; }
}
