@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");
:root {
  color-scheme: dark;
  --app-bg:
  	radial-gradient(circle at top right, #1a1a1a 0%, #121212 46%, #090909 100%);
  --text-color: #f8fafc;
  --muted-color: #a3a3a3;
  --accent-color: #f59e0b;
  --page-surface: #ffffff;
  --toolbar-bg: rgba(18, 18, 18, 0.9);
  --toolbar-bg-strong: rgba(26, 26, 26, 0.94);
  --toolbar-panel: rgba(255, 255, 255, 0.04);
  --toolbar-mist: rgba(255, 255, 255, 0.07);
  --toolbar-depth: rgba(0, 0, 0, 0.42);
  --toolbar-edge: rgba(255, 255, 255, 0.12);
  --toolbar-glow: rgba(0, 0, 0, 0.34);
  --toolbar-reflection: rgba(255, 255, 255, 0.12);
  --toolbar-shadow:
  	0 24px 48px rgba(0, 0, 0, 0.44),
  	0 8px 18px rgba(0, 0, 0, 0.28),
  	inset 0 1px 0 rgba(255, 255, 255, 0.1),
  	inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  --toolbar-border: rgba(255, 255, 255, 0.12);
  --toolbar-group-top: rgba(255, 255, 255, 0.05);
  --toolbar-group-fill: rgba(255, 255, 255, 0.03);
  --toolbar-group-stroke: rgba(255, 255, 255, 0.06);
  --button-color: #f5f5f5;
  --button-top: rgba(255, 255, 255, 0.08);
  --button-fill: rgba(255, 255, 255, 0.03);
  --button-inset: rgba(255, 255, 255, 0.08);
  --button-hover: rgba(255, 255, 255, 0.06);
  --button-hover-top: rgba(255, 255, 255, 0.12);
  --button-hover-shadow: rgba(0, 0, 0, 0.22);
  --indicator-bg: rgba(255, 255, 255, 0.06);
  --indicator-color: #f5f5f5;
  --indicator-separator: rgba(255, 255, 255, 0.28);
  --indicator-ring: rgba(255, 255, 255, 0.08);
  --tooltip-border: rgba(255, 255, 255, 0.1);
  --viewer-bg:
  	radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 32%),
  	linear-gradient(180deg, rgba(26, 26, 26, 0.84), rgba(18, 18, 18, 0.96));
  --viewer-highlight: rgba(255, 255, 255, 0.04);
  --viewer-inner-bg: linear-gradient(180deg, rgba(26, 26, 26, 0.2), rgba(18, 18, 18, 0.08));
  --page-number-color: #334155;
  --page-number-bg: rgba(241, 245, 249, 0.85);
  --flat-toolbar-bg: rgba(18, 18, 18, 0.94);
  --flat-toolbar-shadow:
  	0 20px 38px rgba(0, 0, 0, 0.42),
  	0 6px 18px rgba(0, 0, 0, 0.26),
  	inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --flat-panel-bg: #1a1a1a;
  --flat-panel-border: rgba(255, 255, 255, 0.08);
  --flat-control-bg: #202020;
  --flat-control-hover: #2a2a2a;
  --flat-control-color: #ffffff;
  --flat-control-shadow: rgba(0, 0, 0, 0.22);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme=dark]):not([data-theme=light]) {
    color-scheme: light;
    --app-bg:
    	radial-gradient(circle at 18% 20%, rgba(255, 236, 188, 0.92) 0%, rgba(255, 236, 188, 0) 30%),
    	radial-gradient(circle at 82% 22%, rgba(147, 197, 253, 0.9) 0%, rgba(147, 197, 253, 0) 24%),
    	radial-gradient(circle at 82% 78%, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0) 28%),
    	linear-gradient(135deg, #f7f3ea 0%, #d6e8ff 42%, #3b82f6 82%, #1d4ed8 100%);
    --text-color: #0f172a;
    --muted-color: #4b5563;
    --accent-color: #b45309;
    --page-surface: #ffffff;
    --toolbar-bg: rgba(146, 197, 255, 0.24);
    --toolbar-bg-strong: rgba(255, 248, 232, 0.34);
    --toolbar-panel: rgba(255, 255, 255, 0.18);
    --toolbar-mist: rgba(191, 219, 254, 0.44);
    --toolbar-depth: rgba(37, 99, 235, 0.12);
    --toolbar-edge: rgba(255, 255, 255, 0.48);
    --toolbar-glow: rgba(96, 165, 250, 0.24);
    --toolbar-reflection: rgba(255, 255, 255, 0.82);
    --toolbar-shadow:
    	0 18px 42px rgba(37, 99, 235, 0.22),
    	0 8px 28px rgba(255, 255, 255, 0.28),
    	inset 0 1px 0 rgba(255, 255, 255, 0.84),
    	inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    --toolbar-border: rgba(255, 255, 255, 0.34);
    --toolbar-group-top: rgba(255, 255, 255, 0.22);
    --toolbar-group-fill: rgba(255, 255, 255, 0.12);
    --toolbar-group-stroke: rgba(255, 255, 255, 0.14);
    --button-color: #0f172a;
    --button-top: rgba(255, 255, 255, 0.42);
    --button-fill: rgba(255, 255, 255, 0.1);
    --button-inset: rgba(255, 255, 255, 0.28);
    --button-hover: rgba(96, 165, 250, 0.1);
    --button-hover-top: rgba(255, 255, 255, 0.62);
    --button-hover-shadow: rgba(37, 99, 235, 0.14);
    --indicator-bg: rgba(255, 255, 255, 0.22);
    --indicator-color: #0f172a;
    --indicator-separator: rgba(15, 23, 42, 0.22);
    --indicator-ring: rgba(255, 255, 255, 0.2);
    --tooltip-border: rgba(255, 255, 255, 0.28);
    --viewer-bg:
    	radial-gradient(circle at top left, rgba(255, 240, 200, 0.34), transparent 28%),
    	radial-gradient(circle at top right, rgba(96, 165, 250, 0.26), transparent 24%),
    	linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(191, 219, 254, 0.18));
    --viewer-highlight: rgba(255, 255, 255, 0.44);
    --viewer-inner-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(191, 219, 254, 0.18));
    --page-number-color: #334155;
    --page-number-bg: rgba(255, 255, 255, 0.92);
    --flat-toolbar-bg: rgba(255, 255, 255, 0.74);
    --flat-toolbar-shadow:
    	0 16px 34px rgba(37, 99, 235, 0.16),
    	0 6px 18px rgba(255, 255, 255, 0.24),
    	inset 0 0 0 1px rgba(255, 255, 255, 0.18);
    --flat-panel-bg: rgba(255, 255, 255, 0.22);
    --flat-panel-border: rgba(255, 255, 255, 0.2);
    --flat-control-bg: rgba(255, 255, 255, 0.28);
    --flat-control-hover: rgba(255, 255, 255, 0.38);
    --flat-control-color: #0f172a;
    --flat-control-shadow: rgba(37, 99, 235, 0.12);
  }
}
:root[data-theme=dark] {
  color-scheme: dark;
  --app-bg:
  	radial-gradient(circle at top right, #1a1a1a 0%, #121212 46%, #090909 100%);
  --text-color: #f8fafc;
  --muted-color: #a3a3a3;
  --accent-color: #f59e0b;
  --page-surface: #ffffff;
  --toolbar-bg: rgba(18, 18, 18, 0.9);
  --toolbar-bg-strong: rgba(26, 26, 26, 0.94);
  --toolbar-panel: rgba(255, 255, 255, 0.04);
  --toolbar-mist: rgba(255, 255, 255, 0.07);
  --toolbar-depth: rgba(0, 0, 0, 0.42);
  --toolbar-edge: rgba(255, 255, 255, 0.12);
  --toolbar-glow: rgba(0, 0, 0, 0.34);
  --toolbar-reflection: rgba(255, 255, 255, 0.12);
  --toolbar-shadow:
  	0 24px 48px rgba(0, 0, 0, 0.44),
  	0 8px 18px rgba(0, 0, 0, 0.28),
  	inset 0 1px 0 rgba(255, 255, 255, 0.1),
  	inset 0 0 0 1px rgba(255, 255, 255, 0.06);
  --toolbar-border: rgba(255, 255, 255, 0.12);
  --toolbar-group-top: rgba(255, 255, 255, 0.05);
  --toolbar-group-fill: rgba(255, 255, 255, 0.03);
  --toolbar-group-stroke: rgba(255, 255, 255, 0.06);
  --button-color: #f5f5f5;
  --button-top: rgba(255, 255, 255, 0.08);
  --button-fill: rgba(255, 255, 255, 0.03);
  --button-inset: rgba(255, 255, 255, 0.08);
  --button-hover: rgba(255, 255, 255, 0.06);
  --button-hover-top: rgba(255, 255, 255, 0.12);
  --button-hover-shadow: rgba(0, 0, 0, 0.22);
  --indicator-bg: rgba(255, 255, 255, 0.06);
  --indicator-color: #f5f5f5;
  --indicator-separator: rgba(255, 255, 255, 0.28);
  --indicator-ring: rgba(255, 255, 255, 0.08);
  --tooltip-border: rgba(255, 255, 255, 0.1);
  --viewer-bg:
  	radial-gradient(circle at top, rgba(255, 255, 255, 0.05), transparent 32%),
  	linear-gradient(180deg, rgba(26, 26, 26, 0.84), rgba(18, 18, 18, 0.96));
  --viewer-highlight: rgba(255, 255, 255, 0.04);
  --viewer-inner-bg: linear-gradient(180deg, rgba(26, 26, 26, 0.2), rgba(18, 18, 18, 0.08));
  --page-number-color: #334155;
  --page-number-bg: rgba(241, 245, 249, 0.85);
  --flat-toolbar-bg: rgba(18, 18, 18, 0.94);
  --flat-toolbar-shadow:
  	0 20px 38px rgba(0, 0, 0, 0.42),
  	0 6px 18px rgba(0, 0, 0, 0.26),
  	inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  --flat-panel-bg: #1a1a1a;
  --flat-panel-border: rgba(255, 255, 255, 0.08);
  --flat-control-bg: #202020;
  --flat-control-hover: #2a2a2a;
  --flat-control-color: #ffffff;
  --flat-control-shadow: rgba(0, 0, 0, 0.22);
}

:root[data-theme=light] {
  color-scheme: light;
  --app-bg:
  	radial-gradient(circle at 18% 20%, rgba(255, 236, 188, 0.92) 0%, rgba(255, 236, 188, 0) 30%),
  	radial-gradient(circle at 82% 22%, rgba(147, 197, 253, 0.9) 0%, rgba(147, 197, 253, 0) 24%),
  	radial-gradient(circle at 82% 78%, rgba(37, 99, 235, 0.3) 0%, rgba(37, 99, 235, 0) 28%),
  	linear-gradient(135deg, #f7f3ea 0%, #d6e8ff 42%, #3b82f6 82%, #1d4ed8 100%);
  --text-color: #0f172a;
  --muted-color: #4b5563;
  --accent-color: #b45309;
  --page-surface: #ffffff;
  --toolbar-bg: rgba(146, 197, 255, 0.24);
  --toolbar-bg-strong: rgba(255, 248, 232, 0.34);
  --toolbar-panel: rgba(255, 255, 255, 0.18);
  --toolbar-mist: rgba(191, 219, 254, 0.44);
  --toolbar-depth: rgba(37, 99, 235, 0.12);
  --toolbar-edge: rgba(255, 255, 255, 0.48);
  --toolbar-glow: rgba(96, 165, 250, 0.24);
  --toolbar-reflection: rgba(255, 255, 255, 0.82);
  --toolbar-shadow:
  	0 18px 42px rgba(37, 99, 235, 0.22),
  	0 8px 28px rgba(255, 255, 255, 0.28),
  	inset 0 1px 0 rgba(255, 255, 255, 0.84),
  	inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  --toolbar-border: rgba(255, 255, 255, 0.34);
  --toolbar-group-top: rgba(255, 255, 255, 0.22);
  --toolbar-group-fill: rgba(255, 255, 255, 0.12);
  --toolbar-group-stroke: rgba(255, 255, 255, 0.14);
  --button-color: #0f172a;
  --button-top: rgba(255, 255, 255, 0.42);
  --button-fill: rgba(255, 255, 255, 0.1);
  --button-inset: rgba(255, 255, 255, 0.28);
  --button-hover: rgba(96, 165, 250, 0.1);
  --button-hover-top: rgba(255, 255, 255, 0.62);
  --button-hover-shadow: rgba(37, 99, 235, 0.14);
  --indicator-bg: rgba(255, 255, 255, 0.22);
  --indicator-color: #0f172a;
  --indicator-separator: rgba(15, 23, 42, 0.22);
  --indicator-ring: rgba(255, 255, 255, 0.2);
  --tooltip-border: rgba(255, 255, 255, 0.28);
  --viewer-bg:
  	radial-gradient(circle at top left, rgba(255, 240, 200, 0.34), transparent 28%),
  	radial-gradient(circle at top right, rgba(96, 165, 250, 0.26), transparent 24%),
  	linear-gradient(180deg, rgba(255, 255, 255, 0.28), rgba(191, 219, 254, 0.18));
  --viewer-highlight: rgba(255, 255, 255, 0.44);
  --viewer-inner-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.34), rgba(191, 219, 254, 0.18));
  --page-number-color: #334155;
  --page-number-bg: rgba(255, 255, 255, 0.92);
  --flat-toolbar-bg: rgba(255, 255, 255, 0.74);
  --flat-toolbar-shadow:
  	0 16px 34px rgba(37, 99, 235, 0.16),
  	0 6px 18px rgba(255, 255, 255, 0.24),
  	inset 0 0 0 1px rgba(255, 255, 255, 0.18);
  --flat-panel-bg: rgba(255, 255, 255, 0.22);
  --flat-panel-border: rgba(255, 255, 255, 0.2);
  --flat-control-bg: rgba(255, 255, 255, 0.28);
  --flat-control-hover: rgba(255, 255, 255, 0.38);
  --flat-control-color: #0f172a;
  --flat-control-shadow: rgba(37, 99, 235, 0.12);
}

