/**
 * Theme: Neo-minimal + Bento Grid + Soft Glass
 * Scoped: applies only when ancestor has .theme-bento
 * Dark: prefers-color-scheme: dark; optional .theme-bento.dark
 */

/* ========== Variables (scoped) ========== */
.theme-bento {
  --tb-bg: #f8fafc;
  --tb-surface: #ffffff;
  --tb-surface-elevated: #ffffff;
  --tb-text: #0f172a;
  --tb-muted: #475569;
  --tb-border: #e2e8f0;
  --tb-shadow: 0 1px 3px rgba(0,0,0,0.06);
  --tb-shadow-md: 0 4px 12px -2px rgba(0,0,0,0.08);
  --tb-shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.12);
  --tb-shadow-card: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --tb-shadow-card-hover: 0 12px 28px -8px rgba(0,0,0,0.12), 0 4px 12px -4px rgba(0,0,0,0.08);
  --tb-radius: 14px;
  --tb-radius-sm: 10px;
  --tb-radius-pill: 9999px;
  --tb-accent: #6366f1;
  --tb-accent-hover: #4f46e5;
  --tb-glass-bg: rgba(255,255,255,0.72);
  --tb-glass-border: rgba(255,255,255,0.9);
  --tb-space: 0.25rem;
  --tb-transition: 0.2s ease;
  --tb-transition-slow: 0.3s ease;
}

/* 다크: 클래스 .dark 또는 OS 설정 — Soft Glass용 반투명 */
.theme-bento.dark {
  --tb-bg: #0f172a;
  --tb-surface: #1e293b;
  --tb-surface-elevated: #334155;
  --tb-text: #f1f5f9;
  --tb-muted: #94a3b8;
  --tb-border: rgba(51,65,85,0.8);
  --tb-shadow: 0 1px 3px rgba(0,0,0,0.25);
  --tb-shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.35);
  --tb-accent: #818cf8;
  --tb-accent-hover: #a5b4fc;
  --tb-glass-bg: rgba(30,41,59,0.6);
  --tb-glass-border: rgba(71,85,105,0.5);
}
@media (prefers-color-scheme: dark) {
  .theme-bento:not([data-theme="light"]) {
    --tb-bg: #0f172a;
    --tb-surface: #1e293b;
    --tb-surface-elevated: #334155;
    --tb-text: #f1f5f9;
    --tb-muted: #94a3b8;
    --tb-border: rgba(51,65,85,0.8);
    --tb-shadow: 0 1px 3px rgba(0,0,0,0.25);
    --tb-shadow-lg: 0 10px 40px -10px rgba(0,0,0,0.35);
    --tb-accent: #818cf8;
    --tb-accent-hover: #a5b4fc;
    --tb-glass-bg: rgba(30,41,59,0.6);
    --tb-glass-border: rgba(71,85,105,0.5);
  }
}

/* ========== Trend: Smooth scroll & base ========== */
html.theme-bento,
.theme-bento {
  scroll-behavior: smooth;
}
.theme-bento {
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Typography & Readability ========== */
.theme-bento .main,
.theme-bento .main-content {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--tb-text);
}
.theme-bento h1, .theme-bento h2, .theme-bento h3, .theme-bento h4 {
  color: var(--tb-text);
  font-weight: 700;
  line-height: 1.3;
  margin-top: 0;
  margin-bottom: 0.5em;
  letter-spacing: -0.02em;
}
.theme-bento h1 { font-size: 1.75rem; margin-bottom: 0.4em; }
.theme-bento h2 { font-size: 1.4rem; margin-top: 1.25em; }
.theme-bento h3 { font-size: 1.15rem; }
.theme-bento h4 { font-size: 1.05rem; }
.theme-bento p {
  margin: 0 0 1em;
  line-height: 1.7;
  max-width: 68ch;
}
.theme-bento .content-header p,
.theme-bento .round-subtitle,
.theme-bento .analysis-article-subtitle {
  color: var(--tb-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 0.75em;
}
.theme-bento a:not(.button):not(.nav-link):not(.quick-action-btn) {
  color: var(--tb-accent);
  text-decoration: none;
}
.theme-bento a:not(.button):not(.nav-link):not(.quick-action-btn):hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.theme-bento a:not(.button):not(.nav-link):not(.quick-action-btn):focus-visible {
  outline: 2px solid var(--tb-accent);
  outline-offset: 2px;
  border-radius: 2px;
}
.theme-bento small,
.theme-bento .post-time,
.theme-bento .col-meta,
.theme-bento .stat-label,
.theme-bento .ad-label {
  font-size: 0.875rem;
  color: var(--tb-muted);
  line-height: 1.5;
}
.theme-bento .winner-section .card-title,
.theme-bento .content-header h2,
.theme-bento .analysis-article-title {
  color: var(--tb-text);
  font-weight: 700;
}
.theme-bento .analysis-article-body,
.theme-bento .ai-generated-content,
.theme-bento .post-content {
  line-height: 1.75;
  color: var(--tb-text);
}
.theme-bento .ai-generated-content p {
  margin-bottom: 0.85em;
  max-width: none;
}
.theme-bento .info-card .info-number,
.theme-bento .metric-value,
.theme-bento .performance-footnote {
  font-size: 1rem;
  color: var(--tb-text);
  font-weight: 600;
}
.theme-bento .info-number,
.theme-bento .metric-value {
  font-variant-numeric: tabular-nums;
  word-break: keep-all;
}
.theme-bento .info-card p,
.theme-bento .metric-label {
  color: var(--tb-muted);
  font-size: 0.9rem;
}
.theme-bento .footer {
  color: var(--tb-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  padding: 2rem 0;
  margin-top: 2rem;
  border-top: 1px solid var(--tb-border);
  background: var(--tb-surface);
}
.theme-bento .footer p {
  margin: 0;
  max-width: none;
  text-align: center;
}
.theme-bento .footer .responsive-wrapper {
  max-width: 1280px;
}
.theme-bento .posts-table td,
.theme-bento .posts-table th,
.theme-bento table td,
.theme-bento table th {
  font-size: 0.9375rem;
  line-height: 1.5;
  vertical-align: middle;
}
.theme-bento .round-nav-internal,
.theme-bento .round-community-link {
  font-size: 0.95rem;
  color: var(--tb-text);
  margin-top: 1rem;
  line-height: 1.5;
}
.theme-bento .round-nav-internal {
  margin-top: 1.5rem;
}
.theme-bento .round-nav-internal a {
  font-weight: 500;
}
.theme-bento .round-community-link .button.primary-button {
  background: var(--tb-accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--tb-radius-sm);
  font-weight: 500;
}
.theme-bento .round-community-link .button.primary-button:hover {
  background: var(--tb-accent-hover);
}
.theme-bento .winner-card-meta,
.theme-bento .winner-date,
.theme-bento .winner-round {
  font-size: 0.9rem;
  color: var(--tb-muted);
  line-height: 1.5;
}
.theme-bento .performance-metrics .metric {
  font-size: 1rem;
  color: var(--tb-text);
}
.theme-bento .info-grid .info-card h3 {
  font-size: 1rem;
  color: var(--tb-muted);
  font-weight: 600;
  margin-bottom: 0.35em;
}
.theme-bento .additional-info .content-header h2 {
  margin-bottom: 0.25em;
}
.theme-bento .article-chip,
.theme-bento .analysis-article-meta span {
  font-size: 0.85rem;
  color: var(--tb-muted);
}
/* 분석 글 본문 리스트·테이블 통일 */
.theme-bento .analysis-article .ai-generated-content ul,
.theme-bento .analysis-article .ai-generated-content ol {
  color: var(--tb-text);
  margin: 1rem 0 1.5rem;
  padding: 0;
  list-style: none;
}
.theme-bento .analysis-article .ai-generated-content li {
  margin-bottom: 0.5rem;
  line-height: 1.7;
  padding: 0.75rem 1rem;
  background: var(--tb-surface);
  border-radius: var(--tb-radius-sm);
  border: 1px solid var(--tb-border);
  color: var(--tb-text);
  box-shadow: var(--tb-shadow);
}
.theme-bento .analysis-article .ai-generated-content li:hover {
  background: var(--tb-surface-elevated);
  border-color: var(--tb-border);
}
.theme-bento .analysis-article .ai-generated-content li::before {
  color: var(--tb-muted);
}
.theme-bento .analysis-article .ai-generated-content li strong {
  color: var(--tb-accent);
  font-weight: 700;
}
.theme-bento .analysis-article .ai-generated-content table {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  margin: 1rem 0;
}
.theme-bento .analysis-article .ai-generated-content th,
.theme-bento .analysis-article .ai-generated-content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .analysis-article .ai-generated-content th {
  background: var(--tb-surface-elevated);
  color: var(--tb-text);
  font-weight: 600;
}
.theme-bento .info-card {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  color: var(--tb-text);
}
.theme-bento .info-icon {
  color: var(--tb-accent);
}
.theme-bento .winner-article-empty {
  color: var(--tb-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.theme-bento .winner-section,
.theme-bento .winner-detail-section {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--tb-shadow);
}
.theme-bento .winner-card {
  background: var(--tb-surface-elevated);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  color: var(--tb-text);
}
.theme-bento .winner-header h1,
.theme-bento .winner-header-intro h1 {
  color: var(--tb-text);
  font-size: 1.5rem;
  margin-bottom: 0.25em;
}
.theme-bento .winner-header .round-subtitle {
  color: var(--tb-muted);
  font-size: 0.95rem;
}
.theme-bento .winner-header-actions .nav-button,
.theme-bento .button.nav-button {
  background: var(--tb-surface-elevated);
  color: var(--tb-text);
  border: 1px solid var(--tb-border);
  padding: 0.5rem 1rem;
  border-radius: var(--tb-radius-sm);
  font-weight: 500;
}
.theme-bento .winner-header-actions .nav-button:hover,
.theme-bento .button.nav-button:hover {
  background: var(--tb-accent);
  color: #fff;
  border-color: var(--tb-accent);
}
.theme-bento .stats-description {
  color: var(--tb-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 0.5em;
}
.theme-bento .performance-metrics li {
  color: var(--tb-text);
  border-bottom: 1px solid var(--tb-border);
}
.theme-bento .performance-metrics li:last-child {
  border-bottom: none;
}

/* ========== Round Detail Page ========== */
.theme-bento .round-detail-layout,
.theme-bento .round-detail-main,
.theme-bento .round-detail-main > * {
  min-width: 0;
}
.theme-bento .round-detail-main .ad-container.ad-inline {
  margin-top: 0;
}
.theme-bento .analysis-article,
.theme-bento .additional-info {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
}
.theme-bento .analysis-article {
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}
.theme-bento .analysis-article-body > .ai-generated-content,
.theme-bento .analysis-article-body > .winner-article-empty {
  max-width: none;
  margin: 0;
}
.theme-bento .winner-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.theme-bento .winner-header-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: flex-end;
}
.theme-bento .winner-card-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
.theme-bento .winner-card-grid > .winner-card {
  min-width: 0;
  padding: 1.25rem;
  box-shadow: var(--tb-shadow-card);
}
.theme-bento .winner-card-grid > .numbers-card {
  grid-column: span 4;
}
.theme-bento .winner-card-grid > .performance-card {
  grid-column: span 3;
}
.theme-bento .winner-card-grid > .summary-card {
  grid-column: span 5;
}
.theme-bento .winner-card .card-title {
  margin-bottom: 1rem;
}
.theme-bento .winner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.theme-bento .winner-card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.theme-bento .performance-metrics {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
}
.theme-bento .performance-metrics .metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
}
.theme-bento .performance-metrics .metric-label,
.theme-bento .performance-metrics .metric-value {
  min-width: 0;
}
.theme-bento .performance-metrics .metric-value {
  text-align: right;
  font-weight: 700;
}
.theme-bento .performance-footnote {
  margin: 0;
  max-width: none;
}
.theme-bento .winner-summary,
.theme-bento #winner_summary {
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}
.theme-bento .winner-summary table,
.theme-bento #winner_summary table {
  width: 100% !important;
  min-width: 460px;
  margin: 0 !important;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  overflow: hidden;
  box-shadow: none;
}
.theme-bento .winner-summary th,
.theme-bento .winner-summary td,
.theme-bento #winner_summary th,
.theme-bento #winner_summary td {
  padding: 0.85rem 0.75rem !important;
  font-size: 0.92rem !important;
  color: var(--tb-text) !important;
  border-bottom: 1px solid var(--tb-border) !important;
  background: transparent !important;
  vertical-align: middle;
}
.theme-bento .winner-summary th,
.theme-bento #winner_summary th {
  background: rgba(99, 102, 241, 0.1) !important;
  color: var(--tb-text) !important;
  font-weight: 700 !important;
  white-space: nowrap;
}
.theme-bento .winner-summary td:first-child,
.theme-bento #winner_summary td:first-child {
  font-weight: 700 !important;
  white-space: nowrap;
}
.theme-bento .winner-summary td:nth-child(2),
.theme-bento .winner-summary td:nth-child(3),
.theme-bento .winner-summary td:nth-child(4),
.theme-bento #winner_summary td:nth-child(2),
.theme-bento #winner_summary td:nth-child(3),
.theme-bento #winner_summary td:nth-child(4) {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.theme-bento .winner-summary tr:last-child td,
.theme-bento #winner_summary tr:last-child td {
  border-bottom: none !important;
}
.theme-bento .winner-summary tr:hover td,
.theme-bento #winner_summary tr:hover td {
  background: rgba(99, 102, 241, 0.04) !important;
}
.theme-bento .additional-info {
  padding: 1.25rem;
}
.theme-bento .info-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.theme-bento .info-grid .info-card {
  min-width: 0;
  height: 100%;
  padding: 1.1rem 1rem;
  background: var(--tb-surface-elevated);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
}
.theme-bento .round-nav-internal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
@media (max-width: 1180px) {
  .theme-bento .winner-card-grid > .numbers-card,
  .theme-bento .winner-card-grid > .performance-card {
    grid-column: span 6;
  }
  .theme-bento .winner-card-grid > .summary-card {
    grid-column: span 12;
  }
}
@media (max-width: 900px) {
  .theme-bento .winner-header {
    flex-direction: column;
  }
  .theme-bento .winner-header-actions {
    width: 100%;
    justify-content: flex-start;
  }
  .theme-bento .winner-card-grid {
    grid-template-columns: 1fr;
  }
  .theme-bento .winner-card-grid > .numbers-card,
  .theme-bento .winner-card-grid > .performance-card,
  .theme-bento .winner-card-grid > .summary-card {
    grid-column: auto;
  }
  .theme-bento .info-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .theme-bento .analysis-article,
  .theme-bento .winner-section,
  .theme-bento .winner-detail-section,
  .theme-bento .additional-info {
    padding: 1rem;
  }
  .theme-bento .winner-card-grid > .winner-card {
    padding: 1rem;
  }
  .theme-bento .winner-summary table,
  .theme-bento #winner_summary table {
    min-width: 420px;
  }
  .theme-bento .winner-summary th,
  .theme-bento .winner-summary td,
  .theme-bento #winner_summary th,
  .theme-bento #winner_summary td {
    padding: 0.75rem 0.65rem !important;
    font-size: 0.875rem !important;
  }
}

