/* ==========================================================================
   Raha Tools - Text to Handwriting Studio (Page Styles)
   Handcrafted, Human-Engineered, Bespoke Design System
   Matches Raha Tools Gold Standard (Inter typography, clean slate & emerald accents)
   ========================================================================== */

/* Local High-Quality Handwriting & Doctor Fonts (Zero-latency offline loading) */
@font-face {
  font-family: 'Dr Sugiyama';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/drsugiyama.ttf') format('truetype');
}

@font-face {
  font-family: 'Just Me Again Down Here';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/justmeagain.ttf') format('truetype');
}

@font-face {
  font-family: 'Beth Ellen';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/bethellen.ttf') format('truetype');
}

@font-face {
  font-family: 'Zeyada';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/zeyada.ttf') format('truetype');
}

@font-face {
  font-family: 'Gloria Hallelujah';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/gloriahallelujah.ttf') format('truetype');
}

@font-face {
  font-family: 'Nothing You Could Do';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/nothingyoucoulddo.ttf') format('truetype');
}

@font-face {
  font-family: 'La Belle Aurore';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/labelleaurore.ttf') format('truetype');
}

@font-face {
  font-family: 'Dawning of a New Day';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/dawningofanewday.ttf') format('truetype');
}


:root {
  --hand-brand: #16a34a;
  --hand-brand-dark: #15803d;
  --hand-brand-light: #f0fdf4;
  --hand-brand-border: #bbf7d0;
  
  --hand-ink-blue: #1d4ed8;
  --hand-ink-black: #0f172a;
  
  --hand-desk-bg: #f1f5f9;
  --hand-panel-bg: #ffffff;
  --hand-border: #e2e8f0;
  --hand-border-hover: #cbd5e1;
  --hand-card-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.06), 0 2px 6px -1px rgba(15, 23, 42, 0.03);
  --hand-paper-shadow: 0 20px 40px -15px rgba(15, 23, 42, 0.15), 0 8px 16px -4px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(15, 23, 42, 0.04);
  --hand-radius: 16px;
}

/* ===== MODERN TOOL HERO (MATCHING JFIF-TO-JPG GOLD STANDARD) ===== */
.tool-hero {
  background: var(--gray-50, #f8fafc);
  padding: 80px 0 60px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tool-hero__inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 16px;
}

.tool-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
  box-shadow: 0 2px 8px rgba(22, 163, 74, 0.08);
}

.tool-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--hand-brand, #16a34a);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.22);
}

