:root {
  color-scheme: dark;
  --bg: #0a0f0e;
  --surface: #101716;
  --surface-raised: #151e1c;
  --surface-soft: #1a2421;
  --line: rgba(220, 255, 236, 0.11);
  --line-strong: rgba(220, 255, 236, 0.2);
  --text: #f4f8f4;
  --text-soft: #c2cbc5;
  --muted: #85918a;
  --accent: #aef55e;
  --accent-soft: rgba(174, 245, 94, 0.12);
  --teal: #55d6be;
  --danger: #ff786e;
  --warning: #ffc35a;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  --max-width: 1280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 98px;
}

body {
  min-width: 320px;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 14% 4%, rgba(85, 214, 190, 0.08), transparent 28rem),
    radial-gradient(circle at 86% 14%, rgba(174, 245, 94, 0.06), transparent 24rem),
    var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.5;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-image: radial-gradient(rgba(210, 237, 220, 0.08) 0.75px, transparent 0.75px);
  background-size: 24px 24px;
  content: "";
  opacity: 0.35;
  pointer-events: none;
}

button,
input {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #10180c;
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  z-index: 40;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 76px;
  padding: 14px max(24px, calc((100vw - var(--max-width)) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(10, 15, 14, 0.82);
  backdrop-filter: blur(20px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 21px;
  font-weight: 750;
  letter-spacing: -0.03em;
}

.brand img {
  border-radius: 13px;
  box-shadow: 0 8px 28px rgba(174, 245, 94, 0.08);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.api-state {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-right: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px rgba(255, 195, 90, 0.1);
}

.api-state[data-state="online"] .status-dot {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(174, 245, 94, 0.1);
}

.api-state[data-state="offline"] .status-dot {
  background: var(--danger);
  box-shadow: 0 0 0 4px rgba(255, 120, 110, 0.1);
}

.button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.button:focus-visible,
.icon-button:focus-visible,
input:focus-visible,
.drop-zone:focus-within {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.button-primary {
  background: var(--accent);
  color: #11190d;
  box-shadow: 0 8px 24px rgba(174, 245, 94, 0.08);
}

.button-primary:hover:not(:disabled) {
  background: #bafc71;
  box-shadow: 0 10px 30px rgba(174, 245, 94, 0.15);
}

.button-quiet {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.025);
  color: var(--text-soft);
}

.button-quiet:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--surface-soft);
  color: var(--text);
}

.button-small {
  min-height: 38px;
  padding: 0 14px;
  font-size: 13px;
}

.button-large {
  min-height: 54px;
  padding: 0 24px;
}

.hero,
.workspace,
.projects-section,
.site-footer {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.hero {
  display: grid;
  min-height: 555px;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  align-items: center;
  gap: clamp(48px, 8vw, 118px);
  padding: 88px 0 82px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 17px;
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow > span {
  width: 24px;
  height: 1px;
  background: var(--accent);
}

.hero h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(48px, 6vw, 78px);
  font-weight: 560;
  letter-spacing: -0.062em;
  line-height: 0.99;
}

.hero h1 em {
  color: var(--accent);
  font-style: normal;
  font-weight: 680;
}

.hero-lead {
  max-width: 590px;
  margin: 27px 0 30px;
  color: var(--text-soft);
  font-size: 18px;
  line-height: 1.65;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 19px;
}

.hero-note {
  color: var(--muted);
  font-size: 12px;
}

.capture-guide {
  position: relative;
  padding: 27px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(25, 36, 33, 0.96), rgba(14, 21, 19, 0.96));
  box-shadow: var(--shadow);
}

.capture-guide::after {
  position: absolute;
  z-index: -1;
  right: -30px;
  bottom: -30px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(174, 245, 94, 0.06);
  content: "";
  filter: blur(45px);
}

.guide-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.phone-icon {
  display: grid;
  width: 45px;
  height: 45px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(174, 245, 94, 0.23);
  border-radius: 13px;
  background: var(--accent-soft);
  color: var(--accent);
}

.phone-icon svg {
  width: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.7;
}

.mini-label {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.guide-heading h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.02em;
}

.guide-list {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 8px 0 7px;
  list-style: none;
}

.guide-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.guide-list li:last-child {
  border-bottom: 0;
}

.guide-list li > span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  font-weight: 800;
}

.guide-list strong {
  display: block;
  margin-bottom: 3px;
  font-size: 14px;
}

.guide-list p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.guide-footer {
  display: flex;
  gap: 9px;
  margin: 0;
  padding: 13px 14px;
  border-radius: 10px;
  background: rgba(85, 214, 190, 0.07);
  color: #a9c8bf;
  font-size: 11px;
  line-height: 1.45;
}

.guide-footer svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--teal);
  stroke-linecap: round;
  stroke-width: 1.5;
}

