/* ========== SHELL LAYOUT ========== */

html {
  font-size: 12px; /* was effectively ~14–15px */
}

html, body{
  margin: 0;
  padding: 0;
}

.tutorial-page .page{
  width: 100%;
  max-width: none !important;   /* kill the centered max-width */
  margin: 0 !important;
  padding-left: 48px;   /* ← increase this */
  padding-right: 48px;          
}

.tutorial-shell{
  display: grid;
  grid-template-columns: 260px 600px 200px;
  gap: 24px;
  min-height: 100vh;
  align-items: start;
  justify-content: start;   
}

/* left menu */

.process-menu {
  border-right: 1px solid #eee;
  padding-right: 0px;
  padding-top: 4px;
  max-width: 240px;
}

.process-menu-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: #999;
  margin-bottom: 8px;
}

.process-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.process-nav-item {
  background: none !important;
}


.process-nav-item:hover {
  background: #f4f4f4;
  width: 210px;
}

/* Active tab background is applied only to the top row */
.process-nav-item--has-steps.active .process-main,
.process-nav-item.active .process-main {
  background: #111;
  color: #fff;
  border-radius: 999px;
  padding: 6px 6px;   /* same padding as before */
  font-size: 12px;
  width: 240px;
}

/* Default (non-active) tab */
.process-main {
  padding: 6px 6px;
  border-radius: 999px;
  transition: background 0.2s ease;
}

/* Hover state */
.process-main:hover {
  background: #f4f4f4;
}

.process-index {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
}

.process-label {
  flex: 1;
}

/*content area */

.process-content {
  position: relative;
  padding: 0px;
  min-width: 0;
  display: block;
  justify-content: flex-start; /* keep content near the left edge of the right column */
  align-items: flex-start;
  grid-column: 2;
}

/* each process screen takes over the content area */

.process-screen {
  display: none;
  animation: fadeInProcess 0.25s ease-out;
  width: 600px; 
  height: 300px;             /* hard match the grid column */
}

.process-screen.active {
  display: block;
}

