/* Lake Club Messages — flipbook viewer */
:root{--bg:#0d1b26;--bar:rgba(9,20,29,.92);--ink:#eef4f8;--mut:#9fb3c2;--btn:rgba(255,255,255,.08);--btnh:rgba(255,255,255,.16);--acc:#5fb3e4}
*{box-sizing:border-box}
html,body{margin:0;height:100%;overflow:hidden;overscroll-behavior:none}
body{background:radial-gradient(120% 90% at 50% 40%,#18334a 0%,var(--bg) 70%) fixed var(--bg);color:var(--ink);
  font:15px/1.4 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;display:flex;flex-direction:column;height:100vh;height:100dvh;
  -webkit-tap-highlight-color:transparent}
svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}

/* top bar */
.bar{flex:none;display:flex;align-items:center;gap:12px;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top));background:var(--bar);border-bottom:1px solid rgba(255,255,255,.06);min-height:56px}
.logo{flex:none;display:block}.logo img{height:36px;width:auto;max-width:180px;object-fit:contain;display:block}
.ttl{flex:1;min-width:0}
.ttl h1{margin:0;font-size:16px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ttl span{display:block;font-size:12.5px;color:var(--mut);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tools{flex:none;display:flex;gap:4px}
.ib{display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;border-radius:10px;border:0;background:transparent;color:var(--ink);cursor:pointer;text-decoration:none;font-size:20px}
.ib:hover,.ib:focus-visible{background:var(--btnh);outline:none}
.no-fs [data-act=fs]{display:none}

/* stage */
#stage{flex:1;position:relative;min-height:0;padding:14px 14px 8px;display:flex;align-items:center;justify-content:center}
#book{width:100%;height:100%;min-width:0!important;min-height:0!important}
.stf__parent{position:relative;display:block;box-sizing:border-box;transform:translateZ(0);touch-action:pan-y}
.stf__wrapper{position:relative;width:100%;height:100%!important;padding-bottom:0!important;box-sizing:border-box}
.stf__block{position:absolute;width:100%;height:100%;box-sizing:border-box;perspective:2000px}
.stf__item{display:none;position:absolute;transform-style:preserve-3d}
.stf__outerShadow,.stf__innerShadow,.stf__hardShadow,.stf__hardInnerShadow{position:absolute;left:0;top:0}
.page{background:#fff;overflow:hidden}
.page img{display:block;width:100%;height:100%;object-fit:contain;background:#fff;user-select:none;-webkit-user-drag:none;pointer-events:none}
.stf__item.--left .page,.page.--left{box-shadow:inset -8px 0 18px -10px rgba(0,0,0,.35)}
.stf__item.--right .page,.page.--right{box-shadow:inset 8px 0 18px -10px rgba(0,0,0,.35)}

/* single-page message */
.single #book{display:flex;align-items:center;justify-content:center}
.single .page{max-width:100%;max-height:100%;height:100%;aspect-ratio:auto;background:none;display:flex;align-items:center;justify-content:center}
.single .page img{width:auto;height:auto;max-width:100%;max-height:100%;box-shadow:0 10px 40px rgba(0,0,0,.45)}
.single .ctl .nav:not(.zm),.single .ctl .count{display:none}

/* loading */
.spin{position:absolute;left:50%;top:50%;width:38px;height:38px;margin:-19px 0 0 -19px;border-radius:50%;border:3px solid rgba(255,255,255,.18);border-top-color:var(--acc);animation:sp .8s linear infinite;display:none}
.loading .spin{display:block}.loading #book{opacity:0}
#book{transition:opacity .35s}
@keyframes sp{to{transform:rotate(360deg)}}

/* bottom controls */
.ctl{flex:none;display:flex;align-items:center;justify-content:center;gap:10px;padding:6px 12px 10px;padding-bottom:max(10px,env(safe-area-inset-bottom))}
.nav{width:46px;height:46px;border-radius:50%;border:0;background:var(--btn);color:var(--ink);cursor:pointer;display:inline-flex;align-items:center;justify-content:center}
.nav:hover,.nav:focus-visible{background:var(--btnh);outline:none}
.at-start [data-act=prev],.at-end [data-act=next]{opacity:.3;pointer-events:none}
.count{min-width:96px;height:38px;padding:0 14px;border-radius:19px;border:0;background:var(--btn);color:var(--ink);font:600 14px/1 inherit;font-variant-numeric:tabular-nums;cursor:pointer}
.zm{margin-left:10px}

/* zoom overlay */
#zoom{position:fixed;inset:0;z-index:50;background:#081219;display:flex;flex-direction:column}
#zoom[hidden]{display:none}
.zbar{flex:none;display:flex;align-items:center;gap:6px;padding:8px 12px;padding-top:max(8px,env(safe-area-inset-top));background:var(--bar)}
.zbar span{flex:1;color:var(--mut);font-size:14px}
.zscroll{flex:1;overflow:auto;-webkit-overflow-scrolling:touch;display:grid;place-items:center;touch-action:pan-x pan-y}
.zpages{display:flex;margin:auto}
.zpages img{flex:1;min-width:0;width:100%;height:100%;object-fit:contain;background:#fff;display:block}

/* toast */
#toast{position:fixed;left:50%;bottom:90px;transform:translate(-50%,20px);background:#fff;color:#0d1b26;padding:9px 16px;border-radius:20px;font-weight:600;font-size:14px;opacity:0;pointer-events:none;transition:.25s;z-index:60}
#toast.on{opacity:1;transform:translate(-50%,0)}

/* no-JS fallback + screen-reader text */
.nojs{overflow:auto;padding:16px;display:flex;flex-direction:column;gap:16px;align-items:center}.nojs img{max-width:100%;height:auto;background:#fff}
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

@media (max-width:560px){
  .bar{gap:8px;padding-left:8px;padding-right:6px}
  .logo img{height:26px;max-width:110px;object-fit:contain}
  [data-act=fs]{display:none}
  .ttl h1{font-size:14.5px}
  .ib{width:36px;height:36px}
  #stage{padding:8px 6px 4px}
}
