/* ==========================================================================
   FILESTUDIO — Design System (4/4) : Tool Shell, Sidebar, Dropzones & Results
   Cybernetic Frosted Glassmorphism & Bento Aesthetic. 100% Client-side.
   ========================================================================== */

/* ---------- Page Header & Badges ---------- */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 36px;
  margin-bottom: 20px;
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
}
.breadcrumb a:hover {
  color: #22f0a8;
}
.page-head {
  margin-bottom: 24px;
}
.page-head .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(34, 240, 168, 0.08);
  border: 1px solid rgba(34, 240, 168, 0.28);
  color: #22f0a8;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
  box-shadow: 0 0 20px rgba(34, 240, 168, 0.15);
}
.page-head .eyebrow::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22f0a8;
  box-shadow: 0 0 8px #22f0a8;
  animation: amPulseDot 2s ease-in-out infinite;
}
@keyframes amPulseDot {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.3); }
}
.page-head h1.display {
  font-family: 'Clash Display', sans-serif;
  font-size: clamp(32px, 3.8vw, 48px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  color: #FFFFFF;
  margin: 0 0 10px;
}
.page-head .lead {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 15.5px;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.6;
  max-width: 680px;
  margin: 0;
}

/* ---------- Tool Shell Layout ---------- */
.tool-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 26px;
  padding: 10px 0 60px;
  align-items: start;
}
.tool-main {
  display: grid;
  gap: 22px;
  min-width: 0;
}
.panel {
  background: rgba(13, 17, 26, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 20px 48px -12px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.panel:hover {
  border-color: rgba(255, 255, 255, 0.18);
}
.panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.panel-head h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}
.panel-head .badge {
  margin-left: auto;
  flex: 0 0 auto;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.6);
}
.panel-head .ph-ico {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: rgba(34, 240, 168, 0.08);
  border: 1px solid rgba(34, 240, 168, 0.25);
  box-shadow: 0 0 12px rgba(34, 240, 168, 0.15);
}
.panel-head .ph-ico svg {
  width: 17px;
  height: 17px;
  stroke: #22f0a8;
}
.panel-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.setup-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 640px) {
  .setup-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Sidebar Dock (Hero Match) ---------- */
.side {
  position: sticky;
  top: 86px;
  display: grid;
  gap: 16px;
}
.side-dock-panel {
  padding: 16px;
}
.side-dock-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}
.side-dock-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22f0a8;
  box-shadow: 0 0 8px #22f0a8;
  animation: amPulseDot 2s ease-in-out infinite;
}
.side-dock-title {
  font-family: 'Clash Display', var(--font-display);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: #22f0a8;
  text-transform: uppercase;
}
.side-nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.side-dock-btn {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  text-decoration: none;
  color: #FFFFFF;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  overflow: hidden;
}
.side-dock-num {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.05em;
  transition: color 0.2s ease;
}
.side-dock-ico {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #22f0a8;
  flex-shrink: 0;
}
.side-dock-ico svg {
  width: 16px;
  height: 16px;
}
.side-dock-name {
  font-family: 'Clash Display', var(--font-ui);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  flex-grow: 1;
  white-space: nowrap;
}
.side-dock-arr {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  transition: transform 0.2s ease, color 0.2s ease;
}
.side-dock-btn:hover {
  background: rgba(34, 240, 168, 0.09);
  border-color: rgba(34, 240, 168, 0.35);
  transform: translateX(3px);
  color: #FFFFFF;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}
.side-dock-btn:hover .side-dock-num {
  color: #22f0a8;
}
.side-dock-btn:hover .side-dock-arr {
  color: #22f0a8;
  transform: translateX(3px);
}
.side-dock-btn.is-active {
  background: rgba(34, 240, 168, 0.12);
  border-color: #22f0a8;
  color: #FFFFFF;
  box-shadow: 0 0 20px rgba(34, 240, 168, 0.25), inset 3px 0 0 #22f0a8;
}
.side-dock-btn.is-active .side-dock-num {
  color: #22f0a8;
}
.side-dock-btn.is-active .side-dock-arr {
  color: #22f0a8;
}

/* Privacy & Offline Cards */
.side-privacy-panel {
  padding: 14px;
}
.privacy-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(34, 240, 168, 0.06);
  border: 1px solid rgba(34, 240, 168, 0.22);
}
.privacy-ico-wrap {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(34, 240, 168, 0.12);
  display: grid;
  place-items: center;
  color: #22f0a8;
  flex-shrink: 0;
}
.privacy-ico-wrap svg {
  width: 16px;
  height: 16px;
  stroke: #22f0a8;
}
.privacy-card b {
  font-size: 13px;
  font-weight: 700;
  display: block;
  color: #22f0a8;
  margin-bottom: 2px;
}
.privacy-card p {
  margin: 0;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.6);
  line-height: 1.45;
}
.side-offline-panel {
  padding: 16px;
}
.side-offline-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.side-offline-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00e5ff;
  box-shadow: 0 0 8px #00e5ff;
}
.side-offline-panel .side-title {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: #00e5ff;
  padding: 0;
}
.side-offline-panel .side-note {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  line-height: 1.5;
  margin: 0;
}

