/* Public phone workspace. Desktop and the authenticated studio keep their layout. */
.customer-mobile-bar,.customer-mobile-tab-label,.customer-mobile-tab-icon,.customer-mobile-done{display:none}
@media(max-width:700px){
 #card-editor.customer-editor.customer-mobile-editor{padding:0;isolation:isolate}
 #card-editor.customer-editor.customer-mobile-editor>.wrap{display:flex;flex-direction:column;gap:0}
 #card-editor.customer-editor.customer-mobile-editor :is(.customer-nav,.product-back,.customer-preview-actions){display:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-bar{position:relative;display:flex;align-items:center;flex:none;order:0;height:48px;padding:0 8px;gap:4px;border-bottom:1px solid var(--line);background:var(--bg);z-index:20}
 .customer-mobile-icon{display:grid;place-items:center;flex:none;width:44px;min-height:44px;border:0;border-radius:12px;color:var(--ink);background:transparent;text-decoration:none}
 .customer-mobile-icon svg{width:20px;height:20px}
 .customer-mobile-icon:disabled{opacity:.3}
 .customer-mobile-bar>button.customer-mobile-icon{color:#82432f;background:#f0ded0;border:1px solid #d2aa8e}
 .customer-mobile-bar>button.customer-mobile-icon svg{width:22px;height:22px;stroke-width:2.3}
 .customer-mobile-bar>button.customer-mobile-icon[aria-controls="customer-mobile-menu"] svg{stroke-width:3.6}
 .customer-mobile-bar>button.customer-mobile-icon:not(:disabled):is(:hover,[aria-expanded="true"]){background:#e5c4ab;border-color:#b78360}
 .customer-mobile-bar>button.customer-mobile-icon:disabled{opacity:1;color:#94745e;background:#f8eee5;border-color:#e0cbbb}
 .customer-mobile-title{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:.86rem;font-weight:700}
 .customer-mobile-menu{position:absolute;top:47px;right:8px;width:min(250px,calc(100vw - 16px));max-height:calc(var(--customer-viewport-height,100dvh) - 60px);overflow-y:auto;overscroll-behavior:contain;padding:8px;border:1px solid var(--line);border-radius:16px;background:var(--paper);box-shadow:0 8px 24px #49372c30}
 .customer-mobile-menu-item{display:block;min-height:44px;width:100%;padding:10px 12px;text-align:left;font:inherit;font-size:.86rem;border-radius:8px}
 .customer-mobile-menu-item:disabled{opacity:.4}
 .customer-mobile-menu-item:not(:disabled):hover{background:#f8e6dc}
 #card-editor.customer-editor.customer-mobile-editor .card-editor-layout{display:flex;flex-direction:column;flex:1;order:1;min-height:0;gap:0}
 #card-editor.customer-editor.customer-mobile-editor .card-preview-panel{display:flex;flex-direction:column;flex:1;min-height:0;min-width:0;padding:0;background:#f2e9df}
 #card-editor.customer-editor.customer-mobile-editor .card-preview-mat{display:grid;flex:1;min-height:0;container-type:size;padding:12px 14px;border:0;border-radius:0;background:transparent}
 #card-editor.customer-editor.customer-mobile-editor .card-stage{width:min(320px,100%,100cqh)}
 #card-editor.customer-editor.customer-mobile-editor #card-sheet{height:min(100cqh,calc(100cqw * 279.4 / 215.9));width:auto;max-width:100%}
 #card-editor.customer-editor.customer-mobile-editor .card-view-switch{flex:none;margin:6px 12px 0}
 #card-editor.customer-editor.customer-mobile-editor .card-controls{flex:0 0 clamp(200px,calc(var(--customer-viewport-height,100dvh) * .33),236px);min-height:0;padding:12px 16px;border:0;border-top:1px solid var(--line);border-radius:0;box-shadow:none;scroll-padding-block:12px;overflow-y:auto;overscroll-behavior:contain}
 #card-editor.customer-editor.customer-mobile-editor .customer-tabs{order:2;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));flex:none;width:100%;max-width:none;min-height:64px;margin:0;padding:5px 10px max(5px,env(safe-area-inset-bottom));gap:6px;border:0;border-top:1px solid #c59a7f;border-radius:0;background:#ecd7c7;box-shadow:0 -4px 14px #49372c18}
 #card-editor.customer-editor.customer-mobile-editor .customer-tab{display:flex;flex-direction:column;gap:2px;min-height:52px;padding:4px;border:0;box-shadow:none;border-radius:12px;background:transparent;color:#614131;font-size:.72rem;font-weight:700}
 #card-editor.customer-editor.customer-mobile-editor .customer-tab[aria-selected="true"]{background:#8c4734;color:#fffdf9;box-shadow:0 2px 4px #63311f20}
 .customer-mobile-editor .customer-mobile-tab-icon{display:flex;align-items:center;justify-content:center}
 .customer-mobile-editor .customer-mobile-tab-icon svg{width:20px;height:20px;stroke-width:2}
 .customer-mobile-editor .customer-mobile-tab-label{display:inline}
 .customer-mobile-editor :is(.customer-desktop-tab-label,.customer-tab-number){display:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-design-row,#card-editor.customer-editor.customer-mobile-editor .customer-panel>.purchase-history-open,#card-editor.customer-editor.customer-mobile-editor #customer-panel-texts>.customer-intro{display:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-panel>.customer-next,#card-editor.customer-editor.customer-mobile-editor #customer-panel-texts>.customer-secondary{display:none}
 #card-editor.customer-editor.customer-mobile-editor .card-text-field{padding:0;margin:0 0 12px;background:transparent;border:0;border-radius:0;min-width:0}
 #card-editor.customer-editor.customer-mobile-editor .card-text-field :is(small,.card-edit-badge,.customer-edit-style){display:none}
 #card-editor.customer-editor.customer-mobile-editor .card-name-label{margin-bottom:5px;font-size:.75rem;line-height:1.4}
 #card-editor.customer-editor.customer-mobile-editor .card-name-label label{margin:0;font-size:.75rem;line-height:1.4}
 #card-editor.customer-editor.customer-mobile-editor .card-text-field .card-name-label>span{display:none}
 #card-editor.customer-editor.customer-mobile-editor .card-text-field input{font-size:16px;min-height:48px;height:48px;padding:10px 12px;scroll-margin:8px 0}
 #card-editor.customer-editor.customer-mobile-editor .card-add-text-row{margin:0}
 #card-editor.customer-editor.customer-mobile-editor .card-other-designs[open]{margin:0 0 12px}
 #card-editor.customer-editor.customer-mobile-editor[data-customer-step="style"] .card-controls,#card-editor.customer-editor.customer-mobile-editor[data-customer-step="review"] .card-controls{flex-basis:clamp(230px,calc(var(--customer-viewport-height,100dvh) * .4),320px)}
 #card-editor.customer-editor.customer-mobile-editor[data-customer-step="style"] .card-controls{display:flex;flex-direction:column;overflow:hidden;padding-top:8px}
 #card-editor.customer-editor.customer-mobile-editor #customer-panel-style{display:flex;flex-direction:column;flex:1;min-height:0}
 #card-editor.customer-editor.customer-mobile-editor .customer-target{flex:none;margin:0 0 5px}
 #card-editor.customer-editor.customer-mobile-editor .customer-target label{display:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-target select{min-height:44px;padding-block:6px}
 #card-editor.customer-editor.customer-mobile-editor .customer-tools{position:static;flex:none;margin:0 0 6px;padding:0 0 5px;box-shadow:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-tool{min-height:44px}
 #card-editor.customer-editor.customer-mobile-editor .customer-tool-body{flex:1;min-height:0;overflow-y:auto;overscroll-behavior:contain;padding:2px 3px 8px;scroll-padding-block:8px}
 #card-editor.customer-editor.customer-mobile-editor .customer-current-font{padding:8px 10px;margin-bottom:10px}
 #card-editor.customer-editor.customer-mobile-editor[data-font-gallery="true"] .customer-target{display:none}
 #card-editor.customer-editor.customer-mobile-editor[data-font-gallery="true"] .customer-tool-body{overflow:hidden}
 #card-editor.customer-editor.customer-mobile-editor #customer-panel-review>h2{display:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-review-summary{font-size:.85rem;padding:10px;margin:0 0 12px}
 /* The focused field never leaves its original parent (including extra-text listeners). */
 #card-editor.customer-editor.customer-mobile-editor[data-mobile-editing="true"] .customer-tabs{display:none}
 #card-editor.customer-editor.customer-mobile-editor[data-mobile-editing="true"] .card-controls{flex:0 0 92px;padding:10px 13px 12px;overflow:hidden}
 #card-editor.customer-editor.customer-mobile-editor[data-mobile-editing="true"] .card-text-handles{visibility:hidden}
 #card-editor.customer-editor.customer-mobile-editor[data-mobile-editing="true"] :is(.card-add-text-row,.card-other-designs,[data-edit-field]:not(.customer-mobile-active-field)){display:none}
 #card-editor.customer-editor.customer-mobile-editor[data-mobile-editing="true"] #card-extra-texts:not(:has(.customer-mobile-active-field)){display:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-active-field{display:grid;grid-template-columns:minmax(0,1fr) auto;column-gap:8px;margin:0}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-active-field .card-name-label{grid-column:1/-1}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-active-field .card-name-label>span{display:block;font-size:.68rem}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-active-field .card-extra-text-row{display:contents}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-active-field [data-remove-text]{display:none}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-active-field input{grid-column:1;grid-row:2;min-width:0;width:100%}
 #card-editor.customer-editor.customer-mobile-editor .customer-mobile-active-field .customer-mobile-done{grid-column:2;grid-row:2;display:block;min-height:48px;padding:0 14px;border-radius:12px;background:#95543f;color:#fffdf9;font:inherit;font-size:.85rem;font-weight:700}
 /* Actual landscape keeps both working areas readable; a keyboard alone never triggers it. */
 @media(orientation:landscape){
  #card-editor.customer-editor.customer-mobile-editor:not([data-mobile-editing="true"]) .card-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);grid-template-rows:minmax(0,1fr)}
  #card-editor.customer-editor.customer-mobile-editor:not([data-mobile-editing="true"]) .card-controls{height:100%;border-top:0;border-left:1px solid var(--line)}
 }
}

.catalog-product-editor .customer-design-row #card-editor-title {
  margin: 0; font: inherit; font-size: 1.18rem; line-height: 1.3; font-weight: 700;
}
.catalog-product-editor .customer-design-row #card-design-title { display: none; }
@media (max-width:700px) {
  #card-editor.catalog-product-editor.customer-mobile-editor .customer-design-row,
  #card-editor.catalog-product-editor.customer-mobile-editor #customer-panel-texts > .customer-intro {
    display: block;
  }
  .catalog-product-editor .customer-design-row > button { display: none; }
}
