:root {
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #dce3ee;
  --primary: #1463ff;
  --primary-dark: #0d47bf;
  --danger: #d92d20;
  --soft: #eef4ff;
  --shadow: 0 10px 30px rgba(22, 35, 60, 0.08);
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans SC", "Microsoft YaHei", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

[hidden] {
  display: none !important;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(140deg, rgba(20, 99, 255, 0.08), transparent 34%),
    linear-gradient(320deg, rgba(24, 159, 120, 0.08), transparent 30%),
    var(--bg);
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 32px;
}

.brand-block {
  text-align: center;
  margin-bottom: 28px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 16px;
  border-radius: 8px;
  color: var(--primary);
  background: var(--soft);
}

.brand-mark svg {
  width: 30px;
  height: 30px;
}

h1,
h2,
p {
  margin: 0;
}

.brand-block h1,
.topbar h1,
.share-header h1 {
  font-size: clamp(24px, 4vw, 32px);
  line-height: 1.15;
}

.brand-block p,
.share-header p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  font-size: 14px;
  font-weight: 650;
}

.input {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  color: var(--text);
  background: #fff;
  outline: none;
}

.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(20, 99, 255, 0.13);
}

.password-field {
  position: relative;
}

.password-field .input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  color: #667085;
  border: 0;
  border-radius: 6px;
  background: transparent;
  transform: translateY(-50%);
  cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus-visible {
  color: var(--primary);
  background: var(--soft);
  outline: none;
}

.password-toggle svg {
  width: 18px;
  height: 18px;
}

.password-toggle .eye-closed,
.password-toggle.is-visible .eye-open {
  display: none;
}

.password-toggle.is-visible .eye-closed {
  display: block;
}

.btn,
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 650;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.btn {
  padding: 0 16px;
}

.btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
}

.btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-secondary {
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.btn-secondary:hover {
  background: #f8fafc;
}

.icon-btn {
  width: 40px;
  padding: 0;
  color: var(--text);
  background: #fff;
  border-color: var(--line);
}

.icon-btn.danger {
  color: var(--danger);
}

.alert {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 40;
  width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.6;
  text-align: center;
  box-shadow: var(--shadow);
}

.alert[hidden] {
  display: none;
}

.alert-error {
  color: #b42318;
  background: #fff1f0;
  border: 1px solid #ffccc7;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px max(20px, calc((100vw - 1060px) / 2));
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.app-shell,
.share-shell {
  width: min(1060px, 100%);
  margin: 0 auto;
  padding: 22px 20px 48px;
}

.share-shell {
  width: min(760px, 100%);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.state-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(22, 35, 60, 0.04);
}

.metric {
  min-width: 0;
  padding: 18px;
}

.metric span,
.metric small,
.panel-heading span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  display: block;
  margin: 8px 0;
  overflow-wrap: anywhere;
  font-size: clamp(20px, 3vw, 28px);
  line-height: 1.15;
}

.panel {
  padding: 20px;
  margin-top: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-heading h2 {
  font-size: 18px;
}

.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8edf5;
}

.progress > div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.2s ease;
}

.upload-zone {
  display: grid;
  place-items: center;
  min-height: 148px;
  padding: 22px;
  text-align: center;
  color: var(--muted);
  border: 2px dashed #b8c4d6;
  border-radius: 8px;
  background: #fbfcff;
}

.upload-zone svg {
  width: 34px;
  height: 34px;
  margin-bottom: 8px;
  color: var(--primary);
}

.upload-zone p {
  font-weight: 650;
  color: var(--text);
}

.upload-zone.drag-over {
  border-color: var(--primary);
  background: var(--soft);
}

.upload-zone.disabled {
  opacity: 0.55;
  pointer-events: none;
}

.upload-progress {
  display: none;
  margin-top: 14px;
}

.upload-progress span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 14px;
}