/* ========== Reduced motion ========== */
@media (prefers-reduced-motion: reduce) {
  .theme-bento *,
  .theme-bento *::before,
  .theme-bento *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .theme-bento .card:hover,
  .theme-bento .post-card:hover,
  .theme-bento .quick-action-btn:hover,
  .theme-bento .btn:hover,
  .theme-bento .button:hover {
    transform: none !important;
  }
}

/* ========== Base container ========== */
.theme-bento .responsive-wrapper {
  max-width: 1280px;
}

/* ========== Topbar / Header (Soft Glass) ========== */
.theme-bento .header {
  background: var(--tb-glass-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--tb-glass-border);
  box-shadow: 0 1px 0 0 var(--tb-glass-border);
}
@media (prefers-color-scheme: dark) {
  .theme-bento:not([data-theme="light"]) .header {
    background: rgba(30,41,59,0.55);
    backdrop-filter: saturate(160%) blur(24px);
    -webkit-backdrop-filter: saturate(160%) blur(24px);
    border-bottom-color: rgba(71,85,105,0.4);
  }
}
.theme-bento.dark .header {
  background: rgba(30,41,59,0.55);
  backdrop-filter: saturate(160%) blur(24px);
  -webkit-backdrop-filter: saturate(160%) blur(24px);
  border-bottom-color: rgba(71,85,105,0.4);
}
@supports not (backdrop-filter: blur(12px)) {
  .theme-bento .header {
    background: var(--tb-surface);
  }
}
.theme-bento .header .header-logo a,
.theme-bento .header .nav-link {
  color: var(--tb-text);
  transition: color var(--tb-transition), background-color var(--tb-transition), transform var(--tb-transition);
}
.theme-bento .header .header-logo {
  background: transparent !important;
  max-width: none;
}
.theme-bento .header .header-logo a {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  padding: 0.25rem 0.1rem;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 1 !important;
}
.theme-bento .header .nav-link {
  border-radius: var(--tb-radius-pill);
  padding: 0.5rem 0.9rem;
}
.theme-bento .header .nav-link:hover {
  color: var(--tb-accent);
  background: rgba(99, 102, 241, 0.08);
}
.theme-bento .header .nav-link.active {
  color: var(--tb-accent);
  background: rgba(99, 102, 241, 0.14);
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
}
@media (prefers-color-scheme: dark) {
  .theme-bento:not([data-theme="light"]) .header .nav-link.active {
    background: rgba(129, 140, 248, 0.2);
    box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.25);
  }
}
.theme-bento .header .header-logo a h1 {
  color: var(--tb-text) !important;
  font-size: 1.25rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
  opacity: 1 !important;
}
.theme-bento .header .header-logo a h1 i {
  color: var(--tb-accent) !important;
  margin-right: 0.4rem;
}
.theme-bento .header .nav-dropdown {
  border-radius: var(--tb-radius-sm);
  box-shadow: var(--tb-shadow-lg);
  border: 1px solid var(--tb-border);
  padding: 0.5rem 0;
  margin-top: 0.5rem;
  overflow: hidden;
}
.theme-bento .header .nav-dropdown a {
  padding: 0.6rem 1rem;
  border-radius: 0;
  transition: background var(--tb-transition), color var(--tb-transition);
}
.theme-bento .header .nav-dropdown a:hover {
  background: var(--tb-surface-elevated);
  color: var(--tb-accent);
}

