.cs-page,.cs-library,.cs-dialog{--cs-ink:#253b32;--cs-muted:#748077;--cs-line:#e2e7df;--cs-bg:#f7f8f3;--cs-green:#476a4e;color:var(--cs-ink);font-family:inherit;font-size:14px;line-height:1.65}
.cs-page{width:min(100%,1560px);margin:0 auto;min-width:0;display:flex;flex-direction:column;gap:24px}.cs-page.hidden{display:none!important}
.cs-page *,.cs-library *,.cs-dialog *{box-sizing:border-box}.cs-page [hidden],.cs-dialog [hidden]{display:none!important}
.cs-page h1,.cs-page h2,.cs-page h3,.cs-library h2,.cs-library h3,.cs-dialog h2{margin:0;font-weight:650;line-height:1.4;color:var(--cs-ink)}
.cs-page h1{font-size:30px;letter-spacing:-.8px}.cs-page h2,.cs-library h2{font-size:17px}.cs-page h3,.cs-library h3{font-size:15px}.cs-page small,.cs-library small,.cs-dialog small{font-size:12px;color:var(--cs-muted)}
.cs-page p,.cs-library p{margin:6px 0 0;color:var(--cs-muted)}.cs-page-heading{display:flex;align-items:center;justify-content:space-between;gap:18px}.cs-eyebrow{font-size:10px!important;font-weight:600;letter-spacing:2px}.cs-page h1 span{font-size:11px;letter-spacing:0;background:#eeeadd;color:#8b7858;border:1px solid #e5dfd0;border-radius:5px;padding:2px 7px;vertical-align:middle;margin-left:8px}.cs-page-heading h1{margin:7px 0}
.cs-page button:where(:not(.vben-select-trigger):not(.vben-select-option)),.cs-library button,.cs-dialog button:where(:not(.vben-select-trigger):not(.vben-select-option)),.cs-file-button{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:7px 13px;border:1px solid var(--cs-line);background:#fff;border-radius:8px;color:var(--cs-ink);font:inherit;font-size:12px;font-weight:550;cursor:pointer;transition:background .15s,border-color .15s;white-space:normal}
.cs-page button:where(:not(.vben-select-trigger):not(.vben-select-option)):hover:not(:disabled),.cs-library button:hover,.cs-dialog button:where(:not(.vben-select-trigger):not(.vben-select-option)):hover:not(:disabled){background:#eff4eb;border-color:#c3d1bd}.cs-page button:not(.vben-select-trigger):disabled,.cs-dialog button:not(.vben-select-trigger):disabled{cursor:not-allowed;opacity:.45}.cs-primary{background:var(--cs-green)!important;color:#fff!important;border-color:var(--cs-green)!important}.cs-page :focus-visible,.cs-library :focus-visible,.cs-dialog :focus-visible{outline:3px solid #aebf99;outline-offset:3px}
.cs-steps{display:flex;align-items:center;gap:14px;padding:0 0 20px;border-bottom:1px solid var(--cs-line);font-size:12px}.cs-steps span{white-space:nowrap}.cs-steps b{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:50%;background:#e8eee0;color:var(--cs-green);margin-right:6px}.cs-steps span:first-child b{background:var(--cs-green);color:white}.cs-steps i{width:40px;height:1px;background:var(--cs-line)}.cs-steps small{margin-left:auto}
.cs-workspace{display:grid;grid-template-columns:minmax(330px,.85fr) minmax(420px,1.15fr);gap:24px;align-items:stretch}.cs-card{border:1px solid var(--cs-line);background:white;border-radius:15px;min-width:0;overflow:visible;display:flex;flex-direction:column}.cs-card>header{min-height:64px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--cs-line);padding:14px 22px;flex-shrink:0}.cs-card-content{padding:24px;min-width:0;display:flex;flex-direction:column;gap:14px;flex:1}
.cs-page input:not([type=checkbox]):not([type=file]),.cs-page select,.cs-page textarea,.cs-dialog input:not([type=checkbox]),.cs-dialog select,.cs-dialog textarea{display:block;width:100%;min-width:0;padding:11px 12px;border:1px solid var(--cs-line);border-radius:8px;background:#fcfcfa;color:var(--cs-ink);font:inherit;line-height:1.6;outline-offset:2px}.cs-page textarea,.cs-dialog textarea{resize:vertical}.cs-page textarea::placeholder{color:#98a199}.cs-page label,.cs-dialog label{font-weight:550;font-size:13px}.cs-page label small{font-weight:400;margin-left:6px}.cs-template-choice{display:grid;gap:8px;background:#f8faf7;border:1px solid #e2e7df;border-radius:10px;padding:16px}.cs-template-choice label{font-size:13px;color:var(--cs-ink)}.cs-template-choice select:not(.vben-select-native){font-weight:600;background:#fff}.cs-field-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0}.cs-field-head>button,.cs-examples>button{border:0;padding:3px 5px;min-height:28px;font-size:11px;background:transparent;color:var(--cs-green)}.cs-field-head label span{color:#ad6052}.cs-input-hint{display:flex;justify-content:space-between;gap:12px;margin-top:-7px}.cs-input-hint small:last-child{white-space:nowrap}.cs-examples{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:-6px}.cs-examples button{border:1px solid #e5e9dc;border-radius:5px;background:#f5f7ef;min-height:24px;padding:2px 7px}
.cs-form-grid{display:grid;grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:14px}.cs-form-grid label{display:block;margin-bottom:7px}.cs-upload{display:flex;align-items:center;gap:12px;padding:15px;border:1px dashed #cbd7c4;border-radius:9px;background:#fafbf6;flex-wrap:wrap}.cs-upload>div{flex:1;min-width:110px;overflow-wrap:anywhere}.cs-upload strong{display:block;font-size:13px}.cs-upload small{display:block;font-size:10px}.cs-file-button{position:relative;overflow:hidden;flex:none}.cs-file-button input{position:absolute;inset:0;opacity:0;width:100%;cursor:pointer}.cs-file-button:focus-within{outline:3px solid #aebf99;outline-offset:3px}.cs-upload img{width:52px;height:52px;object-fit:cover;border-radius:7px}.cs-note{line-height:1.8;font-size:11px!important;display:block}.cs-tags{display:flex;gap:7px;flex-wrap:wrap}.cs-tags span{font-size:11px;padding:3px 8px;border-radius:5px;color:#607456;background:#f0f4e9}.cs-checkbox{display:flex;align-items:center;gap:9px}.cs-page input[type=checkbox],.cs-dialog input[type=checkbox]{accent-color:var(--cs-green);width:16px;height:16px;flex:none}.cs-submit{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:auto}.cs-submit button{min-height:43px}.cs-message:empty,#csLibraryMessage:empty{display:none}.cs-page .cs-message{font-size:12px;color:var(--cs-green);overflow-wrap:anywhere}.cs-page .cs-error,#csEditError{color:#a74134}
.cs-tabs{display:flex;align-self:stretch;gap:16px}.cs-tabs button{padding:4px 0;border:0;border-radius:0;background:transparent;border-bottom:2px solid transparent;color:var(--cs-muted)}.cs-tabs button[aria-selected=true]{border-bottom-color:var(--cs-green);color:var(--cs-green)}.cs-output>header{padding-bottom:0;padding-top:0}.cs-output>header>button{margin:12px 0}
/* 主操作仅作用于转交按钮，避免影响结果页签和公共下拉。 */
.cs-page button.cs-send{min-width:120px;height:36px;padding:0 12px;gap:8px;flex:0 0 auto;margin-left:auto;white-space:nowrap;line-height:1;background:var(--cs-green);border-color:var(--cs-green);color:#fff;box-shadow:0 1px 2px #253b3214}
.cs-page button.cs-send:hover:not(:disabled){background:#3b5b42;border-color:#3b5b42}
#characterSheetPage .cs-send:disabled{background:#eef1ec;border-color:#e0e6dc;color:#849080;opacity:1;box-shadow:none}
.cs-send svg{width:14px;height:14px;flex:none;pointer-events:none}.cs-reference{width:100%;padding:0!important;overflow:hidden;border-radius:10px!important;display:block!important}.cs-reference img{width:100%;display:block;aspect-ratio:2.02;object-fit:cover}.cs-structure{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cs-structure>div{padding:14px;background:#fafbf6;border:1px solid #ecede3;border-radius:9px}.cs-structure strong,.cs-structure small{display:block}.cs-structure strong{font-size:13px}.cs-structure small{font-size:11px;margin-top:4px}.cs-explainer{background:#f4f6ef;border:1px solid #e7eada;border-radius:9px;padding:16px;margin-top:auto}.cs-explainer strong{font-size:13px}.cs-explainer p{font-size:12px}.cs-prompt-panel{min-height:560px}.cs-prompt-panel textarea{flex:1;min-height:400px;height:0;line-height:1.95;font-size:13px;resize:none;overflow-y:auto;scrollbar-width:thin;background:#fcfdf9}.cs-actions{display:flex;gap:8px;flex-wrap:wrap}.cs-actions:has(>button[hidden]:only-child){display:none}
.cs-table-wrap{overflow-x:auto;border-radius:0 0 15px 15px}.cs-recent table{width:100%;border-collapse:collapse;table-layout:fixed;min-width:760px;margin:0}.cs-recent th,.cs-recent td{padding:14px 22px;border-bottom:1px solid #edf0e9;text-align:left;vertical-align:middle;overflow-wrap:anywhere}.cs-recent th{font-size:11px;color:var(--cs-muted);font-weight:500;background:#fafbf7}.cs-recent td{font-size:12px}.cs-recent th:nth-child(1){width:auto}.cs-recent th:nth-child(2){width:170px}.cs-recent th:nth-child(3){width:188px}.cs-recent td:nth-child(3){white-space:nowrap}.cs-recent td:last-child,.cs-recent th:last-child{width:212px;text-align:center}.cs-recent button[data-cs-restore]{min-width:84px;height:36px;white-space:nowrap;flex-shrink:0}.cs-recent tbody tr:last-child td{border-bottom:0}.cs-empty-cell{text-align:center!important;color:var(--cs-muted)}.cs-recent .cs-desc{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;text-overflow:ellipsis;overflow-wrap:anywhere;word-break:break-all}
.cs-library{padding:24px;border-bottom:1px solid var(--cs-line);scroll-margin-top:24px}.cs-library .cs-field-head{margin-bottom:20px}.cs-template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}.cs-template-card{padding:22px;border:1px solid var(--cs-line);border-radius:12px;background:#fbfcf8;display:flex;flex-direction:column;gap:10px}.cs-template-card p{font-size:12px;overflow-wrap:anywhere;flex:1}.cs-template-card .cs-actions{margin-top:8px}.cs-card-badge{color:#778362;font-size:10px;letter-spacing:.6px}
.cs-dialog{position:fixed;inset:0;margin:auto;width:min(620px,calc(100vw - 32px));max-height:calc(100dvh - 32px);padding:0;border:1px solid #d9e1d2;border-radius:16px;box-shadow:0 22px 80px #172f2b33;background:#fff;z-index:10000}.cs-dialog:not([open]){display:none}.cs-dialog::backdrop{background:#1b2d276b;backdrop-filter:blur(3px)}.cs-dialog form{display:flex;flex-direction:column;max-height:calc(100dvh - 34px)}.cs-dialog header,.cs-dialog footer{padding:20px 24px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-shrink:0}.cs-dialog header{border-bottom:1px solid var(--cs-line)}.cs-dialog h2{font-size:21px}.cs-dialog-body{overflow-y:auto;padding:20px 24px;display:grid;gap:10px;min-height:0}.cs-dialog footer{border-top:1px solid var(--cs-line);justify-content:flex-end}.cs-dialog fieldset{border:1px solid var(--cs-line);border-radius:8px;padding:12px;display:flex;flex-wrap:wrap;gap:12px}.cs-dialog fieldset label{display:flex;align-items:center;gap:6px}.cs-dialog legend{font-size:12px;padding:0 6px}
@media(min-width:1600px){.cs-card-content{padding:28px}.cs-prompt-panel{min-height:620px}.cs-prompt-panel textarea{min-height:460px}}
@media(max-width:1100px){.cs-workspace{grid-template-columns:minmax(0,1fr);gap:20px}.cs-steps small{display:none}.cs-template-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cs-prompt-panel{min-height:560px}}
@media(max-width:600px){.cs-page{gap:18px}.cs-page h1{font-size:25px}.cs-page-heading{align-items:flex-start}.cs-page-heading p{font-size:12px}.cs-page-heading>button{flex:none}.cs-steps{gap:6px;flex-wrap:wrap;font-size:10px;padding-bottom:14px}.cs-steps i{width:12px}.cs-steps b{width:20px;height:20px;margin-right:3px}.cs-card>header{padding-left:16px;padding-right:16px}.cs-card-content{padding:18px;gap:13px}.cs-card>header h2{font-size:15px}.cs-card>header small{font-size:10px}.cs-input-hint{align-items:flex-start}.cs-form-grid{grid-template-columns:minmax(0,1fr);gap:14px}.cs-submit{grid-template-columns:1fr}.cs-prompt-panel textarea{min-height:500px}.cs-template-grid{grid-template-columns:1fr}.cs-library{padding:18px}.cs-dialog header,.cs-dialog footer,.cs-dialog-body{padding:16px}.cs-structure{gap:8px}.cs-structure>div{padding:10px}.cs-tabs{gap:13px}.cs-upload{gap:8px}.cs-file-button{padding:6px 9px}.cs-card{border-radius:12px}}
@media(max-width:400px){.cs-page{gap:14px}.cs-page h1{font-size:22px}.cs-card>header{padding-left:14px;padding-right:14px;min-height:56px}.cs-card-content{padding:14px;gap:12px}.cs-steps{font-size:9px;gap:4px;padding-bottom:12px}.cs-steps span{white-space:normal}.cs-prompt-panel textarea{min-height:420px}.cs-dialog{border-radius:12px;width:calc(100vw - 20px)}.cs-dialog header,.cs-dialog footer,.cs-dialog-body{padding:14px}.cs-recent th,.cs-recent td{padding:10px 12px}.cs-recent .cs-desc{-webkit-line-clamp:2}.cs-upload{padding:12px}.cs-upload img{width:44px;height:44px}.cs-explainer{padding:12px}.cs-structure>div{padding:8px}}
@media(prefers-reduced-motion:reduce){.cs-page *,.cs-library *,.cs-dialog *{transition:none!important;scroll-behavior:auto!important}}

.studio-tools .cs-home-entry{grid-column:1/-1;background:#f0f5ed;border-color:#dce6d5;display:flex;text-align:left}.cs-home-entry .studio-tool-copy{flex:1;min-width:0}.cs-home-entry .studio-tool-copy strong>small{display:inline-block;font-size:10px;margin-left:8px;padding:2px 6px;border-radius:4px;background:#e3ebd9}.cs-home-entry>span:last-child{font-size:12px;color:#476a4e;flex-shrink:0}@media(max-width:600px){.cs-home-entry>span:last-child{display:none}}

/* 复用公共下拉，不让人物页的普通按钮规则覆盖触发器和选项。 */
#characterSheetPage .vben-select-trigger,.cs-dialog .vben-select-trigger{min-height:44px;padding:10px 36px 10px 12px;font-size:14px;text-align:left;justify-content:flex-start;line-height:1.5;white-space:normal;overflow-wrap:anywhere}
.cs-template-choice .vben-select-panel,.cs-form-grid>div{min-width:0}
.cs-form-grid input:not([type=checkbox]){height:44px;background:#fff}
.cs-submit{gap:12px;padding-top:6px}
.cs-submit button{min-height:44px;line-height:1.5}
.cs-output>header{flex-wrap:wrap;row-gap:0}
.cs-tabs{min-height:64px;align-items:stretch}
.cs-prompt-panel .cs-field-head{min-height:32px}
.cs-prompt-panel .cs-note{margin-top:0}
.cs-input-hint small{line-height:1.6}
.cs-upload:focus-within{border-color:#879e7d;background:#f4f8f1}
@media(max-width:600px){.cs-output>header{gap:8px}.cs-tabs{gap:14px}.cs-tabs button{font-size:12px}.cs-output>header>button{padding:7px 10px}.cs-input-hint{gap:8px}}

.cs-dialog-body{grid-auto-rows:max-content}
.cs-dialog input:not([type=checkbox]){min-height:44px}
.cs-dialog textarea{min-height:88px;height:96px;max-height:240px;line-height:1.6;resize:vertical}

.cs-recent-actions{display:flex;align-items:center;justify-content:center;gap:10px;white-space:nowrap}
.cs-recent-actions button{height:36px;flex-shrink:0;white-space:nowrap!important}
.cs-page button.danger,.cs-library button.danger{color:var(--ni-danger,#b42318);border-color:#f0d5ce;background:#fff7f5}
.cs-page button.danger:hover:not(:disabled),.cs-library button.danger:hover:not(:disabled){color:#923e35;border-color:#ddb0a4;background:#fbe5de}
