#math-shorts-popup { position: fixed; inset: 0; width: 100vw; max-width: none; height: 100dvh; max-height: none; padding: 0; margin: 0; border: 0; color: #f5f7ff; background: #090d1b; overflow: hidden; }
#math-shorts-popup::backdrop { background: #090d1b; }
.shorts-app { height: 100%; display: flex; flex-direction: column; position: relative; isolation: isolate; background: radial-gradient(ellipse at 9% 20%, #34315c88, transparent 45%), radial-gradient(ellipse at 94% 65%, #12546a77, transparent 45%), linear-gradient(155deg,#18172e,#090d1b 55%,#14172c); }
.shorts-app::before { content: ''; position: absolute; inset: 0; pointer-events: none; z-index: -1; background: radial-gradient(circle at 75% 10%,#d76b791b,transparent 35%); }
.shorts-topbar { display: flex; align-items: center; gap: 18px; padding: 14px 28px 10px; flex-shrink: 0; border-bottom: 1px solid #ffffff0c; }
.shorts-home { width: 94px; height: 64px; border: 0; background: transparent; padding: 0; flex-shrink: 0; cursor: pointer; }
.shorts-home img { width: 100%; height: 100%; object-fit: contain; }
.shorts-title strong { font-size: 17px; font-weight: 800; letter-spacing: -.4px; display: block; }.shorts-title span { font-size: 11px; color: #a6abc4; }
.shorts-title { flex: 1; min-width: 0; }.shorts-title span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shorts-top-actions { display: flex; margin-left: auto; gap: 10px; }
.shorts-top-actions button { display: grid; place-items: center; width: 46px; height: 46px; font-size: 23px; color: white; border: 1px solid #ffffff28; border-radius: 50%; background: #ffffff0d; cursor: pointer; }
.shorts-top-actions button[aria-pressed=true] { color: #83e2df; border-color: #83e2df; background: #83e2df1a; }
.shorts-workspace { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0,1fr); gap: 20px; width: min(100%,1500px); margin: 0 auto; padding: 12px 28px; }
.shorts-workspace.notes-open { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
.shorts-viewport { min-width: 0; overflow: hidden; height: 100%; position: relative; }
.shorts-stack { height: 100%; will-change: transform; }
.shorts-stack.is-advancing { transform: translateY(-100%); transition: transform .19s cubic-bezier(.2,.7,.3,1); }
.shorts-slide { height: 100%; padding: 0 4px; }
.shorts-question-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #ffffff22 transparent; padding: 12px 12px 24px; width: min(900px,100%); margin: auto; }
.shorts-topic { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; font-size: 11px; color: #c5cbdf; }
.shorts-topic span:first-child { color: #91e3dc; border: 1px solid #91e3dc44; background: #91e3dc10; border-radius: 20px; padding: 5px 12px; }
.shorts-kicker { color: #9ba2c0; font-size: 11px; letter-spacing: .04em; }.shorts-read-question { display: block; background: none; border: 0; padding: 0; color: inherit; text-align: left; width: 100%; cursor: pointer; }
.shorts-read-question h2 { font-size: clamp(21px,2.2vw,28px); font-weight: 800; line-height: 1.5; white-space: pre-line; letter-spacing: -.6px; margin: 10px 0 18px; text-shadow: 0 2px 25px #0003; }
.shorts-visual { border-radius: 20px; background: #f1f7ff; overflow: hidden; margin: 8px 0 18px; color: #203f57; box-shadow: 0 12px 40px #0002; }.shorts-visual .stage-visual { width: 100%; max-height: 210px; display: block; margin: auto; padding: 16px; }.shorts-visual .problem-model { background: none; border: 0; margin: 0; }
.shorts-fields { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(160px,100%),1fr)); gap: 12px; }.shorts-fields label span { display: block; font-size: 12px; color: #aab4cf; margin-bottom: 8px; }.shorts-fields input { width: 100%; min-width: 0; min-height: 50px; font-size: 20px; color: #f5f7ff; background: #ffffff0d; border: 1px solid #ffffff28; border-radius: 13px; padding: 11px 14px; }.shorts-fields input:focus { outline: 2px solid #83e2df; outline-offset: 2px; }.shorts-fields input:disabled { opacity: .7; }
.shorts-submit { display: flex; justify-content: space-between; width: 100%; align-items: center; margin-top: 18px; min-height: 50px; padding: 12px 20px; border: 0; border-radius: 14px; background: linear-gradient(110deg,#a0e3dc,#8dbbe8); color: #11273a; font-weight: 800; cursor: pointer; box-shadow: 0 8px 30px #83e2df12; }.shorts-submit span { font-size: 20px; }
.shorts-feedback { padding: 16px 18px; border-radius: 16px; margin-top: 18px; font-size: 13px; line-height: 1.8; }.shorts-feedback strong { font-weight: 800; }.shorts-feedback.correct { background: #69ddc515; color: #99ebdb; border: 1px solid #69ddc53b; }.shorts-feedback.correct > span { display: block; color: #c2ded9; font-size: 12px; }.shorts-feedback p { margin: 4px 0 0; }.shorts-feedback.wrong { background: #d4768712; border: 1px solid #e7a2b03b; color: #f6dbe4; }.shorts-feedback-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }.shorts-wait { color: #f4c18e; font-weight: 800; }.shorts-feedback ol { padding-left: 19px; margin: 12px 0; }
.shorts-solution-answer { display: flex; flex-direction: column; gap: 6px; width: 100%; border: 1px solid #f6cfaa44; border-radius: 12px; padding: 12px; background: #f6cfaa0c; color: #f5dfc6; cursor: pointer; text-align: left; }.shorts-solution-answer:disabled { cursor: default; }.shorts-solution-answer small,.shorts-ack-label { font-size: 11px; color: #dcbba5; }
.shorts-bottom { padding: 4px 28px 18px 164px; flex-shrink: 0; }.shorts-status { min-height: 18px; margin: 0 0 5px; color: #c1c9e0; font-size: 11px; }.shorts-status.error { color: #f0adbb; }.shorts-session-progress { display: flex; justify-content: space-between; gap: 12px; color: #8d9ab9; font-size: 11px; margin: 0 0 10px; }
.shorts-bottom-actions { display: flex; justify-content: space-between; align-items: stretch; gap: 12px; }.shorts-bottom-actions button { min-height: 46px; border: 1px solid #ffffff23; border-radius: 14px; padding: 10px 16px; color: #c9d1e7; background: #ffffff09; font-size: 12px; font-weight: 700; cursor: pointer; }.shorts-bottom-actions button:disabled { opacity: .42; cursor: default; }.shorts-return:not(:disabled) { background: #9be5d7; border-color: #9be5d7; color: #163d43; }.shorts-return small { display: block; font-size: 10px; margin-top: 3px; }.shorts-next { display: flex; align-items: center; gap: 8px; }
#math-shorts-popup > #aiedue-rpg-hud { position: absolute !important; left: 12px !important; bottom: 12px !important; top: auto !important; right: auto !important; z-index: 40; }
.shorts-notebook { display: flex; flex-direction: column; min-width: 0; min-height: 0; border: 1px solid #d8e3ef; border-radius: 20px; overflow: hidden; background: #fffdf8; color: #334b60; }.shorts-notebook[hidden] { display: none; }.shorts-notebook header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; padding: 12px 14px; background: white; border-bottom: 1px solid #e1e9ed; font-size: 12px; }.shorts-notebook header div { display: flex; gap: 6px; }.shorts-notebook button { min-height: 34px; min-width: 34px; border: 1px solid #dde6ed; border-radius: 8px; background: white; color: #506d82; cursor: pointer; font-size: 12px; }.shorts-canvas { display: block; flex: 1; min-height: 0; width: 100%; height: 100%; touch-action: none; background-image: linear-gradient(#9eb2c21c 1px,transparent 1px),linear-gradient(90deg,#9eb2c21c 1px,transparent 1px); background-size: 24px 24px; }
.shorts-loading { height: 100%; display: grid; place-content: center; gap: 14px; text-align: center; padding: 30px; color: #b7c2da; }.shorts-loading button { border: 1px solid #83e2df66; padding: 12px; border-radius: 12px; color: #83e2df; background: none; }
.shorts-app button:focus-visible { outline: 2px solid #91e3dc; outline-offset: 4px; }
@media(max-width:767px) {
 .shorts-topbar { padding: 8px 14px; gap: 10px; }.shorts-home { width: 68px; height: 50px; }.shorts-title strong { font-size: 14px; }.shorts-title span { font-size: 9px; }.shorts-top-actions { gap: 6px; }.shorts-top-actions button { width: 38px; height: 38px; font-size: 19px; }
 .shorts-workspace { padding: 6px 10px; gap: 10px; }.shorts-workspace.notes-open { grid-template-columns: minmax(0,1fr); grid-template-rows: minmax(150px,1fr) minmax(170px,1fr); }.shorts-question-scroll { padding: 10px 8px 22px; }.shorts-topic { margin-bottom: 12px; font-size: 10px; }.shorts-read-question h2 { font-size: 21px; margin: 10px 0 18px; }.shorts-visual .stage-visual { max-height: 155px; padding: 12px; }.shorts-fields input { font-size: 18px; min-height: 46px; }.shorts-bottom { min-height: 143px; padding: 2px 14px 12px 152px; }.shorts-session-progress { flex-direction: column; gap: 3px; font-size: 10px; margin-bottom: 8px; }.shorts-bottom-actions { flex-direction: column; gap: 6px; }.shorts-bottom-actions button { padding: 8px 10px; font-size: 10px; min-height: 36px; }.shorts-next { justify-content: center; }.shorts-status { font-size: 10px; }.shorts-notebook { border-radius: 14px; }.shorts-notebook header { padding: 7px 10px; }
}
@media(prefers-reduced-motion:reduce) { .shorts-stack.is-advancing { transition: none; } }
@media print {
 html, body { background: white !important; }
 #main-container { height: auto !important; overflow: visible !important; }
 #math-shorts-section { display: none !important; }
 body:has(#math-shorts-popup[open]) #math-shorts-section { display: block !important; position: static !important; height: auto !important; background: white !important; }
 body:has(#math-shorts-popup[open]) #math-practice-section { display: none !important; }
 #math-shorts-popup { display: block !important; position: static !important; width: 100% !important; height: auto !important; overflow: visible !important; background: white !important; }
 #math-shorts-popup > :not(.shorts-app) { display: none !important; }
 .shorts-app,.shorts-app * { visibility: visible !important; }
 .shorts-app,.shorts-workspace,.shorts-viewport,.shorts-stack,.shorts-slide,.shorts-question-scroll { display: block !important; height: auto !important; width: 100% !important; padding: 0 !important; overflow: visible !important; background: white !important; color: #243448 !important; transform: none !important; }
 .shorts-topbar,.shorts-bottom,.shorts-notebook,.shorts-preview,.shorts-app::before,#math-shorts-popup > #aiedue-rpg-hud,.shorts-submit { display: none !important; }
 .shorts-read-question,.shorts-fields input,.shorts-fields label span,.shorts-kicker,.shorts-topic { color: #243448 !important; }.shorts-fields input { border-color: #aabccc; background: white; }.shorts-read-question h2 { font-size: 20px; text-shadow: none; }.shorts-visual { box-shadow: none; }.shorts-slide { break-after: auto; page-break-after: auto; }.shorts-feedback { color: #243448 !important; border-color: #aabccc !important; background: white !important; }.shorts-solution-answer,.shorts-ack-label { color: #243448 !important; }
}

.shorts-visual:empty { display: none; }
.shorts-fields:has(.shorts-choice-field) { grid-template-columns: minmax(0,1fr); gap: 20px; }
.shorts-choice-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.shorts-choice-field legend { padding: 0; margin-bottom: 10px; color: #d2dbef; font-size: 15px; font-weight: 700; }
.shorts-choice-group { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.shorts-choice { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 0; min-height: 62px; padding: 12px 14px; border: 2px solid #52647f; border-radius: 14px; background: #1b2940; color: #f5f7ff; text-align: left; font: inherit; font-size: 20px; line-height: 1.5; cursor: pointer; transition: border-color .12s,background .12s; }
.shorts-choice-number { display: grid; place-items: center; flex: 0 0 25px; height: 25px; border: 1px solid #8d9bb6; border-radius: 50%; color: #c0cce2; font-size: 13px; }
.shorts-choice-label { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.shorts-choice-check { flex-shrink: 0; visibility: hidden; font-size: 19px; font-weight: 800; }
.shorts-choice[aria-checked=true] { background: #21494d; border-color: #9be9db; color: #effffb; }
.shorts-choice[aria-checked=true] .shorts-choice-check { visibility: visible; color: #a7f4dc; }
.shorts-choice[aria-checked=true] .shorts-choice-number { background: #a7f4dc; color: #163c3d; border-color: #a7f4dc; }
.shorts-choice:disabled { cursor: default; }
@media(hover:hover) { .shorts-choice:not(:disabled):hover { border-color: #a8dcd9; background: #263b4f; }.shorts-choice[aria-checked=true]:not(:disabled):hover { background: #29585a; } }
.shorts-context { margin: 0; padding: 12px 16px; }
.shorts-context strong { display: block; color: #294c60; font-size: 16px; font-weight: 700; line-height: 1.5; }
.shorts-context-total { text-align: center; margin-bottom: 10px; }
.shorts-fruit-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.shorts-fruit { display: inline-block; width: 26px; height: 28px; flex: 0 0 26px; font-size: 25px; line-height: 28px; }
.shorts-context-plates { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.shorts-context-plates.four { grid-template-columns: repeat(4,minmax(0,1fr)); }
.shorts-context-plate { min-width: 0; text-align: center; }
.shorts-context-plate strong { font-size: 15px; }
.shorts-plate-content { display: flex; flex-wrap: wrap; align-content: center; justify-content: center; align-items: center; gap: 5px; min-height: 64px; padding: 10px; margin-top: 7px; border: 2px solid #b3c9db; border-radius: 45%; background: #fff; box-shadow: inset 0 0 0 5px #edf3f8; }
.shorts-unknown,.shorts-known-number { color: #285477; font-weight: 800; font-size: 34px; }
.shorts-empty-plate { height: 32px; }
.shorts-context-svg { width: 100%; max-height: 250px; display: block; }
.shorts-context-shapes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; text-align: center; }
.shorts-context-pattern { display: grid; grid-template-columns: repeat(9,minmax(0,1fr)); align-items: center; gap: 4px; font-size: clamp(19px,3vw,34px); text-align: center; }
.shorts-context-pattern .missing { border: 2px dashed #6b8ca5; border-radius: 8px; color: #476b87; }
@media(max-width:480px) {
 .shorts-choice { min-height: 60px; padding: 10px; gap: 7px; font-size: 18px; }
 .shorts-choice-number { flex-basis: 21px; height: 21px; font-size: 12px; }
 .shorts-choice-check { font-size: 15px; }
 .shorts-choice-group { gap: 8px; }
 .shorts-choice-group.shorts-choice-long { grid-template-columns: minmax(0,1fr); }
 .shorts-context { padding: 12px 10px; }
 .shorts-context-plates { gap: 8px; }
 .shorts-context-plates.four { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .shorts-context-plate strong { font-size: 13px; }
 .shorts-plate-content { padding: 10px 7px; }
 .shorts-context-shapes { grid-template-columns: minmax(0,1fr); }
}
@media print {
 .shorts-choice { background: white; color: #243448; border-color: #aabccc; break-inside: avoid; }
 .shorts-choice[aria-checked=true] { background: #eff8f4; color: #163c3d; border-color: #357e69; }
 .shorts-choice-field legend,.shorts-choice-number { color: #243448; }
 .shorts-choice[aria-checked=true] .shorts-choice-check { color: #245c46; }
}
