/* ================================================================
   KiddlyCurator — Dark monochrome theme
   Tone: warm dark gray (#2a2a2a~#424242) + monochrome accents (white/black)
   Font: Pretendard (loaded via CDN in layout.ejs)
   ================================================================ */

:root {
  /* Background — warmer dark gray (ref: ming.ai.kr CMS) */
  --bg-primary:    #2a2a2a;   /* body */
  --bg-secondary:  #353535;   /* cards, chips, panels */
  --bg-tertiary:   #262626;   /* inputs, sub-panels */
  --bg-hover:      #424242;   /* hover bg */
  --bg-deep:       #1f1f1f;   /* deepest bg, code blocks */

  /* Text */
  --text-bright:   #ffffff;   /* H1, hero */
  --text-heading:  #f0f0f0;   /* H2/H3 */
  --text-primary:  #e0e0e0;   /* body */
  --text-muted:    #a0a0a0;   /* secondary */
  --text-faint:    #777777;   /* tertiary */
  --text-dim:      #555555;   /* faintest */

  /* Accent — monochrome (cyan/purple removed) */
  --accent-primary:        #ffffff;                       /* active text, links */
  --accent-hover:          #cccccc;
  --accent-border:         rgba(255, 255, 255, 0.35);
  --accent-overlay:        rgba(255, 255, 255, 0.12);
  --accent-overlay-light:  rgba(255, 255, 255, 0.06);
  --accent-overlay-faint:  rgba(255, 255, 255, 0.04);

  /* Primary CTA button — pure black (ref: ming.ai.kr login button) */
  --btn-primary-bg:        #000000;
  --btn-primary-text:      #ffffff;
  --btn-primary-hover-bg:  #1a1a1a;

  /* Status — desaturated, soft */
  --success:           #86efac;
  --success-overlay:   rgba(134, 239, 172, 0.1);
  --error:             #fca5a5;
  --error-overlay:     rgba(252, 165, 165, 0.12);
  --warning:           #fde68a;
  --warning-overlay:   rgba(253, 230, 138, 0.06);
  --tool-accent:       #d4d4d4;
  --tool-overlay:      rgba(255, 255, 255, 0.06);
  --twitter-blue:      #cccccc;

  /* Borders */
  --border-subtle:  rgba(255, 255, 255, 0.04);
  --border-light:   rgba(255, 255, 255, 0.08);
  --border-medium:  rgba(255, 255, 255, 0.12);
  --border-bold:    rgba(255, 255, 255, 0.20);
}

/* ── Reset & Base ─────────────────────────────────────────── */

*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  min-height: 100vh;
  word-break: keep-all;
  overflow-wrap: break-word;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* ── Navigation Bar ───────────────────────────────────────── */

.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(42, 42, 42, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-light);
}

.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 24px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  color: var(--text-bright);
}

.logo-accent {
  color: var(--accent-primary);
  font-weight: 300;
}

/* Search form in nav */
.nav-search {
  display: flex;
  align-items: center;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  padding: 0 12px;
  max-width: 360px;
  width: 100%;
  transition: border-color 0.2s ease;
}

.nav-search:focus-within {
  border-color: var(--accent-primary);
}

.nav-search input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.875rem;
  padding: 10px 0;
}

.nav-search input::placeholder {
  color: var(--text-faint);
}

.nav-search button {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  transition: color 0.2s ease;
}

.nav-search button:hover {
  color: var(--accent-primary);
}

/* ── Main Content ─────────────────────────────────────────── */

.main-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px 24px 48px;
  min-height: calc(100vh - 64px - 80px);
}

/* ── Category Filter Bar ──────────────────────────────────── */

.filter-bar {
  margin-bottom: 24px;
  overflow: hidden;
}

.filter-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: thin;
  scrollbar-color: var(--text-dim) transparent;
}

.filter-scroll::-webkit-scrollbar {
  height: 4px;
}

.filter-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.filter-scroll::-webkit-scrollbar-thumb {
  background: var(--text-dim);
  border-radius: 2px;
}

.filter-chip {
  flex-shrink: 0;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  transition: all 0.2s ease;
  cursor: pointer;
  white-space: nowrap;
}

.filter-chip:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-bold);
}

