.pe-app { color: #25392e; font-family: Arial, sans-serif; }
.pe-app, .pe-app * { box-sizing: border-box; }
.pe-app small, .pe-app .note { color: #59645d; font-size: 12px; }
.pe-layout { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 55px; }
.pe-app .controls { align-self: start; min-width: 0; }
.pe-app .eyebrow { color: #58674a; font-size: 11px; font-weight: bold; letter-spacing: 2px; }
.pe-app h2 { font-size: 43px; line-height: 1.05; letter-spacing: -2px; margin: 20px 0; }
.pe-app p { line-height: 1.6; }
.pe-app label { display: block; margin: 22px 0 10px; font-size: 14px; font-weight: bold; }
.pe-app input, .pe-app button, .pe-app select { font: inherit; accent-color: #355e45; }
.pe-app input[type="text"], .pe-app input[type="number"], .pe-app input[type="file"], .pe-app select { width: 100%; border: 1px solid #bcc5bb; border-radius: 9px; background: white; padding: 12px; color: #25392e; }
.pe-app input[type="file"] { font-size: 12px; }
.pe-app input[type="file"]::file-selector-button { border: 0; padding: 8px; margin-right: 8px; border-radius: 5px; background: #e8eee5; cursor: pointer; }
.pe-app input[type="range"] { width: 100%; }
.pe-app input[type="color"] { display: block; width: 72px; height: 42px; padding: 4px; border: 1px solid #bcc5bb; border-radius: 8px; background: white; cursor: pointer; }
.pe-app input:focus-visible, .pe-app button:focus-visible, .pe-app select:focus-visible { outline: 3px solid #668f74; outline-offset: 3px; }
.pe-app small { display: block; margin-top: 8px; line-height: 1.5; }
.pe-app button { border: 1px solid #bbc6b8; border-radius: 8px; padding: 11px 13px; background: white; cursor: pointer; color: #25392e; }
.pe-app button:hover:not(:disabled) { background: #e6eddf; }
.pe-app button:disabled { cursor: default; opacity: .5; }
.pe-app button[aria-pressed="true"] { background: #dce8d3; border-color: #355e45; }
.pe-app .samples { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.pe-app .samples button { font-size: 12px; padding: 9px; }
.pe-app .asset-info { font-size: 12px; color: #59645d; overflow-wrap: anywhere; }
.pe-app output { float: right; font-size: 12px; font-weight: normal; }
.pe-app fieldset { border: 1px solid #cbd1c5; padding: 13px; margin: 24px 0 0; border-radius: 9px; min-width: 0; }
.pe-app legend { padding: 0 5px; font-size: 13px; font-weight: bold; }
.pe-app fieldset label:first-of-type { margin-top: 6px; }
.pe-app fieldset:disabled { opacity: .5; }
.pe-app #shuffle { width: 100%; margin-top: 12px; }
.pe-app .paper-options { display: flex; gap: 12px; flex-wrap: wrap; }
.pe-app .paper-options label { display: flex; align-items: center; gap: 7px; margin: 6px 0; font-weight: normal; font-size: 13px; }
.pe-app .swatch { display: inline-block; width: 19px; height: 19px; border: 1px solid #adada5; border-radius: 50%; }
.pe-app .white { background: #fff; }
.pe-app .kraft { background: #bd9568; }
.pe-app #status { font-size: 13px; background: #e5ebe1; border-radius: 8px; padding: 14px; margin-top: 24px; }
.pe-app #status.error { background: #f6e3db; color: #81351d; }
.pe-app .primary { width: 100%; margin-top: 12px; background: #2f533c; color: white; border-color: #2f533c; }
.pe-app .primary:hover:not(:disabled) { background: #213e2b; }
.pe-app #export { width: 100%; margin-top: 10px; }
.pe-app .cart-link { display: block; margin-top: 12px; font-size: 14px; font-weight: bold; color: #2f533c; }
.pe-app .cart-link[hidden] { display: none; }
.pe-app .preview { position: sticky; top: 20px; align-self: start; min-width: 0; padding: 24px; background: #e7e8e2; border-radius: 16px; }
.pe-app .preview-heading, .pe-app .preview-footer { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.pe-app .preview-heading { margin-bottom: 22px; }
.pe-app .preview-footer { margin-top: 22px; color: #59645d; font-size: 12px; }
.pe-app .paper { max-width: 100%; margin: auto; background: #fff; box-shadow: 0 8px 25px #25392e18; }
.pe-app .paper canvas { display: block; width: 100% !important; height: auto !important; }
.pe-app .note { text-align: center; margin: 14px 0 0; }
@media (max-width: 800px) {
  .pe-layout { grid-template-columns: 1fr; gap: 26px; }
  .pe-app h2 { font-size: 36px; }
  .pe-app .preview { position: static; padding: 16px; }
}
.pe-app [hidden] { display: none !important; }
.pe-catalog h2 { font-size: 30px; letter-spacing: -1px; margin: 0 0 18px; }
.pe-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.pe-app .pe-card { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; text-align: left; padding: 20px; border-radius: 14px; background: #fff; }
.pe-app .pe-card strong { font-size: 18px; }
.pe-app .pe-card span { font-size: 13px; color: #59645d; line-height: 1.5; }
.pe-app .pe-back { margin-bottom: 14px; font-size: 13px; }
.pe-app .pe-check { display: flex; gap: 8px; align-items: flex-start; font-weight: normal; font-size: 12px; line-height: 1.5; }
.pe-app .pe-check input { margin-top: 2px; }
.pe-app .pe-face-list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.pe-app .pe-face { position: relative; width: 64px; height: 64px; }
.pe-app .pe-face img { width: 64px; height: 64px; border-radius: 50%; border: 2px solid #355e45; background: #fff; object-fit: cover; }
.pe-app .pe-face button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; padding: 0; border-radius: 50%; line-height: 1; font-size: 12px; }
.pe-app .pe-field select { width: 100%; }
.pe-app #tpl-status { font-size: 13px; background: #e5ebe1; border-radius: 8px; padding: 14px; margin-top: 24px; }
.pe-app #tpl-status.error { background: #f6e3db; color: #81351d; }
.pe-app #tpl-status:empty { display: none; }
.pe-app button.swatch { width: 30px; height: 30px; padding: 0; border-radius: 50%; border: 2px solid #bbc6b8; }
.pe-app button.swatch[aria-pressed="true"] { border-color: #25392e; box-shadow: 0 0 0 2px #fff inset; }
.pe-app .pe-card img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 10px; background: #fff; }
.pe-app .pe-card em { font-style: normal; font-weight: bold; font-size: 14px; color: var(--ast-global-color-0, #2f533c); }
.pe-app .pe-card:hover { border-color: var(--ast-global-color-0, #355e45); box-shadow: 0 6px 18px #25392e1f; }
.pe-app .primary, .pe-app .primary:hover:not(:disabled) { background: var(--ast-global-color-0, #2f533c); border-color: var(--ast-global-color-0, #2f533c); }
.pe-app .cart-link { color: var(--ast-global-color-0, #2f533c); }
@media (max-width: 800px) {
  .pe-cards { grid-template-columns: 1fr; }
  .pe-app .pe-card { padding: 14px; }
  .pe-app #shuffle, .pe-app .primary { padding: 14px; }
  .pe-app .pe-face, .pe-app .pe-face img { width: 56px; height: 56px; }
}
.pe-app #tpl-save { width: 100%; margin-top: 10px; }
.pe-app #tpl-save-hint { display: block; margin-top: 8px; }
.pe-app #pattern-save { width: 100%; margin-top: 10px; }
.pe-app #pattern-save-hint { display: block; margin: 8px 0 14px; }

.pe-app .pe-face.is-selected { outline: 3px solid #00668f; outline-offset: 2px; border-radius: 8px; }
.pe-app .pe-slot { margin-top: 16px; padding: 14px 16px 16px; border: 1px solid #cbd1c5; border-radius: 12px; background: #f7f9f6; }
.pe-app .pe-slot > strong { display: block; font-size: 15px; }
.pe-app .pe-slot label { margin: 12px 0 6px; font-size: 13px; }
