/* =========================================================
   云屉 CLOUD DRAWER
   A quiet, paper-and-ink interface for private files.
   ========================================================= */

:root {
  --paper: #f3efe4;
  --paper-deep: #eae4d4;
  --paper-soft: #f7f3e9;
  --card: #fbf8f0;
  --ink: #1d2a24;
  --ink-soft: #55635a;
  --ink-faint: #8b948a;
  --forest: #16382d;
  --forest-light: #1f4a3b;
  --line: #d9d2c2;
  --line-strong: #c7bea9;
  --red: #b54a32;
  --red-deep: #933724;
  --lime: #d9e4b8;
  --cream: #f2ecdd;

  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", "STSong", "SimSun", Georgia, serif;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", "JetBrains Mono", Consolas, "Liberation Mono", monospace;

  --radius-lg: 22px;
  --radius-md: 14px;
  --shadow-card: 0 20px 60px -42px rgba(29, 42, 36, 0.5);
  --shadow-float: 0 40px 100px -35px rgba(16, 32, 26, 0.5);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  min-width: 320px;
  min-height: 100svh;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1100px 600px at 88% -12%, rgba(255, 255, 255, 0.62), transparent 62%),
    radial-gradient(900px 520px at -8% 104%, rgba(199, 190, 169, 0.22), transparent 62%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.22'/%3E%3C/svg%3E");
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--lime);
  color: var(--forest);
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

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

h1,
h2,
h3,
p {
  margin: 0;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

/* =========================================================
   Shared bits
   ========================================================= */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  line-height: 1.4;
}

.eyebrow > span:first-child {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: var(--red);
}

.eyebrow--light {
  color: rgba(242, 236, 221, 0.48);
}

.eyebrow--light > span:first-child {
  background: var(--lime);
}

.seal {
  position: relative;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: none;
  color: var(--cream);
  background: var(--red);
  border-radius: 7px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 700;
  line-height: 1;
  transform: rotate(-3deg);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 230, 0.28), 0 5px 14px -8px rgba(147, 55, 36, 0.8);
}

.seal::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(255, 244, 230, 0.32);
  border-radius: 3px;
  pointer-events: none;
}

.seal--small {
  width: 36px;
  height: 36px;
  font-size: 19px;
  border-radius: 6px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
}

.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1;
}

.brand__text strong {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.brand__text small {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.26em;
  color: var(--ink-faint);
}

.brand--light {
  color: var(--cream);
}

.brand--light .brand__text small {
  color: rgba(242, 236, 221, 0.42);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease),
    transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled {
  opacity: 0.62;
  cursor: wait;
  transform: none;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn--primary {
  color: var(--cream);
  background: var(--forest);
  box-shadow: 0 14px 30px -18px rgba(22, 56, 45, 0.8);
}

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

.btn--login {
  justify-content: space-between;
  width: 100%;
  height: 56px;
  margin-top: 26px;
  padding: 0 22px;
  font-size: 14.5px;
  border-radius: 12px;
}

.btn--login .icon {
  transition: transform 0.25s var(--ease);
}

.btn--login:hover .icon {
  transform: translateX(4px);
}

.btn--login.is-loading .icon {
  display: none;
}

.btn--login.is-loading::after {
  content: "";
  width: 16px;
  height: 16px;
  border: 1.6px solid rgba(242, 236, 221, 0.35);
  border-top-color: var(--cream);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.btn--light {
  color: var(--forest);
  background: var(--cream);
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.6);
}

.btn--light:hover {
  background: #fffdf6;
}

.btn--light .icon {
  transition: transform 0.25s var(--ease);
}

.btn--light:hover .icon {
  transform: translateX(3px);
}

.btn--ghost-light {
  color: var(--cream);
  background: rgba(242, 236, 221, 0.07);
  border-color: rgba(242, 236, 221, 0.3);
}

.btn--ghost-light:hover {
  background: rgba(242, 236, 221, 0.14);
  border-color: rgba(242, 236, 221, 0.5);
}

.btn--ghost-light .icon {
  width: 16px;
  height: 16px;
  opacity: 0.85;
}

.text-btn {
  padding: 6px 2px;
  color: var(--ink-soft);
  background: none;
  border: 0;
  font-size: 12.5px;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}

.text-btn:hover {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.btn--outline {
  color: var(--ink);
  background: transparent;
  border-color: var(--line-strong);
}

.btn--outline:hover {
  background: var(--paper-soft);
  border-color: var(--ink-soft);
}

.btn--quiet {
  color: var(--ink-soft);
  background: transparent;
}

.btn--quiet:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.btn--danger {
  color: #fff8f4;
  background: var(--red);
}

.btn--danger:hover {
  background: var(--red-deep);
}

.btn--compact {
  min-height: 38px;
  padding: 0 14px;
  font-size: 12.5px;
}

/* =========================================================
   Login
   ========================================================= */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100svh;
}

.auth__brand {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: clamp(30px, 4.2vw, 58px) clamp(30px, 5vw, 76px) clamp(24px, 3.4vw, 44px);
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(900px 520px at 105% -8%, rgba(105, 146, 117, 0.26), transparent 62%),
    radial-gradient(700px 500px at -18% 105%, rgba(8, 25, 20, 0.65), transparent 65%),
    var(--forest);
}

.auth__brand::before {
  content: "";
  position: absolute;
  width: 620px;
  height: 620px;
  right: -260px;
  top: 12%;
  border: 1px solid rgba(242, 236, 221, 0.09);
  border-radius: 50%;
  box-shadow:
    0 0 0 70px rgba(242, 236, 221, 0.022),
    0 0 0 140px rgba(242, 236, 221, 0.016);
  pointer-events: none;
}

.auth__brand::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.3'/%3E%3C/svg%3E");
  opacity: 0.16;
  mix-blend-mode: overlay;
  pointer-events: none;
}

.auth__brand > * {
  position: relative;
  z-index: 1;
}

.auth__statement {
  margin-top: clamp(56px, 11vh, 124px);
  max-width: 660px;
}

.auth__statement h1 {
  margin: 20px 0 24px;
  font-family: var(--serif);
  font-size: clamp(44px, 4.9vw, 74px);
  font-weight: 600;
  line-height: 1.17;
  letter-spacing: 0.015em;
  text-wrap: balance;
}

.auth__statement .accent {
  color: var(--lime);
  position: relative;
}

.auth__statement .accent::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 1px;
  background: linear-gradient(90deg, rgba(217, 228, 184, 0.65), rgba(217, 228, 184, 0));
}

