/* storyboard/diary-v2.css - clean diary v2 front-cover baseline */

.sb-diary-v2-overlay {
    position: fixed;
    inset: 0;
    z-index: 12000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    background:
        linear-gradient(180deg, rgba(246, 241, 232, 0.46), rgba(18, 12, 7, 0.74)),
        url('/Home/home-background.jpg') center center / cover no-repeat;
    backdrop-filter: blur(2px);
}

.sb-diary-v2-shell {
    width: min(1280px, calc(100vw - 32px));
    height: min(960px, calc(100vh - 24px));
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
}

.sb-diary-v2-topbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.sb-diary-v2-open {
    border: 1px solid rgba(255, 240, 214, 0.34);
    background: rgba(45, 31, 20, 0.82);
    color: #f8ecda;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.sb-diary-v2-topbar .sb-diary-v2-open {
    display: none !important;
}

.sb-diary-v2-open:hover {
    background: rgba(59, 40, 26, 0.9);
}

.sb-diary-v2-heading {
    color: #f7ead3;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sb-diary-v2-close {
    border: 1px solid rgba(255, 240, 214, 0.34);
    background: rgba(25, 18, 13, 0.78);
    color: #f8ecda;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.sb-diary-v2-close:hover {
    background: rgba(37, 26, 18, 0.9);
}

.sb-diary-v2-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: min(var(--sb-diary-v2-book-width), calc(100vw - 96px));
    height: min(var(--sb-diary-v2-book-height), calc(100vh - 110px));
    max-height: 100%;
    margin: 0 auto;
}

.sb-diary-v2-cover,
.sb-diary-v2-inside-spread,
.sb-diary-v2-pages-spread {
    transition: opacity 220ms ease;
}

.sb-diary-v2-cover.is-hidden,
.sb-diary-v2-inside-spread.is-hidden,
.sb-diary-v2-pages-spread.is-hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.sb-diary-v2-cover {
    position: relative;
    width: var(--sb-diary-v2-cover-width);
    height: var(--sb-diary-v2-cover-height);
    border: 1px solid rgba(58, 35, 18, 0.76);
    border-radius: 18px;
    overflow: hidden;
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 239, 200, 0.18), transparent 32%),
        radial-gradient(circle at 82% 86%, rgba(0, 0, 0, 0.34), transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.03), transparent 46%),
        repeating-linear-gradient(36deg, rgba(255, 255, 255, 0.03) 0 2px, rgba(0, 0, 0, 0.04) 2px 4px),
        linear-gradient(152deg, #6d4430 0%, #5c3a29 34%, #452b1e 64%, #372116 100%);
    box-shadow:
        0 36px 60px rgba(0, 0, 0, 0.52),
        0 14px 24px rgba(0, 0, 0, 0.34),
        inset 0 0 0 1px rgba(245, 225, 188, 0.09),
        inset 0 -18px 28px rgba(0, 0, 0, 0.26),
        inset 12px 0 16px rgba(0, 0, 0, 0.12),
        inset -10px 0 14px rgba(255, 255, 255, 0.06),
        inset 0 0 0 2px rgba(103, 67, 42, 0.32);
}

.sb-diary-v2-inside-spread {
    position: relative;
    width: var(--sb-diary-v2-book-width);
    height: var(--sb-diary-v2-book-height);
    display: grid;
    grid-template-columns: var(--sb-diary-v2-cover-width) var(--sb-diary-v2-cover-width);
    gap: var(--sb-diary-v2-gutter-width);
}

.sb-diary-v2-pages-spread {
    position: relative;
    width: var(--sb-diary-v2-book-width);
    height: var(--sb-diary-v2-book-height);
    display: block;
}

.sb-diary-v2-pages-spread.sb-diary-v2-pages-flip-mode::before {
    content: none;
}

.sb-diary-v2-pages-spread.sb-diary-v2-pages-flip-mode .sb-diary-v2-page,
.sb-diary-v2-pages-spread.sb-diary-v2-pages-flip-mode .sb-diary-v2-corner-turn {
    display: none;
}

