/* Shared responsive geometry for workspace, storage and account dialogs. */
:root {
  --sc-control-radius: 10px;
}
.sc-shell, .sc-main, .sc-modal-content, .sc-auth-body {
  min-width: 0;
}
.sc-auth-dialog, .sc-storage-dialog {
  font-family: var(--sc-font);
}
.sc-auth-form input:not([type=checkbox]), .sc-auth-form select,
.sc-select > .sc-select-trigger, .sc-folder-display {
  border-radius: var(--sc-control-radius) !important;
}
.sc-auth-identity {
  max-width: 100%;
}
.sc-btn, .sc-main button, .sc-dialog button, .sc-auth-dialog button,
input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]), textarea {
  border-radius: var(--sc-control-radius) !important;
}
.sc-modal-header button {
  width: 36px;
  height: 36px;
  min-height: 36px !important;
  flex-basis: 36px;
}
.sc-auth-table td, .sc-storage-file {
  overflow-wrap: anywhere;
}
.sc-modal-header :is(h2,h3), .sc-auth-head h2 {
  overflow-wrap: anywhere;
}
@media (max-width: 767px) {
  :root { --sc-icon-button: 44px; }
  body { height: 100dvh !important; }
  .sc-topbar { min-height: 64px; height: auto; }
  .sc-topbar > .sc-brand { width: auto; padding: 12px; }
  .sc-brand .sc-wordmark { font-size: 18px; }
  .sc-brand .sc-wordmark small { font-size: 8px; letter-spacing: 1px; }
  .sc-topbar-main { padding: 8px; justify-content: flex-end; gap: 8px; }
  .sc-top-actions { gap: 8px; }
  .sc-top-actions .sc-server { display: none; }
  .sc-top-actions #scToolsButton, .sc-top-actions .sc-btn-primary {
    width: 44px !important; min-width: 44px !important;
    height: 44px !important; min-height: 44px !important;
  }
  .sc-sidebar { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .sc-sidebar-button { min-height: 44px; }
  .sc-main { padding: 16px 12px !important; overflow-y: auto !important; }
  #subtabFanpageList > div:nth-of-type(2) > div:first-of-type .flex {
    flex-wrap: wrap;
    min-width: 0;
    gap: 8px;
  }
  #subtabFanpageList > div:nth-of-type(2) > div:first-of-type .sc-select {
    max-width: 100%;
  }
  #modalPublish .sc-publish-workspace > div {
    flex-wrap: nowrap !important;
    height: auto !important;
    max-height: none !important;
    overflow-x: clip !important;
  }
  .sc-page-heading { margin-bottom: 16px; }
  .sc-page-heading h1 { font-size: 23px; }
  .sc-heading-meta { display: none; }
  .sc-metrics { gap: 8px; }
  .sc-metric { padding: 10px; min-width: 0; }
  .sc-metric-icon { display: none; }
  .sc-metric-value { font-size: 22px; }
  .sc-metric-label { font-size: 11px; }
  .sc-main button, .sc-dialog button, .sc-auth-dialog button,
  .sc-select > .sc-select-trigger, .sc-select-option {
    min-height: 44px !important;
  }
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]),
  textarea, select, .sc-auth-form input:not([type=checkbox]) {
    font-size: 16px !important;
  }
  .sc-modal { padding: 12px !important; }
  .sc-modal > .sc-dialog, .sc-auth-dialog {
    max-height: calc(100dvh - 24px - env(safe-area-inset-bottom)) !important;
  }
  .sc-modal-header button, .sc-auth-close {
    width: 44px !important; min-width: 44px !important;
    height: 44px !important; flex-basis: 44px !important;
  }
  .sc-modal-footer, .sc-auth-form-actions { flex-wrap: wrap; gap: 8px; }
  .sc-modal-footer button, .sc-auth-form-actions button { flex: 1 1 auto; }
  .sc-modal-content :is(.grid-cols-2,.grid-cols-3,.grid-cols-4) {
    grid-template-columns: minmax(0,1fr) !important;
  }
  .sc-modal-content .sc-select { max-width: 100%; }
  .sc-storage-file { flex-wrap: wrap; gap: 10px; }
  .sc-storage-file-actions { width: 100%; display: flex; gap: 8px; }
  .sc-storage-file-actions button { flex: 1; }
  .sc-auth-row-actions { flex-wrap: wrap; gap: 8px; }
  .sc-auth-table th, .sc-auth-table td { padding: 12px 8px; }
}
@media (max-width: 359px) {
  .sc-brand .sc-wordmark small { display: none; }
  .sc-brand img { width: 28px; height: 28px; }
  .sc-brand .sc-wordmark { font-size: 16px; }
  .sc-topbar > .sc-brand { gap: 6px; padding: 8px; }
}

@media(max-width:600px){.sc-storage-file{grid-template-columns:minmax(0,1fr) auto}.sc-storage-file>.sc-storage-tag{grid-column:2;grid-row:1}.sc-storage-file-actions{grid-column:1/-1;grid-row:2}.sc-storage-file-actions button{min-width:0}}
