:root {
  color-scheme: light dark;
  --canvas: #f5f5f7;
  --surface: #fff;
  --inset: #f5f6f8;
  --ink: #1d1d1f;
  --muted: #56565b;
  --blue: #0063c9;
  --blue-hover: #0054ad;
  --on-blue: #fff;
  --focus: #0063c9;
  --edge: #dddde2;
  --control: #86868d;
  --track: #dee3eb;
  --error: #a62420;
  --shadow: 0 8px 24px #0000000d;
  font: 100%/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
@media (prefers-color-scheme: dark) {
  :root {
    --canvas: #161618;
    --surface: #232326;
    --inset: #2d2d31;
    --ink: #f5f5f7;
    --muted: #bbbbc2;
    --blue: #73b7ff;
    --blue-hover: #93c8ff;
    --on-blue: #101b2a;
    --focus: #80bdff;
    --edge: #414146;
    --control: #8b8b95;
    --track: #414751;
    --error: #ff9e98;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body, p { margin: 0; }
button, input, a { font: inherit; }
button, .button { touch-action: manipulation; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }

.masthead {
  padding: .5rem max(1rem, calc((100% - 66rem) / 2));
  border-bottom: 1px solid var(--edge);
  background: var(--surface);
}
.brand {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  gap: .5rem;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.brand img { width: 1.5rem; height: 1.5rem; flex: none; }

main { padding: 4.5rem 1rem max(3rem, env(safe-area-inset-bottom)); }
.desk { width: min(100%, 36rem); margin-inline: auto; }
.heading { margin: 0 auto 2rem; text-align: center; }
h1 {
  font-size: 4rem;
  font-weight: 560;
  letter-spacing: -.03em;
  line-height: 1.06;
  margin: 0 0 1rem;
  text-wrap: balance;
}
#description {
  max-width: 31rem;
  margin-inline: auto;
  color: var(--muted);
  font-size: clamp(1rem, 2.8vw, 1.1875rem);
  text-wrap: balance;
}
.surface {
  border: 1px solid var(--edge);
  border-radius: 1.25rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.drop {
  display: grid;
  justify-items: center;
  gap: .75rem;
  margin: .5rem;
  padding: 2.5rem 1rem 2rem;
  border: 1px solid transparent;
  border-radius: .75rem;
  text-align: center;
}
.drop[data-drag] { border-color: var(--focus); background: var(--inset); }
.transfer-mark { display: block; width: 8rem; height: auto; margin-bottom: .5rem; color: var(--muted); }
.ring { stroke: currentColor; stroke-width: 1.5; }
.ring.outer { opacity: .16; }
.ring.middle { opacity: .27; }
.ring.inner { opacity: .44; }
.drop[data-drag] .transfer-mark { color: var(--blue); }

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: .5rem 1rem;
  border: 1px solid transparent;
  border-radius: .625rem;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
}
.primary { background: var(--blue); color: var(--on-blue); }
.primary:hover { background: var(--blue-hover); }
.secondary { border-color: var(--control); color: var(--ink); background: var(--surface); }
.secondary:hover, .quiet:hover { background: var(--inset); }
.quiet { color: var(--muted); background: transparent; }
.drop .button { min-height: 48px; padding-inline: 1.5rem; }
button:disabled { opacity: .65; cursor: default; }

.drop-caption, .note, .stats, .privacy, #filesize { color: var(--muted); font-size: .875rem; }
.session { display: grid; gap: 1rem; padding: 1.5rem; }
.file-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  padding: .75rem 1rem;
  border-radius: .5rem;
  background: var(--inset);
}
.file-icon { flex: none; color: var(--muted); }
.file-details { display: grid; min-width: 0; overflow-wrap: anywhere; }
.file-details strong { font-weight: 600; }
.status { overflow-wrap: anywhere; }
.status[data-error], #offline { color: var(--error); }
#offline { margin: .75rem 0 0; text-align: center; }
#invite label { display: block; font-size: .875rem; font-weight: 600; margin-bottom: .5rem; }
#link {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .5rem .75rem;
  margin: 0 0 .75rem;
  border: 1px solid var(--control);
  border-radius: .625rem;
  color: var(--ink);
  background: var(--inset);
}
.actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.note:not(:empty) { margin-top: .5rem; }
#cancel { justify-self: start; margin-left: -.5rem; }
progress {
  appearance: none;
  display: block;
  width: 100%;
  height: .5rem;
  border: 0;
  border-radius: 1rem;
  background: var(--track);
  overflow: hidden;
}
progress::-webkit-progress-bar { background: var(--track); }
progress::-webkit-progress-value { background: var(--blue); }
progress::-moz-progress-bar { background: var(--blue); }
.stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem .75rem;
  margin-top: .5rem;
  font-variant-numeric: tabular-nums;
}
.privacy { display: flex; justify-content: center; gap: .5rem; margin: 1.25rem 0 0; text-align: center; }
.privacy svg { align-self: center; flex: none; }
.file-list, .download-list { margin: 0; padding: 0; list-style: none; }
.file-list { max-block-size: 10rem; overflow-y: auto; }
.file-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: .75rem;
  padding: .5rem .25rem;
  overflow-wrap: anywhere;
}
.file-size, #filesize { font-variant-numeric: tabular-nums; }
.file-size { color: var(--muted); font-size: .875rem; white-space: nowrap; text-align: end; }
.file-list li + li { border-top: 1px solid var(--edge); }
.download-list { display: grid; gap: .5rem; }
.download-list a { display: flex; width: 100%; overflow-wrap: anywhere; }
@media (pointer: coarse) { .drag-hint { display: none; } }
@media (max-width: 40rem) {
  main { padding-top: 3rem; }
  .heading { margin-bottom: 1.5rem; }
  h1 { font-size: 2.75rem; margin-bottom: .75rem; }
  .drop { padding-block: 2rem; }
  .session { padding: 1rem; }
}
@media (max-width: 26rem) {
  .actions > * { flex: 1 1 auto; }
  #invite .actions > * { min-width: 6.5rem; }
}
