:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --paper: #f7f5f2;
  --panel: #fffdfa;
  --wash: #eee9e4;
  --ink: #211d27;
  --subtle: #625a69;
  --line: #dfd9e2;
  --accent: #6b3db0;
  --action: #211d27;
  --on-action: #fff;
  --warn: #9c2c48;
  --radius: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
body.delivery {
  color-scheme: dark;
  --paper: #17141b;
  --panel: #211d27;
  --wash: #312638;
  --ink: #fff9f4;
  --subtle: #c1b6c7;
  --line: #3c3444;
  --accent: #dfbaff;
  --action: #efdcff;
  --on-action: #21152b;
  --warn: #f4a8ba;
}

a { color: inherit; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
h1, h2, h3, p { margin: 0; }
h1 {
  font-size: clamp(2.4rem, 5.2vw, 4.65rem);
  font-weight: 720;
  letter-spacing: -.071em;
  line-height: .96;
  overflow-wrap: anywhere;
}
h2 { font-size: 1.24rem; font-weight: 690; letter-spacing: -.033em; margin-bottom: 1rem; }
h3 { font-size: 1.12rem; letter-spacing: -.033em; }
p { line-height: 1.6; }
.bar { border-bottom: 1px solid var(--line); }
.bar-inner, .shell { max-width: 1220px; margin: auto; padding-inline: clamp(1.05rem, 4vw, 2.8rem); }
.bar-inner { height: 72px; display: flex; justify-content: space-between; align-items: center; }
.brand {
  text-decoration: none; color: var(--ink); font-weight: 820;
  font-size: 1.66rem; letter-spacing: -.096em;
}
.brand span { color: var(--accent); margin-left: .06em; }
.shell { padding-top: clamp(1.8rem, 5vw, 4rem); padding-bottom: 4.2rem; }
.page-title, .section-title {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap;
}
.page-title { margin-bottom: clamp(1.5rem, 4vw, 2.6rem); }
.section-title { margin-bottom: .85rem; }
.section-title h2 { margin: 0; }
.above { margin-bottom: .6rem; }
.muted { color: var(--subtle); }
.small { font-size: .87rem; }
.break { overflow-wrap: anywhere; }
.text-link { color: var(--accent); text-underline-offset: .22em; }
.crumb { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; margin-bottom: 1.2rem; font-size: .93rem; color: var(--subtle); }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--accent); }
.crumb a + a::before { content: "/"; margin-right: .65rem; color: var(--subtle); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 238px), 1fr)); gap: 1rem; }
.cards.inside { grid-template-columns: repeat(auto-fill, minmax(min(100%, 204px), 1fr)); }
.card {
  min-width: 0; display: block; position: relative; overflow: hidden; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); text-decoration: none;
  transition: border-color .16s ease, transform .16s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-2px); }
