* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
select {
  cursor: pointer;
}
button,
a,
input,
textarea,
select {
  touch-action: manipulation;
}
button,
a {
  color: inherit;
}
button {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  padding: 0.65rem 0.95rem;
  font-weight: 550;
}
button:hover,
a:hover {
  background-color: var(--zone);
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
a {
  text-underline-offset: 0.2em;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
}
header {
  border-bottom: 1px solid var(--line);
}
.bar,
main,
footer {
  width: min(var(--width), calc(100% - 7vw));
  margin-inline: auto;
}
.bar {
  height: 74px;
  display: flex;
  align-items: center;
  gap: 3rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.04em;
  text-decoration: none;
}
.bar nav {
  display: flex;
  gap: 0.3rem;
}
.bar nav button,
.quiet,
.textbtn {
  border-color: transparent;
  background: none;
  font-size: 0.92rem;
  color: var(--muted);
}
nav button[aria-current="page"] {
  background: var(--zone);
  color: var(--ink);
}
.account-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
#keys {
  font-size: 0.875rem;
  background: transparent;
}
#session {
  color: var(--muted);
}
nav button[aria-current="page"] {
  box-shadow: inset 0 -2px var(--focus);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
}
.bar nav {
  align-self: stretch;
  align-items: stretch;
}
.bar nav button {
  padding-inline: 1rem;
}

