body[data-theme-bg] article[data-theme-bg] {
 border-left: 3px solid var(--theme-text);
}

/* Script Output */
.script-output-reel {
 display: flex;
 overflow-x: auto;
 padding: 0 10px 10px;
}

.script-output-card {
 flex-shrink: 0; /* Prevent cards from shrinking */
 background-color: var(--bg-alt);
 color: var(--text);
 box-shadow: 0 1px 3px #80808080;
}

/* Special '𝓢' channel styling */
body[data-channel='𝓢'] .compose textarea {
 font-family: monospace;
 line-height: 1.5;
 font-size: 85%;
 padding: 20px; /* 2x normal padding (assuming 10px is normal) */
 min-height: 160px; /* Twice normal height (assuming 80px is normal) */
 resize: vertical;
 background-color: var(
  --theme-bg,
  var(--bg-alt)
 ); /* Distinct background */
 border-color: var(
  --theme-text,
  var(--border-color)
 );
}

/* Ensure resize works */
.compose textarea {
 overflow: auto; /* Needed for resize handle to appear consistently */
}

/* Apply monospace style to message content ONLY on the SCRIPT_CHANNEL page */
body[data-channel='𝓢']
 .news
 article
 > div:first-child
 p {
 font-family: monospace;
 line-height: 1.5;
 font-size: 85%;
 /* Optional: Add background or padding if desired */
 /* background-color: #ffffff08; */
 /* padding: 5px; */
 white-space: pre-wrap; /* Ensure whitespace is respected like in pre */
 word-break: break-all; /* Break long lines */
}

/* Styles copied and adapted from labels.css for script menu */
.message-menu.script-menu {
 /* Add specific overrides if needed, otherwise inherits from .message-menu */
 /* Example: Add more padding */
 /* padding: 0.75em 1em; */
}

.message-menu .script-menu-list {
 /* Similar to .label-group container */
 /* Reuse label-group styles for consistency */
 border: 1px solid #80808080;
 background-color: #00000040;
 border-radius: 0.5em;
 padding: 0 0.625em 0.5em;
 margin: 0.5em 0; /* Added margin for spacing */
}

/* Target the .news items within the script menu list */
.script-menu-list .news.script-menu-item {
 /* Similar to .label-group .news > article */
 border-radius: 10px !important;
 /* flex properties inherited or set by .news */
 min-height: initial;
 overflow: visible !important;
 padding: 10px 4px;
 position: relative;
 margin: 0; /* Reset margin from potential .news styles */
 background-color: var(
  --bg-alt
 ); /* Give items a background */
}

/* Style the article within the news item */
.script-menu-list
 .news.script-menu-item
 article {
 display: flex;
 flex-direction: column; /* Stack content and tools */
 padding: 0; /* Reset article padding */
}

/* Style the preview container (first div in article) */
.script-menu-list
 .news.script-menu-item
 article
 > div:first-child {
 margin-bottom: 5px; /* Space between preview and tools */
}

/* Style the <pre> tag within the preview container */
.script-menu-list .news.script-menu-item pre {
 /* Script preview styling */
 font-family: monospace;
 font-size: 85%;
 line-height: 1.5;
 margin: 0; /* Reset margin */
 padding: 5px;
 background-color: #ffffff10;
 border-radius: 4px;
 white-space: pre-wrap; /* Wrap long lines */
 word-break: break-all; /* Break long words/lines */
 max-height: 100px; /* Limit preview height */
 overflow-y: auto; /* Allow scrolling for longer previews */
}

/* Use the same selector as labels.css where possible */
.script-menu-list
 .news.script-menu-item
 .article-tools {
 /* Similar to .label-group .news > article > div.article-tools */
 display: flex;
 justify-content: space-between; /* Space out score and buttons */
 align-items: center;
 padding-top: 0;
 width: 100%; /* Take full width */
}

/* Style the score within the article-tools */
.script-menu-list
 .news.script-menu-item
 .article-tools
 .score {
 /* Similar to .label-group ... .score */
 font-size: 18px;
}

/* Style the article-tool-buttons within the article-tools */
.script-menu-list
 .news.script-menu-item
 .article-tools
 .article-tool-buttons {
 /* Similar to .label-group ... .article-tool-buttons */
 display: flex;
 flex-direction: row;
 gap: 2px;
 margin-bottom: 0; /* Reset margin */
}

/* Style the global score element */
.global-script-score {
 font-size: 0.8em;
 color: var(--color-text-secondary);
 text-align: right;
 opacity: 0.8;
 position: absolute;
 right: 2px;
 top: 2px;
 padding: 2px 7px;
}
