
.shaysport-studio-markdown-page {
  overflow-x: hidden;
}

.sss-admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 18px;
}

.sss-admin-tabs a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #cbd9ea;
  border-radius: 999px;
  background: #fff;
  color: #17365d;
  text-decoration: none;
  font-weight: 800;
}

.sss-admin-tabs a.is-active {
  border-color: #173f75;
  background: #173f75;
  color: #fff;
}
.ssmd-root {
  --ssmd-blue: #074c83;
  --ssmd-blue-dark: #04375f;
  --ssmd-border: #c9dbe8;
  --ssmd-bg: #eef7fc;
  --ssmd-card: #ffffff;
  --ssmd-text: #153247;
  --ssmd-muted: #60788a;
  box-sizing: border-box;
  width: min(100%, 1880px);
  margin: 0 auto;
  padding: 0 24px 40px;
  color: var(--ssmd-text);
}

.ssmd-root *,
.ssmd-root *::before,
.ssmd-root *::after {
  box-sizing: border-box;
}

.ssmd-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0;
  padding: 20px 24px;
  border: 1px solid var(--ssmd-border);
  border-radius: 20px;
  background: linear-gradient(135deg, #ffffff, #edf7fd);
}

.ssmd-guide strong {
  display: block;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.ssmd-guide p {
  margin: 0;
  color: var(--ssmd-muted);
}

.ssmd-connection {
  flex: 0 0 auto;
  max-width: 360px;
  padding: 10px 14px;
  border: 1px solid var(--ssmd-border);
  border-radius: 999px;
  background: #fff;
  font-weight: 700;
  text-align: center;
}

.ssmd-connection[data-state="ready"] {
  border-color: #7fc5a4;
  background: #edf9f3;
  color: #16603f;
}

.ssmd-connection[data-state="info"] {
  background: #fff9e8;
  color: #715813;
}

.ssmd-status,
.ssmd-toot-status {
  min-height: 24px;
  color: var(--ssmd-muted);
}

.ssmd-status.is-error,
.ssmd-toot-status.is-error {
  color: #9b2c2c;
}

.ssmd-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(300px, 0.72fr);
  grid-template-areas: "editor preview assistant";
  gap: 18px;
  align-items: stretch;
}

.ssmd-root[dir="rtl"] .ssmd-workspace {
  grid-template-areas: "assistant preview editor";
}

.ssmd-editor-panel {
  grid-area: editor;
}

.ssmd-preview-panel {
  grid-area: preview;
}

.ssmd-toot-panel {
  grid-area: assistant;
}

.ssmd-panel {
  min-width: 0;
  min-height: 66vh;
  overflow: hidden;
  border: 1px solid var(--ssmd-border);
  border-radius: 22px;
  background: var(--ssmd-card);
  box-shadow: 0 12px 28px rgba(17, 61, 91, 0.08);
}

.ssmd-panel__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--ssmd-border);
  background: var(--ssmd-bg);
}

.ssmd-panel__header h2 {
  margin: 0 0 4px;
  font-size: 1.05rem;
  line-height: 1.3;
}

.ssmd-panel__header span {
  display: block;
  color: var(--ssmd-muted);
  font-size: 0.84rem;
}

.ssmd-panel__actions,
.ssmd-toot-result__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ssmd-root button {
  min-height: 40px;
  padding: 8px 14px;
  border: 1px solid #9eb8ca;
  border-radius: 12px;
  background: #fff;
  color: var(--ssmd-blue-dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ssmd-root button:hover,
.ssmd-root button:focus-visible {
  border-color: var(--ssmd-blue);
  outline: 3px solid rgba(7, 76, 131, 0.16);
  outline-offset: 1px;
}

.ssmd-root button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.ssmd-root button.ssmd-primary {
  border-color: var(--ssmd-blue);
  background: var(--ssmd-blue);
  color: #fff;
}

.ssmd-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ssmd-border);
  background: #f8fbfd;
}