.filter-chip.active {
  background: var(--accent-primary);
  color: var(--bg-primary);
  border-color: var(--accent-primary);
  font-weight: 600;
}

/* ── Result Info ──────────────────────────────────────────── */

.result-info {
  margin-bottom: 20px;
}

.result-info p {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.result-info strong {
  color: var(--text-primary);
}

/* ── Card Grid ────────────────────────────────────────────── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.card {
  background: var(--bg-secondary);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent-border);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--accent-overlay);
}

/* Card image */
.card-image {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-tertiary);
  position: relative;
}

.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image img {
  transform: scale(1.05);
}

.card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

/* Card body */
.card-body {
  padding: 16px 20px 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--text-heading);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.card-date {
  color: var(--text-muted);
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
}

/* ── Tags (shared) ────────────────────────────────────────── */

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--accent-overlay);
  color: var(--accent-primary);
  white-space: nowrap;
}

.tag-more {
  background: var(--border-light);
  color: var(--text-muted);
}

.tag-tool {
  background: var(--tool-overlay);
  color: var(--tool-accent);
}

.tag-secondary {
  background: var(--border-light);
  color: var(--text-muted);
}

/* ── Empty State ──────────────────────────────────────────── */

.empty-state {
  text-align: center;
  padding: 80px 24px;
  color: var(--text-faint);
}

.empty-state p {
  font-size: 1.125rem;
  margin-bottom: 8px;
}

.empty-sub {
  font-size: 0.875rem !important;
  color: var(--text-dim) !important;
}

/* ── Pagination ───────────────────────────────────────────── */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 48px;
  padding: 24px 0;
}

.page-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  transition: all 0.2s ease;
  cursor: pointer;
}

