/* ===================================================================
   AURAVO T-SHIRT CUSTOMIZER — iOS LIQUID GLASS THEME
   Premium, minimal Apple-inspired design with frosted glass panels
   =================================================================== */

/* === DESIGN TOKENS === */
:root {
  /* Main Background */
  --app-background: #DEE0E5;
  --app-background-secondary: #E8EBF0;
  --app-surface: rgba(255, 255, 255, 0.55);
  --app-surface-strong: rgba(255, 255, 255, 0.72);
  --app-surface-hover: rgba(255, 255, 255, 0.82);

  /* Glass Borders */
  --glass-border: rgba(255, 255, 255, 0.80);
  --glass-border-subtle: rgba(255, 255, 255, 0.65);
  --glass-border-inner: rgba(255, 255, 255, 0.50);
  --glass-divider: rgba(85, 96, 120, 0.12);

  /* Accent Colors */
  --accent-blue: #5067F2;
  --accent-blue-hover: #435CE6;
  --accent-purple: #6366F1;
  --accent-purple-light: #7E82F8;
  --accent-gradient: linear-gradient(135deg, #5B72F4 0%, #6366F1 50%, #6E68F5 100%);
  --accent-soft: rgba(80, 103, 242, 0.10);
  --accent-border: rgba(80, 103, 242, 0.40);

  /* Text Colors */
  --text-primary: #1E293B;
  --text-secondary: #4B5563;
  --text-muted: #8A92A6;
  --text-disabled: #A9AEB8;
  --text-on-accent: #FFFFFF;

  /* Border Radius */
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 22px;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
}

/* === BASE BODY === */
body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background: var(--app-background);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--text-primary);
  overflow: hidden;
}

/* ===================================================================
   TOP BAR — Frosted Glass Header
   =================================================================== */
.cz-topbar {
  height: 56px;
  max-width: 1400px;
  margin: 12px auto 0;
  width: calc(100% - 32px);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  position: relative;
  box-sizing: border-box;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.025),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.cz-topbar-title {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.2px;
  text-align: center;
  pointer-events: none;
}

.cz-back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 7px 18px;
  border-radius: 50px;
  transition: all 180ms ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03), inset 0 1px 1px rgba(255, 255, 255, 0.8);
}

.cz-back-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

/* ===================================================================
   PAGE LAYOUT — 3-Column Grid (Responsive)
   =================================================================== */
.cz-layout {
  display: grid;
  grid-template-columns: 310px minmax(400px, 1fr) 300px;
  gap: 16px;
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  height: calc(100vh - 84px);
  max-height: calc(100vh - 84px);
  padding: 12px 16px 16px;
  position: relative;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  background: transparent;
  align-items: stretch;
  box-sizing: border-box;
}

@media (min-width: 1600px) {
  .cz-topbar {
    max-width: 1540px;
  }
  .cz-layout {
    max-width: 1540px;
    grid-template-columns: 340px minmax(460px, 1fr) 320px;
    gap: 20px;
  }
}

/* ===================================================================
   LEFT — ARTWORK LIBRARY (Glass Panel)
   =================================================================== */
.cz-sidebar {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-2xl);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 10;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.025),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
}

.cz-sidebar::-webkit-scrollbar {
  width: 6px;
}

.cz-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.cz-sidebar::-webkit-scrollbar-thumb {
  background: rgba(85, 96, 120, 0.18);
  border-radius: 6px;
}

.cz-sidebar::-webkit-scrollbar-thumb:hover {
  background: rgba(85, 96, 120, 0.28);
}

/* Sidebar Header */
.cz-sidebar-header {
  padding: 16px 18px 6px;
  border-bottom: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.cz-sidebar-header h3 {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: -0.2px;
}

.cz-sidebar-close {
  display: none;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border-subtle);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 14px;
  color: var(--text-muted);
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease, color 180ms ease;
}

.cz-sidebar-close:hover {
  background: var(--app-surface-hover);
  color: var(--text-primary);
}

/* ===== Sidebar Sections (Upload, Text, Saved) ===== */
.cz-sidebar-section {
  border-bottom: none;
}

.cz-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 18px 6px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-primary);
  transition: background-color 180ms ease;
  user-select: none;
}

.cz-section-title:hover {
  background: rgba(255, 255, 255, 0.25);
}

.cz-section-price {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-purple);
  background: var(--accent-soft);
  padding: 3px 10px;
  border-radius: 50px;
}

.cz-section-body {
  padding: 0 16px 8px;
}

/* Upload Zone */
.cz-upload-zone {
  border: 1.5px dashed rgba(80, 103, 242, 0.45);
  border-radius: var(--radius-md);
  padding: 14px 12px;
  text-align: center;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease;
  background: rgba(240, 244, 255, 0.45);
  min-height: 82px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.cz-upload-zone:hover,
.cz-upload-zone.drag-over {
  border-color: var(--accent-blue);
  background: rgba(80, 103, 242, 0.10);
}

.cz-upload-icon {
  color: var(--accent-blue);
  margin-bottom: 4px;
}

.cz-upload-text {
  font-size: 12px;
  color: var(--text-secondary);
  margin: 0 0 2px;
}

.cz-upload-text strong {
  color: var(--accent-blue);
}

.cz-upload-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
}

/* Upload Progress */
.cz-upload-progress {
  margin-top: var(--space-3);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--glass-border-subtle);
  border-radius: var(--radius-sm);
  overflow: hidden;
  position: relative;
  height: 28px;
}

.cz-upload-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-gradient);
  border-radius: var(--radius-sm);
  transition: width 0.3s;
  animation: uploadPulse 1.5s infinite;
}

@keyframes uploadPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.cz-upload-progress-text {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-on-accent);
}

/* Text Tool */
.cz-text-tool {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cz-text-input {
  width: 100%;
  padding: 12px var(--space-4);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
  box-sizing: border-box;
}

.cz-text-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cz-text-options {
  display: flex;
  gap: var(--space-2);
}

/* Custom Font Dropdown */
.cz-font-dropdown {
  flex: 1;
  position: relative;
}

.cz-font-dropdown-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  color: var(--text-primary);
  cursor: pointer;
  transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
}

.cz-font-dropdown-btn:hover,
.cz-font-dropdown.open .cz-font-dropdown-btn {
  border-color: var(--accent-border);
  background: var(--app-surface-hover);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.cz-font-preview {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.3;
}

.cz-font-chevron {
  flex-shrink: 0;
  transition: transform 250ms ease;
  color: var(--text-muted);
}

.cz-font-dropdown.open .cz-font-chevron {
  transform: rotate(180deg);
}

.cz-font-dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(16px) saturate(110%);
  -webkit-backdrop-filter: blur(16px) saturate(110%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  box-shadow:
    0 12px 40px rgba(35, 45, 65, 0.10),
    0 4px 12px rgba(85, 96, 120, 0.06);
  z-index: 100;
  padding: 6px;
  animation: czFontMenuIn 0.2s ease-out;
}

.cz-font-dropdown-menu.open {
  display: block;
}

@keyframes czFontMenuIn {
  from { opacity: 0; transform: translateY(-6px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.cz-font-dropdown-menu::-webkit-scrollbar {
  width: 4px;
}

.cz-font-dropdown-menu::-webkit-scrollbar-thumb {
  background: rgba(85, 96, 120, 0.18);
  border-radius: 4px;
}

.cz-font-group-label {
  padding: 8px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--text-muted);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
}

.cz-font-option {
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background-color 180ms ease;
  font-size: 16px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-primary);
}

.cz-font-option:hover {
  background: var(--accent-soft);
}

.cz-font-option.active {
  background: var(--accent-soft);
  color: var(--accent-blue);
  font-weight: 600;
}

.cz-font-option span {
  display: block;
}

.cz-color-picker {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-sm);
  cursor: pointer;
  padding: 3px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
}

.cz-text-size-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
  color: var(--text-secondary);
}