.sb-diary-v2-pages-spread::before {
    content: "";
    position: absolute;
    top: var(--sb-diary-v2-page-inset);
    bottom: var(--sb-diary-v2-page-inset);
    left: 50%;
    width: calc(var(--sb-diary-v2-gutter-width) + 8px);
    transform: translateX(-50%);
    border-radius: 0;
    pointer-events: none;
    z-index: 3;
    background:
        linear-gradient(90deg,
            #aa8e68 0%,
            #61412a 20%,
            #2a180f 50%,
            #61412a 80%,
            #aa8e68 100%);
    box-shadow:
        inset 0 0 0 1px #876544,
        0 0 10px rgba(0, 0, 0, 0.24);
}

.sb-diary-v2-page {
    position: relative;
    width: var(--sb-diary-v2-page-sheet-width);
    height: var(--sb-diary-v2-page-height);
    top: var(--sb-diary-v2-page-inset);
    box-sizing: border-box;
    border-radius: 8px;
    border: 1px solid rgba(150, 123, 90, 0.45);
    background:
        radial-gradient(130% 110% at 12% 8%, rgba(255, 252, 244, 0.68), rgba(0, 0, 0, 0) 44%),
        radial-gradient(120% 110% at 88% 92%, rgba(150, 130, 104, 0.12), rgba(0, 0, 0, 0) 50%),
        linear-gradient(180deg, rgba(250, 243, 226, 0.98), rgba(236, 222, 193, 0.98));
    box-shadow:
        0 18px 28px rgba(0, 0, 0, 0.24),
        0 5px 10px rgba(0, 0, 0, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 -1px 0 rgba(140, 115, 84, 0.25) inset,
        -3px 0 0 rgba(92, 70, 48, 0.16) inset;
    padding: 30px 30px 24px;
    overflow: hidden;
    backface-visibility: hidden;
}

.sb-diary-v2-page::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        repeating-linear-gradient(180deg,
            rgba(150, 128, 96, 0.08) 0,
            rgba(150, 128, 96, 0.08) 1px,
            rgba(0, 0, 0, 0) 1px,
            rgba(0, 0, 0, 0) 28px);
}

.sb-diary-v2-page-left {
    position: absolute;
    right: 50%;
    transform-origin: right center;
    transform: perspective(1800px) rotateY(0.8deg);
}

.sb-diary-v2-page-right {
    position: absolute;
    left: 50%;
    transform-origin: left center;
    transform: perspective(1800px) rotateY(-0.8deg);
}

.sb-diary-v2-page-left::after,
.sb-diary-v2-page-right::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: max(7px, calc(var(--sb-diary-v2-gutter-width) / 2));
    pointer-events: none;
}

.sb-diary-v2-page-left::after {
    right: 0;
    background: linear-gradient(270deg, rgba(43, 25, 14, 0.52), rgba(112, 86, 59, 0.12) 44%, rgba(0, 0, 0, 0) 100%);
    box-shadow: -1px 0 0 rgba(255, 245, 228, 0.2) inset;
}

.sb-diary-v2-page-right::before {
    left: 0;
    background: linear-gradient(90deg, rgba(43, 25, 14, 0.52), rgba(112, 86, 59, 0.12) 44%, rgba(0, 0, 0, 0) 100%);
    box-shadow: 1px 0 0 rgba(255, 245, 228, 0.2) inset;
}

.sb-diary-v2-pages-spread.sb-diary-v2-turn-next .sb-diary-v2-page-right {
    opacity: 0.7;
}

.sb-diary-v2-pages-spread.sb-diary-v2-turn-prev .sb-diary-v2-page-left {
    opacity: 0.7;
}

.sb-diary-v2-turn-sheet {
    position: absolute;
    z-index: 6;
    display: none;
    pointer-events: none;
    opacity: 0;
}

.sb-diary-v2-turn-sheet::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0) 40%, rgba(255, 255, 255, 0.14) 100%);
}

.sb-diary-v2-turn-sheet-next {
    left: 50%;
    transform-origin: left center;
}

.sb-diary-v2-turn-sheet-prev {
    right: 50%;
    transform-origin: right center;
}

.sb-diary-v2-turn-sheet-active {
    display: block;
    opacity: 1;
}

.sb-diary-v2-turn-sheet-active.sb-diary-v2-turn-sheet-next {
    animation: sbDiaryV2TurnSheetNext 620ms cubic-bezier(0.2, 0.66, 0.24, 1);
}

.sb-diary-v2-turn-sheet-active.sb-diary-v2-turn-sheet-prev {
    animation: sbDiaryV2TurnSheetPrev 620ms cubic-bezier(0.2, 0.66, 0.24, 1);
}

