/* lowkey party games: the game page header and the shared play panel ("Toy box" design).
   Uses the tokens from shared/site.css. Engines add only their own prefixed classes in shared/party/<engine>.css. */

/* ---------- game page: coloured header with the game's emoji ---------- */
.g-teal { --game: var(--teal); --game-ink: var(--cream); } .g-plum { --game: var(--plum); --game-ink: var(--cream); } .g-brick { --game: var(--brick); --game-ink: var(--cream); }
.g-indigo { --game: var(--indigo); --game-ink: var(--cream); } .g-forest { --game: var(--forest); --game-ink: var(--cream); } .g-rose { --game: var(--rose); --game-ink: var(--cream); }
.g-ocean { --game: var(--ocean); --game-ink: var(--cream); } .g-mustard { --game: var(--mustard); --game-ink: var(--mustard-ink); }
.party-page .crumbs ol { margin-bottom: .55rem; }
@media (max-width: 639px) { .party-page .crumbs li[aria-current] { display: none; } }
.game-head { position: relative; overflow: hidden; isolation: isolate; display: flex; align-items: center; min-height: 6.2rem; padding: .85rem 1rem; padding-inline-end: 5.6rem; margin-bottom: .8rem; border-radius: var(--r, 22px); }
.game-head::after { content: ""; position: absolute; z-index: -1; inset-inline-end: -50px; bottom: -80px; width: 210px; height: 210px; border-radius: 50%; background: rgb(255 255 255 / .1); }
.game-head-in { flex: 1; min-width: 0; }
.party-h1 { font-size: clamp(1.45rem, 1.05rem + 2.1vw, 2.5rem); line-height: 1.1; margin: 0 0 .45rem; color: inherit; }
html[lang="ar"] .party-h1 { line-height: 1.35; }
.game-art { position: absolute; inset-inline-end: -6px; bottom: -8px; width: 88px; height: 88px; transform: rotate(9deg); filter: drop-shadow(0 8px 8px rgb(0 0 0 / .25)); }
[dir="rtl"] .game-art { transform: rotate(-9deg); }
.game-head .party-meta { color: inherit; font-size: .97rem; font-weight: 500; }
.game-head .party-meta strong { color: inherit; font-weight: 800; }
.game-head .party-meta a { color: inherit; font-weight: 700; }
@media (min-width: 720px) {
  .game-head { min-height: 9rem; padding: 1.4rem 1.6rem; padding-inline-end: 11rem; margin-bottom: 1.2rem; }
  .game-art { width: 150px; height: 150px; inset-inline-end: 8px; bottom: -14px; }
  .game-head::after { width: 340px; height: 340px; inset-inline-end: -80px; bottom: -150px; }
}

