/* ==========================================================================
   Online Static QR Code Generator — ToolsTurbo.com
   Theme: Light UI matching ToolsTurbo Brand Identity:
   - Primary Blue: #2563EB
   - Accent Purple: #7C3AED
   - Brand Gradient: #2563EB to #7C3AED
   - Text Dark/Black: #161B33
   - Surface: #F8FAFC / #FFFFFF
   ========================================================================== */

:root {
  --tt-brand-blue: #2563EB;
  --tt-brand-blue-hover: #1D4ED8;
  --tt-brand-purple: #7C3AED;
  --tt-brand-purple-hover: #6D28D9;
  --tt-brand-gradient: linear-gradient(135deg, #2563EB 0%, #7C3AED 100%);
  --tt-brand-gradient-hover: linear-gradient(135deg, #1D4ED8 0%, #6D28D9 100%);
  --tt-brand-soft: rgba(37, 99, 235, 0.08);
  --tt-brand-border: rgba(37, 99, 235, 0.22);
  --tt-brand-purple-soft: rgba(124, 58, 237, 0.08);
  --tt-brand-purple-border: rgba(124, 58, 237, 0.22);

  --tt-bg: #F8FAFC;
  --tt-card-bg: #FFFFFF;
  --tt-input-bg: #F8FAFC;
  --tt-border: #dbdce0;
  --tt-border-strong: #dbdce0;
  --tt-line-size: 2pt;

  --tt-text: #161B33;
  --tt-text-muted: #64748B;

  --tt-danger: #DC2626;
  --tt-danger-soft: #FEF2F2;
  --tt-danger-border: #FCA5A5;

  --tt-warning: #D97706;
  --tt-warning-soft: #FFFBEB;
  --tt-warning-border: #FDE68A;

  --tt-success: #16A34A;
  --tt-success-soft: #F0FDF4;
  --tt-success-border: #BBF7D0;

  --tt-radius: 14px;
  --tt-radius-sm: 8px;
  --tt-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --tt-max-width: 1200px;
  --header-top-offset: 60px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--tt-bg);
  color: var(--tt-text);
  font-family: var(--tt-font);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

/* Embedded in ToolsTurbo Platform (Single Page Integration) */
html.is-embedded,
html.is-embedded body,
body.is-embedded {
  overflow: hidden !important;
  background: transparent !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

html.is-embedded .tt-header,
html.is-embedded .tt-notice,
html.is-embedded .tt-intro-header,
html.is-embedded .tt-seo-section,
html.is-embedded .tt-footer,
html.is-embedded .tt-mobile-tab-bar,
body.is-embedded .tt-header,
body.is-embedded .tt-notice,
body.is-embedded .tt-intro-header,
body.is-embedded .tt-seo-section,
body.is-embedded .tt-footer,
body.is-embedded .tt-mobile-tab-bar {
  display: none !important;
}

html.is-embedded .tt-page,
body.is-embedded .tt-page {
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
}

html.is-embedded .tt-main,
body.is-embedded .tt-main {
  padding: 12px 14px 20px !important;
  max-width: 100% !important;
  margin: 0 !important;
}

a {
  color: var(--tt-brand-blue);
  text-decoration: none;
  transition: color 0.15s ease;
}
a:hover { color: var(--tt-brand-purple); }

.tt-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---- Header (Brand Bar) ------------------------------------------------ */
.tt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  background: var(--tt-card-bg);
  border-bottom: 1px solid var(--tt-border);
  flex-wrap: wrap;
  gap: 12px;
}

.tt-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.25rem;
  text-decoration: none;
  color: var(--tt-text);
  letter-spacing: -0.02em;
}

.tt-brand__name { display: inline-flex; align-items: center; }
.tt-brand__tools { color: var(--tt-brand-blue); }
.tt-brand__turbo { color: var(--tt-brand-purple); }

.tt-gear {
  color: var(--tt-brand-blue);
  display: inline-flex;
  transition: transform 0.6s ease, color 0.3s ease;
}
.tt-brand:hover .tt-gear {
  transform: rotate(90deg);
  color: var(--tt-brand-purple);
}

.tt-breadcrumb {
  font-size: 0.9rem;
  color: var(--tt-text-muted);
}
.tt-breadcrumb a { color: var(--tt-text-muted); text-decoration: none; }
.tt-breadcrumb a:hover { color: var(--tt-brand-blue); }

/* ---- Notice / Auth Banner --------------------------------------------- */
.tt-notice {
  background: var(--tt-brand-soft);
  border: 1px solid var(--tt-brand-border);
  border-radius: var(--tt-radius-sm);
  padding: 10px 16px;
  font-size: 0.88rem;
  color: var(--tt-text);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.tt-badge-privacy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--tt-success-soft);
  border: 1px solid var(--tt-success-border);
  color: var(--tt-success);
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  margin-left: auto;
}