:root {
  --font-family-base: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
}

body {
  font-family: var(--font-family-base);
  background: var(--app-bg);
  color: var(--text-color);
  overflow: hidden;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@font-face {
  font-family: "icons";
  src: url("../icons/icons.eot?hgpcca");
  src: url("../icons/icons.eot?hgpcca#iefix") format("embedded-opentype"), url("../icons/icons.ttf?hgpcca") format("truetype"), url("../icons/icons.woff?hgpcca") format("woff"), url("../icons/icons.svg?hgpcca#icons") format("svg");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
[class^=icon-], [class*=" icon-"] {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: "icons" !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;
  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.icon-archive:before {
  content: "\e90b";
}

.icon-arrow-left:before {
  content: "\e910";
}

.icon-arrow-right:before {
  content: "\e912";
}

.icon-book:before {
  content: "\e922";
}

.icon-book-open:before {
  content: "\e923";
}

.icon-bookmark:before {
  content: "\e924";
}

.icon-chevron-down:before {
  content: "\e92e";
}

.icon-chevron-left:before {
  content: "\e92f";
}

.icon-chevron-right:before {
  content: "\e930";
}

.icon-chevron-up:before {
  content: "\e931";
}

.icon-code:before {
  content: "\e940";
}

.icon-coffee:before {
  content: "\e943";
}

.icon-download:before {
  content: "\e958";
}

.icon-download-cloud:before {
  content: "\e959";
}

.icon-external-link:before {
  content: "\e95e";
}

.icon-heart:before {
  content: "\e97d";
}

.icon-inbox:before {
  content: "\e982";
}

.icon-info:before {
  content: "\e983";
}

.icon-loader:before {
  content: "\e98e";
}

.icon-mail:before {
  content: "\e992";
}

.icon-maximize-2:before {
  content: "\e996";
}

.icon-menu:before {
  content: "\e998";
}

.icon-minimize:before {
  content: "\e99d";
}

.icon-minimize-2:before {
  content: "\e99e";
}

.icon-moon:before {
  content: "\e9a3";
}

.icon-more-horizontal:before {
  content: "\e9a4";
}

.icon-more-vertical:before {
  content: "\e9a5";
}

.icon-paperclip:before {
  content: "\e9ad";
}

.icon-pause:before {
  content: "\e9ae";
}

.icon-play:before {
  content: "\e9ba";
}

.icon-power:before {
  content: "\e9c0";
}

.icon-printer:before {
  content: "\e9c1";
}

.icon-refresh-cw:before {
  content: "\e9c4";
}

.icon-search:before {
  content: "\e9cc";
}

.icon-sun:before {
  content: "\e9e3";
}

.icon-volume:before {
  content: "\ea09";
}

.icon-volume-1:before {
  content: "\ea0a";
}

.icon-volume-2:before {
  content: "\ea0b";
}

.icon-volume-x:before {
  content: "\ea0c";
}

.icon-x:before {
  content: "\ea11";
}

.icon-zoom-in:before {
  content: "\ea18";
}

.icon-zoom-out:before {
  content: "\ea19";
}

.toolbar {
  width: min(720px, 100% - 24px);
  margin: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--toolbar-reflection), rgba(255, 255, 255, 0) 36%), linear-gradient(135deg, var(--toolbar-bg-strong), var(--toolbar-bg) 62%, var(--toolbar-panel));
  border-radius: 999px;
  box-shadow: var(--toolbar-shadow);
  backdrop-filter: blur(34px) saturate(1.18);
  -webkit-backdrop-filter: blur(34px) saturate(1.18);
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 30;
  isolation: isolate;
  border: 1px solid var(--toolbar-border);
  overflow: hidden;
}

.toolbar::before,
.toolbar::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}

