/* Learn & Play page. Loaded only on that page; uses the site's colour tokens from assets/css/app.css. */
.pg-page { padding-top: .75rem; padding-bottom: 1.5rem; }
.pg-head { display: flex; align-items: baseline; gap: .25rem 1rem; flex-wrap: wrap; }
.pg-head h1 { margin: 0; font-size: 1.35rem; letter-spacing: -.01em; }
.pg-head .lead { margin: 0; color: var(--muted); font-size: .95rem; }
.pg-app { min-height: 50vh; }
.pg-h2 { margin: .9rem 0 .4rem; font-size: 1.2rem; outline: none; }
.pg-foot { font-size: .8rem; margin-top: 1.5rem; }
body.pg-in-game .pg-head .lead, body.pg-in-game .pg-foot { display: none; }

/* The hidden attribute always wins over display rules below. */
.pg-app [hidden], .pg-dialog [hidden], .pg-stage [hidden] { display: none !important; }

/* Focus is always visible for keyboard users. */
.pg-app :focus-visible, .pg-dialog :focus-visible { outline: 3px solid var(--emerald); outline-offset: 2px; }
.pg-canvas:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--emerald); }

/* Tabs */
.pg-tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--border); overflow-x: auto; scrollbar-width: none; margin-top: .5rem; }
.pg-tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; min-height: 44px; display: flex; align-items: center; box-sizing: border-box; }
.pg-tabs a.active { color: var(--text); border-bottom-color: var(--primary); }
.pg-tabs a:hover { color: var(--text); }

/* Buttons */
.pg-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 44px; padding: .45rem .9rem; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; font-size: .95rem; line-height: 1.2;
  cursor: pointer; text-decoration: none; box-sizing: border-box; touch-action: manipulation; }
.pg-btn:hover:not(:disabled) { border-color: var(--primary); }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.pg-btn-primary:hover:not(:disabled) { filter: brightness(1.08); }
.pg-btn-quiet { background: var(--surface-2); border-color: transparent; }
.pg-btn-big { min-height: 50px; padding: .6rem 1.4rem; font-size: 1.05rem; }
.pg-btn[aria-pressed="true"] { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.pg-icon-btn { min-width: 44px; min-height: 44px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 1.05rem; cursor: pointer; }
.pg-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

.pg-row { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: .6rem 0; }
.pg-check { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; min-height: 40px; font-size: .92rem; }
.pg-check input { width: 1.15rem; height: 1.15rem; accent-color: var(--primary); }
.pg-ok { color: var(--ok); font-weight: 700; }
.pg-fail { color: var(--danger); font-weight: 600; }
.pg-stat { font-size: .85rem; color: var(--muted); }
.pg-c-label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 0; }