/* ---------- the play panel ---------- */
.party-root { margin: 0 0 1.6rem; max-width: 760px; min-height: 30rem; }
.party-frame { background: var(--tray, #c5cfbd); border-radius: 26px; overflow: hidden; display: flex; flex-direction: column; min-height: 30rem; }
.party-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem .7rem; padding-inline-start: 1.1rem; border-bottom: 1.5px solid var(--line, #b3bfac); }
.party-title { font: 800 1.15rem/1.2 var(--display, inherit); }
.party-stage { flex: 1; display: flex; flex-direction: column; gap: .9rem; padding: clamp(.8rem, 3.5vw, 1.4rem); }

/* full screen for the group */
.party-root.is-full { position: fixed; inset: 0; z-index: 1000; margin: 0; max-width: none; background: var(--tray, #c5cfbd); }
.party-root.is-full .party-frame { border-radius: 0; min-height: 100%; height: 100%; }
.party-root.is-full .party-stage { max-width: 760px; width: 100%; margin-inline: auto; overflow-y: auto; }
html.party-locked, html.party-locked body { overflow: hidden; }

/* [hidden] must win over display rules on party classes */
.party-root [hidden] { display: none !important; }

/* text */
.party-label { font-size: 1rem; font-weight: 700; color: var(--ink-2, #2f3d37); margin: 0 0 .5rem; }
.party-muted { color: var(--muted, #43514b); font-weight: 400; }
.party-hint { color: var(--ink-2, #2f3d37); font-size: 1rem; margin: 0; }
.party-alert { color: var(--bad, #8a2f1b); font-weight: 700; margin: 0; }
.party-meta { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin: 0; font-size: 1rem; color: var(--ink-2, #2f3d37); }
.party-meta strong { color: var(--ink, #1c2925); font-weight: 700; font-variant-numeric: tabular-nums; }

/* the big card everyone reads */
.party-card { background: var(--box, #e1e7da); border-radius: 22px; padding: clamp(1.1rem, 5vw, 2rem); min-height: 12rem; display: flex; flex-direction: column; justify-content: center; gap: .7rem; text-align: center; box-shadow: inset 0 0 0 1px var(--edge, rgb(28 41 37 / .12)), 0 4px 0 var(--line, #b3bfac); margin-bottom: 4px; }
.party-card-kicker { font: 700 1.1rem/1.3 var(--display, inherit); color: var(--muted, #43514b); margin: 0; }
.party-card-text { font: 800 clamp(1.75rem, 1.2rem + 2.6vw, 2.75rem)/1.14 var(--display, inherit); letter-spacing: -.02em; margin: 0; overflow-wrap: anywhere; text-wrap: balance; }
html[lang="ar"] .party-card-text { letter-spacing: 0; line-height: 1.5; }
.party-card-sub { font-size: 1.1rem; color: var(--ink-2, #2f3d37); margin: 0; }
.party-progress { font-size: 1rem; color: var(--ink-2, #2f3d37); text-align: center; margin: 0; }

/* buttons: 56px and up, a little toy edge under the solid ones */
.party-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 56px; padding: .5rem 1.4rem; margin-bottom: 3px; border-radius: 99px; border: 0; background: var(--box, #e1e7da); color: var(--ink, #1c2925); font-family: inherit; font-weight: 700; font-size: 1.125rem; line-height: 1.2; cursor: pointer; text-align: center; box-shadow: inset 0 0 0 1.5px var(--line, #b3bfac), 0 3px 0 var(--line, #b3bfac); -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.party-btn:hover { filter: brightness(1.05); }
.party-btn:active { transform: translateY(2px); }
.party-btn.is-primary { background: var(--go, #1f5c4a); color: var(--go-ink, #fbf5e6); box-shadow: 0 3px 0 var(--go-shadow, #12392e); }
.party-btn.is-good { background: var(--forest, #3a683e); color: var(--cream, #fff6e6); box-shadow: 0 3px 0 #254526; }
.party-btn.is-bad { background: var(--brick, #ad4930); color: var(--cream, #fff6e6); box-shadow: 0 3px 0 #7a3120; }
.party-btn.is-quiet { background: transparent; color: var(--ink, #1c2925); box-shadow: inset 0 0 0 1.5px rgb(28 41 37 / .4); margin-bottom: 0; }
.party-btn.is-small { min-height: 44px; padding: .3rem .95rem; font-size: 1rem; font-weight: 600; }
.party-btn.is-big { min-height: 64px; font-size: 1.25rem; width: 100%; }
.party-btn:disabled { opacity: .5; cursor: not-allowed; }
.party-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: .4rem; }
.party-actions > .party-btn { flex: 1 1 8rem; }
.party-actions.is-split > .party-btn { flex: 1 1 0; }

/* players */
.party-names { list-style: none; margin: 0 0 .6rem; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.party-names li { display: inline-flex; align-items: center; gap: .1rem; background: var(--box, #e1e7da); border-radius: 99px; padding: .2rem .25rem; padding-inline-start: .95rem; font-weight: 700; box-shadow: inset 0 0 0 1px var(--edge, rgb(28 41 37 / .12)); }
.party-x { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--ink-2, #2f3d37); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.party-x:hover { background: var(--tray, #c5cfbd); color: var(--ink, #1c2925); }
.party-add { display: flex; gap: .5rem; }
.party-add input { flex: 1; min-width: 0; min-height: 56px; font: inherit; font-size: 1.125rem; padding: .5rem 1.1rem; border: 0; border-radius: 99px; background: var(--box, #e1e7da); color: var(--ink, #1c2925); box-shadow: inset 0 0 0 1.5px var(--line, #b3bfac); }
.party-add input::placeholder { color: var(--muted, #43514b); opacity: 1; }
.party-add input:focus { outline: none; background: var(--field, #e9eee3); box-shadow: inset 0 0 0 2.5px var(--ink, #1c2925); }

/* chips: categories and levels */
.party-cats .party-chips + .party-chips { margin-top: .5rem; }
.party-chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.party-chip { min-height: 46px; padding: .4rem 1rem; border-radius: 99px; border: 0; background: var(--bg, #d5dcce); color: var(--ink-2, #2f3d37); font-family: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2; cursor: pointer; box-shadow: inset 0 0 0 1px var(--edge, rgb(28 41 37 / .12)); touch-action: manipulation; }
.party-chip .party-muted { font-size: .85rem; font-weight: 700; }
.party-chip.is-on { background: var(--ink, #1c2925); color: var(--cream, #fff6e6); box-shadow: none; }
.party-chip.is-on .party-muted { color: #c9d6c6; }
.party-chip.is-level { font-weight: 700; background: var(--box, #e1e7da); box-shadow: inset 0 0 0 1.5px var(--line, #b3bfac); }
.party-chip.is-level.is-on { background: var(--go, #1f5c4a); color: var(--go-ink, #fbf5e6); box-shadow: none; }

/* setup panel */
.party-setup { display: flex; flex-direction: column; gap: 1.1rem; }
.party-howto { list-style: none; counter-reset: how; margin: 0; padding: 0; display: grid; gap: .4rem; font-size: 1.0625rem; line-height: 1.45; }
.party-howto li { counter-increment: how; position: relative; padding: .6rem .9rem; padding-inline-start: 3.1rem; background: var(--box, #e1e7da); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--edge, rgb(28 41 37 / .12)); }
.party-howto li::before { content: counter(how); position: absolute; inset-inline-start: .7rem; top: .55rem; width: 1.8rem; height: 1.8rem; display: grid; place-items: center; border-radius: 50%; background: var(--game, var(--teal, #1d6b66)); color: var(--game-ink, var(--cream, #fff6e6)); font: 800 1rem/1 var(--display, inherit); }
html[lang="ar"] .party-howto li::before { content: counter(how, arabic-indic); }
.party-settings { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; }
.party-settings label { display: inline-flex; align-items: center; gap: .5rem; font-weight: 600; }
.party-settings select { min-height: 46px; font: inherit; font-weight: 600; padding: .3rem .7rem; border-radius: 14px; border: 0; background: var(--box, #e1e7da); color: var(--ink, #1c2925); box-shadow: inset 0 0 0 1.5px var(--line, #b3bfac); }

/* pass the phone */
.party-pass { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .9rem; text-align: center; min-height: 18rem; }
.party-pass-name { font: 800 clamp(2.2rem, 1.6rem + 3vw, 3.4rem)/1.1 var(--display, inherit); letter-spacing: -.03em; margin: 0; }
html[lang="ar"] .party-pass-name { letter-spacing: 0; line-height: 1.4; }

/* timer and score */
.party-timer { font: 800 clamp(2.5rem, 2rem + 3vw, 4rem)/1.1 var(--display, inherit); font-variant-numeric: tabular-nums; text-align: center; margin: 0; letter-spacing: -.03em; }
.party-timer.is-low { color: var(--bad, #8a2f1b); }
.party-scores { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; list-style: none; margin: 0; padding: 0; font-size: 1rem; }
.party-scores li { background: var(--box, #e1e7da); border-radius: 99px; padding: .3rem .85rem; box-shadow: inset 0 0 0 1px var(--edge, rgb(28 41 37 / .12)); }
.party-scores li.is-now { background: var(--ink, #1c2925); color: var(--cream, #fff6e6); font-weight: 700; box-shadow: none; }
.party-scores b { font-variant-numeric: tabular-nums; }

@media (max-width: 639px) {
  .party-root { margin-inline: -.5rem; }
  .party-frame { min-height: 28rem; }
  .party-bar { padding-inline-start: .9rem; }
}
@media (prefers-reduced-motion: reduce) { .party-btn:active { transform: none; } }

/* ---------- the article under the game ---------- */
.party-root + script + .dek { margin-top: 0; }
.party-page .prose > ol { list-style: none; counter-reset: s; padding: 0; margin: 0 0 1.2em; display: grid; gap: .5rem; }
.party-page .prose > ol > li { counter-increment: s; position: relative; margin: 0; padding: .8rem 1rem; padding-inline-start: 3.6rem; background: var(--box, #e1e7da); border-radius: 16px; box-shadow: inset 0 0 0 1px var(--edge, rgb(28 41 37 / .12)); }
.party-page .prose > ol > li::before { content: counter(s); position: absolute; inset-inline-start: .85rem; top: .8rem; width: 2rem; height: 2rem; display: grid; place-items: center; border-radius: 50%; background: var(--game, var(--teal, #1d6b66)); color: var(--game-ink, var(--cream, #fff6e6)); font: 800 1.05rem/1 var(--display, inherit); }
html[lang="ar"] .party-page .prose > ol > li::before { content: counter(s, arabic-indic); }

/* the full list, printable */
.party-list { max-width: none; }
.party-list h3 { display: flex; flex-wrap: wrap; align-items: baseline; gap: .2rem .5rem; margin: 1.5rem 0 .7rem; scroll-margin-top: 1rem; }
.party-list h3 .party-muted { font: 600 1rem var(--body, inherit); letter-spacing: 0; }
.party-list ol { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.party-list li { padding: .65rem .9rem; background: var(--box, #e1e7da); border-radius: 14px; box-shadow: inset 0 0 0 1px var(--edge, rgb(28 41 37 / .12)); line-height: 1.4; font-weight: 500; overflow-wrap: anywhere; }
.party-list.is-wyr li { display: grid; grid-template-columns: 1fr auto 1fr; gap: .6rem; align-items: center; }
.party-or { font-weight: 800; font-size: .85rem; text-transform: uppercase; color: var(--brick-ink, #8a2f1b); }
html[lang="ar"] .party-or { font-size: 1rem; }
.party-banned { color: var(--ink-2, #2f3d37); font-size: .98em; }
.party-list.is-pills ol { display: flex; flex-wrap: wrap; gap: .4rem; }
.party-list.is-pills li { padding: .35rem .9rem; border-radius: 99px; font-weight: 600; }
@media (min-width: 720px) { .party-list:not(.is-pills):not(.is-wyr) ol { grid-template-columns: 1fr 1fr; } }
.shelf.is-related { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.shelf.is-related .gcover { min-height: 170px; padding: 1rem 1.1rem; }
.shelf.is-related .gcover h3 { font-size: 1.45rem; max-width: none; padding-inline-end: 4.4rem; }
.shelf.is-related .cover-art { width: 92px; height: 92px; }
