:root {
  --tb-bg: #f4f7fb;
  --tb-surface: #ffffff;
  --tb-soft: #eef6ff;
  --tb-soft-green: #eefaf5;
  --tb-text: #1f2937;
  --tb-muted: #627084;
  --tb-line: #d8e1ec;
  --tb-primary: #1769e0;
  --tb-primary-dark: #0f4da8;
  --tb-warning: #fff6d8;
  --tb-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--tb-bg);
  color: var(--tb-text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.74;
}

a {
  color: inherit;
}

.tb-site-header,
.tb-site-title,
.tb-site-nav,
.tb-sidebar,
.tb-side-box {
  display: none !important;
}

.tb-layout {
  display: block;
  max-width: 780px;
  margin: 0 auto;
  padding: 24px 18px 100px;
}

.tb-content {
  min-width: 0;
}

.tb-post,
.tb-list-card,
.tb-list-title {
  border: 1px solid var(--tb-line);
  border-radius: 12px;
  background: var(--tb-surface);
  box-shadow: var(--tb-shadow);
}

.tb-post {
  padding: 28px 22px;
}

.tb-post-header {
  margin-bottom: 22px;
}

.tb-post-category {
  margin: 0 0 8px;
  color: var(--tb-primary);
  font-size: 14px;
  font-weight: 700;
}

.tb-post-header h1 {
  margin: 0;
  color: #111827;
  font-size: 28px;
  line-height: 1.35;
}

.tb-post-meta {
  margin: 8px 0 0;
  color: var(--tb-muted);
  font-size: 14px;
}

.tb-post-body {
  overflow-wrap: anywhere;
  font-size: 17px;
}

.tb-post-body p {
  margin: 0 0 14px;
}

.tb-post-body h2,
.tb-post-body h4 {
  margin: 30px 0 12px;
  padding-left: 12px;
  border-left: 5px solid var(--tb-primary);
  color: #111827;
  font-size: 22px;
  line-height: 1.38;
}

.tb-post-body h3 {
  margin: 24px 0 10px;
  color: #111827;
  font-size: 19px;
}

.tb-post-body img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border-radius: 10px;
}

.tb-post-body table {
  width: 100%;
  margin: 16px 0;
  overflow: hidden;
  border: 1px solid var(--tb-line);
  border-collapse: separate;
  border-spacing: 0;
  border-radius: 8px;
}

.tb-post-body th,
.tb-post-body td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--tb-line);
  text-align: left;
  vertical-align: top;
  font-size: 15px;
}

.tb-post-body tr:last-child th,
.tb-post-body tr:last-child td {
  border-bottom: 0;
}

.tb-post-body th {
  width: 30%;
  background: #f6f8fb;
  color: #374151;
  font-weight: 700;
}

.tb-hook,
.tb-summary,
.tb-note,
.tb-related {
  margin: 20px 0;
  padding: 16px;
  border-radius: 10px;
}

.tb-hook {
  border: 1px solid #cbe0fa;
  background: var(--tb-soft);
}

.tb-summary {
  border: 1px solid var(--tb-line);
  background: #fbfcfe;
}

.tb-note {
  border: 1px solid #efd68e;
  background: var(--tb-warning);
}

.tb-related {
  border: 1px solid #cfe5da;
  background: var(--tb-soft-green);
}

.tb-summary > :last-child,
.tb-note > :last-child,
.tb-related > :last-child {
  margin-bottom: 0;
}

.tb-cta,
.tb-cta-bottom {
  margin: 24px 0;
  text-align: center;
}

.tb-cta-label {
  margin: 0 0 8px;
  color: var(--tb-muted);
  font-size: 14px;
  font-weight: 600;
}

.tb-btn-main {
  display: block !important;
  width: 100% !important;
  max-width: 440px !important;
  min-height: 56px !important;
  margin: 0 auto !important;
  padding: 16px 20px !important;
  border: 0 !important;
  border-radius: 10px !important;
  background: var(--tb-primary) !important;
  box-shadow: 0 8px 20px rgba(23, 105, 224, 0.28) !important;
  color: #ffffff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  -webkit-appearance: none !important;
}

.tb-btn-main:hover,
.tb-btn-main:active {
  background: var(--tb-primary-dark) !important;
}

.tb-nav {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin: 20px 0 !important;
  padding: 0 !important;
  text-align: initial !important;
}

.tb-nav a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: auto !important;
  max-width: none !important;
  min-height: 44px !important;
  margin: 0 !important;
  padding: 8px 4px !important;
  border: 1px solid var(--tb-line) !important;
  border-radius: 8px !important;
  background: #fbfcfe !important;
  color: #425168 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  line-height: 1.4 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
}

.tb-faq details,
.tb-faq dl {
  margin: 0 0 10px;
  border: 1px solid var(--tb-line);
  border-radius: 8px;
  background: #fbfcfe;
}

.tb-faq details {
  padding: 13px 14px;
}

.tb-faq summary,
.tb-faq dt {
  color: #111827;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.tb-faq summary {
  cursor: pointer;
}

.tb-faq details p {
  margin: 10px 0 0;
  color: var(--tb-text);
  font-size: 15px;
}

.tb-faq dt {
  padding: 13px 14px 6px;
}

.tb-faq dd {
  margin: 0;
  padding: 0 14px 13px;
  color: var(--tb-text);
  font-size: 15px;
}