/* ---- Main Container ---------------------------------------------------- */
.tt-main {
  flex: 1;
  max-width: var(--tt-max-width);
  width: 100%;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.tt-intro-header {
  margin-bottom: 24px;
}
.tt-intro-header h1 {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 8px;
  color: var(--tt-text);
  letter-spacing: -0.02em;
}
.tt-intro-header p {
  color: var(--tt-text-muted);
  font-size: 0.98rem;
  margin: 0;
  max-width: 75ch;
}

/* ---- Two-Column App Layout -------------------------------------------- */
.tt-generator-grid {
  display: grid;
  grid-template-columns: 1fr 390px;
  grid-template-areas: "config preview";
  gap: 28px;
  align-items: start;
}

@media (max-width: 799px) {
  .tt-generator-grid {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }
}

/* ---- Left Column: Controls & Configuration ---------------------------- */
.tt-config-col {
  grid-area: config;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.tt-card {
  background: var(--tt-card-bg);
  border: 2pt solid #dbdce0;
  border-radius: var(--tt-radius);
  padding: 24px;
  box-shadow: 0 4px 20px -8px rgba(22, 27, 51, 0.08);
}

/* Space-Saving QR Type & Input Card */
.tt-type-card {
  padding: 18px 20px;
  background: #ffffff;
  border: 2pt solid #dbdce0;
  border-radius: var(--tt-radius);
  box-shadow: 0 2px 12px -4px rgba(22, 27, 51, 0.05);
}

/* Unified Space-Saving Card (Single outer card containing inputs, tabs and panels) */
.tt-unified-card {
  padding: 18px 20px 22px;
}
.tt-unified-card .tt-tabs-bar {
  margin: 18px 0 16px;
}
.tt-unified-card .tt-panel-card {
  padding: 14px 0 0;
  background: transparent;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.tt-type-row {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 14px;
}

.tt-type-row-label {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--tt-text);
  white-space: nowrap;
}

.tt-type-row .tt-type-dropdown {
  flex: 1;
  margin-bottom: 0;
}

.tt-inline-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.tt-input--inline {
  flex: 1;
  height: 42px !important;
  border: 2pt solid #dbdce0 !important;
  border-radius: 8px !important;
  padding: 0 14px !important;
  font-size: 0.95rem !important;
  color: var(--tt-text) !important;
  background: #ffffff !important;
  outline: none !important;
  box-sizing: border-box !important;
}

.tt-input--inline:focus {
  border-color: var(--tt-brand-blue) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15) !important;
}

.tt-btn--generate {
  height: 42px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: linear-gradient(135deg, #3b82f6 0%, #4f46e5 50%, #7c3aed 100%);
  color: #ffffff !important;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 3px 12px -2px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.tt-btn--generate:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 16px -2px rgba(79, 70, 229, 0.45);
  background: linear-gradient(135deg, #2563eb 0%, #4338ca 50%, #6d28d9 100%);
}

.tt-btn--generate:active {
  transform: translateY(0);
}

/* Space-Saving Horizontal Tabs Bar (100% Identical to Screenshot) */
.tt-tabs-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  margin: 20px 0 14px;
  padding: 0 2px;
  border-bottom: 2pt solid #dbdce0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

@media (max-width: 600px) {
  .tt-tabs-bar {
    justify-content: flex-start;
  }
}

.tt-tabs-bar::-webkit-scrollbar {
  display: none;
}

.tt-tab-btn {
  background: none;
  border: none;
  padding: 8px 2px 12px;
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--tt-text-muted);
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color 0.15s ease;
  user-select: none;
}

.tt-tab-btn:hover {
  color: var(--tt-text);
}

.tt-tab-btn.active {
  color: var(--tt-text);
  font-weight: 700;
}

.tt-tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2pt;
  left: 0;
  right: 0;
  height: 2.5pt;
  background: linear-gradient(90deg, #2563eb 0%, #5045e5 50%, #7c3aed 100%);
  border-radius: 2px;
}

.tt-tab-panels {
  width: 100%;
}

.tt-tab-panel {
  display: none;
  width: 100%;
}

.tt-tab-panel.active {
  display: block;
}

.tt-panel-card {
  padding: 20px 24px;
  background: var(--tt-card-bg);
  border: 2pt solid #dbdce0;
  border-radius: var(--tt-radius);
  box-shadow: 0 4px 20px -8px rgba(22, 27, 51, 0.08);
}

.tt-panel-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.tt-panel-icon {
  font-size: 1.35rem;
  line-height: 1;
}

.tt-panel-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--tt-text);
  margin: 0;
}

.tt-panel-subtitle {
  font-size: 0.88rem;
  color: var(--tt-text-muted);
  margin: 4px 0 0;
}