.cz-text-size-row label {
  font-weight: 600;
  min-width: 48px;
  color: var(--text-secondary);
}

.cz-size-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(85, 96, 120, 0.15);
  border-radius: 4px;
  outline: none;
}

.cz-size-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-purple);
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(120, 101, 245, 0.3);
}

.cz-size-value {
  font-weight: 600;
  min-width: 36px;
  text-align: right;
  color: var(--accent-purple);
  font-size: 13px;
}

.cz-add-text-btn {
  padding: 12px;
  border: none;
  border-radius: var(--radius-md);
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: box-shadow 180ms ease, transform 180ms ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  box-shadow: 0 4px 12px rgba(104, 115, 239, 0.20);
}

.cz-add-text-btn:hover {
  box-shadow: 0 6px 18px rgba(104, 115, 239, 0.30);
}

.cz-add-text-btn:active {
  transform: scale(0.98);
}

/* Sidebar Divider */
.cz-sidebar-divider {
  height: 1px;
  background: var(--glass-divider);
  margin: var(--space-1) var(--space-5);
}

/* Search */
.cz-sidebar-search-row {
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-sizing: border-box;
}

.cz-search-input-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 0 12px;
  height: 40px;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
  box-sizing: border-box;
}

.cz-search-icon {
  width: 15px;
  height: 15px;
  color: #8A92A6;
  margin-right: 8px;
  flex-shrink: 0;
}

.cz-search-input {
  width: 100% !important;
  flex: 1 !important;
  padding: 0 !important;
  border: none !important;
  background: transparent !important;
  background-image: none !important;
  font-size: 13px !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif !important;
  color: var(--text-primary) !important;
  outline: none !important;
  box-shadow: none !important;
  height: 100% !important;
}

.cz-search-input::placeholder {
  color: var(--text-muted) !important;
}

.cz-filter-btn {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4B5563;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.7);
  transition: all 0.2s ease;
  padding: 0;
}

.cz-filter-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  color: #1E293B;
}

/* Design Grid */
.cz-sidebar-designs {
  padding: var(--space-3);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  align-content: start;
}

/* Design Card */
.cz-design-thumb {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.40);
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  position: relative;
  box-shadow:
    0 3px 12px rgba(40, 50, 70, 0.025),
    inset 0 1px 0 rgba(255, 255, 255, 0.60);
}

.cz-design-thumb:hover {
  border-color: var(--glass-border);
  background: rgba(255, 255, 255, 0.60);
  box-shadow:
    0 6px 20px rgba(40, 50, 70, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.60);
}

.cz-design-thumb:active {
  transform: scale(0.97);
  transition-duration: 100ms;
}

.cz-design-thumb img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 8px;
  pointer-events: none;
}

.cz-design-thumb::after {
  content: '+ Add';
  position: absolute;
  inset: 0;
  background: rgba(103, 126, 245, 0.75);
  backdrop-filter: blur(3px);
  color: var(--text-on-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 180ms ease;
  border-radius: calc(var(--radius-lg) - 1px);
}

.cz-design-thumb:hover::after {
  opacity: 1;
}

.cz-design-name {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin-top: var(--space-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Price Badge */
.cz-design-price {
  position: absolute;
  top: 6px;
  right: 6px;
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 50px;
  pointer-events: none;
  z-index: 3;
  box-shadow: 0 2px 8px rgba(104, 115, 239, 0.25);
}

/* Loading / Skeleton */
.cz-sidebar-loading {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.cz-spinner-sm {
  width: 24px;
  height: 24px;
  border: 2.5px solid rgba(85, 96, 120, 0.12);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: czSpin 0.7s linear infinite;
}

@keyframes czSpin {
  to { transform: rotate(360deg); }
}

.cz-skeleton {
  aspect-ratio: 1;
  border-radius: var(--radius-lg);
  background: linear-gradient(110deg, rgba(85, 96, 120, 0.04) 8%, rgba(85, 96, 120, 0.09) 18%, rgba(85, 96, 120, 0.04) 33%);
  background-size: 200% 100%;
  animation: czShimmer 1.5s infinite ease-in-out;
}

@keyframes czShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.cz-empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 40px 16px;
  color: var(--text-muted);
}

.cz-empty-state-icon {
  font-size: 40px;
  margin-bottom: 10px;
  opacity: 0.6;
}

.cz-empty-state p {
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

/* Saved Designs List */
.cz-saved-designs {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.cz-saved-design-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.40);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.cz-saved-design-item:hover {
  border-color: var(--glass-border);
  background: var(--app-surface-hover);
  box-shadow: 0 4px 12px rgba(40, 50, 70, 0.04);
}

.cz-saved-design-thumb {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  border: 1px solid var(--glass-border-subtle);
  background: rgba(255, 255, 255, 0.5);
}

.cz-saved-design-info {
  flex: 1;
  min-width: 0;
}

.cz-saved-design-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cz-saved-design-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

.cz-saved-design-delete {
  background: none;
  border: none;
  color: var(--text-disabled);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color 180ms ease, background-color 180ms ease;
}

.cz-saved-design-delete:hover {
  color: #dc5050;
  background: rgba(220, 80, 80, 0.08);
}

@keyframes czDesignEntry {
  from { opacity: 0; transform: translateY(8px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Mobile toggle */
.cz-sidebar-toggle {
  display: none;
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 100;
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  border: 1px solid rgba(255, 255, 255, 0.88);
  padding: 14px 22px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  align-items: center;
  gap: var(--space-2);
  box-shadow: 0 6px 18px rgba(104, 115, 239, 0.25);
  transition: box-shadow 180ms ease, transform 180ms ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
}

.cz-sidebar-toggle:hover {
  box-shadow: 0 8px 24px rgba(104, 115, 239, 0.35);
}

/* ===================================================================
   CENTER — CANVAS / LIVE PREVIEW
   =================================================================== */
.cz-canvas-area {
  grid-column: 2;
  grid-row: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0;
  min-width: 0;
  height: 100%;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}

/* View Toggle (placed in right panel) */
.cz-view-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: transparent;
  border: none;
  padding: 0;
  box-shadow: none;
}

.cz-view-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.50);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: #4B5563;
  border-radius: 12px;
  transition: all 180ms ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60);
}

/* Sides a base has no image for stay hidden (older front/back-only bases) */
.cz-view-btn[hidden] {
  display: none;
}

.cz-view-btn span:not(.cz-view-badge) {
  white-space: nowrap;
}

.cz-view-btn.active {
  background: #475470;
  border-color: rgba(255, 255, 255, 0.20);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(71, 84, 112, 0.35);
}

.cz-view-btn:not(.active):hover {
  color: #1E293B;
  background: rgba(255, 255, 255, 0.75);
}

/* View Count Badge */
.cz-view-badge {
  display: none;
  min-width: 16px;
  height: 16px;
  padding: 0 5px;
  border-radius: 50px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  margin-left: 2px;
}

.cz-view-badge.has-count {
  display: inline-block;
}

.cz-view-btn.active .cz-view-badge {
  background: rgba(255, 255, 255, 0.25);
  color: var(--text-on-accent);
}

.cz-view-btn:not(.active) .cz-view-badge {
  background: var(--accent-soft);
  color: var(--accent-blue);
}

/* Actions Grid for right panel */
.cz-actions-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.cz-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 8px;
  min-height: 64px;
  min-width: 44px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.50);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  color: #4B5563;
  border-radius: 14px;
  transition: all 180ms ease;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60);
}

