/* כל הזכויות שמורות לאושרת רון – הקשר המונטסורי
   מפסקל ועד גאוס – עיצוב משותף לתחנות, ללוח החי, למשולש, למשחקים ולשלושת השלבים.
   זהה ל־tools/pascal-gauss-ui.css באתר הלמידה של ים. כל עמוד מגדיר את משתני הצבע:
   --acc --acc-dark --card --card2 --line --ink --soft --gold --ok --okbg --bad --badbg --note --onacc */

.pg-m { direction: ltr; unicode-bidi: isolate; white-space: nowrap; font-weight: 700; font-family: "Rubik", system-ui, sans-serif; }
.pg-soft { color: var(--soft, #666); font-size: .92em; }
.ts-label { display: inline-block; justify-self: start; align-self: start; font-size: 12.5px; line-height: 1.3; color: var(--soft, #666); background: var(--card2, #f1efe8); border: 1px solid var(--line, #ddd); border-radius: 999px; padding: 1px 10px; margin-bottom: 6px; }

/* ---- כפתורים ---- */
.pbtn { font: inherit; font-weight: 700; font-size: 16px; min-height: 44px; padding: 6px 16px; border-radius: 12px; border: 2px solid var(--line, #ccc); background: var(--card, #fff); color: var(--ink, #222); cursor: pointer; touch-action: manipulation; }
.pbtn:hover:not(:disabled) { border-color: var(--acc, #2e6b45); }
.pbtn:focus-visible, .pchip:focus-visible, .pg-tab:focus-visible, .pg-stop:focus-visible { outline: 3px solid var(--gold, #b07a12); outline-offset: 2px; }
.pbtn:disabled { opacity: .6; cursor: default; }
.pbtn.go { background: var(--acc, #2e6b45); border-color: var(--acc, #2e6b45); color: var(--onacc, #fff); }
.pbtn.ghost { background: transparent; border-style: dashed; color: var(--soft, #555); font-weight: 600; }
.pbtn.big { font-size: 18px; min-height: 54px; padding: 8px 20px; }
.pbtn.on { background: var(--acc, #2e6b45); border-color: var(--acc, #2e6b45); color: var(--onacc, #fff); }
.pbtn.ok { background: var(--okbg, #e8f5ec); border-color: var(--ok, #1e7a46); color: var(--ink, #222); opacity: 1; }
.pbtn.no { background: var(--badbg, #fdecea); border-color: var(--bad, #b5402a); }
.pbtn small { font-weight: 600; opacity: .8; }
.pchip { font: inherit; font-size: 14.5px; font-weight: 700; min-height: 38px; padding: 3px 12px; border-radius: 999px; border: 2px solid var(--line, #ccc); background: var(--card, #fff); color: var(--ink, #222); cursor: pointer; }
.pchip.on { background: var(--acc, #2e6b45); border-color: var(--acc, #2e6b45); color: var(--onacc, #fff); }
.pchk { display: flex; align-items: center; gap: 7px; cursor: pointer; font-size: 15.5px; min-height: 32px; }
.pchk input { width: 19px; height: 19px; flex: none; accent-color: var(--acc, #2e6b45); }
.pchk .sw { display: inline-block; width: 22px; height: 0; border-top: 4px solid; border-radius: 2px; flex: none; }
.pchk .sw.e { border-color: #d99a00; border-top-style: dashed; } .pchk .sw.c { border-color: #d6336c; } .pchk .sw.m { border-color: #0d9488; }
.pg-rng { display: grid; gap: 2px; font-size: 15.5px; min-width: 0; }
.pg-rng b { font-family: "Rubik", system-ui, sans-serif; color: var(--acc, #2e6b45); direction: ltr; unicode-bidi: isolate; }
.pg-rng input { width: 100%; min-height: 32px; accent-color: var(--acc, #2e6b45); direction: ltr; }

/* ---- פנסים וכוכבים ---- */
.lanterns, .stars { display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.lantern { width: 26px; height: 34px; flex: none; } .lantern .glass { fill: #d9d3c5; } .lantern .glow { display: none; } .lantern.lit .glass { fill: #f2b632; } .lantern.lit .glow { display: block; } .lantern.cur { filter: drop-shadow(0 0 3px var(--acc, #2e6b45)); }
.star { font-size: 24px; line-height: 1; color: var(--soft, #777); } .star.y { color: #d99a00; } .star.cur { transform: scale(1.25); color: var(--acc, #2e6b45); }

/* ---- ראש היישומון: רמזור, שלבים, למבוגר ---- */
.pg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 10px; }
.pg-light { display: inline-flex; align-items: center; gap: 5px; background: #2b2b2f; border-radius: 999px; padding: 5px 12px 5px 9px; color: #fff; font-size: 14px; font-weight: 700; }
.pg-light .lamp { width: 14px; height: 14px; border-radius: 50%; background: #55555c; display: inline-block; }
.pg-light .lamp.l1.on { background: #ef4444; box-shadow: 0 0 6px #ef4444; } .pg-light .lamp.l2.on { background: #facc15; box-shadow: 0 0 6px #facc15; } .pg-light .lamp.l3.on { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.pg-tabs { display: flex; gap: 6px; flex-wrap: wrap; flex: 1 1 auto; }
.pg-tab { font: inherit; font-weight: 700; font-size: 16px; min-height: 44px; padding: 5px 16px; border-radius: 12px; border: 2px solid var(--line, #ccc); background: var(--card, #fff); color: var(--ink, #222); cursor: pointer; }
.pg-tab[aria-selected=true] { background: var(--acc-dark, var(--acc, #1f4d31)); border-color: var(--acc-dark, var(--acc, #1f4d31)); color: var(--onacc, #fff); }
.pg-adult { font-size: 14.5px; color: var(--soft, #555); flex: 0 1 auto; max-width: 100%; }
.pg-adult summary { cursor: pointer; font-weight: 700; min-height: 32px; display: inline-flex; align-items: center; }
.pg-adult[open] { flex: 1 1 100%; background: var(--note, #fff6dd); border-radius: 12px; padding: 4px 12px 8px; }
.pg-adult p { margin: 0; }
.pg-lead { margin: 0 0 10px; color: var(--soft, #555); max-width: 75ch; }

/* ---- מפת התחנות ---- */
.pg-map { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.pg-stop { font: inherit; flex: 1 0 auto; min-width: 86px; display: grid; justify-items: center; gap: 1px; padding: 6px 8px; border-radius: 14px; border: 2px solid var(--line, #ccc); background: var(--card, #fff); color: var(--ink, #222); cursor: pointer; position: relative; }
.pg-stop .e { font-size: 21px; line-height: 1.2; } .pg-stop .t { font-size: 13.5px; font-weight: 700; white-space: nowrap; } .pg-stop .w { font-size: 11.5px; color: var(--soft, #666); }
.pg-stop.done { border-color: var(--ok, #1e7a46); background: var(--okbg, #e8f5ec); } .pg-stop.done .e { color: var(--ok, #1e7a46); font-weight: 800; }
.pg-stop.cur { border-color: var(--acc, #2e6b45); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc, #2e6b45) 25%, transparent); }

/* ---- מסך הקניה ---- */
.pg-lesson { display: grid; gap: 14px; grid-template-columns: minmax(330px, 460px) minmax(0, 1fr); align-items: start; }
.pg-ltext { display: grid; gap: 8px; align-content: start; min-width: 0; }
.pg-ltext > .ts-label { justify-self: start; margin: 0; }
.pg-ltext h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); margin: 0; }
.pg-intro { margin: 0; font-size: 17px; } .pg-do { margin: 0; font-weight: 700; background: var(--card2, #f3efe4); border-radius: 12px; padding: 8px 12px; }
.pg-more { display: grid; gap: 8px; } .pg-more[hidden] { display: none; }
.pg-rule { background: var(--note, #fff6dd); border: 2px solid var(--gold, #b07a12); border-radius: 14px; padding: 8px 12px; font-size: 17px; }
.pg-who { border: 1px dashed var(--line, #ccc); border-radius: 14px; padding: 8px 12px; font-size: 15.5px; color: var(--ink, #222); background: var(--card, #fff); }
.pg-link { margin: 0; font-size: 15px; } .pg-link a { color: var(--acc, #2e6b45); font-weight: 700; }
.pg-teach { background: var(--card2, #eef2fa); border-radius: 12px; padding: 4px 12px 8px; font-size: 15.5px; } .pg-teach summary { cursor: pointer; font-weight: 700; min-height: 34px; display: flex; align-items: center; } .pg-teach p { margin: 0; }
.pg-ident { border: 2px solid var(--line, #ccc); border-radius: 14px; padding: 8px 12px; background: var(--card, #fff); } .pg-ident[hidden] { display: none; }
.pg-q { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.pg-two { display: flex; gap: 8px; flex-wrap: wrap; } .pg-two .pbtn { flex: 1 1 150px; }
.pg-fb { margin-top: 8px; border-radius: 12px; padding: 0; font-size: 16.5px; line-height: 1.5; }
.pg-fb.ok, .pg-fb.no, .pg-fb.hint { padding: 8px 12px; border: 2px solid; }
.pg-fb.ok { background: var(--okbg, #e8f5ec); border-color: var(--ok, #1e7a46); } .pg-fb.no { background: var(--badbg, #fdecea); border-color: var(--bad, #b5402a); } .pg-fb.hint { background: var(--note, #fff6dd); border-color: var(--gold, #b07a12); }
.pg-after { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .pg-fin { margin: 0; font-weight: 700; flex: 1 1 100%; }
.pg-skip { justify-self: start; }
.pg-lwidget { background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 20px; padding: 10px 12px; min-width: 0; display: grid; gap: 8px; align-content: start; }
.pg-wbox svg, .pg-view svg { display: block; width: 100%; height: auto; max-height: var(--wh, min(64vh, 620px)); }
.pg-wmsg { font-size: 17px; min-height: 2.9em; background: var(--card2, #f3efe4); border-radius: 12px; padding: 7px 12px; line-height: 1.5; }
.pg-wmsg .old { color: var(--soft, #666); font-size: .9em; } .pg-wmsg .cur { font-weight: 700; }
.pg-wact { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: end; } .pg-wact:empty { display: none; } .pg-wact .pg-rng { flex: 1 1 220px; }

/* ---- ציורים ---- */
.pg-tri text, .pg-board text, .pg-bars text, .pg-bell text, .pg-livesvg text, .pg-sdsvg text { font-family: "Rubik", system-ui, sans-serif; font-weight: 700; fill: var(--ink, #222); }
.pg-c polygon { fill: var(--card2, #f3efe4); stroke: var(--line, #bbb); stroke-width: 1.4; }
.pg-c[role=button] { cursor: pointer; } .pg-c:focus-visible polygon { stroke: var(--gold, #b07a12); stroke-width: 3; } .pg-c:focus { outline: none; }
.pg-c.empty polygon { fill: transparent; stroke-dasharray: 3 4; opacity: .55; }
.pg-c.can polygon { fill: var(--note, #fff6dd); stroke: var(--gold, #b07a12); stroke-dasharray: 5 3; stroke-width: 2.2; opacity: 1; }
.pg-c.par polygon { fill: #ffd95a; stroke: #b07a12; stroke-width: 2.4; } .pg-c.par text { fill: #3b2a00; }
.pg-c.new polygon, .pg-c.rowhi polygon { fill: var(--acc, #2e6b45); stroke: var(--acc, #2e6b45); } .pg-c.new text, .pg-c.rowhi text { fill: var(--onacc, #fff); }
.pg-c.ask polygon { fill: var(--note, #fff6dd); stroke: var(--gold, #b07a12); stroke-width: 3; stroke-dasharray: none; opacity: 1; } .pg-c.ask text { fill: var(--gold, #b07a12); font-size: 20px; }
.pg-c.odd polygon { fill: var(--acc, #2e6b45); } .pg-c.odd text { fill: var(--onacc, #fff); }
.pg-c.symL polygon { fill: #cfe3ff; } .pg-c.symR polygon { fill: #ffd9c7; } .pg-c.symM polygon { fill: #e9e2ff; } .pg-c.symL text, .pg-c.symR text, .pg-c.symM text { fill: #1d2433; }
.pg-c.d0 polygon { fill: #dfe4ea; } .pg-c.d1 polygon { fill: #bfe3c8; } .pg-c.d2 polygon { fill: #ffd98a; } .pg-c.d0 text, .pg-c.d1 text, .pg-c.d2 text { fill: #1d2433; }
.pg-side { fill: var(--acc, #2e6b45) !important; }
.pg-peg circle { fill: var(--soft, #777); } .pg-peg[role=button], .pg-bin[role=button], .pg-bar[role=button] { cursor: pointer; } .pg-peg:focus, .pg-bin:focus, .pg-bar:focus { outline: none; }
.pg-peg.num circle { fill: var(--card, #fff); stroke: var(--acc, #2e6b45); stroke-width: 2.4; }
.pg-peg.hi circle { fill: #ffd95a; stroke: #b07a12; stroke-width: 3; } .pg-peg .qm { fill: var(--gold, #b07a12); }
.pg-peg:focus-visible circle, .pg-bin:focus-visible rect { stroke: var(--gold, #b07a12); stroke-width: 3.5; }
.pg-bin rect { fill: var(--card2, #f3efe4); stroke: var(--line, #bbb); stroke-width: 1.5; } .pg-bin.num rect { stroke: var(--acc, #2e6b45); stroke-width: 2.2; }
.pg-bin.hi rect { fill: #ffd95a; stroke: #b07a12; stroke-width: 3; } .pg-bin.hi .v { fill: #3b2a00; }
.pg-bin .lb, .pg-cap, .pg-bar .lb, .pg-tl, .pg-zl { fill: var(--soft, #666) !important; font-weight: 600 !important; }
.pg-path { stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; opacity: .8; }
.pg-path.p0 { stroke: #2563eb; } .pg-path.p1 { stroke: #db2777; } .pg-path.p2 { stroke: #059669; } .pg-path.p3 { stroke: #d97706; } .pg-path.p4 { stroke: #7c3aed; } .pg-path.p5 { stroke: #0891b2; }
.pg-bar .hit { fill: transparent; } .pg-bar .b { fill: var(--acc, #2e6b45); } .pg-bar.hi .b { fill: #e0a100; } .pg-bar:focus-visible .hit { stroke: var(--gold, #b07a12); stroke-width: 2.5; }
.pg-exp { stroke: #d99a00; stroke-width: 3.5; stroke-dasharray: 7 4; } .pg-curve { stroke: #d6336c; stroke-width: 3.5; stroke-linejoin: round; }
.pg-mark line { stroke: #0d9488; stroke-width: 2.5; stroke-dasharray: 6 4; } .pg-mark text { fill: #0d9488; } .pg-mark circle { fill: #0d9488; } .pg-mark.z line { stroke: var(--bad, #b5402a); stroke-dasharray: none; } .pg-mark.z circle { fill: var(--bad, #b5402a); }
.pg-sdbar { stroke: #0d9488; stroke-width: 3; }
.pg-bellline { stroke: var(--acc, #2e6b45); stroke-width: 3.2; } .pg-axis, .pg-tick { stroke: var(--soft, #666); stroke-width: 1.6; }
.pg-shade { fill: color-mix(in srgb, var(--acc, #2e6b45) 38%, transparent); }
.pg-st { paint-order: stroke; stroke: var(--card, #fff); stroke-width: 2.5px; stroke-linejoin: round; }
.pg-strip { stroke: var(--card, #fff); stroke-width: 1.2; fill: color-mix(in srgb, var(--acc, #2e6b45) 16%, var(--card, #fff)); } .pg-strip.s1 { fill: color-mix(in srgb, var(--acc, #2e6b45) 11%, var(--card, #fff)); } .pg-strip.s2 { fill: color-mix(in srgb, var(--acc, #2e6b45) 7%, var(--card, #fff)); } .pg-strip.s3, .pg-strip.s4, .pg-strip.s5 { fill: color-mix(in srgb, var(--acc, #2e6b45) 4%, var(--card, #fff)); }
.pg-dot { fill: var(--acc, #2e6b45); } .pg-sq { fill: color-mix(in srgb, #e0a100 35%, transparent); stroke: #b07a12; stroke-width: 1.6; } .pg-dev { stroke: #d6336c; stroke-width: 3; }
.pg-devt { fill: #d6336c !important; }

/* ---- הלוח החי ---- */
.pg-live { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; height: 100%; }
.pg-livebox { flex: 1 1 auto; min-height: 0; height: 62vh; }
.pg-livesvg { display: block; width: 100%; height: 100%; }
.pg-liveinfo { font-size: 15.5px; text-align: center; min-height: 1.5em; } .pg-livebar { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lv-pegdot { fill: var(--soft, #777); } .lv-peg.num circle { fill: var(--card, #fff); stroke: var(--acc, #2e6b45); stroke-width: 2; }
.lv-slot { fill: var(--card2, #f3efe4); opacity: .55; } .lv-floor { stroke: var(--soft, #666); stroke-width: 2; }
.lv-bar { fill: var(--acc, #2e6b45); } .lv-top { paint-order: stroke; stroke: var(--card, #fff); stroke-width: 3.5px; stroke-linejoin: round; }
.lv-lab, .lv-pc { fill: var(--soft, #666) !important; font-weight: 600 !important; } .lv-pc { fill: var(--acc, #2e6b45) !important; font-weight: 700 !important; }
.lv-exp { stroke: #d99a00; stroke-width: 3.5; stroke-linecap: round; } .lv-curve { stroke: #d6336c; stroke-width: 3; stroke-linejoin: round; }
.lv-mean { stroke: #0d9488; stroke-width: 2.5; stroke-dasharray: 6 4; } .lv-sd { stroke: #0d9488; stroke-width: 3; }
.lv-ball { fill: #f59e0b; stroke: #7c4a03; stroke-width: 1.2; }

/* ---- ההדגמה החיה ---- */
.pg-demo { display: grid; gap: 12px; grid-template-columns: 270px minmax(0, 1fr); align-items: start; }
.pg-ctl { display: grid; gap: 10px; align-content: start; background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 18px; padding: 10px 12px; min-width: 0; }
.pg-drops { display: flex; gap: 6px; flex-wrap: wrap; } .pg-drops .pbtn { padding: 4px 11px; flex: 1 1 auto; }
.pg-checks { display: grid; gap: 2px; } .pg-note { margin: 0; font-size: 14.5px; color: var(--soft, #555); line-height: 1.5; }
.pg-panes { display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr); grid-template-rows: minmax(0, 1fr); min-height: 0; }
.pg-ptabs { display: none; }
.pg-pane { background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 18px; padding: 8px 10px; min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.pg-tripanel { display: flex; flex-direction: column; gap: 6px; min-height: 0; height: 100%; }
.pg-chips { display: flex; gap: 5px; flex-wrap: wrap; } .pg-tribox { flex: 1 1 auto; min-height: 0; } .pg-tribox svg { display: block; width: 100%; height: 100%; }
.pg-cap2 { margin: 0; font-size: 15px; min-height: 3em; line-height: 1.45; }

/* ---- תרגול ---- */
.pg-games { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.pg-gcard { background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 18px; padding: 10px 12px; display: grid; gap: 6px; align-content: start; }
.pg-gcard .e { font-size: 30px; line-height: 1; } .pg-gcard h4 { margin: 0; font-size: 18px; } .pg-gcard .lv { display: flex; gap: 6px; flex-wrap: wrap; } .pg-gcard .lv .pbtn { flex: 1 1 auto; padding: 4px 10px; font-size: 15px; }
.pg-back { margin-bottom: 8px; min-height: 38px; }
.pg-run { display: grid; gap: 8px; } .pg-lights { min-height: 34px; }
.pg-card { display: grid; gap: 14px; grid-template-columns: minmax(300px, 440px) minmax(0, 1fr); align-items: start; }
.pg-cq { display: grid; gap: 10px; align-content: start; background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 18px; padding: 12px 14px; min-width: 0; }
.pg-cq .pg-q { margin: 0; font-size: 19px; line-height: 1.5; }
.pg-view { background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 18px; padding: 8px 10px; min-width: 0; } .pg-view:empty { display: none; }
.pg-ins { display: flex; gap: 10px 16px; flex-wrap: wrap; align-items: end; } .pg-ins label { display: grid; gap: 2px; font-weight: 700; font-size: 15px; }
.pg-in { display: inline-flex; align-items: center; gap: 4px; font-size: 22px; font-weight: 700; }
.pg-card input { font: inherit; font-family: "Rubik", system-ui, sans-serif; font-size: 24px; font-weight: 700; width: 7.2ch; min-height: 52px; text-align: center; direction: ltr; border: 2.5px solid var(--line, #bbb); border-radius: 12px; background: var(--card, #fff); color: var(--ink, #222); }
.pg-card input:focus { outline: 3px solid var(--gold, #b07a12); outline-offset: 1px; } .pg-card input.ok { border-color: var(--ok, #1e7a46); background: var(--okbg, #e8f5ec); } .pg-card input.no { border-color: var(--bad, #b5402a); }
.pg-fracin { display: inline-grid; grid-template-columns: auto auto; align-items: center; gap: 5px 10px; justify-self: start; }
.pg-fracin i { grid-column: 2; display: block; width: 100%; height: 3px; background: var(--ink, #222); border-radius: 2px; } .pg-fracin span { font-size: 14.5px; font-weight: 600; color: var(--soft, #555); }
.pg-cbar { display: flex; gap: 8px; flex-wrap: wrap; } .pg-sim { margin-top: 6px; font-weight: 700; }
.pg-data { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; padding: 14px 4px; } .pg-data span { font-family: "Rubik", system-ui, sans-serif; font-weight: 700; font-size: 26px; min-width: 2.1em; text-align: center; padding: 6px 8px; border-radius: 12px; background: var(--card2, #f3efe4); border: 2px solid var(--line, #ccc); }
.pg-end, .pg-gintro { background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 20px; padding: 18px; text-align: center; display: grid; gap: 8px; justify-items: center; max-width: 720px; margin: 0 auto; }
.pg-end h3, .pg-gintro h3 { margin: 0; font-size: 1.5rem; } .pg-end p, .pg-gintro p { margin: 0; } .pg-medal { font-size: 54px; line-height: 1; } .pg-best { font-weight: 700; }
.pg-sort { background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 20px; padding: 14px 16px; display: grid; gap: 10px; max-width: 860px; margin: 0 auto; }
.pg-count { color: var(--soft, #666); font-size: 15px; } .pg-claim { font-size: clamp(1.25rem, 2.6vw, 1.7rem); font-weight: 700; line-height: 1.45; padding: 10px 0; }
.pg-glabel { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; } .pg-glabel .ts-label { margin: 0; } .pg-new { font-weight: 700; color: var(--gold, #8a5f12); font-size: 15px; }

/* ---- אייפד לאורך וטלפון: עמודה אחת, העיקר ראשון ---- */
@media (max-width: 1099px) {
  .pg-lesson { display: flex; flex-direction: column; align-items: stretch; gap: 10px; } .pg-ltext { display: contents; }
  .pg-ltext > .ts-label { order: 1; align-self: flex-start; margin: 0; } .pg-ltext > h3 { order: 1; } .pg-ltext > .pg-intro { order: 1; } .pg-ltext > .pg-do { order: 1; } .pg-ltext > .pg-teach { order: 1; }
  .pg-lwidget { order: 2; } .pg-ltext > .pg-more { order: 3; } .pg-ltext > .pg-skip { order: 3; align-self: flex-start; }
  .pg-wbox svg, .pg-view svg { max-height: var(--wh, 56vh); }
  .pg-card { display: flex; flex-direction: column; align-items: stretch; gap: 10px; } .pg-cq { display: contents; }
  .pg-cq > .pg-q { order: 1; background: var(--card, #fff); border: 2px solid var(--line, #ccc); border-radius: 16px; padding: 10px 12px; } .pg-view { order: 2; } .pg-cq > .pg-ins, .pg-cq > .pg-fracin { order: 3; } .pg-cq > .pg-cbar { order: 4; } .pg-cq > .pg-fb { order: 5; margin: 0; }
  .pg-demo { grid-template-columns: minmax(0, 1fr); } .pg-ctl { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pg-ctl > .ts-label { grid-column: 1 / -1; justify-self: start; margin: 0; } .pg-note { grid-column: 1 / -1; }
}
@media (min-width: 768px) and (max-width: 1099px) { .pg-more { grid-template-columns: 1fr 1fr; align-items: start; } .pg-more > .pg-ident, .pg-more > .pg-after { grid-column: 1 / -1; } .pg-more > .pg-rule:only-of-type { grid-column: 1 / -1; } }
@media (max-width: 767px) {
  .pbtn { font-size: 15.5px; padding: 6px 12px; } .pg-tab { font-size: 14.5px; padding: 4px 10px; flex: 1 1 auto; } .pg-head { gap: 6px 8px; margin-bottom: 8px; }
  .pg-stop { min-width: 74px; padding: 4px 6px; } .pg-stop .e { font-size: 18px; } .pg-stop .t { font-size: 12.5px; }
  .pg-intro, .pg-rule, .pg-wmsg { font-size: 16px; } .pg-lwidget { padding: 8px; border-radius: 16px; }
  .pg-wbox svg, .pg-view svg { max-height: 60vh; } .pg-lead { font-size: 14.5px; margin-bottom: 6px; }
  .pg-demo { display: flex; flex-direction: column; gap: 8px; } .pg-ctl { display: contents; } .pg-ctl > .ts-label { order: 1; } .pg-ctl > .pg-rng:first-of-type { order: 1; } .pg-ctl > .pg-drops { order: 2; } .pg-demo > .pg-panes { order: 3; } .pg-ctl > .pg-rng { order: 4; } .pg-ctl > .pg-checks { order: 4; } .pg-ctl > .pg-note { order: 5; }
  .pg-drops .pbtn { min-height: 40px; padding: 2px 8px; }
  .pg-panes { display: block; } .pg-ptabs { display: flex; gap: 6px; margin-bottom: 6px; } .pg-ptabs .pchip { flex: 1; }
  .pg-panes[data-show=board] .pg-pane.tri, .pg-panes[data-show=tri] .pg-pane.board { display: none; }
  .pg-livebox { height: 58vh; } .pg-tribox svg { height: auto; max-height: 60vh; } .pg-tripanel, .pg-live { height: auto; }
  .pg-games { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .pg-gcard { padding: 8px; } .pg-gcard h4 { font-size: 16px; } .pg-gcard .e { font-size: 24px; }
  .pg-card input { font-size: 22px; min-height: 48px; }
}
@media (prefers-reduced-motion: no-preference) { .pg-c.new polygon { animation: pgpop .35s ease-out; } @keyframes pgpop { 0% { transform: scale(.6); } 100% { transform: none; } } .pg-c.new polygon { transform-box: fill-box; transform-origin: center; } }