@keyframes fadeInProcess {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* process header */

.process-header {
  margin-bottom: 16px;
}

.process-header h1 {
  font-size: 18px;
  margin: 2px 0 0;
}

.process-tag {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #999;
}

/* Right column container (grid column 3) */
.process-sidebar{
  grid-column: 3;
  padding: 24px 24px;
  border-left: 1px solid #eee;
  min-width: 0;
}

/* Optional styling */
.sidebar-panel{
  border: 1px solid #eee;
  background: #fafafa;
  border-radius: 12px;
  padding: 16px;
}

.sidebar-title{
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #999;
  margin-bottom: 6px;
}

.sidebar-subtitle{
  font-size: 14px;
  margin-bottom: 14px;
}

.sidebar-actions{
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

/* ---- Right panel container like your screenshot ---- */
.glaze-panel{
  background: transparent;
  border: none;
  padding: 0;
}

/* header */
.glaze-panel-head{
  margin-bottom: 14px;
}

.glaze-panel-title{
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
}

.glaze-panel-desc{
  font-size: 13px;
  line-height: 1.55;
  color: #6f6f6f;
  max-width: 320px;
}

/* pills list */
.glaze-pills{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 12px 0 16px;
}

/* each pill */
.glaze-pill{
  display: flex;
  align-items: center;
  gap: 12px;

  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid #e6e6e6;
  background: #fff;

  cursor: pointer;
  user-select: none;
}

/* hide radio but keep accessible */
.glaze-pill input{
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* dot */
.glaze-dot{
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--dot, #ddd);
  border: 1px solid rgba(0,0,0,0.08);
  flex: 0 0 auto;
}

.glaze-name{
  font-size: 14px;
  font-weight: 600;
  color: #111;
}

/* selected pill state (thicker/darker outline like screenshot) */
.glaze-pill:has(input:checked){
  border-color: #111;
  box-shadow: 0 0 0 1px #111 inset;
}

/* hover (subtle) */
.glaze-pill:hover{
  border-color: #cfcfcf;
}

/* fired button */
.glaze-fired-btn{
  width: 100%;
  padding: 6px 18px;
  border-radius: 999px;

  border: 1px solid #e6e6e6;
  background: #f4f4f4;
  color: #6f6f6f;

  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

/* shared text styles */

.step-list {
  font-size: 14px;
  line-height: 1.5;
  padding-left: 18px;
  margin: 0 0 12px;
}

.body-text {
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 10px;
}

.primary-btn,
.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  font-size: 14px;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  margin: 6px 0 10px;
}

.primary-btn {
  border: 1px solid #111;
  background: #111;
  color: #fff;
}

.secondary-btn {
  border: 1px solid #ccc;
  background: #f7f7f7;
  color: #444;
}

.small-note {
  font-size: 11px;
  color: #777;
  margin: 0 0 12px;
}

/* ========== CLAY PROCESS LAYOUT ========== */

.clay-layout {
  display: flex;
  flex-direction: column;   /* keep this */
  align-items: flex-start;
  gap: 24px;
  width: 800px;        /* unified width */
  max-width: 100%;
}

/* reverse the natural order inside the layout */
.clay-layout > .scan-panel {
  order: -1;   /* puts scan panel first */
}

/* clay stepper */

.clay-column {
  width: 100%; 
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clay-stepper {
  position: relative;
  margin: 6px 0 4px;
  padding: 16px 18px;
  border-radius: 12px;
  border: 1px solid #eee;
  background: #fafafa;
  display: flex;
  align-items: center;
  gap: 8px;
}

.clay-step-wrapper {
  flex: 1;
  min-height: 80px;
}

.clay-step {
  display: none;
}

.clay-step.active {
  display: block;
}

.clay-step-menu-item {
  padding-left: 22px;
  cursor: pointer;
  opacity: 0.7;
  line-height: 2;
  transition: font-weight 0.15s ease, opacity 0.15s ease;
  font-weight: 300;
}

.clay-step-menu-item:hover {
  opacity: 1;
  font-weight: 500;
}

/* active step in left menu */
.clay-step-menu-item.active {
  font-weight: 500;
  opacity: 1;
  color: #111;
}

.step-label {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #999;
  margin-bottom: 4px;
}

.step-body {
  font: size 16px;
  line-height: 1.5;
  margin: 0;
}

.step-arrow {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid #ddd;
  background: #fff;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
}

.step-arrow:disabled {
  opacity: 0.35;
  cursor: default;
}

/* scan panel */

.scan-panel {
  width: 100%;         
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.scan-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 5 / 2.3;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #f8f8f8;
}

.scan-stage{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#glaze-model{
  width: 100%;
  height: 100%;
  display: none;
}

.scan-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-video.active {
  display: block;
}

.scan-image.hidden {
  display: none;
}

.scan-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scan-image.hidden {
  display: none;
}

.scan-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-video.active {
  display: block;
}

/* shape overlay using shape.png */
.shape-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.shape-overlay img {
  max-width: 70%;
  max-height: 70%;
  opacity: 60%;
}

.shape-overlay.active {
  opacity: 1;
}

/* scan overlay already animates the line – keep your existing keyframes */

#scan-start-btn {
  display: none;          /* only shown once user clicks check-bowl */
  margin-top: 8px;
}

/* greyed-out state before camera is ready */
#scan-start-btn.is-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}


/* fake scanning overlay */

.scan-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  display: none;
  overflow: hidden;
}

.scan-overlay.active {
  display: block;
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  animation: scan-move 1.3s linear infinite;
}

@keyframes scan-move {
  0% {
    top: 0%;
  }
  50% {
    top: 50%;
  }
  100% {
    top: 100%;
  }
}

.scan-status {
  font-size: 12px;
  color: #777;
}

.scan-instruction {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 10px;
  font-size: 14px;
  line-height: 1.3;
  color: #444;
  text-align: center;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  border-radius: 4px;
  pointer-events: none; /* doesn’t block clicks */
  opacity: 0;
  transition: opacity 0.25s ease;
}
.scan-instruction.visible {
  opacity: 1;
}

/* ========== SUCCESS POPUP (for schedule pages) ========== */

.success-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none; /* so it doesn't block clicks */
  padding-top: 80px;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 2000;
}

.success-popup .popup-box {
  background: #111;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.08em;
}

/* When we add .show from JS, animate it in */
.success-popup.show {
  opacity: 1;
  transform: translateY(0);
}

@keyframes popupFade {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.96);
  }
  30% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 1;
  }
}

