/* Pars Skin Relationship Toolkit — stages 8–10. All rules scoped to .psx-root. */
.psx-root {box-sizing:border-box;direction:rtl;font-family:inherit;color:#25223b;max-width:1120px;margin:0 auto 32px;padding:0 8px;line-height:2.02;overflow-wrap:anywhere}
.psx-root *,.psx-root *:before,.psx-root *:after{box-sizing:border-box}
.psx-root h2,.psx-root h3,.psx-root h4{line-height:1.65;margin:0 0 12px;color:#292044}
.psx-root h2{font-size:clamp(1.35rem,2.8vw,1.95rem)}.psx-root h3{font-size:1.22rem}.psx-root h4{font-size:1.04rem}
.psx-root p{margin:0 0 16px}.psx-root a{color:#743e89;text-decoration:none}.psx-root a:hover{text-decoration:underline}
.psx-root button,.psx-root input,.psx-root select{font-family:inherit;font-size:inherit;max-width:100%}
.psx-root :is(button,a,input,select):focus-visible{outline:3px solid #d68da3;outline-offset:3px}
.psx-hero{border:1px solid #e7d5ec;border-radius:23px;background:radial-gradient(ellipse at 80% 20%,#47305b 0%,#2a1b47 65%,#1e1738 100%);color:#ffecf2;padding:28px;display:grid;grid-template-columns:minmax(0,1fr) minmax(0,.9fr);gap:24px;align-items:center;overflow:hidden;box-shadow:0 9px 31px #5f398221;margin:16px 0 21px}
.psx-hero h2{color:#ffe7b9;font-size:clamp(1.7rem,3.4vw,2.55rem);line-height:1.55;margin:8px 0 12px}.psx-hero p{color:#f5e4f4;line-height:2.1;font-size:1.03rem}
.psx-hero img{width:100%;height:auto;aspect-ratio:16/10;object-fit:cover;border-radius:16px;border:1px solid #bc8796;box-shadow:0 5px 25px #0a02166b}
.psx-kicker{display:inline-block;color:#9560a1;font-weight:750;font-size:.9rem;letter-spacing:.02em}
.psx-hero .psx-kicker{color:#ffdcac}.psx-hero-links{display:flex;gap:10px;flex-wrap:wrap;margin:18px 0 2px}
.psx-btn,.psx-root .psx-btn{cursor:pointer;border:1px solid #7d498e;background:linear-gradient(115deg,#9b4c8f,#69317d);color:white;border-radius:12px;font-weight:700;padding:9px 17px;display:inline-flex;align-items:center;justify-content:center;text-align:center;line-height:1.6;min-height:43px;text-decoration:none;transition:transform .15s,box-shadow .15s;box-shadow:0 4px 9px #67347723}
.psx-btn:hover{transform:translateY(-1px);text-decoration:none!important;box-shadow:0 7px 18px #67347739}
.psx-root .psx-btn.psx-ghost{background:#fff9ff;color:#673677;border-color:#d2a9d9}.psx-hero .psx-btn.psx-ghost{background:#ffffff12;color:#f8e6ff;border-color:#b78dad}
.psx-root .psx-btn.psx-danger{background:#fff6f5;color:#9d3943;border-color:#e6b7b5}
.psx-note{background:#fbf3fe;border-right:5px solid #a86abd;border-radius:13px;padding:15px 20px;margin-bottom:22px;font-size:.94rem;color:#51405b}
.psx-panel{margin:22px 0;border:1px solid #ecdfef;border-radius:19px;background:linear-gradient(145deg,#fff,#fffafd);padding:clamp(16px,3.5vw,30px);box-shadow:0 8px 27px #4e25670a}
.psx-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 16px;margin:21px 0 10px}
.psx-root label{font-weight:650}.psx-form label,.psx-card-controls label,.psx-game-bar label{display:flex;flex-direction:column;gap:6px;font-size:.95rem}
.psx-root :is(select,input[type="text"],input:not([type])){background:#fff;border:1px solid #d6bedf;border-radius:11px;min-height:44px;padding:9px 12px;color:#332442;width:100%;box-shadow:inset 0 1px 2px #0000000a}
.psx-root select{min-width:0}.psx-root .psx-form .psx-btn{align-self:end}
.psx-warning{background:#fff3ef;border-right:4px solid #c36d54;padding:15px;border-radius:10px;color:#884026}
.psx-results{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:13px;margin:22px 0}
.psx-stat{padding:17px 12px;background:linear-gradient(155deg,#fdf5ff,#f8edf3);border:1px solid #e8cfe9;border-radius:15px;text-align:center;display:flex;align-items:center;flex-direction:column;justify-content:center;min-height:120px;gap:2px}
.psx-stat small{font-size:.84rem;color:#705b79}.psx-stat strong{font-size:clamp(1.65rem,4vw,2.6rem);line-height:1.55;color:#9b437f;font-variant-numeric:tabular-nums}.psx-stat span{font-size:.87rem;color:#645568}
.psx-answer{border:1px dashed #dba0c6;padding:12px 16px;border-radius:12px;background:#fff8fb}
.psx-milestones{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin:15px 0 25px}
.psx-milestones>div{display:flex;gap:4px;flex-direction:column;background:#f9f4fc;border-radius:12px;padding:11px;border:1px solid #e3d4e8}.psx-milestones strong{color:#743d88}.psx-milestones span,.psx-milestones small{color:#5e5264;font-size:.84rem}
.psx-cardstudio{padding:17px;border:1px solid #ead7ec;border-radius:14px;background:#fff;margin-top:20px}.psx-studio-grid{display:grid;grid-template-columns:minmax(0,.92fr) minmax(0,1fr);gap:22px;align-items:start}
.psx-preview{padding:15px;border-radius:15px;background:#261b41;display:flex;justify-content:center;align-items:center;min-height:285px}
.psx-preview canvas{display:block;max-height:580px;max-width:100%;width:auto;height:auto;object-fit:contain;border-radius:7px;box-shadow:0 3px 18px #0008}
.psx-card-controls{display:grid;gap:11px}.psx-card-controls .psx-check{display:flex;flex-direction:row;align-items:center;gap:10px}.psx-card-controls .psx-check input{width:18px;height:18px;accent-color:#8d4c96}
.psx-muted{font-size:.87rem;color:#66566e;line-height:1.8}
.psx-reading h2:not(:first-child){margin-top:25px}.psx-reading h3{margin-top:23px}.psx-reading h4{margin:19px 0 7px;color:#763d7a}.psx-reading p{line-height:2.28;text-align:justify}.psx-reading details{background:#faf6fd;border:1px solid #eadcee;margin:10px 0;border-radius:11px;padding:8px 14px}.psx-reading summary{cursor:pointer;font-weight:700;color:#5c346e}.psx-reading details p{margin:8px 0}
.psx-question-index{padding-right:27px;line-height:2.14;margin:10px 0}.psx-question-index li{padding:3px 0}.psx-question-index small{color:#74637a}
.psx-related{padding:20px;border:1px solid #e8d9ef;border-radius:18px;background:#fbf5ff;margin-top:24px}.psx-related>div{display:flex;gap:10px;flex-wrap:wrap}.psx-related a{border:1px solid #d4bade;border-radius:9px;padding:5px 12px;background:white;font-weight:650}
/* stage 9 */
.psx-quiz-tabs{display:flex;gap:9px;flex-wrap:wrap;margin:18px 0}.psx-quiz-tabs button{border:1px solid #dbc2e4;background:white;color:#664477;border-radius:9px;padding:9px 17px;cursor:pointer}.psx-quiz-tabs button.active{background:#713d83;color:white}
.psx-quiz-top{border:1px solid #ead9ed;background:#fbf6fd;padding:13px;border-radius:12px;margin-bottom:18px}.psx-quiz-top>div:first-child{display:flex;gap:15px;align-items:center;justify-content:space-between;flex-wrap:wrap}.psx-quiz-top span{color:#756182;font-size:.9rem}.psx-progress{height:9px;background:#ebdcef;border-radius:20px;margin-top:10px;overflow:hidden;direction:ltr}.psx-progress span{display:block;height:100%;border-radius:20px;background:#b05a93;transition:width .2s}
.psx-quiz-group{margin:19px 0;border:1px solid #e5d7ea;background:#fefbff;border-radius:14px;padding:16px}.psx-quiz-group h3{color:#844c8c}.psx-question{border:0;border-bottom:1px solid #f0e6f1;padding:15px 0;margin:0;min-width:0}.psx-question:last-child{border:0}.psx-question legend{display:block;font-weight:730;color:#372748;float:right;width:100%;margin-bottom:7px;padding:0;line-height:2}
.psx-answers{display:flex;flex-wrap:wrap;gap:7px;clear:both}.psx-answer{cursor:pointer;display:flex;align-items:center;gap:5px;border:1px solid #e7d6e8;padding:6px 9px;border-radius:9px;font-size:.79rem;background:white;font-weight:500}.psx-answer:has(input:checked){background:#ede1f3;border-color:#a76fb2;color:#642574}
.psx-answer input{accent-color:#7d3d8e}.psx-skip{background:transparent;color:#855b91;border:1px dashed #d9bfdf;border-radius:8px;cursor:pointer;padding:6px 10px;font-size:.81rem}
.psx-quiz-actions,.psx-game-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:20px 0}.psx-import{display:inline-flex;align-items:center;border:1px solid #d4bade;color:#653478;border-radius:11px;padding:7px 14px;cursor:pointer;min-height:43px;background:white}.psx-import input{display:none}
.psx-compare-group{padding:14px;margin:15px 0;border:1px solid #e8dbec;border-radius:13px}.psx-compare-row{margin:9px 0;padding:11px;background:#fcf9fd;border-right:3px solid #d2a0d8;border-radius:7px;display:grid;gap:2px}.psx-compare-row small{color:#675970}.psx-compare-row p{margin:0;color:#784568}
/* stage 10 */
.psx-game-bar{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:18px 0}
.psx-game-card{color:#fff4ef;text-align:center;min-height:390px;border-radius:22px;border:2px solid #bfa06d;padding:22px;background:radial-gradient(ellipse at 50% 35%,#873e80 0%,#42245b 57%,#221940 100%);box-shadow:0 7px 29px #4130652b;display:flex;flex-direction:column;justify-content:space-between;gap:8px}
.psx-game-top{display:flex;justify-content:space-between;gap:10px;color:#f1d4b6;font-size:.88rem}.psx-game-heart{font-size:5rem;line-height:1;color:#f8c58b;text-shadow:0 0 22px #ff9ad3}.psx-game-card h3{font-size:clamp(1.22rem,3.2vw,1.75rem);line-height:1.85;color:#fff8ef;max-width:660px;margin:0 auto}.psx-game-card p{font-size:1rem;max-width:680px;margin:0 auto;background:#ffffff18;border-radius:12px;padding:7px 13px;color:#ffead7}.psx-game-turn{font-size:.92rem;color:#eec5e8}.psx-game-actions .psx-btn{flex:1 1 140px}
@media(max-width:760px){.psx-hero{grid-template-columns:1fr;padding:20px;gap:13px}.psx-hero img{aspect-ratio:16/9}.psx-form{grid-template-columns:1fr 1fr}.psx-milestones{grid-template-columns:repeat(2,minmax(0,1fr))}.psx-studio-grid{grid-template-columns:1fr}.psx-preview canvas{max-height:420px}.psx-root{padding:0 4px}.psx-answers{gap:5px}.psx-answer{font-size:.77rem}.psx-game-card{min-height:370px}}
@media(max-width:470px){.psx-panel{padding:14px}.psx-form{grid-template-columns:1fr 1fr;gap:9px}.psx-form .psx-btn{grid-column:1/-1}.psx-form label{font-size:.85rem}.psx-results{gap:7px}.psx-stat{padding:9px 5px;min-height:100px}.psx-stat small,.psx-stat span{font-size:.73rem}.psx-stat strong{font-size:1.55rem}.psx-milestones{grid-template-columns:1fr 1fr}.psx-game-bar{grid-template-columns:1fr}.psx-game-card{padding:12px}.psx-quiz-top>div:first-child{display:block}.psx-quiz-tabs button{flex:1}.psx-quiz-actions .psx-btn,.psx-quiz-actions .psx-import{width:100%;justify-content:center}}
@media(prefers-reduced-motion:reduce){.psx-btn{transition:none}.psx-progress span{transition:none}}

.psx-home-promo{border:1px solid #e5d8eb;background:linear-gradient(135deg,#fffcff,#f6ecfa);border-radius:20px;padding:23px;margin:24px 0}.psx-promo-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:15px;margin:16px 0}.psx-promo-cards a{display:flex;flex-direction:column;gap:5px;background:white;border:1px solid #e9d7eb;border-radius:13px;padding:9px;color:#382c44!important}.psx-promo-cards img{width:100%;height:auto;aspect-ratio:16/9;object-fit:cover;border-radius:9px}.psx-promo-cards strong{font-size:1rem}.psx-promo-cards small{color:#7b6683}@media(max-width:650px){.psx-promo-cards{grid-template-columns:1fr}}
