/* UT Flipbook reader */
:root {
	--fb-accent: #0F7B6C;
	--fb-bg1: #2A3138;
	--fb-bg2: #0E1215;
	--fb-bar: rgb(18 22 26 / .72);
	--fb-ink: #F3F6F8;
	--fb-mut: rgb(243 246 248 / .66);
	--fb-line: rgb(255 255 255 / .12);
	--fb-panel: rgb(20 24 28 / .94);
	--fb-hover: rgb(255 255 255 / .1);
	color-scheme: dark;
}
.utfb-theme-light:not(.utfb-dark) {
	--fb-bar: rgb(255 255 255 / .82);
	--fb-ink: #121A20;
	--fb-mut: rgb(18 26 32 / .62);
	--fb-line: rgb(18 26 32 / .1);
	--fb-panel: rgb(255 255 255 / .96);
	--fb-hover: rgb(18 26 32 / .06);
	color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
.utfb-body { margin: 0; overflow: hidden; font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--fb-ink); background: var(--fb-bg2); -webkit-font-smoothing: antialiased; touch-action: manipulation; }
.utfb-stage { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; background: var(--fb-bg1); background-size: cover; background-position: center; }
.utfb-bg-gradient .utfb-stage { background: radial-gradient(120% 90% at 50% 20%, var(--fb-bg1), var(--fb-bg2)); }
.utfb-tb-bottom .utfb-stage { bottom: var(--fb-barh, 58px); }
.utfb-tb-top .utfb-stage { top: var(--fb-barh, 58px); }
.utfb-ui-none .utfb-stage { inset: 0; }

/* The cover, painted before any script runs */
.utfb-instant { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; transition: opacity .45s ease; z-index: 2; }
.utfb-instant img { height: min(88%, calc((100vw - 32px) / var(--fb-ratio))); width: auto; max-width: calc(100vw - 32px); aspect-ratio: var(--fb-ratio); object-fit: cover; border-radius: 2px; box-shadow: 0 30px 80px rgb(0 0 0 / .45); filter: saturate(1.02); }
.utfb-instant.is-gone { opacity: 0; }