.tool-hero h1 {
  font-size: clamp(2rem, 5.5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.12;
  color: var(--gray-900, #0f172a);
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--primary, #16a34a) 0%, #10b981 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tool-hero p.subtitle {
  font-size: clamp(15px, 2.5vw, 18px);
  color: var(--gray-600, #475569);
  max-width: 640px;
  margin: 0 auto 28px;
  line-height: 1.65;
}

/* Trust Row — Centered pills */
.trust-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 36px;
}

.trust-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-700, #334155);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.trust-pill svg {
  color: var(--hand-brand, #16a34a);
  flex-shrink: 0;
}

/* STUDIO APP CONTAINER — 24px Rounded Card (Gold Standard) */
.app-container {
  max-width: 1320px;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  margin: 0 auto 40px;
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 24px;
  box-shadow: 0 10px 40px rgba(22, 163, 74, 0.06), 0 2px 10px rgba(0, 0, 0, 0.03);
  overflow: hidden;
  text-align: left;
}

/* Preset Chips strip — Hidden (now inside left panel) */
.presets-strip {
  display: none;
}

/* Mobile View Tabs — Handled below */
.mobile-view-tabs {
  display: none !important;
}

/* Old Tab System — Removed */
.studio-cat-tabs {
  display: none !important;
}
.studio-cat-panel {
  display: none !important;
}

/* MAIN WORKSPACE: Side-by-Side inside app-container */
.hand-workspace {
  display: grid;
  grid-template-columns: minmax(380px, 440px) 1fr;
  gap: 0;
  align-items: stretch;
  width: 100%;
}

/* LEFT PANEL: Scrollable Controls Card */
.hand-controls-card {
  background: #ffffff;
  border: none;
  border-right: 1px solid var(--hand-border, #e2e8f0);
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 96px);
  min-height: 560px;
}

.hand-controls-header {
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--hand-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.hand-controls-header h3 {
  font-size: 13.5px;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  letter-spacing: -0.01em;
}

.hand-controls-header h3 svg {
  color: var(--hand-brand);
}

.hand-quick-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.btn-ghost-sm {
  background: #ffffff;
  border: 1px solid var(--hand-border);
  padding: 4px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-ghost-sm:hover {
  background: #f1f5f9;
  color: #0f172a;
  border-color: #cbd5e1;
}

/* Controls Scroll Container */
.hand-controls-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.hand-controls-scroll::-webkit-scrollbar {
  width: 5px;
}
.hand-controls-scroll::-webkit-scrollbar-track {
  background: transparent;
}
.hand-controls-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 10px;
}

/* ACCORDION SECTIONS */
.accordion-section {
  border-bottom: 1px solid var(--hand-border);
}
.accordion-section:last-child {
  border-bottom: none;
}

.accordion-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 16px;
  cursor: pointer;
  background: #ffffff;
  border: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  transition: background 0.15s ease;
  user-select: none;
}
.accordion-header:hover {
  background: #f8fafc;
}

.accordion-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.accordion-header-left svg {
  color: #64748b;
  flex-shrink: 0;
  transition: color 0.15s;
}
.accordion-header-left span {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  letter-spacing: -0.01em;
}

.accordion-chevron {
  color: #94a3b8;
  transition: transform 0.2s ease, color 0.15s;
  flex-shrink: 0;
}
.accordion-section.open .accordion-chevron {
  transform: rotate(180deg);
  color: var(--hand-brand);
}
.accordion-section.open .accordion-header-left svg {
  color: var(--hand-brand);
}

.accordion-body {
  display: none;
  padding: 0 16px 14px;
}
.accordion-section.open .accordion-body {
  display: block;
  animation: accordionFadeIn 0.18s ease;
}

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

/* SECTION CONTENT STYLES */

/* Textarea Input */
.hand-textarea-wrap {
  position: relative;
}

.hand-textarea {
  width: 100%;
  min-height: 130px;
  max-height: 280px;
  padding: 12px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.6;
  color: #0f172a;
  background: #ffffff;
  resize: vertical;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s;
  box-sizing: border-box;
}
.hand-textarea:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 3px rgba(15, 23, 42, 0.08);
}

.hand-textarea-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
  font-size: 11px;
  color: #94a3b8;
  font-weight: 500;
}

/* Inline Preset Chips */
.presets-inline {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.preset-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.14s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}
.preset-chip svg {
  color: #64748b;
  transition: color 0.14s ease;
}
.preset-chip:hover {
  border-color: #cbd5e1;
  color: #0f172a;
  background: #f8fafc;
}
.preset-chip:hover svg {
  color: #0f172a;
}
.preset-chip.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
  box-shadow: 0 3px 10px rgba(15, 23, 42, 0.16);
}
.preset-chip.active svg {
  color: #ffffff;
}

/* Student Header Grid */
.header-inputs-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f8fafc;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
}

.input-field-sm {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.input-field-sm label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
}
.input-field-sm input,
.input-field-sm select {
  width: 100%;
  padding: 6px 8px;
  font-size: 12px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  box-sizing: border-box;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.input-field-sm input:focus,
.input-field-sm select:focus {
  border-color: #0f172a;
  box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.08);
}

/* Font Cards Grid */
.font-selector-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  max-height: 290px;
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.font-selector-grid::-webkit-scrollbar {
  width: 5px;
}
.font-selector-grid::-webkit-scrollbar-track {
  background: transparent;
}
.font-selector-grid::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}
.font-card {
  padding: 9px 10px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  text-align: left;
  transition: all 0.14s ease;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.font-card:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}
