/* aiminimi platform UI */
:root {
  --bg-start: #fdf2ff;
  --bg-end: #ede9fe;
  --card: rgba(255,255,255,0.92);
  --primary: #c084fc;
  --primary-dark: #9333ea;
  --primary-light: #f3e8ff;
  --accent: #f472b6;
  --text: #3b0764;
  --text-muted: #7e22ce99;
  --border: rgba(192,132,252,0.35);
  --shadow: 0 8px 32px rgba(147,51,234,0.12);
  --radius: 20px;
  --radius-sm: 14px;
  --font: 'Noto Sans KR', system-ui, sans-serif;
  --font-hand: 'Gaegu', cursive;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-h: 56px;
  --bottom-nav-h: calc(56px + var(--safe-bottom));
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; min-height: 100%; font-family: var(--font); color: var(--text);
  background: linear-gradient(160deg, var(--bg-start), var(--bg-end) 45%, #fce7f3);
  word-break: normal;
  overflow-wrap: break-word;
  line-height: 1.5;
}
html[lang="ko"] body {
  word-break: keep-all;
}
body { display: flex; justify-content: center; padding: 0; }
.hidden { display: none !important; }

.app-shell {
  width: 100%; min-height: 100dvh; height: 100dvh;
  background: linear-gradient(180deg, #faf5ff, #fdf4ff);
  display: flex; flex-direction: column;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.6);
  overflow: hidden;
  position: relative;
}

.app-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px 8px; position: sticky; top: 0; z-index: 10;
  background: rgba(250,245,255,0.95); backdrop-filter: blur(10px);
  min-height: var(--header-h);
}
.logo-wrap { display: flex; align-items: center; gap: 6px; cursor: pointer; flex-shrink: 0; z-index: 1; }
.logo { margin: 0; font-family: var(--font-hand); font-size: 1.6rem; font-weight: 700;
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.header-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  margin: 0; font-size: 1rem; font-weight: 700; color: var(--text);
  max-width: calc(100% - 168px); overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; pointer-events: none;
}
.logo-sparkle { display: inline-flex; align-items: center; color: var(--accent); flex-shrink: 0; }
.logo-sparkle .app-nav-svg { display: block; }
.header-btn--icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  padding: 0;
}
.header-btn--icon .app-nav-svg { color: var(--primary-dark); }
.header-btn { border: none; background: transparent; font-family: var(--font); font-size: 0.85rem;
  font-weight: 600; color: var(--primary-dark); cursor: pointer; min-height: 40px; padding: 0 8px; }
.header-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; z-index: 1; }
.header-credits {
  font-size: 0.75rem; font-weight: 700; color: var(--primary-dark);
  background: linear-gradient(135deg, #f3e8ff, #fce7f3);
  padding: 4px 8px; border-radius: 999px; white-space: nowrap;
}
.header-credits::after { content: none; }
.header-profile { border: none; background: none; padding: 0; cursor: pointer; display: inline-flex; align-items: center; }
.header-profile img,
.header-profile .avatar-placeholder--header {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--primary);
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), #fce7f3);
  color: var(--primary-dark);
  font-weight: 700;
  flex-shrink: 0;
  box-sizing: border-box;
}
.avatar-placeholder--header { font-size: 0.85rem; }
.avatar-inline,
.creator-row img.avatar-inline {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.creator-row .avatar-placeholder.avatar-inline {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 0.72rem;
  border: none;
}

.app-main {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 0 16px 12px;
}
.app-shell:has(.bottom-nav:not(.hidden)) .app-main {
  padding-bottom: calc(12px + var(--bottom-nav-h));
}

/* 얇은 스크롤바 */
.app-main,
.sample-carousel-thumbs {
  scrollbar-width: thin;
  scrollbar-color: rgba(192, 132, 252, 0.5) transparent;
}
.app-main::-webkit-scrollbar,
.sample-carousel-thumbs::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
.app-main::-webkit-scrollbar-track,
.sample-carousel-thumbs::-webkit-scrollbar-track {
  background: transparent;
  margin: 4px 0;
}
.app-main::-webkit-scrollbar-thumb,
.sample-carousel-thumbs::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.45), rgba(244, 114, 182, 0.45));
  border-radius: 999px;
}
.app-main::-webkit-scrollbar-thumb:hover,
.sample-carousel-thumbs::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(147, 51, 234, 0.65), rgba(219, 39, 119, 0.55));
}
.app-main::-webkit-scrollbar-corner,
.sample-carousel-thumbs::-webkit-scrollbar-corner {
  background: transparent;
}

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 12px; }

.page-title { margin: 8px 0 16px; font-size: 1.1rem; font-weight: 700; line-height: 1.45;
  overflow-wrap: break-word; word-break: normal; }
