/* Creator popovers and the notice toast. Parchment and brass, as in the "Your characters" switcher.
   Components live in creator-popover-v1.js. */
.cpop-layer{position:fixed;inset:0;z-index:150}
.cpop-backdrop{position:absolute;inset:0;background:#140d0866}
.cpop-nodim .cpop-backdrop{background:transparent}
.cpop{position:fixed;display:flex;flex-direction:column;max-height:calc(100vh - 32px);max-height:calc(100dvh - 32px);color:var(--ink,#292116);background:#f4ebd6;border:1px solid var(--brass,#aa8650);border-radius:5px;box-shadow:0 0 0 2px #2a1c0f33,0 14px 34px #000a;font:16px/1.42 Georgia,'Times New Roman',serif}
.cpop:focus{outline:none}
.cpop .pop-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:12px 14px 6px}
.cpop .pop-head h3{margin:0;font-size:18px;line-height:1.25}
.cpop-close{flex:none;width:36px;height:36px;margin:-4px -6px 0 0;padding:0;font:26px/1 Georgia,serif;color:var(--muted,#6a604e);background:none;border:0;border-radius:4px;cursor:pointer;box-shadow:none}
.cpop-close:hover{background:#e9dcc0;color:var(--ink,#292116)}
.cpop-body{overflow:auto;overscroll-behavior:contain;padding:2px 14px 10px;min-height:0}
.cpop-intro{margin:0 0 10px;color:#534a3b;font-size:15px}
.cpop .pop-foot{display:flex;flex-wrap:wrap;gap:8px;justify-content:flex-end;align-items:center;padding:10px 14px;border-top:1px solid #bba681}
.cpop .pop-foot button{min-height:40px}
.cpop button:focus-visible,.cpop a:focus-visible,.cpop input:focus-visible,.cpop [tabindex]:focus-visible{outline:3px solid #155fae;outline-offset:2px}
.cpop-in{animation:cpop-in .14s ease-out}
@keyframes cpop-in{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
body.cpop-open{overscroll-behavior:none}
@media(max-width:920px){
 .cpop{left:8px;right:8px;top:auto;bottom:8px;width:auto;max-width:600px;margin-inline:auto;max-height:86vh;max-height:86dvh;border-radius:8px 8px 5px 5px}
 .cpop .pop-foot{flex-wrap:nowrap}
 .cpop .pop-foot button{flex:1 1 0;min-height:46px;padding-inline:8px}
 .cpop-close{width:44px;height:44px}
 .cpop-in{animation-name:cpop-sheet}
}
@keyframes cpop-sheet{from{opacity:.4;transform:translateY(28px)}to{opacity:1;transform:none}}
@media(prefers-reduced-motion:reduce){.cpop-in{animation:none}}

/* The notice: a toast inside the main panel. Placed by creator-popover-v1.js; it is a body child so no page layout rule can stretch it across the frame. */
html body #notice{position:fixed;z-index:140!important;display:flex;align-items:flex-start;gap:10px;box-sizing:border-box;max-width:calc(100vw - 16px);margin:0;padding:11px 12px 11px 16px;color:#5c1220;background:#f8e9dd;border:1px solid #b06a5e;border-left:4px solid #8a2037;border-radius:5px;box-shadow:0 0 0 2px #2a1c0f26,0 10px 26px #000a;font:15px/1.4 Georgia,'Times New Roman',serif;overflow-wrap:anywhere}
html body #notice[hidden]{display:none}
html body #notice[data-kind=info]{color:#2c3c26;background:#eef0dc;border-color:#9aaa7c;border-left-color:#45603b}
#notice .notice-close{flex:none;order:2;margin:-5px -6px -5px auto;width:34px;height:34px;padding:0;color:inherit;background:none;border:0;border-radius:4px;box-shadow:none;cursor:pointer}
#notice .notice-close::before{content:'\00d7';font:24px/1 Georgia,serif}
#notice .notice-close:hover{background:#0000001a}
@media(max-width:640px){html body #notice{font-size:14px}#notice .notice-close{width:44px;height:44px;margin:-9px -8px -9px auto}}

/* "Some choices on this step aren't made yet" and the control it points at. */
.step-warning-list{margin:0;padding:0 0 0 20px;font-size:15px}
.step-warning-list li{margin:3px 0}
.step-warning .pop-head h3{color:#5c1220}
.choice-attention{border-radius:4px;outline:3px solid #b9893a;outline-offset:4px;box-shadow:0 0 0 7px #e2c07a66;animation:choice-attention 1.1s ease-in-out 3;scroll-margin-top:170px}
.choice-attention.required-choice-panel{outline-offset:2px}
@keyframes choice-attention{50%{box-shadow:0 0 0 11px #e2c07a22}}
@media(prefers-reduced-motion:reduce){.choice-attention{animation:none}}

/* Sheet theme preview: a mini summary and sheet drawn with the theme's own colours (the same variables as body[data-theme] in style.css). */
.theme-preview{--tp-wine:#72152b;--tp-wine-d:#4e0d1b;--tp-paper:#eee4ce;--tp-ink:#292116;--tp-line:#bba681;--tp-top:#241a11;--tp-brass:#aa8650;
 border:2px solid var(--tp-brass);border-radius:5px;overflow:hidden;background:var(--tp-paper);color:var(--tp-ink);font:13px/1.35 Georgia,serif;box-shadow:0 3px 10px #0004;text-align:left}
.theme-preview[data-theme-preview=moss-stone]{--tp-wine:#40583a;--tp-wine-d:#283b24;--tp-paper:#e3e3cf;--tp-top:#1e271c}
.theme-preview[data-theme-preview=crimson-study]{--tp-wine:#791e28;--tp-wine-d:#4e0d1b;--tp-paper:#e7d8cc;--tp-top:#2b1613}
.theme-preview[data-theme-preview=moonlit-slate]{--tp-wine:#304b5a;--tp-wine-d:#223540;--tp-paper:#e1e1d8;--tp-top:#182229}
.theme-preview .tp-bar{display:flex;justify-content:space-between;gap:8px;padding:6px 10px;color:#f1e1bd;background:var(--tp-top);border-bottom:2px solid var(--tp-brass);font-size:12px;letter-spacing:.06em}
.theme-preview .tp-name{color:#fff4dc}
.theme-preview .tp-body{display:grid;grid-template-columns:76px minmax(0,1fr)}
.theme-preview .tp-side{display:grid;align-content:start;gap:4px;padding:8px 6px;border-right:1px solid var(--tp-line);background:#0000000a}
.theme-preview .tp-tab{padding:5px 6px;border:1px solid transparent;border-radius:3px;font-size:12px}
.theme-preview .tp-tab.on{color:#fff5de;background:linear-gradient(120deg,var(--tp-wine),var(--tp-wine-d))}
.theme-preview .tp-main{padding:10px 12px;min-width:0}
.theme-preview .tp-head b{display:block;color:var(--tp-wine);font-size:17px;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.theme-preview .tp-head small{display:block;color:#5d5444;font-size:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.theme-preview .tp-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin:9px 0}
.theme-preview .tp-stats span{padding:5px 4px;text-align:center;border:1px solid var(--tp-line);border-radius:4px;background:#ffffff40}
.theme-preview .tp-stats b{display:block;color:var(--tp-wine);font-size:18px;line-height:1.1}
.theme-preview .tp-stats small{font-size:11px;color:#5d5444}
.theme-preview .tp-actions{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.theme-preview .tp-chip{padding:2px 8px;border:1px solid var(--tp-line);border-radius:10px;background:#ffffff55;font-size:12px}
.theme-preview .tp-chip.alt{color:var(--tp-wine);border-color:var(--tp-wine)}
.theme-preview .tp-btn{margin-left:auto;padding:3px 12px;color:#fff6e3;background:linear-gradient(var(--tp-wine),var(--tp-wine-d));border:1px solid var(--tp-brass);border-radius:4px;font-size:12px}
.theme-popover .hint{margin:8px 0 2px}
.theme-peek{position:fixed;z-index:120;width:min(340px,calc(100vw - 16px));pointer-events:none;filter:drop-shadow(0 8px 16px #000a)}
.theme-peek[hidden]{display:none}
@media(max-width:480px){.theme-preview .tp-body{grid-template-columns:62px minmax(0,1fr)}.theme-preview .tp-main{padding:8px}}
