/* Two clear entrances, then a short visual route through the classroom. */
#welcome-dialog.studio-dialog{width:min(740px,calc(100vw - 28px));max-width:740px;padding:clamp(22px,4vw,36px);background:#fffdfd;color:#493754}
#welcome-dialog .welcome-intro{display:grid;grid-template-columns:minmax(0,1fr) 180px;gap:10px;align-items:center}
#welcome-dialog .eyebrow{font-size:10px;color:#8b6ba0;letter-spacing:.13em}
#welcome-dialog h2{font-size:clamp(27px,3.6vw,36px);line-height:1.4;letter-spacing:.02em;color:#513a65;margin:14px 0 12px}
#welcome-dialog .welcome-intro p{font-size:14px;color:#806c8c;line-height:1.8;margin:0}
.welcome-geometry svg{display:block;width:100%;height:auto}
#welcome-dialog .welcome-choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:28px 0 16px}
.welcome-choice{display:flex;flex-direction:column;align-items:stretch;justify-content:space-between;gap:16px;min-width:0;min-height:180px;padding:22px;border:2px solid #9d80b8;border-radius:18px;text-align:left;font-family:inherit;cursor:pointer;box-shadow:0 5px 0 #70508512;transition:transform .18s,box-shadow .18s,background .18s}
.welcome-choice-new{background:#78549b;color:#fff;border-color:#78549b}
.welcome-choice-return{background:#edf5f0;color:#375f51;border-color:#b0cdbf}
.welcome-choice-top{display:flex;align-items:center;gap:10px;font-size:20px}
.welcome-choice-top small{flex:1;font-size:9px;font-weight:600;letter-spacing:.09em;line-height:1.6}
.welcome-choice-symbol{display:grid;place-items:center;width:30px;height:30px;border:1px solid currentColor;border-radius:50%;font-size:18px;opacity:.85}
.welcome-choice-return .welcome-choice-symbol{border-radius:8px}
.welcome-choice strong{font-size:25px;line-height:1.35;letter-spacing:.04em}
.welcome-choice-caption{display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:13px;line-height:1.8}
.welcome-choice-caption b{font-size:22px;font-weight:400}
.welcome-choice:hover{transform:translateY(-3px);box-shadow:0 10px 24px #62427720}
.welcome-choice-new:hover{background:#684589}
.welcome-choice-return:hover{background:#e2efe7}
.welcome-choice:focus-visible{outline:3px solid #c3a350;outline-offset:4px}
#welcome-dialog>small{font-size:11px;line-height:1.9;color:#8c7997}
#help-dialog.studio-dialog{max-width:1060px;width:min(1060px,calc(100vw - 28px));background:#fcfafc;color:#523e63}
#help-dialog .studio-dialog-head h2{font-size:clamp(25px,3.3vw,33px);line-height:1.5;margin:10px 0;color:#50365f}
#help-dialog .studio-dialog-head p{font-size:14px;color:#7b6688;line-height:1.8;margin-bottom:10px}
#help-dialog .eyebrow{font-size:10px;color:#9171a6;letter-spacing:.1em}
#help-dialog .help-route{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:15px 18px;margin:20px 0 24px;border:1px solid #e4d6ee;border-radius:14px;background:#f1eaf7}
.help-route button{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;flex:1;background:transparent;border:0;border-radius:8px;color:#684c7c;font-family:inherit;font-size:13px;white-space:nowrap;cursor:pointer}
.help-route button>span{font-size:23px;line-height:1;color:#9c78b6}
.help-route button b{font-size:10px;font-weight:500;color:#8d6d9e}
.help-route button:hover{background:#fff9}
.help-route button:focus-visible{outline:2px solid #9672b2;outline-offset:2px}
.help-route-arrow{color:#b499c7;font-size:17px}
#help-dialog .help-steps,#help-dialog .help-extras{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px;margin:20px 0}
#help-dialog .help-card{position:relative;min-width:0;padding:24px 25px 23px;border:1px solid #e4d6ee;border-radius:18px;background:#fff;scroll-margin-top:18px;overflow-wrap:anywhere}
#help-dialog .help-card:focus{outline:2px solid #b393ca;outline-offset:3px}
.help-card-top{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:92px}
.help-step-number{font-family:ui-monospace,Consolas,monospace;font-size:39px;font-weight:500;line-height:1.2;color:#a88ac2;letter-spacing:-.06em}
.help-step-number small{display:block;font-family:inherit;font-size:9px;color:#8f729f;letter-spacing:.14em;margin:8px 0 0 3px}
.help-visual{width:150px;max-width:52%;flex-shrink:0}
.help-visual svg{display:block;width:100%;height:auto;transition:transform .25s}
.help-card:hover .help-visual svg{transform:translateY(-3px) rotate(2deg)}
#help-dialog .help-card h3{font-size:19px;line-height:1.65;color:#563b68;margin:12px 0 10px;font-weight:650}
#help-dialog .help-card p{font-size:14px;line-height:1.95;color:#7c6689;margin:0}
#help-dialog .help-card p strong{font-weight:650;color:#614675}
#help-dialog mark{background:#eee3f7;color:#65467e;font-weight:600;padding:1px 3px;box-decoration-break:clone;-webkit-box-decoration-break:clone;border-radius:3px}
.help-keyline{display:flex;align-items:center;gap:7px;flex-wrap:wrap;margin:15px 0 0}
.help-keyline>span{display:inline-block;font-size:11px;line-height:1.6;padding:5px 9px;border-radius:6px;background:#f3eef8;color:#816393}
.help-keyline>b{font-size:11px;line-height:1.8;font-weight:500;color:#82708d}
#help-dialog .help-card .help-small-note{font-size:12px;line-height:1.9;color:#7d6889;margin-top:13px}
.help-math-keys{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-top:15px}
.help-math-keys>span{display:grid;place-items:center;min-width:38px;min-height:35px;border:1px solid #dccbe9;border-bottom-width:3px;border-radius:7px;background:#faf6fd;color:#805b9c;font-family:ui-serif,Georgia,serif;font-size:17px}
.help-math-keys>small{font-size:11px;color:#8a7498;line-height:1.8}
#help-dialog .help-details{margin-top:15px;border-top:1px solid #eee4f3;padding-top:6px;font-size:12px;color:#7c648a}
#help-dialog .help-details summary{font-size:12px;line-height:1.8;font-weight:600;color:#856296;cursor:pointer;padding:10px 0;min-height:42px}
#help-dialog .help-details p,#help-dialog .help-details li{font-size:12px;line-height:2;color:#796385}
#help-dialog .help-details ul{margin:0 0 4px;padding-left:19px}
#help-dialog .help-details li{margin:6px 0}
#help-dialog .help-section-heading{position:relative;padding:20px 0 0;margin-top:10px}
.help-mini-shapes{font-size:22px;letter-spacing:.25em;float:right;color:#b5a0c5}
#help-dialog .help-section-heading h3{font-size:20px;line-height:1.65;margin:0 0 7px;color:#624a75}
#help-dialog .help-section-heading p{font-size:13px;line-height:1.8;margin:0;color:#8b7698}
#help-dialog .help-extras .help-card{background:#faf7fc}
#help-dialog .help-tip{display:flex;align-items:flex-start;gap:15px;padding:22px;background:#edf3ee;border:1px solid #dbe6dd;border-radius:14px;margin:25px 0 10px;color:#52705d}
.help-tip-symbol{font-size:30px;line-height:1.3;color:#8aa491;flex-shrink:0}
#help-dialog .help-tip strong{font-size:15px;color:#54725d}
#help-dialog .help-tip p{font-size:12px;line-height:1.9;margin:7px 0 0;color:#77917e}
#help-dialog .dialog-footer{gap:12px;flex-wrap:wrap;margin-top:22px}
#help-dialog .dialog-footer .button{min-height:46px;font-size:13px}
@media(max-width:650px){
 #welcome-dialog.studio-dialog{padding:23px;max-height:calc(100dvh - 24px)}
 #welcome-dialog .welcome-intro{grid-template-columns:minmax(0,1fr) 110px;gap:2px}
 #welcome-dialog h2{font-size:27px;margin-top:10px}
 #welcome-dialog .welcome-intro p{font-size:13px}
 #welcome-dialog .welcome-choices{grid-template-columns:minmax(0,1fr);gap:13px;margin-top:22px}
 .welcome-choice{min-height:126px;gap:9px;padding:16px 19px;border-radius:14px}
 .welcome-choice strong{font-size:23px}
 .welcome-choice-symbol{width:25px;height:25px;font-size:16px}
 .welcome-choice-top{gap:9px;font-size:17px}
 .welcome-choice-top small{font-size:8px}
 .welcome-choice-caption{font-size:12px}
 #welcome-dialog>small{font-size:10px}
 #help-dialog.studio-dialog{padding:22px 18px}
 #help-dialog .eyebrow{font-size:8px;letter-spacing:.06em}
 #help-dialog .help-route{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:9px;margin-top:16px}
 .help-route-arrow{display:none}
 .help-route button{justify-content:flex-start;padding-left:12px;background:#fff8;min-height:44px;font-size:12px}
 #help-dialog .help-steps,#help-dialog .help-extras{grid-template-columns:minmax(0,1fr);gap:15px}
 #help-dialog .help-card{padding:20px}
 .help-card-top{min-height:70px}
 .help-visual{width:127px}
 .help-step-number{font-size:35px}
 #help-dialog .help-card h3{font-size:19px;margin-top:6px}
 #help-dialog .help-card p{font-size:14px}
 #help-dialog .help-section-heading h3{font-size:18px;max-width:75%}
 .help-mini-shapes{font-size:17px}
 #help-dialog .help-tip{padding:18px;gap:10px}
 #help-dialog .dialog-footer .button{flex:1 1 170px}
}
@media(max-width:380px){#welcome-dialog .welcome-intro{grid-template-columns:minmax(0,1fr) 76px}#welcome-dialog h2{font-size:25px}.welcome-choice{min-height:120px}}
@media(orientation:landscape) and (max-height:600px){
 #welcome-dialog.studio-dialog{width:min(800px,calc(100vw - 24px));padding:20px 26px;max-height:calc(100dvh - 16px)}
 #welcome-dialog .welcome-intro{grid-template-columns:minmax(0,1fr) 140px}
 #welcome-dialog h2{font-size:25px;margin:7px 0;line-height:1.25}
 #welcome-dialog h2 br{display:none}
 #welcome-dialog .welcome-choices{grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:15px 0 8px}
 .welcome-choice{min-height:126px;padding:14px 18px;gap:8px}
 .welcome-choice strong{font-size:22px}
}
@media(prefers-reduced-motion:reduce){.welcome-choice,.help-visual svg{transition:none}.welcome-choice:hover,.help-card:hover .help-visual svg{transform:none}}