html[lang="ko"] .page-title { word-break: keep-all; }
.page-sub { margin: -8px 0 16px; font-size: 0.82rem; color: var(--text-muted); line-height: 1.55;
  overflow-wrap: break-word; word-break: normal; }
html[lang="ko"] .page-sub { word-break: keep-all; }

/* set grid — JS ResizeObserver가 --set-grid-cols 설정 (4구간: 2·3·4·5열) */
.set-grid {
  --set-grid-cols: 2;
  display: grid;
  grid-template-columns: repeat(var(--set-grid-cols), minmax(0, 1fr));
  gap: 12px;
}
.set-grid > .empty-state { grid-column: 1 / -1; }

.home-hero { margin-bottom: 4px; }
.home-sub { text-align: center; margin: 0 0 16px; }
.home-loading { grid-column: 1 / -1; text-align: center; color: var(--text-muted); font-size: 0.88rem; margin: 24px 0; }
.set-card { border: none; background: var(--card); border-radius: var(--radius-sm); overflow: hidden;
  min-width: 0; height: auto;
  cursor: pointer; text-align: left; padding: 0; box-shadow: var(--shadow); border: 1px solid var(--border); }
.set-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.set-card-body { padding: 10px 12px 12px; }
.set-card-title { margin: 0 0 4px; font-size: 0.88rem; font-weight: 700; line-height: 1.3;
  overflow-wrap: break-word; word-break: normal; }
html[lang="ko"] .set-card-title { word-break: keep-all; }
.set-card-meta { margin: 0; font-size: 0.72rem; color: var(--text-muted);
  overflow-wrap: break-word; word-break: normal; }
html[lang="ko"] .set-card-meta { word-break: keep-all; }

/* set detail — sample carousel */
.card--flush-top {
  padding: 14px 12px 10px;
  margin-bottom: 12px;
}
.set-form .card { margin-bottom: 12px; }
.set-form-submit { margin-top: 4px; margin-bottom: 8px; }
.form-group--samples { margin-bottom: 0; }
.form-group--samples > label {
  text-align: center;
  margin-bottom: 10px;
}

.sample-carousel-root { width: 100%; }
.sample-carousel--empty {
  min-height: 200px;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  display: flex;
  align-items: center;
  justify-content: center;  
}
.sample-carousel-empty { text-align: center; padding: 24px 16px; color: var(--text-muted); }
.sample-carousel-empty-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.sample-carousel-empty p { margin: 0; font-size: 0.88rem; font-weight: 600; color: var(--primary-dark); }
.sample-carousel-empty-sub { margin-top: 4px !important; font-size: 0.72rem !important; font-weight: 400 !important; color: var(--text-muted) !important; }

.sample-carousel-main {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #1a1028;
}
.sample-carousel-hero-btn {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}
.sample-carousel-hero {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.sample-carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary-dark);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 0 2px;
}
.sample-carousel-arrow--prev { left: 8px; }
.sample-carousel-arrow--next { right: 8px; }
.sample-carousel-badge {
  position: absolute;
  bottom: 10px;
  right: 10px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
}

.sample-carousel-thumbs {
  display: flex;
  gap: 8px;
  padding: 12px 4px 4px;
  overflow-x: auto;
  justify-content: center;
  scrollbar-width: thin;
  scrollbar-color: rgba(192, 132, 252, 0.5) transparent;
}
.sample-carousel-thumbs::-webkit-scrollbar { width: 4px; height: 4px; }
.sample-carousel-thumbs::-webkit-scrollbar-thumb {
  background: rgba(192, 132, 252, 0.45);
  border-radius: 999px;
}
.sample-carousel-thumb {
  position: relative;
  width: 54px;
  height: 54px;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
}
.sample-carousel-thumb.active {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-light);
}
.sample-carousel-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sample-carousel-thumb--add {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  background: var(--primary-light);
  color: var(--primary-dark);
}
.sample-carousel-add-icon { display: flex; align-items: center; justify-content: center; }
.sample-carousel-add-icon .app-nav-svg { width: 18px; height: 18px; }
.sample-carousel-thumb-del {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 0.85rem;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
}

