/* Folio v0.9 preview — rebuilt from the approved paper mock */
:root{--v9-paper:url("media/paper/folio-washi-v090.png");--v9-tape:url("media/decorations/folio-tape-v090.svg");--v9-flower:url("media/decorations/folio-sprig-v090.svg");--v9-clip:url("media/decorations/folio-paperclip-v090.svg");--v9-ink:#2d2d28;--v9-soft:#756b5d;--v9-line:rgba(91,73,48,.16);--v9-sheet:rgba(255,251,240,.76);--v9-shadow:0 5px 14px rgba(68,47,26,.12)}
html,body{color:var(--v9-ink);background:#f3ede4}body{font-family:var(--body)}
.paper-page,.detail-paper,.contents-page,.weather-forecast-paper,.today-agenda-paper,.quick-capture-paper,.calendar-day-paper,#taskForm{background-color:#f9efdd;background-image:linear-gradient(rgba(255,255,255,.1),rgba(218,190,145,.05)),var(--v9-paper);background-size:auto,620px 620px}
.paper-card,.calendar-card,.family-upcoming-panel,.priority-a-panel,.settings-list,.ai-chat-sheet,.schedule-candidate,.candidate-empty{border:0;border-radius:3px 8px 4px 6px;background-color:var(--v9-sheet);background-image:var(--v9-paper);background-size:460px;box-shadow:var(--v9-shadow)}
.section-heading>span,.today-heading-button,.detail-header h1{color:#33332e;background:var(--v9-tape) center/100% 100% no-repeat;box-shadow:none}
.weather-card{border:5px solid rgba(255,252,242,.92);border-radius:3px 8px 2px 6px;box-shadow:3px 6px 12px rgba(68,51,31,.17)}.weather-card::after{width:65px;height:18px;top:-12px;left:53%;background:var(--v9-tape) center/100% 100% no-repeat}.weather-card::before{background:linear-gradient(90deg,rgba(172,216,231,.04),rgba(246,239,210,.36))}
.weather-main{position:relative}.weather-main::after{content:"";position:absolute;z-index:5;width:24px;height:62px;top:-17px;right:-10px;background:var(--v9-clip) center/contain no-repeat;transform:rotate(8deg)}
.left-sticker-plant,.mini-photo,.large-polaroid{border-radius:1px;background:var(--v9-paper) center/320px;box-shadow:3px 6px 11px rgba(57,40,24,.2)}
[data-photo-slot] img,.memo-photo img,.large-polaroid img,.photo-editor-stage img{object-fit:var(--photo-fit,contain)!important;object-position:calc(50% + var(--photo-x,0%)) calc(50% + var(--photo-y,0%))!important;transform:rotate(var(--photo-rotation,0deg)) scale(var(--photo-scale,1))!important;transform-origin:center!important}
.today-card,.family-today-panel,.family-upcoming-panel,.priority-a-panel,.candidate-box-paper,.folio-ai-paper{position:relative}.today-card::after,.family-today-panel::after,.priority-a-panel::after,.candidate-box-paper::after,.folio-ai-paper::after{content:"";position:absolute;width:47px;height:63px;right:3px;bottom:0;background:var(--v9-flower) center/contain no-repeat;opacity:.62;pointer-events:none}
.favorites{position:relative}.favorites::after{content:"";position:absolute;z-index:-1;left:6%;right:10%;top:2px;height:15px;background:var(--v9-tape) center/100% 100% no-repeat;opacity:.65}.favorites small,.right-apps-grid small{display:none!important}.app-tile{border:3px solid rgba(255,252,244,.96);border-radius:7px!important;box-shadow:2px 3px 6px rgba(55,43,27,.16)}
.calendar-card{transform:rotate(.08deg);box-shadow:2px 5px 12px rgba(74,53,31,.11)}.calendar-day{background:rgba(255,252,244,.13)}.book-spine{background:linear-gradient(90deg,rgba(23,16,11,.5),rgba(255,248,229,.46) 44%,rgba(29,19,12,.43));box-shadow:inset 4px 0 8px rgba(0,0,0,.2),inset -4px 0 8px rgba(0,0,0,.14)}
.folio-edge-tabs button,.page-turn-tab,.right-page-tab-group button,.cover-ai-shortcuts button{background-image:var(--v9-paper);background-blend-mode:multiply;border-color:rgba(86,66,43,.18);box-shadow:1px 3px 7px rgba(72,50,27,.14)}
.folio-edge-tabs button:nth-child(1){background-color:#efc58d}.folio-edge-tabs button:nth-child(2){background-color:#cfd9a9}.folio-edge-tabs button:nth-child(3){background-color:#9fd2e4}.folio-edge-tabs button:nth-child(4){background-color:#efb3a4}.folio-edge-tabs button:nth-child(5){background-color:#c9b7d8}
.priority-a-list{min-height:0;overflow:auto;scrollbar-width:thin}.priority-a-row{display:grid;grid-template-columns:19px 84px minmax(0,1fr) 42px;align-items:center;gap:4px;min-height:24px;border-bottom:1px dashed var(--v9-line);font-size:9px}.priority-a-row>b{display:grid;place-items:center;width:17px;height:17px;border-radius:50%;color:#fff;background:#cc735d}.priority-a-row time{color:var(--v9-soft);font:8px var(--utility)}.priority-a-row button{padding:2px;text-align:left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.priority-a-row>span{padding:2px 4px;color:#fff;background:var(--person);font-size:7px;text-align:center}
.today-list,.family-upcoming-body{overscroll-behavior:contain;scrollbar-width:thin}.page-fold-actions{background:none!important}.page-fold-actions button{box-shadow:0 3px 8px rgba(52,39,25,.19)}.capture-source-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.capture-source-grid>button{min-height:78px}#taskPriorityRow[hidden]{display:none!important}

/* Folio AI: a single narrow memo page, not a dashboard. */
.detail-view{background:#f3ece2}.detail-paper{position:relative;border:7px solid #4e3b2f;border-radius:18px 22px 18px 20px;box-shadow:inset 0 0 18px rgba(86,62,35,.1),0 15px 30px rgba(66,44,26,.18)}.detail-header{border-bottom:1px dashed rgba(84,71,51,.23)}
.detail-header .eyebrow,.folio-ai-header .eyebrow,.candidate-box-intro .eyebrow,.ai-composer>label,.ai-composer>small,.ai-margin-note{display:none}.folio-ai-view{padding:12px max(66px,env(safe-area-inset-left)) 12px 12px}.folio-ai-paper{width:min(430px,calc(100vw - 96px));height:calc(100dvh - 24px);min-height:0;padding:12px 13px;border:0;border-radius:10px 20px 17px 9px}
.folio-ai-header{min-height:52px;padding:0 2px 8px}.folio-ai-header h1{padding:2px 8px;background:transparent;font-size:17px}.folio-ai-header .ai-connection-pill{display:none}.ai-header-actions>button{min-width:0;padding:5px 8px}.ai-header-actions>button span{font-size:0}.ai-header-actions>button b{font-size:9px}.folio-ai-header::after{content:"GPT-5.6 Luna⌄";position:absolute;top:11px;right:68px;padding:6px 10px;border:1px solid rgba(82,71,54,.16);border-radius:15px;background:rgba(255,252,244,.72);font:9px var(--utility)}
.folio-ai-layout{height:calc(100% - 54px);display:block}.ai-chat-sheet{position:relative;height:100%;display:grid;grid-template-rows:minmax(0,1fr) auto auto;padding:17px 10px 10px;overflow:hidden;background-color:rgba(255,250,240,.36);box-shadow:none}.ai-chat-sheet::before{content:"";position:absolute;width:74px;height:20px;top:-7px;right:28px;background:var(--v9-tape) center/100% 100% no-repeat;transform:rotate(2deg)}
.ai-messages{max-height:none;padding:5px 3px 10px}.ai-message{width:82%;margin-bottom:14px;padding:10px 12px;border:0!important;border-radius:3px 10px 4px 7px;background-image:var(--v9-paper)!important;background-size:340px!important;box-shadow:1px 3px 7px rgba(74,55,33,.1);transform:rotate(-.18deg)}.ai-message[data-role=user]{background-color:#f5dcb8!important;transform:rotate(.2deg)}.ai-message[data-role=assistant]{background-color:#fffaf1!important}.ai-message small{display:none}.ai-message p{font:12px/1.7 var(--body)}
.ai-suggestions{gap:6px;padding:6px 2px 9px}.ai-suggestions button{min-height:30px;padding:5px 9px;border:1px solid rgba(91,79,59,.16);border-radius:14px;background:rgba(255,251,241,.7)}.ai-composer{padding:9px 0 0;border-top:1px solid rgba(84,72,53,.12)}.ai-composer textarea{min-height:42px;max-height:96px;padding:9px 10px;border-radius:18px;font-size:11px}.ai-composer button{min-width:44px;padding:6px;border-radius:50%;background:transparent;color:#222}.ai-composer button span{display:none}
.candidate-box-paper{overflow:auto}.candidate-box-intro{border:0;background:transparent}.candidate-box-intro h2{background:var(--v9-tape) center/100% 100% no-repeat;padding:5px 15px}.candidate-box-list{grid-template-columns:repeat(2,minmax(0,1fr))}.schedule-candidate{position:relative;padding:14px;border-top:0;background-image:var(--v9-paper)}.schedule-candidate::before{content:"";position:absolute;width:74px;height:18px;top:-8px;left:50%;background:var(--v9-tape) center/100% 100% no-repeat;transform:translateX(-50%) rotate(-1deg)}

@media(min-width:840px){
 .topbar{display:none}.views{height:100dvh}.home-view.is-active{height:100dvh;background:#f3ece2}
 .home-view .book{width:calc(100vw - 22px);height:calc(100dvh - 18px);min-height:0;margin:9px auto;padding:10px 12px;grid-template-columns:minmax(0,1fr) 13px minmax(0,1fr);border:3px solid #12110f;border-radius:30px 32px 28px 30px;background:linear-gradient(90deg,#10100f,#46382e 2%,#49382b 48%,#151310 50%,#49382b 52%,#45372c 98%,#10100f);box-shadow:inset 0 0 0 3px rgba(228,206,170,.13),0 10px 24px rgba(54,38,25,.24)}
 .home-view .paper-page{height:100%;padding:16px 20px 13px;border-radius:7px 2px 2px 7px;box-shadow:inset 0 0 20px rgba(103,73,42,.09)}.home-view .right-page{border-radius:2px 7px 7px 2px}
 .home-view .left-page{grid-template-rows:minmax(0,31%) minmax(0,36%) 100px minmax(0,1fr) 35px!important;gap:7px}.home-view .folio-greeting{display:none}
 .home-view .left-page::before{content:"今日の天気";position:absolute;z-index:7;top:12px;right:auto;bottom:auto;left:27px;width:auto;height:auto;padding:4px 18px 3px;background:var(--v9-tape) center/100% 100% no-repeat;font:12px var(--display);letter-spacing:.08em;transform:rotate(-1deg)}
 .home-view .left-page>.weather-card{grid-row:1;width:68%;height:100%;margin:0!important}.home-view .left-sticker-plant{top:15px!important;right:19px!important;width:28%!important;height:30%!important}
 .home-view .left-page>.today-card{grid-row:2;height:100%;margin:0!important;padding:8px 11px}.home-view .today-list{height:calc(100% - 31px);max-height:none;overflow-y:auto}.home-view .today-card .upcoming-toggle,.home-view .today-card .cover-upcoming{display:none!important}
 .home-view .left-page>.favorites{grid-row:3;height:100%;margin:0!important;padding:9px 6px 2px!important;gap:clamp(9px,1.4vw,18px);flex-wrap:nowrap;justify-content:flex-start}.home-view .left-page>.favorites::before{display:none!important}.home-view .left-page>.favorites button:nth-child(n+6){display:none}.home-view .left-page>.left-lower-controls{grid-row:5}
 .home-view .right-page{grid-template-rows:minmax(0,52%) minmax(0,22%) minmax(0,12%) minmax(0,14%)!important;gap:7px}.home-view .right-page::before{display:none!important}.home-view .right-page>.calendar-card{grid-row:1;height:100%;padding:13px 9px 7px;grid-template-rows:38px 21px minmax(0,1fr)!important}.home-view .right-page>.calendar-card::before{display:none!important}
 .home-view .right-page>.family-today-mount{grid-row:2;min-height:0}.home-view .right-page .family-today-panel{height:100%;padding:7px 39% 7px 10px}.home-view .right-page .family-today-list{height:calc(100% - 26px);overflow:auto}.home-view .right-page .bottom-photo{display:block!important;width:36%!important;height:84%!important;right:1.5%!important;bottom:6%!important;transform:rotate(2deg)}
 .home-view .right-page>.priority-a-panel{display:block;grid-row:3;min-height:0;padding:4px 9px}.priority-a-panel .section-heading{min-height:22px;margin-bottom:1px}.priority-a-panel .section-heading>span{font-size:12px;padding:2px 10px}.priority-a-panel .section-heading>small{font-size:7px}.priority-a-list{height:calc(100% - 23px)}
 .home-view .right-page>.family-upcoming-panel{display:block!important;grid-row:4;min-height:0;margin:0;padding:4px 9px}.home-view .family-upcoming-panel .section-heading{min-height:21px;margin-bottom:1px}.home-view .family-upcoming-panel .section-heading>span{font-size:12px;padding:2px 10px}.home-view .family-upcoming-body{height:calc(100% - 22px);min-height:0;padding:0;overflow-y:auto}.home-view .family-upcoming-row{min-height:22px;grid-template-columns:39px 70px minmax(0,1fr);gap:4px}.home-view .family-upcoming-row button{font-size:8px;padding:2px}.home-view .family-upcoming-row time,.home-view .family-upcoming-row .family-name{font-size:7px}
 .home-view .right-page>.right-lower-controls{display:none!important}.right-page-tab-group-left{height:32px}.right-page-tab-group-left button{min-height:30px;padding:3px}.page-fold-actions{right:18px;bottom:13px;width:48px;height:48px;padding:0}.page-fold-actions button{width:43px;height:43px}.folio-edge-tabs{right:4px;top:74px}.folio-edge-tabs button{width:36px;min-height:70px;font-size:9px}
}
@media(max-width:839px){
 .topbar{display:none}.views{height:100dvh}.home-view.is-active{height:100dvh;background:#f3ece2}.home-view .book{width:calc(100vw - 8px);height:calc(100dvh - 8px);margin:4px;padding:7px;overflow:hidden;border:2px solid #171512;border-radius:23px;background:#44352b}.home-view .paper-page{width:100%;min-width:0;padding:9px 11px 11px;overflow:hidden}
 .home-view .left-page{display:grid;grid-template-rows:49px minmax(0,24%) minmax(230px,40%) minmax(66px,1fr) 58px;gap:6px}.home-view .folio-greeting{grid-row:1;display:flex;padding:0 5px}.folio-greeting strong{font-size:17px}.folio-greeting small{margin-top:1px;font-size:8px}.cover-masthead,.cover-scraps{display:none!important}
 .home-view .left-page>.weather-card{grid-row:2;width:100%;min-width:0;height:100%;margin:0;grid-template-columns:43% 31% 26%;overflow:hidden}.home-view .weather-main{padding-left:8px;padding-right:5px}.home-view .weather-stats{padding-left:5px;padding-right:4px;font-size:7px}.home-view .left-sticker-plant{top:9px!important;right:8px!important;width:66px!important;height:50px!important}
 .home-view .left-page>.today-card{grid-row:3;width:100%;height:100%;margin:0;padding:6px 8px}.home-view .today-list{height:calc(100% - 56px);max-height:none;overflow-y:auto}.home-view .cover-upcoming{max-height:58px;overflow-y:auto}
 .home-view .left-page>.favorites{grid-row:4;height:100%;margin:0;padding:4px 3px 0;gap:8px;align-items:center;justify-content:space-around;flex-wrap:nowrap;overflow:hidden}.home-view .left-page>.favorites::before{display:none}.home-view .left-page>.favorites button{width:44px;flex:0 0 44px}
 .home-view .family-today-panel,.home-view #familyTodayHomeAnchor,.home-view .priority-a-panel{display:none!important}.home-view .cover-ai-shortcuts{grid-row:5;position:static;display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0}.cover-ai-shortcuts button{min-height:52px;padding:6px 8px;border-radius:4px 8px 3px 6px}.cover-ai-shortcut{background-color:#efd5c4}.cover-candidate-shortcut{background-color:#e9d5aa}.left-lower-controls,.page-fold-actions{display:none!important}
 .folio-ai-view{padding:0}.folio-ai-paper{width:100%;height:100dvh;padding:10px 11px;border-radius:0}.candidate-box-paper{width:100%;min-height:100dvh;border-width:0;border-radius:0}.candidate-box-list{grid-template-columns:1fr}.candidate-box-intro{display:block;padding:8px 2px}.candidate-source-legend{flex-wrap:wrap}.folio-edge-tabs{display:none!important}.capture-source-grid>button{min-height:66px}
}
@media(max-width:390px) and (max-height:760px){.home-view .left-page{grid-template-rows:43px 150px minmax(240px,1fr) 62px 54px}.cover-ai-shortcuts button{min-height:48px}}
@media(prefers-reduced-motion:reduce){.ai-message,.calendar-card,.schedule-candidate{transform:none!important}}

/* v0.9.0 final home order and cover density */
@media(min-width:840px){
 .home-view .left-page>.cover-scraps,.home-view .left-page>.cover-masthead{display:none!important}
 .home-view .left-page>.today-card,.home-view .left-page>.favorites{background:transparent!important;background-image:none!important;background-blend-mode:normal!important;backdrop-filter:none!important;box-shadow:none!important;opacity:1!important;filter:none!important}
 .home-view .left-page>.today-card::before,.home-view .left-page>.favorites::before{display:none!important}
 .home-view .right-page{grid-template-rows:minmax(0,52%) minmax(0,12%) minmax(0,14%) minmax(0,22%)!important}
 .home-view .right-page>.priority-a-panel{grid-row:2!important}
 .home-view .right-page>.family-upcoming-panel{grid-row:3!important}
 .home-view .right-page>.family-today-mount{grid-row:4!important}
 .home-view .right-page .family-today-panel{padding-right:45%!important}
 .home-view .right-page .bottom-photo{width:42%!important;height:88%!important;right:1.5%!important;bottom:4%!important}
}
@media(max-width:839px){
 .home-view .left-page{grid-template-rows:minmax(0,24%) minmax(230px,35%) minmax(150px,1fr) 58px!important;gap:7px}
 .home-view .folio-greeting{display:none!important}
 .home-view .left-page>.weather-card{grid-row:1!important}
 .home-view .left-page>.today-card{grid-row:2!important;background-color:rgba(255,251,240,.9)!important;background-image:var(--v9-paper)!important}
 .home-view .left-page>.favorites{grid-row:3!important;display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));align-items:center;justify-items:center;gap:8px 6px;padding:8px 3px!important;background-color:rgba(255,251,240,.7)!important;background-image:var(--v9-paper)!important;overflow:visible}
 .home-view .left-page>.favorites button{display:grid!important;place-items:center;width:100%!important;min-width:0;height:100%;padding:1px;flex:none!important}
 .home-view .left-page>.favorites .app-tile{width:52px!important;height:52px!important;font-size:20px}
 .home-view .cover-ai-shortcuts{grid-row:4!important}
 .home-view .left-sticker-plant{top:9px!important}
}
@media(max-width:390px) and (max-height:760px){
 .home-view .left-page{grid-template-rows:145px minmax(210px,31%) minmax(130px,1fr) 52px!important}
 .home-view .left-page>.favorites{gap:4px}
 .home-view .left-page>.favorites .app-tile{width:43px!important;height:43px!important}
}
