/* Schedule reader v2 (12-oct-2026). The PDF is drawn with PDF.js (assets/vendor/pdfjs-3.11.174), sharp at any zoom.
   No top bar: one floating panel (.dock) holds Download PDF, the page number and the zoom.
   - Wide screens (1200px+): a card floating at the top right, beside the page.
   - Tablets and phones: a bar fixed to the bottom edge, full width, rounded only on top.
   Zoom is done by viewer.js, never by the browser, so the panel stays put while zooming. */
:root{--green:#2F4A3A;--btn:#4A7A47;--btn-h:#3f6a3c;--cream:#F6F3EC;--paper:#E6E2D9;--ink:#1F2A22;--dock-bg:rgba(38,61,48,.94)}
*{box-sizing:border-box}
html{background:var(--paper);-webkit-text-size-adjust:100%;touch-action:pan-x pan-y}
body{margin:0;background:var(--paper);color:var(--ink);font-family:Inter,Helvetica,Arial,sans-serif;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:transparent;overscroll-behavior-x:none}
button{font:inherit;color:inherit}

/* Loading line, very top */
.prog{position:fixed;top:0;left:0;z-index:30;height:2px;width:0;background:var(--btn);transition:width .25s ease,opacity .4s ease .2s}
.prog.is-done{width:100%!important;opacity:0}

/* ---------- the document ---------- */
.doc{position:relative;display:flex;flex-direction:column;align-items:center;gap:18px;width:max-content;min-width:100%;padding:28px 24px;transform-origin:0 0}
.page{position:relative;flex:none;background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(31,42,34,.08),0 10px 30px rgba(31,42,34,.10);overflow:hidden;contain:strict}
.page::before{content:"";position:absolute;inset:0;background:linear-gradient(100deg,#fff 30%,#f3f1ec 50%,#fff 70%);background-size:220% 100%;animation:shimmer 1.4s linear infinite}
.page.is-drawn::before{display:none}
.page canvas{position:absolute;inset:0;width:100%;height:100%;display:block}
.page canvas.detail{inset:auto;z-index:1}
.page .lnk{position:absolute;z-index:2;display:block;border-radius:2px}
.page .lnk:hover{background:rgba(74,122,71,.10)}
@keyframes shimmer{from{background-position:120% 0}to{background-position:-120% 0}}

.status{position:fixed;inset:0;z-index:10;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:16px;padding:24px;text-align:center;font-size:15px;color:#4c5a50;pointer-events:none;transition:opacity .3s}
.status p{margin:0}
.status.is-gone{opacity:0}
.status .spin{width:28px;height:28px;border-radius:50%;border:2.5px solid rgba(47,74,58,.18);border-top-color:var(--green);animation:spin .8s linear infinite}
.status.is-error{pointer-events:auto}
.status.is-error .spin{display:none}
.status a{color:#fff;background:var(--btn);text-decoration:none;font-weight:600;padding:12px 20px;border-radius:10px}
@keyframes spin{to{transform:rotate(360deg)}}

.end{position:sticky;left:0;width:100vw;max-width:100%;text-align:center;padding:6px 20px calc(110px + env(safe-area-inset-bottom));font-size:14px;color:#56625a;line-height:1.55}
.end p{margin:0}
.end a{color:var(--green);text-underline-offset:3px}
.doc.is-loading~.end{visibility:hidden}

/* ---------- the floating panel ---------- */
.dock{position:fixed;z-index:20;display:flex;align-items:center;color:var(--cream);background:var(--dock-bg);-webkit-backdrop-filter:blur(14px) saturate(1.2);backdrop-filter:blur(14px) saturate(1.2);box-shadow:0 1px 0 rgba(255,255,255,.06) inset,0 10px 34px rgba(20,32,25,.28),0 2px 6px rgba(20,32,25,.16);transition:opacity .35s ease,transform .35s ease}
.dock.is-wait{opacity:0;pointer-events:none}
.dock__ttl{display:none}
.dock__dl{display:inline-flex;align-items:center;justify-content:center;gap:8px;background:var(--btn);color:#fff;text-decoration:none;font-weight:600;font-size:14.5px;white-space:nowrap;box-shadow:0 1px 0 rgba(255,255,255,.12) inset,0 2px 8px rgba(0,0,0,.18);transition:background .15s,transform .12s}
.dock__dl:hover{background:var(--btn-h)}
.dock__dl:active{transform:scale(.97)}
.dock__dl svg{width:18px;height:18px;flex:none}
.dock__pg{font-size:13.5px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap;color:var(--cream)}
.dock__pg i{font-style:normal;color:rgba(246,243,236,.5);margin:0 3px}
.dock__zoom{display:inline-flex;align-items:center;border-radius:999px;background:rgba(255,255,255,.08)}
.dock__zoom button{border:0;background:none;cursor:pointer;height:32px;min-width:32px;border-radius:999px;display:inline-flex;align-items:center;justify-content:center;transition:background .15s,opacity .15s}
.dock__zoom button:hover{background:rgba(255,255,255,.12)}
.dock__zoom button:disabled{opacity:.3;cursor:default;background:none}
.dock__zoom button svg{width:16px;height:16px}
.dock__zoom .dock__pct{min-width:58px;padding:0 6px;font-size:13px;font-weight:500;font-variant-numeric:tabular-nums}
.dock button:focus-visible,.dock a:focus-visible{outline:2px solid #9DC08B;outline-offset:2px}

/* Wide screens: card on the right, beside the page */
@media (min-width:1200px){
  .dock{right:28px;top:28px;width:196px;flex-direction:column;align-items:stretch;gap:14px;padding:18px 16px 16px;border-radius:18px}
  .dock.is-wait{transform:translateY(-10px)}
  .dock__ttl{display:flex;flex-direction:column;gap:5px;line-height:1.1;padding:0 2px}
  .dock__ttl b{font-family:'Cormorant Garamond',Georgia,serif;font-weight:400;font-size:23px}
  .dock__ttl span{font-size:12px;letter-spacing:.02em;color:rgba(246,243,236,.66)}
  .dock__dl{height:44px;border-radius:11px}
  .dock__row{display:flex;flex-direction:column;gap:10px;padding-top:14px;border-top:1px solid rgba(246,243,236,.12)}
  .dock__pg{display:flex;justify-content:space-between;align-items:baseline;padding:0 2px;color:rgba(246,243,236,.7);font-size:12.5px}
  .dock__pg b{font-weight:500;color:var(--cream);font-size:14px}
  .dock__zoom{justify-content:space-between;padding:3px}
}
/* Tablets and phones: a bar fixed to the bottom edge, full width, rounded only on top. Left: the retreat and the page you are on. Right: Download PDF.
   The zoom sits under the name, next to the page number (tablets: - % +; phones: only the % while zoomed, tap = back to fit) */
@media (max-width:1199px){
  .dock{left:0;right:0;bottom:0;transform:none;
    display:grid;grid-template-columns:auto 1fr auto;grid-template-areas:"ttl ttl dl" "pg zoom dl";column-gap:10px;row-gap:4px;align-items:center;
    padding:12px max(16px,env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(20px,env(safe-area-inset-left));border-radius:20px 20px 0 0;
    box-shadow:0 1px 0 rgba(255,255,255,.07) inset,0 -8px 28px rgba(20,32,25,.20),0 -1px 4px rgba(20,32,25,.10)}
  .dock.is-wait{transform:translateY(100%)}
  .dock__ttl{display:block;grid-area:ttl;min-width:0;line-height:1.1}
  .dock__ttl b{display:block;font-family:'Cormorant Garamond',Georgia,serif;font-weight:400;font-size:20px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .dock__ttl span{display:none}
  .dock__row{display:contents}
  .dock__pg{grid-area:pg;display:flex;align-items:center;min-height:26px;font-size:12.5px;color:rgba(246,243,236,.72)}
  .dock__pg b{font-weight:500;color:var(--cream)}
  .dock__pg-l{margin-right:4px}
  .dock__zoom{grid-area:zoom;justify-self:start;height:26px;padding:0 2px}
  .dock__zoom button{height:24px;min-width:26px}
  .dock__zoom button svg{width:14px;height:14px}
  .dock__zoom .dock__pct{min-width:48px;font-size:12px}
  .dock__dl{grid-area:dl;height:46px;padding:0 18px;border-radius:13px}
}
@media (max-width:760px){
  .doc{gap:10px;padding:10px 8px 20px}
  .dock__zoom{display:none;background:rgba(255,255,255,.14)}
  .dock.is-zoomed .dock__zoom{display:inline-flex}
  .dock__zoom [data-z=in],.dock__zoom [data-z=out]{display:none}
  .dock__zoom .dock__pct{padding:0 9px}
  .dock__pct::after{content:"";width:8px;height:8px;margin-left:6px;background:currentColor;opacity:.75;
    -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 1.5l7 7M8.5 1.5l-7 7' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat;
            mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M1.5 1.5l7 7M8.5 1.5l-7 7' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center/contain no-repeat}
}
@media (max-width:420px){
  .dock{column-gap:8px;padding-left:max(18px,env(safe-area-inset-left))}
  .dock__ttl b{font-size:18.5px}
  .dock__dl{padding:0 15px;font-size:14px;gap:7px}
  .dock__dl svg{width:17px;height:17px}
}
@media (max-width:370px){
  .dock{padding-left:max(16px,env(safe-area-inset-left));padding-right:max(12px,env(safe-area-inset-right))}
  .dock__dl .dl__pdf{display:none}
}
@media (max-width:340px){
  .dock__ttl b{font-size:17px}
  .dock__dl{padding:0 13px}
}
@media (prefers-reduced-motion:reduce){.page::before{animation:none}.status .spin{animation-duration:2s}.dock{transition:none}}
@media print{.dock,.prog,.status,.end{display:none}}
