:root[data-appearance-palette="mineral"]{
  --paper:#f5f1eb;--ink:#422c2d;--muted:#675858;--line:#dad0c4;--accent:#eeccbe;
}
:root[data-appearance-palette="ink"]{
  --paper:#f0f2f6;--ink:#203047;--muted:#4e5d70;--line:#cbd4df;--accent:#d1e3fd;
}
.appearance-workspace{max-width:1024px;padding-block:48px}
.appearance-controls{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:24px}
.appearance-controls fieldset{min-width:0;border:1px solid var(--line);border-radius:var(--radius);padding:20px}
.appearance-controls legend,.appearance-controls h2{font-weight:650}
.appearance-controls label{display:block;margin-top:12px}
.appearance-controls input,.appearance-controls select{max-width:100%;width:100%;margin-top:5px}
.appearance-controls h2{font-size:1rem;margin:16px 0 8px}
.appearance-section-list{padding:0;list-style:none}
.appearance-section-row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:8px 0;border-bottom:1px solid var(--line)}
.appearance-section-buttons,.appearance-actions{display:flex;flex-wrap:wrap;gap:8px}
.appearance-section-buttons button{min-height:36px;min-width:36px}
.appearance-actions{margin-top:24px}
.appearance-brand-logo{width:auto;max-width:128px;max-height:48px;object-fit:contain}
.appearance-preview-notice{text-align:center;padding:8px;background:var(--accent);color:var(--ink)}
.configured-product-layout .product-description{grid-column:1/-1;margin-top:0}
@media (max-width:720px){.appearance-controls{grid-template-columns:1fr}}
@media (max-width:720px){
  .appearance-branded .brand-copy{
    display:block;max-width:22vw;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  }
  .appearance-branded .appearance-brand-logo{max-width:48px}
}

.appearance-editor{
  --editor-border:#dbe3e6;
  --editor-quiet:#50636c;
  --editor-accent:#075d59;
  background:#eef3f4;
  color:#1d3037;
}
.appearance-editor .appearance-workspace{max-width:none;padding:0}
.appearance-editor [hidden]{display:none!important}
.appearance-editor-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 24px;
  min-height:74px;
  border-bottom:1px solid var(--editor-border);
  background:#fff;
}
.appearance-editor-title{display:flex;align-items:center;gap:14px}
.appearance-editor-title h1{font-size:1.25rem;font-weight:720;letter-spacing:-.025em;margin:0}
.appearance-editor-title .status{min-height:0;margin:.25em 0 0;color:var(--editor-quiet);font-size:.82rem}
.appearance-editor-title .status.error{color:#a3372d}
.appearance-back{
  display:grid;
  place-items:center;
  width:36px;
  height:36px;
  border:1px solid var(--editor-border);
  border-radius:8px;
  text-decoration:none;
  font-size:1.15rem;
}
.appearance-editor .appearance-actions{justify-content:flex-end;margin:0}
.appearance-editor button,.appearance-editor .appearance-actions a,.appearance-editor .appearance-primary{
  padding:7px 11px;
  min-height:36px;
  border:1px solid var(--editor-border);
  border-radius:7px;
  color:inherit;
  background:#fff;
  font-size:.83rem;
  text-decoration:none;
}
.appearance-editor .appearance-actions a,.appearance-editor .appearance-primary{display:inline-flex;align-items:center}
.appearance-editor button.appearance-primary,.appearance-editor a.appearance-primary{
  border-color:var(--editor-accent);
  background:var(--editor-accent);
  color:#fff;
  font-weight:650;
}
.appearance-editor button:not(:disabled):hover{border-color:var(--editor-accent)}
.appearance-editor button:disabled{opacity:.55;cursor:default}
.appearance-editor .appearance-controls{
  grid-template-columns:minmax(268px,304px) minmax(0,1fr);
  align-items:stretch;
  gap:0;
  min-height:calc(100dvh - 74px);
}
.appearance-sidebar{
  background:#fff;
  border-right:1px solid var(--editor-border);
  padding:18px 16px 24px;
}
.appearance-editor .appearance-sidebar fieldset{margin:22px 0 0;padding:0;border:0}
.appearance-editor .appearance-sidebar legend{font-weight:700;font-size:.88rem}
.appearance-editor .appearance-sidebar label{font-size:.82rem}
.appearance-editor .appearance-sidebar input,.appearance-editor select{
  min-height:36px;
  padding:6px 9px;
  border:1px solid var(--editor-border);
  border-radius:7px;
  background:#fff;
  color:inherit;
  font-size:.83rem;
}
.appearance-switch{
  display:inline-flex;
  align-items:center;
  gap:2px;
  padding:3px;
  background:#e8eff0;
  border-radius:8px;
}
.appearance-switch button{
  border-color:transparent;
  background:transparent;
  min-height:30px;
  white-space:nowrap;
}
.appearance-switch button[aria-pressed="true"]{
  border-color:var(--editor-border);
  background:#fff;
  color:var(--editor-accent);
  font-weight:700;
}
.appearance-editor .appearance-section-list{margin:8px 0}
.appearance-editor .appearance-section-row{
  flex-wrap:wrap;
  padding:10px 8px;
  margin-bottom:6px;
  border:1px solid var(--editor-border);
  border-radius:8px;
  font-size:.83rem;
}
.appearance-editor .appearance-section-row[draggable="true"]{cursor:grab}
.appearance-section-row.dragging{opacity:.65}
.appearance-section-row.drop-target{box-shadow:inset 0 0 0 2px var(--editor-accent)}
.appearance-editor .appearance-section-buttons button{padding:4px 7px;min-height:28px;min-width:28px}
.appearance-stage{min-width:0}
.appearance-toolbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  gap:10px;
  padding:12px 18px;
  border-bottom:1px solid var(--editor-border);
  background:#fff;
}
.appearance-views{display:flex;flex-wrap:wrap;gap:8px}
.appearance-views select{max-width:min(360px,75vw)}
.appearance-viewport{padding:16px;display:grid;justify-items:center;position:relative}
.appearance-viewport iframe{
  display:block;
  width:100%;
  height:calc(100dvh - 158px);
  min-height:440px;
  border:1px solid var(--editor-border);
  border-radius:10px;
  background:#fff;
}
.appearance-viewport[data-size="tablet"] iframe{width:min(100%,768px)}
.appearance-viewport[data-size="phone"] iframe{width:min(100%,390px)}
.appearance-viewport > p{margin:0 0 12px;color:var(--editor-quiet)}
@media(max-width:820px){
  .appearance-editor-header{align-items:flex-start;flex-wrap:wrap;padding:14px 16px}
  .appearance-editor .appearance-actions{justify-content:flex-start}
  .appearance-editor .appearance-controls{grid-template-columns:minmax(0,1fr)}
  .appearance-sidebar{border-right:0;border-bottom:1px solid var(--editor-border)}
  .appearance-toolbar{padding-inline:12px}
  .appearance-viewport{padding:8px}
  .appearance-viewport iframe{height:70dvh}
}
.appearance-section-name{display:inline-flex;align-items:center;gap:6px}
.appearance-drag-handle{color:var(--editor-quiet);font-size:.95rem;line-height:1}

