.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body.workspace-open {
  overflow: hidden;
}

body.workspace-open .beta-header,
body.workspace-open .scroll-shell {
  pointer-events: none;
}

body.workspace-open .beta-header {
  opacity: 0;
  transform: translateY(-18px);
}

body.workspace-open .scroll-shell {
  opacity: 0;
  filter: blur(14px) saturate(0.7);
  transform: scale(0.96);
}

.beta-header,
.scroll-shell {
  transition:
    opacity 360ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 440ms cubic-bezier(0.16, 1, 0.3, 1),
    filter 360ms cubic-bezier(0.16, 1, 0.3, 1);
}

.vault-workspace {
  --origin-top: 45%;
  --origin-right: 20%;
  --origin-bottom: 20%;
  --origin-left: 55%;
  position: fixed;
  z-index: 700;
  inset: 0;
  overflow: hidden;
  color: #eaf7fd;
  background:
    radial-gradient(circle at 75% 12%, rgba(98, 221, 255, 0.14), transparent 28%),
    radial-gradient(circle at 15% 78%, rgba(56, 124, 255, 0.1), transparent 32%),
    linear-gradient(145deg, #06111a 0%, #081722 48%, #071019 100%);
  clip-path: inset(
    var(--origin-top)
    var(--origin-right)
    var(--origin-bottom)
    var(--origin-left)
    round 18px
  );
  opacity: 0;
  transform: scale(0.985);
  transform-origin: center;
  transition:
    clip-path 480ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 260ms ease,
    transform 480ms cubic-bezier(0.16, 1, 0.3, 1);
}

.vault-workspace::before,
.vault-workspace::after {
  content: "";
  position: fixed;
  pointer-events: none;
}

.vault-workspace::before {
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(115, 190, 224, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(115, 190, 224, 0.055) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(circle at 60% 35%, #000, transparent 75%);
}

.vault-workspace::after {
  top: -25vh;
  right: -15vw;
  width: 55vw;
  height: 55vw;
  border: 1px solid rgba(98, 221, 255, 0.12);
  border-radius: 50%;
  box-shadow:
    0 0 0 80px rgba(98, 221, 255, 0.018),
    0 0 0 160px rgba(98, 221, 255, 0.012);
}

.vault-workspace.is-visible {
  clip-path: inset(0 round 0);
  opacity: 1;
  transform: scale(1);
}

.workspace-shell {
  position: relative;
  z-index: 1;
  height: 100%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.workspace-header {
  min-height: 148px;
  display: grid;
  grid-template-columns: minmax(180px, 0.7fr) minmax(320px, 1.6fr) minmax(260px, 0.9fr);
  align-items: center;
  gap: 32px;
  padding: 24px clamp(32px, 4vw, 72px);
  border-bottom: 1px solid rgba(142, 198, 226, 0.14);
  background: rgba(5, 16, 24, 0.7);
  backdrop-filter: blur(20px);
}

.workspace-back {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(98, 221, 255, 0.28);
  border-radius: 10px;
  background: rgba(12, 33, 46, 0.66);
  color: #e8f7fd;
  cursor: pointer;
  font: 600 11px/1 "Sora", sans-serif;
  letter-spacing: 0.035em;
  transition:
    transform 160ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 160ms ease,
    background 160ms ease;
}

.workspace-back:hover,
.workspace-back:focus-visible {
  transform: translateX(-3px);
  border-color: #62ddff;
  background: rgba(18, 49, 66, 0.88);
  outline: 2px solid rgba(98, 221, 255, 0.38);
  outline-offset: 3px;
}

.workspace-back svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: #62ddff;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.workspace-heading {
  min-width: 0;
}

.workspace-heading p {
  margin: 0;
}

.workspace-heading > p:first-child {
  color: #6edcff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.workspace-heading h2 {
  margin: 6px 0 7px;
  overflow: hidden;
  color: #f1fbff;
  font-size: clamp(25px, 2.5vw, 42px);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.055em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#workspaceDescription {
  max-width: 62ch;
  overflow: hidden;
  color: #83a2b4;
  font-size: 12px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-tools {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.workspace-search {
  min-width: 0;
  width: min(300px, 100%);
  height: 44px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid rgba(142, 198, 226, 0.18);
  border-radius: 10px;
  background: rgba(6, 21, 31, 0.72);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.workspace-search:focus-within {
  border-color: rgba(98, 221, 255, 0.72);
  box-shadow: 0 0 0 3px rgba(98, 221, 255, 0.11);
}

.workspace-search[hidden] {
  display: none;
}

.workspace-search svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: #6f98ad;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.workspace-search input {
  min-width: 0;
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: #eaf7fd;
  font: 500 11px/1 "Sora", sans-serif;
}

.workspace-search input::placeholder {
  color: #58778a;
}

.workspace-count {
  flex: none;
  min-width: 52px;
  padding: 7px 9px;
  border: 1px solid rgba(98, 221, 255, 0.2);
  border-radius: 999px;
  color: #79cfe8;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: center;
}

.workspace-count:empty {
  display: none;
}

.workspace-body {
  min-height: 0;
  overflow: auto;
  padding: 32px clamp(32px, 5vw, 88px) 64px;
  scroll-behavior: smooth;
  scrollbar-color: rgba(98, 221, 255, 0.38) rgba(6, 21, 31, 0.4);
  scrollbar-width: thin;
}

.workspace-body:focus {
  outline: none;
}

.workspace-body::-webkit-scrollbar {
  width: 9px;
}

.workspace-body::-webkit-scrollbar-thumb {
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(98, 221, 255, 0.35);
  background-clip: padding-box;
}

.workspace-body::-webkit-scrollbar-track {
  background: rgba(6, 21, 31, 0.35);
}

.workspace-empty,
.workspace-loading {
  min-height: 42vh;
  display: grid;
  place-items: center;
  color: #6f8fa2;
  font-size: 13px;
  text-align: center;
}

.workspace-loading::before {
  content: "";
  width: 78px;
  height: 2px;
  margin-right: 14px;
  background: linear-gradient(90deg, transparent, #62ddff, transparent);
  animation: workspace-scan 1.1s ease-in-out infinite;
}

@keyframes workspace-scan {
  0%, 100% { transform: scaleX(0.35); opacity: 0.35; }
  50% { transform: scaleX(1); opacity: 1; }
}

.workspace-grid {
  width: min(1500px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 16px;
}

.workspace-item {
  position: relative;
  min-width: 0;
  min-height: 270px;
  display: grid;
  grid-template-rows: 160px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid rgba(142, 198, 226, 0.16);
  border-radius: 16px;
  background:
    linear-gradient(160deg, rgba(18, 42, 56, 0.86), rgba(8, 22, 32, 0.94));
  color: inherit;
  cursor: pointer;
  text-align: left;
  text-decoration: none;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
  transition:
    transform 180ms cubic-bezier(0.16, 1, 0.3, 1),
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.workspace-item::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, transparent 55%, rgba(98, 221, 255, 0.06));
}

.workspace-item:hover,
.workspace-item:focus-visible {
  transform: translateY(-5px);
  border-color: rgba(98, 221, 255, 0.62);
  outline: none;
  box-shadow:
    0 24px 64px rgba(0, 0, 0, 0.32),
    0 0 0 3px rgba(98, 221, 255, 0.08);
}

.workspace-item img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  background: #07131c;
}

.workspace-item-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.workspace-item-kicker {
  margin-bottom: 7px;
  color: #60cbe9;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.workspace-item strong {
  overflow: hidden;
  color: #edfaff;
  font-size: 14px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-item p {
  display: -webkit-box;
  margin: 7px 0 0;
  overflow: hidden;
  color: #7695a7;
  font-size: 11px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.workspace-item-meta {
  display: flex;
  gap: 12px;
  margin-top: auto;
  padding-top: 12px;
  color: #557488;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-group {
  width: min(1500px, 100%);
  margin: 0 auto 32px;
}

.workspace-group-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  color: #8edff5;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.workspace-group-title::before {
  content: "";
  width: 22px;
  height: 1px;
  background: #62ddff;
  box-shadow: 0 0 10px rgba(98, 221, 255, 0.8);
}

.workspace-track-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.workspace-track {
  min-width: 0;
  min-height: 56px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  align-items: center;
  gap: 11px;
  padding: 0 14px;
  border: 1px solid rgba(142, 198, 226, 0.13);
  border-radius: 10px;
  background: rgba(9, 25, 36, 0.72);
  color: #dceef5;
  cursor: pointer;
  text-align: left;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.workspace-track:hover,
.workspace-track:focus-visible {
  transform: translateX(3px);
  border-color: rgba(98, 221, 255, 0.5);
  background: rgba(15, 40, 54, 0.88);
  outline: 2px solid rgba(98, 221, 255, 0.18);
  outline-offset: 2px;
}

.workspace-track-icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(98, 221, 255, 0.22);
  border-radius: 50%;
  color: #62ddff;
  font-size: 11px;
}

.workspace-track-copy {
  min-width: 0;
}

.workspace-track-copy strong,
.workspace-track-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-track-copy strong {
  font-size: 11px;
  font-weight: 500;
}

.workspace-track-copy span {
  margin-top: 3px;
  color: #5d7d91;
  font-size: 8px;
}

.workspace-track-arrow {
  color: #5dbcd5;
  font-size: 14px;
}

.workspace-file-list {
  width: min(1180px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(142, 198, 226, 0.15);
  border-radius: 16px;
  background: rgba(8, 23, 33, 0.72);
}

.workspace-file-group {
  padding: 11px 16px;
  border-top: 1px solid rgba(142, 198, 226, 0.12);
  border-bottom: 1px solid rgba(142, 198, 226, 0.12);
  background: rgba(13, 34, 47, 0.82);
  color: #6fd9f6;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.workspace-file-group:first-child {
  border-top: 0;
}

.workspace-file {
  min-height: 50px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(142, 198, 226, 0.08);
  color: #d6e9f1;
  text-decoration: none;
}

.workspace-file:last-child {
  border-bottom: 0;
}

.workspace-file:hover,
.workspace-file:focus-visible {
  background: rgba(98, 221, 255, 0.06);
  color: #62ddff;
  outline: none;
}

.workspace-file span:nth-child(2) {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-file small {
  color: #58778a;
  font-size: 8px;
}

.workspace-frame-wrap {
  width: min(1560px, 100%);
  height: 100%;
  min-height: 560px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(98, 221, 255, 0.2);
  border-radius: 18px;
  background: #071019;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.workspace-frame-wrap iframe {
  width: 100%;
  height: 100%;
  min-height: 560px;
  display: block;
  border: 0;
  background: #071019;
}

.workspace-support {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.workspace-support-panel,
.workspace-upload-panel {
  min-width: 0;
  padding: 32px;
  border: 1px solid rgba(142, 198, 226, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0%, rgba(98, 221, 255, 0.09), transparent 38%),
    rgba(9, 25, 36, 0.86);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.25);
}

.workspace-support-panel {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.workspace-panel-kicker {
  margin: 0 0 10px;
  color: #62ddff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.18em;
}

.workspace-support h3,
.workspace-upload-panel h3 {
  margin: 0;
  color: #f0fbff;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: -0.045em;
}

.workspace-support p,
.workspace-upload-panel p {
  margin: 12px 0 24px;
  color: #7594a6;
  font-size: 12px;
  line-height: 1.65;
}

.workspace-support-image {
  width: min(310px, 80%);
  max-height: 150px;
  margin: 0 auto 24px;
  object-fit: contain;
}

.workspace-primary,
.workspace-secondary {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  border-radius: 10px;
  cursor: pointer;
  font: 600 11px/1 "Sora", sans-serif;
  text-decoration: none;
}

.workspace-primary {
  border: 1px solid rgba(98, 221, 255, 0.52);
  background: linear-gradient(180deg, rgba(33, 116, 148, 0.9), rgba(22, 79, 103, 0.94));
  color: #f1fcff;
}

.workspace-secondary {
  border: 1px solid rgba(142, 198, 226, 0.2);
  background: rgba(10, 31, 44, 0.72);
  color: #b7d1dc;
}

.workspace-primary:hover,
.workspace-primary:focus-visible,
.workspace-secondary:hover,
.workspace-secondary:focus-visible {
  border-color: #62ddff;
  outline: 2px solid rgba(98, 221, 255, 0.22);
  outline-offset: 3px;
}

.workspace-primary:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.workspace-field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.workspace-field label {
  color: #8ba7b7;
  font-size: 10px;
  font-weight: 600;
}

.workspace-field input {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  border: 1px solid rgba(142, 198, 226, 0.18);
  border-radius: 10px;
  outline: 0;
  background: rgba(5, 17, 26, 0.86);
  color: #edfaff;
  font: 500 13px/1 "Sora", sans-serif;
}

.workspace-field input:focus {
  border-color: #62ddff;
  box-shadow: 0 0 0 3px rgba(98, 221, 255, 0.11);
}

.workspace-field input:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.workspace-note {
  min-height: 20px;
  margin-top: 12px;
  color: #6f8fa2;
  font-size: 10px;
  line-height: 1.5;
}

.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workspace-upload-panel {
  width: min(760px, 100%);
  margin: 0 auto;
}

.workspace-upload-drop {
  display: grid;
  place-items: center;
  min-height: 190px;
  margin: 22px 0;
  padding: 24px;
  border: 1px dashed rgba(98, 221, 255, 0.34);
  border-radius: 14px;
  background: rgba(5, 17, 26, 0.46);
  text-align: center;
}

.workspace-upload-drop input {
  width: min(420px, 100%);
  color: #91acbb;
  font: 500 11px/1.5 "Sora", sans-serif;
}

.workspace-upload-status {
  min-height: 24px;
  margin-top: 14px;
  color: #7ebdd1;
  font-size: 11px;
}

.workspace-upload-status.error {
  color: #ff9d9d;
}

.workspace-viewer .workspace-body {
  padding-top: 20px;
}

@media (max-width: 900px) {
  .vault-workspace {
    clip-path: inset(
      var(--origin-top)
      var(--origin-right)
      var(--origin-bottom)
      var(--origin-left)
      round 14px
    );
  }

  .workspace-header {
    min-height: 132px;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px 18px;
    padding: max(16px, env(safe-area-inset-top)) 18px 16px;
  }

  .workspace-back {
    grid-row: 1;
    grid-column: 1;
    width: 44px;
    padding: 0;
    justify-content: center;
  }

  .workspace-back span {
    display: none;
  }

  .workspace-heading {
    grid-row: 1;
    grid-column: 2;
  }

  .workspace-heading h2 {
    font-size: 24px;
  }

  #workspaceDescription {
    display: none;
  }

  .workspace-tools {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .workspace-search {
    width: 100%;
  }

  .workspace-body {
    padding: 20px 14px calc(48px + env(safe-area-inset-bottom));
  }

  .workspace-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .workspace-item {
    min-height: 216px;
    grid-template-rows: 116px minmax(0, 1fr);
    border-radius: 13px;
  }

  .workspace-item img {
    height: 116px;
  }

  .workspace-item-copy {
    padding: 12px;
  }

  .workspace-item p {
    -webkit-line-clamp: 2;
  }

  .workspace-item-meta {
    display: none;
  }

  .workspace-track-grid,
  .workspace-support {
    grid-template-columns: 1fr;
  }

  .workspace-track {
    min-height: 60px;
  }

  .workspace-frame-wrap,
  .workspace-frame-wrap iframe {
    min-height: calc(100svh - 190px);
    height: calc(100svh - 190px);
  }

  .workspace-support-panel,
  .workspace-upload-panel {
    padding: 24px;
  }

  .workspace-support-panel {
    min-height: 320px;
  }
}

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

  .workspace-item {
    min-height: 230px;
    grid-template-rows: 130px minmax(0, 1fr);
  }

  .workspace-item img {
    height: 130px;
  }

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

@media (prefers-reduced-motion: reduce) {
  .vault-workspace,
  .beta-header,
  .scroll-shell,
  .workspace-item,
  .workspace-track {
    transition-duration: 1ms !important;
    animation-duration: 1ms !important;
  }
}