.cz-action-btn:hover {
  border-color: var(--glass-border);
  color: #1E293B;
  background: rgba(255, 255, 255, 0.75);
}

.cz-delete-btn:hover {
  border-color: rgba(220, 80, 80, 0.25);
  color: #dc5050;
  background: rgba(220, 80, 80, 0.08);
}

.cz-action-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

/* Size Section & Pills */
.cz-size-section {
  margin-top: 14px;
}

.cz-size-label {
  font-size: 14px;
  font-weight: 600;
  color: #1E293B;
  margin-bottom: 8px;
  display: block;
}

.cz-size-pills {
  display: flex;
  gap: 6px;
  width: 100%;
}

.cz-size-pill {
  flex: 1;
  padding: 8px 0;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.75);
  background: rgba(255, 255, 255, 0.50);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  transition: all 180ms ease;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60);
}

.cz-size-pill:hover {
  background: rgba(255, 255, 255, 0.80);
  color: #1E293B;
}

.cz-size-pill.active {
  background: #5067F2;
  border-color: #5067F2;
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(80, 103, 242, 0.35);
}

/* Add to Cart CTA */
.cz-save-btn {
  background: var(--accent-gradient) !important;
  color: var(--text-on-accent) !important;
  border: 1px solid rgba(255, 255, 255, 0.40) !important;
  font-weight: 600 !important;
  padding: 12px 24px !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 6px 18px rgba(104, 115, 239, 0.25);
  transition: box-shadow 180ms ease, transform 180ms ease !important;
}

.cz-save-btn:hover {
  box-shadow: 0 8px 24px rgba(104, 115, 239, 0.35) !important;
  transform: translateY(-1px) !important;
}

.cz-save-btn:active {
  transform: scale(0.98) !important;
  transition-duration: 100ms !important;
}

/* Canvas Wrapper */
.cz-canvas-wrapper {
  position: relative;
  width: min(100%, 480px);
  height: min(calc(100vh - 210px), 528px);
  aspect-ratio: 1 / 1.1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border-radius: 24px;
  margin: 0 auto;
}

@media (min-width: 1600px) {
  .cz-canvas-wrapper {
    width: min(100%, 540px);
    height: min(calc(100vh - 220px), 594px);
  }
}

.cz-canvas-bg {
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #DADADA;
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.08),
    inset 0 1px 2px rgba(255, 255, 255, 0.40);
  transition: opacity 0.35s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* LIVE PREVIEW floating label badge */
.cz-canvas-label {
  position: relative;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #5067F2;
  pointer-events: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  z-index: 10;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.85);
  padding: 6px 18px;
  border-radius: 50px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
  margin: 0 auto 16px;
  width: fit-content;
}

.cz-canvas-label::before {
  content: '';
  width: 7px;
  height: 7px;
  background: #5067F2;
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(80, 103, 242, 0.2);
}

/* View switch flip animation */
.cz-canvas-bg.cz-flip-out {
  opacity: 0;
  transform: rotateY(8deg) scale(0.96);
}

.cz-canvas-bg.cz-flip-in {
  animation: czFlipIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes czFlipIn {
  from { opacity: 0; transform: rotateY(-8deg) scale(0.96); }
  to { opacity: 1; transform: rotateY(0deg) scale(1); }
}

/* ===================================================================
   ZOOM CONTROLS
   =================================================================== */
.cz-zoom-controls {
  position: absolute;
  bottom: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(14px) saturate(110%);
  -webkit-backdrop-filter: blur(14px) saturate(110%);
  padding: 4px 6px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  box-shadow: 0 4px 16px rgba(35, 45, 65, 0.06);
  z-index: 40;
}

.cz-zoom-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background-color 180ms ease, color 180ms ease;
}

.cz-zoom-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-blue);
}

.cz-zoom-btn:active {
  transform: scale(0.92);
}

.cz-zoom-level {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  min-width: 38px;
  text-align: center;
  user-select: none;
}

.cz-zoom-reset {
  border-left: 1px solid var(--glass-divider);
  margin-left: 2px;
  padding-left: 4px;
}

/* ===================================================================
   OBJECT TOOLBAR (floating, appears on selection)
   Sits on the bottom edge of the canvas box, under the hem, so it no longer covers the print areas
   =================================================================== */
.cz-object-toolbar {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 16px);
  overflow-x: auto;
  scrollbar-width: none;
  display: flex;
  align-items: center;
  gap: 3px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(110%);
  -webkit-backdrop-filter: blur(16px) saturate(110%);
  padding: 5px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 8px 28px rgba(35, 45, 65, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  z-index: 41;
  animation: czToolbarIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes czToolbarIn {
  from { opacity: 0; transform: translateX(-50%) translateY(8px) scale(0.95); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.cz-obj-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 5px 8px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background-color 180ms ease, color 180ms ease;
  min-width: 38px;
}

.cz-obj-btn span {
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  line-height: 1;
  color: var(--text-muted);
}

.cz-obj-btn:hover {
  background: var(--accent-soft);
  color: var(--accent-blue);
}

.cz-obj-btn:hover span {
  color: var(--accent-blue);
}

.cz-obj-btn:active {
  transform: scale(0.92);
}

.cz-obj-opacity {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border-left: 1px solid var(--glass-divider);
  border-right: 1px solid var(--glass-divider);
  color: var(--text-muted);
}

.cz-obj-opacity input[type="range"] {
  width: 52px;
  height: 4px;
  -webkit-appearance: none;
  appearance: none;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(85, 96, 120, 0.15), rgba(103, 126, 245, 0.35));
  outline: none;
  cursor: pointer;
}

.cz-obj-opacity input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-purple);
  border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(120, 101, 245, 0.3);
  cursor: pointer;
}

/* Add to Cart — Loading / Processing / Success states */
.cz-save-btn.cz-cart-loading {
  pointer-events: none;
  opacity: 0.85;
  min-width: 140px;
}

.cz-save-btn .cz-btn-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: czSpin 0.6s linear infinite;
  vertical-align: middle;
}

.cz-save-btn.cz-cart-success {
  background: linear-gradient(135deg, #27ae60, #2ecc71) !important;
  animation: czCartPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(39, 174, 96, 0.35) !important;
}

@keyframes czCartPop {
  0% { transform: scale(1); }
  30% { transform: scale(1.05); }
  50% { transform: scale(0.97); }
  100% { transform: scale(1); }
}

/* ===== Canvas Overlay (Loading / Success on top of t-shirt) ===== */
.cz-canvas-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.cz-canvas-overlay.active {
  display: flex;
  opacity: 1;
}

.cz-canvas-overlay.fade-out {
  opacity: 0;
}

.cz-overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.cz-overlay-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(85, 96, 120, 0.12);
  border-top-color: var(--accent-purple);
  border-radius: 50%;
  animation: czSpin 0.7s linear infinite;
}

.cz-overlay-spinner.hidden {
  display: none;
}