.ssmd-toolbar button {
  min-width: 42px;
  min-height: 38px;
  padding: 6px 10px;
}

.ssmd-editor-panel textarea[data-ssmd-editor] {
  display: block;
  width: 100%;
  height: calc(66vh - 176px);
  min-height: 430px;
  resize: vertical;
  overflow: auto;
  padding: 22px;
  border: 0;
  outline: 0;
  background: #fbfdff;
  color: #182f40;
  font: 500 15px/1.75 ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  tab-size: 2;
}

.ssmd-panel__footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  min-height: 46px;
  padding: 12px 18px;
  border-top: 1px solid var(--ssmd-border);
  color: var(--ssmd-muted);
  font-size: 0.82rem;
}

.ssmd-preview {
  height: calc(66vh - 78px);
  min-height: 536px;
  overflow: auto;
  padding: 26px;
  background: #fff;
  color: #172f41;
  font-size: 1rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}

.ssmd-preview h1,
.ssmd-preview h2,
.ssmd-preview h3,
.ssmd-preview h4,
.ssmd-preview h5,
.ssmd-preview h6 {
  margin: 1.35em 0 0.55em;
  color: #0b416d;
  line-height: 1.3;
}

.ssmd-preview h1:first-child,
.ssmd-preview h2:first-child,
.ssmd-preview h3:first-child {
  margin-top: 0;
}

.ssmd-preview p,
.ssmd-preview ul,
.ssmd-preview ol,
.ssmd-preview blockquote,
.ssmd-preview pre,
.ssmd-preview table {
  margin: 0 0 1.15em;
}

.ssmd-preview ul,
.ssmd-preview ol {
  padding-inline-start: 1.65em;
  padding-inline-end: 0;
}

.ssmd-preview li {
  margin: 0.28em 0;
  padding-inline-start: 0.18em;
}

.ssmd-preview li::marker {
  font-weight: 700;
}

.ssmd-preview blockquote {
  padding: 12px 18px;
  border-inline-start: 4px solid var(--ssmd-blue);
  border-radius: 10px;
  background: #eef7fc;
}

.ssmd-preview blockquote p {
  margin: 0;
}

.ssmd-preview pre {
  max-width: 100%;
  overflow: auto;
  padding: 16px;
  border-radius: 14px;
  background: #102636;
  color: #f1f7fb;
  direction: ltr;
  text-align: left;
}

.ssmd-preview code {
  padding: 0.12em 0.35em;
  border-radius: 5px;
  background: #eaf1f6;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ssmd-preview pre code {
  padding: 0;
  background: transparent;
  color: inherit;
}

.ssmd-preview a {
  color: #075a98;
  text-decoration-thickness: 2px;
  text-underline-offset: 2px;
}

.ssmd-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin-bottom: 1.15em;
}

.ssmd-preview table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
}

.ssmd-preview th,
.ssmd-preview td {
  padding: 10px 12px;
  border: 1px solid var(--ssmd-border);
  text-align: start;
}

.ssmd-preview th {
  background: #edf7fc;
}

.ssmd-empty {
  display: grid;
  min-height: 220px;
  place-items: center;
  padding: 30px;
  border: 1px dashed var(--ssmd-border);
  border-radius: 18px;
  color: var(--ssmd-muted);
  text-align: center;
}

.ssmd-preview.is-error {
  color: #9b2c2c;
}

.ssmd-toot-panel {
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}

.ssmd-toot-request {
  display: grid;
  gap: 8px;
  padding: 18px 18px 10px;
  font-weight: 700;
}

.ssmd-toot-request textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  padding: 14px;
  border: 1px solid var(--ssmd-border);
  border-radius: 14px;
  background: #fbfdff;
  color: var(--ssmd-text);
  font: inherit;
  line-height: 1.55;
}

