/* A quiet, image-led home. Detailed guidance stays with the relevant action. */
:root{--bg:#fffefa;--muted:#797c74;--line:#eeeee8}
.app-shell{max-width:1120px;padding:0 40px}
.topbar{height:88px;border-bottom:0;gap:24px}
.brand{font-size:18px;letter-spacing:.5px;gap:7px;flex-shrink:0}
.brand-mark{display:block;width:26px;height:26px;flex-shrink:0;transform:none}
.brand-title{font-family:"Songti SC","STSong","Noto Serif SC","SimSun",serif;font-weight:400;line-height:1.2;white-space:nowrap}
.reset-records-link{color:#9b5f4c}
.button-row .reset-confirm{width:auto;margin:0;background:#9b5f4c}
.reader-nav.single-page{display:none}
.reader-footer-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:8px}
.reader-footer-actions .reader-delete{color:#9b5f4c}
.profile-open{border:0;background:transparent;font-size:12px;padding:10px 0;max-width:150px}
.hello-row{padding:30px 0 32px}
.hello-row .eyebrow{font-size:12px;letter-spacing:.3px;margin-bottom:12px}
.hello-row h1{font-family:var(--sans);font-size:30px;font-weight:600;letter-spacing:.2px;line-height:1.4}
.section-label{margin-bottom:16px}
.section-label>span:last-child{font-size:13px;letter-spacing:0;color:#777d70}
.daily-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:22px}
.daily-grid .daily-card{padding:0;border:0;border-radius:0;background:transparent;min-height:0;overflow:visible;transition:transform .2s}
.daily-grid .daily-card:hover{box-shadow:none;transform:translateY(-3px)}
.daily-card .card-illustration{position:relative;display:block;top:auto;right:auto;transform:none;width:100%;height:auto;aspect-ratio:1.4;border-radius:18px;overflow:hidden}
.card-lunch .card-illustration{background:#f4efe3}
.card-mood .card-illustration{background:#f5ece6}
.card-role .card-illustration{background:#eef1e7}
.card-calendar .card-illustration{background:#f0f0e9}
.daily-card .card-copy{margin:14px 3px 0}
.daily-card .card-copy strong{font:600 17px/1.5 var(--sans);letter-spacing:0}
.daily-card .card-bottom{margin:3px 3px 0;gap:6px;min-height:28px}
.daily-card .card-cta{font-size:12px;color:#777d70}
.daily-card .card-arrow{border:0;width:23px;height:23px;font-size:16px;color:#8c9384}
.material-status{margin:18px 3px 0;font-size:11px}
.material-status:empty{display:none}
.home-shelf{margin-top:40px;padding-top:26px}
.shelf-heading h2{font:600 20px/1.5 var(--sans);letter-spacing:0}
.shelf-heading>button{font-size:12px;color:#777d70;min-height:40px}
.shelf-preview{border-bottom:0;box-shadow:none;min-height:140px;justify-content:flex-start;align-items:flex-start;padding:0;gap:22px;margin-top:24px}
.mini-book{width:calc((100% - 44px)/3);max-width:180px;align-items:flex-start;text-align:left}
.mini-book img{border:0;transform:none!important;box-shadow:none;border-radius:12px;object-fit:cover;aspect-ratio:5/7}
.mini-book span{font:500 13px/1.6 var(--sans);margin-top:10px}
.mini-book small{font-size:11px;margin-top:3px}
.empty-books{opacity:.65}
.shelf-empty-note{font-size:12px}
.shelf-topline{justify-content:flex-end}
.demo-page .hello-row{padding-bottom:24px}
.sample-badge{display:inline-block;vertical-align:middle;margin-left:12px;padding:4px 9px;border-radius:6px;background:#f1f2ec;color:#838778;font:400 11px/1.4 var(--sans);letter-spacing:0}
.demo-tour{display:flex;align-items:center;gap:34px;padding:28px 34px;margin:0 0 34px;max-width:none;border:0;border-radius:20px;background:#f5f5ef}
.demo-cover{display:block;flex:0 0 140px;padding:0;aspect-ratio:5/7;border-radius:9px;background:#e8e9df;overflow:hidden;box-shadow:0 8px 20px #343b3012;transition:transform .2s}
.demo-cover:hover{transform:translateY(-3px)}
.demo-cover img{width:100%;height:100%;display:block;object-fit:cover}
.demo-cover img[hidden]{display:none}
.demo-tour-copy{flex:1;max-width:440px}
.demo-tour-copy h2{font:600 22px/1.5 var(--sans);letter-spacing:0}
.demo-counts{justify-content:flex-start;gap:22px;margin:14px 0 21px}
.demo-counts span{font-size:12px;gap:5px;white-space:nowrap}
.demo-counts b{font:500 17px/1.5 var(--sans);color:#515a48}
.demo-tour .primary-btn{margin:0;border-radius:24px;min-height:44px;padding:10px 28px}
.demo-shortcuts{display:inline-flex;gap:10px;margin-left:16px;vertical-align:middle}
.demo-shortcuts button{padding:12px;font-size:12px;min-height:44px}
.demo-shelf-note{padding:2px 0 14px;margin-bottom:16px;border-bottom:0;font-size:12px;color:var(--muted)}
footer{margin-top:30px;border-top:1px solid var(--line);padding:22px 0 28px;font-size:11px;color:#91968b}
footer button{font-size:11px;min-height:32px}
@media(max-width:740px){
 .app-shell{max-width:520px;padding:0 20px}
 .topbar{height:auto;display:grid;grid-template-columns:1fr auto;gap:12px 16px;padding:20px 0 0}
 .brand{font-size:17px;gap:6px}.brand-mark{width:24px;height:24px}
 .profile-open{grid-column:2;grid-row:1;font-size:12px;max-width:115px}
 .hello-row{padding:28px 0 25px}.hello-row h1{font-size:25px;letter-spacing:0}.hello-row .eyebrow{font-size:11px;margin-bottom:10px}
 .daily-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:24px 15px}
 .daily-card .card-illustration{border-radius:15px;aspect-ratio:1.3}
 .daily-card .card-copy{margin-top:10px}.daily-card .card-copy strong{font-size:16px}
 .daily-card .card-cta{font-size:11px}.daily-card .card-bottom{margin-top:2px}
 .home-shelf{margin-top:30px;padding-top:22px}.shelf-heading h2{font-size:18px}.shelf-heading>button{font-size:11px}
 .shelf-preview{gap:14px;min-height:120px;margin-top:20px}.mini-book{width:calc((100% - 28px)/3)}.mini-book span{font-size:11px}.mini-book small{font-size:10px}
 .demo-tour{gap:20px;padding:22px 18px;margin-bottom:30px;border-radius:17px}
 .demo-cover{flex-basis:105px}.demo-tour-copy h2{font-size:18px}
 .demo-counts{gap:10px;margin:9px 0 14px}.demo-counts span{font-size:10px;gap:3px}.demo-counts b{font-size:14px}
 .demo-tour .primary-btn{width:100%;min-height:42px;padding:10px 15px;font-size:12px}
 .demo-shortcuts{display:flex;justify-content:space-around;margin:4px 0 0;gap:4px}.demo-shortcuts button{font-size:11px;padding:8px;min-height:36px}
 .sample-badge{font-size:10px;margin-left:10px}
 footer{margin-top:24px;padding:16px 0 22px;font-size:10px}footer button{font-size:11px}
}
@media(max-width:360px){
 .app-shell{padding:0 16px}.hello-row h1{font-size:23px}.daily-card .card-copy strong{font-size:15px}
 .demo-tour{padding:18px 14px;gap:14px}.demo-cover{flex-basis:90px}.demo-counts{gap:7px}.demo-counts span{font-size:9px}
}

/* Three inputs lead into one prominent final keepsake. */
.daily-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px}
.daily-card .step-number{position:absolute;z-index:2;top:12px;left:12px;display:grid;place-items:center;width:26px;height:26px;border-radius:50%;background:#fffefaaf;color:#858c7a;font-size:10px;letter-spacing:.5px}
.daily-card.step-complete .step-number{background:#55664c;color:#fff}
.daily-card:not(.card-calendar) .card-illustration{aspect-ratio:2.1}
.daily-card:not(.card-calendar) .card-illustration svg{max-height:155px}
.daily-grid .card-calendar{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) 280px;grid-template-rows:auto auto auto auto;column-gap:24px;align-items:center;padding:30px 36px;min-height:240px;border-radius:22px;background:#46543d;color:#fffdf5;box-shadow:0 8px 24px #46543d0d}
.card-calendar .step-number{grid-column:1;grid-row:1;position:static;width:auto;height:auto;display:block;background:none;font-size:12px;color:#c9d1bd;letter-spacing:1px}
.card-calendar .card-illustration{grid-column:2;grid-row:1/5;aspect-ratio:auto;height:195px;background:transparent;border-radius:0;align-self:center}
.card-calendar .card-copy{grid-column:1;grid-row:2;margin:8px 0 0}
.card-calendar .card-copy strong{font-size:30px;font-weight:600;color:#fffdf5;letter-spacing:1px}
.calendar-progress{grid-column:1;grid-row:3;display:flex;gap:10px;margin:16px 0 22px;flex-wrap:wrap}
.calendar-progress>span{display:inline-flex;align-items:center;gap:6px;color:#e3e7d9;font-size:11px;padding:6px 10px;border:1px solid #d6ddc635;border-radius:20px;line-height:1.5}
.calendar-progress i{font-style:normal;color:#bbc7af}
.calendar-progress .complete{background:#f0f3e7;color:#3e5134;border-color:transparent}
.calendar-progress .complete i{color:#506d3e}
.card-calendar .card-bottom{grid-column:1;grid-row:4;justify-self:start;display:flex;gap:22px;min-height:44px;margin:0;padding:10px 20px;border-radius:24px;background:#fffdf3}
.card-calendar .card-cta{font-size:13px;color:#3e5034;font-weight:600}
.card-calendar .card-arrow{color:#3e5034}
@media(max-width:740px){
 .daily-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 12px}
 .daily-card:not(.card-calendar) .card-illustration{aspect-ratio:1/1.08;border-radius:14px;display:flex;align-items:center}
 .daily-card .step-number{top:7px;left:7px;width:22px;height:22px;font-size:9px}
 .daily-card:not(.card-calendar) .card-copy{margin:10px 0 0}
 .daily-card:not(.card-calendar) .card-copy strong{font-size:15px;letter-spacing:0;white-space:nowrap}
 .daily-card:not(.card-calendar) .card-bottom{margin:2px 0 0;gap:2px}
 .daily-card:not(.card-calendar) .card-cta{font-size:10px}
 .daily-card:not(.card-calendar) .card-arrow{width:16px;height:20px;font-size:13px}
 .daily-grid .card-calendar{grid-template-columns:minmax(0,1fr) 110px;grid-template-rows:auto auto auto auto;column-gap:4px;min-height:228px;padding:22px;border-radius:20px}
 .card-calendar .step-number{position:static;width:auto;height:auto;font-size:11px}
 .card-calendar .card-illustration{grid-column:2;grid-row:1/3;height:100px;width:135px;margin-left:-10px}
 .card-calendar .card-copy{margin:6px 0 0;align-self:start}.card-calendar .card-copy strong{font-size:25px;letter-spacing:1px;white-space:nowrap}
 .calendar-progress{grid-column:1/-1;grid-row:3;gap:8px;margin:14px 0 20px}
 .calendar-progress>span{font-size:10px;padding:5px 10px}
 .card-calendar .card-bottom{grid-column:1/-1;grid-row:4;justify-self:stretch;justify-content:space-between;padding:10px 18px}
 .card-calendar .card-cta{font-size:12px}
}
@media(max-width:360px){
 .daily-grid{column-gap:10px}.daily-card:not(.card-calendar) .card-copy strong{font-size:14px}
 .daily-grid .card-calendar{padding:20px;grid-template-columns:minmax(0,1fr) 90px}
 .card-calendar .card-illustration{width:115px;height:90px}.card-calendar .card-copy strong{font-size:23px}
}
/* Personal books and removable examples share one shelf. */
#my-notebook{scroll-margin-top:24px}
#my-notebook .shelf-preview{flex-wrap:wrap}
.home-book{width:calc((100% - 44px)/3);max-width:180px;min-width:0}
.home-book .mini-book{width:100%;max-width:none}
.home-book .mini-book small{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.example-badge{font:400 10px/1.4 var(--sans);padding:2px 5px;border-radius:4px;background:#f0eee7;color:#7c7b70;white-space:nowrap}
.example-remove{display:block;min-height:36px;padding:8px 0;color:#85877e;font:400 11px/1.5 var(--sans);text-align:left}
.example-remove:hover{color:var(--ink);text-decoration:underline}
.shelf-book-wrap{min-width:0}.shelf-book-wrap .shelf-book{width:100%}
.shelf-book-wrap .example-remove{margin:3px auto 0;text-align:center}
#restore-examples{margin-top:18px;font-size:11px}
#restore-examples[hidden]{display:none}
@media(max-width:740px){.home-book{width:calc((100% - 28px)/3)}.home-book .mini-book small{gap:4px}.example-badge{font-size:9px}.example-remove{font-size:10px}}
/* Stable touch layout for iPhone Safari and embedded browsers. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;scrollbar-gutter:stable}
body.dialog-open{position:fixed;top:var(--locked-scroll-top,0px);left:0;right:0;overflow:hidden}
button,a,input,textarea,select,[role=button]{touch-action:manipulation}
.app-shell,.modal,.modal-head,.home-shelf,.shelf-heading{min-width:0}
.shelf-heading h2,.modal-head h2,.daily-materials p{overflow-wrap:anywhere}
.modal-overlay{top:var(--dialog-top,0px);bottom:auto;height:var(--dialog-height,100vh);height:var(--dialog-height,100svh)}
.modal{min-width:0;max-height:calc(var(--dialog-height,100vh) - 48px);max-height:calc(var(--dialog-height,100svh) - 48px);overflow-x:hidden}
.modal input,.modal textarea,.modal select,.bind-controls .input{font-size:16px;line-height:1.5;max-width:100%;min-width:0}
.modal-head{gap:12px}.modal-close{width:44px;height:44px}
.bind-controls{grid-template-columns:minmax(0,1fr) auto}
.reader-stage{max-width:min(430px,40svh);touch-action:pan-y pinch-zoom}
.wheel-wrap{width:min(286px,100%);height:auto;aspect-ratio:1}
@media(max-width:740px){
 .app-shell{padding-left:max(20px,env(safe-area-inset-left));padding-right:max(20px,env(safe-area-inset-right))}
 .modal-overlay{padding:0;align-items:flex-end;backdrop-filter:none}
 .modal{max-height:calc(var(--dialog-height,100vh) - 12px);max-height:calc(var(--dialog-height,100svh) - 12px);padding-left:max(23px,env(safe-area-inset-left));padding-right:max(23px,env(safe-area-inset-right));animation:none}
 .reader-stage{max-width:min(430px,40svh)}
 .calendar-image{max-height:65svh}
 .home-book .example-remove{min-height:44px}
 .daily-grid .daily-card:hover,.mini-book:hover,.shelf-book:hover .book-object,.demo-cover:hover{transform:none}
}
@media(max-width:360px){.app-shell{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(16px,env(safe-area-inset-right))}}
.wheel-actions{display:flex;justify-content:center;gap:28px;align-items:center}
.wheel-actions .quiet-link{margin:6px 0 0;min-height:44px;padding:10px 6px}
.wheel-actions button:disabled{opacity:.45;cursor:wait}
/* A paper fortune slip, kept light enough for a phone screen. */
.fortune-invitation{text-align:center;padding:10px 0 18px}
.fortune-jar{max-width:280px;margin:0 auto}.fortune-jar svg{width:100%;height:auto}
.fortune-invitation p{font-size:17px;color:#787c6c;margin:6px 0}
.fortune-ticket{position:relative;max-width:360px;margin:0 auto 22px;padding:28px 26px 55px;background:#faf2df;border:1px solid #e8d9b8;border-radius:14px;text-align:center;overflow:hidden}
.fortune-date{display:block;font-size:12px;color:#947d56;letter-spacing:5px}
.fortune-ticket h3{font:600 42px/1.5 var(--serif);letter-spacing:6px;color:#9a6548;margin:15px 0 20px}
.fortune-rule{width:44px;height:1px;background:#cfb88c;margin:0 auto 25px}
.fortune-ticket p{display:flex;gap:14px;align-items:flex-start;text-align:left;margin:18px 0;font-size:16px;line-height:1.8;color:#5c6352;overflow-wrap:anywhere}
.fortune-ticket p b{flex:0 0 28px;font:500 18px/28px var(--serif);color:#98704b;border:1px solid #dbc5a0;border-radius:5px;text-align:center}
.fortune-ticket p span{flex:1;min-width:0}
.fortune-seal{position:absolute;right:20px;bottom:15px;border:1px solid #b87f66;color:#b87f66;border-radius:4px;font:12px/1.2 var(--serif);padding:3px;transform:rotate(-8deg);opacity:.7}
.fortune-ticket[data-grade="中上签"]{background:#f2f2e2;border-color:#dcdfc6}
.fortune-ticket[data-grade="上签"]{background:#f7eedc;border-color:#e7d3ae}
.fortune-ticket[data-grade="上上签"]{background:#faeade;border-color:#e7c4b1}
.fortune-again{display:block;margin:6px auto 0;min-height:44px;padding:10px 20px}
@media(max-width:360px){.fortune-ticket{padding:24px 20px 45px}.fortune-ticket h3{font-size:36px}.fortune-ticket p{gap:10px}}
/* A full archive: day pages flow down the home screen. */
.home-archive-tabs{display:flex;gap:22px;border-bottom:1px solid var(--line);margin:20px 0 0}
.home-archive-tabs button{padding:10px 2px 13px;min-height:44px;font-size:14px;color:#85897d;border-bottom:2px solid transparent;margin-bottom:-1px}
.home-archive-tabs button[aria-selected=true]{color:#46543d;border-bottom-color:#46543d;font-weight:600}
.home-archive-tabs button span{font-size:11px;font-weight:400;margin-left:6px;color:#91978a}
#my-notebook .archive-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:28px 24px;align-items:start}
.archive-grid .home-book{width:100%;max-width:none;min-width:0}
.archive-grid .mini-book{width:100%;max-width:none}
.archive-grid .mini-book img{width:100%;height:auto;aspect-ratio:5/7;border-radius:10px;display:block;background:#fff}
.archive-grid .mini-book span{font-size:14px;white-space:normal}
.archive-grid .mini-book small{margin-top:4px}
.archive-empty{grid-column:1/-1;font-size:12px;color:#929889;padding:24px 0}
@media(max-width:740px){
 #my-notebook .archive-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:24px 14px}
 #my-notebook .archive-diary{grid-template-columns:repeat(3,minmax(0,1fr));gap:28px}
 .archive-diary .mini-book span{font-size:15px}
 .archive-grid .mini-book span{line-height:1.6}
 .archive-grid .home-book .example-remove{min-height:44px}
 .home-archive-tabs{gap:24px}
}

/* Three pieces of furniture for three ways of keeping a day. */
.archive-grid{
 --cabinet-frame:#c5a378;--cabinet-label:#5d4934;--shelf-top:#d9b98b;--shelf-edge:#b38c5e;
 position:relative;isolation:isolate;padding:20px 20px 12px;border:8px solid var(--cabinet-frame);border-radius:9px;
 background-color:#e9d4b1;
 background-image:repeating-linear-gradient(91deg,transparent 0 17px,#a17a4610 18px,transparent 20px 43px),repeating-linear-gradient(88deg,#fff9e80d 0 3px,transparent 4px 10px),linear-gradient(90deg,#b18a5521,#faefd635 10%,#d0b08714 52%,#b18a5526);
 box-shadow:inset 0 5px 14px #78563122,0 12px 26px -18px #68432265,0 1px 0 #fff9ed;
}
#my-notebook .archive-grid,.bookshelf-grid.archive-grid{gap:20px 22px;align-items:stretch}
.archive-grid .cabinet-book{position:relative;align-self:stretch;min-width:0;padding:12px 8px 28px}
.archive-grid .cabinet-book:after{
 content:"";position:absolute;left:-12px;right:-12px;bottom:0;height:12px;pointer-events:none;
 background:repeating-linear-gradient(0deg,transparent 0 2px,#74512d12 3px,transparent 4px),linear-gradient(var(--shelf-top) 0 30%,var(--shelf-edge) 36% 74%,#79532e65 100%);
 border-top:1px solid #fff5d788;border-bottom:1px solid #88623d55;box-shadow:0 7px 8px -5px #54381d70;
}
.archive-grid .cabinet-book > button{width:100%;display:flex;flex-direction:column;align-items:stretch;min-width:0;padding:0;transform:none}
.archive-grid .cabinet-book img{display:block;width:100%;height:auto;aspect-ratio:5/7;object-fit:contain;border-radius:2px;border:1px solid #fffdf5a6;background:#fffefa;box-shadow:2px 0 0 #d8d3c4,3px 5px 0 #f4eddf,0 9px 15px -5px #50371f52;transform:none!important}
.archive-grid .mini-book span,.archive-grid .shelf-book strong{font:500 14px/1.6 var(--serif);color:var(--cabinet-label);margin:15px 0 0;white-space:normal;text-align:center;min-height:23px;overflow-wrap:anywhere}
.archive-grid .book-object{margin:0;filter:none;perspective:none;transform:none!important}
.archive-grid .book-object:before,.archive-grid .book-object:after,.archive-grid .book-object i{display:none}
.archive-grid .archive-empty{color:var(--cabinet-label);padding:28px 0 36px;text-align:center}

/* A pale birch open shelf: airy, with one continuous ledge per row. */
#my-notebook .archive-diary,.bookshelf-grid.archive-diary{border-color:#d1b38b;border-top-width:11px;border-bottom-width:14px;background-color:#efddbd}
.archive-diary .cabinet-book{padding-top:9px;padding-left:4px;padding-right:4px}
.archive-diary .cabinet-book:before{content:"";position:absolute;inset:0 -8px 4px;background:linear-gradient(180deg,#95652c0b,transparent 22%,#fff8e71a 80%,#9b743b10);z-index:-1;pointer-events:none}

/* A walnut cubby bookcase: darker grain, dividers, and separate compartments. */
#my-notebook .archive-week,.bookshelf-grid.archive-week{
 --cabinet-frame:#805d41;--cabinet-label:#f8ead4;--shelf-top:#b38d65;--shelf-edge:#765039;
 gap:14px;padding:14px;background-color:#99744f;border-width:9px;border-radius:6px;
 background-image:repeating-linear-gradient(90deg,transparent 0 20px,#3e291b16 21px,transparent 24px 44px),linear-gradient(90deg,#6a482d33,#c19b7040 30%,#6a482d22);
}
.archive-week .cabinet-book{padding:20px 17px 32px;background:repeating-linear-gradient(89deg,transparent 0 13px,#432b1710 14px,transparent 16px 34px),linear-gradient(110deg,#6d503c,#9f7f5a 60%,#78553d);border:1px solid #5e402d70;border-radius:2px;box-shadow:inset 5px 5px 12px #3c281d50,inset -3px 0 6px #3c281d25}
.archive-week .cabinet-book:after{left:-2px;right:-2px;height:13px}
.archive-week .mini-book span,.archive-week .shelf-book strong{text-shadow:0 1px 1px #46301b55}

/* An ivory painted cabinet: arched niches and a softly moulded base. */
#my-notebook .archive-month,.bookshelf-grid.archive-month{
 --cabinet-frame:#d6c5a9;--cabinet-label:#6b5d48;--shelf-top:#f2e6cf;--shelf-edge:#d0b993;
 gap:24px;padding:24px 20px 18px;border-width:7px;border-bottom-width:17px;border-radius:15px 15px 5px 5px;
 background:repeating-linear-gradient(91deg,#c5b69808 0 2px,transparent 3px 21px),linear-gradient(100deg,#f2eadc,#fff9ed 50%,#eee2cd);
 box-shadow:inset 0 0 0 3px #fffaf0,inset 0 6px 12px #a28d6a20,0 12px 26px -18px #68503960;
}
.archive-month .cabinet-book{padding:42px 18px 32px;border-radius:120px 120px 3px 3px;background:linear-gradient(180deg,#c7b89860,transparent 32%),repeating-linear-gradient(90deg,transparent 0 27px,#bba5800c 29px,transparent 31px 54px),#e8dbc3;border:1px solid #c8b694;box-shadow:inset 0 0 0 5px #f9f1e0,inset 0 9px 16px #8a6d4033}
.archive-month .cabinet-book:after{left:-2px;right:-2px;height:12px;border-radius:1px;box-shadow:0 4px 5px -3px #72593244}

@media(max-width:740px){
 #my-notebook .archive-grid,.bookshelf-grid.archive-grid{padding:15px 13px 10px;border-width:7px;gap:18px 8px;grid-template-columns:repeat(3,minmax(0,1fr))}
 #my-notebook .archive-diary,.bookshelf-grid.archive-diary{grid-template-columns:repeat(3,minmax(0,1fr));padding:15px 10px 10px;gap:18px 8px;border-bottom-width:11px}
 .archive-diary .cabinet-book{padding:8px 3px 25px}
 .archive-grid .mini-book span,.archive-grid .shelf-book strong{font-size:13px;line-height:1.6;margin-top:13px}
 .archive-diary .mini-book span,.archive-diary .shelf-book strong{font-size:15px}
 #my-notebook .archive-week,.bookshelf-grid.archive-week{gap:10px;padding:10px;border-width:7px}
 .archive-week .cabinet-book{padding:15px 11px 29px}
 #my-notebook .archive-month,.bookshelf-grid.archive-month{padding:20px 12px 14px;gap:20px 15px;border-bottom-width:14px}
 .archive-month .cabinet-book{padding:34px 12px 29px;border-radius:85px 85px 3px 3px;box-shadow:inset 0 0 0 4px #f9f1e0,inset 0 8px 13px #8a6d4033}
}
@media(max-width:360px){
 #my-notebook .archive-week,.bookshelf-grid.archive-week{gap:8px;padding:8px;border-width:6px}
 .archive-week .cabinet-book{padding:13px 8px 26px}
 .archive-grid .mini-book span,.archive-grid .shelf-book strong{font-size:12px}
 .archive-diary .mini-book span,.archive-diary .shelf-book strong{font-size:14px}
}

/* Three books per row, on both the home shelf and the full collection. */
#my-notebook .archive-grid,.bookshelf-grid.archive-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.archive-grid .mini-book span,.archive-grid .shelf-book strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;min-height:3.2em}
@media(max-width:740px){
 #my-notebook .archive-grid,.bookshelf-grid.archive-grid{padding:12px 8px 10px;gap:14px 8px;border-width:6px}
 .archive-grid .cabinet-book{padding:10px 3px 22px}
 .archive-week .cabinet-book{padding:13px 3px 22px}
 .archive-month .cabinet-book{padding:23px 3px 22px;border-radius:70px 70px 3px 3px;box-shadow:inset 0 0 0 3px #f9f1e0,inset 0 7px 12px #8a6d4033}
 .archive-grid .mini-book span,.archive-grid .shelf-book strong{font-size:12px;line-height:1.5;margin-top:11px;min-height:3em}
}
@media(max-width:360px){
 #my-notebook .archive-grid,.bookshelf-grid.archive-grid{padding-left:6px;padding-right:6px;gap:12px 6px;border-width:5px}
 .archive-grid .cabinet-book{padding-left:2px;padding-right:2px}
 .archive-grid .mini-book span,.archive-grid .shelf-book strong{font-size:11px}
}
/* Opening and page turns animate only the paper, keeping the viewport steady. */
.reader-modal{animation:reader-dialog-in .3s ease-out both}
.reader-opening .reader-stage{animation:reader-unfold .55s cubic-bezier(.2,.65,.3,1) both}
.reader-stage{cursor:pointer}
.reader-stage.is-dragging .reader-page:not(.turning-sheet){transform:translateX(var(--page-drag,0px));transition:none}
.reader-page:not(.turning-sheet){transition:transform .18s ease-out}
.reader-page.turning-sheet{position:absolute;inset:0;transform-origin:left center;will-change:transform,opacity;box-shadow:8px 0 20px #41362225}
.reader-page.turning-sheet.forward{animation:reader-turn-forward .48s cubic-bezier(.25,.1,.25,1) both}
.reader-page.turning-sheet.backward{transform-origin:right center;animation:reader-turn-backward .48s cubic-bezier(.25,.1,.25,1) both}
.reader-page.turning-sheet:after{background:linear-gradient(90deg,#332c241a,transparent 30%,#fffaf13d 70%,#332c2425);animation:reader-paper-shade .48s ease-in-out both}
@keyframes reader-dialog-in{from{opacity:0;transform:translateY(16px)}to{opacity:1;transform:none}}
@keyframes reader-unfold{from{opacity:.4;transform:translateY(16px) scale(.94) rotateY(-12deg) rotateZ(-1deg)}to{opacity:1;transform:none}}
@keyframes reader-turn-forward{0%{transform:rotateY(0);opacity:1}70%{opacity:1}100%{transform:rotateY(-112deg);opacity:0}}
@keyframes reader-turn-backward{0%{transform:rotateY(0);opacity:1}70%{opacity:1}100%{transform:rotateY(112deg);opacity:0}}
@keyframes reader-paper-shade{0%{opacity:0}55%{opacity:1}100%{opacity:.3}}
@media(prefers-reduced-motion:reduce){
 .reader-modal,.reader-opening .reader-stage,.reader-page.turning-sheet,.reader-page.turning-sheet:after{animation:none}
 .reader-stage.is-dragging .reader-page:not(.turning-sheet){transform:none}
 .reader-page:not(.turning-sheet){transition:none}
}