.cz-overlay-check {
  display: none;
  animation: czCheckPop 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.cz-overlay-check.visible {
  display: block;
}

@keyframes czCheckPop {
  0% { transform: scale(0); opacity: 0; }
  50% { transform: scale(1.2); }
  100% { transform: scale(1); opacity: 1; }
}

.cz-overlay-text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0;
  letter-spacing: 0.3px;
}

.cz-overlay-text.success {
  color: #27ae60;
  font-size: 16px;
}

@keyframes czPulse {
  0%, 100% { opacity: 0.5; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

/* Status */
.cz-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin-top: var(--space-4);
  font-size: 12px;
  color: var(--text-muted);
  padding: 0 var(--space-1);
}

.cz-status-color {
  display: flex;
  align-items: center;
  gap: 7px;
  font-weight: 500;
  color: var(--text-secondary);
}

.cz-color-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid rgba(85, 96, 120, 0.15);
  background: #fff;
}

.cz-status-hint {
  font-size: 11px;
  color: var(--text-muted);
  font-style: italic;
}

/* ===================================================================
   RIGHT — CONTROLS & PRICING PANEL (3 Liquid Glass Cards)
   =================================================================== */
.cz-right-panel {
  grid-column: 3;
  grid-row: 1;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 100%;
  position: relative;
  top: 0;
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
}

.cz-right-panel::-webkit-scrollbar {
  width: 5px;
}

.cz-right-panel::-webkit-scrollbar-thumb {
  background: rgba(85, 96, 120, 0.15);
  border-radius: 4px;
}

/* Individual Glass Cards */
.cz-right-card {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 14px 16px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.025),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
  box-sizing: border-box;
}

.cz-right-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 10px 0;
  letter-spacing: -0.1px;
}

/* Integrated Add to Cart inside Card 3 */
.cz-add-to-cart-btn {
  margin-top: 14px;
  width: 100%;
  height: 48px;
  background: linear-gradient(135deg, #5B72F4 0%, #6366F1 50%, #6E68F5 100%) !important;
  border: 1px solid rgba(255, 255, 255, 0.40) !important;
  border-radius: 14px !important;
  color: #FFFFFF !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 8px 24px rgba(99, 102, 241, 0.35) !important;
  cursor: pointer;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.cz-add-to-cart-btn:hover {
  box-shadow: 0 10px 28px rgba(99, 102, 241, 0.45) !important;
  transform: translateY(-1px);
}

.cz-add-to-cart-btn:active {
  transform: scale(0.98);
}

.cz-add-to-cart-btn svg {
  stroke: #FFFFFF !important;
  flex-shrink: 0;
}

.cz-add-to-cart-btn span {
  display: inline-block !important;
  color: #FFFFFF !important;
  font-size: 15px !important;
  font-weight: 600 !important;
}

/* Price Card */
.cz-card-price {
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-xl);
  padding: 16px 18px;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.025),
    inset 0 1px 1px rgba(255, 255, 255, 0.85);
  box-sizing: border-box;
}

.cz-price-header {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.cz-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: #374151;
  font-weight: 500;
  padding: 4px 0;
}

.cz-price-designs-total {
  color: var(--text-muted);
  font-size: 13px;
}

.cz-price-divider {
  height: 1px;
  background: var(--glass-divider);
  margin: var(--space-3) 0;
}