.ssmd-toot-request textarea:focus {
  border-color: var(--ssmd-blue);
  outline: 3px solid rgba(7, 76, 131, 0.14);
}

.ssmd-use-draft {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 4px 18px 14px;
  color: var(--ssmd-muted);
  font-size: 0.9rem;
}

.ssmd-use-draft input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
}

.ssmd-toot-panel > .ssmd-primary,
.ssmd-toot-status,
.ssmd-toot-result {
  margin-inline: 18px;
}

.ssmd-toot-status {
  padding: 12px 0 4px;
}

.ssmd-toot-result {
  min-width: 0;
  margin-top: 10px;
  padding: 14px;
  border: 1px solid var(--ssmd-border);
  border-radius: 16px;
  background: #f8fbfd;
}

.ssmd-toot-result[hidden] {
  display: none;
}

.ssmd-toot-result__head {
  margin-bottom: 10px;
}

.ssmd-toot-result pre {
  max-height: 280px;
  overflow: auto;
  margin: 0 0 12px;
  padding: 12px;
  border-radius: 12px;
  background: #fff;
  color: var(--ssmd-text);
  font: 500 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (max-width: 1420px) {
  .ssmd-workspace,
  .ssmd-root[dir="rtl"] .ssmd-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "editor preview"
      "assistant assistant";
  }

  .ssmd-root[dir="rtl"] .ssmd-workspace {
    grid-template-areas:
      "preview editor"
      "assistant assistant";
  }

  .ssmd-toot-panel {
    min-height: 0;
  }
}

@media (max-width: 820px) {
  .ssmd-root {
    padding-inline: 12px;
  }

  .ssmd-guide {
    align-items: stretch;
    flex-direction: column;
    padding: 16px;
  }

  .ssmd-connection {
    max-width: none;
  }

  .ssmd-workspace,
  .ssmd-root[dir="rtl"] .ssmd-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "editor"
      "assistant"
      "preview";
  }

  .ssmd-panel {
    min-height: 0;
    border-radius: 18px;
  }

  .ssmd-panel__header {
    align-items: flex-start;
    flex-direction: column;
    min-height: 0;
    padding: 16px;
  }

  .ssmd-panel__actions {
    width: 100%;
  }

  .ssmd-panel__actions button {
    flex: 1 1 0;
  }

  .ssmd-editor-panel textarea[data-ssmd-editor] {
    height: 48vh;
    min-height: 360px;
    padding: 16px;
  }

  .ssmd-preview {
    height: auto;
    min-height: 420px;
    padding: 18px;
  }

  .ssmd-panel__footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .ssmd-toot-result__actions button {
    flex: 1 1 100%;
  }
}