/* ========== Bento Grid (12 columns) ========== */
.theme-bento .bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1.25rem;
  width: 100%;
}
@media (max-width: 767px) {
  .theme-bento .bento-grid {
    grid-template-columns: 1fr;
  }
}
.theme-bento .bento-span-7 { grid-column: span 7; }
.theme-bento .bento-span-5 { grid-column: span 5; }
.theme-bento .bento-span-12 { grid-column: span 12; }
@media (max-width: 767px) {
  .theme-bento .bento-span-7,
  .theme-bento .bento-span-5,
  .theme-bento .bento-span-12 {
    grid-column: span 1;
  }
}

/* ========== Card (Neo-minimal, 호버 리프트 트렌드) ========== */
.theme-bento .card,
.theme-bento .post-card,
.theme-bento .generated-number-card {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-card);
  transition: box-shadow var(--tb-transition-slow), border-color var(--tb-transition), transform var(--tb-transition-slow);
}
.theme-bento .card:hover,
.theme-bento .post-card:hover {
  box-shadow: var(--tb-shadow-card-hover);
  border-color: var(--tb-border);
  transform: translateY(-2px);
}
/* 다크 모드: 섹션·위젯·소원카드 등 흰 배경 방지 */
@media (prefers-color-scheme: dark) {
  .theme-bento:not([data-theme="light"]) .main .section,
  .theme-bento:not([data-theme="light"]) .main-content .section,
  .theme-bento:not([data-theme="light"]) .widget,
  .theme-bento:not([data-theme="light"]) .wish-section,
  .theme-bento:not([data-theme="light"]) .wish-container {
    background: var(--tb-surface) !important;
    border-color: var(--tb-border);
    color: var(--tb-text);
  }
  .theme-bento:not([data-theme="light"]) .sidebar .widget {
    background: rgba(30,41,59,0.7) !important;
    backdrop-filter: saturate(140%) blur(16px);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    border: 1px solid var(--tb-border);
    box-shadow: var(--tb-shadow);
  }
}
.theme-bento.dark .main .section,
.theme-bento.dark .widget,
.theme-bento.dark .wish-section,
.theme-bento.dark .wish-container {
  background: var(--tb-surface) !important;
  border-color: var(--tb-border);
  color: var(--tb-text);
}
.theme-bento.dark .sidebar .widget {
  background: rgba(30,41,59,0.7) !important;
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border: 1px solid var(--tb-border);
}

/* ========== Buttons (트렌드: 호버 피드백) ========== */
.theme-bento .btn,
.theme-bento .button,
.theme-bento a.button {
  border-radius: var(--tb-radius-sm);
  font-weight: 600;
  transition: background-color var(--tb-transition), color var(--tb-transition), transform var(--tb-transition), box-shadow var(--tb-transition), border-color var(--tb-transition);
}
.theme-bento .btn:focus-visible,
.theme-bento .button:focus-visible,
.theme-bento a.button:focus-visible {
  outline: 2px solid var(--tb-accent);
  outline-offset: 2px;
}
.theme-bento .btn-primary,
.theme-bento .button.primary-button,
.theme-bento a.primary-button {
  background: var(--tb-accent);
  color: #fff;
  border: none;
  box-shadow: 0 1px 2px rgba(99, 102, 241, 0.2);
}
.theme-bento .btn-primary:hover,
.theme-bento .button.primary-button:hover,
.theme-bento a.primary-button:hover {
  background: var(--tb-accent-hover);
  box-shadow: 0 4px 12px -2px rgba(99, 102, 241, 0.35);
  transform: translateY(-1px);
}
.theme-bento .btn-secondary,
.theme-bento .button.secondary-button,
.theme-bento a.secondary-button {
  background: var(--tb-surface);
  color: var(--tb-text);
  border: 1px solid var(--tb-border);
}
.theme-bento .btn-secondary:hover,
.theme-bento .button.secondary-button:hover {
  background: var(--tb-surface-elevated);
  border-color: var(--tb-muted);
  transform: translateY(-1px);
}
.theme-bento .btn.ghost,
.theme-bento .button.ghost {
  background: transparent;
  color: var(--tb-text);
}
.theme-bento .btn.ghost:hover,
.theme-bento .button.ghost:hover {
  background: var(--tb-surface-elevated);
}

/* ========== Fields & Inputs ========== */
.theme-bento .field {
  margin-bottom: 1rem;
}
.theme-bento .field label,
.theme-bento label:not(.toggle) {
  color: var(--tb-text);
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.35rem;
  display: inline-block;
}
.theme-bento .input,
.theme-bento input[type="text"],
.theme-bento input[type="email"],
.theme-bento input[type="password"],
.theme-bento textarea,
.theme-bento select {
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  color: var(--tb-text);
  font-size: 1rem;
  transition: border-color var(--tb-transition), box-shadow var(--tb-transition);
  box-sizing: border-box;
}
.theme-bento .input:focus,
.theme-bento input:focus,
.theme-bento textarea:focus,
.theme-bento select:focus {
  border-color: var(--tb-accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.theme-bento input::placeholder,
.theme-bento textarea::placeholder {
  color: var(--tb-muted);
  opacity: 1;
}
.theme-bento input:focus-visible,
.theme-bento textarea:focus-visible,
.theme-bento select:focus-visible {
  outline: 2px solid var(--tb-accent);
  outline-offset: 0;
}

/* ========== Chip ========== */
.theme-bento .chip,
.theme-bento .wish-example,
.theme-bento .category-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.85rem;
  background: var(--tb-surface-elevated);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-pill);
  font-size: 0.9rem;
  color: var(--tb-text);
  transition: background var(--tb-transition), border-color var(--tb-transition), color var(--tb-transition);
}
.theme-bento .chip:hover,
.theme-bento .wish-example:hover {
  background: var(--tb-surface);
  border-color: var(--tb-accent);
}
.theme-bento .category-tab.active {
  background: var(--tb-accent);
  color: #fff;
  border-color: var(--tb-accent);
}

/* ========== Table ========== */
.theme-bento table,
.theme-bento .posts-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tb-surface);
  border-radius: var(--tb-radius);
  overflow: hidden;
  box-shadow: var(--tb-shadow);
  border: 1px solid var(--tb-border);
}
.theme-bento .posts-table th,
.theme-bento .posts-table td,
.theme-bento table th,
.theme-bento table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .posts-table thead th,
.theme-bento table thead th {
  background: var(--tb-surface-elevated);
  color: var(--tb-text);
  font-weight: 600;
}
.theme-bento .posts-table tbody tr:hover,
.theme-bento table tbody tr:hover {
  background: var(--tb-surface-elevated);
}

/* ========== Modal & Overlay ========== */
.theme-bento .modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  overflow: auto;
  background: rgba(0,0,0,0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  align-items: center;
  justify-content: center;
}
.theme-bento .modal[style*="display: block"],
.theme-bento .modal[style*="display:flex"] {
  display: flex !important;
}
@supports not (backdrop-filter: blur(4px)) {
  .theme-bento .modal {
    background: rgba(0,0,0,0.55);
  }
}
.theme-bento .modal .modal-content {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow-lg);
  padding: 1.5rem;
  max-width: 90%;
  width: 100%;
  margin: auto;
}
.theme-bento .modal .close {
  color: var(--tb-muted);
  cursor: pointer;
}
.theme-bento .modal .close:hover {
  color: var(--tb-text);
}
.theme-bento .modal .modal-content input,
.theme-bento .modal .modal-content textarea {
  margin-bottom: 0.75rem;
}

