/* Article + tool pages. Builds on the theme tokens in app.css. */
[hidden] { display: none !important; }
body.site { font-size: 17px; line-height: 1.6; }
.sitehead { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 12px 16px; max-width: 1040px; margin: 0 auto; }
.sitehead .logo { text-decoration: none; }
.sitehead nav { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: center; font-size: .92rem; }
.sitehead nav a { color: var(--muted); text-decoration: none; }
.sitehead nav a:hover { color: var(--ink); }
.sitehead .navcta { background: var(--accent); color: #fff !important; padding: 6px 14px; border-radius: 99px; font-weight: bold; }

.article { max-width: 760px; margin: 0 auto; padding: 8px 16px 48px; position: relative; z-index: 1; }
.article h1 { font-family: var(--display); font-weight: normal; font-size: clamp(1.8rem, 5vw, 2.6rem); line-height: 1.15; margin: .4em 0 .5em; }
.article h2 { font-family: var(--display); font-weight: normal; color: var(--gold); font-size: 1.6rem; margin: 1.6em 0 .5em; }
.article h3 { margin: 0 0 .2em; font-size: 1.1rem; }
.article a { color: var(--gold); }
.lead { font-size: 1.15rem; color: var(--ink); }
.center { text-align: center; }
.small { font-size: .85rem; color: var(--muted); }

.btn { display: inline-block; background: var(--accent); color: #fff !important; text-decoration: none; font-weight: bold; padding: 12px 22px; border-radius: 14px; box-shadow: 0 4px 0 #8e1b1b; }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 #8e1b1b; }
.ghostbtn { background: transparent; border: 2px solid var(--line); color: var(--ink); border-radius: 12px; padding: 8px 14px; font: inherit; cursor: pointer; }

.cta { background: linear-gradient(135deg, rgba(226, 59, 59, .18), rgba(245, 200, 76, .12)); border: 1px solid rgba(245, 200, 76, .45); border-radius: 18px; padding: 18px 20px; margin: 28px 0; }
.cta p { margin: 0 0 8px; }
.cta .btn { margin-top: 6px; }

.qlist { padding-left: 1.6em; }
.qlist li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.steps li, .games li { margin-bottom: 12px; }
.games p { margin: 0; color: var(--muted); }
.related li { margin-bottom: 6px; }
.printrow { text-align: right; }

.faq details { border-bottom: 1px solid var(--line); padding: 10px 0; }
.faq summary { cursor: pointer; font-weight: bold; }
.faq p { margin: 8px 0 0; color: var(--muted); }

.homecards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.packpick { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.packpick .btn { padding: 10px 14px; font-size: .95rem; }
.codebox { margin-top: 10px; }
.codebox summary { cursor: pointer; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.ok { color: var(--gold); }

/* Tools */
.tool { background: rgba(255, 255, 255, .05); border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 20px 0; }
.tool label { display: block; margin-bottom: 10px; color: var(--muted); font-size: .92rem; }
.tool textarea, .tool select, .tool input:not([type=checkbox]) {
  display: block; width: 100%; font: inherit; color: var(--ink); background: rgba(0, 0, 0, .25);
  border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-top: 4px;
}
.tool .row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin: 10px 0; }
.tool .row > * { flex: 1 1 160px; }
.tool .row > button { flex: 0 0 auto; }
.tool .check { display: flex; gap: 8px; align-items: center; }
.tool .start { width: auto; }
.turn { font-size: 1.6rem; text-align: center; margin: 4px 0; }
.giftlist { list-style: none; padding: 0; }
.giftlist li { display: grid; grid-template-columns: 1fr auto auto auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.giftlist li.frozen { opacity: .6; }
.giftlist .owner { color: var(--gold); }
.giftlist .steals { color: var(--muted); font-size: .85rem; }
.giftlist button { background: var(--accent); color: #fff; border: 0; border-radius: 10px; padding: 6px 12px; font-weight: bold; }
.order { columns: 2; }
.order li.now { color: var(--gold); font-weight: bold; }
.order li.had { color: var(--muted); }
.log { color: var(--muted); font-size: .9rem; }
.links { list-style: none; padding: 0; }
.links li { display: grid; grid-template-columns: 7em 1fr auto; gap: 8px; align-items: center; margin-bottom: 8px; }
.links input { margin: 0 !important; font-size: .8rem !important; }
.matchname { font-family: var(--display); font-size: 2.6rem; color: var(--gold); margin: 6px 0 12px; }
.note { background: rgba(255, 255, 255, .06); border-radius: 12px; padding: 10px; }

.sitefoot { border-top: 1px solid var(--line); margin-top: 32px; padding: 24px 16px; color: var(--muted); font-size: .88rem; position: relative; z-index: 1; }
.sitefoot .cols { max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.sitefoot b { display: block; color: var(--ink); margin-bottom: 6px; }
.sitefoot a { display: block; color: var(--muted); text-decoration: none; padding: 2px 0; }
.sitefoot p { max-width: 1040px; margin: 16px auto 0; }

@media (max-width: 560px) {
  .giftlist li { grid-template-columns: 1fr auto; }
  .links li { grid-template-columns: 1fr auto; }
  .links li b { grid-column: 1 / -1; }
}

/* Printing a question list: plain black on white, no chrome. */
@media print {
  body, body.site { background: #fff !important; color: #000; font-size: 12pt; }
  body::before, .sitehead, .sitefoot, .cta, .printrow, .faq, .related, .btn, .zh { display: none !important; }
  .article { max-width: none; padding: 0; }
  .article h1, .article h2 { color: #000; }
  .qlist li { border-color: #ccc; break-inside: avoid; }
}