.page-btn:hover:not(.disabled) {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.page-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.page-info {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* ── Article Detail ───────────────────────────────────────── */

.article-detail {
  max-width: 800px;
  margin: 0 auto;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 24px;
  transition: color 0.2s ease;
}

.back-link:hover {
  color: var(--accent-primary);
}

/* Hero image */
.article-hero {
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 32px;
  border: 1px solid var(--border-light);
}

.article-hero img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Article header */
.article-header {
  margin-bottom: 24px;
}

.article-title {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-bright);
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.meta-link {
  transition: color 0.2s ease;
}

.meta-link:hover {
  color: var(--accent-primary);
}

/* Tags section in article */
.article-tags-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 0;
  margin-bottom: 8px;
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

.tag-group {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tag-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 60px;
  padding-top: 3px;
  flex-shrink: 0;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Article body */
.article-body {
  padding: 32px 0;
  font-size: 1rem;
  line-height: 1.85;
  color: var(--text-primary);
}

.article-body h1,
.article-body h2,
.article-body h3,
.article-body h4 {
  color: var(--text-heading);
  margin: 2em 0 0.75em;
  line-height: 1.4;
}

.article-body h2 {
  font-size: 1.375rem;
}

.article-body h3 {
  font-size: 1.125rem;
}

.article-body p {
  margin-bottom: 1.2em;
}

.article-body img,
.article-body video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1.5em 0;
  background: var(--bg-tertiary);
}

/* Normalize WordPress figure blocks (wp-block-image, wp-block-video, alignfull, alignwide) */
.article-body figure,
.article-body .wp-block-image,
.article-body .wp-block-video,
.article-body .wp-block-embed {
  width: 100% !important;
  max-width: 100% !important;
  margin: 1.5em 0;
}

.article-body figure img,
.article-body figure video {
  margin: 0;
}

.article-body figcaption {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.5em;
  text-align: center;
  line-height: 1.5;
}

.article-body a {
  color: var(--accent-primary);
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
  transition: text-decoration-color 0.2s ease;
}

.article-body a:hover {
  text-decoration-color: var(--accent-primary);
}

.article-body blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 12px 20px;
  margin: 1.5em 0;
  background: var(--accent-overlay-faint);
  border-radius: 0 8px 8px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-body pre,
.article-body code {
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.875em;
}

.article-body pre {
  background: var(--bg-tertiary);
  padding: 16px 20px;
  border-radius: 10px;
  overflow-x: auto;
  margin: 1.5em 0;
  border: 1px solid var(--border-light);
}

.article-body code {
  background: var(--border-light);
  padding: 2px 6px;
  border-radius: 4px;
}

.article-body ul,
.article-body ol {
  padding-left: 1.5em;
  margin-bottom: 1.2em;
}

.article-body li {
  margin-bottom: 0.4em;
}

/* Embedded videos (iframe) */
.article-body iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 10px;
  margin: 1.5em 0;
}

/* ── Original body toggle ─────────────────────────────────── */

.article-original {
  padding-top: 16px;
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.toggle-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.original-body {
  margin-top: 24px;
  padding: 24px;
  background: var(--border-subtle);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  font-size: 0.9375rem;
  line-height: 1.8;
  color: var(--text-muted);
}

.original-body p {
  margin-bottom: 1em;
}

.original-body a {
  color: var(--accent-primary);
}

.original-body img,
.original-body video {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1em 0;
  background: var(--bg-tertiary);
}

.original-body figure,
.original-body .wp-block-image,
.original-body .wp-block-video,
.original-body .wp-block-embed {
  width: 100% !important;
  max-width: 100% !important;
  margin: 1em 0;
}

.original-body figure img,
.original-body figure video {
  margin: 0;
}

/* ── 404 Page ─────────────────────────────────────────────── */

.not-found {
  text-align: center;
  padding: 100px 24px;
}

.not-found h1 {
  font-size: 4rem;
  font-weight: 700;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.not-found p {
  color: var(--text-faint);
  margin-bottom: 24px;
}

.not-found a {
  color: var(--accent-primary);
  font-weight: 500;
}

/* ── Footer ───────────────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 0.8125rem;
}

/* ── Responsive ───────────────────────────────────────────── */

/* Tablet: 2 columns */
@media (max-width: 960px) {
  .card-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }

  .nav-inner {
    padding: 0 16px;
  }

  .main-content {
    padding: 16px 16px 40px;
  }
}

/* Mobile: 1 column */
@media (max-width: 600px) {
  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .nav-inner {
    height: 56px;
    gap: 12px;
  }

  .logo {
    font-size: 1.1rem;
  }

  .nav-search {
    max-width: none;
  }

  .nav-search input {
    font-size: 0.8125rem;
    padding: 8px 0;
  }

  .main-content {
    padding: 12px 12px 32px;
  }

  .article-title {
    font-size: 1.375rem;
  }

  .article-hero img {
    aspect-ratio: auto;
  }

  .tag-group {
    flex-direction: column;
    gap: 6px;
  }

  .article-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .pagination {
    gap: 8px;
  }

  .page-btn {
    padding: 8px 14px;
    font-size: 0.8125rem;
  }
}

/* ── Utility / animations ─────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* Selection color */
::selection {
  background: var(--accent-border);
  color: var(--text-bright);
}

/* ── Nav tabs (아티클 / 포스팅제안) ─────────────────────────── */

.nav-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-tab {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nav-tab:hover {
  color: var(--text-primary);
  background: var(--border-light);
}

.nav-tab.active {
  color: var(--accent-primary);
  background: var(--accent-overlay-light);
}

.nav-badge {
  margin-left: 4px;
  font-size: 0.75rem;
  color: var(--accent-primary);
  font-weight: 700;
}

/* ── Drafts list page ─────────────────────────────────────── */

.drafts-page {
  max-width: 800px;
  margin: 0 auto;
}

/* Status filter tabs */
.draft-filters {
  display: flex;
  gap: 8px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--border-light);
  padding-bottom: 0;
}

.draft-filter-tab {
  padding: 10px 18px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}

.draft-filter-tab:hover {
  color: var(--text-primary);
}

.draft-filter-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}

.draft-filter-count {
  margin-left: 6px;
  font-size: 0.8125rem;
  color: var(--text-faint);
}

.draft-filter-tab.active .draft-filter-count {
  color: var(--accent-primary);
}

/* Draft card list (1-column) */
.draft-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.draft-card {
  display: flex;
  background: var(--bg-secondary);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  min-height: 200px;
}

.draft-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.draft-card.published {
  opacity: 0.5;
}

.draft-card-image {
  width: 240px;
  flex-shrink: 0;
  overflow: hidden;
  background: var(--bg-tertiary);
  position: relative;
}

.draft-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.draft-card:hover .draft-card-image img {
  transform: scale(1.04);
}

.draft-card-image .card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.draft-card-body {
  flex: 1;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.draft-card-title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--text-heading);
  line-height: 1.5;
}