.workspace,
.projects-section {
  padding: 72px 0;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 590;
  letter-spacing: -0.045em;
}

.section-heading > p {
  max-width: 420px;
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.upload-card {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(16, 23, 22, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.form-column,
.upload-column {
  padding: clamp(24px, 4vw, 40px);
}

.form-column {
  border-right: 1px solid var(--line);
}

.field-label {
  display: block;
  margin: 0 0 10px;
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.025em;
}

.text-field {
  position: relative;
  margin-bottom: 29px;
}

.text-field input {
  width: 100%;
  min-height: 50px;
  padding: 0 58px 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  outline: none;
  background: #0d1412;
  color: var(--text);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.text-field input::placeholder {
  color: #66716b;
}

.text-field input:focus {
  border-color: rgba(174, 245, 94, 0.6);
  box-shadow: 0 0 0 3px rgba(174, 245, 94, 0.07);
}

.text-field span {
  position: absolute;
  top: 50%;
  right: 14px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  transform: translateY(-50%);
}

.quality-fieldset {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  border: 0;
}

.quality-option {
  position: relative;
  display: grid;
  min-height: 70px;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.012);
  cursor: pointer;
  transition: border-color 160ms ease, background 160ms ease;
}

.quality-option:hover {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.025);
}

.quality-option:has(input:checked) {
  border-color: rgba(174, 245, 94, 0.46);
  background: var(--accent-soft);
}

.quality-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.quality-radio {
  display: grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid #5e6a63;
  border-radius: 50%;
}

.quality-radio::after {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 160ms ease, transform 160ms ease;
}

.quality-option input:checked + .quality-radio {
  border-color: var(--accent);
}

.quality-option input:checked + .quality-radio::after {
  opacity: 1;
  transform: scale(1);
}

.quality-option:has(input:focus-visible) {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.quality-copy {
  display: grid;
  gap: 4px;
}

.quality-copy > span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.quality-copy strong {
  font-size: 13px;
}

.quality-copy b {
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--accent);
  color: #15200e;
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.quality-copy small,
.quality-time {
  color: var(--muted);
  font-size: 10px;
}

.quality-time {
  white-space: nowrap;
}

.drop-zone {
  position: relative;
  display: grid;
  min-height: 248px;
  place-items: center;
  border: 1px dashed rgba(174, 245, 94, 0.35);
  border-radius: 15px;
  background:
    radial-gradient(circle at 50% 30%, rgba(174, 245, 94, 0.06), transparent 11rem),
    rgba(8, 13, 12, 0.6);
  transition: border-color 160ms ease, background 160ms ease, transform 160ms ease;
}

.drop-zone[data-dragging="true"] {
  border-color: var(--accent);
  background: rgba(174, 245, 94, 0.09);
  transform: scale(1.006);
}

.drop-zone[data-state="ready"] {
  min-height: 170px;
  place-items: stretch;
  border-style: solid;
  border-color: var(--line-strong);
}

.drop-zone > input {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  opacity: 0;
}

.drop-zone[data-state="ready"] > input {
  pointer-events: none;
}

.drop-empty {
  display: grid;
  justify-items: center;
  padding: 24px;
  text-align: center;
}

.upload-icon {
  display: grid;
  width: 53px;
  height: 53px;
  margin-bottom: 14px;
  place-items: center;
  border: 1px solid rgba(174, 245, 94, 0.2);
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent);
}

.upload-icon svg {
  width: 25px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.65;
}

.drop-empty strong {
  font-size: 15px;
}

.drop-empty p {
  margin: 4px 0 13px;
  color: var(--muted);
  font-size: 12px;
}

.drop-empty p span {
  color: var(--accent);
  font-weight: 700;
}

.drop-empty small {
  color: #66716b;
  font-size: 10px;
}

.file-preview {
  position: relative;
  z-index: 4;
  display: grid;
  min-width: 0;
  grid-template-columns: 122px 1fr auto;
  align-items: center;
  gap: 17px;
  padding: 22px;
}

.file-thumb {
  position: relative;
  height: 94px;
  overflow: hidden;
  border-radius: 10px;
  background: #060a09;
}

.file-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.file-thumb > span {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  border-radius: 50%;
  background: rgba(8, 13, 12, 0.78);
  color: white;
  transform: translate(-50%, -50%);
  backdrop-filter: blur(6px);
}

.file-thumb svg {
  width: 19px;
  fill: currentColor;
}

.file-meta {
  min-width: 0;
}

.file-meta strong {
  display: block;
  overflow: hidden;
  margin-bottom: 4px;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-meta > span,
.file-meta p {
  color: var(--muted);
  font-size: 11px;
}

.file-meta p {
  margin: 8px 0 0;
  color: #a5b3aa;
}

.file-meta p[data-state="warning"] {
  color: var(--warning);
}

.icon-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--line-strong);
  color: var(--text);
}

.icon-button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.upload-progress {
  margin-top: 18px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.018);
}

