:root {
  /* WordPress system font stack first. Thai fonts are not forced. */
  --tb4d-font-wp: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;

  /* Strong contrast palette */
  --tb4d-green: #005f3b;
  --tb4d-green-dark: #003d28;
  --tb4d-green-soft: #e4f3eb;
  --tb4d-orange: #ff6b00;
  --tb4d-orange-dark: #c2410c;
  --tb4d-black: #050505;
  --tb4d-text: #111111;
  --tb4d-muted: #26332e;
  --tb4d-border: #5f7f71;
  --tb4d-border-soft: #b7c9bf;
  --tb4d-page-bg: #ffffff;
  --tb4d-surface: #ffffff;
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body.tb4d-viewer-notice-body {
  min-height: 100vh;
  margin: 0;
  font-family: var(--tb4d-font-wp);
  color: var(--tb4d-text);
  background: var(--tb4d-page-bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.tb4d-notice-page {
  width: 100%;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
  background:
    linear-gradient(90deg, rgba(0,95,59,.10) 0 0, transparent 22%),
    linear-gradient(270deg, rgba(255,107,0,.10) 0 0, transparent 18%),
    #ffffff;
}

.tb4d-notice-shell {
  position: relative;
  width: min(100%, 1160px);
  min-height: min(730px, calc(100vh - 32px));
  padding: clamp(24px, 4vw, 56px);
  border: 1.5px solid var(--tb4d-border-soft);
  border-radius: clamp(22px, 3vw, 34px);
  background:
    linear-gradient(rgba(255,255,255,.97), rgba(255,255,255,.97)),
    repeating-linear-gradient(0deg, rgba(0,95,59,.11) 0 1px, transparent 1px 30px),
    repeating-linear-gradient(90deg, rgba(0,95,59,.11) 0 1px, transparent 1px 30px);
  box-shadow: 0 18px 48px rgba(5, 5, 5, .10);
  overflow: hidden;
}

.tb4d-brand-row {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: clamp(28px, 4vw, 48px);
}

.tb4d-brand-mark {
  width: 36px;
  height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  background: var(--tb4d-green);
  color: #fff;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
}

.tb4d-brand-name {
  color: var(--tb4d-black);
  font-size: clamp(22px, 2vw, 30px);
  font-weight: 700;
  letter-spacing: -0.035em;
}

.tb4d-notice-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(300px, .78fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: center;
}

.tb4d-badge {
  display: inline-flex;
  width: fit-content;
  margin: 0 0 18px;
  padding: 8px 18px;
  border: 1.5px solid var(--tb4d-green);
  border-radius: 999px;
  background: var(--tb4d-green-soft);
  color: var(--tb4d-green-dark);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
}

.tb4d-notice-content h1 {
  max-width: 700px;
  margin: 0;
  color: var(--tb4d-black);
  font-size: clamp(44px, 6vw, 78px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.04em;
  text-wrap: balance;
}

.tb4d-lead {
  max-width: 700px;
  margin: clamp(16px, 2vw, 22px) 0 clamp(24px, 3vw, 34px);
  color: var(--tb4d-muted);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 500;
  line-height: 1.72;
}

.tb4d-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.6vw, 18px);
}

.tb4d-status-card {
  min-height: 168px;
  margin: 0;
  padding: clamp(16px, 1.8vw, 22px);
  border: 1.5px solid var(--tb4d-border-soft);
  border-radius: 20px;
  background: var(--tb4d-surface);
  box-shadow: 0 10px 24px rgba(5, 5, 5, .08);
}

.tb4d-status-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 12px;
  background: var(--tb4d-green-soft);
  color: var(--tb4d-green-dark);
  font-weight: 700;
}

.tb4d-status-card h2 {
  margin: 0 0 9px;
  color: var(--tb4d-black);
  font-size: clamp(18px, 1.35vw, 21px);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.tb4d-status-card p {
  margin: 0;
  color: #1f2b26;
  font-size: clamp(14px, 1.02vw, 16px);
  font-weight: 500;
  line-height: 1.68;
}

.tb4d-progress-card {
  margin: clamp(20px, 2.4vw, 28px) 0 0;
  padding: 18px 20px;
  border: 1.5px solid var(--tb4d-border);
  border-radius: 18px;
  background: #edf7f1;
}

.tb4d-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
  color: var(--tb4d-green-dark);
  font-size: clamp(14px, 1.1vw, 16px);
  font-weight: 700;
}

.tb4d-progress-head strong {
  color: var(--tb4d-green-dark);
  font-size: clamp(18px, 1.5vw, 22px);
  font-weight: 700;
}

.tb4d-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #c8dbd0;
}

