:root {
  --bg: #f4f6fb;
  --bg-elevated: rgba(255, 255, 255, 0.82);
  --surface: #ffffff;
  --surface-soft: #f7f8fc;
  --surface-hover: #f2f4fa;
  --text: #161a2b;
  --text-soft: #697087;
  --text-faint: #959cb0;
  --line: rgba(35, 42, 70, 0.09);
  --line-strong: rgba(35, 42, 70, 0.15);
  --accent: #6574f7;
  --accent-strong: #4e5fe8;
  --accent-soft: #eef0ff;
  --success: #35a777;
  --danger: #d95467;
  --danger-soft: #fff0f2;
  --shadow-sm: 0 8px 24px rgba(39, 45, 75, 0.06);
  --shadow-lg: 0 28px 80px rgba(39, 45, 75, 0.13);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --radius-xl: 34px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

:root[data-theme="dark"] {
  --bg: #0e1119;
  --bg-elevated: rgba(22, 26, 38, 0.86);
  --surface: #171b27;
  --surface-soft: #1d2230;
  --surface-hover: #222838;
  --text: #f3f5fb;
  --text-soft: #a2a9bd;
  --text-faint: #747c92;
  --line: rgba(227, 232, 255, 0.08);
  --line-strong: rgba(227, 232, 255, 0.14);
  --accent: #8c97ff;
  --accent-strong: #a7afff;
  --accent-soft: rgba(109, 123, 255, 0.14);
  --success: #5bc495;
  --danger: #ff8291;
  --danger-soft: rgba(217, 84, 103, 0.12);
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.18);
  --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.36);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1119;
    --bg-elevated: rgba(22, 26, 38, 0.86);
    --surface: #171b27;
    --surface-soft: #1d2230;
    --surface-hover: #222838;
    --text: #f3f5fb;
    --text-soft: #a2a9bd;
    --text-faint: #747c92;
    --line: rgba(227, 232, 255, 0.08);
    --line-strong: rgba(227, 232, 255, 0.14);
    --accent: #8c97ff;
    --accent-strong: #a7afff;
    --accent-soft: rgba(109, 123, 255, 0.14);
    --success: #5bc495;
    --danger: #ff8291;
    --danger-soft: rgba(217, 84, 103, 0.12);
    --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.18);
    --shadow-lg: 0 30px 90px rgba(0, 0, 0, 0.36);
  }
}

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

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: light;
  scroll-behavior: smooth;
}

:root[data-theme="dark"] {
  color-scheme: dark;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 8% 0%, rgba(114, 126, 255, 0.11), transparent 30rem),
    radial-gradient(circle at 96% 8%, rgba(138, 104, 240, 0.08), transparent 28rem),
    var(--bg);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

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

button:not(:disabled),
a {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

:focus-visible {
  outline: 3px solid rgba(101, 116, 247, 0.32);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent-strong);
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.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;
}

.is-hidden {
  display: none !important;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-lockup-centered {
  justify-content: center;
  width: 100%;
}

.brand-mark {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 15px;
  background: linear-gradient(145deg, #8792ff 0%, #5665ec 48%, #825ed7 100%);
  box-shadow: 0 10px 24px rgba(89, 101, 229, 0.25);
}

.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 999px;
}

.brand-mark::before {
  width: 21px;
  height: 12px;
  top: 12px;
  left: 9px;
}

.brand-mark::after {
  width: 12px;
  height: 12px;
  right: 8px;
  bottom: 8px;
  border-color: rgba(255, 255, 255, 0.56);
}

.brand-mark span {
  width: 8px;
  height: 8px;
  left: 9px;
  bottom: 8px;
  border-color: rgba(255, 255, 255, 0.66);
}

.brand-name,
.brand-caption {
  display: block;
  margin: 0;
  line-height: 1;
}

.brand-name {
  max-width: min(42vw, 260px);
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-caption {
  margin-top: 6px;
  color: var(--text-faint);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--success) 14%, transparent);
}

/* Login */

.login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  place-items: center;
  overflow: hidden;
  padding: 32px 20px;
}

.ambient {
  position: fixed;
  z-index: -1;
  width: 36rem;
  height: 36rem;
  border-radius: 50%;
  filter: blur(6px);
  opacity: 0.62;
  pointer-events: none;
}