.draft-card-summary {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.draft-card-footer {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}

.draft-card-date {
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* Status labels */
.draft-status-label {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.draft-status-label.pending {
  background: var(--border-light);
  color: var(--text-muted);
}

.draft-status-label.ready {
  background: var(--accent-overlay);
  color: var(--accent-primary);
}

.draft-status-label.editing {
  background: var(--tool-overlay);
  color: var(--tool-accent);
}

.draft-status-label.published {
  background: var(--success-overlay);
  color: var(--success);
}

/* ── Draft edit page ──────────────────────────────────────── */

.draft-edit-page {
  max-width: 800px;
  margin: 0 auto;
}

.draft-edit-header {
  margin-bottom: 32px;
}

.draft-copyright-notice {
  margin-top: 12px;
  font-size: 0.8125rem;
  color: var(--text-faint);
  padding: 10px 14px;
  background: var(--warning-overlay);
  border: 1px solid var(--warning-overlay);
  border-radius: 8px;
}

/* Section layout */
.draft-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 24px;
}

.draft-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.draft-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.draft-action-btn {
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.draft-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.draft-empty-hint {
  font-size: 0.875rem;
  color: var(--text-dim);
  text-align: center;
  padding: 24px 0;
}

/* Alt image gallery */
.alt-gallery {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.alt-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.alt-group-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.alt-group-source {
  font-weight: 400;
  color: var(--text-dim);
  font-size: 0.8125rem;
}

.alt-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.alt-thumb {
  width: 150px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.alt-thumb img {
  width: 150px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border-medium);
  background: var(--bg-tertiary);
}

.alt-thumb--selected img,
.alt-thumb--selected .alt-thumb-video,
.alt-thumb--selected .alt-thumb-linkcard {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px var(--accent-border);
}

.alt-thumb-video {
  width: 150px;
  height: 100px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-medium);
  background: var(--bg-tertiary);
}

.alt-thumb-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.alt-thumb-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}

.alt-thumb-check {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
  cursor: pointer;
}

.alt-thumb input[type="checkbox"] {
  accent-color: var(--accent-primary);
  width: 14px;
  height: 14px;
  cursor: pointer;
}

.alt-download-btn {
  font-size: 0.75rem;
  font-family: inherit;
  padding: 3px 8px;
  border-radius: 5px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-medium);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.alt-download-btn:hover {
  background: var(--bg-hover);
  color: var(--accent-primary);
  border-color: var(--accent-border);
}

.alt-thumb-linkcard {
  width: 150px;
  height: 100px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px dashed var(--border-medium);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text-muted);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.alt-thumb-linkcard:hover {
  background: var(--bg-secondary);
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

.alt-thumb-linkcard-icon {
  font-size: 1.25rem;
  opacity: 0.7;
}

.alt-thumb-linkcard-host {
  font-size: 0.75rem;
  font-weight: 500;
  text-align: center;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.alt-thumb-caption {
  font-size: 0.725rem;
  color: var(--text-dim);
  line-height: 1.4;
}

/* Textarea */
.draft-textarea {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  line-height: 1.7;
  padding: 14px 16px;
  resize: vertical;
  transition: border-color 0.2s ease;
}

.draft-textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
}

.draft-textarea--large {
  min-height: 140px;
}

/* Preview tabs */
.preview-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.preview-tab {
  padding: 8px 18px;
  border-radius: 8px 8px 0 0;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--bg-secondary);
  border: 1px solid var(--border-light);
  border-bottom: none;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.preview-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.preview-tab.active {
  background: var(--bg-tertiary);
  color: var(--accent-primary);
  border-color: var(--accent-border);
}

/* Preview pane */
.preview-pane {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 0 10px 10px 10px;
  padding: 20px;
}

.preview-pane-inner {
  margin-bottom: 12px;
}

.preview-twitter-img {
  width: 100%;
  max-height: 260px;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 12px;
}

.preview-twitter-text {
  font-size: 0.9375rem;
  color: var(--text-primary);
  white-space: pre-wrap;
  line-height: 1.65;
  margin-bottom: 8px;
}

.preview-source-link {
  font-size: 0.875rem;
  color: var(--accent-primary);
  word-break: break-all;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
}

.preview-char-counter {
  font-size: 0.8125rem;
  color: var(--text-dim);
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.preview-medium-md {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}

/* Copy/Save/Publish buttons */
.copy-btn {
  padding: 8px 18px;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--accent-overlay-light);
  border: 1px solid var(--accent-border);
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  background: var(--accent-overlay);
}

.draft-actions {
  display: flex;
  gap: 12px;
  margin-top: 8px;
  padding-top: 8px;
}

.save-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--btn-primary-bg);
  border: none;
  color: var(--btn-primary-text);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}

.save-btn:hover {
  background: var(--btn-primary-hover-bg);
  transform: translateY(-1px);
}

.publish-btn {
  padding: 12px 28px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--success-overlay);
  border: 1px solid var(--success-overlay);
  color: var(--success);
  cursor: pointer;
  transition: all 0.2s ease;
}