/* 비공개 프롬프트 영역 */
.prompt-vault {
  background: linear-gradient(180deg, #e4e4e7 0%, #d4d4d8 100%);
  border: 1px solid #a1a1aa;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}
.prompt-vault-head { margin-bottom: 12px; }
.prompt-vault-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  color: #3f3f46;
  display: flex;
  align-items: center;
  gap: 6px;
}
.prompt-vault-desc {
  margin: 6px 0 0;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #71717a;
}
.prompt-vault-input,
.prompt-vault textarea {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1.5px dashed #9ca3af;
  border-radius: 10px;
  background: #f4f4f5;
  color: #27272a;
  font-family: var(--font);
  font-size: 0.88rem;
  resize: none;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}
.prompt-vault-input::placeholder,
.prompt-vault textarea::placeholder { color: #a1a1aa; }
.prompt-vault-input:focus,
.prompt-vault-input:focus-visible,
.prompt-vault textarea:focus,
.prompt-vault textarea:focus-visible {
  outline: none;
  border-color: #71717a;
  background: #fafafa;
  box-shadow: none;
}
.prompt-vault-input--locked,
.prompt-vault-input--locked:focus {
  background: #f4f4f5;
  color: #52525b;
  border-color: #e4e4e7;
  cursor: default;
}
.prompt-draft-input {
  width: 100%;
  min-height: 120px;
  padding: 12px;
  border: 1.5px solid #d4d4d8;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.88rem;
  line-height: 1.5;
  resize: vertical;
  background: #fff;
  box-sizing: border-box;
}
.prompt-draft-input:focus,
.prompt-draft-input:focus-visible {
  outline: none;
  border-color: #d4d4d8;
  box-shadow: none;
}
.prompt-draft-input--locked,
.prompt-draft-input--locked:focus,
.prompt-draft-input--locked:focus-visible {
  background: #f4f4f5;
  color: #52525b;
  border-color: #e4e4e7;
  cursor: default;
  outline: none;
  box-shadow: none;
}

.prompt-test-card { margin-top: 4px; }
.prompt-test-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.prompt-test-summary::-webkit-details-marker { display: none; }
.prompt-test-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.prompt-test-chevron {
  flex-shrink: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.prompt-test-card[open] .prompt-test-chevron { transform: rotate(180deg); }
.prompt-test-body { padding-top: 12px; }
.prompt-fixed-badge {
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 8px;
  background: #ecfdf5;
  color: #047857;
  font-size: 0.82rem;
  font-weight: 600;
  text-align: center;
}
.photo-frame--test { max-height: 220px; margin: 10px 0; }
.photo-frame--has-image {
  border-style: solid;
  background: #000;
}
.photo-frame--has-image .preview-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-replace-hint {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 8px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  text-align: center;
  color: #fff;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), transparent);
  pointer-events: none;
  z-index: 1;
}
.prompt-test-result { margin-top: 14px; }
.prompt-test-desc {
  margin: 10px 0 0;
  font-family: var(--font-hand);
  font-size: 1rem;
  text-align: center;
  color: var(--text-muted);
}
.meta-field--loading {
  opacity: 0.55;
  pointer-events: none;
}
.meta-field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.meta-field-head label { margin-bottom: 0; }
.meta-char-count {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.app-main:has(.create-wizard:not(.create-wizard--gate)) {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.app-main:has(.create-wizard:not(.create-wizard--gate)) > * {
  flex: 1 1 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* create wizard */
.create-wizard {
  display: flex;
  flex-direction: column;
  flex: 1 1 0;
  min-height: 0;
  margin: -4px -4px 0;
}
.create-wizard--gate { min-height: auto; flex: none; }
.wizard-head {
  flex-shrink: 0;
  margin-bottom: 12px;
  padding: 0 2px;
}
.wizard-step-current-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  line-height: 1.35;
}
.wizard-stepper {
  --wizard-step-count: 7;
  margin-bottom: 2px;
}
.wizard-stepper-track {
  display: grid;
  grid-template-columns: repeat(var(--wizard-step-count), minmax(0, 1fr));
  position: relative;
  align-items: start;
  gap: 0;
  padding: 0 2px;
}
.wizard-stepper-track::before {
  content: '';
  position: absolute;
  top: 9px;
  left: calc(100% / (var(--wizard-step-count) * 2));
  right: calc(100% / (var(--wizard-step-count) * 2));
  height: 1px;
  background: #ddd;
  z-index: 0;
}
.wizard-stepper-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 1;
  min-width: 0;
}
.wizard-stepper-node {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #ccc;
  background: #fff;
  box-sizing: border-box;
  flex-shrink: 0;
}
.wizard-stepper-item.is-done .wizard-stepper-node {
  border-color: var(--primary);
  background: var(--primary-light);
}
.wizard-stepper-item.is-active .wizard-stepper-node {
  width: 18px;
  height: 18px;
  margin-top: -3px;
  border: 2px solid var(--primary-dark);
  background: #fff;
  position: relative;
}
.wizard-stepper-item.is-active .wizard-stepper-node::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--primary-dark);
}
.wizard-stepper-short {
  font-size: 0.62rem;
  font-weight: 500;
  color: #888;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  padding: 0 1px;
}
.wizard-stepper-item.is-done .wizard-stepper-short {
  color: var(--text-muted);
}
.wizard-stepper-item.is-active .wizard-stepper-short {
  font-weight: 700;
  color: var(--primary-dark);
}
.wizard-elig-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.wizard-screen {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: rgba(192, 132, 252, 0.5) transparent;
}
.wizard-screen::-webkit-scrollbar { width: 4px; }
.wizard-screen::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(192, 132, 252, 0.45), rgba(244, 114, 182, 0.45));
  border-radius: 999px;
}
.wizard-section-title {
  margin: 0 0 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary-dark);
  flex-shrink: 0;
}
.wizard-footer {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
  padding: 12px 0 8px;
  background: #faf5ff;
  border-top: 1px solid var(--border);
  z-index: 2;
}
.wizard-footer-btn { flex: 1; margin-top: 0 !important; }
.wizard-result-actions { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.wizard-result-actions .btn { margin-top: 0; }

.prompt-live-preview {
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: #fafafa;
}
.prompt-live-preview-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.prompt-live-preview-summary::-webkit-details-marker { display: none; }
.prompt-live-preview-label {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
}
.prompt-live-preview-oneline {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  color: var(--primary-dark);
}
.prompt-live-preview[open] .prompt-live-preview-oneline { display: none; }
.prompt-live-preview-chevron {
  flex-shrink: 0;
  font-size: 0.65rem;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}
.prompt-live-preview[open] .prompt-live-preview-chevron { transform: rotate(180deg); }
.prompt-live-preview-full {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
  color: #3f3f46;
}

/* 테스트 프리셋 그리드 — JS ResizeObserver가 --preset-cols 설정 (4구간: 2·3·4·5열) */
.test-preset-grid {
  --preset-cols: 2;
  display: grid;
  grid-template-columns: repeat(var(--preset-cols), minmax(0, 1fr));
  gap: 10px;
  margin-top: 8px;
}
.test-preset-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0;
  background: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: center;
}
.test-preset-card.active { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(147,51,234,0.15); }
.test-preset-card img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  display: block;
}
.form-hint.warn { color: #b45309; }

.creator-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 0.82rem; color: var(--text-muted); }
.creator-row img { width: 28px; height: 28px; border-radius: 50%; }