.font-card.active {
  border-color: #0f172a;
  background: #f8fafc;
  box-shadow: 0 0 0 2px #0f172a;
}
.font-card__name {
  font-size: 10px;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.font-card__sample {
  font-size: 17px;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

/* Custom Font Upload */
.custom-font-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1.5px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
}
.custom-font-upload:hover {
  border-color: #0f172a;
  background: #ffffff;
  color: #0f172a;
}

/* Ink Color Options */
.ink-color-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.ink-color-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px 5px 7px;
  border: 1.5px solid #e2e8f0;
  background: #ffffff;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ink-color-btn:hover {
  border-color: #94a3b8;
}
.ink-color-btn.active {
  border-color: #0f172a;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 0 0 1.5px #0f172a;
}
.ink-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  display: inline-block;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.ink-custom-color {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.ink-custom-color input[type="color"] {
  position: absolute;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

/* Paper Style Chips */
.paper-style-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-height: 270px;
  overflow-y: auto;
  padding-right: 2px;
  margin-bottom: 10px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
.paper-style-grid::-webkit-scrollbar {
  width: 5px;
}
.paper-style-grid::-webkit-scrollbar-track {
  background: transparent;
}
.paper-style-grid::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}
.paper-chip {
  padding: 8px 6px;
  border: 1.5px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  cursor: pointer;
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: #334155;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.paper-chip__thumb {
  width: 100%;
  height: 24px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  position: relative;
  overflow: hidden;
}
.paper-chip:hover {
  border-color: #94a3b8;
}
.paper-chip.active {
  border-color: #0f172a;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: 0 0 0 1.5px #0f172a;
}

/* Steppers */
.stepper-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid #f1f5f9;
}
.stepper-row:last-child {
  border-bottom: none;
}
.stepper-label {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.stepper-label span {
  font-size: 12.5px;
  font-weight: 600;
  color: #334155;
  letter-spacing: -0.01em;
}
.hand-stepper {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.14s ease;
}
.stepper-btn svg {
  color: #475569;
  transition: color 0.14s ease;
}
.stepper-btn:hover {
  background: #0f172a;
  border-color: #0f172a;
}
.stepper-btn:hover svg {
  color: #ffffff;
}
.stepper-btn:active {
  transform: scale(0.92);
}
.stepper-val {
  min-width: 56px;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: #0f172a;
  padding: 0 6px;
  user-select: none;
  font-variant-numeric: tabular-nums;
}

/* Toggle Switches */
.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
}
.toggle-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #0f172a;
  display: flex;
  flex-direction: column;
}
.toggle-desc {
  font-size: 10.5px;
  font-weight: 400;
  color: #94a3b8;
  margin-top: 0;
}
.hand-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
}
.hand-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.hand-switch-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #cbd5e1;
  transition: 0.2s;
  border-radius: 22px;
}
.hand-switch-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.2s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}
.hand-switch input:checked + .hand-switch-slider {
  background-color: var(--hand-brand);
}
.hand-switch input:checked + .hand-switch-slider:before {
  transform: translateX(16px);
}

/* Section Title */
.hand-section-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Diagram Upload Card */
.diagram-card {
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  padding: 10px;
  transition: border-color 0.15s;
}
.diagram-card:hover {
  border-color: #94a3b8;
}
.diagram-dropzone-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  cursor: pointer;
  text-align: center;
  gap: 4px;
  color: #475569;
}
.diagram-dropzone-btn span {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
}
.diagram-dropzone-btn small {
  font-size: 10px;
  color: #94a3b8;
}
.diagram-preview-thumb-wrap {
  position: relative;
  width: 100%;
  height: 100px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.diagram-preview-thumb-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}
.btn-diagram-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  color: #ffffff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}
.btn-diagram-remove:hover {
  background: #dc2626;
}
.diagram-controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

/* Doodle Toolbar */
.doodle-toolbar {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #f8fafc;
  padding: 6px 8px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  flex-wrap: wrap;
  transition: opacity 0.2s ease;
}
.doodle-toolbar.disabled {
  opacity: 0.45;
  pointer-events: none;
}
.doodle-tool-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 8px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.doodle-tool-btn:hover {
  background: #f1f5f9;
  color: #0f172a;
}
.doodle-tool-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}
.doodle-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.15);
  display: inline-block;
}
#doodle-canvas {
  cursor: crosshair;
}

/* Slider (hidden, controlled by steppers) */
.hand-slider {
  width: 100%;
  height: 6px;
  border-radius: 4px;
  background: #e2e8f0;
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.hand-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #0f172a;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
  cursor: pointer;
}

