/* All styles belong to Story; shared MyBB/theme/gameplay styles are untouched. */
:is(.opstory,.opstory-dialog,.story-time-panel){--story-gold:#e2c585;--story-light:#fff0c9;--story-ink:#dbe7e8;--story-muted:#a5bec5;--story-edge:#75b8c342;--story-reading-font:Cambria,'Palatino Linotype','Book Antiqua',Georgia,serif;color:var(--story-ink);font:14px/1.6 Roboto,Arial,sans-serif}
:is(.opstory,.opstory-dialog,.story-time-panel) *{box-sizing:border-box}
.opstory{
 --story-panel-opacity-start: .80;
 --story-panel-opacity-end: .86;
 --story-panel-background: linear-gradient(125deg,
   rgba(20,46,58,var(--story-panel-opacity-start)),
   rgba(11,32,45,var(--story-panel-opacity-end)));
 max-width:1180px;margin:35px auto 70px;padding:0 16px;min-width:0;outline:none}
.opstory [hidden],.opstory-dialog [hidden],.story-time-panel[hidden]{display:none!important}
.opstory .story-heading{margin:0 0 24px}
.opstory .story-eyebrow{margin:0 0 9px;color:#93bec8;font:10px/1.5 Arial,sans-serif;letter-spacing:.19em}
.opstory .story-heading h1{margin:0;color:var(--story-gold);font:400 clamp(34px,3vw,46px)/1.2 Georgia,'Times New Roman',serif;text-shadow:0 2px 10px #03152166}
.opstory .story-prologue{position:relative;max-width:940px;margin:0 auto 36px;padding:24px 30px 20px;border-top:1px solid #d8b46c60;border-bottom:1px solid #88aeb32b;border-radius:6px;background:var(--story-panel-background);box-shadow:0 10px 30px #020e1830}
.opstory .story-prologue-mark{position:absolute;top:-13px;left:calc(50% - 15px);width:30px;text-align:center;color:var(--story-gold);font-size:18px;background:#112b37;border-radius:50%;text-shadow:0 0 12px #e2c58555}
.story-prose{color:#ece5d7;font:400 18px/1.85 Cambria,'Palatino Linotype','Book Antiqua',Georgia,serif;font-family:var(--story-reading-font,Cambria,Georgia,serif);font-kerning:normal;text-shadow:0 1px 1px #020c1640;overflow-wrap:anywhere;word-break:normal;text-align:left}
.story-prose a:link,.story-prose a:visited{color:#e2c585!important}.story-prose a:hover{color:#fff0c9!important}
.story-prose blockquote{margin:18px 0;padding:14px 20px;border-left:2px solid #d9b76e;background:#254c5c70}
.story-prose pre{max-width:100%;overflow:auto;font-size:14px}.story-prose :is(ul,ol){padding-left:26px}.story-prose p{margin:0 0 1em}
.opstory .story-prologue>.story-small{margin-top:14px}
:is(.opstory,.opstory-dialog,.story-time-panel) button{appearance:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;padding:8px 13px;margin:0;border:1px solid #75b8c355;border-radius:4px;background:linear-gradient(115deg,#2b5667,#183744)!important;color:var(--story-gold)!important;font:500 13px/1.4 Roboto,Arial,sans-serif;cursor:pointer;box-shadow:none;transition:color .18s,box-shadow .18s,border-color .18s}
:is(.opstory,.opstory-dialog,.story-time-panel) button:hover{background:linear-gradient(115deg,#466567,#23444e)!important;color:var(--story-light)!important;border-color:#d8b46c88;box-shadow:inset 0 -1px #e2c58566,0 0 12px #e2c58512}
:is(.opstory,.opstory-dialog,.story-time-panel) button:disabled{opacity:.5;cursor:wait;box-shadow:none}
:is(.opstory,.opstory-dialog,.story-time-panel) :is(button,a,input,textarea,select,summary):focus-visible{outline:2px solid #f4d498;outline-offset:4px}
.opstory summary{cursor:pointer;list-style:none}.opstory summary::-webkit-details-marker{display:none}
.opstory .story-management{padding:10px 14px;margin:0 0 30px;border:1px solid #75b8c32e;border-radius:5px;background:#15344070}
.opstory .story-management>summary{color:var(--story-gold);font:14px/1.8 Georgia,serif}.opstory .story-management>summary::before{content:'▸ ';font-size:12px}.opstory .story-management[open]>summary::before{content:'▾ '}.opstory .story-management-actions{display:flex;flex-wrap:wrap;gap:8px;padding-top:12px}
.opstory .story-small{font-size:11px;min-height:30px;padding:5px 9px;background:#173c4970!important}
.opstory .story-spacer{flex:1}
.opstory .story-chronology{position:relative;padding-left:var(--story-gutter,22px);transition:padding-left .15s}
.opstory .story-arc{position:relative;margin:0 0 34px;scroll-margin-top:90px}
.opstory .story-arc-top,.opstory .story-episode-top{display:flex;align-items:center;flex-wrap:wrap;gap:10px;min-height:30px;margin:0 0 8px}
.opstory button.story-time{padding:4px 3px;min-height:30px;border:0;border-radius:0;background:transparent!important;color:#b3d2d6!important;font:12px/1.4 Roboto,Arial,sans-serif;letter-spacing:.08em;box-shadow:none}
.opstory button.story-time>span:first-child{color:#d8b46c99;font-size:12px}.opstory button.story-time:hover{color:#fff0c9!important;background:transparent!important;box-shadow:none;text-shadow:0 0 10px #e2c58555}
.opstory .story-fold>summary{display:flex;flex-direction:column;align-items:center;padding:4px 0 15px;min-height:33px;user-select:text;pointer-events:none;cursor:default}
.opstory .story-arc-title{display:block;width:fit-content;max-width:100%;margin:0 auto 19px;padding:0 8px;text-align:center;color:var(--story-gold);font:400 clamp(23px,2vw,30px)/1.4 'Palatino Linotype','Book Antiqua',Palatino,Georgia,serif;text-shadow:0 2px 5px #071824,0 0 14px #071824aa;overflow-wrap:anywhere;pointer-events:auto;cursor:pointer;transition:color .28s ease,text-shadow .28s ease}
.opstory .story-arc-title:empty{width:96px;min-height:22px;margin-bottom:12px}
.opstory .story-rule{isolation:isolate;position:relative;display:block;width:100%;height:1px;border-radius:50%;background:linear-gradient(90deg,transparent,#8db2bc55 10%,#a7b9ac8c 36%,#a7b9ac8c 64%,#8db2bc55 90%,transparent);pointer-events:none}
.opstory .story-rule::after{content:'';position:absolute;inset:0;border-radius:inherit;background:linear-gradient(90deg,transparent,#d9bc7e80 16%,#e4c68ba6 50%,#d9bc7e80 84%,transparent);box-shadow:0 0 9px 1px #e2c58515;opacity:.12;transition:opacity .36s ease}
.opstory .story-fold[open]>summary .story-rule::after{opacity:.72}
.opstory .story-arc-title:hover{color:var(--story-light);text-shadow:0 2px 5px #071824,0 0 16px #e2c58544}
.opstory .story-fold>summary:focus-visible{outline:0}
.opstory .story-fold>summary:focus-visible .story-arc-title{outline:2px solid #f4d498;outline-offset:5px;border-radius:3px}
.opstory .story-arc-content{padding:12px 0 8px;min-height:18px}
.opstory .story-fold[open]>.story-arc-content{animation:story-content-reveal .28s ease both}
@keyframes story-content-reveal{from{opacity:.45}to{opacity:1}}
.opstory .story-arc-prose{max-width:960px;margin:0 auto 26px;padding:22px 28px;border:1px solid #8db2bc29;border-left:2px solid #bfa77366;border-radius:6px;background:var(--story-panel-background);box-shadow:0 10px 30px #020e1830}
.opstory .story-feature{max-width:960px;margin:0 auto 28px}.opstory .story-feature>.story-small{margin-top:10px}
.opstory .story-feature-add{margin:0 0 24px}
.story-cover{isolation:isolate;position:relative;display:block;aspect-ratio:5/2;width:100%;min-width:0;overflow:hidden;border:1px solid #d8b46c62;border-radius:7px;background:#102a36;box-shadow:0 8px 24px #0002;text-decoration:none!important;cursor:pointer;user-select:text;transition:border-color .2s,box-shadow .2s}
.story-cover img{position:absolute;inset:0;z-index:0;width:100%;height:100%;object-fit:cover;transition:filter .25s}
.story-cover-veil{position:absolute;inset:0;z-index:1;pointer-events:none;background:radial-gradient(ellipse at 50% 42%,transparent 20%,#071a2855 75%,#071a28c2 100%),linear-gradient(0deg,#061a28c9,transparent 56%);box-shadow:inset 0 0 45px 9px #071a285c}
.story-cover-title{position:relative;z-index:2;color:#f5dca4;font:400 clamp(23px,3.25vw,42px)/1.22 Georgia,'Times New Roman',serif;text-shadow:0 2px 4px #061923,0 0 18px #061923c4;overflow-wrap:anywhere;user-select:text;transition:color .18s}
.opstory .story-feature-cover>.story-cover-title{position:absolute;left:6%;bottom:12%;right:5%;font-size:clamp(28px,3.4vw,44px);letter-spacing:.018em}
.story-cover-caption{position:absolute;z-index:2;left:5%;right:5%;bottom:10%;display:flex;flex-direction:column;gap:9px}
.story-cover-status{color:#cad6d3;font:12px/1.5 Roboto,Arial,sans-serif;letter-spacing:.08em;text-shadow:0 1px 5px #061923}
.story-cover:hover{border-color:#e2c585b5;box-shadow:0 8px 26px #0003,0 0 20px #e2c58512}.story-cover:hover .story-cover-title{color:#fff0c9}
.story-cover-empty{position:absolute;inset:0;display:grid;place-items:center;color:#d8b46c77;font:60px Georgia,serif;background:radial-gradient(ellipse,#274958,#122c39)}
.story-status-planned img,.story-status-done img{filter:grayscale(.48)brightness(.74)}
.opstory .story-feature-body{width:100%;max-width:none;margin:0 auto;padding:24px 28px 28px;border:1px solid #75b8c32e;border-top:0;border-radius:0 0 5px 5px;background:var(--story-panel-background);box-shadow:0 10px 28px #0001}
.opstory .story-feature-fold[open]>.story-cover{border-bottom-left-radius:0;border-bottom-right-radius:0}
.opstory .story-episodes-heading{max-width:820px;margin:0 auto;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap;padding:12px 0 16px;border-top:1px solid #88aeb32e}
.opstory .story-episodes-heading h3{margin:0;font:400 23px/1.4 Georgia,serif;color:var(--story-gold)}
.opstory .story-episodes-heading button{font-size:12px}
.opstory .story-episodes{max-width:820px;margin:0 auto 8px;min-height:10px}
.opstory .story-episode-cover .story-cover-title{font-size:clamp(21px,2.6vw,32px)}
.opstory .story-episodes:empty{padding:0}
.opstory .story-episode{max-width:780px;margin:0 auto 26px;scroll-margin-top:90px}
.opstory .story-episode-summary>summary{padding:11px 0;text-align:center;border:1px solid #d8b46c35;border-top:0;border-radius:0 0 4px 4px;background:#15344070;line-height:1}
.opstory .story-episode-summary>summary:hover{background:#d8b46c16}
.opstory .story-summary-arrow{display:inline-block;width:9px;height:9px;border-right:1px solid #e2c585;border-bottom:1px solid #e2c585;transform:rotate(45deg);transition:transform .18s}
.opstory .story-episode-summary[open] .story-summary-arrow{transform:rotate(225deg)}
.opstory .story-timeline{position:absolute;inset:0 auto 0 0;z-index:0;overflow:visible;pointer-events:none;color:#8fc2c1;opacity:.8}
.opstory .story-timeline path{fill:none;stroke:currentColor;stroke-width:1;vector-effect:non-scaling-stroke}.opstory .story-timeline rect{fill:currentColor;stroke:#153440;stroke-width:1}.opstory .story-episodes>.story-timeline{color:#d4b77c;opacity:.7}
.story-time-panel{position:fixed;z-index:10040;right:62px;top:88px;width:280px;max-height:calc(100dvh - 112px);overflow:auto;border:1px solid #d8b46c88;border-radius:6px;background:linear-gradient(135deg,#254b59f7,#102632fc);box-shadow:0 16px 50px #0006;scrollbar-width:thin;scrollbar-color:#baa978 #153441}
.story-time-panel header{position:sticky;top:0;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-bottom:1px solid #75b8c342;background:#1b3b49}
.story-time-panel h2{margin:0;font:400 22px/1.3 Georgia,serif;color:#e2c585;overflow-wrap:anywhere}
.story-time-panel button.story-close{min-height:32px;min-width:32px;padding:2px;font-size:24px;background:#102a36!important;border-color:#06192399;box-shadow:0 0 0 1px #d8b46c22}
.story-time-panel .story-time-body{padding:16px;min-height:70px}.story-time-panel .story-prose{font-size:15px;line-height:1.8}.story-time-panel footer{padding:0 14px 14px}
.story-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.story-toast{position:fixed;z-index:10080;left:50%;bottom:24px;transform:translateX(-50%);max-width:calc(100vw - 32px);padding:12px 20px;border:1px solid #d8b46c77;border-radius:5px;background:#163541f5;color:#e2c585;font:14px/1.5 Roboto,Arial,sans-serif;box-shadow:0 8px 30px #0005}.story-toast[hidden]{display:none!important}
.opstory-dialog{box-sizing:border-box;width:min(960px,calc(100vw - 24px));max-height:calc(100dvh - 24px);margin:auto;padding:0;border:1px solid #c5b37599;border-radius:7px;background:linear-gradient(135deg,#254b59,#102632 80%);box-shadow:0 20px 70px #0008;overflow:auto;color-scheme:dark;scrollbar-width:thin;scrollbar-color:#baa978 #153441}
.opstory-dialog::backdrop{background:#061923cc;backdrop-filter:blur(4px)}
.opstory-dialog .opstory-dialog-head{position:sticky;top:0;z-index:10;display:flex;align-items:center;justify-content:space-between;gap:15px;padding:14px 20px;border-bottom:1px solid #75b8c342;background:linear-gradient(110deg,#2c5563,#173541)}
.opstory-dialog .opstory-dialog-head h2{font:400 25px/1.3 Georgia,serif;color:#e2c585;margin:0}
.opstory-dialog .opstory-dialog-close{font-size:24px;line-height:1;min-width:38px;padding:5px;background:#102a36!important}
.opstory-dialog .opstory-dialog-body{padding:20px}
.opstory-dialog .opstory-field{display:flex;flex-direction:column;gap:5px;margin:0 0 14px;color:#c5d9dc;font:13px/1.5 Arial,sans-serif;min-width:0}
.opstory-dialog :is(input,select,textarea){min-height:38px;max-width:100%;padding:8px 10px;border:1px solid #75b8c34a;border-radius:4px;background:#102a36;color:#dbe7e8;font:14px/1.5 Roboto,Arial,sans-serif;box-shadow:none;color-scheme:dark;accent-color:#e2c585}
.opstory-dialog .opstory-field input{width:100%}.opstory-dialog input[type=checkbox]{width:auto;min-height:16px}.opstory-dialog input[type=range]{padding:0}
.opstory-dialog textarea{width:100%;min-height:300px;resize:vertical;font:17px/1.8 Georgia,serif}
.opstory-dialog .story-field-grid{display:grid;grid-template-columns:1fr 1fr;gap:0 16px}
.opstory-dialog .story-check{display:flex;align-items:center;gap:9px;margin:0 0 15px}
.opstory-dialog .story-muted{color:#a5bec5;font:12px/1.6 Roboto,Arial,sans-serif;margin:0 0 14px}
.opstory-dialog .story-design{padding:16px 0;border-top:1px solid #75b8c32e;border-bottom:1px solid #75b8c32e;margin:6px 0 20px}
.opstory-dialog .story-cover-preview{max-width:680px;margin:12px 0 16px;cursor:default}
.opstory-dialog .story-cover-preview .story-cover-title{font-size:clamp(22px,3vw,32px)}
.opstory-dialog .story-cover-preview .story-cover-caption{gap:6px}
.opstory-dialog .story-form-actions,.opstory-dialog .story-draft-actions{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin-top:16px}
.opstory-dialog .story-draft-actions button{font-size:11px;min-height:30px;padding:5px 9px}
.opstory-dialog .story-delete{margin-left:auto;border-color:#c59d6a77}
.opstory-error{color:#ffd5ba!important;white-space:pre-wrap;overflow-wrap:anywhere}.opstory-dialog>.opstory-error{margin:0 20px 20px;padding:12px;border:1px solid #cda27866;border-radius:4px}.opstory-error[hidden]{display:none!important}
@media(max-width:620px){
 .opstory{margin:22px auto 45px;padding:0 2px}.opstory .story-heading{margin-bottom:24px}.opstory .story-prologue{padding:20px 10px 16px;margin-bottom:26px}.story-prose{font-size:17px;line-height:1.8}
 .opstory .story-arc-title{font-size:21px;margin-bottom:16px}.opstory .story-arc-top,.opstory .story-episode-top{gap:6px}.opstory .story-small{font-size:10px;min-height:30px;padding:5px 6px}.opstory .story-arc-prose{padding:18px 15px}.opstory .story-arc{margin-bottom:26px}
 .opstory .story-feature-body{padding:18px 15px}.opstory .story-episodes{max-width:calc(100% - 14px)}.opstory .story-episodes-heading{max-width:calc(100% - 14px)}.opstory .story-episode-cover .story-cover-title{font-size:clamp(18px,5vw,24px)}.opstory .story-episodes-heading h3{font-size:20px}.opstory .story-episodes-heading{gap:8px}.opstory .story-episodes-heading button{font-size:11px}.story-cover-title{font-size:clamp(19px,5vw,28px)}.opstory .story-feature-cover>.story-cover-title{font-size:clamp(25px,7vw,34px)}.story-cover-status{font-size:10px;letter-spacing:.04em}.story-cover-caption{gap:4px;left:6%;right:6%}
 .story-time-panel{top:auto;bottom:16px;right:16px;width:calc(100vw - 32px);max-height:65dvh}.story-time-panel .story-prose{font-size:16px}
 .opstory-dialog .opstory-dialog-head,.opstory-dialog .opstory-dialog-body{padding:12px}.opstory-dialog .opstory-dialog-head h2{font-size:22px}.opstory-dialog .story-field-grid{grid-template-columns:1fr}.opstory-dialog .story-delete{margin-left:0}.opstory-dialog .story-cover-preview{min-height:140px}.opstory-dialog .story-form-actions{gap:7px}
}
@media(prefers-reduced-motion:reduce){.opstory *,.opstory-dialog *,.story-time-panel *{transition:none!important;animation:none!important;scroll-behavior:auto!important}.opstory .story-rule::after{transition:none!important}}


.opstory-dialog .opstory-editor{--opstory-editor-height:360px;border:1px solid #75b8c342;border-radius:4px;overflow:visible;min-width:0;background:#102a36}
.opstory-dialog .opstory-editor-tools{display:flex;flex-wrap:wrap;align-items:center;gap:6px;padding:7px;background:linear-gradient(105deg,#254b5b,#163340)}
.opstory-dialog .opstory-editor-tools button{font-size:11px;min-height:30px;padding:5px 8px}
.opstory-dialog .opstory-editor-tools label{display:flex;align-items:center;gap:8px;margin:0;color:var(--story-muted);font:11px Arial,sans-serif}
.opstory-dialog .opstory-editor-tools input{width:90px;padding:0;min-height:24px}
.opstory-dialog .opstory-editor-foot{display:flex;justify-content:space-between;gap:12px;padding:8px 10px;color:var(--story-muted);font:11px/1.5 Arial,sans-serif;border-top:1px solid #75b8c326}
.opstory-dialog .opstory-editor .sceditor-container{display:flex!important;flex-direction:column!important;box-sizing:border-box!important;width:100%!important;height:var(--opstory-editor-height)!important;min-height:240px!important;margin:0!important;padding:0!important;border:0!important;border-radius:0!important;background:#102a36!important;box-shadow:none!important;overflow:visible!important}
.opstory-dialog .opstory-editor .sceditor-container iframe,.opstory-dialog .opstory-editor .sceditor-container textarea{flex:1 1 0%!important;box-sizing:border-box!important;min-height:0!important;height:0!important;max-height:none!important;width:100%!important;margin:0!important;border:0!important;padding:0!important;background:#102a36!important}
.opstory-dialog .opstory-editor .sceditor-container textarea{padding:18px!important;resize:none!important;font:17px/1.8 Georgia,serif!important;color:#dbe7e8!important;scrollbar-color:#c2ad7c #173441;scrollbar-width:thin}
.opstory-dialog .sceditor-toolbar{flex:0 0 auto!important;display:flex!important;flex-wrap:wrap!important;gap:2px!important;margin:0!important;padding:6px!important;background:linear-gradient(105deg,#254b5b,#163340)!important;border:0!important;border-bottom:1px solid #75b8c342!important;box-shadow:none!important}
.opstory-dialog .sceditor-group{display:flex!important;align-items:center!important;margin:0 3px 0 0!important;padding:0 4px 0 0!important;background:none!important;border:0!important;border-right:1px solid #8ab3bc33!important;box-shadow:none!important}
.opstory-dialog .sceditor-button{display:inline-flex!important;align-items:center!important;justify-content:center!important;width:30px!important;height:30px!important;min-width:30px!important;margin:0!important;padding:3px!important;border:0!important;background:transparent!important;color:#e2c585!important;text-indent:0!important;box-shadow:none!important;font:14px Arial,sans-serif!important;opacity:1!important}
.opstory-dialog .sceditor-button div{display:block!important;text-indent:0!important;background:none!important;color:inherit!important;font:inherit!important;width:auto!important;height:auto!important;overflow:visible!important;line-height:1!important}
.opstory-dialog .sceditor-button:hover,.opstory-dialog .sceditor-button.active{background:#d8b46c24!important;color:#fff0c9!important;box-shadow:inset 0 -1px #d8b46c!important}
.opstory-dialog .opstory-tools-hidden .sceditor-toolbar{display:none!important}
.opstory-dialog .opstory-editor-expanded{--opstory-editor-height:620px!important}
.opstory-dialog .sceditor-dropdown{background:#163541!important;border:1px solid #d9b76e88!important;color:#dbe7e8!important;border-radius:4px;z-index:100}
.opstory-dialog .sceditor-dropdown a,.opstory-dialog .sceditor-dropdown label{color:#e2c585!important}
.opstory-dialog .sceditor-dropdown a:hover{background:#e2c58522!important;color:#fff0c9!important}
.opstory-dialog .opstory-size-options{display:flex;flex-wrap:wrap;gap:4px;max-width:260px;padding:5px}
@media(max-width:620px){.opstory-dialog .opstory-editor-expanded{--opstory-editor-height:460px!important}.opstory-dialog .opstory-editor-foot{flex-wrap:wrap;font-size:10px}}