.photo-frame { position: relative; aspect-ratio: 3/4; max-height: 280px; border-radius: var(--radius-sm);
  border: 2px dashed var(--border); background: var(--primary-light); overflow: hidden; cursor: pointer; }
.photo-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 20px; }
.preview-image { width: 100%; height: 100%; object-fit: cover; }

/* result tabs */
.result-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab-btn { flex: 1; min-height: 40px; border: 1.5px solid var(--border); background: #fff; border-radius: 10px;
  font-family: var(--font); font-size: 0.82rem; font-weight: 600; cursor: pointer; color: var(--text-muted); }
.tab-btn.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.result-hero { width: 100%; border-radius: var(--radius-sm); aspect-ratio: 3/4; object-fit: contain; background: #00000008; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px;
  padding: 0 16px; border: none; border-radius: var(--radius-sm); font-family: var(--font);
  font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.btn:active:not(:disabled) { transform: scale(0.98); }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }
.btn-primary { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 4px 16px rgba(147,51,234,0.3); }
.btn-secondary { background: #fff; color: var(--primary-dark); border: 1.5px solid var(--border); }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px dashed var(--border); }
.btn-full { width: 100%; margin-top: 10px; }

/* 카카오 공식 로그인 버튼 스타일 */
.btn-kakao {
  background: #FEE500;
  color: rgba(0, 0, 0, 0.85);
  border: none;
  box-shadow: none;
  font-weight: 600;
  letter-spacing: -0.01em;
  gap: 8px;
}
.btn-kakao:hover:not(:disabled) { background: #f5dc00; }
.btn-kakao:active:not(:disabled) { background: #e6cf00; transform: scale(0.98); }
.btn-kakao:disabled { background: #FEE500; opacity: 0.55; }
.btn-kakao .kakao-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; flex-shrink: 0; color: #191919;
}
.btn-kakao .kakao-icon svg { width: 100%; height: 100%; display: block; }
.btn-kakao .kakao-label { line-height: 1.2; white-space: nowrap; }
.btn-kakao--compact { min-height: 44px; font-size: 0.9rem; border-radius: 12px; }
.btn-kakao--header {
  min-height: 34px; padding: 0 10px; font-size: 0.72rem; border-radius: 8px; gap: 5px;
  margin-top: 0; width: auto;
}
.btn-kakao--header .kakao-icon { width: 14px; height: 14px; }
.login-inline-hint .btn-kakao,
.login-card .btn-kakao { margin-top: 0; }

.action-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }

.loading-card { text-align: center; padding: 32px 16px; }
.loader-ring { width: 48px; height: 48px; margin: 0 auto 12px; border: 3px solid var(--primary-light);
  border-top-color: var(--primary-dark); border-radius: 50%; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-box { background: #fff1f2; border: 1px solid #fecdd3; border-radius: var(--radius-sm); padding: 14px; color: #be123c; font-size: 0.88rem; line-height: 1.5; }
.error-box strong { display: block; margin-bottom: 4px; }
.content-blocked-hint { margin: 8px 0 0; font-size: 0.8rem; color: #9f1239; line-height: 1.5; }
.policy-guidance {
  margin: 10px 0 0;
  padding: 10px 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  font-family: var(--font);
  font-size: 0.78rem;
  line-height: 1.55;
  color: #9a3412;
  white-space: pre-wrap;
  text-align: left;
  overflow-x: auto;
}
.policy-apply-btn { margin-top: 10px; }
.policy-error-actions {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.policy-error-actions .btn { margin-top: 0; }
.policy-suggestion-slot { margin-top: 12px; }
.policy-suggestion-label {
  margin: 0 0 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #9a3412;
}
.credit-history-summary {
  margin: 0 0 10px;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-align: right;
}
.credit-history-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.credit-history-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
}
.credit-history-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.credit-history-type {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--primary-dark);
}
.credit-history-amount {
  font-size: 0.95rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.credit-history-amount.is-plus { color: #15803d; }
.credit-history-amount.is-minus { color: #b91c1c; }
.credit-history-desc {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #52525b;
  line-height: 1.45;
}
.credit-history-meta {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.72rem;
  color: #a1a1aa;
}

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 6px; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; padding: 12px; border: 1.5px solid var(--border); border-radius: 10px;
  font-family: var(--font); font-size: 0.88rem; background: #fff; }
.form-group textarea { min-height: 100px; resize: none; }
/* 포커스 시 브라우저 기본 굵은 검정 아웃라인 제거 — 테두리 두께·색 유지 */
.form-group input:focus,
.form-group input:focus-visible,
.form-group textarea:focus,
.form-group textarea:focus-visible,
.form-group select:focus,
.form-group select:focus-visible {
  outline: none;
  box-shadow: none;
}
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):focus-visible,
textarea:focus,
textarea:focus-visible,
select:focus,
select:focus-visible {
  outline: none;
}
.form-hint { font-size: 0.72rem; color: var(--text-muted); margin-top: 4px; }

/* 프롬프트 작성: 남은 세로 공간을 textarea가 채우고, 초과 시 내부 스크롤 */
.wizard-screen:has(.form-group--fill) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.form-group--fill {
  flex: 1 1 0;
  min-height: 0;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}
.form-group--fill label { flex-shrink: 0; }
.form-group--fill .prompt-draft-input,
.form-group--fill textarea {
  flex: 1 1 0;
  min-height: 0;
  height: 0;
  resize: none;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.wizard-screen:has(.form-group--fill) > .form-hint {
  flex-shrink: 0;
  margin-top: 10px;
}

.my-tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.my-tabs .tab-btn { flex: 1 1 auto; min-width: 0; }
.credit-card {
  background: linear-gradient(135deg, #faf5ff, #fdf2f8);
  border: 1px solid rgba(192, 132, 252, 0.25);
  border-radius: 14px;
  padding: 14px 16px;
  margin-bottom: 14px;
}
.credit-card-main { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.credit-label { font-size: 0.85rem; color: #6b7280; font-weight: 500; }
.credit-balance { font-size: 1.5rem; font-weight: 700; color: var(--primary-dark); font-family: var(--font-hand); }
.credit-hint { margin: 8px 0 0; font-size: 0.75rem; color: #9ca3af; }
.credit-used { margin: 0 0 12px; font-size: 0.8rem; color: #6b7280; text-align: right; }
.my-account-actions {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.account-delete-hint {
  margin: 0;
  font-size: 0.72rem;
  color: #9ca3af;
  line-height: 1.5;
  text-align: center;
}
.btn-danger-ghost {
  background: transparent;
  color: #b91c1c;
  border: 1.5px solid rgba(185, 28, 28, 0.35);
}
.btn-danger-ghost:disabled { opacity: 0.6; }

/* 커스텀 모달 */
html.app-modal-open { overflow: hidden; }
html.image-viewer-open { overflow: hidden; }

.image-viewer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  flex-direction: column;
  background: rgba(10, 8, 18, 0.94);
  animation: app-modal-fade-in 0.2s ease;
}
.image-viewer-backdrop.image-viewer-closing {
  animation: app-modal-fade-out 0.2s ease forwards;
}
.image-viewer-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  flex-shrink: 0;
}
.image-viewer-hint {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.72);
}
@media (pointer: fine) {
  .image-viewer-hint { display: none; }
}
.image-viewer-close {
  margin-left: auto;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}
.image-viewer-stage {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.image-viewer-stage.is-zoomed { cursor: grab; }
.image-viewer-stage.is-zoomed:active { cursor: grabbing; }
.image-viewer-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transform-origin: center center;
  will-change: transform;
}

.app-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: rgba(59, 7, 100, 0.38);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: app-modal-fade-in 0.2s ease;
}
.app-modal-backdrop.app-modal-closing {
  animation: app-modal-fade-out 0.2s ease forwards;
}
.app-modal {
  width: 100%;
  max-width: 340px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(250,245,255,0.96));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(147, 51, 234, 0.22);
  padding: 22px 20px 18px;
  animation: app-modal-pop 0.24s cubic-bezier(0.34, 1.4, 0.64, 1);
}
.app-modal-backdrop.app-modal-closing .app-modal {
  animation: app-modal-pop-out 0.18s ease forwards;
}
.app-modal-icon {
  text-align: center;
  line-height: 1;
}
.app-modal-title {
  margin: 0 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--primary-dark);
  text-align: center;
  line-height: 1.45;
}
.app-modal--danger .app-modal-title { color: #b91c1c; }
.app-modal-body {
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--text);
  text-align: left;
  white-space: pre-line;
  max-height: min(50vh, 360px);
  overflow-y: auto;
}
.app-modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}
.app-modal-actions .btn { flex: 1; margin-top: 0; min-height: 44px; font-size: 0.85rem; }
.app-modal-actions--single .btn { width: 100%; }
.btn-danger {
  background: linear-gradient(135deg, #f87171, #dc2626);
  color: #fff;
  border: none;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.28);
}
@keyframes app-modal-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes app-modal-fade-out {
  from { opacity: 1; }
  to { opacity: 0; }
}
@keyframes app-modal-pop {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes app-modal-pop-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

.history-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-sm);
  overflow: hidden;
  min-width: 0;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}
.history-card.fail .history-card-cover img { opacity: 0.5; }
.history-card-cover {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
}
.history-card-cover:focus,
.history-card-cover:focus-visible { outline: none; box-shadow: none; }
.history-card-cover img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}
.history-card-body { padding: 10px 12px 12px; }
.history-card-title {
  margin: 0 0 4px;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: break-word;
  word-break: normal;
}
html[lang="ko"] .history-card-title { word-break: keep-all; }
.history-card-date {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  overflow-wrap: break-word;
  word-break: normal;
}
html[lang="ko"] .history-card-date { word-break: keep-all; }
.history-card-delete {
  margin-top: 8px;
  height: auto;
  min-height: 36px;
  font-size: 0.78rem;
  border-radius: 3px;
}

.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--text-muted);
  width: 100%;
}
.empty-state-lead {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.55;
  color: var(--text);
}
.empty-state-sub {
  margin: 10px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
}
.empty-state p { margin: 0 0 16px; font-size: 0.88rem; line-height: 1.6; }

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-around;
  padding: 8px 12px calc(10px + var(--safe-bottom));
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(147, 51, 234, 0.1);
}
.nav-item { display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(4px * 0.9); min-width: 64px; min-height: 48px; height: auto; max-height: none;
  border: none; background: transparent; cursor: pointer; opacity: 0.45; font-family: var(--font);
  padding: calc(2px * 0.9) 2px calc(3px * 0.9); margin: 0; }
.nav-item.active { opacity: 1; }
.nav-icon { display: flex; align-items: center; justify-content: center; flex-shrink: 0; line-height: 1; }
.nav-icon .app-nav-svg {
  display: block;
  width: calc(22px * 0.85 * 0.9);
  height: calc(22px * 0.85 * 0.9);
  color: var(--text-muted);
}
.nav-item.active .nav-icon .app-nav-svg { color: var(--primary-dark); }
.nav-label { font-size: calc(10px * 0.9); font-weight: 500; color: var(--text-muted); line-height: 1.15; }
.nav-item.active .nav-label { color: var(--primary-dark); font-weight: 700; }

/* 테스트 유저 선택 모달 */
.test-user-picker-sub { margin-top: -4px; margin-bottom: 12px; text-align: center; }
.test-user-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: min(52vh, 360px);
  overflow-y: auto;
  margin-bottom: 4px;
}
.test-user-pick-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  height: auto;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 3px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  position: relative;
}
.test-user-pick-item.is-active {
  border-color: var(--primary);
  background: var(--primary-light);
}
.test-user-pick-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  padding-right: 48px;
}
.test-user-pick-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--primary-dark);
  background: #fff;
  border: 1px solid var(--primary);
  border-radius: 3px;
  padding: 1px 6px;
}