/* Legacy side compat */
.side-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
}

/* ---------- Page Preview Stage ---------- */
.preview-wrap {
  display: grid;
  gap: 14px;
}
.preview-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 22px;
  border-radius: var(--r-md);
  background: rgba(7, 8, 11, 0.65);
  border: 1px solid var(--line-2);
  min-height: 280px;
  overflow: auto;
}
.preview-page {
  background: #FFFFFF;
  border-radius: 4px;
  box-shadow: 0 20px 48px -14px rgba(0, 0, 0, 0.85);
  position: relative;
  overflow: hidden;
  line-height: 0;
}
.preview-page canvas,
.preview-page img {
  display: block;
  max-width: none;
}
.preview-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}
.preview-pager .pv-count {
  font-size: 12.5px;
  color: var(--dim);
  min-width: 92px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px;
}
.thumbs .th {
  flex: 0 0 auto;
  width: 58px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 1.5px solid transparent;
  background: rgba(255, 255, 255, 0.05);
  padding: 0;
  transition: all var(--t-fast) var(--ease);
}
.thumbs .th canvas {
  width: 100%;
  display: block;
}
.thumbs .th:hover {
  border-color: var(--line);
}
.thumbs .th.is-active {
  border-color: var(--accent);
  box-shadow: var(--sh-glow);
}

/* ---------- Callouts ---------- */
.callout {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.22);
  font-size: 13px;
}
.callout svg {
  width: 17px;
  height: 17px;
  stroke: var(--gold);
  flex: 0 0 auto;
  margin-top: 1px;
}
.callout.info {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.22);
}
.callout.info svg {
  stroke: var(--sky);
}
.callout p {
  margin: 0;
  color: var(--dim);
}
.callout b {
  color: var(--text);
}

/* ---------- Empty State ---------- */
.empty {
  padding: 32px 20px;
  text-align: center;
  color: var(--mute);
  font-size: 13.5px;
}
.empty svg {
  width: 36px;
  height: 36px;
  stroke: var(--mute);
  opacity: 0.5;
  margin: 0 auto 10px;
  stroke-width: 1.5;
}

/* ---------- High-Tech Frosted Dropzone ---------- */
.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 10px;
  padding: 50px 28px;
  border-radius: 24px;
  cursor: pointer;
  border: 1.6px dashed rgba(34, 240, 168, 0.35);
  background: radial-gradient(ellipse 600px 240px at 50% 15%, rgba(34, 240, 168, 0.08), transparent 75%),
              rgba(14, 18, 28, 0.65);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
}
.dropzone:hover {
  border-color: #22f0a8;
  background: radial-gradient(ellipse 600px 240px at 50% 15%, rgba(34, 240, 168, 0.14), transparent 75%),
              rgba(14, 18, 28, 0.85);
  transform: translateY(-2px);
  box-shadow: 0 0 35px rgba(34, 240, 168, 0.22), inset 0 0 20px rgba(34, 240, 168, 0.06);
}
.dropzone.is-over {
  border-color: #22f0a8;
  border-style: solid;
  background: radial-gradient(ellipse 600px 240px at 50% 15%, rgba(34, 240, 168, 0.22), transparent 75%),
              rgba(14, 18, 28, 0.95);
  transform: scale(1.015);
  box-shadow: 0 0 50px rgba(34, 240, 168, 0.38), inset 0 0 30px rgba(34, 240, 168, 0.16);
}
.dropzone .dz-ico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(34, 240, 168, 0.1);
  border: 1.5px solid rgba(34, 240, 168, 0.38);
  box-shadow: 0 0 24px rgba(34, 240, 168, 0.25);
  margin-bottom: 6px;
  animation: amBob 4s var(--ease-soft) infinite;
}
.dropzone .dz-ico svg {
  width: 28px;
  height: 28px;
  stroke: #22f0a8;
  stroke-width: 1.8;
}
.dropzone.is-over .dz-ico {
  animation: amPop 0.45s var(--ease);
}
@keyframes amBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes amPop {
  0% { transform: scale(1); }
  55% { transform: scale(1.16); }
  100% { transform: scale(1); }
}
.dropzone input[type=file] {
  display: none;
}
.dz-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 18.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #FFFFFF;
}
.dz-sub {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.6);
}