.ambient-one {
  top: -22rem;
  left: -12rem;
  background: radial-gradient(circle, rgba(101, 116, 247, 0.2), transparent 67%);
}

.ambient-two {
  right: -15rem;
  bottom: -23rem;
  background: radial-gradient(circle, rgba(132, 93, 215, 0.17), transparent 68%);
}

.login-shell {
  width: min(100%, 450px);
}

.login-card {
  position: relative;
  padding: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(22px) saturate(140%);
}

.login-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  pointer-events: none;
}

.login-heading {
  margin: 44px 0 30px;
  text-align: center;
}

.login-heading h1 {
  margin: 0;
  font-size: clamp(30px, 8vw, 40px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.1;
}

.login-heading > p:last-child {
  max-width: 300px;
  margin: 14px auto 0;
  color: var(--text-soft);
  font-size: 14px;
}

.login-form label {
  display: block;
  margin: 0 0 9px 3px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 650;
}

.password-field {
  display: flex;
  align-items: center;
  min-height: 56px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.4) inset;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.password-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 64%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
  transform: translateY(-1px);
}

.password-field.has-error {
  border-color: color-mix(in srgb, var(--danger) 68%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--danger) 10%, transparent);
  animation: field-shake 240ms ease;
}

.password-field input {
  min-width: 0;
  flex: 1;
  height: 54px;
  padding: 0 8px 0 18px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 16px;
}

.password-field input::placeholder {
  color: var(--text-faint);
}

.text-button {
  border: 0;
  background: transparent;
}

.password-toggle {
  margin-right: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 700;
}

.password-toggle:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.caps-hint,
.form-error {
  min-height: 19px;
  margin: 8px 3px 0;
  font-size: 12px;
}

.caps-hint {
  color: var(--text-soft);
}

.form-error {
  color: var(--danger);
}

.primary-button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  background: linear-gradient(135deg, #6f7cf5, #5968e8 55%, #7357cb);
  box-shadow: 0 14px 30px rgba(83, 97, 220, 0.24);
  font-weight: 720;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-button:hover:not(:disabled) {
  box-shadow: 0 18px 36px rgba(83, 97, 220, 0.3);
  filter: saturate(108%);
  transform: translateY(-2px);
}

.primary-button:active:not(:disabled) {
  transform: translateY(0);
}

.login-submit {
  width: 100%;
  margin-top: 5px;
}

.button-arrow {
  margin-left: 9px;
  font-size: 19px;
  font-weight: 400;
  transition: transform 160ms ease;
}

.primary-button:hover .button-arrow {
  transform: translateX(3px);
}

.privacy-note {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 25px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 11px;
}

.privacy-note .status-dot {
  margin-top: 5px;
}

.login-footer {
  margin: 20px 0 0;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-align: center;
  text-transform: uppercase;
}

/* Drive */

.app-shell {
  width: min(100%, 1480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 34px;
}

.topbar {
  display: flex;
  min-height: 82px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-actions,
.toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.readonly-badge,
.item-count {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
}

.readonly-badge {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-elevated);
}

.icon-button,
.soft-button,
.view-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  background: var(--bg-elevated);
  transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.icon-button:hover,
.soft-button:hover,
.view-button:hover {
  border-color: var(--line-strong);
  background: var(--surface-hover);
}

.icon-button:active,
.soft-button:active,
.view-button:active {
  transform: scale(0.97);
}

.icon-button {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  font-size: 18px;
}

.soft-button {
  min-height: 40px;
  gap: 7px;
  padding: 0 15px;
  border-radius: 14px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 680;
}

.drive-main {
  padding: 28px 0 48px;
}

.hero-panel {
  position: relative;
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  overflow: hidden;
  padding: 42px 48px;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: var(--radius-xl);
  color: #fff;
  background:
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.18), transparent 18rem),
    linear-gradient(130deg, #4d5fde 0%, #6674ec 46%, #835fc6 100%);
  box-shadow: 0 24px 64px rgba(74, 87, 199, 0.2);
}

.hero-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -230px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 50%;
}

.hero-panel .eyebrow {
  color: rgba(255, 255, 255, 0.68);
}

.hero-panel h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 56px);
  font-weight: 760;
  letter-spacing: -0.055em;
  line-height: 1.03;
}

.hero-copy {
  max-width: 520px;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 15px;
}

