/* Premium overlay â fonts, waves, WhatsApp dock, footer */
.th-btn-wave {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.th-btn-wave::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 20%, rgba(255,255,255,.45) 48%, transparent 72%);
  transform: translateX(-130%);
  pointer-events: none;
  z-index: 1;
}
.th-btn-wave:hover::after {
  animation: thWaveSweep .7s ease;
}
@keyframes thWaveSweep {
  from { transform: translateX(-130%); }
  to { transform: translateX(130%); }
}
.th-ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.45);
  transform: scale(0);
  animation: thRipple .65s ease-out forwards;
  pointer-events: none;
  z-index: 2;
}
@keyframes thRipple {
  to { transform: scale(2.4); opacity: 0; }
}

.th-logo {
  animation: thLogoPulse 3.2s ease-in-out infinite;
}
@keyframes thLogoPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}
.th-logo-mark img {
  border: 0;
}
.th-logo-text {
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: none;
  opacity: 1;
}

.th-store-btn, .th-btn, .th-nav-chip, .th-support, .th-auth-btn, .th-panel-tile {
  transition: transform .22s cubic-bezier(.22,1,.36,1), box-shadow .22s, background .22s, color .22s;
}
.th-store-btn:hover, .th-btn-primary:hover {
  transform: translateY(-4px) scale(1.03);
}