.toolbar::before {
  inset: 1px;
  background: radial-gradient(circle at 16% 18%, var(--toolbar-reflection), transparent 30%), radial-gradient(circle at 82% 84%, var(--toolbar-mist), transparent 26%), linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(255, 255, 255, 0) 34%), linear-gradient(120deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0));
  opacity: 0.9;
  mix-blend-mode: screen;
}

.toolbar::after {
  box-shadow: inset 0 0 0 1px var(--toolbar-edge), inset 0 -12px 22px rgba(255, 255, 255, 0.1), inset 0 -22px 40px var(--toolbar-depth), 0 0 28px var(--toolbar-glow);
}

.toolbar > * {
  position: relative;
  z-index: 1;
}

.toolbar-group,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--toolbar-group-top), rgba(255, 255, 255, 0) 58%), var(--toolbar-group-fill);
  box-shadow: inset 0 1px 0 var(--toolbar-group-top), inset 0 0 0 1px var(--toolbar-group-stroke);
}

.toolbar-group {
  justify-self: start;
}

.toolbar-actions {
  justify-self: end;
}

.fullscreen-hint {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0 8px 0 2px;
  color: var(--muted-color);
  font-size: 12px;
  white-space: nowrap;
}

.fullscreen-hint__key {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 28px;
  padding: 0 10px;
  border-radius: 10px;
  background: var(--indicator-bg);
  box-shadow: inset 0 0 0 1px var(--indicator-ring);
  font-weight: 700;
  color: var(--indicator-color);
}

