:root {
  color-scheme: light;
  font-family: Arial, Helvetica, sans-serif;
  background: #edf5fb;
  color: #15171a;
  --brand-navy: #173a60;
  --brand-blue: #2f7ebd;
  --brand-sky: #34a9c9;
  --brand-gold: #f6b943;
  --brand-ink: #101828;
  --surface: rgba(255, 255, 255, .92);
  --surface-strong: #ffffff;
  --line: rgba(47, 126, 189, .20);
  --shadow-soft: 0 18px 50px rgba(23, 58, 96, .12);
  --shadow-strong: 0 26px 70px rgba(15, 23, 42, .18);
}
body {
  margin: 0;
  min-height: 100vh;
  height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 3fr) minmax(0, 10fr) minmax(270px, 2fr);
  grid-template-rows: auto 1fr;
  overflow: hidden;
  max-width: 100vw;
  background:
    radial-gradient(circle at 18% 0%, rgba(246, 185, 67, .22), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(52, 169, 201, .22), transparent 26%),
    linear-gradient(135deg, #f8fbff 0%, #edf5fb 44%, #f8fafc 100%);
}
.editor-nav {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 10px 24px;
  border-bottom: 1px solid rgba(47, 126, 189, .20);
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(14px);
  box-shadow: 0 16px 42px rgba(23, 58, 96, .10);
  z-index: 30;
}
.editor-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #111827;
  text-decoration: none;
  letter-spacing: 0;
  font-size: 17px;
}
.brand-logo {
  display: block;
  width: auto;
  height: 62px;
  max-width: 480px;
  object-fit: contain;
}
.editor-nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 800;
}
.mobile-nav-menu {
  display: none;
  position: relative;
}
.mobile-nav-menu summary {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(47, 126, 189, .20);
  background: #ffffff;
  color: var(--brand-navy);
  list-style: none;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(23, 58, 96, .12);
}
.mobile-nav-menu summary::-webkit-details-marker {
  display: none;
}
.mobile-nav-dropdown {
  position: absolute;
  left: 0;
  top: 52px;
  z-index: 80;
  display: grid;
  min-width: 210px;
  gap: 4px;
  padding: 8px;
  border: 1px solid rgba(47, 126, 189, .22);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 22px 54px rgba(15, 23, 42, .20);
}
.mobile-nav-dropdown a,
.mobile-nav-dropdown button {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  box-shadow: none;
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 900;
  text-decoration: none;
}
.mobile-nav-dropdown a:hover,
.mobile-nav-dropdown button:hover {
  background: #f1f8fd;
}
.editor-nav-actions a {
  color: #334155;
  text-decoration: none;
}
.nav-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid rgba(47, 126, 189, .18);
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #f1f8fd);
  color: var(--brand-navy);
  white-space: nowrap;
}
.credits-pill strong {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
}
.cart-menu {
  position: relative;
}
.cart-menu::after {
  content: "";
  position: absolute;
  right: 0;
  top: 100%;
  width: 340px;
  height: 14px;
}
.cart-menu:hover .cart-dropdown,
.cart-menu:focus-within .cart-dropdown {
  display: grid;
}
.cart-link {
  display: inline-grid;
  grid-template-columns: auto auto;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffffff, #fff7df);
  color: var(--brand-navy);
  box-shadow: 0 8px 22px rgba(246, 185, 67, .16);
}
.cart-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}
.cart-dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  z-index: 60;
  display: none;
  width: 350px;
  padding: 14px;
  gap: 12px;
  border: 1px solid rgba(47, 126, 189, .28);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .20);
  color: #111827;
}
.cart-dropdown h3 {
  margin: 0;
  font-size: 15px;
  color: #173a60;
}
.cart-mini-items {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.cart-mini-item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #edf2f7;
  border-radius: 8px;
  background: #f8fafc;
}
.cart-mini-item img {
  width: 42px;
  aspect-ratio: 1600 / 2228;
  object-fit: contain;
  border-radius: 5px;
  background: #e2e8f0;
}
.cart-mini-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}
.cart-mini-amount {
  color: #173a60;
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}
.cart-mini-remove {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fff1f2;
  color: #991b1b;
  padding: 0;
  cursor: pointer;
}
.cart-mini-remove svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.cart-mini-pricing {
  display: grid;
  gap: 7px;
  padding: 11px 0 2px;
  border-top: 1px solid #e2e8f0;
  font-size: 13px;
}
.cart-price-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: #475569;
  font-weight: 800;
}
.cart-price-row strong {
  color: #173a60;
  text-align: right;
}
.cart-gift-callout {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid rgba(246, 185, 67, .32);
  border-radius: 9px;
  background: linear-gradient(135deg, #fff8df, #ffffff);
}
.cart-gift-callout strong {
  color: #173a60;
  font-size: 12px;
}
.cart-gift-callout span {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.cart-mini-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.cart-mini-actions a {
  justify-content: center;
  border-radius: 8px;
  border: 0;
  background: #173a60;
  color: #ffffff;
}
.cart-mini-actions a:last-child {
  background: #f6b943;
  color: #173a60;
}
.cart-mini-actions a:hover,
.cart-mini-actions a:focus-visible {
  background: #245f89;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 58, 96, .16);
}
.cart-mini-actions a:last-child:hover,
.cart-mini-actions a:last-child:focus-visible {
  background: #f6b943;
  color: #173a60;
  box-shadow: 0 10px 22px rgba(246, 185, 67, .22);
}
.profile-menu {
  position: relative;
}
.profile-menu summary {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  width: 42px;
  padding: 0;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #ffffff;
  cursor: pointer;
  list-style: none;
  color: #111827;
}
.profile-menu summary::-webkit-details-marker {
  display: none;
}
.avatar {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, #173a60, #2f7ebd);
  color: white;
  font-size: 12px;
  font-weight: 900;
  flex: 0 0 auto;
}
.avatar svg {
  width: 19px;
  height: 19px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-menu[open] .profile-dropdown {
  display: grid;
}
.profile-dropdown {
  position: absolute;
  right: 0;
  top: 50px;
  display: none;
  min-width: 220px;
  padding: 8px;
  gap: 4px;
  border: 1px solid #d5dbe5;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 42px rgba(15, 23, 42, .14);
}
.profile-dropdown a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 6px;
}
.profile-dropdown a:hover {
  background: #f1f5f9;
}
.studio-panel {
  grid-column: 1;
  grid-row: 2;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.91)),
    radial-gradient(circle at 20% 0%, rgba(246, 185, 67, .12), transparent 34%);
  border-right: 1px solid var(--line);
  box-shadow: 14px 0 40px rgba(23, 58, 96, .08);
  padding: 8px;
  overflow: auto;
  min-height: 0;
  height: 100%;
  padding-bottom: 110px;
}
.form-drawer-toggle,
.uploads-drawer-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: 38px;
  height: 86px;
  border: 1px solid #cbd5e1;
  border-left: 0;
  border-radius: 0 12px 12px 0;
  background: #ffffff;
  color: #111827;
  box-shadow: 8px 10px 26px rgba(15, 23, 42, .16);
  cursor: pointer;
  transition: left .22s ease, transform .22s ease;
}
.uploads-drawer-toggle {
  border-left: 1px solid #cbd5e1;
  border-right: 0;
  border-radius: 12px 0 0 12px;
  transition: right .22s ease, transform .22s ease;
}
.form-drawer-toggle .drawer-label,
.uploads-drawer-toggle .drawer-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}
.drawer-close-button,
.drawer-panel-head {
  display: none;
}
main {
  grid-column: 2;
  grid-row: 2;
  background:
    radial-gradient(circle at 50% 18%, rgba(255,255,255,.88), transparent 24%),
    linear-gradient(90deg, rgba(47,126,189,.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(47,126,189,.08) 1px, transparent 1px),
    linear-gradient(135deg, #eef7fb, #f8fafc);
  background-size: auto, 30px 30px, 30px 30px, auto;
  padding: 22px;
  overflow: auto;
  min-height: 0;
  height: 100%;
  padding-bottom: 110px;
}
h1 {
  font-size: 19px;
  margin: 0;
}
.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}
.tool-badge {
  border: 1px solid rgba(246, 185, 67, .42);
  border-radius: 999px;
  padding: 5px 9px;
  color: var(--brand-navy);
  background: linear-gradient(135deg, #fff7df, #ffffff);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.selected-card-status {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 10px;
}
.selected-card-status span {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 8px;
  color: #173a60;
  font-size: 12px;
  font-weight: 900;
}
.selected-card-status small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 4px;
}
input, select, textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(47, 126, 189, .24);
  border-radius: 8px;
  padding: 9px;
  font-size: 13px;
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(52, 169, 201, .18);
  outline: none;
}
textarea {
  min-height: 58px;
  resize: vertical;
}
.field.textarea-field {
  grid-column: 1 / -1;
}
textarea.prompt {
  min-height: 132px;
  font-family: Consolas, "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
}
#cardForm {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.field {
  min-width: 0;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 10px;
  background: rgba(255, 255, 255, .90);
  padding: 9px;
  box-shadow: 0 8px 24px rgba(23, 58, 96, .05);
}
.field.is-guided-highlight {
  animation: guidedFieldPulse 2.2s ease-in-out;
}
@keyframes guidedFieldPulse {
  0%, 100% {
    border-color: rgba(47, 126, 189, .16);
    box-shadow: 0 8px 24px rgba(23, 58, 96, .05);
  }
  18%, 72% {
    border-color: #f6b943;
    box-shadow: 0 0 0 4px rgba(246, 185, 67, .24), 0 14px 34px rgba(23, 58, 96, .14);
  }
}
.field.full {
  grid-column: 1 / -1;
}
.field.plain {
  border: 0;
  background: transparent;
  padding: 0;
}
.studio-tip-card {
  grid-column: 1 / -1;
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(246, 185, 67, .36);
  border-radius: 12px;
  padding: 11px 10px;
  background:
    radial-gradient(circle at 0% 0%, rgba(246, 185, 67, .24), transparent 36%),
    linear-gradient(135deg, #fffdf5, #f4fbff);
  box-shadow: 0 14px 34px rgba(23, 58, 96, .08);
}
.studio-tip-card.is-hidden {
  display: none;
}
.studio-tip-card strong {
  display: block;
  color: var(--brand-navy);
  font-size: 13px;
  line-height: 1.2;
}
.studio-tip-card ul {
  margin: 6px 0 0;
  padding-left: 16px;
  color: #475569;
  font-size: 11px;
  line-height: 1.38;
}
.studio-tip-card li + li {
  margin-top: 4px;
}
.tip-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #173a60;
  background: linear-gradient(135deg, rgba(246,185,67,.34), rgba(52,169,201,.20));
  border: 1px solid rgba(47, 126, 189, .18);
}
.tip-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tip-dismiss {
  width: 24px;
  min-width: 24px;
  height: 24px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, .80);
  border: 1px solid rgba(47, 126, 189, .18);
  color: var(--brand-navy);
  box-shadow: none;
  font-size: 16px;
  line-height: 1;
}
.tcg-favorites-field {
  margin-bottom: -8px;
  border-color: rgba(47, 126, 189, .24);
  border-bottom-color: rgba(47, 126, 189, .10);
  border-radius: 10px 10px 0 0;
  background:
    radial-gradient(circle at 100% 0%, rgba(246, 185, 67, .14), transparent 32%),
    linear-gradient(135deg, #ffffff, #f4fbff);
  box-shadow: 0 10px 28px rgba(23, 58, 96, .06);
}
.tcg-favorites-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}
.tcg-favorites-toggle input {
  width: 16px;
  min-width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--brand-blue);
}
.tcg-favorites-selects {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
  padding-top: 8px;
  border-color: rgba(47, 126, 189, .24);
  border-top-color: rgba(47, 126, 189, .10);
  border-radius: 0 0 10px 10px;
  background: linear-gradient(180deg, rgba(244, 251, 255, .96), rgba(255, 255, 255, .96));
}
.tcg-favorites-selects select {
  width: 100%;
}
.tcg-favorites-selects label:not(:first-child) {
  margin-top: 4px;
}
.quality-coach {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid rgba(246, 185, 67, .30);
  border-radius: 10px;
  background:
    radial-gradient(circle at 0% 0%, rgba(246, 185, 67, .18), transparent 36%),
    linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 14px 34px rgba(23, 58, 96, .08);
}
.quality-coach-head {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
}
.quality-coach-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  color: #173a60;
  background: rgba(246, 185, 67, .28);
}
.quality-coach-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quality-coach strong,
.quality-coach small {
  display: block;
}
.quality-coach strong {
  color: var(--brand-navy);
  font-size: 13px;
}
.quality-coach small {
  margin-top: 2px;
  color: #64748b;
  font-size: 11px;
}
.quality-coach ul {
  margin: 0;
  padding-left: 17px;
  color: #475569;
  font-size: 11px;
  line-height: 1.38;
}
.quality-coach li + li {
  margin-top: 4px;
}
.layout-picker {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 10px;
  align-items: center;
  border-color: rgba(47, 126, 189, .25);
  background:
    radial-gradient(circle at 100% 0%, rgba(246, 185, 67, .16), transparent 34%),
  linear-gradient(135deg, #ffffff, #f1f8fd);
}
.layout-picker img {
  width: 92px;
  aspect-ratio: 1600 / 2228;
  object-fit: contain;
  border: 1px solid #c9dfef;
  border-radius: 7px;
  background: #eef2f7;
}
.layout-picker-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.layout-style-picker {
  grid-column: 1 / -1;
  box-sizing: border-box;
}
.artwork-style-picker .artwork-style-preview {
  width: 58px;
  height: 98px;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  border: 1px solid #d6dde7;
  background: #f8fafc;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}
.frame-mode-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.layout-help-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 999px;
  background: #e8f3fb;
  color: #173a60;
  font-size: 12px;
  font-weight: 900;
  border: 1px solid #c9dfef;
}
.layout-help-button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.layout-guide-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.layout-guide-preview {
  width: 100%;
  aspect-ratio: 1600 / 2228;
  object-fit: contain;
  border-radius: 10px;
  border: 1px solid #c9dfef;
  background: linear-gradient(135deg, #f8fafc, #e8f3fb);
  box-shadow: 0 16px 34px rgba(23, 58, 96, .16);
}
.layout-guide-steps {
  display: grid;
  gap: 10px;
}
.layout-guide-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #dce8f2;
  background: linear-gradient(135deg, #ffffff, #f6fbff);
}
.layout-guide-step strong {
  display: block;
  margin-bottom: 3px;
  color: #173a60;
}
.layout-guide-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, #173a60, #2f7ebd);
}
.layout-guide-icon.gold {
  background: linear-gradient(135deg, #f6b943, #f97316);
}
.layout-guide-icon.teal {
  background: linear-gradient(135deg, #34a9c9, #0f766e);
}
.layout-guide-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.hint {
  font-size: 11px;
  color: #69717d;
  margin-top: 5px;
  line-height: 1.35;
}
.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
button {
  width: auto;
  margin: 0;
  border: 0;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand-blue), var(--brand-navy));
  color: white;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(47, 126, 189, .22);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
#submitButton {
  min-width: 100px;
  box-shadow: none;
}
.floating-actions {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(47, 126, 189, .22);
  border-radius: 14px;
  background: rgba(255, 255, 255, .90);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-strong);
}
.floating-actions button {
  transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease;
}
.floating-actions button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 18px 42px rgba(23, 58, 96, .25);
}
.secondary-button {
  background: linear-gradient(135deg, #ffffff, #e8f3fb);
  color: var(--brand-navy);
  border: 1px solid rgba(47, 126, 189, .24);
  box-shadow: 0 12px 28px rgba(23, 58, 96, .10);
}
.secondary-button {
  background: #ffffff;
  color: #111827;
  border: 1px solid #cbd5e1;
}
.outline-button {
  background: transparent;
  color: #111827;
  border: 1px solid #cbd5e1;
}
button:disabled {
  cursor: wait;
  opacity: .65;
}
.spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #cbd5e1;
  border-top-color: #111827;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loading-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, .58);
  backdrop-filter: blur(3px);
  z-index: 170;
}
.loading-overlay.is-active {
  display: grid;
}
.modal-overlay {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  padding: 24px;
  box-sizing: border-box;
  background: rgba(15, 23, 42, .54);
  z-index: 320;
}
.modal-overlay.is-active {
  display: grid;
}
.modal-dialog {
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #d7dce5;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
  padding: 22px;
}
.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.modal-header h2 {
  margin: 0;
  font-size: 19px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}
