.otroch-book-card{
    width:min(1120px,100%);
    margin:0 auto;
    padding:clamp(22px,4vw,48px);
    box-sizing:border-box;
    background:linear-gradient(135deg,#fffdf7 0%,#fff 52%,#fff8df 100%);
    border:1px solid #e3b64d;
    border-radius:28px;
    box-shadow:0 18px 48px rgba(161,111,0,.14);
}
.otroch-book-card-heading{
    max-width:850px;
    margin:0 auto 28px;
    text-align:center;
}
.otroch-book-card-heading h2{
    margin:8px 0 12px;
    color:#4d3509;
    font-size:clamp(28px,4vw,46px);
}
.otroch-book-card-heading p{
    margin:0 auto;
    max-width:760px;
    color:#75684f;
    line-height:1.65;
}
.otroch-book-reader{
    width:100%;
    margin:0 auto;
}
.otroch-book-toolbar{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    margin:0 0 18px;
}
.otroch-book-toolbar button{
    min-width:52px;
    min-height:44px;
    border:1px solid #d59a19;
    border-radius:14px;
    background:linear-gradient(135deg,#fff3a8,#e6a900);
    color:#4d3509;
    font-size:24px;
    line-height:1;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(176,120,0,.16);
}
.otroch-book-toolbar button:disabled{
    opacity:.45;
    cursor:not-allowed;
}
.otroch-book-counter{
    color:#4d3509;
    font-weight:700;
    text-align:center;
}
.otroch-book-counter output{
    display:inline-block;
    min-width:2.2em;
    margin:0 3px;
    color:#a66f00;
    font-size:1.25em;
}
.otroch-book-page-selector{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:7px;
    max-height:180px;
    margin:0 0 22px;
    padding:12px;
    overflow-y:auto;
    border:1px solid rgba(213,154,25,.38);
    border-radius:18px;
    background:rgba(255,252,239,.8);
}
.otroch-book-page-button{
    min-width:36px;
    height:34px;
    padding:0 8px;
    border:1px solid #e0bd70;
    border-radius:9px;
    background:#fff;
    color:#5c4a2b;
    cursor:pointer;
    font-weight:700;
}
.otroch-book-page-button:hover,
.otroch-book-page-button[aria-current="page"]{
    border-color:#b97800;
    background:#d99b14;
    color:#fff;
}
.otroch-book-page-stage{
    min-height:420px;
}
.otroch-book-page[hidden]{
    display:none;
}
.otroch-book-page-shell{
    padding:clamp(12px,2vw,24px);
    border:1px solid #d9a43b;
    border-radius:22px;
    background:#fffefb;
    box-shadow:0 14px 36px rgba(173,119,0,.13);
}
.otroch-book-page-number{
    margin:0 0 14px;
    color:#a66f00;
    font-size:14px;
    font-weight:700;
    text-align:center;
    letter-spacing:.04em;
}
.otroch-book-page-text{
    padding:clamp(18px,3vw,42px);
    color:#2f281d;
    font-family:Georgia,"Times New Roman",serif;
    font-size:clamp(17px,1.55vw,23px);
    line-height:1.72;
    white-space:pre-wrap;
    overflow-wrap:anywhere;
}
.otroch-book-page-scan{
    margin:0;
    text-align:center;
}
.otroch-book-page-scan img{
    display:block;
    width:auto;
    max-width:100%;
    height:auto;
    max-height:none;
    margin:0 auto;
    border-radius:10px;
}
.otroch-book-page-details{
    margin-top:18px;
    border-top:1px solid #e4c983;
    padding-top:12px;
    color:#73520d;
}
.otroch-book-page-details summary{
    cursor:pointer;
    font-weight:700;
}
.otroch-book-page-details img{
    display:block;
    width:auto;
    max-width:100%;
    height:auto;
    margin:16px auto 0;
}
.otroch-book-bottom{
    display:flex;
    justify-content:center;
    margin-top:28px;
}
.otroch-book-bottom .button{
    min-width:220px;
    text-align:center;
}
@media(max-width:700px){
    .otroch-book-card{
        padding:18px 12px;
        border-radius:20px;
    }
    .otroch-book-toolbar{
        gap:8px;
    }
    .otroch-book-toolbar button{
        min-width:44px;
        min-height:40px;
    }
    .otroch-book-page-text{
        padding:18px 14px;
        font-size:17px;
        line-height:1.6;
    }
}
/* OTROCH_BOOK_NAV_REPAIR_BEGIN */
.otroch-book-reader{
    display:flex;
    flex-direction:column;
}
.otroch-book-toolbar{
    order:1;
}
.otroch-book-stage-row{
    order:2;
    display:grid;
    grid-template-columns:minmax(44px,56px) minmax(0,1fr) minmax(44px,56px);
    align-items:center;
    gap:12px;
    width:100%;
}
.otroch-book-page-stage{
    min-width:0;
}
.otroch-book-side-control,
.otroch-book-bottom-controls button{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:52px;
    min-width:52px;
    height:48px;
    padding:0;
    border:1px solid #d59a19;
    border-radius:14px;
    background:linear-gradient(135deg,#fff3a8,#e6a900);
    color:#4d3509;
    font-size:25px;
    line-height:1;
    cursor:pointer;
    box-shadow:0 6px 16px rgba(176,120,0,.16);
}
.otroch-book-side-control:disabled,
.otroch-book-bottom-controls button:disabled{
    opacity:.45;
    cursor:not-allowed;
}
.otroch-book-bottom-controls{
    order:3;
    display:flex;
    justify-content:center;
    gap:18px;
    margin-top:18px;
}
.otroch-book-page-selector{
    order:4;
    width:100%;
    margin-top:18px;
    margin-bottom:0;
}
.otroch-book-bottom{
    order:5;
}
/* OTROCH_BOOK_NAV_REPAIR_END */
/* OTROCH_BOOK_EXACT_LINES_BEGIN */
.otroch-book-page-text{
    white-space:pre;
    overflow-x:auto;
    overflow-y:hidden;
    overflow-wrap:normal;
    word-break:normal;
}
/* OTROCH_BOOK_EXACT_LINES_END */


/* OTROCH_BOOK_LAYOUT_REDO_BEGIN */
body:has(.otroch-book-card){
    overflow-x:hidden;
}

body:has(.otroch-book-card) .container:has(.otroch-book-card),
body:has(.otroch-book-card) .chronicle-placeholder-page:has(.otroch-book-card){
    width:100% !important;
    max-width:none !important;
    margin-left:0 !important;
    margin-right:0 !important;
    padding-left:0 !important;
    padding-right:0 !important;
}

.otroch-book-card{
    box-sizing:border-box;
    width:min(1120px,calc(100vw - 40px)) !important;
    max-width:1120px !important;
    margin-left:auto !important;
    margin-right:auto !important;
    transform:none !important;
}

.otroch-book-stage-row{
    display:grid;
    grid-template-columns:64px minmax(0,760px) 64px;
    justify-content:center;
    align-items:center;
    column-gap:clamp(8px,2vw,32px);
}

.otroch-book-page-wrap{
    width:100%;
    min-width:0;
    display:flex;
    justify-content:center;
}

.otroch-book-page{
    box-sizing:border-box;
    width:100%;
    max-width:760px;
    min-width:0;
    overflow:hidden;
}

.otroch-book-page-text{
    box-sizing:border-box;
    display:block;
    width:100%;
    max-width:100%;
    min-width:0;
    font-size:18px;
    line-height:1.55;
    white-space:pre;
    overflow:visible;
    overflow-wrap:normal;
    word-break:normal;
}

.otroch-book-page img{
    display:block;
    width:auto;
    max-width:100%;
    height:auto;
    margin-left:auto;
    margin-right:auto;
}

@media(min-width:761px){
    .otroch-book-page{
        max-width:min(760px,calc(100vw - 240px));
    }
}

@media(max-width:760px){
    .otroch-book-card{
        width:calc(100vw - 16px) !important;
        max-width:none !important;
        padding-left:8px;
        padding-right:8px;
        border-radius:18px;
    }

    .otroch-book-stage-row{
        grid-template-columns:48px minmax(0,1fr) 48px;
        column-gap:4px;
    }

    .otroch-book-page{
        max-width:none;
    }

    .otroch-book-page-text{
        font-size:clamp(12px,3.7vw,18px);
    }

    .otroch-book-card [data-book-prev],
    .otroch-book-card [data-book-next]{
        min-width:48px;
        min-height:48px;
    }
}

@media(max-width:430px){
    .otroch-book-card{
        width:calc(100vw - 8px) !important;
        padding-left:4px;
        padding-right:4px;
    }

    .otroch-book-stage-row{
        grid-template-columns:42px minmax(0,1fr) 42px;
        column-gap:3px;
    }

    .otroch-book-card [data-book-prev],
    .otroch-book-card [data-book-next]{
        min-width:42px;
        min-height:44px;
    }
}
/* OTROCH_BOOK_LAYOUT_REDO_END */
/* OTROCH_BOOK_MOVE_HEADER_BEGIN */
.otroch-book-card [data-otroch-book-intro="1"]{
    display:none !important;
}
/* OTROCH_BOOK_MOVE_HEADER_END */
/* OTROCH_BOOK_MOVE_HEADER_FINAL_BEGIN */
.otroch-book-card [data-otroch-book-intro="1"]{
    display:none !important;
}
/* OTROCH_BOOK_MOVE_HEADER_FINAL_END */
/* OTROCH_BOOK_INTRO_FINAL_BEGIN */
.otroch-book-card [data-otroch-book-intro-final="1"]{
    display:none !important;
}
/* OTROCH_BOOK_INTRO_FINAL_END */

/* BOOK_TEXT_PAGES_FIX_BEGIN */
.otroch-book-page[data-page="5"] .otroch-book-text,
.otroch-book-page[data-page-number="5"] .otroch-book-text,
[data-book-page="5"] .otroch-book-text,
.otroch-book-page[data-page="6"] .otroch-book-text,
.otroch-book-page[data-page-number="6"] .otroch-book-text,
[data-book-page="6"] .otroch-book-text,
.otroch-book-page[data-page="8"] .otroch-book-text,
.otroch-book-page[data-page-number="8"] .otroch-book-text,
[data-book-page="8"] .otroch-book-text,
.otroch-book-page[data-page="9"] .otroch-book-text,
.otroch-book-page[data-page-number="9"] .otroch-book-text,
[data-book-page="9"] .otroch-book-text{
  font-size:18px!important;
  line-height:1.55!important;
}

.otroch-book-page[data-page="10"] .otroch-book-text,
.otroch-book-page[data-page-number="10"] .otroch-book-text,
[data-book-page="10"] .otroch-book-text{
  width:100%!important;
  max-width:none!important;
  box-sizing:border-box!important;
  margin-left:0!important;
  margin-right:0!important;
  padding-left:28px!important;
  padding-right:28px!important;
  white-space:pre-wrap!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  overflow:visible!important;
  font-size:18px!important;
  line-height:1.55!important;
}
/* BOOK_TEXT_PAGES_FIX_END */

/* OTROCH_BOOK_PAGE_SIZE_FIX_BEGIN */
.otroch-book-page[data-page-number="5"] .otroch-book-page-text,
.otroch-book-page[data-page-number="6"] .otroch-book-page-text,
.otroch-book-page[data-page-number="8"] .otroch-book-page-text,
.otroch-book-page[data-page-number="9"] .otroch-book-page-text,
.otroch-book-page[data-page-number="10"] .otroch-book-page-text{
  box-sizing:border-box!important;
  width:100%!important;
  max-width:none!important;
  font-size:18px!important;
  line-height:1.55!important;
  white-space:pre-wrap!important;
  overflow:visible!important;
  overflow-wrap:break-word!important;
  word-break:normal!important;
}

.otroch-book-page[data-page-number="10"] .otroch-book-page-text{
  padding-left:28px!important;
  padding-right:28px!important;
}
/* OTROCH_BOOK_PAGE_SIZE_FIX_END */