.app:fullscreen .fullscreen-hint {
  display: inline-flex;
}

.control-btn {
  border: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--button-top), rgba(255, 255, 255, 0) 58%), var(--button-fill);
  color: var(--button-color);
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 1px 0 var(--button-inset);
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.control-btn:hover {
  background: linear-gradient(180deg, var(--button-hover-top), rgba(255, 255, 255, 0) 58%), var(--button-hover);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 var(--button-hover-top), 0 10px 24px var(--button-hover-shadow);
}

.control-btn:active {
  transform: translateY(0);
}

.icon {
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.control-btn .icon::before {
  display: block;
}

.page-indicator {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.16) 46%), rgba(255, 255, 255, 0.18);
  font-size: 14px;
  font-weight: 700;
  color: var(--indicator-color);
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54), inset 0 0 0 1px var(--indicator-ring), 0 8px 20px rgba(15, 23, 42, 0.05);
}

.zoom-indicator {
  border: 0;
  border-radius: 999px;
  min-width: 72px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.16) 46%), rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.54), inset 0 0 0 1px var(--indicator-ring), 0 8px 20px rgba(15, 23, 42, 0.05);
  color: var(--indicator-color);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.zoom-indicator:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), inset 0 0 0 1px var(--indicator-ring), 0 12px 22px rgba(15, 23, 42, 0.08);
}

