:root {
  --mst-bg: #ffffff;
  --mst-surface: #ffffff;
  --mst-surface-subtle: #fafafa;
  --mst-border-light: #ededed;
  --mst-border-strong: #e3e3e3;
  --mst-divider: #efefef;
  --mst-text-primary: #0a0a0a;
  --mst-text-secondary: #3a3a3a;
  --mst-text-muted: #8a8a8a;
  --mst-text-placeholder: #b5b5b5;
  --mst-btn-primary: #000000;
  --mst-btn-primary-hover: #111111;
  --mst-on-primary: #ffffff;
  --mst-shadow-soft: rgba(0, 0, 0, 0.04);
  --mst-shadow-medium: rgba(0, 0, 0, 0.08);
  --mst-radius-card: 16px;
  --mst-radius-control: 12px;
}

.mst-app,
.mst-app * {
  box-sizing: border-box;
}

.mst-app {
  direction: rtl;
  text-align: start;
  color: var(--mst-text-primary);
  background: var(--mst-bg);
  color-scheme: light;
  font-family: inherit;
  isolation: isolate;
}

.mst-app,
.mst-app * {
  font-family: inherit;
}

.mst-app :where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  ul,
  ol,
  li,
  dl,
  dt,
  dd,
  blockquote,
  figure,
  form
) {
  margin: 0;
  padding: 0;
}

.mst-app :where(a) {
  color: inherit;
  text-decoration: none;
}

.mst-app :where(button, input, select, textarea) {
  font: inherit;
  color: inherit;
  background: transparent;
}

.mst-app :where(button) {
  border: 0;
  margin: 0;
}

.mst-app :where(img, svg) {
  max-inline-size: 100%;
  block-size: auto;
}

.mst-app :where(*):focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.mst-shell {
  inline-size: min(100%, 720px);
  margin-inline: auto;
  padding-block: 12px;
  padding-inline: 5px;
}

.mst-page {
  display: grid;
  gap: 12px;
}

.mst-page--support-list {
  padding-block-end: calc(88px + env(safe-area-inset-bottom, 0px));
}

.mst-card {
  background: var(--mst-surface);
  border: 1px solid var(--mst-border-light);
  border-radius: var(--mst-radius-card);
  box-shadow: 0 10px 24px var(--mst-shadow-soft);
  padding: 14px;
}

.mst-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 14px;
}

.mst-card__header--stacked {
  flex-direction: column;
  align-items: flex-start;
}

.mst-title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 750;
  color: var(--mst-text-primary);
}

.mst-back-link {
  color: var(--mst-text-secondary);
  text-decoration: none;
  font-size: 13px;
}

.mst-form {
  display: grid;
  gap: 8px;
}