.tb-list-title {
  margin-bottom: 14px;
  padding: 18px;
  text-align: center;
}

.tb-list-title h1 {
  margin: 0;
  font-size: 20px;
}

.tb-list-card {
  margin-bottom: 14px;
  overflow: hidden;
}

.tb-list-link {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 14px;
  padding: 14px;
  text-decoration: none;
}

.tb-list-thumb {
  display: block;
  min-height: 100px;
  border-radius: 8px;
  background-color: #e7edf5;
  background-position: center;
  background-size: cover;
}

.tb-list-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.tb-list-category {
  color: var(--tb-primary);
  font-size: 12px;
  font-weight: 700;
}

.tb-list-text strong {
  margin: 5px 0;
  color: #111827;
  font-size: 17px;
  line-height: 1.35;
}

.tb-list-summary {
  display: -webkit-box;
  margin: 3px 0;
  overflow: hidden;
  color: var(--tb-muted);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.tb-list-text em {
  color: var(--tb-muted);
  font-size: 12px;
  font-style: normal;
}

.tb-list-empty {
  padding: 40px;
  color: var(--tb-muted);
  text-align: center;
}

.tb-paging {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
}

.tb-paging a {
  min-width: 38px;
  padding: 8px 10px;
  border: 1px solid var(--tb-line);
  border-radius: 8px;
  background: var(--tb-surface);
  color: var(--tb-muted);
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}

.tb-top-btn {
  display: block;
  margin-top: 24px;
  color: var(--tb-muted);
  font-size: 14px;
  text-align: center;
  text-decoration: none;
}

.tb-bridge-body .tb-top-btn {
  display: none !important;
}

.tb-floating-cta {
  position: fixed;
  right: 24px;
  bottom: 34px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 96px;
  height: 96px;
  border: 2px solid #bbd6fa;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: var(--tb-shadow);
  color: #174e9d;
  text-decoration: none;
}

.tb-floating-cta span {
  font-size: 13px;
  font-weight: 600;
}

.tb-floating-cta strong {
  font-size: 17px;
  font-weight: 900;
}

.tb-mobile-bar {
  display: none;
}

.tb-site-footer {
  padding: 24px 18px 34px;
  color: var(--tb-muted);
  text-align: center;
}

.tb-ad {
  display: block;
  width: 100%;
  min-height: 90px;
  margin: 20px 0;
  overflow: visible;
  text-align: center;
}

.tb-ad .adsbygoogle {
  display: block !important;
  width: 100% !important;
  min-width: 250px;
  min-height: 90px;
}

.tb-ad:has(.adsbygoogle[data-ad-status="unfilled"]) {
  display: none;
}

/* 반복 로드 보호가 발동해도 글과 상세 CTA는 유지하고 광고만 숨긴다.
   예전에 직접 삽입한 표준 광고와 자동광고 컨테이너도 함께 가린다. */
html.cga-ad-protected .tb-ad,
html.cga-ad-protected ins.adsbygoogle,
html.cga-ad-protected .google-auto-placed {
  display: none !important;
}

@media (max-width: 920px) {
  .tb-layout {
    max-width: 100%;
    padding: 16px 16px 100px;
  }
}

@media (max-width: 720px) {
  .tb-layout {
    padding: 8px 12px 100px;
  }

  .tb-ad .adsbygoogle {
    min-width: 0;
  }

  .tb-post {
    padding: 18px 14px;
    border-radius: 10px;
  }

  .tb-post-header h1 {
    font-size: 22px;
  }

  .tb-post-body {
    font-size: 16px;
  }

  .tb-post-body h2,
  .tb-post-body h4 {
    font-size: 19px;
  }

  .tb-post-body h3 {
    font-size: 17px;
  }

  .tb-post-body th,
  .tb-post-body td {
    display: block;
    width: 100%;
    padding: 9px 12px;
    font-size: 14px;
  }

  .tb-post-body th {
    border-bottom: 0;
  }

  .tb-hook,
  .tb-summary,
  .tb-note,
  .tb-related {
    padding: 14px;
    font-size: 15px;
  }

  .tb-cta,
  .tb-cta-bottom {
    margin: 20px 0;
  }

  .tb-btn-main {
    width: 100% !important;
    max-width: 100% !important;
    min-height: 54px !important;
    padding: 15px 16px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
  }

  .tb-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .tb-nav a {
    min-height: 42px !important;
    font-size: 13px !important;
  }

  .tb-faq summary,
  .tb-faq dt,
  .tb-faq details p,
  .tb-faq dd {
    font-size: 14px;
  }

  .tb-list-link {
    grid-template-columns: 1fr;
  }

  .tb-list-thumb {
    min-height: 160px;
  }

  .tb-list-text strong {
    font-size: 16px;
  }

  .tb-floating-cta {
    display: none !important;
  }

  .tb-mobile-bar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 50;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border-top: 1px solid var(--tb-line);
    background: #ffffff;
    box-shadow: 0 -8px 20px rgba(31, 41, 55, 0.1);
  }

  .tb-mobile-bar a {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 58px !important;
    padding: 10px 6px !important;
    color: #243145 !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center !important;
    text-decoration: none !important;
  }

  .tb-mobile-bar a:nth-child(2) {
    color: var(--tb-primary) !important;
    font-weight: 900 !important;
  }
}