/* ---------- File List ---------- */
.filelist {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.file-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 10px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-2);
  transition: all var(--t-fast) var(--ease);
}
.file-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}
.file-item.is-dragging {
  opacity: 0.5;
}
.file-item.is-over-top {
  border-top: 2px solid var(--accent);
}
.file-item .thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 auto;
  background: rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  border: 1px solid var(--line-3);
}
.file-item .thumb img,
.file-item .thumb canvas {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.file-item .thumb svg {
  width: 20px;
  height: 20px;
  stroke: var(--accent-2);
  stroke-width: 1.6;
}
.file-item .f-meta {
  min-width: 0;
  flex: 1 1 auto;
}
.file-item .f-name {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text);
}
.file-item .f-sub {
  font-size: 11.5px;
  color: var(--mute);
}
.file-item .f-actions {
  display: flex;
  gap: 4px;
  flex: 0 0 auto;
}
.file-item .grip {
  cursor: grab;
  color: var(--mute);
  padding: 4px;
  flex: 0 0 auto;
  touch-action: none;
}
.file-item .grip:active {
  cursor: grabbing;
}

/* ---------- Page Selection Grid (PDF Merge) ---------- */
.pgrid {
  display: grid;
  gap: 9px;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
}
.pgrid:empty {
  display: none;
}
.pgtile {
  position: relative;
  aspect-ratio: 3/4;
  border-radius: 9px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.05);
  border: 1.5px solid var(--line-3);
  padding: 0;
  transition: all var(--t-fast) var(--ease);
}
.pgtile:hover {
  border-color: var(--line);
}
.pgtile.is-selected {
  border-color: var(--accent);
  box-shadow: var(--sh-glow);
}
.pgtile .pgthumb {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #FFFFFF;
}
.pgtile .pgthumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.pgtile .pgsph {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}
.pgtile .pgsph svg {
  width: 20px;
  height: 20px;
  stroke: var(--dim);
  opacity: 0.6;
}
.pgtile .pgno {
  position: absolute;
  left: 5px;
  top: 5px;
  z-index: 2;
  font-size: 10.5px;
  font-weight: 700;
  color: #FFFFFF;
  background: rgba(7, 8, 11, 0.75);
  border-radius: 5px;
  padding: 1px 6px;
  font-variant-numeric: tabular-nums;
}
.pgtile .pgcheck {
  position: absolute;
  right: 5px;
  top: 5px;
  z-index: 2;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  opacity: 0;
  transform: scale(0.6);
  background: var(--accent);
  color: #FFFFFF;
  transition: all var(--t-fast) var(--ease);
}
.pgtile.is-selected .pgcheck {
  opacity: 1;
  transform: scale(1);
}
.pgmore {
  grid-column: 1 / -1;
  font-size: 11.5px;
  color: var(--mute);
  padding: 4px 2px;
}

