:root {
  --ink: #0b1324;
  --ink-soft: #536071;
  --paper: #f2f3ee;
  --card: #ffffff;
  --line: #d9ddd7;
  --mint: #69e0b4;
  --mint-dark: #0f765e;
  --blue: #5b78ff;
  --danger: #c44343;
  --shadow: 0 22px 60px rgba(13, 24, 39, .11);
  --radius-lg: 28px;
  --radius-md: 18px;
  --shell: min(1160px, calc(100% - 48px));
}

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; color-scheme: light; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  z-index: -1;
  width: 380px;
  height: 380px;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .2;
  pointer-events: none;
}
.ambient-one { top: 10%; left: -200px; background: var(--mint); }
.ambient-two { right: -160px; top: 48%; background: #a8b3ff; }
.shell { width: var(--shell); margin-inline: auto; }
.shell-small { width: min(900px, calc(100% - 48px)); margin-inline: auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: white;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--ink);
  background: var(--mint);
  border-radius: 13px 13px 13px 4px;
  font-size: 17px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.32);
}
.brand > span:last-child { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: 17px; letter-spacing: .08em; }
.brand small { margin-top: 5px; font-size: 8px; letter-spacing: .22em; opacity: .58; }
.brand-dark { color: var(--ink); }

.topbar {
  height: 76px;
  padding: 0 max(24px, calc((100vw - 1160px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--ink);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.space-button {
  display: flex;
  min-height: 38px;
  padding: 0 13px;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.17);
  border-radius: 999px;
  background: rgba(255,255,255,.06);
  color: white;
  cursor: pointer;
}
.space-button strong { max-width: 145px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.space-button small { color: #8f9daf; font-size: 9px; }
.space-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(105,224,180,.1); }
.ghost-button, .icon-button {
  border: 1px solid rgba(255,255,255,.17);
  background: transparent;
  color: white;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s, border-color .2s, transform .2s;
}
.ghost-button { min-height: 38px; padding: 0 16px; font-size: 13px; font-weight: 650; }
.icon-button { width: 38px; height: 38px; font-size: 18px; }
.ghost-button:hover, .icon-button:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.3); }
.ghost-button:active, .icon-button:active, .button:active { transform: translateY(1px); }
.ghost-button.light { color: var(--ink); border-color: var(--line); background: var(--card); }
.icon-button.dark { color: var(--ink); border-color: var(--line); }

.eyebrow { color: var(--mint-dark); font-size: 10px; font-weight: 800; letter-spacing: .2em; }

.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 22px;
  align-items: stretch;
  margin-top: 30px;
}
.composer-card {
  background: var(--card);
  border: 1px solid rgba(11,19,36,.08);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}