.ssmd-guide__actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap}
.ssmd-preview .ssmd-media{display:grid;gap:8px;margin:18px 0}
.ssmd-preview .ssmd-media img,.ssmd-preview .ssmd-media video{display:block;max-width:100%;height:auto;border-radius:16px;background:#0b2133}
.ssmd-preview .ssmd-media figcaption{color:var(--ssmd-muted);font-size:.88rem;text-align:center}
.ssmd-media-dialog{width:min(92vw,620px);padding:0;border:0;border-radius:24px;background:#fff;color:var(--ssmd-text);box-shadow:0 28px 80px rgba(4,35,58,.35)}
.ssmd-media-dialog::backdrop{background:rgba(2,24,40,.62);backdrop-filter:blur(4px)}
.ssmd-media-dialog [data-ssmd-media-form]{display:grid;gap:16px;padding:22px}
.ssmd-media-dialog header,.ssmd-media-dialog footer{display:flex;align-items:center;justify-content:space-between;gap:12px}
.ssmd-media-dialog header div{display:grid;gap:3px}
.ssmd-media-dialog header strong{font-size:1.2rem}
.ssmd-media-dialog header span{color:var(--ssmd-muted)}
.ssmd-media-dialog label{display:grid;gap:7px;font-weight:750}
.ssmd-media-dialog input[type="text"],.ssmd-media-dialog input[type="url"],.ssmd-media-dialog input[type="file"]{width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--ssmd-border);border-radius:12px;background:#fff;color:var(--ssmd-text);font:inherit}
.ssmd-media-dialog input:focus{outline:3px solid rgba(7,76,131,.16);border-color:var(--ssmd-blue)}
.ssmd-media-or{display:flex;align-items:center;gap:10px;color:var(--ssmd-muted)}
.ssmd-media-or::before,.ssmd-media-or::after{content:"";height:1px;flex:1;background:var(--ssmd-border)}
.ssmd-media-status{min-height:22px;margin:0;color:#9b2c2c}
@media(max-width:760px){.ssmd-guide__actions{justify-content:flex-start}.ssmd-media-dialog [data-ssmd-media-form]{padding:16px}}

/* Reusable embedded and modal Markdown editor surfaces. */
.ssmd-root--embedded,
.ssmd-root--modal {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
}

.ssmd-component-intro {
  display: grid;
  gap: 5px;
  margin: 0 0 12px;
  padding: 14px 16px;
  border: 1px solid var(--ssmd-border);
  border-radius: 16px;
  background: #f7fbfe;
}

.ssmd-component-intro p {
  margin: 0;
  color: var(--ssmd-muted);
}

.ssmd-workspace[data-ssmd-columns="1"] {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "editor";
}

.ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="1"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "editor preview";
}

.ssmd-root[dir="rtl"] .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="1"] {
  grid-template-areas: "preview editor";
}

.ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="0"][data-ssmd-has-toot="1"] {
  grid-template-columns: minmax(0, 1fr) minmax(300px, .72fr);
  grid-template-areas: "editor assistant";
}

.ssmd-root[dir="rtl"] .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="0"][data-ssmd-has-toot="1"] {
  grid-template-areas: "assistant editor";
}

.ssmd-root--embedded .ssmd-panel,
.ssmd-root--modal .ssmd-panel {
  min-height: 0;
}

.ssmd-root--embedded .ssmd-editor-panel textarea[data-ssmd-editor] {
  height: auto;
  min-height: 260px;
  max-height: 70vh;
}

.ssmd-root--embedded .ssmd-preview {
  height: auto;
  min-height: 366px;
  max-height: 70vh;
}

.ssmd-root--embedded .ssmd-toot-request textarea {
  min-height: 150px;
}

.ssmd-modal-host {
  --ssmd-blue: #074c83;
  --ssmd-blue-dark: #04375f;
  --ssmd-border: #c9dbe8;
  --ssmd-text: #153247;
  font: inherit;
}

.ssmd-modal-trigger {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid var(--ssmd-blue);
  border-radius: 12px;
  background: var(--ssmd-blue);
  color: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ssmd-modal-trigger:hover,
.ssmd-modal-trigger:focus-visible {
  outline: 3px solid rgba(7, 76, 131, .16);
  outline-offset: 2px;
}

.ssmd-dialog {
  width: min(96vw, 1680px);
  max-width: none;
  height: min(94vh, 980px);
  max-height: 94vh;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background: #fff;
  color: var(--ssmd-text);
  box-shadow: 0 28px 90px rgba(4, 35, 58, .42);
}

.ssmd-dialog::backdrop {
  background: rgba(2, 24, 40, .68);
  backdrop-filter: blur(5px);
}

.ssmd-dialog__frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  height: 100%;
}

.ssmd-dialog__header,
.ssmd-dialog__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  border-color: var(--ssmd-border);
  background: #f5fafd;
}

.ssmd-dialog__header {
  border-bottom: 1px solid var(--ssmd-border);
}

.ssmd-dialog__footer {
  justify-content: flex-end;
  border-top: 1px solid var(--ssmd-border);
}

.ssmd-dialog__header > div {
  display: grid;
  gap: 4px;
}

