:root {
  --studio-accent: #aa1c41;
  --studio-surface: #fff9f6;
  --studio-card: #ffffff;
  --studio-ink: #2e2528;
  --studio-muted: #776d70;
  --studio-border: #eadfe0;
  --studio-shadow: 0 16px 42px rgba(83, 36, 50, .10);
  --studio-radius: 18px;
}

body.shop-studio-page,
body.shop-public-page,
body.shop-directory-page {
  background: var(--studio-surface);
  color: var(--studio-ink);
  font-family: "Noto Sans KR", system-ui, sans-serif;
}

.shop-studio-nav {
  background: rgba(255, 255, 255, .88);
  border-bottom: 1px solid rgba(170, 28, 65, .10);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.shop-studio-wrap {
  max-width: 1380px;
  margin: 0 auto;
  padding: 28px 18px 64px;
}

.studio-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.studio-kicker,
.preview-eyebrow {
  color: var(--studio-accent);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.studio-intro h1 {
  margin: 4px 0 8px;
  font-size: clamp(1.65rem, 4vw, 2.5rem);
  font-weight: 900;
  letter-spacing: -.055em;
}

.studio-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--studio-muted);
}

.studio-grid {
  display: grid;
  grid-template-columns: minmax(280px, .78fr) minmax(360px, 1.22fr);
  gap: 22px;
  align-items: start;
}

.studio-panel,
.shop-preview-shell {
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius);
  background: var(--studio-card);
  box-shadow: var(--studio-shadow);
}

.studio-panel {
  padding: 20px;
}

.studio-panel + .studio-panel {
  margin-top: 14px;
}

.studio-panel h2 {
  margin: 0 0 5px;
  font-size: 1.02rem;
  font-weight: 850;
}

.studio-panel .panel-help {
  margin: 0 0 16px;
  color: var(--studio-muted);
  font-size: .84rem;
  line-height: 1.55;
}

.studio-label {
  display: block;
  margin: 0 0 6px;
  color: #594d50;
  font-size: .82rem;
  font-weight: 800;
}

.studio-input,
.studio-textarea {
  width: 100%;
  border: 1px solid var(--studio-border);
  border-radius: 12px;
  background: #fffdfc;
  color: var(--studio-ink);
  padding: 11px 12px;
  outline: 0;
  transition: border-color .2s, box-shadow .2s;
}

.studio-input:focus,
.studio-textarea:focus {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 3px rgba(170, 28, 65, .12);
}

.studio-textarea {
  min-height: 94px;
  resize: vertical;
}

.studio-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.studio-theme-grid,
.studio-item-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.studio-theme-card,
.studio-item-card {
  position: relative;
  border: 1px solid var(--studio-border);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.studio-theme-card:hover,
.studio-item-card:hover {
  transform: translateY(-2px);
}

.studio-theme-card.active,
.studio-item-card.active {
  border-color: var(--studio-accent);
  box-shadow: 0 0 0 3px rgba(170, 28, 65, .12);
}

.studio-theme-swatch {
  height: 66px;
  border-radius: 13px 13px 0 0;
  background: var(--swatch-surface, #fff9f6);
  position: relative;
  overflow: hidden;
}

.studio-theme-swatch::after {
  content: "";
  position: absolute;
  left: 16%;
  right: 16%;
  bottom: 12px;
  height: 12px;
  border-radius: 99px;
  background: var(--swatch-accent, #aa1c41);
}

.studio-theme-card strong,
.studio-item-card strong {
  display: block;
  padding: 9px 10px 10px;
  font-size: .8rem;
}

.studio-item-card {
  min-height: 88px;
  padding: 12px;
}

.studio-item-card .item-glyph {
  display: block;
  color: var(--studio-accent);
  font-size: 1.35rem;
  line-height: 1;
  margin-bottom: 8px;
}

.studio-product-list {
  max-height: 286px;
  overflow: auto;
  border-top: 1px solid var(--studio-border);
  border-bottom: 1px solid var(--studio-border);
}

.studio-product-composer {
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid rgba(170, 28, 65, .16);
  border-radius: 20px;
  background: #fffaf8;
  box-shadow: 0 8px 24px -10px rgba(55, 28, 20, .22);
}

.studio-approval-banner {
  display: inline-flex;
  max-width: 760px;
  margin-top: 10px;
  padding: 8px 12px;
  border: 1px solid rgba(170, 28, 65, .16);
  border-radius: 9999px;
  color: #7b4b41;
  background: rgba(255, 250, 248, .9);
  font-size: .82rem;
}

.studio-approval-banner[data-status="pending"] {
  border-color: rgba(176, 119, 20, .22);
  color: #805c12;
  background: #fff8e7;
}

.studio-approval-banner[data-status="approved"] {
  border-color: rgba(26, 122, 74, .22);
  color: #17613b;
  background: #effbf3;
}

.studio-approval-banner[data-status="rejected"] {
  border-color: rgba(170, 28, 65, .24);
  color: #8b2344;
  background: #fff0f3;
}

.studio-composer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.studio-composer-header strong,
.studio-composer-header span {
  display: block;
}

.studio-composer-header strong {
  color: #341e1a;
  font-size: 1.05rem;
}

.studio-composer-header span {
  margin-top: 4px;
  color: #856c66;
  font-size: .83rem;
}

.studio-icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9999px;
  color: #856c66;
  background: #f1e6e1;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.studio-category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.studio-category-grid label,
.studio-form-checks label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #5e4842;
  font-size: .88rem;
}

.studio-category-grid input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.studio-category-grid span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid #eadbd5;
  border-radius: 9999px;
  background: #fff;
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease;
}

.studio-category-grid input:checked + span {
  border-color: #aa1c41;
  color: #fff;
  background: #aa1c41;
  box-shadow: 0 6px 16px -8px rgba(170, 28, 65, .8);
}

.studio-category-grid span:active,
.studio-btn:active,
.studio-icon-button:active {
  transform: scale(.97);
}

.studio-form-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.studio-form-checks input {
  accent-color: #aa1c41;
}

.studio-upload-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.studio-upload-thumb {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 5px 14px -10px rgba(55, 28, 20, .65);
}

.studio-upload-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
}