.cz-price-total {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.cz-price-total span:last-child {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.cz-price-designs-list {
  padding: var(--space-1) 0 var(--space-2);
}

.price-design-item {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  padding: 4px 0 4px 12px;
  border-left: 2px solid rgba(85, 96, 120, 0.12);
  margin: 3px 0;
}

.price-no-designs {
  font-size: 12px;
  color: var(--text-disabled);
  font-style: italic;
  padding: 4px 0;
}

/* Right panel info block (How It Works) */
.cz-info-block {
  background: rgba(255, 255, 255, 0.40);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid rgba(255, 255, 255, 0.68);
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60);
}

.cz-info-block summary {
  display: flex;
  align-items: center;
  outline: none;
}

.cz-info-block summary::-webkit-details-marker {
  display: none;
}

.cz-info-block h4 {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  margin: 0;
}

.cz-info-block[open] h4 {
  margin-bottom: var(--space-3);
}

.cz-info-block p, .cz-step {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Toast */
.cz-toast {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(110%);
  -webkit-backdrop-filter: blur(16px) saturate(110%);
  color: var(--text-primary);
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 10px 30px rgba(35, 45, 65, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.cz-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Sidebar overlay (mobile) */
.cz-sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(233, 234, 237, 0.65);
  z-index: 1999;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cz-sidebar-overlay.active {
  display: block;
}

/* Ripple */
.cz-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(103, 126, 245, 0.18);
  transform: scale(0);
  animation: czRipple 0.5s ease-out;
  pointer-events: none;
}

@keyframes czRipple {
  to { transform: scale(3); opacity: 0; }
}

/* ===================================================================
   RESPONSIVE DESIGN SYSTEM
   =================================================================== */

/* Elements hidden on Desktop/Tablet (>= 768px) */
@media (min-width: 768px) {
  .cz-mobile-menu-btn,
  .cz-sheet-grab-bar,
  .cz-mobile-sheet-header,
  .cz-mobile-nav-card,
  .cz-mobile-dock-card,
  .cz-sheet-backdrop,
  .cz-sidebar-toggle {
    display: none !important;
  }
}

/* Tablet & Smaller Laptops (768px to 1024px) */
@media (max-width: 1024px) and (min-width: 768px) {
  .cz-topbar {
    height: 52px;
    margin: 8px auto 0;
    width: calc(100% - 24px);
    padding: 0 16px;
  }

  .cz-layout {
    grid-template-columns: 270px minmax(340px, 1fr) 260px;
    gap: 12px;
    padding: 10px 12px;
    height: calc(100vh - 76px);
    max-height: calc(100vh - 76px);
  }

  .cz-canvas-wrapper {
    width: min(100%, 420px);
    height: min(calc(100vh - 190px), 460px);
  }
}

/* ===================================================================
   MOBILE DEVICES (≤ 767px) — iOS LIQUID GLASS THEME
   =================================================================== */
@media (max-width: 767px) {
  body {
    background: #EAECEF;
    overflow-x: hidden;
  }

  .cz-layout {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: calc(100vh - 64px);
    max-height: none;
    padding: 8px 12px 32px;
    gap: 12px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
  }

  /* --- Top slim bar --- */
  .cz-topbar {
    height: 52px;
    margin: 8px auto 0;
    width: calc(100% - 24px);
    padding: 0 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(20px) saturate(160%);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .cz-back-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    color: #1E293B;
  }

  .cz-back-text {
    display: none !important;
  }

  .cz-topbar-title {
    font-size: 16.5px;
    font-weight: 700;
    color: #1E293B;
    letter-spacing: -0.2px;
  }

  .cz-mobile-menu-btn {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    padding: 0;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.80);
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
    color: #374151;
    cursor: pointer;
  }

  /* --- Canvas Area, Live Preview & Studio Card --- */
  .cz-canvas-area {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0;
  }

  .cz-canvas-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #4361EE;
    background: rgba(238, 242, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.95);
    padding: 4px 14px;
    border-radius: 50px;
    box-shadow: 0 2px 8px rgba(67, 97, 238, 0.08);
    margin: 2px auto 8px;
  }

  .cz-live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #4361EE;
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.25);
  }

  .cz-canvas-label::before {
    display: none;
  }

  .cz-canvas-wrapper {
    width: min(calc(100vw - 28px), 330px) !important;
    height: 340px !important;
    max-height: 44vh;
    aspect-ratio: auto !important;
    margin: 0 auto;
    border-radius: 22px;
  }

  .cz-canvas-bg {
    width: 100% !important;
    height: 100% !important;
    border-radius: 22px;
    background: #DADADA;
    border: 1px solid rgba(255, 255, 255, 0.70);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
  }

  /* --- Floating Zoom Bar --- */
  .cz-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 8px auto 10px;
    width: 100%;
  }

  .cz-zoom-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 30px;
    padding: 3px 10px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
  }

  .cz-zoom-btn {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #475569;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }

  .cz-zoom-btn:active {
    background: rgba(0, 0, 0, 0.06);
  }

  .cz-zoom-level {
    font-size: 11.5px;
    font-weight: 600;
    color: #1E293B;
    min-width: 38px;
    text-align: center;
  }

  .cz-zoom-reset-btn {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #475569;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05);
    cursor: pointer;
  }

  .cz-zoom-reset-btn:active {
    transform: scale(0.95);
  }

  /* --- Screen 1: Bottom Navigation Card --- */
  .cz-mobile-nav-card {
    width: min(calc(100vw - 24px), 340px);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    padding: 10px 12px 14px;
    box-sizing: border-box;
    display: block;
  }

  .cz-sheet-grab-bar {
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #CBD5E1;
    margin: 4px auto 12px;
    display: block !important;
  }

  .cz-mobile-nav-row {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-radius: 14px;
    background: rgba(248, 250, 252, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.90);
    margin-bottom: 8px;
    cursor: pointer;
    text-align: left;
    transition: all 150ms ease;
    box-sizing: border-box;
  }

  .cz-mobile-nav-row:last-child {
    margin-bottom: 0;
  }

  .cz-mobile-nav-row:active {
    transform: scale(0.98);
    background: #EEF2FF;
  }

  .cz-mobile-nav-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    flex-shrink: 0;
  }

  .cz-icon-purple {
    background: #EEF2FF;
    color: #4F46E5;
  }

  .cz-icon-blue {
    background: #EFF6FF;
    color: #3B82F6;
  }

  .cz-icon-teal {
    background: #F0FDFA;
    color: #0D9488;
  }

  .cz-letter-icon {
    font-size: 15px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", 'Inter', sans-serif;
  }

  .cz-mobile-nav-text {
    font-size: 13.5px;
    font-weight: 600;
    color: #1E293B;
    flex: 1;
  }

  .cz-mobile-nav-chevron {
    color: #94A3B8;
  }

  /* --- Screen 4: Bottom Docked Summary Card --- */
  .cz-mobile-dock-card {
    width: min(calc(100vw - 24px), 340px);
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(24px) saturate(160%);
    -webkit-backdrop-filter: blur(24px) saturate(160%);
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    padding: 12px 14px;
    box-sizing: border-box;
  }

  .cz-mobile-dock-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin-bottom: 12px;
  }

  .cz-dock-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 4px;
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.85);
    background: rgba(248, 250, 252, 0.85);
    color: #475569;
    font-size: 10.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 180ms ease;
  }

  .cz-dock-tab.active {
    background: linear-gradient(135deg, #4361EE, #5833EA);
    color: #FFFFFF;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35);
  }

  .cz-dock-tab.active .cz-dock-tab-icon {
    color: #FFFFFF;
  }

  .cz-dock-tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 18px;
  }

  .cz-letter-icon-sm {
    font-size: 13px;
    font-weight: 700;
  }

  .cz-dock-price-section {
    border-top: 1px solid rgba(226, 232, 240, 0.85);
    padding-top: 10px;
    margin-bottom: 12px;
  }

  .cz-dock-price-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 6px;
  }

  .cz-dock-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    color: #475569;
    margin-bottom: 4px;
  }

  .cz-dock-price-total {
    font-weight: 700;
    color: #0F172A;
    font-size: 13px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed rgba(203, 213, 225, 0.85);
  }

  .cz-dock-add-to-cart-btn {
    width: 100%;
    padding: 12px;
    border-radius: 14px;
    background: linear-gradient(135deg, #4361EE, #5833EA);
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 16px rgba(67, 97, 238, 0.35);
    transition: transform 150ms ease, box-shadow 150ms ease;
  }

  .cz-dock-add-to-cart-btn:active {
    transform: scale(0.98);
  }

  /* --- Screen 2 & Screen 3: Bottom Sheets --- */
  .cz-sidebar,
  .cz-right-panel {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    max-height: 84vh !important;
    border-radius: 28px 28px 0 0 !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(28px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(28px) saturate(180%) !important;
    transform: translateY(105%) !important;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1) !important;
    z-index: 2500 !important;
    overflow-y: auto !important;
    padding: 8px 16px 32px !important;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.90) !important;
    border-bottom: none !important;
    box-sizing: border-box !important;
  }

  .cz-sidebar.open,
  .cz-right-panel.open {
    transform: translateY(0) !important;
  }

  .cz-sidebar-header,
  .cz-mobile-sheet-header {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 0 4px 12px !important;
    border-bottom: none !important;
  }

  .cz-sidebar-header h3,
  .cz-mobile-sheet-header h3 {
    font-size: 18px !important;
    font-weight: 700 !important;
    color: #0F172A !important;
    margin: 0 !important;
  }

  .cz-sidebar-close,
  .cz-mobile-sheet-close {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border: none !important;
    color: #64748B !important;
    font-size: 15px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
  }

  .cz-sidebar-close:active,
  .cz-mobile-sheet-close:active {
    background: rgba(0, 0, 0, 0.10) !important;
  }

  /* Screen 2: Prints details */
  .cz-sidebar-designs {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
    max-height: none !important;
    overflow-y: visible !important;
    padding: 4px 16px !important;
  }

  .cz-sidebar-search-row {
    padding: 12px 16px;
  }

  .cz-design-thumb {
    aspect-ratio: 1 !important;
    border-radius: 16px !important;
    background: #FFFFFF !important;
    border: 1px solid rgba(226, 232, 240, 0.90) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03) !important;
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 8px !important;
  }

  .cz-design-thumb img {
    max-width: 85% !important;
    max-height: 85% !important;
    object-fit: contain !important;
  }

  .cz-design-price {
    position: absolute !important;
    top: 8px !important;
    right: 8px !important;
    background: #4361EE !important;
    color: #FFFFFF !important;
    font-size: 10.5px !important;
    font-weight: 700 !important;
    border-radius: 20px !important;
    padding: 2px 7px !important;
    box-shadow: 0 2px 6px rgba(67, 97, 238, 0.25) !important;
  }

  .cz-design-name {
    font-size: 11.5px !important;
    font-weight: 500 !important;
    color: #475569 !important;
    text-align: center !important;
    margin-top: 6px !important;
  }

  /* Screen 3: Preview & Actions details */
  .cz-card-view,
  .cz-card-actions,
  .cz-card-price {
    background: rgba(248, 250, 252, 0.85) !important;
    border-radius: 18px !important;
    border: 1px solid rgba(226, 232, 240, 0.85) !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02) !important;
    padding: 14px !important;
    margin-bottom: 12px !important;
  }

  .cz-view-btn.active {
    background: linear-gradient(135deg, #4361EE, #5833EA) !important;
    color: #FFFFFF !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35) !important;
  }

  .cz-actions-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 8px !important;
  }

  .cz-action-btn {
    background: rgba(255, 255, 255, 0.90) !important;
    border: 1px solid rgba(226, 232, 240, 0.90) !important;
    border-radius: 14px !important;
    padding: 10px 8px !important;
    min-height: 56px !important;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 4px !important;
    color: #334155 !important;
  }

  .cz-action-btn span {
    display: block !important;
    font-size: 11px !important;
    font-weight: 600 !important;
    color: #475569 !important;
  }

  .cz-size-section {
    margin-top: 14px !important;
  }

  .cz-size-label {
    font-size: 13px !important;
    font-weight: 600 !important;
    color: #475569 !important;
    margin-bottom: 8px !important;
    display: block !important;
  }

  .cz-size-pills {
    display: flex !important;
    gap: 6px !important;
    width: 100% !important;
  }

  .cz-size-pill {
    flex: 1 !important;
    padding: 8px 0 !important;
    border-radius: 10px !important;
    border: 1px solid rgba(226, 232, 240, 0.90) !important;
    background: rgba(255, 255, 255, 0.90) !important;
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    text-align: center !important;
    cursor: pointer !important;
  }

  .cz-size-pill.active {
    background: linear-gradient(135deg, #4361EE, #5833EA) !important;
    border-color: transparent !important;
    color: #FFFFFF !important;
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.35) !important;
  }

  .cz-price-row {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    font-size: 12.5px !important;
    color: #475569 !important;
    margin-bottom: 4px !important;
  }

  .price-no-designs {
    font-size: 12px !important;
    color: #94A3B8 !important;
    font-style: italic !important;
    margin-bottom: 8px !important;
  }

  .cz-add-to-cart-btn {
    width: 100% !important;
    padding: 14px 20px !important;
    border-radius: 16px !important;
    background: linear-gradient(135deg, #4361EE, #5833EA) !important;
    color: #FFFFFF !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 6px 20px rgba(67, 97, 238, 0.35) !important;
    border: none !important;
  }

  /* Backdrop */
  .cz-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.40);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2400;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    display: block !important;
  }

  .cz-sheet-backdrop.active {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ===================================================================
   DRAFT RESTORE OVERLAY — Premium Loading Animation
   =================================================================== */
.cz-draft-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(233, 234, 237, 0.82);
  backdrop-filter: blur(18px) saturate(110%);
  -webkit-backdrop-filter: blur(18px) saturate(110%);
  animation: czOverlayIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.5s ease, backdrop-filter 0.5s ease;
}