.mst-label {
  margin-block-start: 6px;
  color: var(--mst-text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.mst-input,
.mst-textarea,
.mst-btn,
.mst-input-file {
  font: inherit;
}

.mst-input,
.mst-textarea {
  inline-size: 100%;
  border: 1px solid var(--mst-border-light);
  border-radius: var(--mst-radius-control);
  background: var(--mst-surface-subtle);
  color: var(--mst-text-primary);
  padding-block: 12px;
  padding-inline: 12px;
}

.mst-input::placeholder,
.mst-textarea::placeholder {
  color: var(--mst-text-placeholder);
}

.mst-textarea {
  min-block-size: 120px;
  resize: vertical;
}

.mst-input:focus,
.mst-textarea:focus {
  outline: 0;
  border-color: var(--mst-border-strong);
  box-shadow: 0 0 0 3px var(--mst-shadow-soft);
}

.mst-input-file {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  opacity: 0;
  pointer-events: none;
}

.mst-dropzone {
  border: 1px dashed var(--mst-border-strong);
  border-radius: 14px;
  background: var(--mst-surface-subtle);
  min-block-size: 110px;
  padding-block: 18px;
  padding-inline: 16px;
  display: grid;
  place-items: center;
  gap: 6px;
  text-align: center;
  cursor: pointer;
}

.mst-dropzone__icon {
  inline-size: 30px;
  block-size: 30px;
  border-radius: 999px;
  border: 1px solid var(--mst-border-strong);
  display: inline-grid;
  place-items: center;
  color: var(--mst-text-secondary);
}

.mst-dropzone__text {
  color: var(--mst-text-secondary);
  font-size: 13px;
}

.mst-dropzone__hint {
  color: var(--mst-text-muted);
  font-size: 12px;
}

.mst-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: var(--mst-radius-control);
  border: 1px solid transparent;
  cursor: pointer;
  padding-block: 12px;
  padding-inline: 16px;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  color: inherit;
}

.mst-btn--primary {
  background: var(--mst-btn-primary);
  color: var(--mst-on-primary);
}

.mst-btn--primary:hover {
  background: var(--mst-btn-primary-hover);
  color: var(--mst-on-primary);
}

.mst-btn--secondary,
.mst-btn--ghost {
  border-color: var(--mst-border-light);
  background: var(--mst-surface-subtle);
  color: var(--mst-text-secondary);
}

.mst-btn--outline {
  border-color: #cfd4dc;
  background: #fff;
  color: #1f2937;
}

.mst-btn--outline:hover {
  border-color: #9ea6b2;
}

.mst-btn--full {
  inline-size: 100%;
}

.mst-empty,
.mst-alert {
  border: 1px dashed var(--mst-border-strong);
  border-radius: 12px;
  background: var(--mst-surface-subtle);
  color: var(--mst-text-muted);
  padding-block: 14px;
  padding-inline: 14px;
}

.mst-ticket-list {
  display: grid;
  gap: 11px;
}

/* Ticket list app-like layout (shortcode: [mst_ticket_list]) */
.mst-ticket-list-page {
  inline-size: min(100%, 860px);
  margin-inline: auto;
}

.mst-ticket-new-page {
  inline-size: min(100%, 860px);
  margin-inline: auto;
}

.mst-ticket-new-page .mst-card {
  display: grid;
  gap: 6px;
}

.mst-ticket-new-page .mst-card__header {
  margin-block-end: 6px;
}

.mst-ticket-new-page .mst-form {
  gap: 16px;
}

.mst-ticket-new-page .mst-label {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--mst-text-muted);
  text-align: right;
}

.mst-ticket-new-page .mst-input,
.mst-ticket-new-page .mst-textarea,
.mst-ticket-new-page select.mst-input,
.mst-ticket-new-page .mst-btn {
  text-align: right;
}

.mst-ticket-new-page .mst-input,
.mst-ticket-new-page .mst-textarea,
.mst-ticket-new-page select.mst-input {
  padding-inline: 14px;
}

.mst-ticket-new-page select.mst-input {
  direction: rtl;
}

.mst-ticket-new-page .mst-dropzone {
  text-align: center;
}

.mst-ticket-new-page .mst-btn--full {
  margin-block-start: 2px;
}

.mst-ticket-list-page__panel {
  display: grid;
  gap: 12px;
}

.mst-ticket-list-page__header {
  margin-block-end: 2px;
}

.mst-ticket-list-page__title {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
  font-weight: 760;
  color: var(--mst-text-primary);
}

.mst-ticket-list-page .mst-ticket-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: #fff;
  border: 1px solid var(--mst-border-light);
  border-radius: 14px;
  box-shadow: 0 8px 20px var(--mst-shadow-soft);
  color: inherit;
  text-decoration: none;
  padding-block: 14px;
  padding-inline: 14px;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.mst-ticket-list-page .mst-ticket-card:hover {
  background: #fcfcfc;
  border-color: var(--mst-border-strong);
}

.mst-ticket-list-page .mst-ticket-card:active {
  background: #efefef;
}

.mst-ticket-list-page .mst-ticket-card:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

.mst-ticket-card__content {
  flex: 1;
  min-inline-size: 0;
}

.mst-ticket-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-block-end: 4px;
}

.mst-ticket-card__name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-inline-size: 0;
}

.mst-ticket-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--mst-text-secondary);
}

.mst-ticket-card__id,
.mst-ticket-card__time {
  font-size: 12px;
  color: var(--mst-text-muted);
  white-space: nowrap;
}

.mst-ticket-card__subject {
  margin: 0;
  font-size: 18px;
  line-height: 1.45;
  font-weight: 700;
  color: var(--mst-text-primary);
}

.mst-ticket-card__status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.mst-ticket-card__status .mst-status-icon {
  inline-size: 20px;
  block-size: 20px;
}


.mst-ticket-card__status-label {
  margin-inline-start: 6px;
  font-size: 12px;
  color: rgba(15, 23, 42, 0.65);
}

.mst-ticket-card__status-label.is-closed {
  color: rgba(15, 23, 42, 0.45);
}