.ssmd-dialog__header strong {
  font-size: 1.18rem;
}

.ssmd-dialog__header span {
  color: #60788a;
  font-size: .9rem;
}

.ssmd-dialog__body {
  min-height: 0;
  overflow: auto;
  padding: 18px;
  background: #edf6fb;
}

.ssmd-dialog__header button,
.ssmd-dialog__footer button {
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid #9eb8ca;
  border-radius: 12px;
  background: #fff;
  color: var(--ssmd-blue-dark);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.ssmd-dialog__header button:hover,
.ssmd-dialog__header button:focus-visible,
.ssmd-dialog__footer button:hover,
.ssmd-dialog__footer button:focus-visible {
  border-color: var(--ssmd-blue);
  outline: 3px solid rgba(7, 76, 131, .16);
  outline-offset: 1px;
}

.ssmd-dialog__footer button.ssmd-primary {
  border-color: var(--ssmd-blue);
  background: var(--ssmd-blue);
  color: #fff;
}

.ssmd-dialog__close {
  flex: 0 0 auto;
  min-width: 42px;
  padding-inline: 10px !important;
}

.ssmd-root--modal .ssmd-editor-panel textarea[data-ssmd-editor] {
  height: 48vh;
  min-height: 330px;
  max-height: 62vh;
}

.ssmd-root--modal .ssmd-preview {
  height: 48vh;
  min-height: 436px;
  max-height: 62vh;
}

.ssmd-root--modal .ssmd-toot-panel {
  max-height: 62vh;
  overflow: auto;
}

.ssmd-has-open-dialog {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .ssmd-root--modal .ssmd-workspace,
  .ssmd-root--modal[dir="rtl"] .ssmd-workspace {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "editor preview"
      "assistant assistant";
  }

  .ssmd-root--modal[dir="rtl"] .ssmd-workspace {
    grid-template-areas:
      "preview editor"
      "assistant assistant";
  }

  .ssmd-root--modal .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="0"] {
    grid-template-areas: "editor assistant";
  }
}

@media (max-width: 760px) {
  .ssmd-dialog {
    width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }

  .ssmd-dialog__header,
  .ssmd-dialog__footer {
    padding: 12px;
  }

  .ssmd-dialog__body {
    padding: 10px;
  }

  .ssmd-root--embedded .ssmd-workspace,
  .ssmd-root--embedded[dir="rtl"] .ssmd-workspace,
  .ssmd-root--modal .ssmd-workspace,
  .ssmd-root--modal[dir="rtl"] .ssmd-workspace,
  .ssmd-root--modal .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="0"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "editor"
      "assistant"
      "preview";
  }

  .ssmd-root--embedded .ssmd-editor-panel textarea[data-ssmd-editor],
  .ssmd-root--modal .ssmd-editor-panel textarea[data-ssmd-editor] {
    height: 44vh;
    min-height: 300px;
  }

  .ssmd-root--modal .ssmd-preview {
    height: auto;
    min-height: 360px;
  }
}


/* 1.25.0 paired embedded and full-screen editor */
.ssmd-expand-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 40px;
  min-height: 36px !important;
  padding: 6px 9px !important;
  border-radius: 10px !important;
}