.th-footer-pro {
  margin-top: 3rem;
  padding: 2.4rem 1.5rem 1.25rem;
  background: linear-gradient(180deg, rgba(15,27,45,.04), transparent);
  border-top: 1px solid var(--th-line);
}
.th-footer-logo-card {
  width: 64px; height: 64px; border-radius: 18px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--th-orange), var(--th-deep));
  box-shadow: 0 16px 36px var(--th-glow);
  margin-bottom: .75rem;
  animation: thLogoPulse 2.8s ease-in-out infinite;
}
.th-footer-logo-card img {
  width: 50px; height: 50px; border-radius: 14px; object-fit: cover; background: #0b1220;
}
.th-foot-list {
  list-style: none; margin: 0; padding: 0;
}
.th-foot-list li { display: block; margin: 0 0 .45rem; }
.th-footer-pro a { display: inline-block; }
.th-foot-list a { display: inline-block; }
.th-foot-list a:hover { color: var(--th-orange); opacity: 1; }
.th-foot-wa {
  padding: .4rem .8rem !important;
  border-radius: 999px;
  background: #25D366;
  color: #052e16 !important;
  font-weight: 800 !important;
  opacity: 1 !important;
}
.th-foot-ch { background: #128C7E; color: #fff !important; }

.th-float-dock {
  position: fixed;
  right: 1rem;
  bottom: 1.1rem;
  z-index: 80;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  align-items: flex-end;
}
.th-float-btn {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem .95rem;
  border-radius: 999px;
  color: #fff !important;
  font-weight: 800;
  font-size: .85rem;
  box-shadow: 0 14px 34px rgba(15,27,45,.22);
  text-decoration: none;
}
.th-float-btn span { font-size: 1.15rem; line-height: 1; }
.th-float-wa { background: linear-gradient(135deg, #25D366, #128C7E); }
.th-float-ch { background: linear-gradient(135deg, #34d399, #0f766e); }
.th-float-btn:hover { transform: translateY(-3px) scale(1.04); }

html[data-theme="dark"] .th-footer-pro {
  background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}
@media (max-width: 640px) {
  .th-float-btn b { display: none; }
  .th-float-btn { padding: .85rem; border-radius: 18px; }
}

.th-btn-3d {
  transform: translateY(0);
  box-shadow: 0 8px 0 rgba(15,27,45,.18), 0 16px 28px var(--th-glow);
}
.th-btn-3d:hover { transform: translateY(-4px); box-shadow: 0 12px 0 rgba(15,27,45,.12), 0 22px 36px var(--th-glow); }
.th-btn-3d:active { transform: translateY(2px); box-shadow: 0 4px 0 rgba(15,27,45,.2); }
.th-auth-tabs a.th-btn-3d.on { color: #fff !important; background: linear-gradient(135deg, var(--th-orange), var(--th-deep)); }

.th-float-ai { background: linear-gradient(135deg, var(--th-orange), var(--th-deep)); border: 0; cursor: pointer; font: inherit; }
.th-ai-panel {
  position: fixed; right: 1rem; bottom: 5.5rem; z-index: 81;
  width: min(380px, calc(100vw - 1.5rem));
  background: var(--th-card, #fff); color: var(--th-ink);
  border-radius: 22px; border: 1px solid var(--th-line);
  box-shadow: 0 24px 60px rgba(15,27,45,.2);
  overflow: hidden;
}
.th-ai-panel header { display: flex; justify-content: space-between; align-items: center; padding: .85rem 1rem; background: linear-gradient(135deg, var(--th-orange), var(--th-deep)); color: #fff; }
.th-ai-panel header button { background: none; border: 0; color: #fff; font-size: 1.3rem; cursor: pointer; }
.th-ai-log { max-height: 280px; overflow: auto; padding: .85rem; display: grid; gap: .5rem; }
.th-ai-msg { padding: .65rem .8rem; border-radius: 14px; font-size: .9rem; line-height: 1.45; }
.th-ai-msg.me { background: rgba(255,107,0,.12); justify-self: end; }
.th-ai-msg.bot { background: rgba(15,27,45,.06); }
.th-ai-msg.sys { font-size: .78rem; color: var(--th-muted); }
.th-ai-msg img { max-width: 160px; border-radius: 10px; display: block; margin-top: .4rem; }
.th-ai-form { display: flex; gap: .4rem; padding: .65rem; border-top: 1px solid var(--th-line); align-items: center; }
.th-ai-form input[type=text], .th-ai-form #thAiInput { flex: 1; border: 1px solid var(--th-line); border-radius: 12px; padding: .55rem .7rem; }
.th-ai-file { cursor: pointer; }
.th-ai-file input { display: none; }
.th-bot-price { font-family: var(--display); font-weight: 800; font-size: 1.25rem; }
.th-bot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.25rem; }
@media (max-width: 800px) { .th-bot-grid { grid-template-columns: 1fr; } }
html[data-theme="dark"] .th-ai-panel { background: #121A2A; }
html[data-theme="dark"] .th-ai-msg.bot { background: rgba(255,255,255,.06); }

.th-ad-wrap {
  max-width: 920px;
  margin: 1.25rem auto;
  padding: .85rem;
  border-radius: 16px;
  background: rgba(15,27,45,.04);
  display: grid;
  gap: .75rem;
  justify-items: center;
}
.th-ad { max-width: 100%; overflow: hidden; }
.th-ad-footer { margin: 0 auto 1.5rem; }
.th-forgot {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: rgba(255,107,0,.08);
  font-size: .9rem;
}
.th-forgot strong { display: block; margin-bottom: .25rem; }
.th-player-shell { position: relative; transition: max-width .35s ease; }
.th-player-shell.theater { max-width: 100% !important; }
.th-player-shell:fullscreen, .th-player-shell:-webkit-full-screen { width: 100%; max-width: none; background: #000; }
.th-player-stage { position: relative; background: #000; border-radius: 16px 16px 0 0; overflow: hidden; }
.th-play-cover {
  position: absolute; inset: 0; z-index: 5;
  border: 0; padding: 0; cursor: pointer;
  display: grid; place-items: center;
  background: #0b1220;
}
.th-play-cover[hidden], .th-play-cover.is-gone { display: none !important; }
.th-play-cover-bg {
  position: absolute; inset: 0;
  background-size: cover; background-position: center;
  filter: brightness(.45) saturate(1.05);
  transform: scale(1.02);
}
.th-play-cover-ui {
  position: relative; z-index: 1; text-align: center; color: #fff;
  display: grid; gap: .55rem; justify-items: center;
  padding: 1rem;
}
.th-play-orb {
  width: 74px; height: 74px; border-radius: 50%;
  background: linear-gradient(145deg, var(--th-orange, #FF6B00), #fb923c);
  box-shadow: 0 12px 40px rgba(255,107,0,.45), 0 0 0 10px rgba(255,107,0,.15);
  position: relative;
  animation: thPlayPulse 1.8s ease-in-out infinite;
}
.th-play-orb::after {
  content: '';
  position: absolute; left: 28px; top: 22px;
  border-style: solid;
  border-width: 15px 0 15px 24px;
  border-color: transparent transparent transparent #fff;
}
@keyframes thPlayPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.th-play-cover-ui strong {
  font-family: var(--display, Fraunces, Georgia, serif);
  font-size: 1.35rem;
}
.th-play-cover-ui em {
  font-style: normal; font-size: .88rem; color: #cbd5e1; max-width: 22rem;
}
.th-midroll {
  position: absolute; inset: 0; z-index: 7;
  background: rgba(8,12,20,.9);
  display: grid; place-items: center;
  padding: 1rem;
}
.th-midroll[hidden] { display: none !important; }
.th-midroll-inner { width: min(520px, 100%); text-align: center; color: #fff; }
.th-midroll-inner p { margin: 0 0 .75rem; font-weight: 700; }
.th-midroll-premium {
  background: linear-gradient(180deg, #1a2434, #0f1724);
  border: 1px solid rgba(255,107,0,.35);
  border-radius: 18px;
  padding: 1.25rem 1.1rem 1.35rem;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.th-midroll-sub { font-weight: 500 !important; color: #94a3b8 !important; margin-bottom: .85rem !important; }
.th-dl-gate {
  position: absolute; inset: 0; z-index: 8;
  background: rgba(8, 12, 20, .92);
  display: grid; place-items: center;
  padding: 1.25rem;
}
.th-dl-gate[hidden] { display: none !important; }
.th-dl-gate-inner {
  width: min(420px, 100%);
  text-align: center;
  color: #fff;
  background: linear-gradient(180deg, #1a2434, #0f1724);
  border: 1px solid rgba(255,107,0,.35);
  border-radius: 18px;
  padding: 1.25rem 1.1rem 1.4rem;
  box-shadow: 0 18px 50px rgba(0,0,0,.45);
}
.th-dl-kicker { letter-spacing: .12em; text-transform: uppercase; font-size: .72rem; color: #FF6B00; margin: 0 0 .35rem; }
.th-dl-gate-inner h3 { margin: 0 0 .4rem; font-family: Fraunces, serif; }
.th-dl-adbox { min-height: 90px; margin: .75rem 0; border-radius: 12px; overflow: hidden; background: #0b1018; }
.th-dl-placeholder { padding: 2rem 1rem; color: #9aa7b8; }
.th-dl-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.12); overflow: hidden; }
.th-dl-bar span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #FF6B00, #ffb347); transition: width .2s linear; }
.th-dl-premium {
  padding: .85rem 1rem 1.1rem;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border-top: 1px solid var(--th-line, rgba(15,27,45,.1));
}
.th-dl-premium[hidden] { display: none !important; }
.th-dl-premium-btn {
  width: 100%;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: .2rem;
  padding: 1rem 1.25rem !important;
  border-radius: 16px !important;
}
.th-dl-premium-btn span { font-size: 1.05rem; font-weight: 800; }
.th-dl-premium-btn small { font-size: .78rem; opacity: .9; font-weight: 600; }
.th-lesson-note { margin: .2rem 0 .55rem; font-size: .85rem; color: var(--th-muted, #5b6b7c); }
.th-card, .th-buybox-premium { animation: thRise .7s ease both; }
@keyframes thRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.th-callout {
  margin: .85rem 0;
  padding: .85rem 1rem;
  border-radius: 14px;
  background: rgba(15,118,110,.08);
  font-size: .9rem;
  line-height: 1.5;
}
.th-callout-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.th-prose-card {
  background: #fff;
  border: 1px solid var(--th-line);
  border-radius: 18px;
  padding: 1.15rem 1.25rem;
  margin-top: 1rem;
  box-shadow: 0 12px 30px rgba(15,27,45,.06);
}
.th-prose-card h2 { font-family: var(--display); font-size: 1.25rem; margin: 0 0 .5rem; }
.th-prose-launch { border-color: rgba(255,107,0,.35); }
.th-dev-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.1rem; max-width: 980px; margin: 0 auto; }
@media (max-width: 800px) { .th-dev-grid { grid-template-columns: 1fr; } }
.th-dev-card {
  display: grid; grid-template-columns: 88px 1fr; gap: 1rem; align-items: start;
  background: #fff; border: 1px solid var(--th-line); border-radius: 20px; padding: 1rem;
  box-shadow: 0 14px 34px rgba(15,27,45,.07);
}
.th-dev-card img { width: 88px; height: 88px; object-fit: cover; border-radius: 16px; }
.th-dev-card h3 { font-family: var(--display); margin: .25rem 0 .35rem; font-size: 1.2rem; }
.th-dev-langs { font-size: .82rem; font-weight: 600; color: var(--th-orange); margin: 0 0 .4rem; }
.th-license-card em { display: block; font-size: .78rem; color: var(--th-muted); font-style: normal; margin-top: .35rem; }
html[data-theme="dark"] .th-prose-card, html[data-theme="dark"] .th-dev-card { background: #121A2A; }

/* Premium AI wait dialog */
.th-ai-wait {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 12, 22, .55);
  backdrop-filter: blur(8px);
}
.th-ai-wait[hidden] { display: none !important; }
body.th-ai-busy { overflow: hidden; }
.th-ai-wait-card {
  width: min(420px, 100%);
  padding: 1.6rem 1.45rem 1.35rem;
  border-radius: 22px;
  text-align: center;
  color: #f8fafc;
  background:
    radial-gradient(circle at 20% 0%, rgba(255,107,0,.35), transparent 50%),
    linear-gradient(165deg, #152238, #0b1220 60%);
  border: 1px solid rgba(255,107,0,.4);
  box-shadow: 0 24px 60px rgba(0,0,0,.35), 0 0 40px rgba(255,107,0,.12);
}
.th-ai-orbit {
  width: 72px; height: 72px; margin: 0 auto 1rem; position: relative;
}
.th-ai-orbit span {
  position: absolute; inset: 0; border-radius: 50%;
  border: 2px solid transparent; border-top-color: var(--th-orange, #FF6B00);
  animation: thAiSpin 1s linear infinite;
}
.th-ai-orbit span:nth-child(2) {
  inset: 8px; border-top-color: #fb923c; animation-duration: 1.4s; animation-direction: reverse;
}
.th-ai-orbit span:nth-child(3) {
  inset: 16px; border-top-color: #fdba74; animation-duration: .85s;
}
@keyframes thAiSpin { to { transform: rotate(360deg); } }
.th-ai-kicker {
  margin: 0; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase;
  color: #fb923c; font-weight: 800;
}
.th-ai-title {
  margin: .4rem 0 .55rem; font-family: var(--display, Fraunces, Georgia, serif);
  font-size: 1.35rem; font-weight: 700;
}
.th-ai-tip { margin: 0 0 1rem; color: #cbd5e1; min-height: 2.6em; line-height: 1.45; }
.th-ai-bar {
  height: 6px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,.08); margin-bottom: .85rem;
}
.th-ai-bar i {
  display: block; height: 100%; width: 40%; border-radius: 99px;
  background: linear-gradient(90deg, var(--th-orange, #FF6B00), #fbbf24);
  animation: thAiBar 1.4s ease-in-out infinite;
}
@keyframes thAiBar {
  0% { transform: translateX(-30%); }
  50% { transform: translateX(160%); }
  100% { transform: translateX(-30%); }
}
.th-ai-note { margin: 0; font-size: .78rem; color: #94a3b8; }

/* Soft glow pulse behind wait card */
.th-ai-glow {
  position: absolute; inset: -20% -10% auto; height: 55%;
  background: radial-gradient(circle, rgba(255,107,0,.35), transparent 65%);
  pointer-events: none; animation: thAiPulse 2.4s ease-in-out infinite;
}
.th-ai-wait-card, .th-ai-offer-card { position: relative; overflow: hidden; }
@keyframes thAiPulse {
  0%, 100% { opacity: .55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* Post-design Auto Post offer */
.th-ai-offer {
  position: fixed; inset: 0; z-index: 100000;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 12, 22, .62);
  backdrop-filter: blur(10px);
}
.th-ai-offer[hidden] { display: none !important; }
.th-ai-offer-card {
  width: min(460px, 100%);
  padding: 1.7rem 1.5rem 1.4rem;
  border-radius: 22px;
  text-align: center;
  color: #f8fafc;
  background:
    radial-gradient(circle at 80% 0%, rgba(255,107,0,.28), transparent 45%),
    linear-gradient(165deg, #1a2740, #0b1220 62%);
  border: 1px solid rgba(255,107,0,.45);
  box-shadow: 0 28px 70px rgba(0,0,0,.4), 0 0 50px rgba(255,107,0,.14);
  animation: thAiOfferIn .45s cubic-bezier(.2,.8,.2,1);
}
@keyframes thAiOfferIn {
  from { opacity: 0; transform: translateY(18px) scale(.96); }
  to { opacity: 1; transform: none; }
}
.th-ai-offer-actions {
  display: flex; flex-direction: column; gap: .65rem; margin-top: 1.15rem;
}
.th-ai-offer-actions .th-btn { width: 100%; justify-content: center; }

/* Site designer â WordPress-like edit chrome */
.th-site-editbar {
  display: flex; flex-wrap: wrap; gap: .5rem .85rem; align-items: center;
  margin: 0 0 1rem; padding: .75rem 1rem; border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,107,0,.12), rgba(15,27,45,.04));
  border: 1px solid var(--th-line); font-size: .88rem; color: var(--th-muted);
}
.th-site-editbar strong { color: var(--th-ink); }
.th-site-mode-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin: .35rem 0 .75rem;
}
.th-site-mode {
  display: flex !important; align-items: center; gap: .65rem; padding: .9rem 1rem;
  border-radius: 16px; border: 1px solid var(--th-line);
  background: #fff; cursor: pointer; font-weight: 700; color: var(--th-ink);
  box-shadow: 0 8px 24px rgba(15,27,45,.05); transition: border-color .2s, transform .2s, box-shadow .2s;
}
.th-site-mode:hover { transform: translateY(-2px); border-color: rgba(255,107,0,.45); }
.th-site-mode:has(input:checked) {
  border-color: var(--th-orange, #FF6B00);
  box-shadow: 0 0 0 1px rgba(255,107,0,.35), 0 12px 28px rgba(255,107,0,.12);
  background: linear-gradient(180deg, #fff7ed, #fff);
}
.th-site-mode input { width: 1.1rem; height: 1.1rem; accent-color: var(--th-orange, #FF6B00); }
.th-site-own-box {
  display: grid; gap: .85rem; padding: 1rem; margin: 0 0 .5rem;
  border-radius: 18px; border: 1px dashed rgba(255,107,0,.4);
  background: linear-gradient(180deg, rgba(255,107,0,.06), transparent);
}
.th-site-own-box[hidden] { display: none !important; }
.th-site-login-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin: .25rem 0; }
.th-site-login-actions .th-btn { min-width: 220px; }
.th-site-review, .th-site-stack {
  margin: .85rem 0;
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(180deg, #111827, #0b1220);
  border: 1px solid rgba(255,107,0,.4);
  color: #e2e8f0;
}
.th-site-review h3, .th-site-stack h3 { margin: .2rem 0 .5rem; font-family: var(--display); color: #fff; }
.th-site-review ul, .th-site-stack ul { margin: .4rem 0 0; padding-left: 1.1rem; }
.th-site-cssbox { margin: 1rem 0; }
.th-site-cssbox summary { cursor: pointer; font-weight: 800; }
.th-site-cssbox textarea {
  width: 100%; margin-top: .6rem; font-family: ui-monospace, Consolas, monospace;
  font-size: .78rem; border-radius: 12px; padding: .75rem; min-height: 140px;
}
@media (max-width: 720px) {
  .th-site-mode-row { grid-template-columns: 1fr; }
}
.th-site-canvas.th-site-editing .th-s-glow,
.th-site-canvas.th-site-editing .th-s-q,
.th-site-canvas.th-site-editing .th-s-faq-item,
.th-site-canvas.th-site-editing .th-s-gal-card,
.th-site-canvas.th-site-editing .th-s-band {
  position: relative;
  cursor: grab;
  transition: box-shadow .2s, transform .2s;
}
.th-site-canvas.th-site-editing .th-s-glow:hover,
.th-site-canvas.th-site-editing .th-s-q:hover,
.th-site-canvas.th-site-editing .th-s-faq-item:hover,
.th-site-canvas.th-site-editing .th-s-gal-card:hover,
.th-site-canvas.th-site-editing .th-s-band:hover {
  box-shadow: 0 0 0 2px var(--th-orange, #FF6B00);
}
.th-site-canvas.th-site-editing .th-s-drag-over {
  outline: 2px dashed var(--th-orange, #FF6B00);
  outline-offset: 4px;
}
.th-site-canvas.th-site-editing img.th-s-drop-target {
  outline: 3px dashed var(--th-orange, #FF6B00);
  outline-offset: 3px;
  opacity: .85;
}
.th-site-canvas.th-site-editing [contenteditable="true"]:focus {
  outline: 2px solid color-mix(in srgb, var(--th-orange, #FF6B00) 70%, transparent);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Premium ad units + button gate */
.th-ad-wrap { margin: 1rem auto; max-width: 920px; }
.th-ad { margin: .65rem 0; min-height: 40px; text-align: center; overflow: hidden; }
.th-ad-wrap.th-ad-tools, .th-ad-wrap.th-ad-banner {
  padding: 1rem;
  border-radius: 20px;
  background: rgba(15,27,45,.04);
  border: 1px solid var(--th-line, rgba(15,27,45,.12));
}
body.th-ad-gate-busy { overflow: hidden; }
.th-ad-gate-modal {
  position: fixed; inset: 0; z-index: 100050;
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem;
  background: rgba(8, 12, 22, .7);
  backdrop-filter: blur(10px);
}
.th-ad-gate-modal[hidden] { display: none !important; }
.th-ad-gate-card {
  position: relative; overflow: hidden;
  width: min(440px, 100%);
  padding: 1.55rem 1.35rem 1.25rem;
  border-radius: 22px;
  text-align: center;
  color: #f8fafc;
  background:
    radial-gradient(circle at 15% 0%, rgba(255,107,0,.32), transparent 48%),
    linear-gradient(165deg, #152238, #0b1220 60%);
  border: 1px solid rgba(255,107,0,.42);
  box-shadow: 0 28px 70px rgba(0,0,0,.42);
  animation: thAiOfferIn .4s cubic-bezier(.2,.8,.2,1);
}
.th-ad-gate-sub { margin: 0 0 .85rem; color: #cbd5e1; font-size: .92rem; line-height: 1.45; }
.th-ad-gate-body {
  min-height: 90px; margin: 0 0 1rem; padding: .5rem;
  border-radius: 14px; background: rgba(255,255,255,.04);
  border: 1px dashed rgba(255,255,255,.12);
}
.th-ad-gate-bar {
  height: 6px; border-radius: 99px; overflow: hidden;
  background: rgba(255,255,255,.08); margin-bottom: .9rem;
}
.th-ad-gate-bar i {
  display: block; height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--th-orange, #FF6B00), #fbbf24);
}
.th-ad-gate-card .th-btn { width: 100%; justify-content: center; margin-top: .35rem; }
.th-ad-gate-skip { margin-top: .45rem !important; opacity: .85; }
.th-ad-gate-fallback { margin: .5rem 0; color: #94a3b8; font-size: .9rem; }

/* Premium account / profile */
.th-account-page { max-width: 1120px; margin: 0 auto; }
.th-acc-flash {
  max-width: 640px; margin: 0 auto 1rem; padding: .85rem 1.1rem; border-radius: 14px;
  font-weight: 600; animation: thRise .5s ease both;
}
.th-acc-flash-ok { background: rgba(22,163,74,.12); color: #15803d; border: 1px solid rgba(22,163,74,.25); }
.th-acc-flash-err { background: rgba(185,28,28,.1); color: #b91c1c; border: 1px solid rgba(185,28,28,.22); }
.th-acc-kicker {
  margin: 0; font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--th-orange); font-weight: 800;
}
.th-acc-hero {
  position: relative; overflow: hidden;
  display: flex; flex-wrap: wrap; gap: 1.25rem; justify-content: space-between; align-items: center;
  padding: 1.5rem 1.4rem; border-radius: 24px; margin-bottom: 1.1rem;
  background: linear-gradient(145deg, #121a2a, #0b1220 55%);
  color: #f8fafc; border: 1px solid rgba(255,107,0,.35);
  box-shadow: 0 22px 50px rgba(0,0,0,.18);
  animation: thRise .65s ease both;
}
.th-acc-hero-glow {
  position: absolute; inset: -30% auto auto -10%; width: 55%; height: 80%;
  background: radial-gradient(circle, rgba(255,107,0,.35), transparent 70%);
  pointer-events: none; animation: thAiPulse 3s ease-in-out infinite;
}
.th-acc-hero-main { position: relative; display: flex; gap: 1rem; align-items: center; min-width: 0; }
.th-acc-avatar {
  width: 64px; height: 64px; border-radius: 20px; flex-shrink: 0;
  display: grid; place-items: center;
  font-family: var(--display, Fraunces, Georgia, serif); font-size: 1.7rem; font-weight: 700;
  background: linear-gradient(145deg, #ff9a4a, #ff6b00);
  box-shadow: 0 10px 28px rgba(255,107,0,.4);
}
.th-acc-hero h1 {
  margin: .2rem 0 .35rem; font-family: var(--display, Fraunces, Georgia, serif);
  font-size: clamp(1.5rem, 4vw, 2rem); letter-spacing: -.02em;
}
.th-acc-meta, .th-acc-id { margin: 0; color: #cbd5e1; font-size: .9rem; }
.th-acc-id { font-size: .78rem; opacity: .75; margin-top: .2rem; }
.th-acc-hero-actions {
  position: relative; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}
.th-acc-logout { margin: 0; }
.th-acc-stats {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem;
  margin-bottom: 1rem;
}
.th-acc-stat {
  padding: 1rem .95rem; border-radius: 18px;
  background: var(--th-card, #fff); border: 1px solid var(--th-line);
  box-shadow: 0 12px 30px rgba(15,27,45,.06);
  animation: thRise .7s ease both;
}
.th-acc-stat:nth-child(2) { animation-delay: .05s; }
.th-acc-stat:nth-child(3) { animation-delay: .1s; }
.th-acc-stat:nth-child(4) { animation-delay: .15s; }
.th-acc-stat span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--th-muted); font-weight: 700; }
.th-acc-stat b { display: block; margin: .35rem 0 .45rem; font-size: 1.2rem; font-family: var(--display, Fraunces, Georgia, serif); }
.th-acc-stat a { font-size: .82rem; font-weight: 700; color: var(--th-orange); }
.th-acc-tabs {
  display: flex; flex-wrap: nowrap; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  padding: .35rem; margin: 0 0 1.15rem; border-radius: 16px;
  background: rgba(15,27,45,.04); border: 1px solid var(--th-line);
  scrollbar-width: none;
}
.th-acc-tabs::-webkit-scrollbar { display: none; }
.th-acc-tabs a {
  flex: 0 0 auto; padding: .65rem .95rem; border-radius: 12px;
  font-weight: 800; font-size: .85rem; color: var(--th-muted); white-space: nowrap;
}
.th-acc-tabs a:hover { color: var(--th-ink); background: rgba(255,107,0,.08); }
.th-acc-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 280px);
  gap: 1.15rem; align-items: start;
}
.th-acc-panel {
  margin-bottom: 1.1rem; padding: 1.25rem 1.2rem; border-radius: 22px;
  background: var(--th-card, #fff); border: 1px solid var(--th-line);
  box-shadow: 0 16px 40px rgba(15,27,45,.06);
  scroll-margin-top: 5.5rem;
  animation: thRise .7s ease both;
}
.th-acc-panel-head { margin-bottom: 1rem; }
.th-acc-panel-head h2 {
  margin: 0 0 .3rem; font-family: var(--display, Fraunces, Georgia, serif); font-size: 1.35rem;
}
.th-acc-panel-head p { margin: 0; color: var(--th-muted); font-size: .92rem; }
.th-acc-quick {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem;
}
.th-acc-quick-card {
  display: block; padding: 1rem; border-radius: 16px;
  background: linear-gradient(160deg, rgba(255,107,0,.08), transparent 55%), rgba(15,27,45,.03);
  border: 1px solid var(--th-line); transition: transform .2s, border-color .2s, box-shadow .2s;
}
.th-acc-quick-card:hover {
  transform: translateY(-3px); border-color: rgba(255,107,0,.4);
  box-shadow: 0 14px 30px rgba(255,107,0,.12);
}
.th-acc-quick-card strong { display: block; margin-bottom: .25rem; color: var(--th-ink); }
.th-acc-quick-card span { font-size: .82rem; color: var(--th-muted); line-height: 1.4; }
.th-acc-planbox {
  margin-top: 1rem; padding: 1rem 1.05rem; border-radius: 16px;
  background: linear-gradient(135deg, rgba(255,107,0,.14), rgba(15,27,45,.04));
  border: 1px solid rgba(255,107,0,.25);
}
.th-acc-planbox h3 { margin: .2rem 0 .35rem; font-size: 1.15rem; }
.th-acc-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-bottom: 1rem;
}
.th-acc-form-grid .full { grid-column: 1 / -1; }
.th-acc-subh { margin: 0 0 .65rem; font-size: 1rem; }
.th-acc-empty {
  margin: 0; padding: .9rem 1rem; border-radius: 14px;
  background: rgba(15,27,45,.04); color: var(--th-muted); font-size: .92rem;
}
.th-acc-item { transition: transform .2s, box-shadow .2s; }
.th-acc-item:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(15,27,45,.1); }
.th-acc-faq details {
  margin: 0 0 .55rem; padding: .85rem 1rem; border-radius: 14px;
  border: 1px solid var(--th-line); background: rgba(15,27,45,.02);
}
.th-acc-faq summary {
  font-weight: 800; cursor: pointer; list-style: none; color: var(--th-ink);
}
.th-acc-faq summary::-webkit-details-marker { display: none; }
.th-acc-faq details[open] summary { color: var(--th-orange); }
.th-acc-faq p { margin: .55rem 0 0; color: var(--th-muted); line-height: 1.6; font-size: .92rem; }
.th-acc-support { margin: 1rem 0 0; }
.th-acc-side { display: grid; gap: .85rem; position: sticky; top: 5.5rem; }
.th-acc-side-card {
  padding: 1.15rem 1.1rem; border-radius: 20px;
  background: linear-gradient(160deg, #152238, #0b1220);
  color: #f8fafc; border: 1px solid rgba(255,107,0,.35);
  box-shadow: 0 18px 40px rgba(0,0,0,.15);
}
.th-acc-side-card h3 { margin: .25rem 0 .45rem; font-family: var(--display, Fraunces, Georgia, serif); }
.th-acc-side-card p { margin: 0 0 .85rem; color: #cbd5e1; font-size: .9rem; line-height: 1.5; }
.th-acc-side-card .th-btn { width: 100%; justify-content: center; margin-bottom: .4rem; }
.th-acc-side-soft {
  background: var(--th-card, #fff); color: var(--th-ink);
  border-color: var(--th-line); box-shadow: 0 12px 28px rgba(15,27,45,.06);
}
.th-acc-side-soft p, .th-acc-side-soft li { color: var(--th-muted); }
.th-acc-side-soft ul { margin: .5rem 0 0; padding-left: 1.1rem; font-size: .88rem; line-height: 1.55; }

/* Platform rules page */
.th-rules-page { max-width: 980px; margin: 0 auto; }
.th-rules-hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 2rem 1.25rem 1.6rem; border-radius: 24px; margin-bottom: 1.1rem;
  background: linear-gradient(145deg, #121a2a, #0b1220);
  color: #f8fafc; border: 1px solid rgba(255,107,0,.35);
  animation: thRise .65s ease both;
}
.th-rules-hero-glow {
  position: absolute; inset: -40% 20% auto; height: 70%;
  background: radial-gradient(circle, rgba(255,107,0,.32), transparent 65%);
  pointer-events: none;
}
.th-rules-hero h1 {
  position: relative; margin: .35rem 0 .55rem;
  font-family: var(--display, Fraunces, Georgia, serif);
  font-size: clamp(1.8rem, 5vw, 2.6rem);
}
.th-rules-hero > p { position: relative; margin: 0 auto 1.1rem; max-width: 36rem; color: #cbd5e1; line-height: 1.55; }
.th-rules-hero-actions {
  position: relative; display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center;
}
.th-rules-toc {
  display: flex; flex-wrap: nowrap; gap: .4rem; overflow-x: auto;
  padding: .35rem; margin: 0 0 1.25rem; border-radius: 16px;
  background: rgba(15,27,45,.04); border: 1px solid var(--th-line);
  scrollbar-width: thin;
}
.th-rules-toc a {
  flex: 0 0 auto; padding: .55rem .85rem; border-radius: 999px;
  font-size: .8rem; font-weight: 800; color: var(--th-muted); white-space: nowrap;
  background: var(--th-card, #fff); border: 1px solid var(--th-line);
}
.th-rules-toc a:hover { color: var(--th-orange); border-color: rgba(255,107,0,.4); }
.th-rules-grid { display: grid; gap: 1rem; }
.th-rules-card {
  padding: 1.35rem 1.25rem; border-radius: 22px;
  background: var(--th-card, #fff); border: 1px solid var(--th-line);
  box-shadow: 0 16px 40px rgba(15,27,45,.06);
  scroll-margin-top: 5.5rem;
  animation: thRise .7s ease both;
}
.th-rules-card h2 {
  margin: .25rem 0 .75rem; font-family: var(--display, Fraunces, Georgia, serif); font-size: 1.35rem;
}
.th-rules-card ul { margin: 0; padding-left: 1.15rem; color: var(--th-muted); line-height: 1.65; }
.th-rules-card li { margin: .35rem 0; }
.th-rules-card strong { color: var(--th-ink); }
.th-rules-foot {
  margin-top: 1.5rem; text-align: center; padding: 1.5rem 1.2rem; border-radius: 22px;
  background: linear-gradient(160deg, rgba(255,107,0,.1), rgba(15,27,45,.03));
  border: 1px solid var(--th-line);
}
.th-rules-foot h2 { margin: 0 0 .4rem; font-family: var(--display, Fraunces, Georgia, serif); }
.th-rules-foot > p { margin: 0 auto 1rem; max-width: 32rem; color: var(--th-muted); }

@media (max-width: 900px) {
  .th-acc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .th-acc-layout { grid-template-columns: 1fr; }
  .th-acc-side { position: static; }
}
@media (max-width: 640px) {
  .th-acc-hero { padding: 1.2rem 1rem; }
  .th-acc-hero-actions { width: 100%; }
  .th-acc-hero-actions .th-btn { flex: 1 1 calc(50% - .5rem); justify-content: center; }
  .th-acc-quick { grid-template-columns: 1fr; }
  .th-acc-form-grid { grid-template-columns: 1fr; }
  .th-acc-stats { grid-template-columns: 1fr 1fr; gap: .55rem; }
  .th-acc-stat b { font-size: 1.05rem; }
}

html[data-theme="dark"] .th-acc-stat,
html[data-theme="dark"] .th-acc-panel,
html[data-theme="dark"] .th-acc-side-soft,
html[data-theme="dark"] .th-rules-card,
html[data-theme="dark"] .th-rules-toc a {
  background: var(--th-card); border-color: var(--th-line);
}
.th-sitemap-list { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.th-sitemap-list li {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: .35rem .85rem;
  padding: .65rem .8rem; border-radius: 12px;
  background: rgba(15,27,45,.03); border: 1px solid var(--th-line, rgba(15,27,45,.1));
}
.th-sitemap-list a { font-weight: 700; color: var(--th-ink); word-break: break-all; }
.th-sitemap-list a:hover { color: var(--th-orange); }
.th-sitemap-list span { font-size: .78rem; color: var(--th-muted); }
.th-rules-hero code {
  font-size: .85em; padding: .1em .35em; border-radius: 6px;
  background: rgba(255,255,255,.08);
}



/* Premium dark surfaces */
html[data-theme="dark"] .th-prose-card,
html[data-theme="dark"] .th-dev-card,
html[data-theme="dark"] .th-footer-pro,
html[data-theme="dark"] .th-ai-panel,
html[data-theme="dark"] .th-sitemap-list li {
  background: var(--th-card, #121A2A);
  border-color: var(--th-line, rgba(255,255,255,.1));
  color: var(--th-ink, #E8EEF7);
}
html[data-theme="dark"] .th-sitemap-list a { color: var(--th-ink, #E8EEF7); }
html[data-theme="dark"] .th-rules-foot {
  background: linear-gradient(160deg, rgba(255,107,0,.14), rgba(18,26,42,.9));
  border-color: var(--th-line);
}
html[data-theme="dark"] .th-acc-hero {
  background: linear-gradient(145deg, #1a2438, #121a2a);
  border-color: var(--th-line);
}
html[data-theme="dark"] .th-cta-band,
html[data-theme="dark"] .th-work-band {
  background: linear-gradient(120deg, rgba(255,107,0,.12), rgba(18,26,42,.95));
  border-color: var(--th-line);
  color: var(--th-ink);
}
html[data-theme="dark"] .th-split-stack .th-card,
html[data-theme="dark"] .th-feature-card {
  background: #141c2e;
  border-color: var(--th-line);
  box-shadow: 0 20px 48px rgba(0,0,0,.35);
}
/* ââ Split login / signup â compact premium ââ */
.th-account-page:has(.th-split-auth){
  padding-top:.5rem!important;padding-bottom:1.5rem!important;
}
.th-split-auth{
  position:relative;max-width:820px;margin:.75rem auto 2rem;padding:.5rem .85rem;
}
.th-split-auth-orb{
  position:absolute;border-radius:50%;filter:blur(2px);pointer-events:none;z-index:0;
  animation:thOrbFloat 7s ease-in-out infinite;opacity:.85;
}
.th-split-auth-orb-a{
  width:140px;height:140px;top:-36px;left:-24px;
  background:radial-gradient(circle,rgba(255,107,0,.4),transparent 70%);
}
.th-split-auth-orb-b{
  width:160px;height:160px;right:-30px;bottom:-50px;
  background:radial-gradient(circle,rgba(226,85,0,.3),transparent 70%);
  animation-delay:-3s;
}
@keyframes thOrbFloat{
  0%,100%{transform:translate(0,0) scale(1)}
  50%{transform:translate(10px,-14px) scale(1.05)}
}
.th-split-auth-card{
  position:relative;z-index:1;display:grid;grid-template-columns:1.08fr .92fr;
  background:#fff;border-radius:22px;overflow:hidden;
  box-shadow:0 18px 48px rgba(15,27,45,.1),0 0 0 1px rgba(15,27,45,.05);
  min-height:0;max-height:none;
}
.th-split-auth-form{
  padding:1.25rem 1.45rem 1.35rem;display:flex;flex-direction:column;gap:.65rem;
}
.th-split-kicker{
  margin:0;font-size:.68rem;font-weight:800;letter-spacing:.12em;text-transform:uppercase;color:var(--th-muted);
}
.th-split-brand{display:flex;align-items:center;gap:.55rem}
.th-split-brand img{border-radius:10px;object-fit:cover;width:36px;height:36px}
.th-split-brand-name{
  font-family:var(--display,Fraunces,Georgia,serif);font-size:clamp(1.35rem,2.6vw,1.7rem);
  background:linear-gradient(135deg,var(--th-orange),var(--th-deep));
  -webkit-background-clip:text;background-clip:text;color:transparent;letter-spacing:-.03em;
}
.th-split-sub{margin:0;color:var(--th-muted);font-size:.86rem;line-height:1.45;max-width:38ch}
.th-split-tabs{
  margin:.05rem 0 .15rem!important;padding:.28rem!important;border-radius:14px!important;gap:.4rem!important;
}
.th-split-tabs a{
  padding:.65rem .85rem!important;border-radius:11px!important;font-size:.88rem!important;
  box-shadow:none!important;min-height:42px;display:inline-flex;align-items:center;justify-content:center;
}
.th-split-tabs a.th-btn-3d{
  box-shadow:0 4px 14px rgba(255,107,0,.18)!important;
  transform:none!important;
}
.th-split-tabs a.th-btn-3d:hover{transform:translateY(-1px)!important}
.th-split-tabs a.on,.th-split-tabs a.th-btn-3d.on{
  color:#fff!important;
  background:linear-gradient(135deg,var(--th-orange),var(--th-deep))!important;
  box-shadow:0 8px 20px rgba(255,107,0,.28)!important;
}
.th-split-form{display:grid;gap:.7rem;margin:0}
.th-split-form .th-auth-pill{
  margin:0;
  padding:.55rem .85rem .55rem .65rem!important;
  min-height:52px;
  gap:.65rem!important;
  border-radius:14px!important;
  align-items:center!important;
  box-shadow:0 4px 14px rgba(255,107,0,.08), inset 0 1px 0 rgba(255,255,255,.8)!important;
}
.th-split-form .th-auth-pill input{
  padding:.55rem .35rem .55rem 0!important;
  font-size:.95rem!important;
  line-height:1.35!important;
  min-height:28px;
  width:100%;
}
.th-split-form .th-auth-ico{
  width:36px;height:36px;flex-shrink:0;
  box-shadow:0 4px 10px rgba(255,107,0,.22);
}
.th-split-form .th-auth-2{gap:.65rem}
.th-split-submit{
  width:100%;border-radius:14px!important;padding:.95rem 1.2rem!important;
  text-transform:uppercase;letter-spacing:.05em;font-weight:800;font-size:.92rem!important;
  min-height:50px;margin-top:.15rem;
  box-shadow:0 10px 24px rgba(255,107,0,.28)!important;
}
.th-split-submit.th-btn-3d{transform:none!important}
.th-split-submit.th-btn-3d:hover{transform:translateY(-2px)!important}
.th-split-switch{margin:.15rem 0 0;text-align:center;font-size:.86rem;color:var(--th-muted)}
.th-split-switch a{color:var(--th-orange);font-weight:800}
.th-split-form .th-privacy-row{
  align-items:center;gap:.55rem;padding:.15rem .1rem;font-size:.82rem;line-height:1.4;
}
.th-split-form .th-privacy-row input{
  width:1.05rem;height:1.05rem;margin:0;flex-shrink:0;
}
.th-auth-pill-area{
  align-items:flex-start!important;border-radius:14px!important;
  padding:.65rem .85rem .65rem .65rem!important;min-height:72px;
}
.th-auth-pill-area textarea{
  border:0!important;background:transparent!important;box-shadow:none!important;
  min-height:48px;resize:vertical;width:100%;color:var(--th-ink);
  padding:.35rem .25rem .35rem 0!important;font-size:.95rem!important;line-height:1.4;
}
.th-split-auth .th-forgot{
  margin-top:.35rem;padding:.75rem .85rem;border-radius:14px;
  background:rgba(15,27,45,.03);border:1px solid var(--th-line);
}
.th-split-auth .th-forgot strong{font-size:.82rem}
.th-split-auth .th-forgot p{margin:.35rem 0 .55rem;font-size:.8rem;line-height:1.4;color:var(--th-muted)}
.th-split-auth-aside{
  position:relative;color:#fff;display:grid;place-items:center;
  padding:1.5rem 1.35rem;overflow:hidden;
  background:
    linear-gradient(145deg,rgba(255,107,0,.92),rgba(226,85,0,.86)),
    radial-gradient(600px 320px at 20% 0%,rgba(255,255,255,.22),transparent),
    #c2410c;
}
.th-split-aside-glow{
  position:absolute;inset:-20%;
  background:radial-gradient(circle at 70% 30%,rgba(255,255,255,.2),transparent 45%);
  animation:thAsideShine 8s ease-in-out infinite;
}
@keyframes thAsideShine{
  0%,100%{transform:translate(0,0) rotate(0deg);opacity:.7}
  50%{transform:translate(-4%,3%) rotate(6deg);opacity:1}
}
.th-split-aside-inner{position:relative;z-index:1;text-align:center;max-width:22rem}
.th-split-aside-logo{
  width:56px;height:56px;border-radius:14px;object-fit:cover;margin:0 auto .75rem;
  box-shadow:0 12px 28px rgba(0,0,0,.22);background:rgba(255,255,255,.15);
}
.th-split-aside-mark{
  width:56px;height:56px;margin:0 auto .75rem;border-radius:14px;display:grid;place-items:center;
  font-family:var(--display,Fraunces,Georgia,serif);font-weight:800;font-size:1.15rem;
  background:rgba(255,255,255,.18);border:1px solid rgba(255,255,255,.35);
}
.th-split-auth-aside h2{
  margin:0 0 .55rem;font-family:var(--display,Fraunces,Georgia,serif);
  font-size:clamp(1.45rem,2.8vw,1.85rem);letter-spacing:-.03em;
}
.th-split-auth-aside p{margin:0 0 .85rem;line-height:1.55;opacity:.95;font-size:.9rem}
.th-split-points{list-style:none;margin:0;padding:0;display:grid;gap:.4rem;text-align:left}
.th-split-points li{
  padding:.55rem .75rem;border-radius:12px;background:rgba(255,255,255,.14);
  border:1px solid rgba(255,255,255,.2);font-weight:600;font-size:.84rem;line-height:1.35;
}
@media (max-width:860px){
  .th-split-auth{max-width:440px;margin:.5rem auto 1.5rem}
  .th-split-auth-card{grid-template-columns:1fr}
  .th-split-auth-aside{min-height:0;padding:1.15rem 1.1rem;order:-1}
  .th-split-auth-form{padding:1.1rem 1.15rem 1.25rem;gap:.55rem}
  .th-split-points{display:none} /* keep aside short on mobile */
  .th-split-auth-aside p{margin:0;font-size:.86rem}
}

html[data-theme="dark"] .th-split-auth-card{
  background:var(--th-card);box-shadow:0 18px 48px rgba(0,0,0,.4);border:1px solid var(--th-line);
}
html[data-theme="dark"] .th-split-sub,
html[data-theme="dark"] .th-split-switch{color:var(--th-muted)}
html[data-theme="dark"] .th-auth-pill-area textarea{color:var(--th-ink)!important}
html[data-theme="dark"] .th-split-form .th-auth-pill{
  background:linear-gradient(180deg,rgba(255,138,43,.12),rgba(255,107,0,.06));
  border-color:rgba(255,138,43,.22);
}
html[data-theme="dark"] .th-split-auth .th-forgot{background:rgba(255,255,255,.04)}

/* ââ Promo / sale popup ââ */
.th-promo-root{
  position:fixed;inset:0;z-index:120;display:grid;place-items:center;padding:1rem;
  opacity:0;pointer-events:none;transition:opacity .28s ease;
}
.th-promo-root.on{opacity:1;pointer-events:auto}
.th-promo-backdrop{
  position:absolute;inset:0;background:rgba(11,18,32,.62);backdrop-filter:blur(6px);
}
.th-promo-card{
  position:relative;z-index:1;width:min(560px,96vw);border-radius:26px;overflow:hidden;
  background:#fff;box-shadow:0 40px 100px rgba(0,0,0,.35);
  transform:translateY(18px) scale(.96);transition:transform .32s cubic-bezier(.22,1,.36,1);
}
.th-promo-root.on .th-promo-card{transform:none}
.th-promo-x{
  position:absolute;top:.75rem;right:.75rem;z-index:2;width:36px;height:36px;border-radius:50%;
  border:0;background:rgba(15,27,45,.55);color:#fff;font-size:1.35rem;cursor:pointer;line-height:1;
}
.th-promo-media{aspect-ratio:16/9;background:linear-gradient(135deg,var(--th-orange),var(--th-deep))}
.th-promo-media img{width:100%;height:100%;object-fit:cover;display:block}
.th-promo-body{padding:1.35rem 1.4rem 1.55rem}
.th-promo-badge{
  display:inline-flex;padding:.28rem .65rem;border-radius:999px;font-size:.68rem;font-weight:800;
  letter-spacing:.08em;text-transform:uppercase;
  background:linear-gradient(135deg,var(--th-orange),var(--th-deep));color:#fff;
}
.th-promo-body h2{
  margin:.55rem 0 .4rem;font-family:var(--display,Fraunces,Georgia,serif);
  font-size:clamp(1.35rem,3vw,1.85rem);letter-spacing:-.02em;color:var(--th-ink);
}
.th-promo-desc{margin:0 0 .85rem;color:var(--th-muted);line-height:1.55}
.th-promo-rich{margin:0 0 1rem;font-size:.92rem;line-height:1.55;color:var(--th-ink)}
.th-promo-actions{display:flex;flex-wrap:wrap;gap:.55rem}
.th-promo-actions .th-btn{flex:1 1 auto;justify-content:center;text-align:center}
html[data-theme="dark"] .th-promo-card{background:var(--th-card);border:1px solid var(--th-line)}
html[data-theme="dark"] .th-promo-body h2{color:var(--th-ink)}
html.th-promo-open{overflow:hidden}

.th-ad-header{max-width:1100px;margin:.65rem auto 0;padding:0 1rem}
.th-ad-home_mid,.th-ad-store{max-width:920px;margin:1.25rem auto;padding:1rem;border-radius:20px;background:rgba(15,27,45,.03);border:1px solid var(--th-line)}
html[data-theme="dark"] .th-ad-home_mid,
html[data-theme="dark"] .th-ad-store{background:rgba(255,255,255,.04)}
/* ââ Startup logo splash ââ */
.th-splash{
  position:fixed;inset:0;z-index:200;display:grid;place-items:center;
  background:radial-gradient(900px 500px at 50% 35%,rgba(255,107,0,.35),transparent 55%),#0b1220;
  opacity:0;pointer-events:none;transition:opacity .45s ease;
}
.th-splash.on{opacity:1;pointer-events:auto}
.th-splash.out{opacity:0;pointer-events:none}
.th-splash-glow{
  position:absolute;width:280px;height:280px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,107,0,.55),transparent 70%);
  filter:blur(8px);animation:thSplashGlow 1.4s ease-in-out infinite;
}
@keyframes thSplashGlow{
  0%,100%{transform:scale(.9);opacity:.7}
  50%{transform:scale(1.12);opacity:1}
}
.th-splash-mark{
  position:relative;z-index:1;width:96px;height:96px;border-radius:28px;
  display:grid;place-items:center;
  background:linear-gradient(145deg,#ff9a4a,var(--th-orange,#FF6B00) 45%,var(--th-deep,#E25500));
  box-shadow:0 24px 60px rgba(255,107,0,.45);
  border:3px solid rgba(255,255,255,.55);
  animation:thSplashPop .7s cubic-bezier(.22,1,.36,1) both;
}
.th-splash-mark img{width:64px;height:64px;object-fit:contain;border-radius:16px;background:transparent}
.th-splash-brand{
  position:relative;z-index:1;margin:.9rem 0 0;
  font-family:var(--display,Fraunces,Georgia,serif);font-size:1.55rem;font-weight:800;
  letter-spacing:-.03em;color:#fff;
  animation:thSplashPop .7s .12s cubic-bezier(.22,1,.36,1) both;
}
@keyframes thSplashPop{
  from{opacity:0;transform:translateY(18px) scale(.86)}
  to{opacity:1;transform:none}
}
html.th-splash-on{overflow:hidden}
html.th-splash-on .th-nav-shell{opacity:0}

/* Floating nav polish */
.th-nav-shell{animation:thNavIn .7s .2s cubic-bezier(.22,1,.36,1) both}
@keyframes thNavIn{
  from{opacity:0;transform:translateY(-14px)}
  to{opacity:1;transform:none}
}
html.th-splash-on .th-nav-shell{animation:none}

.th-promo-section{padding-top:1.25rem!important;padding-bottom:1.5rem!important}
html[data-theme="dark"] .th-promo{background:var(--th-card);border-color:var(--th-line)}
/* Tools tabs + Kids Story Studio */
.th-tools-tabs{
  display:flex;flex-wrap:wrap;gap:.55rem;justify-content:center;
  margin:0 auto 1.35rem;padding:.4rem;max-width:720px;
  background:rgba(15,27,45,.04);border:1px solid var(--th-line);border-radius:999px;
}
.th-tools-tab{
  border:0;cursor:pointer;font:inherit;font-weight:800;font-size:.9rem;
  padding:.65rem 1.15rem;border-radius:999px;background:transparent;color:var(--th-muted);
  transition:background .2s,color .2s,transform .2s;
}
.th-tools-tab.on,.th-tools-tab:hover{
  background:linear-gradient(135deg,var(--th-orange),var(--th-deep));color:#fff;
  box-shadow:0 10px 24px var(--th-glow);transform:translateY(-1px);
}
.th-tools-panel{animation:thFadeUp .45s ease both}
html[data-theme="dark"] .th-tools-tabs{background:rgba(255,255,255,.04)}
.th-story-wrap .th-story-grid{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem;margin-bottom:.75rem;
}
@media(max-width:860px){.th-story-wrap .th-story-grid{grid-template-columns:1fr 1fr}}
@media(max-width:560px){.th-story-wrap .th-story-grid{grid-template-columns:1fr}}
.th-story-check{display:flex!important;flex-direction:row!important;align-items:center;gap:.5rem;grid-column:1/-1}
.th-story-check input{width:auto}
.th-story-title{font-family:var(--display,Fraunces,Georgia,serif);margin:.25rem 0 1rem}
.th-story-actions{display:flex;flex-wrap:wrap;gap:.5rem;margin-bottom:1rem}
.th-story-audio{width:100%;margin-bottom:1rem}
.th-story-scenes{
  display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:.75rem;margin-bottom:1rem;
}
.th-story-scene{
  margin:0;border-radius:16px;overflow:hidden;border:1px solid var(--th-line);
  background:var(--th-card,#fff);box-shadow:0 12px 28px rgba(15,27,45,.08);
}
.th-story-scene img{width:100%;aspect-ratio:16/9;object-fit:cover;display:block;background:#111}
.th-story-scene figcaption{padding:.55rem .7rem;font-size:.82rem;font-weight:700}
.th-story-ph{
  aspect-ratio:16/9;display:grid;place-items:center;font-weight:800;
  background:linear-gradient(135deg,rgba(255,107,0,.35),rgba(226,85,0,.5));color:#fff;
}
html[data-theme="dark"] .th-story-scene{background:var(--th-card)}
.th-thumb-preview{
  width:100%;max-width:720px;border-radius:14px;border:1px solid var(--th-line);
  box-shadow:0 20px 50px rgba(15,27,45,.15);display:block;background:#111;
}
.th-thumb-result .body.th-thumb-body,
.th-thumb-body{padding:1.25rem 1.35rem 1.4rem!important}
.th-thumb-frame{
  padding:.85rem;border-radius:18px;background:rgba(0,0,0,.28);
  border:1px solid var(--th-line,rgba(255,255,255,.08));
}
.th-thumb-frame .th-thumb-preview{margin:0;max-width:100%}
.th-thumb-result h2{padding:1.1rem 1.35rem 0;margin:0}
.th-yt-video{
  width:100%;max-width:860px;border-radius:18px;margin-bottom:1rem;
  background:#000;border:1px solid var(--th-line);
}
.th-expire-note{
  margin:0 0 1rem;padding:.85rem 1rem;border-radius:14px;
  background:linear-gradient(135deg,rgba(255,138,43,.12),rgba(15,27,45,.35));
  border:1px solid rgba(255,138,43,.28);font-size:.9rem;line-height:1.45;
}
/* Soft premium ads â never spammy */
.th-ad-wrap{
  margin:1rem auto;max-width:960px;padding:.65rem;
  border-radius:16px;border:1px solid rgba(255,255,255,.06);
  background:rgba(12,18,28,.35);
}
.th-ad-wrap .th-ad{display:flex;justify-content:center;flex-wrap:wrap;gap:.5rem;overflow:hidden}
.th-ad-header{margin:.4rem auto;max-width:1100px;opacity:.92}
.th-ad-tools_mid,.th-ad-studio,.th-ad-social{margin:1rem auto}
.th-ad-sticky{
  position:fixed;left:0;right:0;bottom:0;z-index:80;margin:0;max-width:none;
  border-radius:16px 16px 0 0;padding:.45rem .75rem calc(.45rem + env(safe-area-inset-bottom,0));
  background:rgba(10,14,22,.92);backdrop-filter:blur(12px);
  border:1px solid rgba(255,255,255,.08);border-bottom:0;
  box-shadow:0 -12px 40px rgba(0,0,0,.35);
}
.th-ad-sticky-x{
  position:absolute;top:.35rem;right:.55rem;width:28px;height:28px;border-radius:999px;
  border:0;background:rgba(255,255,255,.12);color:#fff;cursor:pointer;font-size:1.1rem;line-height:1;
}
.th-ad-sticky .th-ad{max-height:90px;overflow:hidden}
body{padding-bottom:0}
body:has(#thAdSticky:not([hidden])){padding-bottom:100px}

/* âââââââââââââââââââââââââââââââââââââââââââ
   MOBILE PREMIUM â consistent buttons, forms, tools
   âââââââââââââââââââââââââââââââââââââââââââ */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
img,video,canvas{max-width:100%;height:auto}
button,.th-btn,.th-tools-rail-link,.th-pagebar-btn{-webkit-tap-highlight-color:transparent}

@media (max-width: 900px) {
  .th-bot-wrap{
    padding:1rem .85rem calc(3.5rem + env(safe-area-inset-bottom,0));
  }
  .th-bot-top{
    flex-direction:column;align-items:stretch;gap:.75rem;margin-bottom:1rem;
  }
  .th-bot-top h1{
    font-size:clamp(1.45rem,6.2vw,1.95rem)!important;line-height:1.15;letter-spacing:-.03em;
  }
  .th-bot-top p{font-size:.92rem;line-height:1.5;max-width:none}
  .th-badge{
    align-self:flex-start;font-size:.78rem;padding:.4rem .75rem;border-radius:999px;
  }
  .th-panel{border-radius:18px;margin-bottom:.9rem}
  .th-panel h2{padding:.8rem .95rem;font-size:.98rem}
  .th-panel .body{padding:.95rem}
  .th-expire-note{font-size:.86rem;padding:.75rem .9rem;border-radius:14px}

  /* Equal premium buttons â not huge, not tiny */
  .th-btn,.th-story-cta,.th-pagebar-btn{
    min-height:48px;
    padding:.72rem 1.05rem!important;
    font-size:.9rem!important;
    border-radius:14px!important;
    box-sizing:border-box;
  }
  .th-btn-3d{box-shadow:0 8px 0 rgba(15,27,45,.1),0 14px 28px var(--th-glow)!important}
  .th-btn-3d:active{transform:translateY(2px)!important}
  .th-story-actions{
    display:grid;grid-template-columns:1fr 1fr;gap:.55rem;
  }
  .th-story-actions .th-btn{
    width:100%;justify-content:center;min-width:0;
  }
  .th-story-actions .th-btn:only-child,
  .th-story-actions .th-btn:first-child:nth-last-child(odd){
    grid-column:1/-1;
  }

  .th-form label{font-size:.8rem;font-weight:650}
  .th-form input,.th-form textarea,.th-form select,
  .th-story-form input,.th-story-form textarea,.th-story-form select{
    min-height:48px;padding:.75rem .9rem!important;font-size:16px!important; /* no iOS zoom */
    border-radius:14px!important;
  }
  .th-form textarea,.th-story-form textarea{min-height:110px}
  .th-story-wrap .th-story-grid{
    grid-template-columns:1fr 1fr!important;gap:.65rem;
  }
  .th-story-check{
    grid-column:1/-1;padding:.65rem .75rem;border-radius:14px;
    background:rgba(255,138,43,.08);border:1px solid rgba(255,138,43,.2);
    font-size:.88rem;
  }
  .th-story-scenes{grid-template-columns:1fr 1fr!important;gap:.55rem}
  .th-story-scene{border-radius:14px}
  .th-story-scene figcaption{font-size:.75rem;padding:.45rem .55rem}
  .th-story-title{font-size:1.2rem;line-height:1.25}

  .th-tools-rail{padding:0 .85rem .5rem;margin-bottom:.35rem}
  .th-tools-rail-row{
    gap:.45rem;scrollbar-width:none;-ms-overflow-style:none;
    padding-bottom:.5rem;scroll-snap-type:x mandatory;
  }
  .th-tools-rail-row::-webkit-scrollbar{display:none}
  .th-tools-rail-link{
    min-width:132px;max-width:160px;padding:.65rem .7rem;border-radius:14px;
    scroll-snap-align:start;
  }
  .th-tools-rail-link b{font-size:.82rem}
  .th-tools-rail-link span{font-size:.68rem;line-height:1.3}

  .th-tools-tabs{
    border-radius:18px;padding:.35rem;gap:.35rem;justify-content:stretch;
  }
  .th-tools-tab{
    flex:1 1 auto;text-align:center;min-height:44px;
    padding:.55rem .7rem;font-size:.82rem;border-radius:14px;
  }

  .th-pagebar{padding:0 .85rem;gap:.45rem}
  .th-pagebar-btn{min-height:42px;padding:.5rem .85rem!important;font-size:.82rem!important}

  .th-ad-wrap{margin:.75rem auto;padding:.5rem;border-radius:14px}
  .th-ad-sticky{
    padding:.4rem .65rem calc(.4rem + env(safe-area-inset-bottom,0));
  }
  .th-ad-sticky .th-ad{max-height:72px}
  body:has(#thAdSticky:not([hidden])){padding-bottom:calc(88px + env(safe-area-inset-bottom,0))}

  /* Auth / store / cards */
  .th-auth-btn{min-height:44px;border-radius:12px}
  .th-store-btn{min-height:48px;border-radius:14px;font-size:.9rem}
  .th-panel-tile{padding:1rem .95rem;border-radius:18px}
  .th-panel-tile h3{font-size:1.05rem}
  .th-panel-tile p{font-size:.88rem;margin-bottom:.85rem}

  .th-ai-wait-card,.th-ad-gate-card{
    width:min(420px,calc(100vw - 1.5rem))!important;
    margin:auto;border-radius:20px!important;padding:1.15rem!important;
  }
  .th-ai-wait-card .th-btn,.th-ad-gate-card .th-btn{min-height:48px;width:100%}
}

@media (max-width: 560px) {
  .th-story-wrap .th-story-grid{grid-template-columns:1fr!important}
  .th-story-scenes{grid-template-columns:1fr!important}
  .th-story-actions{grid-template-columns:1fr}
  .th-bot-top .th-pill{font-size:.72rem}
  .th-btn,.th-story-cta{
    width:100%;
    justify-content:center;
  }
  .th-story-actions .th-btn{width:100%}
  /* Primary CTA slightly stronger, still not oversized */
  #sgGo,#rxGo,#stGo,#thGo,.th-story-form > .th-btn-primary{
    min-height:52px;font-size:.95rem!important;font-weight:800;
    border-radius:16px!important;
  }
  .th-tools-rail-link{min-width:118px;max-width:140px;padding:.55rem .6rem}
  .th-acc-hero-actions .th-btn{flex:1 1 100%}
  .th-nav-shell{padding:0 .5rem}
  .th-section{padding:1.4rem .85rem 2rem}
}

@media (max-width: 380px) {
  .th-bot-top h1{font-size:1.35rem!important}
  .th-btn{font-size:.86rem!important;padding:.68rem .9rem!important}
  .th-tools-tab{font-size:.78rem;padding:.5rem .45rem}
}

/* Touch: prevent accidental double-tap zoom on controls */
@media (hover:none) and (pointer:coarse) {
  .th-btn:hover,.th-btn-primary:hover,.th-btn-3d:hover{
    transform:none;
  }
  .th-btn:active,.th-btn-primary:active{
    transform:scale(.98);opacity:.95;
  }
  .th-tools-rail-link:active{transform:scale(.98)}
}

/*  Premium Tools + Apps + House  */
.th-pro-tools-hub .th-section-head h2,
.th-pro-tool-page h1{font-family:Fraunces,Georgia,serif}
.th-pro-tool-card .th-pro-noprice-sm,
.th-pro-noprice{
  margin:.55rem 0 0;font-size:.82rem;font-weight:700;color:var(--th-orange,#FF6B00);letter-spacing:.01em
}
.th-pro-buy-row{display:flex;flex-wrap:wrap;gap:.65rem;margin-top:1.1rem}
.th-pro-article{margin-top:2rem;max-width:720px}
.th-app-card-premium{border-radius:22px;overflow:hidden;background:linear-gradient(165deg,#fff 0%,#fff8f2 100%);box-shadow:0 12px 40px rgba(20,12,8,.08);border:1px solid rgba(255,107,0,.12);transition:transform .28s cubic-bezier(.22,1,.36,1),box-shadow .28s}
.th-app-card-premium:hover{transform:translateY(-6px);box-shadow:0 22px 50px rgba(255,107,0,.14)}
.th-app-card-premium h3 a{color:inherit;text-decoration:none}
.th-app-card-premium .th-app-media{display:block;aspect-ratio:16/10;overflow:hidden;position:relative}
.th-app-card-premium .th-app-media img{width:100%;height:100%;object-fit:cover;transition:transform .45s ease}
.th-app-card-premium:hover .th-app-media img{transform:scale(1.04)}
.th-app-badge{position:absolute;top:.65rem;left:.65rem;z-index:2;font-size:.68rem;font-weight:800;letter-spacing:.06em;text-transform:uppercase;padding:.35rem .65rem;border-radius:999px}
.th-app-badge--soon{background:rgba(15,27,45,.75);color:#fff;backdrop-filter:blur(6px)}
.th-app-badge--apk{background:linear-gradient(135deg,#ff6b00,#e25500);color:#fff;box-shadow:0 8px 20px rgba(255,107,0,.35)}
.th-btn-soon{display:inline-flex;align-items:center;justify-content:center;padding:.55rem 1rem;border-radius:999px;background:rgba(15,27,45,.08);color:var(--th-muted,#5b6577);font-weight:700;border:1px dashed rgba(15,27,45,.18);cursor:not-allowed}
html[data-theme="dark"] .th-btn-soon{background:rgba(255,255,255,.06);color:var(--th-muted);border-color:rgba(255,255,255,.15)}
html[data-theme="dark"] .th-app-card-premium{background:linear-gradient(165deg,#161f32 0%,#121a28 100%);border-color:rgba(255,107,0,.2)}
.th-house-grid{display:grid;grid-template-columns:1.1fr 1fr;gap:1.25rem;margin:1.5rem 0}
.th-house-card{padding:1.25rem 1.35rem;border-radius:20px;background:#fff;border:1px solid rgba(0,0,0,.06);box-shadow:0 10px 32px rgba(0,0,0,.05)}
.th-house-map iframe,.th-map-embed iframe{width:100%;min-height:280px;border:0;border-radius:16px}
.th-acc-referral{background:linear-gradient(120deg,#fff7ef,#fff);border:1px solid rgba(255,107,0,.2);border-radius:18px}
@media (max-width:800px){
  .th-house-grid{grid-template-columns:1fr}
}