/* Lists of lessons and exercises */
.pg-cards { list-style: none; padding: 0; margin: .75rem 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pg-card { display: flex; gap: .75rem; align-items: flex-start; height: 100%; box-sizing: border-box; padding: .8rem .9rem; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; }
.pg-card:hover { border-color: var(--primary); }
.pg-card-body { display: flex; flex-direction: column; gap: .2rem; flex: 1; min-width: 0; }
.pg-card .muted { font-size: .9rem; }
.pg-num { flex: none; width: 1.9rem; height: 1.9rem; border-radius: 50%; display: grid; place-items: center; background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.pg-done { flex: none; font-size: .75rem; font-weight: 700; color: var(--ok); background: var(--ok-soft); border-radius: 99px; padding: .15rem .55rem; }

/* Lesson page */
.pg-back { display: flex; gap: 1rem; flex-wrap: wrap; margin: .6rem 0 0; font-size: .95rem; }
.pg-objective { background: var(--accent-soft); border-radius: 10px; padding: .6rem .85rem; margin-bottom: 1rem; }
.pg-lesson { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .pg-lesson { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.pg-lesson-text p { line-height: 1.55; }
.pg-lesson-side { position: sticky; top: 90px; }
.pg-diagram .pg-stage { width: 100%; }
.pg-note { min-height: 1.5em; color: var(--muted); font-size: .92rem; }
.pg-exercise { margin-top: 1.25rem; border-top: 1px solid var(--border); padding-top: .5rem; }
.pg-pager { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; flex-wrap: wrap; }

/* ------------------------------------------------------------------------------------------ game screen */
.pg-game { scroll-margin-top: 84px; display: grid; gap: .55rem; margin-top: .6rem; grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "coach" "stage" "controls"; }
.pg-g-top { grid-area: top; display: flex; align-items: center; gap: .5rem .75rem; flex-wrap: wrap; min-width: 0; }
.pg-coach { grid-area: coach; }
.pg-g-stage { grid-area: stage; min-width: 0; }
.pg-g-controls { grid-area: controls; min-width: 0; }
.pg-g-title { display: flex; align-items: baseline; gap: .25rem .75rem; flex-wrap: wrap; min-width: 0; }
.pg-g-title .pg-h2 { margin: 0; }
.pg-back-link { display: grid; place-items: center; min-width: 40px; min-height: 40px; border-radius: 10px; text-decoration: none; font-size: 1.2rem; color: var(--text); background: var(--surface-2); }

/* Scoreboard */
.pg-players { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; flex: 1 1 340px; min-width: 0; }
.pg-player { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--border); border-radius: 10px; padding: .35rem .6rem; background: var(--surface); min-width: 0; transition: border-color .2s, box-shadow .2s; }
.pg-player-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.pg-player strong { font-size: .92rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-player.active { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.pg-turn-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border); flex: none; }
.pg-player.active .pg-turn-dot { background: var(--emerald); box-shadow: 0 0 0 3px rgba(47, 207, 122, .25); }
.pg-group { font-size: .78rem; color: var(--muted); white-space: nowrap; }
.pg-balls { display: flex; flex-wrap: wrap; gap: 2px; margin-left: auto; max-width: 128px; justify-content: flex-end; }
.pg-dot { width: 13px; height: 13px; border-radius: 50%; background: var(--c); display: inline-block; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.pg-dot.stripe { background: linear-gradient(#f8f5ec 0 25%, var(--c) 25% 75%, #f8f5ec 75%); }
.pg-dot.gone { opacity: .18; }
.pg-match-menu { display: flex; gap: .35rem; flex-wrap: wrap; }
.pg-match-menu .pg-btn { min-height: 40px; padding: .35rem .7rem; font-size: .88rem; }

/* Table stage */
.pg-stage { position: relative; aspect-ratio: 2770 / 1500; width: 100%; margin: 0 auto; border-radius: 12px; overflow: hidden; background: #131417; box-shadow: 0 6px 22px rgba(6, 30, 20, .25); }
.pg-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.pg-panning .pg-canvas { cursor: grab; }
.pg-tools { position: absolute; top: 8px; right: 8px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.pg-tool { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .18); background: rgba(8, 30, 20, .72); color: #fff; cursor: pointer; padding: 0; touch-action: manipulation; }
.pg-tool:hover:not(:disabled) { background: rgba(8, 30, 20, .92); }
.pg-tool:disabled { opacity: .35; cursor: default; }
.pg-tool[aria-pressed="true"] { background: var(--emerald); color: #062a1e; border-color: var(--emerald); }
.pg-tool-exit { background: #fff; color: #062a1e; }
.pg-tools.pg-tools-b { top: auto; bottom: 8px; }
.pg-zoom { font: 700 .75rem/1 system-ui, sans-serif; color: #fff; text-shadow: 0 1px 2px #000; min-height: 1em; }
.pg-mag { position: absolute; left: 10px; bottom: 10px; width: 150px; height: 150px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .9); box-shadow: 0 4px 14px rgba(0, 0, 0, .45); pointer-events: none; background: #131417; }
.pg-banner { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); background: rgba(6, 42, 30, .92); color: #fff; font-weight: 800; font-size: clamp(1.1rem, 4vw, 1.8rem); padding: .55rem 1.3rem; border-radius: 10px; pointer-events: none; text-align: center; }
@media (pointer: coarse) { .pg-tool { width: 42px; height: 42px; } }

/* Shot controls */
.pg-ctrl { display: flex; align-items: center; gap: .5rem .7rem; padding: .45rem .55rem; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
.pg-c { display: flex; align-items: center; gap: .35rem; min-width: 0; }
.pg-c-power { flex: 1 1 200px; min-width: 170px; }
.pg-fine { min-width: 40px; min-height: 42px; padding: 0; }
.pg-c-aim { gap: .25rem; }
.pg-aim-out { min-width: 3.6em; flex: none; white-space: nowrap; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; font-size: .9rem; color: var(--muted); }
.pg-power { flex: 1; min-width: 80px; height: 28px; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; min-height: 0; width: auto; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; --pg-p: 35%; }
.pg-power::-webkit-slider-runnable-track { height: 12px; border-radius: 6px; background: linear-gradient(90deg, transparent var(--pg-p), var(--surface-2) var(--pg-p)), linear-gradient(90deg, #2fcf7a, #f2b705 60%, #e5372a); box-shadow: inset 0 0 0 1px var(--border); }
.pg-power::-moz-range-track { height: 12px; border-radius: 6px; background: linear-gradient(90deg, transparent var(--pg-p), var(--surface-2) var(--pg-p)), linear-gradient(90deg, #2fcf7a, #f2b705 60%, #e5372a); box-shadow: inset 0 0 0 1px var(--border); }
.pg-power::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -7px; border-radius: 50%; background: #fff; border: 3px solid var(--forest); box-shadow: 0 1px 4px rgba(0, 0, 0, .3); }
.pg-power::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 3px solid var(--forest); }
.pg-power-out { min-width: 3em; text-align: right; font-weight: 800; font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.pg-contact-btn { padding: .25rem .6rem .25rem .3rem; gap: .45rem; }
.pg-mini-ball { width: 34px; height: 34px; flex: none; }
.pg-contact-lines { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.pg-contact-lines .pg-c-label { font-size: .62rem; }
.pg-contact-name { font-size: .88rem; font-weight: 700; white-space: nowrap; }
.pg-guide-btn { font-size: .85rem; white-space: nowrap; }
.pg-c-tools { gap: .35rem; }
.pg-shoot { min-height: 50px; min-width: 118px; padding: 0 1.2rem; border-radius: 12px; border: 0; background: var(--primary); color: #fff; font: inherit; font-size: 1.1rem; font-weight: 800; letter-spacing: .02em; cursor: pointer; box-shadow: 0 2px 0 var(--forest); touch-action: manipulation; }
.pg-shoot:hover:not(:disabled) { filter: brightness(1.08); }
.pg-shoot:active:not(:disabled) { transform: translateY(1px); box-shadow: none; }
.pg-shoot:disabled { background: var(--border); color: var(--muted); box-shadow: none; cursor: not-allowed; }
.pg-ctrl.pg-off .pg-c-aim, .pg-ctrl.pg-off .pg-c-power { opacity: .5; }
.pg-hl { outline: 3px solid #f2b705 !important; outline-offset: 3px; border-radius: 12px; animation: pg-pulse 1.6s ease-in-out infinite; }
@keyframes pg-pulse { 50% { outline-color: rgba(242, 183, 5, .35); } }
@media (prefers-reduced-motion: reduce) { .pg-hl { animation: none; } .pg-player { transition: none; } }

/* Coach panel */
.pg-coach { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .6rem .8rem; display: flex; flex-direction: column; gap: .35rem; min-width: 0; box-sizing: border-box; }
.pg-coach-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.pg-coach-title { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--primary); }
.pg-coach[data-turn="cpu"] .pg-coach-title { color: var(--muted); }
.pg-coach-more { display: none; min-height: 36px; padding: .25rem .7rem; font-size: .85rem; }
.pg-coach-headline { margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.35; }
.pg-coach-lines { margin: 0; padding-left: 1.1rem; font-size: .9rem; line-height: 1.4; }
.pg-coach-lines:empty { display: none; }
.pg-coach-lines li + li { margin-top: .2rem; }
.pg-coach-instruction { margin: 0; font-size: .85rem; color: var(--muted); }
.pg-coach-instruction:empty { display: none; }
.pg-coach-body { display: flex; flex-direction: column; gap: .4rem; }
.pg-coach-extra { display: flex; flex-direction: column; gap: .3rem; }
.pg-coach-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; border-top: 1px solid var(--border); padding-top: .5rem; margin-top: .2rem; }
.pg-voice-row { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem; }
.pg-voice { font-size: .88rem; }
.pg-voice-note { margin: 0; font-size: .8rem; color: var(--muted); flex-basis: 100%; }
.pg-steps { list-style: none; counter-reset: s; margin: .2rem 0; padding: 0; display: grid; gap: .15rem; font-size: .88rem; }
.pg-steps li { counter-increment: s; display: flex; gap: .5rem; align-items: center; color: var(--muted); padding: .1rem 0; }
.pg-steps li::before { content: counter(s); width: 1.45rem; height: 1.45rem; border-radius: 50%; display: grid; place-items: center; font-size: .78rem; font-weight: 700; background: var(--surface-2); flex: none; }
.pg-steps li.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.pg-steps li.current { color: var(--text); font-weight: 700; }
.pg-steps li.current::before { background: var(--primary); color: #fff; }
.pg-step-nav { margin: .1rem 0; }
.pg-summary { display: grid; grid-template-columns: auto 1fr; gap: .15rem .7rem; margin: .2rem 0; padding: .5rem .65rem; border-radius: 10px; background: var(--surface-2); font-size: .88rem; }
.pg-summary dt { font-weight: 700; color: var(--muted); }
.pg-summary dd { margin: 0; }
.pg-review p { margin: .2rem 0; }
.pg-demo-bar { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .3rem 0; }
.pg-speed { display: inline-flex; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.pg-seg { min-width: 44px; min-height: 42px; border: 0; background: var(--surface); color: var(--text); font: inherit; font-weight: 700; cursor: pointer; }
.pg-seg + .pg-seg { border-left: 1px solid var(--border); }
.pg-seg[aria-checked="true"] { background: var(--primary); color: #fff; }
.pg-approaches { display: flex; flex-direction: column; gap: .35rem; }
.pg-approaches:empty { display: none; }
.pg-alt-list { display: flex; flex-direction: column; gap: .35rem; }
.pg-alt { justify-content: flex-start; text-align: left; font-size: .88rem; }
.pg-alt span { display: flex; flex-direction: column; gap: .1rem; }
.pg-alt small { font-weight: 400; color: var(--muted); }
.pg-options { display: flex; flex-wrap: wrap; gap: 0 1rem; }
.pg-end .pg-row { margin: .2rem 0; }

/* Dialogs: rules drawer and the large cue ball */
.pg-dialog { border: 0; border-radius: 14px; padding: 0; max-width: min(640px, calc(100vw - 24px)); width: 100%; max-height: calc(100dvh - 24px); background: var(--surface); color: var(--text); box-shadow: 0 20px 50px rgba(0, 0, 0, .35); }
.pg-dialog::backdrop { background: rgba(4, 20, 13, .55); }
.pg-dialog-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .5rem .5rem .4rem 1rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 1; }
.pg-dialog-head h3 { margin: 0; font-size: 1.05rem; }
.pg-x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: transparent; color: var(--text); border-radius: 10px; cursor: pointer; }
.pg-x:hover { background: var(--surface-2); }
.pg-dialog-foot { display: flex; justify-content: flex-end; gap: .5rem; padding: .6rem 1rem .9rem; }
.pg-drawer-body { padding: .3rem 1rem 1rem; }
.pg-drawer-body h4 { margin: .9rem 0 .35rem; font-size: .95rem; }
.pg-help-list, .pg-rule-list { margin: 0; padding-left: 1.2rem; line-height: 1.45; font-size: .93rem; }
.pg-help-list li, .pg-rule-list li { margin: .35rem 0; }
.pg-rule-svg { display: block; width: 180px; max-width: 100%; height: auto; margin: .35rem 0 .2rem; border-radius: 6px; }
.pg-contact-dialog { max-width: min(400px, calc(100vw - 24px)); }
.pg-contact { padding: .6rem 1rem 0; text-align: center; }
.pg-contact-ball { width: min(240px, 62vw, 40dvh); height: auto; touch-action: none; cursor: ns-resize; border-radius: 50%; }
.pg-contact-txt { font: 700 13px system-ui, sans-serif; fill: #3a3a3a; }
.pg-contact-off { fill: #8a857a; font-weight: 600; font-size: 11px; }
.pg-contact-marker { filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4)); }
.pg-contact-value { margin: .3rem 0 .1rem; font-size: 1.15rem; font-weight: 800; }
.pg-contact-effect { margin: .2rem 0; font-size: .92rem; line-height: 1.4; }
.pg-contact-why { margin: .5rem 0 0; padding: .5rem .6rem; font-size: .82rem; line-height: 1.4; color: var(--muted); background: var(--surface-2); border-radius: 8px; text-align: left; }

/* Match set-up */
.pg-levels { border: 0; padding: 0; margin: .8rem 0; display: grid; gap: .5rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.pg-levels legend { font-weight: 700; margin-bottom: .5rem; }
.pg-level { display: flex; gap: .6rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 10px; padding: .7rem; cursor: pointer; background: var(--surface); }
.pg-level:has(input:checked) { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.pg-level > span { display: flex; flex-direction: column; gap: .2rem; }
.pg-level input { margin-top: .25rem; width: 1.1rem; height: 1.1rem; accent-color: var(--primary); }

/* ---------------------------------------------------------------- desktop: table + side coach panel */
@media (min-width: 900px) and (min-height: 521px) {
  .pg-game { grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "top top" "stage coach" "controls coach"; grid-template-rows: auto auto 1fr; align-items: start; column-gap: .9rem; }
  .pg-coach { grid-row: 2 / 4; max-height: calc(100dvh - 110px); overflow-y: auto; position: sticky; top: 88px; }
  /* Table as large as possible while the controls stay on screen under it. */
  .pg-game .pg-stage { width: min(100%, calc((100vh - 250px) * 2770 / 1500)); width: min(100%, calc((100dvh - 250px) * 2770 / 1500)); }
}

/* ---------------------------------------------------------------- phones and small tablets */
@media (max-width: 899px), (max-height: 520px) {
  body.pg-in-game .site-header { position: static; } /* the page scrolls the header away so the table gets the screen */
  .pg-game { scroll-margin-top: 6px; }
  .pg-c-power { min-width: 0; }
  .pg-coach-more { display: inline-flex; }
  .pg-coach:not(.open) .pg-coach-instruction, .pg-coach:not(.open) .pg-coach-foot,
  .pg-coach:not(.open) .pg-steps, .pg-coach:not(.open) .pg-options, .pg-coach:not(.open) .pg-approaches,
  .pg-coach:not(.open) .pg-summary, .pg-coach:not(.open) .pg-step-nav, .pg-coach:not(.open) .pg-match-menu,
  .pg-coach:not(.open) .pg-more-actions, .pg-coach:not(.open) .pg-scenario, .pg-coach:not(.open) .pg-level-details,
  .pg-coach:not(.open) .pg-level-note, .pg-coach:not(.open) .pg-plan-list + p { display: none; }
  /* Compact card on phones: only the last coaching line (the recommended action); the rest is under More. */
  .pg-coach.pg-compact-last:not(.open) .pg-coach-lines li:not(:last-child) { display: none; }
  .pg-quick { margin: .2rem 0; }
  .pg-quick:not(:has(:not([hidden]))) { display: none; }
  .pg-coach { padding: .45rem .65rem; gap: .25rem; }
  .pg-coach-headline { font-size: .95rem; }
  .pg-coach-lines { font-size: .86rem; }
}
@media (max-width: 899px) and (orientation: portrait) {
  .pg-game .pg-stage { aspect-ratio: 1500 / 2770; width: min(100%, calc((100vh - 305px) * 1500 / 2770)); width: min(100%, calc((100dvh - 305px) * 1500 / 2770)); }
  .pg-diagram .pg-stage { aspect-ratio: 1500 / 2770; width: min(100%, calc((100dvh - 140px) * 1500 / 2770)); }
  .pg-mag { width: 112px; height: 112px; }
}
/* Narrow screens: aim + Shoot on one row; power, contact and guide on the next. */
@media (max-width: 640px) {
  .wrap.pg-page { padding-left: 12px; padding-right: 12px; }
  .pg-tabs a { padding: .5rem .6rem; font-size: .92rem; }
  .pg-ctrl { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "aim shoot" "power tools"; gap: .4rem .5rem; padding: .4rem; }
  .pg-c-aim { grid-area: aim; justify-content: space-between; }
  .pg-c-power { grid-area: power; }
  .pg-c-tools { grid-area: tools; }
  .pg-shoot { grid-area: shoot; min-width: 88px; padding: 0 .7rem; }
  .pg-fine { min-width: 40px; }
  .pg-aim-out { min-width: 3.5em; font-size: .8rem; }
  .pg-c-power .pg-c-label { display: none; }
  .pg-contact-lines, .pg-guide-btn span { display: none; }
  .pg-contact-btn, .pg-guide-btn { min-width: 44px; padding: .2rem .35rem; }
  .pg-players { flex-basis: 100%; }
  .pg-balls { max-width: 66px; }
  .pg-dot { width: 8px; height: 8px; }
}
/* Landscape phones: table on the left, everything else in a column on the right. */
@media (max-height: 520px) and (orientation: landscape) {
  .pg-game { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "stage top" "stage coach" "stage controls"; grid-template-rows: auto minmax(0, 1fr) auto;
    height: calc(100vh - 12px); height: calc(100dvh - 12px); align-items: stretch; gap: .3rem .5rem; margin-top: .25rem; }
  .pg-g-stage { align-self: center; }
  .pg-game .pg-stage { width: min(calc(100vw - 290px), calc((100vh - 12px) * 2770 / 1500)); width: min(calc(100vw - 290px), calc((100dvh - 12px) * 2770 / 1500)); }
  .pg-coach { min-height: 0; overflow-y: auto; }
  .pg-ctrl { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "aim aim" "power power" "tools shoot"; gap: .3rem .4rem; padding: .35rem; }
  .pg-c-aim { grid-area: aim; justify-content: space-between; }
  .pg-c-power { grid-area: power; }
  .pg-c-power .pg-c-label { display: none; }
  .pg-c-tools { grid-area: tools; }
  .pg-shoot { grid-area: shoot; min-width: 0; min-height: 44px; padding: 0 .9rem; }
  .pg-fine { min-width: 38px; min-height: 38px; }
  .pg-c-aim { gap: .15rem; }
  .pg-aim-out { min-width: 3.4em; font-size: .75rem; }
  .pg-contact-lines, .pg-guide-btn span { display: none; }
  .pg-contact-btn, .pg-guide-btn { min-width: 42px; min-height: 42px; padding: .2rem .35rem; }
  .pg-g-top .pg-h2 { font-size: 1rem; }
  .pg-g-top .pg-stat { display: none; }
  .pg-players { gap: .25rem; flex-basis: 100%; }
  .pg-player { padding: .15rem .4rem; gap: .3rem; }
  .pg-player strong { font-size: .8rem; }
  .pg-group { font-size: .7rem; }
  .pg-balls { display: none; }
  .pg-coach-headline { font-size: .88rem; }
  .pg-coach-lines { font-size: .8rem; }
  body.pg-in-game .pg-tabs, body.pg-in-game .pg-head { display: none; }
  .pg-mag { width: 96px; height: 96px; }
}

/* Full screen: the game fills the screen; the exit button sits in the table's tool column. */
.pg-game:fullscreen { background: var(--bg); padding: 10px; margin: 0; overflow: auto; align-content: start; }
@media (min-width: 900px) and (min-height: 521px) {
  .pg-game:fullscreen .pg-stage { width: min(100%, calc((100dvh - 150px) * 2770 / 1500)); }
  .pg-game:fullscreen .pg-coach { top: 0; max-height: calc(100dvh - 30px); }
}
@media (max-width: 899px) and (orientation: portrait) {
  .pg-game:fullscreen .pg-stage { width: min(100%, calc((100dvh - 200px) * 1500 / 2770)); }
}

/* ------------------------------------------------------------------------------------------ academy */
.pg-h3 { margin: 1.25rem 0 .3rem; font-size: 1.05rem; }
.pg-panel { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .75rem 1rem; }
.pg-panel h3 { margin: .1rem 0 .5rem; font-size: 1rem; }
.pg-home-grid { display: grid; gap: .75rem; grid-template-columns: minmax(0, 1fr); margin: .75rem 0; }
@media (min-width: 820px) { .pg-home-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.pg-link { color: var(--primary); font-weight: 600; }
.pg-badge { display: inline-block; font-size: .72rem; font-weight: 700; border-radius: 99px; padding: .12rem .55rem; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.pg-badge-ok { background: var(--ok-soft); color: var(--ok); }
.pg-badge-wip { background: var(--accent-soft); color: var(--text); }
.pg-meter { display: block; height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; margin: .3rem 0 .1rem; }
.pg-meter i { display: block; height: 100%; background: var(--primary); }
.pg-chips { list-style: none; padding: 0; margin: .5rem 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.pg-chip { display: inline-flex; align-items: center; min-height: 40px; padding: .3rem .8rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem; }
.pg-chip:hover { border-color: var(--primary); }
.pg-coach-levels { border: 0; padding: 0; margin: 0; display: grid; gap: .4rem; }
.pg-coach-levels legend { font-weight: 700; margin-bottom: .3rem; }
.pg-note-warn { color: var(--text); background: var(--accent-soft); border-radius: 8px; padding: .45rem .7rem; }
.pg-planned { margin-top: 1rem; border-top: 1px dashed var(--border); padding-top: .5rem; }

/* Lesson: big visual beside short steps */
.pg-lesson2 { margin-bottom: .5rem; }
@media (min-width: 960px) { .pg-lesson2 { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.pg-lesson-visual { min-width: 0; }
.pg-lesson-steps { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: .8rem 1rem; position: sticky; top: 90px; }
.pg-step-text { font-size: 1.05rem; line-height: 1.55; min-height: 5.5em; margin: .35rem 0 .4rem; }
.pg-step-dots { list-style: none; padding: 0; margin: .3rem 0 .6rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.pg-dot-btn { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); cursor: pointer; padding: 0; }
.pg-dot-btn.seen { background: var(--primary-soft); }
.pg-dot-btn.current { border-color: var(--primary); background: var(--primary); }
.pg-lsec { margin-top: 1.1rem; border-top: 1px solid var(--border); padding-top: .4rem; }
.pg-lsec h3 { font-size: 1rem; margin: .5rem 0; }
.pg-review-list li, .pg-drills li { margin: .3rem 0; line-height: 1.5; }
.pg-selfcheck { border: 1px dashed var(--border); border-radius: 10px; padding: .5rem .8rem; margin-top: .6rem; display: grid; gap: .1rem; }
.pg-selfcheck legend { font-weight: 700; padding: 0 .3rem; }
.pg-sources { margin-top: 1rem; font-size: .88rem; }
.pg-sources li { margin: .35rem 0; }
.pg-quiz-q { border: 1px solid var(--border); border-radius: 10px; padding: .5rem .8rem; margin: .5rem 0; display: grid; gap: .1rem; }
.pg-quiz-q legend { font-weight: 600; padding: 0 .3rem; line-height: 1.4; }
.pg-quiz-fb { margin: .3rem 0 0; font-size: .92rem; }
.pg-compare-list li { margin: .45rem 0; }
.pg-approach-notes { font-size: .9rem; color: var(--muted); }

/* Technique illustrations */
.pg-illus { margin: 0; }
.pg-illus-pic svg { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--border); background: #e9edf2; }
.pg-illus-cap { font-size: 1rem; line-height: 1.5; margin: .5rem 0; min-height: 3em; }
.pg-illus-tools { justify-content: space-between; }
.pg-illus-frames { display: flex; gap: .25rem; flex-wrap: wrap; }
.pg-illus-note { font-size: .8rem; margin: 0; }
.pg-seg-bad { color: var(--danger); }
.pg-illus-dialog { max-width: min(1000px, calc(100vw - 24px)); }
.pg-illus-big { padding: 0 1rem; }

/* Practice: per-criterion feedback and scenario details */
.pg-checks { list-style: none; padding: 0; margin: .4rem 0; display: grid; gap: .15rem; font-size: .92rem; }
.pg-checks li { font-weight: 600; }
.pg-scenario { margin-top: .6rem; font-size: .9rem; }
.pg-scenario summary, .pg-level-details summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.pg-share-text { width: 100%; box-sizing: border-box; font: .8rem/1.4 ui-monospace, monospace; margin-top: .4rem; }
.pg-card-ex { flex-direction: column; gap: .4rem; }
.pg-card-ex .pg-card-body { color: inherit; text-decoration: none; }
.pg-card-meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .85rem; }
.pg-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.pg-table th, .pg-table td { text-align: left; padding: .35rem .4rem; border-bottom: 1px solid var(--border); }

/* Finish the rack */
.pg-plan-list { margin: .2rem 0 .4rem; padding-left: 1.4rem; font-weight: 600; }
.pg-stage.pg-picking .pg-canvas { cursor: pointer; }
.pg-rack-lines { padding-left: 1.2rem; display: grid; gap: .5rem; }
.pg-rack-lines li { line-height: 1.45; font-weight: 500; }
.pg-rack-lines li.pg-ok, .pg-rack-lines li.pg-fail { font-weight: 500; }
.pg-rack-lines li.pg-decision { outline: 2px solid var(--accent, #f2b705); outline-offset: 3px; border-radius: 6px; }
.pg-shot-n { font-weight: 700; color: var(--text); margin-right: .3rem; }
.pg-rack-review h3 { font-size: 1rem; margin: .6rem 0 .3rem; }
.pg-dialog .pg-illus-pic svg { width: 100%; height: auto; max-height: 70vh; }
/* Five tabs: wrap onto two rows on narrow phones instead of hiding tabs off-screen. */
@media (max-width: 560px) { .pg-tabs { flex-wrap: wrap; overflow-x: visible; } .pg-tabs a { padding: .45rem .6rem; min-height: 40px; } }

/* ======================================================================================= redesign (coaching) */
/* Type and rhythm across the whole Learn & Play section */
.pg-app { --pg-felt: #1159d6; --pg-felt-dark: #0a3f9e; --pg-gold: #f2b705; --pg-cyan: #2bb7d9; font-size: 1rem; }
.pg-h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -.015em; font-weight: 800; }
.pg-app .muted { line-height: 1.5; }
.pg-btn { border-radius: 12px; font-weight: 700; }
.pg-btn-primary { box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }

/* Assistance switch (Guided / Hints / Independent) */
.pg-assist { display: inline-flex; border-radius: 999px; background: var(--surface-2); padding: 3px; gap: 2px; margin-left: auto; }
.pg-assist .pg-seg { border: 0; border-radius: 999px; min-height: 38px; padding: 0 .9rem; background: transparent; color: var(--muted); font-size: .9rem; }
.pg-assist .pg-seg + .pg-seg { border-left: 0; }
.pg-assist .pg-seg[aria-checked="true"] { background: var(--primary); color: var(--primary-ink, #fff); box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }

/* Wider coach panel for shot practice */
@media (min-width: 900px) and (min-height: 521px) {
  .pg-game.pg-shot { grid-template-columns: minmax(0, 1fr) 380px; }
}
.pg-shot .pg-coach { padding: .8rem 1rem; gap: .5rem; }
.pg-shot .pg-coach-headline { font-size: 1.15rem; }

/* Step track */
.pg-gsteps { list-style: none; margin: .1rem 0 .2rem; padding: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.pg-gstep-btn { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: transparent; padding: .25rem 0; cursor: pointer; color: var(--muted); font: inherit; font-size: .68rem; font-weight: 700; line-height: 1.1; border-radius: 8px; }
.pg-gstep-btn:disabled { opacity: .4; cursor: default; }
.pg-gstep-n { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: .8rem; }
.pg-gsteps li.done .pg-gstep-n { background: var(--ok-soft); color: var(--ok); }
.pg-gsteps li.current .pg-gstep-btn { color: var(--text); }
.pg-gsteps li.current .pg-gstep-n { background: var(--primary); color: #fff; box-shadow: 0 0 0 3px var(--primary-soft); }
.pg-gstep-name { text-align: center; }

/* The coaching card: the current action, emphasised */
.pg-gcard { border-left: 4px solid var(--primary); padding: .2rem 0 .2rem .8rem; display: flex; flex-direction: column; gap: .45rem; }
.pg-gtitle:empty { display: none; }
.pg-gtext { margin: 0; font-size: 1.02rem; line-height: 1.55; }
.pg-gtext:empty { display: none; }
.pg-gstatus { margin: 0; font-weight: 700; font-size: .95rem; }
.pg-gstatus:empty { display: none; }
.pg-gstatus:first-letter { color: var(--ok); }
.pg-gnav { margin: .1rem 0 0; }
.pg-gfacts { margin: 0; padding-left: 1.1rem; line-height: 1.5; }
.pg-gmeaning { margin: 0; line-height: 1.5; }
.pg-gcontact { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: .8rem; align-items: center; }
.pg-gcontact .pg-cb { width: 150px; height: 150px; }
.pg-side-note { font-size: .82rem; margin: .4rem 0; }
.pg-gaim { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: .6rem; align-items: center; }
.pg-full { width: 130px; height: auto; background: #0f4fc4; border-radius: 10px; }
.pg-hints { margin: 0; padding-left: 1.2rem; line-height: 1.5; }
.pg-hints li { margin: .3rem 0; }
.pg-gactions:empty { display: none; }
.pg-diag p { margin: .3rem 0; line-height: 1.5; }

/* Enlarged cue ball (contact on the cue ball) */
.pg-cb { display: block; width: 220px; height: 220px; touch-action: none; cursor: ns-resize; border-radius: 50%; }
.pg-cb:focus-visible { outline: 3px solid var(--emerald); outline-offset: 4px; }
.pg-cb-txt { font: 700 15px system-ui, sans-serif; fill: #4a463d; }
.pg-cb-lock { fill: #8a8478; font-size: 13px; font-weight: 600; }
.pg-cb-marker { filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); transition: cy .12s; }

/* Contact comparison */
.pg-presets { list-style: none; margin: .2rem 0; padding: 0; display: grid; gap: .3rem; }
.pg-preset { width: 100%; display: flex; flex-direction: column; align-items: flex-start; gap: .1rem; text-align: left; border: 1px solid var(--border); border-radius: 10px; padding: .45rem .7rem; background: var(--surface); color: var(--text); font: inherit; cursor: pointer; }
.pg-preset:hover { border-color: var(--primary); }
.pg-preset[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); }
.pg-preset-name { font-weight: 800; }
.pg-preset-res { font-size: .86rem; }
.pg-preset.ok .pg-preset-res { color: var(--ok); }
.pg-preset.bad .pg-preset-res { color: var(--danger); }
.pg-preset.off { cursor: default; background: var(--surface-2); }

/* Power band: the range that works in the simulation, and the current power */
.pg-pband { position: relative; height: 16px; border-radius: 99px; background: linear-gradient(90deg, #cfe9d9, #f6e3a6 60%, #f3b9a8); margin: .3rem 0 .5rem; }
.pg-pband-ok { position: absolute; top: -3px; bottom: -3px; border-radius: 99px; background: rgba(19, 116, 63, .35); border: 2px solid var(--ok); }
.pg-pband-me { position: absolute; top: -6px; width: 6px; height: 28px; margin-left: -3px; border-radius: 3px; background: var(--text); }

/* Path legend and impact close-up */
.pg-legend-box summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; }
.pg-legend { list-style: none; margin: .3rem 0; padding: .5rem .6rem; display: grid; gap: .25rem; font-size: .85rem; background: #0e3c94; color: #fff; border-radius: 10px; }
.pg-legend li { display: flex; align-items: center; gap: .5rem; }
.pg-legend-zone { width: 20px; height: 14px; border-radius: 50%; border: 2px dashed #ffd65a; background: rgba(255, 214, 90, .2); }
.pg-legend-stop { width: 14px; height: 14px; border-radius: 50%; border: 3px solid #6ee7ff; box-sizing: border-box; }
.pg-closeup-box { margin: .3rem 0; }
.pg-closeup { width: 100%; max-width: 280px; height: auto; aspect-ratio: 1; border-radius: 12px; display: block; background: #0f4fc4; }
.pg-closeup-box figcaption { font-size: .82rem; color: var(--muted); line-height: 1.4; margin-top: .3rem; }

/* Phones: the card is the current instruction; the track shows numbers only */
@media (max-width: 899px), (max-height: 520px) {
  .pg-gstep-name { display: none; }
  .pg-gsteps { gap: 2px; }
  .pg-coach:not(.open) .pg-legend-box, .pg-coach:not(.open) .pg-closeup-box, .pg-coach:not(.open) .pg-rules-now { display: none; }
  .pg-gcontact { grid-template-columns: 112px minmax(0, 1fr); }
  .pg-gcontact .pg-cb { width: 112px; height: 112px; }
  .pg-gaim { grid-template-columns: 96px minmax(0, 1fr); }
  .pg-full { width: 96px; }
  .pg-assist { margin-left: 0; }
  .pg-assist .pg-seg { padding: 0 .6rem; font-size: .82rem; }
}
/* Shot practice on desktop: the table column is narrower, so the shot controls use two rows. */
@media (min-width: 900px) and (min-height: 521px) {
  .pg-shot .pg-ctrl { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "aim power power" "tools tools shoot"; gap: .45rem .7rem; }
  .pg-shot .pg-c-aim { grid-area: aim; }
  .pg-shot .pg-c-power { grid-area: power; min-width: 0; }
  .pg-shot .pg-c-tools { grid-area: tools; }
  .pg-shot .pg-shoot { grid-area: shoot; }
}
.pg-gstatus:first-letter { color: inherit; }
.pg-ok-mark { color: var(--ok); }
.pg-gcontact { grid-template-columns: 136px minmax(0, 1fr); }
.pg-gcontact .pg-cb { width: 136px; height: 136px; }
.pg-gcontact .pg-btn { width: 100%; margin-top: .3rem; }

/* Contact & Effect explorer (lessons) */
.pg-explorer { margin: 1.2rem 0; border-radius: 16px; background: linear-gradient(180deg, var(--surface), var(--surface-2)); border: 1px solid var(--border); padding: 1rem; }
.pg-x-head h3 { margin: 0 0 .2rem; font-size: 1.15rem; }
.pg-x-head p { margin: 0 0 .6rem; }
.pg-x-grid { display: grid; gap: 1rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 960px) { .pg-x-grid { grid-template-columns: minmax(0, 3fr) minmax(300px, 2fr); align-items: start; } }
.pg-x-table .pg-stage { width: 100%; }
.pg-x-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; align-items: end; }
.pg-x-pair figure { margin: 0; text-align: center; }
.pg-x-pair figcaption { font-size: .8rem; color: var(--muted); font-weight: 700; margin-top: .25rem; }
.pg-x-pair .pg-cb { width: 100%; height: auto; max-width: 170px; margin: 0 auto; }
.pg-x-pair .pg-full { width: 100%; max-width: 160px; }
.pg-x-presets { display: flex; flex-wrap: wrap; gap: .35rem; margin: .7rem 0 .4rem; }
.pg-chip-btn { min-height: 40px; padding: .3rem .8rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 700; font-size: .88rem; cursor: pointer; }
.pg-chip-btn[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.pg-chip-btn:disabled { cursor: not-allowed; opacity: .6; }
.pg-chip-off { font-weight: 600; font-style: italic; }
.pg-x-powerrow { margin: .2rem 0 .5rem; }
.pg-x-power { flex: 1; }
.pg-x-meaning, .pg-x-why, .pg-x-aim { margin: .35rem 0; line-height: 1.5; font-size: .95rem; }
.pg-x-outcome { margin: .4rem 0; font-size: 1rem; }
/* Recommended setup beside the common error */
.pg-illus-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pg-illus-pair figure { margin: 0; }
.pg-illus-pair figcaption { font-weight: 800; font-size: .85rem; margin-bottom: .25rem; }
.pg-pair-good { color: var(--ok); }
.pg-pair-bad { color: var(--danger); }
@media (max-width: 560px) { .pg-illus-pair { grid-template-columns: 1fr; } }
.pg-illus-pic svg { box-shadow: 0 6px 18px rgba(0, 0, 0, .12); }
.pg-link-note { border-left: 3px solid var(--accent); padding: .3rem .7rem; background: var(--accent-soft); border-radius: 0 8px 8px 0; line-height: 1.5; }
/* Match: rules that stay visible while playing */
.pg-rulestrip { flex-basis: 100%; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem; font-size: .85rem; }
.pg-rulestrip span { background: var(--surface-2); border-radius: 99px; padding: .2rem .65rem; font-weight: 600; }
.pg-rulestrip .pg-rs-win { background: var(--accent-soft); }
.pg-seq-list { list-style: none; padding: 0; margin: .3rem 0; display: grid; gap: .35rem; font-size: .9rem; }
.pg-seq-list li { border: 1px solid var(--border); border-radius: 10px; padding: .4rem .6rem; display: flex; flex-wrap: wrap; gap: .3rem .5rem; align-items: center; }
.pg-seq-list li.ok { border-color: color-mix(in srgb, var(--ok) 40%, var(--border)); }
.pg-seq-list li.bad { opacity: .8; }

/* Academy home: a learning path, not a grid of cards */
.pg-continue { background: linear-gradient(135deg, #0e3c94, #1159d6 60%, #1a6fe8); color: #fff; border: 0; position: relative; overflow: hidden; }
.pg-continue::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #e9e4d6 55%, #a49d8c); opacity: .9; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }
.pg-continue h3, .pg-continue p, .pg-continue .muted, .pg-continue .pg-c-label { color: #fff; position: relative; z-index: 1; }
.pg-continue .pg-link { color: #fff; text-decoration: underline; }
.pg-continue .pg-btn-primary { background: #f2b705; border-color: #f2b705; color: #1b1400; }
.pg-course-cards { grid-template-columns: 1fr; gap: 0; position: relative; margin-left: .2rem; }
.pg-course-cards > li { position: relative; padding-left: 2.6rem; }
.pg-course-cards > li::before { content: ""; position: absolute; left: .95rem; top: 0; bottom: 0; width: 3px; background: var(--border); }
.pg-course-cards > li:first-child::before { top: 1.6rem; }
.pg-course-cards > li:last-child::before { bottom: calc(100% - 1.6rem); }
.pg-course-cards .pg-card { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; padding: .9rem .4rem .9rem 0; }
.pg-course-cards .pg-card:hover { background: var(--surface); }
.pg-course-cards .pg-num { position: absolute; left: 0; top: .8rem; width: 2.2rem; height: 2.2rem; background: var(--surface); border: 3px solid var(--primary); color: var(--primary); font-size: 1rem; z-index: 1; }
.pg-course-cards .pg-card strong { font-size: 1.08rem; }
.pg-course-cards .pg-meter { max-width: 320px; }
.pg-rules-now { font-size: .9rem; }
.pg-rules-now summary { cursor: pointer; font-weight: 600; min-height: 36px; display: flex; align-items: center; }

/* Rack: how this shot prepares the next (own line, kept apart from aiming messages) */
.pg-prep-note { margin: 0; font-size: .95rem; color: var(--pg-text, #e8eef4); }
.pg-prep-note:empty { display: none; }

/* Shot practice on phones (portrait): progressive disclosure. The guided card shows the step, its instruction,
   the live check and Back/Next; the step's tools open under "More". */
@media (max-width: 899px) and (orientation: portrait) {
  .pg-shot .pg-coach:not(.open) .pg-gstepmode .pg-gbody { display: none; }
  .pg-shot .pg-coach:not(.open) .pg-gtext { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: .1rem 0; font-size: .9rem; }
  .pg-shot .pg-coach:not(.open) .pg-gnav .pg-btn { min-height: 40px; padding: .2rem .7rem; }
  .pg-shot .pg-coach:not(.open) .pg-gnav .pg-btn-quiet { display: none; }
  .pg-shot .pg-gstatus { margin: .1rem 0; font-size: .86rem; }
  .pg-shot .pg-gsteps .pg-gstep-btn { min-width: 32px; min-height: 32px; }
  /* Table and Shoot first, so the whole table and the shot controls fit the screen; the coach follows. */
  .pg-game.pg-shot, .pg-game.pg-mode-match, .pg-game.pg-mode-rack { grid-template-areas: "top" "stage" "controls" "coach"; }
  .pg-shot .pg-g-top .pg-h2 { font-size: 1.1rem; }
  .pg-shot .pg-g-top .pg-stat { font-size: .8rem; }
  .pg-shot .pg-assist { margin-top: .1rem; }
}
.pg-x-cmp { margin: .3rem 0; padding-left: 1.1rem; font-size: .88rem; }
.pg-x-cmp:empty { display: none; }

/* ------------------------------------------------------------------------------------------ cameras */
.pg-canvas3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: crosshair; }
.pg-canvas3d:focus-visible { outline: none; box-shadow: inset 0 0 0 3px var(--emerald); }
.pg-views { position: absolute; top: 8px; left: 8px; display: flex; gap: 2px; padding: 3px; border-radius: 12px; background: rgba(8, 14, 20, .72); backdrop-filter: blur(6px); z-index: 3; }
.pg-view-btn { display: inline-flex; align-items: center; gap: .3rem; min-height: 40px; padding: 0 .6rem; border: 0; border-radius: 9px; background: transparent; color: #e9eef3; font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; }
.pg-view-btn .pg-ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-view-btn[aria-pressed="true"] { background: #f4f1e8; color: #0d3b26; }
.pg-view-btn:disabled { opacity: .4; cursor: not-allowed; }
.pg-view-btn:focus-visible { outline: 3px solid #ffd65a; outline-offset: 1px; }
.pg-view-gear { padding: 0 .5rem; }
.pg-vset { position: absolute; top: 58px; left: 8px; z-index: 4; width: min(300px, calc(100% - 16px)); background: var(--surface, #fff); color: var(--text, #111); border-radius: 12px; padding: .7rem .8rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); display: grid; gap: .45rem; font-size: .9rem; }
.pg-vset fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: .2rem; }
.pg-vset legend { font-weight: 800; margin-bottom: .2rem; }
.pg-vset-opt { display: flex; align-items: center; gap: .5rem; min-height: 34px; cursor: pointer; }
.pg-vset-opt input { width: 1.1rem; height: 1.1rem; accent-color: var(--primary, #13743f); }
.pg-vset-note { margin: 0; color: var(--muted, #666); font-size: .82rem; }
.pg-vset-note:empty { display: none; }
.pg-stage.pg-cam-player { background: #07090c; }
.pg-stage.pg-cam-player .pg-banner { top: 40%; }

/* Close-up: the enlarged cue ball fills the stage, with the supported contacts beside it. */
.pg-closeview { position: absolute; inset: 0; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 1rem; align-items: center; padding: 58px 1rem 1rem;
  background: radial-gradient(circle at 35% 45%, #1d6be0 0%, #0f3f92 58%, #0a2558 100%); color: #f4f7fb; overflow-y: auto; }
.pg-cv-ball { display: grid; justify-items: center; gap: .4rem; }
.pg-closeview .pg-cb { width: min(100%, 300px); height: auto; aspect-ratio: 1; filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .35)); }
.pg-closeview .pg-cb-txt { fill: #4a4438; }
.pg-cv-cap { margin: 0; font-size: .82rem; text-align: center; opacity: .9; max-width: 320px; }
.pg-cv-side { display: grid; gap: .55rem; align-content: center; }
.pg-cv-title { margin: 0; font-size: 1.15rem; }
.pg-cv-rec { margin: 0; font-weight: 700; color: #b9f5cf; }
.pg-cv-effect { margin: 0; line-height: 1.45; }
.pg-cv-note { margin: 0; font-size: .82rem; opacity: .85; line-height: 1.4; }
.pg-cv-presets { display: flex; flex-wrap: wrap; gap: .35rem; }
.pg-closeview .pg-chip-btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .35); }
.pg-closeview .pg-chip-btn[aria-pressed="true"] { background: #f4f1e8; color: #0d3b26; }
.pg-closeview .pg-chip-off { opacity: .6; font-style: italic; }
.pg-closeview .pg-btn:not(.pg-btn-primary) { background: rgba(255, 255, 255, .14); color: #fff; border-color: rgba(255, 255, 255, .4); }
.pg-cv-back { justify-self: start; }
@media (max-width: 640px), (orientation: portrait) and (max-width: 899px) {
  .pg-view-btn span { display: none; }
  .pg-view-btn { min-width: 44px; justify-content: center; padding: 0; }
  .pg-closeview { grid-template-columns: 1fr; align-content: start; padding-top: 60px; gap: .6rem; }
  .pg-closeview .pg-cb { width: min(70vw, 240px); }
}
/* Phones: the match rules stay on one line that scrolls sideways, so the table keeps the screen. */
@media (max-width: 640px) {
  .pg-rulestrip { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; font-size: .78rem; padding-bottom: 2px; }
  .pg-rulestrip span { white-space: nowrap; flex: none; }
}

/* ------------------------------------------------------------------------------------------ full-screen game
   The table fills the screen; a thin HUD floats over it (top: leave, title or players, cameras; bottom: contact,
   aim, power, Shoot). The coach is a small glass panel, folded to one line until "More" is pressed. */
.pg-imm-exit, .pg-imm-enter { display: none; }
.pg-g-stage { position: relative; }
.pg-game:not(.pg-immersive) .pg-imm-enter { display: inline-flex; align-items: center; justify-content: center; position: absolute; z-index: 3; left: 8px; bottom: 8px; width: 44px; height: 44px;
  border: 0; border-radius: 12px; background: #13743f; color: #fff; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .3); }
.pg-imm-enter .pg-ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
html:has(.pg-game.pg-immersive) body { overflow: hidden; }
.pg-game.pg-immersive {
  position: fixed; inset: 0; z-index: 1000; margin: 0; padding: 0; height: auto !important; display: block; background: #05070a; color: #eef3f7; overflow: hidden;
  --text: #eef3f7; --muted: #aab6c2; --surface: rgba(255, 255, 255, .08); --surface-2: rgba(255, 255, 255, .12); --border: rgba(255, 255, 255, .18);
  --hud: rgba(8, 12, 18, .62);
}
.pg-game.pg-immersive .pg-g-stage { position: absolute; inset: 0; align-self: stretch; justify-self: stretch; }
.pg-game.pg-immersive .pg-stage { width: 100% !important; height: 100%; aspect-ratio: auto !important; border-radius: 0; box-shadow: none; margin: 0; }
.pg-game.pg-immersive .pg-tools-b { display: none; }
/* Top HUD */
.pg-game.pg-immersive .pg-g-top { position: absolute; z-index: 6; top: max(8px, env(safe-area-inset-top)); left: 8px; right: 300px; display: flex; flex-wrap: nowrap; align-items: center; gap: .45rem; pointer-events: none; }
.pg-game.pg-immersive .pg-g-top > * { pointer-events: auto; }
.pg-game.pg-immersive .pg-imm-exit { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 44px; height: 44px; border-radius: 12px; border: 0; background: var(--hud); color: #fff; font-size: 1.15rem; font-weight: 800; cursor: pointer; backdrop-filter: blur(6px); }
.pg-game.pg-immersive .pg-imm-exit:focus-visible { outline: 3px solid #ffd65a; }
.pg-game.pg-immersive .pg-g-top .pg-h2 { color: #fff; font-size: 1rem; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.pg-game.pg-immersive .pg-g-title { min-width: 0; }
.pg-game.pg-immersive .pg-g-top .pg-stat, .pg-game.pg-immersive .pg-assist, .pg-game.pg-immersive .pg-badge, .pg-game.pg-immersive .pg-rulestrip, .pg-game.pg-immersive .pg-back-link { display: none; }
.pg-game.pg-immersive .pg-players { flex: 0 1 auto; display: flex; gap: .35rem; min-width: 0; }
.pg-game.pg-immersive .pg-player { background: var(--hud); border-color: rgba(255, 255, 255, .15); padding: .2rem .55rem; backdrop-filter: blur(6px); min-width: 0; }
.pg-game.pg-immersive .pg-player.active { border-color: #3ddc84; box-shadow: 0 0 0 2px rgba(61, 220, 132, .35); }
.pg-game.pg-immersive .pg-player strong { font-size: .8rem; }
.pg-game.pg-immersive .pg-group { font-size: .7rem; }
.pg-game.pg-immersive .pg-views { left: auto; right: 64px; top: max(8px, env(safe-area-inset-top)); }
.pg-game.pg-immersive .pg-view-btn span { display: none; }
.pg-game.pg-immersive .pg-view-btn { min-width: 44px; justify-content: center; padding: 0; }
.pg-game.pg-immersive .pg-vset { left: auto; right: 8px; }
.pg-game.pg-immersive .pg-tools { top: max(8px, env(safe-area-inset-top)); }
/* Coach: a small glass panel, folded by default */
.pg-game.pg-immersive .pg-coach { position: absolute; z-index: 5; left: 8px; top: calc(max(8px, env(safe-area-inset-top)) + 54px); width: min(340px, calc(100% - 84px)); max-height: calc(100% - 230px);
  overflow-y: auto; background: var(--hud); border: 1px solid rgba(255, 255, 255, .14); border-radius: 14px; padding: .4rem .6rem; gap: .25rem; backdrop-filter: blur(8px); color: var(--text); box-shadow: 0 6px 20px rgba(0, 0, 0, .35); }
.pg-game.pg-immersive .pg-coach-title { color: #7fe3a8; font-size: .7rem; }
.pg-game.pg-immersive .pg-coach-more { display: inline-flex; min-height: 32px; padding: .1rem .6rem; font-size: .8rem; }
.pg-game.pg-immersive .pg-coach-headline { font-size: .92rem; margin: 0; }
.pg-game.pg-immersive .pg-coach:not(.open) :is(.pg-coach-lines, .pg-coach-instruction, .pg-coach-foot, .pg-gtext, .pg-gfacts, .pg-legend-box, .pg-rules-now, .pg-scenario,
  .pg-closeup-box, .pg-demo-bar, .pg-match-menu, .pg-approaches, .pg-diag, .pg-checks, .pg-more-actions, .pg-level-note, .pg-gsteps .pg-gstep-name) { display: none !important; }
.pg-game.pg-immersive .pg-coach:not(.open) .pg-gactions button:nth-child(n+3) { display: none; }
.pg-game.pg-immersive .pg-coach:not(.open) .pg-gnav .pg-btn-quiet { display: none; }
.pg-game.pg-immersive .pg-coach .pg-btn:not(.pg-btn-primary) { background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .25); }
.pg-game.pg-immersive .pg-coach .pg-btn { min-height: 38px; padding: .2rem .7rem; font-size: .85rem; }
.pg-game.pg-immersive .pg-coach a { color: #9fd3ff; }
.pg-game.pg-immersive .pg-gsteps { margin: 0; }
.pg-game.pg-immersive .pg-gstatus { font-size: .82rem; margin: 0; }
.pg-game.pg-immersive .pg-review p { margin: 0; font-size: .88rem; }
/* Bottom HUD: contact and guide (left), fine aim (bottom left), power (right, vertical), Shoot (bottom right) */
.pg-game.pg-immersive .pg-g-controls, .pg-game.pg-immersive .pg-ctrl { position: static; display: contents; }
.pg-game.pg-immersive .pg-ctrl > * { position: absolute; z-index: 6; }
.pg-game.pg-immersive .pg-shoot { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: 88px; height: 88px; min-width: 0; padding: 0; border-radius: 50%; font-size: 1.05rem;
  box-shadow: 0 6px 22px rgba(0, 0, 0, .45), inset 0 -4px 0 rgba(0, 0, 0, .25); }
.pg-game.pg-immersive .pg-c-power { min-width: 0; flex: none; right: 30px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 104px); width: 60px; height: 230px; display: flex; flex-direction: column-reverse; align-items: center; gap: .3rem;
  background: var(--hud); border-radius: 30px; padding: .7rem 0 .5rem; backdrop-filter: blur(6px); }
.pg-game.pg-immersive .pg-c-power .pg-c-label { display: none; }
.pg-game.pg-immersive .pg-c-power .pg-power { writing-mode: vertical-lr; direction: rtl; width: 28px; height: 170px; margin: 0; }
.pg-game.pg-immersive .pg-power-out { color: #fff; font-weight: 800; font-size: .85rem; min-width: 0; }
.pg-game.pg-immersive .pg-c-aim { left: 12px; bottom: max(16px, env(safe-area-inset-bottom)); background: var(--hud); border-radius: 14px; padding: 4px; gap: 3px; backdrop-filter: blur(6px); }
.pg-game.pg-immersive .pg-c-aim .pg-fine { min-width: 40px; min-height: 40px; background: rgba(255, 255, 255, .1); color: #fff; border-color: rgba(255, 255, 255, .2); }
.pg-game.pg-immersive .pg-aim-out { color: #fff; font-size: .78rem; min-width: 3.4em; }
.pg-game.pg-immersive .pg-c-tools { left: 12px; bottom: calc(max(16px, env(safe-area-inset-bottom)) + 62px); display: flex; flex-direction: column; gap: 8px; }
.pg-game.pg-immersive .pg-contact-btn, .pg-game.pg-immersive .pg-guide-btn { width: 52px; height: 52px; min-width: 0; padding: 4px; border-radius: 50%; justify-content: center; background: var(--hud); border-color: rgba(255, 255, 255, .25); color: #fff; backdrop-filter: blur(6px); }
.pg-game.pg-immersive .pg-guide-btn[aria-pressed="true"] { background: rgba(19, 116, 63, .85); }
.pg-game.pg-immersive .pg-contact-lines, .pg-game.pg-immersive .pg-guide-btn span { display: none; }
.pg-game.pg-immersive .pg-contact-btn .pg-mini-ball { width: 40px; height: 40px; }
.pg-game.pg-immersive .pg-ctrl.pg-off .pg-shoot { opacity: .45; }
.pg-game.pg-immersive .pg-banner { z-index: 7; }
.pg-game.pg-immersive .pg-closeview { padding-top: 70px; padding-bottom: 130px; }
/* Phones: cameras on a second row, coach below them */
@media (max-width: 640px) {
  .pg-game.pg-immersive .pg-g-top { right: 64px; }
  .pg-game.pg-immersive .pg-views { right: auto; left: 8px; top: calc(max(8px, env(safe-area-inset-top)) + 52px); }
  .pg-game.pg-immersive .pg-coach { top: calc(max(8px, env(safe-area-inset-top)) + 106px); width: calc(100% - 84px); max-height: calc(100% - 330px); }
  .pg-game.pg-immersive .pg-vset { top: 112px; }
  .pg-game.pg-immersive .pg-c-power { height: 200px; right: 26px; }
  .pg-game.pg-immersive .pg-c-power .pg-power { height: 140px; }
  .pg-game.pg-immersive .pg-shoot { width: 80px; height: 80px; }
  .pg-game.pg-immersive .pg-c-aim .pg-fine { min-width: 38px; }
}
/* Landscape phones: everything a little smaller */
@media (max-height: 520px) and (orientation: landscape) {
  .pg-game.pg-immersive .pg-c-power { height: 150px; bottom: 100px; }
  .pg-game.pg-immersive .pg-c-power .pg-power { height: 100px; }
  .pg-game.pg-immersive .pg-coach { max-height: calc(100% - 140px); width: min(300px, 40%); }
  .pg-game.pg-immersive .pg-c-tools { flex-direction: row; }
}
/* Overhead view in the full-screen game: the plan sits clear of the controls. */
.pg-game.pg-immersive .pg-stage:not(.pg-cam-player) .pg-canvas { top: 60px; left: 72px; width: calc(100% - 176px); height: calc(100% - 134px); }
@media (max-width: 640px) {
  .pg-game.pg-immersive .pg-stage:not(.pg-cam-player) .pg-canvas { top: 112px; left: 70px; width: calc(100% - 162px); height: calc(100% - 192px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .pg-game.pg-immersive .pg-stage:not(.pg-cam-player) .pg-canvas { top: 56px; left: 120px; width: calc(100% - 216px); height: calc(100% - 66px); }
}
.pg-game.pg-immersive .pg-coach:not(.open) .pg-coach-headline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pg-game.pg-immersive .pg-coach:not(.open) .pg-gcard { border-left: 0; padding-left: 0; }
.pg-game.pg-immersive .pg-coach:not(.open) .pg-gcard:not(:has(.pg-gnav button, .pg-gstatus:not(:empty))) { display: none; }
/* Folded guided card: the step's one-tap helpers stay (e.g. "Aim at the suggested line", "Use 70%"), the text goes. */
.pg-game.pg-immersive .pg-coach:not(.open) .pg-gbody > :not(.pg-btn):not(.pg-row):not(.pg-viewhint) { display: none; }
.pg-game.pg-immersive .pg-coach:not(.open) .pg-gbody { display: flex; flex-wrap: wrap; gap: .35rem; }
.pg-game.pg-immersive .pg-coach:not(.open) .pg-gbody > .pg-row:not(:has(button)) { display: none; }
.pg-game.pg-immersive .pg-viewhint { margin: 0; }

/* Game call-outs over the table ("2 POTTED", "SCRATCH") */
.pg-toast { position: absolute; left: 50%; top: 38%; z-index: 8; transform: translate(-50%, -50%) scale(.6); opacity: 0; pointer-events: none;
  font: 900 clamp(1.4rem, 5vw, 2.6rem)/1 system-ui, -apple-system, "Segoe UI", sans-serif; letter-spacing: .06em; color: #fff; white-space: nowrap;
  text-shadow: 0 3px 0 rgba(0, 0, 0, .35), 0 0 24px rgba(0, 0, 0, .55); -webkit-text-stroke: 1px rgba(0, 0, 0, .25); }
.pg-toast.good { color: #ffe27a; }
.pg-toast.bad { color: #ff7a6e; }
.pg-toast.show { animation: pg-toast 1.5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
@keyframes pg-toast { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 12% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  22% { transform: translate(-50%, -50%) scale(1); } 75% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .pg-toast.show { animation: none; opacity: 1; transform: translate(-50%, -50%); } }
/* Full-screen game: the coach reads as an objective line, not a chat box */
.pg-game.pg-immersive .pg-coach-title { display: none; }
.pg-game.pg-immersive .pg-coach-head { position: absolute; top: 6px; right: 6px; }
.pg-game.pg-immersive .pg-coach { padding-right: 4.6rem; min-height: 46px; justify-content: center; }
.pg-game.pg-immersive .pg-coach.open { padding-right: .6rem; }
.pg-game.pg-immersive .pg-coach.open .pg-coach-head { position: static; justify-content: flex-end; }
.pg-game.pg-immersive .pg-coach-headline { font-weight: 800; letter-spacing: .01em; }
.pg-game.pg-immersive .pg-coach-headline::before { content: ''; display: inline-block; width: 8px; height: 8px; margin-right: .45rem; border-radius: 50%; background: #ffd65a; box-shadow: 0 0 8px #ffd65a; vertical-align: .1em; }
.pg-game.pg-immersive .pg-shoot { text-transform: uppercase; letter-spacing: .06em; font-weight: 900; }

/* ------------------------------------------------------------------------------------------ game HUD, uncluttered
   Like mobile pool games: drag on the table to aim, roll the wheel (right) for fine aim, pull the cue (left) and
   let go to shoot, tap the cue ball (top right) for spin, tap the bulb for a suggestion. Everything else is hidden. */
.pg-pullcue, .pg-roller, .pg-hint-btn { display: none; }
.pg-game.pg-immersive .pg-shoot, .pg-game.pg-immersive .pg-c-power, .pg-game.pg-immersive .pg-c-aim, .pg-game.pg-immersive .pg-guide-btn,
.pg-game.pg-immersive .pg-tools, .pg-game.pg-immersive .pg-view-btn[data-view="contact"] { display: none !important; }
/* Pull-back cue (left edge) */
.pg-game.pg-immersive .pg-pullcue { display: block; position: absolute; z-index: 6; left: 14px; top: 22%; height: 52%; width: 54px; touch-action: none; cursor: ns-resize; outline: none; }
.pg-game.pg-immersive .pg-pullcue:focus-visible { box-shadow: 0 0 0 3px #ffd65a; border-radius: 27px; }
.pg-pc-track { position: absolute; left: 50%; top: 0; bottom: 0; width: 10px; transform: translateX(-50%); border-radius: 5px; background: rgba(0, 0, 0, .45); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15); overflow: hidden; }
.pg-pc-fill { position: absolute; left: 0; right: 0; top: 0; height: 0; background: linear-gradient(#3ddc84, #f2c21b 60%, #e0313a); }
.pg-pc-mark { position: absolute; left: -2px; right: -2px; height: 3px; margin-top: -1px; background: #ffd65a; box-shadow: 0 0 6px #ffd65a; }
.pg-pc-stick { position: absolute; left: 50%; top: -6%; width: 14px; height: 70%; margin-left: -7px; border-radius: 7px 7px 4px 4px;
  background: linear-gradient(90deg, #0b0b0d, #3a3d44 45%, #0b0b0d); box-shadow: 0 4px 12px rgba(0, 0, 0, .5); transition: transform .12s ease-out; }
.pg-pc-stick::before { content: ''; position: absolute; left: 1px; right: 1px; top: 0; height: 9px; border-radius: 6px 6px 0 0; background: #3c6fb0; box-shadow: 0 9px 0 0 #f1ece0; }
.pg-pullcue.pulling .pg-pc-stick { transition: none; }
.pg-pc-label { position: absolute; left: 50%; bottom: -26px; transform: translateX(-50%); color: #fff; font-weight: 800; font-size: .85rem; text-shadow: 0 1px 4px #000; white-space: nowrap; }
.pg-pullcue.off { opacity: .4; cursor: default; }
/* Fine-aim wheel (right edge) */
.pg-game.pg-immersive .pg-roller { display: block; position: absolute; z-index: 6; right: 14px; top: 26%; height: 44%; width: 40px; border-radius: 20px; touch-action: none; cursor: ns-resize; outline: none;
  background: linear-gradient(90deg, #101216, #3b3f47 50%, #101216); box-shadow: 0 4px 14px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(255, 255, 255, .12); overflow: hidden; }
.pg-roller-face { position: absolute; inset: 0; background: repeating-linear-gradient(180deg, rgba(255, 255, 255, .28) 0 2px, transparent 2px 9px);
  -webkit-mask: linear-gradient(transparent, #000 25%, #000 75%, transparent); mask: linear-gradient(transparent, #000 25%, #000 75%, transparent); }
.pg-roller:focus-visible { box-shadow: 0 0 0 3px #ffd65a; }
.pg-roller.off { opacity: .4; }
/* Suggestion bulb (bottom left) */
.pg-game.pg-immersive .pg-hint-btn:not([hidden]) { display: inline-flex; align-items: center; justify-content: center; position: absolute; z-index: 6; left: 14px; bottom: max(16px, env(safe-area-inset-bottom));
  width: 56px; height: 56px; border-radius: 50%; border: 0; cursor: pointer; background: radial-gradient(circle at 35% 30%, #ffe48a, #f2b705 70%); color: #3a2a00; box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.pg-hint-btn .pg-ic { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pg-hint-btn:disabled { opacity: .45; }
.pg-hint-btn.busy { animation: pg-pulse .8s ease-in-out infinite alternate; }
@keyframes pg-pulse { to { transform: scale(.9); } }
/* Spin: the cue ball button sits top right, under the camera buttons */
.pg-game.pg-immersive .pg-c-tools { left: auto; right: 10px; top: calc(max(8px, env(safe-area-inset-top)) + 54px); bottom: auto; }
.pg-game.pg-immersive .pg-contact-btn { width: 56px; height: 56px; }
.pg-game.pg-immersive .pg-contact-btn .pg-mini-ball { width: 46px; height: 46px; }
/* Camera buttons: compact, top right */
.pg-game.pg-immersive .pg-views { right: 10px; }
/* The coach is a short tip at the bottom centre; More opens the details */
.pg-game.pg-immersive .pg-coach { left: 50%; transform: translateX(-50%); top: auto; bottom: max(16px, env(safe-area-inset-bottom)); width: min(460px, calc(100% - 180px)); max-height: 46%; }
.pg-game.pg-immersive .pg-coach:not(.open) { padding-top: .35rem; padding-bottom: .35rem; }
.pg-game.pg-immersive .pg-stage:not(.pg-cam-player) .pg-canvas { top: 64px; left: 80px; width: calc(100% - 140px); height: calc(100% - 150px); }
@media (max-width: 640px) {
  .pg-game.pg-immersive .pg-views { left: auto; right: 10px; top: max(8px, env(safe-area-inset-top)); }
  .pg-game.pg-immersive .pg-g-top { right: 170px; }
  .pg-game.pg-immersive .pg-group { display: none; }
  .pg-game.pg-immersive .pg-player { padding: .15rem .45rem; }
  .pg-game.pg-immersive .pg-coach { width: calc(100% - 100px); left: calc(50% + 28px); }
  .pg-game.pg-immersive .pg-pullcue { top: 26%; height: 44%; width: 46px; left: 8px; }
  .pg-game.pg-immersive .pg-roller { right: 8px; width: 34px; top: 34%; height: 34%; }
  .pg-game.pg-immersive .pg-stage:not(.pg-cam-player) .pg-canvas { top: 64px; left: 58px; width: calc(100% - 108px); height: calc(100% - 150px); }
}
@media (max-height: 520px) and (orientation: landscape) {
  .pg-game.pg-immersive .pg-stage:not(.pg-cam-player) .pg-canvas { top: 56px; left: 76px; width: calc(100% - 132px); height: calc(100% - 112px); }
  .pg-game.pg-immersive .pg-coach { bottom: 8px; max-height: 40%; }
}
/* First-game guide to the controls */
.pg-tut { position: absolute; inset: 0; z-index: 20; background: rgba(3, 6, 10, .62); color: #fff; }
.pg-tut-center { position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%); text-align: center; display: grid; gap: .6rem; justify-items: center; width: min(360px, 80%); }
.pg-tut-title { margin: 0; font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #ffd65a; font-weight: 800; }
.pg-tut-main { margin: 0; font-size: 1.35rem; font-weight: 900; }
.pg-tut-main::before { content: '☝'; display: block; font-size: 2.2rem; animation: pg-swipe 1.6s ease-in-out infinite; }
@keyframes pg-swipe { 0%, 100% { transform: translateX(-24px) rotate(-8deg); } 50% { transform: translateX(24px) rotate(8deg); } }
.pg-tut-tip { position: absolute; font-weight: 800; font-size: .9rem; }
.pg-tut-tip span { display: inline-block; background: #ffd65a; color: #2a1d00; border-radius: 10px; padding: .3rem .6rem; box-shadow: 0 4px 14px rgba(0, 0, 0, .4); }
.pg-tut-tip.t-pull { left: 76px; top: 40%; }
.pg-tut-tip.t-pull span::before { content: '◀ '; }
.pg-tut-tip.t-roll { right: 64px; top: 46%; }
.pg-tut-tip.t-roll span::after { content: ' ▶'; }
.pg-tut-tip.t-spin { right: 78px; top: calc(max(8px, env(safe-area-inset-top)) + 66px); }
.pg-tut-tip.t-spin span::after { content: ' ▶'; }
.pg-tut-tip.t-hint { left: 80px; bottom: max(28px, env(safe-area-inset-bottom)); }
.pg-tut-tip.t-hint span::before { content: '◀ '; }
@media (prefers-reduced-motion: reduce) { .pg-tut-main::before { animation: none; } }
.pg-vset-help { justify-self: start; }
@media (max-width: 640px) {
  .pg-game.pg-immersive .pg-players { flex: 1 1 auto; min-width: 0; }
  .pg-game.pg-immersive .pg-player { flex: 1 1 0; min-width: 64px; }
  .pg-game.pg-immersive .pg-player strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
}

/* ------------------------------------------------------------------------------------------ academy as steps */
.pg-home-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: .6rem 1rem; margin-top: .6rem; }
.pg-home-head .pg-h2 { margin: .2rem 0 0; }
.pg-lvl { border: 0; margin: 0; padding: 0; display: grid; gap: .25rem; justify-items: end; }
.pg-lvl-pills { display: inline-flex; padding: 3px; border-radius: 99px; background: var(--surface-2, rgba(127, 127, 127, .15)); }
.pg-lvl-pill { position: relative; cursor: pointer; }
.pg-lvl-input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pg-lvl-pill span { display: inline-block; padding: .4rem .85rem; border-radius: 99px; font-weight: 700; font-size: .88rem; color: var(--muted); }
.pg-lvl-input:checked + span { background: var(--primary, #13743f); color: #fff; }
.pg-lvl-input:focus-visible + span { outline: 3px solid #ffd65a; }
.pg-lvl-note { margin: 0; font-size: .8rem; color: var(--muted); max-width: 340px; text-align: right; }
.pg-next { margin: .9rem 0 1.2rem; padding: 1.1rem 1.2rem; border-radius: 18px; color: #fff; background: radial-gradient(circle at 90% 110%, rgba(255, 255, 255, .22) 0 18%, transparent 19%), linear-gradient(135deg, #0e3c94, #1a8fdc); box-shadow: 0 8px 24px rgba(10, 40, 90, .25); }
.pg-next-kicker { margin: 0; font-size: .75rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .85; }
.pg-next-title { margin: .25rem 0 .8rem; font-size: clamp(1.2rem, 4vw, 1.6rem); line-height: 1.2; }
.pg-next-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.pg-btn-play { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.4rem; border-radius: 99px; background: #f2b705; color: #2a1d00 !important; font-weight: 900; font-size: 1.05rem; text-decoration: none; border: 0; box-shadow: 0 4px 0 #b88a00; }
.pg-btn-play:hover { filter: brightness(1.05); }
.pg-next-count { font-weight: 700; opacity: .9; }
.pg-next-meter { display: block; margin-top: .9rem; height: 6px; background: rgba(255, 255, 255, .25); }
.pg-next-meter i { background: #f2b705; }
/* Course path */
.pg-path { list-style: none; margin: .4rem 0 1.2rem; padding: 0; position: relative; }
.pg-path::before { content: ''; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 3px; background: var(--border); border-radius: 2px; }
.pg-path > li { position: relative; margin: 0 0 .5rem; }
.pg-path-step > summary { list-style: none; display: flex; align-items: center; gap: .8rem; cursor: pointer; padding: .35rem .2rem; border-radius: 12px; }
.pg-path-step > summary::-webkit-details-marker { display: none; }
.pg-path-step > summary:hover { background: var(--surface-2, rgba(127, 127, 127, .1)); }
.pg-path-node { position: relative; z-index: 1; flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-weight: 900; background: var(--surface); border: 3px solid var(--border); color: var(--muted); }
.pg-path-step.done .pg-path-node { background: #13743f; border-color: #13743f; color: #fff; }
.pg-path-step.current .pg-path-node { background: #f2b705; border-color: #f2b705; color: #2a1d00; box-shadow: 0 0 0 5px rgba(242, 183, 5, .25); }
.pg-path-title { display: grid; min-width: 0; }
.pg-path-title strong { font-size: 1.02rem; }
.pg-path-sub { font-size: .82rem; color: var(--muted); }
.pg-path-body { margin: .3rem 0 .6rem 56px; display: grid; gap: .5rem; }
.pg-steps-row { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.pg-stepdot { display: inline-flex; align-items: center; gap: .45rem; padding: .3rem .7rem .3rem .3rem; border-radius: 99px; border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; font-size: .86rem; font-weight: 600; max-width: 100%; }
.pg-stepdot-n { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--surface-2, rgba(127, 127, 127, .15)); font-weight: 800; font-size: .8rem; }
.pg-stepdot-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-stepdot.done .pg-stepdot-n { background: #13743f; color: #fff; }
.pg-stepdot.next { border-color: #f2b705; box-shadow: 0 0 0 2px rgba(242, 183, 5, .35); }
.pg-stepdot.next .pg-stepdot-n { background: #f2b705; color: #2a1d00; }
.pg-path-more { font-size: .85rem; justify-self: start; }
.pg-more-ways { display: flex; flex-wrap: wrap; gap: .6rem; align-items: flex-start; margin: .4rem 0 1rem; }
.pg-more-ways details { flex-basis: 100%; }
.pg-more-ways summary { cursor: pointer; font-weight: 700; }
/* Course page: lessons as steps */
.pg-lesson-path .pg-lstep { align-items: center; }
.pg-lesson-path li.done .pg-num { background: #13743f; color: #fff; border-color: #13743f; }
.pg-lesson-path li.next .pg-lstep { border-color: #f2b705; box-shadow: 0 0 0 2px rgba(242, 183, 5, .3); }
.pg-lesson-path li.next .pg-num { background: #f2b705; color: #2a1d00; }
.pg-lstep-go { min-height: 40px; padding: 0 1rem; font-size: .95rem; margin-left: auto; flex: none; }
.pg-course-sum { margin-top: 0; }
@media (max-width: 640px) {
  .pg-lvl { justify-items: start; }
  .pg-lvl-note { text-align: left; }
  .pg-stepdot-t { max-width: 46vw; }
}
/* The step path replaces the old course card list and hero decoration. */
.pg-path.pg-course-cards { display: block; margin-left: 0; }
.pg-path.pg-course-cards > li { padding-left: 0; }
.pg-path.pg-course-cards > li::before { display: none; }
.pg-next.pg-continue::after { right: -50px; bottom: -70px; width: 160px; height: 160px; opacity: .35; z-index: 0; }
.pg-next > * { position: relative; z-index: 1; }
.pg-next .pg-next-title { color: #fff; }
@media (max-width: 640px) {
  .pg-lvl-note { display: none; }
  .pg-path-body { margin-left: 8px; }
}
/* Lesson: stages shown one at a time */
.pg-lstages { list-style: none; margin: .8rem 0 1rem; padding: 0; display: flex; gap: .3rem; overflow-x: auto; scrollbar-width: none; scroll-margin-top: 90px; }
.pg-lstages li { flex: 1 1 0; min-width: max-content; }
.pg-lstage { width: 100%; display: flex; align-items: center; gap: .45rem; padding: .45rem .7rem .55rem; border: 0; border-bottom: 3px solid var(--border); background: transparent; color: var(--muted); font: inherit; font-weight: 700; font-size: .9rem; cursor: pointer; }
.pg-lstage-n { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2, rgba(127, 127, 127, .15)); font-size: .78rem; }
.pg-lstages li.seen .pg-lstage { color: var(--text); border-bottom-color: #13743f; }
.pg-lstages li.seen .pg-lstage-n { background: #13743f; color: #fff; }
.pg-lstages li.current .pg-lstage { color: var(--text); border-bottom-color: #f2b705; }
.pg-lstages li.current .pg-lstage-n { background: #f2b705; color: #2a1d00; }
.pg-lstage:focus-visible { outline: 3px solid #ffd65a; }
.pg-stage-nav { justify-content: space-between; margin: 1rem 0; }
.pg-stage-nav .pg-btn-play { margin-left: auto; }
.pg-objective { font-size: 1rem; }
@media (max-width: 640px) { .pg-lstage-t { display: none; } .pg-lstages li.current .pg-lstage-t { display: inline; } }

/* ======================================================================================== Billard237 app theme
   Dark green app look for Learn & Play (target design): green surfaces, mint actions, gold brand accent,
   photo-like pictures rendered with the game's own table, a bottom tab bar on phones. */
.pg-page {
  --g-bg: #0b221b; --g-card: #10302a; --g-card2: #163c33; --g-line: rgba(255, 255, 255, .09); --g-text: #ecf4ef; --g-muted: #9eb7ad;
  --g-mint: #5fe3a1; --g-mint-ink: #04301b; --g-gold: #f2c14e;
  --text: var(--g-text); --muted: var(--g-muted); --surface: var(--g-card); --surface-2: var(--g-card2); --border: var(--g-line);
  --primary: #5fe3a1; --primary-ink: #04301b; --primary-soft: rgba(95, 227, 161, .14); --accent-soft: rgba(242, 193, 78, .18);
  color: var(--g-text); font-feature-settings: "ss01", "cv11";
}
html:has(.pg-page), html:has(.pg-page) body { background: #0b221b; }
.pg-page .pg-app { display: flex; flex-direction: column; }
.pg-page .pg-app > * { min-width: 0; }
.pg-page a { color: var(--g-mint); }
.pg-page .muted { color: var(--g-muted); }
.pg-page .pg-h2 { font-weight: 800; letter-spacing: -.01em; color: var(--g-text); }
.pg-page .pg-h3 { font-size: 1.2rem; font-weight: 800; margin: 1.3rem 0 .6rem; color: var(--g-text); }
.pg-page .pg-btn { background: var(--g-card2); color: var(--g-text); border: 1px solid var(--g-line); border-radius: 12px; }
.pg-page .pg-btn-primary, .pg-btn-mint { background: var(--g-mint) !important; color: var(--g-mint-ink) !important; border-color: var(--g-mint) !important; font-weight: 800; }
.pg-btn-mint { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; min-height: 44px; padding: 0 1.1rem; border-radius: 12px; text-decoration: none; }
.pg-page .pg-btn-outline { background: transparent; border: 1px solid rgba(255, 255, 255, .22); color: var(--g-text); }
.pg-page .pg-btn-wide { width: 100%; min-height: 52px; border-radius: 14px; font-size: 1.02rem; }
.pg-chev { font-size: 1.6rem; line-height: 1; color: var(--g-muted); margin-left: auto; padding-left: .4rem; }
.pg-i { display: inline-block; margin-right: .35rem; }
.pg-bar { display: block; height: 5px; border-radius: 3px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.pg-bar i { display: block; height: 100%; border-radius: 3px; background: var(--g-mint); }
.pg-icon-round { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--g-text); cursor: pointer; }
.pg-icon-round svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* Navigation: bottom tab bar (phones) / top bar (wider screens) */
.pg-page .pg-nav { order: -1; display: flex; gap: .2rem; border: 0; margin: .5rem 0 .2rem; padding: 4px; background: var(--g-card); border-radius: 14px; overflow: visible; flex-wrap: nowrap; }
.pg-page .pg-nav a { flex: 1; flex-direction: row; justify-content: center; gap: .45rem; min-height: 44px; border: 0; border-radius: 10px; color: var(--g-muted); font-weight: 700; padding: .4rem .6rem; }
.pg-page .pg-nav a svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-page .pg-nav a.active { color: var(--g-mint); background: rgba(95, 227, 161, .1); }

/* App bar and hero */
.pg-appbar { display: flex; align-items: center; justify-content: space-between; margin: .8rem 0 .2rem; }
.pg-brand { font-weight: 900; font-size: 1.45rem; letter-spacing: .01em; color: var(--g-text) !important; text-decoration: none; }
.pg-brand span { color: var(--g-gold); }
.pg-hero-title { font-size: clamp(1.8rem, 6.5vw, 2.4rem); margin: .4rem 0 1rem; line-height: 1.1; }
.pg-page .pg-next { position: relative; min-height: 230px; display: flex; flex-direction: column; justify-content: flex-end; margin: 0 0 .4rem; padding: 1rem 1rem 1.05rem; border-radius: 18px; overflow: hidden;
  background: linear-gradient(180deg, rgba(5, 20, 15, 0) 25%, rgba(5, 20, 15, .55) 55%, rgba(5, 20, 15, .95)), var(--img) center / cover no-repeat, #123; box-shadow: 0 10px 28px rgba(0, 0, 0, .35); }
.pg-page .pg-next::after { display: none; }
.pg-page .pg-next-kicker { margin: 0; font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #dfeee7; opacity: 1; }
.pg-page .pg-next-title { margin: .2rem 0 .7rem; font-size: clamp(1.3rem, 5vw, 1.6rem); color: #fff; }
.pg-page .pg-next-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; }
.pg-next-prog { flex: 1; display: grid; gap: .45rem; max-width: 60%; }
.pg-page .pg-next-count { font-weight: 600; font-size: .9rem; color: #e3efe9; }

/* Train your game */
.pg-train { list-style: none; margin: 0 0 .55rem; padding: 0; display: grid; gap: .55rem; }
.pg-train li.current .pg-trow { border-color: rgba(95, 227, 161, .45); }
.pg-trow { display: flex; align-items: center; gap: .8rem; padding: .5rem .6rem .5rem .5rem; border-radius: 14px; background: var(--g-card); border: 1px solid var(--g-line); color: var(--g-text) !important; text-decoration: none; }
.pg-trow:hover { background: var(--g-card2); }
.pg-thumb { flex: none; width: 96px; height: 64px; border-radius: 10px; object-fit: cover; background: #163c33; }
.pg-trow-body { flex: 1; min-width: 0; display: grid; gap: .25rem; }
.pg-trow-body strong { font-size: 1rem; }
.pg-trow-sub { font-size: .84rem; color: var(--g-muted); }
.pg-trow .pg-bar { max-width: 200px; }
.pg-drill { display: flex; align-items: center; gap: .8rem; margin: .2rem 0 1rem; padding: 1rem; border-radius: 16px; text-decoration: none; color: var(--g-text) !important; border: 1px solid rgba(242, 193, 78, .25);
  background: linear-gradient(90deg, #123a30 40%, rgba(18, 58, 48, .2)), var(--img) right center / 60% auto no-repeat, #123a30; }
.pg-drill-ic { font-size: 1.8rem; }
.pg-drill-body { display: grid; gap: .1rem; }
.pg-drill-body strong { font-size: 1.05rem; }
.pg-more-skill { margin: 0 0 1rem; }
.pg-more-skill summary { cursor: pointer; font-weight: 700; color: var(--g-muted); padding: .4rem 0; }

/* Top bar for inner screens */
.pg-topbar { display: flex; align-items: center; gap: .4rem; margin: .5rem 0 .3rem; min-height: 48px; }
.pg-top-back { display: grid; place-items: center; width: 42px; height: 42px; margin-left: -8px; font-size: 2.1rem; line-height: 1; color: var(--g-text) !important; text-decoration: none; border-radius: 50%; }
.pg-top-back:hover { background: var(--g-card); }
.pg-top-title { flex: 1; margin: 0 !important; font-size: 1.4rem !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-top-count { color: var(--g-muted); font-weight: 700; font-size: .95rem; }
.pg-page .pg-objective { background: transparent; border: 0; padding: 0; margin: .1rem 0 .8rem; color: var(--g-muted); font-size: .92rem; }
.pg-stepline { list-style: none; display: flex; align-items: center; justify-content: center; gap: 0; margin: 0 0 .6rem; padding: 0; }
.pg-stepline li { position: relative; width: 12px; height: 12px; border-radius: 50%; background: #5d7a70; margin: 0 18px; }
.pg-stepline li + li::before { content: ''; position: absolute; right: 12px; top: 5px; width: 36px; height: 2px; background: #5d7a70; }
.pg-stepline li.done, .pg-stepline li.done + li::before, .pg-stepline li.current + li::before { background: var(--g-mint); }
.pg-stepline li.current { background: var(--g-mint); box-shadow: 0 0 0 4px rgba(95, 227, 161, .25); }
.pg-stepline li.current + li::before { background: #5d7a70; }

/* Lesson step player */
.pg-page .pg-lesson2 { gap: 1rem; }
.pg-page .pg-lesson-visual { border-radius: 18px; overflow: hidden; }
.pg-illus-media { position: relative; }
.pg-zoom-btn { position: absolute; right: 12px; top: 12px; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(8, 20, 16, .72); color: #fff; cursor: pointer; }
.pg-zoom-btn .pg-ic { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; }
.pg-page .pg-illus-pic { border-radius: 18px; overflow: hidden; }
.pg-page .pg-lesson-steps { background: transparent; border: 0; padding: 0; display: grid; gap: .6rem; }
.pg-page .pg-lesson-steps .pg-c-label { margin: 0; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--g-muted); }
.pg-lstep-title { margin: 0; font-size: 1.35rem; font-weight: 800; }
.pg-page .pg-step-text { margin: 0; color: #cfe0d8; font-size: 1.02rem; line-height: 1.5; }
.pg-lactions { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.pg-hand-slot .pg-check { width: 100%; min-height: 50px; box-sizing: border-box; display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: 0 .8rem;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 14px; font-weight: 700; flex-direction: row-reverse; }
.pg-hand-slot .pg-check span::before { content: '✋ '; }
.pg-listen { min-height: 50px; border-radius: 14px; }
.pg-switch input[type=checkbox] { appearance: none; -webkit-appearance: none; flex: none; width: 42px; height: 24px; border-radius: 12px; background: #3a5a50; position: relative; cursor: pointer; margin: 0; transition: background .15s; }
.pg-switch input[type=checkbox]::before { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #e9f2ee; transition: transform .15s; }
.pg-switch input[type=checkbox]:checked { background: var(--g-mint); }
.pg-switch input[type=checkbox]:checked::before { transform: translateX(18px); }
.pg-switch input[type=checkbox]:focus-visible { outline: 3px solid #ffd65a; outline-offset: 2px; }
.pg-page .pg-step-dots { justify-content: center; margin: .2rem 0; }
.pg-lsmall { justify-content: space-between; align-items: center; }
.pg-lsmall .pg-prev-step { min-height: 38px; font-size: .88rem; background: transparent; border-color: transparent; color: var(--g-muted); }
.pg-page .pg-voice-row, .pg-lsmall .pg-voice { font-size: .85rem; }
.pg-page .pg-lstages { margin-top: 1.2rem; }
.pg-page .pg-illus-note { font-size: .78rem; }

/* Course screen */
.pg-course-title { font-size: clamp(1.8rem, 7vw, 2.3rem) !important; margin: .2rem 0 .3rem !important; }
.pg-page .pg-course-sum { color: #cfe0d8; margin: 0 0 .6rem; font-size: 1.02rem; }
.pg-course-prog { display: flex; align-items: center; gap: .8rem; margin: 0 0 .9rem; font-size: .9rem; color: #dbe8e2; }
.pg-course-prog .pg-bar { flex: 1; max-width: 240px; }
.pg-course-hero { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 18px; margin-bottom: .8rem; }
.pg-page .pg-lesson-path { grid-template-columns: 1fr; gap: 0; }
.pg-page .pg-lesson-path li { border-bottom: 1px solid var(--g-line); }
.pg-page .pg-lesson-path .pg-lstep { display: flex; align-items: center; gap: .75rem; padding: .7rem .4rem; border: 0; border-radius: 0; background: transparent; }
.pg-page .pg-lesson-path li.next .pg-lstep { background: var(--g-card); border-radius: 14px; border-left: 4px solid var(--g-mint); box-shadow: none; }
.pg-page .pg-lesson-path .pg-num { width: 40px; height: 40px; background: transparent; border: 2px solid #3d5c52; color: var(--g-text); font-size: 1rem; }
.pg-page .pg-lesson-path li.next .pg-num { border-color: var(--g-mint); color: var(--g-mint); background: transparent; }
.pg-page .pg-lesson-path li.done .pg-num { background: transparent; border-color: #3d5c52; color: var(--g-text); }
.pg-page .pg-lesson-path .pg-thumb { width: 64px; height: 64px; }
.pg-page .pg-lesson-path .pg-card-body { flex: 1; min-width: 0; display: grid; gap: .2rem; }
.pg-lmeta { font-size: .84rem; color: var(--g-muted); }
.pg-page .pg-lstep-go { justify-self: start; margin: .3rem 0 0; min-height: 38px; padding: 0 .9rem; font-size: .92rem; }
.pg-page .pg-lesson-path .pg-done { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--g-mint); color: var(--g-mint-ink); font-weight: 900; padding: 0; }
.pg-assist-row { display: flex; align-items: center; gap: .5rem; width: 100%; margin: 1rem 0; padding: .9rem 1rem; border-radius: 14px; border: 1px solid var(--g-line); background: transparent; color: var(--g-text); font: inherit; font-weight: 700; cursor: pointer; text-align: left; }
.pg-assist-row:hover { background: var(--g-card); }
.pg-sheet { background: #10302a; color: var(--g-text); border: 1px solid var(--g-line); }
.pg-sheet .pg-level { background: var(--g-card2); border-color: var(--g-line); }
.pg-sheet > * + * { margin-top: .8rem; }

/* Phones: an app screen — no site header/footer, bottom tab bar, comfortable side margins */
@media (max-width: 760px) {
  html:has(.pg-page) .site-header, html:has(.pg-page) .site-footer, html:has(.pg-page) body > footer { display: none !important; }
  .pg-page > .pg-head, .pg-page > .pg-foot { display: none; }
  .wrap.pg-page { padding-left: 16px; padding-right: 16px; padding-bottom: 96px; }
  .pg-page .pg-nav { order: 99; position: fixed; z-index: 50; left: 0; right: 0; bottom: 0; margin: 0; padding: 6px 8px max(8px, env(safe-area-inset-bottom)); border-radius: 0;
    background: #0a1e18; border-top: 1px solid var(--g-line); }
  .pg-page .pg-nav a { flex-direction: column; gap: .15rem; font-size: .72rem; min-height: 54px; background: transparent !important; position: relative; }
  .pg-page .pg-nav a.active::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: -4px; height: 3px; border-radius: 2px; background: var(--g-mint); }
  body.pg-in-game .pg-page .pg-nav { display: none; }
  .pg-page .pg-illus-frames { display: none; }
  .pg-thumb { width: 88px; height: 60px; }
}
.pg-train > li::before { display: none !important; }
.pg-page .pg-train.pg-course-cards > li { padding-left: 0; }
.pg-page .pg-lesson-path .pg-card-body strong { color: var(--g-text); }
.pg-hand-slot .pg-check span::before { content: none; }
.pg-hand-slot .pg-check { font-size: .92rem; }
@media (max-width: 760px) {
  .pg-page .pg-objective { display: none; }
  .pg-page .pg-lesson-visual .pg-illus-cap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .pg-page .pg-illus-note { margin: .3rem 0 0; }
}

/* ======================================================================================== focused training
   A lesson, an exercise, a rack or a match: no site header, footer or tab bar; Back and Save & exit instead. */
.pg-page { --g-text: #f4f1ea; --g-soft: #d5e2db; --g-field: #0e2822; }
body.pg-focus .site-header, body.pg-focus .site-footer, body.pg-focus > footer { display: none !important; }
body.pg-focus .pg-page > .pg-head, body.pg-focus .pg-page > .pg-foot, body.pg-focus .pg-page .pg-nav { display: none !important; }
body.pg-focus .wrap.pg-page { padding-top: max(6px, env(safe-area-inset-top)); }
.pg-page :focus-visible { outline: 3px solid #ffd65a; outline-offset: 2px; }
.sr-only, .pg-sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ======================================================================================== guided practice
   Target design: compact header (back, full title, assistance, "Step 3 of 6 · Contact", one segmented bar), the live
   table with Player / Overhead and full screen, one short instruction with Hear tip, the step card (enlarged cue ball),
   fine aim and power, Back / Next step, then Reset · Try shot · Demo in a bottom action area. */
.pg-assist-wrap { position: relative; display: inline-flex; }
.pg-actrow, .pg-tip, .pg-aim-label, .pg-aim-ruler { display: none; }
.pg-page .pg-game.pg-applayout:not(.pg-immersive) { grid-template-columns: minmax(0, 1fr); grid-template-areas: "top" "stage" "coach" "controls"; grid-template-rows: none; gap: .8rem; margin-top: 0; align-items: start; }
@media (min-width: 900px) {
  .pg-page .pg-game.pg-applayout:not(.pg-immersive) { grid-template-columns: minmax(0, 1fr) 380px; grid-template-areas: "top top" "stage coach" "controls coach"; column-gap: 1.2rem; }
}
/* Header */
.pg-applayout:not(.pg-immersive) .pg-g-top { display: grid; gap: .3rem; padding: 0; background: none; border: 0; }
.pg-fh-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; }
.pg-page .pg-fh-back { display: inline-grid; place-items: center; width: 44px; height: 44px; margin-left: -10px; border-radius: 50%; color: var(--g-text) !important; text-decoration: none; background: transparent; border: 0; font-size: 0; }
.pg-fh-back::before { content: none !important; }
.pg-fh-back:hover { background: var(--g-card); }
.pg-fh-back .pg-ic { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pg-applayout .pg-assist-btn { display: inline-flex; align-items: center; gap: .45rem; min-height: 40px; padding: 0 .95rem 0 .75rem; border-radius: 99px; border: 1px solid rgba(95, 227, 161, .45); background: rgba(95, 227, 161, .08);
  color: var(--g-mint); font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; }
.pg-assist-btn .pg-ic { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.pg-applayout .pg-assist-wrap .pg-assist { display: none; position: absolute; right: 0; top: 46px; z-index: 30; flex-direction: column; min-width: 170px; padding: 6px; border-radius: 14px; background: #163c33; border: 1px solid var(--g-line); box-shadow: 0 12px 30px rgba(0, 0, 0, .45); }
.pg-applayout .pg-assist-wrap.open .pg-assist { display: flex; }
.pg-applayout .pg-assist .pg-seg { min-height: 44px; text-align: left; padding: 0 1rem; border-radius: 10px; border: 0; background: transparent; color: var(--g-text); font-weight: 600; }
.pg-applayout .pg-assist .pg-seg[aria-checked="true"] { background: rgba(95, 227, 161, .14); color: var(--g-mint); }
.pg-applayout:not(.pg-immersive) .pg-g-title { display: block; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-fh-title { margin: .1rem 0 0; font-size: clamp(1.6rem, 7.6vw, 2.15rem); line-height: 1.12; white-space: normal; overflow: visible; letter-spacing: -.015em; }
.pg-applayout:not(.pg-immersive) .pg-g-title .pg-stat { display: none; }
.pg-fh-sub { margin: 0; color: var(--g-soft); font-size: 1rem; font-weight: 500; }
.pg-page .pg-segbar { list-style: none; display: grid; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 6px; margin: .25rem 0 0; padding: 0; border: 0; background: none; counter-reset: none; }
.pg-page .pg-segbar[hidden] { display: none; }
.pg-page .pg-segbar li { margin: 0; padding: 0; border: 0; background: none; }
.pg-page .pg-segbar li::before, .pg-page .pg-segbar li::after { content: none; }
.pg-page .pg-segbar .pg-gstep-btn { display: flex; align-items: center; width: 100%; height: 22px; min-height: 0; padding: 0; border: 0; border-radius: 4px; background: transparent; cursor: pointer; }
.pg-page .pg-segbar .pg-gstep-btn::before { content: ''; display: block; width: 100%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .17); transition: background .2s; }
.pg-page .pg-segbar li.done .pg-gstep-btn::before, .pg-page .pg-segbar li.current .pg-gstep-btn::before { background: var(--g-mint); }
.pg-page .pg-segbar .pg-gstep-btn:disabled { cursor: default; }
.pg-page .pg-segbar .pg-gstep-name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
/* Table */
.pg-applayout:not(.pg-immersive) .pg-g-stage { position: relative; border-radius: 18px; overflow: hidden; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-stage { width: 100% !important; aspect-ratio: 16 / 10.6 !important; border-radius: 18px; }
.pg-applayout:not(.pg-immersive) .pg-views { left: auto; right: 10px; top: 10px; padding: 3px; border-radius: 99px; background: rgba(6, 20, 15, .78); border: 1px solid rgba(255, 255, 255, .12); }
.pg-applayout:not(.pg-immersive) .pg-view-btn { min-height: 36px; padding: 0 .95rem; border-radius: 99px; font-size: .88rem; font-weight: 600; background: transparent; color: var(--g-text); border: 0; }
.pg-applayout:not(.pg-immersive) .pg-view-btn .pg-ic, .pg-applayout:not(.pg-immersive) .pg-view-btn[data-view="contact"] { display: none; }
.pg-applayout:not(.pg-immersive) .pg-view-btn span { display: inline; }
.pg-applayout:not(.pg-immersive) .pg-view-btn[aria-pressed="true"] { background: var(--g-mint); color: var(--g-mint-ink); }
.pg-applayout:not(.pg-immersive) .pg-view-gear { padding: 0 .55rem; }
.pg-applayout:not(.pg-immersive) .pg-view-gear .pg-ic { display: inline; width: 18px; height: 18px; }
.pg-applayout:not(.pg-immersive) .pg-vset { right: 8px; left: auto; top: 56px; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-imm-enter { left: auto; right: 10px; bottom: 10px; width: 46px; height: 46px; border-radius: 50%; background: rgba(6, 20, 15, .8); border: 1px solid rgba(255, 255, 255, .14); color: #fff; }
/* Coach: one instruction with Hear tip, then the step card */
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach { position: static; display: grid; gap: .75rem; padding: 0; border: 0; background: none; box-shadow: none; max-height: none; overflow: visible; }
.pg-applayout:not(.pg-immersive) .pg-coach-head, .pg-applayout:not(.pg-immersive) .pg-coach-headline, .pg-applayout:not(.pg-immersive) .pg-coach-lines, .pg-applayout:not(.pg-immersive) .pg-coach-instruction { display: none !important; }
.pg-applayout:not(.pg-immersive) .pg-coach-body { display: grid !important; gap: .75rem; }
.pg-applayout:not(.pg-immersive) .pg-coach-extra { display: grid; gap: .75rem; }
.pg-applayout:not(.pg-immersive) .pg-tip { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: .85rem; align-items: center; }
.pg-hear { display: grid; place-items: center; width: 52px; height: 52px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .26); background: rgba(255, 255, 255, .03); color: var(--g-text); cursor: pointer; }
.pg-hear .pg-ic { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-hear:disabled { opacity: .45; cursor: default; }
.pg-tip-text { margin: 0; min-width: 0; }
.pg-tip-note { grid-column: 1 / -1; margin: 0; font-size: .85rem; color: var(--g-muted); }
.pg-tip-head { display: block; font-size: 1.22rem; font-weight: 800; line-height: 1.22; color: var(--g-text); }
.pg-tip-sub { display: block; margin-top: .15rem; font-size: 1rem; line-height: 1.35; color: var(--g-soft); }
.pg-page .pg-applayout:not(.pg-immersive) .pg-gcard { display: grid; gap: .6rem; padding: .95rem; border-radius: 16px; border: 1px solid rgba(255, 255, 255, .1); background: var(--g-field); }
.pg-applayout:not(.pg-immersive) .pg-gcard:has(.pg-gtext:empty):has(.pg-gbody:empty):has(.pg-gstatus:empty) { display: none; }
.pg-applayout:not(.pg-immersive) .pg-gtitle { display: none; }
.pg-applayout:not(.pg-immersive) .pg-gtext { margin: 0; font-size: .9rem; line-height: 1.45; color: var(--g-muted); }
.pg-applayout:not(.pg-immersive) .pg-gtext:empty, .pg-applayout:not(.pg-immersive) .pg-gbody:empty, .pg-applayout:not(.pg-immersive) .pg-gstatus:empty { display: none; }
.pg-applayout:not(.pg-immersive) .pg-gstatus { margin: 0; font-size: .92rem; line-height: 1.4; color: var(--g-soft); }
.pg-ok-mark { color: var(--g-mint); font-weight: 800; }
.pg-applayout:not(.pg-immersive) .pg-gfacts { margin: 0; padding-left: 1.1rem; display: grid; gap: .25rem; color: var(--g-soft); }
/* Cue-ball contact selector */
.pg-page .pg-gcontact { display: grid; grid-template-columns: minmax(130px, 52%) minmax(0, 1fr); gap: .7rem .9rem; align-items: center; }
.pg-page .pg-gcontact .pg-gc-opts, .pg-page .pg-gcontact .pg-gc-apply { grid-column: 1 / -1; }
.pg-gc-does { margin: 0; font-size: .86rem; line-height: 1.35; color: var(--g-muted); }
.pg-gc-ball { display: grid; justify-items: center; gap: .3rem; }
.pg-page .pg-gc-ball .pg-cb { display: block; width: 100%; max-width: 210px; height: auto; aspect-ratio: 1; margin: 0; cursor: grab; touch-action: none; }
.pg-gc-key { display: flex; gap: .8rem; margin: 0; font-size: .78rem; color: var(--g-muted); }
.pg-gc-key span { display: inline-flex; align-items: center; gap: .3rem; }
.pg-gc-you::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: #3a4541; box-shadow: 0 0 0 2px #fff; }
.pg-gc-sug::before { content: ''; width: 9px; height: 9px; border-radius: 50%; border: 2px dashed #36d585; }
.pg-gc-side { display: grid; gap: .55rem; min-width: 0; }
.pg-gc-rec { margin: 0; color: var(--g-soft); font-size: .95rem; }
.pg-gc-rec strong { color: var(--g-mint); font-size: 1.12rem; }
.pg-gc-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; padding: 3px; border-radius: 12px; background: rgba(255, 255, 255, .04); }
.pg-gc-opts .pg-gc-opt { border-color: transparent; }
.pg-gc-opt, .pg-gc-apply { min-height: 44px; padding: 0 .5rem; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .26); background: transparent; color: var(--g-text); font: inherit; font-size: .95rem; font-weight: 700; cursor: pointer; }
.pg-gc-opt[aria-pressed="true"] { background: var(--g-mint); border-color: var(--g-mint); color: var(--g-mint-ink); }
.pg-gc-apply { border: 1.5px solid var(--g-mint); }
.pg-gc-apply:hover, .pg-gc-opt:hover { background: rgba(95, 227, 161, .1); }
.pg-gc-opt[aria-pressed="true"]:hover { background: var(--g-mint); }
/* Aim & power step */
.pg-gaim { display: grid; grid-template-columns: minmax(0, 120px) minmax(0, 1fr); gap: .9rem; align-items: center; }
.pg-gaim:not(:has(.pg-fullness, svg)) { grid-template-columns: minmax(0, 1fr); }
.pg-gaim > svg, .pg-gaim .pg-fullness { width: 100%; height: auto; }
.pg-gaim-side { display: grid; gap: .45rem; min-width: 0; }
.pg-gaim-side .pg-c-label { margin: 0; font-size: .78rem; color: var(--g-muted); text-transform: none; letter-spacing: 0; }
.pg-gaim-btns { gap: .4rem; flex-wrap: wrap; }
.pg-page .pg-btn-small { min-height: 40px; padding: 0 .8rem; font-size: .9rem; border-radius: 10px; }
/* Fine aim · power */
.pg-page .pg-applayout:not(.pg-immersive) .pg-ctrl { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "aim power" "tools tools"; gap: .5rem 0; padding: 0; background: transparent; border: 0; box-shadow: none; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-aim { grid-area: aim; display: grid; grid-template-columns: auto auto minmax(24px, 1fr) auto auto; align-items: center; gap: .45rem .4rem; padding-right: 1rem; }
.pg-applayout:not(.pg-immersive) .pg-aim-label { display: block; grid-column: 1 / -1; }
.pg-applayout:not(.pg-immersive) .pg-c-aim .pg-fine { width: 42px; min-width: 42px; height: 42px; min-height: 42px; padding: 0; display: grid; place-items: center; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .26); background: transparent; color: var(--g-text); }
.pg-applayout:not(.pg-immersive) .pg-c-aim .pg-fine .pg-ic { width: 20px; height: 20px; }
.pg-applayout:not(.pg-immersive) .pg-aim-out { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pg-applayout:not(.pg-immersive) .pg-aim-ruler { display: block; position: relative; height: 26px; min-width: 40px;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, .5) 0 2px, transparent 2px 10px) var(--aimx, 0) 50% / 80px 16px repeat-x;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
.pg-applayout:not(.pg-immersive) .pg-aim-ruler::after { content: ''; position: absolute; left: 50%; top: 0; bottom: 0; width: 4px; margin-left: -2px; border-radius: 2px; background: var(--g-mint); }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-power { grid-area: power; display: grid; grid-template-columns: auto 1fr; grid-template-areas: "label out" "slider slider"; align-items: center; gap: .45rem .5rem; padding-left: 1rem; border-left: 1px solid rgba(255, 255, 255, .12); }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-label { margin: 0; font-size: .95rem; font-weight: 600; color: var(--g-text); text-transform: none; letter-spacing: 0; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-power .pg-c-label { display: block; grid-area: label; }
/* The step card stays open in the app layout (the folded-coach rules are for the full-screen game). */
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach .pg-gbody, .pg-page .pg-applayout:not(.pg-immersive) .pg-coach .pg-gcontact { display: grid; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach .pg-gbody:empty { display: none; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach :is(.pg-coach-foot, .pg-approaches, .pg-scenario, .pg-legend-box, .pg-closeup-box, .pg-rules-now) { display: revert; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach .pg-coach-foot { display: flex; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach .pg-closeup-box[hidden] { display: none; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach .pg-gtext { display: block; -webkit-line-clamp: unset; font-size: .9rem; margin: 0; }
.pg-applayout:not(.pg-immersive) .pg-power-out { grid-area: out; justify-self: start; min-width: 0; color: var(--g-mint); font-size: 1rem; font-weight: 800; text-align: left; }
.pg-applayout:not(.pg-immersive) .pg-power { grid-area: slider; width: 100%; height: 42px; }
.pg-applayout:not(.pg-immersive) .pg-power::-webkit-slider-runnable-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, transparent var(--pg-p), rgba(255, 255, 255, .16) var(--pg-p)), var(--g-mint); box-shadow: none; }
.pg-applayout:not(.pg-immersive) .pg-power::-moz-range-track { height: 10px; border-radius: 5px; background: linear-gradient(90deg, transparent var(--pg-p), rgba(255, 255, 255, .16) var(--pg-p)), var(--g-mint); box-shadow: none; }
.pg-applayout:not(.pg-immersive) .pg-power::-webkit-slider-thumb { width: 26px; height: 26px; margin-top: -8px; border: 0; background: #fff; box-shadow: 0 1px 6px rgba(0, 0, 0, .45); }
.pg-applayout:not(.pg-immersive) .pg-power::-moz-range-thumb { width: 24px; height: 24px; border: 0; background: #fff; }
.pg-applayout:not(.pg-immersive) .pg-c-tools { grid-area: tools; display: flex; gap: .5rem; justify-content: flex-start; }
.pg-applayout.pg-lvl-guided:not(.pg-immersive) .pg-c-tools { display: none; }
.pg-applayout:not(.pg-immersive) .pg-shoot { display: none; }
/* Back / Next step (lesson navigation, never shoots) */
.pg-applayout:not(.pg-immersive) .pg-gnav { display: flex; align-items: center; justify-content: space-between; gap: .6rem; margin: 0; }
.pg-applayout:not(.pg-immersive) .pg-gnav:empty { display: none; }
.pg-applayout:not(.pg-immersive) .pg-gnav .pg-btn { min-height: 46px; padding: 0 1.1rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .24); background: transparent; color: var(--g-text); font-weight: 600; }
.pg-applayout:not(.pg-immersive) .pg-gnav .pg-btn:disabled { opacity: .4; }
.pg-applayout:not(.pg-immersive) .pg-gnav .pg-nav-next { margin-left: auto; }
.pg-nav-back::before { content: '‹'; margin-right: .5rem; font-size: 1.3em; line-height: 0; }
.pg-nav-next::after { content: '›'; margin-left: .55rem; font-size: 1.3em; line-height: 0; }
.pg-applayout:not(.pg-immersive) .pg-gnav .pg-leave { border-color: transparent; color: var(--g-muted); }
/* Reset · Try shot · Demo */
.pg-applayout:not(.pg-immersive) .pg-actrow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.3fr) minmax(0, 1fr); gap: .6rem; margin-top: .3rem; }
.pg-act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem; min-height: 66px; padding: .3rem; border-radius: 14px; border: 1px solid rgba(255, 255, 255, .22);
  background: var(--g-field); color: var(--g-text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; touch-action: manipulation; }
.pg-act .pg-ic { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-act-shoot { flex-direction: row; gap: .65rem; background: var(--g-mint); border-color: var(--g-mint); color: var(--g-mint-ink); font-size: 1.25rem; font-weight: 800; box-shadow: 0 8px 22px rgba(95, 227, 161, .18); }
.pg-act-shoot .pg-ic { width: 24px; height: 24px; }
.pg-act:disabled { opacity: .42; cursor: default; box-shadow: none; }
.pg-applayout:not(.pg-immersive) .pg-review, .pg-applayout:not(.pg-immersive) .pg-gactions { margin: 0; }
.pg-applayout:not(.pg-immersive) .pg-gactions { display: grid; gap: .5rem; }
.pg-applayout:not(.pg-immersive) .pg-gactions:empty, .pg-applayout:not(.pg-immersive) .pg-review:empty { display: none; }
.pg-applayout:not(.pg-immersive) .pg-checks { margin: 0; padding: 0; list-style: none; display: grid; gap: .3rem; }
.pg-applayout:not(.pg-immersive) .pg-coach-foot { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; }
.pg-applayout:not(.pg-immersive) .pg-coach-foot .pg-btn { min-height: 40px; font-size: .88rem; }
.pg-applayout:not(.pg-immersive) .pg-rules-now { border: 1px solid var(--g-line); border-radius: 12px; padding: .2rem .8rem; }
.pg-applayout:not(.pg-immersive) .pg-rules-now summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--g-soft); }
.pg-applayout:not(.pg-immersive) .pg-rules-now ul { margin: .2rem 0 .5rem; padding-left: 1.1rem; color: var(--g-soft); font-size: .92rem; }
.pg-applayout:not(.pg-immersive) .pg-legend-box, .pg-applayout:not(.pg-immersive) .pg-scenario { font-size: .9rem; color: var(--g-soft); }
.pg-more-info { border: 1px solid var(--g-line); border-radius: 12px; padding: 0 .85rem; }
.pg-more-info > summary { min-height: 46px; display: flex; align-items: center; cursor: pointer; font-weight: 600; color: var(--g-soft); }
.pg-more-info[open] { padding-bottom: .8rem; }
.pg-more-info[open] > * + * { margin-top: .6rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-more-info .pg-rules-now { border: 0; padding: 0; }
.pg-immersive .pg-more-info > summary { display: none; }
.pg-immersive .pg-tip, .pg-immersive .pg-actrow, .pg-immersive .pg-aim-label, .pg-immersive .pg-aim-ruler { display: none !important; }

/* Phones: the action area is fixed to the bottom (above the safe area); the page reserves room for it. */
@media (max-width: 760px) {
  body.pg-focus .wrap.pg-page { padding-left: 16px; padding-right: 16px; }
  body.pg-focus .wrap.pg-page:has(.pg-applayout:not(.pg-immersive)) { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-g-stage { margin: 0 -16px; border-radius: 0; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-stage { border-radius: 0; aspect-ratio: 16 / 11 !important; }
  .pg-applayout:not(.pg-immersive) .pg-tools, .pg-applayout:not(.pg-immersive) .pg-tools-b { display: none; }
  .pg-applayout:not(.pg-immersive) .pg-gnav .pg-leave { display: none; }
  /* Phones keep the 0.1° arrows; the 1° steps stay on wider screens. */
  .pg-applayout:not(.pg-immersive) .pg-c-aim button.pg-fine:first-of-type, .pg-applayout:not(.pg-immersive) .pg-c-aim button.pg-fine:last-of-type { display: none; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-c-aim { grid-template-columns: auto minmax(24px, 1fr) auto; }
  .pg-applayout:not(.pg-immersive) .pg-actrow { position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; margin: 0; padding: .7rem 16px max(.7rem, env(safe-area-inset-bottom));
    background: linear-gradient(180deg, rgba(11, 34, 27, 0), #0b221b 22%); }
  .pg-applayout:not(.pg-immersive) .pg-act { min-height: 64px; }
}
@media (max-width: 360px) {
  .pg-tip-head { font-size: 1.1rem; }
  .pg-gcontact { grid-template-columns: minmax(104px, 40%) minmax(0, 1fr); gap: .7rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-c-aim { padding-right: .6rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-c-power { padding-left: .6rem; }
  .pg-act-shoot { font-size: 1.1rem; }
}
/* Landscape phones: the table on the left, the steps and controls on the right. */
@media (max-height: 520px) and (orientation: landscape) and (max-width: 1000px) {
  .pg-page .pg-game.pg-applayout:not(.pg-immersive) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-areas: "top top" "stage coach" "controls coach"; column-gap: 1rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-g-stage { margin: 0; border-radius: 14px; }
  .pg-applayout:not(.pg-immersive) .pg-actrow { position: static; padding: 0; background: none; }
  body.pg-focus .wrap.pg-page:has(.pg-applayout:not(.pg-immersive)) { padding-bottom: 24px; }
}

/* ======================================================================================== visual lesson
   Target design: back + "2 / 6", the full lesson title, one segmented bar, a large picture (Top / Behind where a
   second view exists, enlarge), kicker, step heading and text, Listen | Left-handed, Common mistake and Real-table
   drill as expandable rows, previous + Next step, Save & exit. */
.pg-page .pg-lhead { display: grid; gap: .3rem; margin: .2rem 0 .9rem; min-height: 0; }
.pg-page .pg-lhead .pg-top-count { font-size: 1rem; font-weight: 600; color: var(--g-text); font-variant-numeric: tabular-nums; }
.pg-page .pg-lhead .pg-fh-title { flex: none; margin: 0 !important; font-size: clamp(1.7rem, 8vw, 2.3rem) !important; line-height: 1.1; white-space: normal; overflow: visible; letter-spacing: -.015em; }
.pg-page .pg-lhead .pg-segbar { margin-top: .5rem; }
.pg-page .pg-lplayer .pg-lesson2 { display: grid; gap: 1rem; }
@media (min-width: 900px) { .pg-page .pg-lplayer .pg-lesson2 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; gap: 1.6rem; } }
.pg-page .pg-lplayer .pg-lesson-visual { display: grid; gap: .5rem; border-radius: 0; overflow: visible; background: none; border: 0; padding: 0; }
.pg-page .pg-lplayer .pg-illus { margin: 0; }
.pg-page .pg-lplayer .pg-illus-pic { border-radius: 18px; overflow: hidden; background: #123a30; }
.pg-page .pg-lplayer .pg-illus-pic svg { display: block; width: 100%; height: auto; }
.pg-page .pg-lplayer .pg-diagram, .pg-page .pg-lplayer .pg-diagram .pg-stage { border-radius: 18px; overflow: hidden; }
.pg-page .pg-zoom-btn { top: auto; bottom: 12px; right: 12px; width: 52px; height: 52px; background: rgba(6, 20, 15, .78); border: 1px solid rgba(255, 255, 255, .16); }
.pg-viewseg { position: absolute; top: 12px; right: 12px; display: flex; padding: 3px; border-radius: 99px; background: rgba(6, 20, 15, .8); border: 1px solid rgba(255, 255, 255, .14); }
.pg-viewseg[hidden] { display: none; }
.pg-viewseg-btn { min-height: 36px; padding: 0 1rem; border-radius: 99px; border: 0; background: transparent; color: var(--g-text); font: inherit; font-size: .88rem; font-weight: 600; cursor: pointer; }
.pg-viewseg-btn[aria-checked="true"] { background: var(--g-mint); color: var(--g-mint-ink); }
.pg-page .pg-lplayer .pg-illus-note { margin: .1rem 0 0; font-size: .76rem; color: var(--g-muted); }
.pg-page .pg-lplayer .pg-lesson-steps { display: grid; gap: .65rem; background: none; border: 0; padding: 0; }
.pg-lkicker { margin: .2rem 0 0; font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--g-mint); }
.pg-page .pg-lcount { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pg-page .pg-lplayer .pg-lstep-title { margin: 0; font-size: clamp(1.5rem, 6.6vw, 1.9rem); font-weight: 800; line-height: 1.15; letter-spacing: -.01em; }
.pg-page .pg-lplayer .pg-step-text { margin: 0; font-size: 1.06rem; line-height: 1.5; color: var(--g-soft); }
.pg-page .pg-lactions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; margin-top: .2rem; }
.pg-page .pg-listen { display: inline-flex; align-items: center; gap: .55rem; min-height: 48px; padding: 0 1.1rem; border-radius: 12px; font-weight: 600; }
.pg-page .pg-listen .pg-ic, .pg-acc .pg-ic, .pg-save-exit .pg-ic, .pg-lprev .pg-ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pg-page .pg-hand-slot { display: flex; align-items: center; gap: .6rem; }
.pg-page .pg-hand-slot[hidden] { display: none; }
.pg-page .pg-hand-slot::before { content: ''; width: 1px; height: 28px; background: rgba(255, 255, 255, .18); }
.pg-page .pg-hand-slot .pg-check { width: auto; min-height: 48px; display: inline-flex; flex-direction: row; align-items: center; gap: .7rem; padding: 0 .9rem; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .22); font-weight: 600; font-size: .95rem; }
.pg-page .pg-hand-slot .pg-check span::before { content: '✋'; margin-right: .45rem; filter: grayscale(1) brightness(2.2); }
.pg-acc { border: 1px solid rgba(255, 255, 255, .14); border-radius: 12px; background: var(--g-field); }
.pg-acc > summary { list-style: none; display: flex; align-items: center; gap: .8rem; min-height: 58px; padding: 0 1rem; cursor: pointer; font-weight: 600; font-size: 1.05rem; }
.pg-acc > summary::-webkit-details-marker { display: none; }
.pg-acc > summary > .pg-ic { margin-left: auto; transition: transform .2s; }
.pg-acc[open] > summary > .pg-ic { transform: rotate(180deg); }
.pg-acc-ic { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; }
.pg-acc-ic .pg-ic { width: 28px; height: 28px; }
.pg-acc-alert { color: #f0a03c; }
.pg-acc-target { color: var(--g-mint); }
.pg-acc-body { padding: 0 1rem 1rem 3.4rem; color: var(--g-soft); display: grid; gap: .6rem; justify-items: start; }
.pg-acc-body ul, .pg-acc-body ol { margin: 0; padding-left: 1.1rem; display: grid; gap: .35rem; }
.pg-lnav { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: .75rem; margin-top: .4rem; }
.pg-page .pg-lprev { display: grid; place-items: center; min-height: 60px; padding: 0; border-radius: 14px; background: var(--g-field); border: 1px solid rgba(255, 255, 255, .14); color: var(--g-text); }
.pg-page .pg-lprev:disabled { opacity: .4; }
.pg-page .pg-lnext { min-height: 60px; border-radius: 14px; font-size: 1.15rem; }
.pg-page .pg-lnext::after { content: '›'; margin-left: .7rem; font-size: 1.35em; line-height: 0; }
.pg-save-exit { justify-self: center; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; padding: 0 .8rem; border: 0; background: none; color: var(--g-muted); font: inherit; font-size: .98rem; text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.pg-save-exit:hover { color: var(--g-text); }
.pg-lvoice { display: flex; justify-content: center; }
.pg-lvoice .pg-voice-row { justify-content: center; font-size: .82rem; }
.pg-lvoice .pg-btn { min-height: 38px; font-size: .82rem; background: transparent; border-color: rgba(255, 255, 255, .14); }
.pg-page .pg-lfinish { display: grid; gap: 1rem; }
.pg-page .pg-lfinish[hidden] { display: none; }
.pg-page .pg-lfinish .pg-lsec { background: var(--g-field); border: 1px solid var(--g-line); border-radius: 14px; padding: .9rem 1rem; }
.pg-page .pg-lfinish .pg-save-exit { margin-top: -.4rem; }
@media (max-width: 760px) {
  .pg-page .pg-lplayer .pg-lesson-visual { margin: 0 -16px; }
  .pg-page .pg-lplayer .pg-illus-pic, .pg-page .pg-lplayer .pg-diagram, .pg-page .pg-lplayer .pg-diagram .pg-stage { border-radius: 0; }
  .pg-page .pg-lplayer .pg-illus-note, .pg-page .pg-lplayer .pg-note, .pg-page .pg-lplayer .pg-approaches, .pg-page .pg-lplayer .pg-lesson-visual > .pg-check, .pg-page .pg-lplayer .pg-demo-bar { margin-left: 16px; margin-right: 16px; }
}
@media (max-width: 360px) {
  .pg-page .pg-hand-slot::before { display: none; }
  .pg-lnav { grid-template-columns: 64px minmax(0, 1fr); }
}
@media (max-width: 760px) {
  /* One 16px side gutter on phones (the site's main element adds its own padding elsewhere). */
  html:has(.pg-page) .public-main { padding-left: 0; padding-right: 0; padding-top: 0; }
  .wrap.pg-page { padding-left: 16px; padding-right: 16px; }
  .pg-page .pg-lactions { flex-wrap: nowrap; }
  .pg-page .pg-lactions > * { min-width: 0; }
  .pg-page .pg-listen { flex: none; }
}

.pg-page .pg-lplayer .pg-illus, .pg-page .pg-lplayer .pg-illus-media { border: 0; padding: 0; background: none; box-shadow: none; }
.pg-page .pg-back-link { width: 44px; height: 44px; border-radius: 50%; background: transparent; color: var(--g-text) !important; }
.pg-page .pg-back-link:hover { background: var(--g-card); }
.pg-page .pg-back-link .pg-ic { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* ======================================================================================== Mobile studio, v2
   App-owned typography and tokens keep host-site heading/form rules out of the trainer.
   Layout-only overrides: the table, rules and simulation remain unchanged. */
html:has(.pg-page) {
  --g-bg: #0b201a; --g-card: #112b23; --g-card2: #18392e;
  --g-line: rgba(210, 240, 224, .13); --g-text: #f2f6f3; --g-muted: #a3b9ad;
  --g-soft: #d0dfd6; --g-field: #102a22; --g-mint: #66e5b2; --g-mint-ink: #072b20;
}
.pg-page, .pg-dialog {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased;
  --g-bg: #0b201a; --g-card: #112b23; --g-card2: #18392e;
  --g-line: rgba(210, 240, 224, .13); --g-text: #f2f6f3; --g-muted: #a3b9ad;
  --g-soft: #d0dfd6; --g-field: #102a22; --g-mint: #66e5b2; --g-mint-ink: #072b20;
  --text: var(--g-text); --muted: var(--g-muted); --surface: var(--g-card);
  --surface-2: var(--g-card2); --primary: var(--g-mint); --primary-ink: var(--g-mint-ink);
  --border: var(--g-line); --emerald: var(--g-mint);
}
.pg-page *, .pg-page *::before, .pg-page *::after, .pg-dialog * { box-sizing: border-box; }
.pg-page :is(button, input, select), .pg-dialog :is(button, input, select) { font-family: inherit; }
.pg-page :is(h1,h2,h3,h4,p,figure,fieldset) { max-width: 100%; }
.pg-page :is(h1,h2,h3,h4) { text-wrap: balance; }
.pg-page :is(button,a,input,summary,[role="slider"]):focus-visible, .pg-dialog :focus-visible {
  outline: 3px solid var(--g-mint); outline-offset: 4px;
}
.pg-page button:disabled { cursor: not-allowed; }
.pg-page .pg-app { gap: 0; }
.pg-page .pg-brand { font-size: 1.2rem; letter-spacing: -.03em; }
.pg-page .pg-hero-title { font-size: clamp(1.7rem, 5vw, 2.5rem); letter-spacing: -.045em; line-height: 1.12; margin: .8rem 0 1.25rem; }
.pg-page .pg-next { min-height: 260px; border: 1px solid var(--g-line); border-radius: 18px; padding: 1.15rem; box-shadow: none; }
.pg-page .pg-next-title { font-weight: 750; letter-spacing: -.02em; }
.pg-page .pg-h3 { margin: 1.5rem 0 .75rem; font-size: 1.1rem; letter-spacing: -.02em; }
.pg-page .pg-train { gap: .65rem; }
.pg-page .pg-trow { padding: .6rem; border-radius: 13px; gap: .9rem; }
.pg-page .pg-trow-body strong { font-size: .95rem; line-height: 1.35; white-space: normal; }
.pg-page .pg-thumb { border-radius: 8px; }
.pg-page .pg-nav a { font-size: .8rem; font-weight: 600; }
.pg-page .pg-top-title { white-space: normal; text-overflow: clip; overflow: visible; line-height: 1.2; }
.pg-page .pg-lesson-path { margin-top: .75rem; }
.pg-page .pg-lesson-path .pg-lstep { padding: .9rem .5rem; gap: .7rem; }
.pg-page .pg-lesson-path .pg-card-body strong { font-size: 1rem; line-height: 1.35; }
.pg-page .pg-course-hero { max-height: 240px; object-fit: cover; }

/* Focused headers share the same type scale and rhythm. */
.pg-page .pg-lhead, .pg-page .pg-applayout:not(.pg-immersive) .pg-g-top {
  padding: .3rem 0 .6rem; gap: .25rem; margin: 0;
}
.pg-page .pg-lhead .pg-fh-title, .pg-page .pg-applayout:not(.pg-immersive) .pg-fh-title {
  font-size: clamp(1.45rem, 5.5vw, 2rem) !important; line-height: 1.15;
  font-weight: 750; letter-spacing: -.035em; margin: .2rem 0 !important;
}
.pg-page .pg-fh-row { min-height: 44px; }
.pg-page .pg-fh-sub { font-size: .85rem; color: var(--g-muted); }
.pg-page .pg-assist-btn { min-height: 38px; font-size: .8rem; padding: 0 .7rem; border-radius: 10px; }
.pg-page .pg-segbar { gap: 5px; }
.pg-page .pg-segbar .pg-gstep-btn { height: 24px; min-height: 24px; }
.pg-page .pg-segbar .pg-gstep-btn::before { height: 4px; }
.pg-page .pg-lhead + .pg-objective { margin: 0 0 .6rem; font-size: .84rem; line-height: 1.4; }

/* Visual lesson: compact instructional content and a persistent lesson action. */
.pg-page .pg-lplayer .pg-lesson2 { gap: 1rem; }
.pg-page .pg-lplayer .pg-lesson-visual { align-content: start; gap: .3rem; }
.pg-page .pg-lplayer .pg-illus-pic { border-radius: 14px; background: #173d31; }
.pg-page .pg-lplayer .pg-lesson-steps { gap: .75rem; align-content: start; }
.pg-page .pg-lplayer .pg-lkicker { font-size: .65rem; letter-spacing: .12em; font-weight: 700; }
.pg-page .pg-lplayer .pg-lstep-title { font-size: clamp(1.3rem, 4.5vw, 1.65rem); letter-spacing: -.025em; }
.pg-page .pg-lplayer .pg-step-text { font-size: .98rem; line-height: 1.55; }
.pg-page .pg-lactions { display: grid; grid-template-columns: auto minmax(0,1fr); gap: .6rem; margin: .1rem 0; }
.pg-page .pg-hand-slot::before, .pg-page .pg-hand-slot .pg-check span::before { content: none; }
.pg-page .pg-hand-slot .pg-check { width: 100%; justify-content: space-between; padding: 0 .75rem; font-size: .85rem; }
.pg-page .pg-listen { font-size: .85rem; padding: 0 .85rem; min-height: 46px; }
.pg-page .pg-viewseg { border-radius: 10px; right: 10px; top: 10px; }
.pg-page .pg-viewseg-btn { border-radius: 7px; min-height: 38px; padding: 0 .8rem; font-size: .8rem; }
.pg-page .pg-zoom-btn { width: 44px; height: 44px; bottom: 10px; right: 10px; }
.pg-page .pg-acc { border-radius: 11px; background: transparent; }
.pg-page .pg-acc > summary { min-height: 50px; padding: .5rem .85rem; gap: .6rem; font-size: .92rem; }
.pg-page .pg-acc-body { padding: 0 .85rem .85rem; font-size: .9rem; }
.pg-page .pg-acc-ic { width: 24px; height: 24px; }
.pg-page .pg-acc-ic .pg-ic { width: 22px; height: 22px; }
.pg-page .pg-lnav { grid-template-columns: 52px minmax(0,1fr); gap: .6rem; }
.pg-page .pg-lprev, .pg-page .pg-lnext { min-height: 52px; border-radius: 11px; font-size: .98rem; }
.pg-page .pg-save-exit { min-height: 44px; font-size: .8rem; }
.pg-page .pg-visual-info { margin: .15rem 0; font-size: .78rem; color: var(--g-muted); }
.pg-page .pg-visual-info summary { cursor: pointer; min-height: 38px; display: flex; align-items: center; gap: .4rem; }
.pg-page .pg-visual-info summary::before { content: '+'; font-size: 1.2rem; }
.pg-page .pg-visual-info[open] summary::before { content: '−'; }
.pg-page .pg-visual-info :is(.pg-illus-cap,.pg-illus-note) { margin: .25rem 0 .5rem; line-height: 1.45; }

/* Practice: ball and presets side by side, not four stacked full-width rows. */
.pg-page .pg-applayout:not(.pg-immersive) { gap: .75rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-g-stage { border-radius: 14px; border: 1px solid var(--g-line); }
.pg-page .pg-applayout:not(.pg-immersive) .pg-stage { border-radius: 13px; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-tip { grid-template-columns: 42px minmax(0,1fr); gap: .65rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-hear { width: 42px; height: 42px; min-width: 42px; min-height: 42px; }
.pg-page .pg-tip-head { font-size: 1rem; line-height: 1.3; letter-spacing: -.015em; }
.pg-page .pg-tip-sub { font-size: .86rem; line-height: 1.4; margin-top: .15rem; color: var(--g-muted); }
.pg-page .pg-applayout:not(.pg-immersive) .pg-gcard { padding: .8rem; gap: .5rem; border-radius: 13px; background: var(--g-card); }
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach-extra,
.pg-page .pg-applayout:not(.pg-immersive) .pg-coach-body { gap: .65rem; }
.pg-page .pg-gcontact { grid-template-columns: minmax(108px, .95fr) minmax(0,1.1fr); gap: .65rem; }
.pg-page .pg-gc-ball { align-self: center; }
.pg-page .pg-gc-ball .pg-cb { max-width: 180px; filter: drop-shadow(0 8px 12px rgba(0,0,0,.18)); }
.pg-page .pg-gc-key { gap: .5rem; font-size: .65rem; flex-wrap: wrap; justify-content: center; }
.pg-page .pg-gc-side { gap: .5rem; }
.pg-page .pg-gc-rec { font-size: .8rem; }
.pg-page .pg-gc-rec strong { font-size: .9rem; }
.pg-page .pg-gcontact .pg-gc-opts { grid-template-columns: 1fr; gap: 4px; padding: 0; background: none; }
.pg-page .pg-gc-opt { min-height: 44px; font-size: .82rem; border-radius: 8px; border-color: var(--g-line); }
.pg-page .pg-gc-apply { min-height: 44px; font-size: .8rem; line-height: 1.2; padding: .4rem .5rem; border-radius: 8px; }
.pg-page .pg-gc-does { font-size: .72rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-gstatus { font-size: .78rem; line-height: 1.45; padding-top: .45rem; border-top: 1px solid var(--g-line); }
.pg-page .pg-step-explanation { font-size: .8rem; color: var(--g-muted); border-top: 1px solid var(--g-line); }
.pg-page .pg-step-explanation summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; min-height: 44px; font-weight: 600; }
.pg-page .pg-step-explanation summary::after { content: '+'; font-size: 1.2rem; }
.pg-page .pg-step-explanation[open] summary::after { content: '−'; }
.pg-page .pg-step-explanation .pg-gtext { font-size: .82rem !important; line-height: 1.5; padding-bottom: .3rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-label { font-size: .78rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-power-out { font-size: .85rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-aim .pg-fine { min-width: 44px; width: 44px; height: 44px; min-height: 44px; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-power { padding-left: .75rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-c-aim { padding-right: .75rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-gnav .pg-btn { font-size: .82rem; min-height: 44px; padding: 0 .8rem; border-radius: 9px; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-actrow { grid-template-columns: 60px minmax(0,1fr) 60px; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-act { min-height: 56px; border-radius: 11px; font-size: .7rem; gap: .15rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-act-shoot { font-size: 1rem; font-weight: 750; box-shadow: none; }
.pg-page .pg-act .pg-ic { width: 22px; height: 22px; }
.pg-page .pg-more-info { border-radius: 10px; font-size: .82rem; background: transparent; }
.pg-page .pg-more-info > summary { min-height: 44px; font-size: .8rem; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-views { border-radius: 10px; }
.pg-page .pg-applayout:not(.pg-immersive) .pg-view-btn { border-radius: 7px; font-size: .75rem; min-height: 38px; padding: 0 .7rem; }

@media (max-width:760px) {
  html:has(.pg-page), html:has(.pg-page) body { background: #0b201a; }
  .wrap.pg-page { padding: max(12px, env(safe-area-inset-top)) 18px calc(88px + env(safe-area-inset-bottom)); }
  body.pg-focus .wrap.pg-page { padding-left: 18px; padding-right: 18px; }
  .pg-page .pg-nav { background: #0b201a; padding-bottom: max(8px,env(safe-area-inset-bottom)); }
  .pg-page .pg-nav a { font-size: .68rem; min-height: 52px; }
  .pg-page .pg-nav a.active::after { left: 32%; right: 32%; }
  .pg-page .pg-next { min-height: 224px; }
  .pg-page .pg-thumb { width: 80px; height: 60px; }
  .pg-page .pg-lesson-path .pg-thumb { width: 48px; height: 58px; }
  .pg-page .pg-lesson-path .pg-num { width: 30px; height: 30px; font-size: .8rem; }
  .pg-page .pg-course-hero { max-height: 155px; }
  .pg-page .pg-lplayer .pg-lesson-visual { margin: 0; }
  .pg-page .pg-lplayer .pg-illus-pic, .pg-page .pg-lplayer .pg-diagram, .pg-page .pg-lplayer .pg-diagram .pg-stage { border-radius: 13px; }
  .pg-page .pg-lplayer .pg-illus-note, .pg-page .pg-lplayer .pg-note, .pg-page .pg-lplayer .pg-approaches, .pg-page .pg-lplayer .pg-lesson-visual > .pg-check, .pg-page .pg-lplayer .pg-demo-bar { margin-left: 0; margin-right: 0; }
  .pg-page .pg-lplayer .pg-illus-frames { display: none; }
  /* Preserve the illustration's aspect ratio; never crop away teaching labels. */
  .pg-page .pg-lplayer .pg-illus-pic > svg { max-height: 36svh; }
  .pg-page .pg-zoom-btn { width: 44px; height: 44px; }
  .pg-page .pg-lkicker { display: none; }
  .pg-page .pg-lplayer .pg-lesson-steps { gap: .65rem; }
  .pg-page .pg-lactions { grid-template-columns: minmax(0,.85fr) minmax(0,1.15fr); }
  .pg-page .pg-listen { justify-content: center; }
  .pg-page .pg-lnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; margin: 0;
    padding: 12px 18px max(12px,env(safe-area-inset-bottom)); border-top: 1px solid var(--g-line); background: #0b201a; }
  body.pg-focus .wrap.pg-page:has(.pg-lhead) { padding-bottom: calc(100px + env(safe-area-inset-bottom)); }
  .pg-page .pg-lvoice:has(.pg-voice-row) { margin-bottom: .4rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-g-stage { margin: 0; border-radius: 13px; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-stage { aspect-ratio: 16 / 10 !important; border-radius: 12px; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-actrow { padding: 10px 18px max(10px,env(safe-area-inset-bottom)); background: #0b201a; border-top: 1px solid var(--g-line); gap: .55rem; }
  body.pg-focus .wrap.pg-page:has(.pg-applayout:not(.pg-immersive)) { padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
}
@media (min-width:761px) {
  .pg-page .pg-train { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .pg-page .pg-lhead { max-width: 750px; }
  .pg-page .pg-lplayer .pg-lesson-visual { position: sticky; top: 20px; }
  .pg-page .pg-lplayer .pg-lesson-steps { padding: .25rem 0 0; }
}
@media (max-width:360px) {
  .pg-page .pg-gcontact { grid-template-columns: minmax(96px,.85fr) minmax(0,1fr); gap: .5rem; }
  .pg-page .pg-gc-key { font-size: .6rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-c-aim { padding-right: .4rem; gap: .25rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-c-power { padding-left: .4rem; }
}
@media (max-height:520px) and (orientation:landscape) and (max-width:1000px) {
  .pg-page .pg-applayout:not(.pg-immersive) .pg-actrow { position: static; padding: .5rem 0; border: 0; }
  .pg-page .pg-lplayer .pg-lesson2 { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .pg-page .pg-lnav { position: static; padding: .5rem 0; border: 0; }
  .pg-page .pg-lplayer .pg-illus-pic > svg { max-height: none; }
}
@media (prefers-reduced-motion:reduce) {
  .pg-page *, .pg-dialog * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Keep the entire instruction above the action dock on everyday phone heights. */
.pg-page .pg-studio-head { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; gap: .5rem; width: 100%; align-items: center; }
.pg-page .pg-studio-head .pg-fh-back { margin: 0; width: 36px; min-width: 36px; }
.pg-page .pg-lhead .pg-studio-head .pg-fh-title,
.pg-page .pg-applayout:not(.pg-immersive) .pg-studio-head .pg-fh-title { font-size: clamp(1.05rem,4vw,1.45rem) !important; letter-spacing: -.025em; }
.pg-page .pg-lesson-visual > .pg-note:empty { display: none; }
.pg-page .pg-illus-tools:has(.pg-illus-frames:empty), .pg-page .pg-illus-tools { margin-top: .25rem; margin-bottom: .25rem; }
.pg-page .pg-visual-info .pg-illus-cap { position: static; width: auto; height: auto; overflow: visible; clip: auto; min-height: 0; }
.pg-page .pg-gcontact .pg-gc-opts { grid-template-columns: repeat(3,minmax(0,1fr)); }
.pg-page .pg-gc-opts .pg-gc-opt { padding: .35rem .15rem; font-size: .7rem; overflow-wrap: anywhere; }
.pg-page .pg-gc-side .pg-gc-does { margin-top: 0; }
@media (max-width:760px) {
  .pg-page .pg-lplayer .pg-lesson-visual { gap: 0; }
  .pg-page .pg-lplayer .pg-lesson2 { gap: .65rem; }
  .pg-page .pg-illus-tools { display: none; }
  .pg-page .pg-lplayer .pg-lesson-steps { gap: .55rem; }
  .pg-page .pg-lplayer .pg-step-text { font-size: .92rem; line-height: 1.5; }
  .pg-page .pg-lplayer .pg-acc > summary { min-height: 46px; }
  .pg-page .pg-lvoice { justify-content: flex-start; }
  .pg-page .pg-save-exit { justify-self: start; }
  .pg-page .pg-studio-head .pg-top-count { font-size: .78rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-g-top { gap: 0; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-g-stage { margin-top: -.2rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-stage { aspect-ratio: 16 / 9.5 !important; }
  .pg-page .pg-gc-ball .pg-cb { max-width: 150px; }
  .pg-page .pg-gcontact { grid-template-columns: minmax(106px,.95fr) minmax(0,1.1fr); }
  .pg-page .pg-gc-does { font-size: .68rem; }
  .pg-page .pg-gc-key { font-size: .6rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-coach-extra,
  .pg-page .pg-applayout:not(.pg-immersive) .pg-coach-body { gap: .45rem; }
}
@media (max-width:760px) and (orientation:portrait) {
  /* One dock owns aim, power, lesson navigation and shooting. Nothing hides behind Shoot. */
  .pg-page .pg-applayout:not(.pg-immersive) .pg-g-controls {
    position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; display: grid; gap: .4rem;
    padding: 8px 18px max(10px,env(safe-area-inset-bottom)); background: #0b201a;
    border-top: 1px solid var(--g-line); box-shadow: 0 -8px 24px rgba(0,0,0,.15);
    max-height: 52dvh; overflow-y: auto;
  }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-actrow { position: static; border: 0; padding: 0; background: none; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-c-tools { display: none; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-ctrl { gap: .15rem 0; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-gnav { gap: .35rem; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-gnav .pg-btn { min-height: 40px; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-act { min-height: 52px; }
  body.pg-focus .wrap.pg-page:has(.pg-applayout:not(.pg-immersive)) {
    padding-bottom: calc(var(--studio-dock-height, 190px) + 24px);
  }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-c-aim .pg-fine { min-height: 40px; height: 40px; }
  .pg-page .pg-applayout:not(.pg-immersive) .pg-power { height: 40px; }
}

/* ======================================================================================== Watch · Try · Learn
   Visual-first lessons and local 3D footage. Written detail remains available on demand. */
.pg-page .pg-film, .pg-dialog .pg-film { display:grid;gap:.65rem;min-width:0;margin:.4rem 0 1rem; }
.pg-film-stage { position:relative;overflow:hidden;border-radius:16px;background:#061b14;aspect-ratio:16/10;isolation:isolate;border:1px solid rgba(255,255,255,.12); }
.pg-film-video { display:block;width:100%;height:100%;object-fit:contain;background:#061b14; }
.pg-film-badge { position:absolute;left:12px;top:12px;padding:5px 9px;border-radius:7px;background:rgba(4,21,15,.8);color:#d8f8e8;font-size:.7rem;font-weight:700;pointer-events:none; }
.pg-film-start { position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.55rem;border:0;color:#fff;background:linear-gradient(transparent,rgba(1,14,8,.25));font:inherit;font-weight:750;font-size:1rem;cursor:pointer; }
.pg-film-start[hidden] { display:none!important; }
.pg-film-playicon { display:grid;place-items:center;width:70px;height:70px;border-radius:50%;background:#66e5b2;color:#092b1f;font-size:1.65rem;box-shadow:0 5px 24px #0004; padding-left:4px; }
.pg-film-toolbar { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.35rem; }
.pg-page .pg-film-toolbar .pg-btn, .pg-dialog .pg-film-toolbar .pg-btn { padding:.45rem .2rem;min-height:48px;font-size:.76rem;border-radius:10px; }
.pg-film-toolbar .pg-btn[aria-pressed="true"] { background:#66e5b2;color:#072b20; }
.pg-page .pg-film-try { min-height:50px;font-size:1rem;border-radius:11px; }
.pg-film-transcript { font-size:.88rem;color:var(--g-muted); }
.pg-film-transcript summary { min-height:40px;display:flex;align-items:center;cursor:pointer;gap:.5rem; }
.pg-film-transcript summary::before { content:'+';font-size:1.2rem; }
.pg-film-transcript[open] summary::before { content:'−'; }
.pg-film-prompt { font-size:.92rem;line-height:1.6;margin:.3rem 0; }
.pg-film-status { font-size:.82rem;color:#f0cb8e;padding:.5rem; }
.pg-film-hint { margin:.1rem 0 .6rem;color:var(--g-muted);font-size:.84rem; }
.pg-page .pg-visual-lesson { display:flex;flex-direction:column;gap:.35rem; }
.pg-page .pg-visual-lesson > .pg-lstep-title { font-size:1.15rem;margin:.2rem 0 .5rem;letter-spacing:-.02em; }
.pg-visual-shortcuts { display:flex;gap:.5rem;margin:.4rem 0; }
.pg-visual-shortcuts .pg-btn { flex:1;font-size:.82rem;padding:.5rem; }
.pg-full-explanation { border:1px solid var(--g-line);border-radius:12px;padding:0 .8rem;margin:.5rem 0; }
.pg-full-explanation > summary { display:flex;align-items:center;gap:.5rem;cursor:pointer;min-height:48px;font-size:.85rem;font-weight:600; }
.pg-full-explanation[open] { padding-bottom:1rem; }
.pg-page .pg-full-explanation .pg-lesson-visual { position:static; }
.pg-page .pg-full-explanation .pg-lesson-steps { min-width:0; }
.pg-page.pg-visual-first .pg-lhead + .pg-objective { display:none; }
.pg-visual-first .pg-lfinish { gap:.7rem; }
.pg-page .pg-lfinish .pg-optional-section { padding:0 .85rem;border-radius:12px; }
.pg-optional-section > summary { min-height:48px;display:flex;align-items:center;cursor:pointer;font-size:.9rem;font-weight:650; }
.pg-optional-section[open] { padding-bottom:1rem!important; }
.pg-quiz-top { display:flex;align-items:center;justify-content:space-between;gap:.5rem;margin-bottom:.5rem; }
.pg-quiz-top h4 { margin:0;font-size:.95rem; }
.pg-quiz-top .pg-btn { font-size:.78rem;padding:.5rem .6rem; }
.pg-page .pg-visual-quiz { display:grid;gap:1rem; }
.pg-page .pg-visual-quiz .pg-quiz-q { margin:0;padding:.8rem;border:1px solid var(--g-line);border-radius:14px;background:var(--g-card); }
.pg-picture-options { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem; }
.pg-choice-card { min-width:0;border:1px solid var(--g-line);border-radius:12px;overflow:hidden;background:#0b201a; }
.pg-visual-choice { position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:.4rem;width:100%;min-height:148px;padding:.65rem;border:0;color:var(--g-text);background:transparent;font:inherit;font-size:.88rem;cursor:pointer; }
.pg-visual-choice img { display:block;width:100%;aspect-ratio:16/10;object-fit:cover;border-radius:6px; }
.pg-visual-choice[aria-pressed="true"] { box-shadow:inset 0 0 0 3px var(--g-mint);background:#66e5b219; }
.pg-choice-letter { position:absolute;top:7px;left:7px;display:grid;place-items:center;width:25px;height:25px;border-radius:50%;background:#15382c;color:#c5f9dd;font-weight:750;font-size:.75rem; }
.pg-answer-symbol { display:grid;place-items:center;min-width:70px;min-height:70px;font-size:2.8rem;color:var(--g-mint);font-weight:750;line-height:1; }
.pg-symbol-lose,.pg-symbol-foul { color:#ffb390; }
.pg-choice-tools { display:flex;align-items:center;justify-content:center;gap:.25rem;padding:.3rem; }
.pg-choice-listen { display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid var(--g-line);border-radius:9px;color:var(--g-text);background:transparent;cursor:pointer; }
.pg-page .pg-choice-watch { font-size:.75rem;min-height:44px;padding:.25rem .5rem; }
.pg-choice-transcript { font-size:.78rem;padding:0 .6rem; }
.pg-choice-transcript summary { display:flex;align-items:center;min-height:36px;color:var(--g-muted);cursor:pointer; }
.pg-quiz-transcript { margin:0 0 .5rem;font-size:.85rem;color:var(--g-muted); }
.pg-quiz-transcript summary { min-height:40px;display:flex;align-items:center;cursor:pointer; }
.pg-quiz-fb { display:flex;align-items:center;flex-wrap:wrap;gap:.5rem; }
.pg-quiz-fb .pg-answer-symbol { min-width:28px;min-height:36px;font-size:1.5rem; }
.pg-quiz-fb > details { width:100%;font-size:.85rem; }
.pg-film-dialog { width:min(94vw,850px);max-height:92dvh;background:#0b201a;padding:1rem;border-radius:16px;color:#f2f6f3; }
.pg-film-dialog::backdrop { background:rgba(0,0,0,.8); }
.pg-film-dialog .pg-film { margin-bottom:0; }
.pg-film-launch { justify-self:start;gap:.5rem!important;font-size:.85rem!important;color:var(--g-mint)!important; }
.pg-page .pg-drills li { display:grid;gap:.4rem;margin-bottom:.7rem; }
.pg-page .pg-audio-drill { justify-self:start; }
@media (max-width:760px) {
 .pg-page .pg-visual-lesson > .pg-film { margin-bottom:.1rem; }
 .pg-page .pg-film-stage { aspect-ratio:4/3; }
 .pg-page .pg-film-stage .pg-film-video { object-fit:contain; }
 .pg-page .pg-film-compact .pg-film-stage { aspect-ratio:16/9; }
 .pg-page .pg-film-toolbar .pg-btn { min-height:48px;font-size:.73rem; }
 .pg-page .pg-full-explanation .pg-lesson2 { display:flex;flex-direction:column; }
 .pg-page .pg-visual-lesson .pg-lnav { z-index:45; }
 .pg-page .pg-picture-options { gap:.5rem; }
 .pg-page .pg-quiz-top { flex-wrap:wrap; }
 .pg-page .pg-film-playicon { width:64px;height:64px; }
 .pg-page .pg-visual-lesson > .pg-lstep-title { font-size:1.1rem; }
}
@media (min-width:900px) {
 .pg-page .pg-visual-lesson { max-width:900px;margin:0 auto;width:100%; }
 .pg-page .pg-visual-lesson > .pg-film { width:100%; }
 .pg-page .pg-visual-quiz .pg-picture-options { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
.pg-film-contact { position:absolute;bottom:10px;right:10px;width:90px;display:grid;justify-items:center;padding:4px 6px 7px;border:1px solid #ffffff24;border-radius:10px;background:#082219e8;pointer-events:none; }
.pg-film-contact .pg-cb { width:66px;height:66px; }
.pg-film-contact-label { color:#ddf9eb;font-size:.58rem;font-weight:700;white-space:nowrap; }
.pg-film-contact[hidden] { display:none!important; }
.pg-film-transcript > p { margin:.3rem 0 .6rem; }
.pg-full-explanation .pg-lesson-steps { gap:.7rem; }
.pg-page .pg-optional-section > summary::after { content:'+';margin-left:auto;color:var(--g-mint); }
.pg-page .pg-optional-section[open] > summary::after { content:'−'; }
.pg-film-zoom { position:absolute;right:10px;top:10px;width:44px;height:44px;display:grid;place-items:center;z-index:2;border:1px solid #ffffff40;background:#082219d9;border-radius:10px;color:#edfff6;font-size:1.6rem;cursor:pointer; }
.pg-film-zoom[aria-pressed="true"] { background:#66e5b2;color:#072b20; }
.pg-film-video { transition:transform .2s ease; }
@media(prefers-reduced-motion:reduce){.pg-film-video{transition:none;}}
/* Camera exploration is separate from aiming. These controls never strike a ball. */
.pg-camera-controls {position:absolute;bottom:10px;left:10px;z-index:4;display:flex;gap:3px;padding:4px;border:1px solid #ffffff28;background:#08241fdc;border-radius:12px;backdrop-filter:blur(8px);max-width:calc(100% - 20px);}
.pg-camera-controls[hidden]{display:none;}
.pg-camera-btn {width:36px;height:38px;min-width:0;padding:6px;display:grid;place-items:center;background:transparent;color:#f0fff6;border:0;border-radius:7px;font:700 20px system-ui;cursor:pointer;touch-action:manipulation;}
.pg-camera-btn svg{width:22px;height:22px;}
.pg-camera-btn:hover,.pg-camera-btn:focus-visible{background:#42cd9560;outline:2px solid #66e5b2;}
@media(max-width:500px){.pg-camera-controls{left:6px;bottom:6px;gap:1px;padding:3px;}.pg-camera-btn{width:34px;height:40px;}}
.pg-film-views{display:flex;gap:4px;padding:4px;background:#0a2a22;border:1px solid #315349;border-radius:10px;}
.pg-film-views[hidden]{display:none;}
.pg-film-views button{flex:1;min-height:42px;background:transparent;color:#bed2c9;border:0;border-radius:7px;font:600 .85rem system-ui;cursor:pointer;}
.pg-film-views button[aria-pressed="true"]{background:#66e5b2;color:#06281d;}
/* Keep the table clear until the player opens the camera controls. */
.pg-camera-controls {flex-direction:column;align-items:flex-start;gap:4px;}
.pg-camera-toggle{display:flex;align-items:center;gap:6px;min-height:44px;padding:6px 10px;border:0;background:transparent;color:#f1fff8;font:600 .8rem system-ui;cursor:pointer;border-radius:8px;}
.pg-camera-toggle svg{width:22px;height:22px;}
.pg-camera-toggle[aria-expanded="true"]{background:#42cd9540;}
.pg-camera-options{display:grid;grid-template-columns:repeat(4,44px);gap:3px;}
.pg-camera-options[hidden]{display:none;}
.pg-camera-options .pg-camera-btn{width:44px;height:44px;}
/* Review fixes: exact-step resume and visual access to hand placement. */
.pg-save-status{font-size:.78rem;color:#d1e8de;margin:.7rem 0 0;}
.pg-hand-entry{display:flex;align-items:center;gap:14px;padding:12px;margin:16px 0;color:var(--g-text,#eaf5ef);text-decoration:none;border:1px solid #315248;background:#102c23;border-radius:12px;min-height:76px;}
.pg-hand-entry img{width:88px;height:62px;object-fit:cover;border-radius:8px;}
.pg-hand-entry>span:not(.pg-chev){display:grid;gap:5px;flex:1;min-width:0;}
.pg-hand-entry>.pg-chev{flex:0 0 auto;}
.pg-hand-entry strong{font-size:1rem;}
.pg-hand-entry span span{font-size:.8rem;color:#aec8bb;}
.pg-bridge-choices{display:flex;gap:6px;flex-wrap:wrap;margin:12px 0;}
.pg-bridge-choices .pg-btn{flex:1;min-height:48px;min-width:85px;text-align:center;font-size:.78rem;padding:8px;}
.pg-bridge-mistake{margin:12px 0;border:1px solid #315248;border-radius:10px;padding:12px;}
.pg-bridge-mistake>summary{min-height:32px;cursor:pointer;font-weight:650;}
.pg-bridge-mistake .pg-film{margin-top:14px;}
.pg-hand-shortcut{width:100%;min-height:48px;justify-content:center;margin:8px 0;box-sizing:border-box;}
.pg-first-session{display:flex;align-items:center;gap:12px;margin:12px 0;padding:14px;color:#e8fff2;background:#153e2e;border:1px solid #46906b;border-radius:12px;text-decoration:none;min-height:64px;}
.pg-first-session>svg{width:28px;height:28px;flex:0 0 auto;}.pg-first-session>span:not(.pg-chev){display:grid;gap:5px;flex:1;min-width:0;}.pg-first-session span span{font-size:.8rem;color:#b6d4c2;}
.pg-intro-body{display:grid;gap:14px;}.pg-intro-dots{display:flex;gap:8px;margin:14px 0 20px;}.pg-intro-dots span{height:5px;flex:1;background:#25473a;border-radius:8px;}.pg-intro-dots .current{background:#66e5b2;}
.pg-intro-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;}.pg-intro-choice{display:grid;gap:10px;place-items:center;min-width:0;padding:12px 5px;color:#edfff4;background:#123226;border:2px solid #385d4c;border-radius:12px;font:inherit;cursor:pointer;}.pg-intro-choice .pg-cb{width:100%;max-width:140px;}.pg-intro-choice strong{font-size:.8rem;}.pg-intro-choice[aria-pressed="true"]{border-color:#66e5b2;background:#23513c;}
.pg-intro-poster{width:100%;aspect-ratio:16/9;object-fit:cover;border-radius:14px;}.pg-intro-short{font-size:1.4rem;font-weight:700;}.pg-intro-nav{display:flex;gap:10px;margin:22px 0 14px;}.pg-intro-next{flex:1;min-height:54px;}.pg-intro-back{min-width:52px;}.pg-intro-skip{display:block;text-align:center;color:#a8c9b6;padding:14px;}.pg-intro-listen{justify-self:start;min-height:48px;}.pg-intro-feedback{font-weight:650;min-height:24px;color:#87e5b8;}
.pg-data-setting{margin:15px 0;align-items:flex-start;}.pg-data-setting span{display:grid;gap:5px;}.pg-data-setting small{font-size:.8rem;color:#afc7ba;}.pg-film-data-note{font-size:.75rem;color:#acd2bf;margin:0;}.pg-film-data-note[hidden]{display:none;}
.pg-intro-body,.pg-intro-nav{max-width:760px;margin-left:auto;margin-right:auto;}
@media(max-width:760px){
 body.pg-intro-active .pg-app{padding-bottom:140px;}
 body.pg-intro-active .pg-intro-nav{position:fixed;z-index:45;bottom:0;left:0;right:0;margin:0;padding:12px 16px calc(12px + env(safe-area-inset-bottom));background:#0b201af5;border-top:1px solid #315248;box-sizing:border-box;}
}
.pg-intro-choice.pg-intro-wrong{border-color:#ef9d65;background:#4b2c1c;}
.pg-intro-feedback.pg-intro-wrong{color:#ffbd92;}

/* Practice browser: one skill at a time, real table previews and one mode switch. */
.pg-practice-browser { width:100%;max-width:1000px;margin:0 auto; }
.pg-practice-heading { display:flex;align-items:center;justify-content:space-between;gap:12px;position:relative;margin:14px 0 18px; }
.pg-page .pg-practice-heading .pg-h2 { margin:0 0 5px;font-size:1.85rem;line-height:1.12; }
.pg-practice-total { color:var(--g-muted);font-size:.8rem; }
.pg-practice-help { flex:none; }
.pg-practice-help > summary { list-style:none;display:grid;place-items:center;width:44px;height:44px;border:1px solid #38564a;border-radius:50%;color:#c8ddd3;cursor:pointer;box-sizing:border-box;font:600 1rem system-ui; }
.pg-practice-help > summary::-webkit-details-marker { display:none; }
.pg-practice-help[open] > summary { color:var(--g-mint);border-color:var(--g-mint); }
.pg-practice-help-body { position:absolute;right:0;top:calc(100% + 8px);z-index:10;width:min(340px,100%);box-sizing:border-box;padding:14px 16px;background:#163c30;border:1px solid #496a5b;border-radius:8px;box-shadow:0 8px 30px #0005;color:#e8f4ed;font-size:.85rem;line-height:1.5; }
.pg-practice-help-body p { margin:0; }
.pg-practice-help-body p + p { margin-top:10px; }
.pg-practice-shortcuts { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 18px; }
.pg-page .pg-practice-shortcut { display:flex;align-items:center;position:relative;isolation:isolate;overflow:hidden;min-height:94px;padding:12px;gap:2px;border-radius:8px;border:1px solid #49604b;color:#fff;text-decoration:none;box-sizing:border-box; }
.pg-practice-shortcut img { position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover; }
.pg-practice-shortcut::after { content:'';position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#051c16f5,#051c1640); }
.pg-practice-shortcut span { align-self:flex-end;font-weight:700;font-size:.9rem;line-height:1.25;text-shadow:0 1px 5px #000; }
.pg-practice-shortcut > svg { align-self:flex-end;margin-left:auto;flex-shrink:0;width:18px;height:20px; }
.pg-practice-skills { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px; }
.pg-page .pg-practice-skills a { display:grid;place-items:center;min-height:44px;padding:4px 6px;box-sizing:border-box;text-decoration:none;text-align:center;border:1px solid #345044;background:transparent;color:#bbd1c5;font-size:.82rem;font-weight:600;border-radius:6px; }
.pg-page .pg-practice-skills a[aria-current] { background:#63dfaa;border-color:#63dfaa;color:#072b1e; }
.pg-practice-modes { display:flex;padding:4px;margin:18px 0 14px;background:#071b14;border:1px solid #29483a;border-radius:8px; }
.pg-page .pg-practice-modes a { display:flex;flex:1;align-items:center;justify-content:center;min-height:44px;gap:6px;padding:5px;box-sizing:border-box;text-decoration:none;color:#b4c8bd;border-radius:5px;font-size:.85rem;font-weight:600; }
.pg-page .pg-practice-modes a[aria-current] { background:#214738;color:#effff5;box-shadow:0 1px 3px #0004; }
.pg-practice-modes svg { width:18px;height:18px;flex-shrink:0; }
.pg-practice-section-head { display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 10px; }
.pg-practice-section-head h3 { font-size:1rem;font-weight:700;margin:0;color:#ecf4ef; }
.pg-practice-count { font-size:.8rem;color:#b4c8bd; }
.pg-shot-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));list-style:none;padding:0;margin:0;gap:10px; }
.pg-shot-grid > li { min-width:0; }
.pg-page .pg-shot-card { display:flex;flex-direction:column;height:100%;overflow:hidden;border:1px solid #2e4b3c;border-radius:8px;text-decoration:none;box-sizing:border-box;background:#112f24;color:#eff8f1; }
.pg-shot-card:hover { border-color:var(--g-mint); }
.pg-shot-picture { display:block;position:relative;aspect-ratio:16/9;background:#164b34;overflow:hidden; }
.pg-shot-picture img { display:block;width:100%;height:100%;object-fit:cover; }
.pg-shot-start { position:absolute;right:8px;bottom:8px;display:grid;place-items:center;width:30px;height:30px;border-radius:50%;background:#e0f8e8;box-shadow:0 1px 8px #0006;color:#0d3624; }
.pg-shot-start svg { width:15px;height:15px; }
.pg-shot-score { position:absolute;top:6px;left:6px;padding:3px 6px;font-size:.68rem;font-weight:700;background:#082b20ed;border:1px solid #7bcea0;color:#d3ffe2;border-radius:4px; }
.pg-shot-name { display:block;padding:11px 10px;font-size:.86rem;line-height:1.3;overflow-wrap:break-word; }
@media(min-width:600px) {
 .pg-practice-shortcut { min-height:120px; }
 .pg-practice-skills { grid-template-columns:repeat(6,minmax(0,1fr)); }
 .pg-shot-grid { grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }
 .pg-shot-name { padding:14px;font-size:1rem; }
 .pg-practice-modes { max-width:400px; }
}
@media(prefers-reduced-motion:no-preference) {
 .pg-shot-card, .pg-practice-skills a { transition:border-color .15s,background-color .15s; }
}

/* ---- Full-screen exercise header (6 Nov 2026): a compact two-line block beside the view buttons instead of one
   squeezed row. Line 1: exit + the exercise title (wraps to two lines, never cut to "St…"). Line 2: the step and a
   thin progress bar. The assistance pill is changed outside full screen. */
.pg-page .pg-game.pg-immersive .pg-g-top:has(.pg-fh-row) { display: grid !important; grid-template-columns: 44px minmax(0, 1fr); column-gap: 10px; row-gap: 3px; align-items: center;
  width: auto; max-width: calc(100% - 196px); padding: 6px 10px 8px 6px; border-radius: 16px; background: rgba(6, 20, 15, .62); backdrop-filter: blur(6px); }
.pg-page .pg-game.pg-immersive .pg-g-top:has(.pg-fh-row) > .pg-imm-exit { grid-row: 1 / span 3; align-self: start; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-fh-row { display: block; min-width: 0; width: auto; height: auto; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-assist-wrap { display: none; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-g-title, .pg-page .pg-game.pg-immersive .pg-g-top .pg-fh-title { display: block; width: auto; max-width: none; min-width: 0; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-fh-title { margin: 0; font-size: 1rem; line-height: 1.2; font-weight: 800; white-space: normal; overflow: hidden; text-overflow: clip;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-fh-sub { position: static; display: block; width: auto; height: auto; margin: 0; padding: 0; font-size: .78rem; line-height: 1.2; color: #d5e2db; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-segbar { display: grid !important; grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 3px; width: 100%; height: 8px; margin: 1px 0 0; position: static; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-segbar li { width: auto; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-segbar .pg-gstep-btn { width: 100%; height: 8px; min-height: 0; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-segbar .pg-gstep-btn::before { height: 4px; }
.pg-page .pg-game.pg-immersive .pg-g-top .pg-stat { display: none; }