.product-preview-dialog {
  width: min(980px, 100%);
}
.product-preview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.product-preview-card {
  display: grid;
  gap: 10px;
}
.product-preview-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  width: fit-content;
  padding: 0 10px;
  border-radius: 999px;
  background: #eaf4fb;
  color: #173a60;
  font-size: 12px;
  font-weight: 900;
}
.product-preview-mockup {
  position: relative;
  overflow: hidden;
  min-height: 260px;
  border: 1px solid #d7dce5;
  border-radius: 18px;
  background:
    radial-gradient(circle at 30% 20%, rgba(255,255,255,.95), rgba(255,255,255,.6) 34%, transparent 52%),
    linear-gradient(135deg, #f8fbfd, #eef3f8);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 18px 40px rgba(15, 23, 42, .12);
}
.product-preview-mockup::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: rgba(255,255,255,.76);
  box-shadow: inset 0 0 0 1px rgba(148,163,184,.22);
  z-index: 1;
}
.product-preview-base,
.product-preview-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 14px;
}
.product-preview-base {
  z-index: 0;
}
.product-preview-overlay {
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s ease;
}
.product-preview-overlay.is-ready {
  opacity: 1;
}
.product-preview-overlay--mug {
  inset: 1% 18% 2% 4%;
  width: auto;
  height: auto;
  object-fit: cover;
}
.product-preview-overlay--keyring {
  inset: 34% 18% 20% 22%;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 12px;
}
.product-preview-overlay--magnet {
  inset: 12% 14% 12% 12%;
  width: auto;
  height: auto;
  object-fit: cover;
  transform: rotate(-2deg);
  border-radius: 14px;
}
.product-preview-overlay--puzzle {
  inset: 7% 10% 9% 25%;
  width: auto;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}
.product-preview-loader {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background: rgba(255,255,255,.2);
  z-index: 3;
}
.product-preview-loader.is-loading {
  display: grid;
}
.product-preview-spinner {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid rgba(23, 58, 96, .16);
  border-top-color: #173a60;
  animation: productPreviewSpin .8s linear infinite;
}
@keyframes productPreviewSpin {
  to { transform: rotate(360deg); }
}
.mug-mockup::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 34%;
  width: 58px;
  height: 84px;
  border: 12px solid #cbd5e1;
  border-left-width: 10px;
  border-radius: 0 28px 28px 0;
  box-sizing: border-box;
  opacity: .75;
}
.keyring-mockup::after {
  content: "";
  position: absolute;
  right: 22px;
  top: 22px;
  width: 34px;
  height: 34px;
  border: 6px solid #cbd5e1;
  border-radius: 999px;
  opacity: .82;
}
.magnet-mockup::after {
  content: "";
  position: absolute;
  right: 22px;
  bottom: 22px;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  box-shadow: 0 10px 20px rgba(37,99,235,.16);
  opacity: .9;
}
.puzzle-mockup::after {
  content: "";
  position: absolute;
  right: 18px;
  bottom: 18px;
  width: 82px;
  height: 82px;
  border-radius: 12px;
  background:
    radial-gradient(circle at 14px 14px, rgba(255,255,255,.9) 0 4px, transparent 5px),
    radial-gradient(circle at 68px 14px, rgba(255,255,255,.9) 0 4px, transparent 5px),
    radial-gradient(circle at 14px 68px, rgba(255,255,255,.9) 0 4px, transparent 5px),
    radial-gradient(circle at 68px 68px, rgba(255,255,255,.9) 0 4px, transparent 5px),
    linear-gradient(135deg, rgba(203,213,225,.92), rgba(226,232,240,.92));
  box-shadow: 0 10px 20px rgba(15,23,42,.12);
  opacity: .9;
}
@media (max-width: 720px) {
  .product-preview-grid { grid-template-columns: 1fr; }
}
.bulk-status {
  display: grid;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: #475569;
}
.bulk-empty-state {
  display: grid;
  place-items: center;
  min-height: 170px;
  margin: 12px 0;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  text-align: center;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
.bulk-empty-state strong {
  display: block;
  margin-bottom: 6px;
  font-size: 34px;
  color: #111827;
}
.bulk-empty-state.is-hidden,
.bulk-setup.is-hidden,
.bulk-generating-view.is-hidden {
  display: none;
}
.bulk-summary {
  display: none;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  color: #64748b;
  font-size: 12px;
}
.bulk-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bulk-setup {
  display: grid;
  grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.bulk-preview-card {
  display: grid;
  gap: 8px;
  border: 1px solid #d5dbe5;
  border-radius: 8px;
  background: #f8fafc;
  padding: 10px;
  font-size: 12px;
  font-weight: 800;
  color: #475569;
  overflow: hidden;
}
.bulk-preview-card img {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: 6px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}
.bulk-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.bulk-fields .field {
  padding: 8px;
}
.bulk-fields .full {
  grid-column: 1 / -1;
}
.bulk-progress {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}
.bulk-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: #111827;
  transition: width .25s ease;
}
.bulk-generating-view {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid #d5dbe5;
  border-radius: 10px;
  background: #f8fafc;
}
.generation-visual {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 230px;
  border: 1px solid rgba(47, 126, 189, .24);
  border-radius: 14px;
  background:
    radial-gradient(circle at 50% 42%, rgba(246,185,67,.22), transparent 34%),
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(234,244,251,.82)),
    #eef7fb;
  overflow: hidden;
}
.generation-visual::before {
  content: "";
  position: absolute;
  inset: -30%;
  background:
    linear-gradient(115deg, transparent 36%, rgba(255,255,255,.86) 45%, transparent 54%),
    linear-gradient(90deg, rgba(47,126,189,.10), rgba(246,185,67,.14));
  animation: renderSweep 1.65s linear infinite;
}
.generation-card {
  position: relative;
  width: 92px;
  aspect-ratio: 1600 / 2228;
  border-radius: 7px;
  border: 2px solid #111827;
  background:
    linear-gradient(#f8fafc 0 14%, transparent 14% 17%, #cbd5e1 17% 58%, transparent 58% 62%, #f8fafc 62%),
    #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, .22);
  overflow: hidden;
  transform-origin: center;
  animation: cardRenderPulse 1.65s ease-in-out infinite;
}
.generation-card::before {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 24%;
  height: 0%;
  border-radius: 5px;
  background: linear-gradient(180deg, #93c5fd, #facc15 48%, #f97316);
  animation: paintFill 1.65s ease-in-out infinite;
}
.generation-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 13%;
  height: 18%;
  border-radius: 5px;
  background:
    linear-gradient(#94a3b8 0 18%, transparent 18% 42%, #cbd5e1 42% 58%, transparent 58% 80%, #cbd5e1 80%);
  opacity: .8;
}
.generation-logo {
  position: absolute;
  z-index: 3;
  width: min(72%, 138px);
  max-height: 84px;
  object-fit: contain;
  filter: drop-shadow(0 12px 18px rgba(23,58,96,.22));
  animation: logoForge 1.85s ease-in-out infinite;
}
.generation-forge {
  position: relative;
  width: 124px;
  height: 124px;
  display: grid;
  place-items: center;
}
.generation-visual::before { display: none; }
.generation-forge-halo {
  position: absolute;
  inset: 18px;
  border-radius: 28% 72% 58% 42% / 48% 34% 66% 52%;
  background: conic-gradient(from 30deg, rgba(52,169,201,.04), rgba(246,185,67,.48), rgba(47,126,189,.26), rgba(52,169,201,.04));
  filter: blur(2px);
  animation: forgeMorph 3.2s ease-in-out infinite;
}
.generation-forge-ring {
  position: absolute;
  border: 1px solid rgba(23,58,96,.24);
  transform: rotate(-18deg);
  animation: forgeTurn 4.8s linear infinite;
}
.generation-forge-ring--outer { width: 116px; height: 72px; border-radius: 50%; }
.generation-forge-ring--inner { width: 78px; height: 108px; border-color: rgba(246,185,67,.52); border-radius: 42%; transform: rotate(34deg); animation-direction: reverse; animation-duration: 3.6s; }
.generation-forge-mark {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: rgba(255,255,255,.84);
  box-shadow: 0 14px 32px rgba(23,58,96,.20), inset 0 0 0 1px rgba(255,255,255,.9);
  animation: forgeLift 2.4s ease-in-out infinite;
}
.generation-forge-mark img { width: 56px; height: 56px; object-fit: contain; }
.generation-forge-dots { position: absolute; inset: 0; animation: forgeTurn 6s linear infinite; }
.generation-forge-dots i { position: absolute; width: 6px; height: 6px; border-radius: 50%; background: #f6b943; box-shadow: 0 0 16px rgba(246,185,67,.8); }
.generation-forge-dots i:nth-child(1) { top: 8px; left: 57px; }
.generation-forge-dots i:nth-child(2) { right: 7px; bottom: 35px; background: #34a9c9; box-shadow: 0 0 16px rgba(52,169,201,.8); }
.generation-forge-dots i:nth-child(3) { left: 17px; bottom: 20px; }
@keyframes forgeMorph { 0%, 100% { transform: rotate(0) scale(.82); opacity: .48; } 50% { transform: rotate(130deg) scale(1.14); opacity: .9; } }
@keyframes forgeTurn { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes forgeLift { 0%, 100% { transform: translateY(3px) scale(.94); } 50% { transform: translateY(-5px) scale(1.04); } }
.layout-requirement-notice {
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid rgba(234, 88, 12, .28);
  border-radius: 12px;
  background: #fff7ed;
  color: #9a3412;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}
.layout-requirement-notice.is-hidden { display: none; }
.generation-copy {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.generation-copy h3 {
  margin: 0;
  font-size: 18px;
}
.generation-copy p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.generation-summary {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid #dbe2ec;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  color: #475569;
}
.generation-summary strong {
  color: #111827;
}
.quality-dialog {
  width: min(680px, 100%);
}
.quality-help-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.quality-suggestion {
  min-height: 132px;
  display: grid;
  align-content: start;
  gap: 8px;
  text-align: left;
  padding: 12px;
  border: 1px solid #dbe7f2;
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #f4fbff);
  color: #173a60;
  box-shadow: 0 12px 28px rgba(23, 58, 96, .08);
}
.quality-suggestion:hover {
  border-color: #2f7ebd;
  background: #eef8fd;
}
.quality-suggestion-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  color: #173a60;
  background: rgba(47, 126, 189, .13);
}
.quality-suggestion-icon.gold {
  color: #8a4b07;
  background: rgba(246, 185, 67, .25);
}
.quality-suggestion-icon.teal {
  color: #0f766e;
  background: rgba(45, 212, 191, .18);
}
.quality-suggestion-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.quality-suggestion strong,
.quality-suggestion small {
  display: block;
}
.quality-suggestion strong {
  font-size: 13px;
}
.quality-suggestion small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}
.quality-form {
  display: grid;
  gap: 12px;
}
.quality-form textarea {
  min-height: 118px;
}
.quality-policy {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(246, 185, 67, .34);
  border-radius: 9px;
  background: linear-gradient(135deg, #fff8df, #ffffff);
}
.quality-policy strong {
  color: #173a60;
  font-size: 12px;
}
.quality-policy span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}
.quality-feedback {
  display: none;
  padding: 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}
.quality-feedback.is-success,
.quality-feedback.is-error {
  display: block;
}
.quality-feedback.is-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}
.quality-feedback.is-error {
  background: #fff1f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}
@keyframes renderSweep {
  from { transform: translateX(-28%) rotate(0deg); }
  to { transform: translateX(28%) rotate(0deg); }
}
@keyframes cardRenderPulse {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.025); }
}
@keyframes paintFill {
  0% { height: 0%; opacity: .55; }
  55% { height: 34%; opacity: 1; }
  100% { height: 34%; opacity: .72; }
}
@keyframes logoForge {
  0%, 100% { transform: translateY(0) scale(.96); opacity: .86; }
  45% { transform: translateY(-6px) scale(1.04); opacity: 1; }
  70% { transform: translateY(1px) scale(1); opacity: .94; }
}
.loading-dialog {
  width: min(560px, 100%);
  border-radius: 14px;
  background: #ffffff;
  border: 1px solid rgba(47,126,189,.24);
  box-shadow: 0 24px 70px rgba(15, 23, 42, .32);
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.loading-hero {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.96), rgba(234,244,251,.95)),
    #ffffff;
}
.loading-hero .generation-visual {
  min-height: 132px;
  border-radius: 12px;
}
.loading-hero .generation-card {
  width: 64px;
}
.loading-hero .generation-logo {
  width: min(68%, 92px);
  max-height: 54px;
}
.loading-dialog h2 {
  font-size: 20px;
  margin: 0 0 8px;
}
.loading-dialog p {
  margin: 0;
  color: #4b5563;
  line-height: 1.45;
  font-size: 13px;
}
.generation-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}
.generation-status-chip {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(47, 126, 189, .18);
  border-radius: 10px;
  background: linear-gradient(135deg, #ffffff, #f4fbff);
  box-shadow: 0 10px 24px rgba(23, 58, 96, .08);
}
.generation-status-chip:nth-child(2) {
  background: linear-gradient(135deg, #fffaf0, #ffffff);
  border-color: rgba(246, 185, 67, .30);
}
.generation-status-chip:first-child {
  grid-column: 1 / -1;
}
.generation-status-chip:nth-child(3) {
  background: linear-gradient(135deg, #f7f4ff, #ffffff);
  border-color: rgba(124, 58, 237, .18);
}
.status-chip-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  color: #173a60;
  background: rgba(47, 126, 189, .12);
}
.generation-status-chip:nth-child(2) .status-chip-icon {
  color: #8a4b07;
  background: rgba(246, 185, 67, .22);
}
.generation-status-chip:nth-child(3) .status-chip-icon {
  color: #5b21b6;
  background: rgba(124, 58, 237, .12);
}
.status-chip-icon svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.generation-status-chip:first-child .status-chip-icon svg {
  animation: statusSpin 1.9s linear infinite;
}
.generation-status-chip strong,
.generation-status-chip small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.generation-status-chip strong {
  color: #173a60;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.generation-status-chip small {
  margin-top: 2px;
  color: #475569;
  font-size: 11px;
  font-weight: 800;
}
.generation-status-chip:first-child small {
  white-space: normal;
  line-height: 1.3;
}
@keyframes statusSpin {
  to { transform: rotate(360deg); }
}
.loading-dialog.is-error .generation-visual,
.loading-dialog.is-error .generation-status-grid {
  display: none;
}
.loading-dialog.is-error .loading-hero {
  grid-template-columns: 1fr;
}
.loading-error-detail:empty {
  display: none;
}
.loading-error {
  display: none;
  margin: 0 18px 18px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #7f1d1d;
  font-size: 12px;
  line-height: 1.45;
}
.loading-error.is-visible {
  display: grid;
  gap: 8px;
}
.loading-error strong {
  color: #991b1b;
  font-size: 13px;
}
.loading-error-detail {
  max-height: 120px;
  overflow: auto;
  padding: 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .74);
  color: #7f1d1d;
  white-space: pre-wrap;
  word-break: break-word;
}
.loading-error-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.loading-error-actions button {
  min-height: 34px;
  border-radius: 7px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 900;
  margin: 0;
  width: auto;
}
.welcome-dialog {
  width: min(640px, 100%);
  padding: 0;
  overflow: hidden;
}
.welcome-hero {
  display: grid;
  place-items: center;
  gap: 10px;
  padding: 30px 26px 22px;
  background:
    radial-gradient(circle at 22% 0%, rgba(246,185,67,.28), transparent 34%),
    linear-gradient(135deg, #ffffff, #eaf7fb);
  text-align: center;
}
.welcome-hero img {
  width: min(330px, 82%);
  height: auto;
}
.welcome-hero span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.86);
  color: #173a60;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.welcome-content {
  padding: 24px 28px 6px;
}
.welcome-content h2 {
  margin: 0 0 10px;
  color: #173a60;
  font-size: 25px;
}
.welcome-content p {
  margin: 0;
  color: #4b637d;
  line-height: 1.6;
}
.welcome-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}
.welcome-grid div {
  display: grid;
  gap: 5px;
  padding: 13px;
  border: 1px solid #d8e7f2;
  border-radius: 12px;
  background: #f8fcff;
}
.welcome-grid strong {
  color: #173a60;
}
.welcome-grid span {
  color: #5e738b;
  font-size: 12px;
  line-height: 1.4;
}
.loading-body {
  padding: 0 18px 18px;
}
.large-spinner {
  width: 40px;
  height: 40px;
  border: 5px solid #d8dee8;
  border-top-color: #111827;
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loading-steps {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: #6b7280;
  font-size: 12px;
}
.loading-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #f8fafc;
}
.loading-steps li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #cbd5e1;
  flex: 0 0 auto;
}
.loading-steps li.is-active {
  color: #111827;
  font-weight: 700;
}
.loading-steps li.is-active::before {
  background: #111827;
}
@keyframes spin { to { transform: rotate(360deg); } }
.error {
  display: none;
  margin-top: 14px;
  padding: 10px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #991b1b;
  border-radius: 6px;
  white-space: pre-wrap;
  font-size: 13px;
}
.result-shell {
  width: 100%;
  max-width: none;
  margin: 0 auto;
}
.workspace-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  border: 1px solid #d5dbe5;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(6px);
  border-radius: 8px;
  padding: 12px 14px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .07);
}
.workspace-title {
  display: grid;
  gap: 3px;
}
.workspace-title strong {
  font-size: 15px;
}
.workspace-title span {
  color: #64748b;
  font-size: 12px;
}
.result-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.result-header h2 {
  font-size: 18px;
  margin: 0;
}
.links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}
.links a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 700;
}
.result-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 400px);
  align-items: stretch;
  gap: clamp(12px, 1.6vw, 22px);
}
.card-tray {
  margin-top: 12px;
  display: grid;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 4px 12px;
  align-content: start;
  min-height: 0;
}
.cards-panel {
  grid-column: 3;
  grid-row: 2;
  margin-top: 0;
  border: 1px solid #d5dbe5;
  border-radius: 0;
  border-top: 0;
  border-bottom: 0;
  border-right: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,248,253,.90)),
    radial-gradient(circle at 60% 0%, rgba(246,185,67,.16), transparent 34%);
  padding: 14px;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  min-height: 0;
  height: 100%;
}
.cards-panel-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 8px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 12px 26px rgba(23, 58, 96, .18);
}
.cards-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.cards-panel-header h2 {
  margin: 0;
  font-size: 15px;
}
.cards-panel-header span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}
.card-tile {
  position: relative;
  display: grid;
  gap: 6px;
  border: 1px solid rgba(47, 126, 189, .18);
  border-radius: 10px;
  background: rgba(255, 255, 255, .94);
  padding: 5px;
  text-decoration: none;
  color: #111827;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.card-tile:hover,
.card-tile.is-selected {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(52, 169, 201, .16), 0 16px 36px rgba(23, 58, 96, .14);
  transform: translateY(-1px);
}
.card-tile img {
  width: 100%;
  justify-self: center;
  aspect-ratio: 1600 / 2228;
  object-fit: contain;
  object-position: center center;
  border-radius: 5px;
  background: #eef2f7;
  -webkit-user-drag: none;
  user-select: none;
}
.card-tile.is-image-loading::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 999px;
  border: 3px solid rgba(47, 126, 189, .2);
  border-top-color: var(--brand-blue);
  animation: preview-card-loading-spin .8s linear infinite;
  pointer-events: none;
}
.card-tile.is-image-loading img {
  opacity: .35;
}
.card-tile > span {
  display: none;
}
.cards-page-loader {
  display: grid;
  place-items: center;
  min-height: 52px;
  border: 1px dashed rgba(47, 126, 189, .28);
  border-radius: 10px;
  color: #64748b;
  background: rgba(255, 255, 255, .72);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}
