/* Phase 1 shell rebuild
   Replace full file: /wp-content/uploads/drtory-book/assets/book.css */

:root{
  --dr-book-bg:#edf2fb;
  --dr-book-card:#ffffff;
  --dr-book-card-2:#f8faff;
  --dr-book-text:#18243a;
  --dr-book-muted:#637188;
  --dr-book-border:rgba(24,36,58,0.10);
  --dr-book-shadow:0 16px 42px rgba(16,29,68,0.08);
  --dr-book-accent:#5c49d8;
  --dr-book-accent-2:#8dd5ff;
  --dr-book-hero-1:#0f1d4f;
  --dr-book-hero-2:#2d469d;
  --dr-book-radius:24px;
}

*{ box-sizing:border-box; }

.dr-book{
  font-family:system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
  color:var(--dr-book-text);
  max-width:1260px;
  margin:18px auto 28px;
  padding:0 12px;
}

.dr-book__empty{
  padding:28px;
  border-radius:18px;
  background:#fff;
  border:1px solid var(--dr-book-border);
  color:var(--dr-book-muted);
}

.dr-book__hero,
.dr-book__controls-shell,
.dr-book__sidebar-inner,
.dr-book__pane,
.dr-book__summary-card,
.dr-book__section{
  background:var(--dr-book-card);
  border:1px solid var(--dr-book-border);
  box-shadow:var(--dr-book-shadow);
}

.dr-book__hero{
  position:relative;
  overflow:hidden;
  border-radius:28px;
  margin-bottom:18px;
  min-height:290px;
  background:
    linear-gradient(135deg, rgba(15,29,79,.82), rgba(45,70,157,.62)),
    url('/wp-content/uploads/drtory-book/assets/hero/hero1.png') center/cover no-repeat;
}

.dr-book__hero::after{
  content:"";
  position:absolute;
  inset:0;
  background:
    radial-gradient(circle at 84% 18%, rgba(141,213,255,.18), transparent 18%),
    radial-gradient(circle at 88% 72%, rgba(122,99,255,.16), transparent 22%);
  pointer-events:none;
}

.dr-book__hero-inner{
  position:relative;
  z-index:2;
  padding:28px;
  display:grid;
  grid-template-columns:minmax(0,1.2fr) minmax(280px,.8fr);
  gap:22px;
  align-items:center;
  min-height:290px;
}

.dr-book__eyebrow{
  font-size:12px;
  letter-spacing:.14em;
  font-weight:800;
  text-transform:uppercase;
  color:rgba(255,255,255,.88);
  margin-bottom:10px;
}

.dr-book__hero-title{
  font-size:56px;
  line-height:1.02;
  margin:0 0 6px;
  color:#fff;
  font-weight:900;
  letter-spacing:-0.03em;
  text-shadow:0 10px 26px rgba(0,0,0,.16);
}

.dr-book__hero-subtitle{
  font-size:19px;
  color:#fff;
  font-weight:700;
  margin-bottom:18px;
}

.dr-book__hero-blurb{
  font-size:18px;
  line-height:1.7;
  color:rgba(255,255,255,.93);
  max-width:760px;
  margin:0 0 18px;
}

.dr-book__hero-actions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.dr-book__mn-wrap{
  justify-self:end;
  width:min(100%,320px);
  background:rgba(255,255,255,.08);
  border:1px solid rgba(255,255,255,.12);
  border-radius:26px;
  padding:22px;
  text-align:center;
  backdrop-filter:blur(6px);
}

.dr-book__mn-icon{
  width:148px;
  max-width:100%;
  height:auto;
  display:block;
  margin:0 auto 12px;
  object-fit:contain;
}

.dr-book__mn-badge{
  font-size:24px;
  font-weight:900;
  color:#fff;
  margin-bottom:6px;
}

.dr-book__mn-caption{
  font-size:14px;
  line-height:1.45;
  color:rgba(255,255,255,.90);
  max-width:240px;
  margin:0 auto;
}

.dr-book__button,
.dr-book__chip,
.dr-book__select,
.dr-book__toc-button,
.dr-book__social-link,
.dr-book__footer-link{
  font:inherit;
}

.dr-book__button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:999px;
  padding:11px 16px;
  text-decoration:none;
  cursor:pointer;
  font-weight:700;
  border:1px solid rgba(255,255,255,.24);
  background:rgba(255,255,255,.10);
  color:#fff;
}

.dr-book__button:hover{
  background:rgba(255,255,255,.18);
}

.dr-book__button--pdf{
  min-height:56px;
  border-color:var(--dr-book-border);
  background:#fff;
  color:var(--dr-book-text);
}

.dr-book__controls-shell{
  padding:22px;
  border-radius:24px;
  margin-bottom:18px;
}

.dr-book__controls-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:20px;
  flex-wrap:wrap;
}

.dr-book__chapter-kicker{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--dr-book-accent);
  font-weight:800;
  margin-bottom:8px;
}

