body {
    background-color: #202020;
    margin: 0;
    color: white;
    font-family: Arial, sans-serif;
    height: 100vh; /* Full viewport height */
    display: flex;
    flex-direction: column;
    align-items: center;
}
/* Tabs for web viewer landing page */
.wv-tabs { width:100%; max-width:1280px; margin:0 auto; padding:16px 16px 40px; box-sizing:border-box; }
.wv-tablist { 
    position:fixed; top:18px; left:50%; transform:translateX(-50%); z-index:120; 
    display:flex; gap:14px; 
    justify-content:center; 
    padding:6px 14px; 
    margin:0; 
    background:rgba(32,32,32,0.9); 
    backdrop-filter:blur(10px) saturate(140%);
    border:1px solid rgba(255,255,255,0.06);
    border-radius:18px; 
    box-shadow:0 4px 18px -4px rgba(0,0,0,0.55), 0 0 0 1px rgba(255,255,255,0.04);
}
.wv-tab { background:transparent; color:#d0d0d0; border:1px solid transparent; padding:10px 22px; border-radius:12px; cursor:pointer; font-size:15px; font-weight:600; letter-spacing:.4px; transition:background .25s, color .25s, border-color .25s, box-shadow .25s; position:relative; }
.wv-tab:hover { background:#2b2b2b; color:#fff; }
.wv-tab.active { background:#4CAF50; border-color:#4CAF50; color:#fff; box-shadow:0 4px 14px -2px rgba(0,0,0,.45); }
.wv-tab:focus { outline:2px solid #4CAF50; outline-offset:2px; }
.wv-tabpanel { animation: fadeTab .35s ease; }
@keyframes fadeTab { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
/* Viewer media moved to end (Viewer Media) */
/* =============================================
   Sender Pages: Core Layout (Prompt/Image/Sketch)
   ============================================= */
/* Prompt page layout adjustments */
body.prompt-mode { overflow:hidden; }
body.prompt-mode .sender-container { overflow-y:auto; -webkit-overflow-scrolling: touch; }
body.prompt-mode .sender-container { align-items:center; }
body.prompt-mode .sender-container > .prompt-box { flex:0 0 auto; }
body.prompt-mode .sender-container > .favorites-section { flex:0 0 auto; }
.no-select, .no-select * { user-select: none; -webkit-user-select: none; }
.no-select input, .no-select textarea, .no-select select, .no-select button, .no-select [contenteditable="true"] { user-select: text; -webkit-user-select: text; }
body.prompt-mode .sender-container { scrollbar-width:thin; }
body.prompt-mode .sender-container::-webkit-scrollbar { width:10px; }
body.prompt-mode .sender-container::-webkit-scrollbar-track { background:transparent; }
body.prompt-mode .sender-container::-webkit-scrollbar-thumb { background:#2e2e2e; border-radius:6px; }
body.prompt-mode .sender-container::-webkit-scrollbar-thumb:hover { background:#3a3a3a; }

/* =============================================
   Sender Responsive: Up to 900px (phones/tablets)
   Use body scroll to avoid nested scroll issues; top-align content
   ============================================= */
/* Sender media moved to end (Sender Media) */

/* ================= Favorites Section (Prompt Sender) ================= */
.favorites-section {
    width:100%;
    max-width:980px; /* align with compact prompt-box width */
    margin: 18px auto 40px auto;
    padding: 0 4px;
    box-sizing: border-box;
    display:flex;
    flex-direction:column;
    gap:10px;
}
.favorites-header {
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px 16px;
    font-size:13px;
    color:#bdbdbd;
}
.favorites-header .fav-title { font-weight:600; color:#e6e6e6; font-size:14px; }
.favorites-hint { opacity:.75; }
.fav-add-btn {
    margin-left:auto;
    background:#1e1e1e;
    border:1px solid #2e2e2e;
    color:#d5d5d5;
    padding:6px 14px;
    font-size:12.5px;
    border-radius:8px;
    cursor:pointer;
    transition:background .25s, border-color .25s, color .25s;
}
.fav-add-btn:hover { background:#2a2a2a; border-color:#3a3a3a; }
.fav-add-btn:active { background:#333; }

.favorites-grid {
    display:grid;
    /* Default: 4 columns for prompt favorites (except phones) */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap:12px;
    width:100%;
}
.fav-slot {
    position:relative;
    border:1px solid #303030;
    background:linear-gradient(150deg,#232323,#151515 60%,#101010 100%);
    border-radius:16px;
    padding:10px 14px 12px 14px;
    font-size:13px;
    line-height:1.38;
    white-space:normal;
    cursor:pointer;
    transition:border-color .25s, background .35s, box-shadow .25s, transform .25s;
    height:120px; /* reduced fixed height */
    display:flex;
    flex-direction:column;
    align-items:stretch;
    box-shadow:0 2px 7px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,0.05);
    backdrop-filter: blur(2px);
}
.fav-slot:not(.empty):hover { border-color:#4CAF50; box-shadow:0 4px 12px rgba(0,0,0,.65), 0 0 0 1px rgba(76,175,80,0.35); transform:translateY(-2px); }
.fav-slot.empty { border:1px dashed #3a3a3a; background:linear-gradient(145deg,#181818,#111); color:#666; cursor:default; }
.fav-slot.empty:hover { border-color:#4a4a4a; }
.fav-text { flex:1 1 auto; width:100%; overflow-y:auto; overflow-x:hidden; white-space:normal; word-break:break-word; scrollbar-width:thin; }
.fav-text::-webkit-scrollbar { width:6px; }
.fav-text::-webkit-scrollbar-track { background:transparent; }
.fav-text::-webkit-scrollbar-thumb { background:#3a3a3a; border-radius:4px; }
.fav-text::-webkit-scrollbar-thumb:hover { background:#4a4a4a; }

/* New hover overlay with number + title */
.fav-hover-overlay { position:absolute; inset:0; display:none; flex-direction:column; align-items:center; justify-content:center; text-align:center; padding:8px 10px; gap:4px; background:rgba(0,0,0,0.55); color:rgba(255,255,255,0.86); pointer-events:none; border-radius:inherit; font-family:inherit; z-index:2; }
.fav-hover-overlay .fav-hover-num { font-size:44px; font-weight:700; letter-spacing:1px; line-height:1; text-shadow:0 2px 8px rgba(0,0,0,0.55),0 0 18px rgba(0,0,0,0.65); }
.fav-hover-overlay .fav-hover-title { font-size:18px; font-weight:500; max-width:90%; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; opacity:.9; text-shadow:0 2px 6px rgba(0,0,0,0.6); }
.fav-slot:not(.empty):hover .fav-hover-overlay { display:flex; }
/* Reduce underlying text opacity when overlay shown */
.fav-slot:not(.empty):hover > .fav-text { opacity:0.6; }
/* Disable old ::after number mask visual (kept for layout fallback) */
.fav-slot::after { content:none; }

/* Force disable legacy number pseudo-element to avoid ghost duplicate */
.fav-slot::after, .fav-slot:not(.empty):hover::after { content:none !important; display:none !important; }

/* Hover shortcut number overlay */
.fav-slot::after {
    content: attr(data-slot);
    position:absolute; inset:0;
    display:flex; align-items:center; justify-content:center;
    font-size:52px; font-weight:700; letter-spacing:1px;
    color:rgba(255,255,255,0); /* hidden by default */
    pointer-events:none; mix-blend-mode:normal;
    transition: opacity .3s ease, transform .35s ease;
    text-shadow:0 2px 8px rgba(0,0,0,0.55), 0 0 18px rgba(0,0,0,0.65);
    opacity:0;
    transform:scale(.9);
}
.fav-slot:not(.empty):hover::after { 
    color:rgba(255,255,255,0.52); 
    opacity:1; 
    transform:scale(1); 
    background:rgba(0,0,0,0.55); /* pure dark mask, no blur */
    border-radius:inherit;
}
/* Keep underlying text readable (dim only slightly) */
.fav-slot:not(.empty):hover > .fav-text { opacity:0.65; transition:opacity .25s ease; filter:none; }
/* Clear button always fully visible and above mask */
.fav-clear-btn { z-index:4; }
.fav-slot:not(.empty):hover > .fav-clear-btn { opacity:1 !important; }
/* Enlarge clear button for better touch target */
/* Unified small clear button style (reused by prompt clear & favorite slot clear) */
.icon-clear-btn, .prompt-clear-btn {
    background:rgba(40,40,40,0.85);
    color:#ccc;
    border:1px solid #444;
    width:28px; height:28px;
    padding:0;
    line-height:1;
    font-size:15px;
    border-radius:8px;
    cursor:pointer;
    display:flex; align-items:center; justify-content:center;
    backdrop-filter:blur(4px);
    transition: background .25s, color .25s, border-color .25s, transform .25s, opacity .25s;
}
.icon-clear-btn:hover, .prompt-clear-btn:hover { background:rgba(55,55,55,0.95); color:#fff; border-color:#555; }
.icon-clear-btn:active, .prompt-clear-btn:active { transform:scale(.9); background:#5a1e1e; border-color:#7a2a2a; color:#fff; }
.icon-clear-btn:focus, .prompt-clear-btn:focus { outline:2px solid #4CAF50; outline-offset:2px; }
/* Favorite slot specific positioning & reveal */
.fav-clear-btn { position:absolute; top:8px; right:8px; opacity:0; pointer-events:none; }
.fav-slot:hover .fav-clear-btn { opacity:1; pointer-events:auto; }
.fav-empty-label { opacity:.55; }

/* Clear All link placed at end of grid */
.fav-clear-all-wrapper { 
    display:flex; align-items:center; justify-content:center; 
    border:1px dashed #333; 
    background:linear-gradient(145deg,#1a1a1a,#121212); 
    border-radius:16px; 
    padding:10px; 
    height:120px; 
}
.fav-clear-all-link { 
    background:none; 
    border:none; 
    color:#c85d5d; 
    font-size:13px; 
    cursor:pointer; 
    text-decoration:underline; 
    padding:4px 10px; 
    border-radius:8px; 
    transition:color .25s, background .25s; 
}
.fav-clear-all-link:hover { color:#ff7b7b; background:#262020; }
.fav-clear-all-link:active { color:#ff9b9b; }

.favorites-header {
  gap:10px 16px;
}
.favorites-header-left {
  display:flex;
  align-items:center;
  gap:12px;
  flex-wrap:wrap;
}
.favorites-modules-select {
  width:180px;
  background:#141414;
  border:1px solid #2f2f2f;
  border-radius:10px;
  color:#f4f4f4;
  padding:5px 8px;
  font-size:12.5px;
}
.favorites-hint-line {
  margin-top:4px;
  font-size:12px;
  color:#bdbdbd;
}
.fav-actions-right {
  margin-left:auto;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
}
.fav-actions-right .fav-btn span,
.fav-actions-right .fav-add-btn span {
  margin-left:6px;
}
.favorites-section .fav-btn,
.favorites-section .fav-add-btn {
  background:#1e1e1e;
  border:1px solid #2e2e2e;
  color:#d5d5d5;
  border-radius:10px;
  padding:6px 12px;
  font-size:13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  transition:background .2s ease, color .2s ease, border-color .2s ease;
}
.favorites-section .fav-btn:hover,
.favorites-section .fav-add-btn:hover {
  background:#262626;
  color:#fff;
  border-color:#3a3a3a;
}
.favorites-section .fav-btn:active,
.favorites-section .fav-add-btn:active {
  background:#303030;
  border-color:#454545;
}
@media (max-width: 640px) {
  .favorites-header {
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:8px;
  }
  .favorites-header-left {
    flex:1 1 auto;
    gap:10px;
  }
  .favorites-modules-inline {
    flex:1 1 auto;
    justify-content:flex-end;
  }
  .favorites-modules-select {
    width: 140px; 
    min-width:100px;
  }
  .fav-actions-right {
    flex:1 1 auto;
    justify-content:flex-end;
  }
  .fav-actions-right .fav-btn span,
  .fav-actions-right .fav-add-btn span {
    display:none;
  }
}

@media (max-width: 480px) {
  .favorites-header {
    flex-direction:column;
    align-items:stretch;
    gap:10px;
  }
  .favorites-header-left {
    width:100%;
  }
  .favorites-modules-inline {
    justify-content:flex-start;
    width:100%;
    gap:6px;
    flex-wrap:nowrap;
  }
  .favorites-modules-select {
    width: 55%;
  }
  .favorites-modules-inline .fav-btn {
    margin-left: 10px;
    width: 40%;
  }
  .fav-actions-right {
    width:100%;
    justify-content:stretch;
  }
  .fav-actions-right button {
    flex:1 1 auto;
  }
  .fav-actions-right .fav-btn span,
  .fav-actions-right .fav-add-btn span {
    display:none;
  }
}

/* Prompt floating tools (top-right overlay inside prompt box) */
.prompt-textarea-wrapper { position:relative; }
.prompt-clear-btn { 
    background:rgba(40,40,40,0.85); 
    color:#ccc; 
    border:1px solid #444; 
    width:28px; height:28px; 
    border-radius:8px; 
    font-size:15px; 
    line-height:1; 
    cursor:pointer; 
    display:flex; align-items:center; justify-content:center; 
    backdrop-filter: blur(4px); 
    transition: background .25s, color .25s, border-color .25s, transform .25s; 
}
.prompt-clear-btn { position:absolute; top:6px; right:6px; }
.prompt-clear-btn:hover { background:rgba(55,55,55,0.95); color:#fff; border-color:#555; }
.prompt-clear-btn:active { transform:scale(.9); background:#5a1e1e; border-color:#7a2a2a; color:#fff; }
.prompt-clear-btn:focus { outline:2px solid #4CAF50; outline-offset:2px; }

/* Add button feedback */
.fav-btn.fav-added, .fav-add-btn.fav-added { animation:favAddedPulse .6s ease; }
@keyframes favAddedPulse { 0%{box-shadow:0 0 0 0 rgba(76,175,80,0.0);} 35%{box-shadow:0 0 0 6px rgba(76,175,80,0.35);} 100%{box-shadow:0 0 0 0 rgba(76,175,80,0);} }

/* Replace overlay */
.fav-replace-overlay {
    position:fixed; inset:0; z-index:3000;
    background:rgba(0,0,0,0.68);
    display:flex; align-items:center; justify-content:center;
    padding:20px; box-sizing:border-box;
}
.fav-replace-overlay.hidden { display:none; }
.fav-replace-dialog {
    background:#121212; border:1px solid #2b2b2b; border-radius:14px;
    width:100%; max-width:680px; max-height:80vh; display:flex; flex-direction:column;
    padding:20px 22px 20px 22px; box-sizing:border-box; gap:16px;
}
.fav-replace-dialog h3 { margin:0; font-size:17px; font-weight:600; }
.fav-dialog-message {
    margin: 4px 0 12px;
    color: #d7d7d7;
    font-size: 13.5px;
    line-height: 1.5;
    white-space: pre-wrap;
}
.fav-dialog-btn { margin-left: 10px; }
.fav-replace-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(200px,1fr)); gap:10px; overflow-y:auto; padding:2px; }
.fav-replace-slot { text-align:left; background:#1d1d1d; border:1px solid #2f2f2f; color:#d7d7d7; padding:10px 12px; font-size:12.5px; line-height:1.35; border-radius:10px; cursor:pointer; display:flex; flex-direction:column; gap:6px; min-height:70px; transition:background .25s, border-color .25s; }
.fav-replace-slot:hover { background:#242424; border-color:#3f3f3f; }
.fav-replace-slot .slot-label { font-weight:600; color:#4CAF50; font-size:11px; letter-spacing:.5px; }
.fav-replace-slot .slot-text { flex:1; white-space:normal; overflow:hidden; }
.fav-replace-footer { display:flex; justify-content:flex-end; }
.close-replace-btn { background:#272727; border:1px solid #363636; color:#ccc; padding:8px 18px; border-radius:8px; cursor:pointer; font-size:13px; }
.close-replace-btn:hover { background:#303030; }
.close-replace-btn:active { background:#383838; }

/* Prompt style dialog (Prompt Sender) */
#promptStyleDialogOverlay .fav-replace-dialog {
  padding: 14px 16px;
  gap: 10px;
}
#promptStyleDialogOverlay .fav-dialog-title {
  font-size: 15px;
  line-height: 1.2;
}
#promptStyleDialogOverlay .input-row {
  margin: 6px 0 0;
}
#promptStyleDialogOverlay .input-row input[type="text"] {
  padding: 8px 10px;
  font-size: 13px;
}
#promptStyleOptionsScroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 2px;
}
#promptStyleOptionsGroup {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#promptStyleDialogOverlay .prompt-style-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
#promptStyleDialogOverlay .prompt-style-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
}
#promptStyleDialogOverlay .prompt-style-section-line {
  flex: 1 1 auto;
  height: 1px;
  background: rgba(255,255,255,0.10);
}
#promptStyleDialogOverlay .prompt-style-section-title {
  white-space: nowrap;
}
#promptStyleDialogOverlay .prompt-style-tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 72px);
  gap: 8px;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  justify-content: center;
}
#promptStyleDialogOverlay .prompt-style-hidden {
  display: none !important;
}

/* Responsive tweaks moved to end (Sender Media) */

.wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    height: auto;
    min-height: 100%;
    box-sizing: border-box;
}

/* Flex container for dialogs */
.showcase-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.input-container {
    display: none; /* initially hidden. using "flex" to show it */
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    background-color: transparent;
    max-height: 100vh; 
    overflow-y: auto;
    margin: auto 0;
}
.input-container.is-overflow {
    justify-content: flex-start;
    margin: 20px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.input-container.is-overflow::-webkit-scrollbar {
    width: 6px;
}
.input-container.is-overflow::-webkit-scrollbar-track {
    background: transparent;
}
.input-container.is-overflow::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 99px;
}
.input-container.is-overflow::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* Dialog styles */
.dialog {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 90%;
    min-width: 300px;
    max-width: 400px;
    padding: 20px;
    background-color: #2d2d2d;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
}

/* Add hover effect */
.dialog:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.4);
    background-color: #333333;
}

.dialog button {
    margin-top: 20px;
    padding: 10px 0;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}

.dialog button:hover {
    background-color: #45a049;
}

/* Anchor styled like the dialog button for data-driven links */
.dialog a.btn {
    display: block;
    margin-top: 20px;
    padding: 10px 0;
    border: none;
    border-radius: 5px;
    background-color: #4CAF50;
    color: white;
    font-size: 16px;
    cursor: pointer;
    width: 100%;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s;
}
.dialog a.btn:hover {
    background-color: #45a049;
}

/* Viewer large-screen media moved to end (Viewer Media) */

.shortcut-keys {
    margin-top: 20px;
    font-size: 12px;
    color: #ccc;
    text-align: left;
    width: 90%;
    max-width: 380px;
}

.shortcut-keys h2 {
    margin: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #fff;
}

.shortcut-keys p {
    margin: 0;
    margin-bottom: 5px;
}

h1 {
    font-size: 28px;
    margin: 0;
    padding-bottom: 10px;
    width: 100%;
    text-align: center;
}

.sub-title {
    margin-bottom: 20px;
    width: 100%;
    text-align: center;
    font-size: 12px;
    color: #ccc;
}

.sub-title a {
    color: #4CAF50;
    text-decoration: none;
}

.input-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 10px 0;
    width: 100%;
    position: relative; /* for absolute-positioned adorners (e.g., status icon) */
}

.input-row > summary {
    text-align: left;
}

.input-row label {
    margin-bottom: 5px;
    font-size: 16px;
}

.input-row .server-status-indicator {
    position: absolute; 
    top: 35px; 
    right: 10px; 
    display: none; 
    font-size: 18px; 
    color: gray;
}

.input-row input[type="text"],
.input-row input[type="number"] {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    width: 150px;
    box-sizing: border-box;
    outline: none;
}

.input-row input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    width: 200px;
    height: 8px;
    background: #ddd;
    border-radius: 5px;
    outline: none;
}

.input-row input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
}

.input-row input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.input-row input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.input-row select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    width: 150px;
    box-sizing: border-box;
    outline: none;
    background-color: white;
    color: #222;
    appearance: none; /* Remove default arrow for select */
}

.input-row select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 5px rgba(76, 175, 80, 0.5);
}

.input-row select option {
    background-color: #2d2d2d;
    color: white;
}

/* In Image WebSocket Viewer settings: make top-level inputs full width,
   while inputs inside Advanced Settings (<details>) keep the default 150px. */
.dialog.viewer-settings > .input-row:not(details) input[type="text"],
.dialog.viewer-settings > .input-row:not(details) input[type="number"],
.dialog.viewer-settings > .input-row:not(details) select {
    width: 100%;
}

.filters-section > summary {
    text-align: left;
    margin-top: 10px;
    margin-bottom: 10px;
}

#resetFiltersBtn {
    padding: 5px 10px;
    background-color: transparent;
    color: #4CAF50;
    border: none;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    margin-top: 0px;
    text-decoration: none;
    box-shadow: none;
}

#resetFiltersBtn:hover {
    color: #45a049;
    text-decoration: none;
}

#visualizer {
    background: transparent;
    width: 300px;
    height: 300px;
    display: block;
    margin: 0 auto;
}

.audio-container {
    display: flex;
    width: 100%;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    object-fit: contain;
    object-position: center;
}

.audio-container audio {
    margin-top: 20px;
}

.video-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100vw;
    height: 100vh;
    background-color: #222222;
}

.video-container video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: none;
    object-position: center;
}

.image-container {
    position: relative;
    width: 100vw;
    height: 100vh;
    background-color: #222222;
    overflow: hidden;
}

/* Wrapper for front/back images so filters/transforms can be applied once */
#imageWrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    isolation: isolate;
}

.image-container img {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    opacity: 1;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: opacity;
}

#backImage {
    z-index: 1;
}

#frontImage {
    z-index: 2;
}

.image-container img.fade-out {
    opacity: 0 !important;
    transition: opacity var(--fade-duration, 300ms) 
    cubic-bezier(0.4,0,0.2,1);
    -webkit-transition: opacity var(--fade-duration, 300ms) 
    cubic-bezier(0.4,0,0.2,1);
}

.image-container img.fade-in {
    opacity: 1 !important;
    transition: opacity var(--fade-duration, 300ms) 
    cubic-bezier(0.4,0,0.2,1);
    -webkit-transition: opacity var(--fade-duration, 300ms) 
    cubic-bezier(0.4,0,0.2,1);
}

.image-container img.hidden {
    display: none;
}

.sender-container {
    /* Hidden by default; JS sets style.display = 'flex' when active */
    display: none;
    width: 100vw;
    height: 100vh;
    box-sizing: border-box;
    padding: 16px 16px 20px 16px;
    position: relative;
    /* Center the sender (sandbox) */
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Auto top-align when content doesn't fit (toggled by JS) */
.sender-container.is-overflow {
    justify-content: flex-start;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.sender-container.is-overflow::-webkit-scrollbar {
    width: 6px;
}
.sender-container.is-overflow::-webkit-scrollbar-track {
    background: transparent;
}
.sender-container.is-overflow::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.18);
    border-radius: 99px;
}
.sender-container.is-overflow::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.3);
}