@keyframes fadeOut {
  0% {
    opacity: 1;
  }
  70% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    display: none;
  }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 900px) {
  .tutorial-shell {
    grid-template-columns: 1fr;
  }

  .process-menu {
    border-right: none;
    border-bottom: 1px solid #eee;
    padding-bottom: 8px;
    margin-bottom: 12px;
  }

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

@media (max-width: 600px) {
  .clay-stepper {
    padding: 12px 10px;
  }

  .step-arrow {
    width: 24px;
    height: 24px;
    font-size: 12px;
  }

  .step-body {
    font-size: 12px;
  }
}

/* Remove top spacing reserved for header */
.page {
  padding-top: 100px !important;
}

/* Tutorial page shouldn’t show side labels */
.side-label {
  display: none !important;
}

/* Remove the empty space that header used to take */
.tutorial-page header {
  display: none !important;
}

.announcement {
  display: none !important;
}

.primary-btn {
  background: #fff;
  color: #111;
  border: 1px solid #111;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.primary-btn:hover {
  background: #111;
  color: #fff;
}

.scan-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.scan-image.hidden {
  display: none;
}

.scan-video {
  display: none;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.scan-video.active {
  display: block;
}

/* bowl outline overlay */
.bowl-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.bowl-overlay::before {
  content: "";
  width: 60%;
  height: 45%;
  border-radius: 50% 50% 45% 45%;
  border: 2px dashed rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15) inset;
}

/* when active, show the outline */
.bowl-overlay.active {
  opacity: 1;
}

/* scan overlay and scan line already exist, keep them */
/* ... */

/* "Scan and check" button is hidden until user clicks check-bowl-btn */
#scan-start-btn {
  display: none;
  margin-top: 8px;
}

#bisque-next-btn {
  background: white;
  color: black;
  border: 1px solid black;
  transition: background 0.2s ease, color 0.2s ease;
}

#bisque-next-btn:hover {
  background: black;
  color: white;
  cursor: pointer;
}

#success-popup {
  display: none;     /* <-- IMPORTANT */
}
#success-popup.show {
  display: flex;
}

.hidden {
  display: none !important;
}

.exit-tutorial-btn {
  position: fixed;
  top: 22px;
  left: 26px;
  z-index: 9999;
  font-size: 22px;
  text-decoration: none;
  color: #000;
  opacity: 0.7;
  padding: 6px 6px;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.exit-tutorial-btn:hover {
  opacity: 1;
  color: #000;
  background: #f2f2f2;
}

.glaze-texture-overlay {
  position: absolute;
  inset: 0;               /* top:0; right:0; bottom:0; left:0; */
  pointer-events: none;
  background-image: url('assets/speckled-texture.png'); /* make a tileable PNG */
  background-size: cover;
  opacity: 0.4;
  mix-blend-mode: multiply;
  display: none;          /* hidden by default */
}

/* Glaze speckle / watercolor overlay */
.glaze-texture-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, filter 0.35s ease;
  mix-blend-mode: multiply;

  /* layered radial gradients to fake speckles */
  background-image:
    radial-gradient(circle at 10% 20%, rgba(0,0,0,0.12) 0, rgba(0,0,0,0) 55%),
    radial-gradient(circle at 70% 80%, rgba(0,0,0,0.10) 0, rgba(0,0,0,0) 55%),
    radial-gradient(circle at 40% 40%, rgba(0,0,0,0.07) 0, rgba(0,0,0,0) 50%);
  background-size: 140px 140px, 120px 120px, 110px 110px;
}

/* subtle speckles while just choosing a glaze */
.glaze-texture-overlay.has-speckles {
  opacity: 0.18;
}

/* stronger speckles + slightly more contrast after firing */
.glaze-texture-overlay.has-speckles.fired {
  opacity: 0.3;
  filter: contrast(1.05) saturate(1.05);
}

/* Process index (01, 02, 03…) */
.process-index {
  font-size: 10px;
  letter-spacing: 0.18em;
}

