/*Used for places where posts are displayed*/
.hideButton, .embedButton, #closeWatcherMenuButton, .watchButton,
  .watchedCellCloseButton, .hideFileButton, .extraMenuButton,
  #closeSettingsMenuButton {
  margin-left: 0.5em;
}

.trashIndicator::before {
  content: "\E0CF";
  font-family: Icons;
  color: #A00;
}

.imgExpanded {
  max-width: 100%;
}

video {
  max-width: 100%;
}

.imgLink, #selectedDivQr .selectedCell, #selectedDiv .selectedCell {
  float: left;
}

#selectedDivQr .nameLabel, #selectedDiv .nameLabel {
  display: inline-block;
  max-width: 70px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.reportFieldset {
  margin-top: 1em;
  padding: 0.5em;
  margin-bottom: 1em;
}

.labelId {
  color: #ffffff;
  padding: 0.25em;
  border-radius: 5px;
  text-shadow: -1px 0 black, 0 1px black, 1px 0 black, 0 -1px black;
}

.quoteTooltip {
  position: absolute;
  display: none
}

#formMore, #qrFormMore, #qrCaptchaButton, #qrFilesButton {
  cursor: pointer;
}

.unhideButton, .embedButton {
  font-size: 80%;
}

.extraMenu, .hideMenu {
  position: absolute;
  top: 0;
  left: 100%;
  margin-left: 10px;
  z-index: 1;
  font-weight: normal;
  white-space: nowrap;
  cursor: default;
  text-shadow: none;
}


.hideMenu div, .extraMenu div {
  cursor: pointer;
}

.extraMenuButton, .hideButton {
  position: relative !important;
  top: 1px !important;
  vertical-align: middle !important;
  display: inline-block !important;
}

.hideButton::before {
  content: '\e017';
}

.postInfo, .opHead, .panelUploads, .panelIp, .panelProxyIp,
  .contentOmissionIndicator, .labelOmission, .labelId, .panelASN,
  .panelBypassId {
  font-size: 90%;
}

.divMessage {
  font-size: 85%;
}

.divPosts {
  margin: 1em 0;
}

.postCell {
  margin: 0.25em 0;
}

.linkName {
  font-weight: bold;
  color: #c084fc;
}



.linkName:hover {
  color: #e9d5ff;
}



.quoteLink {
  color: #fb7185;
}

.linkSelf {
  text-decoration: none;
}



.linkSelf:hover {
  color: #ff0000;
}

.linkQuote {
  text-decoration: none;
}



.linkQuote:hover {
  color: #ff0000;
}

.labelSubject {
  color: #f472b6;
  font-weight: bold;
  word-wrap: break-word;
}



.labelRole {
  color: #ff0000;
  font-weight: bold;
}

.labelRole:before {
  font-family: Icons;
  content: "\e0dc";
  color: #A00;
}

.divMessage {
  margin: 0.75em 0 0.5em 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Indent reply message to align under the icons before the username */
.innerPost > .divMessage,
.markedPost > .divMessage {
  padding-left: 1.85em;
}

.divBanMessage {
  color: #ff0000;
  font-weight: bold;
  margin: 1em;
  font-size: 100%;
}

.divBanMessage:before {
  font-family: Icons;
  content: "\e0d8";
  color: #A00;
}

.uploadCell {
  margin: 0.25em 1em 0.25em 0.5em;
  float: none;
}

.uploadCell img {
  float: left;
  margin-right: 1em;
  margin-bottom: 1em;
}

/*Change the dimensions if you wish for larger thumbs*/
.uploadCell img:not(.imgExpanded) {
  max-width: 220px;
  max-height: 220px;
  object-fit: contain;
}

.variableHeight {
  height: 220px;
}

.multipleUploads {
  float: left;
  width: 100%;
}

.multipleUploads .uploadCell:not(.expandedCell) {
  max-width: 150px;
  float: left;
}

.uploadDetails {
  margin-bottom: 0.5em;
}

.originalNameLink {
  display: inline-block;
  vertical-align: top;
  max-width: 155px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.originalNameLink:hover {
  max-width: 100%;
}

.opCell {
  clear: left;
}

.panelBacklinks a {
  color: #fb7185;
  text-decoration: none;
}

.hideLink {
  vertical-align: top;
}

.aa {
  font-family: Mona, "MS PGothic", "ＭＳ Ｐゴシック", sans-serif;
  display: block !important;
  font-size: 12pt;
  line-height: 1.1;
}

.labelLastEdit {
  font-size: 80%;
  margin-top: 0.75em;
  margin-left: 0.75em;
}

.contentOmissionIndicator {
  margin: 1em 0;
}

.labelOmission {
  margin-top: 0.5em;
  margin-left: 0.5em;
}

.imgFlag {
  max-width: 16px;
  max-height: 16px;
}

/*Board header*/
.boardHeader p {
  color: #ccd6f6;
}

.boardHeader p#labelName {
  font-size: 200%;
  display: inline-block;
}

.boardHeader #favouriteButton {
  font-size: 200%;
}