/* ---- Custom Dropdown: QR Type Selector --------------------------------- */
.tt-type-dropdown {
  position: relative;
  margin-bottom: 16px;
}

.tt-type-dropdown__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--tt-card-bg);
  border: 2pt solid var(--tt-border-strong);
  border-radius: var(--tt-radius-sm);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--tt-text);
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  user-select: none;
}
.tt-type-dropdown__trigger:hover {
  border-color: var(--tt-brand-blue);
  background: var(--tt-input-bg);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08);
}
.tt-type-dropdown.open .tt-type-dropdown__trigger {
  border-color: var(--tt-brand-blue);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
  background: #FFFFFF;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.tt-type-dropdown__selected-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
}

.tt-type-dropdown__selected-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tt-type-dropdown__chevron {
  flex-shrink: 0;
  color: var(--tt-text-muted);
  display: flex;
  align-items: center;
  transition: transform 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
.tt-type-dropdown.open .tt-type-dropdown__chevron {
  transform: rotate(180deg);
  color: var(--tt-brand-blue);
}

/* Dropdown Menu Panel */
.tt-type-dropdown__menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 200;
  background: #FFFFFF;
  border: 1.5px solid var(--tt-brand-blue);
  border-top: none;
  border-bottom-left-radius: var(--tt-radius-sm);
  border-bottom-right-radius: var(--tt-radius-sm);
  box-shadow: 0 12px 32px -8px rgba(37, 99, 235, 0.18), 0 4px 16px -4px rgba(0,0,0,0.08);
  max-height: 360px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--tt-border-strong) transparent;
}
.tt-type-dropdown__menu::-webkit-scrollbar { width: 5px; }
.tt-type-dropdown__menu::-webkit-scrollbar-thumb { background: var(--tt-border-strong); border-radius: 4px; }

.tt-type-dropdown.open .tt-type-dropdown__menu {
  display: block;
  animation: tt-dropdown-in 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tt-dropdown-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Individual Items */
.tt-type-dropdown__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 16px;
  cursor: pointer;
  border-bottom: 1px solid var(--tt-border);
  transition: background 0.12s ease;
  user-select: none;
}
.tt-type-dropdown__item:last-child { border-bottom: none; }

.tt-type-dropdown__item:hover {
  background: var(--tt-brand-soft);
}
.tt-type-dropdown__item.active {
  background: var(--tt-brand-soft);
}
.tt-type-dropdown__item.active .tt-type-dropdown__item-label {
  color: var(--tt-brand-blue);
  font-weight: 700;
}

.tt-type-dropdown__item-icon {
  font-size: 1.2rem;
  line-height: 1;
  flex-shrink: 0;
  width: 22px;
  text-align: center;
}

.tt-type-dropdown__item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.tt-type-dropdown__item-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--tt-text);
  line-height: 1.2;
}

.tt-type-dropdown__item-hint {
  font-size: 0.75rem;
  color: var(--tt-text-muted);
  font-weight: 400;
  line-height: 1.3;
}

.tt-type-dropdown__check {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tt-brand-blue);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}
.tt-type-dropdown__item.active .tt-type-dropdown__check {
  opacity: 1;
}


/* ---- Dynamic Input Forms ----------------------------------------------- */
.tt-form-section {
  margin-top: 8px;
}
.tt-field {
  margin-bottom: 16px;
}
.tt-field:last-child { margin-bottom: 0; }

.tt-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tt-text);
  margin-bottom: 6px;
}
.tt-label .tt-hint {
  font-size: 0.76rem;
  font-weight: 400;
  color: var(--tt-text-muted);
}

.tt-input, .tt-textarea, .tt-select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--tt-radius-sm);
  border: 2pt solid var(--tt-border);
  background: var(--tt-input-bg);
  color: var(--tt-text);
  font-family: inherit;
  font-size: 0.92rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  outline: none;
}
.tt-input:focus, .tt-textarea:focus, .tt-select:focus {
  background: #FFFFFF;
  border-color: var(--tt-brand-blue);
  box-shadow: 0 0 0 3.5px rgba(37, 99, 235, 0.12);
}

.tt-textarea {
  resize: vertical;
  min-height: 85px;
}

.tt-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
@media (max-width: 580px) {
  .tt-grid-2 { grid-template-columns: 1fr; }
}

.tt-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 640px) {
  .tt-grid-3 { grid-template-columns: 1fr; }
}

/* ---- Accordion Sections for Customization ----------------------------- */
.tt-accordion {
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
  margin-bottom: 12px;
  overflow: hidden;
  background: var(--tt-card-bg);
}
.tt-accordion:last-child { margin-bottom: 0; }