/* Book */
.utfb-book { position: relative; display: grid; place-items: center; z-index: 1; }
.fb-flip { position: relative; }
.fb-page { background: #fff; overflow: hidden; user-select: none; -webkit-user-select: none; }
.fb-page__in { position: absolute; inset: 0; }
.fb-page img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; pointer-events: none; }
.fb-lo { filter: blur(.6px); }
.fb-hi { opacity: 0; transition: opacity .25s ease; }
.fb-page.is-sharp .fb-hi { opacity: 1; }
.fb-gutter { position: absolute; top: 0; bottom: 0; width: 7%; pointer-events: none; }
.fb-page--left .fb-gutter { right: 0; background: linear-gradient(90deg, transparent, rgb(0 0 0 / .14)); }
.fb-page--right .fb-gutter { left: 0; background: linear-gradient(270deg, transparent, rgb(0 0 0 / .14)); }
.is-single .fb-gutter { display: none; }
.stf__parent { box-shadow: 0 26px 70px rgb(0 0 0 / .42); }
.stf__item.--hard { background: #fff; }

/* Links on pages */
.fb-links { position: absolute; inset: 0; }
.fb-link { position: absolute; display: block; border-radius: 3px; background: transparent; border: 0; padding: 0; cursor: pointer; transition: background .15s, box-shadow .15s; }
.fb-link:hover, .fb-link:focus-visible { background: color-mix(in srgb, var(--fb-accent) 18%, transparent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--fb-accent) 60%, transparent); outline: none; }
.fb-link--hot { background: color-mix(in srgb, var(--fb-accent) 9%, transparent); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--fb-accent) 45%, transparent); }
.fb-link--video { display: grid; place-items: center; }
.fb-link--video span { width: 44px; height: 44px; border-radius: 50%; background: rgb(0 0 0 / .55); display: grid; place-items: center; color: #fff; }
.fb-link--video svg { width: 20px; height: 20px; fill: currentColor; stroke: none; }

/* Side arrows */
.fb-arrows { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.fb-arrow { pointer-events: auto; position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: rgb(0 0 0 / .28); color: #fff; opacity: .75; transition: opacity .2s, background .2s; }
.fb-arrow:hover { opacity: 1; background: var(--fb-accent); }
.fb-arrow--prev { left: 12px; }
.fb-arrow--next { right: 12px; }
.fb-arrow svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 600px) { .fb-arrow { width: 38px; height: 38px; opacity: .55; } .fb-arrow--prev { left: 4px; } .fb-arrow--next { right: 4px; } }

/* Toolbar */
.fb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; color: var(--fb-ink); background: var(--fb-bar); border-top: 1px solid var(--fb-line); padding-bottom: env(safe-area-inset-bottom); }
.utfb-tbs-glass .fb-bar { -webkit-backdrop-filter: blur(18px) saturate(160%); backdrop-filter: blur(18px) saturate(160%); }
.utfb-tbs-solid .fb-bar { background: var(--fb-panel); }
.utfb-tbs-minimal .fb-bar { background: transparent; border-color: transparent; }
.utfb-tb-top .fb-bar { top: 0; bottom: auto; border-top: 0; border-bottom: 1px solid var(--fb-line); padding-bottom: 0; padding-top: env(safe-area-inset-top); }
.fb-progress { height: 2px; background: var(--fb-line); }
.fb-progress i { display: block; height: 100%; width: 0; background: var(--fb-accent); transition: width .3s; }
.fb-bar__in { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; height: 56px; padding: 0 10px; }
.fb-bar__brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.fb-logo img { height: 26px; width: auto; max-width: 120px; object-fit: contain; display: block; }
.fb-title { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-bar__nav { display: flex; align-items: center; gap: 2px; }
.fb-bar__tools { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.fb-btn { width: 40px; height: 40px; border-radius: 10px; border: 0; background: transparent; color: inherit; display: inline-grid; place-items: center; cursor: pointer; text-decoration: none; }
.fb-btn:hover, .fb-btn:focus-visible { background: var(--fb-hover); outline: none; }
.fb-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.fb-pageno { display: inline-flex; align-items: center; gap: 6px; margin: 0 4px; font-variant-numeric: tabular-nums; color: var(--fb-mut); font-size: 13px; }
.fb-num { width: 64px; height: 32px; border-radius: 8px; border: 1px solid var(--fb-line); background: var(--fb-hover); color: var(--fb-ink); text-align: center; font: 600 13px system-ui; display: inline-grid; place-items: center; }
.fb-num:focus { outline: 2px solid var(--fb-accent); }
@media (max-width: 760px) {
	.fb-bar__in { grid-template-columns: auto 1fr auto; padding: 0 4px; }
	.fb-bar__brand { display: none; }
	.fb-bar__nav { justify-content: flex-start; }
	.fb-hide-s { display: none !important; }
	.fb-btn { width: 38px; }
	.fb-num { width: 56px; }
}
.utfb-ui-minimal .fb-bar__in { grid-template-columns: 1fr auto 1fr; }

/* Panels */
.fb-panel { position: fixed; top: 0; bottom: var(--fb-barh, 58px); left: 0; z-index: 30; width: min(360px, 92vw); background: var(--fb-panel); color: var(--fb-ink); border-right: 1px solid var(--fb-line); display: flex; flex-direction: column; transform: translateX(-102%); transition: transform .25s ease; -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.utfb-tb-top .fb-panel { top: var(--fb-barh, 58px); bottom: 0; }
.fb-panel.is-open { transform: none; }
.fb-panel__head { display: flex; align-items: center; justify-content: space-between; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--fb-line); }
.fb-panel__body { flex: 1; overflow-y: auto; padding: 12px; }
.fb-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.fb-thumb { position: relative; border: 0; padding: 0; background: rgb(255 255 255 / .08); border-radius: 4px; overflow: hidden; cursor: pointer; outline: 2px solid transparent; outline-offset: 2px; }
.fb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fb-thumb span { position: absolute; left: 4px; bottom: 4px; padding: 1px 6px; border-radius: 5px; font-size: 11px; background: rgb(0 0 0 / .6); color: #fff; }
.fb-thumb.is-on { outline-color: var(--fb-accent); }
.fb-toc ul { list-style: none; margin: 0; padding: 0; }
.fb-toc ul ul { padding-left: 14px; }
.fb-toc button, .fb-hit { width: 100%; display: flex; gap: 10px; justify-content: space-between; align-items: baseline; text-align: left; padding: 10px; border: 0; border-radius: 8px; background: transparent; color: inherit; font: inherit; cursor: pointer; }
.fb-toc button:hover, .fb-hit:hover { background: var(--fb-hover); }
.fb-toc em { font-style: normal; color: var(--fb-mut); font-variant-numeric: tabular-nums; }
.fb-search input { width: 100%; height: 42px; border-radius: 10px; border: 1px solid var(--fb-line); background: var(--fb-hover); color: var(--fb-ink); padding: 0 12px; font: inherit; }
.fb-search input:focus { outline: 2px solid var(--fb-accent); }
.fb-results { margin-top: 10px; display: grid; gap: 2px; }
.fb-hit { flex-direction: column; gap: 2px; }
.fb-hit em { font-style: normal; font-size: 12px; color: var(--fb-accent); font-weight: 600; }
.fb-hit span { font-size: 13px; color: var(--fb-mut); }
.fb-hit mark { background: color-mix(in srgb, var(--fb-accent) 35%, transparent); color: var(--fb-ink); border-radius: 3px; padding: 0 2px; }
.fb-muted { color: var(--fb-mut); font-size: 13px; margin: 6px 2px; }

/* Modals */
.fb-modal { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgb(0 0 0 / .55); opacity: 0; transition: opacity .2s; }
.fb-modal.is-open { opacity: 1; }
.fb-modal__box { position: relative; width: min(520px, 100%); max-height: 90vh; overflow: auto; padding: 24px; border-radius: 18px; background: var(--fb-panel); color: var(--fb-ink); border: 1px solid var(--fb-line); display: grid; gap: 14px; }
.fb-modal__box h2 { margin: 0; font-size: 19px; }
.fb-modal__box p { margin: 0; color: var(--fb-mut); }
.fb-modal__x { position: absolute; top: 10px; right: 10px; }
.fb-nets { display: flex; flex-wrap: wrap; gap: 8px; }
.fb-nets a, .fb-pill { padding: 8px 14px; border-radius: 999px; background: var(--fb-hover); color: inherit; text-decoration: none; font-weight: 600; font-size: 13px; border: 1px solid var(--fb-line); cursor: pointer; white-space: nowrap; }
.fb-nets a:hover, .fb-pill:hover { background: var(--fb-accent); color: #fff; border-color: transparent; }
.fb-field { display: grid; gap: 6px; font-size: 12.5px; color: var(--fb-mut); }
.fb-copyrow { display: flex; gap: 8px; align-items: flex-start; }
.fb-copyrow input, .fb-copyrow textarea { flex: 1; min-width: 0; border-radius: 10px; border: 1px solid var(--fb-line); background: var(--fb-hover); color: var(--fb-ink); padding: 9px 10px; font: 12.5px ui-monospace, Menlo, monospace; resize: none; }
.fb-videomodal .fb-modal__box { width: min(1000px, 100%); padding: 0; background: #000; overflow: hidden; }
.fb-video { aspect-ratio: 16 / 9; }
.fb-video iframe, .fb-video video { width: 100%; height: 100%; border: 0; display: block; }
.fb-videomodal .fb-modal__x { color: #fff; z-index: 2; background: rgb(0 0 0 / .5); }
.fb-gateform { display: grid; gap: 10px; }
.fb-gateform input { height: 46px; border-radius: 10px; border: 1px solid var(--fb-line); background: var(--fb-hover); color: var(--fb-ink); padding: 0 14px; font: inherit; }
.fb-gateform input:focus { outline: 2px solid var(--fb-accent); }
.fb-cta { height: 46px; border: 0; border-radius: 10px; background: var(--fb-accent); color: #fff; font: 600 15px system-ui; cursor: pointer; }
.fb-cta:disabled { opacity: .6; }
.fb-skip { border: 0; background: none; color: var(--fb-mut); cursor: pointer; font: inherit; text-decoration: underline; }
.fb-err { color: #ff9a8a !important; }
.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; }

/* Zoom */
.fb-zoom { position: fixed; inset: 0; z-index: 40; background: var(--fb-bg2); overflow: hidden; touch-action: none; cursor: grab; }
.fb-zoom:active { cursor: grabbing; }
.fb-zoom[hidden] { display: none; }
.fb-zoom__pan { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 0; transform-origin: 50% 50%; will-change: transform; }
.fb-zoom__pan img { height: 92vh; width: auto; max-width: 50vw; object-fit: contain; background: #fff; user-select: none; }
.fb-zoom__pan img:only-child { max-width: 96vw; }
.fb-zoom__x { position: absolute; top: 12px; right: 12px; background: rgb(0 0 0 / .45); color: #fff; }
.fb-zoom__nav { position: absolute; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: rgb(0 0 0 / .5); color: #fff; }

/* Hint */
.fb-hint { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); padding: 9px 16px; border-radius: 999px; background: rgb(0 0 0 / .6); color: #fff; font-size: 13px; z-index: 6; transition: opacity .5s; pointer-events: none; white-space: nowrap; }
.fb-hint.is-gone { opacity: 0; }

.utfb-noscript { max-width: 760px; margin: 40px auto; padding: 0 20px; }
.utfb-embedded .fb-title { font-size: 12.5px; }
@media (prefers-reduced-motion: reduce) { .utfb-instant, .fb-hi, .fb-panel, .fb-modal { transition: none; } }
.fb-pageno span { white-space: nowrap; }
/* Light reader theme: light backdrop unless the publisher chose a plain colour or a picture */
.utfb-theme-light:not(.utfb-dark) .utfb-bg-gradient .utfb-stage { background: radial-gradient(120% 90% at 50% 20%, #F4F6F8, #D8DEE4); }
.utfb-theme-light:not(.utfb-dark) .utfb-instant img, .utfb-theme-light:not(.utfb-dark) .stf__parent { box-shadow: 0 24px 60px rgb(20 30 40 / .22); }
.utfb-theme-light:not(.utfb-dark) .fb-arrow { background: rgb(255 255 255 / .8); color: #13202A; }
