/* Collection workspace: a single surface with bounded, scrollable stage content. */
body[data-page=collections]{background:var(--surface-soft,#f7f8fa)}
body[data-page=collections] #app{min-height:100dvh;background:var(--surface-soft,#f7f8fa)!important}
body[data-page=collections] .collection-create{box-shadow:0 6px 28px #17332a1c!important;border-radius:18px!important}
body[data-page=collections] .main{min-height:calc(100dvh - 74px);display:flex;flex-direction:column}
body[data-page=collections] .main>.footer{margin-top:auto;width:100%;box-sizing:border-box}
.collection-workspace{width:100%;max-width:1100px;margin:0 auto;padding:36px 0;color:var(--text);box-sizing:border-box}
.collection-workspace *, .collection-settings-dialog *{box-sizing:border-box}
.collection-workspace [hidden],.collection-settings-dialog [hidden]{display:none!important}
.collection-workspace .btn{font-size:13px;min-height:38px;cursor:pointer}
.collection-workspace .btn.primary,.collection-settings-dialog .btn.primary{background:#07b962;border-color:#07b962;color:#fff}
.collection-workspace input,.collection-workspace textarea,.collection-workspace select,.collection-settings-dialog input:not([type=checkbox]),.collection-settings-dialog textarea,.collection-settings-dialog select{min-width:0;max-width:100%;color:var(--text);background:var(--surface,#fff);border:1px solid var(--line,#e2e7e5);border-radius:8px;padding:12px 14px;font:inherit}
.collection-workspace input:focus-visible,.collection-workspace textarea:focus-visible,.collection-workspace button:focus-visible,.collection-settings-dialog button:focus-visible{outline:2px solid #07b962;outline-offset:3px}
.collection-workspace input[readonly]{background:var(--surface-soft,#f6f8f7);color:var(--muted)}
.collection-heading,.collection-list-heading,.collection-form-heading,.gallery-heading{display:flex;align-items:center;justify-content:space-between;gap:16px}
.collection-heading h1{font-size:24px;margin:0}.collection-heading p{font-size:13px;color:var(--muted)}
.collection-list-heading h2,.gallery-heading h2{font-size:17px;margin:0}.collection-list-heading h2 span{font-size:12px;color:var(--muted);margin-left:10px}
.collection-list-heading input{width:220px;font-size:13px}.collection-list-heading{padding:20px 0 14px}
.collection-library{background:var(--surface,#fff);border-radius:18px;box-shadow:0 6px 28px #17332a14;padding:28px 32px;min-height:560px}
.collection-library .collection-heading{margin-bottom:24px}
.collection-compact-quota{background:var(--surface-soft,#f5f9f7);padding:20px 22px;border-radius:12px}
.collection-compact-quota>div:first-child{display:flex;gap:12px;align-items:center;font-size:13px}
.collection-compact-quota strong{font-size:25px}.collection-compact-quota a{margin-left:auto;color:#079f56}
.collection-tier,.collection-status{font-size:11px;padding:4px 8px;border-radius:5px;color:var(--muted);background:var(--surface-soft,#f3f6f4);white-space:nowrap}
.collection-tier,.collection-status.is-active{color:#079f56;background:#e8f7ef}
.collection-compact-quota progress{appearance:none;width:100%;height:5px;border:0;margin:15px 0 9px;display:block}
.collection-compact-quota progress::-webkit-progress-bar{background:#e1ebe5;border-radius:5px}.collection-compact-quota progress::-webkit-progress-value{background:#07b962;border-radius:5px}
.compact-quota-note{display:flex;justify-content:space-between;font-size:11px;color:var(--muted)}
.collection-device-note{font-size:12px;line-height:1.6;color:var(--muted);margin:12px 0 0}
.collection-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.collection-card{display:flex;align-items:flex-start;gap:12px;min-width:0;padding:20px 16px;text-decoration:none;color:var(--text);background:var(--surface-soft,#f7f9f8);border:1px solid transparent;border-radius:12px;transition:border-color .15s}
.collection-card:hover{border-color:#9ddbbb}.collection-folder{display:grid;place-items:center;width:36px;height:36px;flex:0 0 36px;border-radius:10px;background:#e4f7ed;color:#07aa5b}.collection-folder svg{width:23px;height:23px}
.compact-row-main{flex:1;min-width:0}.compact-row-title{display:flex;flex-direction:column;align-items:flex-start;gap:8px}.compact-row-title h2{font-size:16px;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0}
.compact-row-meta{display:flex;flex-direction:column;gap:7px;font-size:11px;color:var(--muted);margin-top:14px;line-height:1.6}.collection-card-arrow{color:#07aa5b;margin-left:auto;font-size:20px}
.collection-empty,.collection-waiting{text-align:center;padding:58px 20px;color:var(--muted);font-size:13px}.collection-empty h2,.collection-waiting h3{color:var(--text);font-size:19px}.collection-hero-icon{display:grid;place-items:center;color:#07b962;margin:auto;width:70px;height:70px;border-radius:20px;background:#e8f8ef}.collection-hero-icon svg{width:36px;height:36px}
.collection-workspace.is-creating{max-width:540px}.is-creating .collection-library{padding:0;min-height:0;background:none;box-shadow:none}.is-creating .collection-library>:not(#collection-form){display:none!important}
.collection-create{position:relative;display:flex;flex-direction:column;gap:26px;height:600px;min-height:450px;max-height:calc(100dvh - 190px);padding:30px!important;margin:0!important;border:0!important;border-radius:18px;background:var(--surface,#fff);box-shadow:0 6px 28px #17332a1c}
.collection-form-heading h2{font-size:21px;margin:0}.collection-form-heading .btn{border:0;background:none;color:var(--muted)}
.collection-create .field{display:flex;flex-direction:column;gap:10px;margin:0;font-size:13px}.collection-name-field input{height:54px}.collection-description-field textarea{min-height:120px;height:150px;resize:none}.collection-description-field{flex:1}
.collection-form-footer{display:flex;align-items:center;gap:14px;margin-top:auto;flex-shrink:0}.collection-form-footer>span{display:none}.collection-form-footer>button:last-child{margin-left:auto;min-width:150px}.collection-form-footer .btn{height:44px}
.collection-create.editing-settings>:not(.embedded-settings){visibility:hidden}
.collection-node-field{padding:0;margin:0;border:0;grid-column:1/-1;min-width:0}.collection-node-field legend{font-size:13px;margin-bottom:12px}.collection-node-options{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:7px}
.collection-node{display:flex;align-items:center;justify-content:center;position:relative;padding:11px 3px;border:1px solid var(--line);border-radius:7px;font-size:12px;cursor:pointer}.collection-node input{position:absolute;opacity:0;width:1px;height:1px}.collection-node:has(input:checked){background:#e9f8ef;border-color:#07b962;color:#079f56}.collection-node:focus-within{outline:2px solid #07b962;outline-offset:2px}.collection-node.unavailable{opacity:.4;cursor:default}
.collection-settings-dialog{padding:0;border:0;width:540px;max-width:calc(100vw - 28px);max-height:85dvh;color:var(--text);background:var(--surface,#fff);border-radius:18px;box-shadow:0 20px 70px #0003}
.collection-settings-dialog[open],.collection-settings-dialog.embedded-settings{display:flex;flex-direction:column}
.collection-settings-dialog.embedded-settings{position:absolute;inset:0;width:100%;height:100%;max-width:none;max-height:none;box-shadow:none;margin:0;z-index:5}
.collection-settings-dialog::backdrop{background:#10251d66}.collection-settings-dialog>header,.collection-settings-dialog>footer{display:flex;justify-content:space-between;align-items:center;padding:18px 24px;flex-shrink:0}.collection-settings-dialog h2{font-size:19px;margin:0}.collection-settings-dialog>footer{justify-content:flex-end;border-top:1px solid var(--line)}
.collection-settings-dialog nav{display:flex;margin:0 24px;border-bottom:1px solid var(--line);flex-shrink:0}.collection-settings-dialog nav button{flex:1;font:inherit;font-size:14px;padding:14px 0;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);cursor:pointer}.collection-settings-dialog nav button.active{border-color:#07b962;color:#079f56}
.settings-body{padding:22px 24px;overflow:auto;min-height:0;flex:1}.settings-body .field{display:flex;flex-direction:column;gap:9px;margin-bottom:22px;font-size:13px}.settings-body input:not([type=checkbox]),.settings-body select,.settings-body textarea{width:100%}.settings-body p,.settings-body small{font-size:12px;line-height:1.7;color:var(--muted)}
.collection-basics{display:grid;grid-template-columns:1fr 1fr;gap:18px 14px;margin-bottom:24px}.collection-basics .field{margin:0}.settings-file-limits{display:grid;grid-template-columns:1fr 1fr;gap:12px}.settings-file-limits .field{margin:0}.collection-limit-title{grid-column:1/-1;font-size:14px;margin:12px 0}.collection-limit-title small{display:block;margin-top:6px}
.setting-toggle{display:flex;align-items:center;justify-content:space-between;gap:20px;margin:0 0 26px;font-size:14px}.setting-toggle small{display:block;margin-top:5px}.setting-toggle input{appearance:none;width:38px;height:22px;background:#cad2ce;border-radius:20px;position:relative;flex:0 0 38px;cursor:pointer}.setting-toggle input:checked{background:#07b962}.setting-toggle input:before{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;background:#fff;border-radius:50%;transition:transform .15s}.setting-toggle input:checked:before{transform:translateX(16px)}
.custom-field{padding:14px;background:var(--surface-soft,#f5f8f6);border-radius:10px;margin-bottom:12px}.custom-field>div{display:flex;gap:8px}.custom-field select{width:105px;flex-shrink:0}.custom-field>label{display:block;font-size:12px;margin:10px 0}.custom-field textarea{font-size:13px}
.collection-studio{height:650px;max-height:calc(100dvh - 180px);min-height:460px;display:flex;flex-direction:column;border-radius:16px;box-shadow:0 6px 28px #17332a1c;overflow:hidden;background:var(--surface,#fff)}
.studio-header{display:flex;align-items:center;gap:12px;padding:24px 30px;flex-shrink:0;background:linear-gradient(var(--surface,#fff),var(--surface-soft,#f8faf9));min-height:80px}
.studio-avatar{width:36px;height:36px;flex:0 0 36px;display:grid;place-items:center;border-radius:50%;background:#07b962;color:#fff}.studio-avatar svg{width:25px;height:25px}.studio-header h1{font-size:18px;font-weight:500;margin:0;overflow-wrap:anywhere}.studio-header small{font-size:11px;color:var(--muted);display:block;margin-top:5px}
.studio-deadline{font-size:12px;color:var(--muted);white-space:nowrap;margin-left:auto}.studio-header>.btn,.studio-header>a{font-size:11px;background:none;border:0;color:#079f56;white-space:nowrap;padding:5px}
.studio-description{font-size:13px;line-height:1.7;margin:0;padding:12px 30px 0;max-height:70px;overflow:auto;flex-shrink:0;color:var(--muted)}
.studio-body{flex:1;min-height:0;display:flex;flex-direction:column;position:relative;padding:24px 30px}.studio-drop{flex:1;min-height:140px;border:1px dashed var(--line,#dce4df);display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;cursor:default}
.studio-drop input,.folder-picker input{position:absolute;opacity:0;width:1px;height:1px}.studio-drop>.btn:focus-visible{outline:2px solid #07b962;outline-offset:3px}.studio-drop>.btn{cursor:pointer}.studio-drop.dragging{background:#e9f8ef;border-color:#07b962}.studio-upload-symbol,.studio-drop>strong{display:none}.studio-drop .btn{border-radius:24px;min-width:170px;text-align:center;font-size:15px;padding:9px 24px}.studio-drop small{font-size:12px;color:var(--muted)}.studio-drop .drop-limits{margin-top:40px}
.studio-tools{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:10px;flex-shrink:0;font-size:12px}.folder-picker{color:#079f56;cursor:pointer}.cover-rules-toggle{margin-left:auto;background:none;border:0;font:inherit;color:var(--muted);cursor:pointer}.cover-rules{display:none}
.studio-send{display:flex;justify-content:space-between;align-items:center;gap:20px;flex-shrink:0;margin-top:22px}.studio-send>small{display:flex;align-items:center;gap:5px;font-size:12px;color:var(--muted)}.studio-send svg{width:14px;height:14px}.studio-send>div{display:flex;min-width:0}.studio-send input{width:220px;height:46px;border-radius:24px 0 0 24px;padding:10px 15px;font-size:13px}.studio-send .btn{height:46px;border-radius:0 24px 24px 0;padding:0 22px;white-space:nowrap}
.studio-body.has-files>.studio-drop{position:absolute;clip-path:inset(100%);width:1px;height:1px;min-height:0;overflow:hidden;pointer-events:none}.studio-body.has-files #selection-list{flex:1;min-height:0;display:flex;flex-direction:column;order:-1;border:1px dashed var(--line)}
.inline-queue-toolbar{display:flex;align-items:center;gap:12px;padding:16px 18px;flex-shrink:0}.inline-queue-toolbar>span{margin-left:auto;font-size:12px;color:var(--muted)}.inline-queue-toolbar>.btn:first-child{border-radius:22px;color:#079f56}.inline-queue-toolbar>.btn:last-child{border:0;background:none;font-size:11px;color:var(--muted)}
.inline-queue-files{overflow:auto;flex:1;min-height:0;padding:0 18px 12px}.inline-queue-file{display:flex;align-items:center;gap:12px;height:43px;padding:8px 10px}.inline-queue-file:nth-child(odd){background:var(--surface-soft,#f7f9f8)}.inline-queue-file>.file-icon{width:22px;height:27px;flex:0 0 22px}.inline-queue-file>.file-icon svg{width:22px;height:27px}.inline-queue-file>span:not(.file-icon){flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px}.inline-queue-file small{font-size:11px;color:var(--muted);white-space:nowrap}.inline-queue-file .btn{padding:2px 5px;background:none;border:0;color:var(--muted);min-height:24px;font-size:20px}
.studio-custom-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;flex-shrink:0;max-height:140px;overflow:auto;margin-top:12px}.studio-custom-fields:empty{display:none}.studio-custom-fields .field{margin:0;font-size:12px;display:flex;flex-direction:column;gap:7px}.studio-custom-fields input,.studio-custom-fields select{width:100%;font-size:13px}
.studio-body.is-uploading>:not(#collection-upload-progress){display:none!important}.studio-body.is-uploading #collection-upload-progress{flex:1;min-height:0;display:flex;align-items:center;flex-direction:column;gap:20px;padding:12px;text-align:center}.collection-progress-title{display:flex;flex-direction:column-reverse;align-items:center;gap:24px}.collection-progress-title>span{display:grid;place-items:center;width:145px;height:145px;border:10px solid #dff5e9;border-radius:50%;background:radial-gradient(circle,#07b962 60%,transparent 61%),conic-gradient(#07b962 var(--upload-progress),#e9f8ef 0);color:#fff;font-size:27px;font-weight:700;box-shadow:inset 0 0 0 9px var(--surface,#fff)}.collection-progress-title strong{font-size:18px;font-weight:500}#collection-upload-progress>progress{display:none}#collection-upload-progress>small{display:block;min-width:0;font-size:13px;color:var(--muted);max-width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.studio-cancel{margin-top:auto;min-width:150px}
.studio-success{flex:1;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:18px;text-align:center;min-height:0}.studio-success>span{display:grid;place-items:center;width:84px;height:84px;border-radius:50%;background:#e5f8ed;color:#07b962;font-size:48px}.studio-success h2{font-size:22px;margin:0;color:#079f56}.studio-success p{font-size:14px;color:var(--muted);max-width:100%;overflow-wrap:anywhere}.studio-success>.btn{margin-top:38px;border-radius:24px;padding:10px 30px}
.studio-owner{display:flex;gap:35px;align-items:center;padding:20px 30px;flex-shrink:0}.studio-owner>div:not(.actions){display:flex;flex-direction:column;gap:5px}.studio-owner strong{font-size:24px}.studio-owner span{font-size:12px;color:var(--muted)}.studio-owner .actions{display:flex;gap:8px;margin-left:auto}
.studio-created{margin:0 30px 16px;padding:16px 20px;background:#eff9f3;border-radius:10px;flex-shrink:0;display:flex;align-items:center;gap:12px;flex-wrap:wrap}.studio-created p{font-size:12px;color:var(--muted);margin:0}.studio-created input{flex:1;min-width:180px;font-size:12px}.studio-created strong{color:#079f56}
.collection-studio>.collection-gallery-section{flex:1;min-height:0;overflow:auto;padding:8px 30px 24px}.gallery-heading{margin-bottom:18px}.gallery-heading>span{font-size:12px;color:var(--muted)}
.collection-delivery{padding:18px;background:var(--surface-soft,#f6f8f7);border-radius:12px;margin-bottom:18px}.collection-delivery>header{display:flex;align-items:center;gap:10px;margin-bottom:15px}.delivery-avatar{display:grid;place-items:center;width:32px;height:32px;border-radius:50%;background:#e1f2e8;color:#078e4c;font-size:13px}.collection-delivery header strong{font-size:13px}.collection-delivery header small{display:block;font-size:11px;color:var(--muted);margin-top:4px}
.collection-file-gallery{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.collection-file-card{display:flex;flex-direction:column;padding:16px;background:var(--surface,#fff);border-radius:10px;min-width:0}.collection-file-card>.file-icon{display:block;width:34px;height:42px;margin-bottom:14px}.collection-file-card .file-icon svg{width:34px;height:42px}.collection-file-card>strong{font-size:13px;font-weight:500;line-height:1.5;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.file-card-bottom{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px}.file-card-bottom small{font-size:11px;color:var(--muted)}.file-card-bottom .btn{border:0;background:#eaf8f0;color:#078e4c;font-size:12px;min-height:30px;padding:5px 10px}
.collection-answers{display:flex;gap:15px;flex-wrap:wrap}.answer-item{display:flex;flex-direction:column;gap:5px;font-size:13px;max-width:100%;white-space:pre-wrap;overflow-wrap:anywhere}.answer-item small{color:var(--muted);font-size:11px}
.collection-access{max-width:500px;margin:45px auto;padding:40px 30px;border-radius:16px;box-shadow:0 6px 28px #17332a1c;background:var(--surface,#fff);text-align:center}.collection-access h1{font-size:21px}.collection-access p{font-size:13px;color:var(--muted)}.collection-access form{display:flex;gap:10px;margin-top:25px}.collection-access input{flex:1;min-width:0}.cover-symbol svg{width:45px;height:45px;color:#07b962}
.collection-notice{border:0;border-radius:16px;width:420px;max-width:calc(100vw - 32px);padding:28px;color:var(--text);background:var(--surface,#fff);box-shadow:0 12px 70px #0003}.collection-notice::backdrop{background:#12251c66}.collection-notice h2{font-size:19px}.collection-notice p{line-height:1.8;font-size:14px;overflow-wrap:anywhere}.collection-notice button{float:right}
#collection-toast{position:fixed;left:50%;bottom:36px;transform:translateX(-50%);z-index:1000;background:#18392b;color:#fff;border-radius:10px;padding:14px 22px;max-width:calc(100vw - 30px);font-size:14px;box-shadow:0 6px 25px #0002}
.collection-table{overflow:auto;margin-top:20px}.collection-table table{min-width:850px;width:100%;border-collapse:collapse}.collection-table td,.collection-table th{padding:14px;text-align:left;border-bottom:1px solid var(--line)}
@media(max-width:700px){
 .collection-workspace{padding:12px 0 24px}.collection-library{padding:20px 16px;min-height:calc(100dvh - 180px);border-radius:14px}.collection-heading h1{font-size:21px}.collection-library .collection-heading{margin-bottom:18px}.collection-cards{grid-template-columns:1fr}.collection-card{padding:17px}.compact-row-title{flex-direction:row;align-items:center;justify-content:space-between}.compact-row-meta{margin-top:8px}.collection-card-arrow{display:none}
 .collection-compact-quota{padding:16px}.collection-compact-quota>div:first-child{flex-wrap:wrap;font-size:11px;gap:8px}.collection-compact-quota strong{font-size:21px}.compact-quota-note{font-size:10px}.collection-device-note{font-size:11px}.collection-list-heading input{width:130px;padding:9px;font-size:12px}.collection-list-heading h2{font-size:15px}
 .collection-create{height:calc(100dvh - 185px);min-height:440px;max-height:none;padding:24px!important;gap:22px}.collection-form-heading h2{font-size:19px}.collection-description-field textarea{height:130px}.collection-form-footer>button:last-child{min-width:130px}.settings-body{padding:20px 18px}.collection-settings-dialog>header,.collection-settings-dialog>footer{padding:16px 18px}.collection-settings-dialog nav{margin:0 18px}.custom-field>div{flex-wrap:wrap}.custom-field>div>input{flex:1}.collection-basics{gap:14px 10px}.settings-file-limits{grid-template-columns:1fr 1fr}
 .collection-studio{height:calc(100dvh - 165px);max-height:none;min-height:440px;border-radius:14px}.studio-header{padding:15px;gap:8px;flex-wrap:wrap;min-height:76px}.studio-header>div{flex:1;min-width:100px}.studio-header h1{font-size:16px}.studio-header small{display:none}.studio-header>a{display:none}.studio-header>.btn{order:2;margin-left:auto}.studio-deadline{order:3;flex:1 0 calc(100% - 44px);margin-left:44px;font-size:11px;margin-top:-5px}.studio-description{padding:10px 16px 0;font-size:12px;max-height:55px}.studio-body{padding:16px;min-height:0}.studio-drop{min-height:120px;gap:20px}.studio-drop .drop-limits{font-size:10px;margin-top:20px;padding:0 10px;text-align:center}.studio-drop small{font-size:11px}
 .studio-send{flex-direction:column;align-items:stretch;gap:10px;margin-top:14px;padding-bottom:env(safe-area-inset-bottom)}.studio-send>small{font-size:11px}.studio-send>div{width:100%}.studio-send input{width:0;flex:1}.studio-send .btn{padding:0 15px;font-size:13px}.studio-custom-fields{max-height:110px;grid-template-columns:1fr}.inline-queue-toolbar{gap:7px;padding:10px 8px;flex-wrap:wrap}.inline-queue-toolbar>.btn:first-child{padding:6px 10px;font-size:12px}.inline-queue-toolbar>span{font-size:10px}.inline-queue-toolbar>.btn:last-child{padding:4px;font-size:10px}.inline-queue-files{padding:0 6px 8px}.inline-queue-file{gap:7px;padding:8px 5px}.inline-queue-file>span:not(.file-icon){font-size:12px}.inline-queue-file small{font-size:10px}
 .studio-owner{padding:16px;gap:20px;flex-wrap:wrap}.studio-owner strong{font-size:21px}.studio-owner span{font-size:11px}.studio-owner .actions{width:100%;margin:0}.collection-studio>.collection-gallery-section{padding:8px 16px 20px}.collection-file-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}.collection-delivery{padding:13px}.collection-file-card{padding:13px}.studio-created{margin:0 16px 12px;padding:14px}.studio-created input{width:100%;flex-basis:100%}.studio-success p{font-size:13px}.collection-progress-title>span{width:125px;height:125px}.collection-progress-title strong{font-size:16px}.collection-access{margin:20px auto;padding:28px 20px}
}
body[data-page="collections"] .layout{background:transparent!important}
/* Creator workspace: bounded layout, compact files, stable local updates. */
body.collection-manager-page .main{max-width:1480px!important;width:100%;padding:24px!important;margin:0 auto!important}
body.collection-manager-page .main>.footer{padding:18px 0;margin-top:auto!important;max-width:none}
.collection-manager-root{max-width:none;padding:0;flex:1;width:100%;min-width:0}
.cm-shell{display:grid;grid-template-columns:150px minmax(0,1fr);min-height:620px;background:var(--surface,#fff);border:1px solid var(--line);border-radius:16px;overflow:clip;box-shadow:0 6px 30px #183b2810}
.cm-nav{padding:18px 10px;background:var(--surface-soft,#f7f8fa);border-right:1px solid var(--line)}
.cm-nav a{display:flex;align-items:center;gap:9px;padding:12px 10px;margin-bottom:6px;border-radius:8px;font-size:13px;color:var(--muted);overflow-wrap:anywhere}.cm-nav svg{width:17px;height:17px;flex-shrink:0}.cm-nav a.active{color:#079251;background:#e6f6ee;font-weight:600}.cm-main{min-width:0}
.cm-header{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:12px 20px;padding:22px 24px;border-bottom:1px solid var(--line);align-items:center}.cm-identity{display:flex;align-items:center;gap:12px}.cm-identity .studio-avatar{width:40px;height:40px;flex:0 0 40px}.cm-header h1{font-size:20px;font-weight:600;margin:0 0 6px}.cm-header p{margin:0;font-size:12px;color:var(--muted);line-height:1.6}.cm-description{overflow-wrap:anywhere;max-width:550px}.cm-deadline{display:flex;gap:8px;align-items:center;justify-content:flex-end}.cm-deadline .studio-deadline{flex:initial;order:0;margin:0;font-size:11px;white-space:normal;font-variant-numeric:tabular-nums}.cm-header-actions{display:flex;justify-content:flex-end;gap:8px}.cm-shell .btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;font-size:12px;min-height:32px;padding:6px 10px;border-radius:7px;white-space:nowrap}.cm-shell .btn svg{width:15px;height:15px;flex-shrink:0}.cm-header-actions .btn:first-child{background:#07b962;color:#fff!important;border-color:#07b962}.cm-deadline .btn{border:0;background:transparent;color:var(--muted);font-size:11px;padding:4px}
.cm-work{display:grid;grid-template-columns:minmax(0,1fr) 270px;min-height:500px}.cm-work.hide-settings{grid-template-columns:1fr}.cm-work.hide-settings .cm-settings{display:none}.cm-content{min-width:0;padding:18px 22px}.cm-tabs,.cm-toolbar,.cm-selection{display:flex;align-items:center;gap:8px;margin-bottom:16px}.cm-tabs>span{flex:1}.cm-tabs>[aria-pressed=true],.cm-tabs>.active{color:#079251;border-color:#b8e6cf;background:#eefaf4}.cm-tabs>.btn{min-width:55px}.cm-toolbar strong{font-size:12px;font-weight:500;white-space:nowrap}.cm-toolbar input{margin-left:auto;width:185px;font-size:12px!important;padding:8px 10px!important;height:32px}.cm-toolbar>div{display:flex;gap:4px}.cm-toolbar .btn{min-width:32px;padding:4px;font-size:19px}.cm-selection{font-size:12px;color:var(--muted);margin:0 0 14px;min-height:30px}.cm-selection label{display:flex;align-items:center;gap:7px;white-space:nowrap}.cm-selection select{margin-left:auto;font-size:11px!important;padding:6px 8px!important;height:30px;max-width:160px}.cm-gallery{display:grid;grid-template-columns:repeat(auto-fill,168px);gap:14px;align-content:start;min-height:300px}.cm-file{position:relative;border:1px solid var(--line);border-radius:10px;overflow:hidden;background:var(--surface,#fff);min-width:0;height:204px;box-sizing:border-box;transition:border-color .15s,box-shadow .15s}.cm-file:hover{border-color:#b0d6c4;box-shadow:0 3px 12px #1e443011}.cm-file.is-selected{border-color:#07b962;box-shadow:0 0 0 1px #07b962;background:#f4fcf8}.cm-check{position:absolute;top:8px;left:8px;z-index:1;display:flex;background:var(--surface,#fff);border-radius:4px}.cm-check input,.cm-selection input{accent-color:#07b962;width:15px;height:15px;padding:0!important;margin:0}.cm-preview{width:100%;height:112px;border:0;display:flex;align-items:center;justify-content:center;background:var(--surface-soft,#f8f9fa);cursor:pointer;padding:10px;overflow:hidden}.cm-preview>.file-icon,.cm-preview>.file-icon svg{width:38px;height:48px}.cm-preview img{width:100%;height:100%;object-fit:contain}.cm-preview.has-thumbnail>.file-icon{display:none}.cm-file-name{padding:10px 10px 7px;min-height:54px}.cm-file-name strong{font-size:12px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500;line-height:17px}.cm-file-name small{font-size:10px;color:var(--muted);display:block;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cm-file footer{height:36px;display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--line);padding:4px 10px;font-size:11px;color:var(--muted)}.cm-file footer .btn{border:0;background:none;min-height:25px;height:25px;font-size:19px;padding:0 5px}.cm-gallery.is-list{display:flex;flex-direction:column;gap:0}.cm-gallery.is-list .cm-file{display:flex;align-items:center;height:64px;border-radius:0;border:0;border-bottom:1px solid var(--line);box-shadow:none}.cm-gallery.is-list .cm-check{position:static;padding:0 10px;background:none}.cm-gallery.is-list .cm-preview{width:42px;height:48px;flex-shrink:0;padding:4px;background:transparent}.cm-gallery.is-list .cm-preview>.file-icon,.cm-gallery.is-list .cm-preview>.file-icon svg{width:23px;height:29px}.cm-gallery.is-list .cm-file-name{flex:1;min-width:0;min-height:0;padding:8px}.cm-gallery.is-list footer{border:0;gap:16px}
.cm-settings{border-left:1px solid var(--line);padding:0 16px 14px;background:var(--surface-soft,#f8faf9);max-height:calc(100dvh - 260px);min-height:460px;overflow:auto;scrollbar-gutter:stable;scrollbar-width:thin}.cm-settings>header{position:sticky;top:0;background:var(--surface-soft,#f8faf9);display:flex;align-items:center;justify-content:space-between;padding:12px 0;z-index:2}.cm-settings h2{font-size:14px;font-weight:600;margin:0}.cm-settings h3{font-size:12px;font-weight:600;padding:0;margin:0 0 8px;border:0}.cm-settings section{position:relative;padding:13px 0;border-bottom:1px solid var(--line)}.cm-settings section:last-child{border-bottom:0}.cm-settings p{font-size:11px;line-height:1.75;color:var(--muted);overflow-wrap:anywhere;margin:0 0 8px}.cm-settings .btn{min-height:28px;padding:5px 8px;font-size:11px;background:var(--surface,#fff);color:var(--text);border:1px solid var(--line)}.cm-settings>header .btn{border:0;background:transparent;font-size:18px;padding:0;min-width:26px}.cm-settings section>div{display:flex;gap:8px}.cm-settings section>div>.btn{flex:1;min-width:0}.cm-settings input[readonly]{width:100%;height:32px;font-size:11px;padding:8px;margin-bottom:8px;background:var(--surface,#fff)}.cm-toggle{display:flex;align-items:center;justify-content:space-between;font-size:11px;line-height:1.5;gap:10px;margin:8px 0}.cm-toggle input[type=checkbox]{appearance:none;-webkit-appearance:none;flex:0 0 32px;width:32px!important;height:18px!important;min-height:18px;padding:0!important;margin:0;border:0!important;border-radius:12px!important;background:#c9d3ce!important;position:relative;cursor:pointer;transition:background .15s}.cm-toggle input[type=checkbox]::after{content:'';position:absolute;left:2px;top:2px;width:14px;height:14px;background:#fff;border-radius:50%;box-shadow:0 1px 3px #0002;transition:transform .15s}.cm-toggle input[type=checkbox]:checked{background:#07b962!important}.cm-toggle input[type=checkbox]:checked::after{transform:translateX(14px)}.cm-toggle input:disabled{opacity:.5;cursor:wait}.cm-metrics{display:flex;gap:12px;margin:6px 0 22px}.cm-metrics>div{flex:1;background:var(--surface-soft);padding:18px;border-radius:10px}.cm-metrics strong{display:block;font-size:24px;color:#079b54}.cm-metrics span{font-size:11px;color:var(--muted)}.cm-stats h2{font-size:15px}.cm-stats article{padding:14px 0;border-bottom:1px solid var(--line);font-size:12px}.cm-stats article header{display:flex;justify-content:space-between;gap:10px}.cm-stats time{font-size:11px;color:var(--muted)}
.cm-dialog label{display:flex;flex-direction:column;gap:8px;margin:16px 0;font-size:13px}.cm-dialog input,.cm-dialog textarea{font:inherit;padding:10px;border:1px solid var(--line);border-radius:6px;min-width:0;background:var(--surface);color:var(--text)}.cm-dialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.cm-dialog .cm-qr{display:block;width:240px;height:240px;max-width:100%;margin:20px auto}.cm-large-preview{display:flex;justify-content:center}.cm-large-preview img{max-width:100%;max-height:55dvh;object-fit:contain}.cm-large-preview svg{width:90px;height:110px}.cm-downloads{display:flex;flex-direction:column;gap:12px;max-height:50dvh;overflow:auto}.cm-downloads a{overflow-wrap:anywhere;font-size:13px}
@media(max-width:1100px){body.collection-manager-page .main{padding:16px!important}.cm-shell{grid-template-columns:120px minmax(0,1fr)}.cm-work{grid-template-columns:minmax(0,1fr) 240px}.cm-header{padding:18px}.cm-content{padding:16px}.cm-nav a{padding:10px 6px;font-size:12px}.cm-deadline{flex-wrap:wrap}.cm-toolbar{flex-wrap:wrap}.cm-toolbar input{width:155px}.cm-gallery{grid-template-columns:repeat(auto-fill,minmax(145px,1fr))}}
@media(max-width:760px){body.collection-manager-page .main{padding:10px!important}.cm-shell{display:block;min-height:600px;border-radius:12px}.cm-nav{display:flex;gap:4px;padding:6px;border:0;overflow:auto}.cm-nav a{white-space:nowrap;font-size:11px;padding:9px;margin:0}.cm-nav a:nth-child(n+3){display:none}.cm-header{grid-template-columns:1fr;padding:14px;gap:10px}.cm-header h1{font-size:18px}.cm-deadline{justify-content:space-between;font-size:10px}.cm-header-actions{justify-content:flex-start}.cm-description{display:none}.cm-work{display:block;position:relative;min-height:380px}.cm-settings{position:fixed;right:10px;top:74px;bottom:10px;width:270px;max-height:none;min-height:0;background:var(--surface-soft,#f8faf9);border-radius:12px;box-shadow:-8px 0 35px #0002;z-index:60}.cm-work:not(.hide-settings)::before{content:'';position:fixed;inset:64px 0 0;background:#0003;z-index:59}.cm-content{padding:12px}.cm-toolbar input{width:140px}.cm-toolbar>div{margin-left:auto}.cm-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.cm-file{height:194px}.cm-preview{height:102px}.cm-selection select{max-width:142px}.cm-metrics{gap:6px}.cm-metrics>div{padding:10px}.cm-metrics strong{font-size:20px}.cm-tabs .btn{min-width:50px;padding:6px}.cm-gallery.is-list footer{gap:5px;padding:5px}.cm-gallery.is-list footer span{font-size:10px}}
.cm-header-actions [data-manage="download-all"]{min-width:130px}

/* Stable settings frame and compact collection library. */
dialog.collection-settings-dialog{position:fixed;inset:0;margin:auto;width:540px;height:min(650px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);overflow:hidden}
.collection-settings-dialog .settings-body{overscroll-behavior:contain;scrollbar-gutter:stable;overflow-y:auto}
.collection-settings-dialog nav button{min-width:0;white-space:nowrap}
.collection-library{padding:22px 26px;min-height:0}.collection-library .collection-heading{margin-bottom:16px}.collection-library .collection-compact-quota{padding:14px 18px}.collection-library .collection-compact-quota strong{font-size:22px}.collection-library .collection-list-heading{margin:18px 0 12px}
.collection-list-scroll{height:clamp(300px,46dvh,500px);overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding-right:4px}
.collection-library .collection-cards{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.collection-library .collection-card{display:block;position:relative;padding:0;border-radius:10px;min-height:148px;overflow:hidden}
.collection-record-link{display:block;padding:14px 14px 33px;color:inherit;text-decoration:none;min-width:0}
.collection-record-title{display:flex;align-items:center;gap:9px;margin-bottom:8px}.collection-record-title h2{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;margin:0;min-width:0}
.collection-library .collection-folder{width:28px;height:28px;flex-basis:28px;border-radius:8px}.collection-library .collection-folder svg{width:18px;height:18px}.collection-library .compact-row-meta{font-size:11px;margin-top:9px;gap:5px}.collection-library .compact-row-meta span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;display:block}
.collection-delete{position:absolute;right:10px;bottom:8px;display:flex;align-items:center;gap:4px;border:0;background:none;color:var(--muted);font:inherit;font-size:11px;cursor:pointer;padding:4px 5px}.collection-delete:hover{color:#d43838;background:#fff0f0;border-radius:5px}.collection-delete svg{width:14px;height:14px}
.collection-list-more{text-align:center;font-size:12px;color:var(--muted);padding:12px;margin:0}
.collection-delete-dialog{width:420px;max-width:calc(100vw - 32px);border:0;border-radius:16px;padding:24px;background:var(--surface,#fff);color:var(--text)}.collection-delete-dialog::backdrop{background:#10251d66}.collection-delete-dialog h2{font-size:19px;margin:0 0 16px}.collection-delete-dialog p{font-size:14px;line-height:1.7;overflow-wrap:anywhere}.collection-delete-dialog footer{display:flex;justify-content:flex-end;gap:12px;margin-top:24px}.collection-delete-dialog .danger{background:#d43838;color:white;border-color:#d43838}
.cm-file footer>span{margin-right:auto}.cm-file footer .btn{display:inline-flex;align-items:center;justify-content:center;width:28px;min-width:28px;height:28px;padding:4px;border:0;background:none;color:var(--muted)}.cm-file footer .btn:hover{background:#e7f5ee;color:#079f56}.cm-file footer .btn svg{width:18px;height:18px}.cm-file-details dd{margin:4px 0 16px;overflow-wrap:anywhere}.cm-file-details dt{font-size:12px;color:var(--muted)}
@media(max-width:1000px){.collection-library .collection-cards{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:760px){.collection-library{padding:18px 14px}.collection-library .collection-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.collection-record-link{padding:12px 10px 33px}.collection-list-scroll{height:50dvh}.collection-library .compact-row-meta{font-size:10px}}
@media(max-width:360px){.collection-library .collection-cards{grid-template-columns:1fr}}

.cm-view-controls{display:flex;gap:2px;border:1px solid var(--line);border-radius:7px;padding:2px;background:var(--surface-soft)}.cm-view-controls .btn{border:0;min-height:26px;width:28px;padding:4px;background:transparent}.cm-view-controls [aria-pressed=true]{background:var(--surface,#fff);color:#079f56;box-shadow:0 1px 3px #0001}.cm-view-controls svg{width:16px;height:16px}#cm-selected:empty{display:none}
@media(max-width:760px){
 body.collection-manager-page .main{padding:8px!important}.cm-shell{border-radius:14px;min-height:calc(100dvh - 125px)}.cm-nav{padding:5px 10px;gap:2px;align-items:center}.cm-nav a{padding:7px 4px}.cm-nav a.active{background:transparent;max-width:55%;overflow:hidden;text-overflow:ellipsis;display:block}.cm-nav a.active::before{content:'/';color:var(--muted);margin-right:10px}
 .cm-header{padding:14px 14px 16px;gap:10px}.cm-identity{gap:10px}.cm-identity .studio-avatar{width:34px;height:34px;flex-basis:34px}.cm-header h1{font-size:17px;margin-bottom:3px;overflow-wrap:anywhere}.cm-header p{font-size:11px}.cm-deadline{flex-wrap:nowrap;gap:4px}.cm-deadline .studio-deadline{font-size:10px}.cm-header-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}.cm-header-actions .btn{min-width:0!important;min-height:36px}
 .cm-content{padding:12px}.cm-tabs{margin-bottom:12px;gap:4px;border-bottom:1px solid var(--line);padding-bottom:10px}.cm-tabs .btn{min-height:32px;padding:6px 12px;border:0;background:transparent;font-size:13px}.cm-tabs>[aria-pressed=true],.cm-tabs>.active{background:#e8f7ef;color:#079251}.cm-tabs [data-manage=manage]{border:1px solid var(--line);font-size:12px;padding:5px 10px}
 .cm-toolbar{display:block;margin-bottom:10px}.cm-toolbar strong{display:none}.cm-toolbar input{display:block;margin:0;width:100%;height:38px;padding:9px 12px!important;background:var(--surface-soft,#f7f9f8)}
 .cm-selection{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px;font-size:11px}.cm-selection label{gap:5px;min-height:32px}.cm-selection select{height:32px;font-size:10px!important;max-width:140px;flex:0 1 140px;padding:5px!important}.cm-view-controls{margin-left:0}.cm-view-controls .btn{min-width:26px;width:26px;padding:4px}.cm-selection #cm-selected{order:4;flex:0 0 100%;font-size:11px}.cm-gallery{gap:10px;min-height:200px}.cm-file footer{padding:4px 8px}.cm-file-name{padding:9px 8px}.cm-file footer .btn{width:26px;min-width:26px}.cm-settings{top:70px;right:8px;bottom:8px;width:min(310px,calc(100vw - 24px))}
}

.cm-preview{cursor:default}.cm-file-menu{position:fixed;inset:auto;margin:0;padding:5px;width:160px;border:1px solid var(--line,#e2e7e5);border-radius:10px;background:var(--surface,#fff);color:var(--text);box-shadow:0 8px 30px #0002}.cm-file-menu button{display:flex;align-items:center;gap:8px;width:100%;border:0;border-radius:6px;background:transparent;padding:10px;font:inherit;font-size:13px;color:inherit;text-align:left;cursor:pointer}.cm-file-menu button:hover{background:#e8f7ef;color:#079251}.cm-file-menu svg{width:16px;height:16px}
.collection-library .collection-list-heading h2{margin:0;font-size:15px}.collection-library .collection-list-heading label{margin:0}.collection-library .collection-list-heading input{height:34px;padding:7px 10px;font-size:12px}

@media(max-width:760px){body[data-page=collections] .main>.footer{display:block;padding:14px 0;text-align:center}body[data-page=collections] .main>.footer>span{display:block;max-width:100%;white-space:nowrap;font-size:clamp(8px,2.5vw,11px);line-height:1.6;overflow:hidden;text-overflow:ellipsis}}

/* Statistics: summary tiles and individual submission cards. */
.cm-stats .cm-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:4px 0 24px}.cm-stats .cm-metrics>div{position:relative;min-width:0;padding:16px;border:1px solid #e3f0e9;background:linear-gradient(135deg,#f0faf5,#f8fbf9);border-radius:13px}.cm-stats .cm-metrics strong{font-size:24px;font-variant-numeric:tabular-nums;letter-spacing:-.5px;margin:9px 0 4px;white-space:nowrap}.cm-stats .cm-metrics .metric-icon{display:flex;align-items:center;justify-content:center;background:#dff3e8;color:#079251;border-radius:8px;width:29px;height:29px}.metric-icon svg{width:16px;height:16px}.cm-stats .cm-metrics>div>span:last-child{font-size:11px;color:#688075}
.cm-records-heading{display:flex;align-items:center;justify-content:space-between;margin:0 0 12px}.cm-records-heading h2{font-size:15px;margin:0}.cm-records-heading>span{font-size:11px;color:var(--muted)}.cm-submission-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(235px,1fr));gap:12px;align-items:start}.cm-stats article.cm-submission{padding:16px;border:1px solid var(--line);border-radius:13px;background:var(--surface,#fff);box-shadow:0 3px 12px #183b2807;min-width:0}.cm-stats .cm-submission header{display:flex;align-items:center;gap:10px;justify-content:flex-start}.cm-submitter-avatar{width:34px;height:34px;flex:0 0 34px;display:grid;place-items:center;border-radius:11px;background:#edf5f0;color:#2d8156;font-weight:600;font-size:14px}.cm-submission header>div{min-width:0;flex:1}.cm-submission header strong{display:block;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cm-submission time{display:block;font-size:10px;margin-top:4px;font-variant-numeric:tabular-nums}.cm-received{font-size:10px;color:#078c4d;background:#eaf8f0;padding:4px 6px;border-radius:20px;white-space:nowrap}.cm-submission-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 12px;margin-top:14px;border-radius:9px;background:var(--surface-soft,#f6f8f7);color:var(--muted);font-size:12px}.cm-submission-summary>span{display:flex;align-items:center;gap:7px}.cm-submission-summary svg{width:16px;height:16px;color:#38966a}.cm-submission-answers{margin-top:12px;padding:0 2px;overflow-wrap:anywhere}
@media(max-width:760px){.cm-stats .cm-metrics{gap:8px;margin:4px 0 20px}.cm-stats .cm-metrics>div{padding:12px 10px;border-radius:11px}.cm-stats .cm-metrics strong{font-size:19px}.cm-stats .cm-metrics .metric-icon{width:26px;height:26px}.cm-submission-cards{grid-template-columns:1fr;gap:10px}.cm-stats article.cm-submission{padding:13px}.cm-stats .cm-metrics>div>span:last-child{font-size:10px}}
@media(prefers-color-scheme:dark){body[data-theme=dark] .cm-stats .cm-metrics>div{background:var(--surface-soft);border-color:var(--line)}}
.cm-stats{max-width:960px;margin:0 auto}.cm-submission-cards{grid-template-columns:repeat(auto-fill,minmax(235px,1fr))}@media(max-width:760px){.cm-submission-cards{grid-template-columns:1fr}}
/* Edge-to-edge collection manager, matching the full-window workspace. */
body.collection-manager-page .main{max-width:none!important;width:100%;margin:0!important;padding:0!important;background:var(--surface,#fff)}
body.collection-manager-page .collection-manager-root{display:flex;flex-direction:column;flex:1;max-width:none;padding:0}
body.collection-manager-page .cm-shell{flex:1;width:100%;grid-template-columns:190px minmax(0,1fr);min-height:calc(100dvh - 128px);border:0;border-radius:0;box-shadow:none;overflow:visible}
body.collection-manager-page .cm-main{display:flex;flex-direction:column}body.collection-manager-page .cm-work{flex:1;grid-template-columns:minmax(0,1fr) 290px}body.collection-manager-page .cm-work.hide-settings{grid-template-columns:minmax(0,1fr)}
body.collection-manager-page .cm-header{padding:22px 28px}body.collection-manager-page .cm-content{padding:20px 28px}body.collection-manager-page .cm-nav{border-radius:0;padding:18px 12px}body.collection-manager-page .cm-settings{border-radius:0;box-shadow:none}
body.collection-manager-page .cm-stats{margin:0;max-width:1040px}body.collection-manager-page .main>.footer{margin:0!important;padding:14px 24px!important;flex-shrink:0;background:var(--surface,#fff)}
@media(max-width:1100px) and (min-width:761px){body.collection-manager-page .cm-shell{grid-template-columns:145px minmax(0,1fr)}body.collection-manager-page .cm-work{grid-template-columns:minmax(0,1fr) 245px}body.collection-manager-page .cm-content{padding:16px}}
@media(max-width:760px){body.collection-manager-page .cm-shell{display:block;min-height:calc(100dvh - 96px)}body.collection-manager-page .cm-nav{padding:5px 12px}body.collection-manager-page .cm-header{padding:14px}body.collection-manager-page .cm-content{padding:12px 14px}body.collection-manager-page .cm-work{display:block}body.collection-manager-page .cm-settings{border-radius:12px;box-shadow:-8px 0 35px #0002}body.collection-manager-page .main>.footer{padding:12px 8px!important}}

.collection-icon-close{display:inline-flex;align-items:center;justify-content:center;flex:0 0 32px;width:32px;height:32px;min-width:32px;padding:6px;border:0;border-radius:50%;background:var(--surface-soft,#f3f5f4);color:var(--muted,#758078);cursor:pointer}.collection-icon-close svg{width:18px;height:18px}.collection-icon-close:hover{background:#e6f5ed;color:#079251}.collection-icon-close:focus-visible{outline:2px solid #07b962;outline-offset:3px}
.cm-dialog .cm-dialog-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}.cm-dialog .cm-dialog-heading h2{margin:0;font-size:18px}.cm-dialog footer:empty{display:none}.cm-dialog footer{margin-top:18px}.cm-dialog .cm-file-details{display:grid;grid-template-columns:70px minmax(0,1fr);align-items:start;gap:14px 16px;margin:0}.cm-dialog .cm-file-details dt{font-size:12px;line-height:1.7}.cm-dialog .cm-file-details dd{font-size:13px;line-height:1.6;margin:0;overflow-wrap:anywhere}.cm-dialog{padding:22px!important}.cm-dialog footer .btn{min-height:34px;padding:7px 14px;font-size:13px}

/* One shared workspace for the collection library and its file manager. */
.cm-library-main .collection-library{flex:1;width:100%;min-height:0;padding:24px 28px;background:var(--surface,#fff);border-radius:0;box-shadow:none}.cm-library-main .collection-heading{margin-bottom:18px}.cm-library-main .collection-heading h1{font-size:20px}.cm-library-main .collection-list-scroll{height:clamp(300px,calc(100dvh - 370px),720px)}.cm-library-main .collection-list-heading{margin:20px 0 12px}.cm-library-main .collection-list-quota{max-width:none}.collection-library .collection-delete{top:10px;right:10px;bottom:auto;border-radius:6px;padding:5px;color:var(--muted)}.collection-library .collection-record-title{padding-right:51px}.collection-library .collection-record-link{padding-bottom:16px}.collection-library .collection-card{min-height:135px}
.cm-library-shell .cm-nav a:nth-child(n){display:flex}.is-creating .cm-library-main .collection-library{padding:24px;background:var(--surface,#fff)}.is-creating .cm-library-main .collection-create{width:100%;max-width:540px;margin:0 auto}
@media(max-width:760px){.cm-library-main .collection-library{padding:16px 14px}.cm-library-main .collection-list-scroll{height:calc(100dvh - 340px);min-height:280px}.cm-library-main .collection-heading h1{font-size:18px}.cm-library-shell .cm-nav a:nth-child(n+2){display:none}.collection-library .collection-delete span{display:none}.collection-library .collection-delete{top:8px;right:8px;padding:7px}.collection-library .collection-record-title{padding-right:25px}.is-creating .cm-library-main .collection-library{padding:14px}}
/* iOS keeps the visual viewport stable when editable controls use 16px text. */
@media(max-width:760px){
 body[data-page=collections] input:not([type=checkbox]):not([type=radio]):not([type=file]),
 body[data-page=collections] textarea,
 body[data-page=collections] select{font-size:16px!important;line-height:1.4;min-width:0;max-width:100%}
 body[data-page=collections] .studio-send>div{min-width:0;max-width:100%}
 body[data-page=collections] .studio-send input{flex:1 1 0;width:0;min-width:0}
 body[data-page=collections] .cm-selection select{font-size:16px!important;max-width:155px;flex-basis:155px}
}

.cm-top-tools{display:flex;align-items:center;gap:8px;min-width:0}.cm-top-tools input{width:180px;min-width:90px!important;height:32px;padding:7px 10px!important;font-size:12px!important}.cm-top-tools select{width:145px;height:32px;padding:6px 8px!important;font-size:11px!important;flex-shrink:0}.cm-top-tools .cm-view-controls{flex-shrink:0}.cm-tabs>.cm-top-tools{flex:0 1 auto}.cm-top-tools .cm-view-controls .btn{min-width:26px;width:26px;padding:4px}.cm-tabs>[data-manage=manage]{flex-shrink:0}
@media(min-width:1101px){.cm-tabs{flex-wrap:nowrap}.cm-tabs>span{min-width:4px}.cm-toolbar{margin-bottom:12px}.cm-selection select{margin-left:0}}
.cm-top-tools input,.cm-top-tools select{min-height:32px!important;height:32px!important}

.cm-folder-tree{max-height:calc(100dvh - 170px);overflow-y:auto;scrollbar-width:thin;padding-top:4px}.cm-nav .cm-folder-tree a.cm-folder-link{display:flex;align-items:center;gap:7px;padding:10px 7px 10px 12px;font-size:12px;margin:2px 0;min-width:0;white-space:nowrap}.cm-folder-link .cm-tree-branch{width:13px;height:20px;flex:0 0 13px;color:#a8b8af}.cm-folder-link>.cm-folder-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}.cm-nav .cm-folder-link.active::before{display:none}.cm-nav .cm-folder-link.active{max-width:none}
@media(max-width:760px){body.collection-manager-page .cm-nav{display:block;padding:7px 12px}.cm-nav .cm-nav-home{display:flex;width:max-content}.cm-folder-tree{display:flex;gap:4px;max-height:none;overflow-x:auto;padding:2px 0 4px}.cm-nav .cm-folder-tree a.cm-folder-link{display:flex!important;flex:0 0 auto;max-width:180px;padding:7px 9px;margin:0}.cm-folder-tree .cm-tree-branch{display:none}}

.cm-toolbar>strong{display:flex;align-items:center;gap:7px}.cm-toolbar>strong svg{width:16px;height:16px;color:var(--muted)}@media(max-width:760px){.cm-toolbar>strong{display:none}}

/* Collections share the account navigation and retain their existing manager. */
body.collection-account-workspace .layout>.sidebar+.main{padding:0;min-width:0}
body.collection-account-workspace .cm-shell{grid-template-columns:minmax(0,1fr)}
body.collection-account-workspace .cm-shell>.cm-nav{display:none}
#account-collection-folders .cm-folder-tree{max-height:280px;overflow:auto;padding:0 4px 6px 20px}
#account-collection-folders .cm-folder-link{display:flex;align-items:center;gap:8px;padding:9px 10px;border-radius:8px;color:var(--muted);font-size:13px;min-width:0}
#account-collection-folders .cm-folder-link>svg:not(.cm-tree-branch){width:16px;height:16px;flex-shrink:0}
#account-collection-folders .cm-folder-link:hover,#account-collection-folders .cm-folder-link.active{color:var(--primary);background:var(--primary-soft,#e8f8ef)}
@media(max-width:760px){#account-collection-folders .cm-folder-tree{display:block}body.collection-account-workspace .cm-shell{display:block}}

.collection-title-line{display:flex;align-items:center;gap:16px;flex-wrap:wrap;min-width:0}.collection-expiry-hint{font-size:12px;color:var(--muted);font-weight:400}.collection-title-line h1{flex-shrink:0}@media(max-width:760px){.collection-title-line{gap:4px 10px}.collection-expiry-hint{font-size:11px}}

.collection-library .compact-empty{padding:36px 20px 48px}.collection-list-scroll[hidden]{display:none!important}

.cm-library-main .collection-list-heading{margin:12px 0;padding:0}.collection-library #collection-form:empty{display:none}

.cm-back-to-collections{grid-column:1/-1;display:inline-flex;align-items:center;gap:6px;justify-self:start;width:max-content;font-size:12px;line-height:20px;color:var(--muted);text-decoration:none}.cm-back-to-collections svg{width:15px;height:15px}.cm-back-to-collections:hover{color:var(--primary)}.cm-back-to-collections:focus-visible{outline:2px solid var(--primary);outline-offset:4px;border-radius:4px}

.cm-gallery>.collection-waiting{grid-column:1/-1;width:100%;min-height:240px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:36px 20px;text-align:center}.cm-gallery>.collection-waiting h3{margin:0 0 10px}.cm-gallery>.collection-waiting p{margin:0}
.cm-gallery:has(>.collection-waiting){grid-template-columns:minmax(0,1fr)}

.cm-back-to-collections{font-size:15px;font-weight:600;line-height:24px;gap:8px;color:var(--text)}.cm-back-to-collections svg{width:19px;height:19px;stroke-width:2}

/* Collection statistics: compact summaries and a full-width empty state. */
body.collection-manager-page .cm-stats{max-width:none;width:100%}
.cm-stats .cm-metrics{gap:16px;margin:4px 0 28px}
.cm-stats .cm-metrics>div{display:grid;grid-template-columns:44px minmax(0,1fr);grid-template-rows:auto auto;column-gap:16px;row-gap:6px;align-content:center;min-height:112px;padding:22px 24px;border:1px solid var(--line);border-radius:16px;background:var(--surface,#fff);box-shadow:0 2px 8px #16382d03}
.cm-stats .cm-metrics .metric-icon{grid-column:1;grid-row:1/3;align-self:center;width:44px;height:44px;border-radius:13px;background:var(--primary-soft,#e8f8ef);color:var(--primary,#07b962)}
.cm-stats .cm-metrics .metric-icon svg{width:22px;height:22px}
.cm-stats .cm-metrics>div>span:last-child{grid-column:2;grid-row:1;font-size:13px;line-height:20px;color:var(--muted)}
.cm-stats .cm-metrics strong{grid-column:2;grid-row:2;font-size:30px;font-weight:650;line-height:1.2;letter-spacing:-.6px;margin:0;color:var(--text);font-variant-numeric:tabular-nums}
.cm-records-heading{padding-bottom:16px;margin-bottom:0;border-bottom:1px solid var(--line)}
.cm-submission-cards{padding-top:16px}
.cm-submission-cards>.collection-waiting{grid-column:1/-1;width:100%;min-width:0;min-height:clamp(300px,calc(100dvh - 510px),560px);box-sizing:border-box;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;padding:44px 24px}
.cm-submission-cards>.collection-waiting .collection-hero-icon{margin:0 0 18px}
.cm-submission-cards>.collection-waiting h3{margin:0 0 10px;font-size:18px;font-weight:600;line-height:1.5}
.cm-submission-cards>.collection-waiting p{max-width:360px;margin:0;font-size:13px;line-height:1.8}
@media(max-width:760px){.cm-stats .cm-metrics{gap:8px;margin-bottom:24px}.cm-stats .cm-metrics>div{grid-template-columns:minmax(0,1fr);grid-template-rows:32px auto auto;gap:8px;min-height:134px;padding:14px 12px;border-radius:12px}.cm-stats .cm-metrics .metric-icon{grid-column:1;grid-row:1;width:30px;height:30px;border-radius:9px}.cm-stats .cm-metrics .metric-icon svg{width:17px;height:17px}.cm-stats .cm-metrics>div>span:last-child{grid-column:1;grid-row:2;font-size:11px;line-height:16px}.cm-stats .cm-metrics strong{grid-column:1;grid-row:3;font-size:23px}.cm-submission-cards>.collection-waiting{min-height:300px;padding:36px 16px}}

/* Header alignment must not depend on the optional countdown. */
.collection-studio>.studio-header>div{flex:1;min-width:0}
.collection-studio>.studio-header h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.collection-studio>.studio-header>.studio-deadline{margin-left:0}
.collection-studio>.studio-header>.btn,.collection-studio>.studio-header>a{flex-shrink:0;padding:8px 10px;border-radius:8px}
.collection-studio>.studio-header>.btn:hover,.collection-studio>.studio-header>a:hover{background:var(--primary-soft,#e8f8ef)}
@media(max-width:760px){.collection-studio>.studio-header{gap:8px;padding:16px}.collection-studio>.studio-header>div{min-width:60px}.collection-studio>.studio-header small{display:block}.collection-studio>.studio-header>.btn,.collection-studio>.studio-header>a{display:inline-flex;align-items:center;order:0;margin-left:0;padding:7px 4px;font-size:11px}.collection-studio>.studio-header>.studio-deadline{margin:0 0 0 44px;flex-basis:calc(100% - 44px)}}

.cm-settings .cm-collection-state .btn{width:100%;min-height:34px;border-color:var(--primary,#07b962);color:var(--primary,#07b962);font-weight:600}
.cm-settings .btn:disabled,.cm-deadline .btn:disabled{opacity:.45;cursor:not-allowed}

.cm-settings .cm-setting-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:8px}.cm-settings .cm-setting-heading h3{margin:0;white-space:nowrap}.cm-settings .cm-setting-heading .btn{flex:none;white-space:nowrap;font-size:11px;min-height:28px;padding:5px 8px}

.cm-settings .cm-collection-state .cm-setting-heading .btn{width:auto;min-height:28px;border-color:var(--line);color:var(--text);font-weight:400}
.cm-settings section>.cm-setting-value-row{align-items:center;justify-content:space-between;gap:12px}.cm-settings .cm-setting-value-row>p{flex:1;min-width:0;margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.cm-settings section>.cm-setting-value-row>.btn{flex:0 0 auto;white-space:nowrap}

.collection-studio>.studio-header>div{display:flex;align-items:center;gap:10px}.collection-studio>.studio-header>div>h1{min-width:0;flex:0 1 auto;line-height:1.4}.collection-studio>.studio-header>div>small{flex:0 0 auto;margin:0;line-height:1.4;white-space:nowrap}
@media(max-width:760px){.collection-studio>.studio-header>div{gap:6px}}

/* Keep the upload prompt together and centered inside the drop target. */
.collection-studio .studio-drop{gap:14px;padding:24px 16px;box-sizing:border-box;text-align:center}
.collection-studio .studio-drop .studio-upload-symbol{display:grid;place-items:center;flex:0 0 60px;width:60px;height:60px;margin:0 0 4px;border-radius:18px;background:var(--primary-soft,#e8f8ef);color:var(--primary,#07b962)}
.collection-studio .studio-upload-symbol svg{width:30px;height:30px}
.collection-studio .studio-drop small{margin:0;line-height:1.6}.collection-studio .studio-drop .drop-limits{margin:0;padding:0;max-width:100%;overflow-wrap:anywhere}
@media(max-width:760px){.collection-studio .studio-drop{gap:10px;padding:18px 12px}.collection-studio .studio-drop .studio-upload-symbol{width:48px;height:48px;flex-basis:48px;border-radius:14px}.collection-studio .studio-upload-symbol svg{width:25px;height:25px}}

/* Description belongs to the collection identity, with a compact two-line preview. */
.collection-studio>.studio-header>.studio-identity{display:block;min-width:0}
.studio-title-row{display:flex;align-items:center;gap:10px;min-width:0}
.studio-title-row h1{min-width:0;line-height:1.4}.collection-studio .studio-title-row small{flex:none;margin:0;line-height:1.4;white-space:nowrap}
.studio-description-wrap{margin-top:5px;max-width:620px}
.collection-studio .studio-description{margin:0;padding:0;font-size:13px;line-height:22px;max-height:44px;white-space:pre-wrap;overflow:hidden;overflow-wrap:anywhere;transition:max-height .22s ease;color:var(--muted)}
.collection-studio .studio-description.is-expanded{overflow-y:auto}
.studio-description-toggle{display:block;border:0;background:none;color:var(--primary,#07b962);font:inherit;font-size:12px;padding:3px 0 0;cursor:pointer}.studio-description-toggle[hidden]{display:none}
.cm-description-count{display:block;text-align:right;color:var(--muted);font-size:12px;margin-top:6px}
@media(max-width:760px){.studio-title-row{gap:6px}.collection-studio>.studio-header>.studio-identity{flex-basis:calc(100% - 44px)}.collection-studio .studio-description{font-size:12px;line-height:20px;max-height:40px}.collection-studio>.studio-header>.studio-avatar{align-self:flex-start;margin-top:2px}}
@media(prefers-reduced-motion:reduce){.collection-studio .studio-description{transition:none}}

@media(max-width:760px){.collection-studio>.studio-header>.studio-deadline{flex:1 1 auto;order:0;margin:0;text-align:right;font-size:10px}}

/* Mobile header: identity above, deadline and navigation on a shared row. */
@media(max-width:760px){
 .collection-studio>.studio-header{display:grid;grid-template-columns:36px minmax(0,1fr) max-content max-content;column-gap:10px;row-gap:12px;min-height:0;padding:16px;align-items:center}
 .collection-studio>.studio-header>.studio-avatar{grid-column:1;grid-row:1;align-self:center;margin:0}
 .collection-studio>.studio-header>.studio-identity{grid-column:2/-1;grid-row:1;min-width:0}
 .collection-studio>.studio-header>.studio-deadline{grid-column:1/3;grid-row:2;margin:0;text-align:left;white-space:normal;line-height:1.6;font-size:10px;min-width:0}
 .collection-studio>.studio-header>.btn{grid-column:3;grid-row:2;margin:0;padding:5px 0;line-height:1.6;font-size:11px}
 .collection-studio>.studio-header>a{grid-column:4;grid-row:2;margin:0;padding:5px 0;line-height:1.6;font-size:11px}
}

/* Clearer type hierarchy for the collection header. */
.collection-studio>.studio-header h1{font-size:22px;font-weight:600}
.collection-studio .studio-title-row small{font-size:13px;font-weight:500;color:var(--text)}
.collection-studio .studio-description{font-size:15px;line-height:25px;max-height:50px;color:var(--text)}
.collection-studio .studio-description-toggle{font-size:13px}
.collection-studio>.studio-header>.studio-deadline{font-size:14px;color:var(--text)}
.collection-studio>.studio-header>.btn,.collection-studio>.studio-header>a{font-size:14px;font-weight:500}
@media(max-width:760px){
 .collection-studio>.studio-header h1{font-size:20px}
 .collection-studio .studio-title-row small{font-size:13px}
 .collection-studio .studio-description{font-size:14px;line-height:23px;max-height:46px}
 .collection-studio>.studio-header>.studio-deadline{font-size:12px}
 .collection-studio>.studio-header>.btn,.collection-studio>.studio-header>a{font-size:13px}
}

.submission-file-list{display:flex;flex-direction:column}.submission-file-row{display:grid;grid-template-columns:36px minmax(0,1fr) 90px auto;align-items:center;gap:16px;padding:18px 4px;border-bottom:1px solid var(--border,#e5e9e7)}.submission-file-row>.file-icon{width:32px;height:36px}.submission-file-info{min-width:0;display:grid;gap:6px}.submission-file-info strong{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;font-weight:600}.submission-file-info small,.submission-file-size{color:var(--muted);font-size:13px}.submission-file-actions{display:flex;gap:8px}.submission-file-actions .btn{display:inline-flex;align-items:center;gap:6px}.submission-file-actions svg{width:17px;height:17px}.submission-file-actions [data-collection-action=delete-submission]{color:#c53d3d}.submission-delete-error{color:#c53d3d}
@media(max-width:600px){.submission-file-row{grid-template-columns:30px minmax(0,1fr);gap:10px;padding:16px 0}.submission-file-info strong{font-size:14px}.submission-file-info small{font-size:12px}.submission-file-size{grid-column:2;grid-row:2}.submission-file-actions{grid-column:2;justify-content:flex-end}.submission-file-actions .btn{min-height:36px}}