@keyframes sbDiaryV2TurnSheetNext {
    0% {
        transform: perspective(2000px) rotateY(-0.8deg) rotateZ(0deg);
        box-shadow: 0 18px 28px rgba(0, 0, 0, 0.24), 0 5px 10px rgba(0, 0, 0, 0.14);
    }
    45% {
        transform: perspective(2000px) rotateY(-120deg) rotateZ(-1.4deg);
        box-shadow: 0 24px 34px rgba(0, 0, 0, 0.3), 0 14px 16px rgba(0, 0, 0, 0.22);
    }
    100% {
        transform: perspective(2000px) rotateY(-179deg) rotateZ(-2deg);
        box-shadow: 0 10px 16px rgba(0, 0, 0, 0.12);
    }
}

@keyframes sbDiaryV2TurnSheetPrev {
    0% {
        transform: perspective(2000px) rotateY(0.8deg) rotateZ(0deg);
        box-shadow: 0 18px 28px rgba(0, 0, 0, 0.24), 0 5px 10px rgba(0, 0, 0, 0.14);
    }
    45% {
        transform: perspective(2000px) rotateY(120deg) rotateZ(1.4deg);
        box-shadow: 0 24px 34px rgba(0, 0, 0, 0.3), 0 14px 16px rgba(0, 0, 0, 0.22);
    }
    100% {
        transform: perspective(2000px) rotateY(179deg) rotateZ(2deg);
        box-shadow: 0 10px 16px rgba(0, 0, 0, 0.12);
    }
}

.sb-diary-v2-corner-turn {
    position: absolute;
    z-index: 7;
    width: 38px;
    height: 38px;
    border: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.22), rgba(68, 48, 33, 0.2));
    cursor: pointer;
    opacity: 0;
    transition: opacity 160ms ease;
}

.sb-diary-v2-pages-spread:hover .sb-diary-v2-corner-turn,
.sb-diary-v2-corner-turn:focus-visible {
    opacity: 0.95;
}

.sb-diary-v2-corner-prev {
    left: calc(50% - var(--sb-diary-v2-page-sheet-width));
    bottom: calc(var(--sb-diary-v2-page-inset) + 6px);
    clip-path: polygon(0 100%, 100% 100%, 0 0);
}

.sb-diary-v2-corner-next {
    right: calc(50% - var(--sb-diary-v2-page-sheet-width));
    bottom: calc(var(--sb-diary-v2-page-inset) + 6px);
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.sb-diary-v2-flip-host {
    position: absolute;
    top: var(--sb-diary-v2-page-inset);
    left: calc(50% - var(--sb-diary-v2-page-sheet-width));
    width: calc(var(--sb-diary-v2-page-sheet-width) * 2);
    height: var(--sb-diary-v2-page-height);
    z-index: 6;
    overflow: visible;
    isolation: isolate;
}

.sb-diary-v2-flip-host.is-hidden {
    display: none;
}

.sb-diary-v2-flip-host::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: calc(var(--sb-diary-v2-gutter-width) + 8px);
    transform: translateX(-50%);
    border-radius: 0;
    pointer-events: none;
    z-index: 1;
    background: linear-gradient(90deg, rgba(164, 154, 140, 0.18) 0%, rgba(74, 67, 58, 0.56) 24%, rgba(32, 29, 26, 0.72) 50%, rgba(74, 67, 58, 0.56) 76%, rgba(164, 154, 140, 0.18) 100%);
    box-shadow: inset 0 0 0 1px rgba(85, 77, 68, 0.42), 0 0 8px rgba(0, 0, 0, 0.2);
}

.sb-diary-v2-flip-book {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
}

.sb-diary-v2-flip-page {
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    background: transparent;
}

.sb-diary-v2-flip-inside-cover,
.sb-diary-v2-flip-flyleaf {
    border-radius: 8px;
    overflow: hidden;
}