.cards-page-loader.is-hidden {
  display: none;
}
.card-tile-actions {
  display: flex;
  gap: 5px;
}
.card-tile-actions button {
  min-width: 0;
  width: auto;
  padding: 4px;
  margin: 0;
  font-size: 10px;
}
.trash-card-button {
  position: absolute;
  top: 7px;
  right: 7px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-width: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(254, 202, 202, .95);
  background: rgba(255, 255, 255, .94);
  color: #991b1b;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}
.card-tile:hover .trash-card-button,
.card-tile:focus-within .trash-card-button {
  opacity: 1;
  transform: translateY(0);
}
.trash-card-button:hover {
  background: #fee2e2;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .18);
}
.add-cart-card-button {
  position: absolute;
  top: 7px;
  right: 83px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-width: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(187, 247, 208, .95);
  background: rgba(255, 255, 255, .94);
  color: #166534;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}
.card-tile:hover .add-cart-card-button,
.card-tile:focus-within .add-cart-card-button {
  opacity: 1;
  transform: translateY(0);
}
.add-cart-card-button:hover {
  background: #dcfce7;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .18);
}
.quality-card-button {
  position: absolute;
  top: 7px;
  right: 45px;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  min-width: 0;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(191, 219, 254, .95);
  background: rgba(255, 255, 255, .94);
  color: #1d4ed8;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease, background .15s ease;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14);
}
.card-tile:hover .quality-card-button,
.card-tile:focus-within .quality-card-button {
  opacity: 1;
  transform: translateY(0);
}
.quality-card-button:hover {
  background: #dbeafe;
  box-shadow: 0 10px 22px rgba(15, 23, 42, .18);
}
.empty-tray {
  display: grid;
  place-items: center;
  min-width: 240px;
  min-height: 220px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 800;
  background: #f8fafc;
  padding: 18px;
  text-align: center;
}
.source-previews {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.replace-only.is-hidden,
.team-only.is-hidden {
  display: none;
}
.tcg-favorites-field.is-hidden {
  display: none;
}
.pokemon-character-field.is-hidden {
  display: none;
}
.middle-upload-action {
  display: grid;
  place-items: center;
  min-height: 118px;
  border: 1px dashed rgba(47, 126, 189, .55);
  border-radius: 12px;
  background:
    radial-gradient(circle at 50% 0%, rgba(246,185,67,.18), transparent 36%),
    rgba(255, 255, 255, .90);
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.middle-upload-action:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(52, 169, 201, .15), 0 18px 38px rgba(23, 58, 96, .13);
  transform: translateY(-1px);
}
.middle-upload-action strong {
  display: block;
  font-size: 40px;
  line-height: 1;
  margin-bottom: 6px;
}
.cards-panel .middle-upload-action {
  min-height: 86px;
  margin: 12px 0 0;
  padding: 10px;
  font-size: 12px;
  box-shadow: none;
}
.cards-panel .middle-upload-action strong {
  font-size: 34px;
  margin-bottom: 4px;
}
.source-preview {
  position: relative;
  display: grid;
  gap: 7px;
  font-size: 11px;
  color: #4b5563;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
  border: 1px solid rgba(47, 126, 189, .20);
  background: rgba(255, 255, 255, .92);
  border-radius: 12px;
  padding: 10px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.source-preview:hover,
.source-preview:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(52, 169, 201, .15), 0 16px 36px rgba(23, 58, 96, .12);
  transform: translateY(-1px);
}
.frame-mode-field {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(47, 126, 189, .18);
  border-radius: 18px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 28px rgba(15, 23, 42, .06);
}
.frame-mode-options {
  display: grid;
  grid-template-columns: repeat(2, auto);
  gap: 8px;
  justify-content: start;
  width: fit-content;
}
.frame-mode-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 999px;
  background: rgba(248, 251, 253, .96);
  color: #173a60;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  user-select: none;
}
.frame-mode-option input {
  margin: 0;
  width: 16px;
  height: 16px;
  min-height: 16px;
}
.frame-mode-option:has(input:checked) {
  border-color: var(--brand-blue);
  background: rgba(235, 248, 252, .98);
  box-shadow: 0 0 0 3px rgba(52, 169, 201, .12);
}
.frame-icon {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, .9);
  background: rgba(255, 255, 255, .92);
  color: #111827;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .15s ease, transform .15s ease;
  box-shadow: 0 8px 20px rgba(15, 23, 42, .14);
  pointer-events: none;
}
.source-preview:hover .frame-icon,
.source-preview:focus-within .frame-icon,
.source-preview:hover .frame-icon,
.source-preview:focus-within .frame-icon {
  opacity: 1;
  transform: translateY(0);
}
.preview-panel {
  display: grid;
  gap: 10px;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  position: relative;
}
.image-toolbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 6px;
  padding: 0;
  flex-wrap: wrap;
}
.preview-toolbar {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  min-width: 0;
  padding: 8px 0;
  margin-bottom: 0;
  border-bottom: 0;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(14px);
  box-shadow: none;
  overflow-x: auto;
  overflow-y: hidden;
  flex-wrap: nowrap;
  scrollbar-width: thin;
}
.tool-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  width: auto;
  margin: 0;
  padding: 0 8px;
  border: 1px solid rgba(47, 126, 189, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: var(--brand-navy);
  font-size: 11px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: color .15s ease, background .15s ease, border-color .15s ease;
}
.tool-button:hover {
  background: #ffffff;
  border-color: var(--brand-blue);
  color: var(--brand-navy);
}
.tool-button.is-off {
  background: rgba(226, 232, 240, .72);
  color: #64748b;
}
.tool-button.is-disabled,
.tool-button:disabled {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}
.tool-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  line-height: 0;
}
.tool-icon svg {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.overlay-eye-icon {
  position: relative;
}
.overlay-eye-icon svg {
  grid-area: 1 / 1;
}
.tool-button .eye-off {
  display: none;
}
.tool-button.is-off .eye-on {
  display: none;
}
.tool-button.is-off .eye-off {
  display: block;
}
.source-preview img {
  width: 165px;
  height: 215px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #cfd6e0;
  border-radius: 6px;
  -webkit-user-drag: none;
  user-select: none;
}
.source-preview img.upload-placeholder {
  border-style: dashed;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .08), rgba(124, 58, 237, .08)),
    #f8fafc;
}
.source-preview span {
  line-height: 1.2;
}
.source-preview small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
}
.team-preview-stack {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 165px;
  height: 215px;
  border-radius: 6px;
  border: 1px dashed #b8c7d8;
  background: #f8fafc;
}
.team-thumb {
  position: relative;
  display: block;
  min-width: 0;
  min-height: 0;
}
.team-preview-stack img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: #e2e8f0;
}
.team-thumb-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, .82);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .24);
  opacity: 0;
  transform: scale(.92);
  transition: opacity .15s ease, transform .15s ease;
}
.team-thumb:hover .team-thumb-remove,
.team-thumb:focus-within .team-thumb-remove {
  opacity: 1;
  transform: scale(1);
}
@media (hover: none), (pointer: coarse) {
  .team-thumb-remove {
    opacity: 1;
    transform: scale(1);
  }
}
.team-preview-empty,
.team-preview-more {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 64px;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}
.team-preview-more {
  grid-column: auto;
  min-height: 0;
  border-radius: 5px;
  background: #e8f3fb;
  color: #173a60;
}
.preview {
  position: relative;
  width: 100%;
  background:
    radial-gradient(circle at 50% 12%, rgba(246,185,67,.18), transparent 28%),
    linear-gradient(135deg, rgba(255,255,255,.48), rgba(232,243,251,.30));
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 16px;
  padding: 16px;
  box-sizing: border-box;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), var(--shadow-soft);
}
.preview-context-labels {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0;
  align-items: center;
  flex: 1 1 360px;
  min-width: 0;
  overflow: visible;
  scrollbar-width: none;
}
.preview-context-labels::-webkit-scrollbar { display: none; }
.preview-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
  margin-left: auto;
  flex-wrap: wrap;
  position: sticky;
  right: 0;
  padding-left: 12px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.92) 24px, rgba(255,255,255,.92));
  z-index: 3;
}
.preview-header-action {
  flex: 0 0 auto;
}
.mobile-editor-actions {
  display: none;
}
.wizard-mode .preview-toolbar,
.wizard-mode .preview-header-row,
.wizard-mode .studio-panel {
  display: none;
}
.wizard-mode main {
  grid-column: 1 / 3;
}
.wizard-mode .result-layout {
  display: none;
}
body.landing-mode .cards-panel {
  display: none;
}
.preview-context-dropdown,
.preview-context-static {
  position: relative;
  display: flex;
  align-items: stretch;
  flex: 1 1 160px;
  min-width: 0;
  z-index: 2;
}
.preview-context-dropdown > summary {
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 8px 4px 9px;
  border: 1px solid rgba(47, 126, 189, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--brand-ink);
  box-shadow: 0 10px 24px rgba(23, 58, 96, .08);
  cursor: pointer;
  white-space: nowrap;
}
.preview-context-dropdown > summary::-webkit-details-marker {
  display: none;
}
.preview-context-chevron {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  transition: transform .18s ease;
}
.preview-context-chevron svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.preview-context-dropdown[open] > summary .preview-context-chevron {
  transform: rotate(180deg);
}
.preview-context-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 40;
  display: none;
  gap: 6px;
  min-width: 180px;
  max-width: min(260px, 80vw);
  padding: 8px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 14px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 36px rgba(23, 58, 96, .12);
}
.preview-context-dropdown[open] {
  z-index: 80;
}
.preview-context-dropdown[open] .preview-context-menu {
  display: grid;
}
.preview-context-dropdown.is-open {
  z-index: 80;
}
.preview-context-dropdown.is-open .preview-context-menu {
  display: grid;
}
.preview-context-dropdown > .preview-context-toggle {
  width: 100%;
  justify-content: space-between;
}
.preview-context-menu button {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: #f8fbfd;
  color: #173a60;
  text-align: left;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.preview-context-menu button:hover {
  background: #eaf4fb;
}
.preview-context-menu button.is-selected {
  background: #173a60;
  color: #fff;
}
.preview-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
  padding: 10px;
  border: 1px solid rgba(23, 58, 96, .12);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 38px rgba(23, 58, 96, .10);
  flex-wrap: wrap;
  min-width: 0;
  overflow: visible;
}
.preview-header-row > .preview-header-action,
.preview-header-row > .card-details-toggle,
.preview-header-row > .card-uploads-toggle,
.preview-header-row > .preview-context-dropdown {
  flex: 1 1 160px;
  min-width: 0;
}
.editor-landing {
  display: none;
  gap: 16px;
  padding: 20px;
  margin-top: 14px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 22px;
  background:
    radial-gradient(circle at 20% 0%, rgba(246, 185, 67, .16), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(239, 248, 251, .94));
  box-shadow: 0 18px 42px rgba(23, 58, 96, .10);
}
body.landing-mode .editor-landing {
  display: grid;
}
body.landing-mode .studio-panel {
  display: none;
}
body.landing-mode main {
  grid-column: 1 / 3;
}
body.landing-mode .result-layout {
  grid-template-columns: minmax(0, 1fr);
}
body.landing-mode .preview-toolbar,
body.landing-mode .preview-header-row,
body.landing-mode .result-layout > .preview-panel,
body.landing-mode .result-layout > .card-uploads-panel {
  display: none;
}
body.landing-mode .cards-panel {
  display: grid;
}
.editor-landing-hero {
  display: grid;
  gap: 10px;
}
.editor-landing-hero small {
  color: #5b7087;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.editor-landing-hero h2 {
  margin: 0;
  color: #173a60;
  font-size: 26px;
  line-height: 1.08;
}
.editor-landing-hero p {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.55;
  max-width: 72ch;
}
.editor-landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.editor-landing-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.source-preview.is-required {
  border-color: #f97316;
  box-shadow: 0 0 0 4px rgba(249,115,22,.18), 0 18px 38px rgba(249,115,22,.16);
  animation: requiredUploadPulse 1.1s ease-in-out 2;
}
@keyframes requiredUploadPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
@media (min-width: 700px) {
  .editor-landing-gallery { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .editor-landing-gallery { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1240px) {
  .editor-landing-gallery { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (min-width: 1500px) {
  .editor-landing-gallery { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
.editor-landing-gallery .gallery-card {
  display: grid;
  gap: 0;
  padding: 0;
  border: 1px solid rgba(23, 58, 96, .13);
  border-radius: 14px;
  background: rgba(255, 255, 255, .90);
  box-shadow: 0 18px 42px rgba(15, 23, 42, .09);
  overflow: hidden;
  cursor: pointer;
}
.editor-landing-gallery .gallery-card {
  cursor: zoom-in;
}
.editor-landing-gallery .gallery-card:focus-visible {
  outline: 3px solid rgba(246, 185, 67, .78);
  outline-offset: 4px;
}
.editor-gallery-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: none;
  place-items: center;
  padding: 28px;
  background: rgba(16, 32, 51, .74);
  backdrop-filter: blur(6px);
}
.editor-gallery-modal.is-open { display: grid; }
.editor-gallery-modal .gallery-modal-stage {
  display: grid;
  gap: 14px;
  justify-items: center;
  max-width: min(92vw, 680px);
}
.editor-gallery-modal .gallery-modal-stage img {
  display: block;
  max-width: min(92vw, 620px);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 34px 100px rgba(0, 0, 0, .38);
}
.editor-gallery-modal .gallery-modal-stage strong {
  color: #fff;
  font-size: 16px;
  text-align: center;
}
.editor-gallery-modal .gallery-modal-close {
  position: fixed;
  top: 18px;
  right: 18px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, .42);
  border-radius: 999px;
  background: rgba(255, 255, 255, .94);
  color: #173a60;
  font-weight: 900;
  cursor: pointer;
}
.editor-landing-gallery .gallery-card[hidden] {
  display: none;
}
.editor-landing-gallery .gallery-card img {
  width: 100%;
  height: auto;
  border-radius: 0;
  background: #edf3f8;
}
.editor-landing-gallery .gallery-card-note {
  position: relative;
  margin: 0;
  padding: 12px 14px 15px;
  border-top: 1px solid rgba(23, 58, 96, .14);
  background: #fff;
}
.editor-landing-gallery .gallery-card-note::before {
  content: "";
  position: absolute;
  left: 14px;
  top: -2px;
  width: 34px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: #d59b2b;
}
.editor-landing-gallery .gallery-card-note span {
  display: block;
  padding: 0;
  color: #14375c;
  font-size: 13.5px;
  font-weight: 750;
  letter-spacing: .01em;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.editor-landing-gallery .gallery-card span {
  display: block;
  padding: 0 10px 10px;
  color: #5b7087;
  font-size: 12px;
  line-height: 1.4;
}
@media (max-width: 900px) {
  .preview-header-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }
  .preview-header-row > .preview-context-dropdown {
    order: 1;
  }
  .preview-header-row > .card-details-toggle,
  .preview-header-row > .card-uploads-toggle {
    order: 2;
    width: 100%;
  }
  .source-previews .source-preview .team-preview-stack {
    width: 100%;
    height: clamp(190px, 55vw, 250px);
    min-height: 190px;
    max-height: none;
    aspect-ratio: auto;
  }
  .source-previews .source-preview .team-preview-stack img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: cover;
  }
}
.wizard-mode .style-grid-header {
  display: none;
}
.card-details-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 30px;
  padding: 5px 8px 5px 9px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .92);
  color: #173a60;
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(23, 58, 96, .08);
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.card-uploads-toggle {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
  min-height: 30px;
  padding: 4px 8px 4px 9px;
  border: 1px solid rgba(47, 126, 189, .14);
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--brand-ink);
  font-size: 11px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(23, 58, 96, .08);
  cursor: pointer;
  white-space: nowrap;
  flex: 0 0 auto;
}
.card-uploads-toggle.is-required {
  border-color: #f97316;
  background: #fff7ed;
  color: #9a3412;
  box-shadow: 0 0 0 4px rgba(249,115,22,.18), 0 12px 28px rgba(249,115,22,.16);
  animation: requiredUploadPulse 1.1s ease-in-out 2;
}
.cards-panel-backdrop {
  display: none;
}
.card-details-toggle-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
  text-align: left;
  align-items: start;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .82);
  color: var(--brand-ink);
}
.card-details-toggle-copy small {
  display: block;
  margin: 0;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  line-height: 1;
  text-transform: uppercase;
}
.card-details-label {
  display: block;
  margin: 0;
  color: var(--brand-navy);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.08;
}
.card-details-toggle-icon {
  display: inline-grid;
  place-items: center;
  width: 14px;
  height: 14px;
  transition: transform .22s ease;
}
.card-details-toggle-icon svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2.4;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.card-details-label {
  text-decoration: none;
}
.card-details-toggle[aria-expanded="true"] .card-details-toggle-icon {
  transform: rotate(180deg);
}
.card-uploads-toggle[aria-expanded="true"] .card-details-toggle-icon {
  transform: rotate(180deg);
}
.cards-panel-close {
  display: none;
}
.card-details-panel,
.card-uploads-panel,
.wizard-upload-panel,
.wizard-details-panel {
  display: grid;
  gap: 8px;
  margin: 0 0 8px;
  padding: 0 12px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 16px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 14px 28px rgba(23, 58, 96, .08);
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  transition: max-height .28s ease, opacity .2s ease, transform .28s ease, padding .28s ease;
}
.card-details-panel.is-open,
.card-uploads-panel.is-open,
.wizard-upload-panel.is-open,
.wizard-details-panel.is-open {
  padding: 12px;
  max-height: 780px;
  opacity: 1;
  transform: translateY(0);
}
.card-uploads-panel.is-hidden {
  display: none;
}
.wizard-details-panel {
  max-height: none;
  opacity: 1;
  transform: none;
  overflow: visible;
}
.wizard-step-panel .wizard-upload-panel,
.wizard-step-panel .wizard-details-panel {
  display: grid !important;
  max-height: none !important;
  opacity: 1 !important;
  transform: none !important;
}
.wizard-details-panel .field {
  margin: 0;
  box-shadow: none;
}
.wizard-details-panel .card-details-field {
  justify-self: stretch;
}
.mobile-card-uploads-panel {
  display: none;
}
.studio-wizard {
  display: grid;
  gap: 14px;
  margin: 12px 0 14px;
}
.wizard-shell-header {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(246, 250, 255, .95));
  box-shadow: 0 14px 28px rgba(23, 58, 96, .08);
}
.wizard-shell-header strong {
  color: #173a60;
  font-size: 24px;
  line-height: 1.08;
  font-weight: 900;
}
.wizard-shell-header p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.studio-wizard.is-hidden {
  display: none;
}
.wizard-summary {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px 2px 10px;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
}
.wizard-summary-step {
  flex: 0 0 clamp(172px, 26vw, 230px);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0;
  align-items: start;
  padding: 0;
  border: 1px solid rgba(47, 126, 189, .14);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .98), rgba(244, 250, 255, .92));
  color: #173a60;
  text-align: left;
  box-shadow: 0 14px 28px rgba(23, 58, 96, .08);
  position: relative;
  overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
  scroll-snap-align: center;
  scroll-margin-inline: 24px;
}
.wizard-summary-step::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(52, 169, 201, .10), transparent 40%, rgba(246, 185, 67, .08));
  opacity: .8;
  pointer-events: none;
}
.wizard-summary-step.is-active {
  border-color: rgba(34, 197, 94, .42);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16), 0 16px 32px rgba(23, 58, 96, .12);
  transform: translateY(-1px);
}
.wizard-summary-step.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(34, 197, 94, .22);
  pointer-events: none;
}
.wizard-summary-step.is-complete .wizard-step-index {
  background: #22c55e;
  color: #f8fafc;
}
.wizard-step-index {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin: 10px 0 10px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, #173a60, #245f89);
  color: #ffffff;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 900;
  box-shadow: 0 8px 16px rgba(23, 58, 96, .20);
}
.wizard-summary-step > span:last-child {
  display: grid;
  gap: 1px;
  min-width: 0;
  padding: 10px 12px 10px 10px;
}
.wizard-summary-step small {
  display: block;
  margin: 0;
  color: #5b7087;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .05em;
  line-height: 1;
  text-transform: uppercase;
}
.wizard-summary-step strong {
  display: block;
  margin: 0;
  color: var(--brand-navy);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.12;
}
.wizard-step-panels {
  display: grid;
  gap: 12px;
}
.wizard-step-panel {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 18px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 14px 28px rgba(23, 58, 96, .08);
  position: relative;
}
.wizard-step-head {
  display: block;
  position: relative;
  padding-right: 168px;
  min-height: 56px;
}
.wizard-step-panel.is-hidden {
  display: none;
}
.wizard-step-copy {
  min-width: 0;
}
.wizard-step-copy strong {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.wizard-step-copy h2 {
  margin: 4px 0 0;
  color: #173a60;
  font-size: 18px;
  line-height: 1.12;
}
.wizard-step-copy p {
  margin: 6px 0 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.45;
}
.wizard-layout-mount,
.wizard-style-mount,
.wizard-upload-mount,
.wizard-details-mount {
  display: grid;
  gap: 12px;
}
.wizard-step-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}
.wizard-step-actions-top {
  align-items: flex-start;
  width: auto;
  flex: 0 0 auto;
  margin-left: 0;
  position: absolute;
  top: 0;
  right: 0;
}
.card-details-mobile-actions {
  display: none;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 4px;
}
.card-details-mobile-actions .secondary-button,
.card-details-mobile-actions button {
  min-width: 0;
}
.card-details-panel .card-details-field {
  justify-self: stretch;
}
.card-details-panel .field {
  margin: 0;
  box-shadow: none;
}
.card-details-actions {
  display: flex;
  justify-content: flex-end;
}
.tcg-favorites-field,
.pokemon-character-field {
  display: none !important;
}
.frame-preview-card {
  position: relative;
  flex: 0 0 86px;
  min-width: 86px;
  display: block;
  overflow: hidden;
  padding: 3px;
  border: 2px solid rgba(47, 126, 189, .18);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 10px 22px rgba(23, 58, 96, .08);
  scroll-snap-align: start;
}
.frame-preview-card img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: #eef4f8;
}
.frame-preview-card:hover,
.frame-preview-card.is-selected {
  border-color: #f6b943;
  box-shadow: 0 0 0 4px rgba(246,185,67,.20), 0 14px 26px rgba(23,58,96,.16);
  transform: translateY(-1px);
}
.frame-preview-card.is-selected {
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,247,224,.98));
}
.preview-canvas {
  position: relative;
  width: 100%;
  aspect-ratio: 1600 / 2228;
  overflow: visible;
  border-radius: 0;
  background: transparent;
  perspective: 1200px;
  filter: drop-shadow(0 26px 38px rgba(23, 58, 96, .20));
  max-width: 860px;
  margin-inline: auto;
}
.preview-card-inner {
  position: absolute;
  inset: 0;
  border-radius: 3.5% / 2.513%;
  transform-style: preserve-3d;
  transition: transform .52s cubic-bezier(.2, .72, .2, 1);
}
.preview-canvas.is-flipped .preview-card-inner {
  transform: rotateY(180deg);
}
.preview-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  transform-style: preserve-3d;
  border-radius: inherit;
  overflow: hidden;
}
.preview-card-front {
  transform: rotateY(0deg);
}
.preview-card-back {
  transform: rotateY(180deg);
}
.preview-canvas img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
  object-position: center center;
  margin: 0;
  transform-origin: 50% 50%;
  transition: opacity .24s ease;
  -webkit-user-drag: none;
  user-select: none;
}
.preview-canvas img.is-hidden {
  display: none;
}
.preview-canvas.is-loading-card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  border-radius: inherit;
  background: rgba(248, 250, 252, .72);
  backdrop-filter: blur(2px);
}
.preview-canvas.is-loading-card::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 9;
  width: 42px;
  height: 42px;
  margin: -21px 0 0 -21px;
  border-radius: 999px;
  border: 4px solid rgba(47, 126, 189, .22);
  border-top-color: var(--brand-blue);
  animation: preview-card-loading-spin .8s linear infinite;
}
@keyframes preview-card-loading-spin {
  to {
    transform: rotate(360deg);
  }
}
.preview-canvas .front-layer {
  opacity: 1;
  transform: none;
}
.preview-canvas .card-back-image {
  opacity: 1;
  transform: none;
}
/* Studio production skin */
body {
  background:
    linear-gradient(90deg, rgba(23, 58, 96, .045) 1px, transparent 1px),
    linear-gradient(0deg, rgba(23, 58, 96, .035) 1px, transparent 1px),
    linear-gradient(135deg, #f7fbff 0%, #eef8fb 42%, #fff8e6 100%);
  background-size: 30px 30px, 30px 30px, auto;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(120deg, transparent 0 22%, rgba(246, 185, 67, .24) 22% 22.35%, transparent 22.35% 67%, rgba(52, 169, 201, .20) 67% 67.3%, transparent 67.3%),
    radial-gradient(circle at 72% 5%, rgba(118, 191, 168, .22), transparent 24%);
}
.editor-nav {
  padding: 10px clamp(14px, 2.2vw, 28px);
  border-bottom: 1px solid rgba(23, 58, 96, .12);
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 44px rgba(23, 58, 96, .10);
}
.editor-nav-actions {
  padding: 5px;
  border: 0;
  border-radius: 999px;
  background: transparent;
}
.nav-pill,
.cart-link {
  border-color: transparent;
  background: #ffffff;
  color: var(--brand-navy);
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.nav-button {
  min-height: 38px;
  padding: 0 12px;
  box-shadow: none;
}
.nav-pill:hover,
.cart-link:hover {
  transform: translateY(-1px);
  background: #edf7fb;
  box-shadow: 0 10px 24px rgba(23, 58, 96, .10);
}
.cart-dropdown .cart-mini-actions a.nav-pill:hover,
.cart-dropdown .cart-mini-actions a.nav-pill:focus-visible {
  background: #245f89;
  color: #ffffff;
}
.cart-dropdown .cart-mini-actions a.nav-pill:last-child:hover,
.cart-dropdown .cart-mini-actions a.nav-pill:last-child:focus-visible {
  background: #f6b943;
  color: #173a60;
}
.studio-panel {
  position: relative;
  border-right: 1px solid rgba(23, 58, 96, .12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .94), rgba(244, 250, 253, .92));
  box-shadow: 16px 0 42px rgba(23, 58, 96, .08);
}
.studio-panel::before {
  content: "";
  display: block;
  height: 6px;
  margin: -18px -18px 18px;
  background: linear-gradient(90deg, #173a60, #34a9c9, #f6b943);
}
.panel-title {
  align-items: start;
  padding: 0 0 16px;
  border-bottom: 1px solid rgba(23, 58, 96, .10);
}
.panel-title h1 {
  color: #14375c;
  font-size: 24px;
  letter-spacing: 0;
}
.panel-title .hint {
  color: #57708a;
}
.tool-badge {
  border-color: rgba(246, 185, 67, .45);
  background: #fff8df;
  color: #7c4c00;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.selected-card-status {
  border: 1px solid rgba(23, 58, 96, .12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, #173a60, #245f89);
  color: #ffffff;
  box-shadow: 0 18px 36px rgba(23, 58, 96, .18);
}
.selected-card-status small {
  color: rgba(255, 255, 255, .72);
}
.selected-card-status b {
  color: #ffffff;
}
#cardForm {
  gap: 13px;
  padding-bottom: 90px;
}
.field {
  border-color: rgba(23, 58, 96, .12);
  border-radius: 14px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 10px 26px rgba(23, 58, 96, .06);
}
.field label {
  color: #173a60;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.required-label::after {
  content: "Required";
  margin-left: 8px;
  padding: 3px 7px;
  border-radius: 999px;
  background: #fff1f2;
  color: #be123c;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.field.has-error {
  border-color: #ef4444;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12), 0 10px 26px rgba(23, 58, 96, .06);
}
input,
select,
textarea {
  border-color: rgba(23, 58, 96, .16);
  border-radius: 10px;
  background: #fbfdff;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
input:focus,
select:focus,
textarea:focus {
  outline: 0;
  border-color: #34a9c9;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(52, 169, 201, .16);
}
input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border-color: #ef4444;
  background: #fff7f7;
}
.layout-picker {
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(239, 248, 251, .88));
}
.layout-picker img {
  border-radius: 12px;
  border-color: rgba(23, 58, 96, .12);
  box-shadow: 0 16px 30px rgba(23, 58, 96, .14);
}
.layout-help-button {
  border-color: rgba(47, 126, 189, .22);
  border-radius: 999px;
  background: #edf7fb;
  color: #173a60;
  font-weight: 900;
}
.floating-actions {
  left: auto;
  right: 24px;
  bottom: 18px;
  padding: 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  backdrop-filter: blur(12px);
  box-shadow: none;
}
.floating-actions button,
#submitButton,
.secondary-button {
  border-radius: 12px;
  font-weight: 900;
}
#submitButton {
  background: linear-gradient(135deg, #173a60 0%, #236a9b 56%, #f6b943 140%);
  box-shadow: 0 14px 30px rgba(23, 58, 96, .20);
  color: #ffffff;
}
.secondary-button {
  background: #fff8df;
  color: #173a60;
  border-color: rgba(246, 185, 67, .38);
}
main {
  position: relative;
  padding: 0;
  min-width: 0;
  overflow-x: hidden;
}
.result-shell {
  max-width: none;
  padding: clamp(18px, 2.2vw, 30px);
  margin-bottom: 50px;
  min-width: 0;
  box-sizing: border-box;
  overflow-x: hidden;
  position: relative;
}
.result-layout {
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: clamp(16px, 2vw, 24px);
  min-width: 0;
}
.result-layout > .preview-panel {
  grid-column: 1;
  grid-row: 1;
}
.result-layout > .card-uploads-panel {
  grid-column: 2;
  grid-row: 1;
  align-self: start;
}
.result-layout > .editor-landing {
  grid-column: 1 / -1;
  grid-row: 1;
}
.preview-panel {
  max-width: none;
  gap: 14px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.preview-panel .preview {
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  justify-content: center;
  align-items: center;
}
.source-previews {
  align-self: start;
  min-width: 0;
  box-sizing: border-box;
}
.image-toolbar {
  position: relative;
  padding: 10px;
  border: 1px solid rgba(23, 58, 96, .12);
  background: rgba(255, 255, 255, .82);
  box-shadow: 0 16px 38px rgba(23, 58, 96, .10);
}
.image-toolbar::before {
  content: "Preview tools";
  padding: 0 8px;
  color: #57708a;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.tool-button {
  min-height: 38px;
  padding: 0 11px;
  border-color: rgba(23, 58, 96, .14);
  background: #ffffff;
  color: #173a60;
  box-shadow: 0 8px 18px rgba(23, 58, 96, .07);
}
.tool-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 13px 25px rgba(23, 58, 96, .12);
}
.preview {
  padding: 0;
  border: 0;
  border-radius: 18px;
  background: transparent;
  box-shadow: none;
}
.preview::before {
  display: none;
}
.preview-canvas {
  overflow: hidden;
  border-radius: 18px;
  background: transparent;
  filter: drop-shadow(0 26px 38px rgba(23, 58, 96, .24));
  min-width: 0;
  max-height: calc(100vh - 250px);
}
.source-previews {
  gap: 16px;
  min-width: 0;
}
.source-preview {
  padding: 12px;
  border-color: rgba(23, 58, 96, .13);
  border-radius: 18px;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 18px 38px rgba(23, 58, 96, .10);
}
.source-preview img {
  width: 100%;
  height: auto;
  max-height: 250px;
  aspect-ratio: 1600 / 2228;
  object-fit: contain;
  border-radius: 12px;
  background:
    linear-gradient(135deg, #f8fbff, #edf7fb);
}
.source-preview .team-preview-stack {
  width: 100%;
  height: auto;
  max-height: 250px;
  aspect-ratio: 1600 / 2228;
  border-radius: 12px;
}
.source-preview .team-preview-stack img {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  max-height: none;
  object-fit: cover;
  border-radius: 8px;
}
.source-preview span:not(.frame-icon) {
  color: #173a60;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.source-preview small {
  color: #5e738b;
}
.frame-icon {
  background: #173a60;
  color: #ffffff;
  border: 0;
}
.cards-panel {
  border-left: 1px solid rgba(23, 58, 96, .12);
  background:
    linear-gradient(180deg, rgba(255,255,255,.90), rgba(238,248,251,.88)),
    repeating-linear-gradient(0deg, rgba(23, 58, 96, .04) 0 1px, transparent 1px 18px);
  box-shadow: -18px 0 42px rgba(23, 58, 96, .08);
}
.cards-panel-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(23, 58, 96, .10);
}
.cards-panel-header h2 {
  color: #14375c;
  font-size: 17px;
}
.cards-panel-header span {
  color: #5e738b;
}
.cards-panel .middle-upload-action {
  min-height: 98px;
  border-radius: 18px;
  border-color: rgba(246, 185, 67, .50);
  background:
    linear-gradient(135deg, #fff8df, #edf7fb);
  box-shadow: 0 16px 30px rgba(23, 58, 96, .10);
}
.cards-panel .middle-upload-action:hover {
  box-shadow: 0 20px 38px rgba(23, 58, 96, .15);
}
.card-tile {
  border-radius: 16px;
  border-color: rgba(23, 58, 96, .12);
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(23, 58, 96, .08);
}
.card-tile img {
  border-radius: 10px;
  background: #edf3f7;
}
.card-tile span {
  color: #173a60;
  padding: 0 4px 4px;
  text-align: center;
}
.empty-tray {
  border-radius: 18px;
  border-color: rgba(47, 126, 189, .26);
  background: rgba(255, 255, 255, .78);
  color: #5e738b;
}
.cart-dropdown,
.profile-dropdown,
.modal-dialog {
  border-radius: 18px;
  border-color: rgba(23, 58, 96, .16);
  box-shadow: 0 30px 70px rgba(23, 58, 96, .22);
}
.bulk-replace-upload {
  position: relative;
  width: 100%;
  display: grid;
  gap: 8px;
  place-items: center;
  padding: 12px;
  border: 1px dashed rgba(47, 126, 189, .55);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(237, 247, 251, .90));
  color: #173a60;
  box-shadow: none;
  text-align: center;
}
.bulk-replace-upload:hover {
  border-color: #34a9c9;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(52, 169, 201, .14);
}
.bulk-replace-upload.is-invalid {
  border-color: #ef4444;
  background: #fff7f7;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .12);
}
.bulk-replace-upload img {
  width: min(100%, 190px);
  height: 150px;
  object-fit: contain;
  border: 1px solid rgba(23, 58, 96, .14);
  border-radius: 12px;
  background: #f8fafc;
}
.bulk-replace-upload img.upload-placeholder {
  border-style: dashed;
}
.bulk-replace-upload strong {
  font-size: 13px;
  line-height: 1.2;
}
.bulk-replace-upload small {
  max-width: 360px;
  color: #5e738b;
  font-size: 11px;
  line-height: 1.35;
}
.field-error {
  display: none;
  margin-top: 7px;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 800;
}
.field-error.is-visible {
  display: block;
}
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 240;
  display: none;
  background: rgba(5, 18, 32, .62);
  overflow: hidden;
}
.tutorial-overlay.is-active {
  display: block;
}
.tutorial-focus {
  position: fixed;
  border: 3px solid #f6b943;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(5, 18, 32, .62), 0 0 0 8px rgba(246, 185, 67, .22);
  pointer-events: none;
  transition: left .2s ease, top .2s ease, width .2s ease, height .2s ease;
}
.tutorial-card {
  position: fixed;
  display: grid;
  gap: 12px;
  padding: 18px;
  border: 1px solid rgba(246, 185, 67, .38);
  border-radius: 18px;
  background: #ffffff;
  color: #173a60;
  box-shadow: 0 28px 70px rgba(0, 0, 0, .28);
}
.tutorial-kicker {
  width: fit-content;
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff8df;
  color: #7c4c00;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.tutorial-card h2 {
  margin: 0;
  font-size: 21px;
}
.tutorial-card p {
  margin: 0;
  color: #4b637d;
  font-size: 14px;
  line-height: 1.5;
}
.tutorial-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.tutorial-actions button {
  min-height: 38px;
}
@media (min-width: 1400px) {
  body {
    grid-template-columns: minmax(340px, 3fr) minmax(0, 10fr) minmax(300px, 2fr);
  }
  #cardForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .field.wide {
    grid-column: auto;
  }
}
@media (max-width: 1100px) {
  body {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
  }
  .cards-panel {
    grid-column: 1 / -1;
    grid-row: auto;
    border-top: 1px solid #d5dbe5;
    border-left: 0;
    max-height: none;
  }
  .card-tray {
    margin-top: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 12px;
    min-width: 0;
  }
  .card-tile {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    min-height: 232px;
    padding: 3px;
  }
  .cards-page-loader {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    min-height: 232px;
    padding: 8px;
  }
  .card-tile img {
    display: block;
    width: 100%;
    height: 223px;
    min-height: 223px;
    aspect-ratio: auto;
    object-fit: contain;
  }
  #cardForm {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 900px) {
  html,
  body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }
  body {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    height: auto;
    min-height: 100vh;
    overflow-y: auto;
  }
  body.is-form-drawer-open {
    overflow: hidden;
  }
  body.is-form-drawer-open .floating-actions {
    display: none;
  }
  body.is-uploads-drawer-open {
    overflow: hidden;
  }
  .editor-nav {
    position: sticky;
    top: 0;
    display: flex;
    grid-template-columns: none;
    gap: 10px;
    padding: 8px 10px;
    min-height: 62px;
    z-index: 150;
  }
  .preview-toolbar {
    position: sticky;
    top: 0;
    z-index: 20;
    justify-content: flex-start;
    padding: 8px 0;
  }
  .preview-header-actions {
    width: auto;
    margin-left: auto;
    justify-content: flex-end;
  }
  .preview-toolbar .tool-button span:last-child {
    display: none;
  }
  .preview-toolbar .tool-button {
    width: auto;
    min-width: 0;
    padding: 0 12px;
  }
  .mobile-editor-actions {
    display: none;
  }
  .card-details-toggle,
  .card-uploads-toggle {
    display: inline-flex;
  }
  .studio-wizard {
    gap: 12px;
  }
  .wizard-shell-header {
    padding: 14px 16px;
    border-radius: 18px;
  }
  .wizard-shell-header strong {
    font-size: 20px;
  }
  .wizard-summary {
    padding-bottom: 12px;
  }
  .wizard-summary-step {
    flex-basis: 47vw;
  }
  .wizard-step-index {
    margin: 10px 0 10px 10px;
  }
  .wizard-summary-step > span:last-child {
    padding-right: 14px;
  }
  .wizard-step-actions {
    width: 100%;
  }
  .mobile-nav-menu {
    display: block;
    flex: 0 0 auto;
  }
  .editor-brand,
  .editor-nav-actions {
    min-width: 0;
  }
  .editor-brand {
    flex: 1 1 auto;
    overflow: hidden;
  }
  .brand-logo {
    height: 42px;
    max-width: min(210px, 48vw);
  }
  .editor-nav-actions {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 8px;
  }
  .preview-header-actions {
    display: none;
  }
  .preview-header-row > .preview-header-action {
    display: none;
  }
  .desktop-nav-item {
    display: none;
  }
  .cart-dropdown,
  .profile-dropdown {
    position: fixed;
    left: 12px;
    right: 12px;
    top: 74px;
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 24px);
  }
  .cart-menu::after {
    display: none;
  }
  .cart-menu:hover .cart-dropdown,
  .cart-menu:focus-within .cart-dropdown {
    display: none;
  }
  .editor-nav,
  .studio-panel {
    border-right: 0;
    border-bottom: 1px solid #d9dde3;
  }
  .studio-panel,
  main,
  .cards-panel {
    grid-column: 1;
  }
  .studio-panel {
    grid-row: 2;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 260;
    width: min(86vw, 360px);
    height: 100dvh;
    max-height: none;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    border-right: 1px solid #cbd5e1;
    border-bottom: 0;
    box-shadow: 18px 0 60px rgba(15, 23, 42, .24);
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .studio-panel.is-open {
    transform: translateX(0);
  }
  .form-drawer-toggle {
    display: none !important;
    position: fixed;
    top: 50%;
    left: 0;
    z-index: 261;
    transform: translateY(-50%);
  }
  .form-drawer-toggle.is-open {
    left: min(86vw, 360px);
    box-shadow: 8px 10px 18px rgba(15, 23, 42, .10);
  }
  .uploads-drawer-toggle {
    display: none !important;
    position: fixed;
    top: 50%;
    right: 0;
    z-index: 261;
    transform: translateY(-50%);
  }
  .uploads-drawer-toggle.is-open {
    right: min(86vw, 360px);
    box-shadow: -8px 10px 18px rgba(15, 23, 42, .10);
  }
  .mobile-editor-actions {
    display: none;
  }
  body.is-form-drawer-open .form-drawer-toggle,
  body.is-form-drawer-open .uploads-drawer-toggle,
  body.is-uploads-drawer-open .form-drawer-toggle,
  body.is-uploads-drawer-open .uploads-drawer-toggle {
    display: none;
  }
  .drawer-close-button {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border: 1px solid rgba(203, 213, 225, .9);
    border-radius: 999px;
    background: #ffffff;
    color: var(--brand-navy);
    box-shadow: none;
  }
  .drawer-close-button .tool-icon {
    width: 17px;
    height: 17px;
  }
  .studio-panel .panel-title {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }
  .studio-panel .panel-title .tool-badge {
    display: none;
  }
  main {
    grid-row: 2;
    width: 100%;
    max-width: 100vw;
    height: auto;
    min-height: 0;
    overflow: hidden;
    padding: 0;
  }
  #cardForm {
    grid-template-columns: 1fr;
  }
  #submitButton {
    width: auto;
  }
  .floating-actions {
    left: auto;
    right: 12px;
    top: auto;
    bottom: 164px;
    z-index: 145;
    width: auto;
    justify-content: flex-end;
    align-items: center;
    padding: 0;
    gap: 6px;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }
  body.cards-tray-collapsed .floating-actions {
    top: auto;
    bottom: 54px;
  }
  .floating-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    height: 38px;
    min-height: 38px;
    min-width: 0;
    padding: 0 9px;
    gap: 5px;
    border-radius: 999px;
  }
  .floating-actions .action-label {
    display: none;
  }
  .floating-actions #submitButton .action-label {
    display: inline;
    font-size: 12px;
    line-height: 1;
    white-space: nowrap;
  }
  .floating-actions .tool-icon {
    width: 18px;
    height: 18px;
  }
  .result-shell {
    max-width: none;
    width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 8px 8px 236px;
  }
  .result-header {
    display: grid;
  }
  .result-layout {
    grid-template-columns: 1fr;
    gap: 10px;
    width: 100%;
    min-width: 0;
  }
  .preview {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px;
  }
  .preview-panel {
    width: 100%;
    min-width: 0;
  }
  .preview-canvas {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    max-height: none;
  }
  .image-toolbar {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .card-uploads-panel {
    width: 100%;
    max-width: none;
  }
  .mobile-card-uploads-panel {
    display: grid;
    width: auto;
    max-width: none;
  }
  .result-layout > .card-uploads-panel {
    display: none;
  }
  body.wizard-mode .card-uploads-panel {
    width: 100%;
    max-width: none;
  }
  body.wizard-mode .mobile-card-uploads-panel {
    display: none;
  }
  .result-shell {
    position: relative;
  }
  .source-previews {
    width: 100%;
    min-width: 0;
    height: auto;
    max-height: none;
    padding: 0;
    gap: 8px;
    overflow: visible;
    grid-template-columns: 1fr;
    grid-auto-rows: max-content;
    align-content: start;
    align-items: start;
    background: transparent;
    border-left: 0;
    box-shadow: none;
    transform: none;
  }
  .wizard-layout-mount .layout-card-grid,
  .wizard-layout-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    overflow: visible;
    padding: 0;
    margin-top: 10px;
  }
  .wizard-layout-mount .layout-option-card,
  .wizard-layout-grid .layout-option-card {
    width: 100%;
    flex: none;
    min-height: 170px;
  }
  .preview-context-menu {
    display: none !important;
  }
  .drawer-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 2px 0 4px;
    color: var(--brand-navy);
    font-size: 16px;
    font-weight: 900;
  }
  .source-previews .source-preview img {
    width: 100%;
    height: auto;
    max-height: 190px;
  }
  .source-previews .source-preview,
  .source-previews .quality-coach {
    padding: 8px;
    border-radius: 12px;
  }
  .source-previews .quality-coach {
    gap: 8px;
  }
  .selection-modal {
    width: min(100vw - 16px, 980px);
  }
  .selection-modal-shell {
    padding: 12px;
    border-radius: 18px;
  }
  .selection-modal-body {
    max-height: min(76vh, 760px);
    overflow-y: auto;
    overflow-x: hidden;
    touch-action: pan-y;
  }
  .wizard-step-head {
    padding-right: 0;
    min-height: 0;
  }
  .wizard-step-actions-top {
    position: static;
    margin-top: 12px;
    justify-content: flex-start;
  }
  .selection-modal-grid {
    gap: 10px;
  }
  #mobileLayoutModal .layout-card-grid.selection-modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    height: auto;
    max-height: none;
    overflow: visible;
  }
  .selection-modal .layout-option-card {
    flex-basis: 152px;
  }
  .selection-modal .style-option-card {
    min-width: 0;
  }
  .cards-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 130;
    height: 140px;
    max-height: 140px;
    width: 100vw;
    max-width: 100vw;
    border-top: 1px solid #cbd5e1;
    border-left: 0;
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 -18px 42px rgba(15, 23, 42, .2);
    padding: 10px;
    overflow: visible;
    transition: height .22s ease, max-height .22s ease;
  }
  .cards-panel-backdrop {
    position: fixed;
    inset: 0;
    z-index: 125;
    display: none;
    background: rgba(15, 23, 42, .42);
    backdrop-filter: blur(2px);
  }
  .cards-panel-backdrop.is-visible {
    display: block;
  }
  .cards-panel.is-collapsed {
    left: 0;
    right: 0;
    width: auto;
    height: 0;
    max-height: 0;
    padding: 0;
    border: 0;
    border-left: 1px solid #cbd5e1;
    background: transparent;
    box-shadow: none;
  }
  .mobile-editor-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 145;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 8px;
    padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px)) 10px;
    border: 1px solid rgba(203, 213, 225, .92);
    border-radius: 18px 18px 0 0;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 18px 54px rgba(15, 23, 42, .18);
    backdrop-filter: blur(12px);
  }
  .mobile-editor-actions.is-hidden {
    display: none;
  }
  .mobile-editor-actions .mobile-editor-action {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 58px;
    padding: 10px 8px;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(180deg, #f8fbff, #eef5fb);
    color: var(--brand-navy);
    font-size: 11px;
    font-weight: 900;
    line-height: 1.1;
    text-align: center;
    white-space: nowrap;
    box-shadow: inset 0 0 0 1px rgba(47, 126, 189, .12);
  }
  .mobile-editor-actions .mobile-editor-action:active {
    transform: translateY(1px);
  }
  .mobile-editor-actions .mobile-editor-action.is-hidden {
    display: none;
  }
  .mobile-editor-badge {
    position: absolute;
    top: 8px;
    right: 10px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    background: #ef4444;
    color: #ffffff;
    font-size: 10px;
    font-weight: 900;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 8px 16px rgba(239, 68, 68, .30);
  }
  .mobile-editor-badge.is-hidden {
    display: none;
  }
  .mobile-editor-actions .tool-icon {
    width: 18px;
    height: 18px;
  }
  .mobile-editor-actions .mobile-editor-action:last-child {
    background: linear-gradient(135deg, #173a60, #2f7ebd);
    color: #fff;
    box-shadow: 0 14px 26px rgba(23, 58, 96, .24);
  }
  .mobile-editor-actions .mobile-editor-action:nth-last-child(2):not(.is-hidden) + .mobile-editor-action:last-child {
    background: linear-gradient(135deg, #173a60, #2f7ebd);
  }
  .cards-panel.is-collapsed .cards-panel-toggle {
    position: fixed;
    height: 36px;
    bottom: 10px;
  }
  .cards-panel.is-collapsed .cards-panel-toggle svg {
    transform: rotate(180deg);
  }
  .cards-panel.is-collapsed .card-tray,
  .cards-panel.is-collapsed .cards-panel-header {
    display: none;
  }
  .cards-panel {
    left: 8px;
    right: 8px;
    bottom: 0;
    height: auto;
    max-height: min(68vh, 620px);
    width: auto;
    max-width: none;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    padding: 12px;
    transform: translateY(110%);
    opacity: 0;
    pointer-events: none;
    transition: transform .22s ease, opacity .18s ease;
    z-index: 126;
  }
  .cards-panel.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  body.mobile-cards-panel-open .cards-panel {
    bottom: 0;
  }
  .cards-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 12px 10px;
  }
  .cards-panel-close {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid rgba(47, 126, 189, .18);
    border-radius: 999px;
    background: linear-gradient(135deg, #ffffff, #f1f8fd);
    color: var(--brand-navy);
    font-size: 12px;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(23, 58, 96, .08);
  }
  .cards-panel-close .tool-icon {
    width: 16px;
    height: 16px;
  }
  .cards-panel .middle-upload-action {
    display: none;
    position: sticky;
    left: 0;
    z-index: 3;
    flex: 0 0 112px;
    width: 112px;
    min-width: 112px;
    min-height: 104px;
    margin: 0;
    padding: 8px;
  }
  .cards-panel .middle-upload-action strong {
    font-size: 38px;
  }
  .card-tray {
    margin-top: 0;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0 0 12px;
    min-width: 0;
  }
  .card-tile {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    min-height: 232px;
    padding: 3px;
  }
  .cards-page-loader {
    flex: 0 0 160px;
    width: 160px;
    min-width: 160px;
    min-height: 232px;
    padding: 8px;
  }
  .card-tile img {
    display: block;
    width: 100%;
    height: 223px;
    min-height: 223px;
    aspect-ratio: auto;
    object-fit: contain;
  }
  .card-tile > span {
    display: none;
  }
  .card-tile-actions {
    position: absolute;
    left: 50%;
    bottom: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 15px;
    width: max-content;
    transform: translateX(-50%);
  }
  .trash-card-button,
  .add-cart-card-button,
  .quality-card-button {
    opacity: 1;
    transform: none;
    width: 24px;
    height: 24px;
  }
  .trash-card-button {
    position: static;
  }
  .quality-card-button {
    right: 35px;
  }
  .add-cart-card-button {
    position: static;
  }
  .quality-card-button {
    display: none;
  }
  .empty-tray {
    min-height: 104px;
    min-width: 220px;
  }
  .bulk-setup {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  #bulkModal {
    align-items: start;
    padding: 8px;
  }
  #bulkModal .modal-dialog {
    width: 100%;
    max-height: calc(100svh - 16px);
    padding: 12px;
    border-radius: 12px;
  }
  #bulkModal .modal-header {
    align-items: center;
    margin-bottom: 8px;
  }
  #bulkModal .modal-header .hint,
  #bulkImageName,
  #bulkSummary,
  #bulkModal .bulk-status span {
    display: none;
  }
  #bulkModal .bulk-status {
    margin-top: 8px;
    gap: 6px;
  }
  #bulkModal .modal-actions {
    margin-top: 10px;
    gap: 7px;
  }
  #bulkModal .modal-actions button {
    min-height: 36px;
    padding: 0 10px;
    font-size: 13px;
  }
  .bulk-preview-card {
    padding: 6px;
  }
  .bulk-preview-card img {
    height: 132px;
  }
  .bulk-fields {
    grid-template-columns: 1fr;
    gap: 7px;
  }
  .bulk-fields .field {
    padding: 7px;
  }
  #bulkNote {
    min-height: 86px;
  }
  .quality-help-grid {
    grid-template-columns: 1fr;
  }
  .quality-suggestion {
    min-height: auto;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
  }
  .bulk-generating-view,
  .loading-hero {
    grid-template-columns: 1fr;
  }
  .generation-status-grid {
    grid-template-columns: 1fr;
  }
  .generation-status-chip:first-child {
    grid-column: auto;
  }
  .welcome-grid {
    grid-template-columns: 1fr;
  }
  .welcome-content {
    padding: 20px 18px 4px;
  }
}
@media (max-width: 520px) {
  .nav-pill,
  .cart-link {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }
  .cart-mini-item {
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
  }
  .image-toolbar {
    max-width: 100%;
    overflow-x: hidden;
    flex-wrap: wrap;
    padding-bottom: 4px;
  }
  .tool-button {
    flex: 0 0 auto;
  }
  .preview {
    padding: 6px;
  }
  .source-previews {
    grid-template-columns: 1fr;
  }
  .source-previews .source-preview img {
    height: auto;
    max-height: 190px;
  }
  .floating-actions {
    right: 10px;
  }
  .floating-actions button {
    padding-left: 8px;
    padding-right: 8px;
  }
}