.storage-orbit {
  position: relative;
  z-index: 1;
  display: grid;
  width: 132px;
  height: 132px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
}

.storage-orbit::before {
  content: "";
  position: absolute;
  inset: 17px;
  border: 1px dashed rgba(255, 255, 255, 0.2);
  border-radius: inherit;
}

.orbit-core {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 14px 30px rgba(25, 32, 105, 0.16);
  font-size: 22px;
  font-weight: 780;
  backdrop-filter: blur(10px);
}

.orbit-dot {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
}

.orbit-dot-one {
  top: 13px;
  right: 28px;
}

.orbit-dot-two {
  bottom: 20px;
  left: 16px;
}

.breadcrumb-bar {
  display: flex;
  min-height: 64px;
  align-items: center;
  gap: 7px;
  overflow-x: auto;
  padding: 12px 3px 6px;
  scrollbar-width: none;
}

.breadcrumb-bar::-webkit-scrollbar {
  display: none;
}

.breadcrumb-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 620;
}

.breadcrumb-item:last-child {
  color: var(--text);
}

.breadcrumb-link {
  padding: 7px 9px;
  border-radius: 10px;
}

.breadcrumb-link:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.breadcrumb-separator {
  color: var(--text-faint);
}

.content-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 12px 0 16px;
}

.search-field {
  display: flex;
  width: min(100%, 420px);
  min-height: 46px;
  align-items: center;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--bg-elevated);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.search-field:focus-within {
  border-color: color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 10%, transparent);
}

.search-symbol {
  color: var(--text-faint);
  font-size: 22px;
  transform: translateY(-1px);
}

.search-field input {
  min-width: 0;
  flex: 1;
  height: 44px;
  padding: 0 10px;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
}

.search-field input::placeholder {
  color: var(--text-faint);
}

.search-field kbd {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--line);
  border-bottom-color: var(--line-strong);
  border-radius: 8px;
  color: var(--text-faint);
  background: var(--surface-soft);
  font-family: var(--font);
  font-size: 11px;
}

.view-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--bg-elevated);
}

.view-button {
  width: 34px;
  height: 32px;
  border: 0;
  border-radius: 10px;
  color: var(--text-faint);
  background: transparent;
  font-size: 17px;
}

.view-button.is-active {
  color: var(--accent);
  background: var(--accent-soft);
}

.file-surface {
  min-height: 300px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
}

.surface-heading,
.file-item {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 110px 178px 42px;
  align-items: center;
  column-gap: 18px;
}

.surface-heading {
  min-height: 42px;
  padding: 0 17px;
  color: var(--text-faint);
  font-size: 10px;
  font-weight: 760;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.file-item {
  position: relative;
  min-height: 72px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  background: transparent;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}

.file-item:hover {
  z-index: 1;
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

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

.file-icon {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 14px;
  color: #5968dc;
  background: #eef0ff;
  font-size: 10px;
  font-weight: 820;
  letter-spacing: 0.03em;
}

:root[data-theme="dark"] .file-icon {
  color: #b4bbff;
  background: rgba(108, 120, 239, 0.15);
}

.file-icon.folder {
  color: #a16c1d;
  background: #fff5df;
}

:root[data-theme="dark"] .file-icon.folder {
  color: #f2bd65;
  background: rgba(222, 159, 57, 0.14);
}

.file-icon.image {
  color: #258e72;
  background: #e8f8f2;
}

.file-icon.video,
.file-icon.audio {
  color: #ba5874;
  background: #fff0f4;
}

.file-icon.archive {
  color: #8b65bd;
  background: #f6efff;
}

.file-icon.document {
  color: #3978c7;
  background: #eaf4ff;
}

.file-name-wrap {
  min-width: 0;
}

.file-name {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 670;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-kind {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta {
  color: var(--text-soft);
  font-size: 12px;
}

.file-open {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  color: var(--text-faint);
  font-size: 16px;
  transition: color 150ms ease, background 150ms ease;
}

.file-item:hover .file-open {
  color: var(--accent);
  background: var(--accent-soft);
}

.file-hitbox {
  position: absolute;
  z-index: 2;
  inset: 0;
  border-radius: inherit;
}

.file-list.is-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(205px, 1fr));
  gap: 10px;
}

.file-list.is-grid .file-item {
  display: flex;
  min-height: 178px;
  flex-direction: column;
  align-items: stretch;
  justify-content: space-between;
  padding: 18px;
  background: var(--surface-soft);
}

.file-list.is-grid .file-primary {
  flex-direction: column;
  align-items: flex-start;
  gap: 18px;
}

.file-list.is-grid .file-icon {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.file-list.is-grid .file-name-wrap {
  width: 100%;
}

.file-list.is-grid .file-name {
  white-space: normal;
  word-break: break-word;
}

.file-list.is-grid .file-size {
  margin-top: auto;
  padding-top: 14px;
}

.file-list.is-grid .file-date,
.file-list.is-grid .file-open {
  display: none;
}

.file-list.is-grid + .empty-state {
  grid-column: 1 / -1;
}

.empty-state,
.error-state {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

.empty-glyph {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: 19px;
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 24px;
  font-weight: 700;
}

.empty-state h2,
.error-state h2 {
  margin: 0;
  font-size: 17px;
  letter-spacing: -0.02em;
}

.empty-state p,
.error-state p {
  max-width: 380px;
  margin: 8px 0 0;
  color: var(--text-soft);
  font-size: 13px;
}

.error-state .soft-button {
  margin-top: 18px;
}

.skeleton-item {
  pointer-events: none;
}

.skeleton-block {
  position: relative;
  overflow: hidden;
  border-radius: 10px;
  background: var(--surface-soft);
}

.skeleton-block::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--text) 5%, transparent), transparent);
  transform: translateX(-100%);
  animation: shimmer 1.2s infinite;
}