.tt-accordion__header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--tt-card-bg);
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--tt-text);
  text-align: left;
  transition: background 0.15s ease;
}
.tt-accordion__header:hover {
  background: var(--tt-input-bg);
}
.tt-accordion__icon {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
  color: var(--tt-text-muted);
}
.tt-accordion.open .tt-accordion__icon {
  transform: rotate(180deg);
}

.tt-accordion__content {
  display: none;
  padding: 18px;
  border-top: 1px solid var(--tt-border);
  background: #FFFFFF;
}
.tt-accordion.open .tt-accordion__content {
  display: block;
}

/* ---- Color Controls & Palette Presets --------------------------------- */
.tt-color-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.tt-color-picker-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 2pt solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
  padding: 4px 8px;
  background: var(--tt-input-bg);
}
.tt-color-picker-box input[type="color"] {
  border: none;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  background: transparent;
  padding: 0;
}
.tt-color-picker-box input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.tt-color-picker-box input[type="color"]::-webkit-color-swatch { border: 1px solid var(--tt-border); border-radius: 4px; }
.tt-color-hex {
  width: 80px;
  border: none;
  background: transparent;
  font-family: monospace;
  font-size: 0.88rem;
  font-weight: 600;
  text-transform: uppercase;
  outline: none;
}

.tt-presets-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.tt-preset-chip,
.tt-eye-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 2pt solid var(--tt-border);
  background: var(--tt-input-bg);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  color: var(--tt-text);
}
.tt-preset-chip:hover,
.tt-eye-preset-chip:hover {
  border-color: var(--tt-brand-blue);
  background: var(--tt-card-bg);
}
.tt-preset-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.15);
}

/* ---- Shape / Style Buttons (Matching Space-Saving Screenshot) ---------- */
.tt-style-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.tt-dot-shapes-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 14px;
}

@media (max-width: 580px) {
  .tt-dot-shapes-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.tt-style-card {
  border: 2pt solid var(--tt-border);
  background: #ffffff;
  border-radius: 10px;
  padding: 16px 10px;
  text-align: center;
  cursor: pointer;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--tt-text);
  transition: all 0.15s ease;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.tt-style-card--sm {
  padding: 9px 8px;
  font-size: 0.82rem;
  border-radius: 8px;
  min-height: 40px;
  white-space: nowrap;
}

.tt-style-card:hover {
  border-color: #93c5fd;
  background: #f8faff;
}

.tt-style-card.active {
  border-color: #2563eb !important;
  border-width: 2pt !important;
  background: #ffffff !important;
  color: var(--tt-text) !important;
  box-shadow: 0 0 0 1px #2563eb !important;
}

.tt-shape-icon {
  font-size: 1.35rem;
  line-height: 1;
  color: var(--tt-text);
}

.tt-shape-label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--tt-text);
}

/* ---- Eye Row Compact Layout (Buttons + Color Picker in Same Row) ------- */
.tt-eye-control-group {
  margin-bottom: 12px;
}
.tt-eye-inline-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.tt-eye-shape-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  flex: 1;
}
.tt-color-picker-box--inline {
  flex: 0 0 120px;
  height: 40px;
  box-sizing: border-box;
  padding: 2px 8px;
  gap: 6px;
}
.tt-color-picker-box--inline input[type="color"] {
  width: 26px;
  height: 26px;
}
.tt-color-picker-box--inline .tt-color-hex {
  width: 66px;
  font-size: 0.82rem;
}
@media (max-width: 580px) {
  .tt-eye-inline-row {
    flex-direction: column;
    align-items: stretch;
  }
  .tt-color-picker-box--inline {
    flex: auto;
    width: 100%;
  }
}

/* ---- Sliders & Range Controls ------------------------------------------ */
.tt-slider-wrap {
  display: flex;
  align-items: center;
  gap: 14px;
}
.tt-range {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--tt-border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.tt-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 2.5px solid var(--tt-brand-blue);
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.35);
  cursor: grab;
  transition: transform 0.1s ease;
}
.tt-range::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.15);
}
.tt-range-val {
  min-width: 44px;
  text-align: right;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--tt-brand-blue);
}

/* ---- Toggle Switches --------------------------------------------------- */
.tt-toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.tt-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}
.tt-switch input { opacity: 0; width: 0; height: 0; }
.tt-slider-round {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: var(--tt-border-strong);
  transition: .2s;
  border-radius: 24px;
}
.tt-slider-round:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .2s;
  border-radius: 50%;
}
.tt-switch input:checked + .tt-slider-round {
  background-color: var(--tt-brand-blue);
}
.tt-switch input:checked + .tt-slider-round:before {
  transform: translateX(20px);
}