/* ========== Lotto Balls (ball_645 + ball1~ball5, r1~r5) ========== */
.theme-bento .ball_645,
.theme-bento .ball,
.theme-bento .lotto-number-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  flex-shrink: 0;
}
.theme-bento .ball_645.mid,
.theme-bento .lotto-number-item.simple-number {
  width: 2.75rem;
  height: 2.75rem;
  font-size: 1.05rem;
}
.theme-bento .ball_645.sml {
  width: 2rem;
  height: 2rem;
  font-size: 0.85rem;
}
/* 1-10 */
.theme-bento .ball_645.ball1,
.theme-bento .ball_645.r1,
.theme-bento .lotto-number-item.ball1 { background: linear-gradient(145deg, #f59e0b, #d97706); }
/* 11-20 */
.theme-bento .ball_645.ball2,
.theme-bento .ball_645.r2,
.theme-bento .lotto-number-item.ball2 { background: linear-gradient(145deg, #2563eb, #1d4ed8); }
/* 21-30 */
.theme-bento .ball_645.ball3,
.theme-bento .ball_645.r3,
.theme-bento .lotto-number-item.ball3 { background: linear-gradient(145deg, #dc2626, #b91c1c); }
/* 31-40 */
.theme-bento .ball_645.ball4,
.theme-bento .ball_645.r4,
.theme-bento .lotto-number-item.ball4 { background: linear-gradient(145deg, #6b7280, #4b5563); }
/* 41-45 */
.theme-bento .ball_645.ball5,
.theme-bento .ball_645.r5,
.theme-bento .lotto-number-item.ball5 { background: linear-gradient(145deg, #16a34a, #15803d); }

/* ========== Generator: wish section & cards ========== */
.theme-bento .wish-section,
.theme-bento .wish-container {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.5rem;
  box-shadow: var(--tb-shadow);
}
.theme-bento .content-header-intro h2,
.theme-bento .section-header h1 {
  color: var(--tb-text);
}
.theme-bento .content-header-intro h2 .mobile-toggle {
  color: var(--tb-muted);
  font-size: 0.9em;
}

/* ========== 번호 설정 카드 그리드 (#settings-container, .card-grid) ========== */
.theme-bento .content-main,
.theme-bento #settings-container,
.theme-bento .content#settings-container {
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 1rem;
}
.theme-bento .card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}
.theme-bento .card-grid .card,
.theme-bento article.card {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border) !important;
  border-radius: var(--tb-radius-sm) !important;
  box-shadow: var(--tb-shadow) !important;
  overflow: hidden;
  padding: 0;
}
.theme-bento .card-grid .card .card-header,
.theme-bento article.card .card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border-bottom: 1px solid var(--tb-border);
  background: var(--tb-surface-elevated);
}
.theme-bento .card-grid .card .card-header h3,
.theme-bento article.card .card-header h3 {
  color: var(--tb-text) !important;
  font-size: 1rem !important;
  font-weight: 600;
  margin: 0;
}
.theme-bento .card-grid .card .card-body,
.theme-bento article.card .card-body {
  padding: 1rem;
  color: var(--tb-text);
  font-size: 0.9rem;
  line-height: 1.5;
}
.theme-bento .card-grid .card .card-footer,
.theme-bento article.card .card-footer {
  padding: 0.75rem 1rem;
  font-size: 0.8rem;
  color: var(--tb-muted);
  border-top: 1px solid var(--tb-border);
  background: var(--tb-surface);
}

/* 꿈 해몽 섹션 (dream-section) — 테마 그라데이션 통일 */
.theme-bento .dream-section {
  margin-top: 1.5rem !important;
  padding: 1.5rem !important;
  background: linear-gradient(135deg, var(--tb-accent) 0%, #7c3aed 100%) !important;
  border-radius: var(--tb-radius) !important;
  color: #fff !important;
  border: none;
}
.theme-bento .dream-section h3 {
  color: #fff !important;
  font-size: 1.2rem !important;
  margin: 0 0 0.5rem 0 !important;
}
.theme-bento .dream-section p {
  color: rgba(255,255,255,0.95) !important;
  font-size: 0.95rem !important;
  margin: 0 0 1rem 0 !important;
  max-width: none;
}
.theme-bento .dream-section .dream-input-container textarea {
  background: rgba(255,255,255,0.12) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  border-radius: var(--tb-radius-sm);
  color: #fff !important;
  padding: 0.75rem 1rem;
}
.theme-bento .dream-section .dream-input-container textarea::placeholder {
  color: rgba(255,255,255,0.7);
}
.theme-bento .dream-section .button.primary-button {
  background: #fff !important;
  color: var(--tb-accent) !important;
  border: none !important;
}

/* 섹션·위젯 Neo-minimal 통일 */
.theme-bento .main .section,
.theme-bento .main-content .section {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
}
.theme-bento .section-header h2,
.theme-bento .widget-header h3 {
  color: var(--tb-text);
  margin-bottom: 0.5em;
}
.theme-bento .widget {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
  overflow: hidden;
}
.theme-bento .widget-header {
  color: var(--tb-text);
  border-bottom: 1px solid var(--tb-border);
}
.theme-bento .stats-grid-mini,
.theme-bento .widget .stats-grid-mini {
  color: var(--tb-text);
}
.theme-bento .stats-grid-mini .stat-value,
.theme-bento .stat-mini-value {
  color: var(--tb-text);
  font-weight: 700;
}
.theme-bento .stats-grid-mini .stat-label,
.theme-bento .stat-mini-label {
  color: var(--tb-muted);
  font-size: 0.875rem;
}
.theme-bento .stats-grid-mini .stat-desc,
.theme-bento .widget .activity-item,
.theme-bento .widget a {
  color: var(--tb-muted);
}
.theme-bento .widget .activity-item a:hover {
  color: var(--tb-accent);
}
.theme-bento .count-btn,
.theme-bento .generation-count-section .count-selector button {
  background: var(--tb-surface-elevated);
  color: var(--tb-text);
  border: 1px solid var(--tb-border);
}
.theme-bento .count-btn.active,
.theme-bento .generation-count-section .count-selector button.active {
  background: var(--tb-accent);
  color: #fff;
  border-color: var(--tb-accent);
}
.theme-bento .content-main .card-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.theme-bento .content-main .card {
  padding: 1rem;
}
.theme-bento .quick-action-buttons .button {
  border-radius: var(--tb-radius-sm);
}

/* ========== Community: view toggle, login prompt ========== */
.theme-bento .view-toggle-btn {
  border-radius: var(--tb-radius-sm);
  border: 1px solid var(--tb-border);
  background: var(--tb-surface);
  color: var(--tb-text);
}
.theme-bento .view-toggle-btn:hover {
  border-color: var(--tb-accent);
  color: var(--tb-accent);
}
.theme-bento .view-toggle-btn.active {
  background: var(--tb-accent);
  color: #fff;
  border-color: var(--tb-accent);
}
.theme-bento .login-prompt {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
}
.theme-bento .community-header {
  background: linear-gradient(135deg, var(--tb-accent) 0%, #7c3aed 100%);
  color: #fff;
  border-radius: var(--tb-radius);
  padding: 2rem 1.5rem;
}
.theme-bento .community-header h1 {
  color: #fff;
  font-size: 1.75rem;
  margin-bottom: 0.25em;
}
.theme-bento .community-header p {
  color: rgba(255,255,255,0.9);
  font-size: 1rem;
  max-width: none;
}
.theme-bento .sort-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.95rem;
  flex-wrap: wrap;
}
.theme-bento .sort-tabs .sort-tab {
  border-radius: var(--tb-radius-pill);
}
.theme-bento .view-toggle-btn-sm {
  padding: 0.3rem 0.5rem !important;
  font-size: 0.8rem !important;
}
.theme-bento .table-row-actions {
  display: inline-flex;
  gap: 0.35rem;
}
.theme-bento .table-like-btn {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
}
.theme-bento .table-notice-badge,
.theme-bento .post-notice-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 0.35rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  background: rgba(239, 68, 68, 0.12);
  color: #dc2626;
  font-size: 0.75rem;
  font-weight: 700;
  vertical-align: middle;
}
.theme-bento .post-header-main,
.theme-bento .post-detail-header-main {
  flex: 1;
  min-width: 0;
}
.theme-bento .post-inline-numbers,
.theme-bento .post-meta-panel {
  margin: 1rem 0;
  padding: 0.9rem 1rem;
  border-radius: var(--tb-radius-sm);
  border: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .post-inline-numbers,
.theme-bento .post-numbers-panel {
  background: var(--tb-surface-elevated);
}
.theme-bento .post-wish-panel {
  background: linear-gradient(180deg, rgba(250, 204, 21, 0.12), rgba(250, 204, 21, 0.05));
}
.theme-bento .post-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.theme-bento .btn-edit,
.theme-bento .btn-delete,
.theme-bento .btn-report,
.theme-bento .comment-delete-btn,
.theme-bento .comment-report-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.8rem;
  border-radius: var(--tb-radius-sm);
  border: 1px solid var(--tb-border);
  background: var(--tb-surface);
  color: var(--tb-text);
  cursor: pointer;
  font-size: 0.85rem;
  transition: background var(--tb-transition), border-color var(--tb-transition), color var(--tb-transition);
}
.theme-bento .btn-edit:hover {
  border-color: var(--tb-accent);
  color: var(--tb-accent);
}
.theme-bento .btn-delete,
.theme-bento .comment-delete-btn {
  color: #dc2626;
}
.theme-bento .btn-delete:hover,
.theme-bento .comment-delete-btn:hover {
  background: rgba(239, 68, 68, 0.08);
  border-color: rgba(239, 68, 68, 0.24);
}
.theme-bento .btn-report:hover,
.theme-bento .comment-report-btn:hover {
  color: var(--tb-accent);
  border-color: var(--tb-accent);
}
.theme-bento .community-write-modal {
  max-width: 800px;
}
.theme-bento .community-field {
  width: 100%;
  margin-bottom: 0.95rem;
}
.theme-bento .community-editor {
  min-height: 300px;
  margin-bottom: 0.95rem;
}
.theme-bento .community-notice-option {
  margin-bottom: 0.95rem;
  display: none;
}
.theme-bento .community-notice-option label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-bento .post-detail-card {
  max-width: 100%;
}
.theme-bento .post-detail-title {
  font-size: 1.8rem;
  margin-bottom: 0.9rem;
}
.theme-bento .post-detail-content {
  padding: 1.25rem 0;
  font-size: 1rem;
  line-height: 1.8;
}
.theme-bento .post-detail-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--tb-border);
}
.theme-bento .comments-section {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--tb-border);
}
.theme-bento .comments-title {
  margin-bottom: 1rem;
  font-size: 1.3rem;
  color: var(--tb-text);
}
.theme-bento .comments-count-badge {
  color: var(--tb-accent);
  font-size: 0.9rem;
}
.theme-bento .comment-form-container {
  margin-bottom: 1.5rem;
  padding: 1.1rem;
  background: var(--tb-surface-elevated);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
}
.theme-bento .comment-textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.85rem;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  font-size: 1rem;
  resize: vertical;
  font-family: inherit;
  box-sizing: border-box;
  white-space: normal !important;
  word-spacing: normal !important;
  letter-spacing: normal !important;
}
.theme-bento .comment-form-actions {
  margin-top: 0.65rem;
  display: flex;
  justify-content: flex-end;
}
.theme-bento .comment-submit-btn {
  padding: 0.65rem 1.25rem;
}
.theme-bento .comments-login-prompt {
  text-align: center;
  padding: 1rem;
}
.theme-bento .comments-login-prompt p {
  margin-bottom: 0.85rem;
  color: var(--tb-muted);
  max-width: none;
}
.theme-bento .comments-list {
  margin-top: 1rem;
}
.theme-bento .comments-loading,
.theme-bento .comments-empty-state {
  padding: 1.25rem;
}
.theme-bento .comments-back {
  margin-top: 1.5rem;
}
.theme-bento .comments-back .btn {
  padding: 0.65rem 1rem;
}
.theme-bento .comment-item {
  margin-bottom: 0.9rem;
  padding: 1rem;
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
}
.theme-bento .comment-item-inner {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}
.theme-bento .comment-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tb-accent) 0%, #7c3aed 100%);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  flex-shrink: 0;
}
.theme-bento .comment-main {
  flex: 1;
  min-width: 0;
}
.theme-bento .comment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.theme-bento .comment-author-meta {
  min-width: 0;
}
.theme-bento .comment-author-name {
  color: var(--tb-text);
}
.theme-bento .comment-time {
  color: var(--tb-muted);
  font-size: 0.85rem;
  margin-left: 0.5rem;
}
.theme-bento .comment-actions,
.theme-bento .comment-reactions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.theme-bento .comment-content {
  color: var(--tb-text);
  line-height: 1.6;
  white-space: pre-line;
  word-break: break-word;
  text-indent: 0;
}
.theme-bento .comment-reactions {
  margin-top: 0.65rem;
}
.theme-bento .comment-like-btn {
  background: none;
  border: none;
  color: var(--tb-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.3rem 0;
}
.theme-bento .comment-like-btn.liked {
  color: #e74c3c;
}
@media (max-width: 768px) {
  .theme-bento .comment-head,
  .theme-bento .comment-item-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .theme-bento .comment-time {
    display: block;
    margin-left: 0;
    margin-top: 0.2rem;
  }
}

/* ========== 통일: 커뮤니티/목록/포스트 (인라인 스타일 오버라이드) ========== */
.theme-bento .posts-table .col-meta,
.theme-bento .posts-container.posts-as-table .posts-table td.col-meta {
  color: var(--tb-muted) !important;
  font-size: 0.9rem !important;
}
.theme-bento .posts-table thead th {
  background: var(--tb-surface-elevated) !important;
  color: var(--tb-text) !important;
}
.theme-bento .posts-table .col-title a {
  color: var(--tb-text);
  font-weight: 600;
}
.theme-bento .posts-table .col-title a:hover {
  color: var(--tb-accent);
}
.theme-bento .posts-table tbody tr:hover {
  background: var(--tb-surface-elevated) !important;
}
.theme-bento .view-toggle-wrap span {
  color: var(--tb-muted);
  font-size: 0.9rem;
}
.theme-bento .view-toggle-btn {
  background: var(--tb-surface) !important;
  color: var(--tb-text) !important;
  border: 1px solid var(--tb-border);
}
.theme-bento .view-toggle-btn.active {
  background: var(--tb-accent) !important;
  color: #fff !important;
  border-color: var(--tb-accent);
}
.theme-bento .post-list-item,
.theme-bento .post-list-item:hover {
  color: var(--tb-text);
  border-bottom-color: var(--tb-border);
}
.theme-bento .post-list-item:hover {
  background: var(--tb-surface-elevated) !important;
}
.theme-bento .post-list-title {
  color: var(--tb-text) !important;
  font-size: 0.95rem;
  line-height: 1.45;
}
.theme-bento .post-list-meta {
  color: var(--tb-muted) !important;
  font-size: 0.85rem;
}
.theme-bento .post-card-large {
  background: var(--tb-surface) !important;
  color: var(--tb-text);
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow);
}
.theme-bento .post-title-large {
  color: var(--tb-text) !important;
}
.theme-bento .post-content-preview {
  color: var(--tb-muted) !important;
  line-height: 1.6;
}
.theme-bento .post-category-badge {
  background: var(--tb-surface-elevated);
  color: var(--tb-accent) !important;
}
.theme-bento .post-footer-large {
  border-top-color: var(--tb-border);
}
.theme-bento .stat-mini {
  background: var(--tb-surface-elevated) !important;
  border-radius: var(--tb-radius-sm);
  color: var(--tb-text);
}
.theme-bento .stat-mini-value {
  color: var(--tb-accent);
  font-size: 1.5rem;
}
.theme-bento .activity-author {
  color: var(--tb-text) !important;
  font-size: 0.9rem;
}
.theme-bento .activity-text {
  color: var(--tb-muted) !important;
  font-size: 0.875rem;
  line-height: 1.45;
}
.theme-bento .activity-time {
  color: var(--tb-muted) !important;
  font-size: 0.8rem;
}
.theme-bento .activity-avatar {
  background: var(--tb-accent) !important;
  color: #fff;
}
.theme-bento .section-header a {
  color: var(--tb-accent) !important;
  font-size: 0.9rem;
}
.theme-bento .section-header a:hover {
  color: var(--tb-accent-hover);
  text-decoration: underline;
}
.theme-bento .loading {
  color: var(--tb-muted) !important;
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  padding: 2rem 1.5rem;
}
.theme-bento .empty-state {
  color: var(--tb-muted) !important;
  font-size: 1rem;
  line-height: 1.6;
}
.theme-bento .empty-state i {
  color: var(--tb-border);
}
.theme-bento .like-btn {
  color: var(--tb-muted);
}
.theme-bento .like-btn:hover {
  color: var(--tb-accent);
}
.theme-bento .like-btn.liked {
  color: #e11d48;
}
.theme-bento .write-post-btn {
  background: var(--tb-accent) !important;
  color: #fff !important;
  box-shadow: var(--tb-shadow-lg);
}
.theme-bento .write-post-btn:hover {
  background: var(--tb-accent-hover) !important;
}
.theme-bento .login-prompt {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .login-prompt h3 {
  color: var(--tb-text);
}
.theme-bento .btn-group .btn {
  font-size: 1rem;
  padding: 0.75rem 1.25rem;
}
.theme-bento .post-card {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow);
  color: var(--tb-text);
}
.theme-bento .post-title {
  color: var(--tb-text) !important;
  font-size: 1.15rem;
  line-height: 1.4;
}
.theme-bento .post-title:hover {
  color: var(--tb-accent);
}
.theme-bento .post-meta {
  color: var(--tb-muted) !important;
  font-size: 0.9rem;
}
.theme-bento .post-content {
  color: var(--tb-muted) !important;
  line-height: 1.6;
}
.theme-bento .post-footer {
  border-top-color: var(--tb-border);
}
.theme-bento .author-avatar {
  background: var(--tb-accent) !important;
  color: #fff;
}
.theme-bento .category-tabs {
  border-bottom-color: var(--tb-border);
}
.theme-bento .category-tab {
  background: var(--tb-surface) !important;
  border-color: var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .category-tab:hover {
  border-color: var(--tb-accent);
  color: var(--tb-accent);
}
.theme-bento .category-tab.active {
  background: var(--tb-accent) !important;
  color: #fff !important;
  border-color: var(--tb-accent);
}
.theme-bento .user-header-info,
.theme-bento .user-avatar-small {
  color: var(--tb-text);
}
.theme-bento .user-avatar-small {
  background: var(--tb-accent) !important;
  color: #fff;
}

/* ========== 생성기 전용: 섹션 설명·면책 (클래스로 통일) ========== */
.theme-bento .section-header-desc {
  color: var(--tb-muted);
  font-size: 0.95rem;
  margin-top: 0.5rem;
  margin-bottom: 0;
  line-height: 1.5;
}
.theme-bento .disclaimer {
  margin-top: 1.5rem;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  line-height: 1.6;
}
.theme-bento .theme-bento-generator-section {
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ========== Main background ========== */
body.theme-bento {
  background: var(--tb-bg) !important;
  color: var(--tb-text) !important;
}
.theme-bento .main {
  background: var(--tb-bg) !important;
  color: var(--tb-text) !important;
}
.theme-bento .disclaimer {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  color: var(--tb-muted) !important;
  border-radius: var(--tb-radius-sm);
}

/* ========== 공통: 퀵액션, 레이아웃 ========== */
.theme-bento .quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.theme-bento .quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1.25rem 1rem;
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  color: var(--tb-text);
  text-decoration: none;
  font-weight: 500;
  transition: box-shadow var(--tb-transition-slow), border-color var(--tb-transition), transform var(--tb-transition-slow), color var(--tb-transition);
  box-shadow: var(--tb-shadow-card);
  min-height: 4.5rem;
}
.theme-bento .quick-action-btn:hover {
  border-color: var(--tb-accent);
  box-shadow: var(--tb-shadow-card-hover);
  transform: translateY(-3px);
}
.theme-bento .quick-action-btn i {
  font-size: 1.5rem;
  opacity: 0.9;
}
.theme-bento .quick-action-btn h3 {
  margin: 0;
  font-size: 0.9375rem;
  font-weight: 600;
}

/* ========== 강제 오버라이드: 임베디드/기존 CSS 대응 (가독성·통일) ========== */
.theme-bento .widget {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border) !important;
  color: var(--tb-text) !important;
  box-shadow: var(--tb-shadow) !important;
}
.theme-bento .widget-header {
  border-bottom-color: var(--tb-border) !important;
}
.theme-bento .widget-header h3 {
  color: var(--tb-text) !important;
  font-size: 1.1rem !important;
}
.theme-bento .widget-header i {
  color: var(--tb-accent) !important;
}
.theme-bento .widget-header a.section-header-link {
  color: var(--tb-accent) !important;
  font-size: 0.9rem !important;
}
.theme-bento .quick-action-btn {
  background: var(--tb-surface) !important;
  color: var(--tb-text) !important;
  border: 1px solid var(--tb-border) !important;
}
.theme-bento .quick-action-btn:hover {
  color: var(--tb-accent) !important;
  border-color: var(--tb-accent) !important;
}
.theme-bento .quick-action-btn i {
  color: var(--tb-accent) !important;
}
.theme-bento .post-card-large {
  background: var(--tb-surface) !important;
  color: var(--tb-text) !important;
  border: 1px solid var(--tb-border) !important;
  box-shadow: var(--tb-shadow) !important;
}
.theme-bento .post-card-large:hover {
  box-shadow: var(--tb-shadow-lg) !important;
}
.theme-bento .post-title-large {
  color: var(--tb-text) !important;
  font-size: 1.2rem !important;
  line-height: 1.4 !important;
}
.theme-bento .post-content-preview {
  color: var(--tb-muted) !important;
  line-height: 1.6 !important;
}
.theme-bento .post-footer-large {
  border-top-color: var(--tb-border) !important;
}
.theme-bento .user-name {
  color: var(--tb-text) !important;
  font-size: 0.9rem !important;
}
.theme-bento .post-time {
  color: var(--tb-muted) !important;
  font-size: 0.85rem !important;
}
.theme-bento .post-footer-stats {
  display: flex;
  gap: 1rem;
  color: var(--tb-muted) !important;
  font-size: 0.9rem !important;
  line-height: 1.5;
}
.theme-bento .post-footer-stats i {
  margin-right: 0.25rem;
  opacity: 0.9;
}
.theme-bento .section-header h2 {
  color: var(--tb-text) !important;
  font-size: 1.35rem !important;
}
.theme-bento .section-header a,
.theme-bento .section-header-link {
  color: var(--tb-accent) !important;
  font-size: 0.9rem !important;
}
.theme-bento .content-header h2 {
  color: var(--tb-text) !important;
}
.theme-bento .content-header h2 i {
  color: var(--tb-accent) !important;
}
.theme-bento .content-header p {
  color: var(--tb-muted) !important;
  font-size: 1rem !important;
}
.theme-bento .main {
  background: var(--tb-bg) !important;
  color: var(--tb-text) !important;
  padding: 2rem 0 3rem !important;
  min-height: 50vh;
}
.theme-bento .section {
  margin-bottom: 1.5rem !important;
}
.theme-bento #comment-content {
  color: var(--tb-text) !important;
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border) !important;
  border-radius: var(--tb-radius-sm);
  padding: 0.75rem 1rem;
  line-height: 1.6;
  font-size: 1rem;
}
.theme-bento .activity-item {
  color: inherit !important;
  text-decoration: none !important;
}
.theme-bento .activity-item:hover {
  color: inherit !important;
}
.theme-bento .user-info-text {
  color: var(--tb-text);
}
.theme-bento .user-info-text .post-time {
  margin-top: 0.15rem;
}

