:root{--bg:#080c0a;--panel:#111915;--text:#edf3ee;--muted:#9ba99f;--line:#2b3b31;--accent:#9fcdae;--accent2:#1c402b;--danger:#e27676;--shadow:0 16px 48px #0007}
*{box-sizing:border-box}html,body{margin:0;min-height:100%;background:var(--bg);color:var(--text);font-family:Tahoma,Arial,sans-serif}body{min-height:100vh}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible,select:focus-visible{outline:2px solid #70b984;outline-offset:2px}button:disabled{opacity:.45;cursor:not-allowed}.hidden{display:none!important}.topbar{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px clamp(12px,4vw,56px);min-height:76px;background:#0d130f;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:10px;background:transparent;border:0;color:var(--text);text-align:start;padding:0}.brand-icon{width:47px;height:47px;object-fit:cover;border-radius:12px;box-shadow:0 0 18px #235b3b55}.brand b{display:block;font-size:20px}.brand small{display:block;color:var(--muted);font-size:11px;margin-top:2px}.top-actions,.reader-tools{display:flex;align-items:center;gap:7px}.primary,.secondary,.outline,.danger{border:1px solid transparent;border-radius:11px;padding:10px 14px;font-weight:700;white-space:nowrap}.primary{background:linear-gradient(140deg,#c1e2c8,#80b894);color:#101a13}.secondary{background:#24392c;border-color:#324d3a;color:var(--text)}.outline{background:transparent;border-color:var(--line);color:var(--text);min-width:44px}.danger{background:#7a3030;border-color:#9a4545;color:#fff}.icon-btn{width:39px;height:39px;display:grid;place-items:center;border:1px solid var(--line);border-radius:11px;background:#19231d;color:var(--text);font-size:20px;flex-shrink:0}.icon-btn.compact{width:30px;height:30px}.page{max-width:1280px;margin:auto;padding:28px 24px 46px}.hero{display:flex;align-items:center;justify-content:space-between;gap:15px;border:1px solid #284a34;border-radius:22px;background:radial-gradient(ellipse at 10% 0,#234f35,#102317 58%,#0b130e);padding:clamp(22px,4vw,43px)}.eyebrow{margin:0 0 8px;color:#9bcbaa;font-size:13px}.hero h1{margin:0 0 10px;font-size:clamp(27px,4vw,42px);line-height:1.35}.hero p:last-child{margin-bottom:0}.hero-sub{max-width:650px;color:#c4d6ca;line-height:1.8}.hero-mark{font-size:88px;color:#e0eee111;padding:0 14px}.section-head{display:flex;justify-content:space-between;align-items:center;gap:16px;margin:29px 0 16px}.section-head h2{margin:0;font-size:25px}.section-head p{margin:3px 0 0;color:var(--muted);font-size:12px}.library-actions{display:flex;gap:9px;align-items:center;flex-wrap:wrap}.search{width:min(270px,45vw);border:1px solid var(--line);border-radius:11px;padding:11px 13px;background:var(--panel);color:var(--text)}.group-tabs{display:flex;gap:8px;overflow:auto;padding:4px 1px 16px;align-items:center}.group-tab-wrap{display:flex;align-items:center;gap:0;flex-shrink:0}.group-tab{border:1px solid var(--line);border-radius:22px;padding:8px 13px;background:#121a15;color:var(--muted);font-size:12px;white-space:nowrap}.group-tab.active{background:#20442c;border-color:#43734e;color:#e3f7e8}.tab-count{margin-inline-start:7px;opacity:.72;font-size:10px}.group-tab-delete{background:transparent;color:#d77a7a;font-size:16px;padding:6px}.books-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(164px,1fr));gap:23px}.book-card{min-width:0}.cover-button{width:100%;padding:0;background:none;border:0;text-align:initial}.book-cover{aspect-ratio:3/4.2;position:relative;display:flex;align-items:center;justify-content:center;flex-direction:column;overflow:hidden;padding:16px 12px;border-radius:5px 12px 12px 5px;border:1px solid #385943;background:linear-gradient(135deg,#10523a,#071c12);color:#ead9a2;box-shadow:inset 7px 0 #030b06,0 12px 22px #0005;background-position:center;background-size:cover;transition:transform .18s}.book-cover:before{content:"";position:absolute;inset:10px;border:1px solid #d0b65e75;pointer-events:none}.cover-rule{width:38px;height:3px;background:#c8ac51;margin-bottom:18px;z-index:1}.cover-title{font-size:clamp(15px,2vw,21px);line-height:1.65;text-align:center;overflow-wrap:anywhere;z-index:1;text-shadow:0 1px 4px #0008}.cover-subtitle{margin-top:20px;font-size:9px;color:#e5dcb5;z-index:1}.cover-button:hover .book-cover{transform:translateY(-4px)}.book-meta{padding:9px 3px 0}.book-meta strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:14px}.book-meta small{display:block;color:var(--muted);font-size:11px;margin-top:4px}.card-actions{display:flex;gap:14px;margin-top:8px}.card-actions button{background:none;border:0;color:var(--muted);font-size:11px;padding:3px 0}.card-actions .delete-book{color:#e18b8b}.group-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(175px,1fr));gap:17px;margin-bottom:25px}.group-card{min-width:0;border:1px solid var(--line);border-radius:16px;background:var(--panel);padding:12px;display:flex;flex-direction:column;gap:9px}.group-card-main{width:100%;background:none;border:0;color:var(--text);display:flex;flex-direction:column;align-items:center;text-align:center;padding:3px}.group-stack{position:relative;height:130px;width:100%;max-width:190px;display:block;perspective:800px}.group-stack.custom-group-cover{margin-inline:auto;border:1px solid var(--line);border-radius:12px;background-size:cover;background-position:center;box-shadow:0 8px 20px #0003}.group-stack.custom-group-cover:after{content:'';position:absolute;inset:0;border-radius:11px;box-shadow:inset 0 -28px 26px #0002;pointer-events:none}.stack-book{position:absolute;top:11px;left:50%;width:74px;height:103px;border:1px solid #b5a45c;border-radius:3px 7px 7px 3px;box-shadow:0 8px 13px #0007,inset 5px 0 #0005;background:linear-gradient(135deg,#155239,#06160e);color:#e5d6a2;padding:8px 5px;display:flex;align-items:center;justify-content:center;font-size:10px;font-weight:bold;overflow:hidden;overflow-wrap:anywhere}.stack-book:nth-child(1){transform:translateX(-90%) rotate(-13deg);z-index:1}.stack-book:nth-child(2){transform:translateX(-50%);z-index:3}.stack-book:nth-child(3){transform:translateX(-10%) rotate(13deg);z-index:2}.stack-book span{position:absolute;inset:auto 3px 7px;text-align:center;font-size:9px;text-shadow:0 1px 3px #000}.group-title{font-size:15px;overflow-wrap:anywhere;line-height:1.5}.group-count{font-size:11px;color:var(--muted)}.group-actions{border-top:1px solid var(--line);padding-top:9px;display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:6px}.group-actions button{font-size:11px;padding:7px 10px}.empty-state{display:none;text-align:center;padding:60px 20px;color:var(--muted)}.empty-state.show{display:block}.empty-icon{width:58px;height:58px;margin:0 auto 12px;border:1px dashed #497153;border-radius:17px;display:grid;place-items:center;color:#acd9b5;font-size:29px}.empty-state h3{color:var(--text);margin:0}.empty-state p{font-size:13px}.privacy-note{text-align:center;margin-top:36px;color:var(--muted);font-size:11px}.reader{height:100dvh;min-height:430px;display:flex;flex-direction:column;overflow:hidden;background:var(--bg)}.reader-bar{display:flex;align-items:center;gap:10px;padding:7px 13px;min-height:60px;background:#101712;border-bottom:1px solid var(--line);flex-shrink:0}.reader-title{flex:1;min-width:0}.reader-title strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.reader-title small{display:block;font-size:10px;color:var(--muted);margin-top:2px}.reader-tools{gap:4px}.zoom-percent{font-size:10px;color:var(--muted);min-width:33px;text-align:center}.reader-layout{display:flex;flex:1;min-height:0}.tool-rail{width:55px;flex-shrink:0;display:flex;justify-content:center;padding-top:13px;background:#101712;border-inline-end:1px solid var(--line);z-index:10}.tool-dot{width:40px;height:40px;border:1px solid #709b78;border-radius:50%;background:linear-gradient(140deg,#cce6d0,#70a780);color:#112418;font-size:19px;box-shadow:0 0 0 3px #284b32}.tool-dot.active{background:#e0c56b;border-color:#997b28;box-shadow:0 0 0 3px #4b4020}.tool-panel{position:absolute;inset-inline-start:65px;top:75px;z-index:30;width:240px;max-height:calc(100dvh - 100px);overflow:auto;padding:12px;background:var(--panel);border:1px solid #395341;border-radius:15px;box-shadow:var(--shadow)}.tool-panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:8px}.tool-choice{display:block;width:100%;text-align:start;background:transparent;border:0;border-radius:8px;color:var(--text);padding:8px 9px;font-size:12px}.tool-choice.active{background:#21472e;color:#e2f5e5}.setting-row{display:flex;justify-content:space-between;align-items:center;gap:9px;font-size:12px;margin-top:12px}.setting-row input[type=color]{width:36px;height:26px;padding:0;border:0;background:none}.setting-row input[type=range]{width:95px}.tool-panel>small{display:block;color:var(--muted);font-size:10px;line-height:1.7;margin-top:12px}.danger-btn{width:100%;margin-top:12px;border:0;border-radius:8px;background:#502b2b;color:#f2baba;padding:8px;font-size:11px}.document-area{flex:1;min-width:0;min-height:0;display:flex;flex-direction:column;overflow:hidden}.page-nav{display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;padding:7px 8px;background:#0c120e;border-bottom:1px solid #213127;flex-shrink:0}.nav-btn,.mode-btn{border:1px solid #2e4334;border-radius:8px;background:#18231c;color:var(--text);padding:7px 10px;font-size:11px;white-space:nowrap}.mode-btn.active{background:#21472f;border-color:#659878;color:#daf0df}.page-jump{display:flex;align-items:center;gap:5px;font-size:11px;color:var(--muted);white-space:nowrap}.page-jump input{width:52px;padding:6px 2px;border:1px solid var(--line);border-radius:7px;background:#101a14;color:var(--text);text-align:center;direction:ltr}.divider-v{width:1px;height:24px;background:#29382d}.pdf-stage{position:relative;flex:1;min-height:0;overflow:auto;padding:12px 14px 32px;overscroll-behavior:contain}.pdf-stage.mode-flip .zoom-surface{margin-inline:auto}.zoom-surface{position:relative;display:block;min-width:1px;min-height:1px;margin:0 auto}.pages{position:absolute;left:0;top:0;display:flex;flex-direction:column;align-items:center;gap:20px;transform-origin:top left;will-change:transform}.mode-flip .pages{flex-direction:row;justify-content:flex-start;align-items:flex-start;gap:0}.loading{text-align:center;padding:50px 15px;color:var(--muted)}.page-wrap{position:relative;flex-shrink:0;background:#fff;box-shadow:0 10px 35px #0008;transform-origin:center top}.page-content{position:absolute;left:0;top:0;transform-origin:top left;}.mode-flip .page-wrap{animation:page-in .2s ease-out}.pdf-canvas{display:block;max-width:none}.ink-canvas{position:absolute;inset:0;width:100%;height:100%;z-index:3;touch-action:none}.page-wrap.browse .ink-canvas{pointer-events:none;cursor:grab}.page-wrap.draw .ink-canvas{pointer-events:auto;cursor:crosshair}.page-wrap.eraser-mode .ink-canvas{cursor:cell}.note-overlay{position:absolute;z-index:4;margin:0;padding:0;border:0!important;border-radius:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;resize:none;overflow:hidden;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;line-height:1.2;font:14px/1.2 Tahoma,Arial,sans-serif;color:#101510;min-width:0;min-height:0;pointer-events:none;user-select:text;direction:auto;caret-color:#217648}.page-wrap[data-tool="note"] .note-overlay{pointer-events:auto;cursor:text}.text-layer{position:absolute;inset:0;z-index:2;overflow:hidden;pointer-events:none;user-select:text}.text-layer span{position:absolute;display:block;color:transparent;white-space:pre;line-height:1;transform-origin:0 0;overflow:visible}.page-wrap[data-tool="translate"] .text-layer{pointer-events:auto;cursor:text}.page-wrap[data-tool="translate"] .ink-canvas{pointer-events:none}.page-number-badge{display:none}.reader:fullscreen .reader-bar{min-height:52px}.dialog{border:1px solid #3a513f;border-radius:18px;padding:0;max-width:calc(100% - 22px);max-height:90dvh;overflow:auto;width:min(470px,calc(100% - 22px));background:#151e18;color:var(--text);box-shadow:0 25px 90px #000a}.dialog::backdrop{background:#020604d1;backdrop-filter:blur(4px)}.dialog form,.dialog-pad{padding:21px}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dialog-head h2{margin:0;font-size:20px}.dialog-head p{margin:5px 0 0}.dialog label{display:block;margin:15px 0;font-size:12px;font-weight:bold}.dialog label>input:not([type=file]):not([type=range]),.dialog label>textarea,.dialog label>select,.dialog form>label>input:not([type=file]),.dialog form>label>select,.dialog form>label>textarea{display:block;width:100%;margin-top:7px;padding:10px;border:1px solid var(--line);border-radius:9px;background:#0e1510;color:var(--text)}.dialog textarea{resize:vertical;line-height:1.7;overflow-wrap:anywhere}.dialog input[type=file]{width:100%;font-size:11px;margin-top:8px;color:var(--muted)}.cover-preview-wrap{display:flex;justify-content:center;padding:8px}.cover-preview{width:115px;aspect-ratio:3/4;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:10px;border-radius:5px 10px 10px 5px;position:relative;overflow:hidden;background:linear-gradient(140deg,#125037,#07170d);background-position:center;background-size:cover;color:#e6d6a3;box-shadow:inset 6px 0 #020905,0 8px 20px #0005}.cover-preview:before{content:"";position:absolute;inset:7px;border:1px solid #d0b65e77}.cover-preview span,.cover-preview b{z-index:1;text-align:center;overflow-wrap:anywhere;font-size:11px}.remove-cover{display:block;margin:0 auto 15px;font-size:11px}.dialog-actions{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:8px;margin-top:16px}.small{width:min(380px,calc(100% - 22px))}.group-dialog,.tasks-dialog{width:min(700px,calc(100% - 22px))}.muted{color:var(--muted);font-size:11px;line-height:1.7}.group-books-list,.bookmark-list,.tasks-list{display:flex;flex-direction:column;gap:8px;max-height:50dvh;overflow:auto;margin-top:14px}.group-book-row{display:grid;grid-template-columns:22px 40px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px;border:1px solid var(--line);border-radius:10px}.group-book-row input{accent-color:#35b66e}.group-thumb{width:35px;height:46px;display:grid;place-items:center;border-radius:4px;background:linear-gradient(140deg,#125037,#07170d);background-size:cover;color:#e6d6a3}.group-book-name{font-size:12px;font-weight:bold;overflow-wrap:anywhere}.group-book-current{font-size:10px;color:var(--muted)}.bookmark-row{display:grid;grid-template-columns:minmax(0,1fr) auto 34px;align-items:center;gap:8px;border:1px solid var(--line);border-radius:10px;padding:9px}.bookmark-row button{font-size:11px}.bookmark-active{background:#2c4a2f!important;color:#f5dc82!important;border-color:#9a8340!important}.note-dialog{width:min(540px,calc(100% - 22px))}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}.grid2 label input{display:block;width:100%;margin-top:8px}.tasks-dialog{width:min(850px,calc(100% - 22px))}.task-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:18px 0}.task-stats article{border:1px solid var(--line);background:#0f1712;border-radius:12px;padding:11px}.task-stats span{display:block;color:var(--muted);font-size:10px;line-height:1.5}.task-stats b{display:block;font-size:24px;margin-top:4px;color:#bfe8c7}.task-stats article:nth-child(2) b{color:#e7c36c}.task-stats article:nth-child(3) b{color:var(--text)}.task-retention{padding:11px;border:1px solid var(--line);border-radius:11px;margin-bottom:14px}.task-retention label{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:0}.task-retention select,.task-add select{max-width:190px;background:#0b140e;color:var(--text);border:1px solid var(--line);padding:8px;border-radius:8px}.task-retention small{display:block;margin-top:7px;font-size:10px;color:var(--muted)}.task-add{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:8px}.task-add input{min-width:0;padding:10px;border-radius:9px;border:1px solid var(--line);background:#0e1510;color:var(--text)}.task-add button{font-size:11px}.task-row{display:grid;grid-template-columns:24px 25px minmax(0,1fr) minmax(110px,170px) 30px;align-items:center;gap:7px;border:1px solid var(--line);background:#0f1712;border-radius:10px;padding:8px}.task-num{font-size:10px;text-align:center;color:var(--muted)}.task-check{width:22px;height:22px;appearance:none;border:2px solid #6b7e70;border-radius:6px;margin:0;display:grid;place-items:center;background:transparent}.task-check:checked{background:#2fbd72;border-color:#2fbd72}.task-check:checked:after{content:'✓';font-weight:900;color:#062213;font-size:16px}.task-text{width:100%;min-width:0;padding:8px;border:1px solid var(--line);border-radius:7px;background:#0a120c;color:var(--text);font-size:12px}.task-text.done{text-decoration:line-through;color:#94b19a}.task-deadline{font-size:10px;color:var(--muted)}.task-deadline.overdue{color:#efa06b}.task-delete{width:28px;height:28px;border-radius:8px;background:#472424;color:#f1a7a7;border:0}.tasks-empty{text-align:center;color:var(--muted);padding:22px;font-size:12px}.toast{position:fixed;z-index:100;bottom:18px;left:50%;transform:translateX(-50%);max-width:calc(100% - 24px);background:#20432c;border:1px solid #4c8058;color:#e5f7e9;padding:10px 15px;border-radius:10px;font-size:12px;box-shadow:var(--shadow);text-align:center}
body:not(.dark){--bg:#f2f5f2;--panel:#fff;--text:#18251d;--muted:#647367;--line:#d5dfd7;--accent:#28734b;--accent2:#dcebe0;--shadow:0 16px 48px #20342822;background:var(--bg);color:var(--text)}body:not(.dark) .topbar,body:not(.dark) .reader-bar,body:not(.dark) .tool-rail{background:#fbfcfb}body:not(.dark) .hero{background:radial-gradient(ellipse at 10% 0,#e5f3e7,#eff6f0 58%,#e3eee5);border-color:#cbdfce;color:#183323}body:not(.dark) .hero-sub{color:#526b59}body:not(.dark) .eyebrow{color:#28734b}body:not(.dark) .icon-btn,body:not(.dark) .secondary,body:not(.dark) .nav-btn,body:not(.dark) .mode-btn{background:#e9f0ea;color:#24382a;border-color:#d1ded4}body:not(.dark) .group-card,body:not(.dark) .group-tab{background:#fff;color:#24382a;border-color:#d6e0d8}body:not(.dark) .group-tab.active,body:not(.dark) .mode-btn.active{background:#e1f2e5;color:#1d5b37;border-color:#83b993}body:not(.dark) .dialog{background:#fff;color:#1e2b21;border-color:#d4e0d6}body:not(.dark) .dialog input:not([type=file]),body:not(.dark) .dialog textarea,body:not(.dark) .dialog select,body:not(.dark) .task-add input,body:not(.dark) .task-retention select,body:not(.dark) .task-add select{background:#fff;color:#1e2b21;border-color:#d4dfd7}body:not(.dark) .task-stats article,body:not(.dark) .task-row{background:#f9fcf9;border-color:#d5e0d7}body:not(.dark) .task-text{background:#fff;color:#1e2b21}body:not(.dark) .tool-panel{background:#fff;color:#1e2b21;border-color:#d5e0d7}body:not(.dark) .tool-choice{color:#263a2c}body:not(.dark) .tool-choice.active{background:#e0f1e4;color:#1d5b37}
@media(max-width:720px){.topbar{padding:9px 10px;flex-wrap:wrap;min-height:62px}.brand-icon{width:38px;height:38px}.brand b{font-size:16px}.brand small{display:none}.top-actions{flex:1 1 100%;justify-content:space-between;gap:5px}.top-actions .primary,.top-actions .secondary{padding:8px 9px;font-size:11px}.page{padding:16px 13px 28px}.hero{padding:22px 17px}.hero-mark{font-size:48px}.section-head{flex-direction:column;align-items:stretch}.library-actions{width:100%}.search{flex:1 1 100%;width:100%}.books-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:19px 13px}.group-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.group-card{padding:9px}.group-stack{height:112px}.stack-book{width:61px;height:87px}.reader-bar{padding:6px;gap:5px;flex-wrap:wrap}.reader-title{flex:1;min-width:130px}.reader-tools{gap:2px}.reader-tools .icon-btn{width:29px;height:29px;font-size:15px}.zoom-percent{min-width:27px;font-size:9px}.tool-rail{width:45px}.tool-dot{width:34px;height:34px}.page-nav{gap:4px;padding:5px 3px}.nav-btn,.mode-btn{padding:6px 7px;font-size:10px}.page-jump input{width:42px}.divider-v{height:18px}.pdf-stage{padding:9px 4px 24px}.tool-panel{inset-inline-start:49px;top:111px;width:min(245px,calc(100vw - 58px))}.grid2{grid-template-columns:1fr}.dialog form,.dialog-pad{padding:15px}.task-stats{gap:5px}.task-stats article{padding:8px}.task-stats b{font-size:20px}.task-add{grid-template-columns:minmax(0,1fr) auto}.task-add input{grid-column:1/-1}.task-add select{max-width:none}.task-add button{padding:8px}.task-row{grid-template-columns:20px 24px minmax(0,1fr) 28px;gap:5px;padding:7px}.task-num{font-size:9px}.task-check{width:21px;height:21px}.task-text{grid-column:3;grid-row:1;font-size:11px}.task-deadline{grid-column:3;grid-row:2;font-size:9px}.task-delete{grid-column:4;grid-row:1/3}.task-retention label{align-items:flex-start;flex-direction:column}.task-retention select{max-width:none;width:100%}.group-book-row{grid-template-columns:20px 34px minmax(0,1fr);gap:6px}.group-thumb{width:31px;height:42px}.group-book-current{grid-column:3;font-size:9px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation-duration:.01ms!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

/* My book refinement: library filters, translation, readable note boxes and shape tools */
.group-tabs{justify-content:flex-start;flex-wrap:wrap}
.group-tabs .group-tab{flex:0 0 auto;min-width:112px}
.group-context{display:flex;align-items:center;gap:12px;flex-wrap:wrap;margin:0 0 16px;color:var(--text);font-size:14px}
.group-context button{font-size:11px;padding:7px 10px}
.group-context strong{font-size:14px}
.groups-empty{grid-column:1/-1;padding:16px 4px}
.group-actions{display:flex;align-items:center;justify-content:center;gap:7px}
.group-actions .group-delete{width:34px;height:32px;border:0;border-radius:8px;background:#502b2b;color:#f2baba;font-size:17px}
.translate-mode{border-color:#508365!important;background:#163e2a!important;color:#dff5e6!important;font-weight:700}
.page-nav .translate-mode:focus-visible{outline-offset:2px}
.note-overlay{display:block;box-sizing:border-box;padding:3px!important;line-height:1.15!important;font-family:Tahoma,Arial,sans-serif!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important;resize:both!important;overflow:hidden!important;min-width:28px!important;min-height:18px!important;max-width:100%!important;max-height:100%!important}
.note-overlay:focus{outline:1px dashed #2b9a60!important;outline-offset:-1px!important;background:#fff8!important}
.note-dialog input[type=range]{width:100%;accent-color:var(--accent)}
.task-history-note{margin:7px 0 13px;padding:0 2px}
.tasks-limit{font-weight:700;color:#f0b16e}
body:not(.dark) .translate-mode{background:#e0f1e4!important;color:#1d5b37!important;border-color:#83b993!important}
@media(max-width:720px){.group-tabs .group-tab{min-width:auto;flex:1 1 auto}.group-context{gap:8px}.translate-mode{font-size:10px;padding:6px 7px}.group-actions{width:100%}.group-actions .secondary{flex:1}}

/* My book 2026 usability fixes */
.tool-group-toggle{display:flex;align-items:center;gap:7px;width:100%;padding:10px 9px;margin:8px 0;border:1px solid var(--line);border-radius:9px;background:var(--accent2);color:var(--text);font-weight:700;text-align:start;font-size:12px}.tool-group-toggle .group-chevron{margin-inline-start:auto}.drawing-tools-group{display:flex;flex-direction:column;padding-inline-start:6px;border-inline-start:2px solid var(--line);margin-inline-start:5px}.tool-group-hint{display:block;color:var(--muted);padding:5px 8px;font-size:10px}.page-wrap[data-tool="none"] .text-layer{pointer-events:auto;cursor:text;user-select:text;-webkit-user-select:text}.text-layer span{user-select:text;-webkit-user-select:text}.pdf-stage{isolation:isolate;contain:layout style}.zoom-surface{position:relative;flex:0 0 auto}.pages{pointer-events:auto}.pdf-stage *{max-width:none}

.page-wrap[data-tool="none"] .ink-canvas{pointer-events:none}.page-wrap[data-tool="none"] .text-layer{z-index:4}.page-wrap.draw .text-layer{pointer-events:none}

.reader-bar{position:relative;z-index:40;pointer-events:auto}.page-nav{position:sticky;top:0;z-index:35;background:var(--bg);pointer-events:auto}.tool-rail{position:relative;z-index:45;pointer-events:auto}


/* Fix the reader layout: tool shelf gets its own column instead of covering the PDF. */
.reader-layout{position:relative;min-width:0}
.tool-rail{position:relative;flex:0 0 55px;flex-direction:column;align-items:center;justify-content:flex-start}
.tool-panel{inset:auto;position:absolute;top:12px;left:auto;right:calc(100% + 8px);margin:0;width:min(240px,calc(100vw - 80px));max-height:calc(100dvh - 100px)}
.reader-layout.tools-open .tool-rail{flex:0 0 270px;width:270px;align-items:stretch;justify-content:flex-start;padding:12px;flex-direction:column}
.reader-layout.tools-open .tool-rail .tool-dot{align-self:flex-start;flex-shrink:0}
.reader-layout.tools-open .tool-panel{position:static;inset:auto;width:100%;max-width:100%;max-height:calc(100dvh - 150px);margin-top:12px;box-shadow:none}
.page-nav{position:relative!important;top:auto!important;z-index:5!important}
.inline-translation{position:absolute;z-index:1;display:flex;align-items:center;box-sizing:border-box;overflow:hidden;padding:0;margin:0;border:0;border-radius:0;white-space:nowrap;line-height:1;user-select:none;pointer-events:none;font-family:Tahoma,Arial,sans-serif;font-weight:500;contain:layout paint}
.translation-layer{position:absolute;inset:0;z-index:2.5;pointer-events:none;overflow:hidden}
.translate-mode.translation-on{background:#6b5b21!important;border-color:#c1a14d!important;color:#fff3bd!important}
@media(max-width:720px){.reader-layout.tools-open .tool-rail{position:absolute;top:0;bottom:0;right:0;z-index:50;width:min(260px,calc(100vw - 48px));flex:0 0 auto;align-items:stretch;overflow:auto;box-shadow:0 10px 40px #0009}.reader-layout.tools-open .tool-panel{max-height:calc(100dvh - 140px)}.tool-panel{right:auto;left:0;top:0;max-height:calc(100dvh - 90px)}}
.page-wrap[data-tool="none"] .text-layer{z-index:2!important}

/* Reader opens as a full-window workspace; the library header must not sit on top of it. */
body.reader-open > .topbar{display:none!important}
body.reader-open{overflow:hidden}
.reader{position:relative;width:100%;height:100vh;height:100dvh;min-height:0;margin:0;z-index:1}
.reader-bar{flex-shrink:0}
.pdf-stage{scrollbar-gutter:stable;touch-action:pan-x pan-y}
.inline-translation{white-space:normal!important;overflow-wrap:anywhere;word-break:normal;text-align:start;line-height:1.05;padding:0 1px!important}

/* Hand cursor for pan mode: open hand at rest, closed hand while dragging. */
.pdf-stage.hand-mode,
.pdf-stage.hand-mode .zoom-surface,
.pdf-stage.hand-mode .zoom-surface * { cursor: grab !important; }
.pdf-stage.hand-panning,
.pdf-stage.hand-panning .zoom-surface,
.pdf-stage.hand-panning .zoom-surface * { cursor: grabbing !important; }


/* User-requested tool: select PDF text explicitly, keeping hand mode for panning. */
.page-wrap[data-tool="none"] .text-layer { pointer-events:none!important; }
.page-wrap[data-tool="selectText"] .text-layer { pointer-events:auto!important; cursor:text!important; user-select:text!important; -webkit-user-select:text!important; z-index:4!important; }
.page-wrap[data-tool="selectText"] .ink-canvas { pointer-events:none!important; }
.page-wrap[data-tool="selectText"] .note-overlay { z-index:5!important; }
.page-wrap[data-tool="pen"] .ink-canvas { cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cg transform='rotate(-42 16 16)'%3E%3Cpath d='M13 5h6v17h-6z' fill='%23000000' stroke='%23ffffff' stroke-width='1.2'/%3E%3Cpath d='M13 22h6l-3 7z' fill='%23f4d2a2' stroke='%232c2410' stroke-width='1.2'/%3E%3Cpath d='M13 5h6V9h-6z' fill='%23e7ece8' stroke='%232c2410' stroke-width='1'/%3E%3C/g%3E%3C/svg%3E") 4 27,crosshair!important; }
.note-overlay { background:var(--note-background,transparent)!important; border:1px solid var(--note-border,transparent)!important; }


/* Final polish: readable, precise native selection for PDF text */
.text-layer{position:absolute!important;inset:0!important;overflow:hidden!important;line-height:1!important;text-size-adjust:none;-webkit-text-size-adjust:none;user-select:text;-webkit-user-select:text}
.text-layer span,.text-layer br{position:absolute;color:transparent!important;white-space:pre;cursor:text;transform-origin:0 0;user-select:text;-webkit-user-select:text}
.text-layer ::selection,.text-layer span::selection{background:rgba(60,135,255,.48)!important;color:transparent!important}
.page-wrap[data-tool="selectText"] .text-layer{pointer-events:auto!important;cursor:text!important;touch-action:pan-x pan-y;user-select:text!important;-webkit-user-select:text!important}
.note-overlay:focus{background:var(--note-background,rgba(0,0,0,.24))!important;border-color:var(--note-border,#000)!important;outline:1px dashed var(--note-border,#000)!important;outline-offset:-1px!important}


/* More reliable PDF text selection: touch-friendly dragging and clear selection highlight. */
.page-wrap[data-tool="selectText"] .text-layer { pointer-events:auto!important; user-select:text!important; -webkit-user-select:text!important; cursor:text!important; touch-action:pan-x pan-y; z-index:6!important; }
.page-wrap[data-tool="selectText"] .text-layer span { pointer-events:auto!important; user-select:text!important; -webkit-user-select:text!important; -webkit-touch-callout:default; }
.text-layer ::selection, .text-layer span::selection { background:rgba(35,112,255,.42)!important; color:transparent!important; }


/* Notes stay yellow; the selected pen color belongs to the typed text only. */
.note-overlay { background:#ffe36b!important; border:1px solid #d3ad27!important; color:var(--note-text-color,#111111)!important; caret-color:var(--note-text-color,#111111)!important; }
.note-overlay:focus { background:#ffe36b!important; border-color:#b18b12!important; outline:1px dashed #b18b12!important; outline-offset:-1px!important; }
/* Keep PDF text spans selectable and visually mark the selected range. */
.page-wrap[data-tool="selectText"] .text-layer { pointer-events:auto!important; user-select:text!important; -webkit-user-select:text!important; z-index:12!important; }
.page-wrap[data-tool="selectText"] .text-layer span { pointer-events:auto!important; user-select:text!important; -webkit-user-select:text!important; }


/* Final text-selection and transparent-note fixes */
.page-wrap .text-layer{
 position:absolute!important;left:0!important;top:0!important;right:auto!important;bottom:auto!important;
 width:100%;height:100%;overflow:hidden!important;line-height:normal!important;
 user-select:text!important;-webkit-user-select:text!important;-webkit-touch-callout:default;
 text-size-adjust:none;-webkit-text-size-adjust:none;z-index:2;opacity:1;direction:ltr;
}
.page-wrap .text-layer span,.page-wrap .text-layer br{
 position:absolute!important;color:transparent!important;white-space:pre!important;cursor:text!important;
 transform-origin:0 0!important;user-select:text!important;-webkit-user-select:text!important;
}
.page-wrap[data-tool="selectText"] .text-layer{pointer-events:auto!important;z-index:12!important;cursor:text!important;}
.page-wrap[data-tool="selectText"] .ink-canvas{pointer-events:none!important;}
.page-wrap[data-tool="selectText"] .pdf-canvas{pointer-events:none!important;}
.page-wrap[data-tool="selectText"] .note-overlay{z-index:13!important;}
.page-wrap .text-layer ::selection,.page-wrap .text-layer span::selection{background:rgba(30,110,255,.42)!important;color:transparent!important;}
.note-overlay,.note-overlay:focus{
 background:rgba(255,227,107,.27)!important;
 border:1px solid rgba(211,173,39,.60)!important;
 color:var(--note-text-color,#111)!important;
 caret-color:var(--note-text-color,#111)!important;
}
.note-overlay:focus{background:rgba(255,227,107,.38)!important;outline:1px dashed rgba(177,139,18,.85)!important;outline-offset:-1px!important;}

/* Final requested adjustment: make the yellow note fill translucent, not opaque. */
.page-wrap .note-overlay,
.page-wrap .note-overlay:focus {
  background: rgba(255, 227, 107, 0.16) !important;
  border: 1px solid rgba(211, 173, 39, 0.38) !important;
  color: var(--note-text-color, #111111) !important;
  caret-color: var(--note-text-color, #111111) !important;
  backdrop-filter: none !important;
}
.page-wrap .note-overlay:focus {
  background: rgba(255, 227, 107, 0.22) !important;
  outline: 1px dashed rgba(177, 139, 18, 0.7) !important;
  outline-offset: -1px !important;
}
/* Keep PDF text selectable above the rendered page while leaving drawing disabled in select mode. */
.page-wrap[data-tool="selectText"] .text-layer,
.page-wrap[data-tool="selectText"] .text-layer * {
  pointer-events: auto !important;
  user-select: text !important;
  -webkit-user-select: text !important;
  -webkit-touch-callout: default !important;
}
.page-wrap[data-tool="selectText"] .text-layer {
  z-index: 20 !important;
  cursor: text !important;
  touch-action: auto !important;
}
.page-wrap[data-tool="selectText"] .text-layer ::selection,
.page-wrap[data-tool="selectText"] .text-layer span::selection {
  background: rgba(35, 112, 255, 0.48) !important;
  color: transparent !important;
}

/* Hand mode remains draggable at the normal 100% reading scale. */
.pdf-stage.hand-mode { cursor: grab !important; }
.pdf-stage.hand-panning { cursor: grabbing !important; user-select: none !important; -webkit-user-select: none !important; }
.pdf-stage.hand-panning * { cursor: grabbing !important; }

/* Keep the PDF page centered in its reading surface at the default 100% zoom. */
.zoom-surface { margin-inline: auto !important; }
.pages { transform-origin: top left !important; }
.page-wrap[data-tool="selectText"] .text-layer { pointer-events: auto !important; user-select: text !important; -webkit-user-select: text !important; -webkit-touch-callout: default !important; }
.page-wrap[data-tool="selectText"] .text-layer span { pointer-events: auto !important; user-select: text !important; -webkit-user-select: text !important; }
.page-wrap[data-tool="selectText"] .pdf-canvas,
.page-wrap[data-tool="selectText"] .ink-canvas { pointer-events: none !important; }


/* Reliable PDF text selection, including OCR text extracted from scanned page images. */
.page-wrap[data-tool="selectText"] .ink-canvas{pointer-events:none!important}
.page-wrap[data-tool="selectText"] .text-layer{pointer-events:auto!important;cursor:text;user-select:text;-webkit-user-select:text;touch-action:manipulation}
.page-wrap[data-tool="selectText"] .text-layer span{-webkit-user-select:text;user-select:text}
.page-wrap[data-tool="selectText"] .text-layer span::selection{background:rgba(55,135,245,.48);color:transparent}


/* Use one consistent horizontal scroll coordinate system for PDF pinch zoom and two-finger panning in RTL and LTR UI. */
#pdfStage { direction: ltr !important; touch-action: none !important; overscroll-behavior: contain; }
#pdfStage .text-layer { direction: ltr; }


/* Temporary marquee for OCR limited to the rectangle explicitly selected by the reader. */
.ocr-region-box{position:absolute;z-index:100;pointer-events:none;border:2px solid #4387f5;border-radius:3px;background:#4387f522;box-shadow:0 0 0 1px #ffffff99;}
.page-wrap[data-tool="selectText"] .text-layer[data-source-has-text="0"]{touch-action:none!important;user-select:text!important;-webkit-user-select:text!important;}


/* Separate writing tools, shapes, and movable existing marks. */
.page-wrap.draw .ink-canvas{touch-action:none;}
.page-wrap[data-tool="move"] .ink-canvas{cursor:move!important;pointer-events:auto!important;}
.page-wrap[data-tool="move"] .note-overlay{pointer-events:none!important;}
.tool-panel .tool-group-toggle[aria-expanded="true"] .group-chevron{transform:rotate(180deg);}
.ocr-region-box{touch-action:none;}


/* In-place translation stays attached to the selected text and does not block the PDF. */
.page-wrap[data-tool="translateLocal"] .ink-canvas{pointer-events:none!important;}
.page-wrap[data-tool="translateLocal"] .text-layer{pointer-events:auto!important;user-select:text!important;-webkit-user-select:text!important;cursor:text!important;z-index:22!important;}
.page-wrap[data-tool="translateLocal"] .text-layer span{pointer-events:auto!important;user-select:text!important;-webkit-user-select:text!important;}
.inline-translation{position:absolute;z-index:70;box-sizing:border-box;padding:10px 12px;border:1px solid #7eaa88;border-radius:12px;background:#f8fff9;color:#17251a;box-shadow:0 8px 30px #0005;white-space:normal;overflow-wrap:anywhere;direction:auto;line-height:1.55;pointer-events:auto;font:14px/1.55 Tahoma,Arial,sans-serif;}
.inline-translation-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding-bottom:5px;border-bottom:1px solid #d6e8da;margin-bottom:7px;font-size:12px;}
.inline-translation-close{border:0;background:transparent;color:inherit;font-size:20px;line-height:1;cursor:pointer;padding:0 3px;}
.inline-translation-result{max-height:180px;overflow:auto;white-space:pre-wrap;user-select:text;-webkit-user-select:text;}
.inline-translation-actions{display:flex;justify-content:flex-end;padding-top:8px;}
.inline-translation-copy{border:0;border-radius:7px;background:#dcefe0;color:#17351e;padding:6px 10px;font:inherit;font-size:12px;cursor:pointer;}
.inline-translation-copy:disabled{opacity:.45;cursor:default;}


/* Keep the sidebar hide/show control available while the reading area expands. */
.tool-rail{transition:flex-basis .2s ease,width .2s ease,padding .2s ease;min-width:0}
.reader-layout.sidebar-collapsed .tool-rail{width:0!important;flex:0 0 0!important;padding:0!important;border-inline-end:0!important;overflow:hidden!important}
.reader-layout.sidebar-collapsed .tool-rail>*{display:none!important}
.sidebar-toggle-btn{flex-shrink:0}
.history-controls{display:flex;gap:7px;margin:8px 0 10px}
.history-btn{flex:1;min-width:0;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--text);padding:7px 8px;font:inherit;font-size:12px}
.history-btn:disabled{opacity:.38;cursor:default}
.tool-action{display:block;width:100%;text-align:start;background:transparent;border:0;border-radius:8px;color:var(--text);padding:8px 9px;font-size:12px;cursor:pointer}
.tool-action:hover,.tool-choice:hover{background:#21472e;color:#e2f5e5}
#eraserSizeRow{margin-block:4px 8px}
.translate-action-wrap{position:relative;display:inline-flex;align-items:center}
.translation-choice-menu{position:absolute;z-index:100;top:calc(100% + 5px);inset-inline-start:0;min-width:170px;padding:6px;border:1px solid var(--line);border-radius:10px;background:var(--panel);box-shadow:var(--shadow);display:flex;flex-direction:column;gap:3px}
.translation-choice{border:0;border-radius:7px;background:transparent;color:var(--text);padding:9px 10px;text-align:start;white-space:nowrap;font-size:12px;cursor:pointer}
.translation-choice:hover{background:#21472e;color:#e2f5e5}
/* Notes are transparent; text is auto-fitted and clipped to the note rectangle. */
.note-overlay,.note-overlay:focus{background:transparent!important;background-color:transparent!important;box-shadow:none!important;outline:0!important;border:0!important;overflow:hidden!important;resize:none!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important;box-sizing:border-box!important;padding:0!important}
.note-overlay:focus{outline:1px dashed var(--note-border,#9b8a32)!important;outline-offset:-1px!important}


/* Select and copy are paired in the sidebar, keeping the reader controls compact. */
.tool-quick-actions{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);align-items:stretch;gap:4px;margin-block:2px 6px}
.tool-quick-actions .tool-choice,.tool-quick-actions .tool-action{min-width:0;width:100%;box-sizing:border-box;padding:8px 6px;text-align:center;font-size:11px;overflow-wrap:anywhere}
.tool-quick-actions .tool-choice{margin:0}
.tool-quick-actions .tool-action{display:flex;align-items:center;justify-content:center}
.tool-rail{box-sizing:border-box}
.reader-layout.sidebar-collapsed .tool-rail{visibility:hidden}
#sidebarToggleBtn{min-width:34px}
.page-wrap.eraser-mode .ink-canvas{cursor:crosshair!important}
.page-wrap.remove-mode .ink-canvas{cursor:crosshair!important}
/* Text stays clipped within a fully transparent note box, even at large zoom levels. */
.page-wrap .note-overlay{max-width:none!important;max-height:none!important;overflow:hidden!important;resize:none!important;white-space:pre-wrap!important;overflow-wrap:anywhere!important;word-break:break-word!important;background:transparent!important}


/* Keep Select Text inline beside translation in the top navigation, not full-width like sidebar choices. */
.page-nav .top-text-tool{display:inline-flex!important;align-items:center;justify-content:center;width:auto!important;flex:0 0 auto;max-width:none;padding:7px 10px;text-align:center;white-space:nowrap;}
.page-nav .copy-text-mode{flex:0 0 auto;width:auto;}
.note-box-size-controls{padding:9px 8px;margin:8px 0;border:1px solid var(--line);border-radius:9px;background:var(--bg);}
.note-box-size-controls b{display:block;font-size:12px;line-height:1.5;margin-bottom:8px;}
.note-box-size-controls input[type=range]{display:block;width:100%;}
.note-box-size-controls output{font-variant-numeric:tabular-nums;color:var(--muted);font-size:11px;}


/* Acrobat-like text-box comments: drag to create, auto-wrap text, resize the selected box. */
.page-wrap[data-tool="note"] .note-overlay{
 resize:both!important;
 outline:1px dashed var(--note-border,#7c8b82)!important;
 outline-offset:-1px!important;
 overflow:hidden!important;
 pointer-events:auto!important;
}
.page-wrap[data-tool="note"] .note-overlay:focus{
 outline:1px solid var(--note-border,#7c8b82)!important;
}
.page-wrap[data-tool="note"] .ink-canvas{cursor:crosshair!important;}


/* Acrobat-like floating note formatter: minus, plus, delete, and check/cross options. */
.note-format-toolbar{position:absolute;z-index:85;display:flex;align-items:center;gap:3px;padding:5px 7px;background:#fff;color:#303030;border:1px solid #d0d0d0;border-radius:7px;box-shadow:0 3px 12px #0002;direction:ltr;white-space:nowrap;box-sizing:border-box;}
.note-format-toolbar[hidden],.note-symbol-menu[hidden]{display:none!important;}
.note-format-btn{width:29px;height:28px;display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;border:0;border-radius:5px;background:transparent;color:#343434;font:18px/1 Arial,sans-serif;padding:0;cursor:pointer;}
.note-format-btn:hover{background:#eeeeee;}
.note-font-smaller{font-size:15px;}
.note-font-larger{font-size:21px;}
.note-delete-box{font-size:17px;}
.note-more-btn{font-size:21px;letter-spacing:1px;}
.note-symbol-menu{position:absolute;right:0;top:calc(100% + 5px);min-width:148px;display:flex;flex-direction:column;gap:3px;padding:5px;background:#fff;border:1px solid #d0d0d0;border-radius:8px;box-shadow:0 4px 16px #0002;}
.note-symbol-menu .note-symbol-choice{width:100%;justify-content:flex-start;font-size:14px;padding:5px 9px;}
.note-check{color:#19783d;}
.note-cross{color:#be3030;}
/* Remove the blank side rail; keep the tools menu and opener without shrinking the PDF. */
.reader-layout{position:relative;}
.tool-rail{width:0!important;flex:0 0 0!important;min-width:0!important;padding:0!important;margin:0!important;border:0!important;background:transparent!important;overflow:visible!important;}
.floating-tool-toggle{position:absolute;inset-inline-start:8px;top:8px;z-index:95;width:36px;height:36px;border-radius:9px;font-size:17px;box-shadow:none;}
.tool-panel{position:absolute;inset-inline-start:8px;top:52px;z-index:90;max-height:calc(100% - 60px);}


/* Final layout guard: the tool panel is a narrow floating sidebar at every viewport size. */
.tool-panel{
 position:absolute!important;
 inset-inline-start:8px!important;
 inset-inline-end:auto!important;
 inset-block-start:52px!important;
 inset-block-end:auto!important;
 width:min(270px,calc(100vw - 24px))!important;
 min-width:0!important;
 max-width:calc(100vw - 24px)!important;
 height:auto!important;
 max-height:calc(100dvh - 72px)!important;
 overflow:auto!important;
 margin:0!important;
 box-sizing:border-box!important;
 z-index:100!important;
}
/* Put Undo and Redo in the top action row for all annotation tools. */
.history-controls-top{display:flex;align-items:center;gap:3px;margin:0;padding:0;flex:0 0 auto;}
.history-controls-top .history-btn{width:32px;height:32px;min-width:32px;flex:0 0 32px;margin:0;padding:0;border:1px solid #405646;border-radius:7px;background:#17231b;color:var(--text);font-size:20px;line-height:1;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;}
.history-controls-top .history-btn:disabled{opacity:.4;}
/* Highlight book-flip mode with a red outlined control. */
.page-nav #flipModeBtn{border:1px solid #ed5555!important;background:#321616!important;color:#ffe5e5!important;box-shadow:0 0 0 1px #8e2e2e!important;}
.page-nav #flipModeBtn.active{border:2px solid #ff6666!important;background:#642020!important;color:#fff!important;box-shadow:0 0 0 2px #8e3030!important;}
.page-nav #flipModeBtn:hover{background:#7a2525!important;border-color:#ff8080!important;}
@media(max-width:760px){
 .history-controls-top .history-btn{width:28px;height:28px;min-width:28px;flex-basis:28px;font-size:18px;}
 .tool-panel{width: min(270px, calc(100vw - 16px))!important;max-width:calc(100vw - 16px)!important;}
}


/* Undo/redo: compact red arrows only, with no text labels. */
.history-controls-top .history-btn,
.history-controls-top .history-btn:disabled{
 color:#ff5a5a!important;
 border:1px solid #c83b3b!important;
 background:#241111!important;
 opacity:1;
}
.history-controls-top .history-btn:hover:not(:disabled){
 background:#491818!important;
 border-color:#ff6262!important;
}
/* Restore normal green styling on Book Flip; emphasize Previous and Next instead. */
.page-nav #flipModeBtn,
.page-nav #flipModeBtn.active,
.page-nav #flipModeBtn:hover{
 border:1px solid #2e4334!important;
 background:#18231c!important;
 color:var(--text)!important;
 box-shadow:none!important;
}
.page-nav #flipModeBtn.active{
 background:#21472f!important;
 border-color:#659878!important;
 color:#daf0df!important;
}
.page-nav #prevPage,
.page-nav #nextPage{
 border:1px solid #e54b4b!important;
 background:#3a1515!important;
 color:#ffe6e6!important;
 box-shadow:0 0 0 1px #812727!important;
}
.page-nav #prevPage:hover,
.page-nav #nextPage:hover{
 border-color:#ff7777!important;
 background:#5b1c1c!important;
}
.page-nav #prevPage:disabled,
.page-nav #nextPage:disabled{
 opacity:.45;
}


/* Page rotation stays in place; visually mark the two new reader actions. */
.reader-title-heading{display:flex;align-items:center;gap:8px;min-width:0;margin-bottom:1px}
.reader-title-heading strong{min-width:0;flex:1}
.reset-book-changes{flex:0 0 auto;max-width:100%;border:1px solid #d83d3d!important;background:#2a1010!important;color:#ff5959!important;border-radius:7px;padding:5px 8px;font-size:11px;font-weight:800;white-space:nowrap;cursor:pointer;box-shadow:0 0 0 1px #762626}
.reset-book-changes:hover{background:#451717!important;border-color:#ff6464!important}
.reader-tools #rotatePageBtn{background:#f4cf55!important;color:#4b3900!important;border:1px solid #c4a12b!important;font-size:23px;line-height:1;font-weight:800;box-shadow:0 0 0 1px #8a7020!important}
.reader-tools #rotatePageBtn:hover{background:#ffe681!important}
@media(max-width:720px){.reader-title-heading{gap:5px}.reset-book-changes{padding:5px 6px;font-size:10px}.reader-title-heading strong{font-size:13px}}

/* Search-friendly product description on the library landing screen. */
.seo-content{max-width:980px;margin:44px auto 0;padding:28px clamp(4px,2vw,20px) 8px;border-top:1px solid var(--line);color:var(--muted);font-size:14px;line-height:1.9}
.seo-content h2{margin:0 0 12px;color:var(--text);font-size:clamp(20px,3vw,28px);line-height:1.5}
.seo-content h3{margin:24px 0 8px;color:var(--text);font-size:16px}
.seo-content p{max-width:82ch;margin:0 0 12px}
.seo-content ul{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,260px),1fr));gap:8px 24px;margin:8px 0 20px;padding-inline-start:24px}
.seo-content li{padding-inline-start:3px}
@media(max-width:600px){.seo-content{margin-top:32px;padding-top:22px;font-size:13px}.seo-content ul{grid-template-columns:1fr;gap:5px}}


/* MyBookWeb responsive reader header and movable phone tool panel */
@media(max-width:760px){
 .reader-bar{
  display:grid!important;grid-template-columns:34px minmax(0,1fr);grid-template-areas:"back title" "tools tools";
  align-items:center;gap:5px 8px;padding:6px 8px;min-height:0;height:auto;box-sizing:border-box;
 }
 #backBtn{grid-area:back;width:32px;height:32px;min-width:32px}
 .reader-title{grid-area:title;flex:none;width:100%;min-width:0;max-width:100%;overflow:hidden}
 .reader-title-heading{display:flex;align-items:center;width:100%;min-width:0;gap:6px;margin:0}
 .reader-title-heading strong{display:block;min-width:0;flex:1 1 auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:clamp(12px,3.3vw,15px)}
 .reader-title small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:9px}
 .reset-book-changes{max-width:44vw;min-width:0;flex:0 0 auto;padding:5px 6px;font-size:clamp(9px,2.7vw,11px);white-space:nowrap}
 .reader-tools{grid-area:tools;display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;min-width:0;width:100%;gap:4px;padding-top:2px;box-sizing:border-box}
 .reader-tools .icon-btn,.history-controls-top .history-btn{width:clamp(26px,7.5vw,32px);height:clamp(26px,7.5vw,32px);min-width:clamp(26px,7.5vw,32px);flex:0 0 clamp(26px,7.5vw,32px);font-size:clamp(14px,4vw,18px);padding:0}
 .reader-tools .icon-btn.compact{width:clamp(26px,7.5vw,32px);min-width:clamp(26px,7.5vw,32px);flex-basis:clamp(26px,7.5vw,32px)}
 .zoom-percent{min-width:28px;font-size:10px}
 .page-nav{display:flex;flex-wrap:wrap;align-content:center;justify-content:flex-start;gap:5px;padding:6px 5px;max-height:none;min-width:0}
 .nav-btn,.mode-btn{font-size:clamp(9px,2.8vw,11px);padding:6px 7px;min-height:29px;flex:0 0 auto;max-width:100%}
 .page-jump{font-size:10px}
 .page-jump input{width:38px}
 .tool-panel{
  position:fixed!important;inset-inline-start:auto!important;inset-inline-end:auto!important;
  inset-block-start:auto!important;inset-block-end:auto!important;
  left:var(--tool-panel-left,8px)!important;right:auto!important;top:var(--tool-panel-top,96px)!important;
  width:min(270px,calc(100vw - 16px))!important;min-width:0!important;max-width:calc(100vw - 16px)!important;
  max-height:calc(100dvh - 104px)!important;overflow:auto!important;touch-action:pan-y;box-sizing:border-box;
 }
 .tool-panel-head{position:sticky;top:-12px;z-index:2;background:var(--panel);cursor:move;touch-action:none;user-select:none;-webkit-user-select:none;padding-bottom:8px}
 body:not(.dark) .tool-panel-head{background:#fff}
 .note-format-toolbar{max-width:calc(100vw - 18px);gap:1px}
 .note-format-btn{width:25px;height:26px}
}
@media(max-width:390px){
 .reader-bar{grid-template-columns:30px minmax(0,1fr);gap:4px 6px;padding:5px}
 #backBtn{width:29px;height:29px;min-width:29px}
 .reader-tools{gap:3px}
 .reader-tools .icon-btn,.history-controls-top .history-btn{width:26px;height:26px;min-width:26px;flex-basis:26px;font-size:14px}
 .reset-book-changes{max-width:41vw;padding:4px 5px}
 .zoom-percent{min-width:24px;font-size:9px}
}


/* Final mobile pass: smaller reader controls, visible top edges, and movable circular tools. */
@media(max-width:760px){
 body:not(.reader-open)> .topbar{
  display:flex!important;position:sticky!important;top:0!important;z-index:120!important;
  padding:calc(7px + env(safe-area-inset-top,0px)) 8px 7px!important;
  min-height:0!important;box-sizing:border-box;
 }
 body.reader-open .reader{
  height:100dvh!important;height:100vh!important;height:100dvh!important;
  padding-top:env(safe-area-inset-top,0px);box-sizing:border-box;
 }
 body.reader-open .reader-bar{
  position:relative!important;top:0!important;z-index:120!important;flex:0 0 auto!important;
  padding-top:max(6px,env(safe-area-inset-top,0px))!important;min-height:0!important;
 }
 .reader-bar{
  grid-template-columns:29px minmax(0,1fr)!important;
  gap:4px 6px!important;padding-inline:6px!important;padding-bottom:5px!important;
 }
 #backBtn{width:25px!important;height:25px!important;min-width:25px!important;font-size:14px!important}
 .reader-title-heading strong{font-size:clamp(11px,3vw,13px)!important}
 .reader-title small{font-size:9px!important}
 .reset-book-changes{font-size:9px!important;padding:4px 5px!important;max-width:43vw!important}
 .reader-tools{gap:3px!important;padding-top:1px!important}
 .reader-tools .icon-btn,.reader-tools .icon-btn.compact{
  width:25px!important;height:25px!important;min-width:25px!important;flex:0 0 25px!important;
  padding:0!important;font-size:14px!important;border-radius:6px!important;line-height:1!important;
 }
 .history-controls-top{gap:2px!important}
 .history-controls-top .history-btn{
  width:22px!important;height:22px!important;min-width:22px!important;flex:0 0 22px!important;font-size:15px!important;border-radius:5px!important;
 }
 .zoom-percent{min-width:23px!important;font-size:9px!important}
 .page-nav{gap:3px!important;padding:5px 4px!important;align-items:center!important}
 .nav-btn,.mode-btn{
  min-height:24px!important;padding:4px 5px!important;font-size:9px!important;border-radius:7px!important;
  line-height:1.2!important;
 }
 .page-jump{font-size:9px!important;gap:3px!important}
 .page-jump input{width:32px!important;height:24px!important;font-size:10px!important;padding:2px!important}
 .divider-v{height:15px!important;margin-inline:1px!important}
 .floating-tool-toggle{
  position:fixed!important;inset-inline-start:auto!important;inset-inline-end:auto!important;
  left:var(--tool-toggle-left,auto)!important;right:var(--tool-toggle-right,8px)!important;
  top:var(--tool-toggle-top,calc(env(safe-area-inset-top,0px) + 104px))!important;bottom:auto!important;
  width:30px!important;height:30px!important;min-width:30px!important;min-height:30px!important;
  padding:0!important;border-radius:50%!important;font-size:14px!important;line-height:1!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  box-shadow:0 3px 12px #0005!important;border:1px solid #79a987!important;
  touch-action:none!important;user-select:none!important;-webkit-user-select:none!important;
 }
 .tool-panel{
  width:min(235px,calc(100vw - 20px))!important;max-width:calc(100vw - 20px)!important;
  max-height:calc(100dvh - 92px)!important;border-radius:12px!important;padding:9px!important;
 }
 .tool-choice{padding:7px 8px!important;font-size:11px!important}
 .tool-group-toggle{padding:8px!important;font-size:11px!important}
 .setting-row{font-size:11px!important;margin-top:8px!important}
 .setting-row input[type=range]{width:85px!important}
 .danger-btn{padding:7px!important;font-size:10px!important}
 .tool-panel-head{cursor:move!important;touch-action:none!important;padding-bottom:6px!important}
}
@media(max-width:390px){
 .reader-bar{grid-template-columns:26px minmax(0,1fr)!important;gap:3px 5px!important}
 #backBtn{width:23px!important;height:23px!important;min-width:23px!important}
 .reader-tools{gap:2px!important}
 .reader-tools .icon-btn,.reader-tools .icon-btn.compact{width:23px!important;height:23px!important;min-width:23px!important;flex-basis:23px!important;font-size:13px!important}
 .history-controls-top .history-btn{width:20px!important;height:20px!important;min-width:20px!important;flex-basis:20px!important;font-size:14px!important}
 .page-nav{gap:2px!important;padding:4px 3px!important}
 .nav-btn,.mode-btn{padding:4px!important;font-size:8px!important;min-height:22px!important}
 .reset-book-changes{font-size:8px!important;max-width:41vw!important}
}


/* Stable viewport handling for browser toolbars, mobile address bars, and fullscreen transitions. */
.reader{height:var(--app-viewport-height,100dvh)!important;min-height:0!important}
.reader-bar{padding-top:max(10px,env(safe-area-inset-top,0px))!important;box-sizing:border-box}
.reader .floating-tool-toggle{
 position:fixed!important;inset-inline-start:auto!important;inset-inline-end:auto!important;
 inset-block-start:auto!important;inset-block-end:auto!important;
 left:var(--tool-toggle-left,auto)!important;right:var(--tool-toggle-right,12px)!important;
 top:var(--tool-toggle-top,calc(var(--app-viewport-offset-top,0px) + 104px))!important;
 width:34px!important;height:34px!important;min-width:34px!important;min-height:34px!important;
 border-radius:50%!important;padding:0!important;display:flex!important;align-items:center!important;justify-content:center!important;
 z-index:180!important;touch-action:none!important;user-select:none!important;-webkit-user-select:none!important;
}
.reader .tool-panel{
 position:fixed!important;inset-inline-start:auto!important;inset-inline-end:auto!important;
 inset-block-start:auto!important;inset-block-end:auto!important;
 left:var(--tool-panel-left,12px)!important;right:auto!important;top:var(--tool-panel-top,110px)!important;
 width:min(270px,calc(var(--app-viewport-width,100vw) - 24px))!important;
 max-width:calc(var(--app-viewport-width,100vw) - 24px)!important;
 max-height:calc(var(--app-viewport-height,100dvh) - 86px)!important;overflow:auto!important;
 box-sizing:border-box!important;z-index:190!important;
}
.tool-panel-head{cursor:move;touch-action:none;user-select:none;-webkit-user-select:none}
.focus-mode-toggle{
 width:28px;height:28px;min-width:28px;flex:0 0 28px;padding:3px;display:inline-flex;
 align-items:center;justify-content:center;border-radius:8px;border:1px solid #2686ff;
 background:#102442;color:#4a9aff;box-shadow:0 0 0 1px #103b70;cursor:pointer;line-height:1;
}
.focus-mode-toggle svg{display:block;width:20px;height:20px;fill:none;stroke:#3e95ff;stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}
.focus-mode-toggle[aria-pressed="true"]{background:#154c87;border-color:#61b1ff;color:#fff;box-shadow:0 0 0 2px #174f86}
.focus-mode-bar.hidden{display:none!important}
.focus-mode-bar{
 position:fixed;left:50%;top:calc(var(--app-viewport-offset-top,0px) + max(10px,env(safe-area-inset-top,0px)));
 transform:translateX(-50%);z-index:170;display:flex;align-items:center;justify-content:center;
 gap:6px;max-width:calc(var(--app-viewport-width,100vw) - 16px);width:max-content;box-sizing:border-box;
 padding:5px 7px;background:var(--panel);color:var(--text);border:1px solid var(--line);
 border-radius:12px;box-shadow:0 5px 22px #0006;direction:rtl;white-space:nowrap;
}
.focus-mode-bar button{box-sizing:border-box}
.focus-mode-history,.focus-mode-pages{display:flex;align-items:center;gap:3px;min-width:0}
.focus-control,.focus-exit-btn{
 width:30px;height:30px;min-width:30px;display:inline-flex;align-items:center;justify-content:center;
 border:1px solid #45594a;border-radius:7px;background:#17231b;color:var(--text);padding:0;
 font-size:15px;line-height:1;cursor:pointer;
}
.focus-control:disabled{opacity:.38}
.focus-mode-pages label{display:flex;align-items:center;gap:3px;font-size:10px;color:var(--muted)}
.focus-page-jump input{width:39px;height:27px;padding:2px;border:1px solid var(--line);border-radius:6px;background:var(--bg);color:var(--text);text-align:center;direction:ltr}
.focus-exit-btn{color:#ff8b8b;border-color:#a84c4c;background:#381a1a}
.focus-flip-control{color:#75c6ff;border-color:#2679a9}
.focus-flip-control.active{background:#174f78;border-color:#65bfff;color:#fff}
.reader.focus-mode .reader-bar{display:none!important}
.reader.focus-mode .document-area>.page-nav{display:none!important}
.reader.focus-mode #focusModeBar:not(.hidden){display:flex!important}
.reader.focus-mode .floating-tool-toggle{z-index:180!important}
@media(max-width:760px){
 body.reader-open .reader{height:var(--app-viewport-height,100dvh)!important;padding-top:0!important}
 body.reader-open .reader-bar{
  padding-top:max(34px,calc(env(safe-area-inset-top,0px) + 8px))!important;
  padding-bottom:4px!important;gap:3px 5px!important;
 }
 body.reader-open .reader-title-heading{gap:4px!important}
 body.reader-open .reader-title-heading strong{font-size:clamp(10px,2.8vw,12px)!important}
 body.reader-open .focus-mode-toggle{width:22px;height:22px;min-width:22px;flex-basis:22px;padding:2px;border-radius:6px}
 body.reader-open .focus-mode-toggle svg{width:16px;height:16px}
 body.reader-open .reset-book-changes{font-size:8px!important;padding:3px 4px!important;max-width:39vw!important}
 .reader .floating-tool-toggle{
  width:23px!important;height:23px!important;min-width:23px!important;min-height:23px!important;
  font-size:11px!important;border-radius:50%!important;box-shadow:0 2px 7px #0005!important;
  top:var(--tool-toggle-top,calc(var(--app-viewport-offset-top,0px) + 112px))!important;
 }
 .reader .tool-panel{width:min(225px,calc(var(--app-viewport-width,100vw) - 16px))!important;max-width:calc(var(--app-viewport-width,100vw) - 16px)!important}
 .focus-mode-bar{
  top:calc(var(--app-viewport-offset-top,0px) + max(28px,env(safe-area-inset-top,0px) + 8px));
  gap:3px;padding:4px 5px;border-radius:10px;max-width:calc(var(--app-viewport-width,100vw) - 8px);
 }
 .focus-control,.focus-exit-btn{width:24px;height:24px;min-width:24px;border-radius:6px;font-size:12px}
 .focus-mode-pages,.focus-mode-history{gap:2px}
 .focus-mode-pages label{font-size:9px;gap:2px}
 .focus-page-jump input{width:31px;height:23px;font-size:10px}
}
@media(max-width:390px){
 .focus-mode-bar{gap:2px;padding:3px}
 .focus-control,.focus-exit-btn{width:22px;height:22px;min-width:22px;font-size:11px}
 .focus-page-jump input{width:27px}
 .reader .floating-tool-toggle{width:22px!important;height:22px!important;min-width:22px!important;min-height:22px!important}
}


/* Focus toolbar refinements: compact rectangle, drag grip, stronger outward arrows. */
.focus-mode-bar{
 width:max-content!important;max-width:calc(var(--app-viewport-width,100vw) - 12px)!important;
 overflow-x:auto;overflow-y:hidden;scrollbar-width:none;overscroll-behavior:contain;
 border-radius:9px!important;gap:4px!important;padding:4px 6px!important;
}
.focus-mode-bar::-webkit-scrollbar{display:none}
.focus-mode-actions{display:flex;align-items:center;gap:3px;flex:0 0 auto}
.focus-mode-history,.focus-mode-pages{flex:0 0 auto}
.focus-mode-pages .focus-control{
 font-size:17px;font-weight:900;color:#a4ddff;border-color:#376c89;
 box-shadow:inset 0 0 0 1px #1c3649;
}
.focus-mode-pages .focus-control:hover,.focus-mode-pages .focus-control:focus-visible{
 color:#fff;background:#145681;border-color:#8cdbff;
 box-shadow:0 0 0 3px #288cce66,0 0 12px #258bcb99;transform:scale(1.08);
}
.focus-mode-pages .focus-control:active{
 color:#fff;background:#178bd2;border-color:#b7eaff;box-shadow:0 0 0 3px #238fdb77;
}
.focus-flip-control{gap:3px!important;white-space:nowrap;font-size:13px!important;padding-inline:6px!important;width:auto!important;min-width:0!important}
.focus-flip-icon{font-size:17px;font-weight:900}
.focus-flip-label{font-size:10px;font-weight:700}
.focus-flip-control:hover,.focus-flip-control:focus-visible,.focus-flip-control:active{
 background:#1469a2!important;border-color:#94dcff!important;color:#fff!important;
 box-shadow:0 0 0 3px #258bcb66,0 0 12px #258bcb99!important;
}
.focus-exit-btn:hover,.focus-exit-btn:focus-visible,.focus-exit-btn:active{
 color:#fff!important;background:#b52828!important;border-color:#ffb0b0!important;
 box-shadow:0 0 0 3px #e34b4b66,0 0 12px #e34b4b99!important;transform:scale(1.08);
}
.focus-control:active,.focus-control:focus-visible{
 outline:none;
}
.focus-drag-handle{
 display:inline-flex;align-items:center;justify-content:center;flex:0 0 14px;
 width:14px;height:28px;padding:0;border:0;border-inline-start:1px solid var(--line);
 border-radius:0;background:transparent;color:#819688;font-size:15px;line-height:1;
 cursor:move;touch-action:none;user-select:none;-webkit-user-select:none;
}
.focus-drag-handle:hover,.focus-drag-handle:active{color:#fff;background:#2a4c39;box-shadow:0 0 0 2px #5fa77866}
.focus-mode-bar button{flex-shrink:0}
@media(max-width:760px){
 .focus-mode-bar{
  gap:2px!important;padding:3px!important;max-width:calc(var(--app-viewport-width,100vw) - 6px)!important;
  border-radius:7px!important;
 }
 .focus-control,.focus-exit-btn{width:23px!important;height:23px!important;min-width:23px!important;font-size:12px!important}
 .focus-mode-actions{gap:2px!important}
 .focus-mode-pages{gap:1px!important}
 .focus-mode-pages .focus-control{font-size:15px!important}
 .focus-mode-pages label span:first-child{display:none}
 .focus-page-jump input{width:27px!important;height:21px!important}
 .focus-mode-pages label{gap:2px!important;font-size:9px!important}
 .focus-flip-control{padding-inline:3px!important;gap:2px!important}
 .focus-flip-icon{font-size:14px!important}
 .focus-flip-label{font-size:9px!important}
 .focus-drag-handle{height:23px!important;width:12px!important;flex-basis:12px!important;font-size:13px!important}
}


/* Corner X collapses focus controls into a draggable mini-square. */
.focus-mode-bar{position:fixed}
.focus-collapse-btn{
 position:absolute;top:-5px;right:-5px;z-index:5;
 width:16px;height:16px;min-width:16px;display:flex;align-items:center;justify-content:center;
 padding:0;border:1px solid #b65c5c;border-radius:50%;background:#501c1c;color:#ffe9e9;
 box-shadow:0 1px 5px #0007;font-size:12px;line-height:1;cursor:pointer;
}
.focus-collapse-btn:hover,.focus-collapse-btn:focus-visible{
 color:#fff;background:#c32929;border-color:#ffc2c2;box-shadow:0 0 0 3px #e34b4b55;
}
.focus-mode-bar.is-compact{
 width:36px!important;height:36px!important;min-width:36px!important;max-width:36px!important;
 padding:0!important;overflow:visible!important;border-radius:9px!important;
 align-items:center!important;justify-content:center!important;gap:0!important;
}
.focus-mode-bar.is-compact> :not(#focusCollapseBtn){display:none!important}
.focus-mode-bar.is-compact .focus-collapse-btn{
 position:static;top:auto;right:auto;width:36px;height:36px;min-width:36px;
 border:1px solid #4b98d9;border-radius:9px;background:#133c60;color:#e4f5ff;
 box-shadow:0 3px 11px #0006;font-size:17px;font-weight:800;cursor:grab;touch-action:none;
}
.focus-mode-bar.is-compact .focus-collapse-btn:hover,
.focus-mode-bar.is-compact .focus-collapse-btn:focus-visible,
.focus-mode-bar.is-compact .focus-collapse-btn:active{
 background:#17669e;border-color:#a7e0ff;box-shadow:0 0 0 3px #2b9de766;
}
@media(max-width:760px){
 .focus-collapse-btn{top:-4px;right:-4px;width:14px;height:14px;min-width:14px;font-size:11px}
 .focus-mode-bar.is-compact{width:30px!important;height:30px!important;min-width:30px!important;max-width:30px!important}
 .focus-mode-bar.is-compact .focus-collapse-btn{width:30px;height:30px;min-width:30px;font-size:15px}
}


/* Final sizing pass: slightly larger focus toolbar and corner X; icon-only portrait/landscape toggle. */
.focus-mode-bar:not(.is-compact){padding:6px 9px!important;gap:5px!important}
.focus-collapse-btn{
 width:19px!important;height:19px!important;min-width:19px!important;
 top:-6px!important;right:-6px!important;font-size:14px!important;font-weight:800!important;
}
.focus-flip-control{
 width:48px!important;min-width:48px!important;height:30px!important;padding:3px!important;
 display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:3px!important;
}
.focus-flip-icon{
 display:inline-flex;align-items:center;justify-content:center;
 width:19px;height:23px;border-radius:5px;color:#9cc9e6;font-size:16px;font-weight:900;line-height:1;
}
.focus-flip-icon.is-selected{
 color:#fff;background:#17649b;box-shadow:0 0 0 1px #6cc5ff,0 0 7px #238bcb66;
}
.focus-flip-control.active{
 background:#122a3a!important;border-color:#65bfff!important;color:#fff!important;
 box-shadow:0 0 0 1px #2a75a7!important;
}
@media(max-width:760px){
 .focus-mode-bar:not(.is-compact){padding:4px 6px!important;gap:3px!important}
 .focus-collapse-btn{
  width:17px!important;height:17px!important;min-width:17px!important;
  top:-5px!important;right:-5px!important;font-size:13px!important;
 }
 .focus-flip-control{width:39px!important;min-width:39px!important;height:23px!important;padding:2px!important;gap:2px!important}
 .focus-flip-icon{width:16px;height:18px;font-size:14px!important;border-radius:4px}
}
@media(max-width:390px){
 .focus-flip-control{width:36px!important;min-width:36px!important}
 .focus-flip-icon{width:15px;font-size:13px!important}
}
