:root {
  --ink: #18201b;
  --muted: #657068;
  --paper: #f3f0e8;
  --card: rgba(255, 255, 252, .78);
  --line: rgba(24, 32, 27, .16);
  --acid: #c8ff47;
  --coral: #ff6b4a;
  --shadow: 0 24px 70px rgba(37, 45, 37, .11);
  --radius: 26px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  overflow-x: hidden;
}

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

.ambient {
  position: fixed;
  z-index: -1;
  width: 42vw;
  height: 42vw;
  border-radius: 999px;
  filter: blur(3px);
  opacity: .36;
  pointer-events: none;
}

.ambient-a { top: -23vw; right: -6vw; background: var(--acid); }
.ambient-b { bottom: -28vw; left: -10vw; background: #ffb6a3; }

.shell { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }

.topbar {
  height: 102px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -.05em;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--ink);
  font-size: 20px;
}

.brand-dot { color: var(--coral); }

.login-layout, .hero {
  display: grid;
  grid-template-columns: 1.25fr .75fr;
  gap: 60px;
  align-items: end;
}

.login-layout { min-height: calc(100vh - 180px); padding: 80px 0 100px; align-items: center; }
.hero { padding: 82px 0 62px; }

.eyebrow, .step {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .16em;
}

h1, h2, p { margin-top: 0; }

h1 {
  margin-bottom: 0;
  font-family: Georgia, "Noto Serif SC", serif;
  font-size: clamp(54px, 7.6vw, 104px);
  line-height: .94;
  letter-spacing: -.065em;
  font-weight: 500;
}

h1 em { color: var(--coral); font-weight: 500; }
h2 { margin-bottom: 0; font-size: 26px; letter-spacing: -.035em; }

.lede {
  max-width: 430px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.75;
}

.panel {
  padding: 30px;
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.login-card { display: grid; gap: 24px; }
.login-card label { color: var(--muted); font-size: 13px; font-weight: 700; }

.input-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }

input[type="password"] {
  width: 100%;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  outline: none;
  background: rgba(255, 255, 255, .72);
}

input[type="password"]:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgba(200, 255, 71, .5); }

.primary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  min-height: 54px;
  padding: 0 20px;
  border: 0;
  border-radius: 14px;
  color: white;
  background: var(--ink);
  cursor: pointer;
  font-weight: 800;
  transition: transform .16s ease, background .16s ease;
}

.primary:hover { transform: translateY(-2px); background: #2c3730; }
.primary:disabled { opacity: .52; cursor: wait; transform: none; }
.primary.compact { width: 56px; padding: 0; justify-content: center; font-size: 22px; }

.text-button {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--ink);
  color: var(--ink);
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.workspace-grid { display: grid; grid-template-columns: 1.55fr .65fr; gap: 22px; }
.upload-card { display: grid; gap: 22px; }
.card-head, .section-title, .progress-meta { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.limit { color: var(--muted); font-size: 12px; font-weight: 700; }

.drop-zone {
  min-height: 238px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1.5px dashed rgba(24, 32, 27, .4);
  border-radius: 18px;
  background: rgba(243, 240, 232, .55);
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, transform .18s ease;
}

.drop-zone:hover, .drop-zone.dragging { border-color: var(--coral); background: rgba(255, 107, 74, .06); transform: scale(.995); }
.drop-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop-zone strong { font-size: 18px; }
.drop-zone span:last-child { color: var(--muted); font-size: 13px; }

.upload-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 8px;
  place-items: center;
  border-radius: 50%;
  background: var(--acid);
  font-size: 28px;
  font-weight: 500;
}

.progress-wrap { display: grid; gap: 10px; }
.progress-meta { font-size: 13px; font-weight: 700; }
.progress-meta span:first-child { max-width: 80%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.progress-track { height: 7px; overflow: hidden; border-radius: 99px; background: rgba(24, 32, 27, .1); }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--coral); transition: width .15s linear; }

.share-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid rgba(24, 32, 27, .16);
  border-radius: 14px;
  background: rgba(200, 255, 71, .24);
}

.share-copy { min-width: 0; }
.share-copy span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .1em; }
.share-copy strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-actions { display: flex; gap: 8px; }
.mini-button.accent { border-color: var(--coral); color: #a83220; }

.notes-card { display: flex; min-height: 100%; flex-direction: column; }
.note-number { margin: auto 0 24px; color: var(--coral); font-family: Georgia, serif; font-size: 70px; letter-spacing: -.08em; }
.notes-card > p:not(.step):not(.fine-print) { margin: 18px 0; color: var(--muted); line-height: 1.7; }
.rule { height: 1px; margin: auto 0 20px; background: var(--line); }
.fine-print { margin-bottom: 0; font-size: 12px; line-height: 1.6; }

.files-section { padding: 80px 0 50px; }
.section-title { margin-bottom: 22px; }
.file-list { display: grid; gap: 10px; }

.file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 24px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 252, .52);
}

.file-info { min-width: 0; }
.file-name { display: block; overflow: hidden; margin-bottom: 7px; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.file-meta { color: var(--muted); font-size: 12px; }
.file-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }

.mini-button {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 800;
}

.mini-button:hover { border-color: var(--ink); }
.mini-button.danger { color: #a83220; }

.empty-state { padding: 50px 20px; border-top: 1px solid var(--line); color: var(--muted); text-align: center; }
.message { min-height: 20px; margin: 0; color: #a83220; font-size: 13px; }

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  padding: 14px 18px;
  border-radius: 12px;
  color: white;
  background: var(--ink);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: .2s ease;
}

.toast.show { opacity: 1; transform: translateY(0); }
.hidden { display: none !important; }

footer { padding: 28px 0 40px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .17em; }

.error-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; }
.error-card { width: min(720px, 100%); }
.error-card h1 { margin-bottom: 30px; }
.error-card > p:not(.eyebrow) { margin-bottom: 34px; color: var(--muted); }
.link-button { width: fit-content; text-decoration: none; }

@media (max-width: 780px) {
  .shell { width: min(100% - 24px, 1160px); }
  .topbar { height: 78px; }
  .login-layout, .hero, .workspace-grid { grid-template-columns: 1fr; }
  .login-layout { padding: 48px 0 70px; gap: 42px; }
  .hero { padding: 56px 0 42px; gap: 30px; }
  h1 { font-size: clamp(48px, 15vw, 70px); }
  .panel { padding: 22px; }
  .drop-zone { min-height: 210px; }
  .notes-card { min-height: 350px; }
  .files-section { padding-top: 58px; }
  .file-row { grid-template-columns: 1fr; gap: 16px; }
  .share-panel { grid-template-columns: 1fr; }
  .share-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .file-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