.studio-upload-thumb span {
  display: block;
  overflow: hidden;
  padding: 5px 6px;
  color: #856c66;
  font-size: .68rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-upload-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(46, 37, 40, .78);
  color: #fff;
  font-size: .85rem;
  line-height: 1;
}

.studio-upload-remove:hover,
.studio-upload-remove:focus-visible {
  background: var(--studio-accent);
}

@media (max-width: 560px) {
  .studio-product-composer {
    padding: 14px;
    border-radius: 16px;
  }

  .studio-upload-preview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.studio-product-row {
  display: grid;
  grid-template-columns: auto 48px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px 4px;
  border-bottom: 1px solid #f1e9e9;
}

.studio-product-row:last-child { border-bottom: 0; }

.studio-product-row img {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  object-fit: cover;
  background: #f1eceb;
}

.studio-product-row .product-name {
  font-size: .86rem;
  font-weight: 800;
}

.studio-product-row .product-meta {
  margin-top: 2px;
  color: var(--studio-muted);
  font-size: .74rem;
}

.studio-product-slot {
  border: 1px dashed #d8c8cc;
  border-radius: 12px;
  padding: 8px 10px;
  background: #fffaf9;
}

.studio-product-slot select {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--studio-accent);
  font-size: .75rem;
  font-weight: 800;
}

.studio-product-edit {
  white-space: nowrap;
}

.studio-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.studio-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 16px;
  font-size: .84rem;
  font-weight: 800;
  transition: transform .15s ease, filter .15s ease;
}

.studio-btn:active { transform: scale(.97); }
.studio-btn-primary { background: var(--studio-accent); color: #fff; }
.studio-btn-secondary { border-color: var(--studio-border); background: #fff; color: var(--studio-ink); }
.studio-btn-primary:hover { filter: brightness(.95); color: #fff; }
.studio-btn-secondary:hover { border-color: var(--studio-accent); color: var(--studio-accent); }

.shop-preview-shell {
  position: sticky;
  top: 84px;
  overflow: hidden;
}

.shop-preview-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--studio-border);
  background: #fff;
}

.shop-preview-toolbar small { color: var(--studio-muted); }

.shop-preview {
  min-height: 600px;
  padding: 28px;
  background: var(--preview-surface, #fff9f6);
}

.shop-preview-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 18px;
  align-items: end;
  margin-bottom: 20px;
}

.shop-preview-hero h2 {
  margin: 7px 0 7px;
  color: var(--preview-accent, #aa1c41);
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.02;
  letter-spacing: -.07em;
}

.shop-preview-hero p {
  max-width: 42ch;
  margin: 0;
  color: #715f64;
  line-height: 1.6;
}

.preview-art {
  min-height: 142px;
  border-radius: calc(var(--preview-radius, 18px) + 4px);
  background:
    linear-gradient(140deg, color-mix(in srgb, var(--preview-accent, #aa1c41) 18%, transparent), transparent 64%),
    #f0ddd9;
  overflow: hidden;
  position: relative;
}

.preview-art::before,
.preview-art::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .55);
}
.preview-art::before { width: 130px; height: 130px; right: -22px; top: -36px; }
.preview-art::after { width: 72px; height: 72px; left: 28px; bottom: -26px; }

.preview-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0 20px;
}

.preview-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--preview-accent, #aa1c41);
  color: #fff;
  font-size: .73rem;
  font-weight: 800;
}

.preview-section {
  margin-top: 17px;
}

.preview-section-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 9px;
}