.publish-btn:hover {
  background: var(--success-overlay);
  transform: translateY(-1px);
}

/* ── Drafts responsive ────────────────────────────────────── */

@media (max-width: 600px) {
  .draft-card {
    flex-direction: column;
  }

  .draft-card-image {
    width: 100%;
    height: 180px;
  }

  .draft-filters {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .draft-filters::-webkit-scrollbar {
    display: none;
  }

  .alt-thumbs {
    gap: 8px;
  }

  .alt-thumb {
    width: 120px;
  }

  .alt-thumb img {
    width: 120px;
    height: 80px;
  }

  .alt-thumb-video {
    width: 120px;
    height: 80px;
  }

  .alt-thumb-linkcard {
    width: 120px;
    height: 80px;
  }
}

/* ── API usage panel ─────────────────────────────────────── */
.usage-panel {
  max-width: 1200px;
  margin: 48px auto 24px;
  padding: 0 24px;
}

.usage-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--border-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.usage-toggle:hover {
  background: var(--border-light);
  border-color: var(--border-bold);
  color: var(--text-bright);
}

.usage-toggle-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
  font-size: 14px;
  opacity: 0.6;
}

.usage-panel[data-open="true"] .usage-toggle-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.usage-body {
  margin-top: 16px;
  padding: 20px;
  background: var(--border-subtle);
  border: 1px solid var(--border-light);
  border-radius: 8px;
}

.usage-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.usage-total-card {
  padding: 12px 14px;
  background: var(--border-subtle);
  border-radius: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.usage-total-label {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.usage-total-value {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-bright);
  font-variant-numeric: tabular-nums;
}

.usage-charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.usage-chart-wrap {
  min-width: 0;
  background: rgba(0, 0, 0, 0.25);
  padding: 14px 16px 18px;
  border-radius: 6px;
  position: relative;
  height: 220px;
}

.usage-chart-title {
  margin: 0 0 10px 0;
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.usage-chart-wrap canvas {
  max-height: 170px;
}

.usage-note {
  margin: 16px 0 0 0;
  font-size: 11px;
  color: var(--text-faint);
  text-align: right;
}

.usage-error {
  color: var(--error);
  font-size: 12px;
  margin: 12px 0 0 0;
}

@media (max-width: 720px) {
  .usage-totals {
    grid-template-columns: repeat(2, 1fr);
  }
  .usage-charts {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * Branding Studio
 * ══════════════════════════════════════════════════════════════════ */

/* ── List page ─────────────────────────────────────────────────── */
.branding-page {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}

.branding-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 32px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-light);
}

.branding-page-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-heading);
  margin: 0 0 6px;
}

.branding-page-sub {
  font-size: 0.9375rem;
  color: var(--text-muted);
  margin: 0;
}

.branding-new-btn {
  padding: 10px 20px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-text);
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s ease, transform 0.15s ease;
}
.branding-new-btn:hover {
  background: var(--btn-primary-hover-bg);
  transform: translateY(-1px);
}

/* Card grid */
.branding-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.branding-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-secondary);
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border-light);
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.branding-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.branding-card-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  background: var(--bg-tertiary);
  overflow: hidden;
  position: relative;
}
.branding-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.branding-card:hover .branding-card-image img {
  transform: scale(1.04);
}
.branding-card-image .card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
}

