:root {
  --primary: #d946ef;
  --primary-hover: #c026d3;
  --surface: #ffffff;
  --bg: #f8fafc;
  --text: #0f172a;
  --text-muted: #64748b;
  --border: #e2e8f0;
  --radius-lg: 16px;
  --radius-md: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero-sec {
  max-width: 960px;
  margin: 2.5rem auto 1.5rem auto;
  padding: 0 1.25rem;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #c026d3;
  background: rgba(217, 70, 239, 0.1);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 0.75rem;
  border: 1px solid rgba(217, 70, 239, 0.25);
}

.hero-title {
  font-size: 2.2rem;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero-sub {
  font-size: 1rem;
  color: #64748b;
  max-width: 650px;
  margin: 0 auto;
}

.app-box {
  max-width: 1080px;
  margin: 1.5rem auto 3rem auto;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  padding: 20px;
  box-sizing: border-box;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.03);
}

.dropzone {
  border: 2px dashed #cbd5e1;
  border-radius: var(--radius-md);
  padding: 3.5rem 1.5rem;
  text-align: center;
  cursor: pointer;
  background: #f8fafc;
  position: relative;
  transition: all 0.2s ease;
}

.dropzone:hover {
  border-color: var(--primary);
  background: #fdf4ff;
}

.dropzone h3 {
  color: #0f172a;
  font-weight: 700;
}

.dropzone p {
  color: #64748b;
}

.dropzone input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

/* =========================================================================
   PC Demo Presets Bar
   ========================================================================= */
.pc-demo-sec {
  max-width: 1080px;
  margin: 0 auto 1.25rem auto;
  padding: 0 0.5rem;
}

.pc-demo-bar {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
  flex-wrap: wrap;
}

.pc-demo-label {
  font-size: 0.88rem;
  font-weight: 800;
  color: #0f172a;
  white-space: nowrap;
}

.pc-demo-pills {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  flex: 1;
}

.pc-demo-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 24px;
  padding: 6px 14px;
  font-size: 0.84rem;
  font-weight: 700;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}

.pc-demo-pill:hover {
  border-color: #d946ef;
  color: #c026d3;
  background: #fdf4ff;
  transform: translateY(-1px);
}

.pc-demo-pill.active {
  background: #fdf4ff;
  border-color: #d946ef;
  color: #c026d3;
  box-shadow: 0 2px 10px rgba(217, 70, 239, 0.2);
}

.pill-tag {
  font-size: 0.72rem;
  background: #f1f5f9;
  color: #64748b;
  padding: 1px 6px;
  border-radius: 10px;
}

.pc-demo-pill.active .pill-tag {
  background: rgba(217, 70, 239, 0.15);
  color: #c026d3;
}

.pc-upload-pill {
  margin-left: auto;
  background: #faf5ff;
  border-color: #d8b4fe;
  color: #7e22ce;
}
.pc-upload-pill:hover {
  background: #f3e8ff;
  border-color: #a855f7;
  color: #6b21a8;
}

/* =========================================================================
   PC Prominent Upload Card
   ========================================================================= */
