/* ============ The Playroom — This or That ============ */
.tot-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.tot { --auto: 1400ms; position: relative; }
.tot kbd { display: inline-block; min-width: 20px; padding: 2px 5px; border: 1px solid rgba(94, 22, 36, .3); border-bottom-width: 2px; border-radius: 4px; background: var(--fiber); font: 500 11px/1.2 var(--f-body); color: var(--burgundy); text-align: center; }

/* ---------- top: round + hearts ---------- */
.tot-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tot-count { margin: 0; font-size: 11.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--rose-ink); }
.tot-count b { font-family: var(--f-display); font-size: 26px; font-weight: 500; font-style: italic; letter-spacing: 0; color: var(--burgundy); vertical-align: -3px; }
.tot-hearts { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.tot-hearts li { width: 15px; height: 15px; }
.tot-hearts svg { display: block; width: 100%; height: 100%; overflow: visible; fill: transparent; stroke: var(--gold); stroke-width: 1.3; transition: fill .4s, stroke .4s, transform .4s var(--ease); }
.tot-hearts .is-now svg { fill: var(--blush); stroke: var(--burgundy); animation: tot-beat 1.2s var(--ease) infinite; }
.tot-hearts .is-match svg { fill: var(--burgundy); stroke: var(--burgundy); }
.tot-hearts .is-miss svg { fill: var(--blush); stroke: var(--rose); }
@keyframes tot-beat { 0%, 100% { transform: scale(1); } 40% { transform: scale(1.25); } }

.tot-ask { margin: 10px 0 26px; font-family: var(--f-display); font-style: italic; font-size: clamp(24px, 3vw, 32px); line-height: 1.1; text-align: center; color: var(--burgundy); }

/* ---------- the two cards ---------- */
.tot-stage { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(26px, 9%, 76px); max-width: 780px; margin: 0 auto; }
.tot-card {
  --tilt: -2deg;
  --tint: var(--blush-2);
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  justify-items: center;
  align-items: center;
  gap: 10px;
  min-width: 0;
  min-height: clamp(250px, 40vw, 340px);
  padding: 26px 12px 28px;
  border: 1px solid rgba(176, 141, 87, .6);
  border-radius: 3px;
  background-color: var(--tint);
  background-image: var(--grain);
  font: inherit;
  color: inherit;
  text-align: center;
  cursor: pointer;
  box-shadow: inset 0 0 0 5px rgba(255, 251, 243, .7), inset 0 0 0 6px rgba(176, 141, 87, .35), 0 20px 28px -20px rgba(59, 37, 27, .55);
  transform: rotate(var(--tilt));
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), opacity .4s, filter .4s, border-color .3s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.tot-card--that { --tilt: 2deg; --tint: var(--butter-2); }
/* washi tape */
.tot-card::before { content: ""; position: absolute; top: -9px; left: 50%; width: 64px; height: 20px; margin-left: -32px; background: repeating-linear-gradient(90deg, rgba(224, 125, 152, .45) 0 6px, rgba(255, 251, 243, .5) 6px 12px); box-shadow: 0 1px 2px rgba(59, 37, 27, .12); transform: rotate(-4deg); }
.tot-card--that::before { background: repeating-linear-gradient(90deg, rgba(201, 164, 94, .5) 0 6px, rgba(255, 251, 243, .55) 6px 12px); transform: rotate(5deg); }
.tot-card.is-in { animation: tot-deal .6s var(--ease) backwards; }
.tot-card--that.is-in { animation-delay: .07s; }
@keyframes tot-deal { from { opacity: 0; transform: translateY(22px) rotate(calc(var(--tilt) * 3)) scale(.94); } }

.tot-side { font-size: 11px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase; color: var(--rose-ink); }
.tot-art { display: grid; place-items: center; width: clamp(88px, 26vw, 150px); aspect-ratio: 1; padding: 7%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #FFFFFF, var(--ivory) 60%, var(--fiber)); box-shadow: inset 0 0 0 1px rgba(176, 141, 87, .5), 0 0 0 5px rgba(255, 251, 243, .55), 0 8px 14px -8px rgba(59, 37, 27, .35); transition: transform .5s var(--ease); }
.tot-art svg, .tot-art img { display: block; width: 100%; height: 100%; object-fit: contain; }
.tot-art img { border-radius: 50%; object-fit: cover; }
.tot-label { max-width: 100%; font-family: var(--f-display); font-size: clamp(22px, 2.8vw, 30px); font-weight: 500; line-height: 1.02; color: var(--burgundy); text-wrap: balance; overflow-wrap: anywhere; }
.tot-key { position: absolute; bottom: 12px; left: 12px; display: none !important; }
.tot-card--that .tot-key { left: auto; right: 10px; }

.tot-card:focus-visible { outline: 2px solid var(--burgundy); outline-offset: 5px; }
@media (hover: hover) and (pointer: fine) {
  .tot-key { display: inline-block !important; opacity: .7; }
  .tot-card:not([aria-disabled]):hover { transform: translateY(-5px) rotate(calc(var(--tilt) / 2)); box-shadow: inset 0 0 0 5px rgba(255, 251, 243, .7), inset 0 0 0 6px rgba(176, 141, 87, .35), 0 30px 34px -22px rgba(59, 37, 27, .6); }
  .tot-card:not([aria-disabled]):hover .tot-art { transform: rotate(-6deg) scale(1.05); }
}
.tot-card[aria-disabled] { cursor: default; }
.tot-card:active:not([aria-disabled]) { transform: scale(.97) rotate(var(--tilt)); }

/* picked: it lifts */
.tot-card.is-picked { z-index: 2; border-color: var(--burgundy); transform: translateY(-14px) rotate(0deg) scale(1.04); box-shadow: inset 0 0 0 5px rgba(255, 251, 243, .7), inset 0 0 0 6px rgba(94, 22, 36, .35), 0 38px 40px -24px rgba(59, 37, 27, .7); }
.tot-card.is-picked .tot-art { transform: scale(1.06); }
.tot-card.is-other { opacity: .5; filter: saturate(.55); transform: rotate(var(--tilt)) scale(.94); }
.tot-card.is-other.is-hers { opacity: .92; filter: none; }
.tot-you { position: absolute; bottom: -13px; left: 50%; padding: 6px 12px 5px; background: var(--burgundy); color: var(--ivory); font-size: 10px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; white-space: nowrap; opacity: 0; transform: translate(-50%, 6px) scale(.8); transition: opacity .3s, transform .45s var(--ease); pointer-events: none; }
.tot-card.is-picked .tot-you { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* her pick: a lipstick kiss */
.tot-kiss { position: absolute; top: 20px; left: -18px; width: 40%; max-width: 110px; opacity: 0; transform: rotate(calc(var(--kr, -14deg) - 2deg)) scale(1.9); pointer-events: none; mix-blend-mode: multiply; }
.tot-card.is-hers .tot-kiss { animation: tot-stamp .5s cubic-bezier(.3, 1.4, .5, 1) forwards; }
.tot-card--that .tot-kiss { left: auto; right: -18px; --kr: 14deg; }
@keyframes tot-stamp { 0% { opacity: 0; transform: rotate(var(--kr, -14deg)) scale(1.9); } 60% { opacity: .95; transform: rotate(var(--kr, -14deg)) scale(.92); } 100% { opacity: .92; transform: rotate(var(--kr, -14deg)) scale(1); } }

/* the wax seal in between */
.tot-or { position: absolute; top: 50%; left: 50%; z-index: 3; display: grid; place-items: center; width: clamp(62px, 11vw, 92px); aspect-ratio: 1; transform: translate(-50%, -50%) rotate(-8deg); filter: drop-shadow(0 6px 8px rgba(59, 10, 20, .35)); pointer-events: none; transition: transform .5s var(--ease); }
.tot-or img { grid-area: 1 / 1; width: 100%; height: 100%; object-fit: contain; }
.tot-or span { grid-area: 1 / 1; margin-top: -4px; font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: clamp(22px, 3.2vw, 30px); color: #F6DDC4; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); }
.tot-stage:has(.is-picked) .tot-or { transform: translate(-50%, -50%) rotate(10deg) scale(1.08); }

/* ---------- the reveal ---------- */
.tot-reveal { position: relative; display: grid; justify-items: center; align-content: start; min-height: 190px; margin-top: 34px; text-align: center; }
.tot-wait { position: absolute; top: 18px; left: 0; right: 0; margin: 0; font-family: var(--f-display); font-style: italic; font-size: 21px; color: var(--rose-ink); transition: opacity .3s; }
.tot-reveal[data-state="show"] .tot-wait { opacity: 0; visibility: hidden; }
.tot-result { display: grid; justify-items: center; }
.tot-result p { margin: 0; }
.tot-verdict:empty, .tot-her:empty, .tot-line:empty { display: none; }
.tot-verdict { padding: 7px 14px 6px; font-size: 11.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; transform: rotate(-2deg); animation: tot-pop .45s var(--ease) both; }
.is-match .tot-verdict { background: var(--burgundy); color: var(--ivory); box-shadow: 0 8px 14px -8px rgba(59, 10, 20, .6); }
.is-miss .tot-verdict { background: var(--ivory); color: var(--rose-ink); border: 1px solid rgba(158, 74, 94, .5); }
.tot-her { margin-top: 12px !important; animation: tot-rise .5s var(--ease) .05s both; }
.tot-her span { display: block; font-size: 11px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--brown); }
.tot-her em { font-family: var(--f-display); font-size: clamp(28px, 3.4vw, 36px); line-height: 1.05; color: var(--burgundy); }
.tot-line { max-width: 34ch; margin-top: 4px !important; font-family: var(--f-display); font-style: italic; font-size: clamp(19px, 2.2vw, 23px); line-height: 1.2; color: var(--brown); animation: tot-rise .5s var(--ease) .12s both; }
@keyframes tot-pop { from { opacity: 0; transform: rotate(-2deg) scale(.6); } }
@keyframes tot-rise { from { opacity: 0; transform: translateY(8px); } }

.tot-next { position: relative; overflow: hidden; min-height: 44px; margin-top: 16px; visibility: hidden; opacity: 0; transition: opacity .3s, transform .3s var(--ease), background .2s; }
.tot-reveal[data-state="show"] .tot-next { visibility: visible; opacity: 1; }
.tot-timer { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--gold-lt); transform: scaleX(0); transform-origin: left; }
.tot-reveal[data-state="show"] .tot-timer { animation: tot-timer var(--auto) linear forwards; }
@keyframes tot-timer { to { transform: scaleX(1); } }

.tot-hint { display: none; margin: 18px 0 0; font-size: 12.5px; letter-spacing: .04em; text-align: center; color: rgba(90, 59, 42, .75); }
@media (hover: hover) and (pointer: fine) { .tot-hint { display: block; } }

/* ---------- the end ---------- */
.tot-end { padding-block: 6px 4px; }
.tot-score { display: grid; justify-items: center; gap: 12px; text-align: center; }
.tot-score .eyebrow { margin: 0; }
.tot-big { position: relative; padding: 0 10px; }
.tot-pct { display: grid; justify-items: center; margin: 0; font-family: var(--f-display); font-weight: 300; line-height: 1; color: var(--burgundy); }
.tot-pre { font-style: italic; font-size: clamp(26px, 3.4vw, 36px); color: var(--rose-ink); }
.tot-num { font-size: clamp(104px, 17vw, 168px); line-height: .82; letter-spacing: -.02em; font-variant-numeric: lining-nums tabular-nums; }
.tot-num small { font-size: .5em; vertical-align: .62em; margin-left: .04em; }
.tot-pct em { font-size: clamp(38px, 5.4vw, 58px); font-weight: 400; margin-top: -2px; }
.tot-big-kiss { position: absolute; top: 18px; right: -52px; width: 84px; transform: rotate(18deg); mix-blend-mode: multiply; opacity: .9; animation: tot-stamp2 .55s cubic-bezier(.3, 1.4, .5, 1) 1.1s both; }
@keyframes tot-stamp2 { from { opacity: 0; transform: rotate(18deg) scale(2); } }
.tot-matchline { margin: 0; font-size: 11.5px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--rose-ink); }
.tot-type { display: grid; justify-items: center; gap: 4px; margin-top: 8px; padding: 12px 26px 14px; background-color: var(--butter); background-image: var(--grain); box-shadow: 0 12px 18px -12px rgba(59, 37, 27, .45); transform: rotate(-1.5deg); }
.tot-type-eyebrow { font-size: 10.5px; font-weight: 500; letter-spacing: .24em; text-transform: uppercase; color: var(--brown); }
.tot-type-name { font-family: var(--f-display); font-style: italic; font-weight: 500; font-size: clamp(30px, 4vw, 40px); line-height: 1; color: var(--burgundy); text-wrap: balance; }
.tot-blurb { max-width: 42ch; margin: 4px 0 0; font-size: 16px; line-height: 1.55; color: var(--brown); }
.tot-best { margin: 0; padding: 6px 12px; background: var(--blush-2); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; color: var(--burgundy); }
.tot-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 8px; }
.tot-actions .game-btn { min-height: 46px; padding-inline: 24px; }
.tot-copied { min-height: 24px; margin: 0; font-family: var(--f-display); font-style: italic; font-size: 19px; color: var(--rose-ink); }
.tot-copytext { font-family: var(--f-body); font-style: normal; font-size: 14px; color: var(--burgundy); user-select: all; }