.skeleton-icon {
  width: 44px;
  height: 44px;
}

.skeleton-name {
  width: min(70%, 280px);
  height: 14px;
}

.skeleton-meta {
  width: 68px;
  height: 11px;
}

.drive-footer {
  display: flex;
  min-height: 70px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 4px;
  border-top: 1px solid var(--line);
  color: var(--text-faint);
  font-size: 11px;
}

.toast {
  position: fixed;
  z-index: 20;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  color: var(--text);
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 180ms ease, transform 180ms ease;
  backdrop-filter: blur(18px);
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

@keyframes field-shake {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(-4px); }
  70% { transform: translateX(4px); }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 0 20px;
  }

  .hero-panel {
    min-height: 205px;
    padding: 34px 36px;
  }

  .surface-heading,
  .file-item {
    grid-template-columns: minmax(210px, 1fr) 90px 135px 38px;
    column-gap: 12px;
  }
}

@media (max-width: 700px) {
  .app-shell {
    padding: 0 14px;
  }

  .topbar {
    min-height: 72px;
  }

  .readonly-badge,
  .soft-button span:first-child,
  .brand-caption {
    display: none;
  }

  .soft-button {
    width: 40px;
    padding: 0;
  }

  .drive-main {
    padding-top: 18px;
  }

  .hero-panel {
    min-height: 180px;
    padding: 28px;
    border-radius: 26px;
  }

  .hero-panel h1 {
    font-size: 36px;
  }

  .hero-copy {
    margin-top: 12px;
    font-size: 13px;
  }

  .storage-orbit {
    display: none;
  }

  .content-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .search-field {
    width: 100%;
  }

  .toolbar-actions {
    justify-content: space-between;
  }

  .file-surface {
    padding: 7px;
    border-radius: 21px;
  }

  .surface-heading {
    display: none;
  }

  .file-item {
    min-height: 68px;
    grid-template-columns: minmax(0, 1fr) 32px;
    padding: 9px 10px;
  }

  .file-size,
  .file-date {
    display: none;
  }

  .file-icon {
    width: 42px;
    height: 42px;
  }

  .file-list.is-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .file-list.is-grid .file-item {
    min-height: 158px;
    padding: 14px;
  }

  .drive-footer {
    align-items: flex-start;
    flex-direction: column;
    justify-content: center;
    gap: 3px;
  }
}

@media (max-width: 460px) {
  .login-page {
    align-items: stretch;
    padding: 12px;
  }

  .login-shell {
    display: flex;
    min-height: calc(100dvh - 24px);
    flex-direction: column;
    justify-content: center;
  }

  .login-card {
    padding: 32px 24px;
    border-radius: 28px;
  }

  .login-heading {
    margin: 36px 0 26px;
  }

  .file-list.is-grid {
    grid-template-columns: 1fr;
  }
}

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