.app-nav-svg { flex-shrink: 0; display: block; box-sizing: border-box; }
.btn-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.btn-icon .app-nav-svg { width: 18px; height: 18px; }
.category-tab,
.category-tab-label { display: inline-flex; align-items: center; gap: 6px; }
.category-tab-icon { display: inline-flex; align-items: center; flex-shrink: 0; }
.category-tab-icon .app-nav-svg { width: 16px; height: 16px; }
.photo-placeholder-icon { display: flex; align-items: center; justify-content: center; color: var(--primary-dark); margin-bottom: 4px; }
.photo-placeholder-icon .app-placeholder-svg { width: 32px; height: 32px; opacity: 0.75; }
.photo-placeholder-label { margin: 8px 0 0; font-weight: 600; font-size: 0.88rem; }
.inline-hint-icon { display: inline-flex; align-items: center; vertical-align: middle; margin-right: 4px; }
.inline-hint-icon .app-nav-svg { width: 16px; height: 16px; color: var(--primary-dark); }
.app-modal-icon { display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.app-modal-icon .app-nav-svg { width: 28px; height: 28px; color: var(--primary-dark); }
.app-modal--danger .app-modal-icon .app-nav-svg { color: #b91c1c; }
.app-modal--success .app-modal-icon .app-nav-svg { color: var(--primary-dark); }
.sample-carousel-empty-icon { display: flex; justify-content: center; margin-bottom: 8px; color: var(--primary-dark); }
.sample-carousel-empty-icon .app-nav-svg { width: 28px; height: 28px; opacity: 0.7; }
.prompt-test-chevron { display: inline-flex; align-items: center; }
.prompt-test-chevron .app-nav-svg { width: 14px; height: 14px; }

.login-banner { background: linear-gradient(135deg, var(--primary-light), #fce7f3); border-radius: var(--radius-sm);
  padding: 16px; text-align: center; margin-bottom: 14px; }
.login-banner p { margin: 0 0 12px; font-size: 0.88rem; }

.login-card {
  background: linear-gradient(135deg, var(--primary-light), #fce7f3);
  border: 1.5px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px 16px; text-align: center; margin-bottom: 12px;
}
.login-card--compact { padding: 16px; margin-top: 8px; }
.login-card strong { display: block; font-size: 1rem; margin-bottom: 8px; color: var(--primary-dark); line-height: 1.45; }
.login-card p { margin: 0 0 14px; font-size: 0.88rem; line-height: 1.6; color: var(--text); }
.login-card .form-hint { margin: 10px 0 0; }

.login-inline-hint {
  background: var(--primary-light); border: 1px dashed var(--primary);
  border-radius: 12px; padding: 12px; margin-bottom: 12px; text-align: center;
}
.login-inline-hint p { margin: 0 0 12px; font-size: 0.82rem; font-weight: 600; color: var(--primary-dark); line-height: 1.55; }
.login-inline-hint .btn { margin-top: 0; }

.checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin: 16px 0; font-size: 0.82rem; line-height: 1.4; cursor: pointer; }
.checkbox-row input { margin-top: 3px; flex-shrink: 0; }
.register-profile { text-align: center; margin-bottom: 16px; }
.register-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--primary); object-fit: cover; }
.avatar-placeholder.register-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--primary-light), #fce7f3);
  color: var(--primary-dark); font-size: 1.75rem; font-weight: 700;
  border: 3px solid var(--primary);
}
.register-email { margin: 8px 0 0; font-size: 0.78rem; color: var(--text-muted); }

