body.portal { line-height: 1.6; }
.pg-shell { max-width: 900px; margin: 0 auto; padding: 24px 16px 56px; }
.pg-visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pg-h1-sub { display: block; margin-top: 4px; color: var(--muted); font-size: .55em; font-weight: 700; letter-spacing: 0; }
.pg-intro h1 { margin-bottom: 12px; }
.pg-intro .lead { margin-bottom: 16px; font-size: 17px; }
.pg-tool { margin: 22px 0 36px; padding: 16px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }

.pg-label { display: flex; align-items: center; gap: 8px; margin: 18px 0 10px; color: var(--text); font-size: 14px; font-weight: 750; }
.pg-label:first-of-type { margin-top: 0; }
.pg-num { display: inline-grid; place-items: center; flex: 0 0 auto; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; }
.pg-hint { margin: 10px 0; color: var(--muted); font-size: 14px; }
.pg-chips, .pg-presets, .pg-edit { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.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[aria-pressed="true"], .pg-chip-strong { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-chip-quiet { background: transparent; color: var(--muted); }

.pg-solve { width: 100%; font-size: 16px; }
.pg-status { min-height: 1.6em; margin: 12px 0; color: var(--text); font-size: 14px; }

.pg-result { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); scroll-margin-top: 12px; }
.pg-result:focus { outline: none; }
.pg-result-title { margin: 0 0 8px; font-size: 22px; }
.pg-note { margin: 0 0 10px; font-size: 14px; }
.pg-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pg-copy-status { flex-basis: 100%; margin: 0; color: var(--muted); font-size: 13px; }
.pg-copy-status:empty { display: none; }

/* The board: five centered rows of round holes; pegs are filled circles. */
.pg-title { margin: 0 0 8px; font-size: 22px; }
.pg-game-lead { margin: 0 0 12px; font-size: 15px; }
.pg-board { display: grid; justify-items: center; gap: 6px; margin: 8px auto 12px; padding: 16px 8px 14px; max-width: 380px; border-radius: 18px; background: linear-gradient(#e9c98f, #d9ae68); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .12); }
.pg-row { display: flex; gap: 8px; }
.pg-hole { position: relative; display: grid; place-items: center; width: 54px; height: 54px; padding: 0; border: 0; border-radius: 50%; background: radial-gradient(circle at 50% 55%, #6b4a22 0 34%, #b88a4a 36% 100%); cursor: pointer; touch-action: manipulation; }
.pg-hole span { position: absolute; right: 2px; bottom: -2px; color: #4a3517; font-size: 11px; font-weight: 800; }
.pg-hole[aria-pressed="true"]::before { content: ""; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffd8a8, #e8590c 60%, #a33e06); box-shadow: 0 2px 2px rgb(0 0 0 / .35); }
.pg-hole.pg-picked::before { background: radial-gradient(circle at 35% 30%, #d0ebff, #1c7ed6 60%, #0b4f8a); transform: scale(1.12); }
.pg-hole.pg-target { box-shadow: 0 0 0 3px #2f9e44; }
.pg-hole.pg-from { box-shadow: 0 0 0 3px #1c7ed6; }
.pg-hole.pg-to { box-shadow: 0 0 0 3px #2f9e44, 0 0 0 6px rgb(47 158 68 / .3); }
.pg-editing .pg-hole { outline: 2px dashed rgb(74 53 23 / .45); outline-offset: 1px; }
.pg-status { min-height: 3.2em; }
.pg-edit { margin-bottom: 12px; }
.pg-steps { margin: 0 0 12px; padding-left: 1.8em; }
.pg-steps li { margin-bottom: 4px; }
.pg-steps .pg-done { color: var(--muted); text-decoration: line-through; }
.pg-steps .pg-current { font-weight: 800; }
.pg-plain { padding-left: 1.8em; columns: 2; }
@media (max-width: 360px) { .pg-hole { width: 46px; height: 46px; } .pg-hole[aria-pressed="true"]::before { width: 26px; height: 26px; } }

.pg-article h2 { margin: 30px 0 12px; font-size: 24px; }
.pg-article li { margin-bottom: 8px; color: var(--muted); }
.pg-article li strong { color: var(--text); }
.pg-faq details { padding: 12px 0; border-bottom: 1px solid var(--line); }
.pg-faq summary { color: var(--text); font-weight: 750; cursor: pointer; }
.pg-faq details p { margin: 8px 0 0; }
.pg-cta { margin-top: 32px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.pg-cta h2 { margin-top: 0; }
.pg-cta .text-link { color: var(--accent-strong); }
.pg-ctas { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 0; }
.pg-footer { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

@media (min-width: 720px) {
  .pg-shell { padding: 36px 24px 64px; }
  .pg-tool { padding: 22px; }
}