.appearance-add-controls{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:6px;
}
.appearance-module-panel{
  margin-top:14px;
  padding:12px;
  border:1px solid var(--editor-border);
  border-radius:8px;
}
.appearance-module-panel h2{margin:0 0 8px}
.appearance-module-panel textarea{
  width:100%;
  margin-top:5px;
  padding:6px 9px;
  border:1px solid var(--editor-border);
  border-radius:7px;
  font:inherit;
  font-size:.83rem;
  resize:vertical;
}
.appearance-module-panel p,.appearance-sidebar #appearance-history-panel p{font-size:.8rem}
.appearance-module-devices{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.appearance-editor .appearance-module-devices label{display:flex;align-items:center;gap:4px;margin:0}
.appearance-editor .appearance-module-devices input{width:auto;min-height:0;margin:0}
.appearance-section-name{overflow-wrap:anywhere}

.appearance-content-module{
  margin:24px auto;
  width:min(100% - 2rem,1200px);
  padding:clamp(20px,4vw,44px);
  color:var(--ink);
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow-wrap:anywhere;
}
.appearance-content-module h2{font-size:clamp(1.4rem,3vw,2.35rem);margin:0 0 .45em}
.appearance-content-module p{margin:0;max-width:68ch;white-space:pre-line}
.appearance-content-module :last-child{margin-bottom:0}
.appearance-content-module .button{margin-top:16px}
.appearance-module-announcement{background:var(--accent);padding:16px clamp(16px,3vw,32px)}
.appearance-module-announcement h2{font-size:1.15rem}
.appearance-module-action{text-align:center;background:var(--accent)}
.appearance-module-action p{margin-inline:auto}
.configured-product-layout > .appearance-content-module{grid-column:1/-1;width:100%;margin:0}

html[data-appearance-device="desktop"] [data-appearance-hide-desktop],
html[data-appearance-device="tablet"] [data-appearance-hide-tablet],
html[data-appearance-device="phone"] [data-appearance-hide-phone]{display:none!important}
@media (width < 600px){
  html:not([data-appearance-device]) [data-appearance-hide-phone]{display:none!important}
}
@media (600px <= width < 1024px){
  html:not([data-appearance-device]) [data-appearance-hide-tablet]{display:none!important}
}
@media (width >= 1024px){
  html:not([data-appearance-device]) [data-appearance-hide-desktop]{display:none!important}
}
