@media (min-width:821px) {
  .sidebar.left:has(#estampaIa.active) {
    --studio-left-width: clamp(380px, 35vw, 480px);
    width: var(--studio-left-width);
    flex-basis: var(--studio-left-width);
    max-width: var(--studio-left-width)
  }
}
#estampaIa.magic-panel {
  --magic-line: #2b3c50;
  --magic-text: #b5d0f1;
  color: #f3f7ff;
  font-family: inherit;
  background: radial-gradient(ellipse at 100% 0,#112239 0,transparent 34%),#101923;
  border: 1px solid #26374a;
  border-radius: 17px;
  padding: 18px;
  box-sizing: border-box;
  overflow: visible
}
#estampaIa [hidden] {
  display: none!important
}
#estampaIa button,
#estampaIa input,
#estampaIa select,
#estampaIa textarea {
  font-family: inherit
}
#estampaIa button {
  cursor: pointer
}
#estampaIa button:disabled {
  cursor: not-allowed;
  opacity: .48
}
#estampaIa svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.7;
  flex-shrink: 0
}
#estampaIa button:focus-visible,
#estampaIa input:focus-visible,
#estampaIa select:focus-visible,
#estampaIa textarea:focus-visible {
  outline: 2px solid #29bdff;
  outline-offset: 3px
}
.magic-hero {
  position: relative;
  isolation: isolate;
  min-height: 124px;
  padding: 2px 0 18px;
  margin: -18px -18px 0;
  padding: 20px 18px 20px;
  border-radius: 17px 17px 0 0;
  overflow: hidden;
  background: linear-gradient(90deg,#101923 0,rgba(16,25,35,.86) 27%,rgba(16,25,35,.12) 72%),url('assets/home/magic-fabric-hero-v1.jpg') center right/cover no-repeat
}
.magic-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(0deg,#101923,transparent 54%)
}
.magic-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .34em;
  margin-bottom: 12px
}
.magic-brand-mark {
  width: 21px;
  height: 21px;
  border: 3px solid #006aff;
  border-right-color: #29bbff;
  border-radius: 50%;
  transform: rotate(-30deg);
  box-shadow: 0 0 14px #006aff22
}
#estampaIa .magic-hero h3 {
  position: relative;
  font-size: clamp(23px, 2.1vw, 31px);
  font-weight: 750;
  line-height: 1.16;
  margin: 0 0 7px;
  letter-spacing: -.035em;
  color: #f7f9ff
}
.magic-hero p {
  color: #96b9e2;
  font-size: 14px;
  margin: 0;
  line-height: 1.4
}
.magic-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--magic-line);
  border-radius: 13px;
  margin-bottom: 20px;
  background: #ffffff03
}
.magic-tabs button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 6px;
  background: 0 0;
  border: 1px solid transparent;
  color: var(--magic-text);
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap
}
.magic-tabs button.is-active {
  color: #fff;
  background: linear-gradient(115deg,#0646a6,#0740b6);
  border-color: #16bdff;
  box-shadow: 0 0 0 1px #16bdff,0 0 22px #0078ff29
}
.magic-label {
  display: block;
  color: #c3daf6;
  font-size: 12px;
  line-height: 1.4;
  font-weight: 650;
  margin: 0 0 8px
}
#estampaIa .magic-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 12px
}
#estampaIa .estampa-tipo-group {
  position: relative
}
#estampaIa .estilo-magico-toggle,
.magic-select-wrap {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 43px;
  padding: 0 11px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--magic-line);
  border-radius: 12px;
  background: #ffffff02;
  color: #f1f6ff;
  font-size: 13px;
  font-weight: 500
}
#estampaIa .estilo-magico-toggle > span {
  flex: 1;
  text-align: left
}
#estampaIa .estilo-magico-toggle > svg:last-child,
.magic-select-wrap > svg:last-child {
  width: 15px;
  height: 15px;
  color: var(--magic-text)
}
#estampaIa .estilo-magico-toggle.open {
  border-color: #168cff
}
.magic-select-wrap select {
  appearance: none;
  min-width: 0;
  width: 100%;
  padding: 0;
  border: 0;
  background: 0 0;
  color: inherit;
  font-size: inherit;
  outline-offset: 6px
}
.magic-select-wrap option {
  background: #142032;
  color: #eef5ff
}
.magic-theme-field {
  min-width: 0
}
#estampaIa .estampa-tipo-pills {
  top: calc(100% + 6px);
  background: #142133;
  border: 1px solid var(--magic-line);
  padding: 8px;
  border-radius: 12px;
  box-shadow: 0 15px 30px #0008
}
#estampaIa .estampa-tipo-pill {
  border: 1px solid #30445d;
  color: #b5d0f1;
  background: #1a2a3f;
  font-size: 11px
}
#estampaIa .estampa-tipo-pill.active {
  background: #0750bc;
  border-color: #1ba8ff;
  color: #fff
}
.magic-mode-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  color: #8eabc9;
  font-size: 11px
}
#estampaIa .magic-mode-row .estilo-magico-toggle {
  height: 30px;
  border-radius: 8px;
  font-size: 11px
}
.magic-mode-row .estampa-tipo-group {
  max-width: 190px;
  margin-left: auto
}
.magic-prompt-card {
  border: 1px solid var(--magic-line);
  border-radius: 13px;
  overflow: hidden;
  background: #0d151e66
}
#estampaIa .estampa-ia-prompt {
  display: block;
  box-sizing: border-box;
  width: 100%;
  padding: 12px 13px;
  min-height: 102px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: 0 0;
  color: #f1f4fc;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  resize: vertical;
  box-shadow: none
}
#estampaIa .estampa-ia-prompt::placeholder {
  color: #98aec5;
  opacity: .9
}
.magic-prompt-tools {
  display: flex;
  align-items: stretch;
  border-top: 1px solid #283b4e;
  padding: 6px 3px
}
.magic-prompt-tools button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  flex: 1;
  min-width: 0;
  padding: 4px;
  border: 0;
  background: 0 0;
  color: #55baff;
  font-size: 10px;
  font-weight: 600
}
.magic-prompt-tools button + button {
  border-left: 1px solid #304155
}
.magic-prompt-tools button:disabled {
  color: #a2bddc
}
.magic-prompt-tools svg {
  width: 15px!important;
  height: 15px!important
}
.magic-inspiration {
  margin-top: 15px
}
.magic-suggestions {
  display: grid;
  grid-template-columns: repeat(3,minmax(0,1fr));
  gap: 8px
}
.magic-suggestions button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px 4px;
  min-height: 37px;
  border: 1px solid var(--magic-line);
  border-radius: 11px;
  background: #ffffff03;
  color: var(--magic-text);
  font-size: 10px
}
.magic-suggestions button:hover {
  border-color: #228cff;
  background: #0c377055
}
.magic-suggestions svg {
  width: 15px!important;
  height: 15px!important
}
.magic-palette-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 19px 0
}
.magic-palette-row .magic-label {
  margin: 0 10px 0 0
}
.magic-palette {
  display: flex;
  gap: 10px;
  flex-wrap: wrap
}
.magic-swatch {
  position: relative;
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  padding: 0;
  border: 1px solid #465972;
  border-radius: 50%;
  background: var(--swatch);
  color: #fff
}
.magic-swatch[data-color="#ffffff"] {
  color: #06f
}
.magic-swatch svg {
  visibility: hidden
}
.magic-swatch.is-selected {
  outline: 2px solid #20baff;
  outline-offset: 3px;
  box-shadow: 0 0 17px #0084ff33
}
.magic-swatch.is-selected svg {
  visibility: visible
}
.magic-add-color {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 33px;
  height: 33px;
  color: #b5d0f1;
  border: 1px solid var(--magic-line);
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer
}
.magic-add-color input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer
}
#estampaIa .magic-native-quality {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  opacity: 0;
  pointer-events: none
}
.magic-quality {
  display: grid;
  grid-template-columns: repeat(3,1fr);
  border: 1px solid var(--magic-line);
  border-radius: 12px;
  margin-bottom: 16px
}
.magic-quality button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 37px;
  padding: 5px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: 0 0;
  color: var(--magic-text);
  font-size: 11px
}
.magic-quality button.is-active {
  color: #fff;
  background: linear-gradient(110deg,#0755c4,#063a9d);
  border-color: #21b8ff;
  box-shadow: 0 0 0 1px #21b8ff,0 0 18px #007aff24
}
.magic-quality svg {
  width: 16px!important;
  height: 16px!important
}
#estampaIa .magic-generate {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 51px;
  margin: 0;
  padding: 10px 15px;
  border: 1px solid #3acbff;
  border-radius: 14px;
  background: linear-gradient(120deg,#0045ee 0,#006dff 58%,#00bce9 100%);
  box-shadow: 0 0 0 1px #168cff,0 5px 23px #0066ff35;
  color: #fff;
  font-size: 18px;
  font-weight: 700
}
#estampaIa .magic-generate svg:first-child {
  width: 24px;
  height: 24px
}
#estampaIa .magic-generate svg:last-child:not(:first-child) {
  margin-left: auto
}
.magic-generate > span {
  margin-right: auto
}
.magic-tagline {
  text-align: center;
  color: #8eaccf;
  font-size: 10px;
  margin: 12px 0 0
}
#estampaIa .estampa-ia-status:empty {
  display: none
}
#estampaIa .estampa-lib {
  margin-top: 19px;
  padding-top: 16px;
  border-top: 1px solid var(--magic-line)
}
.magic-library-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px
}
.magic-library-heading h4 {
  margin: 0;
  color: #f3f7ff;
  font-size: 15px;
  letter-spacing: -.02em
}
.magic-library-heading button {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
  padding: 0;
  border: 0;
  background: 0 0;
  color: #36b8ff;
  font-size: 11px
}
.magic-search {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--magic-line);
  padding: 8px 10px;
  border-radius: 11px;
  margin-bottom: 12px;
  color: var(--magic-text)
}
.magic-search input {
  min-width: 0;
  width: 100%;
  color: #dceaff;
  background: 0 0;
  border: 0;
  outline: 0;
  font-size: 11px
}
.magic-search input::placeholder {
  color: #7e9bbb
}
#estampaIa .estampa-lib-grid {
  display: grid;
  grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 10px
}
#estampaIa .magic-library-card {
  position: relative;
  display: block;
  aspect-ratio: 1.5;
  padding: 0;
  overflow: hidden;
  border: 1px solid #3d5471;
  border-radius: 12px;
  background: #162235
}
#estampaIa .magic-library-card.is-selected {
  border-color: #18b7ff;
  box-shadow: 0 0 0 1px #18b7ff,0 0 15px #0099ff22
}
#estampaIa .estampa-lib-thumb {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 0;
  object-fit: cover;
  cursor: pointer
}
.magic-library-apply {
  position: absolute;
  inset: auto 0 0;
  padding: 8px;
  color: #fff;
  background: #0c1524b3;
  border-top: 1px solid #ffffff19;
  font-size: 11px;
  opacity: 0;
  transition: opacity .15s
}
.magic-library-card:focus-visible .magic-library-apply,
.magic-library-card:hover .magic-library-apply {
  opacity: 1
}
.magic-library-card.is-selected::after {
  content: '✓';
  position: absolute;
  right: 7px;
  top: 7px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0078ff;
  color: #fff;
  font-weight: 750
}
.magic-library-empty {
  margin: 14px 0 2px;
  padding: 20px 14px;
  border: 1px dashed #30445c;
  border-radius: 12px;
  color: #89a5c7;
  text-align: center;
  font-size: 12px;
  line-height: 1.6
}
#estampaIa.is-library-view #magicCreateContent {
  display: none
}
#estampaIa.is-library-view .estampa-lib {
  border-top: 0;
  margin-top: 0;
  padding-top: 0
}
@media (max-width:820px) {
  #estampaIa.magic-panel {
    max-width: 560px;
    width: 100%;
    margin: 0 auto
  }
  #estampaIa.magic-panel.active {
    max-height: none;
    overflow: visible
  }
}
@media (max-width:380px) {
  #estampaIa.magic-panel {
    padding: 13px
  }
  .magic-hero {
    margin: -13px -13px 0;
    padding: 18px 13px
  }
  .magic-tabs button {
    font-size: 11px;
    gap: 6px
  }
  #estampaIa .magic-fields {
    gap: 8px
  }
  .magic-suggestions {
    gap: 5px
  }
  .magic-suggestions button {
    font-size: 9px;
    gap: 3px
  }
  .magic-suggestions svg {
    width: 13px!important
  }
  .magic-palette-row {
    gap: 8px
  }
  .magic-prompt-tools button {
    font-size: 9px
  }
}