:root{--ink:#171717;--muted:#85837d;--paper:#fff;--bg:#f7f7f7;--accent:#eef431}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--ink);font-family:"PingFang SC","PingFang TC",-apple-system,BlinkMacSystemFont,"Segoe UI","Microsoft YaHei",sans-serif}button,input,select,textarea{font:inherit}button{border:0;cursor:pointer}a{color:inherit;text-decoration:none}button,a,input,select,textarea{outline-offset:4px}button:disabled{cursor:wait;opacity:.6}[hidden]{display:none!important}.header{height:80px;padding:0 clamp(20px,5vw,84px);display:flex;align-items:center;justify-content:space-between;gap:20px}.brand{display:flex;align-items:center;gap:10px;white-space:nowrap}.brand img{width:36px;height:36px;border-radius:8px}.brand strong{font-size:18px;letter-spacing:-.5px}.brand span{font-size:12px;color:var(--muted);margin-left:12px}.header-actions{display:flex;gap:20px;font-size:12px;align-items:center}.header-actions button{background:transparent;color:var(--muted)}main{max-width:1340px;padding:40px 40px 80px;margin:auto}.auth-layout{min-height:65vh;display:grid;grid-template-columns:1.25fr 1fr;gap:80px;align-items:center;max-width:1000px;margin:auto}.eyebrow{font-size:10px;letter-spacing:2px;font-weight:700;color:#939087}.intro h1{font-size:clamp(30px,4vw,48px);letter-spacing:-2px;line-height:1.25;margin:22px 0}.intro p{color:var(--muted);font-size:14px;line-height:1.9}.steps{display:flex;gap:20px;margin-top:36px;font-size:11px;color:var(--muted)}.auth-card{background:#fff;border-radius:24px;padding:32px;box-shadow:0 16px 50px #00000005}.auth-tabs{display:flex;gap:24px;margin-bottom:30px}.auth-tabs button{background:none;padding:8px 0;color:var(--muted);font-size:14px}.auth-tabs .selected{color:var(--ink);box-shadow:0 2px var(--ink)}h2{font-size:22px;letter-spacing:-.6px;margin:0 0 8px}.muted{color:var(--muted);font-size:13px;line-height:1.7}.type-intro{margin:-4px 0 20px;padding:0;background:transparent;border:0;border-radius:0;color:#6e6a63;font-size:12px;line-height:1.6}.field-hint{display:block;color:var(--muted);font-size:11px;line-height:1.55;margin-top:7px}.metadata-value{display:flex;align-items:center;min-height:42px;background:#f2f2ef;border-radius:10px;padding:12px;color:#77736c;font-size:13px}.required-attachment{background:#f0f2d9}.required-attachment b:after{content:" · 必传";color:#848a1e}.file-zone input[type=file]{width:auto}.auth-card .muted{margin-bottom:25px}label{display:flex;flex-direction:column;gap:8px;font-size:12px;color:#66625c;margin-bottom:17px}input,textarea,select{border:0;background:#f2f2ef;border-radius:10px;padding:12px;color:var(--ink);font-size:13px;width:100%;min-width:0}textarea{resize:vertical;line-height:1.65}input:focus,textarea:focus,select:focus{outline:2px solid #b7bc40}.primary{background:var(--accent);padding:12px 19px;border-radius:999px;font-size:13px;font-weight:600}.primary:hover{background:#e6ed1b}.quiet{background:#eeeeea;padding:11px 17px;border-radius:999px;color:#625e58;font-size:12px}.full{width:100%}.auth-card small{display:block;text-align:center;color:#a19d94;font-size:10px;margin-top:16px}.form-error{color:#c6454c;font-size:12px;line-height:1.6;min-height:16px;margin:12px 0}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:30px}.page-heading h1{font-size:34px;letter-spacing:-1px;margin:12px 0 5px}.summary{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin:20px 0 36px}.summary div{background:#fff;border-radius:18px;padding:23px}.summary strong{display:block;font-size:27px;font-weight:600}.summary span{display:block;font-size:12px;color:var(--muted);margin-top:8px}.list-heading{display:flex;align-items:center;justify-content:space-between}.list-heading h2{font-size:17px}.resource-list{display:grid;gap:12px}.submission{display:flex;gap:18px;align-items:center;background:#fff;border-radius:16px;padding:18px}.submission .thumb{width:100px;height:70px;object-fit:cover;background:#ededeb;border-radius:10px}.submission-content{flex:1;min-width:0}.submission h3{font-size:14px;margin:0 0 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.submission p{font-size:11px;color:var(--muted);margin:5px 0;word-break:break-word}.badge{display:inline-block;background:#eee;font-size:11px;border-radius:999px;padding:6px 10px;white-space:nowrap}.badge.published{background:#e8f5ee;color:#2c8561}.badge.pending{background:#fff3d9;color:#aa7714}.badge.rejected{background:#fcebee;color:#b84a5b}.badge.archived{background:#ececf5;color:#747088}.empty{padding:60px 20px;text-align:center;color:var(--muted);font-size:13px;background:#fff;border-radius:16px}.editor{border:0;border-radius:24px;width:min(940px,calc(100% - 32px));padding:28px;max-height:92vh;box-shadow:0 22px 80px #0002}.editor::backdrop{background:#0007}.editor-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.editor-heading h2{margin-top:9px}.close{width:36px;height:36px;background:#f0f0ec;border-radius:50%;font-size:22px}.editor-layout{display:grid;grid-template-columns:1.3fr 1fr;gap:28px}.two-col{display:grid;grid-template-columns:1fr 1fr;gap:14px}.file-zone{border:0;border-radius:14px;background:#f2f2ef;padding:22px;text-align:center;align-items:center;margin-bottom:8px;cursor:pointer}.file-zone span{font-size:11px;color:var(--muted)}.file-zone b{background:#fff;padding:9px 14px;font-size:12px;border-radius:999px;font-weight:500}.file-zone input{padding:6px;font-size:11px}.file-zone.compact{padding:16px}.file-name{display:block;font-size:11px;color:#79766f;word-break:break-word;margin:5px 0 18px}#videoPreview{width:100%;max-height:210px;background:#191919;border-radius:12px;margin-bottom:16px}.note{font-size:11px}.editor-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;margin-top:15px}.editor-footer span{margin-right:auto;font-size:12px;color:var(--muted)}#toast{position:fixed;bottom:24px;left:50%;transform:translate(-50%,20px);opacity:0;pointer-events:none;padding:12px 18px;border-radius:999px;background:#171717;color:#fff;font-size:12px;transition:.2s;z-index:100}#toast.show{opacity:1;transform:translate(-50%,0)}@media(max-width:760px){main{padding:25px 20px}.auth-layout{display:block}.intro{margin-bottom:30px}.intro h1{font-size:32px}.steps{display:none}.auth-card{max-width:460px;margin:auto}.header{height:auto;min-height:72px;flex-wrap:wrap;padding:18px 20px;gap:10px}.brand span{display:none}.header-actions{gap:10px}.page-heading{align-items:flex-start}.page-heading h1{font-size:24px}.summary{grid-template-columns:repeat(2,1fr);gap:10px}.summary div{padding:18px}.editor-layout{grid-template-columns:1fr}.submission{flex-wrap:wrap;gap:12px}.submission .thumb{width:70px;height:52px}.submission .badge{margin-left:auto}.editor{padding:20px}.editor-footer{flex-wrap:wrap}.editor-footer span{width:100%}}

/* Conditional source and attachment choices */
.resource-file-options{margin:0 0 18px;padding:0}
.resource-file-options h3{font-size:12px;font-weight:500;color:#66625c;margin:0 0 10px}
.file-options-hint{margin:0 0 12px;color:#85817a;font-size:11px;line-height:1.6}
.file-option-list{display:flex;flex-wrap:wrap;gap:10px;margin:0 0 12px}
.file-option{display:flex;flex-direction:row;align-items:center;gap:7px;margin:0;padding:0;color:#3d3a35;font-size:12px;cursor:pointer}
.file-option input{width:15px;height:15px;margin:0;accent-color:#9da51a}
.conditional-field[hidden]{display:none!important}
.resource-file-options .file-name{margin:2px 0 12px}
.resource-file-options .file-zone{margin-bottom:8px}
.resource-instructions{margin-bottom:17px}
.resource-instructions .field-hint{margin-top:7px}
#copyLabel.auto-generated{padding:13px 15px;background:#f7f7f4;border-radius:12px}
#copyLabel.auto-generated textarea{display:block;min-height:138px;background:#fff;color:#3d3a35;cursor:default}
#copyLabel.auto-generated .field-hint{margin:0;color:#6e6a63}
@media(max-width:760px){.file-option-list{gap:14px}}


/* Editor layout: preview and submission details stay in the left column; resource files stay on the right. */
.editor-layout{align-items:start}
.fields,.media-fields{min-width:0}
.preview-zone{margin-bottom:6px}
.preview-zone + .file-name{margin-bottom:10px}
#videoPreview{display:block;max-height:260px;object-fit:contain}
.metadata-fields{margin:0 0 18px}
.media-fields{padding-top:0}
.media-fields .resource-file-options{margin-bottom:20px}
.media-fields .note{margin:14px 0 0}
@media(max-width:760px){
  .editor-layout{gap:20px}
  .media-fields{padding-top:0}
}

/* Final editor arrangement: preview and basic details on the left, selectors
   and type-specific material on the right. The generated copy preview sits
   below both columns so it is easy to review before submitting. */
.editor-layout{grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);align-items:start;gap:28px}
.fields,.media-fields{min-width:0}
.media-fields{padding-top:0}
.metadata-fields-right{margin:0 0 18px}
.metadata-fields-right label{margin-bottom:0}
.type-intro{display:none!important}
.field-title{display:flex;align-items:baseline;justify-content:space-between;gap:16px;width:100%}
.field-title .field-hint{flex:0 1 auto;margin:0;text-align:right;white-space:normal}
.resource-instructions .field-title{margin-bottom:8px}
.resource-instructions .field-hint{max-width:62%;font-size:10px}
.resource-file-options h3{margin:0 0 12px}
.file-options-hint,#copyHint{display:none!important}
#sourceFieldHint{font-size:10px}
#sourceFieldHint,.attachment-user-hint{color:var(--muted)}
#sourceFieldHint{margin-left:auto}
#source{font-size:10px}
.resource-file-options .file-option-list{margin-bottom:14px}
.file-zone{position:relative;justify-content:center}
.file-zone input[type=file]{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;opacity:0;padding:0;border:0}
.file-zone b{display:inline-block;pointer-events:none}
.attachment-user-hint{display:block;width:100%;margin-top:8px;font-size:10px;line-height:1.5;text-align:center}
.copy-preview{display:block;width:100%;margin:24px 0 0;padding:0!important;background:transparent!important;border:0;border-radius:0}
.copy-preview .field-title{margin-bottom:8px}
.copy-preview textarea{display:block;width:100%;min-height:150px;background:#f2f2ef;color:#3d3a35}
.copy-preview.auto-generated textarea{background:#f2f2ef}
.copy-preview .field-hint{display:none!important}
.copy-preview.prompt-copy{width:43.5%;margin-left:auto}
.copy-preview.prompt-copy #copyHint{display:block!important;margin:0;color:var(--muted);font-size:10px;line-height:1.4}
.note{width:100%;margin:16px 0 0;font-size:11px}
.editor-heading h2{font-size:25px}
@media(max-width:760px){
  .editor-layout{grid-template-columns:1fr;gap:20px}
  .metadata-fields-right{order:-1}
  .field-title{align-items:flex-start;gap:8px}
  .resource-instructions .field-hint{max-width:58%;text-align:right}
  .copy-preview.prompt-copy{width:100%}
}

/* The group and category selectors sit in the modal header; the form columns
   below use the requested 40/60 split. */
.editor-heading{display:flex;align-items:flex-end;gap:18px;flex-wrap:nowrap}
.editor-heading-main{flex:0 0 auto}
.editor-heading-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;width:min(390px,52%);margin-left:auto}
.editor-heading-controls{margin-left:0}
.editor-heading-controls label{margin:0;gap:7px;font-size:12px}
.editor-heading-controls select{min-height:42px}
.editor-layout{grid-template-columns:minmax(0,2fr) minmax(0,3fr)}
.copy-preview.prompt-copy{width:60%}
@media(max-width:760px){
  .editor-heading{align-items:flex-start;flex-wrap:wrap;gap:12px}
  .editor-heading-main{flex:1 1 auto}
  .editor-heading-controls{order:3;width:100%;margin-left:0}
  .editor-heading .close{margin-left:auto}
  .editor-layout{grid-template-columns:1fr}
  .copy-preview.prompt-copy{width:100%}
}

/* Vertical submission flow: every resource type uses one calm reading column. */
.editor{width:min(780px,calc(100% - 32px));padding:30px 32px 24px;max-height:94vh}
.editor-heading{align-items:flex-start;margin-bottom:22px;padding-bottom:18px;border-bottom:1px solid #ecebe6}
.editor-heading-controls{width:min(500px,100%);margin-left:0;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.editor-heading-controls label{gap:7px;color:#5f5b55;font-size:12px}
.editor-heading-controls select{min-height:44px;background:#f5f5f2}
.editor-heading .close{margin-left:auto;flex:0 0 auto}
.editor-layout{display:block}
.fields{padding-bottom:22px;border-bottom:1px solid #ecebe6}
.media-fields{padding-top:22px}
.preview-zone{min-height:158px;justify-content:center;padding:25px 22px}
.preview-zone span{margin-bottom:2px}
.resource-instructions .field-title{display:block;margin-bottom:9px}
.resource-instructions .field-hint{display:block;max-width:none;margin-top:4px;text-align:left;font-size:10px}
.resource-instructions textarea{min-height:118px}
.resource-file-options{padding:18px 20px;border:1px solid #e7e6df;border-radius:14px;background:#fcfcfa}
.resource-file-options h3{font-size:13px;color:#4e4a44;margin-bottom:12px}
.resource-file-options .file-option-list{margin-bottom:14px}
.resource-file-options .conditional-field{margin-bottom:14px}
.resource-file-options .field-title{display:block;margin-bottom:8px}
.resource-file-options .field-title .field-hint{display:block;margin-top:4px;text-align:left}
.resource-file-options .file-zone.compact{min-height:118px;margin:0}
.copy-preview,.copy-preview.prompt-copy{width:100%;margin:22px 0 0;padding:20px 0 0!important;border-top:1px solid #ecebe6;border-radius:0}
.copy-preview .field-title{display:block;margin-bottom:9px}
.copy-preview .field-title > span{font-size:13px;color:#4e4a44}
.copy-preview textarea{min-height:128px;background:#f5f5f2}
.copy-preview.prompt-copy #copyHint{display:block!important;margin-top:5px;text-align:left}
.note{margin-top:18px;padding-top:14px;border-top:1px solid #f0efeb}
.editor-footer{position:sticky;bottom:-24px;margin:20px -32px -24px;padding:14px 32px 24px;background:#fff;border-top:1px solid #ecebe6}
@media(max-width:760px){
  .editor{width:min(100% - 20px,640px);padding:22px 20px 18px}
  .editor-heading-controls{width:100%;gap:10px}
  .editor-heading{margin-bottom:18px;padding-bottom:15px}
  .editor-footer{margin-left:-20px;margin-right:-20px;padding-left:20px;padding-right:20px}
}

/* The only two-column area is the top setup block: settings on the left,
   video preview on the right. Everything below reads as one vertical flow. */
.editor-heading{margin-bottom:16px;padding-bottom:0;border-bottom:0}
.editor-top-grid{display:grid;grid-template-columns:minmax(0,0.72fr) minmax(0,1.28fr);gap:24px;align-items:stretch;margin-bottom:24px}
.editor-top-settings{min-width:0}
.editor-top-settings .editor-heading-controls{display:flex;flex-direction:column;width:100%;gap:14px}
.editor-top-settings .editor-heading-controls label{margin:0;gap:7px}
.editor-top-settings .editor-heading-controls select{min-height:44px;width:100%}
.editor-top-preview{min-width:0;display:flex;flex-direction:column}
.editor-top-preview .preview-zone{min-height:170px;height:100%;margin:0;justify-content:center}
.editor-top-preview .file-name{margin:5px 0 8px}
.editor-top-preview #videoPreview{max-height:240px;margin:0 0 8px}
.fields{padding-bottom:0;border-bottom:0}
.resource-instructions .field-title,.resource-file-options .field-title{display:flex;align-items:baseline;justify-content:space-between;gap:16px;white-space:nowrap;margin-bottom:9px}
.resource-instructions .field-hint,.resource-file-options .field-title .field-hint{display:inline;margin:0;max-width:none;text-align:right;white-space:nowrap;font-size:10px}
.copy-preview,.copy-preview.prompt-copy{padding-top:0!important;border-top:0;margin-top:24px}
.copy-preview .field-title{display:flex;align-items:baseline;justify-content:space-between;gap:16px;white-space:nowrap}
.copy-preview .field-hint{margin:0;text-align:right;white-space:nowrap}
.note{padding-top:0;border-top:0}
.editor-footer{border-top:0}
@media(max-width:760px){
  .editor-top-grid{grid-template-columns:1fr;gap:16px}
  .editor-top-settings .editor-heading-controls{display:grid;grid-template-columns:1fr 1fr;gap:10px}
  .editor-top-preview .preview-zone{min-height:150px}
  .resource-instructions .field-title,.resource-file-options .field-title,.copy-preview .field-title{gap:8px}
}

/* Keep hidden type-specific blocks from contributing phantom spacing, and
   let compact screens wrap explanatory copy without horizontal overflow. */
.media-fields{padding-top:0}
.media-fields > #resourceInstructionsField:not([hidden]),.media-fields > #resourceFileOptions:not([hidden]){margin-top:22px}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
@media(max-width:760px){
  .resource-instructions .field-title,.resource-file-options .field-title,.copy-preview .field-title{white-space:normal;flex-wrap:wrap}
  .resource-instructions .field-hint,.resource-file-options .field-title .field-hint,.copy-preview .field-hint{white-space:normal;text-align:left;max-width:100%}
}

/* The close control sits outside the panel; only the form scrolls. */
.editor{width:min(780px,calc(100% - 120px));height:min(94vh,900px);position:fixed;overflow:visible;resize:none}
.editor > #resourceForm{height:100%;max-height:100%;overflow-x:hidden;overflow-y:auto;padding:2px 10px 0 2px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#d5d5cf transparent}
.editor-heading{height:0;min-height:0;margin:0;padding:0;border:0;position:static}
.editor-top-grid{padding-top:0}
.editor > .close{position:absolute;top:0;right:-48px;display:grid;place-items:center;width:36px;height:36px;padding:0;margin:0;line-height:1;z-index:5;background:#fff}
.editor > .close svg{display:block;width:16px;height:16px;pointer-events:none}
.editor textarea{resize:none}
.editor-footer{bottom:0;margin:20px 0 0;padding:16px 0 0;border:0;background:#fff}
/* Chromium must use the pseudo-element styles to suppress native arrow buttons. */
@supports selector(::-webkit-scrollbar){
  .editor > #resourceForm{scrollbar-width:auto;scrollbar-color:auto}
  .editor > #resourceForm::-webkit-scrollbar{width:7px}
  .editor > #resourceForm::-webkit-scrollbar-track{background:transparent}
  .editor > #resourceForm::-webkit-scrollbar-thumb{background:#d5d5cf;border:1px solid transparent;border-radius:999px;background-clip:content-box}
  .editor > #resourceForm::-webkit-scrollbar-thumb:hover{background-color:#c5c5bd}
  .editor > #resourceForm::-webkit-scrollbar-button{display:none;width:0;height:0}
  .editor > #resourceForm::-webkit-scrollbar-corner{background:transparent}
}
@media(max-width:600px){
  .editor{width:calc(100% - 24px);height:calc(100dvh - 88px);max-height:calc(100dvh - 88px);margin:64px auto 24px;padding:20px 16px 18px}
  .editor > .close{top:-44px;right:0}
}

/* Upload zones accept both a picker click and a single dropped file. */
.file-zone{transition:border-color .16s ease,background-color .16s ease,box-shadow .16s ease}
.file-zone.is-dragover{background:#f0f3d8;box-shadow:inset 0 0 0 2px #b6bd2c}
.preview-zone{position:relative;min-height:170px;overflow:hidden;display:flex;align-items:center;justify-content:center;gap:8px}
.preview-zone .upload-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;width:100%;min-height:120px}
.preview-zone .upload-placeholder>span{display:block;margin:0}
.preview-zone .drop-hint{font-size:10px;color:#9a978f}
.preview-zone.has-preview{padding:0;background:#171717}
.preview-zone.has-preview .upload-placeholder{display:none}
.preview-zone.has-preview>span,.preview-zone.has-preview>b,.preview-zone.has-preview>input{display:none!important}
.preview-zone #videoPreview{width:100%;height:100%;max-height:240px;min-height:170px;object-fit:contain;margin:0;border-radius:12px;background:#171717}
.preview-zone:not(.has-preview) #videoPreview{display:none}
.file-zone:focus-visible{outline:2px solid #b6bd2c;outline-offset:3px}
.resource-file-options .file-zone.is-dragover{background:#f0f3d8}
@media (min-width:601px) and (max-width:760px){
  .editor-top-grid{grid-template-columns:minmax(0,.72fr) minmax(0,1.28fr);gap:16px}
  .editor-top-settings .editor-heading-controls{display:flex;flex-direction:column;gap:10px}
}
