/* Custom Shin Guard Designer — modal chrome (OWNE light theme) */
.sgd-open-btn { margin: 0 0 1em; }
.sgd-modal {
  position: fixed; inset: 0;
  background: #FFFFFF;
  z-index: 99999;
  display: flex; flex-direction: column;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.sgd-modal__bar {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 16px;
  background: #FFFFFF; color: #1B2420;
  border-bottom: 1px solid #DAD5C7;
  box-shadow: 0 1px 3px rgba(20, 35, 28, 0.04);
}
.sgd-modal__bar strong {
  font-family: "Oswald", sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-weight: 600;
}
.sgd-modal__bar button {
  background: transparent; color: #5B675F; border: 0; font-size: 28px; cursor: pointer; line-height: 1;
}
.sgd-modal__bar button:hover { color: #1B2420; }
#sgd-root { flex: 1; overflow: auto; padding: 16px; color: #1B2420; box-sizing: border-box; }
#sgd-root * { box-sizing: border-box; }

/* Legacy layout classes kept for safety (mostly superseded by the bundled
   Tailwind UI) — re-toned to the light theme so nothing dark leaks through. */
.sgd-wrap {
  display: grid; grid-template-columns: 260px 1fr; gap: 16px;
  max-width: 1200px; margin: 0 auto;
}
@media (max-width: 780px) {
  .sgd-wrap { grid-template-columns: 1fr; }
}
.sgd-tools { display: flex; flex-direction: column; gap: 16px; }
.sgd-tabs { display: flex; gap: 8px; }
.sgd-tab {
  flex: 1; padding: 10px; border-radius: 8px; cursor: pointer;
  background: #FFFFFF; color: #5B675F; border: 1px solid #DAD5C7;
  font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; font-size: 12px;
}
.sgd-tab.is-active {
  background: #FFFFFF; color: #2F7A52;
  border: 1.5px dashed #2F7A52;
  box-shadow: 0 2px 8px rgba(20, 35, 28, 0.08);
}
.sgd-section h4 {
  margin: 0 0 8px; font-size: 10px; letter-spacing: 0.15em;
  text-transform: uppercase; color: #5B675F; font-weight: 600;
  font-family: "Oswald", sans-serif;
}
.sgd-section-body { display: flex; flex-direction: column; gap: 8px; }
.sgd-btn {
  padding: 8px 10px; border-radius: 8px; border: 1px solid #DAD5C7;
  background: #FFFFFF; color: #1B2420; cursor: pointer; font-size: 13px;
  text-align: left;
  transition: box-shadow 150ms ease, border-color 150ms ease;
}
.sgd-btn:hover { box-shadow: 0 2px 8px rgba(20, 35, 28, 0.08); }
.sgd-btn-block { width: 100%; text-align: center; }
.sgd-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sgd-grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.sgd-select {
  width: 100%; padding: 8px; border-radius: 8px;
  border: 1px solid #DAD5C7; background: #FFFFFF; color: #1B2420;
}
.sgd-stage { display: flex; flex-direction: column; gap: 12px; align-items: center; }
.sgd-meta {
  display: flex; gap: 12px; align-items: center;
  color: #5B675F; font-size: 12px;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.sgd-chip {
  padding: 3px 8px; border-radius: 999px; background: #2F7A52; color: #FFFFFF;
  font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: 0.1em;
}
.sgd-frame {
  position: relative; background: #FFFFFF; border-radius: 16px;
  border: 1px solid #DAD5C7;
  overflow: hidden; box-shadow: 0 20px 40px -12px rgba(20, 35, 28, 0.16);
}
.sgd-canvas-wrap { position: absolute; inset: 0; }
.sgd-overlay { position: absolute; inset: 0; pointer-events: none; }
.sgd-warn {
  padding: 8px 12px; border-radius: 8px;
  background: #FFF1EA; color: #9A3E20; border: 1px solid #FF6A39; font-size: 13px;
}
.sgd-link { background: none; border: 0; color: #FF6A39; text-decoration: underline; cursor: pointer; }
.sgd-actions {
  display: flex; flex-direction: column; gap: 10px; width: 100%;
  max-width: 480px;
}
.sgd-rights { font-size: 13px; color: #5B675F; display: flex; gap: 8px; align-items: center; }
.sgd-primary {
  padding: 12px 16px; border-radius: 999px; border: 0;
  background: linear-gradient(135deg, #FF6A39, #FF8C5C); color: #FFFFFF; font-weight: 700;
  font-family: "Oswald", sans-serif;
  letter-spacing: 0.08em; text-transform: uppercase; cursor: pointer;
  box-shadow: 0 4px 14px rgba(255, 106, 57, 0.35);
  transition: transform 200ms ease;
}
.sgd-primary:hover { transform: scale(1.02); }
.sgd-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

/* Host-theme interference shield. WordPress themes ship unlayered global
   element styles (h1-h6 sizes, p/ul margins), and unlayered CSS always beats
   the bundle's Tailwind layers — the designer's small section labels were
   rendering at the theme's giant heading sizes. Headings inside the designer
   were converted to <p>; these ID-scoped (unlayered, high-specificity) rules
   restore the designer's zero-margin baseline against theme p/list styles
   and neutralise any heading that ever sneaks back in. */
#sgd-root p, #sgd-root ul, #sgd-root ol, #sgd-root li {
  margin: 0;
  padding: 0;
}
#sgd-root ul, #sgd-root ol { list-style: none; }
#sgd-root h1, #sgd-root h2, #sgd-root h3, #sgd-root h4, #sgd-root h5, #sgd-root h6 {
  font-size: inherit;
  margin: 0;
  line-height: inherit;
}

/* Library modal surfaces — guaranteed by plain unlayered CSS with concrete
   colours. The Tailwind classes on the same elements should produce this
   look already, but variable-based layered utilities proved defeasible by
   host-page CSS in the wild (see the heading shield above); these rules
   make the scrim and panel un-breakable. */
.sgd-lib-overlay { background: rgba(20, 35, 28, 0.45) !important; }
.sgd-lib-panel {
  background: #FFFFFF !important;
  border: 1px solid #DAD5C7 !important;
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(20, 35, 28, 0.3);
}