.branding-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.branding-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin: 0;
  line-height: 1.45;
}

.branding-card-summary {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.branding-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
}

.branding-card-date {
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* Status badge (shared between list + edit header) */
.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.03em;
}
.status-badge.empty {
  background: var(--border-light);
  color: var(--text-muted);
}
.status-badge.ready {
  background: var(--accent-overlay);
  color: var(--accent-primary);
}
.status-badge.published {
  background: var(--success-overlay);
  color: var(--success);
}

/* ── Edit page layout ──────────────────────────────────────────── */
.branding-edit-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 24px 32px 60px;
}

.branding-edit-header {
  margin: 16px 0 20px;
}

.branding-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--warning-overlay);
  border: 1px solid var(--warning-overlay);
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--warning);
  line-height: 1.6;
}
.branding-notice strong {
  color: var(--warning);
  flex-shrink: 0;
}
.branding-notice code {
  background: var(--border-light);
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.85em;
  color: var(--text-primary);
}

.branding-edit-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
}

@media (max-width: 1000px) {
  .branding-edit-layout {
    grid-template-columns: 1fr;
  }
}

.branding-edit-left,
.branding-edit-right {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px;
}

.branding-edit-right {
  position: sticky;
  top: 24px;
}

@media (max-width: 1000px) {
  .branding-edit-right {
    position: static;
  }
}

/* ── Form fields ───────────────────────────────────────────────── */
.branding-field {
  margin-bottom: 20px;
}

.branding-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}

.branding-input {
  width: 100%;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.9375rem;
  padding: 11px 14px;
  transition: border-color 0.2s ease;
}
.branding-input:focus {
  outline: none;
  border-color: var(--accent-primary);
}

/* ── Reference URL rows ────────────────────────────────────────── */
.branding-ref-row {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.branding-ref-input {
  flex: 1;
}
.branding-ref-remove-btn {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--border-subtle);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  transition: all 0.15s ease;
}
.branding-ref-remove-btn:hover {
  background: var(--error-overlay);
  border-color: var(--error-overlay);
  color: var(--error);
}
.branding-ref-add-btn {
  margin-top: 4px;
  padding: 8px 14px;
  background: transparent;
  border: 1px dashed var(--border-bold);
  border-radius: 8px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.branding-ref-add-btn:hover {
  color: var(--accent-primary);
  border-color: var(--accent-border);
}

/* ── Image dropzone ────────────────────────────────────────────── */
.branding-dropzone {
  border: 2px dashed var(--border-bold);
  border-radius: 12px;
  padding: 28px 20px;
  text-align: center;
  background: var(--border-subtle);
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 14px;
}
.branding-dropzone:hover,
.branding-dropzone:focus {
  border-color: var(--accent-border);
  background: var(--accent-overlay-faint);
  outline: none;
}
.branding-dropzone--active {
  border-color: var(--accent-primary);
  background: var(--accent-overlay-light);
}
.branding-dropzone-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9375rem;
}
.branding-dropzone-inner p { margin: 0; }
.branding-dropzone-hint {
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* ── Thumbnail grid ────────────────────────────────────────────── */
.branding-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.branding-thumb {
  position: relative;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.branding-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}
.branding-thumb-caption {
  width: 100%;
  background: transparent;
  border: none;
  border-top: 1px solid var(--border-light);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.8125rem;
  padding: 8px 10px;
}
.branding-thumb-caption:focus {
  outline: none;
  background: var(--accent-overlay-faint);
}
.branding-thumb-delete {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-bold);
  border-radius: 50%;
  color: var(--text-bright);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}
.branding-thumb-delete:hover {
  background: var(--error);
  border-color: var(--error);
}

