/* A round ends with a celebration, then opens into its complete pairing story. */
#experience-modal[data-appearance="recap"] { width: min(800px, calc(100vw - 32px)); max-width: 800px; background: #f7f1e6; }
.modal-inner.round-recap { padding: 0; background: #f7f1e6; overflow: hidden; border-radius: inherit; }
.round-recap > .modal-close { position: absolute; z-index: 5; top: 12px; right: 12px; color: #fff1d4; border: 1px solid #e8cba04d; background: #ffffff0c; }
.round-recap > .modal-close:hover { background: #ffffff24; }
.recap-celebration {
  position: relative; isolation: isolate; overflow: hidden; padding: 28px 42px 24px;
  text-align: center; color: #fff7e7; background: radial-gradient(ellipse at 50% 30%, #97435a 0, #681d36 44%, #361020 100%);
  border-bottom: 1px solid #bb9254;
}
.recap-celebration::before, .recap-celebration::after { content: ""; position: absolute; z-index: -1; width: 400px; height: 400px; border: 1px solid #e7bd6d1c; border-radius: 50%; top: -220px; left: calc(50% - 200px); box-shadow: 0 0 0 35px #e7bd6d08, 0 0 0 70px #e7bd6d06; pointer-events: none; }
.recap-celebration::after { top: auto; bottom: -375px; width: 660px; height: 660px; left: calc(50% - 330px); }
.recap-celebration .eyebrow { color: #edc991; font-size: 11px; letter-spacing: 2px; margin: 0 30px 15px; }
.recap-emblem { width: 94px; height: 94px; position: relative; display: grid; place-items: center; margin: 0 auto 14px; border: 1px solid #ebc77785; border-radius: 50%; color: #f3cd7c; background: radial-gradient(circle, #f4ce762a, #f4ce7603 70%); box-shadow: 0 0 0 7px #f3cc7210, inset 0 0 25px #f3cc7210; }
.recap-trophy { width: 67px; height: 67px; filter: drop-shadow(0 3px 7px #29041060); }
.recap-emblem img { height: 78px; width: 52px; object-fit: contain; filter: drop-shadow(0 6px 7px #22041380); }
.recap-spark { position: absolute; color: #f2c979; font-family: Georgia, serif; line-height: 1; }
.spark-left { left: -38px; top: 12px; font-size: 25px; transform: rotate(-12deg); }
.spark-right { right: -35px; bottom: 13px; font-size: 33px; transform: rotate(10deg); }
.recap-celebration .recap-status { display: inline-block; margin: 0 0 10px; color: #f8e9bd; border-color: #e9c77670; background: #e6c47914; padding: 4px 12px; font-size: 11px; letter-spacing: .5px; }
.round-recap .recap-celebration h2 { padding: 0; margin: 0 auto; max-width: 580px; font-size: clamp(36px, 4.8vw, 53px); line-height: 1.02; letter-spacing: -.035em; color: #fff7e7; text-wrap: balance; }
.recap-celebration .recap-wine { margin: 12px auto 0; color: #f2dace; font-size: 16px; line-height: 1.45; }
.recap-earned { display: flex; align-items: center; justify-content: center; gap: 24px; margin: 20px auto 0; padding-top: 16px; border-top: 1px solid #ebcba92b; max-width: 420px; }
.recap-earned > div { display: flex; gap: 10px; align-items: center; }
.recap-round-score { font-family: var(--serif); font-size: 40px; line-height: 1; font-weight: 400; color: #fff3ce; }
.recap-earned > div > span { font-size: 11px; text-transform: uppercase; letter-spacing: 1px; max-width: 46px; text-align: left; line-height: 1.45; }
.recap-points { border-radius: 30px; border: 1px solid #eed29b66; background: #ead09a14; color: #f8e3b6; font-size: 12px; padding: 8px 12px; }
.recap-points strong { font-size: 18px; margin-right: 3px; }
.recap-body { padding: 24px 36px 32px; }
.recap-chapter { display: flex; gap: 12px; align-items: center; font-size: 11px; line-height: 1.4; text-transform: uppercase; letter-spacing: .8px; color: #826d54; }
.recap-chapter b { margin-left: auto; color: #693347; font-size: 10px; font-weight: 700; }
.round-recap .result-numbers { margin: 17px 0 0; gap: 10px; }
.round-recap .result-number { position: relative; overflow: hidden; padding: 15px 8px 12px; border-radius: 12px; border: 1px solid #d8c6a8; background: #f2e7d2; font-size: 13px; box-shadow: 0 3px 0 #d8c6a825; }
.round-recap .result-number::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: #b39353; }
.round-recap .result-number strong { font-family: var(--serif); font-weight: 400; font-size: 38px; line-height: 1.1; margin-bottom: 5px; }
.round-recap .result-number.paired { background: #e9eedf; border-color: #c5d1b5; }
.round-recap .result-number.paired::before { background: #698750; }
.round-recap .result-number.wrong { background: #f2e3df; border-color: #dbbfb8; }
.round-recap .result-number.wrong::before { background: #b66c69; }
.recap-round-rule { margin: 14px 0 0; text-align: center; color: #6c5748; font-size: 13px; }
.recap-body .recap-context { margin-top: 18px; }
.recap-feature { position: relative; display: grid; grid-template-columns: 80px minmax(0, 1fr) 30px; gap: 16px; align-items: center; margin: 24px 0; padding: 18px; border: 1px solid #bda675; border-radius: 14px; background: radial-gradient(ellipse at 0 50%, #e5d3a966, transparent 70%), #faf4e7; box-shadow: 0 4px 0 #d6c4a229; }
.recap-feature-art { display: grid; place-items: center; width: 80px; height: 80px; background: #e9ddc6; border: 1px solid #d6c39d; border-radius: 50%; }
.recap-feature-art img { width: 68px; height: 68px; object-fit: contain; filter: drop-shadow(0 5px 4px #66461825); }
.recap-feature-art > span { font-size: 35px; }
.recap-feature .eyebrow { margin-bottom: 6px; font-size: 9px; letter-spacing: 1.2px; color: #8a6537; }
.recap-feature h3 { font-family: var(--serif); font-weight: 400; font-size: 29px; color: #512b31; overflow-wrap: anywhere; }
.recap-feature p { margin-top: 5px; font-size: 13px; line-height: 1.45; }
.recap-feature-seal { color: #766238; border: 1px solid #bca470; display: grid; place-items: center; border-radius: 50%; width: 28px; height: 28px; font-size: 15px; }
.recap-body .recap-collection { border-top: 1px solid #d8c7ac; margin-top: 23px; padding-top: 23px; }
.recap-list-heading > span { border: 1px solid #d7c4a5; border-radius: 30px; padding: 5px 9px; color: #806745; }
.round-recap .actual-recap-row { background: #fffcf5; border-color: #deceb7; box-shadow: 0 3px 0 #c7ae8412; border-radius: 14px; border-top: 3px solid #c3b49c; }
.round-recap .actual-recap-row[data-tone="paired"] { border-top-color: #789360; }
.round-recap .actual-recap-row[data-tone="missed"] { border-top-color: #bc9754; }
.round-recap .actual-recap-row[data-tone="wrong"] { border-top-color: #b57270; }
.round-recap .recap-item-art { background: radial-gradient(circle, #f1e5cb, #f5efdf); border-radius: 50%; min-height: 66px; }
.round-recap .actual-recap-row img { filter: drop-shadow(0 4px 3px #61421a1c); }
.round-recap .actual-recap-row p { color: #67574b; }
.recap-next { padding: 22px; margin-top: 26px; border: 1px solid #d0b992; border-radius: 14px; background: #ede2cd; }
.recap-next .btn { width: 100%; }
.recap-next .actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.recap-next p { font-size: 14px; color: #695640; line-height: 1.6; }
.round-recap[data-outcome="retry"] .recap-celebration { background: radial-gradient(ellipse at 50% 30%, #815854, #503237 70%, #342229); }
.round-recap[data-outcome="retry"] .recap-emblem { border-color: #cfb38a; box-shadow: none; }

/* A single brief burst belongs to the result's first opening. It never blocks input. */
.recap-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 3; }
.recap-confetti i { position: absolute; left: var(--x); top: -14px; width: 6px; height: 11px; border-radius: 1px; background: var(--color); opacity: 0; animation: recap-confetti-fall 2400ms var(--delay) cubic-bezier(.2,.6,.6,1) both; }
.recap-confetti i:nth-child(3n) { border-radius: 50%; width: 6px; height: 6px; }
.is-celebrating .recap-emblem { animation: recap-award-pop 620ms cubic-bezier(.2,.8,.2,1.2) both; }
.is-celebrating .recap-spark { animation: recap-spark-arrive 850ms 200ms ease-out both; }
.is-celebrating .recap-earned { animation: recap-earned-arrive 480ms 220ms ease-out both; }
@keyframes recap-confetti-fall { 0% { opacity: 0; transform: translate3d(0,-10px,0) rotate(0deg); } 8% { opacity: .9; } 78% { opacity: .75; } 100% { opacity: 0; transform: translate3d(var(--drift),440px,0) rotate(var(--turn)); } }
@keyframes recap-award-pop { 0% { opacity: 0; transform: translateY(10px) scale(.68); } 70% { opacity: 1; transform: translateY(-3px) scale(1.05); } 100% { opacity: 1; transform: none; } }
@keyframes recap-spark-arrive { 0% { opacity: 0; scale: .4; } 65% { opacity: 1; scale: 1.15; } 100% { opacity: 1; scale: 1; } }
@keyframes recap-earned-arrive { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (max-width: 700px) {
  #experience-modal[data-appearance="recap"] { width: calc(100% - 16px); }
  .recap-celebration { padding: 23px 22px 22px; }
  .recap-celebration .eyebrow { margin-bottom: 14px; font-size: 10px; letter-spacing: 1.4px; }
  .recap-emblem { width: 76px; height: 76px; margin-bottom: 14px; }
  .recap-trophy { width: 55px; height: 55px; }
  .recap-emblem img { width: 44px; height: 65px; }
  .round-recap .recap-celebration h2 { font-size: clamp(32px, 9.3vw, 40px); }
  .recap-celebration .recap-wine { font-size: 15px; margin-top: 10px; }
  .recap-earned { margin-top: 17px; padding-top: 14px; gap: 18px; }
  .recap-round-score { font-size: 35px; }
  .recap-points { font-size: 11px; padding: 7px 10px; }
  .recap-body { padding: 20px 18px 22px; }
  .recap-chapter { font-size: 10px; gap: 8px; }
  .recap-chapter b { font-size: 9px; letter-spacing: .5px; }
  .round-recap .result-numbers { gap: 8px; margin-top: 15px; }
  .round-recap .result-number { padding: 13px 6px 11px; font-size: 12px; }
  .round-recap .result-number strong { font-size: 34px; }
  .recap-feature { padding: 14px 12px; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; margin-block: 20px; }
  .recap-feature-art { width: 64px; height: 64px; }
  .recap-feature-art img { width: 56px; height: 56px; }
  .recap-feature h3 { font-size: 25px; }
  .recap-feature .eyebrow { font-size: 9px; line-height: 1.5; letter-spacing: .7px; }
  .recap-feature p { font-size: 13px; }
  .recap-feature-seal { display: none; }
  .recap-next { padding: 18px 16px; }
  .recap-next .actions { grid-template-columns: 1fr; }
}
@media (max-width: 360px) {
  .recap-celebration { padding-inline: 18px; }
  .recap-earned { gap: 12px; }
  .recap-earned > div { gap: 6px; }
  .recap-points { max-width: 124px; }
  .recap-body { padding-inline: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .recap-confetti { display: none; }
  .round-recap *, .round-recap *::before, .round-recap *::after { animation: none !important; transition: none !important; }
}

/* Collected pairings continue the gold/burgundy result language in the Cellar. */
.earned-collection { margin-bottom: 36px; }
.earned-wine-card { border: 1px solid #decfae; border-radius: 20px; overflow: hidden; background: #fffaf0; min-width: 0; }
.earned-card-art { background: radial-gradient(ellipse at 50% 90%, #a65348, #721b35 65%); color: #f6dba4; padding: 18px; text-align: center; }
.earned-card-art .eyebrow { color: #f6dba4; display: block; }
.earned-card-art img { width: 112px; height: 112px; object-fit: contain; margin: 12px auto 0; filter: drop-shadow(0 9px 12px #310b2360); }
.earned-card-copy { padding: 22px; }
.earned-card-copy h3, .earned-card-copy h2 { font-size: 28px; margin: 6px 0; }
.earned-card-wines { color: #7c1e3c; font-weight: 700; }
.recap-card-award { margin: 24px 0; }
.recap-card-award > .eyebrow { margin-bottom: 12px; display: block; }
.recap-card-award .earned-wine-card { display: grid; grid-template-columns: minmax(90px, .65fr) minmax(0, 1.35fr); }
.recap-card-award .earned-card-art { display: flex; flex-direction: column; justify-content: center; padding: 12px; }
.recap-card-award .earned-card-art img { width: 80px; height: 80px; max-width: 100%; }
.recap-card-award .earned-card-copy { padding: 18px; }
.recap-card-award .earned-card-copy h3, .recap-card-award .earned-card-copy h2 { font-size: 24px; }
@media (max-width: 360px) { .recap-card-award .earned-wine-card { grid-template-columns: 1fr; } }