/* Main process label (clay making, bisque fire…) */
.process-label {
  font-size: 12px;    /* original size */
}

/* Active tab text (so black pill doesn't enlarge it) */
.process-nav-item.active .process-label,
.process-nav-item.active .process-index {
  font-size: 12px;
}

/* Sub-step menu */
.clay-step-menu {
  font-size: 11px;    /* keep this small */
}

/* ------------------- SCAN SUCCESS POPUP (inside scan-frame) ------------------- */

/* make the frame a positioning context */
.scan-frame {
  position: relative;          /* important for centering children */
  overflow: hidden;            /* optional, keeps popup clipped to frame */
}

/* center the scan-complete popup */
.scan-success-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);  /* perfect center */
  display: none;                     /* stays hidden until JS adds .show */
  z-index: 5;                        /* above video/illustration */
  pointer-events: none;              /* clicks go through if you want */
}

/* when JS toggles this class, show it */
.scan-success-popup.show {
  display: block;
}

.scan-success-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  text-align: center;
  font-size: 12px;
}

.scan-success-icon {
  font-size: 20px;
  color: #2ecc71;
  margin-bottom: 4px;
}

.scan-success-title {
  font-size: 14px;
  font-weight: 600;
}

.scan-success-sub {
  font-size: 12px;
  opacity: 0.7;
}

@keyframes popupIn {
  from { transform: translate(-50%, 10px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}

/* ------------------- SCAN ISSUES POPUP (inside scan-frame) ------------------- */

.scan-issues-popup {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 6;           /* above overlay/video */
  pointer-events: none;
}

.scan-issues-popup.show {
  display: block;
}

.scan-issues-box {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.12);
  text-align: center;
  font-size: 12px;
  max-width: 280px;
}

.scan-issues-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 6px;
}

.scan-issues-sub {
  font-size: 12px;
  opacity: 0.75;
}

.scan-overlay { z-index: 3; }
.shape-overlay { z-index: 2; }
.scan-success-popup, .scan-issues-popup { z-index: 6; }

/* ---------- SCAN ISSUE SUMMARY LIST ---------- */

.scan-issue-summary {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 210px;

  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  border-radius: 10px;
  padding: 12px 14px;

  display: none;
  flex-direction: column;
  gap: 8px;

  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
  z-index: 6;
  font-size: 12px;
}

.scan-issue-summary.show {
  display: flex;
}

.scan-issue-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.issue-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.issue-dot.red {
  background: #e74c3c;
}

.issue-dot.orange {
  background: #f39c12;
}

.issue-dot.yellow {
  background: #f1c40f;
}

.issue-text {
  line-height: 1.3;
  color: #333;
}

/* =========================================================
   UNIVERSAL PROCESS LAYOUT (Process 1–5)
   Paste at END of your CSS. Additive + scoped.
   ========================================================= */

/* --- 0) Base shell (menu + right content) --- */
.process-menu{
  width:260px;
  min-width:260px;
}

.tutorial-content{
  flex:1;
  min-width:0; /* prevents overflow pushing content under */
}

/* --- 1) Process screens: only one visible --- */
.process-screen{ display:none; }
.process-screen.active{ display:block; }

/* --- 2) Universal “frame width” matching Process 1 --- */
.process-screen .process-body,
.process-screen .clay-layout,
.process-screen .bisque-layout,
.process-screen .glaze-layout,
.process-screen .step-shell,
.process-screen .steps-tabs,
.process-screen .steps-panels{
  width:800px;
  max-width:100%;
}

/* --- 3) Steps tabs: same style for all processes --- */
/* supports: .steps-tabs .step-tab   AND   Process-1 style: .clay-step-tabs .clay-step-tab */
.process-screen :is(.steps-tabs, .clay-step-tabs){
  display:flex;
  gap:8px;
  margin:14px 0 12px;
}

.process-screen :is(.step-tab, .clay-step-tab){
  appearance:none;
  border:1px solid #e8e8e8;
  background:#fff;
  color:#111;
  padding:8px 10px;
  border-radius:999px;
  font-size:12px;
  cursor:pointer;
}