.auth__lede {
  max-width: 390px;
  color: rgba(242, 236, 221, 0.58);
  font-size: 13.5px;
  line-height: 1.95;
  letter-spacing: 0.02em;
}

/* Drawer illustration */
.drawers {
  position: relative;
  width: min(100%, 480px);
  height: clamp(168px, 23vh, 238px);
  margin-top: auto;
  margin-bottom: clamp(14px, 2.5vh, 32px);
  align-self: flex-end;
}

.drawer {
  position: absolute;
  right: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  height: 76px;
  padding: 17px 22px;
  border: 1px solid rgba(242, 236, 221, 0.14);
  border-radius: 10px;
  color: rgba(242, 236, 221, 0.42);
  background: linear-gradient(180deg, #1d4638, #183c30);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.22em;
  box-shadow: 0 26px 50px -36px rgba(0, 0, 0, 0.9);
  transition: transform 0.5s var(--ease);
}

.drawer--back {
  bottom: calc(100% - 96px);
  width: 78%;
  opacity: 0.55;
  transform: translateX(-34px) rotate(-2.2deg);
}

.drawer--mid {
  bottom: 74px;
  width: 86%;
  opacity: 0.8;
  transform: translateX(-13px) rotate(-1deg);
}

.drawer--front {
  bottom: 0;
  width: 94%;
  color: rgba(29, 42, 36, 0.52);
  background: linear-gradient(180deg, #f1ecdd, #e3dbc7);
  border-color: rgba(29, 42, 36, 0.16);
  transform: rotate(0.7deg);
  box-shadow: 0 34px 60px -30px rgba(0, 0, 0, 0.6);
}

.drawers:hover .drawer--back {
  transform: translateX(-26px) translateY(-3px) rotate(-2.2deg);
}

.drawers:hover .drawer--mid {
  transform: translateX(-6px) translateY(-2px) rotate(-1deg);
}

.drawers:hover .drawer--front {
  transform: translateY(3px) rotate(0.7deg);
}

.drawer__handle {
  position: absolute;
  left: 50%;
  bottom: 17px;
  width: 88px;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(180deg, #b99a66, #8f7548);
  transform: translateX(-50%);
  box-shadow: 0 2px 4px rgba(60, 45, 20, 0.25);
}

.drawer__chop {
  position: absolute;
  top: 12px;
  right: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #a5442d;
  border: 1px solid rgba(165, 68, 45, 0.45);
  border-radius: 4px;
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1;
  transform: rotate(7deg);
  opacity: 0.85;
}

.auth__brand-foot {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding-top: 18px;
  border-top: 1px solid rgba(242, 236, 221, 0.12);
  color: rgba(242, 236, 221, 0.3);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.18em;
}

.auth__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: 64px clamp(24px, 4.5vw, 72px) 92px;
  overflow: hidden;
}

.auth__panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(199, 190, 169, 0.5);
}

.watermark {
  position: absolute;
  top: -84px;
  right: -26px;
  color: rgba(22, 56, 45, 0.035);
  font-family: var(--serif);
  font-size: 340px;
  line-height: 1;
  user-select: none;
  pointer-events: none;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 12px;
  position: absolute;
  top: 26px;
  left: 26px;
}

.login-form {
  position: relative;
  z-index: 2;
  width: min(100%, 386px);
  animation: rise 0.7s var(--ease) both;
}

.auth.is-booting .login-form {
  opacity: 0;
  animation: none;
  pointer-events: none;
}

.no-scroll {
  overflow: hidden;
}

.lock-badge {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-bottom: 28px;
  color: var(--forest);
  background: rgba(251, 248, 240, 0.72);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  box-shadow: 0 12px 26px -22px rgba(29, 42, 36, 0.6);
}

.lock-badge .icon {
  width: 23px;
  height: 23px;
}

.login-form h2 {
  margin: 12px 0 8px;
  font-family: var(--serif);
  font-size: clamp(30px, 3vw, 38px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.login-form__sub {
  color: var(--ink-soft);
  font-size: 13px;
  letter-spacing: 0.02em;
}

.field-label {
  display: block;
  margin: 38px 0 9px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.field {
  position: relative;
}

.field input {
  width: 100%;
  height: 56px;
  padding: 0 52px 0 17px;
  color: var(--ink);
  background: rgba(255, 252, 245, 0.82);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 15px;
  letter-spacing: 0.06em;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

.field input::placeholder {
  color: #aaa598;
  letter-spacing: 0.03em;
}

.field input:focus {
  outline: none;
  background: #fffdf7;
  border-color: var(--forest);
  box-shadow: 0 0 0 4px rgba(22, 56, 45, 0.08);
}

.field__toggle {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.field__toggle:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.field__toggle .icon {
  width: 18px;
  height: 18px;
}

.field__toggle .icon--eye-off {
  display: none;
}

.field.is-visible .icon--eye {
  display: none;
}

.field.is-visible .icon--eye-off {
  display: block;
}

.caps-hint {
  margin-top: 8px;
  color: #8a6a1f;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.form-error {
  margin-top: 13px;
  padding: 10px 12px;
  color: var(--red-deep);
  background: rgba(181, 74, 50, 0.075);
  border-left: 2px solid var(--red);
  border-radius: 0 6px 6px 0;
  font-size: 12.5px;
  line-height: 1.6;
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.login-meta i {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--line-strong);
}

.auth__panel-foot {
  position: absolute;
  bottom: 28px;
  left: 0;
  right: 0;
  text-align: center;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.16em;
}

/* Login shake */
.login-form.is-error {
  animation: shake 0.42s var(--ease);
}

/* =========================================================
   App shell
   ========================================================= */

.app {
  min-height: 100svh;
  animation: fade 0.45s var(--ease) both;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(243, 239, 228, 0.82);
  border-bottom: 1px solid rgba(199, 190, 169, 0.45);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1180px;
  height: 78px;
  margin: 0 auto;
  padding: 0 32px;
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 13px;
  color: var(--ink-soft);
  background: rgba(251, 248, 240, 0.66);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.13em;
}

.session-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5b8a61;
  box-shadow: 0 0 0 3px rgba(91, 138, 97, 0.12);
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 10px;
  color: var(--ink-soft);
  background: transparent;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  transition: color 0.2s, background 0.2s;
}

.ghost-btn .icon {
  width: 16px;
  height: 16px;
}

.ghost-btn:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(38px, 6vw, 64px) 32px 36px;
}

.hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-bottom: clamp(30px, 4vw, 44px);
  animation: rise 0.6s var(--ease) both;
}

.hero h1 {
  margin: 15px 0 0;
  font-family: var(--serif);
  font-size: clamp(48px, 6.2vw, 76px);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
}

.hero__seal {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-left: 14px;
  color: var(--cream);
  background: var(--red);
  border-radius: 5px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  line-height: 1;
  vertical-align: 0.55em;
  transform: rotate(6deg);
  box-shadow: inset 0 0 0 1px rgba(255, 244, 230, 0.24);
}

.hero__sub {
  max-width: 520px;
  margin-top: 16px;
  color: var(--ink-soft);
  font-size: 13.5px;
  letter-spacing: 0.02em;
  line-height: 1.8;
}

.hero__metrics {
  display: flex;
  align-items: center;
  gap: clamp(20px, 3vw, 34px);
  padding-bottom: 6px;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric > span {
  font-family: var(--serif);
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.metric small {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.14em;
}

.metric__rule {
  width: 1px;
  height: 44px;
  background: var(--line);
}

/* =========================================================
   Upload card
   ========================================================= */

.upload-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 27px 30px;
  overflow: hidden;
  color: var(--cream);
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(108, 150, 121, 0.22), transparent 62%),
    var(--forest);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 60px -46px rgba(16, 40, 31, 0.9);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s var(--ease);
  animation: rise 0.6s 0.06s var(--ease) both;
}

.upload-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed rgba(242, 236, 221, 0.17);
  border-radius: 16px;
  pointer-events: none;
  transition: border-color 0.25s;
}

.upload-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 38px 70px -42px rgba(16, 40, 31, 0.95);
}

.upload-card:hover::before {
  border-color: rgba(217, 228, 184, 0.4);
}

.upload-card.is-dragover {
  background:
    radial-gradient(700px 300px at 100% 0%, rgba(147, 189, 154, 0.3), transparent 62%),
    var(--forest-light);
  transform: translateY(-2px) scale(1.003);
}

.upload-card.is-dragover::before {
  border-color: var(--lime);
  border-width: 2px;
}

.upload-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  flex: none;
  color: var(--lime);
  background: rgba(242, 236, 221, 0.06);
  border: 1px solid rgba(242, 236, 221, 0.2);
  border-radius: 50%;
}