.sb-diary-v2-page-inside-cover {
    background:
        radial-gradient(circle at 14% 10%, rgba(255, 238, 202, 0.14), transparent 36%),
        radial-gradient(circle at 82% 86%, rgba(22, 12, 8, 0.26), transparent 52%),
        repeating-linear-gradient(36deg, rgba(255, 255, 255, 0.02) 0 2px, rgba(0, 0, 0, 0.03) 2px 4px),
        linear-gradient(152deg, #6d4430 0%, #5c3a29 34%, #452b1e 64%, #372116 100%);
    box-shadow:
        inset 0 0 0 1px rgba(101, 66, 40, 0.36),
        inset 0 12px 18px rgba(255, 255, 255, 0.05);
}

.sb-diary-v2-page-pass-through {
    background: transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

.sb-diary-v2-page-pass-through::before,
.sb-diary-v2-page-pass-through::after {
    content: none !important;
}

.sb-diary-v2-page-flyleaf {
    background:
        radial-gradient(130% 110% at 12% 8%, rgba(255, 252, 244, 0.7), rgba(0, 0, 0, 0) 44%),
        radial-gradient(120% 110% at 88% 92%, rgba(150, 130, 104, 0.12), rgba(0, 0, 0, 0) 50%),
        linear-gradient(180deg, rgba(250, 243, 226, 0.98), rgba(236, 222, 193, 0.98));
    box-shadow:
        0 18px 28px rgba(0, 0, 0, 0.24),
        0 5px 10px rgba(0, 0, 0, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 -1px 0 rgba(140, 115, 84, 0.25) inset,
        -3px 0 0 rgba(92, 70, 48, 0.2) inset;
    transform: perspective(1800px) rotateY(-1.1deg);
    transform-origin: left center;
}

.sb-diary-v2-page-flyleaf::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: max(7px, calc(var(--sb-diary-v2-gutter-width) / 2));
    background: linear-gradient(90deg, rgba(43, 25, 14, 0.5), rgba(112, 86, 59, 0.12) 42%, rgba(0, 0, 0, 0) 100%);
    box-shadow: 1px 0 0 rgba(255, 245, 228, 0.22) inset;
}

.sb-diary-v2-flip-inside-cover .sb-diary-v2-page,
.sb-diary-v2-flip-flyleaf .sb-diary-v2-page {
    padding: 0;
    margin: 0;
}

.sb-diary-v2-page-flip.sb-diary-v2-page-left,
.sb-diary-v2-page-flip.sb-diary-v2-page-right {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    transform: none;
    width: 100%;
    height: 100%;
}

.sb-diary-v2-page-flip {
    top: 0;
}

.sb-diary-v2-page-flip.sb-diary-v2-page-inside-cover,
.sb-diary-v2-page-flip.sb-diary-v2-page-flyleaf {
    width: 100%;
    height: 100%;
}

.sb-diary-v2-flip-host.sb-diary-v2-flip-turning .sb-diary-v2-page {
    box-shadow:
        0 20px 30px rgba(0, 0, 0, 0.28),
        0 8px 14px rgba(0, 0, 0, 0.18),
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 -1px 0 rgba(140, 115, 84, 0.25) inset,
        -3px 0 0 rgba(92, 70, 48, 0.16) inset;
}

.sb-diary-v2-page-heading {
    margin: 0;
    font-size: 18px;
    color: #64492f;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.sb-diary-v2-page-title {
    margin-top: 8px;
    font-size: 21px;
    color: #3f2c1d;
    font-family: Georgia, "Times New Roman", serif;
}

.sb-diary-v2-page-text {
    margin-top: 14px;
    font-size: 17px;
    line-height: 1.55;
    color: #4f3925;
}

.sb-diary-v2-page-image-wrap {
    margin: 14px 0 0;
}

.sb-diary-v2-page-image {
    display: block;
    width: 100%;
    max-height: 240px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(131, 105, 76, 0.34);
    box-shadow: 0 8px 14px rgba(0, 0, 0, 0.14);
}

.sb-diary-v2-page-image-wrap-flyleaf {
    margin: 0;
    height: calc(100% - 18px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sb-diary-v2-page-image-flyleaf {
    max-height: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
}

.sb-diary-v2-page-flyleaf .sb-diary-item-image,
.sb-diary-v2-page-flyleaf .sb-diary-item-image-no-shadow,
.sb-diary-v2-page-flyleaf .sb-diary-v2-flyleaf-layout-image {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
}

.sb-diary-v2-page-flyleaf .sb-diary-left-image-frame.sb-diary-left-image-frame-stage,
.sb-diary-v2-flyleaf-layout-canvas .sb-diary-left-image-frame.sb-diary-left-image-frame-stage {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
}

.sb-diary-v2-page-flyleaf .sb-diary-left-image,
.sb-diary-v2-flyleaf-image-reset {
    object-fit: contain !important;
    object-position: 50% 50% !important;
    transform: none !important;
}

.sb-diary-v2-page-image-caption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #5f4730;
    font-style: italic;
}

.sb-diary-v2-page-empty::before {
    content: none;
}

.sb-diary-v2-page-number {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    color: #725638;
    font-style: italic;
}

.sb-diary-v2-page-number-left {
    left: 50%;
}

.sb-diary-v2-page-number-right {
    left: 50%;
}

.sb-diary-v2-inside-spread::before {
    content: "";
    position: absolute;
    top: var(--sb-diary-v2-page-inset);
    bottom: var(--sb-diary-v2-page-inset);
    left: 50%;
    width: calc(var(--sb-diary-v2-gutter-width) + 6px);
    transform: translateX(-50%);
    border-radius: 0;
    pointer-events: none;
    z-index: 2;
    background:
        linear-gradient(90deg,
            rgba(176, 164, 146, 0.24) 0%,
            rgba(93, 82, 68, 0.62) 22%,
            rgba(38, 34, 30, 0.74) 50%,
            rgba(93, 82, 68, 0.62) 78%,
            rgba(176, 164, 146, 0.24) 100%);
    box-shadow:
        inset 0 0 0 1px rgba(87, 76, 63, 0.46),
        0 0 12px rgba(0, 0, 0, 0.22);
}

.sb-diary-v2-inside-cover {
    position: relative;
    width: var(--sb-diary-v2-cover-width);
    height: var(--sb-diary-v2-cover-height);
    border-radius: 18px;
    border: 1px solid rgba(58, 35, 18, 0.76);
    box-shadow:
        0 30px 50px rgba(0, 0, 0, 0.46),
        0 10px 18px rgba(0, 0, 0, 0.3),
        inset 0 0 0 1px rgba(245, 225, 188, 0.08),
        inset 0 -16px 22px rgba(0, 0, 0, 0.2),
        inset 0 0 0 2px rgba(103, 67, 42, 0.28);
    background:
        radial-gradient(circle at 16% 12%, rgba(255, 239, 200, 0.13), transparent 32%),
        radial-gradient(circle at 82% 86%, rgba(0, 0, 0, 0.28), transparent 50%),
        repeating-linear-gradient(36deg, rgba(255, 255, 255, 0.02) 0 2px, rgba(0, 0, 0, 0.04) 2px 4px),
        linear-gradient(152deg, #6d4430 0%, #5c3a29 34%, #452b1e 64%, #372116 100%);
    overflow: hidden;
    padding: var(--sb-diary-v2-page-inset);
    box-sizing: border-box;
}

.sb-diary-v2-inside-left::before,
.sb-diary-v2-inside-right::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 16%;
    pointer-events: none;
    z-index: 2;
}

.sb-diary-v2-inside-left::before {
    right: 0;
    background: linear-gradient(270deg, rgba(12, 7, 4, 0.42), rgba(0, 0, 0, 0.02));
    border-left: 1px solid rgba(246, 223, 188, 0.2);
}

.sb-diary-v2-inside-right::before {
    left: 0;
    background: linear-gradient(90deg, rgba(12, 7, 4, 0.42), rgba(0, 0, 0, 0.02));
    border-right: 1px solid rgba(246, 223, 188, 0.2);
}

.sb-diary-v2-endpaper {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    border-radius: 12px;
    box-shadow:
        inset 0 0 0 1px rgba(119, 84, 51, 0.28),
        inset 0 10px 16px rgba(255, 255, 255, 0.18),
        inset 0 -10px 14px rgba(73, 48, 29, 0.1);
    background:
        radial-gradient(130% 110% at 10% 8%, rgba(255, 248, 232, 0.52), rgba(0, 0, 0, 0) 46%),
        radial-gradient(120% 110% at 86% 92%, rgba(108, 84, 58, 0.16), rgba(0, 0, 0, 0) 48%),
        conic-gradient(from 210deg at 18% 24%, rgba(187, 166, 134, 0.16), rgba(245, 235, 214, 0.12), rgba(167, 145, 117, 0.16), rgba(245, 235, 214, 0.12), rgba(187, 166, 134, 0.16)),
        conic-gradient(from 25deg at 76% 74%, rgba(179, 157, 129, 0.14), rgba(240, 230, 208, 0.1), rgba(157, 134, 106, 0.14), rgba(240, 230, 208, 0.1), rgba(179, 157, 129, 0.14)),
        linear-gradient(180deg, rgba(232, 216, 190, 0.99), rgba(209, 186, 148, 0.99));
}

.sb-diary-v2-flyleaf {
    position: absolute;
    top: var(--sb-diary-v2-page-inset);
    left: 50%;
    z-index: 4;
    width: var(--sb-diary-v2-page-sheet-width);
    height: var(--sb-diary-v2-page-height);
    transform: none;
    border-radius: 8px;
    border: 1px solid rgba(138, 114, 82, 0.45);
    background:
        radial-gradient(130% 110% at 12% 8%, rgba(255, 252, 244, 0.7), rgba(0, 0, 0, 0) 44%),
        radial-gradient(120% 110% at 88% 92%, rgba(150, 130, 104, 0.12), rgba(0, 0, 0, 0) 50%),
        linear-gradient(180deg, rgba(250, 243, 226, 0.98), rgba(236, 222, 193, 0.98));
    box-shadow:
        0 18px 28px rgba(0, 0, 0, 0.24),
        0 5px 10px rgba(0, 0, 0, 0.14),
        0 2px 0 rgba(255, 255, 255, 0.35) inset,
        0 -1px 0 rgba(140, 115, 84, 0.25) inset,
        -3px 0 0 rgba(92, 70, 48, 0.2) inset;
    transform: perspective(1800px) rotateY(-1.1deg);
    transform-origin: left center;
}

.sb-diary-v2-flyleaf::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: max(7px, calc(var(--sb-diary-v2-gutter-width) / 2));
    border-radius: 8px 0 0 8px;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(43, 25, 14, 0.5), rgba(112, 86, 59, 0.12) 42%, rgba(0, 0, 0, 0) 100%),
        repeating-linear-gradient(180deg, rgba(132, 112, 84, 0.06) 0 1px, rgba(0, 0, 0, 0) 1px 7px);
    box-shadow: 1px 0 0 rgba(255, 245, 228, 0.22) inset;
}

.sb-diary-v2-flyleaf::after {
    content: "";
    position: absolute;
    top: 1px;
    bottom: 1px;
    right: -3px;
    width: 5px;
    border-radius: 0 7px 7px 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(223, 209, 180, 0.9), rgba(186, 165, 130, 0.72));
    box-shadow:
        -1px 0 0 rgba(120, 94, 66, 0.22) inset,
        2px 0 4px rgba(0, 0, 0, 0.16);
}

