body.portal { line-height: 1.6; }
.pg-shell { max-width: 900px; margin: 0 auto; padding: 24px 16px 56px; }
.pg-intro h1 { margin-bottom: 12px; }
.pg-h1-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.pg-intro .lead { margin-bottom: 16px; font-size: 17px; }
.pg-tool { margin: 22px 0 36px; padding: 16px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.pg-tool h2 { margin: 0 0 10px; font-size: 22px; }
.pg-tool h3 { margin: 18px 0 8px; font-size: 18px; }
.pg-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 10px 0; }
.pg-chip { min-width: 44px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface-soft); color: var(--text); font-size: 14px; font-weight: 700; cursor: pointer; touch-action: manipulation; }
.pg-chip:hover:not(:disabled) { border-color: var(--accent); }
.pg-chip:disabled { opacity: .45; cursor: default; }
.pg-chip[aria-pressed="true"], .pg-chip-strong { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-field { display: grid; gap: 6px; margin: 10px 0; font-weight: 700; font-size: 14px; }
.pg-field textarea, .pg-field input[type="text"], .pg-field input[type="number"], .pg-field select { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--text); font: inherit; font-weight: 400; font-size: 16px; }
.pg-field textarea { min-height: 120px; resize: vertical; }
.pg-check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; }
.pg-check input { width: 20px; height: 20px; }
.pg-note { color: var(--muted); font-size: 14px; }
.pg-status { min-height: 1.6em; margin: 8px 0; font-size: 15px; font-weight: 700; }
.pg-primary { width: 100%; font-size: 16px; }
.pg-order { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.pg-order li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); font-weight: 700; }
.pg-num { display: inline-grid; place-items: center; min-width: 32px; height: 32px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 15px; font-variant-numeric: tabular-nums; }
.pg-now { padding: 12px 14px; border-radius: 12px; background: #fde7dc; font-size: 17px; font-weight: 800; }
.pg-gifts { display: grid; gap: 8px; margin: 10px 0; padding: 0; list-style: none; }
.pg-gifts li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.pg-gift-name { font-weight: 800; }
.pg-gift-meta { color: var(--muted); font-size: 14px; }
.pg-frozen { color: #4f55a3; font-weight: 800; }
.pg-story { margin: 12px 0; padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fffdf7; font-size: 18px; line-height: 1.75; white-space: pre-line; }
.pg-pass { padding: 0 4px; border-radius: 4px; font-weight: 900; }
.pg-pass-left { background: #e2f0e9; color: #066b5b; }
.pg-pass-right { background: #fde7dc; color: #9b3a23; }
.pg-plain .pg-pass { padding: 0; background: none; color: inherit; font-weight: inherit; }
.pg-reading .pg-story { position: fixed; inset: 0; z-index: 50; margin: 0; padding: 24px 20px 96px; overflow-y: auto; border: 0; border-radius: 0; font-size: 24px; }
.pg-reading .pg-exit { display: inline-flex; }
.pg-exit { display: none; position: fixed; right: 16px; bottom: 16px; z-index: 51; }
.pg-card { display: grid; place-items: center; min-height: 220px; margin: 12px 0; padding: 20px; border-radius: 16px; background: #2b2238; color: #fff; text-align: center; }
.pg-card-cat { color: #f6c9b8; font-size: 13px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.pg-card-word { margin: 8px 0 0; color: #fff; font-size: clamp(28px, 7vw, 44px); font-weight: 900; line-height: 1.2; }
.pg-timer { margin: 4px 0; color: var(--text); font-size: 32px; font-weight: 900; font-variant-numeric: tabular-nums; }
.pg-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pg-score { padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; text-align: center; font-weight: 800; }
.pg-score.pg-active { border-color: var(--accent); background: var(--surface-soft); }
.pg-score b { display: block; font-size: 28px; font-variant-numeric: tabular-nums; }
.pg-print-cards { display: none; }
.pg-article h2 { margin-top: 32px; }
.pg-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pg-faq summary { font-weight: 750; cursor: pointer; }
.pg-faq details p { margin: 8px 0 0; }
.pg-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; margin: 18px 0; }
.pg-hub-card { display: grid; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; }
.pg-hub-card:hover { border-color: var(--accent); }
.pg-hub-card strong { font-size: 18px; }
.pg-hub-card span { color: var(--muted); font-size: 14px; }
.pg-hub-card em { color: var(--accent); font-style: normal; font-weight: 800; font-size: 14px; }
.pg-footer { margin-top: 40px; color: var(--muted); font-size: 14px; }
.pg-cta { margin-top: 32px; padding: 16px; border-radius: var(--radius); background: var(--surface-soft); }

@media print {
  body.portal { background: #fff; }
  .site-header, .pg-intro, .pg-article, .pg-footer, .pg-cta, .more-solvers, .no-print, .pg-tool > :not(.print-area) { display: none !important; }
  .pg-tool { margin: 0; padding: 0; border: 0; }
  .print-area { display: block !important; }
  .pg-story { border: 0; padding: 0; font-size: 15pt; }
  .pg-print-cards { display: grid !important; grid-template-columns: repeat(3, 1fr); gap: 0; }
  .pg-print-cards div { display: grid; place-items: center; min-height: 1.6in; padding: 8px; border: 1px dashed #999; text-align: center; font-size: 14pt; font-weight: 800; break-inside: avoid; }
  .pg-print-cards small { display: block; color: #555; font-size: 9pt; font-weight: 600; }
  .pg-order li { border: 1px dashed #999; background: none; font-size: 14pt; break-inside: avoid; }
}