/* ---- Logo Upload Drop Area -------------------------------------------- */
.tt-logo-drop {
  border: 2px dashed var(--tt-border-strong);
  border-radius: var(--tt-radius-sm);
  padding: 20px 16px;
  text-align: center;
  background: var(--tt-input-bg);
  cursor: pointer;
  transition: all 0.15s ease;
}
.tt-logo-drop:hover {
  border-color: var(--tt-brand-blue);
  background: var(--tt-brand-soft);
}
.tt-logo-preview-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px;
  background: var(--tt-input-bg);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
}
.tt-logo-thumb {
  width: 44px;
  height: 44px;
  object-fit: contain;
  border-radius: 6px;
  background: #FFFFFF;
  border: 1px solid var(--tt-border);
  padding: 2px;
}

/* ---- Right Column: Live Preview & Download Panel ----------------------- */
.tt-preview-col {
  grid-area: preview;
  position: -webkit-sticky;
  position: sticky;
  top: 15px;
  z-index: 20;
}

.tt-preview-card {
  background: var(--tt-card-bg);
  border: 2pt solid #dbdce0;
  border-radius: var(--tt-radius);
  padding: 12px 14px 14px;
  box-shadow: 0 6px 24px -10px rgba(22, 27, 51, 0.15);
  text-align: center;
}

.tt-preview-header,
.tt-health-badge,
.tt-preview-title {
  display: none !important;
}

/* Scannability Health Badge */
.tt-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tt-success-soft);
  color: var(--tt-success);
  border: 1px solid var(--tt-success-border);
}
.tt-health-badge.warning {
  background: var(--tt-warning-soft);
  color: var(--tt-warning);
  border-color: var(--tt-warning-border);
}
.tt-health-badge.danger {
  background: var(--tt-danger-soft);
  color: var(--tt-danger);
  border-color: var(--tt-danger-border);
}

/* Preview Canvas Container — Borderless Clean Stage (No enclosing box or extra space) */
.tt-qr-stage {
  position: relative;
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: unset;
  box-shadow: none;
  margin-bottom: 12px;
}
.tt-qr-stage.checker-bg {
  background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), 
                    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%), 
                    linear-gradient(45deg, transparent 75%, #f1f5f9 75%), 
                    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0px;
  border-radius: 4px;
}

#qrCanvas {
  max-width: 100%;
  max-height: 290px;
  height: auto;
  display: block;
  border-radius: 4px;
}

/* Download & Actions Buttons */
.tt-actions-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tt-download-row {
  display: grid;
  grid-template-columns: 1fr 110px;
  gap: 6px;
}

.tt-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 20px;
  border-radius: var(--tt-radius-sm);
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
}
.tt-btn:active { transform: scale(0.98); }

.tt-btn--primary {
  background: var(--tt-brand-gradient);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
}
.tt-btn--primary:hover {
  background: var(--tt-brand-gradient-hover);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.38);
  transform: translateY(-1px);
}

.tt-btn--secondary {
  background: transparent;
  color: var(--tt-text);
  border: 2pt solid var(--tt-border-strong);
}
.tt-btn--secondary:hover {
  border-color: var(--tt-brand-blue);
  color: var(--tt-brand-blue);
  background: var(--tt-brand-soft);
}

.tt-btn--danger {
  background: transparent;
  color: var(--tt-danger);
  border: 1.5px solid var(--tt-danger-border);
}
.tt-btn--danger:hover {
  background: var(--tt-danger-soft);
}

.tt-btn--sm {
  padding: 6px 10px;
  font-size: 0.8rem;
}

.tt-quick-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-top: 0;
}

/* Warnings / Contrast Alerts */
.tt-alert {
  border-radius: var(--tt-radius-sm);
  padding: 12px 14px;
  font-size: 0.84rem;
  line-height: 1.4;
  text-align: left;
  margin-top: 14px;
  display: none;
}
.tt-alert.show { display: block; }
.tt-alert--warning {
  background: var(--tt-warning-soft);
  color: #92400E;
  border: 1px solid var(--tt-warning-border);
}
.tt-alert--danger {
  background: var(--tt-danger-soft);
  color: var(--tt-danger);
  border: 1px solid var(--tt-danger-border);
}

/* ---- Educational, How-To, Table & FAQ Sections ------------------------ */
.tt-seo-section {
  margin-top: 56px;
  border-top: 1px solid var(--tt-border);
  padding-top: 40px;
}

.tt-seo-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--tt-text);
  margin: 0 0 16px;
  letter-spacing: -0.02em;
}

.tt-how-to-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 24px 0 40px;
}
@media (max-width: 768px) {
  .tt-how-to-grid { grid-template-columns: 1fr; }
}

.tt-step-card {
  background: var(--tt-card-bg);
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  padding: 24px;
  position: relative;
  box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}
.tt-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--tt-brand-gradient);
  color: #FFFFFF;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1rem;
  margin-bottom: 14px;
}
.tt-step-card h3 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  color: var(--tt-text);
}
.tt-step-card p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--tt-text-muted);
}