/* ========== 생성 번호 당첨 통계 (메인 페이지) ========== */
.theme-bento .generated-numbers-stats {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.5rem;
  box-shadow: var(--tb-shadow);
}
.theme-bento .stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.theme-bento .stats-card {
  text-align: center;
  padding: 1.25rem;
  border-radius: var(--tb-radius-sm);
  color: #fff;
}
.theme-bento .stats-card-1 { background: linear-gradient(135deg, var(--tb-accent) 0%, #7c3aed 100%); }
.theme-bento .stats-card-2 { background: linear-gradient(135deg, #ec4899 0%, #f43f5e 100%); }
.theme-bento .stats-card-3 { background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%); }
.theme-bento .stats-card-4 { background: linear-gradient(135deg, #10b981 0%, #14b8a6 100%); }
.theme-bento .stats-card-value {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.35rem;
  font-variant-numeric: tabular-nums;
}
.theme-bento .stats-card-label {
  font-size: 0.875rem;
  opacity: 0.95;
}
.theme-bento .stats-prize-title {
  margin: 0 0 1rem 0 !important;
  font-size: 1.15rem !important;
  color: var(--tb-text) !important;
}
.theme-bento .stats-recent-title {
  margin-top: 1.75rem !important;
}
.theme-bento .stats-table-wrap {
  overflow-x: auto;
  border-radius: var(--tb-radius-sm);
  border: 1px solid var(--tb-border);
}
.theme-bento .stats-prize-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tb-surface);
  font-size: 0.9375rem;
}
.theme-bento .stats-prize-table th {
  background: var(--tb-surface-elevated);
  color: var(--tb-text);
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.theme-bento .stats-prize-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .stats-prize-table tr:last-child td {
  border-bottom: none;
}
.theme-bento .stats-prize-table .text-right { text-align: right; }
.theme-bento .stats-prize-table .muted { color: var(--tb-muted); }
.theme-bento .stats-prize-table .fw-600 { font-weight: 600; }
.theme-bento .stats-prize-table .rank-1 { color: #eab308; font-weight: 600; }
.theme-bento .stats-prize-table .rank-2 { color: #3b82f6; font-weight: 600; }
.theme-bento .stats-prize-table .rank-3 { color: #ef4444; font-weight: 600; }
.theme-bento .stats-prize-table .rank-4 { color: #64748b; font-weight: 600; }
.theme-bento .stats-prize-table .rank-5 { color: #22c55e; font-weight: 600; }

/* ========== 랭킹 페이지 ========== */
.theme-bento .ranking-header {
  background: linear-gradient(135deg, var(--tb-accent) 0%, #ec4899 100%) !important;
  color: #fff !important;
  padding: 2.5rem 1.5rem !important;
  text-align: center;
  margin-bottom: 1.5rem;
  border-radius: var(--tb-radius);
}
.theme-bento .ranking-header h1 {
  color: #fff !important;
  font-size: 1.75rem !important;
  margin: 0 0 0.35em 0 !important;
}
.theme-bento .ranking-header p {
  color: rgba(255,255,255,0.95) !important;
  font-size: 1rem !important;
  margin: 0 !important;
  max-width: none;
}
.theme-bento .ranking-tabs {
  margin-bottom: 1.5rem;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.theme-bento .ranking-tab {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border) !important;
  color: var(--tb-text) !important;
  padding: 0.65rem 1.25rem;
  border-radius: var(--tb-radius-sm);
  font-weight: 500;
}
.theme-bento .ranking-tab:hover {
  border-color: var(--tb-accent) !important;
  color: var(--tb-accent) !important;
}
.theme-bento .ranking-tab.active {
  background: var(--tb-accent) !important;
  color: #fff !important;
  border-color: var(--tb-accent) !important;
}
.theme-bento .ranking-table {
  background: var(--tb-surface) !important;
  border-radius: var(--tb-radius);
  overflow: hidden;
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow);
}
.theme-bento .ranking-item {
  border-bottom: 1px solid var(--tb-border) !important;
  padding: 1rem 1.25rem !important;
  color: var(--tb-text);
}
.theme-bento .ranking-item:hover {
  background: var(--tb-surface-elevated) !important;
}
.theme-bento .ranking-item:last-child {
  border-bottom: none !important;
}
.theme-bento .rank-number {
  color: var(--tb-muted);
  font-size: 1.35rem;
  font-weight: 700;
}
.theme-bento .rank-number.top1 { color: #eab308; }
.theme-bento .rank-number.top2 { color: #94a3b8; }
.theme-bento .rank-number.top3 { color: #b45309; }
.theme-bento .user-avatar {
  background: var(--tb-accent) !important;
  color: #fff;
}
.theme-bento .user-details h3 {
  color: var(--tb-text) !important;
  font-size: 1.05rem !important;
  margin: 0 !important;
}
.theme-bento .user-details p {
  color: var(--tb-muted) !important;
  font-size: 0.9rem !important;
  margin: 0.35rem 0 0 0 !important;
}
.theme-bento .stat-box .stat-value {
  color: var(--tb-accent) !important;
  font-size: 1.2rem;
  font-weight: 700;
}
.theme-bento .stat-box .stat-label {
  color: var(--tb-muted) !important;
  font-size: 0.85rem !important;
  margin-top: 0.25rem !important;
}

/* ========== 분석 페이지 ========== */
.theme-bento .analysis-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}
.theme-bento .analysis-header {
  text-align: center;
  margin-bottom: 2rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, var(--tb-accent) 0%, #7c3aed 100%) !important;
  border-radius: var(--tb-radius);
  color: #fff !important;
}
.theme-bento .analysis-header h1 {
  color: #fff !important;
  font-size: 1.75rem !important;
  margin: 0 0 0.35em 0 !important;
}
.theme-bento .analysis-header p {
  color: rgba(255,255,255,0.95) !important;
  font-size: 1rem !important;
  margin: 0 !important;
  opacity: 1;
  max-width: none;
}
.theme-bento .analysis-section {
  margin-bottom: 2rem;
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  padding: 1.5rem;
  box-shadow: var(--tb-shadow);
}
.theme-bento .section-title {
  font-size: 1.25rem !important;
  margin-bottom: 1rem !important;
  color: var(--tb-text) !important;
  border-bottom: 2px solid var(--tb-accent) !important;
  padding-bottom: 0.5rem;
}
.theme-bento .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.theme-bento .stat-card {
  background: var(--tb-surface-elevated) !important;
  padding: 1.25rem;
  border-radius: var(--tb-radius-sm);
  text-align: center;
  border: 1px solid var(--tb-border);
  border-left: 4px solid var(--tb-accent);
}
.theme-bento .stat-number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--tb-accent) !important;
  margin-bottom: 0.25rem;
}
.theme-bento .analysis-section .stat-label {
  color: var(--tb-muted) !important;
  font-size: 0.9rem !important;
}
.theme-bento .pattern-help-section {
  margin-bottom: 1.25rem;
}
.theme-bento .pattern-help-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  border-radius: var(--tb-radius-pill);
  border: 1px solid rgba(99, 102, 241, 0.22);
  background: rgba(99, 102, 241, 0.08);
  color: var(--tb-accent);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--tb-transition), border-color var(--tb-transition), color var(--tb-transition), box-shadow var(--tb-transition);
}
.theme-bento .pattern-help-toggle:hover {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.34);
}
.theme-bento .pattern-help-toggle.active {
  background: var(--tb-accent);
  color: #fff;
  border-color: var(--tb-accent);
  box-shadow: 0 10px 24px -12px rgba(99, 102, 241, 0.65);
}
.theme-bento .pattern-help-content {
  margin-top: 1rem;
  padding: 1.25rem;
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.05), rgba(99, 102, 241, 0.02));
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
}
.theme-bento .pattern-help-content[hidden] {
  display: none !important;
}
.theme-bento .pattern-help-content h4 {
  margin: 0 0 1rem;
  padding-bottom: 0.75rem;
  color: var(--tb-text);
  font-size: 1.05rem;
  border-bottom: 1px solid var(--tb-border);
}
.theme-bento .pattern-explanation {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}
.theme-bento .pattern-item {
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  border-left: 4px solid var(--tb-accent);
  border-radius: var(--tb-radius-sm);
  padding: 1rem;
  box-shadow: var(--tb-shadow);
}
.theme-bento .pattern-item strong {
  display: block;
  margin-bottom: 0.65rem;
  color: var(--tb-text);
  font-size: 0.98rem;
}
.theme-bento .pattern-item p {
  margin: 0.5rem 0;
  max-width: none;
  color: var(--tb-muted);
  font-size: 0.92rem;
  line-height: 1.65;
}
.theme-bento .pattern-item ul {
  margin: 0.75rem 0 0;
  padding-left: 1.1rem;
}
.theme-bento .pattern-item li {
  margin: 0.4rem 0;
  color: var(--tb-text);
  font-size: 0.9rem;
  line-height: 1.55;
}
.theme-bento .pattern-item code {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: var(--tb-surface-elevated);
  border: 1px solid var(--tb-border);
  color: var(--tb-accent);
  font-size: 0.82rem;
}
.theme-bento .pattern-item small {
  color: var(--tb-muted);
  font-style: normal;
}
.theme-bento .analysis-empty-state {
  text-align: center;
}
.theme-bento .analysis-empty-body {
  padding: 2.5rem 1.25rem;
}
.theme-bento .analysis-empty-copy {
  margin: 0 0 1.25rem;
  color: var(--tb-muted) !important;
  font-size: 1.05rem;
  line-height: 1.7;
}
.theme-bento .band-analysis-intro {
  margin-bottom: 1rem;
  color: var(--tb-muted) !important;
}
.theme-bento .band-analysis-heading {
  margin: 0 0 0.9rem;
  color: var(--tb-text);
  font-size: 1.05rem;
  font-weight: 700;
}
.theme-bento .band-analysis-table-wrap {
  margin-bottom: 1.5rem;
}
.theme-bento .band-pattern-empty {
  color: var(--tb-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}
.theme-bento .band-pattern-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}
.theme-bento .band-pattern-card {
  padding: 1.25rem;
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
}
.theme-bento .band-pattern-card-header {
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--tb-border);
}
.theme-bento .band-pattern-card-label {
  margin-bottom: 0.35rem;
  color: var(--tb-accent);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.theme-bento .band-pattern-key,
.theme-bento .analysis-table code {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  background: var(--tb-surface-elevated);
  border: 1px solid var(--tb-border);
  border-radius: 6px;
  color: var(--tb-accent);
  font-size: 0.84rem;
  word-break: break-word;
}
.theme-bento .band-pattern-card-rounds {
  margin-top: 0.6rem;
  color: var(--tb-muted);
  font-size: 0.85rem;
}
.theme-bento .band-pattern-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.theme-bento .band-pattern-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.theme-bento .band-pattern-round {
  min-width: 3rem;
  color: var(--tb-text);
  font-weight: 600;
}
.theme-bento .band-pattern-balls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.theme-bento .analysis-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tb-surface) !important;
  border-radius: var(--tb-radius-sm);
  overflow: hidden;
  border: 1px solid var(--tb-border);
}
.theme-bento .analysis-table th {
  background: var(--tb-accent) !important;
  color: #fff !important;
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 600;
}
.theme-bento .analysis-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .analysis-table tr:hover {
  background: var(--tb-surface-elevated);
}
.theme-bento .chart-container {
  margin: 1rem 0;
  border-radius: var(--tb-radius-sm);
}
.theme-bento .refresh-btn {
  background: var(--tb-accent);
  color: #fff;
  border: none;
  padding: 0.65rem 1.25rem;
  border-radius: var(--tb-radius-sm);
  font-weight: 500;
  cursor: pointer;
}
.theme-bento .refresh-btn:hover {
  background: var(--tb-accent-hover);
}
@media (max-width: 768px) {
  .theme-bento .pattern-help-toggle {
    width: 100%;
    justify-content: center;
  }
  .theme-bento .pattern-help-content {
    padding: 1rem;
  }
  .theme-bento .pattern-explanation {
    grid-template-columns: 1fr;
  }
  .theme-bento .analysis-empty-body {
    padding: 2rem 1rem;
  }
  .theme-bento .analysis-empty-copy {
    font-size: 1rem;
  }
  .theme-bento .band-pattern-cards {
    grid-template-columns: 1fr;
  }
  .theme-bento .band-pattern-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }
  .theme-bento .band-pattern-round {
    min-width: 0;
  }
}

/* ========== 저장번호 보관함 (내 당첨번호) ========== */
.theme-bento .saved-numbers-header.content-header {
  margin-bottom: 1.5rem;
}
.theme-bento .saved-add-form {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--tb-surface) !important;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
}
.theme-bento .saved-add-form h3 {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
  color: var(--tb-text);
}
.theme-bento .saved-add-form .form-group {
  margin-bottom: 1rem;
}
.theme-bento .saved-add-form .form-group label {
  color: var(--tb-text);
  font-size: 0.9375rem;
  margin-bottom: 0.35rem;
  display: block;
}
.theme-bento .summary-round {
  margin-bottom: 2rem;
  padding: 1.25rem;
  background: var(--tb-surface-elevated) !important;
  border-radius: var(--tb-radius);
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow);
}
.theme-bento .summary-round h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: var(--tb-text);
}
.theme-bento .summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.theme-bento .summary-list-item {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--tb-border);
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}
.theme-bento .summary-list-item:last-child {
  border-bottom: none;
}
.theme-bento .summary-list-item .saved-label {
  font-weight: 500;
  color: var(--tb-text);
}
.theme-bento .summary-list-item .saved-nums {
  color: var(--tb-muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.theme-bento .saved-list h3 {
  margin: 0 0 1rem 0;
  font-size: 1.15rem;
  color: var(--tb-text);
}
.theme-bento .saved-list .empty-message {
  color: var(--tb-muted);
  font-size: 1rem;
  padding: 1.5rem 0;
}
.theme-bento .saved-items-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  overflow: hidden;
  background: var(--tb-surface);
}
.theme-bento .saved-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .saved-item:last-child {
  border-bottom: none;
}
.theme-bento .saved-item .saved-label {
  font-weight: 500;
  color: var(--tb-text);
}
.theme-bento .saved-item .saved-nums {
  color: var(--tb-muted);
  font-size: 0.9rem;
  font-variant-numeric: tabular-nums;
}
.theme-bento .saved-item .btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
  border-radius: var(--tb-radius-sm);
}
.theme-bento .btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.85rem;
}