.zoom-indicator:active {
  transform: translateY(0);
}

.control-btn:disabled,
.zoom-indicator:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.page-indicator .separator {
  color: var(--indicator-separator);
}

.tippy-box[data-theme~=flebook] {
  background: linear-gradient(180deg, var(--toolbar-reflection), rgba(255, 255, 255, 0) 42%), linear-gradient(135deg, var(--toolbar-bg-strong), var(--toolbar-bg));
  color: var(--indicator-color);
  border-radius: 14px;
  box-shadow: var(--toolbar-shadow);
  backdrop-filter: blur(24px) saturate(1.2);
  -webkit-backdrop-filter: blur(24px) saturate(1.2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: 1px solid var(--tooltip-border);
}

.tippy-box[data-theme~=flebook] .tippy-content {
  padding: 8px 10px;
}

.tippy-box[data-theme~=flebook][data-inertia][data-state=visible] {
  transition-timing-function: cubic-bezier(0.22, 1.28, 0.32, 1);
}

.app--flat .toolbar {
  background: var(--flat-toolbar-bg);
  backdrop-filter: blur(12px) saturate(1.02);
  -webkit-backdrop-filter: blur(12px) saturate(1.02);
  box-shadow: var(--flat-toolbar-shadow);
  border-color: var(--flat-panel-border);
}

.app--flat .toolbar::before,
.app--flat .toolbar::after {
  display: none;
}

.app--flat .toolbar-group,
.app--flat .toolbar-actions {
  background: var(--flat-panel-bg);
  box-shadow: inset 0 0 0 1px var(--flat-panel-border);
}

.app--flat .control-btn,
.app--flat .zoom-indicator,
.app--flat .page-indicator,
.app--flat .fullscreen-hint__key {
  background: var(--flat-control-bg);
  box-shadow: inset 0 0 0 1px var(--flat-panel-border);
  color: var(--flat-control-color);
}

.app--flat .control-btn:hover,
.app--flat .zoom-indicator:hover {
  background: var(--flat-control-hover);
  box-shadow: inset 0 0 0 1px var(--flat-panel-border), 0 8px 18px var(--flat-control-shadow);
}

.app--flat .control-btn,
.app--flat .zoom-indicator,
.app--flat .page-indicator {
  transform: none;
}

.app--flat .control-btn .icon,
.app--flat .zoom-indicator,
.app--flat .page-indicator,
.app--flat .fullscreen-hint__key,
.app--flat .fullscreen-hint {
  color: var(--flat-control-color);
}

@media (max-width: 860px) {
  .toolbar {
    width: min(360px, 100vw - 20px);
    grid-template-columns: auto auto auto;
    gap: 10px;
    padding: 9px 12px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    border-radius: 999px;
  }
  .page-indicator {
    justify-self: center;
    padding: 7px 14px;
    font-size: 13px;
    border-radius: 999px;
  }
  .toolbar-group,
  .toolbar-actions {
    justify-content: center;
    justify-self: center;
    gap: 6px;
    flex-wrap: nowrap;
    padding: 3px;
  }
  .control-btn {
    min-width: 40px;
    height: 40px;
    padding: 0 11px;
    border-radius: 999px;
  }
  .zoom-indicator {
    min-width: 64px;
    height: 40px;
    padding: 0 12px;
    font-size: 12px;
  }
  .icon {
    font-size: 16px;
  }
  .fullscreen-hint {
    position: absolute;
    left: 50%;
    top: -42px;
    transform: translateX(-50%);
    padding: 6px 10px;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--toolbar-reflection), rgba(255, 255, 255, 0) 40%), linear-gradient(135deg, var(--toolbar-bg-strong), var(--toolbar-bg));
    box-shadow: var(--toolbar-shadow);
    backdrop-filter: blur(24px) saturate(1.2);
    -webkit-backdrop-filter: blur(24px) saturate(1.2);
  }
}
[data-tippy-root] {
  max-width: calc(100vw - 16px);
}

