.reader { margin:0; color:#241437; background:#f6effb; }
.reader [hidden] { display:none !important; }
.reader-bar,.reader-pagination,.reader-result {
  display:flex; flex-wrap:wrap; align-items:center; gap:.55rem 1rem;
}
.reader-bar { padding:.65rem max(1rem,calc((100vw - 1300px)/2)); background:#26153f; }
.reader-bar a { color:white; }
.reader-bar a:first-child { font-weight:800; }
.reader-layout { display:grid; grid-template-columns:minmax(220px,285px) minmax(0,820px);
  align-items:start; justify-content:center; gap:1rem; padding:1rem; }
.reader-sidebar { background:white; border:1px solid #e8dcef; border-radius:.75rem; padding:1rem; }
.reader-sidebar details[open] { max-height:65vh; overflow:auto; }
.reader-sidebar summary { cursor:pointer; font-weight:800; }
.reader-sidebar ol,.reader-sidebar ul { padding-inline-start:1.35rem; }
.reader-sidebar li { margin:.4rem 0; }
.reader-sidebar [aria-current] { font-weight:800; }
.reader-sidebar [data-reader-status] { display:block; font-size:.8rem; }
.reader-note { color:#51405f; font-size:.88rem; }
.reader-pagination { justify-content:space-between; margin-block:0 .7rem; }
.reader-pagination output { font-weight:800; }
.reader-bar a,.reader-pagination a,.reader-result a,.reader-result button {
  display:inline-flex; min-height:44px; align-items:center;
}
.reader-main { min-width:0; }
.reader .book { display:block; padding:0; }
.reader .book > .page { max-width:100%; margin-inline:auto; }
.reader .book > .page:not(.cover) { height:auto; min-height:297mm; }
.reader .book > .cover { height:auto; }
.reader .book > .cover img { display:block; height:auto; width:100%; }
.reader .book .foot { position:static; margin-top:auto; }
.reader-result { margin:.8rem auto 0; max-width:210mm; padding:1rem; border-radius:.75rem; background:white; }
.reader-result h2,.reader-result p { flex:0 0 100%; margin:0; }
.reader-result button { padding:.5rem .85rem; border:0; border-radius:.4rem; color:white; background:#542983; font:inherit; cursor:pointer; }
.reader :focus-visible { outline:3px solid #9664dc; outline-offset:3px; }
@media (max-width:1080px) {
  .reader-layout { display:block; max-width:820px; margin:auto; }
  .reader-sidebar { margin-bottom:.65rem; }
}
@media (max-width:820px) {
  .reader .book > .page:not(.cover) { width:100%; min-height:0; padding:clamp(16px,5vw,36px); }
  .reader .book > .page:not(.cover) h1 { font-size:clamp(1.7rem,6.6vw,2.7rem); overflow-wrap:anywhere; }
  .reader .book .foot { margin-top:1rem; position:static; }
}
@media (max-width:620px) {
  .reader-layout { padding:.55rem; }
  .reader .book .page .running,.reader .book .page .foot { font-size:.68rem; gap:.45rem; }
  .reader .book .page .lede,.reader .book .page .prompt { font-size:1rem; }
  .reader .book .page :is(.editorial-spread,.bento,.layers,.team,.vibe-explainer,.hanari-product-grid,.agent-tip,.repair-index) {
    grid-template-columns:minmax(0,1fr);
  }
  .reader .book .page .prompt,.reader .book a { overflow-wrap:anywhere; }
  .reader .book .page img { max-width:100%; }
  .reader .book .page .editorial-cta { max-width:100%; }
}
.reader-sidebar [data-chapter] { border-top:1px solid #e8dcef; padding:.45rem 0; }
.reader-sidebar [data-chapter] > summary { font-size:.88rem; }
.reader-sidebar [data-chapter] li { display:flex; justify-content:space-between; gap:.4rem; font-size:.85rem; }
.reader-sidebar [data-chapter-current] { color:#593482; font-size:.76rem; }
.reader-sidebar [data-page-status] { color:#552788; font-weight:800; }
.reader-offer,.reader-guidance { border-radius:.85rem; padding:1rem; }
.reader-offer { background:linear-gradient(145deg,#623996,#1b102d); color:white; margin-top:.85rem; }
.reader-offer h2 { font-size:1.04rem; line-height:1.25; margin:0; }
.reader-offer p { font-size:.85rem; }
.reader-offer a { color:white; font-weight:800; }
.reader-guidance { margin:.85rem auto 0; max-width:210mm; background:white; }
.reader-guidance-actions { display:flex; flex-wrap:wrap; gap:.6rem; align-items:center; }
#reader-advance { border:0; border-radius:.5rem; min-height:48px; padding:.65rem 1rem; color:white;
  background:linear-gradient(115deg,#622c9b,#170e25); font:inherit; font-weight:800; cursor:pointer; }
#reader-back { display:inline-flex; align-items:center; min-height:44px; padding:.2rem .55rem; }
#reader-undo,#reader-reset { border:0; background:none; color:#563286; text-decoration:underline;
  font:inherit; font-size:.86rem; padding:.6rem .5rem .3rem 0; cursor:pointer; }
#reader-done { color:#3e2562; font-weight:800; }
@media (max-width:1080px) {
  .reader-sidebar { display:contents; }
  .reader-layout { display:flex; flex-direction:column; }
  .reader-sidebar > :not(.reader-offer),.reader-main,.reader-offer { width:100%; margin-block:.15rem; }
  .reader-offer { order:1; }
  #reader-toc { background:white; padding:.65rem; border-radius:.5rem; }
}
.reader .book > .cover { width:min(100%, 48vh, 30rem); }
.reader-location { text-align:center; }
#reader-chapter { display:block; font-size:.78rem; color:#51405f; }

.reader-sidebar { background:transparent; border:0; padding:0; display:grid; gap:.75rem; }
.reader-progress-card,#reader-toc { background:#fff; border:1px solid #e8dcef; border-radius:.9rem; padding:.9rem; }
.reader-progress-card h2 { font-size:.96rem; margin:0; color:#554264; }
#reader-progress { display:block; font-size:clamp(2rem,4vw,2.7rem); font-weight:800; letter-spacing:-.06em; line-height:1.15; margin:.2rem 0 .45rem; color:#3e1b68; }
.reader-progress-row { display:flex; gap:.55rem; align-items:center; }
#reader-progress-bar { flex:1; min-width:0; height:.6rem; border:0; border-radius:1rem; overflow:hidden; appearance:none; background:#ede4f5; color:#7644b1; accent-color:#7644b1; }
#reader-progress-bar::-webkit-progress-bar { background:#ede4f5; border-radius:1rem; }
#reader-progress-bar::-webkit-progress-value { background:linear-gradient(90deg,#9259d3,#632ca1); border-radius:1rem; }
#reader-progress-bar::-moz-progress-bar { background:linear-gradient(90deg,#9259d3,#632ca1); border-radius:1rem; }
#reader-count { margin:.4rem 0 0; color:#51405f; font-size:.85rem; }
.reader-info { position:relative; }
.reader-sidebar .reader-info[open] { overflow:visible; }
.reader-info > summary { display:grid; place-items:center; width:1.55rem; height:1.55rem; list-style:none; border-radius:50%; background:#f0e5f9; color:#4d2778; font:800 .85rem/1 system-ui; }
.reader-info > summary::-webkit-details-marker,#reader-toc summary::-webkit-details-marker { display:none; }
.reader-info-content { position:absolute; z-index:2; inset-inline-end:0; top:calc(100% + .4rem); width:min(15rem, 75vw); padding:.65rem .8rem; border:1px solid #e4d6ef; border-radius:.6rem; background:#fff; box-shadow:0 .5rem 1.4rem #24143720; font-size:.83rem; }
.reader-info-content p { margin:.25rem 0; }
#reader-toc summary { cursor:pointer; display:flex; align-items:baseline; gap:.4rem; list-style:none; }
#reader-toc summary::before { content:"›"; color:#64339a; font-weight:900; transition:transform .15s ease; }
#reader-toc details[open] > summary::before,#reader-toc[open] > summary::before { transform:rotate(90deg); }
#reader-toc nav { margin-top:.65rem; }
.reader-sidebar [data-chapter] { border-color:#efe7f5; padding:.58rem 0; }
.reader-sidebar [data-chapter-current] { display:none; }
.reader-sidebar [data-chapter]:has([data-chapter-current]:not([hidden])) > summary { color:#59258d; }
.reader-sidebar [data-chapter] ul { list-style:none; padding:0; margin:.4rem 0 0; }
.reader-sidebar [data-chapter] li { display:block; margin:.2rem 0; }
.reader-sidebar [data-reader-jump] { display:grid; grid-template-columns:1.65rem minmax(0,1fr); align-items:center; gap:.55rem; padding:.44rem .4rem; color:#322442; text-decoration:none; border-radius:.55rem; min-height:2.55rem; }
.reader-sidebar [data-reader-jump]:hover { background:#f5eef9; }
.reader-sidebar [data-reader-jump][aria-current] { background:#eee0fa; color:#492076; }
.reader-sidebar .reader-step { display:grid; place-items:center; width:1.55rem; height:1.55rem; border-radius:50%; background:#f0edf3; color:#594d66; font-size:.72rem; }
.reader-sidebar .reader-step[data-done] { background:#d8f3e3; color:#115d37; font-weight:900; }
.reader-sidebar [aria-current] .reader-step { background:#6c399d; color:#fff; }
.reader-visually-hidden { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.reader-offer { --reader-offer-start:#225940; --reader-offer-end:#0e1c17; --reader-offer-glow:#559878; margin:0;
  background:radial-gradient(ellipse at 115% -20%,var(--reader-offer-glow),transparent 66%),linear-gradient(145deg,var(--reader-offer-start),var(--reader-offer-end) 82%); padding:1.05rem; }
.reader-offer h2 { font-size:1.2rem; }
.reader-offer a { display:inline-flex; gap:.35rem; padding:.45rem .65rem; border:1px solid #ffffff72; border-radius:.45rem; text-decoration:none; }
.reader-offer a:hover { background:#ffffff19; }
@media (max-width:1080px) {
  .reader-sidebar { display:contents; }
  .reader-sidebar > .reader-progress-card { width:100%; margin:.15rem 0; padding:.65rem .8rem; }
  #reader-progress { font-size:1.85rem; margin:.08rem 0 .2rem; }
}
@media (prefers-reduced-motion:reduce) {
  #reader-toc summary::before { transition:none; }
}
.reader-bar { display:grid; grid-template-columns:minmax(0,1fr) auto 44px; gap:.5rem 1rem; color:#fff; }
.reader-bar-title { display:grid; align-content:center; line-height:1.3; }
.reader-bar-title a { width:fit-content; min-height:0; padding-block:.2rem; }
.reader-bar-title span { color:#f0e2fa; font-size:.9rem; }
.reader-bar .reader-close { width:44px; height:44px; justify-content:center;
  border:1px solid #d5b9ef; border-radius:.55rem; text-decoration:none; font-size:1.75rem; }
.reader-bar .reader-close:hover { background:#ffffff20; }
.reader .book .reader-milestone { margin:1rem 0; padding:clamp(.85rem,3vw,1.3rem); border-radius:.75rem;
  background:linear-gradient(135deg,#623198,#100b19); color:#fff; }
.reader .book .reader-milestone h2,.reader .book .reader-milestone p { margin:0 0 .45rem; color:inherit; }
.reader .book .reader-milestone h2 { font-size:clamp(1.25rem,3vw,1.85rem); line-height:1.12; }
.reader-milestone-kicker { font-weight:800; letter-spacing:.06em; font-size:.76rem; }
.reader .book .reader-milestone a { margin-top:.35rem; padding:.35rem .7rem; display:inline-flex; align-items:center;
  min-height:44px; border-radius:.45rem; background:#f7ecff; color:#382053; font-weight:800; text-decoration:none; }
.reader .book .reader-milestone a:hover { background:#e9d8fa; }
@media (max-width:390px) {
  .reader-bar { gap:.4rem .55rem; padding-inline:.65rem; }
  .reader-bar-title a { font-size:.88rem; }
  .reader-bar-title span,.reader-bar > [download] { font-size:.8rem; }
}
#reader-skip-advice,.reader-skip-bottom { margin-block:.55rem .85rem; }
.reader .reader-skip-link { display:inline-flex; align-items:center; gap:.45rem; min-height:44px;
  padding:.4rem .8rem; border:1px solid #d5b9ef; border-radius:.55rem; background:#f7ecff; color:#382053;
  font-weight:800; text-decoration:none; }
.reader .reader-skip-link:hover { background:#e9d8fa; }

.reader {
  --reader-early-top:linear-gradient(135deg,#e0fff3,#c0f2e0 55%,#8cdec5);
  --reader-early-top-ink:#174b40;
  --reader-early-bg:linear-gradient(145deg,#effff9,#d0f5e6 58%,#9fdfcf);
  --reader-early-ink:#143d32;
  --reader-early-secondary:#20574a;
  --reader-early-cta:linear-gradient(135deg,#246c5c,#123f37);
  --reader-complete-bg:#d5f4e7;
  --reader-complete-ink:#136045;
}
.reader #reader-toc { padding:.55rem .65rem; background:transparent; border:0; }
#reader-toc > summary { color:#51405f; padding:.25rem .4rem; font-size:.86rem; }
#reader-toc nav { margin-top:.3rem; }
#reader-toc [data-chapter] { border:0; padding:0; }
#reader-toc [data-chapter] > summary { min-height:32px; padding:.32rem .4rem; font-size:.84rem; font-weight:650; color:#514a58; border-radius:.4rem; }
#reader-toc [data-chapter] > summary:has([data-chapter-current]:not([hidden])) { background:#eee0fa; color:#482167; }
#reader-toc summary::before { color:#766982; }
.reader-chapter-subtitle { display:none; }
[data-chapter][open] .reader-chapter-subtitle { display:inline; }
#reader-toc [data-chapter] ul { margin:.15rem 0 .28rem .4rem; }
#reader-toc [data-reader-jump] { grid-template-columns:1.15rem minmax(0,1fr); min-height:32px; padding:.28rem .35rem; gap:.4rem; font-size:.8rem; }
#reader-toc .reader-step { width:1.1rem; height:1.1rem; font-size:.62rem; }
#reader-toc [aria-current] .reader-step { background:#e5d4f3; color:#482167; }
#reader-toc [aria-current] .reader-step[data-done] { background:#d8f3e3; color:#115d37; }

.reader .reader-offer { background:var(--reader-early-bg); color:var(--reader-early-ink); padding:.9rem; }
.reader-offer h2 { font-size:1.05rem; }
.reader-offer p { margin:.45rem 0; }
.reader-offer .reader-offer-label { font-size:.71rem; font-weight:800; letter-spacing:.06em; margin-top:0; }
.reader-offer-price { display:flex; align-items:baseline; flex-wrap:wrap; gap:.2rem .55rem; }
.reader-offer-price strong { font-size:1.65rem; line-height:1.1; }
.reader-offer-saving { font-weight:800; color:var(--reader-early-secondary); }
.reader .reader-offer a { min-height:44px; align-items:center; background:var(--reader-early-cta); color:#fff; border:0; }
.reader .reader-offer a:hover { background:#173925; }
.reader-offer .reader-offer-note { margin-bottom:0; font-size:.76rem; color:var(--reader-early-secondary); }

.reader-bar { grid-template-columns:minmax(0,1fr) auto auto 44px; }
.reader-bar .reader-top-offer { justify-content:center; padding:.35rem .7rem; border-radius:.45rem;
  background:var(--reader-early-top); color:var(--reader-early-top-ink); font-size:.84rem; font-weight:800; text-decoration:none; }
.reader-bar .reader-top-offer:hover { background:linear-gradient(135deg,#e0fff3,#8cdec5); }
@media (max-width:560px) {
  .reader-bar { grid-template-columns:minmax(0,1fr) auto 44px; gap:.3rem .6rem; }
  .reader-bar-title { grid-column:1 / 3; }
  .reader-bar .reader-close { grid-column:3; grid-row:1; }
  .reader-bar .reader-top-offer { grid-row:2; justify-self:start; }
  .reader-bar > [download] { grid-row:2; grid-column:2 / 4; justify-self:end; }
}


#reader-toc [data-reader-jump] { grid-template-columns:26px minmax(0,1fr); }
#reader-toc .reader-step[data-done],#reader-toc .reader-lesson-done {
  display:inline-grid; place-items:center; flex:0 0 25px; width:25px; height:25px;
  border-radius:50%; background:var(--reader-complete-bg); color:var(--reader-complete-ink);
  font-size:17px; font-weight:900; line-height:1;
}
#reader-toc .reader-lesson-done + span { min-width:0; }
