:root{--blue:#2563eb;--line:#dce2e9;--text:#243142;--muted:#84909d;--surface:#fff;--font:19px;--leading:1.85}*{box-sizing:border-box}html{scroll-behavior:smooth}body{margin:0;background:#fff;color:var(--text);font:15px -apple-system,BlinkMacSystemFont,"Malgun Gothic","Noto Sans KR",Arial,sans-serif}button,input,textarea,select{font:inherit}button{cursor:pointer}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #8cb4f9;outline-offset:2px}.header{height:60px;display:flex;align-items:center;gap:5px;padding:0 max(15px,calc((100vw - 1300px)/2 + 18px));border-bottom:1px solid var(--line);position:sticky;top:0;background:#fffc;backdrop-filter:blur(14px);z-index:12}.chapter-title{border:1px solid var(--line);border-radius:9px;background:#fff;font-size:17px;font-weight:700;padding:8px 12px;white-space:nowrap}.select-indicator{font-size:13px;color:#6b7c8d;margin-left:5px}.icon{width:36px;height:38px;flex:none;border:0;border-radius:8px;background:transparent;color:#546374;font-size:26px}.icon:hover,.icon.active,.plain:hover{background:#f0f5fc}.icon.text-icon{font-size:17px;font-weight:700}.spacer{flex:1}.body{display:flex;min-height:calc(100vh - 60px);max-width:1300px;margin:auto}.reading{min-width:0;flex:1}.reading-inner{max-width:850px;margin:auto;padding:24px 43px 75px}.edition-bar{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:21px}.edition-switch{display:flex;flex-wrap:wrap;gap:5px}.edition-switch button{background:white;border:1px solid var(--line);border-radius:7px;padding:8px 10px;font-size:12px;color:#586777}.edition-switch button.active{background:#2563eb;border-color:#2563eb;color:white}.sync,.muted{font-size:11px;color:#8b98a5}.section-title{font-size:14px;color:#798797;font-weight:650;margin:27px 0 7px;padding-left:28px}.verse{position:relative;padding:10px 4px 15px;border-radius:5px;scroll-margin-top:84px;cursor:pointer}.verse:hover{background:#fbfcfd}.verse.selected{outline:1px solid #bcd3fb;background:#fcfdff}.vline{display:grid;grid-template-columns:26px minmax(0,1fr);gap:2px;align-items:start}.verse-num{font-family:system-ui,sans-serif;font-size:12px;line-height:2.3;color:#91a0ad;font-weight:700}.gae{font-family:"Noto Serif KR","Nanum Myeongjo","Batang",serif;font-size:var(--font);line-height:var(--leading);letter-spacing:-.015em;overflow-wrap:anywhere}.parallel{font-size:calc(var(--font) - 2px);line-height:var(--leading);margin:5px 0 0 28px;color:#647386;overflow-wrap:anywhere}.parallel.niv{font-family:Georgia,serif}.missing{color:#adb7c1;font-size:calc(var(--font) - 3px)}.highlight-yellow{background:#fff09b}.highlight-green{background:#c3eac6}.highlight-pink{background:#ffd0e3}.highlight-blue{background:#c8e8fb}.tools{margin:10px 0 4px 28px;display:flex;flex-wrap:wrap;gap:7px;align-items:center}.tools button,.smallbutton{background:white;border:1px solid var(--line);border-radius:7px;padding:7px 10px;font-size:12px}.tools .swatch{width:27px;height:27px;border-radius:7px;padding:0;border:1px solid #ccd6df}.complete{margin:32px 0;border:1px solid #2563eb;background:#2563eb;color:white;border-radius:9px;padding:15px 20px;width:100%;font-weight:700}.complete.isdone{background:#f5f9ff;color:#2563eb}.note-pane{width:40%;max-width:480px;border-left:1px solid var(--line);display:none;flex-direction:column;position:sticky;top:60px;height:calc(100vh - 60px);background:white}.note-pane.open{display:flex}.pane-title{height:56px;display:flex;align-items:center;justify-content:space-between;padding:0 20px;border-bottom:1px solid var(--line)}.plain{background:transparent;border:0;color:#748297;border-radius:7px;padding:7px 10px}.pane-body{display:flex;flex-direction:column;gap:12px;padding:17px;height:100%;min-height:0}.note-row{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.pane-body input,.pane-body textarea{border:1px solid var(--line);border-radius:8px;width:100%;padding:13px;color:var(--text)}.pane-body textarea{resize:none;flex:1;min-height:200px;line-height:1.75}.note-meta{color:#97a1ae;font-size:11px}.overlay{position:fixed;inset:0;background:#101b2b77;z-index:30;display:grid;place-items:center;padding:18px}.overlay.hidden{display:none}.modal{width:min(660px,100%);max-height:min(80vh,800px);background:#fff;border-radius:13px;box-shadow:0 18px 55px #0002;display:flex;flex-direction:column;overflow:hidden}.modal-header{height:60px;flex:none;display:flex;align-items:center;justify-content:space-between;padding:0 22px;border-bottom:1px solid var(--line);font-size:17px}.modal-body{padding:20px;overflow:auto}.grid4,.grid6{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}.grid6{grid-template-columns:repeat(6,minmax(0,1fr))}.grid4 button,.grid6 button{border:1px solid #ccd6e2;background:white;border-radius:7px;padding:11px 2px;min-height:43px;color:#34455b;font-size:13px;overflow-wrap:anywhere}.grid4 button:hover,.grid6 button:hover{border-color:#2563eb}.grid4 button.active,.grid6 button.active{background:#2563eb;color:#fff;border-color:#2563eb}.tabs{display:flex;gap:8px;margin-bottom:16px}.tabs button{padding:10px 16px;border:1px solid var(--line);background:#fff;border-radius:8px}.tabs button.active{background:#2563eb;color:white;border-color:#2563eb}.back{margin-bottom:14px;border:0;background:transparent;color:#2563eb;padding:3px 0}.search-input{width:100%;border:1px solid #ccd6e2;border-radius:8px;padding:12px 13px;margin:8px 0}.result{width:100%;display:block;text-align:left;border:0;border-bottom:1px solid #edf0f4;background:#fff;padding:13px 4px;color:#344255;line-height:1.6}.result:hover{background:#f5f8fc}.result small{color:#7b8998}.hint{font-size:12px;color:#8090a0;line-height:1.65}.space{height:12px}.form-row{display:flex;flex-wrap:wrap;gap:12px;align-items:center;margin:12px 0}.form-row label{min-width:90px}.form-row input,.form-row select{padding:8px;border:1px solid var(--line);border-radius:7px}.progress{background:#e9eff6;border-radius:999px;height:9px;overflow:hidden;margin:12px 0}.progress div{height:100%;background:#2563eb}.book-row{width:100%;display:flex;justify-content:space-between;padding:12px;border:0;border-bottom:1px solid #eef1f4;background:white;text-align:left}.book-row:hover{background:#f8fafc}.book-panel{padding:11px 4px 18px}.toast{position:fixed;bottom:25px;left:50%;transform:translateX(-50%);background:#20354b;color:white;border-radius:8px;padding:12px 18px;z-index:100;display:none;font-size:13px}.toast.show{display:block}@media(max-width:800px){.header{padding:0 8px;gap:0}.icon{width:30px;font-size:22px}.chapter-title{font-size:14px;padding:7px}.reading-inner{padding:15px 18px 60px}.note-pane.open{position:fixed;z-index:24;inset:60px 0 0 0;max-width:none;width:100%;height:auto;box-shadow:0 0 0 99vmax #0005}.modal-body{padding:13px}.grid4{gap:5px}.grid4 button{font-size:11px;min-height:44px;padding:8px 0}.grid6{gap:5px}.grid6 button{min-height:40px;padding:6px}.edition-bar{margin-bottom:15px}.sync{display:none}}

/* v0.2 dark-default reading experience; background and text are user-adjustable. */
:root{--app-bg:#101010;--app-text:#f4f4f4;--line:#414141;--text:#ededed;--muted:#a7a7a7;--surface:#181818}
html,body{background:var(--app-bg);color:var(--app-text)}
body{background:var(--app-bg);color:var(--app-text)}
.header{background:#171717ed;border-bottom-color:#383838}
.chapter-title,.edition-switch button,.edition-menu,.tools button:not(.swatch),.smallbutton,.pane-body input,.pane-body textarea,.modal,.grid4 button,.grid6 button,.tabs button,.result,.book-row,.form-row input:not([type=color]),.form-row select,.search-input{background:#1e1e1e;color:#eeeeee;border-color:#444}
.chapter-title,.icon,.plain,.select-indicator{color:#e8e8e8}
.icon:hover,.icon.active,.plain:hover,.result:hover,.book-row:hover{background:#303030}
.reading,.reading-inner{background:var(--app-bg);color:var(--app-text)}
.gae{color:var(--app-text)}
.parallel{color:var(--app-text);opacity:.76}
.section-title,.verse-num,.sync,.muted,.hint,.note-meta{color:#acacac}
.verse:hover{background:#ffffff08}.verse.selected{outline:1px solid #5277b3;background:#ffffff0b}
.verse .missing{color:#949494}
.highlight-yellow{background:#fff09b;color:#202020}.highlight-green{background:#c3eac6;color:#202020}.highlight-pink{background:#ffd0e3;color:#202020}.highlight-blue{background:#c8e8fb;color:#202020}
.note-pane{background:#171717;border-left-color:#444}.pane-title{border-bottom-color:#444}.pane-body textarea,.pane-body input{background:#1e1e1e;color:#eee}
.modal{background:#191919;color:#f1f1f1;box-shadow:0 18px 65px #0008}.modal-header{border-bottom-color:#444}
.grid4 button.active,.grid6 button.active,.tabs button.active,.edition-menu button.active{background:#2563eb;border-color:#2563eb;color:#fff}
.edition-switch{position:relative}
.edition-switch .edition-trigger{font-size:13px;min-width:96px;padding:9px 14px;border:1px solid #555;border-radius:9px;background:#232323;color:#eee}
.edition-switch .edition-trigger span{margin-left:7px;color:#bbb}
.edition-menu{position:absolute;left:0;top:calc(100% + 6px);min-width:196px;box-shadow:0 9px 28px #0009;border:1px solid #484848;border-radius:9px;z-index:20;padding:5px;display:flex;flex-direction:column;gap:3px}
.edition-menu.hidden{display:none}
.edition-menu button{width:100%;border:0;border-radius:6px;text-align:left;padding:10px 12px;background:transparent;color:#eee;white-space:nowrap;font-size:13px}
.edition-menu button:hover{background:#303d55}.edition-menu button.active{background:#2563eb}
.note-list-row{display:flex;gap:9px;align-items:center;border-bottom:1px solid #3d3d3d}.note-list-row .result{flex:1;min-width:0;border:0}
.danger{color:#ff9393!important;border-color:#8d4141!important}.danger:hover{background:#482929!important}
.result small,.result small,.result small,.hint{color:#b4bac4}
.form-row input[type=color]{height:36px;width:62px;border:1px solid #777;background:#202020;border-radius:7px;cursor:pointer;padding:2px}
.complete.isdone{background:#202a3b;color:#a8c7ff}.progress{background:#3c3c3c}
@media(max-width:800px){.edition-switch .edition-trigger{min-width:90px}}

/* v0.3: accessible, one-tap color tiles */
.color-tile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:12px 0 18px}
.color-tile{display:flex;align-items:center;flex-direction:column;gap:7px;min-width:0;background:#222;color:#ddd;border:1px solid #555;border-radius:10px;padding:10px 4px;cursor:pointer}
.color-tile:hover{border-color:#86aaff}.color-tile.active{outline:2px solid #5593ff;outline-offset:1px;border-color:#5593ff}
.color-square{display:flex;align-items:center;justify-content:center;width:42px;height:42px;border-radius:9px;border:1px solid #757575;font-size:22px;font-weight:800}
.color-label{font-size:11px;line-height:1.3;text-align:center;word-break:keep-all}
.theme-pair-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin:12px 0 18px}
.theme-pair{border:2px solid #777;border-radius:10px;min-height:70px;padding:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;cursor:pointer;font-size:22px}
.theme-pair small{font-size:11px}.theme-pair.active{outline:2px solid #5593ff;outline-offset:1px;border-color:#5593ff}
@media(max-width:440px){.color-tile-grid{gap:5px}.color-tile{padding:8px 1px}.color-square{width:34px;height:34px}.color-label{font-size:10px}.theme-pair-grid{gap:6px}.theme-pair{min-height:65px;padding:5px}.theme-pair small{font-size:10px}}

/* v0.4 split chapter navigation, range selection and layered highlights */
.chapter-nav{position:relative;display:flex;align-items:stretch;min-width:0}
.chapter-nav .chapter-title{border-radius:9px 0 0 9px;border-right:0;padding-right:9px}
.chapter-arrow{border:1px solid #555;border-radius:0 9px 9px 0;background:#232323;color:#eeeeee;min-width:34px;font-size:17px;cursor:pointer}
.chapter-arrow:hover{background:#303d55}
.chapter-popup{position:absolute;top:calc(100% + 9px);left:0;background:#1d1d1d;border:1px solid #555;border-radius:12px;padding:15px;width:min(400px,92vw);max-height:75vh;overflow:auto;z-index:25;box-shadow:0 16px 50px #0009;color:#eee}
.chapter-popup.hidden{display:none}.chapter-popup-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.verse.selected{outline:1px solid #3974ca;background:#1d2734}
.multi-tools{display:block;background:#222934;border:1px solid #506483;border-radius:12px;padding:9px 11px;margin-top:12px;color:#eee;cursor:default}
.selection-head{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:2px 0 9px;border-bottom:1px solid #425166;font-size:12px}
.selection-head strong{font-size:13px}.selection-head span{color:#b9c8e0}.selection-head button{margin-left:auto;padding:3px 8px;border:0;background:transparent;color:#ddd}
.tools-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding-top:10px}
.tools-actions .range-mode.active{background:#2563eb;color:white;border-color:#2563eb}
.tools-actions .swatch{flex:none}.tools button:focus-visible,.chapter-arrow:focus-visible{outline:2px solid #78aaff}
@media(max-width:800px){.chapter-nav .chapter-title{padding:7px 5px}.chapter-arrow{min-width:26px}.chapter-popup{left:0;max-width:calc(100vw - 12px)}.multi-tools{margin-left:0}.selection-head{gap:6px}}

/* v0.5 responsive mobile, tablet and touch usability */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
button{-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.header{padding-top:env(safe-area-inset-top,0px);height:calc(60px + env(safe-area-inset-top,0px));top:0}
.body{min-height:calc(100dvh - 60px)}
.help-touch{border:1px solid #505050;background:transparent;color:#bfc8d5;border-radius:8px;padding:8px 10px;font-size:12px;display:none}
.note-pane{top:calc(60px + env(safe-area-inset-top,0px));height:calc(100dvh - 60px - env(safe-area-inset-top,0px))}
.modal{max-height:calc(100dvh - 30px)}
.modal-body{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.chapter-popup{overscroll-behavior:contain}
@media(min-width:801px) and (max-width:1120px){.reading-inner{padding-left:24px;padding-right:24px}.note-pane{width:43%}}
@media(max-width:800px){
 .header{gap:2px;padding-left:max(5px,env(safe-area-inset-left,0px));padding-right:max(5px,env(safe-area-inset-right,0px))}
 .icon{flex:1 1 34px;min-width:28px;max-width:42px;height:44px;font-size:23px}
 .chapter-nav{flex:0 0 auto;max-width:37vw}
 .chapter-nav .chapter-title{overflow:hidden;text-overflow:ellipsis;max-width:calc(37vw - 31px);font-size:13px}
 .chapter-arrow{min-width:30px;font-size:19px}
 .spacer{flex:1 1 2px;min-width:0}
 .reading-inner{padding:16px max(14px,env(safe-area-inset-right,0px)) 72px max(14px,env(safe-area-inset-left,0px))}
 .reading-inner .edition-bar{margin-bottom:12px}
 .help-touch{display:block}
 .verse{padding:12px 2px 16px}
 .vline{grid-template-columns:24px minmax(0,1fr)}
 .parallel{margin-left:26px}
 .section-title{padding-left:26px}
 .selection-head button{min-width:36px;min-height:34px}
 .tools-actions{gap:9px}
 .tools-actions button:not(.swatch){min-height:43px;padding:9px 12px}
 .tools-actions .swatch{width:36px;height:36px}
 .note-pane.open{inset:calc(60px + env(safe-area-inset-top,0px)) 0 0;top:auto;width:100%;max-width:none;height:auto;box-shadow:0 0 0 100vmax #0009}
 .pane-body{padding:13px;padding-bottom:max(16px,env(safe-area-inset-bottom,0px))}
 .pane-body textarea{min-height:30dvh}
 .modal{max-height:calc(100dvh - max(35px,env(safe-area-inset-top,0px)) - 20px)}
 .grid4 button,.grid6 button{min-height:46px}
 .complete{min-height:54px}
}
@media(max-width:390px){
 .header{gap:0}.icon{min-width:25px;max-width:34px;font-size:20px}
 .icon.text-icon{font-size:14px}
 .chapter-nav{max-width:36vw}.chapter-nav .chapter-title{max-width:calc(36vw - 27px);font-size:12px;padding:7px 3px}
 .chapter-arrow{min-width:27px}.reading-inner{padding-left:11px;padding-right:11px}
 .modal-body{padding:11px}.grid4{gap:4px}.grid4 button{font-size:10px;letter-spacing:-.04em}
}
@media(orientation:landscape) and (max-height:500px){.modal{max-height:95dvh}.note-pane.open{inset:0;z-index:40}}

/* v0.6: Larger, accessible header actions, clean selection UI and startup splash. */
.header .icon{width:47px;min-width:44px;height:47px;font-size:33px;flex:0 0 47px;line-height:1}
.header .icon.text-icon{font-size:22px}
.header #notes-btn{font-size:30px}
.verse.selected,.verse.selected:hover{outline:none!important;box-shadow:none!important;background:rgba(76,124,184,.20)!important;border-radius:8px}
.selection-toolbar[hidden]{display:none!important}
.selection-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:6px 0 16px;min-height:48px}
.selection-actions{display:flex;flex-wrap:wrap;align-items:center;gap:9px;min-width:0}
.selection-actions button{color:#e9ebf0;background:#262626;border:1px solid #484848;border-radius:8px;min-height:40px;padding:8px 11px;font-size:13px}
.selection-actions .swatch{height:37px;width:37px;padding:0;border-radius:50%;border:1px solid #bbc4c9;flex:none}
.selection-clear{align-self:flex-start;width:42px;height:42px;flex:none;background:#2b2b2b;border:0;border-radius:50%;color:#e6e6e6;font-size:21px}
.selection-clear:hover{background:#434343}
.splash-screen{position:fixed;inset:0;z-index:9999;background:#101010;display:flex;justify-content:center;align-items:center;color:#f8f6f0;opacity:1;transition:opacity .42s ease;pointer-events:all}
.splash-screen.fade-out{opacity:0;pointer-events:none}
.splash-brand{display:flex;flex-direction:column;align-items:center;gap:10px;transform:translateY(-8px)}
.splash-brand img{border-radius:20px;box-shadow:0 5px 28px #0005}
.splash-brand strong{font-size:27px;font-weight:650;letter-spacing:-.03em;margin-top:4px}
.splash-brand span{font-size:14px;color:#d5c7a8;letter-spacing:.05em}
@media(max-width:800px){
 .header .icon{font-size:29px;min-width:42px;max-width:none;width:43px;height:47px;flex:0 0 43px}
 .header .icon.text-icon{font-size:21px}
 .header{gap:2px}
 .selection-actions button{min-height:42px}
 .selection-actions .swatch{width:37px;height:37px}
}
@media(max-width:600px){
 .header{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:44px 48px;height:auto;min-height:92px;gap:0 2px;padding:0 max(7px,env(safe-area-inset-left,0px)) 3px max(7px,env(safe-area-inset-right,0px))}
 .header #prev{grid-column:1;grid-row:1}
 .header .chapter-nav{grid-column:2 / 5;grid-row:1;justify-self:center;max-width:none;min-width:0}
 .header .chapter-nav .chapter-title{font-size:16px;max-width:calc(60vw - 42px);padding:8px 9px}
 .header .chapter-arrow{min-width:36px}
 .header #next{grid-column:5;grid-row:1}
 .header .spacer{display:none}
 .header #search-btn{grid-column:1;grid-row:2}
 .header #settings-btn{grid-column:2;grid-row:2}
 .header #tracker-btn{grid-column:3;grid-row:2}
 .header #saved-btn{grid-column:4;grid-row:2}
 .header #notes-btn{grid-column:5;grid-row:2}
 .header .icon{justify-self:center;width:48px;max-width:100%;height:44px;font-size:30px;flex:none;min-width:0}
 .header .icon.text-icon{font-size:21px}
 .selection-toolbar{gap:6px;margin:4px 0 12px}
 .selection-actions{gap:6px}
 .selection-actions .swatch{width:33px;height:33px}
 .selection-actions button:not(.swatch){min-height:38px;padding:7px 9px;font-size:12px}
 .selection-clear{height:38px;width:38px}
 .verse{scroll-margin-top:118px}
 .note-pane.open{inset:92px 0 0 0!important}
}
@media(max-width:350px){.selection-actions{gap:4px}.selection-actions .swatch{width:29px;height:29px}.selection-actions button:not(.swatch){padding:7px}}
@media(prefers-reduced-motion:reduce){.splash-screen{transition:none}}
/* Reserve the top action strip height even when nothing is selected, so tapping
   a verse never makes subsequent verses jump beneath the pointer. */
.selection-toolbar[hidden]{display:flex!important;visibility:hidden;pointer-events:none}

/* v0.7: local-only Scripture import overlay */
.library-setup{position:fixed;inset:0;z-index:115;display:flex;align-items:center;justify-content:center;background:#0f1012;color:#f3f3f3;padding:24px;overflow:auto}
.library-setup.hidden{display:none}
.library-panel{max-width:510px;width:100%;text-align:center;background:#1c1e21;border:1px solid #43474d;border-radius:18px;padding:30px 22px;box-shadow:0 20px 80px #0007}
.library-panel h1{font-size:23px;margin:15px 0}.library-panel p{font-size:14px;line-height:1.7;color:#d7dae0}
.library-panel small{color:#a9adb7;display:block;line-height:1.65;margin-top:16px}
.library-import-button{display:block;width:100%;padding:16px;border:0;border-radius:12px;background:#d8e4cd;color:#1b3026;font-size:16px;font-weight:700;min-height:52px;cursor:pointer;margin:22px 0 12px}
.library-import-button:disabled{opacity:.5}.library-status{min-height:30px;color:#e8d2a7!important}