.tb4d-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--tb4d-green) 0%, var(--tb4d-green-dark) 62%, var(--tb4d-orange) 100%);
}

.tb4d-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(22px, 3vw, 32px);
}

.tb4d-btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
  border-radius: 999px;
  border: 1.5px solid transparent;
  font-size: clamp(15px, 1.05vw, 16px);
  font-weight: 700;
  text-decoration: none;
  line-height: 1;
}

.tb4d-btn-primary {
  background: var(--tb4d-green);
  color: #fff;
  border-color: var(--tb4d-green-dark);
  box-shadow: 0 12px 28px rgba(0, 95, 59, .22);
}

.tb4d-btn-orange {
  background: var(--tb4d-orange);
  color: #050505;
  border-color: var(--tb4d-orange-dark);
  box-shadow: 0 12px 28px rgba(255, 107, 0, .20);
}

.tb4d-btn-ghost {
  background: #fff;
  color: var(--tb4d-green-dark);
  border-color: var(--tb4d-border);
}

.tb4d-ai-panel {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 430px;
  padding: clamp(26px, 3vw, 40px);
  border: 1.5px solid var(--tb4d-border-soft);
  border-radius: 28px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(5, 5, 5, .10);
  text-align: center;
}

.tb4d-ai-orbit {
  width: clamp(124px, 12vw, 152px);
  height: clamp(124px, 12vw, 152px);
  display: grid;
  place-items: center;
  margin-bottom: 22px;
  border: 1.5px solid #d0bfa5;
  border-radius: 999px;
  background: radial-gradient(circle, #ffffff 0 28%, #bdece0 29% 58%, #f4e9d6 59% 100%);
}

.tb4d-ai-face {
  width: 62px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border-radius: 999px;
  background: var(--tb4d-green-dark);
  box-shadow: 0 0 0 9px #fff;
}

.tb4d-ai-face span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #59e486;
}

.tb4d-ai-panel h2 {
  max-width: 280px;
  margin: 0 0 10px;
  color: var(--tb4d-black);
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.tb4d-ai-panel p {
  max-width: 270px;
  margin: 0;
  color: #1d2723;
  font-size: clamp(14px, 1vw, 16px);
  font-weight: 500;
  line-height: 1.58;
}

.tb4d-ai-lines {
  width: min(100%, 210px);
  margin-top: 24px;
  display: grid;
  gap: 8px;
}

.tb4d-ai-lines span {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: #bfd5ca;
}
.tb4d-ai-lines span:nth-child(2) { width: 78%; }
.tb4d-ai-lines span:nth-child(3) { width: 56%; }

.tb4d-footer-note {
  position: relative;
  z-index: 1;
  margin: clamp(26px, 3vw, 42px) auto 0;
  color: #38443f;
  font-size: clamp(13px, 1vw, 15px);
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 1024px) {
  .tb4d-notice-grid {
    grid-template-columns: 1fr;
  }
  .tb4d-ai-panel {
    min-height: 330px;
  }
}

@media (max-width: 760px) {
  .tb4d-notice-page {
    padding: 12px;
  }
  .tb4d-notice-shell {
    min-height: auto;
    padding: 22px 18px 26px;
    border-radius: 22px;
  }
  .tb4d-brand-row {
    margin-bottom: 26px;
  }
  .tb4d-notice-content h1 {
    font-size: clamp(38px, 12vw, 56px);
    line-height: 1.08;
  }
  .tb4d-status-grid {
    grid-template-columns: 1fr;
  }
  .tb4d-status-card {
    min-height: auto;
  }
  .tb4d-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .tb4d-btn {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .tb4d-badge {
    max-width: 100%;
    white-space: normal;
    letter-spacing: .07em;
  }
  .tb4d-brand-name {
    font-size: 22px;
  }
  .tb4d-notice-content h1 {
    font-size: 40px;
  }
  .tb4d-lead {
    font-size: 16px;
  }
}