.sb-diary-v2-cover::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(255, 248, 235, 0.08), rgba(0, 0, 0, 0) 22%),
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.13), transparent 34%),
        radial-gradient(circle at 82% 88%, rgba(0, 0, 0, 0.22), transparent 48%);
}

.sb-diary-v2-cover-spine {
    position: absolute;
    inset: 0 auto 0 0;
    width: 18%;
    background: linear-gradient(90deg, rgba(21, 11, 7, 0.42), rgba(0, 0, 0, 0.05));
    border-right: 1px solid rgba(246, 223, 188, 0.22);
}

.sb-diary-v2-cover-title {
    position: absolute;
    z-index: 1;
    white-space: pre-line;
    text-align: center;
    font-family: Georgia, "Times New Roman", serif;
    letter-spacing: 0.05em;
    line-height: 1.34;
    font-size: clamp(15px, 1.6vw, 21px);
    font-weight: 400;
    color: #e7cd87;
    text-shadow:
        0 1px 0 rgba(255, 248, 225, 0.72),
        0 2px 0 rgba(126, 84, 40, 0.92),
        0 5px 10px rgba(0, 0, 0, 0.38);
    padding: 11px 20px;
    width: min(52%, 380px);
    max-width: 52%;
    left: 60%;
    top: calc(41% - 50px);
    transform: translate(-50%, -50%);
    border: 1px solid rgba(227, 196, 124, 0.92);
    border-radius: 5px;
    box-shadow:
        inset 0 1px 0 rgba(255, 247, 220, 0.36),
        inset 0 -1px 0 rgba(84, 54, 28, 0.42),
        inset 0 0 0 1px rgba(98, 66, 34, 0.56),
        0 6px 12px rgba(0, 0, 0, 0.26),
        0 0 0 1px rgba(242, 220, 159, 0.18);
    background:
        linear-gradient(180deg, rgba(31, 19, 12, 0.28), rgba(74, 48, 30, 0.12)),
        radial-gradient(circle at 20% 18%, rgba(255, 255, 255, 0.08), transparent 42%);
}