/* ---------- Progress Bar ---------- */
.progress {
  height: 6px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.progress > i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 99px;
  background: var(--accent);
  transition: width 0.25s var(--ease-soft);
  position: relative;
  overflow: hidden;
}
.progress > i::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: amShimmer 1.4s linear infinite;
}
@keyframes amShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* ---------- Result Card & Stats ---------- */
.result-card {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: var(--r-bento);
  background: radial-gradient(500px 180px at 20% 0%, rgba(16, 185, 129, 0.12), transparent 70%),
              rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(16, 185, 129, 0.25);
}
.result-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.result-num {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
}
.saving {
  color: var(--mint);
  font-weight: 700;
}
.stat-box {
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid var(--line-2);
}
.stat-box b {
  display: block;
  font-family: var(--font-display);
  font-size: 19px;
  color: #FFFFFF;
}
.stat-box span {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mute);
}
.log {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.6;
  color: var(--dim);
  background: rgba(7, 8, 11, 0.65);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  max-height: 200px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
.log .ok { color: var(--mint); }
.log .err { color: var(--danger); }
.log .warn { color: var(--gold); }

/* ---------- Toast Notifications ---------- */
.toast-wrap {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: grid;
  gap: 10px;
  max-width: min(360px, 92vw);
}
.toast {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  padding: 13px 15px;
  border-radius: var(--r-md);
  background: rgba(17, 19, 27, 0.96);
  border: 1px solid var(--line);
  box-shadow: var(--sh-3);
  backdrop-filter: blur(16px);
  animation: amToastIn 0.3s var(--ease) both;
  font-size: 13.5px;
}
.toast.is-out {
  animation: amToastOut 0.24s var(--ease) both;
}
.toast .t-ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 1px;
  stroke: var(--mint);
}
.toast.warn .t-ico { stroke: var(--gold); }
.toast.err .t-ico { stroke: var(--danger); }
.toast .t-body { min-width: 0; }
.toast .t-title { font-weight: 700; font-size: 13.5px; color: #FFFFFF; }
.toast .t-msg { font-size: 12.5px; color: var(--dim); }
@keyframes amToastIn {
  from { opacity: 0; transform: translateY(14px) scale(0.97); }
  to { opacity: 1; transform: none; }
}
@keyframes amToastOut {
  to { opacity: 0; transform: translateX(24px) scale(0.97); }
}

/* ---------- Page Header & Breadcrumb ---------- */
.page-head {
  padding: 36px 0 10px;
}
.breadcrumb {
  display: flex;
  gap: 7px;
  align-items: center;
  font-size: 12.5px;
  color: var(--mute);
  margin-bottom: 12px;
}
.breadcrumb a {
  color: var(--mute);
}
.breadcrumb a:hover {
  color: #FFFFFF;
}
.page-head .display {
  font-size: clamp(26px, 3.6vw, 42px);
  color: #FFFFFF;
}
.page-head .lead {
  margin-top: 12px;
}

/* ---------- Stepline (Dynamic Progress Tracker) ---------- */
.stepline {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
}
.stepline li {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px 8px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 12.5px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
.stepline li .n {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  flex: 0 0 auto;
}
.stepline li .n svg {
  width: 12px;
  height: 12px;
  stroke: currentColor;
  stroke-width: 2.6;
}
.stepline li.is-on {
  color: #FFFFFF;
  background: rgba(34, 240, 168, 0.1);
  border-color: rgba(34, 240, 168, 0.45);
  box-shadow: 0 0 20px rgba(34, 240, 168, 0.22);
}
.stepline li.is-on .n {
  background: #22f0a8;
  color: #05070B;
  box-shadow: 0 0 10px #22f0a8;
}
.stepline li.is-done {
  color: #22f0a8;
  border-color: rgba(34, 240, 168, 0.3);
  background: rgba(34, 240, 168, 0.05);
}
.stepline li.is-done .n {
  background: rgba(34, 240, 168, 0.2);
  color: #22f0a8;
}

/* ---------- Action Row ---------- */
.action-row {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line-2);
}
.action-row .hint {
  margin: 0;
  max-width: 36ch;
}

/* ---------- Collapsed Dropzone ---------- */
#p-drop.is-collapsed .panel-head,
#p-drop.is-collapsed .hint {
  display: none;
}
#p-drop.is-collapsed .dropzone {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 14px 20px;
  border-style: solid;
}
#p-drop.is-collapsed .dropzone .dz-ico {
  width: 32px;
  height: 32px;
  margin: 0;
  animation: none;
}
#p-drop.is-collapsed .dropzone .dz-ico svg {
  width: 16px;
  height: 16px;
}
#p-drop.is-collapsed .dropzone .dz-sub {
  display: none;
}
#p-drop.is-collapsed .dropzone .dz-title {
  font-size: 14.5px;
}