/* ── Video upload & list (Bunny Stream) ────────────────────────── */
.branding-video-progress {
  margin: 6px 0 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.branding-video-progress[hidden] { display: none; }
.branding-video-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-light);
  border-radius: 3px;
  overflow: hidden;
}
.branding-video-progress-fill {
  height: 100%;
  width: 0%;
  background: var(--accent-primary);
  transition: width 0.15s ease;
}
.branding-video-progress-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
}
.branding-video-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 8px;
}
.branding-video-item {
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  overflow: hidden;
  padding: 10px;
}
.branding-video-frame {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}
.branding-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.branding-video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.875rem;
}
.branding-video-title {
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.branding-video-delete {
  background: rgba(0, 0, 0, 0.8);
  border: 1px solid var(--border-bold);
  border-radius: 6px;
  color: var(--text-bright);
  font-size: 0.8125rem;
  padding: 4px 10px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.branding-video-delete:hover {
  background: var(--error);
  border-color: var(--error);
}
.branding-video-hint {
  font-size: 0.75rem;
  color: var(--text-faint);
  margin-top: 6px;
}

/* ── Form action buttons ───────────────────────────────────────── */
.branding-form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
  flex-wrap: wrap;
}
.branding-generate-btn {
  padding: 12px 22px;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--tool-overlay);
  border: 1px solid var(--tool-overlay);
  color: var(--tool-accent);
  cursor: pointer;
  transition: all 0.2s ease;
}
.branding-generate-btn:hover:not(:disabled) {
  background: var(--tool-overlay);
  transform: translateY(-1px);
}
.branding-generate-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.branding-generate-hint {
  font-size: 0.8125rem;
  color: var(--text-faint);
}

/* ── Result panel (right side) ─────────────────────────────────── */
.branding-result-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border-light);
}
.branding-result-tab {
  padding: 8px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}
.branding-result-tab:hover:not(.disabled):not(:disabled) {
  color: var(--text-primary);
}
.branding-result-tab.active {
  color: var(--accent-primary);
  border-bottom-color: var(--accent-primary);
}
.branding-result-tab.disabled,
.branding-result-tab:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.branding-result-panel {
  min-height: 320px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: 16px;
  overflow: hidden;
}

.branding-result-section {
  margin-bottom: 16px;
}
.branding-result-section:last-child {
  margin-bottom: 0;
}

.branding-result-subhead {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 8px;
}

.branding-preview-iframe {
  width: 100%;
  height: 360px;
  background: var(--text-bright);
  border: 1px solid var(--border-medium);
  border-radius: 8px;
}

.branding-result-code {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
  color: var(--text-primary);
  max-height: 300px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.6;
  margin: 0;
}

.branding-twitter-preview {
  background: var(--bg-primary);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  padding: 16px 18px;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.9375rem;
  color: var(--text-primary);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  margin: 0;
  max-height: 420px;
  overflow: auto;
}

.branding-generate-btn--twitter {
  background: var(--accent-overlay-light);
  border-color: var(--accent-border);
  color: var(--twitter-blue);
}
.branding-generate-btn--twitter:hover:not(:disabled) {
  background: var(--accent-overlay);
}

.branding-result-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 280px;
  text-align: center;
  color: var(--text-muted);
}
.branding-result-empty p { margin: 0 0 6px; }
.branding-result-empty .empty-sub {
  font-size: 0.875rem;
  color: var(--text-faint);
}

.branding-result-actions {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.branding-copy-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--accent-overlay-light);
  border: 1px solid var(--accent-border);
  color: var(--accent-primary);
  cursor: pointer;
  transition: all 0.2s ease;
}
.branding-copy-btn:hover:not(:disabled) {
  background: var(--accent-overlay);
}
.branding-copy-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.branding-publish-btn {
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.875rem;
  font-weight: 500;
  font-family: inherit;
  background: var(--success-overlay);
  border: 1px solid var(--success-overlay);
  color: var(--success);
  cursor: pointer;
  transition: all 0.2s ease;
}
.branding-publish-btn:hover:not(:disabled) {
  background: var(--success-overlay);
}
.branding-publish-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── Toast ─────────────────────────────────────────────────────── */
.branding-toast {
  position: fixed;
  right: 24px;
  bottom: 80px;
  z-index: 9999;
  padding: 12px 18px;
  background: var(--bg-hover);
  border: 1px solid var(--border-medium);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  animation: branding-toast-in 0.2s ease;
}
.branding-toast--success {
  border-color: var(--success-overlay);
  color: var(--success);
}
.branding-toast--error {
  border-color: var(--error-overlay);
  color: var(--error);
}
.branding-toast--info {
  border-color: var(--accent-border);
  color: var(--accent-primary);
}

@keyframes branding-toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