main {
  flex: 1;
  padding: clamp(38px, 7vw, 85px) 0;
}
.intro {
  margin-bottom: 2.1rem;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 3.25rem;
  font-weight: 620;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.intro p,
#zone p,
.muted {
  color: var(--muted);
  line-height: 1.5;
}
.intro p {
  margin-top: 12px;
  font-size: 1.07rem;
}
.uploadgrid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(260px, 1fr);
  gap: clamp(24px, 5vw, 74px);
  align-items: start;
}
#zone {
  background: var(--zone);
  border: 1px dashed var(--edge);
  border-radius: 0.75rem;
  min-height: 365px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 35px 20px;
  transition: background 0.15s;
}
#zone.over {
  background: color-mix(in srgb, var(--accent) 25%, var(--zone));
  outline: 3px solid var(--accent);
}
h2 {
  font-size: 1.18rem;
  letter-spacing: -0.035em;
  font-weight: 650;
}
#zone h2 {
  font-size: 1.65rem;
  margin: 20px 0 5px;
}
#zone p {
  font-size: 0.96rem;
  margin-bottom: 20px;
}
.primary {
  background: var(--btn);
  color: var(--btntext);
  border-color: transparent;
}
.textbtn {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.art {
  position: relative;
  width: 96px;
  height: 76px;
}
.art i,
.art b,
.art span {
  position: absolute;
  width: 48px;
  height: 61px;
  left: 25px;
  top: 7px;
  border: 1.5px solid #48563b;
  border-radius: 4px;
  background: #d3ddc8;
  transform: rotate(-20deg) translateX(-10px);
}
.art b {
  background: #f8faef;
  transform: rotate(15deg) translateX(12px);
}
.art span {
  transform: rotate(-5deg);
  background: #c7ec70;
  display: flex;
  gap: 5px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 9px;
}
.art em {
  height: 2px;
  background: #536637;
  width: 80%;
}
.art em:last-child {
  width: 50%;
}
#progressBox,
#result {
  border: 1px solid var(--line);
  border-radius: 0.75rem;
  padding: clamp(20px, 4vw, 36px);
  background: var(--panel);
}
#progressBox .meta,
#result .meta {
  overflow-wrap: anywhere;
}
#result h2,
#progressBox h2 {
  font-size: 1.55rem;
}
.settings {
  padding: 8px 0 0;
}
.settings h2 {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}
.settings label,
label.field {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  font-weight: 600;
  margin: 22px 0 8px;
}
small,
.meta {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 400;
}
.settings small {
  align-self: center;
}
select,
textarea,
input:not([type="checkbox"]) {
  background: var(--field);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  width: 100%;
  min-width: 0;
}
textarea {
  resize: vertical;
  line-height: 1.5;
}
.limit {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--muted);
}
.limit strong {
  font-weight: 550;
  color: var(--ink);
}
footer {
  border-top: 1px solid var(--line);
  padding: 18px 0 24px;
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.85rem;
}
footer span {
  font-weight: 650;
}
#result,
#progressBox {
  margin-top: 14px;
}
#result {
  background: var(--zone);
}
.actions,
.tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.actions {
  margin-top: 13px;
}
.actions button,
.actions a {
  font-size: 0.87rem;
}
.tools {
  margin: 20px 0;
}
.tools input {
  flex: 1;
  min-width: 160px;
}
.card {
  border-top: 1px solid var(--line);
  padding: 0;
}
.card:last-child {
  border-bottom: 1px solid var(--line);
}
.card > summary {
  list-style: none;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 1rem;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0.5rem;
}
.card > summary::-webkit-details-marker {
  display: none;
}
.card > summary::after {
  content: "";
  width: 0.44rem;
  height: 0.44rem;
  border: solid var(--muted);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
  justify-self: center;
}
.card[open] > summary::after {
  transform: rotate(225deg);
}
.card > summary:hover {
  background: var(--zone);
}
.card[open] > div {
  padding: 12px clamp(12px, 3vw, 34px) 25px;
  background: var(--panel);
  overflow-wrap: anywhere;
}
.card > summary .meta {
  margin: 0;
}
.empty-list {
  border-block: 1px solid var(--line);
  padding: 36px 0;
}
.empty-list button {
  margin-top: 14px;
}
.destructive {
  color: var(--bad);
}
.tools {
  display: grid;
  justify-items: start;
  gap: 0.4rem;
}
.tools label {
  font-weight: 600;
  font-size: 0.88rem;
}
.tools input {
  max-width: 38rem;
}
.file input {
  width: 1.05rem;
  height: 1.05rem;
}
.file:has(input:checked) {
  background: var(--zone);
}
.file {
  padding-inline: 8px;
}
.pickers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem;
}
.primary:hover {
  background: color-mix(in srgb, var(--btn), var(--btntext) 10%);
}
button:active:not(:disabled) {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
}
.primary {
  min-height: 44px;
}
#progressBox progress {
  margin-block: 14px 0;
}
.toast {
  text-align: center;
  pointer-events: none;
}
#storage meter {
  width: 100%;
  height: 0.65rem;
  order: 1;
}
#storage > div {
  flex: 1;
}
#storage {
  border-block: 1px solid var(--line);
  padding: 18px 0;
}
#storage small {
  display: block;
}
#storage meter::-webkit-meter-optimum-value {
  background: var(--focus);
}
#storage meter::-webkit-meter-bar {
  background: var(--zone);
  border: none;
}
.settings select,
.settings textarea {
  border-color: var(--edge);
}
dialog .primary {
  margin-top: 0.6rem;
}
.error:empty {
  display: none;
}
.account-tools button {
  min-height: 40px;
}
#list {
  margin-top: 18px;
}
.linkrow input {
  font-variant-numeric: tabular-nums;
}
#result .linkrow input {
  background: var(--panel);
}
.entry .bar {
  height: 72px;
}
.entry .brand img {
  width: 36px;
  height: 36px;
}
.intro p {
  max-width: 48ch;
}
.art {
  filter: drop-shadow(0 5px 4px #17261926);
}
.art span {
  transition: transform 150ms ease-out;
}
#zone.over .art span {
  transform: translateY(-8px) rotate(-5deg);
}
#zone.over {
  border-color: var(--focus);
  outline-color: var(--focus);
}
.signin .intro {
  margin-bottom: 2.1rem;
}
.signin .intro p {
  max-width: 34ch;
}
.signin .primary {
  margin-top: 1.25rem;
}
.signin .error {
  margin: 0.7rem 0 0;
}
.error:not(:empty) {
  font-size: 0.92rem;
}
.signin .field {
  margin-top: 0;
}
.signin .password-field {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--edge);
  background: var(--field);
  border-radius: var(--radius);
}
.password-field:focus-within {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}
.password-field input:not([type="checkbox"]) {
  border: 0;
  background: transparent;
  outline: 0;
  min-height: 48px;
}
.signin #reveal {
  background: transparent;
  color: var(--muted);
  border: 0;
  font-size: 0.875rem;
  width: auto;
}
.entry-art {
  overflow: hidden;
  align-self: stretch;
  display: flex;
  border-radius: 0.65rem;
  background: var(--zone);
}
.entry-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
@media (min-width: 721px) {
  .entry-art img {
    position: absolute;
    inset: 0;
  }
  .entry-art {
    position: relative;
    min-height: min(56vh, 480px);
  }
}
@media (max-width: 720px) {
  .entry-art {
    height: clamp(125px, 44vw, 200px);
    margin-top: 14px;
  }
  .entry-art img {
    object-position: 50% 56%;
  }
}
@media (max-width: 440px) {
  .card > summary {
    grid-template-columns: minmax(0, 1fr) 1rem;
    gap: 0.3rem;
  }
  .card > summary .meta {
    grid-row: 2;
  }
  .card > summary::after {
    grid-column: 2;
    grid-row: 1/3;
  }
}
.card > summary strong {
  font-weight: 600;
}
.card > summary {
  cursor: pointer;
  font-weight: 620;
  overflow-wrap: anywhere;
}
.meta {
  margin-top: 6px;
  line-height: 1.5;
}
.files {
  max-height: 380px;
  overflow: auto;
  margin-top: 12px;
  border-block: 1px solid var(--line);
}
.file {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 9px 0;
  overflow-wrap: anywhere;
}
.file span {
  flex: 1;
}
.file small {
  white-space: nowrap;
}
progress {
  width: 100%;
  height: 8px;
  accent-color: var(--focus);
}
.error {
  color: var(--bad);
  margin: 0.7rem 0;
}
.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--btn);
  color: var(--btntext);
  border: 1px solid var(--line);
  padding: 12px 20px;
  border-radius: 9px;
  max-width: 90vw;
  z-index: 5;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel);
  color: var(--ink);
  padding: 24px;
  width: min(440px, calc(100vw - 28px));
  max-height: 85svh;
}
dialog::backdrop {
  background: #10150f88;
}
.dialoghead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.close {
  padding: 3px 10px;
  font-size: 1.2rem;
}
#dialogBody > * + * {
  margin-top: 10px;
}
#dialogBody code {
  display: block;
  overflow-wrap: anywhere;
}
#storage {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
#storage strong {
  display: block;
  margin-top: 4px;
  font-size: 1.3rem;
}
.linkrow {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}
.linkrow input {
  font-size: 0.85rem;
}
.linkrow button {
  white-space: nowrap;
}
@media (max-width: 720px) {
  .bar,
  main,
  footer {
    width: calc(100% - 32px);
  }
  .bar {
    gap: 0.65rem;
    height: 62px;
  }
  .brand {
    font-size: 1.3rem;
  }
  .brand img {
    width: 28px;
    height: 28px;
  }
  .bar nav {
    gap: 0;
  }
  .bar nav button,
  #session {
    font-size: 0.82rem;
    padding: 0.5rem;
  }
  .uploadgrid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  #zone {
    min-height: 282px;
    padding: 20px;
  }
  .settings {
    padding: 16px 0;
  }
  h1 {
    font-size: 2.4rem;
  }
  .intro {
    margin-bottom: 20px;
  }
  .art {
    transform: scale(0.88);
  }
  main {
    padding-top: 32px;
  }
  .tools button {
    font-size: 0.86rem;
  }
}
#progressBox:not([hidden]),
#result:not([hidden]) {
  margin: 0 0 16px;
}