.card-art {
  aspect-ratio: 16 / 10;
  background: radial-gradient(ellipse at 87% 14%, #e8c5fc 0%, transparent 58%),
    radial-gradient(ellipse at 0% 95%, #d2acc9 0%, transparent 46%), #dfd0ea;
}
.delivery .card-art {
  background: radial-gradient(ellipse at 80% 6%, #734481 0%, transparent 59%),
    radial-gradient(ellipse at 4% 92%, #574075 0%, transparent 48%), #2c233b;
}
.card-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card-copy { padding: .9rem 1rem 1rem; min-width: 0; overflow-wrap: anywhere; }
.card-copy h2 { margin: 0; }
.card-copy p { margin-top: .2rem; color: var(--subtle); font-size: .9rem; }
.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(1rem, 2.3vw, 1.5rem);
  min-width: 0;
}
.panel.create { align-self: start; }
summary { font-weight: 640; }
details[open] > summary { margin-bottom: .85rem; }
.split { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(285px, 1fr); gap: 1.3rem; align-items: start; }
.stack { display: flex; flex-direction: column; gap: .9rem; align-items: stretch; min-width: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.nested { margin-top: .95rem; }
.cover-mini { display: block; width: 100%; margin: .85rem 0; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 9px; }
.stack > .button { align-self: flex-start; }
label { display: flex; flex-direction: column; gap: .34rem; font-size: .92rem; color: var(--subtle); }
input:not([type="checkbox"]), select, textarea {
  width: 100%; min-width: 0; max-width: 100%;
  padding: .68rem .72rem; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; line-height: 1.35;
}
textarea { resize: vertical; }
input[type="file"] { font-size: .86rem; }
input[type="checkbox"] { accent-color: var(--accent); width: 1.13rem; height: 1.13rem; }
.check { flex-direction: row; align-items: center; gap: .5rem; }
.button, .plain {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .55rem; min-height: 2.65rem; padding: .55rem .85rem; font-weight: 650;
  line-height: 1.25; border: 1px solid var(--line); border-radius: 9px; color: var(--ink);
  background: var(--panel); text-decoration: none; text-align: center;
}
.button:hover, .plain:hover { border-color: var(--accent); }
.button.primary { background: var(--action); color: var(--on-action); border-color: var(--action); }
.button:disabled { cursor: not-allowed; opacity: .48; }
.button.small { padding: .43rem .62rem; min-height: 2.15rem; }
.button[aria-busy="true"] { pointer-events: none; opacity: .75; }
.plain { border-color: transparent; background: transparent; padding-inline: .35rem; min-height: 2rem; }
.danger { color: var(--warn); }
.notice { padding: .55rem .75rem; border: 1px solid var(--line); border-radius: 8px; }
.error { color: var(--warn); }
.login-panel {
  max-width: 495px; margin: clamp(1rem, 8vh, 7rem) auto; border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px); padding: clamp(1.5rem, 4.7vw, 2.8rem); background: var(--panel);
  display: grid; gap: 1.3rem;
}
.login-panel h1 { font-size: clamp(2rem, 5vw, 3.65rem); }
.login-panel > .button { justify-self: start; }
.rows { margin: 0; padding: 0; list-style: none; }
.rows > li { border-top: 1px solid var(--line); }
.rows > li > a:has(.arrow) {
  padding: .85rem 0; display: flex; align-items: center; justify-content: space-between; gap: .7rem;
  text-decoration: none;
}
.rows > li > a:has(.arrow):hover, .file-name:hover { color: var(--accent); }
.arrow { color: var(--accent); }
.file-row { display: flex; align-items: center; gap: .65rem; justify-content: space-between; padding: .67rem 0; }
.file-name { flex: 1; min-width: 0; overflow-wrap: anywhere; text-decoration: none; }
.filesize { font-size: .86rem; flex-shrink: 0; }
.link-row { margin-top: .95rem; border-top: 1px solid var(--line); padding-top: .85rem; }
.link-row p { margin-top: .25rem; margin-bottom: .5rem; font-size: .90rem; }
.drop {
  display: grid; justify-items: center; gap: .8rem; text-align: center;
  background: var(--paper); border: 1px dashed var(--line); border-radius: 12px; padding: clamp(1rem, 4vw, 2rem);
}
.drop.dragging { border-color: var(--accent); background: var(--wash); }
.file-pick { position: relative; cursor: pointer; }
.file-pick:focus-within { outline: 3px solid var(--accent); outline-offset: 3px; }
.file-pick input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.progress-list { list-style: none; padding: 0; margin: 0; }
.progress-list li {
  padding-top: .65rem; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem .65rem;
}
.progress-list li strong { overflow-wrap: anywhere; }
.progress-list li progress { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.progress-list li span { grid-column: 1 / -1; color: var(--subtle); font-size: .88rem; }
.hero { border: 1px solid var(--line); border-radius: calc(var(--radius) + 6px); background: var(--panel); overflow: hidden; position: relative; }
.hero:has(.hero-art) { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.hero-copy { padding: clamp(1.1rem, 4.5vw, 3.2rem); align-self: center; }
.hero-art { display: block; width: 100%; height: 100%; object-fit: cover; min-height: clamp(185px, 42vw, 460px); }
.hero-copy .muted { margin-top: .65rem; }
.description { white-space: pre-line; margin-top: .85rem; overflow-wrap: anywhere; }
.primary-download { margin-top: 1.1rem; padding-inline: 1rem; }
.primary-download span { opacity: .72; font-weight: 580; }
.release-list, .file-section, .video { margin-top: clamp(1.45rem, 4vw, 2.5rem); }
.video video { display: block; max-height: 70vh; width: 100%; background: #080609; border-radius: var(--radius); }
.drop + .progress-list:empty + p:empty, [data-zip-status]:empty { display: none; }

@media (max-width: 720px) {
  .bar-inner { height: 61px; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .hero:has(.hero-art) { display: flex; flex-direction: column-reverse; }
  .hero-copy { align-self: stretch; }
  .hero-art { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
  .file-row { gap: .42rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
