:root {
  --ink: #1B222C;
  --panel: #232B36;
  --panel-raised: #2A3340;
  --paper: #EDE6D6;
  --paper-shadow: #D9D0BC;
  --amber: #E8A33D;
  --amber-dim: #8A6425;
  --teal: #5FA88F;
  --rust: #D9634A;
  --text: #EDEFF2;
  --text-muted: #8D96A3;
  --text-on-paper: #33302A;
  --border: #303A47;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(232, 163, 61, 0.08), transparent 45%),
    radial-gradient(circle at 85% 100%, rgba(95, 168, 143, 0.07), transparent 45%);
  color: var(--text);
  font-family: var(--body);
  -webkit-font-smoothing: antialiased;
}

.dock {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 96px;
}

.dock__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 32px;
}

.dock__brand { display: flex; align-items: center; gap: 14px; }

.dock__mark {
  font-size: 28px;
  color: var(--amber);
  transform: rotate(-8deg);
  line-height: 1;
}

.dock__brand h1 {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.dock__tagline {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 13.5px;
}

.dock__limits {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock__sep { opacity: 0.5; }

.dock__types-toggle {
  cursor: pointer;
  border-bottom: 1px dashed var(--text-muted);
}

.dock__types-toggle:hover { color: var(--amber); border-color: var(--amber); }

.dock__types {
  margin: -20px 0 24px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.dock__types code {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--teal);
}

.dropzone {
  position: relative;
  border-radius: 12px;
  background: var(--panel);
  border: 2px solid var(--border);
  padding: 56px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
  outline-offset: 4px;
}

.dropzone:focus-visible { outline: 2px solid var(--amber); }

.dropzone__stripe {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 6px;
  border-radius: 12px 12px 0 0;
  background: repeating-linear-gradient(
    -45deg,
    var(--amber) 0 14px,
    var(--ink) 14px 28px
  );
  opacity: 0.55;
  transition: opacity 160ms ease;
}

.dropzone__stripe--bottom {
  top: auto; bottom: 0;
  border-radius: 0 0 12px 12px;
}

.dropzone__body { position: relative; }

.dropzone__icon {
  font-size: 34px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.dropzone__title {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 6px;
}

.dropzone__sub {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
}

.dropzone__browse {
  color: var(--amber);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.dropzone.is-dragover {
  border-color: var(--amber);
  background: var(--panel-raised);
  transform: scale(1.005);
}

.dropzone.is-dragover .dropzone__stripe { opacity: 1; }

.manifest {
  margin-top: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ticket {
  position: relative;
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 16px;
  background: var(--paper);
  color: var(--text-on-paper);
  border-radius: 4px;
  padding: 16px 20px 16px 18px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  overflow: hidden;
}

.ticket::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background-image: radial-gradient(circle, var(--ink) 2.5px, transparent 2.5px);
  background-size: 10px 12px;
  background-position: -3px 0;
}

.ticket__thumb {
  width: 64px;
  height: 64px;
  border-radius: 4px;
  background: var(--paper-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.ticket__thumb-img { width: 100%; height: 100%; object-fit: cover; }
.ticket__thumb-icon { font-size: 22px; color: var(--amber-dim); font-family: var(--mono); }

.ticket__name {
  font-family: var(--display);
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ticket__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: #6B6659;
  margin: 3px 0 10px;
}

.ticket__dot { margin: 0 6px; opacity: 0.6; }

.ticket__progress {
  height: 5px;
  border-radius: 3px;
  background: rgba(0,0,0,0.12);
  overflow: hidden;
}

.ticket__progress-bar {
  height: 100%;
  width: 0%;
  background: var(--amber);
  transition: width 120ms linear;
}

.ticket.is-done .ticket__progress { display: none; }
.ticket.is-error .ticket__progress-bar { background: var(--rust); }

.ticket__result { margin-top: 10px; }

.ticket__label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8A8370;
  margin-bottom: 4px;
}

.ticket__url-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.ticket__url {
  font-family: var(--mono);
  font-size: 13px;
  background: rgba(0,0,0,0.06);
  padding: 4px 8px;
  border-radius: 4px;
  word-break: break-all;
}

.ticket__copy, .ticket__open {
  font-family: var(--body);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(0,0,0,0.18);
  background: transparent;
  color: var(--text-on-paper);
  padding: 5px 10px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, border-color 120ms ease;
}

.ticket__copy:hover, .ticket__open:hover {
  border-color: var(--teal);
  background: rgba(95, 168, 143, 0.12);
}

.ticket__error {
  color: var(--rust);
  font-size: 13px;
  margin: 8px 0 0;
  font-weight: 600;
}

.ticket__stamp {
  position: absolute;
  top: 14px;
  right: -10px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--teal);
  border: 2px solid var(--teal);
  border-radius: 4px;
  padding: 3px 10px;
  transform: rotate(6deg);
  opacity: 0.85;
}

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--panel-raised);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.35);
}

@media (max-width: 520px) {
  .dock__header { flex-direction: column; align-items: flex-start; }
  .ticket { grid-template-columns: 48px 1fr; }
  .ticket__thumb { width: 48px; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