.process-screen :is(.step-tab, .clay-step-tab):hover{
  background:#f6f6f6;
}

.process-screen :is(.step-tab.active, .clay-step-tab.active){
  background:#111;
  color:#fff;
  border-color:#111;
}

/* --- 4) Step panels: one visible --- */
.process-screen :is(.step-panel, .clay-step-panel){ display:none; }
.process-screen :is(.step-panel.active, .clay-step-panel.active){ display:block; }

/* --- 5) Universal “Process 1 style” step layout (left text + right content) --- */
/* Use .step-shell .step-left .step-right (recommended) */
/* Also supports your existing cards: .clay-stepper, .bisque-stepper, etc. */
.process-screen .step-shell{
  display:flex;
  flex-direction:column;
  gap:16px;
}

.process-screen :is(.step-left, .clay-stepper, .bisque-stepper){
  padding:16px 18px;
  border-radius:12px;
  border:1px solid #eee;
  background:#fafafa;
}

.process-screen :is(.step-right, .scan-panel, .scan-card, .bisque-scan-panel){
  border-radius:14px;
  border:1px solid #eee;
  background:#fff;
  overflow:hidden;
}

/* --- 6) IMPORTANT: stop “Process 3 grid” from breaking consistency --- */
/* If you still have old .glaze-layout grid, force it to behave like the others */
#process-glazing .glaze-layout{
  display:block; /* overrides grid without touching other glaze styles */
}

/* --- 7) Mobile: menu becomes top bar; right stays consistent --- */
@media (max-width: 860px){
  .tutorial-shell{ flex-direction:column; }
  .process-menu{ width:100%; min-width:0; }
}

/* Default: hide glaze tools */
#sidebar-glazing { display: none; }

/* Default: hide glaze tools */
#sidebar-glazing { display: none; }

.glazing-layout{
  display: grid;
  grid-template-columns: 420px minmax(720px, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

/* the main body of process 3 goes in the middle column */
#process-glazing .clay-layout{
  grid-column: 2;
  width: 100%;
  max-width: none;
}

/* glaze tools live in the right column */
#process-glazing #sidebar-glazing{
  grid-column: 3;
  align-self: start;
}

/* hide glaze tools unless process 3 is active */
#process-glazing:not(.active) #sidebar-glazing{
  display: none;
}

/* Process 3: stack scan on top, steps under it */
#process-glazing .glazing-layout{
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 800px;      /* match your frame */
  max-width: 100%;
}

/* Put scan first even if HTML order differs */
#process-glazing .glazing-layout .scan-panel{
  order: -1;
}

/* ===== Process 2 vertical timeline (dots + line) ===== */

.v-timeline{
  list-style:none;
  margin:0;
  padding:0;
  display:flex;
  flex-direction:column;
  gap:18px;
}

.v-tl-item{
  display:grid;
  grid-template-columns: 92px 28px 1fr; /* time | dots/line | content */
  column-gap:14px;
  align-items:start;
  opacity:.55;
}

.v-tl-time{
  font-size:12px;
  color:#666;
  padding-top:2px;
}

.v-tl-marker{
  position:relative;
  width:28px;
  height:100%;
  min-height:56px;
}

/* vertical line */
.v-tl-marker::before{
  content:"";
  position:absolute;
  left:50%;
  top:0;
  bottom:-18px;              /* extend to next item gap */
  width:2px;
  transform:translateX(-50%);
  background:#cfcfcf;
}

/* dot */
.v-tl-marker::after{
  content:"";
  position:absolute;
  left:50%;
  top:4px;
  width:18px;
  height:18px;
  transform:translateX(-50%);
  border-radius:999px;
  background:#fff;
  border:2px solid #cfcfcf;
}

/* last item: don’t extend line downward */
.v-tl-item:last-child .v-tl-marker::before{
  bottom:10px;
}

.v-tl-content{
  padding-top:0;
}

.v-tl-title{
  font-weight:600;
  font-size:14px;
  margin-bottom:2px;
}

.v-tl-desc{
  font-size:12px;
  opacity:.85;
  line-height:1.35;
}