/* Static vs Dynamic Table */
.tt-table-wrap {
  overflow-x: auto;
  margin: 24px 0 40px;
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  background: var(--tt-card-bg);
}
.tt-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.9rem;
}
.tt-table th, .tt-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--tt-border);
}
.tt-table th {
  background: var(--tt-input-bg);
  color: var(--tt-text);
  font-weight: 700;
}
.tt-table tr:last-child td { border-bottom: none; }
.tt-badge-yes {
  color: var(--tt-success);
  font-weight: 700;
}
.tt-badge-no {
  color: var(--tt-danger);
  font-weight: 700;
}

/* FAQ Accordion */
.tt-faq-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}
.tt-faq-item {
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
  background: var(--tt-card-bg);
  overflow: hidden;
}
.tt-faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 700;
  color: var(--tt-text);
  cursor: pointer;
  text-align: left;
}
.tt-faq-question:hover {
  background: var(--tt-input-bg);
}
.tt-faq-answer {
  display: none;
  padding: 0 20px 20px;
  color: var(--tt-text-muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.tt-faq-item.open .tt-faq-answer { display: block; }
.tt-faq-item.open .tt-faq-arrow { transform: rotate(180deg); }
.tt-faq-arrow {
  transition: transform 0.2s ease;
  font-size: 0.75rem;
  color: var(--tt-text-muted);
}

/* Footer */
.tt-footer {
  text-align: center;
  padding: 32px 16px;
  color: var(--tt-text-muted);
  font-size: 0.88rem;
  border-top: 1px solid var(--tt-border);
  margin-top: auto;
}

/* ---- Gradient Color Controls ------------------------------------------ */
/* ---- Gradient Color Controls (Photoshop Style) ----------------------- */
.tt-color-divider {
  height: 2pt;
  background: #dbdce0;
  margin: 14px 0 0;
}

.tt-gradient-panel {
  background: var(--tt-input-bg);
  border-radius: var(--tt-radius-sm);
  padding: 14px;
  border: 2pt solid var(--tt-border);
  margin-top: 8px;
}

.tt-gradient-slider-wrap {
  background: #FFFFFF;
  border: 2pt solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
  padding: 12px 14px 6px;
  margin-top: 10px;
}

.tt-gradient-slider-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.tt-stop-count-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--tt-brand-blue);
  background: var(--tt-brand-soft);
  border: 1px solid var(--tt-brand-border);
  padding: 2px 8px;
  border-radius: 999px;
}

/* The Gradient Ramp Bar */
.tt-gradient-ramp-container {
  position: relative;
  width: 100%;
  border-radius: 6px;
  padding: 2px;
  border: 2pt solid var(--tt-border-strong);
  background: #FFFFFF;
  cursor: crosshair;
  box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
  transition: border-color 0.15s ease;
}
.tt-gradient-ramp-container:hover {
  border-color: var(--tt-brand-blue);
}

