:root{--chrome:#f1f1f1;--divider:#adbcc8;--selection:#dfeaf9;--rule:#d9dfe4;font:13px/1.45 "Segoe UI","Malgun Gothic",system-ui,sans-serif;color:#151921;background:white}
body{background:white;color:#151921}
.top{height:24px;background:#f6f6f6;border-bottom:1px solid #e3e3e3}
#file-menu{position:relative;width:max-content;z-index:4}#file-menu summary{list-style:none;cursor:pointer;padding:2px 13px}#file-menu summary::-webkit-details-marker{display:none}
#file-menu .file-actions{position:absolute;top:23px;left:2px;background:#fff;border:1px solid #aeb9c4;padding:4px;min-width:124px;box-shadow:0 3px 8px #0002;display:grid}
main.shell{width:100%;max-width:none;height:calc(100dvh - 24px);display:flex;flex-direction:column;overflow:hidden}
.tabs{margin:0;padding:0 1px;gap:0;border-bottom:1px solid #cad1d6;background:#ededed;flex:none}
button,input,select,textarea{border-radius:0}
button{font-size:inherit;min-height:24px;padding:2px 8px;border:1px solid #c2c7cd;color:#19232b;background:#f7f7f7}
button:hover{background:#e6eef8}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:1px solid #3076c4;outline-offset:1px}
.tabs button{border:1px solid #d8d8d8;border-bottom:0;background:#f3f3f3;padding:1px 6px;min-height:22px}
.tabs button[aria-selected=true]{background:white;color:#151921;border-color:#d6d6d6}
#library,#portfolio{flex:1;min-height:0}.status{padding:3px 10px;min-height:23px;border-top:1px solid #e8ebec;background:#f1f5f6;font-size:.9rem}
.catalog-layout,.portfolio-layout{height:100%;min-height:0;grid-template-columns:220px minmax(0,1fr);gap:0}
.catalog-tree,.calendar-side{border:0;border-right:8px solid var(--divider);border-radius:0;margin:0;padding:4px 8px;align-self:stretch;overflow:auto;background:#fff}
.catalog-tree>div{position:relative;margin-left:7px}.catalog-tree>div:has([data-sub]){border-left:1px dotted #a6adb2}
.catalog-tree button,.catalog-tree button[data-sub]{width:auto;display:block;border:0;background:none;min-height:18px;line-height:17px;padding:0 4px}
.catalog-tree button[data-sub]{margin-left:13px}.catalog-tree button[data-sub]::before{content:"";position:absolute;left:0;margin-top:9px;width:12px;border-top:1px dotted #a6adb2}
.catalog-tree button[data-sub]+button{margin-bottom:2px}.catalog-tree button[aria-current=true]{background:#2968c7;color:white;font-weight:400}
.catalog-body,.portfolio-body{min-width:0;min-height:0;display:flex;flex-direction:column}
.catalog-body{padding:12px 9px 0;background:#eaf2f4}
.filters{padding:5px 5px 9px;display:flex;gap:12px;align-items:center;border:0;border-radius:0;background:transparent}
.filters form{display:flex;align-items:center;gap:9px;margin:0;min-width:0}.filters form label{display:block;white-space:nowrap}
.search-row{flex:1}.filters input{height:24px;min-height:24px;border:1px solid #92999d;padding:1px 4px}
#browse-controls{background:#fff;padding:10px 15px 5px}.browse-title{display:flex;align-items:center;gap:12px;font-weight:700}.browse-picks{display:flex;flex-wrap:wrap;gap:4px;margin-top:6px}.browse-picks button[aria-pressed=true]{background:#385aad;color:#fff;border-color:#385aad}
#books{display:block;overflow:auto;min-height:0;flex:1;background:#fff;padding:10px 17px 35px}
.group{border:0;border-radius:0;padding:0;margin:0 0 25px}.group h2{color:#a04b9c;font-size:19px;margin:0 0 5px}
.shelf{display:flex;gap:14px;align-items:end;overflow:auto;border-bottom:5px solid #bda47f;padding:0 8px;margin:0 0 7px}
.shelf button{border:0;padding:0;background:none;min-width:70px;max-width:82px;height:101px;flex:0 0 80px}.shelf button[aria-pressed=true]{outline:2px solid #336ac8;outline-offset:-2px}
.shelf .cover{height:100px;width:100%;object-fit:contain;border-radius:0;background:#f6f6f6;display:block}
.book{display:grid;grid-template-columns:54px minmax(100px,1fr) 60px minmax(85px,.44fr) minmax(70px,.36fr);gap:7px;min-height:30px;padding:3px 4px;border-top:0;border-bottom:1px solid var(--rule);align-items:center}
.book:hover,.book.target{background:var(--selection);border-radius:0}.book-title{font-weight:400}.book .meta{font-size:inherit;color:inherit}.book .row-actions{justify-self:start;display:flex;gap:2px;align-items:center;flex-wrap:nowrap;grid-column:auto}
.book .flag{padding:1px 2px;width:19px;height:19px;min-height:19px;border:0;background:#f1f3f6;color:#8a939d}.book .flag[aria-pressed=true]{color:#be4383;background:#f8dfed}.book .flag svg{width:14px;height:14px;display:block}
.book .read-count{width:30px;min-width:0;min-height:22px;padding:1px 2px;border:1px solid transparent;background:transparent;color:#c72238;font-size:11px;font-weight:600;text-align:center}
.book .read-count:hover,.book .read-count:focus{border-color:#bdc8ce;background:white}
.cover-menu{position:fixed;z-index:30;display:grid;min-width:210px;padding:3px;background:#f7f7f7;border:1px solid #969696;box-shadow:2px 3px 8px #0003}
.cover-menu button{border:0;background:transparent;text-align:left;padding:5px 12px;min-height:24px;white-space:nowrap}
.cover-menu button:hover:not(:disabled),.cover-menu button:focus-visible{background:#dce9fa;outline:none}
.book{grid-template-columns:54px minmax(100px,1fr) 76px minmax(85px,.44fr) minmax(70px,.36fr)}
.empty{border:0;border-radius:0;font-size:.95rem}
.portfolio-layout{grid-template-columns:263px minmax(0,1fr)}.calendar-side{padding:19px 16px}.portfolio-body{padding:12px 11px 0}
#calendar{border:1px solid #9da2a5;padding:5px 3px 3px}.calendar-nav{display:flex;align-items:center;justify-content:space-between;margin-bottom:4px}.calendar-nav button{background:white;border:0;padding:0 5px}
.calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center;line-height:1.35}.calendar-grid button{min-height:16px;padding:0;background:white;border:1px solid transparent}.calendar-grid button[aria-selected=true]{outline:1px dashed #173468;background:#cfe1ff}.calendar-grid button[data-today]{border-color:#246eff}.calendar-grid button[data-other]{color:#697077}.calendar-grid button[data-record]{font-weight:800}.calendar-footer{text-align:center;padding-top:3px}
.calendar-side .time-summary{margin-top:16px;gap:0}.calendar-side .time-summary strong{color:#9e2e37;font-weight:400;padding-bottom:5px}
.calendar-side .time-summary span{display:flex;justify-content:space-between;border:0;gap:4px;padding:2px 0}.calendar-side .time-summary b{font-weight:400;color:#ab3338}.calendar-side .time-summary b[data-empty]{color:#697077}
.portfolio-body .date-bar{border-radius:0;padding:2px 7px;background:#a62d37}.date-bar h2{font-size:inherit}.date-bar button{min-height:24px;padding:2px 10px}.date-bar .file-actions{gap:4px}
#notes{overflow:auto;flex:1;min-height:0;display:block;padding:5px 13px 23px 0}
.notecard{padding:0 0 5px;border:0;border-bottom:1px solid var(--rule);border-radius:0;margin-bottom:1px}
.note-head{padding:3px 3px 3px 0;margin:0;background:#f2f2f0;display:flex;gap:4px;align-items:center;flex-wrap:wrap}
.note-head h2{margin:0;background:#e8eae8;padding:3px 8px;min-width:120px;font-size:inherit;font-weight:400}
.note-head .row-actions{gap:4px}.note-head .note-time{margin-left:auto}.note-head input{width:32px;padding:1px 3px;min-height:22px;text-align:right;color:#ad2d3a}.note-head button{min-height:21px;padding:0 6px}
.note-head select{width:53px;height:21px;min-height:21px;padding:0 2px;font-size:inherit;border-color:#c2c7cd}
.note-time input[type=number]{appearance:textfield}
.note-time input::-webkit-inner-spin-button,.note-time input::-webkit-outer-spin-button{appearance:none;margin:0}
.notecard .note-space,.notecard .memo{margin:0;padding:5px 8px;width:100%;background:white;border:0;min-height:3.4em;text-align:left}
.notecard .memo{white-space:pre-wrap;outline-offset:-1px}.notecard .note-item{padding:2px 10px;margin:0;border:0}
.cover-strip{gap:7px;margin:5px 10px}.cover-strip .cover{width:69px;height:93px;border-radius:0}
dialog{border-radius:0}.asset-menu{position:fixed;z-index:10;box-shadow:0 2px 6px #0002;background:white;min-height:25px}
#welcome-dialog{width:min(850px,calc(100% - 22px));max-width:none;padding:0;border:1px solid #7c7c7c;box-shadow:0 2px 8px #0004}
#welcome-dialog::backdrop{background:#fff7}
.welcome-caption{display:flex;justify-content:space-between;align-items:center;padding:1px 5px;font-size:13px}.welcome-caption button{border:0;background:white;min-height:22px;padding:0 3px}
.welcome-content{display:grid;grid-template-columns:155px 1fr;align-items:center;gap:30px;padding:26px 30px 10px}
.welcome-content img{width:145px;height:auto}.welcome-content h2{font-size:22px;margin:0 0 10px}
.welcome-content ol{padding-left:18px;margin:0;font-size:15px;color:#334247}.welcome-content li{margin:0 0 15px}
.welcome-bottom{display:flex;justify-content:space-between;align-items:center;padding:0 27px 20px 30px;font-size:15px;color:#24685f}
.welcome-bottom button{background:#28665f;color:white;border:0;min-width:118px;min-height:44px;font-size:15px;font-weight:bold}
@media(max-width:700px){main.shell{height:auto;min-height:calc(100dvh - 24px);overflow:visible}.catalog-layout,.portfolio-layout{display:block}
.catalog-tree,.calendar-side{border:0;border-bottom:3px solid var(--divider);padding:5px;overflow:auto}.catalog-tree{display:flex;flex-wrap:nowrap;gap:4px}.catalog-tree>div{display:grid;flex:none;margin:0;border:0!important}.catalog-tree button[data-sub]{margin-left:0}.catalog-tree button[data-sub]::before{display:none}
.calendar-side{display:grid;grid-template-columns:minmax(148px,.9fr) minmax(140px,1fr);gap:8px}.calendar-side .time-summary{display:grid;margin-top:0;font-size:11px}
.catalog-body,.portfolio-body{padding:6px 4px 0}.filters{gap:4px;flex-wrap:wrap}.filters form{order:3;width:100%;min-width:100%}
#books,#notes{overflow:visible;padding:6px 3px}.book{grid-template-columns:34px minmax(80px,1.25fr) 76px minmax(70px,.7fr)}.book .related{display:none}.book .row-actions{grid-column:auto}
.shelf{gap:8px}.group{margin-bottom:14px}.welcome-content{grid-template-columns:1fr;gap:8px;padding:10px 14px}.welcome-content img{width:110px}
.welcome-content h2{font-size:18px}.welcome-content ol,.welcome-bottom{font-size:13px}.welcome-content li{margin-bottom:8px}.welcome-bottom{padding:3px 14px 13px}.welcome-bottom button{min-width:74px}}
#study{flex:1;min-height:0}
.study-layout{grid-template-columns:minmax(0,min(var(--study-width,220px),65%)) 8px minmax(0,1fr)}
#study-sidebar{border-right:0}
#study-divider{background:var(--divider);cursor:col-resize;touch-action:none}
#study-divider:hover,#study-divider:focus-visible{background:#738fa8;outline:none}
#study-delete{margin:6px 3px;color:#a62d37}
.study-file-row{display:flex;align-items:center;gap:2px}
.study-file-row input{min-height:0;margin:1px 3px;flex:none}
.study-file-row button{flex:1;min-width:0}
#study-add{display:flex;gap:4px;margin:6px 3px 9px}
#study-add input{width:100%;min-width:0;min-height:24px;padding:2px 5px}
#study-add button{flex:none}
#study-tree button{text-align:left}
.study-tree-root,.study-tree-files button{display:block;width:100%}
.study-chapter-row{display:flex;align-items:center}
.study-chapter-row .study-chapter-name{flex:1;min-width:0;padding-left:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.study-chapter-row .study-tree-action{flex:none;width:23px;padding:0;text-align:center}
.study-tree-files{margin:1px 0 3px 17px;border-left:1px dotted #b5c0cc;padding-left:4px}
.study-tree-files button{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.study-tree-files small{padding:0 5px;color:#59656d}
.study-toolbar #study-search{flex:0 1 235px;min-width:0;margin-left:auto}
.study-toolbar .search-row{gap:0}
.study-toolbar .search-row input{min-height:25px;padding:1px 5px;border-color:#ccc}
.study-toolbar .search-row button{display:grid;place-items:center;width:27px;min-height:25px;padding:0;background:#d5d5d5;color:#555;border-color:#ccc;border-left:0}
#study-results{background:white;overflow:auto;min-height:0;flex:1;padding:12px 15px}
#study-results h2{font-size:15px;margin-bottom:9px}
#study-matches{--result-row:26px;flex:none;max-height:calc(5 * var(--result-row) + 2px);overflow:auto;overscroll-behavior:contain;background:white;border:1px solid var(--rule)}
#study-matches button{display:block;width:100%;height:var(--result-row);min-height:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:left;border:0;border-bottom:1px solid #edf0f3;background:white}
#study-matches button:hover,#study-matches button[aria-current=true]{background:var(--selection)}
.study-no-matches{padding:4px 8px}
.study-page-content+.study-page-content{margin-top:10px}
.study-text{white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;padding:6px 0}
.study-text mark{background:#fff0a2}
.study-gallery{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;margin:7px 0}
.study-gallery figure{margin:0;max-width:180px}
.study-gallery button{display:block;padding:2px;background:white}
.study-gallery img{display:block;max-width:174px;max-height:128px;object-fit:contain}
.study-gallery figcaption{overflow-wrap:anywhere;margin-top:3px}
@media(max-width:700px){#study .catalog-tree{display:block}#study-divider{display:none}#study-tree{max-height:190px;overflow:auto}
.study-toolbar #study-search{width:auto;min-width:120px;flex:1}.study-gallery img{max-width:130px}}