.tippy-box {
  position: relative;
  outline: 0;
  font-size: 14px;
  line-height: 1.4;
  white-space: normal;
  transition-property: transform, visibility, opacity;
}

.tippy-content {
  position: relative;
  padding: 6px 10px;
  z-index: 1;
}

.tippy-box[data-animation=shift-away-subtle][data-state=hidden] {
  opacity: 0;
  transform: translateY(8px) scale(0.96);
}

.tippy-box[data-animation=shift-away-subtle][data-state=visible] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#splash-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3rem;
  background: var(--app-bg);
  opacity: 1;
  transition: opacity 0.6s ease-out;
  pointer-events: auto;
}
#splash-screen.hidden {
  opacity: 0;
  pointer-events: none;
  display: none !important;
}
#splash-screen .splash-logo {
  width: 280px;
  height: auto;
  max-width: 80vw;
  -o-object-fit: contain;
     object-fit: contain;
  animation: splashPulse 2s ease-in-out infinite;
}
#splash-screen .splash-progress-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}
#splash-screen .splash-progress-container .splash-progress-text {
  font-size: 3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: #3b82f6;
  line-height: 1;
  min-width: 8rem;
  text-align: center;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme=dark]):not([data-theme=light]) #splash-screen .splash-progress-container .splash-progress-text {
    color: #3b82f6;
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme=dark]):not([data-theme=light]) #splash-screen .splash-progress-container .splash-progress-text {
    color: #60a5fa;
  }
}
[data-theme=light] #splash-screen .splash-progress-container .splash-progress-text {
  color: #3b82f6;
}
[data-theme=dark] #splash-screen .splash-progress-container .splash-progress-text {
  color: #60a5fa;
}
#splash-screen .splash-progress-container .splash-progress-label {
  font-size: 0.875rem;
  color: var(--muted-color);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