.empty-state {
  padding: 34px 16px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.file-list {
  display: grid;
  gap: 10px;
}

.upload-queue {
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.upload-queue:empty {
  display: none;
}

.upload-queue-row {
  box-sizing: border-box;
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  border: 1px solid #cfe0ff;
  border-radius: 8px;
  background: #f7faff;
}

.upload-queue-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.upload-queue-resume-hint {
  margin-top: 6px;
  color: #b26a00;
  font-size: 12px;
  line-height: 1.5;
}

.upload-queue-heading {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(72px, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.upload-queue-name {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-queue-status,
.upload-queue-meta {
  color: var(--muted);
  font-size: 12px;
}

.upload-queue-status {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-queue-track {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}

.upload-queue-track .progress {
  flex: 1 1 auto;
  min-width: 0;
  height: 6px;
  margin: 0;
}

.upload-toggle {
  flex: 0 0 56px;
  width: 56px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.upload-queue-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.upload-queue-actions .upload-cancel {
  flex: 0 0 56px;
  width: 56px;
  min-height: 30px;
  padding: 0 8px;
  font-size: 12px;
}

.file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.file-main {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.file-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  color: var(--primary);
  background: var(--soft);
}

.file-main strong {
  display: block;
  max-width: 560px;
  overflow: hidden;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-main small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.file-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}

.share-box {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: center;
}

.share-box code {
  min-width: 0;
  overflow: hidden;
  padding: 12px;
  color: var(--primary);
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 30;
  width: max-content;
  max-width: min(520px, calc(100vw - 32px));
  padding: 12px 16px;
  color: #fff;
  background: #111827;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.96);
  line-height: 1.55;
  text-align: center;
  overflow-wrap: anywhere;
  transition: opacity 0.2s, transform 0.2s;
}

.progress-details {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.upload-controls {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}

.upload-controls .btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-danger {
  color: #b42318;
  border-color: #f3b8b2;
  background: #fff;
}

.btn-danger:hover {
  background: #fff1f0;
}

@media (max-width: 620px) {
  .progress-details {
    align-items: flex-start;
    flex-direction: column;
    gap: 2px;
  }
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.share-header {
  margin: 12px 0 20px;
  padding: 24px 0 4px;
  text-align: center;
}

.state-panel {
  margin-top: 40px;
  padding: 42px 24px;
  text-align: center;
}

.state-panel h1 {
  margin-bottom: 8px;
}

.state-panel p {
  color: var(--muted);
}

.compact-topbar {
  justify-content: flex-start;
}

.title-keybar {
  display: grid;
  grid-template-columns: auto minmax(240px, 1fr);
  gap: 20px;
  align-items: end;
  width: 100%;
}

.header-key {
  display: grid;
  justify-self: end;
  min-width: min(360px, 100%);
  gap: 5px;
}

.header-key span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.header-key code {
  overflow: hidden;
  padding: 9px 11px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.compact-shell {
  padding-top: 16px;
}

.space-summary {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 0.8fr);
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.space-summary > div {
  min-width: 0;
  padding: 16px 18px;
  background: var(--panel);
}

.space-summary span,
.space-summary small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.space-summary strong {
  display: block;
  margin: 6px 0 4px;
  overflow: hidden;
  font-size: clamp(18px, 2.6vw, 24px);
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 0;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(22, 35, 60, 0.04);
}

.workspace-left,
.workspace-right {
  min-width: 0;
  padding: 20px;
}

.workspace-left {
  border-right: 1px solid var(--line);
  background: #fff;
}

.workspace-right {
  background: #fbfcff;
}

.usage-progress {
  margin-bottom: 14px;
}

.compact-upload {
  min-height: 132px;
  background: #fff;
}

.inline-file-list {
  margin: 16px 0;
}

.inline-file-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.inline-file-list-head h2 {
  margin: 0;
  font-size: 17px;
}

.compact-empty {
  padding: 18px 14px;
}

.share-section {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.key-line {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.key-line span {
  color: var(--muted);
  font-size: 13px;
}

.key-line code,
.merged-share-box code {
  overflow: hidden;
  padding: 11px 12px;
  color: var(--text);
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.merged-share-box {
  grid-template-columns: 1fr;
}

.merged-share-box .btn {
  width: 100%;
}

.side-status {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.side-status > div {
  min-width: 0;
  padding: 15px;
  background: #fff;
}

.side-status span,
.side-status small {
  display: block;
  color: var(--muted);
  font-size: 13px;
}

.side-status strong {
  display: block;
  margin: 6px 0 3px;
  overflow: hidden;
  font-size: 19px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }

  .space-summary,
  .workspace-panel {
    grid-template-columns: 1fr;
  }

  .workspace-left {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .title-keybar {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .header-key {
    justify-self: stretch;
  }

  .share-box {
    grid-template-columns: 1fr;
  }

  .share-box .btn {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .topbar {
    padding: 14px 16px;
  }

  .app-shell,
  .share-shell {
    padding: 14px 12px 32px;
  }

  .panel,
  .metric,
  .workspace-left,
  .workspace-right {
    padding: 16px;
  }

  .space-summary > div {
    padding: 14px 16px;
  }

  .side-status {
    grid-template-columns: 1fr;
  }

  .file-row {
    align-items: stretch;
    flex-direction: column;
  }

  .file-main strong {
    max-width: calc(100vw - 116px);
  }

  .file-actions,
  .file-row .btn {
    width: 100%;
  }

  .file-actions .icon-btn {
    flex: 1 1 0;
    width: auto;
  }

  .login-panel {
    padding: 24px;
  }
}

/* Refined upload workspace */
.space-page {
  background:
    linear-gradient(180deg, #f8fbff 0, #f3f6fb 260px, #eef3f8 100%);
}

.space-hero {
  border-bottom: 1px solid rgba(134, 151, 178, 0.24);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
}

.space-hero-inner,
.space-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.space-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 390px);
  gap: 24px;
  align-items: center;
  padding-top: 26px;
  padding-bottom: 22px;
}

.space-title h1 {
  margin: 0;
  color: #101828;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
}

.space-title p {
  margin-top: 8px;
  color: #667085;
  font-size: 14px;
}

.session-key {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(20, 41, 71, 0.06);
}

.session-key span {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}

.session-key code {
  overflow: hidden;
  color: #102033;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.space-shell {
  padding-top: 24px;
  padding-bottom: 56px;
}

.workspace-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  overflow: hidden;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 46px rgba(31, 48, 73, 0.08);
}

.workspace-main {
  min-width: 0;
  padding: 24px;
}

.workspace-aside {
  min-width: 0;
  padding: 20px;
  border-left: 1px solid #e1e7f0;
  background: #f8fafc;
}

.workspace-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.workspace-toolbar h2 {
  margin: 0;
  color: #101828;
  font-size: 20px;
  line-height: 1.25;
}

.workspace-toolbar p {
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
}

.icon-btn.quiet {
  width: 36px;
  min-height: 36px;
  color: #52657a;
  border-color: #d7e0ec;
  background: #ffffff;
}

.icon-btn.quiet:hover {
  border-color: #b9c7d8;
  background: #f8fafc;
}

.usage-progress {
  height: 7px;
  margin-bottom: 16px;
  background: #e8eef6;
}

.refined-empty {
  margin-bottom: 14px;
  padding: 20px 16px;
  color: #667085;
  border: 1px dashed #c8d5e6;
  background: #f9fbfe;
}

.refined-file-list {
  margin-bottom: 14px;
}

.polished-file-row {
  border-color: #e3e9f2;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(31, 48, 73, 0.03);
}

.polished-upload {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  place-items: initial;
  align-items: center;
  gap: 14px;
  min-height: 120px;
  padding: 20px;
  text-align: left;
  border-color: #aabed7;
  background: #f8fbff;
}

.polished-upload:hover,
.polished-upload.drag-over {
  border-color: #1463ff;
  background: #eef5ff;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  color: #1463ff;
  border-radius: 8px;
  background: #e9f2ff;
}

.upload-icon svg {
  width: 26px;
  height: 26px;
  margin: 0;
}

.polished-upload strong {
  display: block;
  color: #102033;
  font-size: 15px;
}

.polished-upload span {
  display: block;
  margin-top: 5px;
  color: #667085;
  font-size: 13px;
}

.status-stack {
  display: grid;
  gap: 10px;
}

.status-item {
  padding: 14px;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #ffffff;
}

.status-item.usage-card {
  border-color: #cfe8d5;
  background: #effaf1;
}

.status-item.usage-card.usage-warning {
  border-color: #f0d9a8;
  background: #fff8e8;
}

.status-item.usage-card.usage-danger {
  border-color: #efc2c2;
  background: #fff0f0;
}

.usage-card .usage-meter {
  width: 100%;
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9efdd;
}

.usage-card .usage-meter > div {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #6dc982;
  transition: width 220ms ease;
}

.usage-card.usage-warning .usage-meter {
  background: #f8e8bd;
}

.usage-card.usage-warning .usage-meter > div {
  background: #e8a33b;
}

.usage-card.usage-danger .usage-meter {
  background: #f5d1d1;
}

.usage-card.usage-danger .usage-meter > div {
  background: #df5b5b;
}

.status-item span,
.status-item small {
  display: block;
  color: #667085;
  font-size: 12px;
}

.status-item strong {
  display: block;
  width: 100%;
  margin: 6px 0 4px;
  overflow: hidden;
  color: #102033;
  font-size: 18px;
  line-height: 1.2;
  text-align: left;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-item strong + small {
  width: 100%;
  margin: 0;
  text-align: left;
}

.share-actions {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.share-actions > label,
.share-actions > code {
  display: none;
}

.guide-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0;
  color: var(--primary);
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

.guide-link:hover {
  color: #0d4fd7;
  text-decoration: underline;
}

.guide-link svg {
  width: 16px;
  height: 16px;
}

.share-actions #emailCardBtn {
  order: 2;
}

.share-actions #copyShareBtn {
  order: 3;
}

.guide-modal[hidden] {
  display: none;
}

.guide-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(3px);
}

.guide-dialog {
  position: relative;
  width: min(560px, calc(100vw - 32px));
  max-height: min(620px, calc(100vh - 48px));
  overflow: auto;
  padding: 18px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.22);
}

.guide-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.guide-dialog-header h2 {
  margin: 0;
  font-size: 20px;
}

.guide-list {
  display: grid;
  gap: 10px;
  margin: 16px 0 12px;
  padding-left: 24px;
  color: var(--text);
  line-height: 1.55;
}

.guide-legacy-content,
.guide-dialog > .guide-note {
  display: none;
}

.guide-frame {
  display: block;
  width: 100%;
  height: 330px;
  margin-top: 16px;
  border: 0;
  background: #fff;
}

.guide-list li {
  padding-left: 4px;
}

.guide-note {
  margin: 0;
  padding: 10px 12px;
  color: var(--muted);
  border-left: 3px solid var(--primary);
  background: #f5f8ff;
  font-size: 13px;
  line-height: 1.55;
}

.share-actions label {
  color: #52657a;
  font-size: 12px;
  font-weight: 700;
}

.share-actions code {
  overflow: hidden;
  padding: 11px 12px;
  color: #1463ff;
  font-family: "SF Mono", "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
  border: 1px solid #d7e0ec;
  border-radius: 8px;
  background: #ffffff;
}

.share-actions .btn {
  width: 100%;
  min-height: 42px;
}

@media (max-width: 860px) {
  .space-hero-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .session-key {
    width: 100%;
  }

  .workspace-card {
    grid-template-columns: 1fr;
  }

  .workspace-aside {
    border-left: 0;
    border-top: 1px solid #e1e7f0;
  }

  .status-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .space-hero-inner,
  .space-shell {
    padding-left: 14px;
    padding-right: 14px;
  }

  .space-hero-inner {
    padding-top: 18px;
    padding-bottom: 16px;
  }

  .space-title h1 {
    font-size: 26px;
  }

  .workspace-main,
  .workspace-aside {
    padding: 16px;
  }

  .workspace-toolbar {
    align-items: center;
  }

  .polished-upload {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .status-stack {
    grid-template-columns: 1fr;
  }
}
