/* "Play now" wizard on the game pages (Secret Santa, Who's Who, Kudos, Step Challenge).
   Same look as the site's planner: gradient head, step bars, big tappable options, bottom sheet on phones.
   Self-contained (.pw prefix, own tokens) so it looks the same on the Secret Santa page. Logic: js/play.js. */
.pw {
  --pw-ink: #17171A; --pw-ink-2: #4E4D55; --pw-mute: #6E6D75; --pw-line: rgba(23, 23, 26, .09); --pw-paper: #F2F1F7;
  --pw-peach: #FFD3B8; --pw-lilac: #CFC6FF; --pw-ok: #11795A; --pw-ok-bg: #DDF5EA; --pw-iris: #5B47F5; --pw-iris-ink: #3B2BC4;
  --pw-disp: Gabarito, "Hanken Grotesk", system-ui, sans-serif; --pw-sans: "Hanken Grotesk", system-ui, sans-serif;
  --pw-tint: var(--pw-lilac);
  width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 40px); padding: 0; border: 0; border-radius: 28px;
  background: #fff; color: var(--pw-ink); font: 400 16px/1.5 var(--pw-sans); -webkit-font-smoothing: antialiased;
  box-shadow: 0 40px 80px -30px rgba(23, 23, 26, .55); overflow: hidden;
}
.pw[open] { display: flex; flex-direction: column; animation: pw-in 420ms cubic-bezier(.2, .8, .2, 1); }
.pw::backdrop { background: rgba(23, 23, 26, .28); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
@keyframes pw-in { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@media (max-width: 700px) {
  .pw { width: auto; max-width: none; margin: auto 8px 8px; max-height: 92vh; }
  @keyframes pw-in { from { opacity: 0; transform: translateY(40px); } }
}
.pw *, .pw *::before, .pw *::after { box-sizing: border-box; }
.pw button { font: inherit; color: inherit; }

/* head */
.pw-head { position: relative; display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 14px; align-items: center; padding: 20px 60px 16px 20px;
  background: radial-gradient(60% 120% at 0% 0%, var(--pw-tint), transparent 70%), radial-gradient(60% 120% at 100% 0%, var(--pw-peach), transparent 70%), #fff; }
[dir="rtl"] .pw-head { padding: 20px 20px 16px 60px; }
.pw-tile { width: 52px; height: 52px; border-radius: 16px; background: #fff; box-shadow: 0 6px 16px -10px rgba(23, 23, 26, .4); display: grid; place-items: center; }
.pw-tile svg { width: 30px; height: 30px; }
.pw-head small { display: block; font-size: 13px; color: var(--pw-ink-2); font-weight: 500; }
.pw-head h2 { margin: 3px 0 2px; font: 700 28px/1.05 var(--pw-disp); letter-spacing: -0.03em; }
.pw-head p { margin: 0; font-size: 14.5px; color: var(--pw-ink-2); }
.pw .pw-x { position: absolute; top: 14px; inset-inline-end: 14px; width: 36px; height: 36px; border: 0; border-radius: 99px; background: rgba(255, 255, 255, .8);
  cursor: pointer; display: grid; place-items: center; font-size: 20px; line-height: 1; }

/* step bars */
.pw-steps { display: flex; gap: 6px; margin: 0; padding: 12px 20px 0; list-style: none; }
.pw-steps li { display: block; margin: 0; padding: 0; border: 0; box-shadow: none;  flex: 1; height: 4px; border-radius: 99px; background: var(--pw-line); transition: background 240ms; }
.pw-steps li.on { background: var(--pw-ink); } .pw-steps li.ok { background: var(--pw-ok); }

/* body */
.pw-body { overflow-y: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.pw-body > * { animation: pw-step 320ms cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pw-step { from { opacity: 0; transform: translateY(8px); } }
.pw-q { margin: 0; font: 700 22px/1.2 var(--pw-disp); letter-spacing: -0.02em; }
.pw-q:focus { outline: none; }
.pw-sub { margin: -4px 0 0; font-size: 14.5px; color: var(--pw-mute); }
.pw .pw-back { align-self: flex-start; border: 0; background: none; padding: 2px 0; font-size: 13.5px; font-weight: 600; color: var(--pw-mute); cursor: pointer; }
.pw .pw-back:hover { color: var(--pw-ink); }

/* options: like the planner's idea cards */
.pw-opts { display: grid; gap: 8px; }
.pw-opts.two { grid-template-columns: 1fr 1fr; }
.pw .pw-opt { width: 100%; text-align: start; border: 0; border-radius: 20px; background: var(--pw-paper); padding: 14px 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; transition: background 160ms, box-shadow 160ms, transform 160ms; }
.pw .pw-opt:hover { background: #fff; box-shadow: inset 0 0 0 1.5px var(--pw-ink); }
.pw .pw-opt[aria-pressed="true"] { background: #fff; box-shadow: inset 0 0 0 2px var(--pw-ink); }
.pw-opt b { font: 600 17px/1.2 var(--pw-sans); letter-spacing: -0.01em; }
.pw-opt em { font-style: normal; font-size: 13px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--pw-line); white-space: nowrap; }
.pw-opt em.free { background: var(--pw-ok-bg); color: var(--pw-ok); box-shadow: none; }
@media (max-width: 420px) { .pw-opts.two { grid-template-columns: 1fr; } }

/* details step */
.pw-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.pw-tags span { font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--pw-paper); }
.pw-tags span.r { color: var(--pw-iris-ink); background: #ECE9FF; }
.pw-form { display: grid; gap: 10px; }
.pw-form label { display: grid; gap: 6px; font: 600 13px/1.2 var(--pw-sans); color: var(--pw-ink-2); }
.pw-form input { min-height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid rgba(23, 23, 26, .16); background: #fff; width: 100%;
  font: 500 16px/1.2 var(--pw-sans); color: var(--pw-ink); }
.pw-form input:focus-visible { outline: 3px solid var(--pw-iris); outline-offset: 1px; }
.pw .pw-go { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 52px; border: 0; border-radius: 999px;
  background: var(--pw-ink); color: #fff; font: 600 15.5px/1 var(--pw-sans); cursor: pointer; transition: transform 160ms; }
.pw .pw-go:hover { transform: translateY(-1px); }
.pw .pw-go[disabled] { opacity: .6; cursor: progress; }
.pw-note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--pw-mute); }
.pw-note a { color: inherit; text-decoration: underline; }
.pw-err { margin: 0; font-size: 13.5px; color: #B42318; }
.pw-err:empty { display: none; }

/* done */
.pw-done { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: 20px;
  background: radial-gradient(70% 90% at 100% 0%, #BDEBD8, transparent 70%), var(--pw-paper); }
.pw-done b { font: 700 22px/1.15 var(--pw-disp); letter-spacing: -0.02em; }
.pw-done ol { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pw-done li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; font-size: 14.5px; color: var(--pw-ink-2); }
.pw-done li::before { content: "✓"; width: 20px; height: 20px; border-radius: 99px; background: var(--pw-ok-bg); color: var(--pw-ok); font-size: 11px; font-weight: 700; display: grid; place-items: center; }

@media (prefers-reduced-motion: reduce) { .pw[open], .pw-body > * { animation: none; } }

/* One line under the hero buttons on the game pages: the offer in short */
.px-meta { margin: 14px 0 0; font: 500 13.5px/1.5 var(--sans, "Hanken Grotesk", system-ui, sans-serif); color: var(--ink-2, #4E4D55); }

/* Home: the year planner now sits in its own section further down the page */
.hero3.hero3-plan { padding: clamp(48px, 6vw, 88px) 0 0; }
.hero3.hero3-plan .h3c { text-align: center; }
.hero3.hero3-plan .h3c .eyebrow { justify-content: center; }
/* the home hero keeps its buttons now that the planner moved out of it */
.v2home #year .h3c .acts { display: flex; }
#play .hp-pt em { color: #8A6500; }   /* 4.5:1 on the cream row */
/* Home conversation: Secret Santa gift deliveries */
#play .hp-gifts .hp-pt { background: #F2FBF6; }
#play .hp-gifts .hp-pt em { color: #11795A; font-size: 16px; }
/* Home conversation: a title strip before each game's scene, with its own colour and an entrance */
#play .hp-tag.hp-scene { align-self: stretch; display: flex; align-items: center; gap: 14px; margin-top: 40px; padding: 14px 16px;
  border-radius: 22px; color: var(--ink); font: inherit;
  background: radial-gradient(90% 160% at 0% 50%, var(--st), transparent 72%), rgba(255, 255, 255, .82);
  box-shadow: inset 0 0 0 1px rgba(23, 23, 26, .06), 0 18px 36px -26px rgba(40, 30, 70, .55); }
:root[dir="rtl"] #play .hp-tag.hp-scene { background: radial-gradient(90% 160% at 100% 50%, var(--st), transparent 72%), rgba(255, 255, 255, .82); }
#play .hp-tag.hp-scene:first-child { margin-top: 0; }
#play .hp-scene > div { flex: 1; min-width: 0; }
#play .hp-scene .hp-emo { width: 52px; height: 52px; flex: none; border-radius: 16px; display: grid; place-items: center; font-size: 28px; line-height: 1;
  background: #fff; box-shadow: 0 8px 18px -10px rgba(40, 30, 70, .45); }
#play .hp-scene b { display: block; font: 700 clamp(22px, 2.2vw, 28px)/1.05 var(--disp); letter-spacing: -0.025em; }
#play .hp-scene small { display: block; margin-top: 4px; font: 500 14px/1.4 var(--sans); color: var(--ink-2); }
#play .hp-scene .hp-ch { display: inline-flex; align-items: center; gap: 5px; margin-top: 8px; padding: 4px 9px 4px 5px; border-radius: 99px; background: #fff;
  font: 600 11.5px/1 var(--sans); color: var(--ink-2); box-shadow: inset 0 0 0 1px rgba(23, 23, 26, .06); }
#play .hp-scene .hp-chi { width: 18px; height: 18px; display: grid; place-items: center; }
#play .hp-scene .hp-chi .slk { width: 13px; height: 13px; }
@media (max-width: 620px) { #play .hp-scene .hp-emo { width: 44px; height: 44px; font-size: 24px; } }
/* entrance: the strip slides in and the emoji pops */
#play .hp-scene.hp-b { transform: translateY(26px) scale(.94); }
#play .hp-scene.hp-b.in { transform: none; }
#play .hp-scene.in .hp-emo { animation: hp-emo-pop 900ms cubic-bezier(.34, 1.56, .64, 1) both 120ms; }
@keyframes hp-emo-pop { 0% { transform: scale(.2) rotate(-35deg); opacity: 0; } 60% { transform: scale(1.18) rotate(8deg); opacity: 1; } 100% { transform: none; } }
@media (prefers-reduced-motion: reduce) { #play .hp-scene.in .hp-emo { animation: none; } }
#play .hp-scene .hp-ch { white-space: nowrap; width: max-content; } #play .hp-scene small, #play .hp-scene b { white-space: normal; }
.pw .pw-close2 { align-self: center; }
a.pw-go { text-decoration: none; }