@keyframes splashPulse {
  0% {
    transform: scale(1);
    opacity: 0.95;
  }
  50% {
    transform: scale(1.04);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 0.95;
  }
}
@media (max-height: 600px) {
  #splash-screen {
    gap: 1.5rem;
  }
  #splash-screen .splash-logo {
    width: 180px;
  }
  #splash-screen .splash-progress-container {
    gap: 0.75rem;
  }
  #splash-screen .splash-progress-container .splash-progress-text {
    font-size: 2rem;
  }
  #splash-screen .splash-progress-container .splash-progress-label {
    font-size: 0.75rem;
  }
}
.app {
  --viewer-top-gap: 18px;
  --toolbar-clearance: calc(118px + env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  height: 100vh;
  padding: 18px 18px 18px;
  gap: 14px;
  position: relative;
}

.app,
.page-inner,
#flipbook-wrapper > *,
.toolbar,
.control-btn,
.zoom-indicator,
.page-indicator {
  will-change: transform, opacity, filter;
}

.app:fullscreen {
  width: 100%;
  height: 100%;
  --viewer-top-gap: 14px;
  --toolbar-clearance: calc(112px + env(safe-area-inset-bottom, 0px));
  padding: 14px 14px 18px;
  background: var(--app-bg);
}

.app:fullscreen .viewer-shell {
  height: 100%;
}

.app:fullscreen #flipbook-wrapper {
  min-height: 0;
}