.ssmd-expand-button > span:first-child {
  font: 900 13px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ssmd-root--compact {
  padding: 0;
}

.ssmd-root--compact .ssmd-status,
.ssmd-root--compact .ssmd-panel__footer {
  display: none;
}

.ssmd-root--compact .ssmd-panel {
  border-radius: 14px;
  box-shadow: none;
}

.ssmd-root--compact .ssmd-panel__header {
  min-height: 54px;
  padding: 9px 12px;
}

.ssmd-root--compact .ssmd-panel__header h2 {
  font-size: .96rem;
}

.ssmd-root--compact .ssmd-toolbar {
  gap: 4px;
  padding: 7px 9px;
}

.ssmd-root--compact .ssmd-toolbar button {
  min-width: 34px;
  min-height: 32px;
  padding: 4px 7px;
  border-radius: 8px;
  font-size: .82rem;
}

.ssmd-root--compact.ssmd-root--embedded .ssmd-editor-panel textarea[data-ssmd-editor] {
  height: auto;
  min-height: 132px;
  max-height: 46vh;
  padding: 14px;
  font-size: 14px;
  line-height: 1.65;
}

.ssmd-root--compact .ssmd-expand-button__label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .ssmd-root--compact .ssmd-panel__header {
    align-items: flex-start;
  }

  .ssmd-root--compact.ssmd-root--embedded .ssmd-editor-panel textarea[data-ssmd-editor] {
    height: auto;
    min-height: 150px;
  }
}

/* 1.25.0 mobile modal, nested media and predictable panel order */
.ssmd-media-dialog--nested[open] {
  position: fixed;
  inset: 50% auto auto 50%;
  z-index: 2147483647;
  max-height: calc(100dvh - 24px);
  overflow: auto;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 100vmax rgba(2,24,40,.62), 0 28px 80px rgba(4,35,58,.35);
}

@media (max-width: 760px) {
  .ssmd-dialog[open] {
    position: fixed;
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
  }

  .ssmd-dialog__frame {
    width: 100%;
    min-width: 0;
    height: 100dvh;
    max-height: 100dvh;
  }

  .ssmd-dialog__header {
    position: relative;
    z-index: 2;
    min-width: 0;
  }

  .ssmd-dialog__header > div {
    min-width: 0;
  }

  .ssmd-dialog__header strong,
  .ssmd-dialog__header span {
    overflow-wrap: anywhere;
  }

  .ssmd-dialog__body {
    min-width: 0;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .ssmd-dialog__footer {
    position: relative;
    z-index: 2;
    padding-bottom: max(12px, env(safe-area-inset-bottom));
  }

  .ssmd-root--modal .ssmd-workspace,
  .ssmd-root--modal[dir="rtl"] .ssmd-workspace,
  .ssmd-root--modal .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="0"] {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "editor"
      "preview"
      "assistant";
  }

  .ssmd-root--modal .ssmd-editor-panel textarea[data-ssmd-editor] {
    width: 100%;
    height: 38dvh;
    min-height: 240px;
    max-height: 48dvh;
  }

  .ssmd-root--modal .ssmd-preview {
    min-height: 240px;
    max-height: 48dvh;
  }

  .ssmd-media-dialog,
  .ssmd-media-dialog--nested[open] {
    inset: 0;
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    margin: 0;
    border-radius: 0;
    transform: none;
  }

  .ssmd-media-dialog [data-ssmd-media-form] {
    min-height: 100dvh;
    align-content: start;
    padding: 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }
}

/* 1.25.0 embedded preview, media preview and mobile dialog hardening */
.ssmd-root,
.ssmd-root *,
.ssmd-dialog,
.ssmd-dialog *,
.ssmd-media-dialog,
.ssmd-media-dialog * {
  box-sizing: border-box;
}

.ssmd-media-preview {
  display: grid;
  place-items: center;
  min-height: 150px;
  max-height: 36vh;
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--ssmd-border);
  border-radius: 14px;
  background: #f5fafd;
}

.ssmd-media-preview[hidden] {
  display: none;
}

.ssmd-media-preview img,
.ssmd-media-preview video {
  display: block;
  max-width: 100%;
  max-height: 32vh;
  object-fit: contain;
  border-radius: 10px;
}

.ssmd-root--embedded .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="1"][data-ssmd-has-toot="0"],
.ssmd-root--embedded[dir="rtl"] .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="1"][data-ssmd-has-toot="0"] {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "editor preview";
}

.ssmd-dialog[open] {
  z-index: 2147483000;
}