.composer-card { overflow: hidden; }
.tabs { display: flex; border-bottom: 1px solid var(--line); }
.tab {
  position: relative;
  flex: 1;
  height: 66px;
  border: 0;
  background: #f9faf7;
  color: #758092;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  transition: color .2s, background .2s;
}
.tab + .tab { border-left: 1px solid var(--line); }
.tab span { margin-right: 9px; color: #9ca5b2; font: 700 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.tab.active { color: var(--ink); background: white; }
.tab.active::after { content: ""; position: absolute; left: 50%; bottom: -1px; width: 42px; height: 3px; transform: translateX(-50%); background: var(--mint-dark); border-radius: 3px 3px 0 0; }
.panel { padding: 24px; }
.upload-options {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}
.upload-options.protection-only { display: flex; justify-content: flex-end; }
.note-field { min-width: 0; }
.note-field > span { display: block; margin: 0 0 7px 3px; font-size: 11px; font-weight: 800; }
.note-field > span small { color: #8b958e; font-weight: 500; }
.note-field input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcf9;
  color: var(--ink);
  outline: none;
}
.note-field input:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 4px rgba(15,118,94,.09); }
.protect-switch {
  display: flex;
  min-height: 46px;
  padding: 0 13px;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfcf9;
  cursor: pointer;
  user-select: none;
}
.protect-switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track { position: relative; width: 34px; height: 20px; flex: 0 0 auto; border-radius: 99px; background: #cbd1cc; transition: background .2s; }
.switch-track i { position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: white; box-shadow: 0 1px 4px rgba(0,0,0,.2); transition: transform .2s; }
.protect-switch input:checked + .switch-track { background: var(--mint-dark); }
.protect-switch input:checked + .switch-track i { transform: translateX(14px); }
.protect-switch > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.protect-switch strong { font-size: 11px; }
.protect-switch small { margin-top: 2px; color: #818b83; font-size: 9px; white-space: nowrap; }
.protect-switch.disabled { cursor: not-allowed; opacity: .48; }
.protect-switch.compact { border: 0; padding: 0; background: transparent; }
.drop-zone {
  display: flex;
  width: 100%;
  min-height: 240px;
  padding: 32px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1.5px dashed #aeb9b1;
  border-radius: 20px;
  background: #f8faf6;
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .2s;
}
.drop-zone:hover, .drop-zone.dragging { border-color: var(--mint-dark); background: #f0faf5; transform: translateY(-2px); }
.drop-zone.has-files { min-height: 150px; padding-block: 22px; }
.drop-zone.has-files .drop-icon { width: 44px; height: 44px; margin-bottom: 12px; border-radius: 14px; font-size: 23px; }
.drop-zone.has-files small { margin-top: 12px; }
.drop-zone.disabled { cursor: wait; opacity: .62; transform: none; }
.drop-zone:focus-visible { outline: 3px solid rgba(91,120,255,.25); outline-offset: 3px; }
.drop-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 20px; border-radius: 18px; background: var(--ink); color: var(--mint); font-size: 28px; box-shadow: 0 10px 26px rgba(11,19,36,.18); }
.drop-zone strong { font-size: 21px; letter-spacing: -.02em; }
.drop-zone > span:not(.drop-icon) { margin-top: 9px; color: var(--ink-soft); font-size: 14px; }
.drop-zone small { margin-top: 22px; color: #8c968f; font-size: 11px; }
.queue-panel { margin-top: 16px; overflow: hidden; border: 1px solid var(--line); border-radius: 17px; background: #fbfcf9; }
.queue-heading { display: flex; min-height: 58px; padding: 11px 14px; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); }
.queue-heading > div { display: flex; min-width: 0; flex-direction: column; }
.queue-heading strong { font-size: 13px; }
.queue-heading small { margin-top: 4px; color: var(--ink-soft); font-size: 10px; }
.queue-clear { padding: 7px 4px; border: 0; background: transparent; color: #7f8981; cursor: pointer; font-size: 11px; font-weight: 750; }
.queue-clear:hover { color: var(--danger); }
.queue-clear:disabled { cursor: not-allowed; opacity: .45; }
.upload-queue { display: grid; gap: 8px; padding: 10px; }
.upload-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) minmax(180px, .85fr) auto; gap: 12px; align-items: center; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.upload-row.status-failed { border-color: rgba(196,67,67,.32); background: #fffafa; }
.upload-row.status-success { background: #f8fcf9; }
.file-chip { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #edf0ff; color: #4b5fc6; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.upload-info { min-width: 0; }
.upload-info strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.upload-info small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 11px; }
.progress { height: 4px; margin-top: 8px; overflow: hidden; border-radius: 99px; background: #e8ebe7; }
.progress span { display: block; width: 0; height: 100%; background: var(--mint-dark); transition: width .18s; }
.progress span.failed { background: var(--danger); }
.upload-note { display: block; min-width: 0; }
.upload-note > span { display: block; margin: 0 0 5px 2px; color: #7f8981; font-size: 9px; font-weight: 750; }
.upload-note input { width: 100%; height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; background: #fbfcf9; color: var(--ink); outline: none; font-size: 11px; }
.upload-note input:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 3px rgba(15,118,94,.08); }
.upload-note input:disabled { color: #69746c; opacity: .72; }
.queue-item-actions { display: flex; align-items: center; gap: 5px; }
.queue-copy { min-width: 62px; height: 34px; padding: 0 8px; border: 0; background: transparent; color: var(--mint-dark); cursor: pointer; font-size: 10px; font-weight: 800; }
.queue-remove { display: grid; width: 34px; height: 34px; padding: 0; place-items: center; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #89928b; cursor: pointer; font-size: 21px; line-height: 1; }
.queue-remove:hover { border-color: #efd7d7; background: #fff4f4; color: var(--danger); }
.queue-remove:disabled { cursor: not-allowed; opacity: .35; }
.queue-footer { display: flex; min-height: 66px; padding: 10px 12px 10px 15px; align-items: center; justify-content: space-between; gap: 18px; border-top: 1px solid var(--line); background: white; }
.queue-footer > span { color: #879188; font-size: 10px; }
.queue-footer .button { min-width: 142px; }

.text-heading { display: flex; justify-content: space-between; gap: 24px; align-items: start; margin-bottom: 18px; }
.text-heading label { display: block; font-size: 20px; font-weight: 850; letter-spacing: -.02em; }
.text-heading p { margin: 6px 0 0; color: var(--ink-soft); font-size: 13px; }
.text-heading > span { color: #8b958e; font: 11px ui-monospace, SFMono-Regular, Consolas, monospace; }
.title-input, textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: #fbfcf9;
  color: var(--ink);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.title-input:focus, textarea:focus, .login-form input:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 4px rgba(15,118,94,.09); }
.title-input { height: 44px; margin-bottom: 10px; padding: 0 14px; border-radius: 12px; font-size: 13px; }
textarea { min-height: 190px; padding: 16px; resize: vertical; border-radius: 15px; line-height: 1.65; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.text-actions { display: flex; justify-content: space-between; gap: 18px; align-items: center; margin-top: 15px; }
.button { min-height: 44px; padding: 0 19px; border: 0; border-radius: 12px; cursor: pointer; font-size: 13px; font-weight: 800; transition: transform .15s, filter .2s, opacity .2s; }
.button:hover { filter: brightness(1.05); }
.button:disabled { cursor: not-allowed; opacity: .55; }
.button-primary { background: var(--ink); color: white; box-shadow: 0 8px 20px rgba(11,19,36,.15); }
.button-secondary { border: 1px solid var(--line); background: white; color: var(--ink); }

.capacity-summary { display: grid; align-content: start; gap: 28px; padding: 18px 4px; }
.capacity-stat { display: grid; gap: 8px; }
.capacity-stat span { color: #7a857d; font-size: 12px; font-weight: 700; }
.capacity-stat strong { color: var(--ink); font: 850 30px/1 ui-monospace, SFMono-Regular, Consolas, monospace; letter-spacing: -.04em; }

.recent { margin-top: 58px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; margin-bottom: 18px; }
.section-heading h2 { margin: 7px 0 0; font-size: 29px; letter-spacing: -.035em; }
.item-list { display: grid; gap: 9px; }
.item-row {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 76px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(255,255,255,.78);
  transition: border-color .2s, transform .2s, background .2s;
}
.item-row:hover { transform: translateY(-1px); border-color: #b8c2bc; background: white; }
.item-type { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: #e9eeff; color: #4d61c5; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.item-type.text { background: #e7f7ef; color: var(--mint-dark); }
.item-main { min-width: 0; }
.item-main strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.item-note { display: block; margin-top: 5px; overflow: hidden; color: #415047; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.item-main small { color: #7d887f; font-size: 11px; }
.item-main small { display: block; margin-top: 6px; }
.item-actions { display: flex; gap: 6px; }
.mini-button { height: 34px; padding: 0 11px; border: 1px solid var(--line); border-radius: 10px; background: white; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 750; }
.mini-button:hover { border-color: #9aa69e; }
.mini-button.danger { color: var(--danger); }
.empty-state { padding: 58px 24px; text-align: center; border: 1px dashed #bfc6c0; border-radius: 18px; }
.empty-state span { display: block; color: #8b968e; font-size: 32px; transform: rotate(45deg); }
.empty-state strong { display: block; margin-top: 13px; font-size: 15px; }
.empty-state p { margin: 7px 0 0; color: var(--ink-soft); font-size: 12px; }
.footer { display: flex; justify-content: space-between; margin-top: 70px; padding-top: 24px; padding-bottom: 35px; border-top: 1px solid var(--line); color: #828c84; font-size: 11px; }
.footer p { margin: 0; }

.gate {
  display: grid;
  min-height: 100vh;
  padding: 32px;
  place-items: center;
  background:
    radial-gradient(circle at 14% 18%, rgba(105,224,180,.18), transparent 27%),
    radial-gradient(circle at 90% 75%, rgba(91,120,255,.16), transparent 30%),
    var(--ink);
}
.gate-card { width: min(590px, 100%); padding: 42px; border-radius: 30px; background: var(--card); box-shadow: 0 28px 90px rgba(0,0,0,.28); }
.gate-copy { margin-top: 54px; }
.gate-copy h1 { margin: 10px 0 12px; font-size: clamp(36px, 7vw, 56px); letter-spacing: -.06em; }
.gate-copy p { max-width: 470px; margin: 0; color: var(--ink-soft); line-height: 1.75; font-size: 14px; }
.login-form { margin-top: 36px; }
.login-form label { display: block; margin-bottom: 9px; font-size: 12px; font-weight: 800; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 9px; }
.login-form input { min-width: 0; height: 48px; padding: 0 15px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.form-error { min-height: 18px; margin: 8px 0 0; color: var(--danger); font-size: 11px; }
.privacy-note { display: flex; gap: 9px; align-items: center; margin: 25px 0 0; color: #838e86; font-size: 11px; }
.privacy-note span { width: 7px; height: 7px; border-radius: 50%; background: var(--mint-dark); }

.shared-page { min-height: 100vh; padding-bottom: 50px; background: var(--paper); }
.shared-header { display: flex; align-items: center; justify-content: space-between; height: 95px; }
.share-badge { padding: 7px 11px; border: 1px solid #bdc6bf; border-radius: 99px; color: var(--ink-soft); font-size: 11px; }
.shared-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: white; box-shadow: var(--shadow); }
.shared-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 31px; border-bottom: 1px solid var(--line); }
.shared-heading h1 { margin: 7px 0 8px; font-size: 28px; letter-spacing: -.035em; }
.shared-heading p { margin: 0; color: var(--ink-soft); font-size: 11px; }
.shared-actions { display: flex; flex-shrink: 0; gap: 8px; }
.shared-heading .shared-note { max-width: 620px; margin-top: 12px; padding: 9px 11px; border-left: 3px solid var(--mint-dark); background: #f2f7f3; color: #33453b; border-radius: 0 8px 8px 0; font-size: 12px; line-height: 1.55; }
#sharedText { min-height: 350px; max-height: 65vh; margin: 0; padding: 32px; overflow: auto; background: #fbfcf9; color: #263346; white-space: pre-wrap; overflow-wrap: anywhere; font: 13px/1.8 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.shared-footer { display: flex; justify-content: space-between; padding: 18px 31px; color: #818c83; font-size: 11px; }
.shared-footer a { color: var(--mint-dark); font-weight: 750; text-decoration: none; }
.share-locked, .share-missing { padding: 70px 42px; text-align: center; }
.lock-mark, .share-missing > span { display: grid; width: 58px; height: 58px; margin: 0 auto 20px; place-items: center; border-radius: 18px; background: var(--ink); color: var(--mint); font-size: 26px; }
.share-locked h1, .share-missing h1 { margin: 0; font-size: 28px; letter-spacing: -.04em; }
.share-locked > p, .share-missing p { max-width: 480px; margin: 12px auto 0; color: var(--ink-soft); font-size: 13px; line-height: 1.7; }
.unlock-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; max-width: 510px; margin: 28px auto 0; }
.unlock-form input, .space-form input { min-width: 0; height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.unlock-form input:focus, .space-form input:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 4px rgba(15,118,94,.09); }
.shared-file { display: flex; min-height: 230px; padding: 40px; align-items: center; justify-content: center; gap: 18px; background: #fbfcf9; }
.shared-file-type { display: grid; width: 62px; height: 62px; place-items: center; border-radius: 18px; background: #e9eeff; color: #4d61c5; font-size: 11px; font-weight: 900; }
.shared-file > div { min-width: 0; }
.shared-file strong { display: block; max-width: 520px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 16px; }
.shared-file small { display: block; margin-top: 7px; color: var(--ink-soft); font-size: 12px; }

.cli-dialog, .space-dialog, .version-dialog { width: min(680px, calc(100% - 32px)); padding: 28px; border: 0; border-radius: 24px; color: var(--ink); box-shadow: 0 28px 90px rgba(0,0,0,.25); }
.cli-dialog { width: min(760px, calc(100% - 32px)); max-height: min(88vh, 920px); overflow-y: auto; }
.space-dialog { width: min(520px, calc(100% - 32px)); }
.version-dialog { width: min(720px, calc(100% - 32px)); max-height: min(88vh, 900px); overflow-y: auto; }
.cli-dialog::backdrop, .space-dialog::backdrop, .version-dialog::backdrop { background: rgba(6,12,23,.66); backdrop-filter: blur(4px); }
.dialog-heading { display: flex; align-items: start; justify-content: space-between; }
.dialog-heading h2 { margin: 7px 0 0; font-size: 28px; letter-spacing: -.04em; }
.cli-dialog > p { margin: 15px 0 25px; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.cli-dialog code { padding: 2px 5px; border-radius: 5px; background: #e9ede8; }
.cli-tabs { display: flex; gap: 7px; margin-top: 22px; padding: 4px; border-radius: 12px; background: #edf0ec; }
.cli-tabs button { min-height: 37px; padding: 0 13px; flex: 1; border: 0; border-radius: 9px; background: transparent; color: #69746c; cursor: pointer; font-size: 11px; font-weight: 800; }
.cli-tabs button.active { background: white; color: var(--ink); box-shadow: 0 2px 8px rgba(11,19,36,.08); }
.cli-dialog > .cli-tip { margin: 12px 2px 20px; }
.space-dialog > p { margin: 15px 0 24px; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }
.space-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.space-form label { grid-column: 1 / -1; margin-left: 3px; font-size: 11px; font-weight: 800; }
.public-space-button { width: 100%; margin-top: 8px; padding: 12px; border: 0; background: transparent; color: var(--mint-dark); cursor: pointer; font-size: 11px; font-weight: 750; }
.version-summary { margin: 12px 0 20px; color: var(--ink-soft); font-size: 12px; }
.version-form { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) auto; gap: 8px; margin-bottom: 18px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: #f6f8f5; }
.version-file-picker { display: flex; min-width: 0; min-height: 46px; padding: 8px 12px; justify-content: center; flex-direction: column; border: 1px dashed #aab5ad; border-radius: 11px; background: white; cursor: pointer; }
.version-file-picker span { font-size: 11px; font-weight: 850; }
.version-file-picker small { margin-top: 3px; overflow: hidden; color: var(--ink-soft); text-overflow: ellipsis; white-space: nowrap; font-size: 10px; }
.version-form > input { min-width: 0; height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 11px; outline: none; background: white; }
.version-form > input:focus { border-color: var(--mint-dark); box-shadow: 0 0 0 4px rgba(15,118,94,.09); }
.version-progress { grid-column: 1 / -1; height: 4px; overflow: hidden; border-radius: 99px; background: #dfe5df; }
.version-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--mint-dark); transition: width .15s; }
.version-speed { grid-column: 1 / -1; justify-self: end; color: #657169; font: 10px ui-monospace, SFMono-Regular, Consolas, monospace; }
.version-list { display: grid; gap: 8px; }
.version-row { display: grid; grid-template-columns: 43px minmax(0, 1fr) auto; gap: 12px; min-height: 72px; padding: 12px; align-items: center; border: 1px solid var(--line); border-radius: 14px; background: white; }
.version-row.current { border-color: #aed6c3; background: #f7fbf8; }
.version-number { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 12px; background: #edf0ec; color: #617067; font-size: 11px; font-weight: 900; }
.version-row.current .version-number { background: var(--ink); color: var(--mint); }
.version-content { min-width: 0; }
.version-content > div { display: flex; align-items: center; gap: 8px; }
.version-content strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.version-content p { margin: 5px 0 0; overflow: hidden; color: #46544b; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.version-content small { display: block; margin-top: 5px; color: #7d887f; font-size: 10px; }
.version-current { flex-shrink: 0; padding: 3px 7px; border-radius: 99px; background: #ddf4e7; color: var(--mint-dark); font-size: 9px; font-weight: 850; }
.version-empty { padding: 35px 15px; text-align: center; color: var(--ink-soft); font-size: 12px; }
.command-group { position: relative; margin-top: 13px; }
.command-group label { display: block; margin: 0 0 6px 3px; color: var(--ink-soft); font-size: 10px; font-weight: 800; }
.command-group pre { min-height: 50px; margin: 0; padding: 15px 85px 15px 14px; overflow-x: auto; border-radius: 12px; background: var(--ink); color: #dbe5f0; font: 11px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-command { position: absolute; right: 8px; bottom: 8px; height: 34px; padding: 0 10px; border: 1px solid rgba(255,255,255,.14); border-radius: 8px; background: rgba(255,255,255,.08); color: white; cursor: pointer; font-size: 10px; }
.toast { position: fixed; z-index: 1000; left: 50%; bottom: 28px; max-width: calc(100% - 32px); padding: 12px 17px; transform: translate(-50%, 20px); border-radius: 11px; background: var(--ink); color: white; box-shadow: 0 14px 40px rgba(0,0,0,.22); font-size: 12px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  :root { --shell: min(100% - 32px, 720px); }
  .workspace { grid-template-columns: 1fr; }
  .capacity-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 4px; }
  .item-row { grid-template-columns: 46px minmax(0, 1fr) auto; }
}

@media (max-width: 600px) {
  :root { --shell: calc(100% - 24px); --radius-lg: 22px; }
  .shell-small { width: calc(100% - 24px); }
  .topbar { height: 68px; padding-inline: 12px; }
  .top-actions .ghost-button { display: none; }
  .space-button { max-width: 190px; padding-inline: 10px; }
  .space-button strong { max-width: 105px; }
  .space-button small { display: none; }
  .workspace { margin-top: 14px; }
  .panel { padding: 14px; }
  .upload-options { grid-template-columns: 1fr; }
  .upload-options.protection-only { display: block; }
  .protect-switch { width: 100%; }
  .drop-zone { min-height: 255px; padding: 24px 16px; }
  .drop-zone strong { font-size: 18px; }
  .drop-zone > span:not(.drop-icon) { font-size: 12px; }
  .drop-zone small { max-width: 210px; line-height: 1.5; }
  .drop-zone.has-files { min-height: 165px; }
  .upload-row { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 9px; }
  .upload-note { grid-column: 1 / -1; }
  .queue-item-actions { grid-column: 3; grid-row: 1; }
  .queue-footer { align-items: stretch; flex-direction: column; gap: 9px; padding: 12px; }
  .queue-footer > span { text-align: center; }
  .queue-footer .button { width: 100%; }
  .text-heading { gap: 8px; }
  .text-actions { align-items: stretch; flex-direction: column; }
  .text-actions .button { width: 100%; }
  .protect-switch.compact { padding: 5px 0; }
  .capacity-summary { gap: 18px; }
  .capacity-stat strong { font-size: 25px; }
  .recent { margin-top: 46px; }
  .section-heading h2 { font-size: 25px; }
  .item-row { grid-template-columns: 42px minmax(0, 1fr); gap: 11px; padding: 12px; }
  .item-type { width: 42px; height: 42px; }
  .item-actions { grid-column: 2; }
  .mini-button { flex: 1; }
  .footer { align-items: start; flex-direction: column; gap: 8px; margin-top: 50px; }
  .gate { padding: 12px; }
  .gate-card { padding: 27px 22px; border-radius: 23px; }
  .gate-copy { margin-top: 45px; }
  .password-row { grid-template-columns: 1fr; }
  .password-row .button { width: 100%; }
  .shared-header { height: 78px; }
  .shared-heading { align-items: stretch; flex-direction: column; padding: 23px; }
  .shared-actions { width: 100%; }
  .shared-heading .button { width: 100%; }
  .share-locked, .share-missing { padding: 50px 22px; }
  .unlock-form, .space-form { grid-template-columns: 1fr; }
  .unlock-form .button, .space-form .button { width: 100%; }
  #sharedText { min-height: 410px; padding: 22px; font-size: 12px; }
  .shared-file { min-height: 260px; padding: 28px 20px; align-items: center; flex-direction: column; text-align: center; }
  .shared-file strong { max-width: calc(100vw - 80px); }
  .shared-footer { padding: 16px 22px; }
  .cli-dialog, .space-dialog, .version-dialog { padding: 22px 16px; }
  .version-form { grid-template-columns: 1fr; }
  .version-form .button { width: 100%; }
  .version-row { grid-template-columns: 40px minmax(0, 1fr); gap: 10px; }
  .version-number { width: 40px; height: 40px; }
  .version-row > .mini-button { grid-column: 2; width: max-content; }
  .cli-tabs { flex-direction: column; }
  .command-group pre { padding-right: 70px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