@media (max-width: 767px) {
  .mst-ticket-list-page {
    inline-size: calc(100vw - 20px);
    margin-inline: calc(50% - 50vw + 10px);
  }

  .mst-ticket-new-page {
    inline-size: calc(100vw - 20px);
    margin-inline: calc(50% - 50vw + 10px);
  }

  .mst-ticket-list-page .mst-ticket-card {
    padding-inline: 12px;
  }

  .mst-ticket-card__subject {
    font-size: 15px;
  }
}

.mst-sticky-wrap{
  position: fixed !important;
  left: 16px;
  right: 16px;
  bottom: calc(140px + env(safe-area-inset-bottom, 0px)) !important;
  z-index: 2147483647 !important;
  pointer-events: none;
  display: flex;
  justify-content: center;
}

.mst-sticky-backdrop{
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(160px + env(safe-area-inset-bottom, 0px));
  background: #ffffff;
  z-index: 2147483000;
  pointer-events: none;
}

.mst-sticky-new-ticket{
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(140px + env(safe-area-inset-bottom, 0px));
  margin-inline: auto;
  pointer-events: auto;
  z-index: 2147483647;
  width: 100%;
  max-width: 520px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 14px;
  background: #0b0b0b;
  color: #ffffff !important;
  text-decoration: none !important;

  opacity: 1 !important;
  filter: none !important;

  box-shadow: 0 10px 30px rgba(0,0,0,.22);
}

.mst-sticky-new-ticket:hover,
.mst-sticky-new-ticket:focus,
.mst-sticky-new-ticket:active{
  color: #ffffff !important;
  opacity: 1 !important;
  filter: none !important;
}

.mst-sticky-new-ticket .mst-btn-inner{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  direction: rtl;
  flex-direction: row-reverse;
  color: #ffffff !important;
}

.mst-sticky-new-ticket .mst-btn-icon{
  font-size: 22px;
  font-weight: 400;
  line-height: 1;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff !important;
}

.mst-sticky-new-ticket .mst-btn-text{
  font-size: 14px;
  font-weight: 700;
  color: #ffffff !important;
}

@media (max-width: 767px){
  .mst-sticky-new-ticket{
    width: calc(100vw - 20px);
  }
}

.mst-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid var(--mst-border-light);
  background: var(--mst-surface-subtle);
  color: var(--mst-text-secondary);
  padding-block: 3px;
  padding-inline: 9px;
  font-size: 11px;
}

.mst-chat-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-block-end: 10px;
}

.mst-chat-topbar__title {
  color: var(--mst-text-muted);
  font-size: 13px;
}

.mst-chat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-block-end: 1px solid var(--mst-divider);
  padding-block-end: 10px;
  margin-block-end: 12px;
}

.mst-thread {
  border: 1px solid var(--mst-border-light);
  border-radius: 14px;
  background: var(--mst-surface-subtle);
  max-block-size: 60vh;
  overflow: auto;
  padding-block: 11px;
  padding-inline: 11px;
}

.mst-message {
  max-inline-size: 90%;
  margin-block-end: 8px;
  border: 1px solid var(--mst-border-light);
  border-radius: 10px;
  background: var(--mst-surface);
  padding-block: 10px;
  padding-inline: 10px;
}

.mst-message--user {
  margin-inline-start: auto;
}

.mst-message--admin {
  margin-inline-end: auto;
}

.mst-message__meta {
  font-size: 11px;
  color: var(--mst-text-muted);
  margin-block-end: 5px;
}

.mst-message__body {
  color: var(--mst-text-secondary);
  line-height: 1.8;
}

.mst-attachments {
  margin-block-start: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mst-attachment {
  text-decoration: none;
  border: 1px solid var(--mst-border-strong);
  border-radius: 999px;
  background: var(--mst-surface-subtle);
  color: var(--mst-text-secondary);
  padding-block: 4px;
  padding-inline: 8px;
  font-size: 11px;
}

.mst-actions {
  margin-block-start: 10px;
}

.mst-composer {
  margin-block-start: 14px;
}

@media (min-width: 768px) {
  .mst-shell {
    padding-block: 24px;
    padding-inline: 16px;
  }

  .mst-card {
    padding: 20px;
    box-shadow: 0 14px 28px var(--mst-shadow-medium);
  }

  .mst-page--support-list {
    padding-block-end: 118px;
  }

  .mst-bottom-bar {
    padding-inline: max(16px, calc((100vw - 720px) / 2));
  }
}

/* Ticket chat redesign (ChatGPT-like layout) */
.mst-page--chat,
.mst-chat-page,
.mst-chat-page .mst-chat {
  min-height: 100dvh;
}

.mst-chat-page {
  width: min(100%, 760px);
  margin-inline: auto;
  padding-inline: 16px;
}

.mst-chat-page .mst-chat {
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #0f172a;
  font-size: 14.5px;
  line-height: 1.6;
}

.mst-chat-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
  flex-wrap: nowrap;
}

