:root {
  --bg: #f7f7f4;
  --paper: #ffffff;
  --ink: #101010;
  --muted: #717171;
  --line: #e7e4dc;
  --soft: #f1f0eb;
  --danger: #8c1d1d;
  --success: #1f6b3a;
  --radius: 28px;
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  min-height: 100%;
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(0, 0, 0, .06), transparent 34rem),
    linear-gradient(180deg, #fff 0, var(--bg) 34rem);
}

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.1rem clamp(1rem, 4vw, 3rem);
  border-bottom: 1px solid rgba(0, 0, 0, .08);
  background: rgba(255, 255, 255, .78);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  font-weight: 750;
  letter-spacing: -.03em;
}

.brand-mark {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 1.15rem 0 0 #d9d9d9;
}

.nav {
  display: flex;
  align-items: center;
  gap: .4rem;
}

.nav a,
.ghost {
  padding: .65rem .9rem;
  border: 0;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.nav a:hover,
.ghost:hover {
  color: var(--ink);
  background: var(--soft);
}

.page {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vw, 5rem) 0;
}

.narrow {
  width: min(860px, calc(100% - 2rem));
}

.hero {
  display: grid;
  gap: 1rem;
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .18em;
  font-size: .72rem;
  font-weight: 800;
}

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

h1 {
  max-width: 830px;
  margin-bottom: 0;
  font-size: clamp(2.4rem, 7vw, 6.7rem);
  line-height: .92;
  letter-spacing: -.08em;
}

h2 {
  margin-bottom: .45rem;
  font-size: 1.1rem;
  letter-spacing: -.035em;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr));
  gap: 1rem;
}

.card,
.panel,
.empty,
.auth-card {
  background: rgba(255, 255, 255, .82);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .06);
}

.card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.card-header {
  padding: .55rem .55rem 0;
}

.type {
  display: inline-block;
  margin: 0 0 .7rem;
  padding: .36rem .6rem;
  border-radius: 999px;
  background: var(--soft);
  color: var(--muted);
  font-size: .76rem;
  font-weight: 750;
}

video,
audio {
  width: 100%;
}

video {
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--radius) - .65rem);
  background: #000;
}

audio {
  min-height: 44px;
}

details {
  padding: 0 .55rem .35rem;
  color: var(--muted);
  font-size: .92rem;
}

summary {
  cursor: pointer;
}

.panel,
.empty,
.auth-card {
  padding: clamp(1.2rem, 4vw, 2rem);
}

.empty {
  display: grid;
  justify-items: start;
  gap: .4rem;
}

.form {
  display: grid;
  gap: 1rem;
  margin-top: 1.3rem;
}

label {
  display: grid;
  gap: .45rem;
  color: var(--muted);
  font-size: .95rem;
}

input {
  width: 100%;
  padding: .95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  outline: none;
}

input:focus {
  border-color: #111;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, .08);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 44px;
  padding: .85rem 1rem;
  border: 0;
  border-radius: 999px;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-weight: 750;
  cursor: pointer;
}

.button:hover {
  transform: translateY(-1px);
}

.alert,
.success {
  margin-top: 1rem;
  padding: .9rem 1rem;
  border-radius: 18px;
  line-height: 1.45;
}

.alert {
  background: #fff1f1;
  color: var(--danger);
}

.success {
  background: #eefaf2;
  color: var(--success);
}

.auth-page {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 1rem;
}

.auth-card {
  width: min(450px, 100%);
}

.auth-card h1 {
  font-size: clamp(2.2rem, 10vw, 4.4rem);
}

.list {
  display: grid;
  gap: .7rem;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(247, 247, 244, .72);
}

.row p {
  margin-bottom: 0;
}

@media (max-width: 720px) {
  .topbar,
  .row {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    justify-content: space-between;
  }

  h1 {
    letter-spacing: -.065em;
  }
}

.upload-progress {
  display: grid;
  gap: .65rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(247, 247, 244, .72);
}

.upload-progress[hidden] {
  display: none;
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.upload-progress progress {
  width: 100%;
  height: 18px;
  accent-color: var(--ink);
}