.cz-draft-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

/* Dual-ring spinner */
.cz-draft-overlay .cz-spinner {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 22px;
}

.cz-draft-overlay .cz-spinner::before,
.cz-draft-overlay .cz-spinner::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid transparent;
}

.cz-draft-overlay .cz-spinner::before {
  border-top-color: var(--accent-purple);
  border-right-color: var(--accent-purple);
  animation: czDraftSpin 0.9s linear infinite;
}

.cz-draft-overlay .cz-spinner::after {
  inset: 6px;
  border-bottom-color: var(--accent-blue);
  border-left-color: var(--accent-blue);
  animation: czDraftSpin 1.4s linear infinite reverse;
}

@keyframes czDraftSpin {
  to { transform: rotate(360deg); }
}

/* Pulsing center dot */
.cz-draft-overlay .cz-spinner-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  margin: -4px 0 0 -4px;
  background: var(--accent-gradient);
  border-radius: 50%;
  animation: czDotPulse 1.2s ease-in-out infinite;
}

@keyframes czDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.6); opacity: 0.5; }
}

/* Text with shimmer */
.cz-draft-overlay .cz-draft-text {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, #5F6676 0%, #8A90A0 50%, #5F6676 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: czTextShimmer 2s linear infinite;
}

@keyframes czTextShimmer {
  to { background-position: -200% center; }
}

@keyframes czOverlayIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===================================================================
   GLASS MODAL — Custom Prompt / Confirm Dialogs
   =================================================================== */
.cz-glass-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(32, 36, 50, 0.35);
  backdrop-filter: blur(12px) saturate(110%);
  -webkit-backdrop-filter: blur(12px) saturate(110%);
  animation: czModalBdIn 0.3s ease;
  transition: opacity 0.3s ease;
}

.cz-glass-modal-backdrop.fade-out {
  opacity: 0;
  pointer-events: none;
}

.cz-glass-modal {
  width: 92%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(24px) saturate(110%);
  -webkit-backdrop-filter: blur(24px) saturate(110%);
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  padding: 32px 28px 24px;
  text-align: center;
  animation: czModalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.cz-glass-modal-backdrop.fade-out .cz-glass-modal {
  transform: scale(0.95) translateY(8px);
  opacity: 0;
  transition: all 0.25s ease;
}

.cz-glass-modal-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.cz-glass-modal-title {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.cz-glass-modal-msg {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 20px;
}

.cz-glass-modal-input {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.58);
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  color: var(--text-primary);
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease;
  margin-bottom: 20px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.65);
}

.cz-glass-modal-input:focus {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.cz-glass-modal-actions {
  display: flex;
  gap: 10px;
}

.cz-glass-modal-cancel,
.cz-glass-modal-confirm {
  flex: 1;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", 'Inter', sans-serif;
  cursor: pointer;
  transition: background-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
  border: none;
}

.cz-glass-modal-cancel {
  background: rgba(255, 255, 255, 0.45);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border-subtle);
}

.cz-glass-modal-cancel:hover {
  background: var(--app-surface-hover);
  color: var(--text-primary);
}

.cz-glass-modal-confirm {
  background: var(--accent-gradient);
  color: var(--text-on-accent);
  box-shadow: 0 4px 16px rgba(104, 115, 239, 0.25);
}

.cz-glass-modal-confirm:hover {
  box-shadow: 0 6px 24px rgba(104, 115, 239, 0.35);
}

.cz-glass-modal-confirm:active {
  transform: scale(0.98);
}

@keyframes czModalBdIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes czModalIn {
  from { opacity: 0; transform: scale(0.9) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* --- Advanced Text Tool Styles --- */
.cz-align-btn {
  flex: 1;
  padding: 8px 0;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60);
}

.cz-align-btn:hover {
  background: var(--app-surface-hover);
  color: var(--text-primary);
}

.cz-align-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-blue);
}

/* --- Text style presets (TextStyles.js) --- */
.cz-text-styles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.cz-tstyle-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.cz-tstyle-tabs::-webkit-scrollbar { display: none; }

.cz-tstyle-tab {
  flex: 0 0 auto;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.45);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.cz-tstyle-tab.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-blue);
}

.cz-tstyle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 300px;
  overflow-y: auto;
  padding-right: 2px;
}

.cz-tstyle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
  padding: 4px 4px 5px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60);
  transition: background-color 180ms ease, border-color 180ms ease, transform 120ms ease;
}

.cz-tstyle:hover { background: var(--app-surface-hover); color: var(--text-primary); }
.cz-tstyle:active { transform: scale(0.97); }
.cz-tstyle.active { background: var(--accent-soft); border-color: var(--accent-border); color: var(--accent-blue); }

.cz-tstyle-img {
  display: block;
  width: 100%;
  aspect-ratio: 240 / 110;
  border-radius: 6px;
  background: #f4f3ef;
  object-fit: contain;
}

