.th-bot-wrap { max-width: 1180px; margin: 0 auto; padding: 1.25rem 1rem 4rem; }
.th-bot-top { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1.25rem; }
.th-bot-top h1 { font-family: var(--display); font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0; letter-spacing: -.02em; }
.th-bot-top p { margin: .4rem 0 0; color: var(--th-muted); max-width: 52ch; }
.th-bot-note {
  background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
  padding: .85rem 1rem; border-radius: 14px; margin-bottom: 1rem; font-size: .92rem; line-height: 1.5;
}
.th-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; margin-bottom: 1rem; }
@media (min-width: 1000px) { .th-stats { grid-template-columns: repeat(6, 1fr); } }
.th-stat { background: #fff; border: 1px solid var(--th-line); border-radius: 14px; padding: .9rem 1rem; box-shadow: 0 12px 30px rgba(15,27,45,.06); }
.th-stat small { display: block; text-transform: uppercase; letter-spacing: .06em; font-size: .68rem; font-weight: 700; color: var(--th-muted); }
.th-stat b { display: block; font-family: var(--display); font-size: 1.45rem; margin-top: .2rem; }
.th-panel { background: #fff; border: 1px solid var(--th-line); border-radius: 16px; box-shadow: 0 12px 30px rgba(15,27,45,.06); margin-bottom: 1rem; overflow: hidden; }
.th-panel h2 { margin: 0; padding: .9rem 1rem; font-size: 1.02rem; border-bottom: 1px solid var(--th-line); display: flex; justify-content: space-between; gap: .75rem; flex-wrap: wrap; align-items: center; }
.th-panel .body { padding: 1rem; }
.th-bot-table { width: 100%; border-collapse: collapse; font-size: .88rem; }
.th-bot-table th { text-align: left; font-size: .7rem; text-transform: uppercase; letter-spacing: .05em; color: var(--th-muted); padding: .7rem .5rem; }
.th-bot-table td { padding: .75rem .5rem; border-top: 1px solid var(--th-line); vertical-align: top; }
.th-bot-actions { display: flex; flex-wrap: wrap; gap: .35rem; }
.th-bot-actions .th-btn { padding: .35rem .55rem; font-size: .75rem; }
.th-badge-ok { background: #dcfce7; color: #15803d; }
.th-badge-run { background: #e0f2fe; color: #0369a1; }
.th-badge-err { background: #fee2e2; color: #b91c1c; }
.th-modal-bg { position: fixed; inset: 0; background: rgba(15,27,45,.45); z-index: 90; display: none; align-items: flex-start; justify-content: center; padding: 1.5rem .75rem; overflow: auto; }
.th-modal-bg.on { display: flex; }
.th-modal { width: min(720px, 100%); background: #fff; border-radius: 18px; padding: 1.25rem; }
.th-modal h3 { font-family: var(--display); margin: 0 0 .85rem; }
.th-modal label { display: block; font-size: .78rem; font-weight: 600; color: var(--th-muted); margin: .35rem 0 .25rem; }
.th-modal input, .th-modal textarea, .th-modal select { width: 100%; margin-bottom: .55rem; }
.th-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.th-logbox { background: #0f172a; color: #e2e8f0; border-radius: 12px; padding: .85rem; font: 12px/1.45 ui-monospace, Consolas, monospace; max-height: 220px; overflow: auto; white-space: pre-wrap; }
.th-hist-item { display: flex; justify-content: space-between; gap: .75rem; padding: .55rem 0; border-bottom: 1px solid var(--th-line); font-size: .88rem; }
@media (max-width: 800px) {
  .th-form-row { grid-template-columns: 1fr; }
  .th-bot-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .th-bot-wrap { padding: 1rem .85rem 3.5rem; }
  .th-bot-top h1 { font-size: clamp(1.45rem, 6vw, 1.95rem); }
  .th-panel { border-radius: 18px; }
  .th-panel .body { padding: .95rem; }
  .th-bot-actions .th-btn {
    min-height: 42px; padding: .55rem .75rem; font-size: .82rem; border-radius: 12px;
  }
  .th-stat { padding: .75rem .85rem; border-radius: 14px; }
  .th-stat b { font-size: 1.2rem; }
  .th-modal { padding: 1.05rem; border-radius: 16px; }
  .th-modal input, .th-modal textarea, .th-modal select {
    min-height: 46px; font-size: 16px; border-radius: 12px; padding: .7rem .8rem;
  }
}
.th-pkg-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; max-width: 1080px; margin: 0 auto; }
@media (max-width: 900px) { .th-pkg-grid { grid-template-columns: 1fr; } }
.th-pkg-card {
  display: block; background: #fff; border: 1px solid var(--th-line); border-radius: 18px;
  padding: 1.15rem 1.2rem; cursor: pointer; box-shadow: 0 14px 34px rgba(15,27,45,.07);
  transition: transform .2s ease, border-color .2s;
}
.th-pkg-card:hover, .th-pkg-card:has(input:checked) { transform: translateY(-4px); border-color: var(--th-orange); }
.th-pkg-card.featured { outline: 2px solid var(--th-orange); }
.th-pkg-card input { margin: 0 0 .5rem; }
.th-pkg-card strong { display: block; font-family: var(--display); font-size: 1.7rem; margin: .35rem 0 .1rem; }
.th-pkg-card em { display: block; color: var(--th-muted); font-style: normal; margin-bottom: .75rem; }
.th-pkg-card ul { margin: 0; padding-left: 1.1rem; color: var(--th-muted); }
.th-disclaimer {
  max-width: 720px; margin: 2rem auto 0; text-align: center; color: var(--th-muted);
  font-size: .88rem; line-height: 1.55;
}
.th-premium-chip {
  font-size: .68rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
  background: linear-gradient(135deg, var(--th-orange), var(--th-deep)); color: #fff;
  padding: .28rem .55rem; border-radius: 999px;
}
.th-dash-hero h1 { font-family: var(--display); }
.th-wallet-hero {
  text-align: center; max-width: 640px; margin: 0 auto 1.5rem;
}
.th-wallet-bal {
  font-family: var(--display); font-size: clamp(2.4rem, 6vw, 3.6rem); margin: .35rem 0;
  letter-spacing: -.03em;
}
.th-wallet-bal small { font-size: .35em; font-weight: 600; color: var(--th-muted); }
.th-seo-preview, .th-seo-article {
  max-width: 760px; margin: 0 auto; line-height: 1.65; font-size: 1.02rem;
}
.th-seo-article h1, .th-seo-preview h1 {
  font-family: var(--display); font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 1rem; letter-spacing: -.02em;
}
.th-seo-article h2, .th-seo-preview h2 {
  font-family: var(--display); font-size: 1.35rem; margin: 1.6rem 0 .6rem;
}
.th-seo-article h3, .th-seo-preview h3 { font-size: 1.05rem; margin: 1.1rem 0 .4rem; }
.th-seo-article p, .th-seo-preview p { margin: 0 0 .85rem; }
.th-seo-article ul, .th-seo-preview ul { margin: 0 0 1rem; padding-left: 1.2rem; }

/* Dark mode (bot / wallet / packages) */
html[data-theme="dark"] .th-bot-note {
  background: rgba(255,107,0,.12);
  border-color: rgba(255,107,0,.35);
  color: #ffd4a8;
}
html[data-theme="dark"] .th-stat,
html[data-theme="dark"] .th-panel,
html[data-theme="dark"] .th-modal,
html[data-theme="dark"] .th-pkg-card {
  background: var(--th-card);
  border-color: var(--th-line);
  color: var(--th-ink);
  box-shadow: 0 16px 40px rgba(0,0,0,.35);
}
html[data-theme="dark"] .th-bot-table th,
html[data-theme="dark"] .th-muted,
html[data-theme="dark"] .th-pkg-card em,
html[data-theme="dark"] .th-pkg-card ul,
html[data-theme="dark"] .th-disclaimer {
  color: var(--th-muted);
}
html[data-theme="dark"] .th-bot-table td,
html[data-theme="dark"] .th-hist-item,
html[data-theme="dark"] .th-panel h2 {
  border-color: var(--th-line);
}
html[data-theme="dark"] .th-modal input,
html[data-theme="dark"] .th-modal textarea,
html[data-theme="dark"] .th-modal select {
  background: #0d1524;
  color: var(--th-ink);
  border: 1px solid var(--th-line);
  border-radius: 10px;
  padding: .55rem .7rem;
}
html[data-theme="dark"] .th-badge-ok { background: rgba(34,197,94,.18); color: #86efac; }
html[data-theme="dark"] .th-badge-run { background: rgba(56,189,248,.16); color: #7dd3fc; }
html[data-theme="dark"] .th-badge-err { background: rgba(248,113,113,.16); color: #fca5a5; }
html[data-theme="dark"] .th-modal-bg { background: rgba(0,0,0,.65); }
html[data-theme="dark"] .th-pkg-card:hover,
html[data-theme="dark"] .th-pkg-card:has(input:checked) {
  border-color: var(--th-orange);
  background: #162033;
}