/* ---------- Advanced Accordion ---------- */
.adv {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid var(--line-3);
}
.adv > summary {
  display: flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  list-style: none;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mute);
}
.adv > summary::-webkit-details-marker {
  display: none;
}
.adv > summary::after {
  content: "+";
  margin-left: auto;
  font-size: 17px;
  color: var(--accent-2);
  transition: transform var(--t) var(--ease);
}
.adv[open] > summary::after {
  transform: rotate(45deg);
}
.adv > summary:hover {
  color: var(--dim);
}
.adv-body {
  display: grid;
  gap: 12px;
  padding-top: 14px;
}

/* ---------- Result Badges & Form Helpers ---------- */
.badge-warn {
  background: rgba(245, 158, 11, 0.14);
  color: var(--gold);
  border-color: rgba(245, 158, 11, 0.28);
}
.file-item.is-ready {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.22);
}
.file-item .f-dl {
  flex: 0 0 auto;
}
.seg.seg-wrap {
  flex-wrap: wrap;
}
.stat-grid {
  grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
}

/* ---------- Tool Controls & Action Buttons ---------- */
.tool-shell .btn-primary,
.tool-shell .btn-accent {
  background: linear-gradient(135deg, #22f0a8 0%, #00e5ff 100%) !important;
  color: #04070C !important;
  font-family: 'Clash Display', var(--font-ui) !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  border: none !important;
  border-radius: 12px !important;
  box-shadow: 0 0 25px rgba(34, 240, 168, 0.35) !important;
  transition: all 0.24s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.tool-shell .btn-primary:hover,
.tool-shell .btn-accent:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 0 35px rgba(34, 240, 168, 0.55) !important;
}
.tool-shell .btn-primary svg,
.tool-shell .btn-accent svg {
  stroke: #04070C !important;
}
.tool-shell .select {
  background: rgba(14, 18, 28, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  color: #FFFFFF;
  padding: 9px 14px;
  font-size: 13.5px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.tool-shell .select:focus {
  border-color: #22f0a8;
  outline: none;
  box-shadow: 0 0 16px rgba(34, 240, 168, 0.25);
}
.tool-shell .seg {
  background: rgba(7, 10, 16, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  padding: 3px;
  display: inline-flex;
  gap: 2px;
}
.tool-shell .seg button {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.6);
  transition: all 0.18s ease;
}
.tool-shell .seg button:hover {
  color: #FFFFFF;
}
.tool-shell .seg button.is-active {
  background: rgba(34, 240, 168, 0.15);
  border: 1px solid rgba(34, 240, 168, 0.4);
  color: #FFFFFF;
  box-shadow: 0 0 12px rgba(34, 240, 168, 0.25);
}
.tool-shell input[type=range] {
  accent-color: #22f0a8;
}

/* ---------- Responsive Layout ---------- */
@media (max-width: 1000px) {
  .g-4, .g-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-in { grid-template-columns: 1fr 1fr; }
  .tool-shell { grid-template-columns: 1fr; gap: 16px; }
  .side { position: static; }
  .side-nav {
    grid-auto-flow: column;
    grid-auto-columns: max-content;
    overflow-x: auto;
    gap: 6px;
    padding-bottom: 4px;
  }
  .side-nav a { white-space: nowrap; }
  .side-title { display: none; }
}
@media (max-width: 700px) {
  .stepline li { padding: 5px 10px 5px 6px; font-size: 11.5px; }
  .stepline li .n { width: 18px; height: 18px; font-size: 10px; }
  .action-row { padding: 12px; }
  .action-row .btn { width: 100%; }
  .file-item .f-dl .only-wide { display: none; }
  .g-2, .g-3, .g-4 { grid-template-columns: 1fr; }
  .wrap { padding: 0 16px; }
  .section { padding: 44px 0; }
  .hero { padding: 46px 0 32px; }
  .topbar-in { height: 60px; }
  .wordmark { font-size: 18px; }
  .panel { padding: 16px; }
  .footer-in { grid-template-columns: 1fr; gap: 20px; }
  .toast-wrap { right: 12px; left: 12px; bottom: 12px; max-width: none; }
  .am-orb { filter: blur(50px); opacity: 0.35; }
}

/* ---------- Accessibility & Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.06s !important;
    scroll-behavior: auto !important;
  }
  .am-orb { animation: none !important; }
  .am-dust { display: none; }
}