/* Visual layout selector */
.layout-picker {
  grid-column: 1 / -1;
  display: block;
}

.layout-picker > img,
#layoutPresetSelect {
  display: none;
}

.layout-card-grid {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-top: 12px;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 2px 10px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.layout-count-label {
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 5px 8px;
  border-radius: 999px;
  background: rgba(47,126,189,.10);
  color: var(--brand-navy);
  font-size: 11px;
  font-weight: 900;
}

.style-count-label {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(47,126,189,.08);
  color: var(--brand-navy);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .02em;
}

.layout-option-card {
  position: relative;
  flex: 0 0 168px;
  width: 168px;
  min-width: 0;
  min-height: 248px;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f4f9fe);
  color: #ffffff;
  text-align: left;
  box-shadow: 0 12px 28px rgba(23, 58, 96, .08);
  scroll-snap-align: start;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.layout-option-card img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  object-fit: contain;
  padding: 0;
  box-sizing: border-box;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.layout-option-card span {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: block;
  z-index: 1;
  padding: 20px 10px 10px;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0), rgba(15, 23, 42, .88));
}

.layout-option-card strong,
.layout-option-card small {
  display: block;
}
.layout-option-card strong {
  font-size: 14px;
  line-height: 1.2;
}
.layout-option-card small {
  margin-top: 3px;
  color: rgba(255, 255, 255, .84);
  font-size: 11px;
  line-height: 1.25;
}
.layout-option-card:hover,
.layout-option-card.is-selected {
  border-color: rgba(34, 197, 94, .38);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16), 0 14px 30px rgba(23, 58, 96, .12);
}
.layout-option-card::after,
.style-option-card::after {
  content: "\2713";
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(34, 197, 94, .96);
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(22, 163, 74, .30);
  opacity: 0;
  transform: scale(.82);
  transition: opacity .16s ease, transform .16s ease;
  pointer-events: none;
}
.layout-option-card.is-selected::after,
.style-option-card.is-selected::after {
  opacity: 1;
  transform: scale(1);
}

