.cm-shell{--cm-ink:#252323;--cm-paper:#f6f4ed;--cm-line:#d6d4c9;--cm-acid:#d5ff44;--cm-pink:#f4badf;color:var(--cm-ink);width:min(1240px,100%);margin:0 auto;padding:clamp(20px,4vw,54px);box-sizing:border-box;line-height:1.45}
.cm-shell *{box-sizing:border-box}
.cm-shell [hidden]{display:none!important}
.cm-shell h1,.cm-shell h2,.cm-shell h3,.cm-shell p{margin:0}
.cm-shell button,.cm-shell input,.cm-shell select,.cm-shell textarea{font:inherit}
.cm-shell button{min-height:36px;cursor:pointer;color:var(--cm-ink);border:0;background:none}
.cm-shell button:focus-visible,.cm-shell input:focus-visible,.cm-shell select:focus-visible,.cm-shell textarea:focus-visible,.cm-shell summary:focus-visible{outline:3px solid #7141bd;outline-offset:3px}
.cm-heading{display:flex;justify-content:space-between;margin-bottom:24px}
.cm-heading .cm-eyebrow{font:700 11px/1.3 ui-monospace,monospace;letter-spacing:.14em;margin-bottom:10px}
.cm-heading h1{font-size:clamp(36px,5vw,68px);line-height:.98;letter-spacing:-.075em;font-weight:850}
.cm-heading h1 span{color:#7055a2}
.cm-heading p:last-child,.cm-section-line p{margin-top:8px;color:#59584f;font-size:15px}
.cm-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid var(--cm-ink);padding-bottom:8px}
.cm-shell .cm-tab{padding:8px 14px;font-size:14px;font-weight:700;border-radius:5px}
.cm-tab:hover{background:#e7e6da}
.cm-shell .cm-tab[aria-current=page]{background:var(--cm-ink);color:white}
.cm-count{display:inline-block;border-radius:4px;padding:0 5px;background:var(--cm-acid);color:var(--cm-ink);font-size:.85em}
.cm-local{font-size:12px;color:#626052;display:flex;align-items:center;gap:6px;margin-top:9px}
.cm-local span{color:#748d36;font-size:9px}
.cm-section-line{margin:28px 0 16px;display:flex;align-items:center;justify-content:space-between;gap:20px}
.cm-section-line h2{font-size:clamp(23px,3vw,33px);letter-spacing:-.055em;line-height:1.15}
.cm-search{min-width:240px;display:flex;align-items:center;border:1px solid var(--cm-line);background:#fffef9;border-radius:6px;padding:0 10px;gap:8px}
.cm-search input{min-height:38px;border:none;background:none;width:100%;font-size:13px}
.cm-search span{font-size:19px}
.cm-filters{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:16px}
.cm-filters button{border:1px solid var(--cm-line);border-radius:40px;font-size:12px;font-weight:700;padding:4px 14px;min-height:33px}
.cm-filters button[aria-pressed=true]{background:var(--cm-acid);border-color:var(--cm-ink)}
.cm-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(175px,100%),1fr));gap:14px}
.cm-card{min-width:0;background:#fffefa;border:1px solid var(--cm-line);border-radius:10px;overflow:hidden;display:flex;flex-direction:column}
.cm-shell .cm-art{display:grid;place-items:center;aspect-ratio:1.45;margin:7px 7px 0;border-radius:5px;overflow:hidden;background:var(--art-bg,#e4dfef);padding:0}
.cm-art img{max-width:81%;max-height:85%;width:100%;height:100%;object-fit:contain}
.cm-color-1{--art-bg:#d9e8d4}.cm-color-2{--art-bg:#f1d9d6}.cm-color-3{--art-bg:#e4e8c7}
.cm-card-copy{padding:12px 12px 8px;flex:1}
.cm-type{font:700 9px/1.4 ui-monospace,monospace;letter-spacing:.08em;text-transform:uppercase;color:#5d594f}
.cm-card h3,.cm-row h3{margin-top:2px;font-size:16px;font-weight:750;letter-spacing:-.035em}
.cm-card p,.cm-row p{font-size:12px;color:#5b5a51}
.cm-actions{display:flex;gap:4px;padding:0 8px 8px}
.cm-actions button{border:1px solid var(--cm-line);border-radius:5px;font-size:12px;font-weight:750}
.cm-actions button:last-child{min-width:35px}
.cm-actions .cm-use{display:flex;align-items:center;justify-content:space-between;padding:0 9px;flex:1}
.cm-actions button:hover,.cm-outline:hover{border-color:var(--cm-ink);background:#f1f0e8}
.cm-shell .cm-primary,.cm-shell .cm-outline{font-weight:700;font-size:13px;padding:8px 14px;border:1px solid var(--cm-ink);border-radius:6px;align-self:start}
.cm-shell .cm-primary{background:var(--cm-acid)}
.cm-primary:hover{filter:brightness(.96)}
.cm-shell .cm-outline{background:#fffef9}
.cm-blocked,.cm-group{margin-top:24px}
.cm-blocked{font-size:14px;border-top:1px solid var(--cm-line);padding-top:12px}
.cm-blocked summary{cursor:pointer}
.cm-shell .cm-inline{font-size:12px;text-decoration:underline}
.cm-empty{border:1px dashed #bebdad;border-radius:7px;padding:19px;color:#646257;font-size:14px;width:100%;grid-column:1/-1}
.cm-empty button{margin-top:12px}
.cm-form{max-width:890px}
.cm-upload-columns{display:grid;grid-template-columns:minmax(150px,.8fr) minmax(230px,1.2fr);gap:clamp(18px,4vw,46px)}
.cm-fields,.cm-dialog-form{display:grid;gap:13px}
.cm-field{display:grid;gap:5px}
.cm-field>span{font-weight:700;font-size:13px}
.cm-field input,.cm-field textarea,.cm-field select{width:100%;padding:9px 10px;color:var(--cm-ink);font-size:14px;background:#fffef9;border:1px solid #bcb9ad;border-radius:5px}
.cm-field textarea{min-height:76px;resize:vertical}
.cm-check{display:flex;gap:9px;align-items:flex-start;font-size:13px;line-height:1.45}
.cm-check input{width:16px;height:16px;flex:none;accent-color:#6851a0;margin:1px}
.cm-shell .cm-help,.cm-rules,.cm-file-state{font-size:12px;color:#615e53}
.cm-upload-file .cm-help{margin:5px 0 12px}
.cm-upload-file .cm-file-state{margin:10px 0}
.cm-preview,.cm-thumb{background:repeating-conic-gradient(#e3e3d9 0% 25%,#f5f4ed 0% 50%) 50% / 16px 16px;display:grid;place-items:center;border-radius:8px;overflow:hidden}
.cm-preview{aspect-ratio:1.35;border:1px solid var(--cm-line);margin-bottom:14px}
.cm-preview img,.cm-thumb img,.cm-inspect img{width:100%;height:100%;object-fit:contain}
.cm-preview img{max-width:88%;max-height:88%}
.cm-preview span{font-size:60px;color:#836c98}
.cm-group{display:flex;gap:8px;align-items:center;letter-spacing:-.035em;margin-bottom:10px!important}
.cm-group small{border:1px solid #bcb9ad;border-radius:4px;padding:1px 5px;font-size:11px;letter-spacing:0}
.cm-list{display:grid;gap:7px}
.cm-row{display:flex;align-items:center;gap:12px;background:#fffefa;border:1px solid var(--cm-line);padding:11px;border-radius:8px}
.cm-row-text{flex:1;min-width:0;overflow-wrap:anywhere}
.cm-row-text p{margin-top:3px}
.cm-row-actions{max-width:360px;display:flex;justify-content:flex-end;flex-wrap:wrap;gap:5px}
.cm-thumb{width:66px;height:66px;flex:none}
.cm-thumb img{max-width:90%;max-height:90%}
.cm-status{display:inline-block;padding:3px 6px;border-radius:3px;font:700 10px/1.2 ui-monospace,monospace;background:#edeacb}
.cm-status.s-approved{background:#e1f0be}.cm-status.s-removed,.cm-status.s-rejected{background:#fae2e2}.cm-status.s-proof{background:#eadcf2}
.cm-dialog{font-family:inherit;color:var(--cm-ink);background:#fffdf6;width:min(470px,calc(100vw - 30px));max-height:85dvh;border:1px solid var(--cm-ink);border-radius:12px;padding:22px;box-shadow:6px 7px 0 #26252529;overflow:auto}
.cm-dialog:not([open]){display:none}
.cm-dialog::backdrop{background:#24221f80}
.cm-dialog-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px;margin-bottom:14px}
.cm-dialog h2{font-size:23px;line-height:1.1;letter-spacing:-.04em}
.cm-shell .cm-close{font-size:25px;min-width:34px;min-height:34px;line-height:1;border:1px solid var(--cm-line);border-radius:20px}
.cm-dialog p{font-size:14px;margin-bottom:12px}
.cm-dialog-options{display:grid;gap:8px}
.cm-inspect{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-bottom:8px}
.cm-inspect>div{background:#f0ede5;aspect-ratio:1;display:grid;place-items:center;overflow:hidden;border-radius:5px}
.cm-inspect>div:last-child{background:#2b2a31}
.model-discovery{margin:18px 0 28px}
.model-heading,.artist-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:14px}
.model-heading h2{font-size:clamp(20px,3vw,27px);letter-spacing:-.04em}
#models-list,.model-cards{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.model-card{display:flex;flex-direction:column;align-items:stretch;gap:5px;overflow:hidden;text-align:left;background:var(--paper,#fffdf8);border:1px solid var(--line,#bdb9b2);border-radius:10px;padding:7px 7px 12px;min-width:0}
.model-card:hover,.artist-work:hover{border-color:var(--ink,#29232e)}
.model-card img{width:100%;height:clamp(118px,18vw,191px);object-fit:contain;background:#eeece5;border-radius:5px;padding:6px}
.model-card strong,.model-card span{margin:0 3px;line-height:1.25}
.model-card span{font-size:12px;color:var(--mute,#57535d)}
.model-tile{display:flex;flex-direction:column;min-width:0;border:1px solid var(--line,#bdb9b2);background:var(--paper,#fffdf8);border-radius:10px}
.model-tile .model-card{border:0;padding-bottom:3px}
.model-tile:focus-within,.model-tile:hover{border-color:var(--ink,#29232e)}
.model-tile .cm-artist{align-self:flex-start;margin:0 10px 4px}
#models-dialog,#artists-dialog{width:min(710px,94vw);max-height:90vh;max-height:90dvh;overflow:auto;overscroll-behavior:contain;box-sizing:border-box}
#models-dialog [hidden],#artists-dialog [hidden],.model-discovery[hidden]{display:none!important}
.model-layout{display:grid;grid-template-columns:minmax(130px,1fr) minmax(190px,.9fr);gap:18px;align-items:start}
.model-stage{position:relative;display:grid;place-items:center;border:1px solid var(--line,#c1bdb7);border-radius:8px;padding:8px;overflow:hidden;background:#ebe9e2}
#model-preview{display:block;max-width:100%;max-height:53vh;max-height:53dvh;width:auto;height:auto;object-fit:contain;touch-action:none;cursor:grab}
#model-preview:active{cursor:grabbing}
#model-camera-view{position:absolute;inset:0;display:grid;place-items:center;background:#151419}
#model-camera-view video{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
#model-camera-view output{position:absolute;font:bold 58px/1 system-ui;color:white;text-shadow:0 2px 8px #000}
#models-back{margin:0 0 10px}
.model-controls{display:grid;gap:8px}
.model-controls p,.model-controls small{margin:0;line-height:1.4}
.model-controls .light-btn,.model-controls .primary,#model-slots button,.model-heading .light-btn,.artist-bar .light-btn,.artist-row{min-height:41px}
#model-author,#model-status,#model-replace-note{font-size:13px}
#model-slots{display:flex;flex-wrap:wrap;gap:5px}
#model-slots button{min-width:55px;padding:5px 8px}
#model-slots [aria-pressed=true]{outline:2px solid #754d83;outline-offset:-2px}
.cm-artist{border:0;padding:3px 0;background:none;color:#584669;text-decoration:underline;text-underline-offset:2px;text-align:left;font:inherit;font-size:13px}
#artists-body h3{margin:16px 0 9px;font-size:16px}
.artist-row{display:block;width:100%;margin:6px 0;text-align:left}
.artist-works{display:grid;grid-template-columns:repeat(auto-fill,minmax(90px,1fr));gap:7px;margin-bottom:14px}
.artist-work{display:grid;justify-items:center;align-content:start;padding:5px;border-radius:7px;border:1px solid var(--line,#bbb);background:white;color:inherit;font:inherit;font-size:12px}
.artist-work img{width:100%;height:72px;object-fit:contain}
@media(max-width:560px){
  #models-list,.model-cards{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  #models-dialog,#artists-dialog{padding:14px;max-height:95vh;max-height:95dvh}
  .model-layout{grid-template-columns:1fr;gap:9px}
  #model-preview{max-height:32vh;max-height:32dvh}
  .model-controls{grid-template-columns:1fr 1fr}
  .model-controls p,.model-controls small,#model-slots,#model-apply,#model-author{grid-column:1/-1}
}
@media(max-width:620px){
  .cm-heading{margin-bottom:14px}.cm-heading h1{font-size:40px}.cm-section-line{align-items:stretch;flex-direction:column;gap:10px;margin-top:20px}
  .cm-search{min-width:0}.cm-tabs{gap:2px}.cm-shell .cm-tab{padding:5px 7px;font-size:12px}
  .cm-upload-columns{grid-template-columns:1fr}.cm-preview{aspect-ratio:2.1}.cm-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  .cm-actions{gap:2px}.cm-actions .cm-use{padding:0 5px}.cm-actions button:last-child{min-width:28px}
  .cm-row{align-items:flex-start;flex-wrap:wrap}.cm-row-actions{max-width:none;width:100%;justify-content:flex-start}.cm-row .cm-thumb{width:44px;height:44px}
}