.preview-section-title strong { font-size: .92rem; }
.preview-section-title span { color: #8a7c7f; font-size: .73rem; }

.preview-shelf {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.preview-product {
  min-width: 0;
  border-radius: var(--preview-radius, 18px);
  border: 1px solid rgba(125, 82, 89, .12);
  background: var(--preview-card, #fff);
  padding: 10px;
}

.preview-product img,
.preview-product .preview-image-placeholder {
  width: 100%;
  aspect-ratio: 1 / .78;
  border-radius: calc(var(--preview-radius, 18px) - 5px);
  object-fit: cover;
  background: #f1e7e3;
}

.preview-product .preview-image-placeholder {
  display: grid;
  place-items: center;
  color: #ad9196;
  font-size: 1.4rem;
}

.preview-product strong {
  display: block;
  overflow: hidden;
  margin-top: 8px;
  font-size: .8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-product small { color: #8a7c7f; }

.preview-policy {
  border-left: 3px solid var(--preview-accent, #aa1c41);
  padding: 12px 14px;
  background: rgba(255, 255, 255, .56);
  color: #66565a;
  font-size: .8rem;
  line-height: 1.6;
}

.shop-public-page .shop-public-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 30px 16px 64px;
}

.shop-directory-page .shop-studio-wrap {
  max-width: 1180px;
}

.shop-directory-intro {
  align-items: center;
}

.shop-directory-intro h1 {
  margin: 0 0 10px;
  color: var(--studio-ink);
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 900;
  letter-spacing: -.04em;
}

.shop-directory-intro p {
  max-width: 680px;
  margin: 0;
  color: var(--studio-muted);
  line-height: 1.7;
}

.shop-directory-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 24px;
}

.shop-directory-search {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  max-width: 560px;
  padding: 0 15px;
  border: 1px solid var(--studio-border);
  border-radius: 999px;
  background: #fff;
  color: var(--studio-muted);
}

.shop-directory-search input {
  width: 100%;
  min-height: 46px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--studio-ink);
}

.shop-directory-view-toggle {
  display: inline-flex;
  gap: 5px;
  padding: 4px;
  border: 1px solid var(--studio-border);
  border-radius: 999px;
  background: #fff;
}

.shop-directory-view-button {
  border: 0;
  border-radius: 999px;
  padding: 9px 13px;
  background: transparent;
  color: var(--studio-muted);
  font-size: .78rem;
  font-weight: 800;
}

.shop-directory-view-button.active {
  background: var(--studio-accent);
  color: #fff;
}

.shop-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 248px));
  gap: 16px;
  justify-content: start;
  margin-top: 22px;
}

.shop-directory-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius);
  background: var(--studio-card);
  box-shadow: var(--studio-shadow);
  color: inherit;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.shop-directory-card:hover,
.shop-directory-card:focus-visible {
  border-color: rgba(170, 28, 65, .38);
  box-shadow: 0 20px 44px rgba(83, 36, 50, .16);
  color: inherit;
  transform: translateY(-3px);
}

