/* v8.12 · bottom folio index, compact status-safe frame, press-to-edit and resize */
:root { --folio-cover:#f1efec; --folio-page:#faf9f7; }
html,body{background:var(--folio-cover)!important;-webkit-text-size-adjust:100%!important;overscroll-behavior:none!important}
html{height:100%;height:100dvh;}
body{min-height:0!important;max-height:100dvh!important;position:relative!important;}
/* Opaque backing under iOS status bar; avoids extending any translucent web header downward. */
body::before{content:"";position:fixed;inset:0 0 auto 0;height:env(safe-area-inset-top,0px);background:var(--folio-cover);pointer-events:none;z-index:0;}
.app-shell{
  height:100dvh!important;min-height:0!important;max-height:100dvh!important;
  padding-top:env(safe-area-inset-top,0px)!important;padding-bottom:0!important;
  background:var(--folio-cover)!important;isolation:isolate!important;
}
.app-header,.page-heading{background:var(--folio-page)!important;opacity:1!important;filter:none!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;}
.app-header{background:var(--folio-cover)!important;z-index:2!important;}
.main-view{flex:1 1 0%!important;min-height:0!important;overflow:hidden!important;}
/* The only footer is the actual paper index, right above the iOS home-indicator inset. */
.tab-bar{
  box-sizing:border-box!important;flex:0 0 calc(39px + env(safe-area-inset-bottom,0px))!important;
  height:calc(39px + env(safe-area-inset-bottom,0px))!important;
  min-height:calc(39px + env(safe-area-inset-bottom,0px))!important;
  margin:0 12px!important;padding:3px 5px env(safe-area-inset-bottom,0px)!important;
  gap:0!important;align-items:center!important;justify-content:space-between!important;
  background:var(--folio-page)!important;border-top:1px solid #d9d6d0!important;
  box-shadow:none!important;z-index:4!important;
}
.tab-bar .tab{flex:0 1 auto!important;min-width:0!important;width:auto!important;height:30px!important;min-height:30px!important;padding:1px 2px!important;border:0!important;font-size:9px!important;letter-spacing:.04em!important;}
.tab-bar .tab span{display:inline-block!important;padding:5px 5px!important;line-height:1.4!important;white-space:nowrap!important;}
.tab-bar .tab-add{
  flex:0 0 29px!important;width:29px!important;height:29px!important;min-width:29px!important;
  border:0!important;background:#272725!important;color:#fff!important;
  border-radius:2px!important;display:grid!important;place-items:center!important;
  padding:0!important;margin-left:auto!important;margin-right:3px!important;
  box-shadow:none!important;cursor:pointer;line-height:1!important;font-size:21px!important;font-weight:400!important;
}
.tab-add span{transform:translateY(-1px);line-height:1;}
@media(max-width:370px){
  .tab-bar{margin:0 9px!important;padding-inline:3px!important;}
  .tab-bar .tab{font-size:8px!important;padding-inline:0!important;}
  .tab-bar .tab span{padding:4px!important;}
  .tab-bar .tab-add{flex-basis:26px!important;width:26px!important;min-width:26px!important;height:26px!important;margin-right:1px!important;font-size:19px!important;}
}
/* Whole event/task surface is a tap target, not just its text label. */
.time-block[data-edit],.all-day-item[data-edit]{cursor:pointer;-webkit-touch-callout:none!important;user-select:none!important;-webkit-user-select:none!important;}
.time-block[data-drag-entry],.all-day-item[data-drag-entry],
.time-block[data-drag-entry] .inline-edit,.all-day-item[data-drag-entry] .all-edit{touch-action:none!important;-webkit-user-select:none!important;-webkit-touch-callout:none!important;}
.time-block.drag-armed,.all-day-item.drag-armed{outline:1px dashed #55514a!important;outline-offset:2px;}
.time-block.drag-source,.all-day-item.drag-source{opacity:.48!important;}
/* Handle selection is activated only after a 420ms hold and no drag. */
.time-block.resize-selected{overflow:visible!important;z-index:24!important;outline:1px solid #494a49!important;outline-offset:1px!important;}
.time-block.resize-selected .resize-handle{
  position:absolute;right:50%;left:auto;transform:translateX(50%);
  width:50px;height:16px;border:0!important;border-radius:12px!important;
  background:transparent!important;display:flex;align-items:center;justify-content:center;
  z-index:27!important;padding:0;touch-action:none!important;
}
.time-block .resize-handle::after{content:"";height:4px;width:32px;border-radius:4px;background:#2b3534;box-shadow:0 0 0 2px var(--folio-page);}
.time-block .resize-handle.handle-start{top:-9px;}
.time-block .resize-handle.handle-end{bottom:-9px;}
.time-block .resize-caption{position:absolute;bottom:0;right:4px;font-size:8px;line-height:1.4;letter-spacing:.02em;padding:1px 3px;background:var(--folio-page);color:#4e5d59;border-radius:2px;pointer-events:none;z-index:25;white-space:nowrap;}
.time-block.resize-selected .block-text{pointer-events:none;}
/* No shell-size footer/padding duplication. The timeline owns its scrolling area. */
.day-view,.timeline-shell{min-height:0!important;height:100%!important;max-height:100%!important;}
.timeline-scroll{min-height:0!important;max-height:100%!important;overscroll-behavior:contain!important;}
@supports not(height:100dvh){.app-shell{height:100vh!important;max-height:100vh!important;}}