.progress-heading,
.pipeline-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 9px;
  color: var(--text-soft);
  font-size: 11px;
}

.progress-heading strong,
.pipeline-heading span {
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.progress-track {
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.progress-track > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  transition: width 260ms ease;
}

.upload-progress small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.form-error {
  margin: 13px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(255, 120, 110, 0.25);
  border-radius: 9px;
  background: rgba(255, 120, 110, 0.08);
  color: #ffaaa4;
  font-size: 11px;
}

.button-submit {
  width: 100%;
  min-height: 51px;
  margin-top: 18px;
}

.privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.privacy-note svg {
  width: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.6;
}

.projects-heading {
  align-items: center;
}

.projects-heading .refresh-icon {
  width: 15px;
}

.projects-layout {
  display: grid;
  min-height: 530px;
  grid-template-columns: 350px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(16, 23, 22, 0.92);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.project-list-panel {
  border-right: 1px solid var(--line);
  background: rgba(7, 12, 11, 0.28);
}

.project-list {
  display: grid;
  max-height: 760px;
  overflow-y: auto;
  scrollbar-color: #33423c transparent;
  scrollbar-width: thin;
}

.list-loading,
.list-empty,
.list-error {
  display: flex;
  min-height: 350px;
  flex-wrap: wrap;
  align-content: center;
  justify-content: center;
  padding: 40px;
  color: var(--muted);
  text-align: center;
}

.list-loading span {
  width: 6px;
  height: 6px;
  margin: 0 3px;
  border-radius: 50%;
  background: var(--accent);
  animation: bounce 1s infinite alternate;
}

.list-loading span:nth-child(2) {
  animation-delay: 150ms;
}

.list-loading span:nth-child(3) {
  animation-delay: 300ms;
}

.list-loading p {
  width: 100%;
  margin: 15px 0 0;
  font-size: 12px;
}

@keyframes bounce {
  to { transform: translateY(-7px); opacity: 0.5; }
}

.list-empty,
.list-error {
  flex-direction: column;
  align-items: center;
}

.list-empty strong,
.list-error strong {
  margin-bottom: 5px;
  color: var(--text-soft);
  font-size: 14px;
}

.list-empty p,
.list-error p {
  margin: 0;
  font-size: 11px;
}

.project-card {
  display: grid;
  grid-template-columns: 41px 1fr auto;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 17px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: background 150ms ease;
}

.project-card:hover,
.project-card[aria-current="true"] {
  background: rgba(255, 255, 255, 0.035);
}

.project-card[aria-current="true"] {
  box-shadow: inset 3px 0 var(--accent);
}

.project-card:focus-visible {
  z-index: 1;
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.project-icon {
  display: grid;
  width: 41px;
  height: 41px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface-soft);
  color: var(--text-soft);
}

.project-icon svg {
  width: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.4;
}

.project-icon[data-state="completed"] {
  border-color: rgba(174, 245, 94, 0.22);
  background: var(--accent-soft);
  color: var(--accent);
}

.project-icon[data-state="failed"] {
  border-color: rgba(255, 120, 110, 0.22);
  background: rgba(255, 120, 110, 0.08);
  color: var(--danger);
}

.project-card-copy {
  min-width: 0;
}

.project-card-copy strong {
  display: block;
  overflow: hidden;
  margin-bottom: 3px;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-card-copy span {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.project-card-progress {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 9px;
}

.project-card-progress i {
  display: block;
  width: 30px;
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
}

.project-card-progress i::after {
  display: block;
  width: var(--progress, 0%);
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  content: "";
}

.project-detail {
  position: relative;
  min-width: 0;
  min-height: 530px;
  padding: clamp(24px, 4vw, 38px);
}

.detail-empty {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 36px;
  text-align: center;
}

.detail-empty > span {
  display: grid;
  width: 66px;
  height: 66px;
  margin-bottom: 16px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-soft);
  color: #637169;
}

.detail-empty svg {
  width: 37px;
  fill: none;
  stroke: currentColor;
  stroke-linejoin: round;
  stroke-width: 1.25;
}

.detail-empty h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.detail-empty p {
  max-width: 320px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.detail-content {
  display: grid;
  gap: 24px;
}

.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.detail-header h3 {
  margin: 0;
  font-size: clamp(21px, 3vw, 28px);
  font-weight: 610;
  letter-spacing: -0.035em;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 195, 90, 0.22);
  border-radius: 999px;
  background: rgba(255, 195, 90, 0.08);
  color: var(--warning);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-chip::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-chip[data-state="completed"] {
  border-color: rgba(174, 245, 94, 0.22);
  background: var(--accent-soft);
  color: var(--accent);
}

.status-chip[data-state="failed"] {
  border-color: rgba(255, 120, 110, 0.22);
  background: rgba(255, 120, 110, 0.08);
  color: var(--danger);
}

.detail-error {
  display: flex;
  gap: 12px;
  padding: 14px;
  border: 1px solid rgba(255, 120, 110, 0.2);
  border-radius: 11px;
  background: rgba(255, 120, 110, 0.07);
  color: #ffaaa4;
}

.detail-error svg {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.6;
}

.detail-error strong {
  display: block;
  font-size: 12px;
}

.detail-error p {
  margin: 3px 0 0;
  color: #dc8e89;
  font-size: 10px;
}

.viewer-shell {
  position: relative;
  min-height: 390px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 16px;
  background:
    radial-gradient(circle at 50% 40%, rgba(85, 214, 190, 0.08), transparent 18rem),
    #080d0c;
}

model-viewer {
  width: 100%;
  height: 390px;
  --poster-color: transparent;
  --progress-bar-color: var(--accent);
}

.viewer-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
}

.viewer-progress span {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
}

.viewer-toolbar {
  position: absolute;
  right: 14px;
  bottom: 13px;
  left: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.viewer-toolbar > span {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(8, 13, 12, 0.72);
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 700;
  backdrop-filter: blur(8px);
}

.viewer-toolbar > span i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.viewer-toolbar > div {
  display: flex;
  gap: 6px;
}

.viewer-control {
  width: 31px;
  height: 31px;
  background: rgba(8, 13, 12, 0.72);
  color: var(--text-soft);
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.viewer-ar-button {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 8px;
  background: rgba(8, 13, 12, 0.75);
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
}

.pipeline-block {
  padding: 18px 19px 15px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.014);
}

.pipeline-heading strong {
  font-size: 11px;
}

.detail-progress {
  margin-bottom: 21px;
}

.pipeline {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: 0;
  padding: 0;
  list-style: none;
}

.pipeline li {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #647069;
  font-size: 9px;
  text-align: center;
}

.pipeline li::before {
  z-index: 1;
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  border: 1px solid #3c4842;
  border-radius: 50%;
  background: #111816;
  content: attr(data-index);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 8px;
}

.pipeline li::after {
  position: absolute;
  z-index: 0;
  top: 10px;
  left: calc(50% + 11px);
  width: calc(100% - 22px);
  height: 1px;
  background: #324039;
  content: "";
}

.pipeline li:last-child::after {
  display: none;
}

.pipeline li[data-state="done"],
.pipeline li[data-state="active"] {
  color: var(--text-soft);
}

.pipeline li[data-state="done"]::before {
  border-color: var(--accent);
  background: var(--accent);
  color: #10180c;
  content: "✓";
}

.pipeline li[data-state="done"]::after {
  background: var(--accent);
}

.pipeline li[data-state="active"]::before {
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px rgba(174, 245, 94, 0.08);
}

.pipeline li[data-state="failed"]::before {
  border-color: var(--danger);
  color: var(--danger);
  content: "!";
}

.detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.button-share {
  min-width: 145px;
}

.detail-created {
  color: var(--muted);
  font-size: 10px;
}

.toast-region {
  position: fixed;
  z-index: 80;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 40px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: rgba(21, 30, 28, 0.96);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.35);
  color: var(--text-soft);
  font-size: 11px;
  animation: toast-in 230ms ease both;
  backdrop-filter: blur(12px);
}

.toast::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  margin-top: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.toast[data-state="error"]::before {
  background: var(--danger);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.site-footer {
  display: flex;
  min-height: 116px;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}

.footer-brand {
  color: var(--text);
  font-size: 17px;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 980px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 52px;
    padding: 70px 0;
  }

  .capture-guide {
    max-width: 680px;
  }

  .upload-card {
    grid-template-columns: 1fr;
  }

  .form-column {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .projects-layout {
    grid-template-columns: 300px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .site-header {
    min-height: 66px;
    padding-inline: 18px;
  }

  .header-actions .button-quiet,
  .api-state {
    display: none;
  }

  .header-actions .button-primary {
    min-height: 36px;
  }

  .hero,
  .workspace,
  .projects-section,
  .site-footer {
    width: min(calc(100% - 30px), var(--max-width));
  }

  .hero {
    gap: 40px;
    padding: 54px 0 58px;
  }

  .hero h1 {
    font-size: clamp(41px, 12vw, 58px);
  }

  .hero-lead {
    font-size: 16px;
  }

  .hero-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .capture-guide {
    padding: 21px;
  }

  .workspace,
  .projects-section {
    padding: 55px 0;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 13px;
  }

  .section-heading > p {
    text-align: left;
  }

  .projects-heading {
    flex-direction: row;
  }

  .projects-layout {
    grid-template-columns: 1fr;
  }

  .project-list-panel {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .project-list {
    max-height: 310px;
  }

  .list-loading,
  .list-empty,
  .list-error {
    min-height: 220px;
  }

  .project-detail {
    min-height: 500px;
  }

  .pipeline li {
    font-size: 8px;
  }

  .site-footer {
    min-height: 150px;
    align-items: flex-start;
    justify-content: center;
    flex-direction: column;
    padding: 30px 0;
  }
}

@media (max-width: 520px) {
  .brand {
    font-size: 19px;
  }

  .brand img {
    width: 37px;
    height: 37px;
  }

  .hero h1 {
    letter-spacing: -0.055em;
  }

  .capture-guide,
  .upload-card,
  .projects-layout {
    border-radius: 17px;
  }

  .form-column,
  .upload-column,
  .project-detail {
    padding: 22px 18px;
  }

  .quality-option {
    grid-template-columns: 18px 1fr;
  }

  .quality-time {
    display: none;
  }

  .file-preview {
    grid-template-columns: 82px 1fr auto;
    padding: 15px;
  }

  .file-thumb {
    height: 72px;
  }

  .pipeline-block {
    padding-inline: 12px;
  }

  .pipeline li span {
    max-width: 53px;
  }

  .detail-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .button-share {
    width: 100%;
  }

  .viewer-shell,
  model-viewer {
    min-height: 310px;
    height: 310px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