.tot-recap { margin-top: 30px; padding-top: 28px; border-top: 1px dashed rgba(176, 141, 87, .6); }
.tot-recap-title { margin: 0 0 18px; font-family: var(--f-display); font-weight: 400; font-size: clamp(30px, 3.6vw, 40px); line-height: 1; text-align: center; color: var(--burgundy); }
.tot-recap-title em { color: var(--rose-ink); }
.tot-rows { display: grid; gap: 8px 20px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .tot-rows { grid-template-columns: 1fr 1fr; } }
.tot-row { display: grid; grid-template-columns: 30px 1fr; align-items: center; column-gap: 12px; row-gap: 2px; padding: 10px 14px; background: var(--fiber); border: 1px solid rgba(176, 141, 87, .32); animation: tot-rise .45s var(--ease) calc(var(--i, 0) * 45ms + 300ms) both; }
.tot-row.is-miss { background: rgba(249, 230, 231, .5); }
.tot-mark { grid-row: 1 / span 2; width: 30px; height: 30px; }
.tot-mark circle { fill: var(--blush-2); stroke: rgba(176, 141, 87, .5); stroke-width: 1; }
.tot-mark path { fill: none; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 32; stroke-dashoffset: 32; animation: tot-draw .45s var(--ease) calc(var(--i, 0) * 45ms + 520ms) forwards; }
.tot-mark--yes circle { fill: var(--butter-2); }
.tot-mark--yes path { stroke: var(--burgundy); }
.tot-mark--no path { stroke: var(--rose); }
@keyframes tot-draw { to { stroke-dashoffset: 0; } }
.tot-row-q { font-family: var(--f-display); font-size: 19px; font-weight: 500; line-height: 1.1; color: var(--burgundy); }
.tot-row-q i { font-weight: 400; color: var(--rose-ink); }
.tot-row-picks { display: flex; flex-wrap: wrap; gap: 2px 16px; font-size: 10.5px; font-weight: 500; letter-spacing: .16em; text-transform: uppercase; color: var(--brown); }
.tot-row-picks b { font-size: 13px; font-weight: 400; letter-spacing: .01em; text-transform: none; color: var(--burgundy); }

