/* Scoped pilot UI. The original reader controls and book geometry remain untouched. */
.enr-floating-nav, .enr-dialog, .enr-promo { font-family: Arial, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif; color: #183c3c; font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
.enr-floating-nav *, .enr-dialog *, .enr-promo * { box-sizing: border-box; }
.enr-floating-nav [hidden], .enr-dialog [hidden], .enr-promo[hidden] { display: none !important; }
.enr-floating-nav button, .enr-dialog button, .enr-promo button { font: inherit; cursor: pointer; }
.enr-floating-nav button, .enr-dialog button, .enr-promo button, .enr-floating-nav a, .enr-dialog a, .enr-promo a { -webkit-tap-highlight-color: transparent; }
.enr-floating-nav :focus-visible, .enr-dialog :focus-visible, .enr-promo :focus-visible { outline: 3px solid #bd7934 !important; outline-offset: 3px; }
.enr-floating-nav { position: fixed; z-index: 10020; left: max(12px, env(safe-area-inset-left)); bottom: max(5px, env(safe-area-inset-bottom)); }
.enr-menu-toggle { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 36px; padding: 4px 11px; color: #fffdf7; background: #183f40; border: 1px solid #bdd4cc; border-radius: 24px; box-shadow: 0 2px 10px #122e3024; font-size: 13px !important; font-weight: 700 !important; letter-spacing: -.2px; }
.enr-menu-toggle:hover, .enr-menu-toggle[aria-expanded="true"] { background: #245453; }
.enr-brand-icon { width: 24px; height: 24px; color: #e5cda6; }
.enr-toggle-chevron { width: 13px; height: 13px; transition: transform .18s ease; }
.enr-menu-toggle[aria-expanded="true"] .enr-toggle-chevron { transform: rotate(180deg); }
.enr-menu-panel { position: absolute; left: 0; bottom: calc(100% + 12px); width: 270px; max-width: calc(100vw - 24px); padding: 10px; background: #fffefb; border: 1px solid #dbe6df; border-radius: 18px; box-shadow: 0 14px 48px #122e3030, 0 2px 5px #122e3010; }
.enr-menu-caption { margin: 4px 9px 9px; color: #7b8980; font-size: 11px; letter-spacing: .3px; }
.enr-menu-item { display: flex; align-items: center; gap: 11px; width: 100%; min-height: 43px; padding: 9px 10px; border: 0; border-radius: 10px; background: transparent; color: #234140; text-align: left; text-decoration: none; font-size: 14px !important; }
.enr-menu-item:hover, .enr-menu-item:focus-visible { background: #eef3ed; }
.enr-item-icon { width: 20px; height: 20px; flex: 0 0 20px; color: #648477; font-size: 22px; line-height: 20px; text-align: center; }
.enr-item-arrow { margin-left: auto; font-size: 14px; color: #80938b; }
.enr-menu-book { margin: 9px 9px 3px; padding-top: 11px; border-top: 1px solid #e8ede7; color: #7a877e; font-size: 11px; }
.enr-menu-book strong { display: block; margin-top: 3px; color: #4a6257; font-size: 12px; font-weight: 500; }
.enr-floating-nav[data-enr-touch] { top: max(3px, env(safe-area-inset-top)); left: max(8px, env(safe-area-inset-left)); bottom: auto; }
.enr-floating-nav[data-enr-touch] .enr-menu-toggle { min-height: 34px; padding-top: 3px; padding-bottom: 3px; }
.enr-floating-nav[data-enr-touch] .enr-menu-panel { top: calc(100% + 9px); bottom: auto; max-height: calc(100dvh - 60px); overflow-y: auto; }
.enr-dialog { position: fixed; inset: 0; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); height: fit-content; margin: auto; padding: 0; overflow: auto; overscroll-behavior: contain; color: #183c3c; background: #fffefb; border: 1px solid #dce5dc; border-radius: 22px; box-shadow: 0 24px 100px #0b2c3b55; }
.enr-dialog:not([open]) { display: none; }
.enr-dialog::backdrop { background: #102b3b88; backdrop-filter: blur(5px); }
.enr-dialog-header { position: sticky; top: 0; z-index: 1; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 27px 28px 21px; background: #fffefb; border-bottom: 1px solid #e4eae1; }
.enr-eyebrow { margin: 0 0 7px; color: #718071; font-size: 10px; font-weight: 700; letter-spacing: 1.6px; }
.enr-dialog-title { margin: 0; font-size: 23px; line-height: 1.3; font-weight: 700; letter-spacing: -.7px; }
.enr-dialog-header > [data-enr-close-dialog] { flex-shrink: 0; min-height: 36px; padding: 6px 11px; border: 1px solid #dce5dc; border-radius: 18px; background: #f5f7f0; color: #506956; font-size: 11px; }
.enr-icon-button { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; width: 36px; height: 36px; padding: 8px; border: 1px solid #dce5dc; border-radius: 50%; background: #ffffffad; color: #46665d; }
.enr-icon-button:hover { background: #e8efe6; }
.enr-icon-button svg { width: 20px; height: 20px; }
.enr-dialog-body { padding: 24px 28px 28px; }
.enr-dialog-body h3 { color: #254b46; font-size: 16px; }
.enr-dialog-body p, .enr-dialog-body li { line-height: 1.7; }
.enr-stats-period { margin: 0 0 14px; color: #69806f; font-size: 12px; }
.enr-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 18px; }
.enr-stat-card { min-width: 0; padding: 20px 17px 16px; background: #eaf2e9; border: 1px solid #dce8d9; border-radius: 14px; }
.enr-stat-card dt { color: #3c6253; font-size: 12px; }
.enr-stat-card dd { margin: 8px 0 7px; color: #204d3f; font-size: clamp(28px, 4vw, 37px); font-weight: 700; line-height: 1.2; letter-spacing: -1.2px; overflow-wrap: anywhere; }
.enr-stat-card dd small { margin-left: 5px; font-size: 12px; font-weight: 400; letter-spacing: 0; }
.enr-stat-card p { margin: 0; font-size: 10px; color: #708372; }
.enr-stat-card-bot { background: #f4f2ec; border-color: #e8e4da; }
.enr-stat-card-bot dt, .enr-stat-card-bot dd { color: #6c6250; }
.enr-stat-card-bot p { color: #938774; }
.enr-stat-card .enr-stat-recent { margin-bottom: 8px; color: #536b57; font-size: 11px; font-weight: 700; }
.enr-stat-card .enr-stat-since { margin-top: 9px; font-size: 9px; }
.enr-stat-card-legacy { grid-column: 1 / -1; padding: 13px 17px; background: #f8f8f5; border-color: #e7e9e2; }
.enr-stat-card-legacy dt { color: #728076; }
.enr-stat-card-legacy dd { margin: 5px 0; color: #607469; font-size: 24px; letter-spacing: -.4px; }
.enr-unavailable-value { color: #94a398; font-size: 30px; }
.enr-book-content { padding: 24px 28px 28px; color: #4d665c; font-size: 13px; line-height: 1.8; }
.enr-book-content p { margin: 0 0 16px; }
.enr-book-content h1 { margin: 0 0 15px; color: #20493f; font-size: 24px; line-height: 1.45; letter-spacing: -.7px; }
.enr-book-content h2 { margin: 28px 0 13px; color: #294f42; font-size: 18px; line-height: 1.4; }
.enr-book-content h3 { margin: 25px 0 12px; color: #244d43; font-size: 16px; line-height: 1.4; }
.enr-book-content a { color: #315f52; text-underline-offset: 3px; }
.enr-book-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 22px; padding: 17px; border: 1px solid #e1e9dc; border-radius: 13px; background: #f1f5ed; }
.enr-book-facts dt { color: #7a897b; font-size: 10px; }
.enr-book-facts dd { margin: 3px 0 0; color: #3d5c4d; font-size: 13px; }
.enr-book-contents { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; margin: 0; padding: 0; list-style: none; counter-reset: enr-contents; }
.enr-book-contents li { min-width: 0; padding: 0; border-bottom: 1px solid #e9eee5; counter-increment: enr-contents; }
.enr-book-contents .enr-book-chapter { display: flex; align-items: baseline; gap: 9px; min-height: 44px; padding: 11px 3px; color: #456657; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.enr-book-contents .enr-book-chapter::before { content: counter(enr-contents, decimal-leading-zero); color: #93a087; font-size: 10px; flex: 0 0 16px; }
.enr-book-contents .enr-book-chapter > span:first-child { flex-shrink: 0; color: #829076; font-size: 10px; }
.enr-book-sources { margin-top: 24px; padding-top: 15px; border-top: 1px solid #e4eae1; color: #87917f; font-size: 10px; line-height: 1.8; overflow-wrap: anywhere; }
.enr-book-sources a { color: #6e806f; }
.enr-book-sources h2 { margin: 0 0 10px; color: #6e806f; font-size: 12px; }
.enr-stats-detail { margin: 6px 0; font-size: 12px; color: #627767; }
.enr-stats-updated { margin: 16px 0 0; font-size: 11px; color: #879286; }
.enr-stats-note { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid #e8ede5; color: #83907e; font-size: 11px; }
.enr-stats-message { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 154px; color: #6a7e70; text-align: center; font-size: 13px; }
.enr-stats-error { flex-direction: column; gap: 8px; }
.enr-stats-error p { margin: 0; }
.enr-secondary-button { min-height: 38px; padding: 8px 16px; color: #355d4e; background: #f0f4ed; border: 1px solid #d3dfcf; border-radius: 9px; font-size: 12px !important; }
.enr-loading-dot { width: 8px; height: 8px; border-radius: 50%; background: #739985; animation: enr-pulse 1s ease-in-out infinite alternate; }
.enr-dialog-backdrop { position: fixed; inset: 0; z-index: 10030; background: #102b3b88; }
.enr-dialog.enr-dialog-fallback { z-index: 10031; }
.enr-promo { position: fixed; z-index: 10010; top: clamp(62px, 12vh, 116px); left: 50%; width: min(420px, calc(100vw - 36px)); transform: translateX(-50%); pointer-events: none; }
.enr-promo-card { position: relative; overflow: hidden; padding: 24px 28px 21px; color: #f9f8ee; background: linear-gradient(125deg, #183f40 0%, #24524a 100%); border: 1px solid #afc7b77d; border-radius: 21px; box-shadow: 0 18px 65px #0b282c45; pointer-events: auto; animation: enr-promo-in .45s ease-out both; }
.enr-promo-card::before { content: ""; position: absolute; width: 170px; height: 170px; top: -80px; right: -65px; border: 1px solid #d6e3c324; border-radius: 50%; box-shadow: 0 0 0 22px #d6e3c309, 0 0 0 44px #d6e3c306; pointer-events: none; }
.enr-promo-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; padding: 7px; border-color: #e2ead638; background: #11363630; color: #d8e3cf; }
.enr-promo-close:hover { background: #ffffff1c; }
.enr-promo-brand { display: flex; align-items: center; gap: 7px; margin: 0 0 14px; color: #d6d7b5; font-size: 12px; letter-spacing: 1px; }
.enr-promo-dot { width: 5px; height: 5px; border-radius: 50%; background: #d6b479; }
.enr-promo-story { display: block; color: inherit; text-decoration: none; border-radius: 5px; }
.enr-promo-story:hover h2 { color: #ffffff; }
.enr-promo h2 { margin: 0; font-size: clamp(20px, 5.7vw, 27px); line-height: 1.48; font-weight: 400; letter-spacing: -.8px; }
.enr-promo h2 span { color: #e1dfb9; }
.enr-promo-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 13px; margin-top: 19px; }
.enr-primary-button { display: inline-flex; align-items: center; justify-content: center; gap: 15px; min-height: 38px; padding: 9px 14px; border: 1px solid #e6dec7; border-radius: 9px; color: #2a4940; background: #f2ebd7; text-decoration: none; font-size: 12px; font-weight: 700; }
.enr-primary-button:hover { background: #fff8e9; }
.enr-skip-button { min-height: 38px; padding: 8px 0; border: 0; color: #d4e0cd; background: transparent; font-size: 11px !important; }
.enr-skip-button span { margin-left: 5px; }
.enr-promo-timing { margin: 14px 0 0; color: #b1c3ad; font-size: 9px; }
.enr-promo-progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: #ffffff08; }
.enr-promo-progress span { display: block; width: 100%; height: 100%; transform-origin: left; background: #d9bd85a0; animation: enr-countdown var(--enr-promo-duration, 4s) linear forwards; }
@keyframes enr-promo-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes enr-countdown { to { transform: scaleX(0); } }
@keyframes enr-pulse { to { opacity: .3; } }
@media (max-width: 480px) { .enr-dialog { width: calc(100vw - 24px); border-radius: 18px; } .enr-dialog-header { padding: 22px 20px 18px; gap: 12px; } .enr-dialog-title { font-size: 21px; } .enr-dialog-body, .enr-book-content { padding: 20px; } .enr-book-facts, .enr-book-contents { grid-template-columns: 1fr; } .enr-stat-card { padding: 17px 12px 14px; } .enr-stat-card dt { font-size: 11px; } .enr-promo-card { padding: 22px 24px 19px; } }
@media (max-height: 460px) { .enr-promo { top: 48px; width: min(400px, calc(100vw - 110px)); } .enr-promo-card { padding: 15px 22px 13px; } .enr-promo-brand { margin-bottom: 7px; } .enr-promo h2 { font-size: 20px; line-height: 1.3; } .enr-promo-actions { margin-top: 10px; } .enr-promo-timing { margin-top: 7px; } .enr-menu-panel { max-height: calc(100dvh - 60px); overflow-y: auto; } }
@media (prefers-reduced-motion: reduce) { .enr-floating-nav *, .enr-dialog *, .enr-promo * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }
