/* storyboard/diary.css - static diary reading mode overlay */

.sb-diary-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-shell {
    width: min(1040px, calc(100vw - 32px));
    height: min(960px, calc(100vh - 24px));
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    margin-top: 0;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-shell {
    width: min(1280px, calc(100vw - 32px));
    height: min(960px, calc(100vh - 24px));
}

.sb-diary-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.sb-diary-topbar-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.sb-diary-heading {
    color: #f7ead3;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.sb-diary-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-close:hover {
    background: rgba(37, 26, 18, 0.9);
}

.sb-diary-book {
    --sb-diary-book-width-base: 950px;
    --sb-diary-book-height-base: 930px;
    --sb-diary-scale: 1;
    --sb-diary-book-width: calc(var(--sb-diary-book-width-base) * var(--sb-diary-scale));
    --sb-diary-book-height: calc(var(--sb-diary-book-height-base) * var(--sb-diary-scale));
    --sb-diary-cover-width: calc((100% - var(--sb-diary-gutter-width)) / 2);
    --sb-diary-cover-height: 100%;
    --sb-diary-page-border-width: 5px;
    --sb-diary-page-radius: 12px;
    --sb-diary-gutter-width: 28px;
    border-radius: 0;
    border: none;
    background: transparent;
    box-shadow: none;
    display: block;
    overflow: visible;
    position: relative;
    --sb-diary-arrow-outset: 2.1;
    width: min(var(--sb-diary-book-width), calc(100vw - 96px));
    height: min(var(--sb-diary-book-height), calc(100vh - 110px));
    max-height: 100%;
    margin: 0 auto;
}

.sb-diary-book.sb-diary-scale-debug::before,
.sb-diary-book.sb-diary-scale-debug::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 35;
    opacity: 0.75;
}

.sb-diary-book.sb-diary-scale-debug::before {
    top: 0;
    bottom: 0;
    left: 50%;
    border-left: 1px dashed rgba(87, 222, 255, 0.85);
    transform: translateX(-0.5px);
}

.sb-diary-book.sb-diary-scale-debug::after {
    left: 0;
    right: 0;
    top: 50%;
    border-top: 1px dashed rgba(87, 222, 255, 0.85);
    transform: translateY(-0.5px);
}

.sb-diary-static-cover {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 24;
}

.sb-diary-static-cover.hidden {
    display: none;
}

.sb-diary-static-cover-backdrop {
    display: none;
}