.tt-gradient-ramp {
  height: 24px;
  border-radius: 4px;
  width: 100%;
  background-image: linear-gradient(45deg, #f1f5f9 25%, transparent 25%), 
                    linear-gradient(-45deg, #f1f5f9 25%, transparent 25%), 
                    linear-gradient(45deg, transparent 75%, #f1f5f9 75%), 
                    linear-gradient(-45deg, transparent 75%, #f1f5f9 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0px;
  transition: background 0.1s ease;
}

/* Stops Track Rail */
.tt-gradient-stops-track-wrap {
  position: relative;
  padding: 0 7px; /* 7px is half handle width */
  margin-top: 4px;
}

.tt-gradient-stops-track {
  position: relative;
  height: 26px;
  width: 100%;
  cursor: pointer;
}

/* Draggable Stop Handle (Photoshop house/pentagon shape) */
.tt-gradient-stop-handle {
  position: absolute;
  top: 0;
  width: 14px;
  height: 22px;
  transform: translateX(-50%);
  cursor: grab;
  user-select: none;
  z-index: 5;
  touch-action: none;
}
.tt-gradient-stop-handle:hover {
  z-index: 15;
}
.tt-gradient-stop-handle.dragging {
  cursor: grabbing;
  z-index: 25;
}

/* Upward pointing arrow tip into the ramp */
.tt-gradient-stop-handle::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 6px solid #475569;
  transition: border-bottom-color 0.15s ease;
}

/* Square handle base */
.tt-gradient-stop-handle .tt-stop-body {
  position: absolute;
  top: 6px;
  left: 0;
  width: 14px;
  height: 14px;
  background: #FFFFFF;
  border: 1.5px solid #475569;
  border-radius: 2px;
  padding: 1.5px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tt-gradient-stop-handle .tt-stop-color-fill {
  width: 100%;
  height: 100%;
  border-radius: 1px;
  display: block;
}

/* Active Stop Handle Highlight */
.tt-gradient-stop-handle.active {
  z-index: 20;
}
.tt-gradient-stop-handle.active::before {
  border-bottom-color: var(--tt-brand-blue);
}
.tt-gradient-stop-handle.active .tt-stop-body {
  border-color: var(--tt-brand-blue);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.4), 0 2px 6px rgba(0,0,0,0.3);
}

/* Stop Inspector (Active Stop Settings) */
.tt-stop-inspector {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  background: #FFFFFF;
  border: 2pt solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
  padding: 10px 14px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.tt-stop-inspector__field {
  display: flex;
  flex-direction: column;
}

.tt-stop-inspector__action {
  margin-left: auto;
}

.tt-color-picker-box--sm {
  padding: 2px 6px;
  height: 34px;
}
.tt-color-picker-box--sm input[type="color"] {
  width: 24px;
  height: 24px;
}
.tt-color-picker-box--sm .tt-color-hex {
  width: 70px;
  font-size: 0.82rem;
}

.tt-location-input-box {
  display: inline-flex;
  align-items: center;
  border: 2pt solid var(--tt-border);
  border-radius: var(--tt-radius-sm);
  background: var(--tt-input-bg);
  padding-right: 8px;
  width: 82px;
  height: 34px;
  box-sizing: border-box;
}
.tt-location-input-box:focus-within {
  background: #FFFFFF;
  border-color: var(--tt-brand-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.tt-location-num {
  width: 52px;
  border: none;
  background: transparent;
  padding: 4px 6px;
  font-size: 0.88rem;
  font-weight: 700;
  outline: none;
  text-align: right;
  color: var(--tt-text);
  font-family: inherit;
}
.tt-location-unit {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--tt-text-muted);
}

/* Gradient Presets */
.tt-gradient-presets {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tt-grad-preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 2pt solid var(--tt-border);
  background: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--tt-text);
  transition: all 0.15s ease;
}
.tt-grad-preset-chip:hover {
  border-color: var(--tt-brand-blue);
  background: var(--tt-brand-soft);
  color: var(--tt-brand-blue);
}

.tt-grad-preset-swatch {
  width: 18px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(0,0,0,0.15);
  display: inline-block;
}

.tt-dir-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}

.tt-dir-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 11px;
  border-radius: 999px;
  border: 2pt solid var(--tt-border-strong);
  background: var(--tt-card-bg);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--tt-text);
  transition: all 0.15s ease;
}
.tt-dir-pill:hover {
  border-color: var(--tt-brand-blue);
  color: var(--tt-brand-blue);
  background: var(--tt-brand-soft);
}
.tt-dir-pill.active {
  background: var(--tt-brand-gradient);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.28);
}

/* ---- Mobile-First: Bottom Tab Bar (hidden on mobile — new sticky layout) */
.tt-mobile-tab-bar {
  display: none; /* always hidden — replaced by sticky preview layout */
}

