/* Upload page (page-scoped). Uses tokens from /styles.css. */
.up-split { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 0.75fr); gap: 20px; align-items: start; }
.up-drop {
  display: grid; place-items: center; gap: 6px; text-align: center;
  padding: 26px 16px; border: 2px dashed var(--cyan-d); border-radius: 10px;
  background: rgba(56, 169, 224, 0.06); cursor: pointer; transition: border-color .15s, background .15s;
}
.up-drop:hover, .up-drop.over { border-color: var(--gold); background: rgba(244, 168, 29, 0.08); }
.up-drop b { font-family: var(--display); letter-spacing: .14em; text-transform: uppercase; color: var(--cyan); font-size: 1.1rem; }
.up-drop span { color: var(--muted); font-size: .92rem; }
.up-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.up-drop:focus-within { outline: 2px solid var(--gold); outline-offset: 3px; }
.up-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.up-list li {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; gap: 10px; align-items: center;
  padding: 7px 10px; border-radius: 6px; border-left: 3px solid var(--rail-hi); background: rgba(92, 53, 153, 0.18);
}
.up-list li.bad { border-left-color: var(--orange); background: rgba(232, 119, 34, 0.14); }
.up-name { font-family: var(--mono); font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-size { color: var(--muted); font-size: .88rem; }
.up-state { font-family: var(--display); letter-spacing: .12em; text-transform: uppercase; font-size: .8rem; color: var(--lav); }
.up-list li.bad .up-state { color: var(--orange); }
.up-x { background: none; border: 0; color: var(--faint); font-size: 1.2rem; cursor: pointer; padding: 0 4px; }
.up-x:hover { color: var(--gold); }
.up-total { margin: 0; color: var(--faint); font-size: .9rem; }
.up-bar { position: relative; height: 26px; border-radius: 13px; border: 1px solid var(--cyan-b); background: #000; overflow: hidden; }
.up-bar-fill { position: absolute; inset: 0 auto 0 0; width: 0; background: linear-gradient(90deg, var(--rail-hi), var(--cyan-b)); transition: width .3s; }
.up-bar-text { position: relative; display: block; text-align: center; line-height: 24px; font-family: var(--display); letter-spacing: .1em; font-size: .85rem; color: #fff; text-shadow: 0 1px 2px #000; }
.up-status { margin: 0; min-height: 1.4em; color: var(--muted); font-size: .95rem; }
.up-status.ok { color: var(--green); }
.up-status.warn { color: var(--gold); }
.up-status.err { color: var(--orange); }
.up-resume { padding: 12px 14px; border-radius: 8px; border: 1px solid rgba(244, 168, 29, .55); border-left: 5px solid var(--gold); background: var(--brown-bg); color: #e8d7b6; font-size: .95rem; }
.up-resume p { margin: 0 0 .5rem; }
.up-resume .btn { padding: .35rem .8rem; font-size: .85rem; }
.up-guide ul { margin: 0; padding-left: 1.1rem; color: var(--muted); font-size: .95rem; }
.up-guide li { margin-bottom: .45rem; }
.up-guide .panel + .panel { margin-top: 14px; }
.upload-form textarea { min-height: 7rem; }
@media (max-width: 900px) { .up-split { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) { .up-list li { grid-template-columns: minmax(0, 1fr) auto auto; } .up-state { grid-column: 1 / -1; } }
.upload-form.sent #up-submit { display: none; }

/* USB export — compact side-by-side; li text must be a single child so .code stays inline */
.section[aria-labelledby="usb-heading"] {
  padding-top: 8px;
  padding-bottom: 0;
}
.section[aria-labelledby="usb-heading"] .section-head {
  margin-bottom: 0.75rem;
}
.section:has(#upload-form) {
  padding-top: 14px;
}
.usb-export {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(13rem, 18rem);
  gap: 12px 1.25rem;
  align-items: stretch;
}
.usb-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: usb;
  display: grid;
  gap: 0.65rem;
  align-content: space-between;
}
.usb-steps li {
  counter-increment: usb;
  display: grid;
  grid-template-columns: 2.2rem minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}
.usb-steps li > span { min-width: 0; }
.usb-steps .code { letter-spacing: 0.02em; }
.usb-steps li::before {
  content: counter(usb, decimal-leading-zero);
  font-family: var(--display);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--cyan);
  line-height: 1.45;
}
.usb-export .frame {
  width: 100%;
  max-width: 18rem;
  justify-self: end;
  align-self: start;
}
.usb-export .frame-bar {
  letter-spacing: 0.1em;
  line-height: 1.25;
  flex-wrap: wrap;
}
.usb-export .frame picture {
  aspect-ratio: 3 / 2;
  max-height: 220px;
  background: #05080d;
}
.usb-export .frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 28%;
  display: block;
}
@media (max-width: 720px) {
  .usb-export { grid-template-columns: minmax(0, 1fr); }
  .usb-export .frame {
    justify-self: start;
    max-width: 22rem;
  }
}
