/* ============================================================
   AIA BROCHURE STUDIO — Senior-Friendly Responsive Workspace UI
   ============================================================ */

:root {
  --ui-scale: 1;
  --ui-bg: #F3F5F9;
  --ui-card: #FFFFFF;
  --ui-brand: #D31145;
  --ui-brand-dark: #A00B34;
  --ui-brand-soft: #FFF0F4;
  --ui-green: #15803D;
  --ui-green-soft: #DCFCE7;
  --ui-border: #DCE3EC;
  --ui-text: #182230;
  --ui-muted: #526072;
  --radius-lg: 20px;
  --radius-md: 14px;
}

body.ui-font-normal { --ui-scale: 1; }
body.ui-font-large  { --ui-scale: 1.12; }
body.ui-font-xlarge { --ui-scale: 1.24; }

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--ui-bg);
  color: var(--ui-text);
  font-family: 'Sarabun', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: calc(16.5px * var(--ui-scale));
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* Sticky Top Navigation */
.studio-topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FFFFFF;
  border-bottom: 2px solid #E5EAF1;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.05);
  padding: 12px 20px;
}

.topbar-inner {
  max-width: 1480px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.brand-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-badge {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, #D31145, #9E0B32);
  color: #FFFFFF;
  font-weight: 800;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 6px 14px rgba(211, 17, 69, 0.25);
}

.brand-title {
  margin: 0;
  font-size: calc(20px * var(--ui-scale));
  font-weight: 800;
  color: #111827;
  line-height: 1.2;
}

.brand-sub {
  margin: 2px 0 0;
  font-size: calc(13.5px * var(--ui-scale));
  color: var(--ui-muted);
  font-weight: 600;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.font-size-bar {
  display: inline-flex;
  align-items: center;
  background: #F1F5F9;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 3px;
  gap: 3px;
}

.font-size-lbl {
  padding: 0 8px;
  font-size: 13.5px;
  font-weight: 700;
  color: #475569;
}

.font-btn {
  border: none;
  background: transparent;
  padding: 7px 12px;
  border-radius: 9px;
  font-weight: 800;
  color: #334155;
  cursor: pointer;
  min-height: 38px;
  font-size: 15px;
}

.font-btn.active {
  background: #FFFFFF;
  color: var(--ui-brand);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn-top {
  min-height: 46px;
  padding: 9px 18px;
  border-radius: 13px;
  border: 2px solid transparent;
  font-weight: 800;
  font-size: calc(15.5px * var(--ui-scale));
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.15s ease;
}

.btn-top:active {
  transform: scale(0.98);
}

.btn-preview-main {
  background: #FFF0F4;
  border-color: #F4B8C8;
  color: #B80D3B;
}

.btn-preview-main:hover {
  background: #FFE0E9;
}

.btn-download-png {
  background: linear-gradient(135deg, #16A34A, #15803D);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.25);
}

.btn-download-pdf {
  background: linear-gradient(135deg, #D31145, #9E0B32);
  color: #FFFFFF;
  box-shadow: 0 6px 16px rgba(211, 17, 69, 0.25);
}

/* Quick Step Jump Bar */
.step-jump-bar {
  max-width: 1480px;
  margin: 14px auto 0;
  padding: 0 20px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.step-pill {
  flex-shrink: 0;
  background: #FFFFFF;
  border: 1.5px solid var(--ui-border);
  border-radius: 999px;
  padding: 9px 16px;
  font-weight: 700;
  font-size: calc(14.5px * var(--ui-scale));
  color: #334155;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 44px;
}

.step-pill:hover,
.step-pill.active {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
  color: var(--ui-brand-dark);
}

.step-num-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--ui-brand);
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Main Workspace Layout */
.studio-main {
  max-width: 1480px;
  margin: 14px auto 90px;
  padding: 0 20px;
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.controls-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* Step Section Cards */
.step-card {
  background: var(--ui-card);
  border: 1.5px solid var(--ui-border);
  border-radius: var(--radius-lg);
  padding: 22px 22px 24px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
  scroll-margin-top: 90px;
}

.step-card-header {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1.5px solid #EEF2F6;
}

.step-badge-lg {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--ui-brand);
  color: #FFFFFF;
  font-weight: 800;
  font-size: calc(18px * var(--ui-scale));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-card-title {
  margin: 0;
  font-size: calc(19.5px * var(--ui-scale));
  font-weight: 800;
  color: #0F172A;
}

.step-card-desc {
  margin: 3px 0 0;
  font-size: calc(14px * var(--ui-scale));
  color: var(--ui-muted);
}

/* 1. Ready-made Plan Presets Grid */
.preset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.preset-btn {
  text-align: left;
  background: #FAFBFC;
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.preset-btn:hover {
  border-color: #F4A3B8;
  background: #FFF9FB;
}

.preset-btn.active {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
  box-shadow: 0 6px 16px rgba(211, 17, 69, 0.12);
}

.preset-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.preset-icon {
  font-size: 26px;
}

.preset-tag {
  font-size: 12px;
  font-weight: 800;
  padding: 3px 9px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  color: var(--ui-brand-dark);
}

.preset-title {
  font-size: calc(16px * var(--ui-scale));
  font-weight: 800;
  color: #0F172A;
  line-height: 1.3;
}

.preset-sub {
  font-size: calc(13px * var(--ui-scale));
  color: #475569;
  line-height: 1.4;
}

/* Form Controls (Senior-Friendly Large Inputs) */
.field-group {
  margin-bottom: 16px;
}

.field-group:last-child {
  margin-bottom: 0;
}

.field-label {
  display: block;
  font-weight: 800;
  font-size: calc(16px * var(--ui-scale));
  color: #1E293B;
  margin-bottom: 8px;
}

.input-lg, .select-lg, .textarea-lg {
  width: 100%;
  min-height: 52px;
  padding: 11px 16px;
  border-radius: 14px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  color: #0F172A;
  font-size: calc(17px * var(--ui-scale));
  font-weight: 600;
  transition: border-color 0.15s ease;
}

.textarea-lg {
  min-height: 92px;
  resize: vertical;
  line-height: 1.5;
}

.input-lg:focus, .select-lg:focus, .textarea-lg:focus {
  outline: none;
  border-color: var(--ui-brand);
  box-shadow: 0 0 0 4px rgba(211, 17, 69, 0.12);
}

/* Quick Chips */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.quick-chip {
  min-height: 40px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #334155;
  font-weight: 700;
  font-size: calc(14.5px * var(--ui-scale));
  cursor: pointer;
}

.quick-chip:hover, .quick-chip.active {
  background: var(--ui-brand-soft);
  border-color: var(--ui-brand);
  color: var(--ui-brand-dark);
}

/* Gender Big Buttons */
.gender-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.gender-btn {
  min-height: 56px;
  border-radius: 14px;
  border: 2px solid #CBD5E1;
  background: #F8FAFC;
  font-weight: 800;
  font-size: calc(17px * var(--ui-scale));
  color: #334155;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.gender-btn.active-male {
  background: #EFF6FF;
  border-color: #2563EB;
  color: #1D4ED8;
}

.gender-btn.active-female {
  background: #FFF1F6;
  border-color: #DB2777;
  color: #BE185D;
}

/* Stepper Row (+/- Age & Sum) */
.stepper-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.step-adj-btn {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  border: 2px solid #CBD5E1;
  background: #F8FAFC;
  font-size: 26px;
  font-weight: 800;
  color: #0F172A;
  cursor: pointer;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.step-adj-btn:hover {
  border-color: var(--ui-brand);
  color: var(--ui-brand);
  background: var(--ui-brand-soft);
}

.stepper-input {
  text-align: center;
  font-size: calc(21px * var(--ui-scale));
  font-weight: 800;
}

/* Rider Toggle Cards */
.rider-list-ui {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rider-item-ui {
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  background: #FAFBFC;
  overflow: hidden;
  transition: all 0.15s ease;
}

.rider-item-ui.active {
  border-color: #16A34A;
  background: #F0FDF4;
}

.rider-head-btn {
  width: 100%;
  border: none;
  background: transparent;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.rider-check-box {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 2px solid #94A3B8;
  background: #FFFFFF;
  color: #FFFFFF;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rider-item-ui.active .rider-check-box {
  background: #16A34A;
  border-color: #16A34A;
}

.rider-info-col {
  flex: 1;
  min-width: 0;
}

.rider-title-ui {
  font-weight: 800;
  font-size: calc(16px * var(--ui-scale));
  color: #0F172A;
}

.rider-sub-ui {
  font-size: calc(13px * var(--ui-scale));
  color: #475569;
}

.rider-prem-pill {
  padding: 5px 12px;
  border-radius: 999px;
  font-weight: 800;
  font-size: calc(14px * var(--ui-scale));
  background: #FFFFFF;
  border: 1px solid #CBD5E1;
  color: #15803D;
  flex-shrink: 0;
}

.rider-controls-body {
  padding: 0 16px 16px 58px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Show / Hide Section Toggles (Tick On/Off) */
.toggle-grid-ui {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vis-toggle-row {
  width: 100%;
  border: 2px solid #E2E8F0;
  background: #F8FAFC;
  border-radius: 15px;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
  min-height: 56px;
}

.vis-toggle-row.is-on {
  background: #F0FDF4;
  border-color: #22C55E;
}

.vis-toggle-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: calc(16px * var(--ui-scale));
  color: #0F172A;
}

.vis-status-pill {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: calc(13.5px * var(--ui-scale));
  font-weight: 800;
  flex-shrink: 0;
  background: #E2E8F0;
  color: #475569;
}

.vis-toggle-row.is-on .vis-status-pill {
  background: #16A34A;
  color: #FFFFFF;
}

/* Segmented Mode Selector (Summary / Short / Detailed) */
.mode-seg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.mode-seg-btn {
  min-height: 58px;
  padding: 10px 10px;
  border-radius: 14px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  cursor: pointer;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.mode-seg-btn strong {
  font-size: calc(15.5px * var(--ui-scale));
  color: #0F172A;
}

.mode-seg-btn span {
  font-size: calc(12px * var(--ui-scale));
  color: #64748B;
}

.mode-seg-btn.active {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
}

.mode-seg-btn.active strong {
  color: var(--ui-brand-dark);
}

/* 10 Templates Selector Gallery */
.template-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}

.tpl-card-ui {
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  background: #FFFFFF;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: all 0.15s ease;
}

.tpl-card-ui.active {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
  box-shadow: 0 6px 18px rgba(211, 17, 69, 0.12);
}

/* Mini Visual Wireframe Thumbnail inside Template Card */
.tpl-mini-thumb {
  height: 74px;
  border-radius: 10px;
  border: 1px solid #E2E8F0;
  background: #F8FAFC;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
}

.tpl-mini-head {
  height: 26px;
  padding: 5px 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tpl-mini-line {
  width: 55%;
  height: 6px;
  border-radius: 3px;
  background: rgba(255,255,255,0.9);
}

.tpl-mini-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.9);
}

.tpl-mini-body {
  padding: 6px 8px;
  display: flex;
  gap: 5px;
  flex: 1;
}

.tpl-mini-box {
  flex: 1;
  border-radius: 5px;
  background: #E2E8F0;
}

.tpl-num-badge {
  position: absolute;
  top: 5px;
  left: 6px;
  background: rgba(15, 23, 42, 0.78);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 800;
  padding: 1px 7px;
  border-radius: 999px;
}

.tpl-card-title {
  font-size: calc(15.5px * var(--ui-scale));
  font-weight: 800;
  color: #0F172A;
  line-height: 1.25;
}

.tpl-card-sub {
  font-size: calc(12.5px * var(--ui-scale));
  color: #526072;
  line-height: 1.35;
  margin-top: 2px;
}

.tpl-card-actions {
  display: flex;
  gap: 6px;
}

.btn-tpl-select {
  flex: 1;
  min-height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--ui-brand);
  background: #FFFFFF;
  color: var(--ui-brand);
  font-weight: 800;
  font-size: calc(13.5px * var(--ui-scale));
  cursor: pointer;
}

.tpl-card-ui.active .btn-tpl-select {
  background: var(--ui-brand);
  color: #FFFFFF;
}

.btn-tpl-preview {
  min-height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1.5px solid #CBD5E1;
  background: #F8FAFC;
  color: #334155;
  font-weight: 700;
  font-size: calc(13px * var(--ui-scale));
  cursor: pointer;
}

.btn-tpl-preview:hover {
  border-color: #64748B;
  background: #EEF2F6;
}

/* Color Swatches */
.color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.color-swatch-btn {
  min-height: 50px;
  padding: 8px 12px;
  border-radius: 13px;
  border: 2px solid #E2E8F0;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-weight: 700;
  font-size: calc(14px * var(--ui-scale));
  color: #1E293B;
}

.color-swatch-btn.active {
  border-color: #0F172A;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.swatch-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 2px solid rgba(0,0,0,0.1);
}

.custom-color-bar {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  background: #F8FAFC;
  border: 1.5px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.color-input-native {
  width: 54px;
  height: 44px;
  border: 2px solid #CBD5E1;
  border-radius: 10px;
  padding: 2px;
  background: #FFFFFF;
  cursor: pointer;
}

/* Character Picker Grid */
.char-grid-ui {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.char-btn-ui {
  border: 2px solid #E2E8F0;
  border-radius: 16px;
  background: #FFFFFF;
  padding: 10px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}

.char-btn-ui.active {
  border-color: var(--ui-brand);
  background: var(--ui-brand-soft);
}

.char-thumb {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  overflow: hidden;
  background: #F8FAFC;
  display: flex;
  align-items: center;
  justify-content: center;
}

.char-thumb svg, .char-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.char-lbl {
  font-size: calc(13px * var(--ui-scale));
  font-weight: 800;
  color: #1E293B;
  line-height: 1.25;
}

/* Right Column — Sticky Live Brochure Preview */
.preview-column {
  position: sticky;
  top: 84px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.preview-toolbar {
  background: #FFFFFF;
  border: 1.5px solid var(--ui-border);
  border-radius: 16px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.format-pills {
  display: inline-flex;
  background: #F1F5F9;
  padding: 4px;
  border-radius: 12px;
  gap: 4px;
}

.fmt-btn {
  border: none;
  background: transparent;
  padding: 8px 14px;
  border-radius: 9px;
  font-weight: 800;
  font-size: calc(14px * var(--ui-scale));
  color: #475569;
  cursor: pointer;
  min-height: 40px;
}

.fmt-btn.active {
  background: #FFFFFF;
  color: var(--ui-brand);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.preview-stage {
  background: #E6ECF5;
  border: 2px dashed #CBD5E1;
  border-radius: 24px;
  padding: 24px 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-x: auto;
}

.warning-banner {
  width: 100%;
  background: #FFFBEB;
  border: 1.5px solid #FCD34D;
  color: #92400E;
  border-radius: 12px;
  padding: 10px 14px;
  margin-bottom: 14px;
  font-size: calc(14px * var(--ui-scale));
  font-weight: 700;
}

/* Fullscreen Interactive Preview Modal */
.preview-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 23, 42, 0.82);
  display: none;
  flex-direction: column;
}

.preview-modal-backdrop.open {
  display: flex;
}

.preview-modal-top {
  background: #FFFFFF;
  padding: 12px 20px;
  border-bottom: 2px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.modal-tpl-strip {
  background: #F8FAFC;
  border-bottom: 1px solid #E2E8F0;
  padding: 10px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
}

.modal-tpl-pill {
  flex-shrink: 0;
  min-height: 42px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 2px solid #CBD5E1;
  background: #FFFFFF;
  font-weight: 800;
  font-size: 15px;
  color: #1E293B;
  cursor: pointer;
}

.modal-tpl-pill.active {
  background: var(--ui-brand);
  border-color: var(--ui-brand);
  color: #FFFFFF;
}

.preview-modal-scroll {
  flex: 1;
  overflow: auto;
  padding: 28px 16px 60px;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.btn-close-modal {
  min-height: 46px;
  padding: 8px 18px;
  border-radius: 12px;
  border: 2px solid #CBD5E1;
  background: #F1F5F9;
  color: #0F172A;
  font-weight: 800;
  cursor: pointer;
}

/* Mobile Floating Bottom Action Bar */
.mobile-bottom-bar {
  display: none;
}

/* Toast Feedback */
.toast-msg {
  position: fixed;
  bottom: 84px;
  left: 50%;
  transform: translateX(-50%);
  background: #0F172A;
  color: #FFFFFF;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  z-index: 2000;
  box-shadow: 0 10px 26px rgba(0,0,0,0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}

.toast-msg.show {
  opacity: 1;
}

/* Print CSS */
@media print {
  body * {
    visibility: hidden;
  }
  #liveBrochureMount, #liveBrochureMount * {
    visibility: visible;
  }
  #liveBrochureMount {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
  .brochure-sheet {
    box-shadow: none !important;
    width: 100% !important;
    border-radius: 0 !important;
  }
}

/* Tablet & Mobile Responsive Breakpoints */
@media (max-width: 1120px) {
  .studio-main {
    grid-template-columns: 1fr;
  }
  .preview-column {
    position: static;
  }
  .mobile-bottom-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 150;
    background: #FFFFFF;
    border-top: 2px solid #E2E8F0;
    box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.1);
    padding: 10px 14px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .studio-topbar {
    padding: 10px 14px;
  }
  .studio-main {
    padding: 0 12px;
    margin-bottom: 100px;
  }
  .step-card {
    padding: 18px 15px;
  }
  .template-gallery,
  .color-swatch-grid {
    grid-template-columns: 1fr;
  }
  .char-grid-ui {
    grid-template-columns: repeat(2, 1fr);
  }
  .mode-seg-grid {
    grid-template-columns: 1fr;
  }
  .rider-controls-body {
    padding-left: 16px;
  }
  .preview-stage {
    padding: 12px 8px;
  }
}