.pc-upload-card {
  background: #fdf4ff;
  border: 2px dashed #d946ef;
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
  margin-bottom: 1.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pc-upload-card:hover, .pc-upload-card.drag-over {
  background: #fae8ff;
  border-color: #c026d3;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(217, 70, 239, 0.15);
}

.pc-upload-content {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.pc-upload-icon-circle {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(217, 70, 239, 0.2);
  flex-shrink: 0;
}

.pc-upload-info {
  flex: 1;
}

.pc-upload-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 0.2rem;
}

.pc-upload-desc {
  font-size: 0.82rem;
  color: #64748b;
}

.btn-pc-upload-cta {
  background: linear-gradient(135deg, #d946ef, #c026d3);
  color: #ffffff;
  border: none;
  padding: 0.6rem 1.3rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 800;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 10px rgba(217, 70, 239, 0.25);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-pc-upload-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(217, 70, 239, 0.35);
}

/* Full Panorama Viewport & Overlay Guides */
.pc-pano-full-viewport {
  width: 100%;
  max-width: 1040px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  background: #090d16;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.pano-full-img {
  width: 100%;
  height: auto;
  max-height: 460px;
  display: block;
  object-fit: contain;
}

.pano-slice-guides {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pano-crop-box {
  position: absolute;
  display: flex;
  border: 2px solid #d946ef;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
}

.pano-slice-guide-col {
  height: 100%;
  position: relative;
  border-right: 2px dashed rgba(255, 255, 255, 0.85);
  box-sizing: border-box;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 10px;
}

.pano-slice-guide-col:last-child {
  border-right: none;
}

.guide-slice-num {
  background: rgba(217, 70, 239, 0.9);
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
}

/* =========================================================================
   Workspace & Toolbar
   ========================================================================= */
.workspace-wrap {
  display: none;
  flex-direction: column;
  gap: 1.5rem;
}

.workspace-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.85rem 1.25rem;
}

.toolbar-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.toolbar-label {
  font-size: 0.85rem;
  font-weight: 800;
  color: #1e293b;
  white-space: nowrap;
}

.toolbar-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-left: auto;
}

.mode-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.mode-btn {
  background: #ffffff;
  border: 1.5px solid #cbd5e1;
  color: #475569;
  padding: 0.45rem 0.95rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mode-btn:hover {
  border-color: #d946ef;
  color: #c026d3;
}

.mode-btn.active {
  border-color: #d946ef;
  background: #fdf4ff;
  color: #c026d3;
  box-shadow: 0 2px 8px rgba(217, 70, 239, 0.2);
}

.slice-dim-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  padding: 4px 10px;
  border-radius: 6px;
}

.btn-pc-reupload {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-pc-reupload:hover {
  border-color: #d946ef;
  color: #c026d3;
  background: #fdf4ff;
}

/* =========================================================================
   Stage Header & Full Slices Preview
   ========================================================================= */
.stage-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0.25rem;
}

.stage-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.stage-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0f172a;
}

.stage-badge-hint {
  font-size: 0.76rem;
  font-weight: 700;
  color: #c026d3;
  background: #fdf4ff;
  border: 1px solid #f5d0fe;
  padding: 2px 8px;
  border-radius: 6px;
}

/* Slices Stage Grid */
.stage-slices {
  display: flex;
  gap: 16px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  background: #f8fafc;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.5rem;
  min-height: 280px;
}

/* Full Slice Card */
.slice-card-full {
  flex: 1 1 200px;
  max-width: 320px;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  display: flex;
  flex-direction: column;
  transition: all 0.2s ease;
}

.slice-card-full:hover {
  transform: translateY(-2px);
  border-color: #d946ef;
  box-shadow: 0 8px 24px rgba(217, 70, 239, 0.15);
}

.slice-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border-bottom: 1px solid #f1f5f9;
}

.slice-seq-badge-full {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f172a;
}

.slice-seq-badge-full .seq-num {
  background: linear-gradient(135deg, #d946ef, #c026d3);
  color: #ffffff;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
}

.slice-full-img-box {
  width: 100%;
  position: relative;
  background: #090d16;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 1;
}

.slice-full-img {
  width: 100%;
  height: auto;
  max-height: 460px;
  display: block;
  object-fit: contain;
}

.slice-card-actions {
  padding: 0.65rem 0.85rem;
  background: #ffffff;
  border-top: 1px solid #f1f5f9;
  margin-top: auto;
}

.btn-slice-dl {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #fdf4ff;
  border: 1.5px solid #f5d0fe;
  color: #c026d3;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 7px 12px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-slice-dl:hover {
  background: #d946ef;
  color: #ffffff;
  border-color: #d946ef;
}

/* Workspace Download Actions */
.workspace-actions {
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
}

.btn-download {
  background: linear-gradient(135deg, #d946ef, #c026d3);
  color: white;
  font-weight: 800;
  padding: 0.85rem 2.5rem;
  border-radius: 12px;
  border: none;
  font-size: 1.05rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 18px rgba(217, 70, 239, 0.35);
  transition: all 0.15s ease;
}

.btn-download:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(217, 70, 239, 0.45);
}