/* Original game backgrounds and buttons; new 3D artwork only. */
.spark,.spark-side .spark-art,.sp-logo,.av-char { object-fit:contain; }
.bz-3d { display:inline-block; flex-shrink:0; vertical-align:-3px; }
.bz-3d.pet.legendary { filter:drop-shadow(0 0 3px #ffd44b); }
.avatar-face .bz-3d { vertical-align:middle; }
.bz-ico:not(.bz-3d) { filter:drop-shadow(0 2px 1px #071d4a33); }
/* The exercise scrolls inside its own column; controls never cover content. */
.drill-screen { overflow:hidden; gap:7px; }
.drill-screen>.drill-body { flex:1 1 0; min-height:0; overflow:hidden; }
.drill-screen>.drill-body>.drill-main { min-height:0; overflow-x:hidden; overflow-y:auto; padding:0 3px 7px 0; scrollbar-width:thin; }
.drill-screen .drill-main>* { flex-shrink:0; }
.drill-screen>.drill-bottom,.drill-screen>.kbd-tip,.drill-screen>.drill-top,.drill-screen>.q-progress { flex-shrink:0; }
.drill-screen>.drill-bottom { position:relative; z-index:2; min-height:60px; }
.drill-screen .goal-widget { min-width:0; }
.drill-screen .type-answer { grid-column:1 / -1; min-width:0; width:100%; }
.drill-screen .type-answer input { min-width:0; }
.fraction-with-object { align-items:center; gap:12px; }
.fraction-object-model { flex:0 0 60px; display:flex; flex-direction:column; align-items:center; gap:5px; }
.fraction-object-model small { font-size:10px; line-height:1.4; color:#665538; text-transform:capitalize; }
.drill-screen .halloween-floor-pumpkin { bottom:102px; opacity:.5; transform:scale(.75); transform-origin:left bottom; }
.drill-screen .halloween-floor-ghost { bottom:102px; opacity:.35; transform:scale(.7); transform-origin:right bottom; }
@media(max-height:800px){.drill-screen .halloween-floor-pumpkin,.drill-screen .halloween-floor-ghost{display:none;}}

.drill-screen .q-visual svg.equal-groups-diagram { max-height:210px; width:100%; }

/* Long answers must not enlarge the grid's implicit minimum column width. */
.answers { grid-template-columns:repeat(2,minmax(0,1fr)); min-width:0; width:100%; }
.ans-btn,.my-opt { min-width:0; max-width:100%; white-space:normal; }
.ans-btn>span:nth-child(2),.my-opt>span:nth-child(2) { flex:1; min-width:0; overflow-wrap:anywhere; white-space:normal; }

.my-answers,.sol-opts,.sol-opt { min-width:0; max-width:100%; }
.sol-opt { flex-wrap:wrap; overflow-wrap:anywhere; }
.sol-answer { flex:1; min-width:0; overflow-wrap:anywhere; }
.sol-opt>b,.sol-tag { flex-shrink:0; }
.dx-ptext,.dx-say,.dx-ans,.sol-exp { overflow-wrap:anywhere; }

/* Parent reports: one value and one label per tile. */
.parent-dashboard .dash-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
.parent-dashboard .dash-grid:has(.dash-cell) { grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); gap:9px; }
.dash-cell { min-width:0; padding:12px 9px; background:#102856; border:1px solid #4774b9; border-radius:11px; }
.dash-cell b { display:block; font-size:22px; line-height:1.25; margin-bottom:6px; color:#fff; }
.dash-cell span { display:block; font-size:12px; line-height:1.4; color:#c8dafa; overflow-wrap:anywhere; }
.parent-dashboard .dash-card,.parent-dashboard .pd-col { min-width:0; }
.pd-action-row { display:flex; align-items:center; justify-content:space-between; gap:10px; width:100%; padding:11px 9px; margin:5px 0; border:1px solid #4774b9; border-radius:10px; background:#102856; color:#e8f0ff; text-align:left; cursor:pointer; font:inherit; font-size:12px; }
.pd-action-row>span:first-child { flex:1; min-width:0; overflow-wrap:anywhere; }
.pd-action-row small { display:block; color:#b4cef5; line-height:1.5; margin-top:4px; }
.pd-homework-length { display:flex; align-items:center; justify-content:space-between; margin:9px 0; font-size:12px; }
.pd-homework-length select,.pd-report-filter { padding:8px; border:1px solid #6c93d3; border-radius:8px; background:#102856; color:white; font:inherit; max-width:100%; }
/* Battle arena: bounded 3D artwork, readable choices, no poster fragments. */
.battle-screen { gap:12px; padding:12px; background:radial-gradient(ellipse at 50% 20%,#492aa3 0%,#241059 58%,#100d30 100%); }
.battle-screen>* { flex-shrink:0; min-width:0; }
.battle-screen .topbar { gap:5px; }
.battle-screen .team-row { justify-content:center; margin:0; }
.battle-screen .tc-face { overflow:hidden; flex-shrink:0; }
.battle-screen .tc-face img { max-width:100%; max-height:100%; object-fit:contain; }
.battle-screen .battle-arena { position:relative; display:grid; grid-template-columns:minmax(0,1fr) 65px minmax(0,1fr); align-items:center; gap:8px; height:auto; padding:18px 8px 12px; border:1px solid #8e6bca; border-radius:22px; background:radial-gradient(ellipse at 20% 50%,#2688c03b,transparent 65%),linear-gradient(145deg,#331b72,#241251); }
.battle-hero { display:flex; flex-direction:column; align-items:center; gap:5px; color:#8de5ff; font-size:10px; letter-spacing:1px; }
.battle-hero img { display:block; width:100%; max-width:125px; height:140px; object-fit:contain; filter:drop-shadow(0 8px 10px #09042980); }
.battle-versus { text-align:center; }
.battle-versus>span { font-size:24px; font-weight:900; color:#ffe487; }
.battle-versus small { display:block; font-size:9px; color:#cbbcec; line-height:1.5; margin-top:8px; }
.battle-screen .monster-wrap { position:static; transform:none; min-width:0; display:flex; flex-direction:column; align-items:center; }
.battle-screen .monster-img { width:125px; max-width:100%; height:130px; margin:0; display:grid; place-items:center; mask-image:none; -webkit-mask-image:none; }
.monster-name { font-size:9px; letter-spacing:.7px; color:#ffc4de; }
.battle-screen .monster-hp { width:100%; max-width:150px; margin-top:7px; height:11px; }
.battle-screen .solve-fast { font-size:8px; letter-spacing:.8px; max-width:100%; padding:4px 6px; }
.battle-screen #b-card { margin:0!important; padding:17px 12px; background:linear-gradient(145deg,#fffdf2,#f5eddc); border-color:#83a7ff; }
.battle-screen .orbs { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding:0; }
.battle-screen .orb { display:flex; align-items:center; gap:9px; aspect-ratio:auto; min-height:70px; min-width:0; padding:13px; border-radius:17px; border:1px solid #ffffff80; font-size:19px; line-height:1.3; box-shadow:inset 0 2px 0 #ffffff40,0 5px 0 #10072f99; }
.battle-letter { display:grid; place-items:center; width:25px; height:25px; flex-shrink:0; border:1px solid #ffffff9c; border-radius:50%; font-size:12px; background:#11072940; }
.battle-answer { flex:1; min-width:0; overflow-wrap:anywhere; }
.battle-screen .combo-shout { min-height:22px; margin:0; font-size:11px; color:#e5d8ff; }
.battle-screen .combo-shout .cs1 { font-size:21px; }
.battle-screen .combo-shout .cs2 { font-size:12px; letter-spacing:0; }
.battle-guide { display:flex; flex-direction:column; gap:5px; padding:12px; border-radius:12px; background:#ffffff0b; font-size:11px; line-height:1.5; color:#d5c8f2; }
.battle-guide b { font-size:9px; letter-spacing:1px; color:#fce88e; }
.battle-screen .battle-foot { margin-top:auto; justify-content:space-between; padding:10px 4px; font-size:11px; line-height:1.5; color:#d5c8f2; }
.battle-foot small { display:block; color:#bba5e3; font-size:9px; }
.battle-foot #b-time { font-size:23px; color:#ffe487; }
@media(max-width:360px){.battle-screen .topbar .drill-chip { padding:4px 6px!important; }.battle-screen .battle-arena { grid-template-columns:minmax(0,1fr) 40px minmax(0,1fr); }.battle-hero img { height:115px; }.battle-screen .monster-img { height:115px; }.battle-screen .orb { padding:10px; font-size:16px; }}

.premium-progress { padding:14px; margin-top:16px; min-width:0; }
.premium-progress h3 { font-size:14px; color:#e6edff; margin:16px 0 8px; }
.pd-report-note { font-size:11px; line-height:1.6; color:#b8cdef; margin:8px 0 12px; overflow-wrap:anywhere; }
.pd-report-search { display:flex; flex-direction:column; gap:5px; font-size:11px; color:#c8dafa; margin:8px 0; }
.pd-report-search input { min-width:0; width:100%; padding:10px; border:1px solid #6c93d3; border-radius:8px; background:#102856; color:#fff; }
.pd-skill-detail { padding:11px; border:1px solid #4774b9; border-radius:12px; background:#102856; margin:8px 0; }
.pd-skill-detail summary { display:flex; align-items:center; justify-content:space-between; gap:8px; cursor:pointer; font-size:12px; }
.pd-skill-detail summary>span { flex:1; min-width:0; overflow-wrap:anywhere; }
.pd-skill-detail summary small { display:block; color:#a6c6f2; margin-top:4px; line-height:1.5; }
.pd-skill-detail[open] summary { margin-bottom:12px; }
.premium-progress .dash-grid { grid-template-columns:repeat(auto-fit,minmax(110px,1fr)); }
.premium-progress .dash-cell b { font-size:19px; }
.pd-skill-practice { width:100%; margin-top:9px; }

.pd-skill-detail summary::after { content:'Details +'; font-size:10px; color:#9cc8ff; flex-shrink:0; }
.pd-skill-detail[open] summary::after { content:'Close −'; }
.battle-screen>.topbar { display:grid; grid-template-columns:34px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr); gap:6px; position:sticky; top:0; z-index:5; padding:8px; border-radius:14px; background:#201044f5; }
.battle-screen>.topbar>.back-btn { grid-row:1 / 3; align-self:center; }
.battle-screen>.topbar>div:nth-child(2) { grid-column:2 / 5; }
.battle-screen>.topbar>.drill-chip { min-width:0; padding:5px!important; }
.battle-screen .battle-time .v { color:#ffe487; }

.pd-child-selector { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:10px 12px; flex-shrink:0; }
.pd-child-selector>label { display:flex; gap:7px; align-items:center; flex:1; min-width:160px; font-size:12px; font-weight:800; }
.pd-child-selector select { flex:1; min-width:0; padding:8px; border:1px solid #7fa5df; border-radius:8px; background:#102856; color:#fff; }
.pd-child-selector .pd-btn { flex:0 1 auto; min-width:95px; }
.pd-child-note { flex-basis:100%; margin:0; font-size:10px; color:#b8cdef; }
.pd-custom-homework { margin-top:12px; border-top:1px solid #5274ae; padding-top:12px; }
.pd-custom-homework summary { cursor:pointer; font-size:12px; font-weight:800; color:#cfacff; line-height:1.5; }
.pd-custom-homework>label { display:flex; flex-direction:column; gap:5px; font-size:11px; margin:10px 0; }
.pd-custom-homework input[type=search] { min-width:0; padding:9px; border-radius:8px; border:1px solid #6c93d3; background:#102856; color:#fff; }
.pd-assignment-tools { display:flex; flex-wrap:wrap; gap:6px; margin:8px 0; }
.pd-assignment-skills { max-height:240px; overflow-y:auto; padding:3px; }
.pd-assignment-skill { display:flex; align-items:flex-start; gap:8px; padding:9px 5px; border-bottom:1px solid #ffffff1c; cursor:pointer; }
.pd-assignment-skill input { width:18px; height:18px; flex-shrink:0; accent-color:#8ce637; }
.pd-assignment-skill span { min-width:0; overflow-wrap:anywhere; font-size:11px; }
.pd-assignment-skill small { display:block; color:#adc8ef; font-size:10px; line-height:1.5; margin-top:3px; }
#pd-assignment-selection { font-size:11px; color:#d2e1fb; }
#pd-assign-custom { width:100%; }
#pd-assign-custom:disabled { opacity:.5; cursor:default; }

button.fam-row { width:100%; color:inherit; font:inherit; text-align:left; cursor:pointer; }

.pd-custom-homework .pd-btn,.pd-child-note { overflow-wrap:anywhere; }

.mode-btn.selected { border-color:#ffe271; background:linear-gradient(160deg,#345db5,#24326c); box-shadow:0 0 0 2px #ffe27144; }
.practice-scope { padding:10px 12px; margin:3px 10px 10px; background:#102856; border:1px solid #537fc8; border-radius:12px; }
.practice-scope b,.practice-scope span,.practice-scope small { display:block; overflow-wrap:anywhere; }
.practice-scope b { color:#ffe271; font-size:12px; }.practice-scope span { color:#fff; font-size:11px; line-height:1.5; margin:5px 0; }.practice-scope small { color:#b2cef2; font-size:10px; line-height:1.5; }
.guided-coach { margin:12px 0 5px; padding:10px 12px; border:1px solid #b49b63; border-radius:12px; background:#fff9df; color:#243b6b; text-align:left; font-style:normal; }
.guided-coach summary { cursor:pointer; font-size:11px; font-weight:900; }.guided-coach p { font-size:12px; line-height:1.6; margin:7px 0; overflow-wrap:anywhere; }
.lesson-selection { font-size:12px; line-height:1.6; text-align:left; color:#c7dcff; }

/* Worksheet skill selection and paper-safe holiday accents */
.pp-skill-status { display:flex; justify-content:space-between; align-items:center; gap:8px; margin:6px 0; color:#cfe0ff; font-size:11px; }
.pp-skill-list { max-height:180px; overflow:auto; padding:4px 8px; border:1px solid #3f7dff; border-radius:10px; color:#e6efff; font-size:12px; }
.pp-skill-list label { display:flex; align-items:center; gap:8px; min-height:32px; cursor:pointer; }
.pp-skill-list input { flex:none; }
label[for="pp-holiday"] { display:block; }
.ppv-q, .ps-p { white-space:pre-line; overflow-wrap:anywhere; }
.ps-qb, .ps-key { min-width:0; overflow-wrap:anywhere; }
.ps-vis svg, .ppv-vis svg { width:auto; max-width:100%; }
.ps-body { grid-template-columns:repeat(2,minmax(0,1fr)); }
.ps-blank { flex:0 0 auto; }
.ps-holiday-title { display:flex; align-items:center; gap:7px; margin-bottom:5px; color:var(--print-accent); font-weight:800; }
.ps-accent { display:inline-flex; flex:0 0 auto; vertical-align:middle; align-self:flex-start; margin-inline-end:3px; }
.ps-accent svg { display:block; }
.print-sheet .ps-head, .pp-preview .ppv-meta { border-color:var(--print-accent, #1a49c0); }
.print-sheet .ps-brand, .print-sheet .ps-n, .print-sheet .ps-opt b, .print-sheet .ps-key-h { color:var(--print-accent, #1a49c0); }
@media screen and (max-width:560px) {
  .print-sheet .ps-body { grid-template-columns:minmax(0,1fr); }
  .print-sheet .ps-keys { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
.ps-inline-icon { vertical-align:-.18em; }
@media print {
  body.printsheet-active { display:block !important; height:auto !important; min-height:0 !important; margin:0 !important; }
  body.printsheet-active > :not(.print-sheet) { display:none !important; }
}