.dr-book__chapter-title{
  font-size:48px;
  line-height:1.02;
  font-weight:900;
  color:var(--dr-book-text);
}

.dr-book__summary{
  max-width:900px;
  color:var(--dr-book-muted);
  line-height:1.65;
  margin-top:8px;
  font-size:18px;
}

.dr-book__mode-group{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.dr-book__chip{
  appearance:none;
  border:1px solid var(--dr-book-border);
  background:#fff;
  color:var(--dr-book-text);
  border-radius:999px;
  padding:11px 16px;
  cursor:pointer;
  font-weight:700;
}

.dr-book__chip.is-active{
  background:var(--dr-book-accent);
  color:#fff;
  border-color:var(--dr-book-accent);
}

.dr-book__jumpbar{
  display:grid;
  grid-template-columns:1.05fr 1.35fr auto;
  gap:14px;
  border-top:1px solid var(--dr-book-border);
  margin-top:18px;
  padding-top:16px;
  align-items:end;
}

.dr-book__field{
  display:flex;
  flex-direction:column;
  gap:8px;
}

.dr-book__field--button{
  justify-content:end;
}

.dr-book__field-label{
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--dr-book-muted);
  font-weight:800;
}

.dr-book__select{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%235c49d8' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 16px center/18px;
  border:1px solid rgba(24,36,58,.14);
  border-radius:18px;
  min-height:56px;
  padding:0 52px 0 18px;
  color:var(--dr-book-text);
  font-size:17px;
  line-height:1.3;
  box-shadow:0 2px 8px rgba(12,20,40,.04);
}

.dr-book__select:focus{
  outline:none;
  border-color:var(--dr-book-accent);
  box-shadow:0 0 0 4px rgba(92,73,216,.12);
}

.dr-book__content-shell{
  display:grid;
  grid-template-columns:320px minmax(0,1fr);
  gap:20px;
  align-items:start;
}

.dr-book__sidebar{
  position:sticky;
  top:18px;
  align-self:start;
}

.dr-book__sidebar-inner{
  padding:20px;
  border-radius:24px;
  background:linear-gradient(180deg,#fff,#fbfcff);
}

.dr-book__sidebar-brand{ margin-bottom:18px; }

.dr-book__sidebar-site{
  font-size:24px;
  font-weight:900;
  color:var(--dr-book-accent);
  margin-bottom:6px;
}

.dr-book__sidebar-copy{
  color:var(--dr-book-muted);
  line-height:1.6;
}

.dr-book__sidebar-title{
  font-size:13px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--dr-book-muted);
  margin:18px 0 10px;
}

.dr-book__socials{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-bottom:12px;
}

.dr-book__social-link{
  display:inline-flex;
  text-decoration:none;
  color:var(--dr-book-text);
  padding:10px 12px;
  border-radius:999px;
  background:var(--dr-book-card-2);
  border:1px solid var(--dr-book-border);
  font-weight:700;
}

.dr-book__toc-list{
  list-style:none;
  padding:0;
  margin:0;
  display:flex;
  flex-direction:column;
  gap:10px;
}

.dr-book__toc-item{ margin:0; }

.dr-book__toc-button{
  width:100%;
  text-align:left;
  border:1px solid var(--dr-book-border);
  background:#fff;
  border-radius:18px;
  padding:14px;
  cursor:pointer;
}

.dr-book__toc-button strong{
  display:block;
  font-size:15px;
}

.dr-book__toc-meta{
  display:block;
  font-size:12px;
  line-height:1.5;
  color:var(--dr-book-muted);
}

.dr-book__pane{
  border-radius:24px;
  min-width:0;
  display:flex;
  flex-direction:column;
  height:var(--pane-height, auto);
  overflow:hidden;
}