.artwork-style-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .94), rgba(239, 248, 251, .88));
}
.artwork-style-picker.is-hidden {
  display: none;
}
.style-grid-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.style-grid-header label {
  display: block;
  color: #173a60;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.style-grid-header strong {
  display: block;
  margin-top: 2px;
  color: var(--brand-ink);
  font-size: 15px;
  min-width: 0;
}
.wizard-style-grid {
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
}
.style-modal-dialog {
  width: min(880px, 100%);
}
.style-option-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.style-option-card {
  position: relative;
  width: 100%;
  display: grid;
  gap: 9px;
  padding: 10px;
  border: 2px solid transparent;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff, #f4f9fe);
  color: #173a60;
  text-align: left;
  box-shadow: 0 12px 28px rgba(23, 58, 96, .08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.style-option-card img {
  width: 100%;
  aspect-ratio: 5 / 7;
  object-fit: contain;
  padding: 8px;
  box-sizing: border-box;
  border-radius: 12px;
  border: 1px solid rgba(23, 58, 96, .10);
  background: #eef4f8;
}
.style-option-card span {
  min-width: 0;
  font-size: 13px;
  font-weight: 900;
}
.style-option-card:hover,
.style-option-card.is-selected {
  border-color: rgba(34, 197, 94, .38);
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .16), 0 14px 30px rgba(23, 58, 96, .12);
}
.selection-modal {
  width: min(980px, calc(100vw - 24px));
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--brand-ink);
}
.selection-modal::backdrop {
  background: rgba(15, 23, 42, .56);
  backdrop-filter: blur(3px);
}
.selection-modal-shell {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid rgba(47, 126, 189, .16);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .99), rgba(245, 250, 255, .96));
  box-shadow: 0 30px 70px rgba(15, 23, 42, .28);
}
.selection-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.selection-modal-header small {
  display: block;
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .05em;
  text-transform: uppercase;
}
.selection-modal-header h2 {
  margin: 4px 0 0;
  color: #173a60;
  font-size: 18px;
  line-height: 1.1;
}
.selection-modal-close {
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0;
  border: 1px solid rgba(203, 213, 225, .95);
  border-radius: 999px;
  background: #ffffff;
  color: #173a60;
  box-shadow: 0 10px 24px rgba(23, 58, 96, .08);
}
.selection-modal-close .tool-icon {
  width: 18px;
  height: 18px;
}
.selection-modal-body {
  max-height: min(72vh, 760px);
  overflow: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.selection-modal-grid {
  display: grid;
  gap: 12px;
}
.selection-modal .layout-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(156px, 1fr));
}
.selection-modal .layout-option-card,
.selection-modal .style-option-card {
  width: 100%;
  min-width: 0;
  flex: 1 1 auto;
}