.boardHeader p#labelDescription {
  font-size: 100%;
}

.boardHeader a {
  font-size: 75%;
  display: inline-block;
  text-decoration: none;
}

.unhideButton {
  clear: left;
  display: block;
}

/*Actions form*/
#threadList {
  margin: 1em;
}

#divMessage {
  text-align: center;
  white-space: pre-wrap;
}

.multipleUploads .labelHash {
  word-wrap: anywhere;
}

.contentAction label, #divControls label, #transferControls label,
  #ipDelete label, #divArchive label, #divMerge label {
  font-size: 80%;
}

.extraMenuButton::before {
  content: '\e02f';
}

.nameLink {
  display: none !important;
}

.hideFileButton {
  margin-left: 0 !important;
  margin-right: 0.25em !important;
}

.hideFileButton::after {
  content: '[-]';
  font-weight: bold;
}

.hiddenFile::after {
  content: '[+]';
  font-weight: bold;
}

.imgLink[style*="display: none"],
.imgLink[style*="display:none"] {
  display: none !important;
}

.modalPanel {
  position: fixed;
  width: 100%;
  height: 100%;
  z-index: 200;
  display: table;
  text-align: center;
  background: rgba(29, 31, 33, 0.66);
  right: 0;
  top: 0;
}

.modalInnerPanel {
  vertical-align: middle;
  display: table-cell;
}

.modalDecorationPanel {
  background: #190e28;
  border: 1px solid #4c1d95;
  border-radius: 5px;
  color: #ccd6f6;
  padding: 10px;
  display: inline-block;
  max-width: 90%;
}


.modalHeader {
  display: block;
  margin-bottom: 5px;
}

.modalCaptchaControls {
  display: block;
  text-align: left;
}

.modalCaptchaControls input, .modalOkButton {
  margin-right: 10px;
}

#postingForm th, .modalTableBody th {
  font-weight: bold;
  text-align: left;
  width: 100px;
  font-size: 80%;
  padding-left: 0.3em;
  cursor: default;
  background: #22123b;
  border: 1px solid #4c1d95;
  color: #ccd6f6;
  border-radius: 4px;
}


#postingForm td, .modalTableBody td {
  text-align: left;
}


#postingForm input:focus, #postingForm textarea:focus,
  .modalDecorationPanel input[type='text']:focus,
  #settingsMenu input[type='text']:focus, #settingsMenu textarea:focus
  {
  border-color: #c084fc;
  outline: none;
}

@media only screen and (max-width: 812px) {
  .uploadCell img:not(.imgExpanded) {
    max-width: 160px;
    max-height: 160px;
    object-fit: contain;
  }
  .multipleUploads {
    display: block;
  }
  .postInfo, .opHead, .divMessage, .panelUploads, .panelIp, .panelProxyIp,
    .contentOmissionIndicator, .labelOmission, .labelId {
    font-size: 100%;
  }
  .innerPost, .innerOP, .markedPost {
    width: 100%;
    padding: 0.5em;
    box-sizing: border-box;
  }
  #threadList {
    margin: 0;
  }
  iframe {
    display: block;
    width: 100%;
  }
  .divPosts {
    margin: .25em;
  }
  .nameLink {
    display: none !important;
  }
  .hideFileButton::after {
    content: '[-]';
  }
  .hiddenFile::after {
    content: '[+]';
  }
  .originalNameLink, .labelCreated, .sizeLabel, .dimensionLabel {
    display: none;
  }
  .divMessage {
    margin-left: 1em;
  }
  .labelHash {
    overflow-wrap: anywhere;
  }
}

