:root{--bg:#f7f1ed;--paper:#fffdf9;--plum:#6b4b69;--deep:#4c364e;--lav:#eee3f0;--soft:#f5edf4;--stroke:#e6d8df;--sage:#88ac9b;--mint:#e4f1ea;--pink:#f2dfe4;--gold:#e1c7a1;--text:#463b46;--muted:#8a7e8a;--shadow:0 12px 34px rgba(92,63,86,.11),0 3px 8px rgba(92,63,86,.06);--smshadow:0 5px 13px rgba(92,63,86,.09);--rad:18px}
*{box-sizing:border-box}html,body{height:100%;margin:0;overflow:hidden}body{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Arial,sans-serif;color:var(--text);background:#e9e0e3;-webkit-tap-highlight-color:transparent}button,input,select{font:inherit}button{cursor:pointer;touch-action:manipulation}button:disabled{cursor:not-allowed;opacity:.45}button:focus-visible,input:focus-visible,select:focus-visible{outline:3px solid #b79dc2;outline-offset:2px}#app{height:100dvh;min-height:420px;max-width:1900px;margin:auto;overflow:hidden;background:radial-gradient(circle at 100% 0%,#f3e3eb 0,transparent 31%),radial-gradient(circle at 0 100%,#e7f0e8 0,transparent 26%),var(--bg);display:flex;flex-direction:column;position:relative}.boot{margin:auto;text-align:center}.boot-glyph{font-family:Georgia,serif;font-size:80px;color:var(--plum)}.boot p{color:var(--muted)}
.appbar{height:58px;padding:7px 16px 7px 18px;display:flex;align-items:center;gap:12px;flex:none;background:linear-gradient(105deg,#fffaf7b0,#f5eaf3b3);border-bottom:1px solid var(--stroke);z-index:10}.brand{min-width:0;display:flex;align-items:center;gap:10px;flex:1}.brand-symbol{width:39px;height:39px;border-radius:13px;display:grid;place-items:center;font:italic bold 27px Georgia,serif;color:var(--deep);background:linear-gradient(135deg,#e0c7e7,#e9f1e7);box-shadow:inset 0 1px #fff,var(--smshadow)}.brand-title{font-family:Georgia,serif;font-weight:700;font-size:18px;letter-spacing:-.3px;color:var(--deep);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.brand-sub{font-size:11px;color:var(--muted);margin-top:1px;white-space:nowrap}.appbar-actions{display:flex;align-items:center;gap:7px;flex:none}.status{font-size:11px;color:#668b78;background:#e4f1e8;border:1px solid #d3e5d9;border-radius:25px;padding:8px 11px;white-space:nowrap}.status.warn{color:#a47c3c;background:#fcf2db}.btn{border:1px solid var(--stroke);border-radius:11px;background:#fffdfa;color:var(--deep);box-shadow:0 2px 5px #73576c0b;padding:9px 12px;font-weight:600;line-height:1.1;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:34px}.btn:hover{border-color:#beabbe;background:#fdf8fc}.btn:active{transform:translateY(1px)}.btn.primary{color:white;background:linear-gradient(140deg,#8c6ab0,#704d90);border-color:#805fa0;box-shadow:0 5px 10px #654c8525}.btn.soft{background:#f2e9f3}.btn.mint{background:#e2f0e8;color:#3c7861;border-color:#c7e2d5}.btn.tiny{font-size:12px;padding:6px 9px;min-height:28px}.btn.iconbtn{width:36px;padding:7px}.btn svg,.tiny-icon{width:16px;height:16px;stroke:currentColor;fill:none;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.8;flex:none}.screen{flex:1;min-height:0;display:flex;flex-direction:column;padding:12px 16px 13px;gap:9px;overflow:hidden}.pagehead{display:flex;align-items:center;gap:12px;min-height:36px;flex:none}.pagehead h1{font:700 clamp(19px,2.1vw,29px)/1.1 Georgia,serif;color:var(--deep);margin:0;flex:1}.pagehead .minor{font-size:12px;color:var(--muted)}.panel{background:linear-gradient(160deg,#fffdfaf5,#fdf8f7f5);border:1px solid var(--stroke);border-radius:var(--rad);box-shadow:var(--shadow);min-height:0}.panel-inner{padding:14px}.hero{height:126px;min-height:126px;border-radius:23px;display:flex;align-items:center;gap:20px;overflow:hidden;background:linear-gradient(100deg,#fbf3f1 5%,#efe1ef 62%,#e2efe8);border:1px solid #eadde2;box-shadow:var(--shadow);padding:0 30px;position:relative}.hero:after{content:'◌  ◇  △  ∞';position:absolute;right:4%;top:-20px;font:80px Georgia,serif;letter-spacing:8px;color:#a489b02d;white-space:nowrap}.hero h1{font:700 clamp(23px,2.9vw,40px)/1.1 Georgia,serif;margin:0;color:var(--deep)}.hero p{color:#8a7489;margin:7px 0 0;font-size:13px}.hero-emblem{width:103px;height:91px;display:grid;place-items:center;font:bold 63px Georgia,serif;color:#71577c;text-shadow:1px 2px #fff;background:linear-gradient(135deg,#efe2f6,#e0eee6);border-radius:22px;transform:rotate(-6deg);box-shadow:9px 12px 15px #7a5a7c20,inset 0 2px #fff;flex:none}.home-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:14px;flex:1;min-height:0}.home-tile{position:relative;text-align:left;border:1px solid #e5d6e1;border-radius:22px;overflow:hidden;background:linear-gradient(138deg,#fffaf9,#eadbed);padding:19px 24px;box-shadow:var(--shadow),inset 0 2px #fff;display:flex;align-items:center;gap:30px;transition:transform .15s,box-shadow .15s}.home-tile:nth-child(2){background:linear-gradient(135deg,#fffaf4,#e0ebe3)}.home-tile:nth-child(3){background:linear-gradient(135deg,#f7ecf7,#f6ebe0)}.home-tile:nth-child(4){background:linear-gradient(135deg,#fef5f6,#dceee6)}.home-tile:hover{transform:translateY(-2px);box-shadow:0 17px 32px #7b60702c}.home-tile h2{font:700 clamp(19px,2.6vw,32px)/1.15 Georgia,serif;color:var(--deep);margin:0}.home-tile small{display:block;font-size:12px;color:var(--muted);margin-top:8px;max-width:280px}.art{width:35%;height:100%;display:flex;align-items:center;justify-content:center;position:relative;flex:none}.art-book{width:95px;height:119px;border-radius:6px 12px 12px 5px;background:linear-gradient(110deg,#8e719d 0 12%,#bea6ce 15%,#d6c2dc 40%,#b8a0c6);transform:rotate(-11deg) skewY(-2deg);box-shadow:11px 12px 0 #80658532,17px 16px 22px #55495f29,inset 5px 0 6px #5e497945;display:flex;align-items:center;justify-content:center;font:italic 61px Georgia,serif;color:white;text-shadow:0 3px 3px #796184}.art-book:before{content:'';position:absolute;right:-11px;top:5px;width:11px;height:109px;background:repeating-linear-gradient(90deg,#fefaf2,#ede4db 2px,#fff 3px);transform:skewY(29deg);border-radius:0 4px 6px 0}.art-book.b{background:linear-gradient(110deg,#6f9485 0 12%,#a7c8ba 15%,#e0eee7 55%,#9abdae);color:#486d60}.art-book.c{background:linear-gradient(110deg,#b88c9c 0 12%,#eccfd9 15%,#f5e3e7 55%,#cfa6b4);color:#8c546f}.art-chart{display:flex;gap:9px;align-items:end;height:110px;transform:perspective(400px) rotateY(-13deg)}.art-chart i{display:block;width:31px;height:var(--h);background:linear-gradient(90deg,#7b628e,#bda7cc);border-radius:8px 8px 3px 3px;box-shadow:8px 3px 0 #65507644,8px 10px 13px #65507630}.art-chart i:nth-child(even){background:linear-gradient(90deg,#80b0a1,#b4d3c8)}
.studentrow{display:flex;flex-wrap:wrap;gap:6px}.studentrow .btn{min-width:70px}.switch{display:flex;gap:4px;padding:3px;border:1px solid var(--stroke);background:#f7f0f4;border-radius:12px}.switch .btn{background:transparent;box-shadow:none;border-color:transparent;min-height:30px}.switch .btn.active{background:#8161a0;color:white;box-shadow:0 3px 8px #694e8126}.scaffold{flex:1;min-height:0;display:grid;gap:10px}.compact{padding:9px}.collection-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:26px;align-items:center;padding:18px}.book-tile{border:1px solid var(--stroke);background:linear-gradient(135deg,#fffaf8,#f6edf4);border-radius:23px;box-shadow:var(--shadow);min-width:0;height:100%;max-height:440px;display:flex;align-items:center;justify-content:space-evenly;gap:15px;padding:20px;overflow:hidden}.book-tile:nth-child(2){background:linear-gradient(135deg,#f9f8f2,#e6f1e8)}.book-tile .art-book{width:148px;height:207px;font-size:66px}.book-tile .art-book:before{height:192px}.book-tile h2{font:700 26px Georgia,serif;color:var(--deep);margin:0 0 8px}.book-tile p{margin:0;color:var(--muted);font-size:13px}.book-tile .btn{margin-top:19px}.topic-grid{flex:1;min-height:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,1fr);gap:11px}.topic-tile{border:1px solid var(--stroke);border-radius:19px;background:linear-gradient(130deg,#fffaf8,#eee3f0);box-shadow:var(--shadow);display:flex;align-items:center;justify-content:space-around;gap:14px;padding:14px;text-align:left;min-width:0}.topic-tile:nth-child(2n){background:linear-gradient(130deg,#fffdf8,#e0efe7)}.topic-tile:nth-child(3n){background:linear-gradient(130deg,#fffdf9,#f5e6e9)}.topic-tile:hover{transform:translateY(-2px)}.topic-symbol{min-width:62px;height:89px;background:linear-gradient(110deg,#866b98,#c5b0d3);border-radius:6px 9px 9px 4px;display:flex;justify-content:center;align-items:center;color:white;font:italic 37px Georgia,serif;text-shadow:0 2px #65496a;box-shadow:8px 7px 0 #76627e33,11px 13px 15px #6d526437}.topic-tile:nth-child(2n) .topic-symbol{background:linear-gradient(110deg,#6d9e8b,#bfdfd0)}.topic-tile:nth-child(3n) .topic-symbol{background:linear-gradient(110deg,#ba8e9b,#f1cad8)}.topic-tile strong{font:700 clamp(15px,1.6vw,20px) Georgia,serif;color:var(--deep)}.topic-tile em{display:block;font:12px sans-serif;color:#876e8a;margin-top:7px}
.workspace{flex:1;min-height:0;display:grid;grid-template-columns:132px 226px minmax(0,1fr);gap:8px}.workspace .panel{overflow:hidden}.students-sidebar{padding:8px;display:flex;flex-direction:column;gap:6px;overflow:hidden}.students-sidebar .switch{display:flex;flex-direction:column;gap:2px;padding:2px;flex:none}.students-sidebar .switch .btn{white-space:normal;min-height:29px;font-size:10px;padding:6px 3px}.student-stack{display:grid;grid-auto-rows:minmax(32px,1fr);min-height:0;flex:1;gap:5px}.student-stack .btn{min-height:0;padding:5px 4px;font-size:12px;text-align:left;justify-content:flex-start;overflow:hidden}.student-stack .initial{width:21px;height:21px;border-radius:50%;display:grid;place-items:center;background:#c6abcf;color:white;margin-right:3px;font-size:11px;flex:none}.student-stack .btn.active{background:#8869a7;color:white;border-color:#80619f;box-shadow:0 4px 10px #6a4b8133}.student-stack .btn.active .initial{background:#ffffff40}.side-nav{padding:9px;display:flex;flex-direction:column;gap:7px;min-height:0}.side-nav h3{font:700 14px Georgia,serif;color:var(--deep);margin:2px 0 3px}.number-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:4px;align-content:start;min-height:0;flex:1;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin}.number-grid .btn{font-size:12px;min-height:29px;padding:4px 0;border-radius:8px}.number-grid .btn.active,.task-list .btn.active{background:linear-gradient(135deg,#906ab4,#70538d);border-color:#8663ab;color:white;box-shadow:0 4px 8px #64488233}.label-mini{font-size:11px;color:var(--muted);font-weight:600}.checks-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}.check-tile{border:1px solid var(--stroke);border-radius:9px;display:flex;align-items:center;justify-content:center;gap:4px;background:#fff;min-height:33px;font-size:12px;color:var(--deep)}.check-tile.done{color:white;background:linear-gradient(135deg,#8e6baa,#776094);border-color:#856aa0}.tiny-sub{font-size:11px;color:var(--muted)}.source-switch{display:flex;gap:4px;flex-wrap:wrap}.source-switch .btn{font-size:10px;padding:6px 7px;min-height:27px}.task-list{display:grid;grid-auto-rows:30px;gap:4px;overflow-y:auto;min-height:0;flex:1;overscroll-behavior:contain;scrollbar-width:thin}.task-list .btn{display:flex;justify-content:space-between;width:100%;padding:5px 8px;min-height:30px;font-size:12px}.task-list b{font-weight:500}.task-list .tick{font-weight:700;color:#5e9c79}.task-list .btn.active .tick{color:white}.viewer{min-width:0;display:flex;flex-direction:column;overflow:hidden;position:relative}.viewerbar{height:39px;flex:none;padding:4px 8px;display:flex;align-items:center;gap:5px;background:#fcf9f8;border-bottom:1px solid var(--stroke)}.viewerbar .btn{min-height:29px;font-size:11px;padding:6px 8px}.viewerbar .btn.iconbtn{width:30px;padding:5px}.viewerbar .viewer-title{font-size:12px;font-weight:700;color:var(--plum);padding:0 4px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:35px}.viewerbar .pageind{font-size:11px;color:var(--muted);padding:0 5px;white-space:nowrap}.viewerbar .switch{padding:2px}.viewerbar .switch .btn{min-height:25px;padding:4px 7px}.viewer-canvas{flex:1;min-height:0;overflow:auto;background:linear-gradient(145deg,#e9e3e5,#d5cbcf);overscroll-behavior:contain;scrollbar-width:thin;position:relative}.paper-row{min-height:100%;display:flex;justify-content:center;align-items:flex-start;padding:10px;gap:0}.paper{position:relative;background:white;box-shadow:0 5px 15px #4f454440;overflow:hidden;flex:none}.paper>img{width:100%;height:auto;display:block;user-select:none;-webkit-user-drag:none}.paper.one{border-radius:4px}.paper.left{border-radius:6px 0 0 6px;box-shadow:inset -8px 0 14px #44344424,0 4px 14px #4c404450}.paper.right{border-radius:0 6px 6px 0;box-shadow:inset 8px 0 15px #44344424,6px 4px 14px #4c404450}.paper.left:after{content:'';position:absolute;right:0;top:0;bottom:0;width:25px;background:linear-gradient(90deg,transparent,#4f455024);pointer-events:none}.paper.right:after{content:'';position:absolute;left:0;top:0;bottom:0;width:27px;background:linear-gradient(90deg,#4f455025,transparent);pointer-events:none}.viewer-empty{height:100%;display:flex;justify-content:center;align-items:center;flex-direction:column;text-align:center;padding:30px;gap:12px}.viewer-empty h3{font:700 23px Georgia,serif;margin:0;color:var(--deep)}.viewer-empty p{margin:0;color:#8a7b88;max-width:400px;line-height:1.5;font-size:13px}.viewer-empty .btn{margin-top:8px}.viewer-page-mark{position:absolute;right:13px;bottom:13px;border-radius:20px;background:#fffdfbe8;padding:6px 10px;color:var(--muted);font-size:11px;box-shadow:var(--smshadow)}.notice{font-size:12px;color:#846d78;background:#fff7f3;padding:8px;border:1px dashed #dbc5d5;border-radius:11px;line-height:1.35}.editor-overlay{position:absolute;top:48px;right:12px;z-index:8;background:#fffdf9f5;border:1px solid var(--stroke);box-shadow:var(--shadow);border-radius:15px;padding:13px;width:265px}.editor-overlay h3{margin:0 0 8px;font:700 17px Georgia,serif}.editor-overlay input{width:90px;border:1px solid var(--stroke);border-radius:7px;padding:6px}.editor-overlay p{font-size:12px;color:var(--muted)}
.part1-layout{display:flex;flex-direction:column;gap:10px;min-height:0;flex:1}.part1-topics{display:grid;grid-template-columns:repeat(13,minmax(0,1fr));gap:5px;height:122px;flex:none}.part1-topic{border:1px solid var(--stroke);background:linear-gradient(140deg,#fffbf9,#f1e6f3);box-shadow:var(--smshadow);border-radius:14px;padding:6px 3px;min-width:0;text-align:center;display:flex;flex-direction:column;justify-content:space-around;align-items:center;color:var(--deep)}.part1-topic:nth-child(3n){background:linear-gradient(140deg,#fffdf9,#e4f0e8)}.part1-topic.active{outline:2px solid #9b78ad;background:#e8dbea}.part1-topic .glyph{font:italic bold 27px Georgia,serif;color:#8f6c9a}.part1-topic strong{font-size:19px}.part1-topic small{font-size:9px;line-height:1.2;word-break:break-word}.part1-work{display:grid;grid-template-columns:130px 195px minmax(0,1fr);gap:9px;flex:1;min-height:0}.problem{padding:18px 22px;overflow:auto;line-height:1.5}.problem h2{font:700 20px Georgia,serif;color:var(--deep);margin:0 0 12px}.problem figure{margin:15px auto;text-align:center}.problem img{max-width:100%;max-height:430px;object-fit:contain}.problem p{line-height:1.7;white-space:pre-wrap}.answer{background:#f5ebf3;border:1px solid var(--stroke);border-radius:11px;padding:11px 17px;display:inline-flex;gap:14px;margin-top:16px;color:#6b4b69;font-weight:600}.problem-empty{height:100%;display:flex;align-items:center;justify-content:center;text-align:center;flex-direction:column;gap:11px;color:var(--muted)}.problem-empty strong{font:700 23px Georgia,serif;color:var(--deep)}
.stats-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px;flex:1;min-height:0}.stats-panel{padding:12px 14px;display:flex;flex-direction:column;overflow:hidden}.stats-panel h2{font:700 clamp(15px,1.5vw,20px) Georgia,serif;color:var(--deep);margin:0}.chart{flex:1;min-height:0;display:flex;align-items:flex-end;justify-content:space-around;gap:8px;padding:8px 8px 11px;border-bottom:2px solid #dccdd9}.chart-col{flex:1;min-width:0;height:100%;display:flex;align-items:center;flex-direction:column;justify-content:flex-end;gap:5px;cursor:pointer}.chart-col .bar{width:min(64px,90%);height:var(--h);min-height:8px;position:relative;border-radius:8px 8px 3px 3px;background:linear-gradient(90deg,#86699d,#bda7d0);box-shadow:inset -7px 0 10px #6f577d3d,6px 5px 0 #5d46673f,8px 8px 13px #5d466729}.chart-col.selected .bar{background:linear-gradient(90deg,#8c65aa,#c8b0da);outline:2px solid #775892}.chart-col .bar.missing{background:#ece3e9;box-shadow:inset -4px 0 #d6c6d4}.chart-col .bar.sage{background:linear-gradient(90deg,#6f9f8e,#b6d2c4);box-shadow:inset -7px 0 #548f7740,6px 5px 0 #4b826e33,8px 7px 14px #5d46671c}.chart-col .barlabel{position:absolute;top:-23px;left:50%;transform:translateX(-50%);font-weight:700;font-size:12px;color:var(--plum)}.chart-col.selected .barlabel{font-size:14px}.chart-col .bottom-num{font-size:11px;color:var(--deep);white-space:nowrap;font-weight:600}.chart-col .below{font-size:10px;color:var(--muted)}.chartfoot{min-height:26px;padding-top:8px;display:flex;justify-content:space-between;color:var(--muted);font-size:11px}.rankstrip{flex:1;min-height:0;display:flex;align-items:flex-end;gap:4px;justify-content:space-around;padding:8px 6px 11px;border-bottom:2px solid #dccdd9}.rankstrip .chart-col{min-width:0}.rankstrip .bottom-num{font-size:10px}.rankstrip .bar{width:min(40px,88%)}.stats-settings{display:flex;align-items:center;gap:8px;flex:none}.muted{color:var(--muted)}.dialog-backdrop{position:absolute;inset:0;z-index:40;background:#382d3e80;display:flex;align-items:center;justify-content:center;padding:18px;backdrop-filter:blur(3px)}.modal{width:min(700px,100%);max-height:min(760px,95%);overflow:auto;border-radius:22px;padding:18px 20px 20px;background:var(--paper);border:1px solid white;box-shadow:0 30px 75px #1b101b5f}.modal.wide{width:min(860px,100%)}.modalhead{display:flex;align-items:center;gap:12px;margin-bottom:11px}.modalhead h2{margin:0;font:700 24px Georgia,serif;color:var(--deep);flex:1}.modal p{font-size:12px;color:var(--muted);line-height:1.55}.score-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:9px;max-height:46vh;overflow:auto;padding:3px}.score-cell{border:1px solid var(--stroke);border-radius:13px;background:#fffdfc;padding:9px 5px;text-align:center;display:flex;flex-direction:column;gap:5px}.score-cell b{color:var(--plum);font-size:14px}.score-cell small{color:var(--muted);font-size:10px}.score-choices{display:flex;justify-content:center;gap:3px;flex-wrap:wrap}.score-choices .btn{min-width:28px;padding:4px;min-height:28px;font-size:12px}.score-choices .btn.active{background:var(--plum);color:white}.score-summary{padding:11px 13px;background:#f0e8f1;border-radius:12px;display:flex;gap:20px;align-items:center;justify-content:space-between;margin:13px 0}.score-summary strong{font:700 24px Georgia,serif;color:var(--deep)}.modalactions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.scale-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;max-height:55vh;overflow:auto}.scale-item{border:1px solid var(--stroke);border-radius:9px;padding:5px;background:#fffcfa;text-align:center}.scale-item span{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}.scale-item input{width:100%;min-width:0;border:1px solid #e2d2db;border-radius:6px;text-align:center;padding:6px}.input-line{display:flex;gap:10px;align-items:center;margin:12px 0}.input-line input,.input-line select{border:1px solid #d9c8d4;border-radius:9px;padding:9px;min-width:0;flex:1}.toast{position:absolute;z-index:70;bottom:22px;left:50%;transform:translateX(-50%);background:#514057;color:#fff;padding:12px 18px;border-radius:12px;box-shadow:var(--shadow);font-size:13px;max-width:80%;text-align:center}.offline-modal{width:min(520px,100%)}.progressbar{background:#e7dce7;height:12px;border-radius:20px;overflow:hidden}.progressbar>div{height:100%;background:linear-gradient(90deg,#8f6daf,#8bad9b);transition:width .2s}.tiny-scroll{overflow:auto;min-height:0;scrollbar-width:thin} .hint{padding:10px 12px;border:1px dashed var(--stroke);border-radius:11px;background:#fffdfabf;font-size:12px;color:var(--muted)}.disclaimer{font-size:11px;color:#947c84}body.orientation:after{content:'Для удобной работы поверните iPad в альбомное положение';z-index:100;position:fixed;inset:0;background:#f8f1ec;color:#654b6a;display:grid;place-items:center;text-align:center;padding:25px;font:700 24px Georgia,serif}
@media(max-width:1000px){.appbar{padding-left:10px;padding-right:10px}.screen{padding:9px;gap:7px}.workspace{grid-template-columns:110px 183px minmax(0,1fr);gap:6px}.student-stack{gap:3px}.students-sidebar .btn{font-size:11px}.brand-sub{display:none}.part1-work{grid-template-columns:110px 165px minmax(0,1fr)}.home-tile{padding:15px}.book-tile{padding:12px}.topic-tile{padding:8px;gap:7px}.topic-symbol{min-width:46px;height:76px;font-size:30px}.viewerbar{gap:2px;padding:3px}.viewerbar .btn{padding:5px}.appbar-actions .status{display:none}.part1-topics{height:110px}.part1-topic small{font-size:8px}}
@media(max-height:720px){.appbar{height:49px}.brand-symbol{height:33px;width:33px;font-size:22px}.screen{padding:7px 10px;gap:6px}.hero{height:95px;min-height:95px}.hero-emblem{height:67px;width:72px;font-size:44px}.home-grid{gap:10px}.home-tile{padding:10px 18px}.home-tile .art-book{width:75px;height:91px;font-size:47px}.home-tile .art-book:before{height:85px}.student-stack{gap:2px}.student-stack .btn{padding:3px 4px}.student-stack .initial{height:18px;width:18px;font-size:10px}.number-grid .btn{min-height:25px}.checks-grid .check-tile{min-height:27px}.part1-topics{height:91px}.part1-topic .glyph{font-size:21px}.part1-topic strong{font-size:16px}.part1-topic small{font-size:8px}.pagehead{min-height:28px}.chart{padding-top:1px}.stats-panel{padding:8px 11px}}

/* Согласованная редакция: альбомный iPad, книги внутри карточки, максимум места для PDF */
:root{--plum:#755478;--deep:#543b59;--sage:#89aa9b;--stroke:#ddcbd7;--shadow:0 14px 30px #73566b19,0 4px 10px #72506314}
#app{background:radial-gradient(ellipse at 0% 15%,#f1e0e8 0,transparent 39%),radial-gradient(ellipse at 100% 100%,#e4efe7 0,transparent 39%),#faf3ee}
.appbar{background:linear-gradient(105deg,#fffaf7,#f4e9f1);height:56px}
.appbar .brand-symbol{border-radius:50%;background:linear-gradient(140deg,#dac2e1,#eaf1e7)}
.screen-home{padding:11px 15px 14px;gap:11px}
.hero-elegant{height:98px;min-height:98px;justify-content:center;gap:15px;background:linear-gradient(125deg,#fffbf7,#f3e6ed 54%,#e8f1e9);border-radius:24px}
.hero-elegant h1{font:700 clamp(27px,3.1vw,39px) Georgia,serif;text-align:center}
.hero-elegant p{text-align:center;font:14px Georgia,serif;margin:3px 0 0}
.hero-elegant .hero-emblem{width:65px;height:65px;font-size:40px;border-radius:20px}
.hero-elegant .hero-lines{position:absolute;right:5%;bottom:7px;font:italic 38px Georgia,serif;color:#90759d30;pointer-events:none}
.hero-elegant:after{display:none}
.screen-home .home-grid{gap:14px}
.screen-home .home-tile{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:6px;border:1px solid #e4d0dc;border-radius:25px;background:linear-gradient(150deg,#fff9f8,#f2e4f0);box-shadow:0 15px 24px #6d516925,inset 0 2px 0 #ffffffd9,0 1px 0 #fff;text-align:center;padding:10px 16px;min-width:0}
.screen-home .home-part2{background:linear-gradient(145deg,#fff8f8,#e9daec)}
.screen-home .home-stats{background:linear-gradient(140deg,#f8faf6,#e0eee6)}
.screen-home .home-books{background:linear-gradient(145deg,#fff9f5,#e2eee5);justify-content:space-between;padding:8px 11px 9px;gap:0}
.screen-home .home-books h2{font:700 clamp(19px,2vw,26px) Georgia,serif;color:var(--deep);margin:0;line-height:1.1}
.screen-home .home-illustration{height:75%;max-width:85%;object-fit:contain;border-radius:20px;mix-blend-mode:multiply;filter:drop-shadow(0 8px 6px #71596f1e)}
.screen-home .home-title{font:700 clamp(19px,2.1vw,30px)/1.12 Georgia,serif;color:var(--deep);text-shadow:0 1px #fff}
.screen-home .home-books-pair{height:86%;width:100%;display:flex;justify-content:center;gap:10px;min-height:0}
.screen-home .book-shortcut{position:relative;display:flex;justify-content:center;align-items:center;width:44%;max-width:235px;height:100%;border:none;background:transparent;border-radius:17px;padding:2px;cursor:pointer;transition:transform .16s ease,filter .16s ease}
.screen-home .book-shortcut:hover,.screen-home .book-shortcut:focus-visible{transform:translateY(-5px);filter:drop-shadow(0 7px 6px #795a7450)}
.screen-home .book-shortcut img{max-width:100%;width:100%;height:100%;object-fit:contain;border-radius:12px;mix-blend-mode:multiply;filter:drop-shadow(4px 7px 4px #654c6630)}
.topic-choice-screen{padding:11px 16px 16px;gap:11px}
.topic-choice-screen .pagehead{justify-content:space-between}
.topic-choice-screen .pagehead h1{text-align:center;margin-right:90px;font-size:27px}
.topic-choice-screen .studentrow{justify-content:center;gap:7px}
.topic-choice-screen .studentrow .btn{border-radius:14px}
.topic-books{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:14px;flex:1;min-height:0;padding:4px 6px 6px}
.topic-book-card{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow:hidden;border:1px solid #e7d4d9;border-radius:21px;background:linear-gradient(143deg,#fffaf8,#f2e6f1);box-shadow:var(--shadow),inset 0 2px #fff;padding:7px;min-width:0;min-height:0;transition:transform .15s,box-shadow .15s;position:relative}
.topic-book-card:nth-child(2n){background:linear-gradient(140deg,#fffaf8,#e4efe7)}
.topic-book-card:nth-child(3n){background:linear-gradient(140deg,#fffafa,#f3e1e8)}
.topic-book-card:hover{transform:translateY(-3px);box-shadow:0 18px 22px #755b6c33}
.topic-book-card img{width:auto;max-width:100%;height:95%;object-fit:contain;border-radius:9px;mix-blend-mode:multiply;filter:drop-shadow(4px 5px 4px #66526732)}
.topic-book-title{position:absolute;clip-path:inset(100%);width:1px;height:1px;overflow:hidden;white-space:nowrap}
.topic-book-pending{position:absolute;bottom:5px;left:10%;right:10%;color:#816587;font-size:11px;font-weight:600;border-radius:10px;background:#fffcf8e9;padding:4px}
.work-screen{padding:4px 6px 5px;gap:0}
.work-screen .workspace{grid-template-columns:clamp(112px,11.3vw,146px) clamp(204px,19.8vw,254px) minmax(0,1fr);gap:6px;height:100%;flex:1}
.work-screen .students-sidebar{padding:7px 6px;gap:5px;background:linear-gradient(165deg,#fffafc,#f6edf4)}
.work-screen .sidebar-top-actions{display:flex;gap:4px;flex:none;align-items:center}
.work-screen .sidebar-top-actions .btn:not(.iconbtn){flex:1;font-size:11px}
.work-screen .students-sidebar .student-stack{gap:4px}
.work-screen .students-sidebar .student-stack .btn{border-radius:13px;background:#fffafc;box-shadow:0 2px 5px #6749670d}
.work-screen .students-sidebar .student-stack .btn.active{background:linear-gradient(140deg,#997ab2,#775694);box-shadow:0 5px 8px #79608b28;color:#fff}
.work-screen .students-sidebar .switch{margin:0;flex:none}
.work-screen .side-nav{padding:9px;gap:7px;background:linear-gradient(155deg,#fffefa,#fbf3f8)}
.work-screen .side-nav h3{font:700 15px Georgia,serif;line-height:1.17;margin:1px 0}
.work-screen .number-grid{flex:none;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:28px;overflow:visible;gap:4px}
.work-screen .number-grid .btn{min-height:28px;font-size:12px;padding:3px 0}
.work-screen .checks-grid{grid-template-columns:repeat(4,minmax(0,1fr));flex:none;gap:4px}
.work-screen .checks-grid .check-tile{min-height:29px}
.work-screen .viewer{border-radius:14px;overflow:hidden;box-shadow:0 6px 15px #50354f26;border:1px solid #e6d9dc}
.work-screen .viewer-canvas{height:100%;background:linear-gradient(110deg,#e4dadd,#f0e7e7 36%,#dfd6dd);overflow:auto}
.work-screen .viewer .paper-row{padding:4px;min-height:100%}
.work-screen .viewer .paper{box-shadow:0 6px 12px #55445940}
.work-screen .viewer .viewer-empty{height:100%}
.pdf-controls{margin-top:auto;border:1px solid #e6d7e2;border-radius:13px;padding:8px 7px;background:linear-gradient(145deg,#f8f0f6,#f1e7ee);box-shadow:inset 0 1px #fff;display:flex;flex-direction:column;gap:5px;flex:none}
.pdf-controls .label-mini{font-size:11px;color:#705b75}
.ctrl-row{display:flex;align-items:center;gap:4px;flex-wrap:wrap;min-height:25px}
.pdf-controls .ctrl-row .btn{font-size:11px;min-height:27px;padding:5px 7px;border-radius:9px;flex:0 0 auto}
.pdf-controls .ctrl-row .btn.iconbtn{min-width:29px;max-width:29px;padding:5px}
.pdf-controls .ctrl-row .btn.active{background:#805ca0;color:#fff;border-color:#805ca0}
.pdf-controls .ctrl-row .pageind{font-size:11px;color:#6b526d;font-weight:700;background:#fffdfa;border:1px solid #e3d4e0;border-radius:9px;padding:6px 8px}
.pdf-controls .ctrl-row .tiny-sub{font-size:10px}
.compact-task-heading{display:flex;align-items:center;justify-content:space-between;gap:4px;flex:none}
.compact-task-heading .btn{font-size:11px}
.task-preview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:29px;gap:3px;align-content:start;overflow:hidden;min-height:0;flex:1}
.task-cell{position:relative;border-radius:8px;border:1px solid #e5d3df;background:#fffdfb;box-shadow:0 2px 4px #6c55700b;display:flex;align-items:center;min-width:0;overflow:hidden}
.task-cell.active{background:#8764a8;border-color:#82619e;color:#fff}
.task-cell.done:not(.active){border-color:#a5c7b6;background:#e6f1e9}
.task-cell .task-number{border:0;background:transparent;color:inherit;font-size:11px;font-weight:600;min-width:0;flex:1;height:100%;padding:0 4px 0 2px;text-align:center}
.task-cell .task-check{border:none;border-radius:0;background:transparent;color:#a68bb0;font-size:12px;width:17px;height:100%;padding:0;display:grid;place-items:center;flex:none}
.task-cell.done .task-check{color:#37836a;font-weight:800}
.task-cell.active .task-check{color:#fff}
.all-tasks-modal{width:min(1120px,100%);max-height:94%;display:flex;flex-direction:column;gap:6px;padding:15px 16px}
.all-tasks-modal .modalhead{margin-bottom:2px}
.all-tasks-modal .modalhead h2{font-size:22px}
.all-tasks-modal p{margin:0 0 4px}
.all-tasks-grid{display:grid;grid-template-columns:repeat(12,minmax(0,1fr));grid-auto-rows:31px;gap:5px;overflow-y:auto;min-height:0;flex:1;padding:4px 3px 8px}
.all-tasks-grid .task-number{font-size:13px}
.all-tasks-grid .task-check{width:23px;font-size:15px}
.all-tasks-modal .modalactions{margin-top:3px;flex:none}
@media(max-width:1050px){.work-screen .workspace{grid-template-columns:112px 213px minmax(0,1fr)}.work-screen .side-nav{padding:7px;gap:5px}.work-screen .number-grid{grid-auto-rows:26px}.work-screen .number-grid .btn{min-height:26px}.task-preview{grid-auto-rows:27px}.ctrl-row{gap:3px}.pdf-controls{padding:5px}.pdf-controls .ctrl-row .btn{font-size:10px;padding:4px 6px}.topic-books{gap:9px}}
@media(max-height:720px){.hero-elegant{height:76px;min-height:76px}.hero-elegant .hero-emblem{height:54px;width:54px;font-size:30px}.topic-choice-screen{gap:5px}.topic-book-card{padding:3px}.work-screen .students-sidebar .student-stack{gap:2px}.work-screen .number-grid{grid-auto-rows:23px;gap:3px}.work-screen .number-grid .btn{min-height:23px}.work-screen .checks-grid .check-tile{min-height:23px}.work-screen .side-nav{gap:4px;padding:6px}.work-screen .pdf-controls{gap:3px;padding:4px 5px}.work-screen .ctrl-row{min-height:21px}.work-screen .pdf-controls .ctrl-row .btn{min-height:24px;padding:3px 5px}.work-screen .task-preview{grid-auto-rows:23px}.work-screen .task-cell .task-number{font-size:10px}}
/* На первых трёх карточках подписи уже нанесены на исходные иллюстрации утверждённого макета. */
.screen-home .home-tile:not(.home-books) .home-title{display:none}
.screen-home .home-tile:not(.home-books) .home-illustration{height:96%;max-height:96%;width:auto;max-width:90%;object-fit:contain}
.screen-home .home-books-pair{height:87%}
.topic-book-card img{height:94%;max-width:89%;object-fit:contain}
/* Семь книг: четыре сверху и три по центру второго ряда */
.topic-books{grid-template-columns:repeat(8,minmax(0,1fr))}
.topic-book-card{grid-column:span 2}
.topic-book-card:nth-child(5){grid-column:2 / span 2}

/* v3 — iPad 11 / визуальная редакция по замечаниям №7–13. Данные и исходные PDF не меняются. */
:root{--shadow:0 16px 30px #70516f1b,0 3px 9px #725a7012;--deep:#543d5c}
.appbar{height:57px;min-height:57px;background:linear-gradient(100deg,#fffbf8,#f4ebf1 52%,#edf4ed);box-shadow:0 3px 15px #66506509}
.appbar .brand-symbol{background:linear-gradient(140deg,#e4d2e8,#e5f0e6);box-shadow:inset 0 2px #fff,2px 4px 12px #7558751d}
.screen-home{padding:13px 18px 17px;gap:0}
.screen-home .home-grid{grid-template-rows:repeat(2,minmax(0,1fr));gap:14px}
.screen-home .home-tile{padding:0;isolation:isolate;display:flex;justify-content:center;align-items:center;overflow:hidden;border:1px solid #e4d1de;border-radius:28px;box-shadow:0 16px 25px #725b7729,inset 0 2px 1px #ffffffed;transition:box-shadow .2s,transform .2s;background:radial-gradient(ellipse at 15% 15%,#fffdfa,#f1e1ef)}
.screen-home .home-part2{background:radial-gradient(ellipse at 15% 15%,#fff8fc,#e9dded)}
.screen-home .home-stats{background:radial-gradient(ellipse at 15% 15%,#fffcf6,#e0eee6)}
.screen-home .home-tile:hover,.screen-home .home-tile:focus-visible{transform:translateY(-2px);box-shadow:0 18px 29px #66507333,inset 0 2px 1px #fff}
.screen-home .home-tile:not(.home-books) .home-illustration{height:100%;max-height:100%;width:100%;max-width:100%;object-fit:contain;mix-blend-mode:multiply;border-radius:23px;filter:drop-shadow(0 14px 14px #5b415e30);transform:scale(1.18);transition:transform .22s}
.screen-home .home-tile:not(.home-books):hover .home-illustration{transform:scale(1.23)}
.screen-home .home-books{padding:10px 14px 8px;gap:0;display:flex;flex-direction:column;justify-content:space-between;background:radial-gradient(ellipse at 20% 10%,#fffdf7,#e3efe7)}
.screen-home .home-books h2{font:italic 700 clamp(19px,2vw,29px) Georgia,serif;letter-spacing:-.4px;margin:0;flex:none}
.screen-home .home-books-pair{height:calc(100% - 36px);width:100%;max-width:100%;gap:1%;min-height:0;align-items:center}
.screen-home .book-shortcut{height:100%;max-width:none;width:49%;border-radius:17px;filter:drop-shadow(5px 11px 10px #5e4c6530);transition:transform .18s,filter .18s}
.screen-home .book-shortcut:nth-child(1){transform:perspective(750px) rotateY(-6deg) rotate(-2deg)}
.screen-home .book-shortcut:nth-child(2){transform:perspective(750px) rotateY(6deg) rotate(2deg)}
.screen-home .book-shortcut:hover{transform:translateY(-6px) scale(1.05);filter:drop-shadow(7px 13px 11px #654f7044)}
.screen-home .book-shortcut img{height:100%;width:100%;max-width:100%;object-fit:contain;filter:none;border-radius:10px}
.topic-choice-screen{padding:11px 17px 15px;gap:9px}
.topic-choice-screen .pagehead{min-height:40px}
.topic-choice-screen .studentrow{margin-bottom:2px}
.topic-choice-screen .studentrow .btn{min-height:44px;padding:9px 12px}
.topic-books{grid-template-columns:repeat(8,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:12px;padding:0 3px 5px}
.topic-book-card{grid-column:span 2;padding:1px;overflow:visible;border-radius:19px;border:1px solid #e1d2df48;background:radial-gradient(ellipse at 50% 65%,#f5ecf2 0%,#fbf4f7 54%,transparent 78%);box-shadow:0 9px 15px #6a5a6812,inset 0 2px 2px #fff;isolation:isolate}
.topic-book-card:nth-child(2n){background:radial-gradient(ellipse at 45% 55%,#e7f0e9,#f9faf6 63%,transparent 82%)}
.topic-book-card:nth-child(3n){background:radial-gradient(ellipse at 40% 50%,#f5e1e8,#fff8fa 63%,transparent 82%)}
.topic-book-card:nth-child(5){grid-column:2/span 2}
.topic-book-card img{height:100%;width:100%;max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(8px 12px 8px #705e6c48);mix-blend-mode:multiply;transform:scale(1.08);transition:transform .19s,filter .19s}
.topic-book-card:hover img{transform:scale(1.15) translateY(-4px);filter:drop-shadow(12px 15px 11px #705e6c58)}
.topic-book-card:hover{background:linear-gradient(135deg,#fff7fa,#f2e7f0);box-shadow:0 12px 22px #70576e28}
/* Большие интерактивные области на рабочих экранах */
.work-screen .workspace{grid-template-columns:clamp(119px,11.2vw,146px) clamp(242px,21vw,296px) minmax(0,1fr);gap:6px}
.work-screen .students-sidebar{padding:5px;gap:5px}
.work-screen .sidebar-top-actions{min-height:44px}
.work-screen .sidebar-top-actions .btn{min-height:44px!important}
.work-screen .students-sidebar .student-stack{grid-auto-rows: minmax(42px,1fr);gap:3px}
.work-screen .students-sidebar .student-stack .btn{font-size:12px;padding:5px 5px;border-radius:11px}
.work-screen .students-sidebar .switch .btn{min-height:40px;font-size:11px}
.work-screen .side-nav{padding:7px;gap:5px;background:linear-gradient(150deg,#fffdfb,#fbf2f8)}
.work-screen .side-nav h3{font-size:15px;line-height:1.12;margin:0;min-height:19px}
.work-screen .number-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:minmax(38px,1fr);gap:4px}
.work-screen .number-grid .btn{min-height:42px;font-size:13px;border-radius:10px}
.work-screen .checks-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:4px}
.work-screen .checks-grid .check-tile{min-height:44px;max-height:48px;border-radius:10px;font-size:13px}
.work-screen .viewer{border-radius:12px;border:1px solid #ddcbd6}
.work-screen .viewer-canvas{overflow:auto;overscroll-behavior:contain}
.work-screen .viewer .paper-row{min-height:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:4px;gap:0}
.work-screen .viewer .paper-row.spread{align-items:center}
.work-screen .viewer .paper{height:auto;width:auto;min-width:0;max-width:none;flex:none}
.work-screen .viewer .paper-row.spread .paper{width:min(calc(50% * var(--pdf-zoom)),calc((100dvh - 24px) * .705 * var(--pdf-zoom)));}
.work-screen .viewer .paper-row.single .paper{width:min(calc(97% * var(--pdf-zoom)),calc((100dvh - 24px) * .705 * var(--pdf-zoom)));}
.work-screen .viewer .paper>img{width:100%;height:auto;display:block}
.work-screen .viewer .paper-row.spread .paper.left{box-shadow:5px 10px 15px #47334536, inset -14px 0 19px #6e5d6f22;border-radius:4px 0 0 4px}
.work-screen .viewer .paper-row.spread .paper.right{box-shadow:6px 10px 15px #47334536,inset 14px 0 19px #6e5d6f22;border-radius:0 4px 4px 0}
.work-screen .viewer .paper-row.spread .paper img{border-radius:1px}
.pdf-controls{gap:6px;margin-top:auto;padding:8px;border-radius:14px;box-shadow:0 4px 11px #836b7f11,inset 0 2px #fff}
.pdf-controls .label-mini{font-size:12px;font-weight:700}
.work-screen .pdf-controls .ctrl-row{gap:5px;display:flex;min-height:44px;justify-content:stretch;flex-wrap:nowrap}
.work-screen .pdf-controls .ctrl-row .touch-btn{min-height:44px;min-width:44px;font-size:12px;border-radius:10px;line-height:1.1;padding:6px 7px;flex:1;white-space:normal;text-align:center}
.work-screen .pdf-controls .ctrl-row .touch-btn.iconbtn{width:48px;max-width:48px;min-width:44px;flex:none}
.work-screen .pdf-controls .ctrl-row.ctrl-pager .pageind{height:44px;display:grid;place-items:center;flex:1;padding:0 2px;font-size:12px}
.work-screen .pdf-controls .ctrl-row.ctrl-zoom .touch-btn:nth-child(2){flex:2}
.work-screen .pdf-controls .secondary-tools{margin-top:1px}
.work-screen .pdf-controls .secondary-tools .btn{min-height:44px}
.work-screen .pdf-controls .ctrl-duo .btn{flex:1}
.work-screen .pdf-controls .ctrl-wide .btn{width:100%}
/* Один номер = одна большая сенсорная кнопка; отдельная отметка выбранного задания. */
.task-preview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:44px;gap:4px;min-height:0;overflow-y:auto;overflow-x:hidden;align-content:start;flex:1;padding:2px 0;scrollbar-width:thin;overscroll-behavior:contain}
.task-touch{width:100%;min-width:0;min-height:44px;display:flex;align-items:center;justify-content:center;gap:3px;position:relative;border:1px solid #e4d3de;border-radius:10px;background:#fffdfa;color:#57475b;font-weight:650;font-size:13px;padding:3px 2px;box-shadow:0 2px 3px #5c46580d}
.task-touch.active{background:linear-gradient(150deg,#9473ad,#72518f);color:white;border-color:#755494;box-shadow:0 4px 8px #76568a39}
.task-touch.done:not(.active){background:#e5f1e9;border-color:#a7ceba}
.task-touch .task-status{font-size:13px;color:#b2a0b3}
.task-touch.done .task-status{color:#47846a;font-weight:900}
.task-touch.active .task-status{color:white}
.compact-task-heading{min-height:44px}
.compact-task-heading .all-link{min-height:44px;padding:5px 9px;border-radius:12px;font-size:12px}
.mark-current{width:100%;border:1px solid #c7dccd;background:#e9f3eb;color:#4b7565;min-height:44px;border-radius:11px;font-weight:700;flex:none}
.mark-current.is-done{background:#8fb3a1;color:#fff}
.all-tasks-modal{width:min(1194px,99%);height:min(770px,96%);max-height:96%;padding:12px 13px;gap:7px;overflow:hidden}
.all-tasks-modal .modalhead{min-height:46px;margin:0}
.all-tasks-modal .modalhead h2{font-size:21px}
.all-tasks-grid{grid-template-columns:repeat(13,minmax(0,1fr));grid-auto-rows:44px;gap:4px;overflow-y:auto;align-content:start;flex:1;padding:2px 3px 4px;overscroll-behavior:contain}
.all-tasks-grid .task-touch{min-height:44px;font-size:14px}
/* Результаты и рейтинг: аккуратные трёхмерные диаграммы без ложных оценок */
.statistics-screen{gap:9px}
.statistics-screen .pagehead .btn{min-height:44px}
.statistics-screen .switch .btn,.statistics-screen .studentrow .btn{min-height:44px;padding:7px 12px}
.statistics-screen .stats-grid{gap:14px}
.statistics-screen .stats-panel{padding:16px 16px 14px;box-shadow:0 14px 28px #654f6b19,inset 0 2px 1px white;background:linear-gradient(155deg,#fffefb,#fff8fa)}
.statistics-screen .stats-settings h2{font:italic 700 clamp(19px,1.7vw,25px) Georgia,serif;color:#5d4466;flex:1}
.statistics-screen .chart-3d{align-items:stretch;position:relative;background:repeating-linear-gradient(to top,transparent 0,transparent calc(25% - 1px),#d9cbd826 25%);padding:15px 3px 8px}
.statistics-screen .chart-3d .chart-col{z-index:1;height:100%;min-height:0;flex:1;border:0;display:flex;flex-direction:column;gap:6px;padding:0 2px;background:transparent;box-shadow:none;justify-content:flex-end;align-items:center;cursor:pointer;color:var(--deep)}
.statistics-screen .chart-3d .chart-col:focus-visible{outline:3px solid #9574ad;border-radius:7px}
.statistics-screen .chart-3d .bar-stage{display:block;position:relative;flex:1;min-height:0;width:100%;max-width:74px}
.statistics-screen .chart-3d .bar{position:absolute;bottom:0;left:16%;width:65%;height:var(--h);min-height:0;display:block;background:linear-gradient(93deg,#735795 0%,#a98cbe 42%,#cdb9da 72%,#896da5 100%);border:1px solid #795b985c;border-radius:8px 8px 3px 3px;box-shadow:inset -8px 0 12px #65497c45,7px 5px 0 #664e7d35,9px 10px 14px #57456827}
.statistics-screen .chart-3d .bar.sage{background:linear-gradient(90deg,#709a8b,#a3c9b5,#d4e5d9);box-shadow:inset -7px 0 10px #54867030,6px 5px 0 #4779652f,9px 10px 13px #536d5d1d}
.statistics-screen .chart-3d .chosen .bar{background:linear-gradient(90deg,#7b5b9d,#b492cd,#d4bce2)}
.statistics-screen .chart-3d .barlabel{top:-25px;font-weight:800;font-size:14px;color:#60456e}
.statistics-screen .chart-3d .bottom-num{font-size:12px;line-height:1.15;min-height:18px}
.statistics-screen .chart-3d .below{font-size:11px;min-height:18px}
.statistics-screen .rankstrip .bottom-num{font-size:11px}
.statistics-screen .chart-3d .chart-empty{position:absolute;z-index:0;top:17%;left:50%;transform:translateX(-50%);width:78%;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px;pointer-events:none;color:#967f92}
.statistics-screen .chart-3d .chart-empty strong{color:#8d728a;font:italic 700 20px Georgia,serif}
.statistics-screen .chart-3d .chart-empty small{font-size:12px;line-height:1.3}
.statistics-screen .chart-3d .chart-empty .empty-symbol{font-size:40px;color:#c6aec9;opacity:.65}
.statistics-screen .chart-3d .chart-col:not(.has-value) .bar-stage{background:none}
.statistics-screen .disclaimer{line-height:1.2}
@media (max-width:1080px){.work-screen .workspace{grid-template-columns:120px 244px minmax(0,1fr)}.work-screen .pdf-controls{padding:6px;gap:4px}.work-screen .number-grid{grid-auto-rows:40px}.all-tasks-grid{grid-template-columns:repeat(12,minmax(0,1fr))}}
@media (max-height:720px){.appbar{height:49px;min-height:49px}.screen-home{padding:6px 12px 9px}.work-screen .number-grid{grid-auto-rows:35px}.work-screen .number-grid .btn{min-height:38px}.work-screen .checks-grid .check-tile{min-height:40px}.work-screen .pdf-controls .ctrl-row{min-height:40px}.work-screen .pdf-controls .ctrl-row .touch-btn{min-height:40px}.work-screen .pdf-controls .ctrl-row.ctrl-pager .pageind{height:40px}.task-preview{grid-auto-rows:42px}.task-touch{min-height:42px}.all-tasks-grid{grid-auto-rows:42px}}
/* Финальный контроль компоновки */
.topic-book-card img{transform:scale(.97)}
.topic-book-card:hover img{transform:scale(1.015) translateY(-2px)}
.work-screen .workspace:has(.number-grid) .number-grid{grid-auto-rows:44px;gap:3px}
.work-screen .workspace:has(.number-grid) .number-grid .btn{min-height:44px}
.work-screen .workspace:has(.number-grid) .pdf-controls{margin-top:auto;gap:4px;padding:6px 7px}
.work-screen .workspace:has(.number-grid) .pdf-controls .ctrl-row{min-height:44px}
.work-screen .sidebar-top-actions .btn.iconbtn{min-width:44px;width:44px;max-width:44px}
/* iPad 1024: все 180 заданий в диалоге без вертикальной прокрутки */
@media (min-width:950px) and (min-height:720px){.all-tasks-grid{grid-template-columns:repeat(13,minmax(0,1fr));grid-auto-rows:44px}}
/* Ввод баллов: полноценные сенсорные цели и разреженные кнопки */
.score-grid{grid-template-columns:repeat(4,minmax(0,1fr));max-height:55vh;gap:8px}
.score-cell{padding:7px 6px;gap:4px}
.score-choices{gap:5px}
.score-choices .btn{min-width:44px;min-height:44px;border-radius:10px;padding:8px;font-size:14px}
.score-summary{gap:10px}
@media(max-width:900px){.score-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}
/* Номера вариантов: ширина сенсорной цели не менее 44 px */
@media (min-width:1081px){.work-screen .workspace{grid-template-columns:clamp(119px,11.2vw,146px) clamp(260px,21.8vw,296px) minmax(0,1fr)}}
@media (min-width:950px) and (max-width:1080px){.work-screen .workspace{grid-template-columns:120px 258px minmax(0,1fr)}}

/* v4 — exact aspect-ratio artwork and paginated, touch-friendly task navigation */
.screen-home .home-grid {gap:14px}
.screen-home .home-tile:not(.home-books){display:flex;flex-direction:column;justify-content:space-between;align-items:center;gap:0;padding:12px 15px 11px;overflow:hidden;background:radial-gradient(ellipse at 48% 35%,#fffefb 0%,#f5eaf2 56%,#ead8e8 100%)}
.screen-home .home-tile.home-part2{background:radial-gradient(ellipse at 48% 35%,#fff9fb 0%,#f0e6f1 56%,#e8dded 100%)}
.screen-home .home-tile.home-stats{background:radial-gradient(ellipse at 48% 35%,#fffdfa 0%,#eaf3ed 60%,#d7e8df 100%)}
.screen-home .home-tile:not(.home-books) .home-illustration,
.screen-home .home-tile:not(.home-books):hover .home-illustration {
 height:min(81%,270px);width:95%;max-width:95%;max-height:81%;object-fit:contain;
 border-radius:20px;transform:none;filter:drop-shadow(0 12px 13px #745f7428);mix-blend-mode:normal
}
.screen-home .home-tile:not(.home-books):hover .home-illustration{transform:translateY(-3px)}
.home-v4-caption{font:700 clamp(20px,2vw,31px)/1.05 Georgia,serif;text-align:center;color:#60476e;display:flex;flex-direction:column;justify-content:center;min-height:47px;letter-spacing:.1px;text-shadow:0 1px white}
.home-v4-caption small{font-size:.77em}
.screen-home .home-books{background:radial-gradient(ellipse at 50% 22%,#fffdf8,#ebf4eb 62%,#dcebe4);padding:10px 18px}
.screen-home .home-books-pair{height:calc(100% - 43px);align-items:stretch;gap:1%;}
.screen-home .book-shortcut{height:100%;width:49%;padding:3px;filter:none}
.screen-home .book-shortcut img{width:100%;height:100%;max-height:100%;object-fit:contain;transform:none;filter:drop-shadow(0 11px 10px #67496840)}
.screen-home .book-shortcut:hover img{transform:translateY(-5px) scale(1.02)}
.topic-books{grid-template-rows:repeat(2,minmax(0,1fr));gap:10px;padding:4px 3px 4px}
.topic-book-card{overflow:hidden;padding:7px;background:radial-gradient(ellipse at 55% 35%,#fffdfa 0%,#f5e9f1 58%,#eadde9 100%);border:1px solid #e1d2df;border-radius:20px;box-shadow:0 12px 19px #674b6120,inset 0 2px #fff}
.topic-book-card:nth-child(2n){background:radial-gradient(ellipse at 55% 35%,#fffdf9 0%,#e8f2ed 62%,#d8e8df 100%)}
.topic-book-card img,.topic-book-card:hover img{width:100%;height:100%;max-height:100%;max-width:100%;object-fit:contain;border-radius:0;mix-blend-mode:normal;transform:none;filter:drop-shadow(0 12px 9px #6849663d)}
.topic-book-card:hover img{transform:translateY(-3px)}
/* A single row of numbers is a page, never a scrollable list. */
.work-screen .workspace:has(.task-nav-v4){grid-template-columns:clamp(116px,11vw,146px) clamp(258px,23vw,324px) minmax(0,1fr)}
.task-nav-v4{gap:6px}
.task-nav-v4 .task-preview{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(6,minmax(46px,1fr));grid-auto-rows:unset;flex:1;min-height:275px;max-height:360px;align-content:stretch;gap:5px;overflow:hidden}
.task-nav-v4 .task-touch{width:100%;min-width:0;min-height:46px;height:100%;padding:0 2px;display:flex;flex-direction:column;justify-content:center;gap:0;border-radius:11px;font-weight:700;font-size:14px;touch-action:manipulation}
.task-nav-v4 .task-touch .task-status{font-size:13px;line-height:1;margin-top:2px}
.task-pager-title{display:flex;align-items:center;justify-content:space-between;min-height:26px;gap:8px}
.task-pager-title strong{font-size:13px;color:#66476b;white-space:nowrap}
.task-pager-controls{display:grid;grid-template-columns:56px minmax(0,1fr) 56px;align-items:center;gap:8px;min-height:48px;flex:none}
.task-pager-controls .btn{height:48px;width:56px;min-width:56px;font-size:22px;border-radius:13px;touch-action:manipulation}
.task-pager-controls .task-page-counter{text-align:center;font-size:16px;font-weight:700;color:#63486c;white-space:nowrap}
.task-pager-controls .btn:disabled{opacity:.35;cursor:default;pointer-events:none}
.task-nav-v4 .mark-current{min-height:47px;font-size:13px;letter-spacing:.1px}
.task-nav-v4 .pdf-controls{margin-top:auto;flex:none;padding:7px;gap:5px}
.task-nav-v4 .pdf-controls .ctrl-row .touch-btn{min-height:44px}
@media(max-height:775px){.task-nav-v4 .task-preview{grid-template-rows:repeat(6,minmax(39px,1fr));min-height:235px;max-height:295px;gap:3px}.task-nav-v4 .task-touch{min-height:39px;font-size:13px}.task-nav-v4 .mark-current{min-height:42px}.task-nav-v4 .pdf-controls .ctrl-row .touch-btn{min-height:40px}}
@media(max-width:1080px){.work-screen .workspace:has(.task-nav-v4){grid-template-columns:112px 280px minmax(0,1fr)}}

/* Version 5 — approved editorial three-dimensional illustration system. */
.screen-home{padding:10px 13px 13px;}
.screen-home .home-grid{gap:13px;grid-template-rows:repeat(2,minmax(0,1fr));}
.screen-home .home-tile{border:1px solid #e7d6dc;border-radius:25px;box-shadow:0 9px 17px #79637518,0 17px 35px #74576e16,inset 0 2px 2px #fff;isolation:isolate;overflow:hidden}
.screen-home .home-tile:not(.home-books),
.screen-home .home-tile.home-part2,
.screen-home .home-tile.home-stats{
 display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;padding:11px 14px 9px;
 background:linear-gradient(135deg,#fff9f5 1%,#f9edf4 48%,#f1e2ee 100%);
}
.screen-home .home-tile.home-stats{background:linear-gradient(135deg,#fffdfa 1%,#f1f4e9 55%,#e1efe8 100%)}
.screen-home .home-tile:not(.home-books) img.v5-main-art,
.screen-home .home-tile:not(.home-books):hover img.v5-main-art{
 width:100%;height:calc(100% - 50px);object-fit:contain;object-position:center;max-width:100%;max-height:calc(100% - 50px);
 border-radius:20px;display:block;transform:none;mix-blend-mode:normal;
 filter:drop-shadow(0 8px 12px #7a5d7136);transition:transform .18s ease;
}
.screen-home .home-tile:not(.home-books):hover img.v5-main-art{transform:translateY(-3px)}
.v5-tile-label{font:700 clamp(20px,2.3vw,33px)/1.08 Georgia,serif;color:#61476b;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center;min-height:45px;white-space:normal;text-shadow:0 1px 0 #fff}
.v5-tile-label small{font-size:.77em;color:#806c83}
.screen-home .home-books{padding:8px 16px 12px;gap:4px;background:linear-gradient(135deg,#fffdf8,#ecf5ec 57%,#dcece6)}
.screen-home .home-books h2{font:italic 700 clamp(22px,2.25vw,34px) Georgia,serif;color:#604765;flex:0 0 auto;text-align:center}
.screen-home .home-books-pair{height:calc(100% - 42px);align-items:stretch;gap:9px;justify-content:center}
.screen-home .book-shortcut,.screen-home .book-shortcut:nth-child(1),.screen-home .book-shortcut:nth-child(2){
 height:100%;width:48%;max-width:49%;min-width:0;padding:0;transform:none;display:flex;align-items:center;justify-content:center;border:0;background:transparent;box-shadow:none;filter:none;
}
.screen-home .book-shortcut img{width:100%;max-width:100%;height:100%;max-height:100%;object-fit:contain;object-position:center;filter:drop-shadow(0 9px 9px #69545f30);border-radius:13px;}
.screen-home .book-shortcut:hover img{transform:translateY(-4px);filter:drop-shadow(0 13px 13px #69545f45)}
/* Seven books: 4 + 3, each fully visible. */
.topic-choice-screen .topic-books{min-height:0;gap:10px;padding:5px 10px 8px}
.topic-choice-screen .topic-book-card,.topic-choice-screen .topic-book-card:nth-child(2n),.topic-choice-screen .topic-book-card:nth-child(3n){
 border-radius:20px;border:1px solid #e3d3df;background:radial-gradient(ellipse at center,#fffefa 6%,#f4e9f0 73%,#f0e4ed 100%);
 box-shadow:0 8px 17px #80647d17,inset 0 2px 2px #fff;overflow:hidden;padding:5px;
}
.topic-choice-screen .topic-book-card:nth-child(2n){background:radial-gradient(ellipse at center,#fffefa 6%,#e9f3ec 73%,#dceae1 100%)}
.topic-choice-screen .topic-book-card img,.topic-choice-screen .topic-book-card:hover img{
 display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;filter:drop-shadow(0 6px 8px #71556b37);mix-blend-mode:normal;transform:none;transition:transform .16s ease;
}
.topic-choice-screen .topic-book-card:hover img{transform:translateY(-3px)}
/* Book-like viewer: no additional header, page area stays full-height. */
.work-screen .viewer{position:relative;overflow:hidden;background:linear-gradient(100deg,#b5a2aa 0%,#eee8e5 3%,#eee7e3 97%,#ac959e 100%);border:2px solid #bba6b1;border-radius:17px;box-shadow:0 14px 27px #5a465d32,0 4px 7px #523b5220,inset 0 0 0 3px #fff9f1}
.work-screen .viewer-book-canvas{position:relative;border-radius:14px;padding:0 5px;overflow:auto;background:linear-gradient(90deg,#e4d6d9,#f8f3ee 3%,#f8f4ef 97%,#dfd0d7)}
.work-screen .viewer .paper-row.book-paper-frame{position:relative;isolation:isolate;box-shadow:none;gap:0;padding:5px 3px 9px;min-height:100%;height:100%;}
.work-screen .viewer .paper-row.book-paper-frame.spread:before{content:"";position:absolute;z-index:4;pointer-events:none;width:36px;top:6px;bottom:12px;left:50%;transform:translateX(-50%);background:linear-gradient(90deg,transparent 1%,#7c696e20 25%,#b9a9a847 42%,#54424b45 49%,#b19d9e4d 55%,#fff8f480 67%,transparent 99%);mix-blend-mode:multiply;}
.work-screen .viewer .paper-row.book-paper-frame.spread:after{content:"";position:absolute;pointer-events:none;z-index:2;inset:auto 7% 2px;height:10px;border-radius:50%;background:#5f4b5638;filter:blur(8px)}
.work-screen .viewer .paper-row.book-paper-frame .paper{position:relative;z-index:3;overflow:hidden;border:1px solid #ede5de;background:white;filter:drop-shadow(1px 4px 3px #6d596944)}
.work-screen .viewer .paper-row.spread .paper.left{border-radius:9px 1px 1px 9px;box-shadow:inset -12px 0 11px #76646f2e, -5px 4px 8px #806d7777}
.work-screen .viewer .paper-row.spread .paper.right{border-radius:1px 9px 9px 1px;box-shadow:inset 12px 0 11px #76646f2e, 5px 4px 8px #806d7777}
.work-screen .viewer .paper-row.single .paper{border-radius:8px;box-shadow:2px 2px 0 #f8f5f0,4px 4px 0 #ddd2cd,7px 9px 13px #705b653b;}
.work-screen .viewer .paper-row.book-paper-frame .paper img{height:auto;max-height:calc(100dvh - 30px);object-fit:contain}
/* Touch navigation must stay at least 44px, and PDF controls must never overlap. */
.task-nav-v4 .task-pager-controls .btn{min-height:48px;min-width:55px}
.task-nav-v4 .task-preview{overflow:hidden!important}
.task-nav-v4 .task-touch{touch-action:manipulation}
@media(max-width:1080px){.topic-choice-screen .topic-books{padding:3px 5px 5px;gap:5px}}

/* v5 refinement: paper spine only across the two physical pages, never the whole viewer. */
.work-screen .viewer .paper-row.book-paper-frame.spread:before,
.work-screen .viewer .paper-row.book-paper-frame.spread:after { content:none!important; }
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.left:after {
 content:"";position:absolute;z-index:5;right:0;top:0;bottom:0;width:21px;pointer-events:none;
 background:linear-gradient(90deg,transparent,#87737b1a 48%,#5b48544e 92%,#5547547c 100%);mix-blend-mode:multiply;
}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.right:after {
 content:"";position:absolute;z-index:5;left:0;top:0;bottom:0;width:21px;pointer-events:none;
 background:linear-gradient(90deg,#5547547c 0%,#5b48544e 8%,#87737b1a 52%,transparent);mix-blend-mode:multiply;
}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.left{transform:perspective(1600px) rotateY(-.9deg);transform-origin:right center}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.right{transform:perspective(1600px) rotateY(.9deg);transform-origin:left center}


/* v6 — финальная коррекция по замечаниям: полные карточки на главной, более объёмные карточки, книжный просмотрщик */
:root{
  --bg:#f6f1ec;
  --paper:#fcfaf7;
  --plum:#6f4e63;
  --deep:#533a58;
  --lav:#efe3ef;
  --soft:#f7eff4;
  --stroke:#decfda;
  --sage:#93b2a4;
  --mint:#e8f1ea;
  --pink:#f1dde6;
  --gold:#dcc6ad;
  --muted:#8d7a8b;
  --shadow:0 18px 34px rgba(102,74,98,.16),0 6px 16px rgba(102,74,98,.08);
  --smshadow:0 8px 18px rgba(102,74,98,.12);
}
#app{background:radial-gradient(circle at 100% 0%,#f2e5ea 0,transparent 31%),radial-gradient(circle at 0 100%,#e7efe8 0,transparent 26%),var(--bg)}
.screen-home{padding:12px 14px 14px;gap:0}
.screen-home .home-grid{gap:14px}
.screen-home .home-tile{position:relative;padding:0;border-radius:28px;border:1px solid #dbcdda;background:linear-gradient(155deg,#fffdfa,#f4ecf1);box-shadow:0 20px 34px rgba(98,72,98,.14), inset 0 2px 0 rgba(255,255,255,.92), inset 0 -1px 0 rgba(214,199,208,.7);overflow:hidden;isolation:isolate}
.screen-home .home-tile:before{content:"";position:absolute;inset:1px;border-radius:26px;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.55), inset 0 -16px 24px rgba(255,255,255,.08)}
.screen-home .home-tile:hover,.screen-home .home-tile:focus-within{transform:translateY(-2px);box-shadow:0 24px 40px rgba(98,72,98,.18), inset 0 2px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(214,199,208,.75)}
.screen-home .home-card-button{display:block}
.screen-home .home-card-hero{display:block;width:100%;height:100%;object-fit:cover;object-position:center;filter:none}
.screen-home .home-books{display:block;background:linear-gradient(155deg,#fffdf9,#eef4ef)}
.screen-home .home-books .home-card-hero{position:absolute;inset:0;width:100%;height:100%;object-fit:cover}
.screen-home .home-books-hotspot{position:absolute;top:18%;bottom:14%;width:34%;border:none;background:transparent;border-radius:20px;z-index:2}
.screen-home .home-books-hotspot.left{left:16%}
.screen-home .home-books-hotspot.right{right:9%}
.screen-home .home-books-hotspot:hover,.screen-home .home-books-hotspot:focus-visible{outline:3px solid rgba(132,101,156,.55);outline-offset:-3px;box-shadow:inset 0 0 0 3px rgba(255,255,255,.5)}
/* убираем старые подписи и внутренние контейнеры на титуле */
.screen-home .v5-tile-label,.screen-home .home-books h2,.screen-home .home-books-pair,.screen-home .book-shortcut{display:none!important}
/* Карточки тем — сильнее объём, рамка и тень */
.topic-book-card{border-radius:24px;border:1px solid #dfcfda;background:linear-gradient(150deg,#fffdf9,#f3ebf1);box-shadow:0 16px 28px rgba(102,74,98,.13), inset 0 2px 0 rgba(255,255,255,.9), inset 0 -1px 0 rgba(219,205,216,.8);padding:10px 8px 8px;position:relative;overflow:hidden}
.topic-book-card:before{content:"";position:absolute;inset:6px;border-radius:18px;background:linear-gradient(180deg,rgba(255,255,255,.22),rgba(255,255,255,0));pointer-events:none}
.topic-book-card:nth-child(2n){background:linear-gradient(150deg,#fffdfa,#eef4ef)}
.topic-book-card:nth-child(3n){background:linear-gradient(150deg,#fffdfb,#f6e8ee)}
.topic-book-card:hover{transform:translateY(-3px);box-shadow:0 21px 34px rgba(102,74,98,.18), inset 0 2px 0 rgba(255,255,255,.93)}
.topic-book-card img{width:auto;max-width:92%;height:96%;object-fit:contain;filter:drop-shadow(0 14px 14px rgba(96,77,97,.25));mix-blend-mode:multiply}
/* Просмотрщик как раскрытая книга */
.work-screen .viewer{background:linear-gradient(160deg,#f3e7ea,#eadfe5 48%,#f5efe7);border:1px solid #d5c3cf;border-radius:22px;box-shadow:0 18px 30px rgba(83,61,83,.18), inset 0 2px 0 rgba(255,255,255,.75);padding:7px}
.work-screen .viewer-canvas.viewer-book-canvas{border-radius:18px;border:1px solid #d7c8cf;background:linear-gradient(90deg,#ddcfd6 0%,#f7f1eb 4%,#fcfaf7 11%,#fcfaf7 89%,#f4eee8 96%,#d8c9d1 100%);box-shadow:inset 0 0 18px rgba(110,90,103,.08)}
.work-screen .viewer .paper-row.book-paper-frame{padding:14px 12px 18px;align-items:center}
.work-screen .viewer .paper-row.book-paper-frame.spread:before{content:""!important;position:absolute;z-index:4;top:14px;bottom:18px;left:50%;transform:translateX(-50%);width:44px;border-radius:22px;background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(164,144,146,.12) 16%,rgba(93,73,85,.33) 49%,rgba(188,172,170,.18) 76%,rgba(255,255,255,0) 100%);box-shadow:0 0 10px rgba(70,55,64,.08)}
.work-screen .viewer .paper-row.book-paper-frame.spread:after{content:""!important;position:absolute;left:8%;right:8%;bottom:7px;height:14px;border-radius:50%;background:rgba(92,71,82,.22);filter:blur(10px)}
.work-screen .viewer .paper-row.book-paper-frame .paper{border:1px solid #e8ddd5;background:white;filter:none}
.work-screen .viewer .paper-row.spread .paper.left{border-radius:12px 2px 2px 12px;box-shadow:inset -18px 0 18px rgba(112,93,107,.18), -6px 10px 18px rgba(91,71,81,.24)}
.work-screen .viewer .paper-row.spread .paper.right{border-radius:2px 12px 12px 2px;box-shadow:inset 18px 0 18px rgba(112,93,107,.18), 6px 10px 18px rgba(91,71,81,.24)}
.work-screen .viewer .paper-row.single .paper{border-radius:10px;box-shadow:2px 2px 0 #f8f4ee,6px 6px 0 #e0d5cf,12px 14px 18px rgba(91,71,81,.22)}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.left:after{width:26px;background:linear-gradient(90deg,transparent,rgba(100,84,95,.22))}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.right:after{width:26px;background:linear-gradient(90deg,rgba(100,84,95,.22),transparent)}
/* Более крупные элементы управления для iPad */
.pdf-controls{gap:7px;padding:10px 9px;border-radius:15px;background:linear-gradient(150deg,#faf3f7,#f2ebf0)}
.pdf-controls .ctrl-row{gap:6px}
.pdf-controls .ctrl-row .btn{min-height:34px;padding:7px 10px;font-size:12px;border-radius:11px}
.pdf-controls .ctrl-row .btn.iconbtn{min-width:36px;max-width:36px;padding:7px}
.pdf-controls .ctrl-row .pageind{font-size:12px;padding:8px 10px;border-radius:10px}


/* v7 — утверждённый банк прототипов: 13 карточек, без учеников, отметок и проверки */
.part1-screen{padding:11px 15px 14px;gap:10px}
.part1-screen .pagehead{min-height:39px}
.part1-screen .pagehead h1{font:italic 700 clamp(19px,2vw,26px) Georgia,serif}
.p1-topic-field{flex:none;min-height:0;height:188px;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:7px;padding:2px 3px 6px}
.p1-topic-card{position:relative;min-width:0;min-height:0;display:grid;grid-template-columns:35px 1fr;grid-template-rows:1fr 1fr;gap:0 5px;text-align:left;padding:7px 8px;border-radius:16px;border:1px solid #dbccdc;color:#65466a;background:linear-gradient(153deg,#fffefa,#eee1ed);box-shadow:0 6px 1px #cab5c350,0 11px 15px #71516b1c,inset 0 2px 1px #fff;transition:transform .16s,box-shadow .16s}
.p1-topic-card:nth-child(4n+2){background:linear-gradient(152deg,#fffefa,#e5f0e8)}
.p1-topic-card:nth-child(4n+3){background:linear-gradient(152deg,#fffefa,#f3e3eb)}
.p1-topic-card:nth-child(n+8){transform:translateX(50%)}
.p1-topic-card:nth-child(n+8):hover{transform:translate(50%,-2px)}
.p1-topic-card:hover{transform:translateY(-2px);box-shadow:0 7px 2px #c5b1c05a,0 15px 21px #71516b28,inset 0 2px #fff}
.p1-topic-card.active{border:2px solid #836497;background:linear-gradient(135deg,#f4eaf7,#decce4);box-shadow:0 6px 0 #9f83b0,0 13px 20px #71516b2c,inset 0 1px 1px white}
.p1-topic-glyph{grid-column:1;grid-row:1/3;align-self:center;justify-self:center;font:italic 27px Georgia,serif;text-shadow:1px 2px #fff;color:#8c6b9b}
.p1-topic-number{grid-column:2;grid-row:1;align-self:end;font:700 22px Georgia,serif;color:#5a3a64;line-height:1}
.p1-topic-name{position:absolute;top:7px;right:6px;width:calc(100% - 54px);font-size:10px;line-height:1.04;text-align:right;color:#6a526d;hyphens:auto}
.p1-topic-count{grid-column:2;grid-row:2;align-self:end;font-size:9px;color:#937b90}
.p1-main-field{flex:1;min-height:0;display:grid;grid-template-columns:minmax(224px,27%) minmax(0,1fr);gap:12px}
.p1-prototypes,.p1-reader{min-height:0;display:flex;flex-direction:column;padding:13px 14px 12px;border-radius:23px;box-shadow:0 13px 25px #7c5a711c,inset 0 2px #fff;background:linear-gradient(160deg,#fffefa,#f8f1f4)}
.p1-prototype-heading{display:flex;gap:8px;justify-content:space-between;align-items:center}
.p1-prototype-heading h2{margin:0;font:700 19px Georgia,serif;color:var(--deep)}
.p1-prototype-heading small{font-size:10px;color:#8c7289;white-space:nowrap}
.p1-grid-navigation{margin:10px 0;display:flex;gap:6px;align-items:center;justify-content:space-between;border-radius:12px;background:#f3eaf1;padding:5px}
.p1-grid-navigation span{font-size:11px;font-weight:700;white-space:nowrap;color:#684a68}
.p1-grid-navigation .btn,.p1-reader-arrows .btn{min-height:39px;min-width:39px}
.p1-number-matrix{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));grid-auto-rows:minmax(36px,1fr);gap:6px;flex:none;align-content:start}
.p1-number{padding:0;border:1px solid #e0cedd;border-radius:10px;background:#fffefa;color:#614a65;font-weight:700;font-size:13px;box-shadow:0 3px 5px #74596e17}
.p1-number.active{border-color:#76548d;color:white;background:linear-gradient(140deg,#9875af,#73528d);box-shadow:0 4px 8px #74596e38}
.p1-number.unchecked:not(.active){background:#faf1e2;border-color:#d9c9ad}
.p1-grid-note{font-size:11px;color:#8d7989;margin-top:auto;padding-top:10px}
.p1-reader{padding:11px 15px 13px;background:linear-gradient(150deg,#fffdfa,#fbf6f3)}
.p1-reader-head{flex:none;display:flex;justify-content:space-between;gap:12px;align-items:center;min-height:44px}
.p1-reader-head h2{font:700 20px Georgia,serif;color:#593f60;margin:0}
.p1-reader-head small{font-size:11px;color:#97828d}
.p1-reader-arrows{display:flex;gap:5px}
.p1-paper-stage{flex:1;min-height:0;margin:7px 0;display:flex;align-items:center;justify-content:center;padding:12px;background:linear-gradient(105deg,#e9e1e2,#fbfaf7 14%,#fcfaf7 86%,#e9e1e2);border:1px solid #e1d2d7;border-radius:18px;box-shadow:inset 0 1px 9px #795d6a17}
.p1-paper-sheet{display:flex;justify-content:center;align-items:center;width:100%;height:100%;min-height:0;background:white;border:1px solid #eee5e0;border-radius:8px;box-shadow:4px 4px 0 #e9ded9,9px 9px 12px #7c627124;padding:10px}
.p1-paper-sheet img{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;user-select:none;-webkit-user-drag:none}
.p1-answer-row{flex:none;display:flex;align-items:center;gap:15px;margin-top:6px;border-radius:14px;border:1px solid #d9c7df;background:linear-gradient(110deg,#f4e8f6,#fffdfb);min-height:51px;padding:8px 15px;color:#62476d;font:700 17px Georgia,serif}
.p1-answer-row strong{font-size:24px;color:#4f355f}
.p1-answer-row .p1-unverified{font:600 13px sans-serif;color:#906e51}
/* книжная форма: сгиб строго по страницам, а не по всей высоте окна */
.work-screen .viewer .paper-row.book-paper-frame.spread:before,.work-screen .viewer .paper-row.book-paper-frame.spread:after{content:none!important;display:none!important}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.left::after{content:""!important;display:block!important;position:absolute;top:0;bottom:0;right:0;left:auto;width:28px;background:linear-gradient(90deg,transparent,#5948522e);z-index:4;pointer-events:none}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.right::after{content:""!important;display:block!important;position:absolute;top:0;bottom:0;left:0;right:auto;width:28px;background:linear-gradient(90deg,#5948522e,transparent);z-index:4;pointer-events:none}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.left{box-shadow:inset -16px 0 18px #71566533,-5px 6px 9px #6f5d6440, -9px 12px 0 -5px #dcd2cf}
.work-screen .viewer .paper-row.book-paper-frame.spread .paper.right{box-shadow:inset 16px 0 18px #71566533,5px 6px 9px #6f5d6440, 9px 12px 0 -5px #dcd2cf}
@media(max-width:1100px){.p1-topic-field{height:170px;gap:5px}.p1-topic-card{padding:5px;grid-template-columns:25px 1fr}.p1-topic-glyph{font-size:23px}.p1-topic-number{font-size:19px}.p1-topic-name{font-size:9px;width:calc(100% - 43px);top:5px;right:4px}.p1-topic-count{font-size:8px}.p1-prototypes,.p1-reader{padding:9px}.p1-main-field{grid-template-columns:235px minmax(0,1fr);gap:7px}.p1-number-matrix{gap:4px;grid-auto-rows:minmax(34px,1fr)}}
@media(max-height:720px){.part1-screen{padding:6px 9px;gap:6px}.part1-screen .pagehead{min-height:30px}.p1-topic-field{height:132px;gap:4px}.p1-topic-card{border-radius:12px}.p1-topic-number{font-size:16px}.p1-topic-name{font-size:8px}.p1-topic-count{font-size:7px}.p1-number-matrix{grid-auto-rows:minmax(30px,1fr)}.p1-reader-head h2{font-size:17px}.p1-answer-row{min-height:40px}}

/* Точечный аудит: карточки главной полностью показывают сцены и книги; сетка 5×6 удобна для пальца. */
.screen-home .home-tile{border:2px solid #decfda;box-shadow:0 6px 1px #cfbfcb,0 20px 30px #684c6927,inset 0 2px #fff}
.screen-home .home-tile:focus-within,.screen-home .home-tile:hover{box-shadow:0 7px 1px #bea6bd,0 23px 38px #684c6934,inset 0 2px #fff}
.screen-home .home-card-hero,.screen-home .home-books .home-card-hero{width:100%;height:100%;object-fit:contain;object-position:center;filter:none;max-width:100%;max-height:100%}
.screen-home .home-tile.home-part1{background:#f7eef3}
.screen-home .home-tile.home-part2{background:#f8e9f0}
.screen-home .home-tile.home-books{background:#fcf3ec}
.screen-home .home-tile.home-stats{background:#faf1e8}
.screen-home .home-books-hotspot.left{left:10%;width:40%;top:10%;bottom:23%}
.screen-home .home-books-hotspot.right{left:52%;right:auto;width:40%;top:10%;bottom:23%}
.p1-number-matrix{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:48px;gap:7px}
@media(max-width:1100px){.p1-number-matrix{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:44px;gap:5px}}
@media(max-height:720px){.p1-number-matrix{grid-auto-rows:40px;gap:4px}}
@media(max-width:1100px){.p1-main-field{grid-template-columns:265px minmax(0,1fr)}}


/* v8: Часть 1 — компактные кнопки 1–13 на одном экране */
.part1-screen{padding:10px 14px 14px;gap:10px}
.part1-screen .pagehead{min-height:36px}
.part1-screen .pagehead h1{font:italic 700 clamp(18px,1.7vw,24px) Georgia,serif}
.p1-topic-strip{padding:10px 12px 11px;border-radius:22px;background:linear-gradient(155deg,#fffdfa,#f7eef3)}
.p1-strip-head{display:flex;justify-content:space-between;align-items:end;gap:10px;margin-bottom:8px}
.p1-strip-head h2{margin:0;font:700 18px Georgia,serif;color:var(--deep)}
.p1-strip-head small{font-size:11px;color:#8b7785}
.p1-strip-meta{font-size:12px;font-weight:700;color:#735979;white-space:nowrap}
.p1-topic-field.compact{flex:none;height:auto;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:8px;padding:0}
.p1-topic-card.compact{position:relative;min-width:0;display:flex;flex-direction:column;justify-content:center;align-items:center;gap:2px;min-height:58px;padding:6px 4px;border-radius:14px;border:1px solid #dccfdb;background:linear-gradient(150deg,#fffefb,#f2eaf0);box-shadow:0 6px 12px rgba(115,86,112,.12), inset 0 2px 0 rgba(255,255,255,.9);transform:none!important;text-align:center;color:#634667}
.p1-topic-card.compact:nth-child(3n+2){background:linear-gradient(150deg,#fffefb,#edf5ee)}
.p1-topic-card.compact:nth-child(3n+3){background:linear-gradient(150deg,#fffefb,#f6edf1)}
.p1-topic-card.compact:hover{transform:translateY(-1px)!important;box-shadow:0 8px 15px rgba(115,86,112,.15), inset 0 2px 0 rgba(255,255,255,.95)}
.p1-topic-card.compact.active{border:2px solid #836497;background:linear-gradient(150deg,#f3e7f7,#dccae8);box-shadow:0 8px 16px rgba(115,86,112,.18), inset 0 2px 0 rgba(255,255,255,.95)}
.p1-topic-card.compact .p1-topic-number{font:700 22px/1 Georgia,serif;color:#56385f;display:block}
.p1-topic-card.compact .p1-topic-mini{display:block;font-size:10px;line-height:1.05;color:#6e566f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
.p1-topic-card.compact .p1-topic-count{display:block;font-size:9px;color:#978293}
.p1-topic-card.compact .p1-topic-glyph,.p1-topic-card.compact .p1-topic-name{display:none!important}
.p1-main-field{flex:1;min-height:0;display:grid;grid-template-columns:minmax(262px,27%) minmax(0,1fr);gap:12px}
.p1-prototypes,.p1-reader{padding:12px 13px 12px}
.p1-prototype-heading h2{font-size:18px}
.p1-grid-navigation{margin:9px 0 10px}
.p1-number-matrix{grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:minmax(44px,1fr);gap:7px}
.p1-number{font-size:14px;border-radius:12px}
.p1-grid-note{font-size:10px;padding-top:8px}
.p1-reader-head{min-height:40px}
.p1-reader-head h2{font-size:19px}
.p1-paper-stage{margin:6px 0;padding:10px;border-radius:16px}
.p1-paper-sheet{padding:8px}
.p1-answer-row{min-height:48px;padding:8px 14px}
@media(max-width:1100px){.p1-topic-field.compact{gap:6px}.p1-topic-card.compact{min-height:54px;padding:5px 3px}.p1-topic-card.compact .p1-topic-number{font-size:19px}.p1-topic-card.compact .p1-topic-mini{font-size:9px}.p1-main-field{grid-template-columns:250px minmax(0,1fr)}.p1-number-matrix{grid-auto-rows:minmax(40px,1fr);gap:6px}}
@media(max-height:720px){.part1-screen{padding:7px 10px 10px;gap:7px}.p1-topic-strip{padding:8px 10px}.p1-strip-head{margin-bottom:6px}.p1-strip-head h2{font-size:16px}.p1-strip-head small{font-size:10px}.p1-topic-field.compact{gap:5px}.p1-topic-card.compact{min-height:49px;border-radius:12px}.p1-topic-card.compact .p1-topic-number{font-size:18px}.p1-topic-card.compact .p1-topic-mini{font-size:8px}.p1-topic-card.compact .p1-topic-count{font-size:8px}.p1-main-field{gap:8px;grid-template-columns:minmax(236px,27%) minmax(0,1fr)}.p1-number-matrix{grid-auto-rows:minmax(36px,1fr);gap:5px}.p1-reader-head h2{font-size:17px}.p1-answer-row{min-height:42px}}


/* ==== v10 visual correction overrides ==== */

.screen-home .home-grid{gap:18px;padding:4px 2px 6px}
.screen-home .home-tile{border-radius:28px;border:1px solid #dfd1db;background:linear-gradient(155deg,#fffdfa,#f4edf2);box-shadow:0 18px 30px rgba(102,74,98,.13), inset 0 2px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(222,208,219,.88);padding:14px 16px;overflow:hidden}
.screen-home .home-tile:nth-child(2){background:linear-gradient(155deg,#fffefa,#eff5ef)}
.screen-home .home-tile:nth-child(3){background:linear-gradient(155deg,#fffefa,#f6eef1)}
.screen-home .home-tile:nth-child(4){background:linear-gradient(155deg,#fffefa,#edf4ef)}
.screen-home .home-card-button{display:flex;align-items:center;justify-content:center}
.screen-home .home-card-hero{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain!important;object-position:center center;filter:saturate(.84) brightness(1.03) contrast(.98);padding:6px 12px 8px;transform:none!important}
.screen-home .home-card-button:hover .home-card-hero{transform:none!important}
.screen-home .home-tile.home-books{display:flex;flex-direction:column;justify-content:space-between;align-items:center;padding:14px 18px 10px;background:linear-gradient(155deg,#fffef9,#eef4ef)}
.screen-home .home-books-title{font:italic 700 clamp(22px,2.25vw,34px)/1.05 Georgia,serif;color:#5d4662;text-align:center;margin-top:2px;flex:none}
.screen-home .home-books-pair{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));align-items:end;justify-items:center;gap:14px;width:100%;height:calc(100% - 34px);padding:6px 6px 10px}
.screen-home .home-book-mini{appearance:none;border:none;background:transparent;padding:0;margin:0;display:flex;align-items:flex-end;justify-content:center;width:100%;height:100%;border-radius:22px;box-shadow:none;outline:none}
.screen-home .home-book-mini:hover,.screen-home .home-book-mini:active{transform:none;box-shadow:none}
.screen-home .home-book-mini:focus-visible{outline:2px solid rgba(122,97,140,.35);outline-offset:3px}
.screen-home .home-book-mini img{width:100%;height:100%;max-width:220px;max-height:100%;object-fit:contain;object-position:center bottom;display:block;filter:saturate(.83) brightness(1.03) drop-shadow(0 16px 18px rgba(99,76,99,.20))}
.screen-home .home-books-hotspot{display:none!important}
.screen-home .home-books .home-card-hero{display:none!important}

.topic-choice-screen .topic-books{padding:6px 10px 10px;gap:12px}
.topic-choice-screen .topic-book-card{padding:12px 14px;border-radius:26px;border:1px solid #dfd1db;background:linear-gradient(155deg,#fffdfa,#f3edf2)!important;box-shadow:0 16px 28px rgba(102,74,98,.12), inset 0 2px 0 rgba(255,255,255,.95), inset 0 -1px 0 rgba(222,208,219,.85);overflow:hidden}
.topic-choice-screen .topic-book-card:nth-child(2n){background:linear-gradient(155deg,#fffefa,#eef4ef)!important}
.topic-choice-screen .topic-book-card:nth-child(3n){background:linear-gradient(155deg,#fffefa,#f6edf1)!important}
.topic-choice-screen .topic-book-card img,.topic-choice-screen .topic-book-card:hover img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center bottom;transform:none!important;mix-blend-mode:normal;filter:saturate(.82) brightness(1.035) drop-shadow(0 18px 16px rgba(98,77,98,.19))}
.topic-choice-screen .topic-book-card:hover{transform:translateY(-2px);box-shadow:0 20px 34px rgba(102,74,98,.16), inset 0 2px 0 rgba(255,255,255,.95)}

.p1-topic-field.compact{gap:8px;padding:2px 2px 4px}
.p1-topic-card.compact{min-height:66px;padding:7px 6px;border-radius:16px;border:1px solid #d9cad6;background:linear-gradient(155deg,#fffefb,#f2ebf1);box-shadow:0 7px 14px rgba(111,82,108,.14), inset 0 2px 0 rgba(255,255,255,.96), inset 0 -1px 0 rgba(220,207,217,.8);color:#5e4263}
.p1-topic-card.compact:nth-child(3n+2){background:linear-gradient(155deg,#fffefb,#edf5ef)}
.p1-topic-card.compact:nth-child(3n+3){background:linear-gradient(155deg,#fffefb,#f6edf1)}
.p1-topic-card.compact:hover{box-shadow:0 10px 18px rgba(111,82,108,.16), inset 0 2px 0 rgba(255,255,255,.97)}
.p1-topic-card.compact.active{border:2px solid #836497;background:linear-gradient(155deg,#f4e9f7,#e1d2ea);box-shadow:0 10px 18px rgba(111,82,108,.19), inset 0 2px 0 rgba(255,255,255,.98)}
.p1-topic-card.compact .p1-topic-number{font:700 23px/1 Georgia,serif;color:#56385f}
.p1-topic-card.compact .p1-topic-mini{font-size:10px;line-height:1.05;white-space:normal;overflow:visible;text-overflow:clip;max-width:100%;min-height:22px;padding:0 2px;color:#6c5871}
.p1-topic-card.compact .p1-topic-count{font-size:9px;color:#958195}
.p1-number-matrix{gap:8px;grid-auto-rows:minmax(46px,1fr)}
.p1-number{font-size:15px;border-radius:13px;border:1px solid #dac9d7;background:linear-gradient(155deg,#fffefa,#f5eff4);box-shadow:0 7px 11px rgba(111,82,108,.11), inset 0 2px 0 rgba(255,255,255,.94);color:#5b4361}
.p1-number:hover{transform:translateY(-1px)}
.p1-number.active{border-color:#795891;background:linear-gradient(145deg,#9a79b0,#76558f);box-shadow:0 9px 15px rgba(111,82,108,.22), inset 0 1px 0 rgba(255,255,255,.25)}

@media(max-width:1100px){
  .screen-home .home-grid{gap:12px}
  .screen-home .home-tile{padding:11px 13px}
  .screen-home .home-books-title{font-size:clamp(18px,2vw,26px)}
  .screen-home .home-book-mini img{max-width:180px}
  .topic-choice-screen .topic-books{gap:8px;padding:4px 6px 7px}
  .topic-choice-screen .topic-book-card{padding:9px 10px;border-radius:22px}
  .p1-topic-card.compact{min-height:60px;padding:6px 4px}
  .p1-topic-card.compact .p1-topic-mini{font-size:9px;min-height:20px}
}
@media(max-height:720px){
  .screen-home .home-grid{gap:10px}
  .screen-home .home-tile{padding:10px 12px}
  .screen-home .home-card-hero{padding:4px 8px 6px}
  .screen-home .home-books-pair{padding:4px 4px 8px;gap:10px}
  .topic-choice-screen .topic-book-card{padding:8px 8px 9px}
  .p1-topic-card.compact{min-height:56px}
}

/* ===== v11. Exact visual references, app controls remain native ===== */
:root{--bg:#f6f1ec;--paper:#fcfaf7;--plum:#725969;--deep:#3d3055;--lav:#eee3ea;--soft:#f7f1f0;--stroke:#e7dcd8;--sage:#92b0a0;--mint:#e6f0e8;--pink:#f3e3e5;--gold:#d6c3ae;--text:#493f44;--muted:#857883}
#app{background:#f6f1ec}
.appbar{background:linear-gradient(105deg,#fffaf7,#fbf7f5);border-bottom-color:#e8e0dd}
.ref-home-screen{padding:2px 9px 6px;justify-content:center;align-items:center;background:#f6f1ec}
.ref-home-stage{position:relative;aspect-ratio:1298 / 848;width:auto;height:100%;max-width:100%;max-height:100%;min-width:0;overflow:hidden;flex:none}
.ref-scene{display:block;width:100%;height:100%;object-fit:contain;user-select:none;-webkit-user-drag:none}
.ref-hotspot{position:absolute;display:block;background:transparent!important;border:0!important;padding:0!important;margin:0!important;box-shadow:none!important;border-radius:20px;cursor:pointer;outline:none;touch-action:manipulation;-webkit-tap-highlight-color:transparent;transition:transform .16s ease,box-shadow .16s ease,background-color .16s ease,filter .16s ease}
.ref-hotspot:hover,.ref-hotspot:focus-visible{background:rgba(255,255,255,.10)!important;box-shadow:inset 0 3px 10px rgba(100,77,100,.14),inset 0 0 0 1px rgba(255,255,255,.28)!important;transform:translateY(1px) scale(.992)!important;filter:saturate(.98) brightness(.995)}
.ref-hotspot:active{background:rgba(255,255,255,.12)!important;box-shadow:inset 0 5px 12px rgba(100,77,100,.18),inset 0 0 0 1px rgba(255,255,255,.34)!important;transform:translateY(2px) scale(.989)!important}
.ref-hotspot:focus-visible{outline:2px solid rgba(89,122,115,.65)!important;outline-offset:-6px!important}

.ref-home-stage .home-p1,.ref-home-stage .home-p2,.ref-home-stage .home-stats{border-radius:28px}
.ref-home-stage .home-yashchenko,.ref-home-stage .home-lysenko{border-radius:22px}
.ref-topics-stage .ref-topic-hit{border-radius:26px}
.ref-home-stage .home-p1{left:0;top:0;width:50.5%;height:50.9%}
.ref-home-stage .home-yashchenko{left:50.5%;top:0;width:25%;height:50.9%}
.ref-home-stage .home-lysenko{left:75.5%;top:0;width:24.5%;height:50.9%}
.ref-home-stage .home-p2{left:0;top:51%;width:50.5%;height:49%}
.ref-home-stage .home-stats{left:50.5%;top:51%;width:49.5%;height:49%}
.ref-topic-screen{gap:4px;padding:6px 11px 7px;background:#f6f1ec}
.ref-topic-screen .pagehead{min-height:37px;position:relative}
.ref-topic-screen .pagehead h1{font:bold 26px/1.1 Georgia,serif;text-align:center;margin-right:75px}
.ref-topic-screen .studentrow{justify-content:center;gap:7px;flex:none;min-height:40px;align-items:center}
.ref-topic-screen .studentrow .btn{min-width:70px;min-height:38px;font-size:12px;border-radius:12px;background:#fffdfa;box-shadow:0 6px 12px rgba(98,79,94,.07)}
.ref-topic-screen .studentrow .btn.primary{background:linear-gradient(135deg,#9a7dac,#7c6092)}
.ref-topics-stage{position:relative;aspect-ratio:1311 / 749;height:100%;width:auto;max-width:100%;min-height:0;max-height:100%;align-self:center;flex:1 1 auto;overflow:hidden}
.ref-topics-stage .topic-14{left:0%;top:0%;width:25.1%;height:50.5%}
.ref-topics-stage .topic-15{left:25.1%;top:0%;width:24.9%;height:50.5%}
.ref-topics-stage .topic-16{left:50%;top:0%;width:25%;height:50.5%}
.ref-topics-stage .topic-17{left:75%;top:0%;width:25%;height:50.5%}
.ref-topics-stage .topic-18{left:7.9%;top:50.5%;width:26.5%;height:49.5%}
.ref-topics-stage .topic-19{left:34.4%;top:50.5%;width:30%;height:49.5%}
.ref-topics-stage .topic-20{left:64.4%;top:50.5%;width:27.6%;height:49.5%}
.ref-part1-screen{gap:7px;padding:8px 13px 11px;background:#f6f1ec}
.ref-part1-screen .pagehead{min-height:39px}
.ref-part1-screen .pagehead h1{font:700 26px Georgia,serif}
.ref-p1-topics{height:clamp(292px,35vh,338px);flex:none;min-height:0;display:grid;grid-template-columns:repeat(16,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:10px 10px;padding:4px 6px;align-items:stretch}
.ref-p1-topic{display:flex;align-items:center;justify-content:center;padding:0;border:0;min-width:0;min-height:0;border-radius:22px;background:transparent;box-shadow:none;overflow:visible;position:relative;transition:transform .16s ease,filter .16s ease,box-shadow .16s ease}
.ref-p1-topic:hover{transform:translateY(1px) scale(.992)}
.ref-p1-topic.first-row,.ref-p1-topic.second-row{grid-column:span 2}
.ref-p1-topic:nth-child(1){grid-column:3 / span 2;grid-row:1}
.ref-p1-topic:nth-child(2){grid-column:5 / span 2;grid-row:1}
.ref-p1-topic:nth-child(3){grid-column:7 / span 2;grid-row:1}
.ref-p1-topic:nth-child(4){grid-column:9 / span 2;grid-row:1}
.ref-p1-topic:nth-child(5){grid-column:11 / span 2;grid-row:1}
.ref-p1-topic:nth-child(6){grid-column:13 / span 2;grid-row:1}
.ref-p1-topic:nth-child(7){grid-column:2 / span 2;grid-row:2}
.ref-p1-topic:nth-child(8){grid-column:4 / span 2;grid-row:2}
.ref-p1-topic:nth-child(9){grid-column:6 / span 2;grid-row:2}
.ref-p1-topic:nth-child(10){grid-column:8 / span 2;grid-row:2}
.ref-p1-topic:nth-child(11){grid-column:10 / span 2;grid-row:2}
.ref-p1-topic:nth-child(12){grid-column:12 / span 2;grid-row:2}
.ref-p1-topic:nth-child(13){grid-column:14 / span 2;grid-row:2}
.ref-p1-topic img{width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;object-position:center;display:block;border-radius:22px;filter:drop-shadow(0 10px 18px rgba(103,79,98,.18));transition:transform .16s ease,filter .16s ease}
.ref-p1-topic.active{transform:translateY(1px) scale(.994);filter:drop-shadow(0 0 0 transparent)}
.ref-p1-topic:focus-visible{outline:3px solid #6c9b88;outline-offset:2px}
.ref-part1-screen .p1-main-field{flex:1;grid-template-columns:minmax(265px,32%) minmax(0,1fr);gap:10px}
.ref-part1-screen .p1-prototypes,.ref-part1-screen .p1-reader{background:linear-gradient(150deg,#fffefa,#fbf8f6);border:1px solid #e7dbdb;border-radius:22px;box-shadow:0 14px 26px rgba(89,74,84,.12),inset 0 2px #fff}
.ref-part1-screen .p1-prototypes{padding:12px 13px 10px}
.ref-part1-screen .p1-number-matrix{gap:5px;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(6,minmax(0,1fr));grid-auto-rows:auto;flex:1;min-height:0;align-content:stretch}
.ref-part1-screen .p1-number{min-height:0;box-shadow:0 4px 7px rgba(93,73,88,.12),inset 0 1px #fff;border:1px solid #e3d7de}
.ref-part1-screen .p1-number.active{background:linear-gradient(155deg,#9273a8,#795d8d);border-color:#826b95}
.ref-part1-screen .p1-grid-navigation{margin:9px 0}
.ref-part1-screen .p1-paper-stage{background:linear-gradient(110deg,#eee7e4,#faf8f4 12%,#faf8f4 88%,#eee7e4);flex:1}
.ref-part1-screen .p1-answer-row{background:linear-gradient(110deg,#f3e9f3,#fffdfb);min-height:46px}
@media(max-width:1100px){
 .ref-home-stage{width:100%;height:auto;max-height:100%;}
 .ref-topics-stage{width:100%;height:auto;max-height:100%;}
 .ref-topic-screen .studentrow{min-height:35px}
 .ref-p1-topics{height:clamp(268px,33vh,312px);gap:8px 8px}
 .ref-part1-screen .p1-main-field{grid-template-columns:265px minmax(0,1fr)}
 .ref-part1-screen .pagehead h1{font-size:23px}
}
@media(max-height:735px){
 .ref-p1-topics{height:clamp(242px,31vh,286px);gap:6px 6px}
 .ref-part1-screen .pagehead{min-height:32px}
 .ref-part1-screen .p1-reader-head h2{font-size:16px}
 .ref-part1-screen .p1-number-matrix{gap:3px}
 .ref-part1-screen .p1-number{font-size:12px}
 .ref-topic-screen .studentrow .btn{min-height:33px;padding:5px 8px}
}
/* Final-fit safeguard: render the *whole* approved scene, including book bases and lower shadows. */
.ref-home-screen .ref-home-stage,
.ref-home-screen .ref-home-stage:not(.dummy){width:min(calc(100% - 28px),calc((100dvh - 85px)*1.53));height:auto;max-width:100%;max-height:calc(100% - 16px);flex:none}
.ref-topic-screen .ref-topics-stage,
.ref-topic-screen .ref-topics-stage:not(.dummy){width:min(calc(100% - 18px),calc((100dvh - 176px)*1.75));height:auto;max-width:100%;max-height:calc(100% - 20px);flex:none;margin:auto;overflow:hidden}
@media(max-width:1100px){.ref-home-screen .ref-home-stage{width:min(calc(100% - 28px),calc((100dvh - 85px)*1.53));height:auto}.ref-topic-screen .ref-topics-stage{width:min(calc(100% - 18px),calc((100dvh - 176px)*1.75));height:auto}}
/* Keep mathematical illustration cards proportionate on wide desktop browsers. */
.ref-part1-screen .ref-p1-topics{width:100%;max-width:1320px;align-self:center}

.ref-p1-topic::after{content:"";position:absolute;inset:2px;border-radius:24px;pointer-events:none;box-shadow:0 0 0 0 rgba(133,100,152,0);transition:box-shadow .16s ease}
.ref-p1-topic:hover img,.ref-p1-topic:focus-visible img{transform:translateY(1px) scale(.992);filter:drop-shadow(0 8px 14px rgba(103,79,98,.14))}
.ref-p1-topic:active img{transform:translateY(2px) scale(.988);filter:drop-shadow(0 6px 10px rgba(103,79,98,.11))}
.ref-p1-topic.active::after{box-shadow:0 0 0 3px rgba(133,100,152,.30)}
.ref-p1-topic:focus-visible{outline:none}
.ref-p1-topic:focus-visible::after{box-shadow:0 0 0 3px rgba(106,154,136,.35)}
.ref-part1-screen .p1-number{transition:transform .14s ease,box-shadow .14s ease,background-color .14s ease,border-color .14s ease}
.ref-part1-screen .p1-number:hover,.ref-part1-screen .p1-number:focus-visible{transform:translateY(1px);box-shadow:inset 0 3px 7px rgba(103,79,98,.14),0 2px 5px rgba(103,79,98,.08)}
.ref-part1-screen .p1-number:active{transform:translateY(2px);box-shadow:inset 0 4px 9px rgba(103,79,98,.18),0 1px 3px rgba(103,79,98,.06)}
.ref-topic-screen .studentrow .btn,.ref-part1-screen .btn.touch-btn,.ref-part1-screen .p1-number{will-change:transform}

/* ===== v14. Approved card proportions and cleaner scene crops ===== */
.ref-home-stage{aspect-ratio:1346 / 868}
.ref-topics-stage{aspect-ratio:1346 / 757}

/* Part 1: approved 1–13 cards, equal size, 6 cards on top and 7 on bottom centered like a pedestal. */
.ref-part1-screen .pagehead{margin-bottom:0}
.ref-p1-topics{
  width:100%;
  max-width:1320px;
  align-self:center;
  flex:none;
  min-height:0;
  height:auto;
  display:grid;
  grid-template-columns:repeat(14,minmax(0,1fr));
  grid-template-rows:repeat(2,auto);
  justify-items:center;
  align-items:start;
  gap:14px 8px;
  padding:4px 0 8px;
}
.ref-p1-topic{
  width:clamp(110px,11.4vw,166px);
  aspect-ratio:215 / 301;
  display:block;
  padding:0;
  min-width:0;
  min-height:0;
  border:0;
  background:transparent;
  box-shadow:none;
  border-radius:24px;
  overflow:visible;
  position:relative;
  justify-self:center;
  align-self:start;
  transition:transform .16s ease, filter .16s ease;
}
.ref-p1-topic img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  object-position:center;
  border-radius:24px;
  filter:drop-shadow(0 12px 18px rgba(101,77,96,.18));
  transition:transform .16s ease, filter .16s ease;
}
.ref-p1-topic:hover img,.ref-p1-topic:focus-visible img{transform:translateY(1px) scale(.992);filter:drop-shadow(0 8px 12px rgba(101,77,96,.14))}
.ref-p1-topic:active img,.ref-p1-topic.active img{transform:translateY(2px) scale(.988);filter:drop-shadow(0 6px 10px rgba(101,77,96,.11))}
.ref-p1-topic::after{content:"";position:absolute;inset:-2px;border-radius:26px;pointer-events:none;box-shadow:0 0 0 0 rgba(133,100,152,0);transition:box-shadow .16s ease}
.ref-p1-topic.active::after{box-shadow:0 0 0 3px rgba(133,100,152,.34), 0 0 0 8px rgba(133,100,152,.08)}
.ref-p1-topic:focus-visible{outline:none}
.ref-p1-topic:focus-visible::after{box-shadow:0 0 0 3px rgba(106,154,136,.38), 0 0 0 8px rgba(106,154,136,.09)}
.ref-p1-topic:nth-child(1){grid-column:2 / span 2;grid-row:1}
.ref-p1-topic:nth-child(2){grid-column:4 / span 2;grid-row:1}
.ref-p1-topic:nth-child(3){grid-column:6 / span 2;grid-row:1}
.ref-p1-topic:nth-child(4){grid-column:8 / span 2;grid-row:1}
.ref-p1-topic:nth-child(5){grid-column:10 / span 2;grid-row:1}
.ref-p1-topic:nth-child(6){grid-column:12 / span 2;grid-row:1}
.ref-p1-topic:nth-child(7){grid-column:1 / span 2;grid-row:2}
.ref-p1-topic:nth-child(8){grid-column:3 / span 2;grid-row:2}
.ref-p1-topic:nth-child(9){grid-column:5 / span 2;grid-row:2}
.ref-p1-topic:nth-child(10){grid-column:7 / span 2;grid-row:2}
.ref-p1-topic:nth-child(11){grid-column:9 / span 2;grid-row:2}
.ref-p1-topic:nth-child(12){grid-column:11 / span 2;grid-row:2}
.ref-p1-topic:nth-child(13){grid-column:13 / span 2;grid-row:2}

/* Keep interaction visible on 14–20 hit areas as a gentle press. */
.ref-topic-hit:hover,.ref-topic-hit:focus-visible{transform:translateY(1px) scale(.992)!important}
.ref-topic-hit:active{transform:translateY(2px) scale(.988)!important}

@media (max-width: 1180px){
  .ref-p1-topics{gap:10px 6px}
  .ref-p1-topic{width:clamp(98px,11vw,150px)}
}
@media (max-height: 760px){
  .ref-p1-topic{width:clamp(92px,10.8vw,142px)}
  .ref-p1-topics{gap:8px 6px;padding:2px 0 6px}
}


/* ===== v15: self-contained topic illustrations and correctly-sized working panels ===== */
.ref-p1-topics, .ref-part1-screen .ref-p1-topics{
  box-sizing:border-box;
  display:grid;
  grid-template-columns:repeat(14,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  width:min(100%,1350px);
  max-width:1350px;
  height:clamp(205px,29.2vh,276px);
  min-height:0;
  flex:0 0 auto;
  gap:8px 6px;
  padding:3px 5px 7px;
  align-items:stretch;
  justify-items:stretch;
  align-self:center;
}
.ref-p1-topic{
  box-sizing:border-box;
  position:relative;
  width:100%;
  height:100%;
  aspect-ratio:auto;
  min-height:0;
  overflow:hidden;
  background:linear-gradient(150deg,#fdf8ff 0%,#f5e8f7 100%);
  border:2px solid #bca2bc;
  border-radius:17px;
  box-shadow:inset 0 2px 0 #ffffff, inset 0 -2px 1px #d6c8d4, 0 4px 0 #c9b7c7, 0 8px 15px #6c526c2b;
  transform:none;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.ref-p1-topic:nth-child(3n+2){background:linear-gradient(150deg,#fcfffd,#e8f3ed);border-color:#adc8bd;box-shadow:inset 0 2px 0 #fff,inset 0 -2px 1px #cadbd3,0 4px 0 #b6cbc1,0 8px 15px #6c526c2a}
.ref-p1-topic:nth-child(3n+3){background:linear-gradient(150deg,#fffef8,#f7e9dc);border-color:#dcc5ac;box-shadow:inset 0 2px 0 #fff,inset 0 -2px 1px #e0cdbc,0 4px 0 #d6c1a8,0 8px 15px #6c526c2a}
.ref-p1-topic:nth-child(4n+4){background:linear-gradient(150deg,#fffdfd,#f8e5e9);border-color:#ddbbc5;box-shadow:inset 0 2px 0 #fff,inset 0 -2px 1px #edd4d8,0 4px 0 #dab9c6,0 8px 15px #6c526c2a}
.ref-p1-topic.first-row,.ref-p1-topic.second-row{grid-column:span 2}
.ref-p1-topic:nth-child(1){grid-column:2 / span 2;grid-row:1}
.ref-p1-topic:nth-child(2){grid-column:4 / span 2;grid-row:1}
.ref-p1-topic:nth-child(3){grid-column:6 / span 2;grid-row:1}
.ref-p1-topic:nth-child(4){grid-column:8 / span 2;grid-row:1}
.ref-p1-topic:nth-child(5){grid-column:10 / span 2;grid-row:1}
.ref-p1-topic:nth-child(6){grid-column:12 / span 2;grid-row:1}
.ref-p1-topic:nth-child(7){grid-column:1 / span 2;grid-row:2}
.ref-p1-topic:nth-child(8){grid-column:3 / span 2;grid-row:2}
.ref-p1-topic:nth-child(9){grid-column:5 / span 2;grid-row:2}
.ref-p1-topic:nth-child(10){grid-column:7 / span 2;grid-row:2}
.ref-p1-topic:nth-child(11){grid-column:9 / span 2;grid-row:2}
.ref-p1-topic:nth-child(12){grid-column:11 / span 2;grid-row:2}
.ref-p1-topic:nth-child(13){grid-column:13 / span 2;grid-row:2}
.ref-p1-topic .ref-p1-card-number{
  position:absolute;z-index:2;top:7px;left:9px;
  font:700 clamp(17px,1.6vw,24px)/1 Georgia,serif;
  color:#50365e;text-shadow:0 1px 0 #fff;
  border-radius:6px;padding:1px 4px;
  background:rgba(255,253,249,.83);
}
.ref-p1-topic .ref-p1-card-art,
.ref-p1-topic:hover .ref-p1-card-art,
.ref-p1-topic:focus-visible .ref-p1-card-art{
  position:absolute;top:3px;left:6px;right:6px;
  width:calc(100% - 12px);height:calc(100% - 35px);
  min-height:0;max-width:none;max-height:none;
  border:0;outline:0;border-radius:12px;
  object-fit:contain;object-position:center;
  background:transparent;
  filter:none;transform:none;
  pointer-events:none;
}
.ref-p1-topic .ref-p1-card-name{
  position:absolute;left:4px;right:4px;bottom:5px;height:29px;
  display:flex;align-items:center;justify-content:center;
  font:700 clamp(10px,0.94vw,15px)/1.07 Georgia,serif;
  color:#423051;text-align:center;
  text-shadow:0 1px 0 #fff;
  white-space:normal;overflow:hidden;
  pointer-events:none;
}
.ref-p1-topic::after{content:none!important}
.ref-p1-topic:hover,.ref-p1-topic:focus-visible,
.ref-p1-topic.active,.ref-p1-topic.active:hover{
  transform:translateY(2px) scale(.992);
  box-shadow:inset 0 3px 7px #715b7629,inset 0 -1px 1px #d8cbd6,0 2px 0 #a899aa,0 4px 10px #6c526c27;
}
.ref-p1-topic.active,.ref-p1-topic.active:hover{border-color:#785c97;outline:2px solid #8e72a0;outline-offset:1px}
.ref-p1-topic:focus-visible{outline:3px solid #7a9c8d;outline-offset:2px}
.ref-p1-topic:active{transform:translateY(3px) scale(.985);box-shadow:inset 0 4px 9px #715b7638,0 1px 0 #a899aa,0 2px 6px #6c526c25}
/* Restore the work area instead of squeezing the prototype buttons. */
.ref-part1-screen{min-height:0}
.ref-part1-screen .p1-main-field{min-height:0;flex:1 1 0;grid-template-columns:minmax(255px,32%) minmax(0,1fr)}
.ref-part1-screen .p1-prototypes,.ref-part1-screen .p1-reader{min-height:0}
.ref-part1-screen .p1-prototypes{padding:9px 12px 10px}
.ref-part1-screen .p1-grid-navigation{margin:6px 0;padding:4px;flex:none}
.ref-part1-screen .p1-number-matrix{
  display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(6,minmax(37px,1fr));
  flex:1 1 0;min-height:0;gap:5px;align-content:stretch;
}
.ref-part1-screen .p1-number{min-height:37px;border-radius:10px;font-size:13px}
.ref-part1-screen .p1-reader{padding:9px 12px 10px}
.ref-part1-screen .p1-reader-head{min-height:42px}
.ref-part1-screen .p1-paper-stage{flex:1 1 auto;min-height:135px;margin:6px 0;padding:10px;overflow:hidden}
.ref-part1-screen .p1-paper-sheet{min-height:0;overflow:hidden}
.ref-part1-screen .p1-paper-sheet img{max-width:100%;max-height:100%;object-fit:contain}
.ref-part1-screen .p1-answer-row{min-height:43px;margin-top:2px}
/* Books 14–20: individual full-frame images, generous space underneath, a uniform 3D border. */
.ref-topic-gallery{
  width:min(100%,1260px);
  height:min(100%,610px);
  max-height:610px;
  flex:1 1 auto;
  min-height:0;
  align-self:center;
  margin:auto;
  padding:5px 8px 9px;
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
  gap:12px 10px;
}
.ref-topic-book{
  position:relative;
  display:flex;align-items:center;justify-content:center;
  min-width:0;min-height:0;
  border-radius:22px;
  border:2px solid #b9a6b4;
  background:linear-gradient(152deg,#fffdf9,#f4ebe9);
  box-shadow:inset 0 2px 0 #fff,inset 0 -2px 1px #decfd8,0 4px 0 #c5b2c2,0 10px 19px #64536d2e;
  overflow:hidden;
  padding:6px 7px 9px;
  transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease;
  touch-action:manipulation;
  cursor:pointer;
}
.ref-topic-book img{
  display:block;width:100%;height:100%;max-height:100%;max-width:100%;
  object-fit:contain;object-position:center;
  border-radius:14px;
  pointer-events:none;
}
.ref-topic-book:nth-child(even){background:linear-gradient(152deg,#fffefa,#edf4ef);border-color:#a9c2b8}
.ref-topic-book:nth-child(4n){background:linear-gradient(152deg,#fffefd,#f8ecee);border-color:#d6adb9}
.ref-topic-book:nth-child(1){grid-column:1 / span 2;grid-row:1}
.ref-topic-book:nth-child(2){grid-column:3 / span 2;grid-row:1}
.ref-topic-book:nth-child(3){grid-column:5 / span 2;grid-row:1}
.ref-topic-book:nth-child(4){grid-column:7 / span 2;grid-row:1}
.ref-topic-book:nth-child(5){grid-column:2 / span 2;grid-row:2}
.ref-topic-book:nth-child(6){grid-column:4 / span 2;grid-row:2}
.ref-topic-book:nth-child(7){grid-column:6 / span 2;grid-row:2}
.ref-topic-book:hover,.ref-topic-book:focus-visible{
  border-color:#9e859c;
  transform:translateY(2px) scale(.992);
  box-shadow:inset 0 3px 8px #715b761f,0 2px 0 #b6a4b0,0 6px 12px #64536d28;
}
.ref-topic-book:focus-visible{outline:3px solid #83a693;outline-offset:1px}
.ref-topic-book:active{transform:translateY(3px) scale(.985);box-shadow:inset 0 4px 10px #715b7635,0 1px 0 #b6a4b0,0 3px 7px #64536d24}
/* Define the four large home-card outlines without accidentally outlining the two books separately. */
.ref-home-stage .home-p1,.ref-home-stage .home-p2,.ref-home-stage .home-stats{
  box-shadow:inset 0 0 0 2px #ae95ab9c,inset 0 2px 1px #ffffffad,0 4px 0 -1px #9d889a66!important;
}
.ref-home-stage .home-p1:hover,.ref-home-stage .home-p2:hover,.ref-home-stage .home-stats:hover{
  box-shadow:inset 0 4px 10px #715b7623,inset 0 0 0 2px #a487a4b8,0 2px 0 -1px #9d889a66!important;
}
/* The two distinct Yashchenko/Lysenko books remain independently clickable, with a common container rim. */
.ref-home-stage:before{
  content:"";position:absolute;left:50.5%;top:0;width:49.5%;height:50.9%;
  border:2px solid #b8a7b5b0;border-radius:25px;
  box-shadow:0 4px 0 -1px #a998a977;
  pointer-events:none;z-index:1;
}
@media(max-width:1100px){
  .ref-p1-topics{height:clamp(200px,28vh,243px);gap:7px 5px}
  .ref-p1-topic .ref-p1-card-name{font-size:10.5px}
  .ref-part1-screen .p1-main-field{grid-template-columns:260px minmax(0,1fr)}
  .ref-topic-gallery{gap:8px;padding:4px 5px 8px}
}
@media(max-height:720px){
  .ref-p1-topics{height:clamp(176px,27vh,200px);gap:6px 5px}
  .ref-p1-topic .ref-p1-card-name{height:26px;font-size:10px;bottom:4px}
  .ref-p1-topic .ref-p1-card-art{height:calc(100% - 32px)}
  .ref-part1-screen .p1-number-matrix{grid-template-rows:repeat(6,minmax(32px,1fr));gap:3px}
  .ref-part1-screen .p1-number{min-height:32px}
  .ref-part1-screen .p1-paper-stage{min-height:100px}
  .ref-topic-gallery{max-height:520px;gap:6px 8px}
}
@media(prefers-reduced-motion:reduce){
  .ref-p1-topic,.ref-topic-book,.ref-hotspot{transition:none}
}

/* Final v15 sizing check on desktop and iPad landscape */
.ref-p1-topics,.ref-part1-screen .ref-p1-topics{height:clamp(226px,31vh,291px)}
@media(max-width:1100px){.ref-p1-topics,.ref-part1-screen .ref-p1-topics{height:clamp(215px,30.5vh,260px)}}
@media(max-height:720px){.ref-p1-topics,.ref-part1-screen .ref-p1-topics{height:clamp(185px,28vh,205px)}}
.ref-p1-topic .ref-p1-card-name{font-size:clamp(11px,1.02vw,15px)}


/* ===== v17: exact edge crops, compact topic cards and overflow-proof task panel ===== */
.ref-topic-gallery{
 width:min(100%,1110px);
 max-width:1110px;
 height:min(100%,645px);
 max-height:645px;
 padding:4px 4px 11px;
 gap:12px 10px;
}
.ref-topic-book{
 padding:4px 4px 7px;
 border-radius:20px;
 border-width:2px;
 overflow:hidden;
}
.ref-topic-book img{
 display:block;
 width:100%;height:100%;
 max-width:100%;max-height:100%;
 object-fit:contain;object-position:center center;
 border-radius:14px;
}
/* Exactly five columns. A short screen gets 4 complete rows; the 6-row page is retained elsewhere. */
.task-nav-v4 .task-preview.task-preview-30{
 grid-template-rows:repeat(6,minmax(0,1fr));
 gap:4px;
 min-height:0;
 max-height:360px;
 overflow:hidden;
}
.task-nav-v4 .task-preview.task-preview-20{
 grid-template-rows:repeat(4,minmax(0,1fr));
 gap:4px;
 min-height:0;
 max-height:260px;
 overflow:hidden;
}
.task-nav-v4 .task-preview .task-touch{
 height:100%;min-height:0;min-width:0;
 padding:2px 2px;
 overflow:hidden;
}
.task-nav-v4 .task-preview .task-touch span{line-height:1.05}
@media(max-height:900px){
 .task-nav-v4 .task-preview.task-preview-30{max-height:275px;gap:4px}
}
@media(max-height:810px){
 .task-nav-v4{gap:4px;padding:6px}
 .task-nav-v4 .task-preview.task-preview-20{max-height:230px;gap:4px}
 .task-nav-v4 .task-preview.task-preview-20 .task-touch{min-height:44px}
 .task-nav-v4 .task-pager-title{min-height:22px}
 .task-nav-v4 .task-pager-controls{min-height:42px;grid-template-columns:48px minmax(0,1fr) 48px;gap:6px}
 .task-nav-v4 .task-pager-controls .btn{height:42px;min-height:42px;min-width:48px;width:48px}
 .task-nav-v4 .mark-current{min-height:40px}
 .task-nav-v4 .pdf-controls{padding:5px 6px;gap:3px;margin-top:auto}
 .task-nav-v4 .pdf-controls .ctrl-row{min-height:39px;gap:3px}
 .task-nav-v4 .pdf-controls .ctrl-row .touch-btn{min-height:39px;height:39px;padding:4px 5px}
 .task-nav-v4 .pdf-controls .ctrl-row.ctrl-pager .pageind{height:39px}
 .task-nav-v4 .pdf-controls .secondary-tools .btn{min-height:39px}
}
@media(max-width:1080px){
 .ref-topic-gallery{width:min(100%,985px);gap:9px 7px}
 .ref-topic-book{padding:3px 3px 6px;border-radius:17px}
}

/* ==== v18: three books inside original collections card ==== */
.ref-home-stage .home-three-books{
 position:absolute;left:50.3%;top:0;width:49.7%;height:50.9%;z-index:2;
 border-radius:22px; border:2px solid rgba(168,140,162,.55);
 background:linear-gradient(145deg,#fffdf8 0%,#f3f8f1 57%,#f2eaf2 100%);
 box-shadow:inset 0 2px 0 rgba(255,255,255,.98),0 5px 0 rgba(156,129,154,.16),0 12px 22px rgba(78,55,77,.16);
 display:flex;flex-direction:column;align-items:stretch;padding:3% 3.3% 1.5%;overflow:hidden;
}
.home-three-images{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:1;gap:2%;min-height:0}
.home-book-choice{display:block;width:100%;min-width:0;min-height:0;border:1px solid rgba(167,149,164,.2);border-radius:15px;
 background:radial-gradient(ellipse at 50% 20%,#fff9ed 2%,#f6f3ee 68%,#e8ebe3 100%);
 box-shadow:0 8px 15px rgba(76,58,72,.13),inset 0 2px rgba(255,255,255,.85);padding:3%;cursor:pointer;
 transition:transform .18s ease,box-shadow .18s ease}
.home-book-choice img{display:block;width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 5px 5px rgba(71,51,68,.13))}
.home-book-choice:hover,.home-book-choice:focus-visible{transform:translateY(2px) scale(.99);box-shadow:inset 0 3px 8px rgba(94,70,93,.15),0 3px 8px rgba(94,70,93,.1)}
.home-book-choice:active{transform:translateY(3px) scale(.98)}
.home-three-title{text-align:center;flex:none;font:700 clamp(15px,2.0vw,31px)/1.2 Georgia,serif;color:#503754;white-space:nowrap;margin-top:1.2%;padding-bottom:.3%;}
/* Reader buttons and source selectors */
.source-switch{flex-wrap:wrap}
.source-switch .btn{flex:1 1 auto;min-width:0;white-space:normal}
/* Score input 1–20: 4 x 5 visible without scrolling, including controls */
.modal.score-modal{width:min(940px,calc(100vw - 26px));height:min(700px,calc(100dvh - 26px));max-height:calc(100dvh - 26px);
 display:flex;flex-direction:column;overflow:hidden;padding:12px 15px 14px;gap:6px}
.score-modal .modalhead{margin-bottom:1px;flex:none}
.score-modal .modalhead h2{font-size:clamp(18px,2vw,24px)}
.score-modal > p{font-size:11px;line-height:1.25;margin:0;flex:none}
.score-modal .score-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr));
 flex:1;min-height:0;max-height:none;overflow:hidden;padding:2px;gap:6px}
.score-modal .score-cell{min-width:0;min-height:0;padding:5px 4px;border-radius:12px;gap:3px;justify-content:center;overflow:hidden}
.score-modal .score-cell b{font-size:12px;line-height:1.1}
.score-modal .score-choices{flex-wrap:nowrap;gap:4px;align-items:center}
.score-modal .score-choices .btn{min-width:0;width:clamp(28px,3.5vw,40px);min-height:clamp(29px,4.2vh,40px);
 padding:2px;border-radius:9px;font-size:13px}
.score-modal .score-summary{margin:1px 0;padding:7px 12px;min-height:47px;flex:none}
.score-modal .score-summary strong{font-size:22px}
.score-modal .modalactions{flex:none;gap:6px}
.score-modal .modalactions .btn{min-height:36px;white-space:nowrap;font-size:12px}
.score-delete{border:1px solid #e1aaa9!important;color:#a8464e!important;background:linear-gradient(180deg,#fff5f2,#ffebec)!important}
.score-delete:hover{box-shadow:inset 0 3px 8px rgba(166,69,76,.15)!important}
.clear-modal{max-width:520px!important}
@media(max-width:800px){.score-modal .score-choices .btn{min-height:26px;width:30px}.score-modal .score-cell{padding:3px 2px}.home-three-title{font-size:15px}}
@media(max-height:700px){.score-modal .score-cell{padding:3px 1px;gap:1px}.score-modal .score-choices .btn{min-height:25px}.score-modal .modalactions .btn{min-height:31px}}

/* Ященко 50: navigation in 2–3 touch-friendly pages, no vertical scrolling */
.work-screen .collection-paged .number-grid{flex:none;overflow:visible;display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-auto-rows:clamp(29px,4.2vh,38px);gap:4px}
.work-screen .collection-paged .number-grid .btn{min-height:0;height:100%;padding:2px 0;font-size:12px}
.collection-paged .book-pager{display:flex;align-items:center;justify-content:space-between;gap:6px;flex:none;min-height:35px;background:#f7eff5;border-radius:12px;padding:2px 4px}
.collection-paged .book-pager span{font-size:11px;font-weight:700;color:#60465e;white-space:nowrap}
.collection-paged .book-pager .btn{min-width:35px;min-height:34px;flex:none}
@media(max-height:770px){.work-screen .collection-paged .number-grid{grid-auto-rows:34px}.collection-paged .book-pager{min-height:30px}.collection-paged .book-pager .btn{min-height:29px}}

/* v19 — approved four-card home layout, three individually clickable books.
   Original stage footprint and all other screens remain unchanged. */
.ref-home-stage::before{display:none!important}
.ref-home-stage .home-collection-book{
  position:absolute;top:3.6%;height:36.5%;z-index:2;
  border-radius:18px!important;
  background:transparent!important;
  outline:none;
  box-shadow:none!important;
  transition:transform .16s ease,box-shadow .16s ease,background .16s ease;
}
.ref-home-stage .home-collection-36{left:52.0%;width:16.1%}
.ref-home-stage .home-collection-40{left:68.5%;width:15.7%}
.ref-home-stage .home-collection-50{left:84.7%;width:14.4%}
.ref-home-stage .home-collection-book:hover{
  transform:translateY(2px) scale(.988)!important;
  background:rgba(255,255,255,.09)!important;
  box-shadow:inset 0 3px 10px rgba(85,63,85,.15)!important;
}
.ref-home-stage .home-collection-book:active{
  transform:translateY(3px) scale(.982)!important;
  box-shadow:inset 0 4px 12px rgba(85,63,85,.22)!important;
}
.ref-home-stage .home-collection-book:focus-visible{
  outline:3px solid #7e6499!important;outline-offset:0!important;
}
.ref-home-stage .home-collections-arrow{
  left:93.9%;top:43.4%;width:5.3%;height:7.4%;z-index:2;
  border-radius:50%!important;
}

/* ===== v20: independent full cards, retain approved original art ===== */
.ref-home-screen{padding:5px 10px 9px;display:flex;justify-content:center;align-items:center;overflow:hidden}
.home-card-grid{
 width:min(calc(100% - 10px),calc((100dvh - 86px)*1.531));
 aspect-ratio:1346/868;
 max-width:100%;max-height:100%;min-width:0;min-height:0;
 display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));
 gap:14px;overflow:visible;align-self:center;flex:none;
}
.home-card-grid .home-art-card{
 appearance:none;position:relative;display:flex;flex-direction:column;min-width:0;min-height:0;
 background:linear-gradient(155deg,#fffdfa,#fbf6f3);border:2px solid #beaabb;border-radius:27px;
 padding:8px;overflow:hidden;text-align:left;
 box-shadow:inset 0 2px 0 rgba(255,255,255,.95),0 4px 0 -1px #bda8b9a6,0 13px 20px #74617930;
 transition:transform .17s ease,box-shadow .17s ease,border-color .17s ease;
}
.home-card-grid .home-page-card{cursor:pointer;width:100%;height:100%;color:inherit}
.home-card-grid .home-art-card:hover{transform:translateY(2px) scale(.997);border-color:#a994af;box-shadow:inset 0 4px 9px #75607b12,0 2px 0 -1px #bda8b9aa,0 8px 14px #74617926}
.home-card-grid .home-art-card:active{transform:translateY(3px) scale(.994);box-shadow:inset 0 5px 10px #75607b20,0 1px 0 -1px #bda8b9aa,0 5px 8px #74617920}
.home-card-grid .home-art-card:focus-within{border-color:#a690ae}
.home-card-grid .home-card-art{width:100%;height:calc(100% - 58px);display:block;min-height:0;flex:1;object-fit:cover;object-position:center center;border-radius:19px 19px 12px 12px;user-select:none;-webkit-user-drag:none;pointer-events:none}
.home-card-grid .home-card-caption{flex:none;min-height:55px;width:100%;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 11px 0 15px;
 background:linear-gradient(175deg,#fffcf9,#fff9f4);border-radius:0 0 17px 17px}
.home-card-grid .home-card-title{font:700 clamp(23px,3vw,42px)/1.06 Georgia,'Times New Roman',serif;color:#2f1d57;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.home-card-grid .home-card-arrow{appearance:none;flex:none;width:45px;height:45px;display:grid;place-items:center;border:1px solid #ffffffd0;border-radius:17px;
 background:linear-gradient(135deg,#fffefc,#f7eeeb);box-shadow:0 5px 11px #765e6b21,inset 0 2px 1px #fff;
 color:#281d60;font:30px/1 Arial,sans-serif;cursor:pointer;transition:transform .14s ease,box-shadow .14s ease}
.home-card-grid button.home-card-arrow:hover{transform:translateY(1px);box-shadow:inset 0 2px 6px #765e6b18,0 2px 5px #765e6b21}
.home-card-grid .home-collection-card{position:relative}
.home-card-grid .home-three-book-hits{position:absolute;left:10px;right:10px;top:10px;bottom:65px;display:grid;grid-template-columns:repeat(3,1fr);gap:3px;z-index:1;pointer-events:none}
.home-card-grid .home-three-book-hits button{pointer-events:auto;appearance:none;min-width:0;min-height:0;cursor:pointer;border:0;background:transparent;border-radius:16px;transition:transform .14s ease,background-color .14s ease,box-shadow .14s ease}
.home-card-grid .home-three-book-hits button:hover{transform:translateY(2px) scale(.985);background:rgba(255,255,255,.10);box-shadow:inset 0 3px 9px rgba(82,58,84,.16)}
.home-card-grid .home-three-book-hits button:active{transform:translateY(3px) scale(.98)}
.home-card-grid .home-three-book-hits button:focus-visible{outline:3px solid #886da7;outline-offset:-3px}
@media(max-width:1100px){
 .home-card-grid{width:min(calc(100% - 4px),calc((100dvh - 84px)*1.531));gap:11px}
 .home-card-grid .home-art-card{border-radius:23px;padding:6px}
 .home-card-grid .home-card-art{border-radius:16px 16px 9px 9px}
 .home-card-grid .home-card-caption{min-height:47px;padding:2px 8px 0 11px}
 .home-card-grid .home-card-arrow{height:39px;width:39px;font-size:25px}
 .home-card-grid .home-card-title{font-size:clamp(19px,2.9vw,34px)}
 .home-card-grid .home-three-book-hits{left:8px;right:8px;top:8px;bottom:57px}
}
@media(max-height:680px){
 .home-card-grid{gap:10px;width:min(calc(100% - 8px),calc((100dvh - 80px)*1.531))}
 .home-card-grid .home-card-caption{min-height:39px;padding:0 7px 0 10px}
 .home-card-grid .home-card-title{font-size:clamp(18px,2.8vw,27px)}
 .home-card-grid .home-card-arrow{width:34px;height:34px;font-size:24px}
 .home-card-grid .home-three-book-hits{bottom:49px}
}
@media(prefers-reduced-motion:reduce){.home-card-grid .home-art-card,.home-card-grid .home-three-book-hits button{transition:none}}