.signin {
  display: grid;
  grid-template-columns: minmax(0, 0.84fr) minmax(0, 1.16fr);
  gap: clamp(30px, 7vw, 100px);
  align-items: center;
  align-content: center;
  padding-block: 2.5rem;
}
.signin form {
  width: min(100%, 25rem);
  justify-self: center;
}
.signin h1 {
  font-size: 3.4rem;
  line-height: 1.05;
}
.signin #submit {
  width: 100%;
}
@media (max-width: 720px) {
  .signin {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 1rem;
    padding-block: 2rem;
  }
  .signin form,
  .entry-art {
    width: min(100%, 29rem);
    justify-self: center;
  }
  .signin h1 {
    font-size: 2.7rem;
  }
  .entry .bar {
    height: 58px;
  }
  .bar:has(nav) {
    height: auto;
    min-height: 64px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0;
    padding-top: 10px;
  }
  .bar nav {
    grid-row: 2;
    grid-column: 1/-1;
    margin-top: 6px;
  }
  .bar nav button {
    min-height: 42px;
  }
  .account-tools {
    grid-column: 2;
    grid-row: 1;
  }
  #storage {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }
  #storage meter {
    grid-column: 1/-1;
  }
}

.transfer-settings {
  border-top: 1px solid var(--line);
  margin-top: 20px;
  padding-top: 14px;
}
.transfer-settings summary {
  cursor: pointer;
  color: var(--muted);
  font-weight: 550;
  font-size: 0.92rem;
}
.card > summary {
  min-height: 60px;
}
#progressBox {
  min-height: 230px;
  display: grid;
  align-content: center;
}
#result:not([hidden]) ~ #zone {
  min-height: 0;
  padding: 16px;
  background: transparent;
}
#result:not([hidden]) ~ #zone :is(.art, h2, p) {
  display: none;
}
@media (min-width: 721px) {
  #zone {
    position: relative;
    align-items: flex-start;
    justify-content: flex-end;
    padding: clamp(28px, 3vw, 48px);
  }
  #zone h2 {
    font-size: 2rem;
    line-height: 1.15;
    letter-spacing: -0.04em;
  }
  #zone .art {
    position: absolute;
    right: 9%;
    top: 14%;
    transform: scale(1.45) rotate(3deg);
  }
  #result:not([hidden]) ~ #zone {
    align-items: center;
  }
}