@media (max-width: 900px) {
    .sb-diary-v2-shell {
        width: min(96vw, 640px);
        height: min(94vh, 740px);
    }

    .sb-diary-v2-cover {
        border-radius: 14px;
    }

    .sb-diary-v2-inside-spread {
        gap: max(8px, calc(var(--sb-diary-v2-gutter-width) * 0.72));
    }

    .sb-diary-v2-pages-spread {
        gap: max(8px, calc(var(--sb-diary-v2-gutter-width) * 0.72));
    }

    .sb-diary-v2-inside-spread::before {
        width: calc(max(8px, calc(var(--sb-diary-v2-gutter-width) * 0.72)) + 8px);
    }

    .sb-diary-v2-pages-spread::before {
        width: calc(max(8px, calc(var(--sb-diary-v2-gutter-width) * 0.72)) + 6px);
    }

    .sb-diary-v2-inside-cover {
        border-radius: 14px;
    }

    .sb-diary-v2-endpaper {
        border-radius: 10px;
    }

    .sb-diary-v2-flyleaf,
    .sb-diary-v2-flyleaf::before {
        border-radius: 6px;
    }

    .sb-diary-v2-flyleaf::before {
        border-radius: 6px 0 0 6px;
    }

    .sb-diary-v2-flyleaf::after {
        border-radius: 0 5px 5px 0;
    }

    .sb-diary-v2-page {
        padding: 22px 20px 18px;
    }

    .sb-diary-v2-page-title {
        font-size: 18px;
    }

    .sb-diary-v2-page-text {
        font-size: 15px;
    }
}

