#giftStudio .gs-pattern-panel {padding:10px;min-width:0}
#giftStudio .gs-pattern-panel h2 {font-size:1rem;margin:0 0 7px}
#giftStudio .gs-pattern-panel .gs-search {margin:0 0 6px;padding:6px 8px}
#giftStudio #gsBrowseMotifs {width:100%;margin-top:6px}
#giftStudio #gsMotifDialog {
  width:min(680px,calc(100% - 24px));max-height:82dvh;overflow:auto;
  border:1px solid var(--gs-line);border-radius:16px;padding:16px;background:#fff;color:var(--gs-ink);
}
#giftStudio #gsMotifDialog::backdrop {background:rgba(10,28,39,.54)}
#giftStudio #gsMotifDialog header {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px}
#giftStudio #gsMotifDialog h2 {margin:0;font-size:1.15rem}
#giftStudio #gsMotifBrowser .gs-search {width:100%;margin-bottom:10px}
#giftStudio #gsMotifBrowser .gs-motifs {
  display:grid;grid-template-columns:repeat(auto-fill,minmax(92px,1fr));
  gap:8px;max-height:min(54dvh,480px);overflow:auto;
}
#giftStudio #gsMotifBrowser .gs-more-motifs {grid-column:1/-1}
#giftStudio #gsMotifFeedback {min-height:1.5em;margin:8px 0 0;color:var(--gs-ink);font-size:.85rem}
#giftStudio #gsUploadQuality {margin:8px 0 0;overflow-wrap:anywhere}
#giftStudio.gs-proof-open .gs-pattern-panel {display:none}
#giftStudio .gs-canvas-hint {margin:5px 0 0;color:var(--gs-muted);font-size:.8rem}
#giftStudio .gs-stage {max-height:none}
#giftStudio.gs-zoomed .gs-stage {max-height:74vh}
#giftStudio #gsCanvas:focus-visible {outline:2px solid var(--gs-green);outline-offset:-2px}
#giftStudio.gs-quick .gs-stage > #gsCanvas {touch-action:none;cursor:move}
#giftStudio.gs-studio-mode [data-studio-panel] {max-height:none;overflow:visible}
#giftStudio .gs-fields-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 10px;
  align-items:start;
  padding:0;
  margin:0;
  border:0;
  min-width:0;
}
#giftStudio .gs-fields-grid > * {min-width:0;margin:0}
#giftStudio .gs-fields-grid > label {display:grid;gap:4px;font-size:.82rem;font-weight:700}
#giftStudio .gs-fields-grid input:not([type=range]):not([type=color]),
#giftStudio .gs-fields-grid select {
  min-width:0;width:100%;min-height:36px;padding:6px 8px;margin:0;font-size:.86rem;
}
#giftStudio .gs-fields-grid .gs-field-wide {grid-column:1/-1}
#giftStudio .gs-fields-grid .gs-geometry-fields {border-top:1px solid var(--gs-line);padding-top:8px}
#giftStudio .gs-selected-element {font-size:.95rem;margin:0 0 9px;overflow-wrap:anywhere}
#giftStudio .gs-edit-history {display:flex;gap:5px;flex-wrap:wrap}
#giftStudio .gs-edit-history .btn {padding:6px 8px;font-size:.82rem}
#giftStudio .gs-measure-control {display:grid;grid-template-columns:minmax(0,1fr) 4rem;gap:6px}
#giftStudio .gs-measure-control input {min-width:0;width:100%;margin:0}
#giftStudio .gs-base-description {margin-top:16px}
#giftStudio .gs-base-description h2 {font-size:1.1rem;margin:0 0 8px}
#giftStudio .gs-base-description p {margin:0;white-space:pre-line;overflow-wrap:anywhere}
#giftStudio .gs-layer-controls .gs-element-delete {color:#92353b}
#giftStudio .gs-geometry-fields > .gs-fields-grid {margin-top:8px}
#giftStudio .gs-quick-size,#giftStudio .gs-text-toggle-row,#giftStudio .gs-layer-controls {
  display:flex;gap:5px;align-items:center;flex-wrap:wrap;margin:0;
}
#giftStudio .gs-quick-size > span {font-size:.85rem;font-weight:700;margin-right:4px}
#giftStudio .gs-quick-size .btn,#giftStudio .gs-layer-controls .btn {padding:6px 8px;font-size:.82rem}
#giftStudio .gs-style-toggle {min-height:34px;padding:4px 9px}
#giftStudio .gs-color-palette {gap:4px}
#giftStudio .gs-color-swatch {width:20px;height:20px}
#giftStudio .gs-qty-row {display:flex;align-items:center;gap:8px;font-size:.86rem}
#giftStudio .gs-qty-row input {max-width:65px;min-height:34px;margin:0;padding:4px 7px}
@media(min-width:921px){
  #giftStudio:not(.gs-proof-open) .gs-editor-layout {
    grid-template-columns:minmax(130px,150px) minmax(0,1.6fr) minmax(290px,1fr)!important;
    gap:10px;
  }
  #giftStudio .gs-pattern-panel .gs-motifs {display:grid;grid-template-columns:minmax(0,1fr);max-height:min(58vh,520px);overflow-y:auto;scrollbar-gutter:stable}
  #giftStudio .gs-pattern-panel .gs-quick-actions {grid-template-columns:minmax(0,1fr)}
  #giftStudio .gs-stage canvas {width:min(100%,680px,76vh)}
}
@media(min-width:761px) and (max-width:920px){
  #giftStudio .gs-pattern-panel {grid-column:1/-1}
  #giftStudio .gs-stage canvas {width:min(100%,74vh)}
}
@media(max-width:760px){
  #giftStudio .gs-pattern-panel {order:1}
  #giftStudio .gs-stage canvas {width:min(100%,360px);width:min(100%,360px,56svh)}
}
@media(max-width:340px){
  #giftStudio .gs-fields-grid {grid-template-columns:minmax(0,1fr)}
}
