/* Private Flashcards candidate — grounded in the two user-approved mockups. */
#flashPracticeView{--fc-ink:#081b50;--fc-accent:#0877f9;--fc-bg:#e4f4ff;--fc-line:#91ccff;color:var(--fc-ink)}
#flashPracticeView.flash-young{--fc-accent:#ffc400;--fc-bg:#fff8dc;--fc-line:#ffd333}
#flashPracticeView[data-mode="type"]{--fc-accent:#19ac48;--fc-bg:#edf9e7;--fc-line:#57c86b}
#flashPracticeView .flash-practice-page{background:var(--fc-bg)!important;padding:22px clamp(12px,3vw,38px) 38px!important;min-height:90vh}
#flashPracticeView .flash-practice-shell{max-width:1120px!important}
#flashPracticeView .flash-deck-title h1{color:var(--fc-ink)!important;font-size:clamp(23px,3vw,36px)!important}
#flashPracticeView .flash-practice-top{margin-bottom:16px}
#flashPracticeView .flash-progress-track{height:12px!important;background:#c8def1!important;margin-bottom:18px}
#flashPracticeView .flash-progress-fill{background:var(--fc-accent)!important}
#flashPracticeView .flash-gamebar{display:flex!important;justify-content:center;flex-wrap:wrap;gap:10px!important;margin-bottom:26px}
#flashPracticeView .flash-stat{background:#fff!important;border:0!important;border-radius:13px!important;box-shadow:0 3px 9px #14376212!important;padding:10px 18px!important;min-width:100px}
#flashPracticeView .flash-stat strong{color:var(--fc-ink)!important;font-size:25px!important}
#flashPracticeView .flash-stat span{color:#31476a!important}
#flashPracticeView .flash-time-stat small{font-size:11px}
#flashPracticeView #practiceStage{position:relative;background:transparent!important;border:0!important;box-shadow:none!important;padding:0!important;overflow:visible!important;min-height:0!important;height:auto!important}
#flashPracticeView #practiceStage:before,#flashPracticeView #practiceStage:after{display:none!important}
#flashPracticeView .flash-mode-chip{background:transparent!important;color:var(--fc-ink)!important;padding:0 4px 18px!important;font-size:13px;letter-spacing:.05em}
#flashPracticeView #flashFlipFace{position:relative;display:flex!important;flex-direction:column;justify-content:center;align-items:center;background:#fff!important;border:4px solid var(--fc-line);border-radius:30px;box-shadow:0 12px 24px #14467c24;min-height:330px;width:min(100%,930px);margin:0 auto;overflow:visible!important;padding:30px clamp(16px,3vw,40px);box-sizing:border-box}
#flashPracticeView #flashFlipFace:before{content:"";position:absolute;width:45%;height:16px;border-radius:15px 15px 0 0;background:var(--fc-accent);top:-18px;left:27.5%;z-index:0}
#flashPracticeView #practiceQuestion{width:100%!important;min-height:220px!important;margin:0!important;padding:20px 4px!important;box-shadow:none!important;background:transparent!important;border:0!important;color:var(--fc-ink)!important;font-size:clamp(42px,7vw,90px)!important;font-weight:900;letter-spacing:-.035em;line-height:1.12;overflow-wrap:anywhere;border-radius:14px}
#flashPracticeView #practiceQuestion.long{font-size:clamp(27px,4vw,52px)!important}
#flashPracticeView #practiceQuestion[hidden]{display:none!important}
#flashPracticeView #practiceAnswer{width:100%!important;max-width:100%!important;min-height:220px!important;margin:0!important;padding:20px 4px!important;background:transparent!important;border:0!important;color:var(--fc-ink)!important;font-size:clamp(30px,4.7vw,64px)!important;line-height:1.18;overflow-wrap:anywhere}
#flashPracticeView #practiceAnswer.has-visual{display:flex;justify-content:center;align-items:center;gap:24px;flex-wrap:wrap}
#flashPracticeView #flashFlipFace.is-revealed{border-color:#71d58b}
#flashPracticeView #flashFlipFace.is-revealed:before{background:#27b54b}
#flashPracticeView .flash-game-actions,#flashPracticeView .flash-explore-controls{height:auto!important;min-height:0!important;margin:20px auto 0!important;gap:12px!important;flex-wrap:wrap}
#flashPracticeView .flash-game-actions button,#flashPracticeView .flash-explore-controls button{border:0!important;border-radius:999px!important;padding:16px 30px!important;min-height:56px!important;font-size:21px!important;font-weight:800!important;box-shadow:0 4px 7px #1038601a}
#flashPracticeView .flash-primary-action,#flashPracticeView .flash-explore-reveal{background:#006cf2!important;color:#fff!important}
#flashPracticeView .flash-good-action,#flashPracticeView .flash-explore-next{background:#009e36!important;color:#fff!important}
#flashPracticeView .flash-again-action{background:#ed2f38!important;color:#fff!important}
#flashPracticeView #choiceControls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin:20px auto 0;max-width:930px}
#flashPracticeView .flash-choice{display:flex;align-items:center;gap:15px;text-align:left;border:3px solid transparent;border-radius:18px;padding:18px;color:var(--fc-ink);font-size:clamp(18px,2.1vw,27px);line-height:1.25;min-height:100px;overflow-wrap:anywhere;box-shadow:0 5px 12px #14376212}
#flashPracticeView .flash-choice:nth-child(1){background:#d4efff}#flashPracticeView .flash-choice:nth-child(2){background:#fff1b3}#flashPracticeView .flash-choice:nth-child(3){background:#ffd8df}#flashPracticeView .flash-choice:nth-child(4){background:#d6f5d5}
#flashPracticeView .flash-choice-label{display:grid;place-items:center;flex:0 0 48px;height:52px;border-radius:10px;background:#006df2;color:white;font-size:29px;font-weight:900}
#flashPracticeView .flash-choice:nth-child(2) .flash-choice-label{background:#ffcc00;color:#081b50}#flashPracticeView .flash-choice:nth-child(3) .flash-choice-label{background:#f24162}#flashPracticeView .flash-choice:nth-child(4) .flash-choice-label{background:#11a43f}
#flashPracticeView .flash-choice.correct{border-color:#078529!important;background:#dcfce7!important}#flashPracticeView .flash-choice.wrong{border-color:#ca233e!important;background:#ffe0e4!important}
#flashPracticeView #typeControls{max-width:800px;margin:20px auto 0;display:flex;align-items:center;gap:15px}
#flashPracticeView #typeControls input{min-width:0;flex:1;border:2px solid #91a1b5;border-radius:16px;font-size:24px;padding:20px;color:var(--fc-ink);background:white}
#flashPracticeView #typeControls .flash-game-actions{margin:0!important}
#flashPracticeView #practiceTypeSubmit{background:#009735!important}
#flashPracticeView .flash-feedback{font-size:23px;margin:18px auto 0;min-height:32px;text-align:center}
#flashPracticeView .flash-learn-hint{font-size:17px;margin:12px 0!important;color:#46566a}
#flashPracticeView .flash-speak-btn{background:#e0f1ff;color:#075abb;border:0;border-radius:999px;padding:12px 20px}
#flashPracticeView button:focus-visible,#flashPracticeView input:focus-visible,#flashPracticeView #practiceQuestion:focus-visible{outline:4px solid #174a9c!important;outline-offset:4px}
#flashPracticeView [hidden]{display:none!important}
@media(max-width:620px){#flashPracticeView .flash-stat{min-width:70px;padding:8px 10px!important}#flashPracticeView .flash-gamebar{gap:7px!important;margin-bottom:22px}#flashPracticeView #flashFlipFace{min-height:280px;border-radius:24px;padding:20px 12px}#flashPracticeView #practiceQuestion{min-height:185px!important;font-size:clamp(38px,10vw,64px)!important}#flashPracticeView #practiceAnswer{min-height:185px!important;font-size:clamp(27px,7vw,45px)!important}#flashPracticeView #choiceControls{gap:9px}#flashPracticeView .flash-choice{flex-direction:column;align-items:flex-start;gap:9px;padding:12px;font-size:18px}#flashPracticeView .flash-choice-label{flex-basis:auto;width:35px;height:38px;font-size:23px}#flashPracticeView #typeControls{flex-direction:column;align-items:stretch}#flashPracticeView #typeControls input{width:100%;box-sizing:border-box}#flashPracticeView .flash-game-actions button{min-width:120px;flex:1;padding:14px 20px!important}#flashPracticeView .flash-time-stat{width:auto!important}}
@media(prefers-reduced-motion:reduce){#flashPracticeView *{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
#flashPracticeView #choiceControls,#flashPracticeView #typeControls{width:100%;box-sizing:border-box}
#flashPracticeView[data-mode="choice"] #practiceQuestion,#flashPracticeView[data-mode="type"] #practiceQuestion{min-height:110px!important;padding:12px 4px!important}
#flashPracticeView[data-mode="choice"] #practiceAnswer{min-height:0!important;font-size:26px!important;padding:12px!important}
/* Retain the teacher's existing theme choice within the approved palette. */
body.flash-theme-purple #flashPracticeView:not(.flash-young):not([data-mode="type"]){--fc-bg:#ececff;--fc-line:#b3beff}
body.flash-theme-sunset #flashPracticeView:not(.flash-young):not([data-mode="type"]){--fc-bg:#fff6dc;--fc-line:#ffd333}
body.flash-theme-space #flashPracticeView:not(.flash-young):not([data-mode="type"]){--fc-bg:#e3edff;--fc-line:#7faeff}
/* Flip and Next share a stable viewport control slot, including long cards. */
#flashPracticeView #practiceGame:not([hidden]) #flipControls,
#flashPracticeView #practiceGame:not([hidden]) #exploreControls{
 position:fixed;left:50%;bottom:max(14px,env(safe-area-inset-bottom));transform:translateX(-50%);
 z-index:50;width:min(930px,calc(100% - 28px));box-sizing:border-box;margin:0!important;
 padding:12px;background:var(--fc-bg);border-radius:24px;box-shadow:0 -4px 16px #1437620c;
 display:flex;justify-content:center;align-items:center;min-height:84px!important;
}
#flashPracticeView #exploreControls{display:grid!important;grid-template-columns:minmax(0,360px);justify-content:center!important}
#flashPracticeView #exploreControls button{grid-area:1/1;width:100%!important;margin:0!important;min-height:60px!important}
#flashPracticeView #flipControls button{width:180px;max-width:46%;margin:0!important;flex:none}
#flashPracticeView[data-mode="flip"] .flash-practice-page,
#flashPracticeView[data-mode="explore"] .flash-practice-page{padding-bottom:125px!important}
#flashPracticeView[data-mode="flip"] #flashFlipFace,
#flashPracticeView[data-mode="explore"] #flashFlipFace{
 height:clamp(220px,calc(100dvh - 410px),560px);min-height:0!important;
 overflow-y:auto!important;overflow-x:hidden!important;scrollbar-gutter:stable;
 justify-content:safe center;scroll-padding:16px;
}
#flashPracticeView[data-mode="explore"] #flashFlipFace{height:clamp(220px,calc(100dvh - 335px),600px)}
#flashPracticeView[data-mode="flip"] #practiceQuestion,
#flashPracticeView[data-mode="flip"] #practiceAnswer,
#flashPracticeView[data-mode="explore"] #practiceQuestion,
#flashPracticeView[data-mode="explore"] #practiceAnswer{min-height:0!important;flex-shrink:0}
@media(max-width:620px){
 #flashPracticeView #flipControls button{width:150px;font-size:18px!important;padding:14px!important}
 #flashPracticeView #practiceGame:not([hidden]) #flipControls,
 #flashPracticeView #practiceGame:not([hidden]) #exploreControls{width:calc(100% - 16px);padding:9px;min-height:78px!important;bottom:max(8px,env(safe-area-inset-bottom))}
}
#flashPracticeView #practiceGame:not([hidden]) #exploreControls{display:grid!important}
#flashPracticeView #practiceGame #flipControls[hidden],
#flashPracticeView #practiceGame #exploreControls[hidden]{display:none!important}
/* A flex child must not grow from its long answer; keep the viewport slot stable. */
#flashPracticeView[data-mode="flip"] #flashFlipFace{flex:none!important;height:clamp(220px,calc(100dvh - 410px),560px)!important}
#flashPracticeView[data-mode="explore"] #flashFlipFace{flex:none!important;height:clamp(220px,calc(100dvh - 335px),600px)!important}
#flashPracticeView #practiceGame:not([hidden]) #flipControls,
#flashPracticeView #practiceGame:not([hidden]) #exploreControls{left:50vw}
#flashPracticeView #practiceAnswer.long{font-size:clamp(22px,2.5vw,32px)!important;line-height:1.4}
/* Celebrate only after the round; leave practice cards distraction-free. */
#flashPracticeView .flash-summary-art{display:block;width:200px;max-width:55%;height:auto;margin:0 auto 8px;pointer-events:none}
#flashPracticeView.flash-young .flash-summary-art{width:260px;max-width:65%}
#flashPracticeView #practiceSummary .flash-stars{font-size:26px;margin:0 0 8px}
@media(max-height:650px){#flashPracticeView .flash-summary-art{width:130px}}
/* Keep the entire reading face above the stable dock; long definitions stay readable. */
#flashPracticeView[data-mode="explore"] #flashFlipFace{height:clamp(180px,calc(100dvh - 430px),530px)!important}
#flashPracticeView[data-mode="flip"] #flashFlipFace{height:clamp(180px,calc(100dvh - 490px),490px)!important}
#flashPracticeView #practiceAnswer.long .flash-answer-word{font-size:inherit!important;line-height:inherit!important}
/* Compact, still fully labelled score strip on phones; no scores are removed. */
@media(max-width:620px){
 #flashPracticeView:not(.flash-young) .flash-gamebar{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;margin-bottom:16px!important}
 #flashPracticeView:not(.flash-young) .flash-stat{min-width:0;padding:6px!important}
 #flashPracticeView:not(.flash-young) .flash-stat strong{font-size:22px!important;margin-top:1px}
 #flashPracticeView:not(.flash-young) .flash-time-stat{grid-column:1/-1;display:flex!important;justify-content:center;align-items:center;gap:10px}
 #flashPracticeView:not(.flash-young) .flash-time-stat small{font-size:10px}
 #flashPracticeView:not(.flash-young) .flash-mode-chip{padding-bottom:12px!important}
 #flashPracticeView[data-mode="choice"] #flashFlipFace{padding:16px 12px}
}

/* Canonical site brand, unchanged artwork; preserve the existing eyebrow line box. */
.flash-deck-title .eyebrow.flash-canonical-brand{position:relative;padding-left:40px!important}
.flash-deck-title .eyebrow.flash-canonical-brand::before{display:none!important}
.flash-canonical-brand>img{position:absolute;left:0;top:50%;transform:translateY(-50%);width:32px;height:14px;object-fit:contain;filter:brightness(1.14) saturate(1.25)}

/* Fidelity v6: approved luminous study surfaces and physical-card silhouette. */
#flashPracticeView{--fc-glow:#c2e9ff;--fc-tab:#1685ff;--fc-tab-edge:#0872ed;--fc-mode-number:'1'}
#flashPracticeView[data-mode="choice"]{--fc-mode-number:'2';--fc-glow:#dce5ff}
#flashPracticeView.flash-young{--fc-glow:#fff0b5;--fc-tab:#ffc400;--fc-tab-edge:#efae00;--fc-mode-number:'3'}
#flashPracticeView[data-mode="type"]{--fc-glow:#d4f2c9;--fc-tab:#23bc4d;--fc-tab-edge:#159f38;--fc-mode-number:'4'}
body.flash-theme-purple #flashPracticeView:not(.flash-young):not([data-mode="type"]){--fc-glow:#d8d7ff}
body.flash-theme-sunset #flashPracticeView:not(.flash-young):not([data-mode="type"]){--fc-glow:#ffedaf}
#flashPracticeView .flash-practice-page{background:radial-gradient(ellipse at 50% 48%,#ffffffd9 0%,#ffffff42 37%,transparent 68%),linear-gradient(125deg,var(--fc-bg),var(--fc-glow) 60%,var(--fc-bg))!important}
#flashPracticeView .flash-practice-top{position:relative;padding:0 0 12px;border-bottom:1px solid #ffffff90;background:linear-gradient(90deg,#ffffff66,#ffffff18);border-radius:14px}
#flashPracticeView .flash-deck-title{display:grid;grid-template-columns:auto 1fr;align-items:center;column-gap:16px;width:100%}
#flashPracticeView .flash-canonical-brand{grid-column:1/-1;justify-self:start;margin-bottom:7px;color:#0a265c!important;font-size:10px!important}
#flashPracticeView .flash-mode-chip{display:flex;align-items:center;gap:12px;padding:0!important;font-size:clamp(21px,2.8vw,31px);line-height:1.12;letter-spacing:-.02em;font-weight:950;white-space:nowrap}
#flashPracticeView .flash-mode-chip:before{content:var(--fc-mode-number);display:grid;place-items:center;flex:0 0 42px;width:42px;height:42px;border-radius:50%;color:#fff;font-size:28px;background:linear-gradient(145deg,#ffffff30,transparent),var(--fc-tab);box-shadow:inset 0 1px 3px #ffffff88,0 3px 8px #1e4a7a12}
#flashPracticeView .flash-deck-title h1{font-size:clamp(14px,1.7vw,19px)!important;font-weight:650;white-space:normal;line-height:1.4;max-height:46px;overflow:auto;letter-spacing:0}
#flashPracticeView:not(:has(#practiceGame:not([hidden]))) .flash-mode-chip{display:none}
#flashPracticeView:not(:has(#practiceGame:not([hidden]))) .flash-deck-title h1{grid-column:1/-1;font-size:28px!important;max-height:none}
#flashPracticeView .flash-progress-track{background:#95c8ef66!important;box-shadow:inset 0 1px 2px #3766970b}
#flashPracticeView .flash-progress-fill{background:linear-gradient(90deg,var(--fc-tab-edge),var(--fc-tab))!important}
#flashPracticeView .flash-gamebar{justify-content:flex-end;align-items:stretch;margin-bottom:32px}
#flashPracticeView .flash-stat{position:relative;border-radius:10px!important;box-shadow:0 4px 9px #1f69bc20!important}
#flashPracticeView .flash-stat-score,#flashPracticeView .flash-stat-streak{padding-left:59px!important}
#flashPracticeView .flash-stat-art{position:absolute;width:37px;height:43px;left:12px;top:50%;transform:translateY(-50%);object-fit:contain}
#flashPracticeView .flash-card-stack{position:relative;isolation:isolate;flex:none;width:min(100%,930px);margin:0 auto;--card-tab:var(--fc-tab);--card-tab-edge:var(--fc-tab-edge)}
#flashPracticeView .flash-card-stack:has(.is-revealed){--card-tab:#2ac153;--card-tab-edge:#21a644}
#flashPracticeView .flash-card-stack:before{content:'';position:absolute;z-index:-1;left:5%;right:5%;top:-8px;bottom:8px;border-radius:27px;background:linear-gradient(180deg,var(--card-tab),#fff 40%);box-shadow:0 6px 14px #2865a014}
#flashPracticeView .flash-card-stack:after{content:'';position:absolute;z-index:2;left:28%;width:44%;height:18px;top:-20px;border-radius:15px 15px 0 0;background:linear-gradient(180deg,var(--card-tab),var(--card-tab-edge));box-shadow:0 1px 0 #ffffff55 inset;pointer-events:none}
#flashPracticeView #flashFlipFace{width:100%;background:linear-gradient(145deg,#fff 35%,#fffefa)!important;border-color:var(--fc-line);box-shadow:0 13px 22px #235f9830,0 3px 7px #235f9810}
#flashPracticeView #flashFlipFace:before{display:none}
#flashPracticeView .flash-card-stack{filter:drop-shadow(0 2px 1px #ffffff55)}
#flashPracticeView .flash-card-stack #flashFlipFace:after{content:none}
#flashPracticeView .flash-card-stack+.flash-game-actions:before{content:none}
#flashPracticeView .flash-card-stack{border-bottom:0}
#flashPracticeView .flash-card-stack .flash-card-bottom-tab{position:absolute;z-index:2;left:34%;width:32%;height:13px;bottom:-5px;border-radius:13px 13px 0 0;background:linear-gradient(var(--card-tab),var(--card-tab-edge));pointer-events:none}
#flashPracticeView .flash-choice{background-image:linear-gradient(135deg,#ffffff22,transparent);box-shadow:inset 0 1px 0 #ffffff88,0 3px 7px #1437620b}
#flashPracticeView .flash-choice-label{box-shadow:inset 0 2px 3px #ffffff55;background-image:linear-gradient(145deg,#ffffff25,transparent)}
#flashPracticeView .flash-speak-btn{box-shadow:inset 0 1px 0 #fff;background:linear-gradient(145deg,#b5e3ff,#def2ff);color:#005cce;font-weight:800}
@media(max-width:620px){
 #flashPracticeView .flash-deck-title{column-gap:8px;row-gap:5px}
 #flashPracticeView .flash-canonical-brand{margin-bottom:2px}
 #flashPracticeView .flash-mode-chip{font-size:20px;gap:8px;grid-column:1/-1}
 #flashPracticeView .flash-mode-chip:before{flex-basis:32px;width:32px;height:32px;font-size:23px}
 #flashPracticeView .flash-deck-title h1{grid-column:1/-1;font-size:14px!important;max-height:34px}
 #flashPracticeView .flash-stat-score,#flashPracticeView .flash-stat-streak{padding-left:26px!important}
 #flashPracticeView .flash-stat-art{width:19px;height:25px;left:5px}
 #flashPracticeView .flash-gamebar{margin-bottom:28px!important}
 #flashPracticeView .flash-card-stack:after{height:15px;top:-17px}
}
/* Approved visual-card composition: actual visual beside its answer, not clipped below it. */
#flashPracticeView #practiceAnswer.has-visual{flex-direction:row-reverse;flex-wrap:wrap;padding:12px 4px!important;gap:24px}
#flashPracticeView #practiceAnswer.has-visual .flash-answer-word{min-width:0;max-width:100%;overflow-wrap:anywhere}
#flashPracticeView #practiceAnswer.has-visual .flash-emoji-visual{font-size:clamp(72px,12vw,144px);line-height:1;flex:0 0 auto}
@media(max-width:620px){#flashPracticeView #practiceAnswer.has-visual{gap:14px}#flashPracticeView #practiceAnswer.has-visual .flash-emoji-visual{font-size:72px}}