.viewer-shell {
  position: relative;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: var(--viewer-top-gap) 0 var(--toolbar-clearance);
  background: transparent;
  box-shadow: none;
}

#flipbook-wrapper {
  --page-aspect-ratio: 0.706;
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  touch-action: pan-x;
  position: relative;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

#flipbook-wrapper.is-zoomed {
  overflow: auto;
  touch-action: pan-x pan-y;
  cursor: grab;
}

#flipbook-wrapper.is-zoomed.is-panning {
  cursor: grabbing;
}

#flipbook-wrapper > * {
  margin: auto;
}

#flipbook-wrapper .stf__wrapper {
  height: 100% !important;
  padding-bottom: 0 !important;
  transition: transform 0.35s ease;
}

#flipbook-wrapper::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08)), linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
  background-size: 220px 100%, 100% 100%;
  background-repeat: no-repeat;
  background-position: -240px 0, 0 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

#flipbook-wrapper.is-loading::before {
  opacity: 1;
  animation: viewer-sheen 1.15s linear infinite;
}

#flipbook {
  width: 100%;
  height: auto;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.22s ease, transform 0.22s ease;
}

#flipbook-wrapper.is-loading #flipbook {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

.page {
  background: var(--page-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  aspect-ratio: var(--page-aspect-ratio, 0.706);
  width: 100%;
  height: auto;
}

.page-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: block;
  background: var(--page-surface);
  overflow: visible;
}

.page canvas {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  -o-object-fit: contain;
     object-fit: contain;
  display: block;
}

.page-number {
  position: absolute;
  bottom: 8px;
  right: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 11px;
  color: var(--page-number-color);
  background: var(--page-number-bg);
}

.link-overlays-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: auto;
  z-index: 10;
}

.link-overlay {
  position: absolute;
  display: block;
  cursor: pointer;
  background: transparent;
  border: none;
  padding: 0;
  margin: 0;
  text-decoration: none;
  outline: none;
  transition: background-color 0.2s ease;
}
.link-overlay:focus {
  outline: 2px solid rgba(245, 158, 11, 0.6);
  outline-offset: -2px;
}
.link-overlay:hover {
  background-color: rgba(245, 158, 11, 0.08);
}

@media (max-width: 860px) {
  .app {
    --viewer-top-gap: 10px;
    --toolbar-clearance: calc(100px + env(safe-area-inset-bottom, 0px));
    padding: 10px 10px 14px;
  }
  .viewer-shell {
    padding-top: var(--viewer-top-gap);
    padding-bottom: var(--toolbar-clearance);
  }
  #flipbook-wrapper {
    min-height: 0;
  }
}
@keyframes viewer-sheen {
  from {
    background-position: -240px 0, 0 0;
  }
  to {
    background-position: calc(100% + 240px) 0, 0 0;
  }
}