.upload-card__icon .icon {
  width: 23px;
  height: 23px;
  stroke-width: 1.5;
}

.upload-card__text {
  min-width: 0;
  flex: 1;
}

.upload-card__text h2 {
  font-family: var(--serif);
  font-size: clamp(21px, 2.3vw, 27px);
  font-weight: 600;
  letter-spacing: 0.03em;
  line-height: 1.3;
}

.upload-card__text p {
  margin-top: 5px;
  color: rgba(242, 236, 221, 0.55);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.upload-card__text p span {
  color: rgba(242, 236, 221, 0.9);
  border-bottom: 1px dotted rgba(242, 236, 221, 0.5);
}

.upload-card__actions {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}

.upload-card__ring {
  position: absolute;
  right: -86px;
  bottom: -156px;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(242, 236, 221, 0.07);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(242, 236, 221, 0.022);
  pointer-events: none;
}

/* Upload queue */
.upload-queue {
  display: grid;
  gap: 8px;
  max-height: min(300px, 40vh);
  margin-top: 14px;
  padding-right: 2px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.upload-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 5px 18px;
  padding: 12px 16px 13px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-card);
  animation: rise 0.3s var(--ease) both;
}

.upload-item__name {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 12.5px;
  font-weight: 600;
}

.upload-item__name .icon {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
}