/* ========== 로또 통계 페이지 (/lotto/stats) ========== */
.theme-bento .stats-page {
  max-width: 1000px;
  margin: 0 auto;
  padding: 1rem 0;
}
.theme-bento .stats-header {
  text-align: center;
  margin-bottom: 1.5rem;
  padding: 2rem 1.5rem;
  background: linear-gradient(135deg, var(--tb-accent) 0%, #7c3aed 100%) !important;
  border-radius: var(--tb-radius);
  color: #fff !important;
}
.theme-bento .stats-header h1 {
  margin: 0 0 0.35em 0 !important;
  font-size: 1.75rem !important;
  color: #fff !important;
}
.theme-bento .stats-header p {
  margin: 0 !important;
  color: rgba(255,255,255,0.95) !important;
  font-size: 1rem !important;
  max-width: none;
}
.theme-bento .stats-disclaimer {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  background: var(--tb-surface-elevated) !important;
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius-sm);
  font-size: 0.95rem;
  color: var(--tb-text);
}
.theme-bento .stats-disclaimer strong {
  color: var(--tb-text);
}
.theme-bento .stats-section {
  background: var(--tb-surface) !important;
  border-radius: var(--tb-radius);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  border: 1px solid var(--tb-border);
  box-shadow: var(--tb-shadow);
}
.theme-bento .stats-section h2 {
  margin: 0 0 1rem 0 !important;
  font-size: 1.2rem !important;
  color: var(--tb-text) !important;
  border-bottom: 2px solid var(--tb-accent);
  padding-bottom: 0.5rem;
}
.theme-bento .stats-subtitle {
  font-size: 0.9rem;
  color: var(--tb-muted) !important;
  margin-bottom: 0.75rem;
}
.theme-bento .stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}
.theme-bento .stat-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.theme-bento .stat-row .stat-label,
.theme-bento .stats-hotcold-list .stat-label {
  font-weight: 500;
  min-width: 80px;
  color: var(--tb-text) !important;
}
.theme-bento .stat-ball {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  color: #fff;
  font-weight: 700;
  margin: 0.15rem;
  font-size: 0.9rem;
  flex-shrink: 0;
}
.theme-bento .stat-ball.ball-1 { background: linear-gradient(145deg, #f59e0b, #d97706) !important; }
.theme-bento .stat-ball.ball-2 { background: linear-gradient(145deg, #2563eb, #1d4ed8) !important; }
.theme-bento .stat-ball.ball-3 { background: linear-gradient(145deg, #dc2626, #b91c1c) !important; }
.theme-bento .stat-ball.ball-4 { background: linear-gradient(145deg, #6b7280, #4b5563) !important; }
.theme-bento .stat-ball.ball-5 { background: linear-gradient(145deg, #16a34a, #15803d) !important; }
.theme-bento .chart-wrap {
  position: relative;
  height: 280px;
  margin-top: 1rem;
  border-radius: var(--tb-radius-sm);
}
.theme-bento .stats-loading {
  text-align: center;
  padding: 2rem;
  color: var(--tb-muted) !important;
  font-size: 0.95rem;
}
.theme-bento .stats-error {
  padding: 1rem 1.25rem;
  background: var(--tb-surface-elevated);
  border-radius: var(--tb-radius-sm);
  color: var(--tb-text);
  border: 1px solid var(--tb-border);
  margin-top: 0.75rem;
}
.theme-bento .stats-link a {
  color: var(--tb-accent) !important;
  font-weight: 500;
}
.theme-bento .stats-hotcold-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}
@media (max-width: 640px) {
  .theme-bento .stats-hotcold-wrap {
    grid-template-columns: 1fr;
  }
}
.theme-bento .stats-hotcold-box h3 {
  font-size: 1rem;
  margin: 0 0 0.75rem 0;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text) !important;
}
.theme-bento .stats-hotcold-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}
.theme-bento .stats-lmh-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}
.theme-bento .stats-lmh-table th,
.theme-bento .stats-lmh-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .stats-lmh-table th {
  background: var(--tb-surface-elevated);
  font-weight: 600;
}
.theme-bento .stats-section .analysis-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--tb-surface);
  border-radius: var(--tb-radius-sm);
  overflow: hidden;
  border: 1px solid var(--tb-border);
}
.theme-bento .stats-section .analysis-table th {
  background: var(--tb-accent);
  color: #fff;
  padding: 0.65rem 1rem;
  font-weight: 600;
}
.theme-bento .stats-section .analysis-table td {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--tb-border);
  color: var(--tb-text);
}
.theme-bento .stats-section .analysis-table tr:hover {
  background: var(--tb-surface-elevated);
}

/* ========== 애드센스: 수익 최적화 (336x280 등 권장 형식 허용) ========== */
.theme-bento .ad-top-wrapper {
  margin-bottom: 0.5rem;
  min-height: 90px;
}
.theme-bento .ad-top-wrapper .responsive-wrapper {
  max-width: 1280px;
}
.theme-bento .ad-container.ad-top {
  background: var(--tb-surface);
  border: 1px solid var(--tb-border);
  border-radius: var(--tb-radius);
  box-shadow: var(--tb-shadow);
  overflow: hidden;
}
.theme-bento .ad-container.ad-top .ad-label {
  display: block;
  padding: 0.85rem 1rem 0.25rem;
  margin: 0;
}
.theme-bento .ad-container.ad-top .ad-content {
  min-height: 250px !important;
  max-height: 320px !important;
  height: auto !important;
  padding: 0 0.35rem 0.35rem;
  background: var(--tb-surface);
  border-radius: calc(var(--tb-radius) - 2px);
}
.theme-bento .ad-container.ad-top .ad-content > * {
  max-width: 100%;
}
.theme-bento .ad-container.ad-top .ad-content a,
.theme-bento .ad-container.ad-top .ad-content strong,
.theme-bento .ad-container.ad-top .ad-content span,
.theme-bento .ad-container.ad-top .ad-content div {
  color: var(--tb-text);
}
.theme-bento .ad-container.ad-top .ad-content a {
  text-decoration: none;
}
.theme-bento .ad-container.ad-top .ad-content a:hover {
  text-decoration: none;
}
.theme-bento .ad-container.ad-top .ad-content ul,
.theme-bento .ad-container.ad-top .ad-content ol {
  margin: 0;
  padding: 0;
  list-style: none;
}
.theme-bento .ad-container.ad-top .ad-content li {
  border-top: 1px solid var(--tb-border);
}
.theme-bento .ad-container.ad-top .ad-content li:first-child {
  border-top: none;
}
.theme-bento .ad-container.ad-inline,
.theme-bento .ad-container.ad-bottom {
  max-width: 100%;
  margin: 1.25rem 0;
  min-height: 90px;
}
.theme-bento .ad-container.ad-inline .ad-content,
.theme-bento .ad-container.ad-bottom .ad-content {
  min-height: 250px !important;
  max-height: 360px !important;
  height: auto !important;
}
.theme-bento .ad-container .ad-label {
  font-size: 0.7rem;
  color: var(--tb-muted);
  margin-bottom: 0.25rem;
}
.theme-bento .ad-container ins.adsbygoogle,
.theme-bento .ad-content ins.adsbygoogle {
  min-height: 250px !important;
  max-height: 360px !important;
  display: block !important;
}
.theme-bento .ad-container.ad-top ins.adsbygoogle,
.theme-bento .ad-container.ad-top .ad-content ins.adsbygoogle {
  max-height: 320px !important;
}
.theme-bento .ad-content.ad-sidebar {
  min-height: 250px !important;
  max-height: 600px !important;
}
.theme-bento .ad-content.ad-sidebar ins.adsbygoogle,
.theme-bento .ad-content.ad-sidebar ins.adsbygoogle iframe {
  max-height: 500px !important;
}
.theme-bento .ad-midcontent-wrap {
  margin: 1.5rem 0;
}
/* 사이드바 광고: 스크롤 시 노출 극대화(수익 개선) */
@media (min-width: 769px) {
  .theme-bento .sidebar .ad-widget {
    position: sticky;
    top: 1rem;
  }
}
@media (max-width: 768px) {
  .theme-bento .header .header-logo {
    max-width: calc(100% - 4rem);
  }
  .theme-bento .header .header-logo a h1 {
    font-size: 1rem !important;
  }
  .theme-bento .ad-container.ad-top .ad-content {
    max-height: 280px !important;
  }
  .theme-bento .ad-container.ad-inline .ad-content,
  .theme-bento .ad-container.ad-bottom .ad-content {
    max-height: 300px !important;
  }
}