@media (max-width: 430px) {
  .app-shell { max-width: 100%; box-shadow: none; }
}

/* category: 미니미 / 이모티콘 */
.category-tabs { display: flex; gap: 8px; margin: 8px 0 12px; }
.category-tab, .category-tab-label {
  flex: 1; min-height: 44px; border: 1.5px solid var(--border); background: #fff; border-radius: 12px;
  font-family: var(--font); font-size: 0.85rem; font-weight: 600; cursor: pointer; color: var(--text-muted);
  display: flex; align-items: center; justify-content: center; gap: 4px;
}
.category-tab.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
.category-tabs-form { margin: 0; }
.category-tabs-form .category-tab-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  padding: 0 12px;
  text-align: center;
  line-height: 1.3;
  user-select: none;
}
.category-tabs-form .category-tab-label:has(input:checked) {
  background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark);
}
.category-tabs-form .category-tab-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  clip: rect(0, 0, 0, 0);
  overflow: hidden;
  white-space: nowrap;
}

.set-card { position: relative; }
.set-card-badge, .set-detail-badge, .history-badge {
  display: inline-block; font-size: 0.65rem; font-weight: 700; padding: 3px 8px; border-radius: 999px;
  background: rgba(255,255,255,0.92); color: var(--primary-dark); border: 1px solid var(--border);
}
.set-card-badge { position: absolute; top: 8px; left: 8px; z-index: 1; }
.set-detail-badge { margin-bottom: 8px; }
.history-badge { margin-left: 4px; font-weight: 500; opacity: 0.85; }