.upload-item__name span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.upload-item__pct {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.upload-item__track {
  grid-column: 1 / -1;
  height: 3px;
  overflow: hidden;
  background: var(--paper-deep);
  border-radius: 99px;
}

.upload-item__bar {
  width: 0;
  height: 100%;
  background: var(--forest);
  border-radius: inherit;
  transition: width 0.18s ease-out;
}

.upload-item.is-error .upload-item__pct {
  color: var(--red-deep);
}

.upload-item.is-error .upload-item__bar {
  background: var(--red);
}

.upload-item.is-done .upload-item__bar {
  background: #5b8a61;
}

.upload-item.is-done .upload-item__pct {
  color: #4b7550;
}

/* =========================================================
   Library
   ========================================================= */

.library {
  margin-top: clamp(42px, 5.5vw, 62px);
  animation: rise 0.6s 0.12s var(--ease) both;
}

.library__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.library__title h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 32px);
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.3;
}

.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 23px;
  padding: 0 9px;
  color: var(--ink-soft);
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-bottom: 3px;
}

.search {
  position: relative;
  display: block;
}

.search .icon {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.search input {
  width: 238px;
  height: 42px;
  padding: 0 14px 0 38px;
  color: var(--ink);
  background: rgba(251, 248, 240, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.search input::placeholder {
  color: #a5a094;
}

.search input:focus {
  outline: none;
  background: var(--card);
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(22, 56, 45, 0.07);
}

.search input::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  background:
    linear-gradient(45deg, transparent 45%, var(--ink-faint) 45%, var(--ink-faint) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--ink-faint) 45%, var(--ink-faint) 55%, transparent 55%);
  cursor: pointer;
}

.sort {
  position: relative;
}

.sort select {
  height: 42px;
  padding: 0 38px 0 14px;
  color: var(--ink-soft);
  background: rgba(251, 248, 240, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 12.5px;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.sort select:hover {
  background: var(--card);
  border-color: var(--line-strong);
}

.sort select:focus {
  outline: none;
  border-color: var(--forest);
  box-shadow: 0 0 0 3px rgba(22, 56, 45, 0.07);
}

.sort .icon {
  position: absolute;
  top: 50%;
  right: 12px;
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
  transform: translateY(-50%);
  pointer-events: none;
}

.file-list {
  margin-top: 18px;
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow-card);
}

.file-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  border-top: 1px solid rgba(217, 210, 194, 0.62);
  transition: background 0.18s var(--ease);
  animation: rowIn 0.35s var(--ease) both;
}

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

.file-row:hover {
  background: #f7f2e6;
}

/* Folder groups */

.folder-group {
  border-top: 1px solid rgba(217, 210, 194, 0.72);
}

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

.folder-head {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #f7f2e7;
  border-bottom: 1px solid rgba(217, 210, 194, 0.6);
}

.folder-toggle {
  display: flex;
  align-items: center;
  gap: 13px;
  flex: 1;
  min-width: 0;
  padding: 11px 6px 11px 20px;
  color: var(--ink);
  background: transparent;
  border: 0;
  text-align: left;
  transition: background 0.18s var(--ease);
}

.folder-toggle:hover {
  background: #f2ecdd;
}

.folder-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex: none;
  color: #715a2f;
  background: #ede3cf;
  border: 1px solid #dfd1b6;
  border-radius: 9px;
}

