#storySheetsEntry{margin:0 0 26px;padding:20px;border:1px solid #826434;border-radius:14px;background:#0b1c13}
#storySheetsEntry[hidden]{display:none!important}
#storySheetsEntry>p{font:700 11px Arial,sans-serif;letter-spacing:.18em;color:#bba570;margin:0 0 12px}
#storySheetsEntry>button{width:100%;background:#10281c;color:#efd18d;text-align:left;border:1px solid #94733a;padding:17px;font:700 21px Georgia,serif;border-radius:10px}
#storySheetsEntry>button span{display:block;margin-top:7px;font:14px Arial,sans-serif;color:#b9aa8b}
#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog{padding:0;border:1px solid #af8844;border-radius:16px;background:#0c1b14;color:#eee4ce;box-shadow:0 20px 90px #000b;font:16px/1.45 Arial,sans-serif}
#storySheetsDialog{width:min(1540px,97vw);max-width:97vw;height:94dvh;max-height:94dvh;overflow:hidden}
#storySheetPicker{width:min(860px,95vw);max-width:95vw;max-height:90dvh;overflow:auto}
#storySheetPrintDialog{width:97vw;max-width:97vw;height:94dvh;max-height:94dvh;overflow:hidden}
#storySheetsDialog::backdrop,#storySheetPicker::backdrop,#storySheetPrintDialog::backdrop{background:#000b}
:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) *{box-sizing:border-box}
:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) [hidden]{display:none!important}
:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) :is(button,input,textarea,select){font:14px/1.4 Arial,sans-serif;color:#eee4ce;border:1px solid #73613d;border-radius:7px;background:#10251a;padding:9px 11px;min-height:40px}
:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) button{cursor:pointer}
:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) button:hover{border-color:#d6af63;background:#203625}
:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) button:disabled{opacity:.45;cursor:default}
:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) :is(input,textarea,select):focus-visible,:is(#storySheetsDialog,#storySheetPicker,#storySheetPrintDialog) button:focus-visible{outline:2px solid #efd18d;outline-offset:2px}
:is(#storySheetsDialog,#storySheetPicker) label{display:block;font-size:14px;color:#d4c4a4;margin:0 0 12px;min-width:0}
:is(#storySheetsDialog,#storySheetPicker) label>:is(input,textarea,select){display:block;width:100%;margin-top:5px}
#storySheetsDialog textarea{resize:vertical;min-height:80px}
:is(#storySheetsDialog,#storySheetPicker) select{appearance:none;padding-right:30px;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='m1 1 5 5 5-5' fill='none' stroke='%23d4c4a4' stroke-width='2'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 10px center}
#storySheetsDialog .primary{background:#d6af63;color:#182219;font-weight:700;border-color:#d6af63}
#storySheetsDialog .story-danger{color:#f3afa5;border-color:#805343}
.story-library-head{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:17px 22px;border-bottom:1px solid #63502d;background:#0c1b14;min-height:88px}
.story-library-head h2{font:700 27px/1.2 Georgia,serif;color:#edc779;margin:0}
.story-library-head p{font-size:14px;color:#c4ac7d;margin:4px 0 0}
.story-library-head>div>p:first-child:not([data-print-status]){font-size:11px;letter-spacing:.12em;margin:0 0 5px}
.story-library-layout{display:grid;grid-template-columns:220px minmax(0,1fr);height:calc(100% - 88px);min-height:0}
#storySheetsDialog aside{padding:18px;border-right:1px solid #63502d;overflow:auto;min-height:0}
#storySheetsDialog aside>button{width:100%;margin-bottom:14px}
[data-story-list]{margin:18px 0}
#storySheetsDialog [data-story-list]>button{display:block;width:100%;text-align:left;margin-bottom:8px;border-color:#40553e}
[data-story-list] strong{display:block;overflow-wrap:anywhere}
[data-story-list] span{display:block;font-size:13px;color:#c4b897;margin-top:5px;line-height:1.35;overflow-wrap:anywhere}
#storySheetsDialog [data-story-list]>button.selected{background:#263b26;border-color:#d6af63}
.story-workspace{display:grid;grid-template-columns:minmax(0,1fr) minmax(310px,.95fr);gap:22px;padding:20px 22px;overflow:auto;min-width:0;align-items:start;scrollbar-gutter:stable}
#storySheetForm{min-width:0}
.story-editor-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px;flex-wrap:wrap}
.story-editor-toolbar h3,.story-live-preview h3{margin:0;font:700 19px/1.25 Georgia,serif;color:#edc779}
[data-story-dirty]{font-size:13px;color:#c0ae86}
.story-inline-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
[data-story-message]{font-size:14px;line-height:1.4;color:#efd290;margin:0 0 12px;overflow-wrap:anywhere}
[data-story-message]:empty{display:none}
.story-editor-block{margin:0 0 14px;border:1px solid #665631;border-radius:9px;min-width:0}
.story-editor-block>summary{cursor:pointer;padding:12px 14px;color:#ebcc8b;font-weight:600;font-size:15px}
.story-editor-block>summary>span{display:inline-block;margin-left:5px;color:#b7a481;font:14px Arial,sans-serif}
.story-block-content{padding:0 14px 14px;min-width:0}
.story-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px}
.story-edit-card{border:1px solid #41543e;border-radius:8px;padding:12px;margin:0 0 12px;background:#0a1710;min-width:0}
.story-row-actions{display:flex;justify-content:flex-end;gap:6px;flex-wrap:wrap;margin-top:10px}
.story-row-actions>button{font-size:13px!important;min-height:34px!important;padding:6px 9px!important}
.story-hint{font-size:14px;line-height:1.45;color:#c0b392;margin:8px 0 12px}
#storySheetsDialog .story-checkbox{display:flex;align-items:center;gap:9px;color:#eee4ce;font-size:14px;margin-bottom:10px}
#storySheetsDialog .story-checkbox>input{appearance:auto;width:18px;height:18px;min-height:0;margin:0;accent-color:#d6af63;flex:none}
.story-add-story{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:14px}
.story-add-story input{flex:1;min-width:140px}
.story-editor-footer{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:20px 0 4px;flex-wrap:wrap}
.story-live-preview{position:sticky;top:0;min-width:0;padding:14px;border:1px solid #655531;border-radius:10px;background:#08150e}
.story-live-preview>header{display:flex;justify-content:space-between;align-items:center;gap:10px;flex-wrap:wrap}
.story-live-preview iframe{display:block;width:100%;height:440px;background:#dfe3e0;border:0;border-radius:4px}
[data-story-fit],[data-print-status]{font-size:14px;line-height:1.45;color:#d8bf8c}
[data-fits="false"]{color:#ffb5a3!important}
[data-fits="true"]{color:#b5d5ab!important}
.story-table-scroll{overflow:auto;max-width:100%;margin:12px 0}
.story-editor-table{border-collapse:collapse;min-width:100%;font-size:14px}
.story-editor-table th,.story-editor-table td{border:1px solid #536044;padding:8px;min-width:155px;vertical-align:top}
.story-editor-table th:last-child,.story-editor-table td:last-child{min-width:90px}
.story-editor-table textarea{display:block;width:100%;min-width:130px}
.story-editor-table button{font-size:12px!important}
.story-picker-content{padding:20px}
[data-import-results]{display:grid;gap:10px}
#storySheetPicker [data-import-index]{text-align:left;padding:14px}
[data-import-index] strong{display:block;font:700 19px Georgia,serif;color:#edc779}
[data-import-index] span{display:block;color:#b5ad94;font-size:13px;margin:4px 0}
[data-import-index] p{white-space:pre-wrap;line-height:1.5;margin:6px 0 0;font-size:14px}
#storySheetPrintDialog>iframe{display:block;width:100%;height:calc(100% - 100px);border:0;background:#dfe3e0}
#storySheetPrintDialog .story-library-head{min-height:100px}
@media(max-width:1150px){.story-workspace{grid-template-columns:minmax(0,1fr)}.story-live-preview{position:static}.story-live-preview iframe{height:540px}}
@media(max-width:700px){#storySheetsDialog{width:98vw;max-width:98vw;height:96dvh;max-height:96dvh}.story-library-head{padding:13px 15px;gap:10px}.story-library-head h2{font-size:23px}.story-library-layout{grid-template-columns:1fr;overflow:auto;display:block}#storySheetsDialog aside{border-right:0;border-bottom:1px solid #63502d;padding:15px}#storySheetsDialog [data-story-list]{display:flex;overflow:auto;gap:8px;max-height:170px}#storySheetsDialog [data-story-list]>button{min-width:150px;max-width:190px}.story-workspace{overflow:visible;padding:15px;display:block}.story-live-preview{margin-top:22px}.story-live-preview iframe{height:320px}.story-fields{gap:0 8px}.story-block-content{padding:0 10px 12px}.story-edit-card{padding:10px}.story-library-head .story-inline-actions button{font-size:13px}#storySheetPrintDialog .story-library-head{flex-wrap:wrap}#storySheetPrintDialog>iframe{height:calc(100% - 160px)}}