/* Dark Backdrop Overlay */
#postingOverlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 998;
}

/* Modal wrapper positioning for floating thread form */
#postingForm:has(.floating) {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

/* Floating Thread Creation Modal (Matching Image 1) */
#newPostFieldset.floating {
  position: relative;
  pointer-events: auto;
  margin: auto;
  background-color: #100a1c !important;
  border: 1px solid #5821a3 !important;
  border-radius: 6px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.9) !important;
  padding: 1.2em 1.5em !important;
  width: 30em !important;
  max-width: 95vw !important;
  box-sizing: border-box !important;
  display: block !important;
  text-align: left !important;
}

.modal-mode-label {
  color: #ccd6f6;
  font-size: 105%;
  font-weight: 500;
  margin-bottom: 0.8em;
  text-align: left;
  user-select: none;
}

/* Modal Submit Post Button (Centered, matching Image 1) */
#newPostFieldset.floating #formButton {
  display: block !important;
  margin: 1.2em auto 0.2em auto !important;
  padding: 0.5em 2.8em !important;
  font-size: 125% !important;
  font-weight: bold !important;
  color: #ccd6f6 !important;
  background-color: #1e1035 !important;
  border: 1px solid #5821a3 !important;
  border-radius: 6px !important;
  cursor: pointer !important;
  transition: background-color 0.2s, border-color 0.2s !important;
}

#newPostFieldset.floating #formButton:hover {
  background-color: #2b174b !important;
  border-color: #c084fc !important;
}

/* Inline Reply Form (Matching Image 2) */
#newPostFieldset.inline-reply {
  margin: 1.5em 0 1.5em 1.5em !important;
  background-color: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 30em !important;
  max-width: 90vw !important;
  box-sizing: border-box !important;
  display: block !important;
  text-align: left !important;
}

.inline-reply-title {
  font-size: 140% !important;
  font-weight: bold !important;
  color: #ccd6f6 !important;
  margin: 0 0 0.8em 0 !important;
  text-align: left !important;
  border: none !important;
}

/* Inline Submit Reply Button (Left-aligned, matching Image 2) */
#newPostFieldset.inline-reply #formButton {
  display: inline-block !important;
  margin: 1em 0 0 0 !important;
  padding: 0.4em 1.4em !important;
  font-size: 100% !important;
  font-weight: bold !important;
  color: #ccd6f6 !important;
  background-color: #1e1035 !important;
  border: 1px solid #5821a3 !important;
  border-radius: 4px !important;
  cursor: pointer !important;
  transition: background-color 0.2s, border-color 0.2s !important;
}

#newPostFieldset.inline-reply #formButton:hover {
  background-color: #2b174b !important;
  border-color: #c084fc !important;
}

/* Collapsible Captcha Header */
.collapsible-captcha-header {
  color: #c084fc !important;
  font-size: 110% !important;
  font-weight: bold !important;
  cursor: pointer !important;
  user-select: none !important;
  margin: 0.5em 0 !important;
  background: transparent !important;
  border: none !important;
  text-align: left !important;
  justify-content: flex-start !important;
  width: auto !important;
  min-width: auto !important;
}

.collapsible-captcha-header:hover {
  color: #e9d5ff !important;
}

/* Toggle Submit Button Styling */
#showNewThreadButton {
  display: block;
  margin: 1.5em auto;
  padding: 0.6em 2em;
  font-size: 110%;
  font-weight: bold;
  color: #ccd6f6;
  background-color: #1e1035;
  border: 1px solid #5821a3;
  border-radius: 6px;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s;
}

#showNewThreadButton:hover {
  background-color: #2b174b;
  border-color: #c084fc;
}

#postingForm {
  margin: 0;
  padding: 0;
  text-align: center;
}

/* Restructuring form table into block/flex fields inside the floating box */
/* Restructuring form table into block/flex fields inside the floating box */
#newPostFieldset #postingTable,
#newPostFieldset #postingTable tbody,
#quick-reply .post-table,
#quick-reply .post-table tbody {
  display: block !important;
  width: 100% !important;
}

#newPostFieldset #postingTable tr,
#quick-reply .post-table tr {
  display: flex !important;
  align-items: center !important;
  margin-bottom: 0.25em !important;
  width: 100% !important;
}