.cz-tstyle-img.loading { background: linear-gradient(90deg, #f1f0ec, #e7e5df, #f1f0ec); background-size: 200% 100%; animation: czTsShimmer 1.2s linear infinite; }

@keyframes czTsShimmer { to { background-position: -200% 0; } }

.cz-tstyle-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

.cz-tstyle-extra {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cz-tstyle-extra[hidden] { display: none; }
.cz-tstyle-extra label { min-width: 52px; }
.cz-tstyle-extra .cz-tstyle-caption { flex: 1; min-height: 34px; padding: 6px 10px; text-transform: uppercase; }

/* --- Text shape & style (TextEffects.js) --- */
.cz-text-fx {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cz-fx-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.3px;
}

.cz-fx-current {
  font-weight: 600;
  color: var(--accent-purple);
}

.cz-fx-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.cz-fx-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 8px 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.45);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.60);
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 120ms ease;
}

.cz-fx-btn:hover {
  background: var(--app-surface-hover);
  color: var(--text-primary);
}

.cz-fx-btn:active {
  transform: scale(0.97);
}

.cz-fx-btn.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-blue);
}

.cz-fx-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cz-fx-disabled {
  opacity: 0.45;
}

.cz-text-style-row {
  display: flex;
  gap: 8px;
}

.cz-text-style-row .cz-text-align-options {
  flex: 1;
}

.cz-style-btn {
  font-size: 14px;
}

.cz-color-picker-sm {
  width: 30px;
  height: 30px;
  padding: 2px;
  flex-shrink: 0;
}

.cz-text-shadow-row {
  display: flex;
  flex-direction: column;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid var(--glass-border-inner);
  border-radius: var(--radius-sm);
  margin-top: var(--space-1);
}

/* ===================================================================
   TOOLBAR BUTTON LABELS
   =================================================================== */
.cz-btn-label {
  display: block;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.3px;
  color: var(--text-muted);
  margin-top: 2px;
  line-height: 1;
}

/* ===================================================================
   PRICE PULSE ANIMATION
   =================================================================== */
@keyframes czPricePulse {
  0% { transform: scale(1); }
  30% { transform: scale(1.06); color: var(--accent-purple); }
  60% { transform: scale(0.98); }
  100% { transform: scale(1); }
}

.cz-price-pulse {
  animation: czPricePulse 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  display: inline-block;
}

/* ===================================================================
   HOW IT WORKS — ICON STEPS
   =================================================================== */
.cz-steps {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.cz-step {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.cz-step-icon {
  font-size: 16px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-soft);
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}


/* ===================================================================
   DRAG & DROP VISUAL FEEDBACK
   =================================================================== */

/* Sidebar thumbnail being dragged */
.cz-design-thumb.cz-dragging {
  opacity: 0.4;
  transform: scale(0.92);
  transition: all 0.2s;
}

.cz-design-thumb[draggable="true"] {
  cursor: grab;
}

.cz-design-thumb[draggable="true"]:active {
  cursor: grabbing;
}

/* Canvas wrapper drop zone active state */
.cz-canvas-wrapper.cz-drop-active {
  border-color: var(--accent-border);
  box-shadow:
    0 12px 40px rgba(35, 45, 65, 0.06),
    0 0 0 3px rgba(103, 126, 245, 0.12);
  transition: all 0.2s ease;
}

.cz-canvas-wrapper.cz-drop-active .cz-canvas-bg {
  outline: 2px dashed rgba(103, 130, 255, 0.35);
  outline-offset: -4px;
  border-radius: var(--radius-xl);
}
/* Global Stock: sold-out size */
.cz-size-pill.cz-size-soldout,
.cz-size-pill:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
  background: rgba(255, 255, 255, 0.35);
  box-shadow: none;
}

/* ===== Full-screen T-shirt preview (btnFullscreen) ===== */
.cz-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 6000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(56px, env(safe-area-inset-top)) 12px max(24px, env(safe-area-inset-bottom));
  box-sizing: border-box;
  background: #0f1115;
  opacity: 0;
  transition: opacity 0.25s ease;
}

.cz-fullscreen[hidden] {
  display: none;
}

.cz-fullscreen.open {
  opacity: 1;
}

.cz-fullscreen-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 18px;
  transform: scale(0.96);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
}

.cz-fullscreen.open .cz-fullscreen-img {
  transform: scale(1);
}

.cz-fullscreen-label {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(132, 146, 195, 0.25);
  color: #4a5a7d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.cz-fullscreen-close {
  position: absolute;
  top: max(12px, env(safe-area-inset-top));
  right: 12px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(132, 146, 195, 0.25);
  background: rgba(255, 255, 255, 0.95);
  color: #1f2433;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.cz-zoom-level[role="button"] {
  cursor: pointer;
}

/* --- 360° 3D preview (Viewer3D.js) --- */
.cz-3d-btn {
  width: auto;
  gap: 4px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.cz3d {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  background: radial-gradient(ellipse at 50% 40%, #f4f5f9 0%, var(--app-background) 70%);
}

.cz3d[hidden] {
  display: none;
}

.cz3d-top,
.cz3d-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  flex-wrap: wrap;
}

.cz3d-bottom {
  justify-content: center;
  flex-direction: column;
  padding-bottom: max(18px, env(safe-area-inset-bottom));
}

.cz3d-title {
  font-weight: 800;
  font-size: 15px;
  color: var(--text-primary);
  letter-spacing: 0.4px;
}

.cz3d .cz3d-close {
  position: static;
}

.cz3d-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  touch-action: none;
}

.cz3d-stage canvas {
  display: block;
  width: 100% !important;
  height: 100% !important;
  cursor: grab;
}

.cz3d-stage canvas:active {
  cursor: grabbing;
}

.cz3d-status {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--app-surface-strong);
  border: 1px solid var(--glass-border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  max-width: calc(100% - 32px);
}

.cz3d-status[hidden] {
  display: none;
}

.cz3d-sides {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}

.cz3d-side {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.55);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}

.cz3d-side:hover {
  background: var(--app-surface-hover);
  color: var(--text-primary);
}

.cz3d-side.active {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-blue);
}

.cz3d-side[hidden] {
  display: none;
}

.cz3d-hint {
  font-size: 12px;
  color: var(--text-muted);
}

/* Remove BG button in the object toolbar (BackgroundRemover.js) */
.cz-obj-btn-accent {
  color: var(--accent-blue);
}

.cz-obj-btn-accent span {
  white-space: nowrap;
}

/* Share button + share sheet (ShareManager.js) */
.cz-actions-grid .cz-action-wide {
  grid-column: 1 / -1;
  flex-direction: row;
  gap: 8px;
}

.cz-share-modal {
  position: relative;
}

.cz-share-modal .cz-share-link {
  font-size: 13px;
  text-overflow: ellipsis;
}

.cz-share-actions {
  flex-wrap: wrap;
}

.cz-share-actions > * {
  flex: 1 1 auto;
  text-align: center;
  text-decoration: none;
}

.cz-share-close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cz-share-close:hover {
  background: var(--accent-soft);
  color: var(--text-primary);
}

/* Share modal: Instagram Story preview (9:16) with the share button under it, ivory editorial look */
.cz-share-modal:has(.cz-share-preview) {
  background: #F7F6F2;
  border: 1px solid #D8D6D0;
  max-height: 94vh;
  overflow-y: auto;
}

.cz-share-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  margin: 6px 0 18px;
}

.cz-share-story {
  display: block;
  height: min(58vh, 520px);
  max-width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  border-radius: 22px;
  border: 1px solid #D8D6D0;
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.10);
}