.shop-directory-card-cover {
  display: grid;
  aspect-ratio: 4 / 3;
  min-height: 0;
  place-items: center;
  background: linear-gradient(135deg, #fff0e8, #f8d8df);
  color: var(--studio-accent);
  font-size: 2rem;
  font-weight: 900;
}

.shop-directory-card-cover img {
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.shop-directory-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 16px;
}

.shop-directory-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.shop-directory-card-title {
  margin: 0;
  color: var(--studio-ink);
  font-size: 1.02rem;
  font-weight: 800;
}

.shop-directory-card-badge {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff0f3;
  color: var(--studio-accent);
  font-size: .7rem;
  font-weight: 800;
  padding: 4px 8px;
}

.shop-directory-card-meta {
  margin-top: 7px;
  color: var(--studio-muted);
  font-size: .76rem;
}

.shop-directory-card-description {
  display: -webkit-box;
  min-height: 42px;
  margin: 12px 0 18px;
  overflow: hidden;
  color: #66575b;
  font-size: .84rem;
  line-height: 1.6;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.shop-directory-card-link {
  margin-top: auto;
  color: var(--studio-accent);
  font-size: .82rem;
  font-weight: 800;
}

.shop-directory-status {
  margin-top: 10px;
}

.shop-directory-street {
  margin-top: 22px;
}

.shop-directory-street-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.shop-directory-street-heading h2 {
  margin: 4px 0 0;
  font-size: 1.25rem;
  font-weight: 900;
}

.shop-directory-street-heading p {
  max-width: 360px;
  margin: 0;
  color: var(--studio-muted);
  font-size: .8rem;
  line-height: 1.6;
  text-align: right;
}

.shop-street-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.shop-street-panel {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  aspect-ratio: 16 / 10;
  border: 1px solid var(--studio-border);
  border-radius: var(--studio-radius);
  background: #efe5d8 var(--street-background) center / cover no-repeat;
  box-shadow: var(--studio-shadow);
}

.shop-street-scene {
  position: absolute;
  inset: 0;
}

.shop-street-panel-label {
  position: absolute;
  z-index: 2;
  top: 12px;
  left: 12px;
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, .88);
  color: var(--studio-accent);
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .04em;
}

.shop-street-shop {
  position: absolute;
  top: var(--shop-top);
  left: var(--shop-left);
  display: flex;
  width: var(--shop-width);
  min-width: 0;
  align-items: center;
  flex-direction: column;
  color: inherit;
  text-decoration: none;
  transform: translateY(-50%);
}

.shop-street-shop-photo {
  display: grid;
  width: clamp(42px, 5vw, 68px);
  height: clamp(42px, 5vw, 68px);
  place-items: center;
  overflow: hidden;
  border: 4px solid rgba(255, 255, 255, .96);
  border-radius: 18px;
  background: #fff4e9;
  box-shadow: 0 8px 20px rgba(51, 32, 28, .20);
}

.shop-street-shop-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shop-street-shop-default {
  color: var(--studio-accent);
  font-size: clamp(1rem, 2vw, 1.5rem);
}

.shop-street-shop-name {
  display: block;
  width: 100%;
  margin-top: 5px;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, .94);
  border-radius: 8px;
  padding: 5px 7px;
  background: rgba(46, 37, 40, .86);
  color: #fff;
  font-size: clamp(.68rem, 1.15vw, .9rem);
  line-height: 1.2;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shop-street-shop-caption {
  margin-top: 3px;
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  text-shadow: 0 1px 5px rgba(0, 0, 0, .65);
}

.shop-cover-field {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--studio-border);
}

.shop-cover-preview {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
  border: 1px dashed #d9cbcc;
  border-radius: 14px;
  background: #fffaf7;
  color: var(--studio-muted);
  font-size: .78rem;
  text-align: center;
}

.shop-cover-preview img {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
}

.shop-cover-default {
  display: grid;
  gap: 6px;
  place-items: center;
  color: var(--studio-accent);
  font-size: 1.6rem;
}

.shop-cover-default span {
  color: var(--studio-muted);
  font-size: .78rem;
}

.shop-cover-actions {
  margin-top: 10px;
}

.shop-public-shell {
  border-radius: var(--preview-radius, 18px);
  background: var(--preview-surface, #fff9f6);
  padding: clamp(20px, 5vw, 48px);
  box-shadow: var(--studio-shadow);
}

.shop-public-shell .shop-preview-hero { margin-bottom: 28px; }

.studio-status {
  min-height: 22px;
  margin-top: 10px;
  color: var(--studio-muted);
  font-size: .82rem;
}

.studio-status.error { color: #a51d37; }
.studio-status.success { color: #1d6f49; }

.studio-empty {
  padding: 28px 16px;
  border: 1px dashed #d9cbcc;
  border-radius: 14px;
  color: var(--studio-muted);
  text-align: center;
  font-size: .84rem;
}

@media (max-width: 900px) {
  .studio-grid { grid-template-columns: 1fr; }
  .shop-preview-shell { position: static; }
}

@media (max-width: 560px) {
  .shop-studio-wrap { padding: 20px 12px 42px; }
  .studio-intro { display: block; }
  .studio-form-row,
  .shop-preview-hero { grid-template-columns: 1fr; }
  .studio-theme-grid,
  .studio-item-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-preview { padding: 18px; }

  .shop-directory-tools,
  .shop-directory-street-heading { align-items: stretch; flex-direction: column; }
  .shop-directory-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .shop-directory-search { max-width: none; }
  .shop-directory-view-toggle { justify-content: center; }
  .shop-directory-view-button { flex: 1; }
  .shop-directory-street-heading p { text-align: left; }
  .shop-street-grid { grid-template-columns: 1fr; }
  .shop-street-panel { min-height: 240px; }

  .studio-product-row {
    grid-template-columns: auto 48px minmax(0, 1fr);
  }

  .studio-product-edit,
  .studio-product-slot {
    grid-column: 3;
    justify-self: start;
  }
}

@media (prefers-reduced-motion: reduce) {
  .studio-theme-card,
  .studio-item-card,
  .studio-btn,
  .studio-input,
  .studio-textarea { transition: none; }
}