.sb-diary-static-cover-panel {
    position: relative;
    width: var(--sb-diary-cover-width);
    max-width: var(--sb-diary-cover-width);
    min-width: 0;
    height: var(--sb-diary-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-book.sb-diary-book-opening {
    transform: none;
    opacity: 1;
}

.sb-diary-book.sb-diary-book-opening::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 11;
    border-radius: var(--sb-diary-page-radius);
    background: linear-gradient(180deg, rgba(232, 216, 190, 0.98), rgba(209, 186, 148, 0.98));
}

.sb-diary-book.sb-diary-book-opening .sb-diary-spread {
    position: relative;
    z-index: 12;
}

.sb-diary-static-cover.sb-diary-cover-opening {
    pointer-events: none;
}

.sb-diary-static-cover.sb-diary-cover-opening .sb-diary-static-cover-panel {
    transform-origin: left center;
    animation: sbDiaryCoverOpen 440ms cubic-bezier(0.24, 0.61, 0.24, 1) forwards;
}

@keyframes sbDiaryCoverOpen {
    0% {
        transform: perspective(1400px) rotateY(0deg);
        opacity: 1;
    }
    100% {
        transform: perspective(1400px) rotateY(-108deg);
        opacity: 0.2;
    }
}

.sb-diary-book {
    transition: none;
}

.sb-diary-viewer-note {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    background: rgba(47, 33, 22, 0.86);
    color: #f6e8d1;
    border: 1px solid rgba(235, 204, 159, 0.34);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.sb-diary-spread {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    min-width: 0;
    gap: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border-radius: 0;
    overflow: visible;
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread {
    position: relative;
    gap: var(--sb-diary-gutter-width);
    padding: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread::before {
    content: "";
    position: absolute;
    top: var(--sb-diary-page-border-width);
    bottom: var(--sb-diary-page-border-width);
    left: 50%;
    width: var(--sb-diary-gutter-width);
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 12;
    border-radius: var(--sb-diary-page-radius);
    background: linear-gradient(90deg, rgba(232, 222, 205, 0.96) 0%, rgba(136, 136, 136, 0.46) 48%, rgba(232, 222, 205, 0.96) 100%);
    box-shadow: inset 0 0 0 1px rgba(102, 102, 102, 0.18), 0 0 8px rgba(0, 0, 0, 0.14);
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread.sb-diary-spread-opening {
    animation: sbDiarySpreadReveal 460ms ease-out forwards;
}

@keyframes sbDiarySpreadReveal {
    0%, 72% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread.sb-diary-turn-next .sb-diary-right-page {
    animation: sbDiarySlideInRight 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread.sb-diary-turn-next .sb-diary-left-page {
    animation: sbDiarySlideInLeft 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread.sb-diary-turn-prev .sb-diary-left-page {
    animation: sbDiarySlideInLeft 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread.sb-diary-turn-prev .sb-diary-right-page {
    animation: sbDiarySlideInRight 280ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes sbDiarySlideInRight {
    0%   { transform: translateX(-18px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes sbDiarySlideInLeft {
    0%   { transform: translateX(18px); }
    100% { opacity: 1; transform: translateX(0); }
}

.sb-diary-corner-turn {
    position: absolute;
    z-index: 24;
    width: 42px;
    height: 42px;
    border: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(79, 61, 42, 0.22));
    border-radius: 6px;
    cursor: pointer;
    opacity: 0;
    transition: opacity 160ms ease;
}

.sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread:hover .sb-diary-corner-turn,
.sb-diary-corner-turn:focus-visible {
    opacity: 0.95;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-corner-turn {
    display: none !important;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-spread::before {
    box-shadow: none;
}

.sb-diary-corner-prev {
    left: 8px;
    bottom: 8px;
    clip-path: polygon(0 100%, 100% 100%, 0 0);
}

.sb-diary-corner-next {
    right: 8px;
    bottom: 8px;
    clip-path: polygon(0 100%, 100% 100%, 100% 0);
}

.sb-diary-spread.hidden,
.sb-diary-flip-host.hidden {
    display: none;
}

.sb-diary-flip-host {
    --sb-diary-layer-page-frame: linear-gradient(152deg, #6d4430 0%, #5c3a29 34%, #452b1e 64%, #372116 100%);
    --sb-diary-layer-page-paper: linear-gradient(180deg, rgba(247, 235, 212, 0.99), rgba(231, 210, 176, 0.99));
    --sb-diary-layer-page-wear-a: radial-gradient(circle at 14% 12%, rgba(255, 251, 239, 0.24), transparent 34%);
    --sb-diary-layer-page-wear-b: radial-gradient(circle at 86% 88%, rgba(148, 114, 71, 0.12), transparent 42%);
    --sb-diary-layer-gutter: linear-gradient(90deg,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(188, 188, 188, 0.42) 22%,
        rgba(114, 114, 114, 0.5) 50%,
        rgba(188, 188, 188, 0.42) 78%,
        rgba(255, 255, 255, 0.2) 100%);
    position: relative;
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: stretch;
    justify-content: center;
    padding: 0;
    box-sizing: border-box;
    border-radius: 0;
    overflow: visible;
}

.sb-diary-flip-host.sb-diary-flip-delayed {
    opacity: 0;
    pointer-events: none;
}

.sb-diary-flip-host::before {
    content: "";
    position: absolute;
    top: var(--sb-diary-page-border-width);
    bottom: var(--sb-diary-page-border-width);
    left: 50%;
    width: var(--sb-diary-gutter-width);
    transform: translateX(-50%);
    border-radius: 10px;
    pointer-events: none;
    z-index: 18;
    background: var(--sb-diary-layer-gutter);
    box-shadow: inset 0 0 0 1px rgba(80, 80, 80, 0.2), 0 0 5px rgba(0, 0, 0, 0.1);
}

.sb-diary-flip-host.hidden::before {
    content: none;
}

.sb-diary-flip-book {
    position: relative;
    width: 100%;
    height: 100%;
    background: transparent;
    border-radius: 18px;
}

.sb-diary-flip-page {
    box-sizing: border-box;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 16px;
    background: transparent;
    box-shadow: none;
}

.sb-diary-flip-content {
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: 16px;
    padding: 0;
    background: transparent;
    box-shadow: none;
}

.sb-diary-flip-left {
    box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.1);
}

.sb-diary-flip-right {
    box-shadow: inset 0 10px 18px rgba(255, 255, 255, 0.1);
}

.sb-diary-flip-content .sb-diary-page {
    height: 100%;
    min-height: 0;
    border: var(--sb-diary-page-border-width) solid transparent;
    padding: 12px 12px 10px;
    border-radius: var(--sb-diary-page-radius);
    background:
        var(--sb-diary-layer-page-wear-a) padding-box,
        var(--sb-diary-layer-page-wear-b) padding-box,
        var(--sb-diary-layer-page-paper) padding-box,
        var(--sb-diary-layer-page-frame) border-box;
    box-shadow: inset 0 0 0 1px rgba(123, 88, 51, 0.16), inset 0 12px 20px rgba(255, 255, 255, 0.14);
}

.sb-diary-flip-host.sb-diary-turning .sb-diary-flip-content .sb-diary-page {
    border-color: rgba(231, 210, 176, 0.98);
    background:
        var(--sb-diary-layer-page-wear-a) padding-box,
        var(--sb-diary-layer-page-wear-b) padding-box,
        var(--sb-diary-layer-page-paper) padding-box,
        linear-gradient(180deg, rgba(231, 210, 176, 0.98), rgba(231, 210, 176, 0.98)) border-box;
    box-shadow: inset 0 0 0 1px rgba(123, 88, 51, 0.12), inset 0 10px 16px rgba(255, 255, 255, 0.12);
}

.sb-diary-flip-host.sb-diary-folding .sb-diary-flip-content .sb-diary-page {
    border-color: rgba(231, 210, 176, 0.98);
    background:
        var(--sb-diary-layer-page-wear-a) padding-box,
        var(--sb-diary-layer-page-wear-b) padding-box,
        var(--sb-diary-layer-page-paper) padding-box,
        linear-gradient(180deg, rgba(231, 210, 176, 0.98), rgba(231, 210, 176, 0.98)) border-box;
    box-shadow: inset 0 0 0 1px rgba(123, 88, 51, 0.12), inset 0 10px 16px rgba(255, 255, 255, 0.12);
}

.sb-diary-flip-content .sb-diary-left-page,
.sb-diary-flip-content .sb-diary-right-page {
    background-color: rgba(239, 220, 186, 0.98);
}

.sb-diary-flip-content .sb-diary-left-page::before {
    content: "";
    position: absolute;
    top: var(--sb-diary-page-border-width);
    bottom: var(--sb-diary-page-border-width);
    width: 1px;
    background: var(--sb-diary-layer-gutter);
    opacity: 0.15;
    pointer-events: none;
    z-index: 2;
}

.sb-diary-flip-content .sb-diary-left-page::before {
    right: 0;
}

.sb-diary-flip-content .sb-diary-right-page::before {
    content: none;
}

.sb-diary-flip-content .sb-diary-page-canvas {
    min-height: 0;
    height: 100%;
}

.sb-diary-endpaper-page .sb-diary-page-canvas {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
}

.sb-diary-flip-cover {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    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%);
    color: #f2e6d2;
    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 0 14px 20px rgba(255, 255, 255, 0.06),
        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-flip-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-flip-cover.is-back {
    background:
        radial-gradient(circle at 70% 20%, rgba(255, 221, 173, 0.1), transparent 42%),
        repeating-linear-gradient(34deg, rgba(255, 255, 255, 0.02) 0 2px, rgba(0, 0, 0, 0.04) 2px 4px),
        linear-gradient(152deg, #63402c, #4a2e20 58%, #351f15);
}

.sb-diary-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-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;
    text-transform: none;
    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%);
}

.sb-diary-endpaper-page {
    padding: 0;
}

.sb-diary-inside-cover-page {
    border-radius: 16px;
    padding: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    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);
    box-sizing: border-box;
}

.sb-diary-endpaper-canvas {
    border-radius: 14px;
    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));
    background-size: auto;
    background-position: center;
    box-shadow: inset 0 0 0 1px rgba(119, 84, 51, 0.3), inset 0 10px 16px rgba(255, 255, 255, 0.2), inset 0 -10px 14px rgba(73, 48, 29, 0.1);
}

.sb-diary-endpaper-canvas-flat {
    width: 100%;
    height: 100%;
    min-height: 0;
}

.sb-diary-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: rgba(45, 30, 19, 0.72);
    color: #f8e4be;
    cursor: pointer;
    font-size: 24px;
    font-weight: 700;
    border-radius: 9px;
    width: 30px;
    height: 46px;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 239, 208, 0.2);
    z-index: 20;
}

.sb-diary-arrow-prev {
    left: 0;
    transform: translate(calc(-100% * var(--sb-diary-arrow-outset)), -50%);
}

.sb-diary-arrow-next {
    right: 0;
    transform: translate(calc(100% * var(--sb-diary-arrow-outset)), -50%);
}

.sb-diary-arrow:hover:not(:disabled) {
    background: rgba(59, 40, 26, 0.88);
}

.sb-diary-arrow:disabled {
    opacity: 0.38;
    cursor: default;
}

.sb-diary-page {
    overflow: hidden;
    padding: 18px 18px 16px;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #2d1e14;
    font-family: Georgia, "Times New Roman", serif;
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
    position: relative;
}



.sb-diary-overlay.sb-diary-flat-mode .sb-diary-page {
    border: var(--sb-diary-page-border-width) solid transparent;
    border-radius: var(--sb-diary-page-radius);
    background:
        radial-gradient(circle at 14% 12%, rgba(255, 251, 239, 0.24), transparent 34%) padding-box,
        radial-gradient(circle at 86% 88%, rgba(148, 114, 71, 0.12), transparent 42%) padding-box,
        linear-gradient(180deg, rgba(247, 235, 212, 0.99), rgba(231, 210, 176, 0.99)) padding-box,
        linear-gradient(152deg, #6d4430 0%, #5c3a29 34%, #452b1e 64%, #372116 100%) border-box;
    box-shadow:
        inset 0 0 0 1px rgba(123, 88, 51, 0.16),
        inset 0 12px 20px rgba(255, 255, 255, 0.14),
        0 10px 18px rgba(0, 0, 0, 0.12);
}

.sb-diary-left-page {
    justify-content: flex-start;
}

.sb-diary-right-page {
    overflow: hidden;
}

.sb-diary-page-canvas {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 520px;
    overflow: hidden;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-page,
.sb-diary-overlay.sb-diary-layout-editing .sb-diary-right-page,
.sb-diary-overlay.sb-diary-layout-editing .sb-diary-page-canvas {
    overflow: hidden;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-page {
    padding: 30px 30px 24px;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-book {
    --sb-diary-book-width-base: 1154px;
    --sb-diary-book-height-base: 760px;
    --sb-diary-gutter-width: 14px;
    --sb-diary-page-border-width: 1px;
    --sb-diary-page-radius: 8px;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-page-meta {
    display: block;
    margin-top: 6px;
    text-align: center;
    font-size: 11px;
    letter-spacing: 0.06em;
    color: rgba(93, 66, 43, 0.88);
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-item-card {
    overflow: visible;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-left-image-frame.sb-diary-left-image-frame-stage {
    height: 100%;
    overflow: hidden;
}

.sb-diary-overlay.sb-diary-layout-editing .sb-diary-left-image {
    object-fit: cover;
}

.sb-diary-flip-content .sb-diary-page-canvas {
    min-height: 0;
}

.sb-diary-item {
    position: absolute;
    box-sizing: border-box;
}

.sb-diary-item-image {
    display: flex;
    flex-direction: column;
    pointer-events: auto;
}

.sb-diary-item-card {
    pointer-events: auto;
}

.sb-diary-left-image-frame-stage {
    width: 100%;
    height: 100%;
    min-height: 0;
    border: none;
    box-shadow: none;
    border-radius: 0;
}

.sb-diary-story-card-stage.sb-diary-story-card.mm-war-step-card {
    height: auto;
    overflow: visible;
}

.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.62);
    border-radius: 10px;
    background: rgba(255, 248, 236, 0.42);
    box-shadow:
        0 6px 14px rgba(58, 38, 22, 0.28),
        0 2px 6px rgba(58, 38, 22, 0.2);
    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;
}

.sb-diary-item-caption {
    flex-shrink: 0;
    text-align: center;
    background: rgba(247, 241, 229, 0.97);
    color: #4b3e2f;
    font-family: Georgia, "Times New Roman", serif;
    border-radius: 0 0 7px 7px;
    padding: 5px 8px;
    font-size: 11px;
    line-height: 1.4;
    font-style: italic;
}

.sb-diary-left-image-frame {
    flex: 1 1 0;
    width: 100%;
    min-height: 0;
    overflow: visible;
    background: transparent;
    border: none;
    box-shadow: none;
}

.sb-diary-item-image:not(:has(.sb-diary-item-caption)) .sb-diary-left-image-frame {
    background: transparent;
}

.sb-diary-left-image-frame.sb-diary-left-image-frame-stage {
    min-height: 0;
    height: auto;
    flex: 1 1 0;
    overflow: visible;
    border: none;
    box-shadow: none;
}

.sb-diary-left-image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: 50% 50%;
    transform-origin: center center;
    background: transparent;
}

.sb-diary-item-image .sb-diary-left-image-frame.sb-diary-left-image-frame-stage {
    height: 100%;
    overflow: hidden;
    box-shadow:
        0 8px 16px rgba(36, 24, 14, 0.34),
        0 3px 8px rgba(36, 24, 14, 0.22);
}

.sb-diary-item-image-no-shadow .sb-diary-left-image-frame.sb-diary-left-image-frame-stage {
    box-shadow: none !important;
}

.sb-diary-item-image-no-shadow {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    filter: none !important;
}

.sb-diary-flysheet-side .sb-diary-item-image .sb-diary-left-image-frame.sb-diary-left-image-frame-stage {
    overflow: visible;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.sb-diary-flysheet-side .sb-diary-item-image .sb-diary-left-image,
.sb-diary-left-image-no-shadow {
    object-fit: contain !important;
    object-position: 50% 50% !important;
    transform: none !important;
}

.sb-diary-item-image .sb-diary-left-image {
    object-fit: cover;
}

.sb-diary-left-caption {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.4;
    color: #5a4130;
}

.sb-diary-left-empty {
    flex: 1;
    min-height: 220px;
    border: 1px dashed rgba(80, 55, 35, 0.35);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #765842;
    font-size: 13px;
    font-style: italic;
}

.sb-diary-story-card.mm-war-step-card {
    position: relative;
    top: auto;
    left: auto;
    display: flex;
    pointer-events: auto;
    min-width: 0;
    max-width: 100%;
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
    text-align: left;
}

.sb-diary-right-page .sb-diary-story-card + .sb-diary-story-card {
    margin-top: 10px;
}

.sb-diary-story-card .mm-war-step-place {
    font-size: clamp(18px, 1.95vw, 25px);
    line-height: 1.2;
}

.sb-diary-story-card .mm-war-step-title {
    font-size: 13px;
    margin-top: 6px;
}

.sb-diary-story-card .mm-war-step-label {
    display: block;
}

.sb-diary-story-card .mm-war-step-text {
    margin-top: 6px;
    padding: 8px 10px;
    font-size: 15px;
    line-height: 1.52;
}

.sb-diary-story-card .mm-war-step-note {
    font-size: 14px;
    line-height: 1.5;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.sb-diary-story-card .mm-war-step-diary {
    font-size: clamp(17px, 1.72vw, 20px);
    line-height: 1.56;
}

.sb-diary-page-meta {
    margin-top: 8px;
    font-size: 12px;
    color: #664a35;
    text-align: center;
    font-weight: 700;
    letter-spacing: 0.04em;
}

.sb-diary-layout-overlay {
    position: fixed;
    inset: 0;
    z-index: 12100;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(12, 9, 7, 0.68);
}

.sb-diary-layout-dock {
    position: fixed;
    right: 14px;
    top: 14px;
    z-index: 12110;
    width: min(420px, calc(100vw - 20px));
    max-height: calc(100vh - 28px);
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(211, 177, 125, 0.45);
    background: linear-gradient(180deg, #f2e4cb, #e6cfab);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    padding: 12px;
}

.sb-diary-layout-tabs {
    display: flex;
    gap: 6px;
    margin: 8px 0;
}

.sb-diary-layout-tabs button.active {
    background: linear-gradient(180deg, #7d5a39, #63452b);
    color: #f8e9cc;
    border-color: rgba(92, 63, 40, 0.6);
}

.sb-diary-layout-chip.active,
.sb-diary-layout-chip.selected {
    outline: 2px solid rgba(113, 74, 43, 0.8);
    outline-offset: 0;
}

.sb-diary-live-edit-canvas {
    position: relative;
    outline: 1px dashed rgba(110, 73, 42, 0.38);
    outline-offset: -2px;
}

.sb-diary-live-edit-canvas.sb-diary-grid-enabled::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    background-image:
        linear-gradient(to right, rgba(110, 73, 42, 0.18) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(110, 73, 42, 0.18) 1px, transparent 1px);
    background-size: 10% 10%;
}

.sb-diary-live-edit-canvas.sb-diary-grid-enabled .sb-diary-item {
    z-index: 2;
}

.sb-diary-canvas-armed {
    outline: 2px solid rgba(53, 122, 48, 0.85);
    outline-offset: -2px;
    cursor: crosshair !important;
    background: rgba(180, 230, 170, 0.10);
}

.sb-diary-live-edit-item.selected {
    outline: none;
    box-shadow: 0 0 0 2px rgba(123, 79, 43, 0.65) inset;
}

.sb-diary-live-edit-item.sb-diary-item-card.selected {
    box-shadow: none;
}

.sb-diary-layout-modal {
    width: min(980px, calc(100vw - 24px));
    max-height: min(88vh, 900px);
    overflow: auto;
    border-radius: 12px;
    border: 1px solid rgba(211, 177, 125, 0.35);
    background: linear-gradient(180deg, #f2e4cb, #e6cfab);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.45);
    padding: 14px;
}

.sb-diary-layout-title {
    font-size: 18px;
    font-weight: 700;
    color: #452e1d;
}

.sb-diary-layout-hint {
    font-size: 12px;
    color: #604632;
    margin-top: 4px;
    margin-bottom: 10px;
}

.sb-diary-layout-section {
    border: 1px solid rgba(102, 70, 44, 0.26);
    border-radius: 10px;
    padding: 10px;
    background: rgba(255, 252, 246, 0.55);
    margin-bottom: 10px;
}

.sb-diary-layout-section h4 {
    margin: 0 0 8px;
    font-size: 14px;
    color: #4d3522;
}

.sb-diary-layout-section label {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    color: #5a4330;
}

.sb-diary-layout-section input[type="text"],
.sb-diary-layout-section select,
.sb-diary-layout-section textarea {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(92, 63, 40, 0.38);
    border-radius: 6px;
    padding: 6px 8px;
    background: #fff;
    color: #4d3522;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 13px;
}

.sb-diary-layout-section textarea {
    resize: vertical;
    min-height: 78px;
}

.sb-diary-layout-section button {
    margin-top: 6px;
    border: 1px solid rgba(92, 63, 40, 0.5);
    border-radius: 7px;
    padding: 7px 10px;
    background: linear-gradient(180deg, #7d5a39, #63452b);
    color: #f8e9cc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.sb-diary-stage-toolbar {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
    flex-wrap: wrap;
}

.sb-diary-stage-toolbar label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #5a4330;
}

.sb-diary-stage-toolbar input[type="number"] {
    width: 78px;
    border: 1px solid rgba(92, 63, 40, 0.38);
    border-radius: 6px;
    padding: 5px 6px;
    background: #fff;
}

.sb-diary-layout-page-display {
    font-size: 12px;
    color: #4f3726;
    font-weight: 700;
    margin-right: 2px;
}

.sb-diary-stage-spread {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    min-height: 360px;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.18) 49.5%, rgba(255, 255, 255, 0.08) 50%, rgba(0, 0, 0, 0.2) 50.5%),
        linear-gradient(180deg, rgba(246, 230, 202, 0.96), rgba(233, 207, 167, 0.96));
    border: 1px solid rgba(114, 79, 50, 0.38);
    border-radius: 10px;
    padding: 8px;
}

.sb-diary-stage-page {
    position: relative;
    border: 1px dashed rgba(90, 63, 40, 0.35);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.54);
    min-height: 336px;
    overflow: hidden;
}

.sb-diary-stage-item {
    position: absolute;
    box-sizing: border-box;
    border-radius: 6px;
    touch-action: none;
    cursor: move;
}

.sb-diary-stage-item.selected {
    outline: 2px solid #7b4f2b;
    outline-offset: -1px;
}

.sb-diary-stage-item-image {
    background: rgba(255, 255, 255, 0.22);
}

.sb-diary-stage-image-frame {
    width: 100%;
    height: 100%;
    border: 1px solid rgba(84, 59, 37, 0.35);
    border-radius: 6px;
    overflow: hidden;
}

.sb-diary-stage-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 20%;
    transform-origin: center center;
    pointer-events: none;
}

.sb-diary-stage-item-card {
    background: rgba(248, 240, 224, 0.92);
    border: 1px solid rgba(88, 60, 39, 0.35);
    overflow: hidden;
}

.sb-diary-stage-card-preview {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 8px;
    font-size: 12px;
    line-height: 1.35;
    color: #4a3322;
    font-weight: 700;
}

.sb-diary-stage-resize {
    position: absolute;
    width: 12px;
    height: 12px;
    right: 2px;
    bottom: 2px;
    border-radius: 2px;
    background: rgba(122, 78, 43, 0.9);
    border: 1px solid rgba(255, 243, 219, 0.8);
    cursor: nwse-resize;
    touch-action: none;
    opacity: 0;
    pointer-events: none;
}

.sb-diary-stage-pan {
    position: absolute;
    width: 16px;
    height: 16px;
    left: 2px;
    top: 2px;
    border-radius: 50%;
    background: rgba(122, 78, 43, 0.9);
    border: 1px solid rgba(255, 243, 219, 0.8);
    cursor: grab;
    color: #f8e9cc;
    font-size: 10px;
    line-height: 15px;
    text-align: center;
    user-select: none;
    touch-action: none;
    opacity: 0;
    pointer-events: none;
}

.sb-diary-live-edit-item.selected .sb-diary-stage-resize,
.sb-diary-live-edit-item.selected .sb-diary-stage-pan {
    opacity: 1;
    pointer-events: auto;
}

.sb-diary-stage-palette {
    margin-top: 10px;
    border: 1px solid rgba(100, 70, 45, 0.28);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
    padding: 8px;
}

.sb-diary-stage-palette-title {
    font-size: 12px;
    font-weight: 700;
    color: #4f3726;
    margin-bottom: 4px;
}

.sb-diary-stage-palette-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.sb-diary-stage-palette-wrap-images {
    gap: 10px;
}

.sb-diary-stage-palette-wrap .sb-diary-layout-chip {
    margin: 0;
}

.sb-diary-layout-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 8px;
}

.sb-diary-layout-page-col {
    border: 1px dashed rgba(94, 65, 42, 0.42);
    border-radius: 9px;
    background: rgba(255, 255, 255, 0.44);
    padding: 8px;
}

.sb-diary-layout-page-head {
    font-size: 12px;
    font-weight: 700;
    color: #483222;
    margin-bottom: 6px;
}

.sb-diary-layout-drop {
    border: 1px solid rgba(100, 70, 45, 0.3);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.66);
    padding: 6px;
    min-height: 44px;
}

.sb-diary-layout-drop + .sb-diary-layout-drop {
    margin-top: 6px;
}

.sb-diary-layout-drop-cards {
    min-height: 86px;
}

.sb-diary-layout-drop-empty {
    color: #7a5c44;
    font-size: 11px;
    font-style: italic;
}

.sb-diary-layout-chip {
    border: 1px solid rgba(90, 62, 40, 0.36);
    border-radius: 7px;
    padding: 5px 7px;
    font-size: 11px;
    line-height: 1.3;
    cursor: grab;
    user-select: none;
}

.sb-diary-layout-chip + .sb-diary-layout-chip {
    margin-top: 6px;
}

.sb-diary-layout-chip-image {
    background: linear-gradient(180deg, #f3e8d6, #e6d2b1);
    color: #4c3523;
}

.sb-diary-layout-chip-image-preview {
    display: grid;
    grid-template-rows: 82px auto;
    gap: 6px;
    width: 140px;
    padding: 6px;
    text-align: left;
}

.sb-diary-layout-chip-image-thumb-wrap {
    position: relative;
    display: block;
}

.sb-diary-layout-chip-image-thumb {
    display: block;
    width: 100%;
    height: 82px;
    object-fit: cover;
    object-position: center;
    border-radius: 5px;
    border: 1px solid rgba(90, 62, 40, 0.28);
    background: rgba(255, 255, 255, 0.66);
}

.sb-diary-layout-chip-image-label {
    display: block;
    font-size: 10px;
    line-height: 1.25;
    color: #4c3523;
    overflow-wrap: anywhere;
    min-height: 25px;
}

.sb-diary-layout-chip-image-used-dot {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #c92020;
    border: 1px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px rgba(108, 26, 26, 0.32);
}

.sb-diary-layout-chip-image-used .sb-diary-layout-chip-image-thumb {
    border-color: rgba(201, 32, 32, 0.52);
}

.sb-diary-layout-chip-card {
    background: linear-gradient(180deg, #ece0cc, #ddc7a0);
    color: #3e2a1b;
}

.sb-diary-layout-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 8px;
    align-items: center;
    margin-bottom: 6px;
}

.sb-diary-layout-row label {
    font-size: 12px;
    color: #533b29;
}

.sb-diary-layout-row input[type="number"] {
    border: 1px solid rgba(92, 63, 40, 0.38);
    border-radius: 6px;
    padding: 5px 6px;
    background: #fff;
}

.sb-diary-layout-row-image {
    grid-template-columns: minmax(0, 1fr) 82px;
}

.sb-diary-layout-slider-grid {
    grid-column: 1 / -1;
    border: 1px dashed rgba(91, 63, 42, 0.3);
    border-radius: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.55);
}

.sb-diary-layout-slider-row {
    display: grid;
    grid-template-columns: 46px 54px 1fr;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sb-diary-layout-slider-row:last-child {
    margin-bottom: 0;
}

.sb-diary-layout-image-preview {
    grid-column: 1 / -1;
    height: 140px;
    border-radius: 8px;
    border: 1px solid rgba(88, 61, 40, 0.36);
    overflow: hidden;
    background: rgba(246, 239, 226, 0.85);
    touch-action: none;
    cursor: move;
}

.sb-diary-layout-image-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 18%;
    transform-origin: center center;
    pointer-events: none;
}

.sb-diary-layout-slider-row span {
    font-size: 12px;
    color: #5b4330;
}

.sb-diary-layout-slider-value {
    font-weight: 700;
    color: #3f2b1c;
}

.sb-diary-layout-empty {
    font-size: 12px;
    color: #6d5037;
    font-style: italic;
}

.sb-diary-layout-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 8px;
}

.sb-diary-layout-actions button {
    border: 1px solid rgba(92, 63, 40, 0.5);
    border-radius: 7px;
    padding: 7px 10px;
    background: linear-gradient(180deg, #7d5a39, #63452b);
    color: #f8e9cc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}

.sb-diary-layout-actions button.secondary {
    background: linear-gradient(180deg, #efe2cb, #dfc6a1);
    color: #49321f;
}

@media (max-width: 900px) {
    .sb-diary-shell {
        width: calc(100vw - 18px);
        height: calc(100vh - 12px);
    }

    .sb-diary-book {
        width: min(var(--sb-diary-book-width), calc(100vw - 18px));
        height: min(var(--sb-diary-book-height), calc(100vh - 110px));
    }

    .sb-diary-page {
        padding: 12px 10px;
    }

    .sb-diary-overlay.sb-diary-flat-mode .sb-diary-spread {
        gap: 8px;
        padding: 5px;
    }

    .sb-diary-flip-host {
        padding: 8px;
    }

    .sb-diary-layout-row {
        grid-template-columns: 1fr;
    }

    .sb-diary-stage-spread {
        grid-template-columns: 1fr;
    }

    .sb-diary-layout-row input[type="number"] {
        width: 100%;
    }

    .sb-diary-story-card.mm-war-step-card {
        padding: 10px 10px;
    }

    .sb-diary-story-card .mm-war-step-place {
        font-size: 18px;
    }

    .sb-diary-story-card .mm-war-step-text {
        font-size: 14px;
        line-height: 1.46;
    }

    .sb-diary-story-card .mm-war-step-diary {
        font-size: 17px;
        line-height: 1.5;
    }

    .sb-diary-topbar-actions {
        gap: 6px;
    }

    .sb-diary-close {
        padding: 7px 10px;
        font-size: 11px;
    }

    .sb-diary-cover-title {
        width: min(58%, 300px);
        max-width: 58%;
        left: 60%;
        top: 42%;
        padding: 10px 12px;
        font-size: clamp(15px, 3.2vw, 19px);
    }

    .sb-diary-arrow {
        width: 26px;
        height: 40px;
        font-size: 20px;
    }

    .sb-diary-arrow-prev {
        left: 0;
    }

    .sb-diary-arrow-next {
        right: 0;
    }
}