.folder-ico .icon {
  width: 18px;
  height: 18px;
  stroke-width: 1.55;
}

.folder-group--root .folder-ico {
  color: var(--ink-soft);
  background: #ebe7dd;
  border-color: #dcd5c7;
}

.folder-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.folder-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.4;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.folder-meta {
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8.8px;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.folder-chevron {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--ink-faint);
}

.folder-chevron .icon {
  width: 15px;
  height: 15px;
  transition: transform 0.22s var(--ease);
}

.folder-group.is-collapsed .folder-chevron .icon {
  transform: rotate(-90deg);
}

.folder-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  padding-right: 14px;
  flex: none;
}

.folder-zip {
  width: 32px;
  height: 32px;
  color: var(--ink-soft);
  opacity: 0.72;
}

.folder-zip:hover {
  color: var(--cream);
  background: var(--forest);
  border-color: var(--forest);
  opacity: 1;
}

.folder-body .file-row {
  padding-left: 34px;
}

.folder-body .file-row:first-child {
  border-top: 0;
}

.folder-body .ftype {
  width: 40px;
  height: 40px;
  font-size: 8.5px;
}

.folder-group.is-collapsed .folder-body {
  display: none;
}

.file-meta .file-subdir {
  color: #708070;
  font-weight: 600;
}

.ftype {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1;
}

.ftype--pdf {
  color: #963b26;
  background: #f2ded7;
  border-color: #e7c9bf;
}

.ftype--image {
  color: #4c6241;
  background: #e4ebd9;
  border-color: #d2ddc3;
}

.ftype--doc {
  color: #3d566e;
  background: #e1e8ef;
  border-color: #ccd8e3;
}

.ftype--sheet {
  color: #3f674b;
  background: #dfeae1;
  border-color: #c9dbc9;
}

.ftype--archive {
  color: #7b5925;
  background: #efe4cf;
  border-color: #e0d0b2;
}

.ftype--video {
  color: #644e6d;
  background: #e7e0eb;
  border-color: #d6cadd;
}

.ftype--audio {
  color: #875333;
  background: #f1e2d7;
  border-color: #e3cdbd;
}

.ftype--code {
  color: #5b5e52;
  background: #e8e7e0;
  border-color: #d8d6cc;
}

.ftype--text {
  color: #41625e;
  background: #e2e9e7;
  border-color: #cfdbd8;
}