/* =============================================
   Sender Pages: Components
   ============================================= */
/* Image Settings: vertical filter sliders */
.filters-wrap { width:100%; max-width:980px; margin: 8px auto 0 auto; }
.filter-sliders-grid { display:grid; grid-template-columns: repeat(8, minmax(60px, 1fr)); gap: 18px; width:100%; box-sizing: border-box; }
.filter-card { display:flex; flex-direction:column; align-items:center; justify-content:flex-start; padding:8px 8px; border:1px solid #2a2a2a; border-radius:14px; background: linear-gradient(180deg,#121212,#0d0d0d); touch-action: pan-x; }
.filter-card.held { border-color:#4CAF50; box-shadow:0 0 0 1px rgba(76,175,80,0.25); }
.filter-name { font-size:12px; color:#bdbdbd; margin-bottom:2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; }
.filter-name .filter-index { display:inline-block; margin-right:6px; color:#8ad19a; font-weight:700; }
.filter-value { font-size:12px; color:#d0d0d0; margin-top:2px; margin-bottom: 8px; min-height:14px; }
.filter-rot { width:34px; height:160px; display:flex; align-items:center; justify-content:center; position:relative; }
.filter-slider { appearance: none; -webkit-appearance: none; width: 160px; height: 34px; transform: rotate(-90deg); transform-origin: center; background: transparent; accent-color: #4CAF50; }
.filter-slider::-webkit-slider-runnable-track { height: 8px; background:#575757; border-radius:9999px; border:none; }
.filter-slider::-moz-range-track { height: 8px; background:#575757; border-radius:9999px; border:none; }
.filter-slider::-webkit-slider-thumb { -webkit-appearance:none; width: 32px; height:56px; border-radius:9999px; background:#4CAF50; border:none; box-shadow: 0 0 0 2px rgba(0,0,0,0.25), 0 3px 8px rgba(0,0,0,0.35); margin-top: -24px; touch-action: none; transform: scale(0.72); transform-origin:center; }
.filter-slider::-moz-range-thumb { width: 32px; height:56px; border-radius:9999px; background:#4CAF50; border:none; box-shadow: 0 0 0 2px rgba(0,0,0,0.25), 0 3px 8px rgba(0,0,0,0.35); touch-action: none; transform: scale(0.72); transform-origin:center; }
/* Hover/drag highlights */
.filter-slider:hover::-webkit-slider-thumb { background:#5ECF63; box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 10px rgba(0,0,0,0.5); }
.filter-slider:hover::-moz-range-thumb { background:#5ECF63; box-shadow: 0 0 0 2px rgba(0,0,0,0.3), 0 4px 10px rgba(0,0,0,0.5); }
.filter-slider:active::-webkit-slider-thumb { background:#66BB6A; transform: scale(0.82); }
.filter-slider:active::-moz-range-thumb { background:#66BB6A; transform: scale(0.82); }
.filter-card.adjusting .filter-slider::-webkit-slider-thumb { background:#66BB6A; }
.filter-card.adjusting .filter-slider::-moz-range-thumb { background:#66BB6A; }
/* Track highlight on hover/drag */
.filter-slider:hover::-webkit-slider-runnable-track { background:#6b6b6b; }
.filter-slider:hover::-moz-range-track { background:#6b6b6b; }
.filter-slider:active::-webkit-slider-runnable-track, .filter-card.adjusting .filter-slider::-webkit-slider-runnable-track { background:#7a7a7a; }
.filter-slider:active::-moz-range-track, .filter-card.adjusting .filter-slider::-moz-range-track { background:#7a7a7a; }
.filter-slider:focus { outline:none; }
.filters-toolbar { margin-top:10px; }

.config-section {
  margin-top:5px;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.config-section:first-of-type { margin-top:8px; }
.config-section-header {
  background:none;
  border:none;
  color:#d0d0d0;
  font-size:13px;
  letter-spacing:0.08em;
  text-transform:uppercase;
  font-weight:600;
  display:flex;
  align-items:center;
  gap:12px;
  padding:0;
}
.config-section-title {
  flex:1 1 auto;
  text-align:left;
}
.config-section-header i { transition:transform .2s ease; }
.config-section-header i { transform:rotate(0deg); } /* expanded -> down */
.config-section-header i.collapsed { transform:rotate(-90deg); } /* collapsed -> right */
.config-section-toggle-btn {
  width:40px;
  height:40px;
  border-radius:10px;
  border:1px solid #2a2a2a;
  background:#1a1a1a;
  color:#d0d0d0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex:0 0 auto;
  font-size:18px;
}
.config-section-toggle-btn:hover { background:#222; border-color:#3a3a3a; color:#fff; }
.config-section-toggle-btn:active { transform:scale(.98); }
.config-section-body {
  width:100%;
  transition:max-height .25s ease, opacity .25s ease;
  margin-left: 10px;
}
.config-section.collapsed .config-section-body {
  display:none;
}

.bg-control {
  align-self:stretch;
  width:100%;
  margin:0;
  padding:12px 16px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  background:linear-gradient(180deg, rgba(24,24,24,0.94), rgba(12,12,12,0.92));
  display:flex;
  gap:16px;
  box-shadow:0 10px 24px -12px rgba(0,0,0,0.6);
  box-sizing:border-box;
}
.bg-control-left {
  display:flex;
  flex-direction:column;
  gap:12px;
  align-items:center;
  justify-content:flex-start;
  flex:0 0 auto;
}
.bg-control-hex {
  font-family:"JetBrains Mono","Menlo","Consolas",monospace;
  font-size:13px;
  letter-spacing:0.04em;
  color:#d9f5e4;
}
.bg-control-belt-wrap {
  flex:1 1 auto;
  display:flex;
  align-items:center;
  min-height:116px;
}
.bg-control-swatch {
  width:44px;
  height:44px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.2);
  background:#222222;
  cursor:pointer;
  transition:transform .2s ease, border-color .2s ease;
}
.bg-control-swatch:hover { transform:scale(1.02); border-color:rgba(255,255,255,0.35); }
.bg-control-swatch:focus-visible { outline:2px solid #66bb6a; outline-offset:2px; }
.bg-control-belt {
  flex:1 1 auto;
  position:relative;
  height:116px;
  border-radius:14px;
  background:
    linear-gradient(0deg, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.25) 45%, rgba(255,255,255,0.25) 55%, rgba(255,255,255,0.95) 100%),
    linear-gradient(90deg,#ff3b30 0%,#ff9500 12%,#ffcc00 24%,#4cd964 36%,#34c759 48%,#0ab4ff 60%,#5856d6 72%,#af52de 84%,#ff3b30 100%);
  cursor:pointer;
  overflow:hidden;
  touch-action:none;
}
.bg-control-belt:focus-visible { outline:2px solid #66bb6a; outline-offset:3px; }
.bg-control-indicator {
  position:absolute;
  width:18px;
  height:18px;
  border-radius:50%;
  border:2px solid rgba(255,255,255,0.85);
  box-shadow:0 0 0 2px rgba(0,0,0,0.45), 0 4px 12px rgba(0,0,0,0.4);
  transform:translate(-50%, -50%);
  background:#fff;
  pointer-events:none;
  transition:transform .15s ease, background .15s ease;
}
.bg-control-indicator.hidden { display:none; }
.bg-control-reset {
  margin-top:0 !important;
  cursor:pointer;
}
.bg-randomizer {
  margin-top:10px;
  padding:12px 16px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.08);
  background:linear-gradient(180deg, rgba(24,24,24,0.94), rgba(12,12,12,0.9));
  display:flex;
  flex-direction:column;
  gap:12px;
  box-shadow:0 10px 24px -12px rgba(0,0,0,0.6);
  touch-action: pan-y;
}
.bg-randomizer-row {
  display:flex;
  align-items:center;
  gap:16px;
  margin: 10px 0;
}
.bg-randomizer-label {
  font-size:14px;
  font-weight:600;
  color:#f1f5f9;
  flex:1 1 auto;
  letter-spacing:0.01em;
  display:flex;
  align-items:center;
  user-select:none;
}
.bg-randomizer-speed {
  gap:12px;
  align-items:center;
}
.bg-randomizer-quick {
  gap:10px;
  flex-wrap:wrap;
}
.bg-randomizer-quick-btn {
  flex:1 1 calc(33.33% - 8px);
  min-height:42px;
  padding:8px 12px;
  border-radius:999px;
  font-weight:600;
  letter-spacing:0.02em;
  font-size:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
}
.bg-randomizer-quick-btn.disabled,
.bg-randomizer-quick-btn:disabled {
  opacity:0.5;
  cursor:default;
}
.bg-randomizer-quick-btn.active {
  background:linear-gradient(120deg, rgba(120,220,255,0.35), rgba(80,180,255,0.3));
  border:1px solid rgba(140,220,255,0.7);
  box-shadow:0 0 12px rgba(90,170,255,0.35);
}
.bg-randomizer-quick-factor {
  text-transform:uppercase;
  font-size:13px;
  font-weight:700;
}
.bg-randomizer-quick-sep {
  font-weight:600;
  opacity:0.7;
}
.bg-randomizer-quick-btn--baseline .bg-randomizer-quick-sep {
  display:none;
}
.bg-randomizer-quick-value {
  font-family:"JetBrains Mono","Menlo","Consolas",monospace;
  font-size:12px;
  letter-spacing:0.02em;
}
.bg-randomizer-reset {
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:44px;
  height:44px;
  border-radius:14px;
  padding:0;
  cursor:pointer;
}
.bg-randomizer-slider-wrap {
  position:relative;
  flex:1 1 auto;
  display:flex;
  align-items:center;
}
.bg-randomizer-slider-wrap input[type=range] {
  width:100%;
}
.bg-randomizer-marker {
  position:absolute;
  top:-18px;
  min-width:24px;
  padding:2px 6px;
  background:rgba(20,20,20,0.9);
  border:1px solid rgba(255,255,255,0.25);
  border-radius:8px;
  transform:translate(-50%, -50%);
  color:#e6e6e6;
  font-size:11px;
  font-family:"JetBrains Mono","Menlo","Consolas",monospace;
  text-align:center;
  pointer-events:none;
  box-shadow:0 4px 10px rgba(0,0,0,0.35);
  z-index:1;
}
.bg-randomizer-marker span { display:block; }
.bg-randomizer-marker.marker-default { background:rgba(40,40,40,0.9); border-color:rgba(255,255,255,0.35); color:#d8d8d8; }
.bg-randomizer-marker.marker-custom { background:rgba(60,80,60,0.95); border-color:rgba(76,175,80,0.6); color:#e9f7ea; }
.bg-randomizer-marker.is-active { box-shadow:0 0 0 2px #4CAF50, 0 6px 14px rgba(76,175,80,0.35); }
.bg-randomizer-slider {
  flex:1 1 auto;
  -webkit-appearance:none;
  appearance:none;
  height:10px;
  border-radius:999px;
  background:#6b6b6b;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
  z-index: 0;
}
.bg-randomizer-slider:focus-visible {
  outline:2px solid #66bb6a;
  outline-offset:2px;
}
.bg-randomizer-slider::-webkit-slider-thumb {
  -webkit-appearance:none;
  width:32px;
  height:56px;
  border-radius:9999px;
  background:#4CAF50;
  border:none;
  box-shadow:0 0 0 2px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.45);
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
  transform: scale(0.72);
  transform-origin:center;
}
.bg-randomizer-slider:hover::-webkit-slider-thumb {
  background:#5ECF63;
  box-shadow:0 0 0 2px rgba(0,0,0,0.3), 0 6px 12px rgba(0,0,0,0.5);
}
.bg-randomizer-slider:active::-webkit-slider-thumb {
  transform:scale(0.82);
  background:#66BB6A;
}
.bg-randomizer-slider::-moz-range-thumb {
  width:32px;
  height:56px;
  border-radius:9999px;
  background:#4CAF50;
  border:none;
  box-shadow:0 0 0 2px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.45);
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
  transform: scale(0.72);
  transform-origin:center;
}
.bg-randomizer-slider:hover::-moz-range-thumb {
  background:#5ECF63;
  box-shadow:0 0 0 2px rgba(0,0,0,0.3), 0 6px 12px rgba(0,0,0,0.5);
}
.bg-randomizer-slider:active::-moz-range-thumb {
  transform:scale(0.82);
  background:#66BB6A;
}
.bg-randomizer-info {
  flex:0 0 auto;
  font-family:"JetBrains Mono","Menlo","Consolas",monospace;
  font-size:13px;
  color:#d9f5e4;
  white-space:nowrap;
  letter-spacing:0.02em;
  text-align:right;
}
.bg-randomizer-info-wrap {
  display:flex;
  align-items:center;
  gap:8px;
}
.bg-randomizer-edit-btn {
  min-width:48px;
  width:48px;
  height:28px;
  padding:6px 0;
  border-radius:9999px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  background:#1e1e1e;
  border:1px solid #2a2a2a;
  color:#d0d0d0;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.bg-randomizer-edit-btn i { font-size:14px; }
.bg-randomizer-edit-btn:hover { background:#262626; color:#fff; border-color:#3a3a3a; }
.bg-randomizer-switch {
  width:46px;
  height:25px;
  margin-left:0;
  flex:0 0 auto;
}
.bg-randomizer-switch .toggle-switch-slider {
  border-radius:999px;
  height:25px;
}
.bg-randomizer-switch .toggle-switch-slider:before {
  height:17px;
  width:17px;
  bottom:4px;
  left:4px;
}
.bg-randomizer-switch input:checked + .toggle-switch-slider:before {
  transform:translateX(21px);
}
.bg-randomizer-label:focus-visible {
  outline:2px solid #66bb6a;
  outline-offset:3px;
}
.visually-hidden {
  position:absolute;
  width:1px;
  height:1px;
  padding:0;
  margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  border:0;
  white-space:nowrap;
}

.blend-control {
  margin:0;
  padding:10px 12px;
  border-radius:0;
  border:none;
  background:transparent;
  box-shadow:none;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.blend-mode-pills {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

@media (max-width: 640px) {
  .bg-control {
    gap:12px;
    padding:10px 12px;
  }
  .bg-randomizer {
    gap:12px;
    padding:10px 12px;
  }
  .bg-randomizer-row {
    flex-wrap:wrap;
    gap:12px;
  }
  .bg-randomizer-info {
    font-size:12px;
  }
  .bg-control-left {
    gap:10px;
  }
  .bg-control-belt-wrap {
    min-height:108px;
  }
  .blend-control {
    gap:12px;
  }
  .blend-mode-pills {
    grid-template-columns:repeat(auto-fit,minmax(120px,1fr));
  }
}

@media (max-width: 480px) {
  .toggle-container {
    align-items:center;
  }
  .toggle-container .label-cell {
    display:block;
    white-space:normal;
    word-break:break-word;
    padding-right:10px;
  }
  .toggle-container .switch-cell {
    display:block;
    justify-self:end;
  }
}

/* moved responsive filter slider rules to end of file (Sender Media) */
/* Text WebSocket Sender specific */
#promptStyleSelect { 
  width: 120px; 
  padding: 8px 5px;
}

.style-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.style-wrap .style-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.style-wrap .style-label {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
} 
/* Unify chip/button visual across Prompt & Sketch */
.fps-chip, .tool-chip, .mode-chip, .sender-container .prompt-box .prompt-footer .fav-btn {
  background:#1e1e1e; border:1px solid #2a2a2a; color:#d0d0d0;
  border-radius:9999px; display:inline-flex; align-items:center; justify-content:center;
  gap:6px; transition: background .2s ease, color .2s ease, border-color .2s ease;
  padding: 6px 12px; font-size:14px; line-height:1;
}
.sender-container .prompt-box .prompt-footer .fav-btn:hover { background:#262626; color:#fff; border-color:#3a3a3a; }
/* Stronger override to ensure legacy styles don't bleed through */
.sender-box-toolbar .sender-box-toolbar-controls-left .fav-btn,
.sender-container .prompt-box .prompt-footer .fav-btn {
  background:#1e1e1e !important; border:1px solid #2a2a2a !important; color:#d0d0d0 !important;
  border-radius:9999px !important; display:inline-flex; align-items:center; justify-content:center;
}
.sender-box-toolbar .sender-box-toolbar-controls-left .fav-btn:hover,
.sender-container .prompt-box .prompt-footer .fav-btn:hover { background:#262626 !important; color:#fff !important; border-color:#3a3a3a !important; }
.fps-chip:hover, .tool-chip:hover, .mode-chip:hover, .sender-container .prompt-box .prompt-footer .fav-btn:hover {
  background:#262626; color:#fff; border-color:#3a3a3a;
}
.fps-chip.active, .mode-chip.active { background:#4CAF50; color:#fff; border-color:#4CAF50; }
/* Fixed width for style dropdown to avoid excessive growth */
#promptStyleSelect { width: 120px; }
/* Prompt footer layout (three regions: left | center | right) */
.prompt-toolbar { display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap:8px; }
.prompt-controls-left { justify-self:start; display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.prompt-controls-center { justify-self:center; display:flex; align-items:center; }
.prompt-controls-right { justify-self:end; display:flex; align-items:center; gap:8px; }
.sender-container .send-box {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 880px;
    box-sizing: border-box;
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 26px;
    padding: 6px 8px 6px 16px;
    position: relative;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 4px 18px -4px rgba(0,0,0,0.6);
}

/* ---- Prompt WebSocket Sender (large box style) ---- */
.sender-container .prompt-box {
    width: 100%;
    max-width: 980px; /* more compact width */
    padding: 16px 18px 24px 18px; /* tighter padding */
    background: transparent;
    display: flex;
    flex-direction: column;
    gap: 12px; /* reduce vertical gap */
    backdrop-filter: none;
    box-sizing: border-box;
}
.sender-container .prompt-box .prompt-textarea-wrapper 
{ 
  margin-top:5px;
  width:100%; 
  flex:1 1 auto; 
  display:block;
}
.sender-container .prompt-box .prompt-textarea {
    width:100%;
    min-height: clamp(90px, 28vh, 160px);
    resize: vertical;
    background: linear-gradient(180deg,#101010,#0b0b0b);
    border: none;
    border-radius: 10px;
    padding: 10px 46px 24px 14px;
    font-size: 14px;
    line-height: 1.4; /* tighter line spacing */
    color: #d0d0d0;
    outline: none;
    font-family: inherit;
    box-shadow: none;
    transition: border-color .25s ease, box-shadow .25s ease, background .25s ease;
    box-sizing: border-box;
}
.sender-container .prompt-box .prompt-textarea:focus {
    /* Consolidated focus style (dedup): background + final box-shadow */
    border-color: #3d3d3d;
    box-shadow: 0 0 0 1px #3d3d3d;
    background: linear-gradient(180deg,#121212,#0b0b0b);
}

/* AI Enhancement toggle inside prompt textarea wrapper (bottom-right) */
.sender-container .prompt-box .prompt-textarea-wrapper #aiEnhanceToggle {
  position: absolute;
  right: 8px;
  bottom: 12px;
  z-index: 4;
}
.sender-container .prompt-box .prompt-footer {
    display: flex;
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 8px; /* tighter buttons gap */
    margin-top: 4px;
}
.sender-container .prompt-box .prompt-footer .fav-btn {
    background: transparent;
    border: 1px solid #2d2d2d;
    color: #cfcfcf;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 10px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: background .25s ease, color .25s ease, border-color .25s ease;
    white-space: nowrap;
}
.sender-container .prompt-box .prompt-footer .fav-btn:hover { background:#1a1a1a; color:#fff; }
.sender-container .prompt-box .prompt-footer .fav-btn:active { background:#222; }
.sender-container .prompt-box .send-btn {
    background: #4CAF50;
    color: #fff;
    padding: 10px 26px;
    font-size: 15px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,.35);
    transition: background .25s ease, transform .15s ease;
    white-space: nowrap;
    position: relative; /* keep ::after absolute so width stays stable */
}
.sender-container .prompt-box .send-btn:hover { background:#45a049; }
.sender-container .prompt-box .send-btn:active { transform: scale(.95); }
.sender-container .prompt-box .send-btn.sent-success { background:#16a34a !important; color:#fff !important; }
.sender-container .prompt-box .send-btn.sent-success::after { 
    content:'✔'; 
    position:absolute; 
    right:10px; 
    animation: sent-pop .6s ease; 
}
.sender-container .send-box input {
    flex: 1;
    padding: 18px 4px 18px 0;
    font-size: 16px;
    background: transparent;
    border: none;
    color: #e5e5e5;
    outline: none;
    min-width: 0;
}
.sender-container .send-box button {
    padding: 0 28px;
    font-size: 15px;
    flex-shrink: 0;
    background: #ffffff;
    color: #111;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color .25s ease, transform .15s ease;
}
.sender-container .send-box button:hover {
    background: #e6e6e6;
}
.sender-container .send-box button:active {
    transform: scale(.96);
}
.sender-container .send-box .fav-btn {
    width: 42px;
    height: 42px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #bbb;
    transition: background .25s ease, color .25s ease;
    margin-right: 8px;
}
.sender-container .send-box .fav-btn:hover { background:#1c1c1c; color:#fff; }
.sender-container .send-box .fav-btn:active { background:#242424; }
.sender-container .send-box .fav-btn .icon { font-size:18px; }

/* Send success flash */
.sender-container .send-box button.sent-success {
    background: #16a34a !important;
    color: #fff !important;
}
.sender-container .send-box button.sent-success::after {
    content: '✔';
    font-weight: 700;
    animation: sent-pop .6s ease;
}
@keyframes sent-pop {
    0% { transform: scale(.4); opacity:0; }
    40% { transform: scale(1.15); opacity:1; }
    70% { transform: scale(.95); }
    100% { transform: scale(1); }
}

/* Prompt page title */
.sender-container .prompt-page-header { width:100%; max-width:1080px; box-sizing:border-box; margin:0 0 8px 0; }
.sender-container .prompt-page-header h2 { margin:0 0 4px 0; font-size:22px; font-weight:600; letter-spacing:.5px; }
.sender-container .prompt-page-header .prompt-page-sub { margin:0; font-size:13px; color:#b5b5b5; line-height:1.4; }
.sender-container .prompt-page-header .prompt-page-sub span { color:#4CAF50; }

/* New styles for prompt page head row */
.prompt-page-header { position:relative; }
.prompt-page-header .prompt-page-head-row { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.prompt-page-header .prompt-page-head-row h2 { margin:0; flex:1 1 auto; }
.prompt-page-header .prompt-status-inline { margin:0; }

/* Sender small-screen media moved to end (Sender Media) */

/* =============================================
   Image/Sketch Sender Specific
   ============================================= */
/* ---- Image WebSocket Sender: preview dropzone ---- */
.image-dropzone {
    flex: 1 1 auto;
    height: 420px; /* fixed preview area height (overridden by .sketch-zone) */
    background: #0f0f0f;
    border: 1px solid #2a2a2a;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
}
.image-dropzone.dragover {
    border-color: #3d3d3d;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.06) inset;
}
.image-dropzone .drop-hint {
    color: #bdbdbd;
    font-size: 14px;
    pointer-events: none;
}
.image-dropzone .preview-info {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 8px;
    background: rgba(0,0,0,0.55);
    color: #eee;
    border-radius: 10px;
    padding: 6px 10px;
    font-size: 12px;
    line-height: 1.2;
    pointer-events: none;
    white-space: nowrap;
}
.image-dropzone .preview-info.hidden { display: none; }
.image-dropzone .image-preview {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: none; /* shown when ready */
}
.image-dropzone .image-clear-btn { position:absolute; top:8px; right:8px; z-index:4; display:none; }
.sender-info {
    margin-top: 8px;
    color: #cfcfcf;
    font-size: 13px;
}
.hidden-input { display: none !important; }

/* Utility for range row with value label */
.range-row {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.slider-value {
    min-width: 48px;
    text-align: right;
    color: #ddd;
}
.flex-1 { flex: 1 1 auto; }

/* Dropzone + buttons media moved to end (Sender Media) */

/* ---- Image WebSocket Sender: Tabs & Camera toolbar ---- */
.tabs { display:flex; gap:8px; margin: 0 0 10px 0; }
.tab-btn { background:#1e1e1e; color:#d0d0d0; border:1px solid #2e2e2e; padding:8px 14px; border-radius:10px; cursor:pointer; font-size:14px; font-weight:600; transition:background .2s, color .2s, border-color .2s; }
.tab-btn:hover { background:#262626; color:#fff; }
.tab-btn.active { background:#4CAF50; color:#fff; border-color:#4CAF50; }

.camera-zone { cursor: default; }
/* removed camera-toolbar alias after migration to sender-box-toolbar */

.fps-chips { display:flex; flex-wrap:wrap; gap:6px; justify-content:center; }
.fps-chip { height:32px; background:#1f1f1f; border:1px solid #2b2b2b; color:#d4d4d4; padding:6px 12px; border-radius:20px; cursor:pointer; font-size:14px; font-weight:600; transition: background .2s, color .2s, border-color .2s; }
.fps-chip:hover { background:#2a2a2a; color:#fff; }
.fps-chip.active { background:#4CAF50; color:#fff; border-color:#4CAF50; }
/* Fixed-width mode chips for Manual/Live/Idle */
.mode-chip { width: auto; min-width: 64px; display:inline-flex; justify-content:center; padding:6px 10px; }
/* Fixed-size tool chips (Pen/Eraser/Width) */
.tool-chip { 
  min-width: 48px; width: 48px; height: 28px;
  display:inline-flex; align-items:center; justify-content:center; 
  padding:6px 0; 
}

.pause-btn, .start-btn, .stop-btn { background:#2a2a2a; color:#eee; border:1px solid #3a3a3a; padding:8px 14px; border-radius:10px; cursor:pointer; font-weight:600; }
.pause-btn:hover, .start-btn:hover, .stop-btn:hover { background:#333; }
.stop-btn { background:#3a2a2a; border-color:#4a3a3a; }
.stop-btn:hover { background:#4a2a2a; }

/* Central play/pause overlay button (YouTube-like) */
.playpause-overlay {
  position:absolute;
  left:50%; top:50%; transform:translate(-50%,-50%);
  width:84px; height:84px;
  border-radius:50%;
  background:rgba(0,0,0,0.55);
  color:#fff;
  border:1px solid rgba(255,255,255,0.2);
  box-shadow:0 6px 16px rgba(0,0,0,0.45);
  display:flex; align-items:center; justify-content:center;
  cursor:pointer;
  transition: background .2s ease, transform .15s ease, opacity .2s ease;
  z-index: 3;
}
.playpause-overlay:hover { background:rgba(0,0,0,0.7); transform:translate(-50%,-50%) scale(1.03); }
.playpause-overlay i { font-size:34px; pointer-events:none; }
.playpause-overlay.hidden { display:none; }

/* Play/pause overlay media moved to end (Sender Media) */

/* Unified overlay corner button style (mirror, image clear, etc.) */
.overlay-tool-btn {
  position:absolute; top:8px; right:8px; z-index:4;
  width:42px; height:42px; border-radius:10px;
  background:rgba(0,0,0,0.35); color:#fff; border:1px solid rgba(255,255,255,0.18);
  display:flex; align-items:center; justify-content:center; cursor:pointer;
  transition: background .2s ease, transform .15s ease;
}
.overlay-tool-btn:hover { background:rgba(0,0,0,0.55); transform:scale(1.02); }
.overlay-tool-btn i { font-size:18px; pointer-events:none; }

/* Left-corner overlay variant */
.overlay-tool-btn.left { left:8px; right:auto; }

/* Audio recorder layout */
.recorder-wrapper {
  position:relative;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:20px;
  padding:10px 10px 10px;
  border-radius:18px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(18,18,18,0.62);
  overflow:hidden;
  min-height:300px;
}
.recorder-bpm-indicator {
  position:static;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width: 60px;
  padding:4px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(12,12,12,0.78);
  color:#dff8ff;
  font-size:13px;
  letter-spacing:0.04em;
  text-transform:none;
}
.recorder-bpm-indicator.hidden { display:none; }
.recorder-visualizer {
  position:absolute;
  inset:0;
  pointer-events:none;
  opacity:0.28;
}
.recorder-visualizer canvas {
  width:100%;
  height:100%;
  display:block;
}
.recorder-status-line {
  position:relative;
  z-index:2;
  width:100%;
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto minmax(0, 1fr);
  align-items:center;
  gap:10px;
}
.recorder-status-line .recorder-bpm-indicator {
  grid-column:1;
  justify-self:start;
}
.recorder-status-line #statusText {
  grid-column:2;
  justify-self:center;
}
.recorder-status-line #countdownText {
  grid-column:3;
  justify-self:end;
}
.recorder-status-pill {
  padding:4px 12px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(20,20,20,0.55);
  font-size:14px;
  letter-spacing:0.02em;
  text-transform:none;
  color:#d7ddff;
}
.recorder-status-pill:empty { display:none; }
.recorder-status-pill--countdown { color:#9fe0af; }
.recorder-overlay {
  position:relative;
  z-index:2;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:18px;
  justify-content:space-between;
  width:100%;
  flex:1 1 auto;
  box-sizing:border-box;
}
.recorder-preview {
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  width:100%;
  justify-content:center;
}
.recorder-overlay .recorder-preview { flex:1 1 auto; display:flex; align-items:center; }
.recorder-overlay .recorder-float-controls { margin-bottom:0; }
.recorder-preview audio {
  width:100%;
  max-width:360px;
  height:60px;
}
.recorder-preview audio::-webkit-media-controls-panel {
  background:#dddddd;
  border-radius:12px;
}

.recorder-float-controls {
  display:flex;
  gap:8px;
  align-items:center;
  justify-content:center;
  flex-wrap:wrap;
}
.audio-recorder .recorder-float-controls {
  position:relative;
  width:100%;
  box-sizing:border-box;
  padding-inline:64px;
}
.audio-recorder #replayRecordingBtn {
  position:absolute;
  top:50%;
  right:0;
  transform:translateY(-50%);
}
@media (max-width: 640px) {
  .audio-recorder .recorder-float-controls {
    padding-inline:50px;
  }
}
.recorder-float-controls .overlay-tool-btn {
  position:static;
  width:48px;
  height:48px;
  border-radius:14px;
  background:rgba(16,16,16,0.42);
  border:1px solid rgba(255,255,255,0.16);
  backdrop-filter:blur(6px);
}
.recorder-ptt-btn {
  min-width:220px;
  height:48px;
  padding:0 18px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,0.18);
  background:rgba(20,20,20,0.46);
  color:#f0f1ff;
  font-size:16px;
  font-weight:600;
  letter-spacing:0.02em;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s ease, transform .15s ease, border-color .2s ease;
  backdrop-filter:blur(6px);
}
.recorder-ptt-btn:hover { background:rgba(32,32,32,0.55); transform: scale(1.01); }
.recorder-ptt-btn:active { transform:translateY(1px); }
.recorder-ptt-btn.disabled,
.recorder-ptt-btn:disabled {
  opacity:0.5;
  cursor:not-allowed;
  background:rgba(32,32,32,0.45);
  border-color:rgba(255,255,255,0.08);
}
.recorder-ptt-btn.active {
  background:rgba(76,160,116,0.62);
  border-color:rgba(146,220,180,0.68);
  color:#101814;
}
.recorder-float-controls .overlay-tool-btn.active {
  background:rgba(64,140,96,0.56);
  border-color:rgba(156,227,176,0.68);
}
.recorder-float-controls .overlay-tool-btn:disabled {
  opacity:0.35;
  cursor:not-allowed;
  background:rgba(16,16,16,0.25);
  border-color:rgba(255,255,255,0.08);
}

.recorder-replay-btn {
  min-width:80px;
  height:42px;
  padding:0 5px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.22);
  background:rgba(32,32,32,0.85);
  color:#f0f1ff;
  font-size:14px;
  font-weight:600;
  letter-spacing:0.02em;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:background .2s ease, transform .15s ease, border-color .2s ease, box-shadow .2s ease;
}
.recorder-replay-btn:hover:not(:disabled) {
  background:rgba(48,48,48,0.88);
  transform:scale(1.01);
  box-shadow:0 6px 15px rgba(0,0,0,0.25);
}
.recorder-replay-btn:active:not(:disabled) {
  transform:translateY(1px);
  box-shadow:0 3px 10px rgba(0,0,0,0.25);
}
.recorder-replay-btn:disabled {
  opacity:0.45;
  cursor:not-allowed;
  background:rgba(32,32,32,0.45);
  border-color:rgba(255,255,255,0.08);
  box-shadow:none;
}
.recorder-replay-btn.active {
  background:rgba(76,160,116,0.85);
  border-color:rgba(146,220,180,0.85);
  color:#101814;
}
.recorder-replay-btn--top {
  position:absolute;
  top:12px;
  right:12px;
  z-index:3;
}

/* Audio WebSocket Player layout */
.audio-player .audio-player-stack {
  width:100%;
  display:flex;
  flex-direction:column;
  gap:14px;
}
.audio-player .audio-player-visualizer-wrapper .player-controls {
  margin-top:auto;
  position:relative;
  z-index:2;
}
.audio-player .recorder-wrapper.audio-player-wrapper {
  border:none;
  background:transparent;
  min-height:0;
  overflow:visible;
}
.audio-player .audio-player-wrapper {
  gap:14px;
  padding:5px;
}
.audio-player .audio-player-panel {
  position:relative;
  z-index:2;
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}
.audio-player .audio-player-meta {
  width:100%;
  display:flex;
  flex-direction:column;
  gap:6px;
  align-items:center;
  text-align:center;
}
.audio-player .audio-player-now-row {
  width:100%;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.audio-player .audio-player-now-label { opacity:0.85; }
.audio-player .audio-player-meta-row {
  width:100%;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:10px 14px;
  font-size:13px;
  color:#d2d2d2;
}
.audio-player .audio-player-meta-item span { color:#fff; }

.audio-player .player-controls {
  width:100%;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
  gap:10px;
}
.audio-player .player-progress {
  width:100%;
  height: 45px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  margin:0 10px;
}
.audio-player .player-progress span {
  min-width:44px;
  text-align:center;
  color:#d8d8d8;
  font-variant-numeric: tabular-nums;
}
.audio-player .player-progress-actions {
  display:flex;
  align-items:center;
  gap:8px;
  position:relative;
  flex:0 0 auto;
}
.audio-player .player-progress-btn {
  width:44px;
  min-width:44px;
  height:44px;
  padding:0;
  border-radius:14px;
  background:#1e1e1e;
  border:1px solid #2a2a2a;
  color:#d0d0d0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
  touch-action: manipulation;
}
.audio-player .player-progress-btn:hover { background:#262626; color:#fff; border-color:#3a3a3a; }
.audio-player .player-progress-btn.active { background:#4CAF50; color:#fff; border-color:#4CAF50; }
.audio-player .volume-popover {
  position:absolute;
  right:0;
  bottom:52px;
  width:180px;
  padding:10px 12px;
  border:1px solid #2a2a2a;
  border-radius:14px;
  background:#0f0f0f;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.03), 0 8px 22px -8px rgba(0,0,0,0.7);
  z-index:6;
}
.audio-player .volume-popover-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
  font-size:12px;
  color:#d0d0d0;
}
.audio-player .volume-popover-value {
  color:#ffffff;
  font-variant-numeric: tabular-nums;
}
.audio-player .player-progress .volume-popover input[type="range"] {
  width:100%;
  height:8px;
  border-radius:999px;
  background:#6b6b6b;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
}
.audio-player .player-progress .volume-popover input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance:none;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#4CAF50;
  border:none;
  box-shadow:0 0 0 2px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.45);
  transform:none;
}
.audio-player .player-progress .volume-popover input[type="range"]::-moz-range-thumb {
  width:18px;
  height:18px;
  border-radius:999px;
  background:#4CAF50;
  border:none;
  box-shadow:0 0 0 2px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.45);
  transform:none;
}
.audio-player .player-progress input[type="range"] {
  flex:1 1 auto;
  min-width:140px;
  -webkit-appearance:none;
  appearance:none;
  height:10px;
  border-radius:999px;
  background:#6b6b6b;
  box-shadow: inset 0 2px 6px rgba(0,0,0,0.35);
  cursor:pointer;
}
.audio-player .player-progress input[type="range"]:focus-visible {
  outline:2px solid #66bb6a;
  outline-offset:2px;
}
.audio-player .player-progress input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance:none;
  width:32px;
  height:56px;
  border-radius:9999px;
  background:#4CAF50;
  border:none;
  box-shadow:0 0 0 2px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.45);
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
  transform: scale(0.72);
  transform-origin:center;
}
.audio-player .player-progress input[type="range"]:hover::-webkit-slider-thumb {
  background:#5ECF63;
  box-shadow:0 0 0 2px rgba(0,0,0,0.3), 0 6px 12px rgba(0,0,0,0.5);
}
.audio-player .player-progress input[type="range"]:active::-webkit-slider-thumb {
  transform:scale(0.82);
  background:#66BB6A;
}
.audio-player .player-progress input[type="range"]::-moz-range-thumb {
  width:32px;
  height:56px;
  border-radius:9999px;
  background:#4CAF50;
  border:none;
  box-shadow:0 0 0 2px rgba(0,0,0,0.25), 0 4px 10px rgba(0,0,0,0.45);
  cursor:pointer;
  transition:transform .2s ease, background .2s ease, box-shadow .2s ease;
  transform: scale(0.72);
  transform-origin:center;
}
.audio-player .player-progress input[type="range"]:hover::-moz-range-thumb {
  background:#5ECF63;
  box-shadow:0 0 0 2px rgba(0,0,0,0.3), 0 6px 12px rgba(0,0,0,0.5);
}
.audio-player .player-progress input[type="range"]:active::-moz-range-thumb {
  transform:scale(0.82);
  background:#66BB6A;
}

.audio-player .audio-player-library {
  width:100%;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.audio-player .library-panel {
  width:100%;
  position:relative;
}
.audio-player .library-head {
  width:100%;
  padding: 0px 4px;
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.audio-player .library-head-left {
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  flex:1 1 auto;
}
.audio-player .library-title {
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.audio-player .library-head-left .config-section-toggle-btn i {
  transition:transform .2s ease;
  transform:rotate(0deg);
}
.audio-player .library-head-left .config-section-toggle-btn i.collapsed { transform:rotate(-90deg); }
.audio-player .library-actions {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
}
.audio-player .tool-chip.tool-chip--warning {
  background: rgba(234, 88, 12, 0.18);
  border-color: rgba(255,255,255,0.08);
  color: #ffd2b5;
}
.audio-player .tool-chip.tool-chip--warning:hover {
  background: rgba(234, 88, 12, 0.26);
  border-color: rgba(255,255,255,0.08);
  color:#fff;
}

.audio-player .library-collapsed-row {
  width:100%;
  position:relative;
  min-height:56px;
  padding:10px 12px;
  border-radius:16px;
  border:1px solid rgba(255,255,255,0.08);
  background:rgba(0,0,0,0.18);
  display:flex;
  align-items:center;
  gap:8px;
  color:#d8d8d8;
  box-sizing:border-box;
}
.audio-player .library-collapsed-prefix { opacity:0.75; flex:0 0 auto; }
.audio-player .library-collapsed-title {
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.audio-player .library-collapsed-state { opacity:0.75; flex:0 0 auto; }
.audio-player .library-collapsed-hint { width:100%; text-align:center; opacity:0.75; }
.audio-player .library-collapsed-row.dragover { background:rgba(0,0,0,0.26); }
.audio-player .library-collapsed-row.dragover::after {
  content:"";
  position:absolute;
  inset:0px;
  border:2px dashed rgba(255,255,255,0.22);
  border-radius:16px;
  pointer-events:none;
}

.audio-player .playlist {
  list-style:none;
  margin:0;
  padding:0;
  border-radius:12px;
  min-height:100px;
  max-height:300px;
  overflow-y:auto;
  overflow-x:hidden;
  background:rgba(0,0,0,0.18);
}
.audio-player .library-panel.dragover::after {
  content:"";
  position:absolute;
  inset:0px;
  border:2px dashed rgba(255,255,255,0.22);
  border-radius:16px;
  pointer-events:none;
}
.audio-player .playlist-item {
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 10px 4px 4px;
  min-height:40px;
  border-bottom:1px solid rgba(255,255,255,0.06);
  margin:0;
  cursor:pointer;
}
.audio-player .playlist-item:last-child { margin-bottom:0; }
.audio-player .playlist-item.active { background: rgba(255,255,255,0.06); }
.audio-player .playlist-item.is-disabled .track-main,
.audio-player .playlist-item.is-disabled .track-index {
  opacity:0.62;
}
.audio-player .playlist-item.drop-before {
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.30);
}
.audio-player .playlist-item.drop-after {
  box-shadow: inset 0 -2px 0 rgba(255,255,255,0.30);
}
.audio-player .playlist-item.dragging {
  opacity:0.28;
}
.audio-player .playlist-item.is-disabled.active {
  background: rgba(255,255,255,0.04);
}
.audio-player .playlist .track-index {
  flex:0 0 auto;
  width:32px;
  margin-left: -8px;
  text-align:center;
  font-size:18px;
  font-weight:600;
  color: #dddddd;
  opacity:1.0;
  font-variant-numeric: tabular-nums;
}
.audio-player .playlist .track-main {
  flex:1 1 auto;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.audio-player .playlist .track-top {
  display:flex;
  align-items:center;
  gap:8px;
  min-width:0;
}
.audio-player .playlist .track-name {
  flex:1 1 auto;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.audio-player .playlist .track-top .track-badge--duration {
  flex:0 0 auto;
}
.audio-player .playlist .track-meta {
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  opacity:0.9;
}
.audio-player .playlist .track-badge {
  display:inline-flex;
  align-items:center;
  max-width:100%;
  padding:1px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,0.10);
  background:rgba(0,0,0,0.18);
  color:#d8d8d8;
  font-size:11px;
  line-height:1.2;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.audio-player .playlist-empty {
  height:100px;
  padding:0 14px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-align:center;
  opacity:0.75;
  cursor:default;
}

.audio-player .track-drag-handle {
  width:32px;
  height:44px;
  border:none;
  background:transparent;
  color:#e6e6e6;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:grab;
  flex:0 0 auto;
  opacity:0.78;
  user-select:none;
  -webkit-user-drag: none;
  transition: opacity .15s ease, transform .15s ease;
}
.audio-player .track-drag-handle:hover { opacity:1.0; }
.audio-player .track-drag-handle:active { cursor:grabbing; transform:translateY(1px); }
.audio-player .track-drag-handle i { pointer-events:none; }

.audio-player .playlist-item.is-disabled .track-drag-handle {
  opacity:0.18;
  cursor:not-allowed;
  pointer-events:none;
}

.audio-player .track-enabled-btn {
  width:36px;
  height:36px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.18);
  color:#e6e6e6;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex:0 0 auto;
  align-self:center;
  touch-action: manipulation;
  transition: background .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .15s ease;
}
.audio-player .track-enabled-btn:hover { background:rgba(0,0,0,0.28); color:#fff; border-color:rgba(255,255,255,0.18); }
.audio-player .track-enabled-btn:active { transform:translateY(1px); }
.audio-player .track-enabled-btn.is-enabled {
  background:#4CAF50;
  border-color:#4CAF50;
  color:#ffffff;
}
.audio-player .track-enabled-btn.is-enabled:hover {
  background:#45a049;
  border-color:#45a049;
}
.audio-player .playlist-item.is-disabled .track-enabled-btn {
  border-color:rgba(76,175,80,0.85);
  box-shadow:0 0 0 2px rgba(76,175,80,0.18);
  background:#666666;
}
.audio-player .playlist-item.is-disabled .track-enabled-btn:hover {
  border-color:rgba(76,175,80,1);
  box-shadow:0 0 0 2px rgba(76,175,80,0.28);
  background:#666666;
}

.audio-player .track-remove-btn {
  width:40px;
  height:40px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,0.12);
  background:rgba(0,0,0,0.18);
  font-size:18px;
  font-weight:900;
  color:#e6e6e6;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  flex:0 0 auto;
  align-self:center;
  transition: background .2s ease, transform .15s ease;
}
.audio-player .track-remove-btn:hover { background:rgba(0,0,0,0.28); }
.audio-player .track-remove-btn:active { transform:translateY(1px); }
.audio-player .track-remove-btn:disabled {
  opacity:0.22;
  cursor:not-allowed;
}
.audio-player .track-remove-btn i { pointer-events:none; }

/* Touch-friendly button sizing (scoped to audio player only) */
.audio-player .audio-player-stack .tool-chip,
.audio-player .audio-player-stack .mode-chip {
  width:auto;
  min-width:92px;
  height:44px;
  padding:0 14px;
  border-radius:14px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
.audio-player .audio-player-stack .send-btn {
  min-height:44px;
  min-width:100px;
  padding:10px 18px;
  gap:8px;
}

/* Hide native audio controls; player uses custom controls */
.audio-player #musicPlayer { display:none; }

@media (max-width: 640px) {
  .audio-player .player-progress { max-width: 100%; }
  .audio-player .audio-player-stack .tool-chip,
  .audio-player .audio-player-stack .mode-chip {
    min-width:84px;
  }
  .audio-player .playlist { height:240px; }
  .audio-player .sender-container button span { display:none; }
  .audio-player .sender-container .tool-chip,
  .audio-player .sender-container .mode-chip,
  .audio-player .sender-container .send-btn {
    min-width:44px;
    width:44px;
    padding:0;
    border-radius:14px;
  }
}

/* Top-center overlay container for sketch board */
.sketch-top-center {
  position:absolute; top:8px; left:50%; transform:translateX(-50%);
  z-index:5; display:flex; gap:8px; align-items:center; justify-content:center;
}
.sketch-top-center .overlay-tool-btn { position:static; }

/* ---- Sketch board overrides ---- */
/* Let sketch board size follow selected aspect ratio and scale responsively */
.sketch-ar-wrap {
  /* Aspect-ratio wrapper that enforces max height and keeps ratio */
  width: auto;               /* allow width to shrink to satisfy max-height with aspect-ratio */
  max-width: 100%;
  aspect-ratio: var(--sketch-ar, 1 / 1);
  max-height: clamp(240px, 58vh, 640px);
  margin: 0 auto;
  border: 1px solid #2a2a2a; /* move border to wrapper so inner paint area keeps exact ratio */
  border-radius: 16px;
  background: #0f0f0f;
  overflow: hidden;
}
/* Sketch width media moved to end (Sender Media) */
/* Sketch height media moved to end (Sender Media) */
.image-dropzone.sketch-zone {
  /* Fill wrapper strictly; wrapper dictates ratio/height */
  flex: 0 0 auto;
  width: 100%;
  height: 100% !important;
  max-width: 100%;
  margin-left: auto; margin-right: auto;
  box-sizing: border-box; /* include border in the 100% sizing to preserve ratio visually */
  border: none !important;           /* avoid shrinking inner paint area */
  background: transparent !important;
  cursor: crosshair;                 /* moved from inline */
  touch-action: none;                /* moved from inline */
  position: relative;                /* moved from inline */
}

/* Vertical width slider overlay for Sketch */
.sketch-width-overlay {
  position:fixed; z-index:4000; /* overlay above */
  width:220px; height:42px; border-radius:12px; padding:4px 8px;
  background:rgba(0,0,0,0.45); border:1px solid rgba(255,255,255,0.18);
  display:none; align-items:center; justify-content:center;
}
.sketch-width-overlay.visible { display:flex; }
.sketch-width-overlay input[type="range"] {
    width: 180px; height: 20px;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    margin: 0;
}
.sketch-width-overlay input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: #404040;
    border-radius: 6px;
}
.sketch-width-overlay input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -7px; /* center on 6px track */
    border: 2px solid rgba(0,0,0,0.25);
}
.sketch-width-overlay input[type="range"]::-moz-range-thumb {
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: #4CAF50;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(0,0,0,0.25);
}
.sketch-width-overlay input[type="range"]::-moz-range-track {
    height: 6px;
    background: #404040;
    border-radius: 6px;
}
.sketch-width-overlay .slider-track {
    display:flex; align-items:center; justify-content:center; gap:8px; width:100%; height:100%;
}

/* ---- Sender box toolbar (generic: used by Sketch / Prompt) ---- */
.sender-box-toolbar { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:10px; }
.sender-box-toolbar-controls-left { display:flex; align-items:center; gap:8px; }
.sender-box-toolbar-controls-center { flex: 1 1 auto; display:flex; justify-content:center; align-items:center; gap:8px; }
.sender-box-toolbar-controls-right { display:flex; gap:8px; }
.sender-box-toolbar.toolbar-balanced { display:flex; align-items:center; justify-content:space-between; gap:10px; }
@media (min-width: 641px) {
  .sender-box-toolbar.toolbar-balanced {
    display:grid;
    grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
    align-items:center;
    gap:12px;
  }
  .sender-box-toolbar.toolbar-balanced .sender-box-toolbar-controls-left,
  .sender-box-toolbar.toolbar-balanced .sender-box-toolbar-controls-center,
  .sender-box-toolbar.toolbar-balanced .sender-box-toolbar-controls-right {
    display:flex;
    align-items:center;
    gap:10px;
  }
  .sender-box-toolbar.toolbar-balanced .sender-box-toolbar-controls-left {
    justify-content:flex-start;
    justify-self:start;
  }
  .sender-box-toolbar.toolbar-balanced .sender-box-toolbar-controls-center {
    justify-content:center;
    justify-self:center;
    width:auto;
  }
  .sender-box-toolbar.toolbar-balanced .sender-box-toolbar-controls-right {
    justify-content:flex-end;
    justify-self:end;
  }
}

/* audio toolbar mobile fallback */
@media (max-width: 640px) {
  .audio-toolbar { display:flex !important; flex-direction:column; gap:12px; align-items:stretch; }
  .audio-toolbar .sender-box-toolbar-controls-left,
  .audio-toolbar .sender-box-toolbar-controls-center,
  .audio-toolbar .sender-box-toolbar-controls-right { width:100%; justify-content:stretch; }
  .audio-toolbar .sender-box-toolbar-controls-center { justify-content:flex-end; }
}
.sender-box-toolbar.gamepad-toolbar:not(.toolbar-balanced) { display:flex; align-items:center; gap:12px; flex-wrap:nowrap; }
.sender-box-toolbar.gamepad-toolbar:not(.toolbar-balanced) .sender-box-toolbar-controls-left { flex:0 0 auto; min-width:max-content; }
.sender-box-toolbar.gamepad-toolbar:not(.toolbar-balanced) .sender-box-toolbar-controls-center { flex:0 0 auto; margin:0 auto; display:flex; justify-content:center; }
.sender-box-toolbar.gamepad-toolbar:not(.toolbar-balanced) .sender-box-toolbar-controls-right { flex:0 0 auto; }
.gamepad-index-toolbar { display:flex; align-items:center; gap:10px; }
.gamepad-index-toolbar .fps-chips { display:flex; gap:8px; justify-content:flex-start; flex-wrap:nowrap; }
.gamepad-index-toolbar .fps-chip { min-width:44px; flex:0 0 auto; }
.gamepad-index-toolbar .fps-chip.connected { box-shadow:0 0 0 2px rgba(45,173,98,0.55); border-color:#2d8542; }
.gamepad-index-toolbar .fps-chip.virtual { opacity:0.8; }
.gamepad-index-toolbar .fps-chip.virtual.active { opacity:1; }
.controller-wrapper { display:flex; flex-direction:column; gap:16px; width:100%; }
.controller-stage { background:linear-gradient(180deg,#101010,#0b0b0b); border:1px solid #2e2e2e; border-radius:16px; padding:18px; display:flex; flex-direction:column; gap:16px; box-shadow:0 0 0 1px rgba(255,255,255,0.03), inset 0 0 0 1px rgba(255,255,255,0.02); }
.controller-stage h3 { margin:0; font-size:15px; color:#f3f4ff; }
.controller-stage svg { width:100%; height:auto; max-width:520px; margin:0 auto; display:block; }
.controller-mode { display:flex; align-items:center; justify-content:center; gap:14px; flex-wrap:wrap; }
.controller-status-group { display:flex; align-items:center; justify-content:center; gap:12px; margin:0 auto; }
.controller-json { background:#0b0c13; border:1px solid #23283c; border-radius:12px; padding:12px; max-height:240px; overflow:auto; font-family:monospace; font-size:12px; color:#92a0d8; white-space:pre; }
.controller-json.hidden { display:none !important; }
.controller-debug-button { display:inline-flex; align-items:center; justify-content:center; }
.controller-overlay path:not(.controller-body),
.controller-overlay rect,
.controller-overlay circle { stroke:#666; stroke-width:2; fill:none; pointer-events:all; }
.controller-overlay .controller-body { fill:#222; stroke:none; }
.controller-overlay circle.stick-thumb { stroke:#8a93c4; stroke-width:2; }
.controller-overlay circle.stick-thumb.active { fill:rgba(180,196,255,0.35); }
.gamepad-status-tag { display:inline-flex; align-items:center; gap:6px; padding:4px 10px; border-radius:999px; font-size:12px; border:1px solid transparent; }
.gamepad-status-tag[data-status="disconnected"] { border-color:#3b425f; color:#8790b5; }
.gamepad-status-tag[data-status="connected"] { border-color:#2d8542; color:#8fd79d; }
.gamepad-status-tag[data-status="virtual"] { border-color:#4c587b; color:#9aa4ce; }

/* Sketch toolbar media moved to end (Sender Media) */

/* ===== Recents (session-only thumbnails) ===== */
.recents-section { width:100%; max-width:980px; margin: 14px auto 0 auto; padding: 0 4px; box-sizing: border-box; }
.recents-header { display:flex; align-items:center; justify-content:space-between; margin: 0 0 8px 0; }
.recents-title { font-size:14px; color:#ddd; font-weight:600; }
.recents-grid { display:grid; grid-template-columns: repeat(4, 1fr); gap:10px; width:100%; }
.recent-slot { position:relative; border:1px solid #2f2f2f; border-radius:10px; background:#151515; overflow:hidden; cursor:pointer; box-shadow:0 2px 6px rgba(0,0,0,0.35); aspect-ratio: 3 / 2; }
.recent-slot:hover { border-color:#4CAF50; }
.recent-slot.empty { border:1px dashed #3a3a3a; background:#121212; }
.recent-slot.empty:hover { border-color:#4a4a4a; }
.recent-thumb { width:100%; height:100%; object-fit:cover; display:block; }
.recent-thumb.portrait { object-position: center top; }
.recent-index { position:absolute; top:6px; left:6px; background:rgba(0,0,0,0.6); color:#fff; font-size:11px; padding:2px 6px; border-radius:6px; display:flex; align-items:center; gap:6px; }
.recent-index .lock-mini { font-size:12px; opacity:.9; }
.recent-del { position:absolute; top:6px; right:6px; background:rgba(0,0,0,0.55); color:#ddd; border:1px solid #3a3a3a; width:22px; height:22px; border-radius:6px; font-size:14px; line-height:1; display:flex; align-items:center; justify-content:center; cursor:pointer; }
.recent-del:hover { background:#3a2a2a; color:#fff; border-color:#513535; }
.recent-hover-overlay { position:absolute; inset:0; display:none; align-items:center; justify-content:center; text-align:center; background:rgba(0,0,0,0.55); border-radius:inherit; pointer-events:none; }
.recent-hover-num { color:rgba(255,255,255,0.9); font-size:44px; font-weight:800; letter-spacing:1px; text-shadow:0 2px 8px rgba(0,0,0,0.6); }
.recent-slot:not(.empty):hover .recent-hover-overlay { display:flex; }
.recent-hover-lock, .recent-hover-clear { pointer-events:auto; position:absolute; top:8px; width:42px; height:42px; border-radius:10px; background:rgba(0,0,0,0.5); color:#fff; border:1px solid rgba(255,255,255,0.25); display:flex; align-items:center; justify-content:center; cursor:pointer; transition: background .2s ease, transform .15s ease; }
.recent-hover-lock { left:8px; }
.recent-hover-clear { right:8px; }
.recent-hover-lock:hover, .recent-hover-clear:hover { background:rgba(0,0,0,0.7); transform:scale(1.05); }
.recent-hover-lock i, .recent-hover-clear i { font-size:18px; pointer-events:none; }

/* moved recents responsive rules to consolidated Sender Media section */

/* Stack camera toolbar vertically on small screens */
/* Camera toolbar media moved to end (Sender Media) */

.button-box {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.3); 
    border-radius: 5px;
    padding: 10px;
    z-index: 2000;
    transition: transform 0.5s ease, opacity 0.5s ease;
    transform: translateX(0);
    opacity: 1;
}

.button-box.hidden {
    transform: translateX(-100%);
    opacity: 0;
}

.button-box button {
    margin-bottom: 10px;
    padding: 10px;
    width: 44px;
    height: 44px;
    font-size: 20px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.button-box button:hover {
    background-color: rgba(40, 40, 40, 0.7);
    transform: scale(1.1);
}

.toggle-container {
    display: inline-table;
    width: 100%;
    margin-top: 5px;
}

.toggle-container .label-cell,
.toggle-container .switch-cell {
    display: table-cell;
    vertical-align: middle;
}

.label-cell {
    text-align: left;
    padding-right: 10px;
}

.switch-cell {
    text-align: right;
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 30px;
    margin-left: auto;
}

.toggle-switch input {
    display: none;
}

.toggle-switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 25px;
}

.toggle-switch-slider:before {
    position: absolute;
    content: "";
    height: 19px;
    width: 19px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-switch-slider {
    background-color: #4CAF50;
}

input:checked + .toggle-switch-slider:before {
    transform: translateX(25px);
}

/* Checkbox groups for multi-select lists */
.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.checkbox-group label {
    color: #e0e0e0;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.checkbox-group input[type="checkbox"] {
    accent-color: #4CAF50;
}

.debug-panel {
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    padding: 5px;
    border-radius: 5px;
    z-index: 1000;
    font-size: 12px;
    line-height: 1.2;
}

.debug-panel h3 {
    margin: 5px 0;
    font-size: 14px;
}

.debug-panel p {
    margin: 2px 0;
}

#gyroDebug {
    position: fixed;
    bottom: 10px;
    right: 10px;
}

#headDebug {
    position:fixed; 
    bottom:10px; 
    left:10px;
}

#videoContainer video{
    object-fit: cover;
}

.video-area{
    position:fixed; 
    bottom:10px; 
    left:10px;
}

.rotate-90 {
    transform: rotate(90deg);
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
}
  
.rotate-270 {
    transform: rotate(270deg);
    -webkit-transform: rotate(270deg);
    -moz-transform: rotate(270deg);
    -ms-transform: rotate(270deg);
    -o-transform: rotate(270deg);
}

.rotate-180 {
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
}

.draggable-box {
    position: absolute;
    top: 10px;
    left: 100px;
    background-color: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0;
    border-radius: 5px;
    z-index: 1000;
    user-select: none;
    border: 1px solid #444;
    font-family: monospace;
    min-width: 350px;
    min-height: 250px;
    width: 350px;
    height: 250px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.draggable-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: rgba(50, 50, 50, 0.8);
    padding: 5px 10px;
    cursor: move;
    border-bottom: 1px solid #555;
}

.header-controls {
    display: flex;
    align-items: center;
}

.function-button {
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
    margin-left: 5px;
    opacity: 0;
    transition: opacity 0.2s ease, color 0.2s ease;
    user-select: none;
}

.function-button:hover {
    color: #858585;
}

.copy-button:hover {
    color: #4dabf7;
}

.close-button:hover {
    color: #ff6b6b;
}

.copy-button.copied {
    color: #4CAF50;
    animation: pulse 0.5s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.draggable-header:hover .function-button {
    opacity: 1;
}

.close-button {
    cursor: pointer;
    font-size: 20px;
    padding: 0 5px;
    margin-left: 10px;
}

.close-button:hover {
    color: #858585;
}

.draggable-content {
    padding: 10px;
    overflow-y: auto;
    word-wrap: break-word;
    white-space: pre-wrap;
    height: calc(100% - 30px);
    font-family: monospace;
    line-height: 1.4;
    overflow-x: hidden;
    user-select: text;
}

.resize-handle {
    position: absolute;
    width: 10px;
    height: 10px;
    bottom: 0;
    right: 0;
    cursor: nwse-resize;
    background: linear-gradient(135deg, transparent 50%, rgba(255,255,255,0.5) 50%);
}

/* Style for the tip text about saving the page */
.viewer-tip-text {
    font-size: 0.8em;
    color: #CCCCCC; 
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5); 
    text-align: center;
    margin-top: 10px;
    width: 90%; 
    max-width: 400px;
}

/* Generic helpers (reused by multiple pages) */
.input-row.has-status-icon > input[type="text"] { padding-right: 25px; width: 100%; }
.full-width { width: 100% !important; }

/* Image Sender default visible pane states (JS may override) */
#imagePane { display: block; }
#cameraPane { display: none; }

/* Sketch canvas sizing (moved from inline) */
#sketchCanvas { width:100%; height:100%; display:block; }

/* Audio interaction prompt styles */
#audioInteractionPrompt {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    cursor: pointer;
}

.interaction-prompt {
    padding: 20px 30px;
    background-color: #333;
    border-radius: 10px;
    text-align: center;
    color: white;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
    animation: pulse 1.5s infinite;
}

.interaction-prompt i {
    font-size: 40px;
    margin-bottom: 10px;
    color: #4CAF50;
}

.interaction-prompt p {
    font-size: 18px;
    margin: 0;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.9; }
    100% { transform: scale(1); opacity: 1; }
}

/* WebSocket Status Overlay */
.ws-status-overlay {
    position: fixed;
    top: 10px;
    left: 10px;
    width: auto;
    height: auto;
    background-color: transparent;
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    z-index: 2500;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.ws-status-overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.ws-status-content {
    background-color: transparent;
    border-radius: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: none;
    border: none;
    width: auto;
    height: auto;
}

.ws-status-content.ws-status-content--with-label {
    flex-direction: row;
    align-items: center;
    gap: 2px;
}

.ws-status-icon {
    font-size: 64px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ws-status-icon img {
    width: 196px;
    height: auto;
    transition: filter 0.3s ease, transform 0.3s ease;
}

/* Alternative approach using background colors and masking */
.ws-status-icon {
    font-size: 16px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    width: 16px;
    height: 16px;
}

.ws-status-icon::before {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: currentColor;
    display: block;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.ws-status-icon img {
    display: none;
}

.ws-channel-badge {
    margin-left: 2px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 20px;
    background-color: rgba(15, 23, 42, 0.7);
    color: #f1f5f9;
    max-width: 180px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ws-channel-badge.hidden {
    display: none;
}

/* You could also define colors using CSS custom properties */
:root {
    --status-red: #dc2626;      /* Red for disconnected/error */
    --status-orange: #ea580c;   /* Orange for warning */
    --status-yellow: #ca8a04;   /* Yellow for connecting */
    --status-green: #16a34a;    /* Green for waiting */
}

/* Disconnected state - Red */
.ws-status-overlay.disconnected .ws-status-icon {
    color: var(--status-red);
}

/* Connecting state - Yellow */
.ws-status-overlay.connecting .ws-status-icon {
    color: var(--status-yellow);
}

.ws-status-overlay.connecting .ws-status-icon::before {
    animation: connecting-pulse 1.5s infinite;
}

/* Waiting state - Green */
.ws-status-overlay.waiting .ws-status-icon {
    color: var(--status-green);
}

.ws-status-overlay.waiting .ws-status-icon::before {
    animation: waiting-pulse 2s infinite;
}

/* Connected state - Green */
.ws-status-overlay.connected .ws-status-icon {
    color: var(--status-green);
}

.ws-status-overlay.connected .ws-status-icon::before {
    animation: connected-pulse 5s infinite;
}

/* Error state - Red */
.ws-status-overlay.error .ws-status-icon {
    color: var(--status-red);
}

.ws-status-overlay.error .ws-status-icon::before {
    animation: error-shake 0.6s ease-in-out;
}

@keyframes connecting-pulse {
    0% { 
        transform: scale(1);
        opacity: 1;
    }
    50% { 
        transform: scale(1.1);
        opacity: 0.7;
    }
    100% { 
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes waiting-pulse {
    0% { 
        transform: scale(1);
        opacity: 0.8;
    }
    50% { 
        transform: scale(1.05);
        opacity: 1;
    }
    100% { 
        transform: scale(1);
        opacity: 0.8;
    }
}

@keyframes error-shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

/* FPS Display */
.fps-display {
    position: fixed;
    top: 5px;
    left: 10px;
    color: #FFD700;
    padding: 0px 12px;
    font-family: monospace;
    font-size: 14px;
    font-weight: bold;
    z-index: 1500;
    display: none;
    user-select: none;
    pointer-events: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.fps-display.visible {
    display: block;
}

/* Prompt status inline container */
.prompt-status-inline { position: relative; display:flex; align-items:center; justify-content:flex-end; gap:6px; font-size:12px; margin-bottom:4px; }
.prompt-status-inline .status-label { display:none; }
/* In Live Console panel pages, keep the WebSocket status indicator at the page top-left. */
.prompt-status-inline .ws-status-overlay { position: fixed; top: 10px; left: 10px; }

/* WebSocket status overlay for inline use */
.ws-status-overlay.ws-inline { position: static; display:inline-flex; width:auto; height:auto; padding:0; background:transparent; box-shadow:none; backdrop-filter:none; }
.ws-status-overlay.ws-inline .ws-status-content { padding:0; background:transparent; box-shadow:none; }
.ws-status-overlay.ws-inline .ws-status-icon { width:12px; height:12px; }

.fav-slot { position:relative; }
.fav-slot::after { z-index:1; }
.fav-slot-header { z-index:3; pointer-events:auto; }
.fav-clear-btn { z-index:4; }
/* When hovering, keep header fully opaque */
.fav-slot:not(.empty):hover .fav-slot-header { opacity:1; }
.fav-slot-header { position:absolute; top:4px; left:6px; right:28px; display:flex; align-items:center; gap:6px; font-size:11px; line-height:1.2; color:#bbb; pointer-events:none; padding-right:34px; }
.fav-slot-header .fav-slot-title-edit-btn { order:0; pointer-events:auto; background:rgba(255,255,255,0.08); color:#ddd; border:1px solid rgba(255,255,255,0.15); padding:0 4px; font-size:10px; height:18px; line-height:16px; border-radius:4px; cursor:pointer; }
.fav-slot-header .fav-slot-title-edit-btn:hover { background:rgba(255,255,255,0.18); color:#fff; }
/* Hide edit button until hover/focus */
.fav-slot-header .fav-slot-title-edit-btn { opacity:0; pointer-events:none; transition:opacity .25s, background .25s, color .25s; }
.fav-slot:not(.empty):hover .fav-slot-header .fav-slot-title-edit-btn { opacity:1; pointer-events:auto; }
.fav-slot-header .fav-slot-title-edit-btn:focus { opacity:1; pointer-events:auto; }
.fav-slot-header .fav-slot-num-label { order:1; flex:1 1 auto; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.fav-slot-header.editing { pointer-events:auto; }
.fav-slot-title-input { pointer-events:auto; flex:1 1 auto; font-size:11px; line-height:14px; padding:2px 4px; border:1px solid rgba(255,255,255,0.3); background:rgba(0,0,0,0.4); color:#eee; border-radius:4px; min-width:40px; }
.fav-slot-title-input:focus { outline:none; border-color:#66b3ff; background:rgba(0,0,0,0.55); }
.fav-text { padding-top:20px; /* space for header */ }

/* Prevent hidden buttons from being clickable */
.fav-slot-header .fav-slot-title-edit-btn { opacity:0; pointer-events:none; }
.fav-slot:not(.empty):hover .fav-slot-header .fav-slot-title-edit-btn,
.fav-slot-header .fav-slot-title-edit-btn:focus { opacity:1; pointer-events:auto; }
.fav-clear-btn { pointer-events:none; }
.fav-slot:hover .fav-clear-btn, .fav-clear-btn:focus { pointer-events:auto; }

/* Favorites overlay edit button (top-left) using unified overlay style */
.fav-edit-overlay { left:8px; right:auto; opacity:0; pointer-events:none; }
.fav-slot:hover .fav-edit-overlay, .fav-edit-overlay:focus { opacity:1; pointer-events:auto; }

/* =============================================
   Viewer Media (consolidated)
   ============================================= */
@media (max-width:640px){
    .wv-tablist { top:10px; gap:6px; padding:4px 10px; }
    .wv-tab { padding:8px 14px; font-size:14px; }
}
@media screen and (min-width: 720px) {
    body { justify-content: center; }
    .wrapper { justify-content: center; }
    .showcase-container .input-container { justify-content: center; }
}

/* =============================================
   Sender Media (consolidated)
   Order: 900 → 640 → 480 → height/aspect → component-specific
   ============================================= */
/* ≤900: unify body scroll + mid-size tweaks */
@media (max-width: 900px) {
  body.prompt-mode { overflow: auto; align-items: stretch; }
  body.prompt-mode .sender-container {
    height: auto; min-height: 100vh; overflow-y: auto; overflow-x: hidden;
  }
  .controller-stage { padding:14px; }
  /* Favorites replace dialog/grid */
  .fav-replace-dialog { max-width:560px; }
  .fav-replace-grid { grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); }
  .fav-slot { height:110px; }
  /* Recents: 4 columns */
  .recents-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ≤640: compact mode (small wide screens e.g., iPad mini portrait) */
@media (max-width: 640px) {
  .sender-box-toolbar.gamepad-toolbar { justify-content:flex-start; }
  .sender-box-toolbar.gamepad-toolbar .sender-box-toolbar-controls-center { margin:0; margin-left:auto; justify-content:flex-end; }
  /* Prompt container: do not force top align globally; keep padding tweak only */
  .sender-container { padding: 0; }
  .sender-container .prompt-box { padding: 5px 5px 10px 5px; border-radius: 0; max-width: 100%; }
  .sender-container .prompt-box .prompt-textarea { min-height: clamp(100px, 38vh, 120px); font-size: 14px; }

  /* Footer: stack + full-width buttons */
  .sender-container .prompt-box .prompt-footer { flex-direction: column; align-items: stretch !important; gap: 10px; }
  .sender-container .prompt-box .prompt-footer .prompt-footer-left,
  .sender-container .prompt-box .prompt-footer .prompt-footer-right { width: 100%; }
  .sender-container .prompt-box .prompt-footer .fav-btn,
  .sender-container .prompt-box .prompt-footer { width: 100%; }

  /* Header: show only status */
  .prompt-page-header { display:block !important; }
  .prompt-page-header .prompt-page-head-row { display:flex; justify-content:flex-end; }
  .prompt-page-header .prompt-page-head-row h2 { display:none !important; }
  .prompt-page-header .prompt-page-sub { display:none !important; }
  .prompt-page-header .prompt-status-inline { display:flex !important; justify-content:flex-end; width:100%; }

  /* Favorites header compact */
  .favorites-section .favorites-header { display:flex !important; }
  .favorites-section .favorites-header .fav-title,
  .favorites-section .favorites-header .favorites-hint { display:none !important; }
  .favorites-section .favorites-header .fav-add-btn { margin-left:0; }

  /* Favorites grid & section spacing (no local scroll) */
  .favorites-section { margin:16px auto 32px auto; max-height: none; overflow: visible; padding-bottom: 0; }
  /* Compact mode: show 4 columns in Prompt favorites */
  .favorites-grid { grid-template-columns:repeat(4,minmax(0,1fr)); padding-right: 0; }
  .fav-slot { height:100px; padding:10px 10px 12px 10px; }

  /* Image dropzone */
  .image-dropzone { height: 300px; }

  /* Keep favorite action buttons inline (auto width) */
  .sender-container .prompt-box .prompt-footer > div .fav-btn { width:auto; flex:0 0 auto; }
  .sender-container .prompt-box .prompt-footer > div { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  #promptStyleSelect { width: 120px !important; }
  
  /* Sender toolbar compact layout (left+center on first row, right on its own row) */
  .sender-box-toolbar { display:grid !important; grid-template-columns: 1fr 2fr !important; grid-template-rows: auto auto; gap:10px; grid-template-areas:
    'left center'
    'send send'
  ; }
  .sender-box-toolbar > .sender-box-toolbar-controls-left { grid-area:left !important; justify-content:flex-start; }
  .sender-box-toolbar > .sender-box-toolbar-controls-center { grid-area:center !important; justify-content:flex-end; }
  .sender-box-toolbar > .sender-box-toolbar-controls-right { grid-area:send !important; display:flex; justify-content:flex-start; align-items:stretch; width:100%; }
  /* Ensure right group's primary action fills the row when alone */
  .sender-box-toolbar .sender-box-toolbar-controls-right .send-btn { box-sizing:border-box; flex:1 1 auto; }
  #sketchSendBtn { width:100%; flex:1 1 auto; }
  /* Mode chips: fixed width (compact), keep single-line */
  .mode-chips { display:flex; flex-wrap:nowrap; gap:8px; justify-content:center; }
  .mode-chip { min-width:56px; padding:6px 10px; width:auto; }
  /* Tool chips: slightly larger in compact mode */
  .tool-chip { min-width:52px; width:52px; }


  /* Camera toolbar vertical & full-width buttons */
  /* moved to phone layout ≤480 for Sketch only */

  /* Play/pause overlay smaller */
  .playpause-overlay { width:68px; height:68px; }
  .playpause-overlay i { font-size:28px; }

  /* Sketch area cap */
  .sketch-ar-wrap { max-height: clamp(200px, 50vh, 540px); }

  /* Recents: 4 columns in compact mode */
  .recents-grid { grid-template-columns: repeat(4, 1fr); }
  .recent-hover-num { font-size:34px; }

  /* Image Settings sliders (compact): default stacks to 4 columns */
  .filter-sliders-grid { grid-template-columns: repeat(4, minmax(64px, 1fr)); }

  /* Image Sender: FPS row occupies full width; Send on its own row (iPad mini compact) */
  /* imagePane: only send row */
  #imagePane .sender-box-toolbar { 
    display:grid !important; grid-template-columns: 1fr !important; grid-template-rows:auto !important; gap:10px;
    grid-template-areas: 'send' !important;
  }
  #imagePane .sender-box-toolbar-controls-left,
  #imagePane .sender-box-toolbar-controls-center { display:none !important; }
  #imagePane .sender-box-toolbar-controls-right { grid-area:send !important; display:flex; justify-content:center; width:100%; }
  #imageSendBtn { width:100% !important; }

  /* cameraPane: left then send */
  #cameraPane .sender-box-toolbar { 
    display:grid !important; grid-template-columns: 1fr !important; grid-template-rows:auto auto !important; gap:10px;
    grid-template-areas: 'left' 'send' !important;
  }
  #cameraPane .sender-box-toolbar-controls-center{ display:none !important; }
  #cameraPane .sender-box-toolbar-controls-left  { grid-area:left !important; width:100% !important; }
  #cameraPane .sender-box-toolbar-controls-right { grid-area:send !important; display:flex; justify-content:center; width:100% !important; }
  #cameraSendBtn { width:100% !important; }
}

/* ≤480: phone */
@media (max-width: 480px) {
  /* Image Settings sliders (phones): keep compact and slightly shorter */
  .filter-sliders-grid { grid-template-columns: repeat(4, minmax(58px, 1fr)); }
  .filter-rot{ height:140px; width:30px; }
  .filter-slider{ width:150px; height:34px; }
  .filter-slider::-webkit-slider-thumb { width: 32px; height:56px; margin-top:-24px; }
  .filter-slider::-moz-range-thumb { width: 32px; height:56px; }
  .image-dropzone { height: 240px; }
  .sender-container .prompt-box .prompt-textarea { min-height: clamp(100px, 42vh, 120px); }
  /* Prompt favorites: 2 columns on phones */
  .favorites-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Sketch toolbar: stack groups and full-width send button on phones */
  .sender-box-toolbar { display:flex !important; flex-direction: column; align-items:stretch; gap:12px; }
  .sender-box-toolbar .sender-box-toolbar-controls-left,
  .sender-box-toolbar .sender-box-toolbar-controls-center,
  .sender-box-toolbar .sender-box-toolbar-controls-right { width:100%; display:flex; gap:10px; }
  /* Align center control group to right on phones */
  .sender-box-toolbar .sender-box-toolbar-controls-center { justify-content:flex-end; }
  /* Fill full row for each group */
  .sender-box-toolbar .sender-box-toolbar-controls-left .tool-chip,
  .sender-box-toolbar .sender-box-toolbar-controls-left .fav-btn { flex: 1 1 0; width:auto; min-width:0; }
  .sender-box-toolbar .sender-box-toolbar-controls-center .mode-chips { width:100%; display:flex; gap:10px; }
  .sender-box-toolbar .sender-box-toolbar-controls-center .mode-chip { flex: 1 1 0; width:auto; min-width:0; }
  .sender-box-toolbar .sender-box-toolbar-controls-right .send-btn { box-sizing:border-box; flex:1 1 auto; }
  /* Recents: 2 columns */
  .recents-grid { grid-template-columns: repeat(2, 1fr); }
  /* Image Sender (phones): FPS full-width row + Send full-width row */
  #imagePane .sender-box-toolbar, #cameraPane .sender-box-toolbar { display:flex; flex-direction:column; align-items:stretch; gap:12px; }
  #imagePane .sender-box-toolbar-controls-center,#cameraPane .sender-box-toolbar-controls-center{ display:none; }
  #imagePane .sender-box-toolbar-controls-left,  #cameraPane .sender-box-toolbar-controls-left  { width:100%; }
  #imagePane .fps-chips, #cameraPane .fps-chips { width:100%; }
  #imagePane .sender-box-toolbar-controls-right, #cameraPane .sender-box-toolbar-controls-right { width:100%; display:flex; justify-content:center; }
  #imageSendBtn, #cameraSendBtn { width:100%; }
  /* Prompt page: make left buttons fill full row and send button full width */
  .sender-box-toolbar .sender-box-toolbar-controls-left .fav-btn { flex: 1 1 0 !important; width:auto !important; min-width:0 !important; }
  #sendBtn { box-sizing:border-box; }
  /* Prompt style control: hide icon and shrink select */
  .style-wrap .style-icon { display:none !important; }
  #promptStyleSelect { width: 140px !important; }
  /* Slimmer mode chips on phones */
  .mode-chip { min-width:56px; padding:6px 10px; width:auto; }
  .sender-box-toolbar.gamepad-toolbar { display:flex; flex-direction:column; align-items:stretch; gap:12px; }
  .sender-box-toolbar.gamepad-toolbar .sender-box-toolbar-controls-left,
  .sender-box-toolbar.gamepad-toolbar .sender-box-toolbar-controls-center,
  .sender-box-toolbar.gamepad-toolbar .sender-box-toolbar-controls-right { width:100%; display:flex; gap:10px; }
  .sender-box-toolbar.gamepad-toolbar .gamepad-index-toolbar { justify-content:flex-start; }
  .sender-box-toolbar.gamepad-toolbar .gamepad-index-toolbar .fps-chips { flex-wrap:wrap; }
  .sender-box-toolbar.gamepad-toolbar .sender-box-toolbar-controls-center { margin:0; justify-content:center; }
  .sender-box-toolbar.gamepad-toolbar .gamepad-index-toolbar .fps-chips { flex-wrap:wrap; }
  .sender-box-toolbar.gamepad-toolbar .sender-box-toolbar-controls-right { justify-content:flex-start; }
  /* Prompt toolbar: stack left / center / right each row */
  .prompt-toolbar { grid-template-columns: 1fr; grid-template-areas:
    'p-left'
    'p-center'
    'p-right'
  ; }
  .prompt-controls-left, .prompt-controls-center, .prompt-controls-right { justify-content:stretch; }
  .prompt-controls-center { justify-content:center; }
  .prompt-controls-right { gap:10px; }
  /* Audio recorder controls shrink to keep single row */
  .audio-recorder .recorder-float-controls {
    gap:10px;
    flex-wrap:nowrap;
  }
  .audio-recorder .recorder-float-controls .overlay-tool-btn {
    width:40px;
    height:40px;
    border-radius:11px;
  }
  .audio-recorder .recorder-ptt-btn {
    min-width:150px;
    height:40px;
    font-size:13px;
    padding:0 12px;
    border-radius:12px;
  }
  .audio-recorder .recorder-replay-btn {
    min-width:78px;
    height:36px;
    font-size:12px;
    padding:0 10px;
    border-radius:10px;
  }
  .audio-recorder .recorder-replay-btn--top {
    top:10px;
    right:10px;
  }
}

  /* Prompt toolbar: first row left+center; second row right spans */
  .prompt-toolbar { grid-template-columns: 1fr 1fr; grid-template-rows:auto auto; gap:10px; grid-template-areas:
    'p-left p-center'
    'p-right p-right'
  ; }
  .prompt-controls-left { grid-area: p-left; justify-content:flex-start; }
  .prompt-controls-center { grid-area: p-center; justify-content:flex-end; }
  .prompt-controls-right { grid-area: p-right; justify-content:space-between; }
/* Height/aspect specific adjustments */
@media (max-height: 768px) and (min-aspect-ratio: 16/10) {
  /* Top-align vertically to avoid clipping, keep horizontal centering */
  .sender-container { align-items:center !important; overflow-y:auto; }
  .sender-container .prompt-box { margin-top:0 !important; }
}

/* Mixer Style buttons (V2 controls) */
.mixer-btn-group { display:flex; flex-wrap:wrap; gap:8px; margin:5px 0; }
.mixer-btn-group--toggle .mixer-btn { min-width:72px; height:72px; }
.mixer-btn { width:72px; height:72px; padding:8px; border-radius:8px; border:0; background:rgba(255,255,255,0.08); color:#fff; font-size:12px; line-height:1.2; font-weight:500; letter-spacing:0.2px; cursor:pointer; transition:all 0.15s ease; box-shadow:inset 0 0 0 1px rgba(255,255,255,0.06); text-align:center; white-space:normal; display:flex; align-items:center; justify-content:center; }
.mixer-btn:hover:not(.mixer-btn--active) { background:rgba(255,255,255,0.14); border-color:rgba(255,255,255,0.35); color:#fff; }
.mixer-btn:active { transform:translateY(1px); }
.mixer-btn--active { background:#4caf50; color:#fff; border:0; box-shadow:0 4px 14px rgba(76,175,80,0.35); }
.mixer-btn--active:hover { background:#5cd666; border:0; box-shadow:0 6px 16px rgba(76,175,80,0.5); }
.mixer-slider-row { display:flex; align-items:center; gap:8px; }
.mixer-slider-row input[type=range] { flex:1 1 auto; }
.btn-reset { min-width:40px; min-height:36px; padding:6px 10px; border-radius:8px; border:1px solid rgba(255,255,255,0.25); background:rgba(255,255,255,0.1); color:#fff; cursor:pointer; transition:all 0.15s ease; }
.btn-reset:hover { background:rgba(255,255,255,0.2); }
.sub-label { display:block; margin:10px 0; font-size:13px; font-weight:600; color:#d0d0d0; }
.subsection-title { font-size:14px; font-weight:700; margin:10px 0 6px 0; color:#fff; }

/* Mixer subsections */
.mixer-subsection { border:none; background:transparent; border-radius:12px; padding:0; margin-bottom:0; }
.mixer-subsection__header { display:flex; align-items:center; justify-content:flex-start; cursor:pointer; padding:2px 4px 4px 4px; gap:10px; margin-left:0px; }
.mixer-subsection__title { font-size:13px; font-weight:00; color:#d0d0d0; text-transform:uppercase; }
.mixer-subsection__toggle { background:#1a1a1a; border:1px solid #2a2a2a; color:#d0d0d0; font-size:14px; cursor:pointer; width:32px; height:32px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center; }
.mixer-subsection__toggle i { transition:transform .2s ease; transform:rotate(0deg); }
.mixer-subsection__toggle i.collapsed { transform:rotate(-90deg); }
.mixer-subsection__toggle:hover { background:#222; border-color:#3a3a3a; color:#d0d0d0; }
.mixer-subsection__toggle:active { transform:scale(.98); }
.mixer-subsection__body { border:none; background:transparent; border-radius:12px; padding:5px 12px; margin-left:6px; }
.mixer-subsection.collapsed .mixer-subsection__body { display:none; }
