/* The library of Fred in 3D: the whole card Znalosti Freda (src/views/fredLibrary.ts, public/js/botlibrary.js; the owner, 1. 12. 2026:
   „3D vizualizace… vše ovládáno přes tu 3D projekci“). A night room in the colours of the forest of the agents (public/css/agents.css): a
   bookcase for every area of the knowledge, a book for every file, the moon in the window, Fred in his armchair. The same file goes to CRM
   (Johny) and Smart (Jarvis).
   How it is built (do not change without reading docs/DECISIONS.md, „Knihovna Freda 3D“): only layers parallel to the wall stand in the 3D
   scene (planes across it make the browser cut every layer and parts disappear); the floor and the leaf of the door turn in their own
   frame with their own perspective and come into the scene as flat pictures; nothing ends exactly on the plane of another layer; the
   surface of the scene takes no clicks, only its buttons do. The scene is drawn 1440 × 900 (a phone 390 × 760) and scaled to the card;
   the windows over it (a book, a bookcase, Fred, the desk) are ordinary cards of the application and are not scaled. */
html.sd .lib3d { position: relative; min-width: 0; max-width: 100%; }
html.sd .lib3d :where(*) { box-sizing: border-box; }
html.sd .lib3d .l3-okno { position: relative; width: 100%; overflow: hidden; overflow: clip; border-radius: var(--sd-radius-lg, 12px); background: linear-gradient(180deg, #110d2f, #2a1a5e 72%, #33204a); color: #f6f1ff; -webkit-user-select: none; user-select: none; touch-action: pan-y; }
html.sd .lib3d .l3-stage { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
html.sd .lib3d.cela { position: fixed; inset: 0; z-index: 900; background: #110d2f; }
html.sd .lib3d.cela .l3-okno { border-radius: 0; }
html.sd .lib3d :where(.l3-okno) button:focus-visible { outline: 3px solid #ffe08a; outline-offset: 2px; }
html.sd .lib3d :where(.svet, .l3-svetla) button { all: unset; box-sizing: border-box; cursor: pointer; pointer-events: auto; }
html.sd .lib3d .scena { position: absolute; left: 50%; top: 0; width: 1440px; height: 900px; margin-left: -720px; perspective: 1400px; perspective-origin: 720px 378px; }
html.sd .lib3d .kamera, html.sd .lib3d .svet { position: absolute; left: 0; top: 0; width: 1440px; height: 900px; transform-style: preserve-3d; }
/* ---------- 3D svět ---------- */
html.sd .lib3d .kamera,html.sd .lib3d .svet{pointer-events:none}
html.sd .lib3d .svet button{pointer-events:auto}
html.sd .lib3d .kniha.mizi .hrb,html.sd .lib3d .svet.fok .pult .pu-b,html.sd .lib3d .svet.fok .kniha.lez .hrb{pointer-events:none}
html.sd .lib3d .kamera{transition:transform 1.1s cubic-bezier(.3,.7,.2,1)}
html.sd .lib3d .kamera.tah{transition:none}
html.sd .lib3d .w{position:absolute;display:block}
html.sd .lib3d .nebe{left:220px;top:-110px;width:1000px;height:774px;overflow:hidden;transform:translateZ(-420px);background:linear-gradient(180deg,#0d0a2e 0,#0d0a2e 138px,#241659 354px,#4a2a86 498px,#b0559a 618px,#e2749f 690px)}
html.sd .lib3d .hv{position:absolute;width:3px;height:3px;border-radius:50%;background:#ffffff;box-shadow:0 0 6px 1px rgba(255,255,255,.8);animation:l3-trp 3.4s ease-in-out infinite}
html.sd .lib3d .mesic{position:absolute;left:415px;top:237px;width:170px;height:170px;border-radius:50%;background:radial-gradient(circle at 38% 36%,#fffdf3 0,#fff3cf 52%,#ffe7b0 100%);box-shadow:0 0 56px 16px rgba(255,240,190,.55)}
html.sd .lib3d .mesic::before{content:"";position:absolute;left:-130px;top:-130px;right:-130px;bottom:-130px;border-radius:50%;background:radial-gradient(circle,rgba(206,176,255,0) 39%,rgba(206,176,255,.36) 40%,rgba(206,176,255,0) 70%);animation:l3-zar 6s ease-in-out infinite}
html.sd .lib3d .mesic i{position:absolute;border-radius:50%;background:rgba(214,186,120,.36)}
html.sd .lib3d .mrak{position:absolute;left:200px;top:418px;width:300px;height:22px;border-radius:50%;background:rgba(236,214,255,.16);filter:blur(9px);animation:l3-mrk 48s linear infinite}
html.sd .lib3d .mesic{transition:filter 1.4s}
html.sd .lib3d .mesic::before{transition:opacity 1.2s}
html.sd .lib3d .mrak2{position:absolute;left:330px;top:215px;width:340px;height:215px;border-radius:50%;background:radial-gradient(ellipse at 50% 52%,rgba(52,40,104,.97) 0,rgba(52,40,104,.94) 46%,rgba(52,40,104,0) 72%);transform:translateX(-460px);opacity:0;transition:transform 1.8s cubic-bezier(.3,.6,.2,1),opacity 1.2s;pointer-events:none}
html.sd .lib3d .nebe-b,html.sd .lib3d .mesic-b{position:absolute;background:transparent;border:0;padding:0;cursor:pointer}
html.sd .lib3d .nebe-b{left:330px;top:100px;width:340px;height:560px}
html.sd .lib3d .mesic-b{left:415px;top:237px;width:170px;height:170px;border-radius:50%}
html.sd .lib3d .pad{position:absolute;left:560px;top:150px;width:90px;height:2.5px;border-radius:2px;background:linear-gradient(90deg,#ffffff,rgba(255,255,255,0));opacity:0;transform:rotate(-30deg);pointer-events:none}
html.sd .lib3d .pad.a{animation:l3-padA 1s ease-out 1}
html.sd .lib3d .pad.b{animation:l3-padB 1s ease-out 1}
html.sd .lib3d.tma-mesic .mrak2{transform:translateX(0);opacity:1}
html.sd .lib3d.tma-mesic .mesic{filter:brightness(.5)}
html.sd .lib3d.tma-mesic .mesic::before{opacity:0;animation:none}
html.sd .lib3d .svit,html.sd .lib3d .paprsek,html.sd .lib3d .zar{transition:opacity 1.4s}
html.sd .lib3d.tma-mesic .svit{opacity:.18}
html.sd .lib3d.tma-mesic .paprsek{opacity:.12}
html.sd .lib3d.tma-mesic .zar{opacity:.3}
html.sd .lib3d .kopce{position:absolute;left:0;top:692px;width:1000px;height:120px;background:#170f3d;border-radius:44% 56% 0 0/70px 110px 0 0}
html.sd .lib3d .kopce2{position:absolute;left:280px;top:674px;width:520px;height:140px;background:#1e1449;border-radius:50% 50% 0 0/100% 100% 0 0}
html.sd .lib3d .zed,html.sd .lib3d .zd{transform:translateZ(0)}
html.sd .lib3d .zed{background-color:#2a1a5e;background-image:repeating-linear-gradient(180deg,rgba(255,255,255,.045) 0 1px,rgba(255,255,255,0) 1px 46px),repeating-linear-gradient(90deg,rgba(255,255,255,.03) 0 1px,rgba(255,255,255,0) 1px 88px),linear-gradient(180deg,#19123f 0,#1d1548 160px,#2a1a5e 625px,#3a2470 824px)}
html.sd .lib3d .zed-l{left:-700px;top:-160px;width:1307px;height:824px;background-position:0 0,84px 0,0 0}
html.sd .lib3d .zed-p{left:833px;top:-160px;width:1407px;height:824px;background-position:0 0,47px 0,0 0}
html.sd .lib3d .zed-h{pointer-events:none;left:607px;top:-160px;width:226px;height:365px;background-position:0 0,9px 0,0 0;-webkit-mask-image:radial-gradient(circle 113px at 50% 100%,transparent 112.5px,#000 113.5px);mask-image:radial-gradient(circle 113px at 50% 100%,transparent 112.5px,#000 113.5px)}
html.sd .lib3d .zd{left:607px;top:612px;width:226px;height:52px;background:#352168}
html.sd .lib3d .zar{left:380px;top:-60px;width:680px;height:720px;transform:translateZ(1px);background:radial-gradient(ellipse 50% 50% at 50% 40%,rgba(206,180,255,.30),rgba(206,180,255,0) 70%);pointer-events:none}
html.sd .lib3d .okno{left:600px;top:85px;width:240px;height:534px;transform:translateZ(3px);border:7px solid #5a3a2a;border-radius:120px 120px 3px 3px;background:linear-gradient(#5a3a2a,#5a3a2a) 50% 0/5px 100% no-repeat,linear-gradient(#5a3a2a,#5a3a2a) 0 113px/100% 5px no-repeat,linear-gradient(#5a3a2a,#5a3a2a) 0 318px/100% 5px no-repeat;box-shadow:inset 0 0 0 1px rgba(255,231,176,.3),0 0 46px rgba(226,196,255,.28);pointer-events:none}
html.sd .lib3d .par-c{left:592px;top:612px;width:256px;height:10px;transform:translateZ(24px);background:linear-gradient(180deg,#9a6a4a,#6b4632);border-radius:2px}
html.sd .lib3d .par-v{left:596px;top:604px;width:248px;height:8px;transform:translateZ(12px);background:linear-gradient(180deg,#c79a72,#9a6a4a);clip-path:polygon(2% 0,98% 0,100% 100%,0 100%)}
html.sd .lib3d .paprsek{left:500px;top:120px;width:440px;height:540px;transform:translateZ(70px);background:linear-gradient(180deg,rgba(255,240,205,0) 0,rgba(226,206,255,.13) 26%,rgba(226,206,255,.04) 100%);clip-path:polygon(29% 0,71% 0,100% 100%,0 100%);pointer-events:none}
html.sd .lib3d .prach{width:3px;height:3px;border-radius:50%;background:#ffe9a8;box-shadow:0 0 6px 2px rgba(255,233,168,.6);animation:l3-prach 9s linear infinite;pointer-events:none}
/* podlaha: perspektiva se spočítá uvnitř vlastního rámečku a do scény přijde jako hotový plochý obraz (velká šikmá plocha přímo ve scéně se v úzkém okně nedokreslovala) */
html.sd .lib3d .podlaha-box{left:-700px;top:664px;width:2940px;height:380px;overflow:hidden;transform:translateZ(.1px);perspective-origin:1420px -286px}
html.sd .lib3d .podlaha{position:absolute;left:0;top:0;width:2940px;height:760px;transform-origin:50% 0;transform:rotateX(90deg);background:linear-gradient(180deg,rgba(12,7,26,0) 0,rgba(12,7,26,.74) 100%),repeating-linear-gradient(90deg,rgba(36,20,47,.9) 0 2px,transparent 2px 118px),repeating-linear-gradient(180deg,rgba(36,20,47,.5) 0 2px,transparent 2px 170px),linear-gradient(180deg,#4a2f66,#33204a)}
html.sd .lib3d .koberec{position:absolute;left:1190px;top:118px;width:460px;height:280px;border-radius:50%;background:radial-gradient(ellipse at 50% 50%,#6a2548 0 62%,#c9981c 62% 64.5%,#5b1f3e 64.5% 100%)}
html.sd .lib3d .svit{position:absolute;left:1307px;top:22px;width:226px;height:360px;border-radius:0 0 113px 113px/0 0 150px 150px;background:linear-gradient(rgba(58,36,112,.5),rgba(58,36,112,.5)) 50% 0/7px 100% no-repeat,linear-gradient(rgba(58,36,112,.5),rgba(58,36,112,.5)) 0 138px/100% 7px no-repeat,linear-gradient(180deg,rgba(255,238,200,.36),rgba(226,202,255,.16));filter:blur(2.5px)}
html.sd .lib3d .stin{position:absolute;border-radius:50%;background:radial-gradient(ellipse at 50% 50%,rgba(5,2,26,.62),rgba(5,2,26,0) 70%)}
html.sd .lib3d .lista{top:352px;height:16px;transform:translateZ(50px);background:linear-gradient(180deg,#8a5c40 0,#5a3a2a 11px,#24140e 11px)}
html.sd .lib3d .dvere{top:420px;width:185px;height:242px;transform:translateZ(1px);transition:left .9s cubic-bezier(.3,.7,.2,1)}
html.sd .lib3d .dv-o{position:absolute;left:30px;top:26px;width:125px;height:216px;border-radius:63px 63px 0 0;border:7px solid #5a3a2a;border-bottom:0;overflow:hidden;perspective:520px;perspective-origin:50% 60%;background:radial-gradient(ellipse 80% 55% at 50% 100%,rgba(255,197,107,.9),rgba(255,197,107,.22) 70%,rgba(255,197,107,0) 100%),linear-gradient(180deg,#1a0f2c,#3a2140)}
html.sd .lib3d .dv-kridlo{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:56px 56px 0 0;transform-origin:0 50%;transition:transform .7s cubic-bezier(.3,.7,.2,1);background:linear-gradient(180deg,rgba(0,0,0,0) 0,rgba(0,0,0,0) 58px,#2a1a14 58px,#2a1a14 64px,rgba(0,0,0,0) 64px,rgba(0,0,0,0) 150px,#2a1a14 150px,#2a1a14 156px,rgba(0,0,0,0) 156px),repeating-linear-gradient(90deg,#4a2e1e 0,#4a2e1e 2px,#7a5238 2px,#7a5238 21px,#6b4632 21px,#6b4632 23px)}
html.sd .lib3d .dv-klika{position:absolute;right:11px;top:112px;width:11px;height:11px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff3b0,#ffd04d 55%,#c8932a);box-shadow:0 0 0 1.5px rgba(40,22,2,.6);display:block}
html.sd .lib3d .dvere.otevrene .dv-kridlo{transform:rotateY(76deg)}
html.sd .lib3d .dv-n{position:absolute;left:0;right:0;top:4px;text-align:center;font-weight:800;font-size:11px;line-height:1;color:#e8dcff;letter-spacing:.04em}
/* regál: záda a čelo jsou dvě vrstvy za sebou (žádné kolmé plochy, ty by scénu krájely) */
html.sd .lib3d .regal{position:absolute;transform-style:preserve-3d;transition:left .9s cubic-bezier(.3,.7,.2,1),width .9s cubic-bezier(.3,.7,.2,1)}
html.sd .lib3d .r-zada{position:absolute;left:0;top:0;right:0;bottom:0;transform:translateZ(2px);background:linear-gradient(90deg,#4a2e1e 0,#2a1810 7px,rgba(42,24,16,0) 7px,rgba(42,24,16,0) calc(100% - 7px),#2a1810 calc(100% - 7px),#4a2e1e 100%),linear-gradient(180deg,rgba(0,0,0,.55) 32px,rgba(0,0,0,0) 66px,rgba(0,0,0,0) 152px,rgba(0,0,0,.55) 152px,rgba(0,0,0,0) 186px),#1f1226}
html.sd .lib3d .r-celo{position:absolute;left:-4px;top:-4px;right:-4px;bottom:0;transform:translateZ(44px);pointer-events:none}
html.sd .lib3d .r-celo>i{position:absolute;display:block}
html.sd .lib3d .r-sl,html.sd .lib3d .r-sp{top:4px;bottom:0;width:9px;background:linear-gradient(90deg,#5a3a2a,#7a5238 50%,#4a2e1e)}
html.sd .lib3d .r-sl{left:4px}
html.sd .lib3d .r-sp{right:4px}
html.sd .lib3d .r-d1{left:13px;right:13px;top:148px;height:8px;background:linear-gradient(180deg,#8a5c40,#5a3a2a)}
html.sd .lib3d .r-sokl{left:2px;right:2px;bottom:0;height:15px;background:linear-gradient(180deg,#6b4632,#3a2418)}
html.sd .lib3d .r-rimsa{position:absolute;left:0;right:0;top:0;height:36px;background:linear-gradient(180deg,#9a6a4a,#6b4632 60%,#4a2e1e);border-radius:5px 5px 2px 2px;box-shadow:0 3px 0 rgba(0,0,0,.35)}
html.sd .lib3d .regal.roste .r-rimsa{animation:l3-roste 1.3s ease-out}
html.sd .lib3d .stitek{pointer-events:auto;position:absolute;left:6px;right:6px;top:3px;height:30px;border-radius:7px;border:1px solid #e3c173;background:#17122f;color:#fff3d6;font-weight:700;font-size:12px;line-height:1;display:flex;align-items:center;gap:5px;padding:0 6px 0 3px;cursor:pointer;text-align:left}
html.sd .lib3d .stitek::after{content:"";position:absolute;left:-4px;right:-4px;top:-9px;bottom:-9px}
html.sd .lib3d .stitek:hover,html.sd .lib3d .regal.vyb .stitek{background:#2a1f55;border-color:#ffe08a;box-shadow:0 0 14px rgba(255,224,138,.55)}
html.sd .lib3d .f-teal{background:#baeeeb}
html.sd .lib3d .f-purple{background:#dbcbfb}
html.sd .lib3d .f-slate{background:#d8deeb}
html.sd .lib3d .f-green{background:#bcebd2}
html.sd .lib3d .f-orange{background:#fbe2c4}
html.sd .lib3d .st-av{flex:none;width:22px;height:22px;border-radius:50%;overflow:hidden;display:block;position:relative;background:#fff}
html.sd .lib3d .st-av svg,html.sd .lib3d .st-av img{position:absolute;left:0;top:0;width:100%;height:100%;display:block}
html.sd .lib3d .st-av.fred{box-shadow:inset 0 0 0 2px #2f6fe4}
html.sd .lib3d .st-av.fred img{width:150%;height:150%;left:-25%;top:-22%}
/* a name has two lines at most; the room above and under keeps the accent of Ú and the tails of y, p, j whole (scripts/ui-check-probe.js, cliptext) */
html.sd .lib3d .st-n{flex:1;min-width:0;max-height:28px;overflow:hidden;line-height:11.5px;padding:3px 0 2px}
/* the mark of a level: the same glyph as the tags of the application (the tick, the triangle, the cross), never a bare dot */
html.sd .lib3d .st-t{flex:none;width:13px;margin-left:3px;font-size:12px;line-height:1;text-align:center;display:block}
html.sd .lib3d .l-good{color:#57d38c}
html.sd .lib3d .l-little{color:#ffc35c}
html.sd .lib3d .l-none{color:#ff9a9a}
html.sd .lib3d .st-p{flex:none;min-width:18px;height:17px;border-radius:9px;background:#fff3d6;color:#2a1657;font-weight:800;font-size:11px;line-height:17px;text-align:center;padding:0 4px}
html.sd .lib3d .r-nic{position:absolute;left:12px;right:12px;top:62px;margin:0;transform:translateZ(30px);text-align:center;font-weight:700;font-size:11px;line-height:1.35;color:#cfc6ee}
html.sd .lib3d .r-nic b{display:block;color:#f6f1ff;font-weight:800}
html.sd .lib3d .regal>.svice{position:absolute;display:block;top:240px;width:8px;height:23px;transform:translateZ(28px);background:linear-gradient(90deg,#d9c9a6,#fff8e6 50%,#d9c9a6);border-radius:2px 2px 1px 1px}
html.sd .lib3d .regal>.svice.skryt{display:none}
html.sd .lib3d .svice>i{position:absolute;display:block}
html.sd .lib3d .sv-zar{left:50%;top:-48px;width:68px;height:70px;margin-left:-34px;border-radius:50%;background:radial-gradient(ellipse at 50% 56%,rgba(255,197,107,.32),rgba(255,197,107,0) 68%);pointer-events:none;animation:l3-zarsv 2.3s ease-in-out infinite;transition:opacity .4s}
html.sd .lib3d .sv-plamen{left:50%;top:-13px;width:8px;height:13px;margin-left:-4px;border-radius:50%/62% 62% 38% 38%;background:radial-gradient(circle at 50% 72%,#fffbe0 0,#fffbe0 18%,#ffd35a 46%,#ff8a2a 82%);box-shadow:0 0 14px 6px rgba(255,190,90,.55);transform-origin:50% 100%;animation:l3-plam 1.3s ease-in-out infinite;transition:opacity .25s}
html.sd .lib3d .sv-dym{left:50%;top:-16px;width:5px;height:11px;margin-left:-2.5px;border-radius:50%;background:rgba(226,220,240,.6);opacity:0;filter:blur(1.5px)}
html.sd .lib3d .svice.zhasla .sv-plamen{opacity:0;animation:none}
html.sd .lib3d .svice.zhasla .sv-zar{opacity:0;animation:none}
html.sd .lib3d .svice.zhasla .sv-dym{animation:l3-dym 1.5s ease-out 1}
html.sd .lib3d .sv-b{position:absolute;left:-14px;top:-24px;width:36px;height:50px;background:transparent;border:0;padding:0;cursor:pointer;border-radius:8px}
/* kniha */
html.sd .lib3d .kniha{position:absolute;transform:translateZ(38px);transition:left .9s cubic-bezier(.3,.7,.2,1),top .9s cubic-bezier(.3,.7,.2,1),transform .35s cubic-bezier(.2,.7,.2,1),opacity .5s}
html.sd .lib3d .kniha.vyb{transform:translateZ(64px)}
html.sd .lib3d .kniha.lez{transform:translateZ(562px)}
html.sd .lib3d .kniha.lez.vyb{transform:translateZ(562px) translateY(-5px)}
html.sd .lib3d .kniha.misto{visibility:hidden}
html.sd .lib3d .kniha.mizi{transform:translateZ(130px) translateY(-34px) scale(.45);opacity:0;pointer-events:none}
html.sd .lib3d .kniha.lez.mizi{transform:translateZ(562px) translateY(-50px) scale(.45)}
html.sd .lib3d .svet.fok .pult,html.sd .lib3d .svet.fok .stolek,html.sd .lib3d .svet.fok .kniha.lez{opacity:0;pointer-events:none}
html.sd .lib3d .kniha.pryc{display:none}
html.sd .lib3d .lez .k-t{display:block;position:absolute;left:0;right:0;top:-14px;height:14px;background:linear-gradient(180deg,var(--kd),var(--kb));clip-path:polygon(7% 0,93% 0,100% 100%,0 100%)}
html.sd .lib3d .hrb{position:absolute;left:0;top:0;width:100%;height:100%;border:0;padding:0;margin:0;cursor:pointer;border-radius:3px 3px 2px 2px;color:#fffaf0;overflow:hidden;background:linear-gradient(90deg,rgba(0,0,0,.3) 0,rgba(0,0,0,0) 20%,rgba(255,255,255,.12) 34%,rgba(0,0,0,0) 52%,rgba(0,0,0,.32) 100%),linear-gradient(180deg,var(--kb) 0 11px,var(--kd) 11px calc(100% - 17px),var(--kb) calc(100% - 17px) 100%)}
html.sd .lib3d .zakon .hrb{background:linear-gradient(90deg,rgba(0,0,0,.3) 0,rgba(0,0,0,0) 20%,rgba(255,255,255,.12) 34%,rgba(0,0,0,0) 52%,rgba(0,0,0,.32) 100%),linear-gradient(180deg,transparent 11px,#e9c46a 11px 13px,transparent 13px calc(100% - 19px),#e9c46a calc(100% - 19px) calc(100% - 17px),transparent calc(100% - 17px)),linear-gradient(180deg,var(--kb) 0 11px,var(--kd) 11px calc(100% - 17px),var(--kb) calc(100% - 17px) 100%)}
html.sd .lib3d .lez .hrb{background:linear-gradient(180deg,rgba(255,255,255,.14) 0,rgba(0,0,0,0) 40%,rgba(0,0,0,.3) 100%),linear-gradient(90deg,var(--kb) 0 10px,var(--kd) 10px calc(100% - 20px),var(--kb) calc(100% - 20px) 100%)}
html.sd .lib3d .kniha.nova .hrb{animation:l3-nova 2.6s ease-out}
html.sd .lib3d .kniha.vyb .hrb{box-shadow:0 0 0 2px #ffe08a,0 0 22px 6px rgba(255,224,138,.7)}
html.sd .lib3d .napis{position:absolute;left:0;right:0;top:14px;bottom:19px;display:flex;flex-direction:column;justify-content:center;align-items:center;writing-mode:vertical-rl;transform:rotate(180deg);font-weight:700;font-size:9px;line-height:10.5px;letter-spacing:.01em;text-shadow:0 1px 1px rgba(0,0,0,.5);white-space:nowrap}
html.sd .lib3d .napis>b,html.sd .lib3d .napis>span,html.sd .lib3d .napis>em{display:block;flex:none;max-height:100%;overflow:hidden;text-overflow:ellipsis}
html.sd .lib3d .napis>b{font-weight:800}
html.sd .lib3d .napis>span,html.sd .lib3d .napis>em{font-style:normal;color:#efe8ff}
html.sd .lib3d .r1 .napis>span,html.sd .lib3d .r1 .napis>em,html.sd .lib3d .r2 .napis>em{display:none}
html.sd .lib3d .lez .napis{writing-mode:horizontal-tb;transform:none;top:0;bottom:0;left:13px;right:22px;align-items:flex-start;font-size:9.5px}
html.sd .lib3d .lez .napis>b{max-height:none;max-width:100%}
html.sd .lib3d .lez .napis>span,html.sd .lib3d .lez .napis>em{display:none}
html.sd .lib3d .par{position:absolute;left:0;right:0;top:2px;text-align:center;font-size:8.5px;line-height:1;color:#ffe7b0;display:none}
html.sd .lib3d .zakon .par{display:block}
html.sd .lib3d .pecet{position:absolute;left:50%;bottom:4px;width:10px;height:10px;margin-left:-5px;border-radius:50%;background:radial-gradient(circle at 35% 30%,#fff3b0,#ffd04d 55%,#c8932a);box-shadow:0 0 0 1.5px rgba(40,22,2,.6);display:block}
html.sd .lib3d .nv .pecet{display:none}
html.sd .lib3d .kniha.lez .hrb{touch-action:none;cursor:grab}
html.sd .lib3d .kniha.tazena{visibility:hidden}
html.sd .lib3d .regal.cil .r-rimsa{box-shadow:0 0 0 3px #ffe08a,0 0 30px 10px rgba(255,224,138,.85)}
html.sd .lib3d .regal.cil .r-zada{box-shadow:inset 0 0 0 3px #ffe08a,inset 0 0 40px rgba(255,224,138,.35)}
/* a book is moved by hand: a standing one is taken with the mouse (under a finger the scene moves, so there the window of the book has the
   buttons), the cabinet Nezařazené lights up when a book from a bookcase is held over it */
@media (hover:hover) and (pointer:fine){html.sd .lib3d .hrb[data-tah="1"]{cursor:grab}}
html.sd .lib3d .stolek.cil{box-shadow:0 0 0 3px #ffe08a,0 0 30px 10px rgba(255,224,138,.85)}
html.sd .lib3d .l3-karta .btn[disabled][aria-current]{opacity:1;border-color:var(--accent);box-shadow:inset 0 0 0 1px var(--accent);cursor:default}
html.sd .lib3d .lez .pecet{left:auto;right:5px;bottom:50%;margin:0 0 -5px 0}
html.sd .lib3d .stuha{position:absolute;right:2px;top:0;width:8px;height:17px;background:#ffd978;clip-path:polygon(0 0,100% 0,100% 100%,50% 74%,0 100%);display:none}
html.sd .lib3d .novela .stuha{display:block}
html.sd .lib3d .b-purple{--kb:#6d3fd0;--kd:#3a1d82}
html.sd .lib3d .b-blue{--kb:#3d7de0;--kd:#1e4c9f}
html.sd .lib3d .b-green{--kb:#1f9a5c;--kd:#0f6a3d}
html.sd .lib3d .b-orange{--kb:#e0842e;--kd:#a4541a}
html.sd .lib3d .b-teal{--kb:#159a9a;--kd:#0b6769}
html.sd .lib3d .b-pink{--kb:#c2408e;--kd:#86225f}
html.sd .lib3d .b-red{--kb:#d04a4a;--kd:#8c2530}
html.sd .lib3d .b-gold{--kb:#c9981c;--kd:#86610c}
html.sd .lib3d .b-slate{--kb:#5d6b8c;--kd:#353f5a}
/* the Skripta (what Fred learned from the use of the application): a light notebook with a dark back strip and the cap on its top, so it
   is told from a file at a glance; its words are dark */
html.sd .lib3d .b-skr{--kb:#f2e2b4;--kd:#c9a85c}
html.sd .lib3d .kniha.b-skr .hrb{color:#2a1a4e;box-shadow:inset 5px 0 0 #2a1a4e,inset 6px 0 0 rgba(255,255,255,.55)}
html.sd .lib3d .kniha.b-skr .napis{text-shadow:none}
html.sd .lib3d .kniha.b-skr .par{display:flex;justify-content:center;color:#2a1a4e;font-size:10px;top:3px;left:6px;right:0}
/* the mark and the words of the Skripta stand in the middle of the light face of the spine, beside its dark 6 px strip (the owner, 1. 12. 2026: „ikonka ujíždí“) */
html.sd .lib3d .kniha.b-skr .napis{left:6px}
/* nábytek v popředí */
html.sd .lib3d .stolek{left:472px;top:618px;width:122px;height:44px;transform:translateZ(560px);transition:opacity .4s;border-radius:6px 6px 3px 3px;background:linear-gradient(180deg,#6b4632,#3a2418);display:flex;flex-wrap:wrap;align-content:center;align-items:center;justify-content:center;gap:3px 7px;font-weight:800;font-size:12px;line-height:1;color:#fff3d6;box-shadow:inset 0 2px 0 rgba(255,231,176,.22),0 16px 18px -8px rgba(5,2,26,.75)}
html.sd .lib3d .stolek small{flex:0 0 100%;text-align:center;font-weight:700;font-size:8.5px;line-height:1;color:#ead9c0}
html.sd .lib3d .stolek::before{content:"";position:absolute;left:0;right:0;top:-24px;height:24px;background:linear-gradient(180deg,#5a3a2a,#9a6a4a);clip-path:polygon(9% 0,91% 0,100% 100%,0 100%)}
html.sd .lib3d .stolek b{min-width:18px;height:17px;border-radius:9px;background:#fff3d6;color:#2a1657;font-weight:800;font-size:11px;line-height:17px;text-align:center;padding:0 4px}
html.sd .lib3d .pult{left:848px;top:588px;width:114px;height:74px;transform:translateZ(560px);transition:opacity .4s;border-radius:8px 8px 3px 3px;background:linear-gradient(180deg,#7a5238,#3a2418);color:#fff3d6;padding:20px 6px 6px;text-align:center;box-shadow:inset 0 2px 0 rgba(255,231,176,.28),0 16px 18px -8px rgba(5,2,26,.75);display:flex;flex-direction:column;align-items:center;gap:2px}
html.sd .lib3d .pult:hover{background:linear-gradient(180deg,#8a5c40,#4a2e1e)}
html.sd .lib3d .pult::before{content:"";position:absolute;left:0;right:0;top:-22px;height:22px;background:linear-gradient(180deg,#5a3a2a,#9a6a4a);clip-path:polygon(9% 0,91% 0,100% 100%,0 100%)}
html.sd .lib3d .pu-b{position:absolute;left:-6px;top:-52px;width:126px;height:126px;background:transparent;border:0;border-radius:12px;cursor:pointer;padding:0}
html.sd .lib3d .pu-t{font-weight:800;font-size:13.5px;line-height:1.1}
html.sd .lib3d .pu-s{font-weight:700;font-size:9.5px;line-height:1.15;color:#ead9c0}
html.sd .lib3d .pu-kniha{position:absolute;left:50%;top:-37px;width:60px;height:43px;margin-left:-30px;filter:drop-shadow(0 0 10px rgba(255,217,120,.85));animation:l3-vzn 4.2s ease-in-out infinite}
html.sd .lib3d .kreslo{left:622px;top:456px;width:195px;height:205.400px;overflow:visible;pointer-events:none}
html.sd .lib3d .fredbox{left:622px;top:456px;width:195px;height:195px;transform:translateZ(240px);pointer-events:none}
html.sd .lib3d .fredbox img{display:block;width:195px;height:195px;transform-origin:50% 100%;animation:l3-dech 5.5s ease-in-out infinite}
html.sd .lib3d .fredbtn{left:664px;top:504px;width:112px;height:124px;transform:translateZ(252px);background:transparent;border:0;border-radius:40px;cursor:pointer;padding:0}
html.sd .lib3d .lampa{left:780px;top:479px;width:62px;height:182px;transform:translateZ(234px);overflow:visible;pointer-events:none}
html.sd .lib3d .lampa-z{left:655px;top:360px;width:312px;height:300px;transform:translateZ(235px);border-radius:50%;background:radial-gradient(circle at 50% 50%,rgba(255,226,160,.5) 0,rgba(255,197,107,.17) 45%,rgba(255,197,107,0) 100%);animation:l3-zar 5s ease-in-out infinite;pointer-events:none}
/* Fredova kniha: v klidu se vznáší vedle něj a občas otočí list; když se učí, má ji otevřenou před sebou a listuje */
html.sd .lib3d .lampa-z{transition:opacity .45s}
html.sd .lib3d .lampa .stinidlo{transition:fill .45s}
html.sd .lib3d.tma-lampa .lampa-z{opacity:0;animation:none}
html.sd .lib3d.tma-lampa .lampa .stinidlo{fill:#7a5f36}
html.sd .lib3d .lampa-b{left:780px;top:470px;width:62px;height:192px;transform:translateZ(238px);background:transparent;border:0;padding:0;cursor:pointer;border-radius:10px}
html.sd .lib3d .stolek-b{left:466px;top:612px;width:134px;height:50px;transform:translateZ(561px);background:transparent;border:0;padding:0;cursor:pointer;border-radius:8px}
html.sd .lib3d .svet.fok .stolek-b{pointer-events:none}
html.sd .lib3d .letkniha{left:594px;top:546px;width:66px;height:54px;transform:translateZ(262px);overflow:visible;pointer-events:none;transition:left .5s cubic-bezier(.3,.7,.2,1),top .5s cubic-bezier(.3,.7,.2,1),width .5s cubic-bezier(.3,.7,.2,1),height .5s cubic-bezier(.3,.7,.2,1)}
html.sd .lib3d .letkniha.uci{left:666px;top:574px;width:108px;height:88px}
html.sd .lib3d .letkniha g{animation:l3-vzn 4.2s ease-in-out infinite}
html.sd .lib3d .letkniha .list{transform-box:fill-box;transform-origin:0 50%;animation:l3-list 7s ease-in-out infinite}
html.sd .lib3d .letkniha.uci .list{animation:l3-listuj .75s ease-in-out infinite}
html.sd .lib3d .letkniha .jiskra{opacity:0}
html.sd .lib3d .letkniha.uci .jiskra{animation:l3-trp 1.1s ease-in-out infinite}
/* agent a letící kniha */
html.sd .lib3d .posel{left:0;top:0;width:92px;height:98px;margin:-100px 0 0 -46px;transition-property:transform,opacity;transition-timing-function:linear;pointer-events:none}
html.sd .lib3d .posel.skryt{opacity:0}
html.sd .lib3d .posel svg{display:block;width:92px;height:98px;overflow:visible}
html.sd .lib3d .posel.jde svg{animation:l3-krok .44s ease-in-out infinite}
html.sd .lib3d .p-jm{position:absolute;left:50%;bottom:122px;transform:translateX(-50%);white-space:nowrap;background:rgba(13,10,46,.88);border:1px solid rgba(255,255,255,.28);border-radius:999px;padding:4px 10px;font-weight:800;font-size:11.5px;line-height:1.2;color:#ffffff}
html.sd .lib3d .p-kniha{position:absolute;left:35px;top:-16px;width:22px;height:16px;border-radius:2px;background:var(--kb);display:none;box-shadow:0 0 12px 3px rgba(255,217,120,.6)}
html.sd .lib3d .p-kniha::after{content:"";position:absolute;left:2px;top:2px;width:18px;height:11px;background:linear-gradient(90deg,#fdf4e6 0 8.4px,var(--kd) 8.4px 9.6px,#fdf4e6 9.6px)}
html.sd .lib3d .posel.nese .p-kniha{display:block}
html.sd .lib3d .posel.stara .p-kniha{filter:grayscale(.85) brightness(.8);box-shadow:none}
html.sd .lib3d .let{left:0;top:0;pointer-events:none;transition:transform 1.25s cubic-bezier(.45,.05,.3,1),width 1.25s cubic-bezier(.45,.05,.3,1),height 1.25s cubic-bezier(.45,.05,.3,1)}
html.sd .lib3d .let .hop{position:absolute;left:0;top:0;width:100%;height:100%;border-radius:3px;background:var(--kb);box-shadow:0 0 0 2px rgba(255,224,138,.95),0 0 26px 10px rgba(255,216,120,.75);animation:l3-hop 1.3s ease-in-out both}
html.sd .lib3d .let .hop::after{content:"";position:absolute;left:2px;top:2px;right:2px;bottom:3px;background:#fdf4e6;border-radius:1px}
html.sd .lib3d .let.stara .hop{filter:grayscale(.85) brightness(.8);box-shadow:0 0 0 2px rgba(200,200,220,.6)}
/* ---------- okna a popisky přes scénu ---------- */
@keyframes l3-trp{0%,100%{opacity:.25;transform:scale(.8)}50%{opacity:1;transform:scale(1.25)}}
@keyframes l3-mrk{0%{transform:translateX(-360px)}100%{transform:translateX(620px)}}
@keyframes l3-prach{0%{transform:translate3d(0,0,0);opacity:0}15%{opacity:.9}85%{opacity:.7}100%{transform:translate3d(26px,-120px,0);opacity:0}}
@keyframes l3-plam{0%,100%{transform:scale(1,1) rotate(-2deg)}18%{transform:scale(.9,1.12) rotate(3deg)}37%{transform:scale(1.08,.9) rotate(-4deg)}55%{transform:scale(.95,1.16) rotate(1deg)}74%{transform:scale(1.1,.93) rotate(4deg)}88%{transform:scale(.93,1.07) rotate(-2deg)}}
@keyframes l3-zarsv{0%,100%{opacity:.72;transform:scale(1)}23%{opacity:1;transform:scale(1.1)}41%{opacity:.62;transform:scale(.95)}62%{opacity:.95;transform:scale(1.06)}80%{opacity:.78;transform:scale(1)}}
@keyframes l3-dym{0%{opacity:.75;transform:translateY(0) scale(1)}100%{opacity:0;transform:translateY(-30px) scale(2.4)}}
@keyframes l3-padA{0%{opacity:0;transform:translate(0,0) rotate(-30deg)}12%{opacity:1}100%{opacity:0;transform:translate(-250px,145px) rotate(-30deg)}}
@keyframes l3-padB{0%{opacity:0;transform:translate(0,0) rotate(-30deg)}12%{opacity:1}100%{opacity:0;transform:translate(-250px,145px) rotate(-30deg)}}
@keyframes l3-roste{0%{box-shadow:0 0 0 0 rgba(255,224,138,0)}30%{box-shadow:0 0 0 4px #ffe08a,0 0 34px 12px rgba(255,224,138,.8)}100%{box-shadow:0 3px 0 rgba(0,0,0,.35)}}
@keyframes l3-nova{0%{box-shadow:0 0 0 3px #ffe08a,0 0 30px 12px rgba(255,216,120,.95)}100%{box-shadow:0 0 0 0 rgba(255,224,138,0)}}
@keyframes l3-list{0%,86%{transform:scaleX(1)}93%,100%{transform:scaleX(-1)}}
@keyframes l3-listuj{0%{transform:scaleX(1)}100%{transform:scaleX(-1)}}
@keyframes l3-vzn{0%,100%{transform:translateY(0)}50%{transform:translateY(-5px)}}
@keyframes l3-dech{0%,100%{transform:scale(1)}50%{transform:scale(1.018)}}
@keyframes l3-zar{0%,100%{opacity:.72}50%{opacity:1}}
@keyframes l3-krok{0%,100%{transform:translateY(0) rotate(-1.5deg)}50%{transform:translateY(-5px) rotate(1.5deg)}}
@keyframes l3-hop{0%{transform:translateY(0) rotate(0)}50%{transform:translateY(-74px) rotate(-12deg)}100%{transform:translateY(0) rotate(0)}}
@keyframes l3-karta{0%{opacity:0;transform:translateY(14px)}100%{opacity:1;transform:translateY(0)}}

/* ---- over the scene, in the pixels of the page (not scaled): the summary, the legend, what Fred says, the dragged book ---- */
html.sd .lib3d .l3-hlava { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px 0; pointer-events: none; transition: opacity 0.3s; }
html.sd .lib3d .l3-souhrn { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-weight: 700; font-size: 13px; line-height: 1.3; color: #f1ebff; text-shadow: 0 1px 0 rgba(8, 4, 30, 0.8); }
html.sd .lib3d .l3-souhrn > span { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
html.sd .lib3d .l3-souhrn i { width: 1.1em; text-align: center; color: #ffd978; font-size: 0.95em; }
html.sd .lib3d .l3-souhrn b { font-weight: 700; }
/* the legend keeps its row: where the room is short the summary on the left goes into two rows first */
/* the legend and the button stand in the middle of the row of the summary (one axis, the owner, 2. 12. 2026) */
html.sd .lib3d .l3-vpravo { flex: none; display: flex; align-items: center; gap: 8px; min-width: 0; }
html.sd .lib3d .l3-legenda { margin: 0; padding: 5px 10px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 13px; background: rgba(13, 10, 46, 0.72); border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px; font-weight: 700; font-size: 12px; line-height: 1.2; color: #f1ebff; }
html.sd .lib3d .l3-legenda ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 13px; }
/* a phone: the legend is in the window of Fred (the bar over the scene has no room for it) */
html.sd .lib3d.tel .l3-hlava .l3-legenda { display: none; }
/* ... and where they do not fit over the wall above the bookcases (botlibrary.js meriHlavu; always on a phone) the summary and the button
   stand in a bar of their own over the scene, as high as they need (--l3-pruh is its height) */
html.sd .lib3d.pruh .l3-hlava { padding: 8px 10px; background: #110d2f; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
/* on a computer the bar has two rows: the summary with the button, and the legend under them over the whole width (it stays seen) */
html.sd .lib3d.uzka .l3-hlava { flex-wrap: wrap; row-gap: 6px; }
html.sd .lib3d.uzka .l3-vpravo { display: contents; }
html.sd .lib3d.uzka .l3-souhrn { order: 1; flex: 1 1 0; min-width: 0; }
html.sd .lib3d.uzka .l3-kolo { order: 2; }
html.sd .lib3d.uzka .l3-hlava .l3-legenda { order: 3; flex: 1 1 100%; justify-content: flex-start; }
html.sd .lib3d.uzka .l3-karta { top: calc(var(--l3-pruh, 60px) + 8px); max-height: calc(100% - var(--l3-pruh, 60px) - 18px); }
html.sd .lib3d.tel.pruh .hlas { top: calc(var(--l3-pruh, 54px) + 8px); }
html.sd .lib3d .l3-karta .l3-legenda { justify-content: flex-start; align-items: flex-start; background: var(--soft); border-color: var(--line); color: var(--ink); }
/* in a window (a phone) the two groups are two columns: the marks of the books beside the levels */
html.sd .lib3d .l3-karta .l3-legenda ul { flex-direction: column; flex-wrap: nowrap; }
/* every mark stands in the middle of a slot of one width, so the words of the rows start on one line */
html.sd .lib3d .l3-legenda li { display: grid; grid-template-columns: 16px auto; align-items: center; justify-items: start; column-gap: 6px; white-space: nowrap; margin: 0; }
html.sd .lib3d .l3-legenda li > * { justify-self: center; }
html.sd .lib3d .leg { flex: none; display: block; width: 11px; height: 17px; border-radius: 2px; }
/* the law: a small spine with the same § as on the books, the glyph of the icon font sits in the middle of its box on both axes */
html.sd .lib3d .leg-z { width: 14px; height: 18px; display: grid; place-items: center; color: #ffe7b0; background: linear-gradient(180deg, #5d6b8c 0, #5d6b8c 2px, #e9c46a 2px, #e9c46a 3px, #353f5a 3px, #353f5a 15px, #e9c46a 15px, #e9c46a 16px, #5d6b8c 16px); }
html.sd .lib3d .leg-z > i { display: block; font-size: 8.5px; line-height: 1; }
html.sd .lib3d .leg-s { background: linear-gradient(90deg, #6d3fd0 0, #6d3fd0 34%, #159a9a 34%, #159a9a 67%, #e0842e 67%); }
html.sd .lib3d .leg-p { width: 6px; background: #3d7de0; }
html.sd .lib3d .leg-k { width: 14px; height: 18px; display: grid; place-items: center; color: #2a1a4e; background: linear-gradient(90deg, #2a1a4e 0, #2a1a4e 3px, #f2e2b4 3px); border-radius: 2px; }
html.sd .lib3d .leg-k > i { display: block; font-size: 8px; line-height: 1; margin-left: 3px; }
html.sd .lib3d .leg-pe { width: 11px; height: 11px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3b0, #ffd04d 55%, #c8932a); }
html.sd .lib3d .leg-i { flex: none; width: 14px; font-size: 13px; line-height: 1; text-align: center; }
/* in a window the marks stand on the paper of the application: the colours of its tags */
html.sd:not([data-theme='dark']) .lib3d .l3-karta .l-good { color: #15803d; }
html.sd:not([data-theme='dark']) .lib3d .l3-karta .l-little { color: #b45309; }
html.sd:not([data-theme='dark']) .lib3d .l3-karta .l-none { color: #b91c1c; }
html.sd .lib3d .l3-kolo { pointer-events: auto; flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.28); background: rgba(13, 10, 46, 0.82); color: #fff; cursor: pointer; display: grid; place-items: center; padding: 0; font-size: 16px; }
html.sd .lib3d .l3-kolo:hover { background: rgba(42, 31, 85, 0.95); }
html.sd .lib3d .hlas { position: absolute; margin: 0; z-index: 4; background: rgba(18, 14, 46, 0.93); border: 1px solid rgba(255, 255, 255, 0.22); border-radius: 14px; padding: 8px 12px; font-weight: 700; font-size: 13px; line-height: 1.35; color: #fff; box-shadow: 0 8px 24px rgba(5, 2, 26, 0.45); pointer-events: none; left: 50%; width: 236px; margin-left: -118px; text-align: center; }
html.sd .lib3d .hlas.stranou { left: 10px; bottom: 10px !important; top: auto; width: min(300px, 60%); margin-left: 0; text-align: left; }
html.sd .lib3d.tel .hlas { left: 8px; right: 8px; top: 62px; bottom: auto !important; width: auto; margin-left: 0; }
html.sd .lib3d .hlas.ticho, html.sd .lib3d.tel.maKartu .hlas, html.sd .lib3d.tel.maKartu .l3-hlava { display: none; }
html.sd .lib3d .uk-n { display: block; margin: 7px 0 3px; font-weight: 800; font-size: 10.5px; line-height: 1; letter-spacing: 0.08em; text-transform: uppercase; color: #d9cffb; text-align: left; }
html.sd .lib3d .uk-s { list-style: none; margin: 0; padding: 0; text-align: left; font-weight: 700; font-size: 12px; line-height: 1.3; }
html.sd .lib3d .uk-s li { position: relative; margin: 0; padding: 1.5px 0 1.5px 18px; color: #cfc6ee; }
html.sd .lib3d .uk-s li::before { content: ""; position: absolute; left: 2px; top: 5px; width: 9px; height: 9px; border-radius: 50%; border: 1.5px solid #8d88a8; }
html.sd .lib3d .uk-s li.h { color: #fff; }
html.sd .lib3d .uk-s li.h::before { background: #57d38c; border-color: #57d38c; }
html.sd .lib3d .uk-s li.b { color: #ffe08a; }
html.sd .lib3d .uk-s li.b::before { background: #ffd978; border-color: #ffd978; animation: l3-trp 0.9s ease-in-out infinite; }
html.sd .lib3d .duch { position: absolute; z-index: 8; pointer-events: none; transform: translate(-50%, -50%) rotate(-4deg); max-width: 230px; padding: 8px 20px; border-radius: 5px; background: linear-gradient(90deg, var(--kb) 0, var(--kb) 12px, var(--kd) 12px, var(--kd) calc(100% - 12px), var(--kb) calc(100% - 12px)); color: #fffaf0; font-weight: 800; font-size: 13px; line-height: 1.2; box-shadow: 0 0 0 2px #ffe08a, 0 12px 28px rgba(5, 2, 26, 0.65); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- the windows: ordinary cards of the application (its colours, buttons, tags and pictures), opened only by a click. Everything on
   one axis: the picture, then the words; a long name wraps beside its picture, never under it. ---- */
html.sd .lib3d .l3-karta { position: absolute; z-index: 6; right: 10px; top: 60px; width: min(470px, calc(100% - 20px)); max-height: calc(100% - 70px); overflow: auto; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: var(--sd-radius-lg, 12px); padding: 14px; box-shadow: 0 18px 50px rgba(5, 2, 26, 0.55); -webkit-user-select: text; user-select: text; display: flex; flex-direction: column; gap: 12px; }
html.sd .lib3d .l3-karta.l3-cteni { width: min(620px, calc(100% - 20px)); }
html.sd .lib3d.tel .l3-karta { left: 6px; right: 6px; top: auto; bottom: 6px; width: auto; max-height: 72%; }
html.sd .lib3d .l3-karta[hidden] { display: none; }
html.sd .lib3d .l3-karta > * { flex: none; margin: 0; }
/* the head of a window uses its whole width: the kind (and a state) on the left, the buttons side by side on the right, the name under
   them over the whole width; a window without a kind has its name beside the buttons (the same on a computer and on a phone) */
html.sd .lib3d .l3-k-hl { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "st b" "nazev nazev"; align-items: center; gap: 8px 10px; }
html.sd .lib3d .l3-k-hl.l3-k-1 { grid-template-areas: "nazev b"; }
html.sd .lib3d .l3-k-st { grid-area: st; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
html.sd .lib3d .l3-k-b { grid-area: b; align-self: start; display: flex; align-items: center; gap: 8px; }
html.sd .lib3d .l3-k-hl > .l3-nazev { grid-area: nazev; }
/* a phone: Zavřít on its own line at the right, so the name of the book has the whole width */
html.sd .lib3d .l3-nazev { margin: 0; display: flex; align-items: flex-start; font-size: 17px; font-weight: 800; line-height: 1.25; }
html.sd .lib3d .l3-nazev > .head-icon { flex: none; width: 1.3em; margin: 0 8px 0 0; line-height: inherit; text-align: center; }
html.sd .lib3d .l3-nazev > span { min-width: 0; overflow-wrap: anywhere; }
/* the facts fill their rows (the owner, 1. 12. 2026: „ať nejsou zbytečná prázdná místa“): a cell is as wide as its words need and grows to
   the end of the row, the one that does not fit goes under and takes the whole row */
html.sd .lib3d .l3-fakta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
html.sd .lib3d .l3-fakta > div { flex: 1 1 auto; max-width: 100%; margin: 0; background: var(--soft); border-radius: 10px; padding: 7px 10px; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
html.sd .lib3d .l3-fakta > .l3-sir { flex-basis: 100%; }
html.sd .lib3d .l3-fakta dt { margin: 0; display: flex; align-items: center; font-size: 12px; font-weight: 600; color: var(--muted); white-space: nowrap; }
html.sd .lib3d .l3-fakta dt > .field-icon { flex: none; width: 1.2em; margin-right: 6px; text-align: center; }
/* a word is never cut in its middle (the name of a bookcase, a date); only the name of a file, which may be one long word, breaks where it must */
html.sd .lib3d .l3-fakta dd { margin: 0; font-size: 14px; font-weight: 700; white-space: nowrap; }
html.sd .lib3d .l3-fakta > .l3-sir dd { white-space: normal; overflow-wrap: anywhere; }
html.sd .lib3d .l3-stit { margin: 0; display: flex; align-items: center; font-size: 13px; font-weight: 800; }
html.sd .lib3d .l3-stit > .head-icon { flex: none; width: 1.3em; margin-right: 8px; text-align: center; }
html.sd .lib3d .l3-pozn { margin: 0; display: flex; align-items: flex-start; }
/* the picture has the line of its words (not a guessed margin from the top), so it stands on their first line at every size of the type */
html.sd .lib3d .l3-pozn > .field-icon { flex: none; width: 1.2em; margin: 0 8px 0 0; line-height: inherit; text-align: center; }
html.sd .lib3d .l3-pozn > span { min-width: 0; }
html.sd .lib3d .l3-volba { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; margin: 0; }
html.sd .lib3d .l3-volba.l3-pevna { cursor: default; }
html.sd .lib3d .l3-volba input { flex: none; width: 20px; height: 20px; min-height: 0; margin: 0; }
html.sd .lib3d .l3-volba > span { flex: 1; min-width: 0; font-weight: 700; }
html.sd .lib3d .l3-volba > span > .field-icon { width: 1.2em; margin-right: 6px; text-align: center; }
html.sd .lib3d .l3-volba small { display: block; font-weight: 400; color: var(--muted); }
html.sd .lib3d .l3-rada { display: flex; flex-wrap: wrap; gap: 8px; }
/* buttons stand side by side where there is room and together fill the row; the one that does not fit goes under over the whole width */
html.sd .lib3d .l3-rada > .btn { flex: 1 1 auto; justify-content: center; margin: 0; }
html.sd .lib3d .l3-dvoj { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 10px 16px; }
html.sd .lib3d .l3-dvoj > * { flex: 1 1 180px; min-width: 0; }
html.sd .lib3d .l3-dvoj:empty { display: none; }
html.sd .lib3d .l3-blok { display: flex; flex-direction: column; gap: 6px; }
html.sd .lib3d .l3-blok > * { margin: 0; }
html.sd .lib3d .l3-nazev > .l3-av-n { width: 30px; height: 30px; margin-right: 8px; }
html.sd .lib3d .l3-k-1 > .l3-nazev { align-items: center; }
html.sd .lib3d .l3-rada:empty { display: none; }
html.sd .lib3d .l3-potvrd { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: var(--soft); display: flex; flex-direction: column; gap: 8px; font-weight: 700; }
html.sd .lib3d .l3-potvrd > span { display: flex; align-items: center; }
html.sd .lib3d .l3-kdo { display: flex; align-items: center; gap: 10px; font-weight: 700; }
html.sd .lib3d .l3-kdo > span:last-child { min-width: 0; }
html.sd .lib3d .l3-kdo small { display: block; font-weight: 400; color: var(--muted); }
html.sd .lib3d .l3-av { flex: none; width: 34px; height: 34px; border-radius: 50%; overflow: hidden; display: block; position: relative; background: #fff; }
html.sd .lib3d .l3-av svg, html.sd .lib3d .l3-av img { position: absolute; left: 0; top: 0; width: 100%; height: 100%; display: block; }
html.sd .lib3d .l3-av.fred { box-shadow: inset 0 0 0 2px #2f6fe4; }
html.sd .lib3d .l3-av.fred img { width: 150%; height: 150%; left: -25%; top: -22%; }
html.sd .lib3d .l3-cipy { display: flex; flex-wrap: wrap; gap: 6px; }
/* a row of a list is as high as its words (a long name on two lines never runs over the next row); the list is as long as it needs
   and the window scrolls as a whole, so no row is ever cut in half */
html.sd .lib3d .l3-seznam { display: flex; flex-direction: column; gap: 6px; }
html.sd .lib3d .l3-seznam > * { flex: none; }
/* a chapter of the Skripta: its heading with the number and its lines (they are read, not clicked) */
html.sd .lib3d .l3-kap { display: flex; flex-direction: column; gap: 6px; }
html.sd .lib3d .l3-kap > * { margin: 0; }
html.sd .lib3d .l3-radek.l3-pasiv { cursor: default; }
html.sd .lib3d .l3-radek.l3-pasiv:hover { border-color: var(--line); }
html.sd .lib3d .l3-stit > span { flex: 1; min-width: 0; }
html.sd .lib3d .l3-stit > .count-dot { flex: none; margin: 0 0 0 8px; }
html.sd .lib3d .l3-radek { display: flex; align-items: center; gap: 10px; width: 100%; height: auto; min-height: 44px; padding: 7px 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--soft); color: var(--ink); cursor: pointer; text-align: left; font: inherit; white-space: normal; }
html.sd .lib3d .l3-radek:hover { border-color: var(--accent); }
html.sd .lib3d .l3-radek > .field-icon { flex: none; width: 1.3em; margin: 0; text-align: center; }
html.sd .lib3d .l3-radek > span { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 700; line-height: 1.3; }
html.sd .lib3d .l3-radek small { display: block; font-weight: 400; color: var(--muted); }
html.sd .lib3d .l3-radek > .count-dot, html.sd .lib3d .l3-radek > .badge { flex: none; margin: 0; }
/* the text of a book, piece by piece */
html.sd .lib3d .l3-uryvky { display: flex; flex-direction: column; gap: 10px; }
html.sd .lib3d .l3-uryvky:empty { display: none; }
html.sd .lib3d .l3-uryvek { display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
html.sd .lib3d .l3-uryvek p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13.5px; line-height: 1.5; }
/* the box of the upload in the window of the desk: the marks of the kinds of files stay on the line of the file */
html.sd .lib3d .l3-nahrat[hidden] { display: none; }
html.sd .lib3d .l3-ucit .fred-upload { width: 100%; }
html.sd .lib3d .l3-ucit .fred-upload .row { flex-wrap: nowrap !important; }
html.sd .lib3d .l3-ucit .fred-upload .row > :first-child { flex: 1 1 auto; min-width: 0; }
html.sd .lib3d .l3-ucit .fred-upload .row > :not(:first-child) { flex: none; }

/* the switch Animační efekty (html[data-fx="off"]) and a scene that is not seen: nothing moves */
html.sd .lib3d.bezfx .l3-okno *, html.sd .lib3d.bezfx .l3-okno *::before, html.sd .lib3d.bezfx .l3-okno *::after { animation: none !important; transition: none !important; }
html.sd .lib3d.spi .l3-okno *, html.sd .lib3d.spi .l3-okno *::before, html.sd .lib3d.spi .l3-okno *::after { animation-play-state: paused !important; }
/* a phone has no room to give away: the library reaches the edges of its card (the part of the page has 24 px of padding around it) */
@media (max-width: 700px) {
  html.sd #fred-knowledge > .lib3d:not(.cela) { margin: 0 -24px -24px; width: calc(100% + 48px); max-width: none; }
  html.sd #fred-knowledge > .lib3d:not(.cela) .l3-okno { border-radius: 0 0 7px 7px; }
}
