/* ABOUTME: Styles the single-page word party game for desktop and mobile. */
/* ABOUTME: Gives setup, hidden cards and revealed cards distinct readable states. */
:root { color-scheme: dark; font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; color: #f7f5ef; background: #171b36; font-synthesis: none; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; min-height: 100vh; background: radial-gradient(ellipse at 88% 6%, #363154 0, transparent 29%), radial-gradient(ellipse at 3% 74%, #222c51 0, transparent 32%), #171b36; }
button { font: inherit; }
button { cursor: pointer; }
button:focus-visible { outline: 3px solid #f6c866; outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .5; }
[hidden] { display: none !important; }
.shell { width: min(1100px, calc(100% - 48px)); margin: auto; }
.topbar { height: 90px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #ffffff17; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 750; letter-spacing: .08em; }
.brand-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #20213c; background: #f7c969; font-size: 21px; font-weight: 900; transform: rotate(-8deg); }
.top-note { color: #a8acc4; font-size: 14px; letter-spacing: .08em; }
.intro { position: relative; padding: 76px 0 44px; }
.eyebrow, .kicker { color: #f3c76e; font-size: 12px; font-weight: 800; letter-spacing: .17em; }
.eyebrow { display: flex; align-items: center; gap: 9px; }
.eyebrow span { width: 7px; height: 7px; border-radius: 50%; background: #f3c76e; }
h1, h2, p { margin: 0; }
h1 { margin-top: 17px; font-size: clamp(54px, 8vw, 88px); line-height: 1.12; letter-spacing: -.055em; }
h1 span { color: #f5c86e; }
h1 i { display: inline-block; margin-left: 10px; color: #f1898a; font-style: normal; transform: rotate(12deg); }
.intro p { margin-top: 20px; color: #bfc2d2; line-height: 1.9; font-size: 16px; }
.panel { border: 1px solid #ffffff1b; border-radius: 24px; background: #242945; box-shadow: 0 20px 55px #0a10202e; }
.setup { max-width: 780px; padding: 32px; }
.section-heading, .table-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading h2, .table-heading h2 { margin-top: 7px; font-size: 25px; }
.section-symbol { color: #f18f8d; font-size: 34px; line-height: 1; }
.form-grid { max-width: 260px; margin-top: 28px; }
.field { display: flex; flex-direction: column; gap: 10px; font-size: 15px; font-weight: 650; }
.field small { color: #aeb4c9; font-size: 13px; line-height: 1.5; font-weight: 400; }
.stepper { width: 100%; height: 54px; border: 1px solid #ffffff25; border-radius: 12px; color: #fff; background: #181d36; }
.stepper { display: flex; align-items: center; justify-content: space-between; }
.stepper button { width: 52px; height: 100%; border: 0; color: #f6c96e; background: transparent; font-size: 24px; }
.stepper output { font-size: 18px; }
.primary { display: flex; align-items: center; justify-content: center; gap: 16px; width: 100%; min-height: 56px; margin-top: 27px; border: 0; border-radius: 12px; color: #28253a; background: #f5c86e; font-weight: 800; }
.primary:hover:not(:disabled) { background: #ffda8b; }
.primary span { font-size: 20px; }
.error { margin-top: 15px; color: #ffc2bf; font-size: 14px; line-height: 1.5; }
.table { padding: 32px; }
.table-heading p { margin-top: 10px; color: #bfc2d2; line-height: 1.6; }
.round-count { padding: 9px 13px; border: 1px solid #ffffff26; border-radius: 99px; color: #d6d8e3; font-size: 14px; white-space: nowrap; }
.cards { width: min(100%, 380px); margin: 28px auto 0; }
.cards.is-table { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 15px; width: 100%; }
.card { display: flex; flex-direction: column; justify-content: space-between; width: 100%; min-height: 240px; padding: 20px; border: 1px solid #777a9c; border-radius: 16px; color: #fff; background: repeating-linear-gradient(135deg, #333958 0, #333958 7px, #383e60 7px, #383e60 14px); text-align: center; transition: border-color .18s, background .18s; }
.card:hover { border-color: #f5c86e; }
.card-number { color: #c5c8d8; font-size: 12px; font-weight: 750; letter-spacing: .13em; }
.card-content { overflow-wrap: anywhere; font-size: 50px; font-weight: 850; color: #f4c76d; line-height: 1.15; }
.card-hint { color: #d1d3df; font-size: 14px; }
.card.is-open { color: #2c2939; background: #f5c86e; border-color: #ffdc99; }
.card.is-open .card-content { color: #2c2939; font-size: clamp(23px, 2.5vw, 32px); }
.card.is-open .card-number, .card.is-open .card-hint { color: #5a4a42; }
.cards.is-table .card { min-height: 180px; }
.voting-card { transition: transform .25s ease, border-color .18s, background .18s; }
.voting-card.is-armed { transform: rotateY(180deg); background: #fbe4e3; border-color: #f1898a; }
.voting-card.is-armed > span { transform: rotateY(180deg); }
.voting-card.is-armed .card-content { color: #b52e3b; font-size: 32px; }
.voting-card.is-armed .card-number, .voting-card.is-armed .card-hint { color: #6d3a42; }
.voting-card.is-eliminated:disabled { opacity: 1; background: #41485c; border-color: #9da6b9; }
.voting-card.is-eliminated .card-content { color: #f7f5ef; font-size: 32px; }
.voting-card.is-undercover:disabled { background: #703a50; border-color: #f1898a; }
.voting-card.is-undercover .card-content { color: #ffd2d0; }
.cards.is-table .voting-card:disabled { opacity: 1; }
.voting-card.is-revealed:disabled { background: #41485c; border-color: #9da6b9; }
.voting-card.is-revealed .card-content { color: #f7f5ef; font-size: 32px; }
.voting-card.is-revealed .card-hint { color: #f7f5ef; font-size: 18px; overflow-wrap: anywhere; }
.voting-card.is-revealed.is-undercover:disabled { background: #703a50; border-color: #f1898a; }
.voting-card.is-revealed.is-undercover .card-content { color: #ffd2d0; }
.card-actions { display: flex; align-items: center; gap: 10px; width: min(100%, 380px); margin: 16px auto 0; }
.card-actions .primary { flex: 1; width: auto; margin: 0; padding: 0 12px; }
.table-footer { display: flex; align-items: center; flex-direction: column; gap: 20px; margin-top: 28px; text-align: center; }
.table-footer p { color: #c6c9d8; font-size: 14px; line-height: 1.7; }
.actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.table > .error { text-align: center; }
.secondary, .reveal-button { min-height: 44px; padding: 0 18px; border-radius: 10px; font-weight: 700; }
.secondary { color: #e1e1ea; background: transparent; border: 1px solid #ffffff40; }
.reveal-button { color: #272238; background: #f5c86e; border: 1px solid #f5c86e; }
.filing { padding: 50px 0 30px; font-size: 12px; }
.filing a { color: #aeb4c9; }
@media (max-width: 600px) {
  .shell { width: min(100% - 32px, 1100px); }
  .topbar { height: 72px; }
  .top-note { font-size: 12px; }
  .intro { padding: 54px 0 32px; }
  .setup, .table { padding: 23px 20px; border-radius: 19px; }
  .table-heading { flex-direction: column; gap: 14px; }
  .card { min-height: 220px; }
  .cards.is-table { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .cards.is-table .card { min-height: 150px; padding: 14px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .card, .voting-card { transition: none; }
}