.grid-preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.grid-preset {
  min-height: 40px; padding: 0 14px; border: 1.5px solid var(--border); border-radius: 10px;
  background: #fff; font-family: var(--font); font-weight: 600; font-size: 0.82rem; cursor: pointer;
}
.grid-preset.active { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }

.owner-panel { margin-bottom: 12px; }
.owner-panel-label { margin: 0 0 10px; font-size: 0.78rem; font-weight: 700; color: var(--primary-dark); }
.owner-stats { display: flex; gap: 12px; margin-bottom: 12px; }
.owner-stat {
  flex: 1; text-align: center; padding: 12px 8px; border-radius: var(--radius-sm);
  background: var(--primary-light); border: 1px solid var(--border);
}
.owner-stat strong { display: block; font-size: 1.35rem; line-height: 1.2; color: var(--primary-dark); }
.owner-stat span { font-size: 0.72rem; color: var(--text-muted); }

.set-card--mine { cursor: default; }
.set-card-cover {
  display: block; width: 100%; padding: 0; border: none; background: none; cursor: pointer;
}
.set-card-actions { display: flex; gap: 8px; margin-top: 8px; }
.set-card-action { min-height: 36px; font-size: 0.78rem; }

.edit-sample-list { display: flex; flex-wrap: wrap; gap: 10px; }
.edit-sample-item {
  width: calc(50% - 5px); border-radius: var(--radius-sm); overflow: hidden;
  border: 1px solid var(--border); background: #fff;
}
.edit-sample-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.edit-sample-del { width: 100%; min-height: 32px; font-size: 0.72rem; border-radius: 0; }