#newPostFieldset #postingTable th,
#quick-reply .post-table th:not([colspan]) {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 65px !important;
  min-width: 65px !important;
  height: 24px !important;
  padding: 0 !important;
  font-size: 75% !important;
  font-weight: bold !important;
  background: #22123b !important;
  border: 1px solid #4c1d95 !important;
  color: #ccd6f6 !important;
  border-radius: 3px !important;
  margin-right: 6px !important;
  box-sizing: border-box !important;
  cursor: default !important;
}

#newPostFieldset #postingTable td,
#quick-reply .post-table td {
  flex-grow: 1 !important;
  display: flex !important;
  align-items: center !important;
  box-sizing: border-box !important;
  padding: 0 !important;
  width: auto !important;
}

/* Full-width rows: Message and Upload — hide th, td goes block */
#newPostFieldset #divMessageRow,
#newPostFieldset #postingTable tr:has(textarea),
#newPostFieldset #divUpload,
#newPostFieldset #postingTable tr:has(#inputFiles),
#newPostFieldset .mock-row,
#quick-reply .post-table tr:not(:has(th)) {
  flex-direction: column !important;
  align-items: stretch !important;
}

#newPostFieldset #divMessageRow th,
#newPostFieldset #postingTable tr:has(textarea) th,
#newPostFieldset #divUpload th,
#newPostFieldset #postingTable tr:has(#inputFiles) th,
#newPostFieldset .mock-row th {
  display: none !important;
}

#newPostFieldset #divMessageRow td,
#newPostFieldset #postingTable tr:has(textarea) td,
#newPostFieldset #divUpload td,
#newPostFieldset #postingTable tr:has(#inputFiles) td,
#newPostFieldset .mock-row td,
#quick-reply .post-table tr:not(:has(th)) td {
  width: 100% !important;
  display: block !important;
}

/* Remove Email, Misc, formMore, extra tbody completely */
#formMore,
#extra,
#divEmail,
#divMisc,
#fieldEmail,
#alwaysUseBypassDiv,
tr:has(#fieldEmail),
tr:has(#checkboxNoFlag),
.form-hidden {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  max-height: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#boardContentLinks {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  padding: 0.6em 0 !important;
  margin: 1em 0 !important;
  border-bottom: 1px solid #5821a3 !important;
  box-sizing: border-box !important;
}

#inlineDeleteBar {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.5em !important;
  font-size: 85% !important;
  color: #ccd6f6 !important;
}

#inlineDeletePassword {
  background: #100a1c !important;
  border: 1px solid #5821a3 !important;
  color: #ccd6f6 !important;
  border-radius: 3px !important;
  padding: 2px 6px !important;
  font-size: 90% !important;
  width: 90px !important;
}

#inlineDeleteButton {
  background: #1e1035 !important;
  border: 1px solid #5821a3 !important;
  color: #ccd6f6 !important;
  border-radius: 3px !important;
  padding: 2px 10px !important;
  font-size: 90% !important;
  cursor: pointer !important;
}

#inlineDeleteButton:hover {
  background: #2b174b !important;
  border-color: #c084fc !important;
}

/* Hide subject field when replying to a thread */
#newPostFieldset.inline-reply #divSubject,
#newPostFieldset.inline-reply tr:has(#fieldSubject),
body:has(#threadIdentifier) #divSubject,
body:has(#threadIdentifier) tr:has(#fieldSubject),
#quick-reply #qrsubject,
#quick-reply tr:has(#qrsubject) {
  display: none !important;
}

/* Captcha row — column layout */
#newPostFieldset #captchaDiv,
#newPostFieldset #postingTable tr:has(#fieldCaptcha),
#quick-reply .post-table tr#qrCaptchaButton,
#quick-reply .post-table tr:has(#QRfieldCaptcha) {
  flex-direction: column !important;
  align-items: flex-start !important;
  margin-bottom: 12px !important;
}

#newPostFieldset #captchaDiv th,
#newPostFieldset #postingTable tr:has(#fieldCaptcha) th,
#quick-reply .post-table tr:has(#QRfieldCaptcha) th {
  display: none !important;
}