.ssmd-dialog__body,
.ssmd-dialog__body .ssmd-root,
.ssmd-dialog__body .ssmd-workspace {
  min-width: 0;
  max-width: 100%;
}

.ssmd-dialog__body .ssmd-root--modal {
  width: 100%;
  padding: 0;
  background: transparent;
}

@media (max-width: 760px) {
  html.ssmd-has-open-dialog,
  html.ssmd-has-open-dialog body {
    width: 100%;
    height: 100%;
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .ssmd-dialog[open] {
    position: fixed;
    inset: 0;
    display: block;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    margin: 0;
    overflow: hidden;
    border-radius: 0;
  }

  .ssmd-dialog__frame {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
    background: #fff;
  }

  .ssmd-dialog__header {
    min-height: 64px;
    padding-top: max(10px, env(safe-area-inset-top));
  }

  .ssmd-dialog__header > div {
    max-width: calc(100vw - 76px);
  }

  .ssmd-dialog__header strong {
    font-size: 1.05rem;
  }

  .ssmd-dialog__header span {
    display: none;
  }

  .ssmd-dialog__body {
    width: 100%;
    min-width: 0;
    min-height: 0;
    max-width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 8px;
    background: #edf6fb;
    touch-action: pan-y;
  }

  .ssmd-dialog__footer {
    flex-wrap: wrap;
    padding: 10px 12px max(10px, env(safe-area-inset-bottom));
  }

  .ssmd-dialog__footer button {
    flex: 1 1 140px;
  }

  .ssmd-root--embedded .ssmd-workspace,
  .ssmd-root--embedded[dir="rtl"] .ssmd-workspace,
  .ssmd-root--embedded .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="1"][data-ssmd-has-toot="0"],
  .ssmd-root--embedded[dir="rtl"] .ssmd-workspace[data-ssmd-columns="2"][data-ssmd-has-preview="1"][data-ssmd-has-toot="0"],
  .ssmd-root--modal .ssmd-workspace,
  .ssmd-root--modal[dir="rtl"] .ssmd-workspace {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "editor"
      "preview"
      "assistant";
  }

  .ssmd-root--compact.ssmd-root--embedded .ssmd-preview,
  .ssmd-root--embedded .ssmd-preview {
    min-height: 220px;
    max-height: 52vh;
  }

  .ssmd-root--modal .ssmd-editor-panel textarea[data-ssmd-editor] {
    height: 34dvh;
    min-height: 220px;
    max-height: 42dvh;
  }

  .ssmd-root--modal .ssmd-preview {
    height: auto;
    min-height: 220px;
    max-height: 44dvh;
    overflow: auto;
  }

  .ssmd-root--modal .ssmd-toot-panel {
    max-height: none;
    overflow: visible;
  }

  .ssmd-media-dialog[open],
  .ssmd-media-dialog--nested[open] {
    position: fixed;
    inset: 0;
    z-index: 2147483647;
    display: block;
    width: 100vw;
    min-width: 0;
    max-width: 100vw;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    margin: 0;
    overflow-y: auto;
    border-radius: 0;
    transform: none;
    background: #fff;
  }

  .ssmd-media-dialog [data-ssmd-media-form] {
    width: 100%;
    min-width: 0;
    min-height: 100dvh;
    padding-top: max(16px, env(safe-area-inset-top));
  }
}


