/* ESPO Company Profile — dedicated QR flipbook */
html:has(body.espo-profile-standalone) { background:#edf3f6; }
body.espo-profile-standalone {
  margin:0;
  min-height:100vh;
  overflow-x:hidden;
  background:
    radial-gradient(circle at 14% 8%, rgba(255,185,26,.09), transparent 23rem),
    radial-gradient(circle at 88% 2%, rgba(43,116,184,.10), transparent 28rem),
    linear-gradient(180deg,#f7fafb 0%,#edf3f6 66%,#e8eef2 100%);
  color:#0e3654;
}
body.espo-profile-standalone.admin-bar { min-height:calc(100vh - 32px); }
body.espo-profile-standalone .espo-main-shell { display:none!important; }
body.espo-profile-standalone > .site-header,
body.espo-profile-standalone > .site-footer { display:none!important; }
body.espo-profile-standalone #wpadminbar { z-index:100000; }

.espo-profile-app {
  --profile-navy:#0e3654;
  --profile-blue:#2777b8;
  --profile-yellow:#f8b91a;
  --profile-red:#e33535;
  --profile-green:#178a4a;
  --profile-line:rgba(14,54,84,.14);
  --profile-shadow:0 32px 80px rgba(18,43,62,.18),0 10px 28px rgba(18,43,62,.11);
  min-height:100dvh;
  display:flex;
  flex-direction:column;
  position:relative;
  isolation:isolate;
}
.espo-profile-app::before {
  content:"";
  position:fixed;
  inset:0;
  pointer-events:none;
  opacity:.32;
  z-index:-1;
  background-image:
    linear-gradient(rgba(14,54,84,.025) 1px,transparent 1px),
    linear-gradient(90deg,rgba(14,54,84,.025) 1px,transparent 1px);
  background-size:32px 32px;
  mask-image:linear-gradient(180deg,#000 0%,transparent 74%);
}
.espo-profile-app__bar {
  min-height:82px;
  padding:max(14px,env(safe-area-inset-top)) clamp(18px,3.2vw,54px) 14px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:20px;
  border-bottom:1px solid rgba(14,54,84,.10);
  background:rgba(250,252,253,.82);
  backdrop-filter:blur(18px) saturate(130%);
  position:relative;
  z-index:30;
}
.espo-profile-app__bar::after {
  content:"";
  position:absolute;
  left:clamp(18px,3.2vw,54px);
  bottom:-1px;
  width:118px;
  height:2px;
  background:linear-gradient(90deg,var(--profile-yellow) 0 25%,var(--profile-blue) 25% 50%,var(--profile-red) 50% 75%,var(--profile-green) 75% 100%);
}
.espo-profile-app__brand { display:flex;align-items:center;text-decoration:none; }
.espo-profile-app__brand .espo-custom-logo-image { height:48px!important;width:auto!important;display:block; }
.espo-profile-app__brand .espo-logo { transform:scale(.88);transform-origin:left center; }
.espo-profile-app__identity { min-width:0;display:flex;flex-direction:column;gap:2px; }
.espo-profile-app__identity span {
  font-size:10px;
  line-height:1.3;
  letter-spacing:.18em;
  text-transform:uppercase;
  color:#6c7f8e;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.espo-profile-app__identity strong { font-size:clamp(15px,1.35vw,19px);line-height:1.2;letter-spacing:-.02em;color:var(--profile-navy); }
.espo-profile-app__tools { display:flex;align-items:center;gap:8px; }
.espo-profile-tool {
  height:42px;
  border:1px solid var(--profile-line);
  background:rgba(255,255,255,.76);
  color:var(--profile-navy);
  border-radius:999px;
  padding:0 15px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-size:12px;
  font-weight:750;
  text-decoration:none;
  cursor:pointer;
  transition:transform .2s ease,border-color .2s ease,background .2s ease,box-shadow .2s ease;
}
.espo-profile-tool:hover { transform:translateY(-1px);border-color:rgba(39,119,184,.35);background:#fff;box-shadow:0 8px 22px rgba(14,54,84,.08); }
.espo-profile-tool--download { background:var(--profile-navy);border-color:var(--profile-navy);color:#fff; }
.espo-profile-tool--download:hover { background:#164a70;color:#fff;border-color:#164a70; }
.espo-profile-tool__icon { font-size:16px;line-height:1;font-weight:500; }

.espo-profile-app__main {
  flex:1;
  min-height:0;
  width:min(100%,1500px);
  margin:0 auto;
  padding:clamp(20px,3.4vh,42px) clamp(16px,3vw,48px) max(22px,env(safe-area-inset-bottom));
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:18px;
}
.espo-profile-viewer {
  min-height:0;
  display:grid;
  grid-template-columns:60px minmax(0,1fr) 60px;
  align-items:center;
  gap:clamp(8px,1.6vw,26px);
}
.espo-profile-book-shell {
  min-width:0;
  position:relative;
  display:grid;
  place-items:center;
  perspective:2200px;
}
.espo-profile-book {
  position:relative;
  width:min(100%,1180px);
  aspect-ratio:842.25 / 595.5;
  border-radius:5px 10px 10px 5px;
  background:#f4f7f8;
  box-shadow:var(--profile-shadow);
  overflow:hidden;
  transform-style:preserve-3d;
  outline:none;
  isolation:isolate;
}
.espo-profile-book:focus-visible { box-shadow:0 0 0 3px rgba(39,119,184,.25),var(--profile-shadow); }
.espo-profile-book::before {
  content:"";
  position:absolute;
  z-index:9;
  inset:0 auto 0 0;
  width:15px;
  pointer-events:none;
  background:linear-gradient(90deg,rgba(10,35,51,.17),rgba(10,35,51,.035) 35%,transparent);
  mix-blend-mode:multiply;
  opacity:.45;
}
.espo-profile-book::after {
  content:"";
  position:absolute;
  z-index:10;
  inset:0;
  border:1px solid rgba(14,54,84,.12);
  border-radius:inherit;
  pointer-events:none;
}
.espo-profile-book__stack {
  position:absolute;
  z-index:-1;
  inset:9px -8px -8px 8px;
  border-radius:7px;
  background:#fff;
  box-shadow:0 3px 0 rgba(14,54,84,.08),0 6px 0 rgba(255,255,255,.95),0 9px 0 rgba(14,54,84,.05);
}
.espo-profile-book__page {
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  background:#f5f9fb;
  user-select:none;
  -webkit-user-drag:none;
}
.espo-profile-book__page--under { z-index:1; }
.espo-profile-book__page--current { z-index:2; }
.espo-profile-book__shine {
  position:absolute;
  z-index:7;
  inset:0;
  pointer-events:none;
  background:linear-gradient(108deg,transparent 0 45%,rgba(255,255,255,.15) 49%,transparent 54%);
  opacity:.32;
}
.espo-profile-book__turn {
  position:absolute;
  z-index:6;
  inset:0;
  transform-style:preserve-3d;
  backface-visibility:hidden;
  pointer-events:none;
  opacity:0;
  filter:drop-shadow(0 12px 18px rgba(9,31,45,.18));
}
.espo-profile-book__turn img { width:100%;height:100%;object-fit:contain;display:block;background:#f5f9fb;backface-visibility:hidden; }
.espo-profile-book__turn::after {
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(90deg,transparent 55%,rgba(10,35,51,.16));
  opacity:0;
  transition:opacity .24s ease;
}
.espo-profile-book__turn.is-next { transform-origin:left center; }
.espo-profile-book__turn.is-prev { transform-origin:right center; }
.espo-profile-book__turn.is-animating { opacity:1;transition:transform .64s cubic-bezier(.24,.72,.24,1),opacity .18s ease; }
.espo-profile-book__turn.is-next.is-animating { transform:rotateY(-92deg) translateZ(1px); }
.espo-profile-book__turn.is-prev.is-animating { transform:rotateY(92deg) translateZ(1px); }
.espo-profile-book__turn.is-animating::after { opacity:1; }
.espo-profile-book.is-entering .espo-profile-book__page--current { animation:espo-profile-page-enter .34s ease both; }
@keyframes espo-profile-page-enter { from{opacity:.7;transform:scale(.996)} to{opacity:1;transform:scale(1)} }

.espo-profile-edge {
  width:54px;
  height:54px;
  border-radius:999px;
  border:1px solid rgba(14,54,84,.13);
  background:rgba(255,255,255,.82);
  color:var(--profile-navy);
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow:0 12px 28px rgba(14,54,84,.08);
  transition:transform .2s ease,opacity .2s ease,background .2s ease;
}
.espo-profile-edge span { font-size:38px;font-weight:250;line-height:.8;margin-top:-3px; }
.espo-profile-edge:hover:not(:disabled) { transform:translateY(-2px) scale(1.03);background:#fff; }
.espo-profile-edge:disabled { opacity:.22;cursor:default;box-shadow:none; }
.espo-profile-loading {
  position:absolute;
  z-index:12;
  inset:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  color:var(--profile-navy);
  background:rgba(244,248,250,.88);
  backdrop-filter:blur(8px);
  border-radius:10px;
  transition:opacity .2s ease,visibility .2s ease;
}
.espo-profile-loading[hidden] { display:none!important; }
.espo-profile-loading span { width:32px;height:32px;border-radius:50%;border:2px solid rgba(14,54,84,.14);border-top-color:var(--profile-blue);animation:espo-profile-spin .8s linear infinite; }
.espo-profile-loading b { font-size:12px;letter-spacing:.03em; }
@keyframes espo-profile-spin { to{ transform:rotate(360deg); } }

.espo-profile-controls {
  width:min(100%,1180px);
  margin:0 auto;
  display:grid;
  grid-template-columns:minmax(160px,1fr) minmax(220px,1.25fr) minmax(160px,1fr);
  align-items:center;
  gap:20px;
}
.espo-profile-controls__button {
  appearance:none;
  border:0;
  background:transparent;
  color:#607686;
  font-size:12px;
  font-weight:750;
  display:flex;
  align-items:center;
  gap:8px;
  cursor:pointer;
  padding:8px 0;
}
.espo-profile-controls__button:last-child { justify-content:flex-end; }
.espo-profile-controls__button:hover:not(:disabled) { color:var(--profile-blue); }
.espo-profile-controls__button:disabled { opacity:.28;cursor:default; }
.espo-profile-controls__center { display:flex;align-items:center;gap:14px;justify-content:center; }
.espo-profile-progress { width:min(190px,42vw);height:3px;border-radius:999px;background:rgba(14,54,84,.11);overflow:hidden; }
.espo-profile-progress span { display:block;width:3.333%;height:100%;background:linear-gradient(90deg,var(--profile-yellow),var(--profile-blue),var(--profile-red),var(--profile-green));transition:width .35s ease; }
.espo-profile-counter { display:flex;align-items:center;gap:5px;color:#738492;font-size:11px;white-space:nowrap; }
.espo-profile-counter strong { color:var(--profile-navy);font-size:12px; }
.espo-profile-counter i { font-style:normal;color:#9ba8b1; }

.espo-profile-thumbs {
  position:fixed;
  z-index:1002;
  top:0;
  right:0;
  width:min(430px,92vw);
  height:100dvh;
  padding:max(20px,env(safe-area-inset-top)) 18px max(20px,env(safe-area-inset-bottom));
  background:rgba(250,252,253,.97);
  border-left:1px solid rgba(14,54,84,.12);
  box-shadow:-26px 0 70px rgba(14,54,84,.14);
  backdrop-filter:blur(18px);
  overflow:hidden;
  transform:translateX(102%);
  transition:transform .34s cubic-bezier(.24,.72,.24,1);
  display:flex;
  flex-direction:column;
}
[dir="rtl"] .espo-profile-thumbs { right:auto;left:0;border-left:0;border-right:1px solid rgba(14,54,84,.12);box-shadow:26px 0 70px rgba(14,54,84,.14);transform:translateX(-102%); }
.espo-profile-thumbs.is-open { transform:translateX(0); }
.espo-profile-thumbs[hidden] { display:none!important; }
.espo-profile-thumbs__head { display:flex;align-items:center;justify-content:space-between;gap:16px;padding:0 4px 16px;border-bottom:1px solid rgba(14,54,84,.10); }
.espo-profile-thumbs__head > div { display:flex;flex-direction:column;gap:2px; }
.espo-profile-thumbs__head span { font-size:9px;letter-spacing:.16em;text-transform:uppercase;color:#7a8b97; }
.espo-profile-thumbs__head strong { color:var(--profile-navy);font-size:20px; }
.espo-profile-thumbs__head button { width:38px;height:38px;border-radius:50%;border:1px solid rgba(14,54,84,.13);background:#fff;color:var(--profile-navy);font-size:23px;cursor:pointer; }
.espo-profile-thumbs__grid {
  flex:1;
  min-height:0;
  overflow:auto;
  padding:18px 4px 8px;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:14px;
  align-content:start;
  overscroll-behavior:contain;
}
.espo-profile-thumb {
  appearance:none;
  border:1px solid rgba(14,54,84,.10);
  background:#fff;
  border-radius:10px;
  padding:6px;
  cursor:pointer;
  position:relative;
  box-shadow:0 8px 20px rgba(14,54,84,.05);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.espo-profile-thumb:hover { transform:translateY(-2px);border-color:rgba(39,119,184,.35);box-shadow:0 12px 24px rgba(14,54,84,.09); }
.espo-profile-thumb.is-current { border-color:var(--profile-blue);box-shadow:0 0 0 2px rgba(39,119,184,.12),0 12px 24px rgba(14,54,84,.08); }
.espo-profile-thumb img { width:100%;aspect-ratio:842.25/595.5;object-fit:cover;display:block;border-radius:6px;background:#eef3f6; }
.espo-profile-thumb span { position:absolute;right:10px;bottom:9px;min-width:26px;height:24px;padding:0 6px;border-radius:999px;background:rgba(9,40,62,.82);color:#fff;display:grid;place-items:center;font-size:10px;font-weight:800;backdrop-filter:blur(6px); }
[dir="rtl"] .espo-profile-thumb span { right:auto;left:10px; }
.espo-profile-thumbs__backdrop { position:fixed;z-index:1001;inset:0;border:0;background:rgba(7,27,40,.24);backdrop-filter:blur(3px);cursor:pointer; }
.espo-profile-thumbs__backdrop[hidden] { display:none!important; }
.espo-profile-noscript { text-align:center;padding:2rem; }

html.espo-profile-fullscreen,
html.espo-profile-fullscreen body { overflow:hidden!important; }
.espo-profile-app:fullscreen { background:#edf3f6; }
.espo-profile-app:fullscreen .espo-profile-app__bar { min-height:70px;padding-top:12px; }
.espo-profile-app:fullscreen .espo-profile-app__main { padding-top:16px;padding-bottom:16px; }

@media (max-width:900px) {
  .espo-profile-app__bar { grid-template-columns:auto minmax(0,1fr) auto;gap:12px;min-height:72px;padding-inline:16px; }
  .espo-profile-app__identity span { display:none; }
  .espo-profile-app__identity strong { font-size:14px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
  .espo-profile-app__brand .espo-custom-logo-image { height:39px!important; }
  .espo-profile-tool { width:40px;height:40px;padding:0; }
  .espo-profile-tool span:not(.espo-profile-tool__icon) { display:none; }
  .espo-profile-tool__label { display:none!important; }
  .espo-profile-app__main { justify-content:flex-start;padding:22px 10px max(18px,env(safe-area-inset-bottom)); }
  .espo-profile-viewer { grid-template-columns:1fr;display:block; }
  .espo-profile-edge { display:none; }
  .espo-profile-book { width:100%;border-radius:4px; }
  .espo-profile-controls { grid-template-columns:1fr auto 1fr;gap:8px;padding:0 4px; }
  .espo-profile-controls__button { font-size:0;min-width:44px; }
  .espo-profile-controls__button span[aria-hidden="true"] { font-size:22px; }
  .espo-profile-controls__center { gap:8px; }
  .espo-profile-progress { width:min(140px,38vw); }
  .espo-profile-counter > span { display:none; }
}
@media (max-width:560px) {
  .espo-profile-app__bar { min-height:66px; }
  .espo-profile-app__identity { display:none; }
  .espo-profile-app__tools { margin-inline-start:auto; }
  .espo-profile-app__main { gap:14px;padding-top:clamp(16px,5vh,26px); }
  .espo-profile-book-shell { perspective:1500px; }
  .espo-profile-controls { grid-template-columns:44px 1fr 44px; }
  .espo-profile-controls__center { flex-direction:column-reverse;gap:6px; }
  .espo-profile-progress { width:min(210px,60vw); }
  .espo-profile-thumbs__grid { grid-template-columns:1fr; }
}
@media (prefers-reduced-motion:reduce) {
  .espo-profile-book__turn,
  .espo-profile-thumb,
  .espo-profile-tool,
  .espo-profile-edge { transition:none!important;animation:none!important; }
}


/* ================================================================
   v2 mobile stability pass — isolated QR reader / touch reliability
   ================================================================ */
body.espo-profile-standalone,
body.espo-profile-standalone * { box-sizing:border-box; }
body.espo-profile-standalone {
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  overscroll-behavior-x:none;
}
body.espo-profile-standalone button,
body.espo-profile-standalone a { font:inherit; -webkit-tap-highlight-color:transparent; }
body.espo-profile-standalone img { max-width:100%; }
.espo-profile-book {
  touch-action:pan-y pinch-zoom;
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
  contain:layout paint style;
}
.espo-profile-book__page,
.espo-profile-book__turn { will-change:transform,opacity; }
.espo-profile-book__page--current { transform:translateZ(0); }

/* The page-turn stays 3D on desktop, but a lighter sheet-swipe is used on
   phones/tablets. It is materially smoother on mobile Safari/Chrome GPUs. */
.espo-profile-app.is-mobile-reader .espo-profile-book-shell { perspective:none; }
.espo-profile-app.is-mobile-reader .espo-profile-book { transform-style:flat; }
.espo-profile-app.is-mobile-reader .espo-profile-book__turn {
  transform-origin:center center!important;
  backface-visibility:visible;
  filter:drop-shadow(0 12px 18px rgba(9,31,45,.16));
}
.espo-profile-app.is-mobile-reader .espo-profile-book__turn.is-animating {
  transition:transform .34s cubic-bezier(.2,.72,.22,1),opacity .28s ease;
}
.espo-profile-app.is-mobile-reader .espo-profile-book__turn.is-next.is-animating {
  transform:translate3d(-106%,0,0) rotateZ(-1.2deg);
  opacity:.42;
}
.espo-profile-app.is-mobile-reader .espo-profile-book__turn.is-prev.is-animating {
  transform:translate3d(106%,0,0) rotateZ(1.2deg);
  opacity:.42;
}
[dir="rtl"].espo-profile-app.is-mobile-reader .espo-profile-book__turn.is-next.is-animating {
  transform:translate3d(106%,0,0) rotateZ(1.2deg);
}
[dir="rtl"].espo-profile-app.is-mobile-reader .espo-profile-book__turn.is-prev.is-animating {
  transform:translate3d(-106%,0,0) rotateZ(-1.2deg);
}

@media (max-width:900px) {
  body.espo-profile-standalone { min-height:100svh; }
  .espo-profile-app { min-height:100svh; }
  .espo-profile-app__bar {
    position:sticky;
    top:0;
    z-index:50;
    min-height:64px;
    padding:max(10px,env(safe-area-inset-top)) 12px 10px;
    background:rgba(250,252,253,.94);
    backdrop-filter:blur(14px) saturate(125%);
    -webkit-backdrop-filter:blur(14px) saturate(125%);
  }
  body.admin-bar.espo-profile-standalone .espo-profile-app__bar { top:46px; }
  .espo-profile-app__bar::after { left:12px;width:92px; }
  .espo-profile-app__brand .espo-custom-logo-image { height:36px!important;max-width:92px!important;object-fit:contain; }
  .espo-profile-app__brand .espo-logo { max-width:92px;transform:scale(.78);transform-origin:left center; }
  .espo-profile-app__tools { gap:6px; }
  .espo-profile-tool { width:38px;height:38px;min-width:38px;border-radius:50%; }
  .espo-profile-app__main {
    width:100%;
    min-height:0;
    padding:12px 8px max(14px,env(safe-area-inset-bottom));
    gap:12px;
  }
  .espo-profile-viewer,
  .espo-profile-book-shell { width:100%;min-width:0; }
  .espo-profile-book {
    width:min(100%,1180px);
    max-width:100%;
    border-radius:5px;
    box-shadow:0 16px 42px rgba(18,43,62,.18),0 4px 14px rgba(18,43,62,.09);
    cursor:grab;
  }
  .espo-profile-book:active { cursor:grabbing; }
  .espo-profile-book::before { width:8px;opacity:.32; }
  .espo-profile-book__shine { opacity:.18; }
  .espo-profile-controls {
    width:100%;
    max-width:760px;
    min-height:48px;
    padding:0 2px;
  }
  .espo-profile-controls__button {
    min-height:44px;
    min-width:44px;
    justify-content:center;
    touch-action:manipulation;
  }
  .espo-profile-controls__button:last-child { justify-content:center; }
  .espo-profile-progress { height:4px; }
  .espo-profile-thumbs {
    width:min(420px,100vw);
    max-width:100vw;
    padding:max(14px,env(safe-area-inset-top)) 12px max(14px,env(safe-area-inset-bottom));
  }
  .espo-profile-thumbs__grid { grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;padding-inline:0; }
  .espo-profile-thumb { padding:5px;border-radius:8px;touch-action:manipulation; }
}

@media (max-width:560px) {
  .espo-profile-app__bar { min-height:60px; }
  .espo-profile-app__brand .espo-custom-logo-image { height:33px!important; }
  .espo-profile-app__main { padding-top:10px;gap:10px; }
  .espo-profile-controls { grid-template-columns:44px minmax(0,1fr) 44px; }
  .espo-profile-controls__center { width:100%; }
  .espo-profile-progress { width:min(220px,64vw); }
  .espo-profile-counter { font-size:10px; }
  .espo-profile-counter strong { font-size:11px; }
}

@media (max-width:360px) {
  .espo-profile-tool { width:36px;height:36px;min-width:36px; }
  .espo-profile-app__brand .espo-custom-logo-image { height:30px!important;max-width:80px!important; }
  .espo-profile-thumbs__grid { grid-template-columns:1fr; }
}

@media (orientation:landscape) and (max-height:520px) and (max-width:1000px) {
  .espo-profile-app__bar { min-height:52px;padding-top:max(6px,env(safe-area-inset-top));padding-bottom:6px; }
  .espo-profile-app__brand .espo-custom-logo-image { height:29px!important; }
  .espo-profile-app__main { padding-top:7px;padding-bottom:7px;gap:6px; }
  .espo-profile-book { width:min(100%,calc((100svh - 118px) * 1.41343)); }
  .espo-profile-controls { min-height:38px; }
  .espo-profile-controls__button { min-height:38px; }
}

/* ================================================================
   v3.1 luxury reader — performance tuned
   Premium presentation without persistent GPU-heavy blur/filter layers.
   ================================================================ */
html:has(body.espo-profile-standalone){background:#0c1319}
body.espo-profile-standalone{
  background:linear-gradient(180deg,#13212a 0%,#0d171e 55%,#091116 100%);
  color:#edf3f6;
}
body.espo-profile-standalone::before{display:none}
.espo-profile-app{
  --profile-gold:#cdb176;
  --profile-gold-strong:#dec58c;
  --profile-shadow:0 34px 86px rgba(0,0,0,.42),0 12px 30px rgba(0,0,0,.22);
  z-index:1;
}
.espo-profile-app::before{
  position:absolute;
  opacity:.10;
  background-image:linear-gradient(rgba(218,229,235,.035) 1px,transparent 1px),linear-gradient(90deg,rgba(218,229,235,.035) 1px,transparent 1px);
  background-size:56px 56px;
  mask-image:none;
  -webkit-mask-image:none;
}
.espo-profile-app::after{display:none}

/* Premium top command bar */
.espo-profile-app__bar{
  width:min(calc(100% - 32px),1460px);
  min-height:72px;
  margin:16px auto 0;
  padding:11px 18px;
  border:1px solid rgba(224,232,237,.12);
  border-radius:18px;
  background:linear-gradient(180deg,#1a2a35,#111c24);
  box-shadow:0 14px 34px rgba(0,0,0,.20),0 1px 0 rgba(255,255,255,.04) inset;
  backdrop-filter:none;
  -webkit-backdrop-filter:none;
}
.espo-profile-app__bar::after{
  left:20px;
  bottom:-1px;
  width:102px;
  height:1px;
  background:linear-gradient(90deg,transparent,var(--profile-gold-strong),transparent);
  opacity:.88;
}
.espo-profile-app__brand .espo-custom-logo-image{filter:none}
.espo-profile-app__identity{gap:4px}
.espo-profile-app__identity span{color:#8fa2af;letter-spacing:.21em}
.espo-profile-app__identity strong{color:#f4f7f8;font-weight:680;letter-spacing:.005em}
.espo-profile-app__tools{gap:7px}
.espo-profile-tool{
  height:40px;
  border-color:rgba(225,234,239,.13);
  background:#1c2b35;
  color:#dfe7eb;
  box-shadow:0 1px 0 rgba(255,255,255,.035) inset;
}
.espo-profile-tool:hover{border-color:rgba(205,177,118,.42);background:#263945;color:#fff;box-shadow:0 8px 18px rgba(0,0,0,.18)}
.espo-profile-tool--download{
  border-color:rgba(222,197,140,.70);
  background:linear-gradient(180deg,#d8bd82,#bea166);
  color:#152029;
  box-shadow:0 6px 16px rgba(0,0,0,.16),0 1px 0 rgba(255,255,255,.40) inset;
}
.espo-profile-tool--download:hover{background:linear-gradient(180deg,#e2ca94,#c9aa6d);border-color:#e7cf9a;color:#101820}

/* Publication stage */
.espo-profile-app__main{
  width:min(100%,1540px);
  padding-top:clamp(22px,3.7vh,44px);
  padding-bottom:max(26px,env(safe-area-inset-bottom));
  gap:20px;
}
.espo-profile-viewer{position:relative;grid-template-columns:64px minmax(0,1fr) 64px}
.espo-profile-book-shell{padding:clamp(8px,1vw,15px);border-radius:22px}
.espo-profile-book-shell::before{
  content:"";
  position:absolute;
  z-index:-2;
  left:8%;right:8%;bottom:-10px;height:22%;
  border-radius:50%;
  background:radial-gradient(ellipse,rgba(0,0,0,.34) 0%,rgba(0,0,0,.12) 48%,transparent 73%);
  transform:perspective(700px) rotateX(68deg);
  transform-origin:center bottom;
}
.espo-profile-book-shell::after{display:none}
.espo-profile-book{
  width:min(100%,1190px);
  border-radius:9px 13px 13px 9px;
  background:#eef3f5;
  box-shadow:var(--profile-shadow);
  transition:box-shadow .30s ease,transform .30s cubic-bezier(.2,.72,.22,1);
}
.espo-profile-app.is-ready .espo-profile-book{animation:espo-profile-luxury-arrive .40s cubic-bezier(.2,.74,.22,1) both}
@keyframes espo-profile-luxury-arrive{from{opacity:.84;transform:translateY(6px) scale(.996)}to{opacity:1;transform:none}}
.espo-profile-app.is-turning .espo-profile-book{box-shadow:0 42px 96px rgba(0,0,0,.46),0 12px 30px rgba(0,0,0,.25)}
.espo-profile-book::before{
  width:18px;
  background:linear-gradient(90deg,rgba(4,12,18,.24),rgba(12,29,39,.07) 40%,rgba(255,255,255,.035) 68%,transparent);
  opacity:.54;
  mix-blend-mode:normal;
}
.espo-profile-book::after{border-color:rgba(255,255,255,.28);box-shadow:0 0 0 1px rgba(9,26,37,.12) inset}
.espo-profile-book__stack{
  inset:8px -9px -9px 8px;
  border-radius:9px;
  background:#f7f8f7;
  box-shadow:0 3px 0 rgba(224,226,221,.92),0 6px 0 rgba(246,246,243,.94),0 9px 0 rgba(164,157,139,.24),0 11px 24px rgba(0,0,0,.18);
}
.espo-profile-book__page{background:#eef3f5;will-change:auto}
.espo-profile-book__shine{background:linear-gradient(105deg,transparent 0 42%,rgba(255,255,255,.14) 48%,transparent 56%);opacity:.22}
.espo-profile-book__turn{filter:none;will-change:auto}
.espo-profile-app.is-turning .espo-profile-book__turn{will-change:transform,opacity}
.espo-profile-book__turn::before{
  content:"";position:absolute;z-index:2;inset:0;pointer-events:none;opacity:0;
  background:linear-gradient(90deg,rgba(255,255,255,.02),rgba(255,255,255,.18) 47%,rgba(30,39,44,.15) 79%,rgba(5,13,18,.22));
  transition:opacity .18s ease;
}
.espo-profile-book__turn::after{background:linear-gradient(90deg,transparent 40%,rgba(14,24,31,.05) 60%,rgba(6,13,18,.22) 94%)}
.espo-profile-book__turn.is-prev::after{background:linear-gradient(270deg,transparent 40%,rgba(14,24,31,.05) 60%,rgba(6,13,18,.22) 94%)}
.espo-profile-book__turn.is-animating::before{opacity:.72}
.espo-profile-book__turn.is-animating{transition:transform .60s cubic-bezier(.19,.78,.19,1),opacity .16s ease}
.espo-profile-book__turn.is-next.is-animating{transform:rotateY(-93deg) translateZ(1px)}
.espo-profile-book__turn.is-prev.is-animating{transform:rotateY(93deg) translateZ(1px)}
.espo-profile-book.is-entering .espo-profile-book__page--current{animation:espo-profile-page-enter-luxe .24s ease both}
@keyframes espo-profile-page-enter-luxe{from{opacity:.86;transform:scale(.997)}to{opacity:1;transform:scale(1)}}

/* Gallery navigation */
.espo-profile-edge{
  width:52px;height:52px;
  border-color:rgba(226,234,238,.13);
  background:linear-gradient(180deg,#273a46,#15232c);
  color:var(--profile-gold-strong);
  box-shadow:0 12px 28px rgba(0,0,0,.20),0 1px 0 rgba(255,255,255,.04) inset;
  backdrop-filter:none;-webkit-backdrop-filter:none;
}
.espo-profile-edge:hover:not(:disabled){background:linear-gradient(180deg,#314956,#1a2a34);color:#f0d9a5;box-shadow:0 14px 30px rgba(0,0,0,.25)}
.espo-profile-edge:disabled{opacity:.17}
.espo-profile-loading{color:#e9eef1;background:#111c23;backdrop-filter:none;-webkit-backdrop-filter:none;border-radius:12px}
.espo-profile-loading span{border-color:rgba(255,255,255,.13);border-top-color:var(--profile-gold-strong)}
.espo-profile-loading b{color:#cbd5da;font-weight:600}

/* Compact floating reading dock */
.espo-profile-controls{
  width:min(calc(100% - 120px),820px);
  min-height:52px;
  padding:6px 10px;
  grid-template-columns:minmax(92px,.7fr) minmax(260px,1.8fr) minmax(92px,.7fr);
  gap:14px;
  border:1px solid rgba(225,234,239,.10);
  border-radius:999px;
  background:linear-gradient(180deg,#1b2a34,#101a21);
  box-shadow:0 12px 28px rgba(0,0,0,.18),0 1px 0 rgba(255,255,255,.035) inset;
  backdrop-filter:none;-webkit-backdrop-filter:none;
}
.espo-profile-controls__button{color:#aab9c2;padding:8px 10px;border-radius:999px;transition:color .2s ease,background .2s ease,transform .2s ease}
.espo-profile-controls__button:hover:not(:disabled){color:#f0d8a3;background:rgba(255,255,255,.045);transform:translateY(-1px)}
.espo-profile-controls__button:disabled{opacity:.20}
.espo-profile-controls__center{gap:12px}
.espo-profile-progress{width:min(220px,30vw);height:2px;background:rgba(232,239,242,.13)}
.espo-profile-progress span{background:linear-gradient(90deg,#b99658 0%,#e0c990 36%,#d0b06f 100%);box-shadow:none}
.espo-profile-counter{color:#8396a2;letter-spacing:.035em}
.espo-profile-counter strong{color:#e9eff2;font-weight:730}
.espo-profile-counter i{color:#5f737f}

/* Page drawer — thumbnails are dedicated low-res assets */
.espo-profile-thumbs{
  background:linear-gradient(180deg,#142029,#0b1217);
  border-left-color:rgba(228,235,239,.10);
  box-shadow:-26px 0 64px rgba(0,0,0,.34);
  backdrop-filter:none;-webkit-backdrop-filter:none;
}
[dir="rtl"] .espo-profile-thumbs{border-right-color:rgba(228,235,239,.10);box-shadow:26px 0 64px rgba(0,0,0,.34)}
.espo-profile-thumbs__head{border-bottom-color:rgba(228,235,239,.09)}
.espo-profile-thumbs__head span{color:#7f929e}
.espo-profile-thumbs__head strong{color:#f1f4f5;font-weight:650}
.espo-profile-thumbs__head button{border-color:rgba(229,236,240,.12);background:#1d2b34;color:#e6ecef}
.espo-profile-thumb{border-color:rgba(226,234,238,.10);background:#f4f4f1;border-radius:11px;box-shadow:0 8px 18px rgba(0,0,0,.14);contain:layout paint;content-visibility:auto;contain-intrinsic-size:230px 168px}
.espo-profile-thumb:hover{border-color:rgba(205,177,118,.46);box-shadow:0 10px 22px rgba(0,0,0,.21)}
.espo-profile-thumb.is-current{border-color:var(--profile-gold-strong);box-shadow:0 0 0 2px rgba(205,177,118,.14),0 10px 22px rgba(0,0,0,.21)}
.espo-profile-thumb span{background:#101a21;color:#f0d9a6;backdrop-filter:none;-webkit-backdrop-filter:none}
.espo-profile-thumbs__backdrop{background:rgba(3,8,12,.68);backdrop-filter:none;-webkit-backdrop-filter:none}
.espo-profile-noscript{color:#dce5e9}

.espo-profile-app:fullscreen{background:linear-gradient(180deg,#101a21,#090f14)}
.espo-profile-app:fullscreen .espo-profile-app__bar{margin-top:10px}
.espo-profile-app:fullscreen .espo-profile-book{width:min(100%,1280px)}

@media(max-width:900px){
  body.espo-profile-standalone{background:linear-gradient(180deg,#121d24 0%,#0b1319 100%)}
  .espo-profile-app__bar{
    width:100%;margin:0;border-radius:0;border-top:0;border-left:0;border-right:0;
    min-height:62px;padding:max(9px,env(safe-area-inset-top)) 12px 9px;
    background:#111c23;box-shadow:0 8px 22px rgba(0,0,0,.18);
    backdrop-filter:none;-webkit-backdrop-filter:none;
  }
  .espo-profile-app__bar::after{left:12px;width:76px;background:linear-gradient(90deg,var(--profile-gold),transparent)}
  .espo-profile-app__main{padding:14px 8px max(15px,env(safe-area-inset-bottom));gap:12px}
  .espo-profile-book-shell{padding:3px 2px 8px;border-radius:14px}
  .espo-profile-book-shell::before{left:9%;right:9%;bottom:-5px;height:16%}
  .espo-profile-book{border-radius:6px;box-shadow:0 18px 44px rgba(0,0,0,.34),0 5px 14px rgba(0,0,0,.18)}
  .espo-profile-book::after{border-color:rgba(255,255,255,.20)}
  .espo-profile-controls{
    width:min(calc(100% - 8px),640px);min-height:50px;
    grid-template-columns:44px minmax(0,1fr) 44px;padding:5px 7px;gap:6px;
    border-radius:18px;background:#111c23;box-shadow:0 8px 24px rgba(0,0,0,.18)
  }
  .espo-profile-controls__button{min-width:40px;min-height:40px;padding:4px}
  .espo-profile-controls__center{gap:9px}
  .espo-profile-progress{width:min(180px,48vw);height:2px}
  .espo-profile-app.is-mobile-reader .espo-profile-book__turn{filter:none!important}
  .espo-profile-app.is-mobile-reader .espo-profile-book__turn.is-animating{transition:transform .30s cubic-bezier(.2,.72,.22,1),opacity .24s ease}
  .espo-profile-thumbs{background:#0d171d}
}
@media(max-width:560px){
  .espo-profile-app__bar{min-height:58px}
  .espo-profile-app__main{padding-top:11px;gap:10px}
  .espo-profile-controls{border-radius:16px}
  .espo-profile-controls__center{flex-direction:column-reverse;gap:5px}
  .espo-profile-progress{width:min(220px,61vw)}
}
@media(orientation:landscape) and (max-height:520px) and (max-width:1000px){
  .espo-profile-app__bar{min-height:48px}
  .espo-profile-app__main{padding-top:5px;padding-bottom:5px;gap:5px}
  .espo-profile-controls{min-height:36px;padding-top:2px;padding-bottom:2px}
}
@media(prefers-reduced-motion:reduce){
  .espo-profile-app.is-ready .espo-profile-book,.espo-profile-book.is-entering .espo-profile-book__page--current{animation:none!important}
}