/* Captcha layout — image on top, reload & answer field on bottom left */
#captchaDiv td,
#newPostFieldset #captchaDiv td,
#postingTable tr:has(#fieldCaptcha) td,
.captchaDiv td {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  text-align: left !important;
  width: 100% !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.captchaImage,
img.captchaImage {
  display: block !important;
  max-width: 100% !important;
  height: auto !important;
  margin-bottom: 6px !important;
  margin-left: 0 !important;
}

.subCaptchaDiv {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  width: 100% !important;
  margin-top: 6px !important;
  margin-bottom: 10px !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.subCaptchaDiv .captchaField,
.subCaptchaDiv #fieldCaptcha,
.subCaptchaDiv input[name="captcha"],
#fieldCaptcha {
  order: 1 !important;
  display: inline-block !important;
  width: 100px !important;
  min-width: 90px !important;
  max-width: 110px !important;
  height: 26px !important;
  padding: 2px 6px !important;
  font-size: 80% !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.reloadCaptchaButton,
.subCaptchaDiv .reloadCaptchaButton,
.subCaptchaDiv input[type="button"] {
  order: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 12px !important;
  height: 26px !important;
  line-height: 1 !important;
  text-align: center !important;
  box-sizing: border-box !important;
  font-size: 82% !important;
  font-weight: bold !important;
  margin: 0 !important;
}

.subCaptchaDiv .captchaTimer {
  order: 3 !important;
  display: inline-block !important;
  font-size: 80% !important;
  color: #a78bfa !important;
  margin: 0 !important;
  white-space: nowrap !important;
}

/* Hide 'no cookies?' link and 'Remember to follow the rules' elements */
a[href*="noCookie"],
a[href*="noCookieCaptcha"],
a[href*="bypass"],
#linkNoCookie,
.noCookieLink,
p.small:has(a.rules),
#newPostFieldset p.small:has(a.rules),
form p.small:has(a.rules),
.rulesNotice {
  display: none !important;
}

/* Password helper text hidden */
#newPostFieldset #divPassword p.password-helper,
#newPostFieldset #postingTable tr:has(#fieldPostingPassword) p,
#quick-reply .post-table tr:has(#qrpassword) p {
  display: none !important;
}

/* Collapsed content — applies globally to hide collapsed sections */
.collapsed-content,
#newPostFieldset #captchaDiv .collapsed-content,
#newPostFieldset #postingTable .collapsed-content,
#quick-reply .collapsed-content,
#quick-reply .post-table tbody.collapsed-content {
  display: none !important;
}

/* Hidden form elements — overrides tr flex and tbody block rules */
#newPostFieldset .form-hidden,
#newPostFieldset #postingTable .form-hidden,
#newPostFieldset #postingTable tbody.form-hidden,
#quick-reply .form-hidden,
#quick-reply .post-table .form-hidden,
#quick-reply .post-table tbody.form-hidden {
  display: none !important;
}

/* Collapsible headers */
.collapsible-header {
  font-size: 95%;
  font-weight: bold;
  color: #c084fc;
  cursor: pointer;
  user-select: none;
  margin: 0.35em 0;
  display: block;
  text-align: left;
  transition: color 0.15s ease-in-out;
}

.collapsible-header:hover {
  color: #e9d5ff;
}

/* Text inputs layout */
/* Text inputs layout */
#newPostFieldset input[type="text"],
#newPostFieldset input[type="password"],
#newPostFieldset select,
#newPostFieldset textarea,
#quick-reply input[type="text"],
#quick-reply input[type="password"],
#quick-reply select,
#quick-reply textarea {
  width: 100% !important;
  height: 24px;
  box-sizing: border-box !important;
  padding: 3px 5px !important;
  font-size: 90% !important;
}

#newPostFieldset textarea,
#quick-reply textarea {
  height: 70px !important;
  resize: vertical !important;
}

#newPostFieldset button[type="submit"],
#quick-reply button,
#quick-reply #qrbutton {
  width: 100% !important;
  box-sizing: border-box !important;
  margin-top: 1em;
  padding: 0.6em 0 !important;
  background: #1e1035 !important;
  color: #ccd6f6 !important;
  border: 1px solid #5821a3 !important;
  border-radius: 4px !important;
  font-weight: bold !important;
  cursor: pointer !important;
  transition: background-color 0.15s, border-color 0.15s;
}

#newPostFieldset button[type="submit"]:hover,
#quick-reply button:hover,
#quick-reply #qrbutton:hover {
  background: #2b174b !important;
  border-color: #c084fc !important;
}