.sb-diary-story-card {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    padding: 16px 18px 18px;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #4d3b29;
}

.sb-diary-story-card-stage {
    justify-content: flex-start;
}

.sb-diary-story-card-header {
    display: grid;
    gap: 1px;
    text-align: center;
    font-family: "Times New Roman", Times, serif;
    color: #7a5c3e;
}

.sb-diary-story-card-heading {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0.02em;
}

.sb-diary-story-card-location {
    font-size: 15px;
    font-weight: 400;
    line-height: 1.3;
    font-style: italic;
}

.sb-diary-story-card-diary-entry {
    background: transparent !important;
    border: 0 !important;
    padding: 0;
    margin: 0;
    box-shadow: none !important;
}

.sb-diary-story-card-diary-entry .sb-diary-story-card-diary-text {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.sb-diary-story-card-diary-text,
.sb-diary-story-card-note-text,
.sb-diary-story-card-body {
    margin: 0;
    white-space: pre-wrap;
    line-height: 1.54;
    font-size: 14px;
}

.sb-diary-story-card-notes {
    display: grid;
    gap: 8px;
    border: 1px solid rgba(122, 96, 67, 0.45);
    border-radius: 8px;
    background: rgba(255, 248, 236, 0.34);
    padding: 8px 10px 9px;
}

.sb-diary-story-card-note-section {
    display: grid;
    gap: 4px;
}

.sb-diary-story-card-note-heading {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: #6d5235;
    text-transform: none;
}

.sb-diary-story-card-plain {
    gap: 8px;
    padding-top: 8px;
    max-width: 94%;
    margin: 0 auto;
}

.sb-diary-story-card.sb-diary-story-card-plain.mm-war-step-card {
    width: 92%;
    max-width: 92%;
    margin: 0 auto;
}

.sb-diary-story-card-plain-heading {
    margin: 0;
    text-align: center;
    font-size: 16.5px;
    line-height: 1.35;
    color: #5e4c38;
    font-weight: 700;
    font-family: Georgia, "Times New Roman", serif;
    width: 92%;
    margin-left: auto;
    margin-right: auto;
}

.sb-diary-story-card-plain-subheading {
    margin: 0;
    text-align: center;
    font-size: 13px;
    line-height: 1.35;
    color: #6d5a45;
    font-family: Georgia, "Times New Roman", serif;
    width: 92%;
    margin-left: auto;
    margin-right: auto;
}

.sb-diary-story-card-plain-text {
    margin: 0;
    text-align: justify;
    text-justify: inter-word;
    white-space: pre-wrap;
    font-size: 16px;
    line-height: 1.5;
    color: #5e4c38;
    font-family: Georgia, "Times New Roman", serif;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    width: 92%;
    margin-left: auto;
    margin-right: auto;
}