/* 1.25.0 icon toolbar and theme-resistant contrast. */
html body .ssmd-root button,
html body .ssmd-dialog .ssmd-root button {
  background: #ffffff !important;
  color: #074c83 !important;
  border-color: #8faec4 !important;
  -webkit-text-fill-color: currentColor;
  text-shadow: none !important;
  box-shadow: none;
}
html body .ssmd-root button:hover,
html body .ssmd-root button:focus-visible,
html body .ssmd-dialog .ssmd-root button:hover,
html body .ssmd-dialog .ssmd-root button:focus-visible {
  background: #eaf5ff !important;
  color: #043b67 !important;
  border-color: #0878bd !important;
}
html body .ssmd-root button.ssmd-primary,
html body .ssmd-dialog .ssmd-root button.ssmd-primary {
  background: #0878bd !important;
  color: #ffffff !important;
  border-color: #0878bd !important;
  -webkit-text-fill-color: #ffffff;
}
.ssmd-toolbar button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  padding: 6px !important;
}
.ssmd-button-icon {
  display: inline-grid !important;
  place-items: center;
  width: 22px;
  height: 22px;
  color: currentColor !important;
}
.ssmd-button-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}
.ssmd-expand-button > .ssmd-button-icon:first-child {
  font: inherit;
}
.ssmd-root--compact .ssmd-toolbar button {
  width: 36px;
  min-width: 36px;
  padding: 5px !important;
}

/* Icon-only Markdown editor launcher - 1.25.0 */
.ssmd-expand-button.ssmd-expand-button--icon-only {
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    display: inline-grid;
    place-items: center;
    background: #ffffff !important;
    color: #172033 !important;
    border: 1px solid #64748b !important;
}
.ssmd-expand-button.ssmd-expand-button--icon-only:hover,
.ssmd-expand-button.ssmd-expand-button--icon-only:focus-visible {
    background: #172033 !important;
    color: #ffffff !important;
    border-color: #172033 !important;
}


/* 1.30.0: Google Photos album insertion controls. */
.ssmd-album-options { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.ssmd-album-options[hidden], .ssmd-media-local-fields[hidden] { display:none !important; }
.ssmd-album-options select { width:100%; min-height:44px; border:1px solid #9bc4df; border-radius:12px; background:#fff; color:#0b3657; padding:8px 10px; }
.ssmd-album-preview-card { display:grid; gap:6px; min-height:110px; place-content:center; text-align:center; border-radius:18px; background:linear-gradient(145deg,#fafdff,#dceef9); box-shadow:inset 0 1px 0 #fff,0 8px 18px rgba(8,62,99,.16); color:#0b4e7d; }
@media(max-width:640px){.ssmd-album-options{grid-template-columns:1fr}}

.ssmd-preview .ssmd-album-preview{display:grid;gap:10px;padding:14px;border:1px solid #9bc5df;border-radius:18px;background:linear-gradient(145deg,#fafdff,#dceef9);box-shadow:0 8px 18px rgba(8,62,99,.16)}
.ssmd-preview .ssmd-album-preview>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.ssmd-preview .ssmd-album-preview>div span{display:block;aspect-ratio:1;border-radius:12px;background:linear-gradient(145deg,#fff,#cfe7f5);box-shadow:inset 0 1px 0 #fff,0 4px 10px rgba(8,62,99,.16)}
.ssmd-preview .ssmd-album-preview small{overflow-wrap:anywhere;color:#557184}

/* Visible Google Photos insertion action - 1.30.0 */
.ssmd-album-quick-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 13px !important;
  border: 1px solid rgba(8, 120, 189, .42) !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #ffffff 0%, #e9f5fc 100%) !important;
  color: #064c78 !important;
  box-shadow: 0 8px 18px rgba(4, 59, 103, .12), inset 0 1px 0 rgba(255,255,255,.95) !important;
  font-weight: 800 !important;
  white-space: nowrap;
}
.ssmd-album-quick-button:hover,
.ssmd-album-quick-button:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 11px 23px rgba(4, 59, 103, .17), inset 0 1px 0 rgba(255,255,255,.98) !important;
}
.ssmd-album-quick-button .ssmd-button-icon {
  flex: 0 0 22px;
}
@media (max-width: 640px) {
  .ssmd-panel__header .ssmd-album-quick-button {
    width: 100%;
    order: 3;
  }
  .ssmd-editor-panel > .ssmd-panel__header {
    flex-wrap: wrap;
  }
}