.mst-chat-topbar__back a {
  text-decoration: none;
  font-weight: 500;
  white-space: nowrap;
}

.mst-chat-topbar__close {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.mst-ticket-close {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  white-space: nowrap;
}

.mst-chat-topbar__close .close-icon {
  color: #E53935;
  font-weight: bold;
}

.mst-chat-topbar__close .close-icon:hover {
  color: #C62828;
}

.mst-chat-system-bar {
  position: sticky;
  top: 58px;
  z-index: 9;
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #f7f7f8;
  border-block-end: 1px solid rgba(0, 0, 0, 0.08);
  padding-inline: 10px;
}

.mst-chat-system-bar__status {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
}

.mst-chat-system-bar__action {
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #dc2626;
  background: transparent;
  border-radius: 999px;
  font-size: 12px;
  padding: 6px 10px;
}

.mst-chat-page .mst-thread {
  flex: 1;
  overflow-y: auto;
  border: 0;
  border-radius: 0;
  background: #fff;
  padding: 18px 0 calc(110px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mst-chat-page .mst-message {
  max-inline-size: 80%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mst-chat-page .mst-chat-message--user {
  margin-inline-start: auto;
  align-items: flex-end;
}

.mst-chat-page .mst-chat-message--admin {
  margin-inline-end: auto;
  align-items: flex-start;
}

.mst-chat-page .mst-message__body {
  width: fit-content;
  max-width: 100%;
  border-radius: 15px;
  padding: 10px 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
  color: #0f172a;
}

.mst-chat-page .mst-chat-message--admin .mst-message__body {
  background: #f7f7f8;
}

.mst-chat-page .mst-chat-message--user .mst-message__body {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.mst-chat-page .mst-message__meta {
  margin: 0;
  font-size: 11px;
  color: rgba(15, 23, 42, 0.45);
}

.mst-chat-page .mst-attachments {
  margin-top: 8px;
  gap: 7px;
}

.mst-chat-page .mst-attachment {
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mst-chat-page .mst-attachment::before {
  content: "📄";
}

.mst-composer-wrap {
  position: sticky;
  bottom: 0;
  z-index: 10;
  background: #fff;
  border-block-start: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
}

.mst-composer-wrap__notice {
  font-size: 12px;
  color: rgba(15, 23, 42, 0.6);
  margin-bottom: 8px;
}

.mst-composer,
.mst-composer__form {
  margin: 0;
}

.mst-composer__inner {
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 24px;
  padding: 10px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 8px;
  background: #fff;
  direction: rtl;
  transition: border-color 150ms ease;
}

.mst-composer__attach {
  inline-size: 32px;
  block-size: 32px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(15, 23, 42, 0.65);
  cursor: pointer;
}

.mst-composer__input {
  border: 0;
  min-height: 36px;
  max-height: 160px;
  padding: 8px 4px;
  resize: none;
  overflow-y: hidden;
  line-height: 1.6;
  direction: rtl;
  text-align: right;
  background: transparent;
}

.mst-chat-page .mst-composer__input:focus,
.mst-chat-page .mst-composer__input:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

.mst-chat-page .mst-composer__inner:focus-within {
  border-color: rgba(15, 23, 42, 0.22);
}

.mst-composer__input--at-max {
  overflow-y: auto;
}

.mst-composer__send {
  inline-size: 38px;
  block-size: 38px;
  border-radius: 50%;
  background: #111827;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms ease, transform 150ms ease;
}

.mst-composer__send svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mst-composer__send:hover:not(:disabled) {
  background: #1f2937;
  transform: scale(1.05);
}

.mst-composer__send:disabled {
  background: rgba(0, 0, 0, 0.1);
  color: rgba(0, 0, 0, 0.4);
  cursor: not-allowed;
}

.mst-composer__files {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.mst-composer__file-chip {
  max-width: 220px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #f3f4f6;
  font-size: 11px;
}

.mst-composer__file-chip-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mst-composer__file-chip-remove {
  font-size: 14px;
  color: rgba(15, 23, 42, 0.65);
  line-height: 1;
}

.mst-composer--disabled .mst-composer__attach,
.mst-composer--disabled .mst-composer__send,
.mst-composer--disabled .mst-composer__input {
  opacity: .6;
  cursor: not-allowed;
}

.mst-app[data-mst-theme="dark"] .mst-chat-page .mst-chat,
.mst-app[data-mst-theme="dark"] .mst-chat-topbar,
.mst-app[data-mst-theme="dark"] .mst-chat-page .mst-thread,
.mst-app[data-mst-theme="dark"] .mst-composer-wrap,
.mst-app[data-mst-theme="dark"] .mst-composer__inner {
  background: #0b0f19;
  color: rgba(255, 255, 255, 0.92);
}

.mst-app[data-mst-theme="dark"] .mst-chat-topbar,
.mst-app[data-mst-theme="dark"] .mst-chat-system-bar,
.mst-app[data-mst-theme="dark"] .mst-composer-wrap,
.mst-app[data-mst-theme="dark"] .mst-composer__inner,
.mst-app[data-mst-theme="dark"] .mst-chat-page .mst-chat-message--user .mst-message__body,
.mst-app[data-mst-theme="dark"] .mst-chat-page .mst-attachment,
.mst-app[data-mst-theme="dark"] .mst-composer__file-chip {
  border-color: rgba(255, 255, 255, 0.1);
}

.mst-app[data-mst-theme="dark"] .mst-chat-system-bar,
.mst-app[data-mst-theme="dark"] .mst-chat-page .mst-chat-message--admin .mst-message__body {
  background: rgba(255, 255, 255, 0.06);
}

.mst-app[data-mst-theme="dark"] .mst-chat-page .mst-chat-message--user .mst-message__body {
  background: rgba(255, 255, 255, 0.1);
}

.mst-app[data-mst-theme="dark"] .mst-chat-topbar__back a,
.mst-app[data-mst-theme="dark"] .mst-ticket-close,
.mst-app[data-mst-theme="dark"] .mst-chat-system-bar__status,
.mst-app[data-mst-theme="dark"] .mst-message__meta,
.mst-app[data-mst-theme="dark"] .mst-composer__attach,
.mst-app[data-mst-theme="dark"] .mst-composer__file-chip-remove {
  color: rgba(255, 255, 255, 0.7);
}

.mst-app[data-mst-theme="dark"] .mst-composer__send {
  background: #fff;
  color: #0b0f19;
}

.mst-app[data-mst-theme="dark"] .mst-composer__send:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.85);
}

.mst-app[data-mst-theme="dark"] .mst-composer__send:disabled {
  background: rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 767px) {
  .mst-shell { padding-inline: 0; }
  .mst-chat-page { max-width: 100%; }
  .mst-chat-page .mst-message { max-inline-size: 92%; }
}

.mst-login-gate {
  inline-size: min(100%, 560px);
  margin-inline: auto;
  padding-block: 14px;
  padding-inline: 10px;
  font-family: inherit;
}

.mst-login-gate__inner {
  border: 1px solid var(--mst-border-light);
  border-radius: 14px;
  background: var(--mst-surface-subtle);
  padding-block: 18px;
  padding-inline: 16px;
  text-align: center;
  display: grid;
  gap: 14px;
}

.mst-login-gate__msg {
  margin: 0;
  color: var(--mst-text-secondary);
  line-height: 1.8;
}


.mst-login-cta {
  display: grid;
  gap: 10px;
  justify-items: center;
}

.mst-login-cta__helper {
  margin: 0;
  color: var(--mst-text-muted);
  font-size: 13px;
  line-height: 1.8;
}

.mst-login-cta--shortcode {
  inline-size: 100%;
}


.mst-login-gate__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-inline-size: 240px;
  max-inline-size: 280px;
  margin-inline: auto;
  border: 1px solid var(--mst-border-strong);
  border-radius: 12px;
  padding-block: 11px;
  padding-inline: 16px;
  background: #fff;
  color: var(--mst-text-primary);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.mst-login-gate__btn:hover,
.mst-login-gate__btn:focus-visible {
  background: #f7f7f7;
  border-color: #d7d7d7;
}

@media (max-width: 767px) {
  .mst-login-gate__btn {
    inline-size: 100%;
    max-inline-size: none;
    min-inline-size: 0;
  }
}