/* Dropzone Override */
#newPostFieldset .dropzone,
#quick-reply .dropzone {
  border: 1px dashed #5821a3 !important;
  background-color: #160e28 !important;
  color: #8892b0 !important;
  padding: 1.5em 1em !important;
  text-align: center !important;
  border-radius: 4px !important;
  font-size: 85% !important;
  cursor: pointer !important;
  margin: 0.5em 0 !important;
  line-height: 1.4 !important;
  box-sizing: border-box !important;
  font-family: inherit !important;
}

/* Quick reply header bar styling */
#quick-reply .post-table {
  border-collapse: collapse !important;
}

#quick-reply .post-table tr:first-child {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
}

#quick-reply .post-table tr:first-child th {
  display: block !important;
  width: 100% !important;
  box-sizing: border-box !important;
  background-color: #190e28 !important;
  border: none !important;
  padding: 0.5em 0.75em !important;
  text-align: left !important;
}

#quick-reply th .handle {
  display: flex !important;
  flex-direction: row-reverse !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  float: none !important;
  font-weight: bold !important;
  color: #ccd6f6 !important;
  font-size: 90% !important;
  user-select: none !important;
}

#quick-reply th .close-btn {
  float: none !important;
  cursor: pointer !important;
  color: #c084fc !important;
  display: inline-block !important;
}

#quick-reply th .close-btn:hover {
  color: #e9d5ff !important;
}

/* Old actionsForm box — hidden, replaced by inline delete bar */
#actionsForm, #bottomForms {
  display: none !important;
}

/* Separation lines for board bottom controls */
.threadPages {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  width: 100% !important;
  margin-bottom: 1.5em !important;
}

.threadPages .divPages {
  display: block !important;
  width: 100% !important;
  border-bottom: 1px solid #5821a3 !important;
  padding-bottom: 0.5em !important;
  margin-bottom: 0.5em !important;
}

.threadPages #boardContentLinks {
  padding-bottom: 0.5em !important;
  margin-bottom: 0 !important;
  margin-top: 0 !important;
}

/* Spacing between management link items */
#boardContentLinks > span,
#boardContentLinks > a {
  margin-right: 4px !important;
}

/* Inline delete bar — board page: appended inside boardContentLinks flex row */
#inlineDeleteBar {
  display: inline-flex !important;
  align-items: center !important;
  gap: 5px !important;
  font-size: 85% !important;
  color: #ccd6f6 !important;
  margin-left: auto !important;
}



#inlineDeleteLabel {
  white-space: nowrap !important;
}

#inlineFileOnlyLabel {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  cursor: pointer !important;
  white-space: nowrap !important;
}

#inlineDeletePassword {
  width: 80px !important;
  height: 20px !important;
  padding: 1px 4px !important;
  font-size: 80% !important;
  background-color: #1a102f !important;
  border: 1px solid #5821a3 !important;
  color: #ccd6f6 !important;
  border-radius: 3px !important;
  box-sizing: border-box !important;
}

#inlineDeleteButton {
  height: 20px !important;
  padding: 0 10px !important;
  font-size: 80% !important;
  background-color: #1e1035 !important;
  border: 1px solid #5821a3 !important;
  color: #ccd6f6 !important;
  border-radius: 3px !important;
  cursor: pointer !important;
  font-weight: bold !important;
  white-space: nowrap !important;
  transition: background-color 0.15s, border-color 0.15s !important;
}

#inlineDeleteButton:hover {
  background-color: #2b174b !important;
  border-color: #c084fc !important;
}

/* Mobile: wrap management links and push delete bar to its own row below */
@media (max-width: 600px) {
  #boardContentLinks {
    flex-wrap: wrap !important;
    gap: 2px 0 !important;
  }

  #inlineDeleteBar {
    flex-basis: 100% !important;
    margin-left: 0 !important;
    margin-top: 4px !important;
  }
}

/* ===== Thread Layout & Media Upload Rules ===== */

/* Double-layered separator line between threads on board page */
.opCell > hr,
hr.clearer {
  height: 0px !important;
  border-width: 3px 0 0 0 !important;
  border-style: double none none !important;
  border-color: #5821a3 !important;
  margin: 0.4em 0 !important;
}