.dr-book__pane-header{
  padding:22px 22px 0;
  background:linear-gradient(180deg,#fff,#ffffff);
  border-bottom:1px solid rgba(24,36,58,.06);
}

.dr-book__pane-scroll{
  min-width:0;
  padding:18px 22px 22px;
}

.dr-book__reader-header{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:12px;
  margin-bottom:14px;
}

.dr-book__reader-title{
  margin:0;
  font-size:42px;
  line-height:1.05;
  font-weight:900;
}

.dr-book__reader-meta{
  margin-top:8px;
  color:var(--dr-book-muted);
  font-size:15px;
}

.dr-book__summary-card{
  padding:20px;
  border-radius:22px;
  margin-bottom:18px;
}

.dr-book__reader{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.dr-book__section{
  padding:24px;
  border-radius:22px;
  background:linear-gradient(180deg,#fff,#fcfdff);
}

.dr-book__section--part{
  border-left:5px solid var(--dr-book-accent);
}

.dr-book__section-label{
  display:inline-block;
  font-size:12px;
  letter-spacing:.12em;
  text-transform:uppercase;
  color:var(--dr-book-accent);
  font-weight:800;
  margin-bottom:10px;
}

.dr-book__section-subtitle{
  font-size:30px;
  line-height:1.15;
  margin:0 0 14px;
  color:var(--dr-book-text);
}

.dr-book__line{
  margin:0 0 10px;
  font-size:18px;
  line-height:1.85;
}

.dr-book__line--special{
  font-weight:700;
  color:#263a65;
}

.dr-book__paragraph{
  margin:0 0 16px;
  font-size:18px;
  line-height:1.85;
  color:var(--dr-book-text);
}

.dr-book__nav{
  display:flex;
  justify-content:space-between;
  gap:12px;
  flex-wrap:wrap;
  margin-top:22px;
  padding-bottom:12px;
}

.dr-book__footer{
  margin-top:18px;
  padding:16px 6px;
}

.dr-book__footer-brand{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
  flex-wrap:wrap;
  border-top:1px solid var(--dr-book-border);
  padding-top:18px;
}

.dr-book__footer-line1{ font-weight:800; }

.dr-book__footer-line2{
  font-size:13px;
  color:var(--dr-book-muted);
  margin-top:4px;
}

.dr-book__footer-links{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.dr-book__footer-link{
  text-decoration:none;
  color:var(--dr-book-text);
  font-weight:700;
  padding:8px 10px;
  border-radius:999px;
  background:#fff;
  border:1px solid var(--dr-book-border);
}

/* MODE DIFFERENCE - PHASE 1 */
.dr-book--page .dr-book__reader{
  gap:24px;
}

.dr-book--page .dr-book__section{
  padding:30px;
}

.dr-book--focus .dr-book__pane{
  max-width:860px;
  margin:0 auto;
}

.dr-book--focus .dr-book__section{
  padding:34px;
}

.dr-book--focus .dr-book__section-subtitle{
  font-size:34px;
}

.dr-book--focus .dr-book__line,
.dr-book--focus .dr-book__paragraph{
  font-size:22px;
  line-height:2.02;
}

.dr-book--scroll .dr-book__reader{
  gap:14px;
}

.dr-book--scroll .dr-book__section{
  padding:20px 22px;
}

/* KEY DESKTOP CONTAINMENT FIX */
@media (min-width:1000px){
  .dr-book__pane-scroll{
    overflow-y:auto;
    overflow-x:hidden;
    scroll-behavior:smooth;
    scrollbar-width:thin;
    scrollbar-color:rgba(92,73,216,.55) rgba(24,36,58,.08);
  }

  .dr-book__pane-scroll::-webkit-scrollbar{
    width:10px;
  }

  .dr-book__pane-scroll::-webkit-scrollbar-track{
    background:rgba(24,36,58,.08);
    border-radius:999px;
  }

  .dr-book__pane-scroll::-webkit-scrollbar-thumb{
    background:linear-gradient(180deg, rgba(92,73,216,.85), rgba(141,213,255,.85));
    border-radius:999px;
  }

  .dr-book__pane-scroll::-webkit-scrollbar-thumb:hover{
    background:linear-gradient(180deg, rgba(92,73,216,1), rgba(141,213,255,1));
  }
}

@media (max-width:1100px){
  .dr-book__hero-inner{
    grid-template-columns:1fr;
  }

  .dr-book__mn-wrap{
    justify-self:start;
    width:min(100%,340px);
  }

  .dr-book__jumpbar{
    grid-template-columns:1fr;
  }
}

@media (max-width:980px){
  .dr-book__content-shell{
    grid-template-columns:1fr;
  }

  .dr-book__sidebar{
    position:static;
    top:auto;
    width:100%;
  }

  .dr-book__pane{
    height:auto !important;
    overflow:visible;
  }

  .dr-book__pane-scroll{
    overflow:visible;
    padding:18px 18px 22px;
  }

  .dr-book__sidebar-inner,
  .dr-book__controls-shell,
  .dr-book__summary-card,
  .dr-book__section,
  .dr-book__pane{
    border-radius:20px;
  }
}

@media (max-width:720px){
  .dr-book{
    margin:10px auto 22px;
    padding:0 10px;
  }

  .dr-book__hero{
    border-radius:22px;
    min-height:auto;
  }

  .dr-book__hero-inner{
    padding:22px;
    min-height:auto;
  }

  .dr-book__hero-title{
    font-size:38px;
    line-height:1.04;
  }

  .dr-book__hero-subtitle{
    font-size:17px;
  }

  .dr-book__chapter-title{
    font-size:36px;
  }

  .dr-book__reader-title{
    font-size:32px;
  }

  .dr-book__section-subtitle{
    font-size:24px;
  }

  .dr-book__line,
  .dr-book__paragraph{
    font-size:17px;
    line-height:1.78;
  }

  .dr-book__button,
  .dr-book__chip{
    width:100%;
    justify-content:center;
    text-align:center;
  }

  .dr-book__mode-group,
  .dr-book__hero-actions{
    width:100%;
  }

  .dr-book__mn-wrap{
    width:100%;
    padding:18px;
  }

  .dr-book__mn-icon{
    width:120px;
  }

  .dr-book__pane-header{
    padding:18px 18px 0;
  }
}