/* RIGHT PREVIEW PANE */
.hand-preview-pane {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  border: 1px solid var(--hand-border);
  border-radius: 10px;
  padding: 8px 14px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  gap: 8px;
  overflow: hidden;
}

.page-navigator {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}
.page-nav-btn {
  width: 32px;
  height: 32px;
  border-radius: 7px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #334155;
  transition: all 0.15s ease;
  flex-shrink: 0;
}
.page-nav-btn:hover:not(:disabled) {
  border-color: #0f172a;
  color: #0f172a;
  background: #f8fafc;
}
.page-nav-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.page-counter {
  font-size: 12px;
  font-weight: 700;
  color: #0f172a;
  min-width: 80px;
  text-align: center;
  white-space: nowrap;
}

.preview-zoom-controls {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  white-space: nowrap;
}

.zoom-stepper-group {
  display: inline-flex;
  align-items: center;
  background: #f8fafc;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  padding: 2px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  flex-shrink: 0;
}

.zoom-step-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: all 0.14s ease;
  flex-shrink: 0;
}
.zoom-step-btn:hover:not(:disabled) {
  background: #0f172a;
  border-color: #0f172a;
  color: #ffffff;
}
.zoom-step-btn:active:not(:disabled) {
  transform: scale(0.93);
}
.zoom-step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.zoom-level-label {
  min-width: 50px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: #0f172a;
  padding: 0 4px;
  user-select: none;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.zoom-btn {
  background: transparent;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.zoom-btn:hover {
  border-color: #94a3b8;
  color: #0f172a;
  background: #f8fafc;
}
.zoom-btn.active {
  background: #0f172a;
  color: #ffffff;
  border-color: #0f172a;
}

/* Studio Desk Viewport */
.paper-viewport {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  background: #e6ebf1;
  background-image: radial-gradient(rgba(148, 163, 184, 0.35) 1px, transparent 0);
  background-size: 20px 20px;
  border: 1px solid #d8e1ea;
  border-radius: var(--hand-radius);
  padding: 16px;
  display: flex;
  min-height: 480px;
  overflow: auto;
  position: relative;
  box-sizing: border-box;
}

.paper-stage {
  position: relative;
  flex-shrink: 0;
  margin: auto;
  transition: width 0.15s ease, height 0.15s ease;
}

.paper-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1200px;
  height: 1700px;
  background: #ffffff;
  box-shadow: var(--hand-paper-shadow);
  border-radius: 4px;
  transform-origin: 0 0;
  will-change: transform;
}

#handwriting-canvas {
  display: block;
  width: 1200px;
  height: 1700px;
  border-radius: 4px;
  background: #ffffff;
}

.paper-filter-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  border-radius: 4px;
  mix-blend-mode: multiply;
  display: none;
}
.paper-filter-overlay.active {
  display: block;
  background: radial-gradient(circle at 35% 25%, rgba(255, 255, 255, 0) 50%, rgba(0, 0, 0, 0.08) 100%),
              linear-gradient(135deg, rgba(255, 248, 220, 0.07) 0%, rgba(0, 0, 0, 0.05) 100%);
}