/* OP has no background — transparent card */
.opCell > .innerOP {
  background: transparent !important;
  border: none !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* General upload details formatting */
.uploadDetails {
  font-size: 88% !important;
  word-break: break-word !important;
  white-space: normal !important;
  margin-bottom: 0.25em !important;
}

.originalNameLink {
  max-width: 210px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
  display: inline-block !important;
  vertical-align: bottom !important;
}

/* ---------------------------------------------------------
   MULTIPLE UPLOADS (Applies to both OP and Replies)
   --------------------------------------------------------- */
.panelUploads.multipleUploads {
  display: block !important;
  float: none !important;
  clear: both !important;
  width: 100% !important;
  margin: 0.5em 0 !important;
}

.panelUploads.multipleUploads::after {
  content: '' !important;
  display: block !important;
  clear: both !important;
}

/* Non-expanded thumbnail cells in multi-upload posts */
.panelUploads.multipleUploads .uploadCell:not(.expandedCell) {
  float: left !important;
  display: block !important;
  max-width: 190px !important;
  margin: 0 1em 1em 0 !important;
  vertical-align: top !important;
}

.panelUploads.multipleUploads .uploadCell:not(.expandedCell) .imgLink img:not(.imgExpanded) {
  float: none !important;
  max-width: 180px !important;
  max-height: 180px !important;
  object-fit: contain !important;
}

/* Expanded image cell in multi-upload posts */
.panelUploads.multipleUploads .uploadCell.expandedCell {
  float: none !important;
  clear: both !important;
  display: block !important;
  max-width: 100% !important;
  width: auto !important;
  margin: 0.5em 0 1em 0 !important;
}

.imgExpanded {
  max-width: 100% !important;
  height: auto !important;
  width: auto !important;
}

/* Message sits below image row when post has multiple uploads */
.panelUploads.multipleUploads ~ .divMessage {
  clear: both !important;
  display: block !important;
  padding-top: 0.25em !important;
  margin: 0.5em 0 !important;
}


/* ---------------------------------------------------------
   SINGLE UPLOAD IN OP (Float left, text next to thumbnail)
   --------------------------------------------------------- */
.opCell .innerOP > .panelUploads:not(.multipleUploads) {
  float: none !important;
  display: block !important;
  margin: 0.25em 0 !important;
  max-width: 100% !important;
}

.opCell .panelUploads:not(.multipleUploads) .uploadCell {
  float: none !important;
  display: block !important;
  margin: 0.25em 0 !important;
}

.opCell .panelUploads:not(.multipleUploads) .uploadDetails {
  display: block !important;
  float: none !important;
  clear: both !important;
  margin-bottom: 0.25em !important;
}

.opCell .panelUploads:not(.multipleUploads) .originalNameLink {
  max-width: 300px !important;
}

.opCell .panelUploads:not(.multipleUploads) .imgLink {
  float: left !important;
  margin: 0 1em 0.5em 0 !important;
}

.opCell .panelUploads:not(.multipleUploads) .imgLink img:not(.imgExpanded) {
  float: left !important;
  max-width: 200px !important;
  max-height: 200px !important;
  object-fit: contain !important;
  margin: 0 !important;
}

.postCell .panelUploads:not(.multipleUploads) .imgLink img:not(.imgExpanded) {
  max-width: 180px !important;
  max-height: 180px !important;
  object-fit: contain !important;
}

.opCell .innerOP > .panelUploads:not(.multipleUploads) ~ .divMessage {
  margin: 0 0 0.5em 0 !important;
}

/* Replies container flows around single OP float */
.opCell > .divPosts {
  display: block !important;
  margin-top: 0.25em !important;
}

/* Each reply is inline-block so they wrap beside single OP float */
.divPosts > .postCell {
  display: block !important;
  vertical-align: top !important;
  margin: 0.25em 0 !important;
}

.divPosts > .postCell > .innerPost,
.divPosts > .postCell > .markedPost {
  display: inline-block !important;
  max-width: 100% !important;
  padding: 0.75em !important;
  box-sizing: border-box !important;
}

/* Clear float after opCell */
.opCell::after {
  content: '' !important;
  display: block !important;
  clear: both !important;
}

/* Mobile: center image thumbnails above left-aligned message text */
@media (max-width: 600px) {
  .panelUploads,
  .opCell .panelUploads,
  .postCell .panelUploads,
  .opCell .innerOP > .panelUploads:not(.multipleUploads) {
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin: 0.5em 0 !important;
    text-align: center !important;
  }

  .uploadCell,
  .opCell .panelUploads:not(.multipleUploads) .uploadCell,
  .panelUploads.multipleUploads .uploadCell:not(.expandedCell) {
    float: none !important;
    display: block !important;
    width: 100% !important;
    margin: 0.25em auto !important;
    text-align: center !important;
  }

  /* File details text line is ALWAYS left-aligned */
  .uploadDetails,
  .panelUploads .uploadDetails,
  .uploadCell .uploadDetails,
  .multipleUploads .uploadCell .uploadDetails,
  .opCell .panelUploads:not(.multipleUploads) .uploadDetails,
  .postCell .panelUploads:not(.multipleUploads) .uploadDetails {
    text-align: left !important;
    display: block !important;
    width: 100% !important;
    margin-bottom: 0.25em !important;
  }

  .imgLink:not([style*="display: none"]):not([style*="display:none"]),
  .opCell .panelUploads:not(.multipleUploads) .imgLink:not([style*="display: none"]):not([style*="display:none"]),
  .postCell .panelUploads:not(.multipleUploads) .imgLink:not([style*="display: none"]):not([style*="display:none"]) {
    float: none !important;
    display: inline-block !important;
    margin: 0.25em auto !important;
    text-align: center !important;
  }

  .imgLink img:not(.imgExpanded):not([style*="display: none"]):not([style*="display:none"]),
  .uploadCell img:not(.imgExpanded):not([style*="display: none"]):not([style*="display:none"]),
  .opCell .panelUploads:not(.multipleUploads) .imgLink img:not(.imgExpanded):not([style*="display: none"]):not([style*="display:none"]),
  .postCell .panelUploads:not(.multipleUploads) .imgLink img:not(.imgExpanded):not([style*="display: none"]):not([style*="display:none"]) {
    float: none !important;
    display: block !important;
    margin: 0.25em auto !important;
  }

  /* Multiple uploads grid on mobile centered */
  .panelUploads.multipleUploads .uploadCell:not(.expandedCell) {
    float: none !important;
    display: inline-block !important;
    margin: 0.25em 0.5em !important;
    vertical-align: top !important;
  }

  /* Card padding on mobile */
  .innerPost,
  .innerOP,
  .markedPost,
  .opCell {
    padding: 0.75em !important;
    box-sizing: border-box !important;
  }

  .opHead,
  .postInfo,
  .uploadDetails {
    padding-left: 0 !important;
  }

  .divMessage,
  .innerPost > .divMessage,
  .markedPost > .divMessage {
    clear: both !important;
    display: block !important;
    padding-left: 0 !important;
    margin-top: 0.5em !important;
    text-align: left !important;
  }
}

/* Ensure hidden media and hidden thumbnails are always hidden regardless of float/display rules */
img[style*="display: none"],
img[style*="display:none"],
.imgLink img[style*="display: none"],
.imgLink img[style*="display:none"],
.uploadCell img[style*="display: none"],
.uploadCell img[style*="display:none"],
.imgLink[style*="display: none"],
.imgLink[style*="display:none"],
.panelUploads .imgLink[style*="display: none"],
.panelUploads .imgLink[style*="display:none"],
.opCell .panelUploads .imgLink[style*="display: none"],
.opCell .panelUploads .imgLink[style*="display:none"],
.postCell .panelUploads .imgLink[style*="display: none"],
.postCell .panelUploads .imgLink[style*="display:none"],
.opCell .panelUploads:not(.multipleUploads) .imgLink[style*="display: none"],
.opCell .panelUploads:not(.multipleUploads) .imgLink[style*="display:none"],
.postCell .panelUploads:not(.multipleUploads) .imgLink[style*="display: none"],
.postCell .panelUploads:not(.multipleUploads) .imgLink[style*="display:none"] {
  display: none !important;
}

.labelBoard, h3.labelBoard {
  font-size: 0.9em !important;
  font-weight: bold !important;
  margin: 2px 0 4px 0 !important;
  padding: 0 !important;
  display: block !important;
}

.labelBoard a, h3.labelBoard a {
  color: #c084fc !important;
  text-decoration: none !important;
}

.labelBoard a:hover, h3.labelBoard a:hover {
  text-decoration: underline !important;
}

