/* 細い付箋・広い手帳を維持し、天気カードと手帳内の撮影位置を整える。 */
.folio-reference {--folio-page-left:27px;--folio-page-right:27px;--capture-footer:0px}
.folio-reference .detail-view,.folio-reference .ref-detail.is-active,.folio-reference .ref-home.is-active,.folio-reference .ref-book-view.is-active {
 padding-top:max(3px,env(safe-area-inset-top))!important;padding-bottom:max(3px,env(safe-area-inset-bottom))!important;
}
.folio-reference .ref-home.is-active {--folio-page-left:2px;--folio-page-right:2px}
.folio-reference .ref-book {padding:5px;border-radius:18px}
/* 天気カードを元の左ページへ戻す。文字の詳細だけを外す。 */
.folio-reference .ref-home.is-active {padding-top:0!important}
.folio-reference .ref-left {padding-top:0}
.folio-reference .ref-weather .weather-details {display:none!important}
.folio-reference .ref-weather .weather-copy {top:max(5%,env(safe-area-inset-top))}
/* 写真や操作と重ならないよう、右ページの内側に撮影用の余白を確保する。 */
.folio-reference .ref-right {padding-bottom:52px}
.folio-reference .ref-book-view>.ref-spread-paper {padding-bottom:52px!important}
.folio-reference .detail-view>.detail-paper {padding-bottom:52px!important}
.folio-reference .folio-edge-tabs,.folio-reference .folio-left-tabs {width:23px!important;top:9%;gap:3px;max-height:calc(91dvh - var(--capture-footer) - 8px - env(safe-area-inset-bottom))}
.folio-reference .folio-edge-tabs button,.folio-reference .folio-left-tabs button {width:23px!important;min-width:23px!important;height:clamp(80px,14dvh,116px)!important;padding:5px 3px!important;border-radius:3px!important;font-size:10px!important;letter-spacing:.04em}
.folio-reference .folio-edge-tabs [data-return-home] {height:54px!important}
.folio-reference .contents-list>button[hidden] {display:none!important}
.folio-reference .contents-list {grid-auto-rows:minmax(66px,110px);align-content:start}
.folio-reference .contents-page {overflow:auto}
.folio-reference .capture-screen-button {
 position:fixed;right:calc(var(--folio-page-right) + 14px + env(safe-area-inset-right));bottom:calc(13px + env(safe-area-inset-bottom));z-index:60;
 width:76px;height:44px;min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;padding:6px 10px;
 border:1px solid #b5a38188;border-radius:5px 5px 10px 5px;background:#fff8ec;color:#514b3c;box-shadow:0 2px 4px #806b4926;font:12px/1.3 var(--body);touch-action:manipulation;
}
.capture-screen-button svg {width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:1.5;stroke-linecap:round;stroke-linejoin:round}
.folio-reference.dark .capture-screen-button {background:#414638;color:#f3e6cd}
.folio-reference.is-capturing .capture-screen-button {visibility:hidden;pointer-events:none}
.folio-reference.contents-open .capture-screen-button {visibility:hidden}
.folio-reference .capture-screen-button:disabled {opacity:.55}
@media(width < 700px), (aspect-ratio < 4/5) {
 .folio-reference {--folio-page-left:3px;--folio-page-right:26px}
 .folio-reference .ref-left {padding:0 2% 52px;grid-template-rows:minmax(120px,26%) minmax(150px,29%) minmax(80px,17%) minmax(100px,1fr) 42px}
 .folio-reference .ref-home.is-cover-calendar .ref-right {padding-bottom:52px}
 .folio-reference .ref-book {border-radius:15px}
}
@media(max-height:600px) {
 .folio-reference .folio-edge-tabs,.folio-reference .folio-left-tabs {top:5px;max-height:calc(100dvh - var(--capture-footer) - 12px)}
 .folio-reference .folio-edge-tabs button,.folio-reference .folio-left-tabs button {height:clamp(44px,14dvh,74px)!important}
 .folio-reference .folio-edge-tabs [data-return-home] {height:40px!important}
}

.folio-reference:has(.ref-home.is-active) .capture-screen-button {right:calc(16px + env(safe-area-inset-right))}
.folio-reference.contents-open .ref-version {visibility:hidden}