@media (max-width: 799px) {

  /* ===========================================================================
     MOBILE STICKY FIX — Mirrors the proven working structure from qr-gemeni mockup.
     
     Why sticky fails on mobile:
     1. body { display: flex } creates a flex formatting context that iOS/WebKit
        uses as a sticky containment — the sticky child gets trapped.
     2. .site-header { transform: translateY(-100%) } creates a new containing block
        for ALL descendants — this completely breaks position: sticky for any child.
     3. overflow: hidden/auto on ANY ancestor between the scroll root and the sticky
        element clips it out of the sticky context.
     
     The mockup works because:
     - body is display: block (standard block flow = document is the scroll root)
     - .main-content-wrapper uses flex-direction: column + align-items: flex-start
       (CRITICAL: flex-start prevents sticky child from stretching to parent height)
     - No transform, contain, or will-change on any ancestor
     - No overflow: hidden/auto on any ancestor
     =========================================================================== */

  /* 1. BODY: Switch from flex to block — exactly like the mockup's body.
        This ensures the DOCUMENT is the scroll root, not a flex container. */
  html, body {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
  }

  /* 2. SITE HEADER: Must NOT be sticky and must NOT use transform.
        In the mockup, the header simply scrolls away naturally.
        transform: translateY(-100%) is the #1 sticky killer on mobile. */
  .site-header {
    position: relative !important;
    top: auto !important;
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
    z-index: auto !important;
  }
  /* Prevent the header-hidden class from applying transform */
  .site-header.header-hidden {
    transform: none !important;
  }

  /* 3. EVERY ANCESTOR between body and .tt-preview-col must have:
        - overflow: visible (no clipping)
        - transform: none (no new containing block)
        - contain: none (no layout containment)
        - will-change: auto (no compositor layers that break sticky) */
  .site-main,
  main {
    display: block !important;
    overflow: visible !important;
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
  }

  .tool-page-header {
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
  }

  .tool-canvas-wrap,
  .container.tool-canvas-wrap {
    display: block !important;
    overflow: visible !important;
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
    padding: 0 !important;
  }

  .tool-canvas-container {
    display: block !important;
    overflow: visible !important;
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
    margin: 0 !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
  }

  /* 4. .tt-generator-grid: This is the DIRECT PARENT of .tt-preview-col.
        Mirror the mockup's .main-content-wrapper:
        - display: flex; flex-direction: column;
        - align-items: flex-start; ← CRITICAL for sticky to work!
          Without flex-start, the sticky child stretches to the full height
          of the flex container, leaving zero scroll range = no sticking. */
  .tt-generator-grid {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    position: relative !important;
    gap: 0 !important;
    overflow: visible !important;
    transform: none !important;
    will-change: auto !important;
    contain: none !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Standalone mode wrapper (.tt-main) */
  .tt-main {
    padding: 0 0 16px !important;
    overflow: visible !important;
  }

  /* 5. .tt-preview-col — THE STICKY ELEMENT
        Mirrors the mockup's .sticky-card exactly:
        - position: sticky; top: 0;
        - width: 100% (must set explicitly since parent is flex-start)
        - z-index high enough to overlay scrolling content
        - Clean white background with bottom border and shadow */
  .tt-preview-col {
    display: block !important;
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 500 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    background: #ffffff !important;
    border: 1px solid #e0e0e0 !important;
    border-top: none !important;
    border-radius: 0 0 8px 8px !important;
    box-shadow: 0 8px 15px -5px rgba(0, 0, 0, 0.1) !important;
    padding: 10px 12px 12px !important;
    margin: 0 !important;
    /* No transform, no contain, no will-change on the sticky element itself */
  }

  /* 6. CONFIG COLUMN: must also be width: 100% since parent is flex-start */
  .tt-config-col {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    gap: 0 !important;
  }

  /* Remove extra boxes from setting cards on mobile — clean full-width sections */
  .tt-card {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    border-bottom: 1px solid var(--tt-border) !important;
    padding: 16px 12px !important;
    margin-bottom: 0 !important;
    box-sizing: border-box !important;
  }

  /* Compact preview card without extra box wrapper */
  .tt-preview-card {
    padding: 8px 10px !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    text-align: left;
    overflow: hidden;
    box-sizing: border-box !important;
  }

  /* Compact header — hide badge */
  .tt-preview-header {
    margin-bottom: 6px;
  }
  .tt-preview-title {
    font-size: 0.82rem;
  }
  .tt-health-badge {
    display: none;
  }

  /* Two-column inner: QR left (compact 130px), actions right (maximum space)
     Mirrors the mockup's .preview-grid { display: flex; gap: 15px; align-items: center; } */
  .tt-mobile-preview-inner {
    display: flex;
    gap: 12px;
    align-items: center;
    max-width: 100%;
    box-sizing: border-box;
  }

  /* QR stage — borderless, compact 120px (matches mockup's 120x120) */
  .tt-qr-stage {
    min-height: unset !important;
    padding: 0 !important;
    margin-bottom: 0 !important;
    width: 120px;
    height: 120px;
    box-sizing: border-box;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    flex-shrink: 0;
  }
  #qrCanvas {
    width: 120px !important;
    height: 120px !important;
    max-width: 120px !important;
    border-radius: 4px;
    display: block;
  }

  /* Contrast alert */
  #contrastAlert {
    font-size: 0.68rem;
    padding: 2px 4px;
    margin-bottom: 2px;
  }

  /* Actions column — mirrors mockup's .preview-controls { flex: 1; } */
  .tt-actions-group {
    flex: 1;
    min-width: 0;
    max-width: 100%;
    gap: 4px;
  }
  .tt-download-row {
    grid-template-columns: 1fr 70px;
    gap: 4px;
    max-width: 100%;
  }
  .tt-select {
    font-size: 0.8rem;
    padding: 6px 4px;
    height: auto;
    min-width: 0;
    max-width: 100%;
  }
  .tt-btn--primary {
    font-size: 0.84rem;
    padding: 8px 10px;
    gap: 4px;
    width: 100%;
    justify-content: center;
  }
  #downloadBtn svg {
    display: none;
  }
  .tt-quick-actions {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
  }
  .tt-quick-actions .tt-btn--sm {
    flex: 1;
    justify-content: center;
    min-width: 0;
  }
  .tt-btn--sm {
    font-size: 0.75rem;
    padding: 5px 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}


.tt-toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--tt-text);
  color: #FFFFFF;
  padding: 12px 20px;
  border-radius: var(--tt-radius-sm);
  font-size: 0.88rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 9999;
}
.tt-toast.show {
  transform: translateY(0);
  opacity: 1;
}