/* ---------- phones ---------- */
@media (max-width: 560px) {
  .tot-count b { font-size: 22px; }
  .tot-count { letter-spacing: .16em; }
  .tot-hearts { gap: 1.5px; }
  .tot-hearts li { width: 11px; height: 11px; }
  .tot-ask { margin: 10px 0 34px; }
  .tot-stage { gap: 9%; }
  .tot-card { min-height: 240px; padding: 22px 6px 26px; gap: 8px; }
  .tot-art { width: min(92px, 80%); }
  .tot-label { font-size: 21px; }
  .tot-side { font-size: 10px; letter-spacing: .22em; }
  .tot-kiss { top: 12px; left: -12px; width: 46%; }
  .tot-card--that .tot-kiss { right: -12px; }
  .tot-reveal { min-height: 186px; margin-top: 30px; }
  .tot-big-kiss { width: 62px; right: -64px; top: -4px; }
  .tot-recap { margin-top: 18px; }
  .tot-row { padding: 9px 10px; column-gap: 10px; }
  .tot-row-q { font-size: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .tot-card, .tot-art, .tot-or, .tot-you, .tot-hearts svg { transition-duration: .01ms !important; }
  .tot-card.is-in, .tot-hearts .is-now svg, .tot-verdict, .tot-her, .tot-line, .tot-row, .tot-big-kiss { animation: none !important; }
  .tot-card.is-picked { transform: rotate(0deg); }
  .tot-card.is-other { transform: rotate(var(--tilt)); }
  .tot-card.is-hers .tot-kiss { animation: none; opacity: .92; transform: rotate(var(--kr, -14deg)); }
  .tot-mark path { animation: none; stroke-dashoffset: 0; }
  .tot-reveal[data-state="show"] .tot-timer { animation: none; }
}

/* keep the kiss sticker from widening the page on narrow screens */
#game { overflow-x: clip; }