.ftype--other {
  color: #6c675b;
  background: #ebe7dd;
  border-color: #dcd5c7;
}

.file-main {
  min-width: 0;
}

.file-name {
  overflow: hidden;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  line-height: 1.45;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.file-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.05em;
  line-height: 1.4;
}

.file-meta i {
  width: 2px;
  height: 2px;
  flex: none;
  border-radius: 50%;
  background: var(--line-strong);
}

.file-meta span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.file-actions {
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.5;
  transition: opacity 0.18s var(--ease), transform 0.18s var(--ease);
}

.file-row:hover .file-actions,
.file-row:focus-within .file-actions {
  opacity: 1;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  color: var(--ink-soft);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: color 0.18s, background 0.18s, border-color 0.18s;
}

.icon-btn .icon {
  width: 16px;
  height: 16px;
}

.icon-btn:hover {
  color: var(--ink);
  background: var(--paper-deep);
  border-color: var(--line);
}

.icon-btn--download:hover {
  color: var(--cream);
  background: var(--forest);
  border-color: var(--forest);
}

.icon-btn--delete:hover {
  color: var(--red-deep);
  background: #f5e2dc;
  border-color: #e6c9c0;
}

/* Empty / loading states */
.state-block {
  margin-top: 18px;
  padding: 62px 24px 58px;
  text-align: center;
  background: var(--card);
  border: 1px dashed var(--line-strong);
  border-radius: 18px;
  animation: fade 0.4s var(--ease) both;
}

.empty-illustration {
  display: grid;
  place-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  color: var(--ink-soft);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: 0 12px 24px -20px rgba(29, 42, 36, 0.5);
}

.empty-illustration .icon {
  width: 28px;
  height: 28px;
  stroke-width: 1.4;
}

.empty-illustration--small {
  width: 56px;
  height: 56px;
  margin-bottom: 17px;
}

.empty-illustration--small .icon {
  width: 22px;
  height: 22px;
}

.state-block h3 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.state-block p {
  margin: 7px 0 0;
  color: var(--ink-soft);
  font-size: 12.5px;
}

.state-block .btn {
  margin-top: 22px;
  min-height: 38px;
  padding: 0 16px;
  font-size: 12.5px;
}

.state-block__actions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 22px;
}

.state-block__actions .btn {
  margin-top: 0;
}

.state-block__actions .text-btn {
  font-size: 12px;
}

.state-block--loading {
  display: grid;
  gap: 0;
  padding: 6px 20px;
  border-style: solid;
}

.skeleton-row {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 72px;
  border-top: 1px solid rgba(217, 210, 194, 0.55);
}

.skeleton-row:first-child {
  border-top: 0;
}

.skeleton-row i,
.skeleton-row span,
.skeleton-row b {
  display: block;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--paper-deep) 25%, var(--paper-soft) 50%, var(--paper-deep) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite linear;
}

.skeleton-row i {
  width: 44px;
  height: 44px;
  border-radius: 11px;
}

.skeleton-row span {
  width: min(42%, 300px);
  height: 13px;
}

.skeleton-row b {
  width: 66px;
  height: 10px;
  margin-left: auto;
}

/* =========================================================
   Footer
   ========================================================= */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: clamp(40px, 5vw, 58px);
  padding-top: 20px;
  border-top: 1px solid rgba(199, 190, 169, 0.55);
  color: var(--ink-faint);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.13em;
  line-height: 1.7;
}

/* =========================================================
   Modals
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 26, 0.48);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  animation: fade 0.2s ease both;
}

.modal__dialog {
  position: relative;
  z-index: 1;
  width: min(440px, 100%);
  padding: 30px;
  background: var(--card);
  border: 1px solid rgba(199, 190, 169, 0.7);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  animation: dialogIn 0.28s var(--ease) both;
}

.modal__x {
  position: absolute;
  top: 15px;
  right: 15px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--ink-faint);
  background: transparent;
  border: 0;
  border-radius: 8px;
  transition: color 0.2s, background 0.2s;
}

.modal__x:hover {
  color: var(--ink);
  background: var(--paper-deep);
}

.modal__x .icon {
  width: 17px;
  height: 17px;
}

.modal__badge {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 18px;
  border-radius: 50%;
}

.modal__badge--danger {
  color: var(--red-deep);
  background: #f5e2dc;
  border: 1px solid #e8ccc3;
}

.modal__badge .icon {
  width: 20px;
  height: 20px;
}

.modal__dialog h3 {
  padding-right: 30px;
  font-family: var(--serif);
  font-size: 23px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.modal__file-name {
  margin-top: 12px;
  padding: 9px 12px;
  overflow: hidden;
  color: var(--ink);
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: var(--mono);
  font-size: 10.5px;
  line-height: 1.6;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.modal__hint {
  margin-top: 10px;
  color: var(--ink-soft);
  font-size: 12px;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 26px;
}

/* Preview modal */
.modal__dialog--preview {
  display: flex;
  flex-direction: column;
  width: min(960px, 100%);
  max-height: calc(100svh - 48px);
  padding: 0;
  overflow: hidden;
}