/* sample file upload */
.sample-upload { width: 100%; }
.sample-upload-btn {
  width: 100%;
  min-height: 92px;
  padding: 14px 16px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  background: var(--primary-light);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-family: var(--font);
  transition: border-color 0.15s, background 0.15s;
}
.sample-upload-btn:hover { border-color: var(--primary); background: #f8f0ff; }
.sample-upload-btn:active { transform: scale(0.99); }
.sample-upload-icon { font-size: 1.6rem; line-height: 1; }
.sample-upload-label { font-size: 0.88rem; font-weight: 600; color: var(--primary-dark); }
.sample-upload-hint { font-size: 0.72rem; color: var(--text-muted); }
.sample-upload-preview {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px;
}
.sample-upload-preview.hidden { display: none; }
.sample-upload-thumb {
  width: calc(33.333% - 6px);
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  background: #fff;
}
.sample-upload-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sample-upload-status {
  margin: 8px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

/* emoticon picker */
.emoticon-picker { margin-top: 4px; }
.emoticon-hint { font-size: 0.8rem; color: var(--text-muted); margin: 0 0 10px; }
.emoticon-grid-wrap { position: relative; width: 100%; border-radius: var(--radius-sm); overflow: hidden;
  border: 2px solid var(--primary); background: #000; }
.emoticon-base-img { width: 100%; display: block; vertical-align: top; }
.emoticon-grid-overlay {
  position: absolute; inset: 0; display: grid; box-sizing: border-box;
}
.emoticon-cell {
  border: 2px solid rgba(255, 255, 255, 0.9);
  background: rgba(192, 132, 252, 0.06);
  cursor: pointer; padding: 0; margin: 0; min-height: 0;
  box-shadow: inset 0 0 0 1px rgba(147, 51, 234, 0.25);
}
.emoticon-cell:hover { background: rgba(244, 114, 182, 0.15); }
.emoticon-cell.selected {
  background: rgba(244, 114, 182, 0.35);
  border-color: #f472b6;
  box-shadow: inset 0 0 0 3px rgba(147, 51, 234, 0.55);
}
.emoticon-grid-label { text-align: center; font-size: 0.78rem; color: var(--text-muted); margin: 10px 0 0; }
.emoticon-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.emoticon-actions .btn-full { margin-top: 0; }