.v-tl-confirm{
  margin-top:8px;
  font-size:12px;
  display:inline-block;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid #e6e6e6;
  background:#f7f7f7;
  color:#333;
}

/* states */
.v-tl-item.is-active{
  opacity:1;
}

.v-tl-item.is-active .v-tl-marker::after{
  border-color:#000000;  /* active ring */
  box-shadow:0 0 0 5px rgba(43,109,243,0.12);
}

.v-tl-item.is-done{
  opacity:.9;
}

.v-tl-item.is-done .v-tl-marker::after{
  border-color:#2ecc71;  /* done ring */
  background:#fff;
}

/* optional: checkmark for done */
.v-tl-item.is-done .v-tl-marker span{
  display:none;
}
.v-tl-item.is-done .v-tl-marker{
  /* no-op placeholder */
}
.v-tl-item.is-done .v-tl-marker::after{
  background:
    radial-gradient(circle at center, #fff 62%, transparent 63%),
    linear-gradient(transparent, transparent);
}
.v-tl-item.is-done .v-tl-marker::after{
  /* keep ring; checkmark via pseudo-element below */
}
.v-tl-item.is-done .v-tl-marker::marker{ content:""; }
.v-tl-item.is-done .v-tl-marker::after{ }

.v-tl-item.is-done .v-tl-marker i{ display:none; }
.v-tl-item.is-done .v-tl-marker::after{
  /* keep as-is */
}
.v-tl-item.is-done .v-tl-marker::before{ background:#cfcfcf; }

/* checkmark */
.v-tl-item.is-done .v-tl-marker::after{
  position:absolute;
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring stays */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* nothing */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* nothing */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* nothing */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* leaving ring; add check with another pseudo */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ring still */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* keep */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* keep */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* keep */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* keep */
}

/* Add check as separate pseudo */
.v-tl-item.is-done .v-tl-marker::after{
  /* ring stays */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

/* Real checkmark */
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

/* checkmark overlay */
.v-tl-item.is-done .v-tl-marker::after{
  /* ring unchanged */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ok */
}

/* Keep it simple: checkmark via background image made from CSS borders */
.v-tl-item.is-done .v-tl-marker::after{
  background:#fff;
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

.v-tl-item.is-done .v-tl-marker::after{
  /* ring */
}

/* checkmark using another pseudo */
.v-tl-item.is-done .v-tl-marker::before{
  /* line */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* dot */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* dot */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* dot */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* dot */
}
.v-tl-item.is-done .v-tl-marker::after{
  /* dot */
}

/* If you want a checkmark, easiest is to put it in HTML later.
   Skip it for now; the green ring already reads as “done”. */

/* =========================
   PROCESS 5 — FINAL PAGE
   ========================= */
.final-layout{
  display: grid;
  grid-template-columns: 260px 600px 200px;
  gap: 24px;
  align-items: start;
}

.final-image-frame{
  width: 600px;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  overflow: hidden;
  background: #fff;
}

.final-image-frame img{
  width: 600px;
  height: auto;
  display: block;
}

.final-caption{
  margin-top: 14px;
}

.final-title{
  font-weight: 600;
  font-size: 18px;
  margin-bottom: 6px;
}

.final-sub{
  font-size: 14px;
  opacity: 0.7;
  line-height: 1.5;
}

.final-panel{
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.final-card{
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  padding: 16px;
  background: #fff;
}

.final-card-title{
  font-weight: 600;
  margin-bottom: 12px;
}

.final-summary-grid{
  display: grid;
  gap: 10px;
}

.final-summary-item{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 14px;
}

.final-label{
  opacity: 0.6;
}

.final-value{
  font-weight: 600;
  text-align: right;
}

.final-checklist{
  padding-left: 0;
  list-style: none;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
}

.final-checklist li{
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.final-checklist .dot{
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,0.25);
  margin-top: 4px;
  flex: 0 0 auto;
}

.final-note{
  margin-top: 12px;
  font-size: 13px;
  opacity: 0.7;
  line-height: 1.5;
  width: 100%;
  max-width: 720px;   /* SAME value as scan panel */
}

.final-actions{
  display: flex;
  gap: 10px;
}

.secondary-btn{
  border: 1px solid rgba(0,0,0,0.25);
  background: transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
}

/* Process 5 final image inside scan window */
.final-scan-img{
  width: 100%;
  height: 100%;
  object-fit: cover;    /* change to contain if you don't want cropping */
  display: block;
}

/* If your scan-stage isn't already full height, enforce it */
#final-stage{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Right sidebar summary formatting */
.final-summary{
  margin-top: 14px;
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.final-row{
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.final-label{
  opacity: 0.65;
}

.final-value{
  font-weight: 600;
  text-align: right;
}

.final-divider{
  height: 1px;
  background: rgba(0,0,0,0.08);
  margin: 14px 0;
}

.final-smalltitle{
  font-weight: 600;
  margin-bottom: 8px;
}

.final-bullets{
  margin: 0;
  padding-left: 18px;
  opacity: 0.75;
  line-height: 1.6;
}

.final-actions{
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.secondary-btn{
  border: 1px solid rgba(0,0,0,0.25);
  background: transparent;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
}

#final-camera{ display:none !important; }

#process-final .final-layout{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:14px;
}

#process-final .final-upload-frame,
#process-final #final-note{
  width: 720px;
  max-width: 100%;
  min-height: 112px;   /* ← matches instruction panel height */
  resize: vertical; 
}

/* =========================
   FINAL PIECE – IMAGE PREVIEW
   ========================= */

.final-preview-frame{
  width: 720px;
  max-width: 100%;
  aspect-ratio: 5 / 3;          /* calm, landscape */
  border-radius: 14px;
  overflow: hidden;             /* 🔑 prevents image overflow */
  border: 1px solid #eee;
  background: #f6f6f6;

  display: flex;
  align-items: center;
  justify-content: center;
}

.final-preview-frame.hidden{
  display: none;
}

#final-preview{
  width: 100%;
  height: 100%;
  object-fit: contain;          /* 🔑 keeps whole bowl visible */
}

/* hide native file inputs */
.final-file-hidden{
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* make the fake pills match your share button sizing */
.final-pill-btn{
  padding: 7px 9px;      /* same as .primary-btn baseline */
  line-height: 1;
  text-transform: none;    /* keep it like your UI */
}

/* optional: show filename nicely */
.final-file-name{
  margin-top: 8px;
  font-size: 12px;
  color: #777;
}

/* keep preview image constrained inside the panel */
#final-preview{
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none; /* hidden until we have a file */
}

/* placeholder text shown until upload */
.final-preview-placeholder{
  position: static;        /* ← KEY FIX */
  display: block;          /* no grid overlay */
  text-align: center;
  font-size: 13px;
  opacity: 0.6;
  pointer-events: none;
}

/* controls overlay inside the preview frame */
.final-overlay-controls{
  position: absolute;
  left: 14px;
  bottom: 14px;
  display: flex;
  gap: 10px;
}

/* preview frame is the positioning context */
.final-preview-frame{
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ONE centered column */
.final-empty-state{
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;              /* space between text and buttons */
  text-align: center;
}

/* text sits above buttons */
.final-preview-placeholder{
  font-size: 13px;
  opacity: 0.6;
}

/* buttons row */
.final-upload-actions{
  display: flex;
  gap: 6px;
  justify-content: center;
}

.final-actions{
  display: flex;
  justify-content: space-between; /* ← key line */
  align-items: center;
  width: 720px;                   /* same as scan panel */
  max-width: 100%;
}

#process-final #final-share-btn{
  width: 720px;
  max-width: 100%;
  display: inline-flex;     /* keep same button behavior */
  justify-content: center;
}

/* =========================
   Ribbon animation
   ========================= */

.final-ribbon-layer{
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 9998; /* below modal */
}

.ribbon{
  position: absolute;
  top: -20px;
  width: 10px;
  height: 28px;
  border-radius: 2px;
  opacity: 0.9;
  animation: ribbon-fall 2.4s ease-out forwards;
}

@keyframes ribbon-fall{
  0%{
    transform: translateY(-40px) rotate(0deg);
    opacity: 0;
  }
  15%{
    opacity: 1;
  }
  100%{
    transform: translateY(110vh) rotate(540deg);
    opacity: 0;
  }
}