/* Download Action Strip */
.download-action-strip {
  background: #ffffff;
  border: 1px solid var(--hand-border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 16px -2px rgba(15, 23, 42, 0.05);
}
.download-info {
  display: flex;
  align-items: center;
  gap: 10px;
}
.download-info-icon {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  background: #f0fdf4;
  color: var(--hand-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--hand-brand-border);
}
.download-info-text h4 {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 1px;
}
.download-info-text p {
  font-size: 11px;
  color: #64748b;
  margin: 0;
}
.download-btn-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.btn-hand-primary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--hand-brand);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 700;
  border: none;
  cursor: pointer;
  transition: all 0.18s ease;
  box-shadow: 0 4px 14px rgba(22, 163, 74, 0.28);
}
.btn-hand-primary:hover {
  background: var(--hand-brand-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(22, 163, 74, 0.35);
}
.btn-hand-secondary {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ffffff;
  color: #334155;
  border: 1.5px solid var(--hand-border);
  padding: 9px 14px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.btn-hand-secondary:hover {
  border-color: #94a3b8;
  background: #f8fafc;
  color: #0f172a;
}

/* Sticky Bottom Bar */
.mobile-sticky-bar {
  display: none;
}

/* ===== MODERN EDITORIAL STYLES (MATCHING JFIF-TO-JPG GOLD STANDARD) ===== */
.how-section {
  padding: 80px 0;
  background: #ffffff;
  border-top: 1px solid var(--border, #e2e8f0);
}
.section-label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--primary-dark, #15803d);
  margin-bottom: 12px;
}
.section-title {
  font-size: clamp(24px, 5vw, 36px);
  font-weight: 800;
  color: var(--gray-900, #0f172a);
  margin-bottom: 16px;
  letter-spacing: -0.8px;
}
.section-desc {
  font-size: 16px;
  color: var(--gray-500, #64748b);
  max-width: 580px;
  margin: 0 auto 56px;
  line-height: 1.65;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.step-card {
  background: var(--gray-50, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 20px;
  padding: 36px 28px;
  transition: all 0.25s ease;
  text-align: left;
}
.step-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
  background: #ffffff;
  border-color: var(--primary-light, #22c55e);
}
.step-num {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--green-100, #dcfce7);
  color: var(--primary-dark, #15803d);
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.step-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900, #0f172a);
  margin-bottom: 12px;
}
.step-card p {
  font-size: 14.5px;
  color: var(--gray-500, #64748b);
  line-height: 1.6;
  margin: 0;
}

/* ===== 2026 SEO & EDITORIAL CONTAINER ===== */
.seo-modern {
  background: #ffffff;
  padding: 100px 0;
  position: relative;
  border-top: 1px solid var(--border, #e2e8f0);
}
.seo-modern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border, #e2e8f0), transparent);
}
.seo-container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}
.seo-header {
  text-align: center;
  margin-bottom: 72px;
}
.seo-header h2 {
  font-size: clamp(30px, 5vw, 44px);
  font-weight: 900;
  color: var(--gray-900, #0f172a);
  letter-spacing: -1.2px;
  margin-bottom: 20px;
}
.seo-header p {
  font-size: clamp(16px, 2.5vw, 20px);
  color: var(--gray-500, #64748b);
  line-height: 1.6;
  max-width: 760px;
  margin: 0 auto;
}

.seo-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  margin-bottom: 80px;
  text-align: left;
}
.seo-split-content h2,
.seo-split-content h3 {
  font-size: 28px;
  font-weight: 800;
  color: var(--gray-900, #0f172a);
  margin-bottom: 24px;
  letter-spacing: -0.5px;
}
.seo-split-content p {
  font-size: 16.5px;
  color: var(--gray-600, #475569);
  line-height: 1.8;
  margin-bottom: 20px;
}

.mobile-highlight-box {
  background: linear-gradient(145deg, #15803d 0%, #16a34a 100%);
  border-radius: 24px;
  padding: 48px;
  color: #ffffff;
  box-shadow: 0 24px 48px rgba(22, 163, 74, 0.22);
  position: relative;
  overflow: hidden;
  text-align: left;
}
.mobile-highlight-box::after {
  content: '';
  position: absolute;
  right: -50px;
  bottom: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent);
}
.mobile-highlight-box svg {
  color: #ffffff;
  margin-bottom: 24px;
}
.mobile-highlight-box h3 {
  font-size: 28px;
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 20px;
}
.mobile-highlight-box p {
  font-size: 17px;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
  margin-bottom: 0;
}

.seo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  margin-bottom: 80px;
}
.seo-card {
  background: var(--gray-50, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 20px;
  padding: 40px 32px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: left;
}
.seo-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.06);
  background: #ffffff;
  border-color: var(--primary, #16a34a);
}
.seo-card-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #f0fdf4;
  color: var(--primary, #16a34a);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}
.seo-card h3 {
  font-size: 22px;
  font-weight: 800;
  color: var(--gray-900, #0f172a);
  margin-bottom: 16px;
}
.seo-card p {
  font-size: 16px;
  color: var(--gray-600, #475569);
  line-height: 1.7;
  margin-bottom: 0;
}

/* Realism Comparison Table */
.realism-comparison-wrap {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 24px;
  padding: 40px 36px;
  margin: 0 auto 60px;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.03);
  text-align: left;
}
.realism-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  font-size: 14.5px;
}
.realism-table th {
  text-align: left;
  padding: 16px 18px;
  border-bottom: 2px solid #e2e8f0;
  font-weight: 800;
  color: #0f172a;
}
.realism-table td {
  padding: 16px 18px;
  border-bottom: 1px solid #f1f5f9;
  color: #475569;
  line-height: 1.55;
}
.realism-table tr:last-child td {
  border-bottom: none;
}
.realism-badge-bad {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #b91c1c;
  background: #fee2e2;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}
.realism-badge-good {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #15803d;
  background: #dcfce7;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 700;
}

/* FAQ Modern (Gold Standard) */
.faq-modern {
  background: #ffffff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 24px;
  padding: 48px;
  text-align: left;
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.03);
}
.faq-modern h3 {
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 32px;
  border-bottom: 2px solid #f1f5f9;
  padding-bottom: 16px;
  color: var(--gray-900, #0f172a);
}
.faq-item {
  margin-bottom: 28px;
}
.faq-item:last-child {
  margin-bottom: 0;
}
.faq-item h4 {
  font-size: 17.5px;
  font-weight: 700;
  color: var(--gray-900, #0f172a);
  margin-bottom: 10px;
}
.faq-item p {
  font-size: 15.5px;
  color: var(--gray-600, #475569);
  line-height: 1.65;
  margin-bottom: 0;
}

/* ===== FEATURES STRIP (DARK VAR(--GRAY-900)) ===== */
.features-strip {
  background: var(--gray-900, #0f172a);
  padding: 40px 0;
  margin-top: 60px;
}
.features-strip__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}
.feature-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  text-align: left;
}
.feature-item:last-child {
  border-right: none;
}
.feature-item__icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(16, 185, 129, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--green-400, #34d399);
  flex-shrink: 0;
}
.feature-item h4 {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 2px;
}
.feature-item p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 0;
  line-height: 1.4;
}

/* ===== REFINED CTA BAND ===== */
.cta-band {
  background: linear-gradient(135deg, var(--primary-dark, #15803d) 0%, var(--primary, #16a34a) 100%);
  padding: 80px 24px;
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.cta-band h2 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 900;
  color: #ffffff;
  margin-bottom: 16px;
  letter-spacing: -1px;
  position: relative;
  z-index: 1;
}
.cta-band p {
  font-size: 18px;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 36px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  z-index: 1;
}
.btn--white {
  background: #ffffff;
  color: var(--primary-dark, #15803d);
  border: none;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.btn--white:hover {
  background: #f8fafc;
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 1024px) {
  .features-strip__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-item:nth-child(2) {
    border-right: none;
  }
}
@media (max-width: 900px) {
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  .seo-split {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .mobile-highlight-box {
    padding: 32px;
  }
}
@media (max-width: 640px) {
  .features-strip__grid {
    grid-template-columns: 1fr;
  }
  .feature-item {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }
  .feature-item:last-child {
    border-bottom: none;
  }
}

/* Toast Notification */
.hand-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: 0 10px 25px -3px rgba(15, 23, 42, 0.35);
  pointer-events: none;
  opacity: 0;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 99999;
}
.hand-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Mobile Tool Tabs */
.mobile-tool-tabs {
  display: none;
  background: #f1f5f9;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid var(--hand-border);
  margin-bottom: 12px;
}
.mobile-tool-tab {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 12px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  transition: all 0.16s ease;
}
.mobile-tool-tab.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08);
}
.mobile-tool-tab svg {
  color: inherit;
}

/* DESKTOP (993px+) */
@media (min-width: 993px) {
  .hand-workspace {
    display: grid;
    grid-template-columns: minmax(360px, 420px) minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .hand-controls-card {
    position: static;
    border: none;
    border-right: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    box-shadow: none;
    height: calc(100vh - 120px);
    min-height: 560px;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .hand-preview-pane {
    position: static;
    border: none;
    border-radius: 0;
    box-shadow: none;
    height: calc(100vh - 120px);
    min-height: 560px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f8fafc;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .preview-toolbar {
    flex-shrink: 0;
    border: none;
    border-bottom: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    box-shadow: none;
    padding: 10px 16px;
    background: #ffffff;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .paper-viewport {
    flex: 1;
    min-height: 360px;
    overflow: auto;
    display: flex;
    padding: 16px;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .download-action-strip {
    flex-shrink: 0;
    border: none;
    border-top: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    box-shadow: none;
    padding: 12px 18px;
    display: flex;
    background: #ffffff;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .mobile-tool-tabs {
    display: none !important;
  }
  .mobile-sticky-bar {
    display: none !important;
  }
}

/* TABLET & INTERMEDIATE (769px to 992px) */
@media (min-width: 769px) and (max-width: 992px) {
  .tool-hero {
    padding: 60px 0 36px;
  }
  .mobile-tool-tabs {
    display: none;
  }
  .hand-workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .hand-controls-card {
    order: 2;
    position: static;
    border: none;
    border-top: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    max-height: none;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .hand-controls-scroll {
    max-height: none;
    overflow-y: visible;
  }
  .hand-preview-pane {
    order: 1;
    position: static;
    border: none;
    border-radius: 0;
    height: auto;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    gap: 0;
    background: #f8fafc;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .preview-toolbar {
    border: none;
    border-bottom: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .paper-viewport {
    min-height: 400px;
    height: 50vh;
    padding: 16px;
    display: flex;
    overflow: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .download-action-strip {
    display: flex;
    flex-shrink: 0;
    border: none;
    border-top: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    padding: 12px 16px;
    background: #ffffff;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .mobile-sticky-bar {
    display: none;
  }
}

/* SMARTPHONES & SMALL MOBILE (max-width: 768px) */
@media (max-width: 768px) {
  .tool-hero {
    padding: 40px 0 24px;
  }
  .tool-hero h1 {
    font-size: clamp(22px, 6vw, 32px);
    letter-spacing: -0.8px;
    margin-bottom: 12px;
  }
  .tool-hero p.subtitle {
    font-size: 14px;
    margin-bottom: 20px;
  }
  .trust-row {
    gap: 6px;
    margin-bottom: 24px;
  }
  .trust-pill {
    padding: 5px 10px;
    font-size: 11.5px;
  }
  .mobile-tool-tabs {
    display: flex;
    margin-bottom: 16px;
  }
  .app-container {
    border-radius: 16px;
    margin-bottom: 24px;
  }
  .hand-workspace {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .hand-controls-card {
    position: static;
    max-height: none;
    border: none;
    border-radius: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .hand-controls-card.mobile-hidden {
    display: none !important;
  }
  .hand-controls-scroll {
    max-height: none;
    overflow-y: visible;
  }
  .hand-preview-pane {
    display: none;
    flex-direction: column;
    gap: 0;
    border: none;
    border-radius: 0;
    background: #f8fafc;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .hand-preview-pane.mobile-active {
    display: flex !important;
  }
  .preview-toolbar {
    border: none;
    border-bottom: 1px solid var(--border, #e2e8f0);
    border-radius: 0;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
  }
  .paper-viewport {
    height: calc(100vh - 230px);
    min-height: 320px;
    max-height: none;
    padding: 12px;
    display: flex;
    overflow: auto;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
  }
  .download-action-strip {
    display: none;
  }
  .mobile-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid var(--hand-border, #e2e8f0);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.08);
    z-index: 999;
  }
  .mobile-sticky-bar .btn-hand-primary {
    flex: 1;
    padding: 11px 12px;
    font-size: 12.5px;
    justify-content: center;
  }
  .mobile-sticky-bar .page-nav-btn {
    width: 36px;
    height: 36px;
  }
  .mobile-sticky-bar .page-counter {
    min-width: 60px;
    font-size: 11px;
  }
  body {
    padding-bottom: 68px;
  }
  .header-inputs-grid {
    grid-template-columns: 1fr;
  }
  .download-btn-group {
    flex-direction: column;
    width: 100%;
  }
  .realism-comparison-wrap {
    padding: 20px 16px;
    overflow-x: auto;
  }
}
