:root {
  color-scheme: dark;
  --ink: #07111f;
  --panel: #0d1b2d;
  --panel-2: #13253b;
  --line: #29415e;
  --text: #f7f9fc;
  --muted: #9fb0c4;
  --burst: #ff5a36;
  --burst-2: #ffbf3f;
  --good: #47d7a7;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
}

* { box-sizing: border-box; }

html { min-height: 100%; background: var(--ink); }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 85% 0%, rgba(255, 90, 54, 0.16), transparent 28rem),
    radial-gradient(circle at 0% 85%, rgba(46, 126, 255, 0.12), transparent 32rem),
    var(--ink);
}

button, input, select { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.app-shell { width: min(100%, 1120px); margin: 0 auto; padding: env(safe-area-inset-top) 24px env(safe-area-inset-bottom); }

.brandbar {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(159, 176, 196, 0.18);
}

.brand { color: var(--text); text-decoration: none; font-size: 1.35rem; font-weight: 850; letter-spacing: -0.04em; display: flex; align-items: center; gap: 11px; }
.brand > span:last-child span { color: var(--burst); }
.brand-mark { width: 31px; height: 31px; position: relative; display: inline-block; transform: rotate(-12deg); }
.brand-mark i { position: absolute; inset: 13px 1px auto 1px; height: 5px; border-radius: 5px; background: var(--burst); transform-origin: center; }
.brand-mark i:nth-child(2) { transform: rotate(60deg); background: var(--burst-2); }
.brand-mark i:nth-child(3) { transform: rotate(120deg); }

.device-pill { font-size: .78rem; color: var(--muted); border: 1px solid var(--line); border-radius: 999px; padding: 7px 11px; }
.workspace { display: grid; grid-template-columns: minmax(0, .82fr) minmax(420px, 1.18fr); gap: clamp(40px, 8vw, 104px); align-items: center; min-height: calc(100dvh - 83px); padding: 64px 0; }
.intro { align-self: start; padding-top: 48px; }
.eyebrow { margin: 0 0 14px; color: var(--burst-2); font-size: .75rem; font-weight: 800; letter-spacing: .16em; }
h1 { margin: 0; font-size: clamp(3.2rem, 6vw, 5.8rem); line-height: .94; letter-spacing: -.065em; max-width: 700px; }
h1 span { color: transparent; -webkit-text-stroke: 1.5px rgba(247,249,252,.64); }
.lede { max-width: 500px; color: var(--muted); font-size: 1.08rem; line-height: 1.65; margin: 28px 0 0; }

.panel { width: 100%; background: linear-gradient(145deg, rgba(19,37,59,.98), rgba(11,26,44,.98)); border: 1px solid var(--line); border-radius: 24px; padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); }
.dropzone { min-height: 190px; border: 1.5px dashed #496681; border-radius: 18px; background: rgba(7,17,31,.38); display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: .2s ease; }
.dropzone:hover, .dropzone.dragging { border-color: var(--burst); background: rgba(255,90,54,.06); transform: translateY(-2px); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-symbol, .file-card-icon { display: grid; place-items: center; color: var(--ink); background: linear-gradient(135deg, var(--burst-2), var(--burst)); font-size: .68rem; font-weight: 950; letter-spacing: .04em; }
.file-symbol { width: 55px; height: 67px; border-radius: 8px 8px 13px 8px; margin-bottom: 18px; box-shadow: 8px 8px 0 rgba(255,90,54,.12); }
.dropzone strong { font-size: 1.1rem; }
.dropzone small, label small { color: var(--muted); margin-top: 6px; }

.file-card { display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: rgba(7,17,31,.42); }
.file-card-icon { width: 42px; height: 50px; border-radius: 6px; flex: 0 0 auto; }
.file-info { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info span { color: var(--muted); font-size: .82rem; }
.icon-button { margin-left: auto; width: 40px; height: 40px; border: 0; background: transparent; color: var(--muted); font-size: 1.8rem; cursor: pointer; }

.form-grid { display: grid; gap: 18px; margin-top: 22px; }
label > span { display: block; margin-bottom: 8px; font-size: .9rem; font-weight: 750; }
input, select { width: 100%; min-height: 52px; color: var(--text); background: #091727; border: 1px solid var(--line); border-radius: 11px; padding: 0 14px; outline: none; }
input:focus, select:focus { border-color: var(--burst-2); box-shadow: 0 0 0 3px rgba(255,191,63,.12); }
label small { display: block; font-size: .75rem; line-height: 1.4; }

.primary, .secondary { width: 100%; min-height: 58px; border-radius: 13px; font-weight: 850; cursor: pointer; }
.primary { display: flex; align-items: center; justify-content: space-between; margin-top: 24px; padding: 0 20px; border: 0; color: white; background: linear-gradient(100deg, var(--burst), #ff7a32); box-shadow: 0 12px 28px rgba(255,90,54,.22); }
.primary:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.primary:disabled { cursor: not-allowed; opacity: .38; box-shadow: none; }
.secondary { margin-top: 10px; border: 1px solid var(--line); color: var(--text); background: transparent; }
.privacy { margin: 15px 0 0; color: var(--muted); text-align: center; font-size: .78rem; }
.privacy span { color: var(--good); margin-right: 4px; }

.queue-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.queue h2 { margin: 0; font-size: 1.65rem; letter-spacing: -.03em; }
.text-button { border: 0; color: var(--muted); background: transparent; text-decoration: underline; cursor: pointer; padding: 4px; }
.progress-track { height: 8px; margin-top: 28px; overflow: hidden; border-radius: 99px; background: #07111f; }
.progress-track div { height: 100%; width: 0; background: linear-gradient(90deg, var(--burst), var(--burst-2)); transition: width .28s ease; }
.progress-label { color: var(--muted); font-size: .8rem; margin: 8px 0 22px; }
.current-part { display: grid; grid-template-columns: 54px minmax(0,1fr) auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: #091727; }
.part-number { width: 54px; height: 54px; display: grid; place-items: center; background: var(--panel-2); border-radius: 12px; color: var(--burst-2); font-weight: 950; }
.current-part > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.current-part strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current-part span:not(.status) { color: var(--muted); font-size: .82rem; }
.status { color: var(--burst-2); font-size: .7rem; font-weight: 900; letter-spacing: .1em; }
.burst { margin-top: 18px; }
.burst-icon { font-size: 1.15rem; }
.queue-note { color: var(--muted); font-size: .8rem; text-align: center; line-height: 1.5; margin: 14px 4px 0; }
.hidden { display: none !important; }
.toast { position: fixed; left: 50%; bottom: max(24px, env(safe-area-inset-bottom)); transform: translate(-50%, 25px); opacity: 0; pointer-events: none; color: var(--ink); background: var(--text); border-radius: 999px; padding: 11px 17px; font-weight: 750; font-size: .85rem; transition: .25s ease; z-index: 20; box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 820px) {
  .app-shell { padding-left: 16px; padding-right: 16px; }
  .brandbar { min-height: 70px; }
  .workspace { display: block; min-height: auto; padding: 36px 0 56px; }
  .intro { padding: 0 4px 30px; }
  h1 { font-size: clamp(2.75rem, 13vw, 4.5rem); }
  .lede { margin-top: 20px; font-size: 1rem; }
  .device-pill { max-width: 46%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

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