.layout-picker-actions {
  display: grid;
  width: 100%;
  margin-top: 10px;
}

.layout-picker .layout-help-button {
  width: 100%;
  justify-content: center;
}

@media (max-width: 1100px) {
  .layout-card-grid {
    display: flex;
  }
}

@media (max-width: 900px) {
  .layout-card-grid {
    display: flex;
  }
}

@media (max-width: 520px) {
  .layout-card-grid {
    display: flex;
    height: 194px;
  }
  .frame-preview-card {
    flex-basis: 64px;
    width: 64px;
    min-width: 64px;
    height: 90px;
  }
  .layout-option-card {
    flex-basis: 154px;
    width: 154px;
    min-height: 0;
  }
  .selection-modal .layout-option-card {
    width: 100%;
    flex: 1 1 auto;
    min-height: 170px;
  }
  .layout-option-card img {
    width: 100%;
    height: auto;
  }
  .selection-modal .layout-option-card img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
  .artwork-style-picker {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .artwork-style-picker .artwork-style-preview {
    width: 52px;
    height: 52px;
  }
  .artwork-style-picker .secondary-button {
    grid-column: 1 / -1;
    width: 100%;
  }
  .style-option-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 901px) {
  .wizard-step-panel .wizard-upload-panel .source-previews {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    align-items: stretch;
  }
}

/* Font refresh only */
:root,
body,
button,
input,
select,
textarea {
  font-family: "Inter", Arial, Helvetica, sans-serif;
}

h1,
h2,
h3,
.panel-title h1,
.wizard-step-copy h2,
.wizard-shell-header strong {
  font-family: "Sora", "Inter", Arial, Helvetica, sans-serif;
  letter-spacing: 0;
}

/* Keep wizard choices within the panel at every viewport width. */
.studio-wizard,
.wizard-step-panels,
.wizard-layout-mount,
.wizard-style-mount,
.wizard-details-mount {
  min-width: 0;
  width: 100%;
  box-sizing: border-box;
  height: auto;
  max-height: none;
  align-content: start;
  grid-auto-rows: max-content;
  overflow: visible;
}
.wizard-layout-mount .wizard-layout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr));
  grid-auto-rows: max-content;
  align-items: start;
  width: 100%;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  overflow: visible;
  padding: 4px;
}
.wizard-layout-grid .layout-option-card {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  height: auto;
  aspect-ratio: 3 / 4;
  box-sizing: border-box;
  background: #0b1730;
}
.wizard-layout-grid .layout-option-card img {
  width: 100%;
  height: 100%;
  background: #0b1730;
}
.wizard-layout-grid .layout-option-card span {
  padding: 30px 12px 12px;
  background: linear-gradient(180deg, rgba(7, 17, 38, 0), rgba(7, 17, 38, .96) 82%);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
.wizard-step-panel {
  width: 100%;
  height: auto;
  max-height: none;
  box-sizing: border-box;
  align-content: start;
  grid-auto-rows: max-content;
  overflow: visible;
}
.wizard-step-panel .wizard-details-panel {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.mobile-nav-menu summary > svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.cards-collection-switch {
  display: flex;
  width: fit-content;
  gap: 3px;
  margin: 8px 14px 10px;
  padding: 3px;
  border: 1px solid #cbddea;
  border-radius: 999px;
  background: #edf5fb;
}
.cards-panel { grid-template-rows: auto auto minmax(0, 1fr); }
.cards-collection-switch button {
  min-width: 76px;
  padding: 7px 13px;
  border-radius: 999px;
  background: transparent;
  color: #4d6476;
  box-shadow: none;
  font-size: 12px;
}
.cards-collection-switch button[aria-pressed="true"] {
  background: #2f7ebd;
  color: white;
  box-shadow: 0 2px 5px rgba(23,58,96,.2);
}
.reorder-card-button {
  padding: 8px 10px;
  border-radius: 10px;
  background: #7442d6;
  font-size: 12px;
}
.detail-counter {
  display: block;
  color: #756b86;
  text-align: right;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.detail-counter.is-over-limit { color: #b42318; }
#cardDetailsPanel.is-open {
  max-height: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}
#cardDetailsPanel .wizard-card-compose { padding: 14px; }
#cardDetailsPanel .field { min-width: 0; padding: 0; border: 0; background: transparent; }
#cardDetailsPanel input:not([type="checkbox"]),
#cardDetailsPanel textarea,
#cardDetailsPanel select { width: 100%; min-width: 0; box-sizing: border-box; }
#hit_points, #wizardHp { text-align: center; }
.wizard-card-compose {
  min-width: 0;
  padding: clamp(14px, 2vw, 24px);
  border: 2px solid #ddd4fc;
  border-radius: 24px;
  background: linear-gradient(145deg, #faf8ff, #f0edff);
}
.wizard-compose-heading {
  margin-bottom: 18px;
}
.wizard-compose-label {
  color: #5935b5;
  font-size: 17px;
  font-weight: 800;
}
.wizard-compose-heading p {
  margin: 6px 0 0;
  color: #625b79;
  font-size: 13px;
  line-height: 1.5;
}
.wizard-card-header-fields {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 12px;
}
.wizard-card-header-fields > .field:nth-child(1) { grid-column: 1; grid-row: 2; }
.wizard-card-header-fields > .field:nth-child(2) { grid-column: 1 / -1; grid-row: 1; }
.wizard-card-header-fields > .field:nth-child(3) { grid-column: 2; grid-row: 2; }
#cardDetailsPanel .wizard-card-header-fields > .field:first-child input,
.wizard-details-panel .wizard-card-header-fields > .field:first-child input {
  width: 64px;
  max-width: 64px;
  min-width: 64px;
  text-align: center;
}
.power-selector-field { position: relative; }
.power-desktop-picker { position: relative; }
.power-picker-button,
.power-mobile-picker {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  border: 1px solid rgba(47, 126, 189, .24);
  border-radius: 10px;
  background: #fff;
  color: #173a60;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.power-picker-current { display: inline-flex; align-items: center; gap: 8px; min-width: 0; }
.power-picker-current img { width: 28px; height: 28px; object-fit: contain; }
.power-auto-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; border-radius: 50%; background: #eef7ff; color: #2f7ebd; font-size: 18px; line-height: 1; }
.power-none-icon { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 28px; border-radius: 50%; background: #f1f5f9; color: #64748b; font-size: 22px; line-height: 1; }
.power-picker-menu {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 300px;
  overflow: auto;
  overflow-x: hidden;
  padding: 6px;
  border: 1px solid rgba(47, 126, 189, .2);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 14px 30px rgba(23, 58, 96, .18);
}
.power-picker-menu.is-open { display: grid; gap: 3px; }
.power-option {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #173a60;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-width: 0;
  overflow: hidden;
}
.power-option:hover, .power-option.is-selected { background: rgba(47, 126, 189, .1); }
.power-option img { width: 34px; height: 34px; object-fit: contain; flex: 0 0 34px; }
.power-option small { display: block; color: #625b79; font-size: 11px; white-space: normal; overflow-wrap: anywhere; }
.power-mobile-picker { display: flex; font-size: 14px; }
.power-mobile-picker img { width: 28px; height: 28px; flex: 0 0 28px; object-fit: contain; }
.power-mobile-picker .power-auto-icon { flex: 0 0 28px; }
.power-modal-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.power-modal-options .power-option { min-height: 74px; padding: 10px 12px; border: 1px solid rgba(47, 126, 189, .16); background: #f8fbff; }
.power-modal-options .power-option:hover, .power-modal-options .power-option.is-selected { border-color: rgba(47, 126, 189, .55); background: #eef7ff; }
.power-modal-options .power-option img { width: 48px; height: 48px; flex-basis: 48px; }
#powerPickerModal { background: rgba(16, 24, 40, .68) !important; }
.power-picker-modal-card { width: min(620px, 100%); max-height: min(720px, calc(100vh - 48px)); background: #fff !important; padding: 24px; }
.power-modal-close {
  box-sizing: border-box;
  padding: 0;
  line-height: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #d6dde7;
  border-radius: 999px;
  background: #f8fafc;
  color: #173a60;
  cursor: pointer;
}
.power-modal-close svg { display: block; width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
@media (max-width: 900px) {
  .wizard-card-header-fields { grid-template-columns: max-content minmax(0, 1fr); }
  .power-modal-options { grid-template-columns: 1fr 1fr; }
}
.card-story-field {
  margin-top: 2px;
  padding-top: 16px !important;
  border-top: 1px solid rgba(116, 66, 214, .18) !important;
}
.card-story-field .hint {
  line-height: 1.5;
}
.wizard-card-ability-fields,
.wizard-creative-direction {
  display: grid;
  gap: 16px;
  min-width: 0;
}
.wizard-details-panel .field {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.wizard-details-panel input:not([type="checkbox"]),
.wizard-details-panel textarea,
.wizard-details-panel select {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.wizard-details-panel textarea {
  min-height: 100px;
}
#wizardNote {
  min-height: 160px;
}

/* A lighter, more playful studio palette and clear action hierarchy. */
body {
  background: radial-gradient(ellipse at 10% 0%, #ede7ff, transparent 48%),
    radial-gradient(ellipse at 95% 85%, #e0f7f3, transparent 40%), #f8f7fc;
}
.editor-nav {
  border-bottom-color: #e8e2f3;
  box-shadow: 0 2px 12px rgba(44, 24, 85, .04);
}
.field label {
  color: #35294e;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.field {
  box-shadow: none;
}
input:focus,
select:focus,
textarea:focus {
  border-color: #8556e8;
  box-shadow: 0 0 0 3px rgba(133, 86, 232, .14);
}
.secondary-button,
.outline-button {
  background: #fff;
  color: #59418b;
  border: 1px solid #dfd5ef;
  border-radius: 14px;
  box-shadow: 0 3px 0 #ece6f5;
  font-weight: 700;
}
.secondary-button:hover:not(:disabled),
.outline-button:hover:not(:disabled) {
  background: #f4efff;
  border-color: #b8a0e4;
}
#submitButton,
.wizard-step-actions button:last-child:not([id$="Back"]) {
  color: #fff;
  background: linear-gradient(135deg, #2f7ebd, #185787);
  border: 1px solid #185787;
  box-shadow: 0 4px 0 #123f63;
  border-radius: 14px;
  min-height: 44px;
  padding-inline: 24px;
}
#submitButton:hover:not(:disabled),
.wizard-step-actions button:last-child:hover:not(:disabled) {
  background: linear-gradient(135deg, #3f91ca, #216895);
  transform: translateY(-1px);
}
.secondary-button:active:not(:disabled),
.wizard-step-actions button:active:not(:disabled) {
  transform: translateY(2px);
  box-shadow: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #9c79e4;
  outline-offset: 3px;
}
.wizard-step-actions button:disabled {
  opacity: .45;
  cursor: not-allowed;
  box-shadow: none;
}
.wizard-shell-header,
.wizard-step-panel {
  background: #fff;
  border-color: #e8e0f2;
  box-shadow: 0 6px 22px rgba(53, 31, 86, .04);
  border-radius: 22px;
}
.wizard-summary-step.is-active {
  border-color: #8e68df;
  background: #f3edff;
}
.wizard-summary-step.is-active .wizard-step-index {
  color: #fff;
  background: #7442d6;
}
.layout-option-card.is-selected,
.style-option-card.is-selected {
  border-color: #8556e8;
  box-shadow: 0 0 0 3px rgba(133, 86, 232, .14);
}
.mobile-editor-actions .mobile-editor-action {
  background: #f4f0fb;
  color: #59418b;
  box-shadow: none;
}
.regenerate-choice-groups { display:grid; gap:18px; }
.regenerate-intent { display:grid; gap:10px; }
.regenerate-toggle { display:grid; grid-template-columns:1fr 1fr; gap:4px; padding:4px; border:1px solid #cbddea; border-radius:14px; background:#edf5fb; }
.regenerate-toggle-option { min-height:42px; padding:9px 12px; border:0; border-radius:10px; background:transparent; color:#496277; box-shadow:none; font-size:13px; font-weight:800; }
.regenerate-toggle-option.is-selected { background:#2f7ebd; color:#fff; box-shadow:0 2px 5px rgba(23,58,96,.2); }
.regenerate-toggle-option:hover:not(.is-selected) { background:#fff; color:#173a60; }
.regenerate-intent-button { display:grid; gap:3px; padding:16px; border:1px solid #d5e1ec; border-radius:15px; background:#fff; color:#173a60; text-align:left; box-shadow:0 2px 0 rgba(23,58,96,.04); }
.regenerate-intent-button:hover { border-color:#2f7ebd; background:#eef7fc; transform:translateY(-1px); }
.regenerate-intent-button b { font-size:15px; }
.regenerate-intent-button small { color:#64748b; font-size:12px; }
.regenerate-choice-group { display:grid; gap:8px; padding:16px; border:1px solid #dce8f2; border-radius:18px; background:#f8fbfd; }
.regenerate-choice-existing { background:#fbf9ff; border-color:#e4daf6; }
.regenerate-choice-heading { display:grid; gap:3px; margin-bottom:5px; }
.regenerate-choice-kicker { color:#2f7ebd; font-size:11px; font-weight:900; letter-spacing:.08em; text-transform:uppercase; }
.regenerate-choice-heading strong { color:#173a60; font-size:16px; }
.regenerate-choice-heading small, .regenerate-choice small { color:#64748b; font-size:12px; line-height:1.4; }
.regenerate-choice { display:flex; align-items:center; gap:12px; width:100%; padding:12px 14px; border:1px solid #d5e1ec; border-radius:13px; background:#fff; color:#173a60; text-align:left; box-shadow:0 2px 0 rgba(23,58,96,.04); }
.regenerate-choice:hover { border-color:#2f7ebd; background:#eef7fc; transform:translateY(-1px); }
.regenerate-choice.is-selected { border-color:#185787; background:#dff0fa; box-shadow:0 0 0 3px rgba(47,126,189,.16); }
.regenerate-choice-icon { display:grid; place-items:center; width:32px; height:32px; border-radius:10px; background:#2f7ebd; color:#fff; font-size:20px; flex:0 0 auto; }
.regenerate-choice span:last-child { display:grid; gap:2px; }
.regenerate-choice b { font-size:14px; }
.regenerate-cancel-row { justify-content:flex-end; }
.wizard-card-ability-fields input,
.wizard-card-ability-fields textarea,
#cardDetailsPanel .wizard-card-ability-fields input,
#cardDetailsPanel .wizard-card-ability-fields textarea { font-size:calc(1em - 1px); letter-spacing:.035em; }

@media (min-width: 901px) {
  .layout-picker,
  .layout-style-picker,
  #cardDetailsToggle { display: none !important; }
  .preview-context-menu { display: none !important; }
  .studio-panel > #cardDetailsPanel {
    display: grid !important;
    max-height: none !important;
    opacity: 1 !important;
    transform: none !important;
    overflow: visible;
    margin: 14px 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }
  .studio-panel > #cardDetailsPanel .wizard-card-compose,
  .studio-panel > #cardDetailsPanel .wizard-creative-direction { min-width: 0; }
  .studio-panel > #cardDetailsPanel .wizard-card-compose { padding: 16px; }
}

@media (max-width: 900px) {
  .wizard-layout-mount .wizard-layout-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .wizard-step-panel .wizard-details-panel {
    grid-template-columns: minmax(0, 1fr);
  }
  .wizard-step-actions-top {
    position: static;
    margin-top: 16px;
    justify-content: flex-end;
  }
}
@media (prefers-reduced-motion: reduce) {
  .secondary-button,
  .wizard-step-actions button {
    transition: none;
  }
}
