:root{--forest:#21392f;--forest-dark:#17291f;--ink:#3b3529;--muted:#938b75;--paper:#f7f0dc;--gold:#d9b865;--border:#c4b793;--sans:system-ui,-apple-system,BlinkMacSystemFont,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;--serif:"Hiragino Mincho ProN","Yu Mincho",serif}*{box-sizing:border-box}body{margin:0;background:#e9e6dc;color:var(--ink);font-family:var(--sans);font-size:14px;background-image:linear-gradient(90deg,#ddd9cd40 1px,transparent 1px),linear-gradient(#ddd9cd40 1px,transparent 1px);background-size:32px 32px}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{cursor:default;opacity:.4}button:focus-visible,a:focus-visible{outline:3px solid #dd9e41;outline-offset:4px}input:focus-visible,textarea:focus-visible{outline:2px solid #ac965c;outline-offset:3px}button{transition:background .15s,transform .15s}button:not(:disabled):active{transform:translateY(1px)}[hidden]{display:none!important}.header{height:94px;background:var(--forest);color:#f7efcf;display:flex;align-items:center;padding:0 5%;gap:28px;border-bottom:5px solid var(--forest-dark)}.brand{display:flex;align-items:center;gap:13px;font-family:var(--serif);font-size:26px;font-weight:700;letter-spacing:2px;text-decoration:none;color:inherit;white-space:nowrap}.brand-mark{display:grid;place-items:center;background:#d9b865;color:var(--forest-dark);border:3px solid #a99155;width:36px;height:36px;font-size:28px;letter-spacing:0}.room-label{font-size:12px;letter-spacing:2px;color:#c0c9b5}.backup-tools{display:flex;gap:10px;margin-left:auto}.quiet{background:transparent;border:1px solid #607360;color:#ecebd8;padding:9px 15px;font-size:12px}.quiet:hover{background:#3c5142}.workspace{max-width:1510px;margin:auto;padding:42px 4% 24px;display:grid;grid-template-columns:205px minmax(0,1fr) 272px;gap:32px;min-height:720px}.section-head{display:flex;align-items:center;justify-content:space-between}.section-head h2{margin:0;font-size:18px;font-family:var(--serif);letter-spacing:1px}.section-head>span{font-size:12px;color:var(--muted)}.new-book{width:100%;padding:13px 8px;margin:24px 0 18px;border:1px dashed #b5ac91;background:#f7f4e8;color:#4c5643;font-size:12px}.new-book span{font-size:18px;vertical-align:-1px}.new-book:hover{background:#fffbed}.book-list{display:flex;flex-direction:column;gap:8px;max-height:452px;overflow:auto;padding-bottom:10px}.shelf-book{display:flex;align-items:center;gap:13px;min-height:80px;text-align:left;padding:12px 10px;background:transparent;border:1px solid transparent;color:var(--ink);width:100%}.shelf-book.selected{background:#f7f1df;border-color:#c3b58e;box-shadow:3px 3px 0 #d3ccba}.shelf-book:hover{background:#eee8d9}.shelf-copy{min-width:0}.shelf-copy strong{display:block;font-weight:600;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:130px}.shelf-copy small{display:block;font-size:10px;color:var(--muted);margin-top:8px}.book-icon{width:27px;min-width:27px;height:34px;background:#936048;border:3px solid #684735;border-right:5px solid #d8cda8;box-shadow:inset 3px 0 #b08059;position:relative}.shelf-book:nth-child(3n+2) .book-icon{background:#526b60;border-color:#344d44;border-right-color:#d8cda8;box-shadow:inset 3px 0 #7b8d72}.shelf-book:nth-child(3n) .book-icon{background:#596a85;border-color:#3e4b61;border-right-color:#d8cda8;box-shadow:inset 3px 0 #8c9bb1}.book-icon:after{content:"";position:absolute;left:6px;right:3px;top:6px;height:2px;background:#d4bc7c}.shelf-note{margin-top:44px;padding-top:25px;border-top:1px solid #cbc6b7;color:#aaa08c;font-family:var(--serif);font-size:12px;line-height:1.9}.tiny-book{display:block;border:1px solid #a99d7c;width:25px;height:20px;position:relative}.tiny-book:after{content:"";position:absolute;left:11px;height:100%;border-left:1px solid #a99d7c}.writing-bar{display:flex;justify-content:space-between;align-items:center;height:28px;margin-bottom:25px}.writing-bar h1{font-size:17px;font-weight:500;font-family:var(--serif);margin:0;letter-spacing:1px}#save-status{font-size:11px;color:#6d7d5a}.book-cover{padding:9px 10px 13px;background:#74503a;border:3px solid #503b2e;border-radius:4px 7px 7px 4px;box-shadow:0 7px 0 #c0b69d,0 10px 0 #746552,0 22px 28px #40342020;position:relative}.book-spread{display:grid;grid-template-columns:1fr 1fr;background:var(--paper);min-height:492px;position:relative}.book-spread:after{content:"";position:absolute;top:0;bottom:0;left:50%;width:16px;transform:translateX(-50%);background:linear-gradient(90deg,transparent,#897e5235 45%,#796d4840 50%,transparent);pointer-events:none}.paper{position:relative;padding:30px 26px 40px;background-image:repeating-linear-gradient(0deg,transparent,transparent 3px,#b9a97304 3px,#b9a97304 4px);min-width:0}.writing-page{box-shadow:inset 3px 0 #e3d8b4;border-right:1px solid #cebf94}.preview-page{box-shadow:inset -3px 0 #e3d8b4}.title-label{font-size:9px;color:#a2916e;letter-spacing:1px}#book-title{display:block;width:100%;margin-top:8px;border:0;background:transparent;padding:0;font-family:var(--serif);font-size:21px;line-height:1.5;color:#54452e;text-overflow:ellipsis}.page-rule{height:1px;background:#d9ccaa;margin:16px 0 18px}#book-body{display:block;resize:none;border:0;background:transparent;width:100%;height:310px;padding:0 5px 0 0;color:#584d39;font-family:var(--serif);font-size:14px;line-height:2;overflow:auto}#book-body::placeholder{color:#b5a789}#book-body:focus-visible{outline:0}#book-body:focus{box-shadow:inset -2px 0 #b4a07350}.page-number{position:absolute;bottom:17px;left:0;right:0;text-align:center;font-size:11px;color:#af9c73;font-family:Georgia,serif}.preview-label{margin:8px 0 26px;font-size:10px;color:#ac9b75;letter-spacing:2px}.page-corner{position:absolute;right:0;top:0;width:20px;height:20px;background:linear-gradient(45deg,#e4d8b5 50%,#f4eedb 50%)}#page-preview{white-space:pre-wrap;overflow-wrap:anywhere;font-family:var(--serif);font-size:14px;line-height:2;max-height:330px;overflow:auto;color:#7c6f50}#page-preview.empty-page{color:#b8a987;padding-top:80px;text-align:center;font-size:13px}.next-edit{background:transparent;border:0;padding:8px;color:#8f7950;font-size:10px;position:absolute;bottom:41px;left:0;right:0;margin:auto;width:max-content}.book-footer{display:flex;justify-content:space-between;align-items:center;margin-top:29px;gap:12px;color:#9b9077;font-size:11px}.page-controls{display:flex;align-items:center;gap:16px}.page-controls button{width:34px;height:30px;border:1px solid #bdb297;background:#f1ecdf;color:#6f644b;font-size:17px}.page-controls span{font-family:Georgia,serif;color:#7d7058;font-size:13px}.text-button{background:transparent;border:0;color:#938876;font-size:11px;padding:8px 0;text-decoration:underline;text-underline-offset:3px}.editor-hint{font-size:10px;line-height:1.7;color:#a29983;text-align:center;margin-top:20px}.focus{border-left:1px solid #cbc5b6;padding-left:27px}.small-dot{width:6px;height:6px;background:#927b4d}.focus-intro{font-size:11px;color:#948b74;letter-spacing:.5px;margin:12px 0 20px}.furnace{width:118px;height:114px;margin:24px auto 18px;background:#92948a;border:5px solid #60665c;box-shadow:inset 5px 0 #b2b1a1,inset -5px 0 #757c70,5px 5px 0 #cbc8b8;position:relative}.stone-top{height:20px;border-bottom:4px solid #60665c;background:linear-gradient(90deg,transparent 35%,#60665c 35%,#60665c 39%,transparent 39%,transparent 73%,#60665c 73%,#60665c 77%,transparent 77%)}.furnace-mouth{position:absolute;left:15px;right:15px;top:38px;height:51px;background:#292c27;border:5px solid #66695c;border-top-color:#4e574b;overflow:hidden}.stone-bottom{position:absolute;bottom:0;height:12px;width:100%;background:linear-gradient(90deg,transparent 45%,#60665c 45%,#60665c 50%,transparent 50%);border-top:3px solid #60665c}.logs{position:absolute;bottom:3px;left:9px;right:9px;height:5px;background:#685741;box-shadow:0 -4px 0 #443e30}.flame{opacity:0;position:absolute;bottom:9px;width:12px;height:22px;background:#f4a742;clip-path:polygon(0 40%,35% 40%,35% 0,68% 0,68% 20%,100% 20%,100% 100%,0 100%)}.flame-a{left:12px}.flame-b{left:27px;height:30px;background:#f8cd62}.flame-c{left:41px;height:18px}.burning .flame,.celebrating .flame{opacity:1}.burning .flame{animation:flicker .85s steps(2) infinite alternate}.burning .flame-b{animation-delay:.3s}.burning .furnace-mouth{background:#4c3828}.celebrating{box-shadow:inset 5px 0 #b2b1a1,inset -5px 0 #757c70,5px 5px 0 #bdc8a6}.timer-display{text-align:center;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:44px;line-height:1.2;letter-spacing:-2px;color:#485042;font-variant-numeric:tabular-nums}.timer-status{text-align:center;font-size:10px;color:#94876b;min-height:35px;padding:9px 0;line-height:1.6}.heat-track{height:5px;background:#d6d2c1;margin:5px 0 24px}#heat-progress{height:100%;background:#c09b50;transition:width .25s}#timer-form>label,.duration-row>label{font-size:11px;color:#7e735d}#task-name{width:100%;border:1px solid #c6bea8;background:#f6f3e8;padding:11px 10px;margin:8px 0 18px;font-size:11px;color:#554c3a;border-radius:0}#task-name::placeholder{color:#b0a78f}.duration-row{display:flex;align-items:center;justify-content:space-between}.duration-row>div{display:flex;align-items:center;gap:6px;font-size:11px;color:#8f836c}#minutes{width:55px;border:1px solid #c6bea8;background:#f6f3e8;padding:7px 2px 7px 8px;color:#554c3a;font-family:ui-monospace,monospace;font-size:15px}.presets{display:flex;gap:8px;margin:12px 0 17px}.presets button{flex:1;border:1px solid #c7bfaa;background:transparent;color:#9c9077;padding:7px 0;font-size:10px}.presets button.chosen{border-color:#879173;color:#5e6a50;background:#e0e3d3}.primary,.complete{display:block;width:100%;padding:13px 8px;background:#405c46;border:2px solid #324735;box-shadow:inset 0 2px #6f8363,0 3px 0 #253d2c;color:#f4efd9;font-size:12px;letter-spacing:.5px}.primary:hover{background:#526d52}.complete{background:#c6a456;border-color:#aa8946;color:#fff8e7;box-shadow:inset 0 2px #e2ca86,0 3px 0 #92713d;margin-top:13px}.complete:hover{background:#d0b266}#active-controls>.text-button{display:block;margin:10px auto}#active-task{font-family:var(--serif);font-size:16px;text-align:center;overflow-wrap:anywhere;line-height:1.8;margin:0 0 20px}.recent{margin-top:29px;padding-top:21px;border-top:1px solid #cbc6b6}.recent h3{font-size:11px;font-weight:500;letter-spacing:1px;color:#81765e;margin:0 0 12px}.recent ul{list-style:none;margin:0;padding:0}.recent li{display:flex;align-items:center;gap:9px;justify-content:space-between;font-size:11px;margin:14px 0;color:#7d745e}.recent li>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:160px}.recent small{font-size:9px;white-space:nowrap;color:#a89678}.recent small.achieved{color:#678257}.recent .empty-history{color:#aea48e;font-size:10px}.site-footer{max-width:1390px;margin:0 auto;padding:22px 25px;display:flex;justify-content:space-between;border-top:1px solid #d1cbbc;color:#a39a84;font-size:10px;letter-spacing:1px}.notice{padding:12px 5%;background:#fff4cf;border-bottom:1px solid #d5bd71;font-size:12px;line-height:1.7;color:#6a5426}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@keyframes flicker{from{transform:scaleY(.8);transform-origin:bottom}to{transform:scaleY(1);transform-origin:bottom}}
@media(min-width:1450px){.workspace{padding-top:55px;gap:42px;grid-template-columns:210px minmax(0,1fr) 290px}.book-spread{min-height:550px}#book-body{height:363px}.paper{padding:35px 32px 44px}}
@media(max-width:1150px){.workspace{grid-template-columns:160px minmax(0,1fr) 225px;gap:22px;padding-left:3%;padding-right:3%}.paper{padding:25px 19px 40px}.focus{padding-left:19px}.shelf-copy strong{max-width:96px}.header{padding:0 3%}.room-label{display:none}.brand{font-size:23px}.shelf-book{gap:9px;padding:10px 6px}#book-title{font-size:18px}.preview-page{display:none}.book-spread{grid-template-columns:1fr}.book-spread:after{display:none}.writing-page{border-right:0;box-shadow:inset 3px 0 #e3d8b4,inset -3px 0 #e3d8b4}.book-cover{padding:7px 8px 10px}.editor-hint{font-size:9px}}
@media(max-width:780px){.header{height:76px;padding:0 20px;gap:10px}.brand{font-size:20px;letter-spacing:1px}.brand-mark{width:27px;height:30px;font-size:23px}.backup-tools{gap:6px}.quiet{padding:8px;font-size:10px}.workspace{grid-template-columns:minmax(0,1fr) 235px;gap:24px;padding:24px 20px}.library{grid-column:1/-1}.library .section-head{display:inline-flex;gap:15px}.new-book{width:auto;float:right;margin:0;padding:8px 12px}.book-list{clear:both;flex-direction:row;max-height:none;overflow-x:auto;margin-top:17px;padding:0 4px 8px}.shelf-book{width:173px;flex-shrink:0;min-height:66px;padding:8px}.shelf-copy strong{max-width:119px}.shelf-copy small{font-size:9px}.book-icon{width:22px;min-width:22px;height:29px}.shelf-note{display:none}.writing-bar{margin-bottom:17px}.focus{padding-left:19px}.focus .section-head h2{font-size:16px}.paper{padding:24px 21px 40px}.book-spread{min-height:490px}.book-footer{gap:5px}.page-controls{gap:8px}.site-footer{margin:0 20px;padding:20px 0;gap:10px;letter-spacing:0}.site-footer span:last-child{text-align:right}}
@media(max-width:560px){.header{padding:0 14px}.brand{font-size:18px}.brand-mark{display:none}.workspace{display:flex;flex-direction:column;padding:22px 17px;gap:27px}.writing{width:100%}.book-spread{min-height:476px}.paper{padding:26px 25px 40px}#book-title{font-size:21px}#book-body{height:299px;font-size:15px}.focus{border-left:0;border-top:1px solid #cbc5b6;padding:26px 10px 0;display:grid;grid-template-columns:1fr 1fr;column-gap:26px}.focus>.section-head,.focus-intro{grid-column:1/-1}.focus-intro{margin-bottom:4px}.furnace{grid-column:1;grid-row:3/6;margin:25px auto}.timer-display{grid-column:2;grid-row:3;margin-top:26px;font-size:42px}.timer-status{grid-column:2;grid-row:4;padding:6px 0}.heat-track{grid-column:2;grid-row:5;margin:5px 0 24px}#timer-form,#active-controls,.recent{grid-column:1/-1}.recent{margin-top:24px}.site-footer{flex-direction:column;align-items:center;padding-bottom:28px}.site-footer span:last-child{text-align:center}.editor-hint{font-size:10px}.quiet{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*:before,*:after{animation:none!important;transition:none!important}}
/* Semantic reading surfaces and accessible secondary text. */
:root{--surface:#f6f3e8;--canvas:#e9e6dc;--reading-ink:#584d39;--secondary-ink:#71664f;--line:#c6bea8;--spacing-sm:8px;--spacing-md:16px;--spacing-lg:24px}
body{background-color:var(--canvas)}.paper{background-color:var(--paper)}#book-body,#book-title{color:var(--reading-ink)}
.title-label,.preview-label,.page-number,#page-preview.empty-page,.focus-intro,.timer-status,.editor-hint,.shelf-copy small,.book-footer,.site-footer,.shelf-note,.recent .empty-history,.recent li,.recent h3,.text-button,#timer-form>label,.duration-row>label{color:var(--secondary-ink)}
.title-label,.preview-label,.editor-hint,.site-footer,.recent .empty-history,.next-edit,.shelf-copy small{font-size:11px}.quiet,.presets button,.recent small{font-size:11px}.presets button{color:var(--secondary-ink)}#task-name::placeholder,#book-body::placeholder{color:var(--secondary-ink)}
.preferences{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.preferences select{font:inherit;background:var(--surface);border:1px solid var(--line);color:var(--ink);padding:6px;min-height:30px}.preferences select:focus-visible{outline:2px solid #ac965c;outline-offset:2px}.site-footer{align-items:center;gap:20px;flex-wrap:wrap}.next-edit{max-width:95%;white-space:normal;line-height:1.6}.new-book{line-height:1.5}.primary,.complete{line-height:1.6}.quiet{white-space:nowrap}.room-label{color:#d1d8c7}
:root[data-theme=dark]{--canvas:#252e28;--ink:#ebe5d3;--paper:#383a2f;--surface:#303b32;--reading-ink:#eee4c7;--secondary-ink:#c8bfa6;--line:#697363;--forest:#15271f;--forest-dark:#101c16;--muted:#c8bfa6}
[data-theme=dark] body{background-image:linear-gradient(90deg,#7480650c 1px,transparent 1px),linear-gradient(#7480650c 1px,transparent 1px)}
[data-theme=dark] .new-book,[data-theme=dark] .shelf-book.selected{background:#354537;color:#eee4c7;border-color:#7c8464;box-shadow:none}
[data-theme=dark] .shelf-book:hover{background:#3c4d3e}[data-theme=dark] #task-name,[data-theme=dark] #minutes,[data-theme=dark] .page-controls button{background:var(--surface);color:var(--ink);border-color:var(--line)}
[data-theme=dark] .paper{background-image:none;box-shadow:none}[data-theme=dark] .writing-page{border-color:#5e5b46}[data-theme=dark] #page-preview,[data-theme=dark] .next-edit,[data-theme=dark] .page-controls span{color:var(--secondary-ink)}
[data-theme=dark] .page-rule{background:#666049}[data-theme=dark] .timer-display{color:#e0e6cc}[data-theme=dark] .heat-track{background:#4d5748}[data-theme=dark] .presets button.chosen{background:#46563d;color:#eee4c7;border-color:#a0ac88}
[data-theme=dark] .focus,[data-theme=dark] .recent,[data-theme=dark] .shelf-note,[data-theme=dark] .site-footer{border-color:#57604f}[data-theme=dark] .recent small.achieved,[data-theme=dark] #save-status{color:#b9d2a6}
[data-theme=dark] .recent small{color:#d2c198}[data-theme=dark] .notice{background:#4b4029;color:#f5dfab;border-color:#827143}[data-theme=dark] .book-cover{box-shadow:0 7px 0 #646552,0 10px 0 #443a2c,0 22px 28px #0003}
@media(max-width:780px){.book-list{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));max-height:230px;overflow-x:hidden;overflow-y:auto}.shelf-book{width:100%;min-width:0}.shelf-copy strong{max-width:100%;white-space:normal;overflow-wrap:anywhere}.shelf-copy small{font-size:11px}.site-footer{justify-content:center}.site-footer>span{flex-basis:100%;text-align:center!important}.book-footer{flex-wrap:wrap}.editor-hint{font-size:11px}.focus .section-head h2{line-height:1.6}.presets button{font-size:11px}.book-list{margin-top:17px}.new-book{max-width:62%}}
@media(max-width:560px){.preferences{justify-content:center}.quiet{font-size:11px}.site-footer{padding-bottom:max(28px,env(safe-area-inset-bottom))}}
:root{--muted:var(--secondary-ink)}.complete{color:#35270e}.recent small{color:#706047}.recent small.achieved{color:#4d683a}.next-edit,#page-preview{color:var(--secondary-ink)}#save-status{color:#4d603d}
#confirm-dialog{max-width:min(440px,calc(100% - 32px));border:2px solid var(--line);background:var(--surface);color:var(--ink);padding:28px;box-shadow:6px 6px 0 #0003}#confirm-dialog::backdrop{background:#17291f99}#confirm-dialog h2{font-family:var(--serif);font-size:20px;margin:0 0 16px;overflow-wrap:anywhere}#confirm-dialog p{font-size:14px;line-height:1.9}.dialog-actions{display:flex;gap:12px;margin-top:24px;justify-content:flex-end}.dialog-actions button{font:inherit;padding:11px 16px;background:var(--canvas);border:1px solid var(--line);color:var(--ink)}#confirm-action{background:#734439;border-color:#65392e;color:#fff3df}
.page-controls span,.duration-row>div{color:var(--secondary-ink)}.presets button.chosen{color:#49563f}
