/* Mobile-first customer customizer overrides. Loaded after styles.css/order.css. */
@media (max-width: 760px) {
  :root { --topbar-h: 56px; }
  html, body { width: 100%; overflow-x: visible; }
  body {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
    -webkit-text-size-adjust: 100%;
  }
  .app-shell { height: auto; min-height: 100dvh; }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 90;
    height: 56px !important;
    min-height: 56px;
    flex-basis: 56px !important;
    gap: 8px;
    padding: 0 12px;
    background: rgba(251, 249, 243, .96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(220, 213, 198, .75);
  }
  .mobile-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: rgba(255,255,255,.35);
  }
  .mobile-back svg { width: 17px; height: 17px; }
  .topbar .brand { min-width: 0; gap: 7px; }
  .brand-mark { width: 32px; height: 32px; border-radius: 8px; }
  .brand-word strong { font-size: 14px; letter-spacing: -.01em; }
  .brand-word small { font-size: 6.5px; letter-spacing: .07em; }
  .topbar-center { display: none !important; }
  .server-pill { display: none !important; }
  .topbar-actions { gap: 5px; margin-left: auto; }
  .topbar-actions .icon-btn { width: 36px; height: 36px; }

  .studio { display: block; min-height: 0; }
  .stage {
    position: sticky;
    top: var(--topbar-h);
    z-index: 30;
    height: 38dvh;
    min-height: 245px;
    max-height: 345px;
    margin-bottom: -18px;
    border-radius: 0 0 18px 18px;
    box-shadow: 0 12px 30px rgba(34,30,20,.08);
  }
  .stage-copy,
  .stage-tools,
  .stage-badge,
  .stage-footer,
  .orbit-hint,
  .dim-hud {
    display: none !important;
  }
  .viewer-loading {
    left: 16px;
    right: 16px;
    bottom: 25px;
    font-size: 8px;
  }
  .stage-paper-grain { opacity: .12; }

  .panel {
    position: relative;
    z-index: 10;
    margin-top: 0;
    padding-bottom: calc(92px + env(safe-area-inset-bottom));
    border: 0;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -14px 40px rgba(34,30,20,.09);
  }
  .panel-head { padding: 17px 16px 11px; }
  .panel-head h2 { font-size: 19px; letter-spacing: -.035em; }
  .panel-kicker { font-size: 7px; margin-bottom: 5px; }
  .text-btn { min-height: 38px; padding: 0 4px; font-size: 9px; }

  .product-context {
    margin: 0 16px 9px;
    padding: 7px 9px;
    min-height: 34px;
    border-radius: 8px;
  }
  .product-context-label { font-size: 6.5px; }
  .product-context strong { font-size: 9px; }
  .product-context-note { display: none; }
  .panel-scroll { overflow: visible; padding: 0 16px 20px; overscroll-behavior: auto; }
  .control-section { padding: 17px 0; }
  .section-heading h3 { font-size: 16px; }
  .section-num { font-size: 8px; }
  .section-desc { font-size: 9px; line-height: 1.6; margin: 7px 0 10px; }
  .section-heading { min-height: 34px; }

  .text-display, #textInput { font-size: 33px !important; line-height: 1.1 !important; }
  .font-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 7px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }
  .font-grid::-webkit-scrollbar { display: none; }
  .font-card {
    flex: 0 0 132px;
    min-height: 86px;
    scroll-snap-align: start;
    padding: 9px;
  }
  .font-card .font-name { font-size: 10px; }
  .font-card .font-note { font-size: 7px; }

  .text-color-options {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  .color-option {
    min-height: 58px !important;
    flex-direction: row !important;
    align-items: center !important;
    padding: 9px 10px !important;
    gap: 8px;
    border-radius: 9px;
  }
  .color-option .color-dot { width: 19px; height: 19px; flex: 0 0 19px; }
  .color-option b { font-size: 10px; }
  .color-option small { font-size: 7px; }

  .segmented button { min-height: 48px; }
  .ring-settings { margin-top: 9px; }
  .control-row { min-height: 28px; }
  .range { height: 30px; }
  input, select, textarea { font-size: 16px !important; }
  .text-display { font-size: 33px !important; }
  .search-box input, .field-grid input, .order-modal input { font-size: 16px; }

  .advanced summary { min-height: 44px; }
  .reference-note { display: none; }

  .panel-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    padding: 9px 14px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid rgba(220,213,198,.8);
    background: rgba(251, 249, 243, .97);
    backdrop-filter: blur(16px);
    box-shadow: 0 -10px 30px rgba(34,30,20,.08);
  }
  .delivery-note { margin: 0 0 5px; color: var(--muted); font-size: 8px; }
  .summary-line { margin-bottom: 6px; font-size: 8px; }
  .generate-btn, .btn { min-height: 48px; height: 48px; font-size: 12px; border-radius: 11px; }
  .generate-btn { width: 100%; }

  .order-modal {
    width: 100%;
    max-height: calc(100dvh - 18px);
    padding: 19px 17px calc(17px + env(safe-area-inset-bottom));
    border-radius: 18px;
    overflow-y: auto;
  }
  .order-modal h2 { font-size: 23px; }
  .order-form .field-grid { grid-template-columns: 1fr; }
  .order-form .btn { min-height: 50px; }
  .overlay { padding: 9px; align-items: flex-end; }
  .help-modal { max-height: calc(100dvh - 18px); overflow-y: auto; padding: 18px; border-radius: 18px; }
  .toast-stack { left: 12px; right: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}
@media (min-width: 761px) {
  .mobile-back { display: none; }
}