.preview__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 20px 16px 24px;
  border-bottom: 1px solid var(--line);
}

.preview__title {
  min-width: 0;
}

.preview__title h3 {
  margin-top: 3px;
  padding: 0;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.preview__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.modal__x--static {
  position: static;
}

.preview__body {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 20px;
  overflow: auto;
  background:
    radial-gradient(500px 300px at 50% 0%, rgba(255, 255, 255, 0.7), transparent 70%),
    #eae4d5;
}

.preview__body img {
  display: block;
  max-width: 100%;
  max-height: 68vh;
  border-radius: 6px;
  box-shadow: 0 22px 50px -30px rgba(16, 32, 26, 0.55);
}

.preview__body iframe {
  width: 100%;
  height: min(70vh, 720px);
  background: #fff;
  border: 0;
  border-radius: 6px;
}

.preview__error {
  padding: 30px;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.preview__spinner {
  width: 26px;
  height: 26px;
  border: 2px solid rgba(22, 56, 45, 0.15);
  border-top-color: var(--forest);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* =========================================================
   Toasts
   ========================================================= */

.toasts {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 11px 15px;
  color: var(--cream);
  background: var(--forest);
  border: 1px solid rgba(242, 236, 221, 0.12);
  border-radius: 10px;
  box-shadow: 0 18px 40px -22px rgba(16, 32, 26, 0.8);
  font-size: 12.5px;
  line-height: 1.5;
  pointer-events: auto;
  animation: toastIn 0.3s var(--ease) both;
}

.toast .icon {
  width: 16px;
  height: 16px;
  flex: none;
  color: var(--lime);
}

.toast--error {
  background: #7e2f20;
}

.toast--error .icon {
  color: #f3c9bc;
}

.toast.is-leaving {
  animation: toastOut 0.25s ease both;
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1020px) {
  .auth {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr);
  }

  .auth__statement h1 {
    font-size: clamp(42px, 5vw, 58px);
  }

  .auth__lede {
    max-width: 320px;
  }
}

@media (max-width: 900px) {
  .auth {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth__brand {
    display: none;
  }

  .auth__panel {
    padding: 92px 26px 82px;
    min-height: 100svh;
  }

  .auth__panel::before {
    display: none;
  }

  .mobile-brand {
    display: flex;
  }

  .watermark {
    font-size: 240px;
    top: -46px;
    right: -18px;
  }

  .login-form {
    width: min(100%, 400px);
  }
}

@media (max-width: 760px) {
  .topbar__inner {
    height: 68px;
    padding: 0 20px;
  }

  .brand__text strong {
    font-size: 17px;
  }

  .brand__text small {
    font-size: 7.5px;
  }

  .seal--small {
    width: 32px;
    height: 32px;
    font-size: 17px;
  }

  .session-pill {
    display: none;
  }

  .ghost-btn span {
    display: none;
  }

  .ghost-btn {
    width: 34px;
    justify-content: center;
    padding: 0;
  }

  .shell {
    padding: 34px 20px 28px;
  }

  .hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 26px;
    margin-bottom: 28px;
  }

  .hero h1 {
    font-size: clamp(44px, 12vw, 58px);
  }

  .hero__seal {
    width: 29px;
    height: 29px;
    font-size: 15px;
    margin-left: 10px;
  }

  .hero__sub {
    margin-top: 13px;
    font-size: 12.5px;
  }

  .hero__metrics {
    gap: 26px;
    padding-bottom: 0;
  }

  .metric > span {
    font-size: 31px;
  }

  .metric__rule {
    height: 36px;
  }

  .upload-card {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 15px 16px;
    padding: 22px 20px;
  }

  .upload-card::before {
    inset: 6px;
  }

  .upload-card__icon {
    width: 46px;
    height: 46px;
  }

  .upload-card__icon .icon {
    width: 20px;
    height: 20px;
  }

  .upload-card__text h2 {
    font-size: 21px;
  }

  .upload-card__text p {
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.6;
  }

  .upload-card__actions {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    width: 100%;
  }

  .upload-card__actions .btn {
    width: 100%;
    min-height: 42px;
    padding: 0 10px;
  }

  .upload-card__ring {
    display: none;
  }

  .library {
    margin-top: 40px;
  }

  .library__head {
    align-items: stretch;
    flex-direction: column;
    gap: 18px;
  }

  .library__title h2 {
    font-size: 26px;
  }

  .toolbar {
    width: 100%;
    padding-bottom: 0;
  }

  .search {
    flex: 1;
  }

  .search input {
    width: 100%;
  }

  .sort select {
    padding-right: 33px;
    padding-left: 12px;
    font-size: 12px;
  }

  .file-list {
    margin-top: 14px;
    border-radius: 16px;
  }

  .file-row {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 12px 14px;
  }

  .ftype {
    width: 40px;
    height: 40px;
    font-size: 8.5px;
    border-radius: 10px;
  }

  .file-name {
    font-size: 12.5px;
  }

  .file-meta {
    gap: 6px;
    font-size: 8.5px;
  }

  .folder-toggle {
    gap: 10px;
    padding: 10px 4px 10px 14px;
  }

  .folder-ico {
    width: 33px;
    height: 33px;
    border-radius: 8px;
  }

  .folder-ico .icon {
    width: 17px;
    height: 17px;
  }

  .folder-name {
    font-size: 12.5px;
  }

  .folder-actions {
    padding-right: 8px;
  }

  .folder-zip {
    width: 32px;
    height: 32px;
  }

  .folder-body .file-row {
    padding-left: 22px;
  }

  .folder-body .ftype {
    width: 38px;
    height: 38px;
  }

  .file-actions {
    gap: 1px;
    opacity: 1;
    transform: none;
  }

  .icon-btn {
    width: 34px;
    height: 34px;
    border-color: var(--line);
    background: rgba(247, 243, 233, 0.6);
  }

  .state-block {
    padding: 48px 20px 44px;
  }

  .state-block h3 {
    font-size: 22px;
  }

  .footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    margin-top: 38px;
  }

  .modal {
    padding: 14px;
  }

  .modal__dialog {
    padding: 24px;
    border-radius: 16px;
  }

  .modal__dialog--preview {
    padding: 0;
    max-height: calc(100svh - 28px);
  }

  .preview__head {
    align-items: flex-start;
    padding: 14px 12px 13px 16px;
  }

  .preview__actions .btn span {
    display: none;
  }

  .preview__body {
    padding: 12px;
  }

  .preview__body img {
    max-height: 62vh;
  }

  .preview__body iframe {
    height: 62vh;
  }

  .toasts {
    right: 16px;
    bottom: 16px;
    left: 16px;
    align-items: stretch;
  }

  .toast {
    max-width: none;
  }

  .auth__panel {
    padding: 80px 22px 76px;
  }

  .mobile-brand {
    top: 22px;
    left: 22px;
  }

  .lock-badge {
    width: 52px;
    height: 52px;
    margin-bottom: 24px;
  }

  .login-form h2 {
    font-size: 31px;
  }

  .login-meta {
    margin-top: 24px;
  }

  .auth__panel-foot {
    bottom: 20px;
  }
}

@media (max-width: 420px) {
  .file-meta span:last-child,
  .file-meta i:last-of-type {
    display: none;
  }

  .icon-btn {
    width: 32px;
    height: 32px;
  }

  .icon-btn .icon {
    width: 15px;
    height: 15px;
  }
}

@media (max-height: 780px) and (min-width: 901px) {
  .auth__statement {
    margin-top: 42px;
  }

  .auth__statement h1 {
    font-size: clamp(40px, 4.2vw, 58px);
    margin: 16px 0 18px;
  }

  .drawers {
    height: 170px;
  }

  .drawer {
    height: 64px;
  }

  .drawer--mid {
    bottom: 62px;
  }

  .drawer--back {
    bottom: calc(100% - 82px);
  }
}

/* =========================================================
   Motion
   ========================================================= */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes rowIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes dialogIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  to {
    opacity: 0;
    transform: translateY(6px);
  }
}

@keyframes shimmer {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes shake {
  10%,
  90% {
    transform: translateX(-2px);
  }
  20%,
  80% {
    transform: translateX(4px);
  }
  30%,
  50%,
  70% {
    transform: translateX(-6px);
  }
  40%,
  60% {
    transform: translateX(6px);
  }
}

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