/* Party games: charades + Pictionary word generator, trivia host, games hubs (src/partygames.js + public/charades/game.js). Static on purpose. */
:root { --navy: #1e3a8a; --ink: #111827; --cream: #fbf7ef; --red: #c2410c; --green: #166534; --gold: #f59e0b; --line: #e5e1d6; --muted: #6b7280; }
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--cream); color: #374151; min-height: 100vh; }
.container { max-width: 780px; margin: 0 auto; padding: 26px 18px 48px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumb a { color: var(--navy); text-decoration: none; }
.top { text-align: center; margin-bottom: 20px; }
.fan { display: flex; justify-content: center; margin-bottom: 12px; height: 54px; }
.fan span { width: 38px; height: 52px; border-radius: 6px; background: #fff; border: 2px solid var(--ink); margin: 0 -6px; display: grid; place-items: center; font-size: 20px; box-shadow: 0 2px 0 rgba(0,0,0,.12); }
.fan span:nth-child(1) { transform: rotate(-14deg) translateY(6px); border-color: var(--red); }
.fan span:nth-child(2) { transform: rotate(-5deg); border-color: var(--navy); }
.fan span:nth-child(3) { transform: rotate(5deg); border-color: var(--green); }
.fan span:nth-child(4) { transform: rotate(14deg) translateY(6px); border-color: var(--gold); }
h1 { font-size: 32px; line-height: 1.15; font-weight: 800; color: var(--ink); letter-spacing: -0.015em; margin-bottom: 10px; }
.lede { font-size: 16.5px; line-height: 1.55; color: #4b5563; max-width: 36em; margin: 0 auto; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.chip { display: inline-block; background: #fff; border: 1.5px solid #dbe1f3; color: var(--navy); border-radius: 999px; padding: 6px 13px; font-size: 14px; font-weight: 600; text-decoration: none; cursor: pointer; font-family: inherit; }
.chip:hover { border-color: var(--navy); }
.chip.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.panel { background: #fff; border-radius: 16px; padding: 22px 20px; box-shadow: 0 1px 3px rgba(0,0,0,.07), 0 0 0 1px rgba(30,58,138,.05); margin-bottom: 22px; }
.panel h2 { font-size: 22px; font-weight: 750; color: var(--ink); margin-bottom: 6px; letter-spacing: -0.01em; }
.panel h3 { font-size: 16.5px; font-weight: 700; color: var(--ink); margin: 18px 0 6px; }
.panel p { font-size: 15.5px; line-height: 1.65; margin-bottom: 12px; }
.panel ul, .panel ol { margin: 6px 0 14px 22px; }
.panel li { font-size: 15.5px; line-height: 1.6; margin-bottom: 4px; }
.panel a { color: var(--navy); }
.muted { color: var(--muted); font-size: 14px; }
.about { color: #4b5563; }

/* ---- the generator ---- */
.pg-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pg-row .lab { font-size: 13px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-right: 4px; }
.pg-row .chip { padding: 5px 11px; font-size: 13.5px; }
.wcard { position: relative; margin: 14px auto 12px; max-width: 420px; min-height: 210px; border-radius: 18px; background: #fff; border: 3px solid var(--ink); box-shadow: 0 6px 0 rgba(17,24,39,.12); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 26px 20px 20px; text-align: center; overflow: hidden; }
.wcard .cat { position: absolute; top: 0; left: 0; right: 0; padding: 7px 12px; font-size: 13px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--navy); display: flex; justify-content: space-between; }
.wcard .cat .lv { letter-spacing: 2px; }
.wcard .word { font-size: 34px; line-height: 1.15; font-weight: 800; color: var(--ink); margin-top: 18px; word-break: break-word; }
.wcard .sign { font-size: 14px; color: var(--muted); margin-top: 10px; }
.wcard .cover { position: absolute; inset: 0; background: repeating-linear-gradient(45deg, #1e3a8a 0 14px, #223f94 14px 28px); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 800; font-size: 20px; cursor: pointer; border: 0; width: 100%; font-family: inherit; }
.wcard .cover[hidden] { display: none; }
.wcard .cover small { font-weight: 500; font-size: 14px; opacity: .85; margin-top: 6px; }
.c-movie .cat, .c-tv .cat { background: #7c2d12; } .c-song .cat { background: #6d28d9; } .c-book .cat { background: #0f766e; }
.c-phrase .cat { background: #9d174d; } .c-action .cat { background: #166534; } .c-character .cat { background: #b45309; }
.c-animal .cat { background: #3f6212; } .c-food .cat { background: #c2410c; } .c-place .cat { background: #0e7490; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.btn { appearance: none; border: 0; background: var(--navy); color: #fff; font-weight: 700; font-size: 16px; border-radius: 12px; padding: 13px 20px; cursor: pointer; font-family: inherit; text-decoration: none; display: inline-block; text-align: center; }
.btn:hover { background: #172554; }
.btn.ghost { background: #fff; color: var(--navy); border: 2px solid #dbe1f3; }
.btn.ghost:hover { border-color: var(--navy); }
.btn.big { font-size: 19px; padding: 16px 26px; }
.btn.ok { background: #16a34a; } .btn.ok:hover { background: #15803d; }
.btn.skip { background: #9ca3af; } .btn.skip:hover { background: #6b7280; }
.tools { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 14px; }
.tools details { margin-top: 8px; }
.tools summary { cursor: pointer; font-weight: 700; color: var(--navy); font-size: 15px; }
textarea, input[type=text], select { width: 100%; font: inherit; font-size: 16px; padding: 10px 12px; border: 1.5px solid #d1d5db; border-radius: 10px; background: #fff; color: var(--ink); }
textarea { min-height: 130px; resize: vertical; }
label.f { display: block; font-size: 14px; font-weight: 700; color: var(--ink); margin: 12px 0 5px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share { margin-top: 10px; font-size: 14px; word-break: break-all; }

/* word lists on deck pages */
.wl { columns: 2; column-gap: 26px; margin: 8px 0 6px 0 !important; list-style: none; }
.wl li { break-inside: avoid; padding: 3px 0; border-bottom: 1px dotted var(--line); font-size: 15px; margin: 0 !important; }
.wl li b { font-weight: 600; color: var(--ink); }
.wl li .d { float: right; color: #9ca3af; font-size: 12px; letter-spacing: 1px; }

/* signs table */
.signs { width: 100%; border-collapse: collapse; margin: 8px 0 14px; font-size: 15px; }
.signs th, .signs td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.signs th { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* trivia list */
.qa { list-style: none; margin: 8px 0 0 0 !important; counter-reset: q; }
.qa li { counter-increment: q; padding: 10px 0 10px 38px; border-bottom: 1px solid var(--line); position: relative; margin: 0 !important; }
.qa li::before { content: counter(q); position: absolute; left: 0; top: 10px; width: 28px; height: 28px; border-radius: 50%; background: #eef2ff; color: var(--navy); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.qa .q { font-weight: 600; color: var(--ink); }
.qa details { margin-top: 4px; }
.qa summary { cursor: pointer; color: var(--navy); font-size: 14px; font-weight: 600; }
.qa .a { font-weight: 700; color: var(--green); }
.qa .why { color: #4b5563; font-size: 14.5px; }
.qa .why a { color: var(--muted); font-size: 12.5px; }

/* games hub */
.games { display: grid; gap: 14px; }
.game { border: 1.5px solid var(--line); border-radius: 14px; padding: 16px; }
.game h3 { margin: 0 0 4px !important; font-size: 18px !important; }
.game .meta { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.game .meta b { color: #374151; font-weight: 600; }
.game p { margin-bottom: 8px !important; font-size: 15px !important; }
.game .go { display: inline-block; margin-top: 2px; font-weight: 700; color: #fff !important; background: var(--navy); padding: 8px 14px; border-radius: 10px; text-decoration: none; font-size: 14.5px; }
.game .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.game .tags span { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: #f3f4f6; color: #4b5563; }
.toc { columns: 2; column-gap: 20px; list-style: none; margin: 6px 0 0 0 !important; }
.toc li { font-size: 14.5px; margin: 0 0 4px !important; }
.more { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.more a { display: block; border: 1.5px solid #dbe1f3; border-radius: 12px; padding: 11px 13px; text-decoration: none; color: var(--navy); font-weight: 700; font-size: 15px; }
.more a small { display: block; color: var(--muted); font-weight: 500; font-size: 13px; margin-top: 2px; }
.more a:hover { border-color: var(--navy); }
.faq h3 { margin-top: 14px; }
.foot { text-align: center; margin-top: 30px; font-size: 14px; line-height: 2; }
.foot a { color: var(--navy); margin: 0 7px; text-decoration: none; }

/* ---- full-screen play (team game + trivia host) ---- */
#pg-stage { position: fixed; inset: 0; z-index: 1000; background: #0f172a; color: #fff; display: none; flex-direction: column; overflow-y: auto; -webkit-user-select: none; user-select: none; }
#pg-stage.open { display: flex; }
.st-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; font-size: 15px; gap: 10px; }
.st-bar button { background: rgba(255,255,255,.12); color: #fff; border: 0; border-radius: 10px; padding: 8px 12px; font: inherit; font-weight: 600; cursor: pointer; }
.st-body { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10px 18px 26px; text-align: center; max-width: 720px; width: 100%; margin: 0 auto; }
.st-body h2 { font-size: 28px; font-weight: 800; margin-bottom: 10px; }
.st-body p { font-size: 17px; line-height: 1.5; opacity: .9; margin-bottom: 14px; }
.st-clock { font-size: 64px; font-weight: 900; font-variant-numeric: tabular-nums; line-height: 1; margin-bottom: 8px; }
.st-clock.low { color: #f87171; }
.st-word { font-size: clamp(34px, 9vw, 64px); font-weight: 900; line-height: 1.1; margin: 10px 0; word-break: break-word; }
.st-cat { font-size: 15px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; background: rgba(255,255,255,.14); padding: 5px 12px; border-radius: 999px; }
.st-sign { font-size: 15px; opacity: .75; margin-top: 4px; }
.st-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; width: 100%; max-width: 520px; margin-top: 22px; }
.st-acts .btn { font-size: 20px; padding: 20px 10px; border-radius: 16px; }
.st-score { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 12px 0 18px; }
.st-score div { background: rgba(255,255,255,.1); border-radius: 12px; padding: 10px 16px; min-width: 110px; }
.st-score div b { display: block; font-size: 30px; }
.st-score div.cur { outline: 3px solid var(--gold); }
.st-form { width: 100%; max-width: 460px; text-align: left; }
.st-form label { display: block; font-size: 14px; font-weight: 700; margin: 12px 0 5px; opacity: .9; }
.st-form input[type=text], .st-form select { background: #1e293b; color: #fff; border-color: #334155; }
.st-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.st-opts button { background: #1e293b; color: #fff; border: 2px solid #334155; border-radius: 10px; padding: 9px 13px; font: inherit; font-weight: 600; cursor: pointer; }
.st-opts button.on { border-color: var(--gold); background: #334155; }
.st-list { text-align: left; width: 100%; max-width: 460px; margin: 6px auto 14px; font-size: 16px; }
.st-list li { list-style: none; padding: 6px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.st-list li.no { opacity: .55; text-decoration: line-through; }
.st-q { font-size: clamp(22px, 5.4vw, 36px); font-weight: 800; line-height: 1.25; margin: 6px 0 16px; }
.st-choices { display: grid; gap: 10px; width: 100%; max-width: 560px; }
.st-choices div { background: rgba(255,255,255,.08); border-radius: 12px; padding: 12px 14px; text-align: left; font-size: 19px; }
.st-choices div.right { background: #166534; }
.st-ans { font-size: clamp(24px, 6vw, 38px); font-weight: 900; color: #86efac; margin: 6px 0; }
.st-why { font-size: 16px; opacity: .85; max-width: 560px; }
.st-teams { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 16px 0 6px; }
.st-teams button { background: #1e293b; color: #fff; border: 2px solid #334155; border-radius: 12px; padding: 12px 16px; font: inherit; font-weight: 700; font-size: 16px; cursor: pointer; }
.st-teams button.on { background: #166534; border-color: #22c55e; }
.st-progress { height: 5px; background: rgba(255,255,255,.12); border-radius: 3px; width: 100%; max-width: 560px; margin-bottom: 16px; overflow: hidden; }
.st-progress i { display: block; height: 100%; background: var(--gold); }

/* ---- print ---- */
#pg-print { display: none; }
@media print {
  body > *:not(#pg-print) { display: none !important; }
  #pg-print { display: block !important; }
  body { background: #fff; }
  .pp-page { page-break-after: always; break-after: page; }
  .pp-page:last-child { page-break-after: auto; break-after: auto; }
  .pp-cards { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 1.3in; border-top: 1px dashed #999; border-left: 1px dashed #999; }
  .pp-card { border-right: 1px dashed #999; border-bottom: 1px dashed #999; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 6px 8px; position: relative; }
  .pp-card .w { font-size: 17pt; font-weight: 800; line-height: 1.12; color: #000; }
  .pp-card .k { position: absolute; top: 5px; left: 7px; font-size: 7.5pt; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #444; }
  .pp-card .l { position: absolute; top: 5px; right: 7px; font-size: 8pt; color: #666; letter-spacing: 1px; }
  .pp-card .s { position: absolute; bottom: 4px; right: 7px; font-size: 6.5pt; color: #888; }
  .pp-head { display: flex; justify-content: space-between; align-items: baseline; font-family: Georgia, serif; margin-bottom: 10px; }
  .pp-head h1 { font-size: 20pt; margin: 0; }
  .pp-head span { font-size: 9pt; color: #555; }
  .pp-qs { list-style: none; counter-reset: q; }
  .pp-qs li { counter-increment: q; padding: 5px 0 5px 26px; border-bottom: 1px solid #ddd; position: relative; font-size: 10.5pt; line-height: 1.35; break-inside: avoid; }
  .pp-qs li::before { content: counter(q) "."; position: absolute; left: 0; font-weight: 700; }
  .pp-qs .a { font-weight: 700; }
  .pp-qs .why { color: #444; font-size: 9pt; }
  .pp-qs .ch { font-size: 9.5pt; color: #222; }
  .pp-qs .ln { display: block; border-bottom: 1px solid #999; height: 18px; margin-top: 2px; }
  .pp-foot { font-size: 8pt; color: #777; text-align: center; margin-top: 8px; }
}
@media (max-width: 560px) {
  h1 { font-size: 27px; }
  .wl, .toc { columns: 1; }
  .wcard .word { font-size: 29px; }
  .grid2 { grid-template-columns: 1fr; }
}
