:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #263b32;
  background: #f7f8f4;
  line-height: 1.55;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
header, main { max-width: 960px; margin: auto; padding: 20px clamp(16px, 4vw, 32px); }
header { display: flex; align-items: center; justify-content: space-between; min-height: 78px; }
.brand { color: inherit; font-weight: 700; letter-spacing: -.02em; text-decoration: none; }
h1 { margin: 0 0 16px; font-size: clamp(32px, 6vw, 52px); line-height: 1.2; }
h2 { font-size: 20px; margin: 0; }
p { color: #526659; margin: 8px 0 20px; }
label { display: block; font-size: .9rem; font-weight: 600; }
#notice { color: #825121; overflow-wrap: anywhere; white-space: pre-line; }
#notice:empty { margin: 0; }
.panel { background: #fff; border: 1px solid #dce4da; border-radius: 18px; }
.login { max-width: 430px; padding: clamp(20px, 4vw, 32px); }
form { display: grid; gap: 8px; }
form input { width: 100%; margin-bottom: 8px; }
input, button, input::file-selector-button { font: inherit; }
input:not([type=file]) { border: 1px solid #bccabf; border-radius: 8px; padding: 9px 10px; color: inherit; background: #fcfdfb; }
button, input::file-selector-button {
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 14px;
  background: #315c4c;
  color: #fff;
  cursor: pointer;
}
button.secondary { background: #edf2eb; color: #315c4c; }
button:disabled, input:disabled { opacity: .55; cursor: default; }
:focus-visible { outline: 3px solid #669371; outline-offset: 3px; }
input::file-selector-button { margin: 5px 8px 0 0; }
input[type=file] { max-width: 100%; }
.upload { display: flex; flex-wrap: wrap; gap: 20px 32px; align-items: start; justify-content: space-between; padding: 24px; }
.capacity { flex: 0 1 230px; }
progress { width: 100%; height: 12px; accent-color: #315c4c; }
.images-title { margin: 28px 0 14px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 14px; padding: 0; list-style: none; }
.card { overflow: hidden; }
.preview { display: grid; place-items: center; aspect-ratio: 4 / 3; background: #edf1eb; }
.preview img { width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.preview:focus-visible { outline-offset: -5px; }
.card-info { display: grid; gap: 8px; padding: 14px; min-width: 0; }
.name { overflow-wrap: anywhere; }
.size { color: #526659; font-size: .85rem; }
.url { width: 100%; min-width: 0; font-size: .83rem; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; }
.api-tools { margin-top: 16px; padding: 14px 24px; }
.api-tools summary { width: fit-content; font-weight: 650; cursor: pointer; }
.api-tools form { max-width: 400px; }
#new-key { margin-top: 18px; }
#new-key input { width: min(100%, 550px); margin: 8px 4px 8px 0; font-family: ui-monospace, monospace; }
#key-notice:empty { display: none; }
#upload-keys { list-style: none; padding: 0; }
#upload-keys li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 0; border-top: 1px solid #dce4da; }
#upload-keys span { overflow-wrap: anywhere; }
