.desk-card-heading,.cs-header,.cs-nav,.cs-footer,.cs-footer>div,.cs-bot,.cs-preview-label,.cs-switch,.cs-topic,.cs-tokens,.cs-demo-buttons { display:flex; align-items:center; }
.desk-card-heading { gap:.6rem; justify-content:space-between; flex-wrap:wrap; }
.ticket-desk-card .customize-control { align-self:flex-end; }
.community-studio { width:min(940px,95vw); max-width:95vw; max-height:92vh; max-height:92dvh; margin:auto; padding:0; border:1px solid #874258; border-radius:20px; color:#f9edf1; background:#1a1218; box-shadow:0 24px 100px #000a; color-scheme:dark; font:inherit; overflow:hidden; }
.community-studio[open] { display:flex; flex-direction:column; }
.community-studio::backdrop { background:#120911db; backdrop-filter:blur(6px); }
.community-studio * { box-sizing:border-box; }
.community-studio [hidden] { display:none!important; }
.community-studio :is(input,select,textarea,button) { font:inherit; }
.community-studio button { cursor:pointer; }
.community-studio :focus-visible { outline:2px solid #ffb2c3; outline-offset:3px; }
.cs-header { padding:20px 24px; gap:12px; background:linear-gradient(110deg,#41202d,#21171f 70%); border-bottom:1px solid #472a35; }
.cs-header img { width:44px; height:44px; object-fit:cover; border-radius:12px; }
.cs-header h2 { font-size:1.23rem; margin:0; line-height:1.25; }
.cs-header p,.cs-hint,.cs-field small,.community-studio small,.cs-status { color:#c6b5c0; font-size:.8rem; line-height:1.5; }
.cs-header p { margin:3px 0 0; }
.cs-header button,.cs-topic button { margin-left:auto; border:1px solid #573543; border-radius:9px; background:#291b23; color:#ecdce3; font-size:1.3rem; width:34px; height:34px; flex:none; }
.cs-nav { padding:0 24px; gap:14px; border-bottom:1px solid #422833; overflow:auto; flex-shrink:0; }
.cs-nav button { border:0; border-bottom:2px solid transparent; padding:13px 3px; color:#c0abb7; font-weight:600; font-size:.88rem; background:none; }
.cs-nav button[aria-pressed="true"] { color:#ff9db5; border-color:#ff4b79; }
.cs-scroll { overflow:auto; overscroll-behavior:contain; scrollbar-color:#835168 #22171e; scrollbar-width:thin; min-height:0; }
.cs-work { display:grid; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr); gap:24px; padding:22px 24px; align-items:start; }
.cs-controls { display:grid; gap:14px; min-width:0; }
.cs-field { display:grid; gap:5px; min-width:0; }
.cs-field label,.cs-switch strong,.cs-roles legend { color:#f4e4eb; font-size:.86rem; font-weight:650; }
.community-studio :is(input:not([type=checkbox]),textarea,select) { width:100%; min-width:0; padding:9px 11px; background:#201820; border:1px solid #573946; color:#faf1f5; border-radius:8px; font-size:.9rem; }
.community-studio textarea { resize:vertical; line-height:1.5; }
.community-studio input[type=color] { height:36px; padding:3px; width:80px; cursor:pointer; }
.cs-switch { border:1px solid #48343e; padding:11px 13px; border-radius:11px; justify-content:space-between; gap:14px; background:#261b23; cursor:pointer; }
.cs-switch:has(:checked) { border-color:#824057; background:#321c27; }
.cs-switch small,.cs-switch strong { display:block; }
.cs-switch input { appearance:none; width:35px; height:21px; background:#685663; border-radius:20px; position:relative; flex:none; cursor:pointer; transition:background .15s; }
.cs-switch input:checked { background:#d72e59; }
.cs-switch input::after { content:''; position:absolute; inset:3px auto auto 3px; border-radius:50%; width:15px; height:15px; background:white; transition:transform .15s; }
.cs-switch input:checked::after { transform:translateX(14px); }
.cs-tokens,.cs-demo-buttons { flex-wrap:wrap; gap:5px; }
.cs-tokens { margin-top:-7px; }
.cs-tokens button,.cs-add,.cs-back,.cs-secondary { color:#ffd0dc; border:1px solid #85475b; background:#331e29; padding:5px 9px; border-radius:7px; font-size:.78rem; }
.cs-tokens button:hover,.cs-secondary:hover,.cs-add:hover { background:#492638; }
.cs-roles { min-width:0; padding:10px; margin:0; border:1px solid #503541; border-radius:10px; }
.cs-roles legend { padding:0 4px; }
.cs-role-list { margin-top:6px; display:grid; gap:2px; max-height:145px; overflow:auto; scrollbar-width:thin; }
.cs-role-list label { padding:5px; display:flex; gap:8px; align-items:center; color:#e6dbe1; cursor:pointer; font-size:.82rem; }
.cs-role-list label:has(:checked) { background:#422433; border-radius:5px; }
.cs-role-list input { accent-color:#df3562; }
.cs-hint { margin:0; }
.cs-topics { display:grid; gap:9px; }
.cs-topic { gap:8px; }
.cs-topic>span { font-size:.78rem; color:#d3a1b4; }
.cs-topic button { font-size:1rem; }
.cs-add { justify-self:start; font-weight:bold; }
.cs-preview { position:sticky; top:0; min-width:0; overflow-wrap:anywhere; background:#222129; border:1px solid #493b48; border-radius:14px; overflow:hidden; padding:14px 15px 13px; }
.cs-preview-label { text-transform:uppercase; gap:7px; color:#d5c0cc; font-size:.66rem; font-weight:700; letter-spacing:.11em; }
.cs-preview-label i { width:7px; height:7px; background:#6cd9ab; border-radius:50%; }
.cs-preview-channel { color:#ece4ed; padding:9px 0 12px; border-bottom:1px solid #433a46; font-size:.94rem; font-weight:700; margin-bottom:13px; }
.cs-bot { gap:7px; margin-bottom:8px; font-size:.87rem; }
.cs-bot img { width:29px; height:29px; object-fit:cover; border-radius:50%; }
.cs-bot span { background:#5865aa; border-radius:4px; color:white; font-size:.56rem; padding:0 4px; }
.cs-embed,.cs-plain { padding:12px; border-radius:5px; background:#302c36; color:#ede9ef; font-size:.85rem; }
.cs-embed { border-left:4px solid var(--cs-accent); }
.cs-plain { padding:0; background:transparent; }
.cs-embed p,.cs-plain p { white-space:pre-wrap; margin:5px 0 0; line-height:1.45; }
.cs-preview select { margin-top:8px; }
.cs-demo-buttons { margin-top:7px; }
.cs-demo-buttons button { color:white; border:none; padding:6px 9px; border-radius:4px; font-size:.72rem; background:#535eae; }
.cs-demo-buttons button:hover { background:#626ec8; }
.cs-back { margin-top:8px; }
.cs-caption { display:block; margin-top:12px; }
.cs-assignment { margin:10px 0; }
.cs-assignment p { margin:5px 0; font-size:.85rem; }
.cs-assignment b { display:inline-block; background:#403348; color:#f4c7df; border-radius:6px; padding:2px 6px; margin:2px; }
.cs-footer { border-top:1px solid #50303e; padding:13px 24px; gap:12px; justify-content:space-between; background:#241820; }
.cs-footer>div { gap:8px; flex-shrink:0; }
.cs-footer button { border-radius:9px; padding:9px 13px; font-size:.83rem; font-weight:700; }
.cs-primary { background:#d82755; color:white; border:1px solid #f15079; }
.cs-primary:hover { background:#ed345f; }
.cs-error { color:#ff9bb1; }
.community-studio button:disabled { opacity:.48; cursor:default; }
@media (max-width:680px) {
  .cs-work { grid-template-columns:minmax(0,1fr); gap:16px; padding:16px; }
  .cs-preview { position:static; }
  .cs-header,.cs-footer { padding:12px 16px; }
  .cs-footer { flex-wrap:wrap; gap:6px; }
  .cs-nav { padding:0 14px; gap:12px; }
  .cs-footer>div { margin-left:auto; }
}
@media (prefers-reduced-motion:reduce) {
  .cs-switch input,.cs-switch input::after { transition:none; }
}

.cs-banner { width:100%; max-height:140px; object-fit:contain; background:#26222b; border-radius:6px; margin-top:7px; }

.cs-topic { display:grid; grid-template-columns:1em minmax(0,1fr) auto; border-bottom:1px solid #49313e; padding:0 0 12px; }
.cs-topic-route { grid-column:2 / -1; display:grid; gap:4px; color:#c6b5c0; font-size:.76rem; }

.cs-routing { display:grid; grid-template-columns:auto 1fr; gap:4px 10px; padding-top:10px; font-size:.76rem; }
.cs-routing dt { color:#c6b5c0; }
.cs-routing dd { margin:0; }