.cz-share-modal .cz-share-ig {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  height: 60px;
  padding: 0 24px;
  border: none;
  border-radius: 999px;
  background: #111111;
  color: #FFFFFF;
  font: 600 13px/1 Inter, sans-serif;
  letter-spacing: 2px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(17, 17, 17, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.cz-share-modal .cz-share-ig:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 28px rgba(17, 17, 17, 0.22);
}

.cz-share-or {
  margin: 0 0 10px;
  color: #8A8A8A;
  font: 500 12.5px/1.5 Inter, sans-serif;
  text-align: center;
}

@media (max-height: 640px) {
  .cz-share-story { height: 46vh; }
}

/* --- Design templates (UIManager.loadTemplates) --- */
.cz-template-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding-right: 2px;
}

.cz-template-item {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 4px 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.70);
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  transition: background-color 180ms ease, transform 120ms ease;
}

.cz-template-item:hover { background: var(--app-surface-hover); color: var(--text-primary); }
.cz-template-item:active { transform: scale(0.97); }

.cz-template-item img {
  display: block;
  width: 100%;
  aspect-ratio: 480 / 611;
  object-fit: cover;
  border-radius: 6px;
  background: #1a1a1a;
}

.cz-template-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }

.cz-template-tee {
  position: absolute;
  top: 9px;
  left: 9px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  color: #111;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: capitalize;
}

/* ---- Adjustable print areas (View card companion) ---- */
.cz-card-zones[hidden], .cz-zone-row[hidden] { display: none; }
.cz-zone-head { display: flex; align-items: center; justify-content: space-between; }
.cz-zone-head .cz-right-title { margin-bottom: 4px; }
.cz-zone-reset {
  border: 1px solid rgba(85, 96, 120, 0.2); background: rgba(255, 255, 255, 0.7); color: var(--text-secondary);
  font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 999px; cursor: pointer;
}
.cz-zone-reset:hover { color: var(--accent-purple); border-color: var(--accent-purple); }
.cz-zone-hint { margin: 0 0 10px; font-size: 11.5px; line-height: 1.4; color: var(--text-secondary); }
.cz-zone-row { display: flex; align-items: center; gap: var(--space-2); font-size: 12.5px; margin-bottom: 8px; }
.cz-zone-row label { font-weight: 600; min-width: 74px; color: var(--text-secondary); }
.cz-zone-row .cz-size-value { min-width: 48px; font-size: 12px; }
.cz-zone-sizes { display: flex; flex-wrap: wrap; gap: 4px 6px; margin-top: 4px; }
.cz-zone-chip {
  font-size: 10.5px; font-weight: 600; color: var(--text-secondary); background: rgba(85, 96, 120, 0.08);
  border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}

/* ---- Zoom bar under the canvas on desktop (the mobile block above only styles <=767px;
        without this the −/100%/+ stacked vertically and pushed 3D / full screen out of view) ---- */
@media (min-width: 768px) {
  .cz-zoom-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 12px auto 0;
    flex-shrink: 0;
  }
  .cz-zoom-pill {
    display: flex;
    align-items: center;
    gap: 2px;
    height: 36px;
    padding: 0 4px;
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    box-shadow: 0 4px 16px rgba(35, 45, 65, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.85);
  }
  .cz-zoom-bar .cz-zoom-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
  }
  .cz-zoom-bar .cz-zoom-level {
    min-width: 44px;
    font-size: 12px;
    color: var(--text-primary);
    border-radius: 8px;
    padding: 4px 2px;
  }
  .cz-zoom-bar .cz-zoom-level:hover { color: var(--accent-blue); }
  .cz-zoom-reset-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    height: 36px;
    min-width: 36px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid var(--glass-border);
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    color: var(--text-secondary);
    box-shadow: 0 4px 16px rgba(35, 45, 65, 0.06), inset 0 1px 1px rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: color 180ms ease, background-color 180ms ease, transform 120ms ease;
  }
  .cz-zoom-reset-btn:hover { color: var(--accent-blue); background: rgba(255, 255, 255, 0.92); }
  .cz-zoom-reset-btn:active { transform: scale(0.95); }
  .cz-zoom-reset-btn.cz-3d-btn { padding: 0 14px; }
  /* leave room for the bar under the canvas so it never drops below the fold */
  .cz-canvas-wrapper { height: min(calc(100vh - 230px), 528px); }
}
@media (min-width: 1600px) {
  .cz-canvas-wrapper { height: min(calc(100vh - 240px), 594px); }
}


/* ===================================================================
   iPAD / TABLET
   =================================================================== */

/* Landscape tablets (iPad mini / Air landscape): the narrow right column clipped "Back" / "Right Sleeve" */
@media (max-width: 1024px) and (min-width: 768px) {
  .cz-view-btn { min-width: 0; padding: 9px 6px; font-size: 12px; gap: 4px; white-space: nowrap; }
  .cz-view-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
}

/* Tall wide screens (iPad Pro landscape, tall monitors): use the extra height for a bigger canvas */
@media (min-width: 1025px) and (min-height: 900px) {
  .cz-canvas-wrapper { width: min(100%, 600px); height: min(calc(100vh - 230px), 660px); }
}

/* Portrait tablets (iPad mini 768, Air 820, Pro 11" 834, Pro 12.9" 1024):
   big canvas across the top, the two panels side by side underneath, each scrolling on its own
   so the shirt stays in view while editing. */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait) {
  :root { --cz-tab-canvas-w: min(calc(100vw - 64px), calc((100vh * 0.6 - 120px) / 1.1)); }

  .cz-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    gap: 12px 14px;
    max-width: none;
    padding: 8px 16px 16px;
    height: calc(100vh - 72px);
    max-height: calc(100vh - 72px);
  }
  .cz-canvas-area { grid-column: 1 / -1; grid-row: 1; height: auto; }
  .cz-sidebar { grid-column: 1; grid-row: 2; height: 100%; min-height: 0; }
  .cz-right-panel { grid-column: 2; grid-row: 2; height: 100%; min-height: 0; padding-right: 2px; }

  .cz-canvas-label { margin-bottom: 6px; }
  .cz-canvas-wrapper {
    width: var(--cz-tab-canvas-w);
    height: calc(var(--cz-tab-canvas-w) * 1.1);
  }
  .cz-zoom-bar { margin-top: 8px; }

  /* touch: bigger hit areas */
  .cz-obj-btn { min-width: 46px; padding: 7px 10px; }
  .cz-obj-btn span { font-size: 9px; }
  .cz-zoom-bar .cz-zoom-btn { width: 34px; height: 34px; }
  .cz-zoom-pill, .cz-zoom-reset-btn { height: 40px; }
  .cz-view-btn { padding: 11px 8px; }
  .cz-template-grid { max-height: none; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }

}

/* Touch screens (iPad, phones): a swipe that starts on a slider's track scrolls the panel instead of moving the
   slider; only the knob drags it (bigger knob to grab). Stops sizes / spacing / print areas changing while scrolling. */
@media (pointer: coarse) {
  .cz-size-slider,
  .cz-obj-opacity input[type="range"] { pointer-events: none; height: 6px; }
  .cz-size-slider::-webkit-slider-thumb,
  .cz-obj-opacity input[type="range"]::-webkit-slider-thumb { pointer-events: auto; width: 26px; height: 26px; }
  .cz-size-slider::-moz-range-thumb,
  .cz-obj-opacity input[type="range"]::-moz-range-thumb { pointer-events: auto; width: 26px; height: 26px; }
}
