/* Theme tokens apply to the reader and creator preview without changing pages. */
[data-book-theme]{--book-bg:#142337;--book-surface:#253b55;--book-glow:#2d4055;--book-edge:#101a28;--book-border:#71849b;--book-text:#f4f8fc;--book-muted:#cfdae6;--book-accent:#d6ff6f;--book-accent-text:#182333;--book-hover:#3a5779}
[data-book-theme=charcoal]{--book-bg:#18191e;--book-surface:#30323b;--book-glow:#454854;--book-edge:#17181d;--book-border:#858897;--book-text:#f7f7fb;--book-muted:#d0d1db;--book-accent:#d6d9e6;--book-accent-text:#20222c;--book-hover:#454854}
[data-book-theme=forest]{--book-bg:#112a25;--book-surface:#244b41;--book-glow:#355f4d;--book-edge:#10231e;--book-border:#739e88;--book-text:#f2faf5;--book-muted:#cee1d4;--book-accent:#d9ec9b;--book-accent-text:#183425;--book-hover:#386754}
[data-book-theme=ocean]{--book-bg:#102b3d;--book-surface:#194b60;--book-glow:#276a7e;--book-edge:#0c2335;--book-border:#6fa5b9;--book-text:#f0fbff;--book-muted:#c9e2ee;--book-accent:#9fe5ed;--book-accent-text:#143748;--book-hover:#296b80}
[data-book-theme=plum]{--book-bg:#2b1c35;--book-surface:#493153;--book-glow:#63426b;--book-edge:#26182c;--book-border:#a185ab;--book-text:#fff5ff;--book-muted:#e0cfe5;--book-accent:#e9bee4;--book-accent-text:#37233f;--book-hover:#674773}
[data-book-theme=sandstone]{--book-bg:#3a2b22;--book-surface:#594334;--book-glow:#765b43;--book-edge:#30231b;--book-border:#bca184;--book-text:#fff8ed;--book-muted:#e6d4bf;--book-accent:#f3d7a0;--book-accent-text:#3c2a19;--book-hover:#796049}
body[data-book-theme]{background:var(--book-bg);color:var(--book-text)}
body[data-book-theme] .book-view{--page-turn-bg:var(--book-surface);--page-turn-color:var(--book-text);--page-turn-border:var(--book-border);--page-turn-hover:var(--book-hover)}
body[data-book-theme] .book-view:is(:fullscreen,.is-expanded){background:var(--book-bg)}
body[data-book-theme] .book{background:radial-gradient(ellipse at 50% 35%,var(--book-glow),var(--book-edge) 80%);border-color:var(--book-border)}
body[data-book-theme] :is(.book-header a,.book-ad a){color:var(--book-accent)}
body[data-book-theme] :is(.book-controls button,.book-controls select,.book-ad){background:var(--book-surface);color:var(--book-text);border-color:var(--book-border)}
body[data-book-theme] .book-controls button:hover:not(:disabled){background:var(--book-hover)}
body[data-book-theme] .book-controls button.selected{background:var(--book-accent);border-color:var(--book-accent);color:var(--book-accent-text)}
body[data-book-theme] :is(.book-controls span,.book-language){color:var(--book-muted)}
body[data-book-theme] .book-controls :is(button,select):focus-visible{outline-color:var(--book-accent)}
.book-theme{display:flex;align-items:center;gap:8px;font-size:13px;font-weight:700;color:var(--book-muted)}
.book-theme #book-theme-label{min-width:0}
.book-theme select{min-width:120px;text-align:start}
.flip-display[data-book-theme] .flip-stage{background:radial-gradient(ellipse at 50% 35%,var(--book-glow),var(--book-edge) 80%);border-color:var(--book-border)}
.flip-display[data-book-theme]:is(:fullscreen,.editor-expanded),.flip-display[data-book-theme]:is(:fullscreen,.editor-expanded) .flip-page-nav{background:var(--book-bg)}
.flip-theme-choices{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:10px 0 20px}
.workspace button.flip-theme-choice{display:flex;flex-direction:column;gap:8px;min-width:0;padding:10px;border:2px solid #d8dfe9;background:#fff;color:#26394c;box-shadow:none;font-size:12px}
.workspace button.flip-theme-choice[aria-pressed=true]{border-color:#6547d9;background:#f4efff;box-shadow:0 0 0 2px #6547d922}
.flip-theme-swatch{display:flex;justify-content:center;align-items:center;width:100%;height:58px;background:radial-gradient(ellipse at 50% 35%,var(--book-glow),var(--book-bg));border-radius:7px}
.flip-theme-swatch::before,.flip-theme-swatch::after{content:"";width:23px;height:36px;background:#fcfaf5;border:1px solid #e2dacc;box-shadow:0 3px 6px #0003}
.flip-theme-swatch::before{border-radius:2px 0 0 2px}.flip-theme-swatch::after{border-radius:0 2px 2px 0}
@media(max-width:420px){.flip-theme-choices{grid-template-columns:repeat(2,minmax(0,1fr))}}

.workspace button.flip-theme-choice{background:#dce6f3;color:#233b57;border-color:#809bb8;box-shadow:0 2px 0 #b2c4db}
.workspace button.flip-theme-choice[aria-pressed=true]{background:#d0bdf6;color:#3e315c;border-color:#6547d9;box-shadow:0 0 0 2px #6547d944}

/* The publication has no surrounding frame. */
.flip-display[data-book-theme] .flip-stage,body[data-book-theme] .book{border:0;border-radius:0;box-shadow:none;background:transparent}
