/* ToolsPT v2 — shared design system (light + soft-gray dark) */
:root {
  --tx-bg: #f8f7fc; --tx-surface: #ffffff; --tx-surface2: #f1eff9; --tx-ink: #1a1530; --tx-muted: #5d5878; --tx-line: #e6e2f3;
  --tx-gold: #f2b91f; --tx-gold-2: #e8a800; --tx-gold-ink: #2b2000; --tx-purple: #6b54b5; --tx-purple-soft: #ece8fa;
  --tx-shadow: 0 1px 2px rgba(40, 30, 80, .06), 0 10px 34px rgba(40, 30, 80, .08);
  --tx-shadow-hover: 0 2px 4px rgba(40, 30, 80, .08), 0 18px 44px rgba(40, 30, 80, .14);
  --tx-r: 16px; --tx-header-h: 66px;
  color-scheme: light;
}
html[data-theme="dark"] {
  --tx-bg: #262624; --tx-surface: #30302e; --tx-surface2: #383836; --tx-ink: #ecebe6; --tx-muted: #a9a79e; --tx-line: #464641;
  --tx-gold: #f2c14e; --tx-gold-2: #f2c14e; --tx-gold-ink: #2b2000; --tx-purple: #b9a9f2; --tx-purple-soft: #3b3752;
  --tx-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 34px rgba(0, 0, 0, .28);
  --tx-shadow-hover: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 44px rgba(0, 0, 0, .4);
  color-scheme: dark;
}
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--tx-bg); color: var(--tx-ink); font-family: 'Cairo', 'Tajawal', system-ui, -apple-system, 'Segoe UI', sans-serif; line-height: 1.7; min-height: 100vh; display: flex; flex-direction: column; }
body > .tx-page { flex: 1 0 auto; }
.tx-skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 1000; background: var(--tx-gold); color: var(--tx-gold-ink); padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.tx-skip:focus { top: 10px; }
.tx-wrap { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
:where(.tx-header, .tx-footer, .tx-home, .tx-cat, .tx-search, .tx-404) a { color: inherit; }
:where(.tx-header, .tx-footer, .tx-home, .tx-cat, .tx-search, .tx-404) * { box-sizing: border-box; }
:where(.tx-header, .tx-footer, .tx-home, .tx-cat, .tx-search, .tx-404) :is(h1, h2, h3, p, ul, li, button, input) { font-family: inherit; }

/* ---------- header ---------- */
.tx-header { position: sticky; top: 0; z-index: 500; background: color-mix(in srgb, var(--tx-bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--tx-line); }
.tx-header-in { max-width: 1200px; margin: 0 auto; height: var(--tx-header-h); padding: 0 20px; display: flex; align-items: center; gap: 18px; }
.tx-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-size: 22px; letter-spacing: -.2px; color: var(--tx-ink); }
.tx-logo img { width: 36px; height: 36px; display: block; }
.tx-logo b { color: var(--tx-gold-2); font-weight: 800; }
.tx-nav { display: flex; align-items: center; gap: 4px; margin-inline-start: 10px; }
.tx-nav > a, .tx-dd > button { background: none; border: 0; cursor: pointer; font-size: 15px; font-weight: 600; color: var(--tx-ink); text-decoration: none; padding: 9px 13px; border-radius: 10px; transition: background .2s; display: inline-flex; align-items: center; gap: 6px; }
.tx-nav > a:hover, .tx-dd > button:hover, .tx-dd:focus-within > button, .tx-nav a[aria-current="page"] { background: var(--tx-surface2); }
.tx-dd { position: relative; }
.tx-dd-panel { position: absolute; inset-inline-start: 0; top: calc(100% + 8px); width: 360px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 18px; box-shadow: var(--tx-shadow-hover); padding: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; opacity: 0; visibility: hidden; transform: translateY(6px); transition: all .18s ease; }
.tx-dd:hover .tx-dd-panel, .tx-dd:focus-within .tx-dd-panel { opacity: 1; visibility: visible; transform: none; }
.tx-dd-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; text-decoration: none; font-weight: 600; font-size: 14px; }
.tx-dd-panel a:hover { background: var(--tx-surface2); }
.tx-dd-panel a span { font-size: 20px; }
.tx-actions { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; }
.tx-iconbtn { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); cursor: pointer; display: inline-grid; place-items: center; transition: transform .2s, background .2s, border-color .2s; padding: 0; }
.tx-iconbtn:hover { background: var(--tx-surface2); transform: translateY(-1px); }
.tx-lang { width: auto; min-width: 42px; padding: 0 12px; font: 700 13px/1 system-ui, sans-serif; text-decoration: none; letter-spacing: .3px; }
html[dir="ltr"] body { text-align: left; }
.tx-iconbtn svg { width: 20px; height: 20px; display: block; }
.tx-theme .sun, .tx-theme .moon { grid-area: 1 / 1; transition: transform .2s ease, opacity .15s; }
.tx-theme .sun { opacity: 0; transform: rotate(-90deg) scale(.4); }
.tx-theme .moon { opacity: 1; transform: none; }
html[data-theme="dark"] .tx-theme .sun { opacity: 1; transform: none; }
html[data-theme="dark"] .tx-theme .moon { opacity: 0; transform: rotate(90deg) scale(.4); }
.tx-burger { display: none; }
.tx-mobile { display: none; border-top: 1px solid var(--tx-line); background: var(--tx-surface); padding: 10px 20px 18px; }
.tx-mobile.open { display: block; }
.tx-mobile a { display: flex; align-items: center; gap: 10px; padding: 11px 6px; text-decoration: none; font-weight: 600; border-bottom: 1px solid var(--tx-line); }
.tx-mobile a:last-child { border-bottom: 0; }
@media (max-width: 900px) { .tx-nav { display: none; } .tx-burger { display: inline-grid; } }

/* ---------- search overlay ---------- */
.tx-search { position: fixed; inset: 0; z-index: 9800; background: rgba(15, 12, 30, .55); backdrop-filter: blur(4px); display: none; align-items: flex-start; justify-content: center; padding: 9vh 16px 16px; }
.tx-search.open { display: flex; }
.tx-search-box { width: 100%; max-width: 640px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 20px; box-shadow: var(--tx-shadow-hover); overflow: hidden; animation: txpop .2s ease; }
@keyframes txpop { from { opacity: 0; transform: translateY(-8px) scale(.98); } }
.tx-search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--tx-ink); font-size: 18px; padding: 18px 22px; border-bottom: 1px solid var(--tx-line); }
.tx-search-res { max-height: 56vh; overflow: auto; padding: 8px; }
.tx-search-res a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; text-decoration: none; }
.tx-search-res a:hover, .tx-search-res a.sel { background: var(--tx-surface2); }
.tx-search-res .ic { font-size: 22px; width: 32px; text-align: center; }
.tx-search-res .nm { font-weight: 700; display: block; line-height: 1.4; }
.tx-search-res .ds { font-size: 13px; color: var(--tx-muted); display: block; line-height: 1.4; }
.tx-search-res .tg { margin-inline-start: auto; font-size: 11px; color: var(--tx-muted); border: 1px solid var(--tx-line); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.tx-search-empty { padding: 26px; text-align: center; color: var(--tx-muted); }

/* ---------- buttons / badges ---------- */
.tx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; cursor: pointer; text-decoration: none; font-weight: 800; font-size: 15px; padding: 12px 24px; border-radius: 999px; background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); color: var(--tx-gold-ink) !important; box-shadow: 0 6px 20px rgba(232, 168, 0, .28); transition: transform .2s, box-shadow .2s; }
.tx-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(232, 168, 0, .38); }
.tx-btn.ghost { background: var(--tx-surface); color: var(--tx-ink) !important; border: 1px solid var(--tx-line); box-shadow: none; }
.tx-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 9px; border-radius: 99px; background: var(--tx-purple-soft); color: var(--tx-purple); letter-spacing: .2px; }
.tx-badge.free { background: color-mix(in srgb, var(--tx-gold) 22%, transparent); color: var(--tx-gold-2); }

/* ---------- home ---------- */
.tx-hero { position: relative; text-align: center; padding: 64px 20px 44px; overflow: hidden; }
.tx-hero::before { content: ''; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 55% at 50% 0%, color-mix(in srgb, var(--tx-gold) 24%, transparent), transparent 70%), radial-gradient(40% 40% at 90% 30%, color-mix(in srgb, var(--tx-purple) 14%, transparent), transparent 70%); }
.tx-eyebrow { display: inline-flex; gap: 8px; align-items: center; font-weight: 700; font-size: 13px; color: var(--tx-purple); background: var(--tx-purple-soft); padding: 6px 14px; border-radius: 99px; margin-bottom: 18px; }
.tx-hero h1 { margin: 0 auto 14px; max-width: 820px; font-size: clamp(30px, 5.2vw, 54px); line-height: 1.25; font-weight: 900; letter-spacing: -.5px; }
.tx-hero h1 em { font-style: normal; background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tx-hero p.sub { margin: 0 auto 26px; max-width: 640px; color: var(--tx-muted); font-size: clamp(15px, 2vw, 19px); }
.tx-hero-search { display: flex; align-items: center; gap: 12px; width: min(620px, 100%); margin: 0 auto; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 999px; padding: 15px 22px; box-shadow: var(--tx-shadow); color: var(--tx-muted); font-size: 16px; cursor: text; text-align: start; transition: box-shadow .2s, border-color .2s; }
.tx-hero-search:hover { box-shadow: var(--tx-shadow-hover); border-color: var(--tx-gold); }
.tx-hero-search svg { width: 20px; height: 20px; flex: none; }
.tx-hero-search kbd { margin-inline-start: auto; font: 600 12px/1 system-ui; border: 1px solid var(--tx-line); padding: 4px 8px; border-radius: 8px; background: var(--tx-surface2); }
.tx-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }
.tx-chips a, .tx-chips button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 99px; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); text-decoration: none; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; transition: all .2s; }
.tx-chips a:hover, .tx-chips button:hover, .tx-chips button.on { background: var(--tx-gold); border-color: var(--tx-gold); color: var(--tx-gold-ink); transform: translateY(-1px); }
.tx-section { padding: 38px 0; }
.tx-section-h { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.tx-section-h h2 { margin: 0; font-size: clamp(22px, 3vw, 30px); font-weight: 800; line-height: 1.3; }
.tx-section-h p { margin: 4px 0 0; color: var(--tx-muted); font-size: 15px; }
.tx-more { font-weight: 700; color: var(--tx-purple) !important; text-decoration: none; white-space: nowrap; font-size: 14px; }
.tx-more:hover { text-decoration: underline; }
.tx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.tx-card { display: flex; flex-direction: column; gap: 8px; padding: 18px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-r); text-decoration: none; color: inherit; box-shadow: var(--tx-shadow); transition: transform .2s, box-shadow .2s, border-color .2s; position: relative; min-height: 132px; }
.tx-card:hover { transform: translateY(-3px); box-shadow: var(--tx-shadow-hover); border-color: color-mix(in srgb, var(--tx-gold) 70%, var(--tx-line)); }
.tx-card .top { display: flex; align-items: center; justify-content: space-between; }
.tx-card .ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--tx-purple-soft); }
.tx-card h3 { margin: 0; font-size: 16.5px; font-weight: 800; line-height: 1.45; }
.tx-card p { margin: 0; color: var(--tx-muted); font-size: 13.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tx-why { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.tx-why > div { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: var(--tx-r); padding: 22px; box-shadow: var(--tx-shadow); }
.tx-why .ic { font-size: 30px; }
.tx-why h3 { margin: 8px 0 4px; font-size: 18px; }
.tx-why p { margin: 0; color: var(--tx-muted); font-size: 14.5px; }
.tx-faq details { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 14px; margin-bottom: 10px; padding: 0 18px; }
.tx-faq summary { cursor: pointer; font-weight: 800; padding: 16px 0; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.tx-faq summary::after { content: '+'; font-size: 22px; color: var(--tx-gold-2); line-height: 1; transition: transform .2s; }
.tx-faq details[open] summary::after { transform: rotate(45deg); }
.tx-faq details p { margin: 0 0 16px; color: var(--tx-muted); }
.tx-cta { text-align: center; background: linear-gradient(135deg, color-mix(in srgb, var(--tx-gold) 30%, var(--tx-surface)), var(--tx-surface)); border: 1px solid var(--tx-line); border-radius: 26px; padding: 44px 20px; margin: 20px 0 50px; box-shadow: var(--tx-shadow); }
.tx-cta h2 { margin: 0 0 8px; font-size: clamp(22px, 3.4vw, 32px); }
.tx-cta p { margin: 0 0 20px; color: var(--tx-muted); }

/* ---------- category / hub / breadcrumb ---------- */
.tx-crumbs { padding: 18px 0 0; font-size: 14px; color: var(--tx-muted); }
.tx-crumbs a { text-decoration: none; color: var(--tx-muted); } .tx-crumbs a:hover { color: var(--tx-ink); }
/* path line made clear (site.js): a back button + chips */
.tx-cr { display: flex !important; flex-wrap: wrap; align-items: center; gap: 8px 10px; padding: 14px 0 10px !important; margin: 0 !important; font-size: 14px !important; background: none !important; border: 0 !important; }
.tx-cr .tx-cr-back { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px !important; border-radius: 999px; background: var(--tx-gold) !important; color: var(--tx-gold-ink, #2b2200) !important; font-weight: 800; font-size: 14.5px; text-decoration: none; box-shadow: 0 2px 8px rgba(0,0,0,.12); }
.tx-cr .tx-cr-back:hover { filter: brightness(1.05); }
.tx-cr .tx-cr-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.tx-cr .tx-cr-path a { padding: 6px 12px !important; border-radius: 999px; background: var(--tx-purple-soft) !important; color: var(--tx-purple) !important; font-weight: 700; text-decoration: none; border: 1px solid rgba(106,90,249,.25); }
.tx-cr .tx-cr-path a:hover { background: var(--tx-purple) !important; color: #fff !important; }
.tx-cr .tx-cr-path i { font-style: normal; color: var(--tx-muted); font-weight: 700; }
.tx-cr .tx-cr-path b { padding: 6px 12px; border-radius: 999px; background: var(--tx-surface2); color: var(--tx-ink); font-weight: 700; border: 1px solid var(--tx-line); }
@media (max-width: 560px) { .tx-cr .tx-cr-back { width: 100%; justify-content: center; } .tx-cr .tx-cr-path b, .tx-cr .tx-cr-path i:nth-last-child(2) { display: none; } }
.tx-cat-head { padding: 22px 0 8px; }
.tx-cat-head h1 { margin: 6px 0 10px; font-size: clamp(26px, 4.2vw, 42px); font-weight: 900; line-height: 1.3; }
.tx-cat-head p { margin: 0; max-width: 820px; color: var(--tx-muted); font-size: 16.5px; }
.tx-related { padding: 8px 0 40px; }
.tx-related .tx-wrap { padding-top: 10px; }
.tx-related h2 { font-size: 22px; margin: 0 0 14px; }

/* ---------- footer ---------- */
.tx-footer { margin-top: 40px; background: var(--tx-surface); border-top: 1px solid var(--tx-line); }
.tx-footer-in { max-width: 1200px; margin: 0 auto; padding: 44px 20px 26px; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr .9fr; gap: 28px; align-items: start; }
.tx-footer h4, .tx-footer .tx-fh { margin: 0 0 12px; font-size: 15px; font-weight: 800; }
.tx-footer ul { list-style: none; margin: 0; padding: 0; }
.tx-footer li { margin: 0 0 8px; }
.tx-footer li a, .tx-footer p a { text-decoration: none; color: var(--tx-muted); font-size: 14.5px; }
.tx-footer li a:hover, .tx-footer p a:hover { color: var(--tx-ink); }
.tx-footer p { margin: 10px 0 0; color: var(--tx-muted); font-size: 14.5px; max-width: 340px; }
.tx-footer-bottom { max-width: 1200px; margin: 0 auto; padding: 16px 20px 28px; border-top: 1px solid var(--tx-line); display: flex; flex-wrap: wrap; gap: 8px 22px; justify-content: space-between; color: var(--tx-muted); font-size: 13.5px; }
@media (max-width: 960px) { .tx-footer-in { grid-template-columns: 1fr 1fr 1fr; } }
@media (max-width: 800px) { .tx-footer-in { grid-template-columns: 1fr 1fr; } .tx-footer-in > :first-child { grid-column: 1 / -1; } }

/* ---------- 404 ---------- */
.tx-404 { text-align: center; padding: 70px 20px 40px; }
.tx-404 .big { font-size: clamp(90px, 20vw, 170px); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.tx-404 img { width: 84px; height: 84px; }
.tx-404 h1 { margin: 10px 0 8px; font-size: clamp(22px, 4vw, 32px); }
.tx-404 p { color: var(--tx-muted); margin: 0 0 24px; }
.tx-404 .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ---------- compat with the original tool pages ---------- */
.tx-page { position: relative; z-index: 1; }
.tx-page > :first-child { margin-top: 0; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; } }
@media print { .tx-header, .tx-footer, .tx-search, .tx-related { display: none !important; } }

/* ================= accounts, forms, quota, chat (v3) ================= */
.tx-btn.sm { padding: 9px 20px; font-size: 14px; box-shadow: none; }
.tx-quota { display: none; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 99px; border: 1px solid var(--tx-line); background: var(--tx-surface); font-weight: 700; font-size: 13px; text-decoration: none; color: var(--tx-ink) !important; white-space: nowrap; }
.tx-quota.show { display: inline-flex; }
.tx-quota b { color: var(--tx-gold-2); font-size: 15px; }
.tx-quota.low b { color: #e5484d; }
.tx-acct { position: relative; }
.tx-avatar-btn { width: 42px; height: 42px; border-radius: 50%; overflow: hidden; border: 2px solid var(--tx-gold); padding: 0; cursor: pointer; background: var(--tx-surface); display: block; }
.tx-avatar-btn img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tx-avatar-btn .dot { position: absolute; top: -2px; inset-inline-end: -2px; width: 12px; height: 12px; border-radius: 50%; background: #e5484d; border: 2px solid var(--tx-bg); }
.tx-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); min-width: 230px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; box-shadow: var(--tx-shadow-hover); padding: 8px; display: none; z-index: 700; }
.tx-menu.open { display: block; }
.tx-menu .who { padding: 10px 12px 12px; border-bottom: 1px solid var(--tx-line); margin-bottom: 6px; }
.tx-menu .who b { display: block; font-size: 15px; } .tx-menu .who span { font-size: 12px; color: var(--tx-muted); word-break: break-all; }
.tx-menu a, .tx-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; border-radius: 10px; text-decoration: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 14px; color: var(--tx-ink) !important; text-align: start; }
.tx-menu a:hover, .tx-menu button:hover { background: var(--tx-surface2); }
.tx-menu .badge { margin-inline-start: auto; background: #e5484d; color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
@media (max-width: 560px) { .tx-quota { padding: 6px 10px; font-size: 12px; } .tx-header-in { gap: 8px; padding: 0 12px; } .tx-logo { font-size: 19px; } }

.tx-modal { position: fixed; inset: 0; z-index: 950; background: rgba(15, 12, 30, .55); backdrop-filter: blur(4px); display: none; align-items: center; justify-content: center; padding: 16px; }
.tx-modal.open { display: flex; }
.tx-modal-box { width: 100%; max-width: 440px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 24px; padding: 30px 26px; text-align: center; box-shadow: var(--tx-shadow-hover); animation: txpop .2s ease; }
.tx-modal-box .big { font-size: 46px; line-height: 1; margin-bottom: 10px; }
.tx-modal-box h3 { margin: 0 0 8px; font-size: 22px; } .tx-modal-box p { margin: 0 0 20px; color: var(--tx-muted); }
.tx-modal-box .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.tx-auth { max-width: 560px; margin: 0 auto; padding: 34px 18px 60px; }
.tx-panel { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 24px; box-shadow: var(--tx-shadow); padding: 28px; margin-bottom: 16px; }
.tx-panel h1 { margin: 0 0 6px; font-size: 27px; font-weight: 900; } .tx-panel h2 { margin: 0 0 12px; font-size: 19px; }
.tx-panel .lead { color: var(--tx-muted); margin: 0 0 20px; font-size: 15px; }
.tx-field { margin-bottom: 14px; } .tx-field > label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }
.tx-input { width: 100%; padding: 12px 14px; border: 1px solid var(--tx-line); border-radius: 12px; background: var(--tx-bg); color: var(--tx-ink); font: inherit; font-size: 15px; }
.tx-input:focus { outline: 2px solid var(--tx-gold); outline-offset: 1px; border-color: transparent; }
textarea.tx-input { resize: vertical; min-height: 90px; }
.tx-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 480px) { .tx-row2 { grid-template-columns: 1fr; } }
.tx-hint { font-size: 12.5px; color: var(--tx-muted); margin-top: 5px; }
.tx-alert { padding: 11px 14px; border-radius: 12px; font-size: 14px; margin-bottom: 14px; display: none; }
.tx-alert.show { display: block; }
.tx-alert.err { background: color-mix(in srgb, #e5484d 14%, transparent); color: #c0343a; border: 1px solid color-mix(in srgb, #e5484d 35%, transparent); }
.tx-alert.ok { background: color-mix(in srgb, #2faa5c 14%, transparent); color: #1d7f44; border: 1px solid color-mix(in srgb, #2faa5c 35%, transparent); }
html[data-theme="dark"] .tx-alert.err { color: #ff9a9e; } html[data-theme="dark"] .tx-alert.ok { color: #7be0a2; }
.tx-check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--tx-muted); margin: 8px 0 16px; }
.tx-check input { margin-top: 5px; accent-color: var(--tx-gold-2); }
.tx-gender { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tx-gender label { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 13px; border: 1px solid var(--tx-line); border-radius: 14px; cursor: pointer; font-weight: 800; background: var(--tx-bg); }
.tx-gender input { position: absolute; opacity: 0; pointer-events: none; }
.tx-gender label:has(input:checked) { border-color: var(--tx-gold); background: color-mix(in srgb, var(--tx-gold) 18%, transparent); }
.tx-avatars { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: 10px; max-height: 300px; overflow: auto; padding: 6px; border: 1px solid var(--tx-line); border-radius: 16px; background: var(--tx-bg); }
.tx-avatars label { position: relative; cursor: pointer; display: block; aspect-ratio: 1 / 1; border-radius: 50%; overflow: hidden; }
.tx-avatars input { position: absolute; opacity: 0; pointer-events: none; }
.tx-avatars img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; border: 3px solid transparent; box-sizing: border-box; transition: transform .15s; }
.tx-avatars label:hover img { transform: scale(1.06); }
.tx-avatars input:checked + img { border-color: var(--tx-gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--tx-gold) 40%, transparent); }
.tx-hp { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; opacity: 0; overflow: hidden; clip: rect(0, 0, 0, 0); pointer-events: none; }
.tx-links { text-align: center; margin-top: 14px; font-size: 14px; color: var(--tx-muted); }
.tx-links a { color: var(--tx-purple); font-weight: 700; text-decoration: none; } .tx-links a:hover { text-decoration: underline; }
.tx-profile-head { display: flex; gap: 16px; align-items: center; }
.tx-profile-head img { width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--tx-gold); object-fit: cover; }
.tx-profile-head h1 { margin: 0; font-size: 24px; } .tx-profile-head p { margin: 2px 0 0; color: var(--tx-muted); font-size: 14px; }
.tx-meter { height: 12px; background: var(--tx-surface2); border-radius: 99px; overflow: hidden; margin: 10px 0 6px; } .tx-meter > i { display: block; height: 100%; background: linear-gradient(90deg, var(--tx-gold), var(--tx-gold-2)); border-radius: 99px; transition: width .4s; }
.tx-danger { border-color: color-mix(in srgb, #e5484d 40%, var(--tx-line)); }
.tx-btn.danger { background: #e5484d; color: #fff !important; box-shadow: none; }

/* chat room + support thread */
.tx-chat { display: grid; grid-template-columns: 1fr 250px; gap: 14px; height: calc(100vh - 250px); min-height: 460px; }
.tx-chat-main, .tx-online { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 22px; box-shadow: var(--tx-shadow); overflow: hidden; display: flex; flex-direction: column; min-height: 0; }
.tx-chat-list { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.tx-msg { display: flex; gap: 10px; align-items: flex-start; }
.tx-msg > img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; flex: none; }
.tx-msg .bub { background: var(--tx-surface2); border-radius: 6px 16px 16px 16px; padding: 8px 13px; max-width: min(560px, 82%); word-break: break-word; }
.tx-msg.mine .bub { background: color-mix(in srgb, var(--tx-gold) 22%, var(--tx-surface)); }
.tx-msg .meta { font-size: 12px; color: var(--tx-muted); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx-msg .name { font-weight: 800; color: var(--tx-ink); font-size: 13.5px; }
.tx-msg .quote { display: block; margin: 4px 0 2px; padding: 3px 9px; border-inline-start: 3px solid var(--tx-gold); background: color-mix(in srgb, var(--tx-ink) 6%, transparent); border-radius: 6px; font-size: 12.5px; color: var(--tx-muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-msg .quote b { color: var(--tx-ink); }
.tx-msg.to-me .bub { box-shadow: 0 0 0 2px var(--tx-gold); }
.tx-msg.flash .bub { animation: txflash 1.6s; }
@keyframes txflash { 0%, 60% { box-shadow: 0 0 0 3px var(--tx-gold); } 100% { box-shadow: none; } }
.tx-replybar { display: flex; gap: 8px; align-items: center; justify-content: space-between; margin-bottom: 6px; padding: 5px 10px; border-inline-start: 3px solid var(--tx-gold); background: var(--tx-surface2); border-radius: 8px; font-size: 13px; }
.tx-replybar span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tx-replybar button { border: 0; background: none; cursor: pointer; font-size: 15px; color: var(--tx-muted); }
.tx-msg .txt { margin-top: 2px; line-height: 1.7; white-space: pre-wrap; }
.tx-msg .act { background: none; border: 0; color: var(--tx-muted); cursor: pointer; font-size: 12px; padding: 0 4px; opacity: 0; transition: opacity .15s; }
.tx-msg:hover .act, .tx-msg .act:focus { opacity: 1; }
.tx-admin-badge { background: var(--tx-gold); color: var(--tx-gold-ink); border-radius: 99px; font-size: 10.5px; font-weight: 900; padding: 1px 8px; }
.tx-chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--tx-line); align-items: flex-end; }
.tx-chat-form textarea { flex: 1; min-height: 44px; max-height: 110px; resize: none; }
.tx-count { font-size: 12px; color: var(--tx-muted); padding: 0 14px 8px; text-align: end; }
.tx-online { padding: 14px; overflow-y: auto; display: block; }
.tx-online h3 { margin: 0 0 10px; font-size: 15px; }
.tx-online li { list-style: none; display: flex; align-items: center; gap: 9px; padding: 6px 4px; font-size: 14px; font-weight: 600; }
.tx-online ul { margin: 0; padding: 0; } .tx-online img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; }
.tx-online .on { width: 8px; height: 8px; background: #2faa5c; border-radius: 50%; margin-inline-start: auto; }
.tx-rules { background: color-mix(in srgb, var(--tx-gold) 12%, var(--tx-surface)); border: 1px solid color-mix(in srgb, var(--tx-gold) 40%, var(--tx-line)); border-radius: 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 14px; }
.tx-rules summary { cursor: pointer; font-weight: 800; } .tx-rules ul { margin: 8px 0 0; padding-inline-start: 20px; color: var(--tx-muted); }
@media (max-width: 820px) { .tx-chat { grid-template-columns: 1fr; height: auto; } .tx-chat-main { height: 62vh; } .tx-online { max-height: 150px; order: -1; } }
.tx-thread { max-width: 760px; margin: 0 auto; }
.tx-thread .tx-chat-main { height: 64vh; min-height: 380px; }
.tx-bubble-row { display: flex; } .tx-bubble-row.me { justify-content: flex-start; } .tx-bubble-row.them { justify-content: flex-end; }
.tx-bubble { max-width: 82%; padding: 9px 14px; border-radius: 16px; line-height: 1.7; word-break: break-word; white-space: pre-wrap; }
.tx-bubble-row.me .tx-bubble { background: color-mix(in srgb, var(--tx-gold) 24%, var(--tx-surface)); border-end-start-radius: 4px; }
.tx-bubble-row.them .tx-bubble { background: var(--tx-surface2); border-end-end-radius: 4px; }
.tx-bubble small { display: block; color: var(--tx-muted); font-size: 11.5px; margin-top: 3px; }
.tx-empty { text-align: center; color: var(--tx-muted); padding: 40px 16px; }

/* comments widget */
.tx-comments { max-width: 760px; margin: 30px auto; padding: 0 18px; }
.tx-comments h2 { font-size: 22px; margin: 0 0 14px; }
.tx-comment { display: flex; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--tx-line); }
.tx-comment img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; }
.tx-comment .name { font-weight: 800; font-size: 14px; } .tx-comment .t { font-size: 12px; color: var(--tx-muted); margin-inline-start: 8px; }
.tx-comment p { margin: 2px 0 0; white-space: pre-wrap; word-break: break-word; }
.tx-comment .act { background: none; border: 0; color: var(--tx-muted); cursor: pointer; font-size: 12px; padding: 0; margin-inline-end: 10px; }
/* box model for the new components */
.tx-auth, .tx-auth *, .tx-panel, .tx-panel *, .tx-chat, .tx-chat *, .tx-thread *, .tx-comments, .tx-comments *, .tx-modal *, .tx-menu, .tx-menu *, .tx-rules, .tx-rules * { box-sizing: border-box; }

/* small phones: compact header */
@media (max-width: 520px) { .tx-actions > [data-open-search] { display: none; } .tx-quota .lbl { display: none; } .tx-actions { gap: 6px; } .tx-iconbtn { width: 38px; height: 38px; } .tx-avatar-btn { width: 38px; height: 38px; } }

@media (max-width: 380px) { .tx-header-in { gap: 6px; padding: 0 10px; } .tx-logo { font-size: 17px; gap: 6px; } .tx-logo img { width: 30px; height: 30px; } }

/* live community chip, emoji, members, messages */
.tx-live { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 99px; border: 1px solid color-mix(in srgb, #2faa5c 45%, var(--tx-line)); background: color-mix(in srgb, #2faa5c 10%, var(--tx-surface)); font-weight: 800; font-size: 13px; text-decoration: none; color: var(--tx-ink) !important; white-space: nowrap; }
.tx-live .n { display: inline-flex; align-items: center; gap: 6px; }
.tx-live i { width: 9px; height: 9px; border-radius: 50%; background: #2faa5c; box-shadow: 0 0 0 0 rgba(47,170,92,.6); animation: txlive 1.8s infinite; }
@keyframes txlive { 0% { box-shadow: 0 0 0 0 rgba(47,170,92,.55); } 70% { box-shadow: 0 0 0 8px rgba(47,170,92,0); } 100% { box-shadow: 0 0 0 0 rgba(47,170,92,0); } }
@media (max-width: 1180px) { .tx-live .lbl { display: none; } }
@media (max-width: 520px) { .tx-live { padding: 6px 9px; } }
.tx-emoji-btn { width: 40px !important; height: 40px !important; font-size: 19px; flex: none; }
.tx-emoji-panel { position: fixed; z-index: 960; width: 296px; max-width: calc(100vw - 20px); background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; box-shadow: var(--tx-shadow-hover); padding: 8px; display: none; }
.tx-emoji-panel.open { display: block; }
.tx-emoji-panel .grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 2px; max-height: 220px; overflow-y: auto; }
.tx-emoji-panel button { border: 0; background: none; font-size: 21px; padding: 5px 0; border-radius: 8px; cursor: pointer; line-height: 1; }
.tx-emoji-panel button:hover { background: var(--tx-surface2); }
.tx-members { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; margin-top: 14px; }
.tx-member { display: flex; gap: 12px; padding: 14px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; text-decoration: none; color: inherit !important; position: relative; box-shadow: var(--tx-shadow); transition: transform .15s, border-color .15s; }
.tx-member:hover { transform: translateY(-2px); border-color: var(--tx-gold); }
.tx-member img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; }
.tx-member b { font-size: 15px; } .tx-member p { margin: 3px 0 0; font-size: 13px; color: var(--tx-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.tx-member .on, .tx-on { width: 11px; height: 11px; border-radius: 50%; background: #2faa5c; border: 2px solid var(--tx-surface); position: absolute; top: 12px; inset-inline-end: 12px; }
.tx-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 10px 0; }
.tx-toolbar .tx-input { max-width: 320px; }
.tx-pcard { text-align: center; padding: 34px 24px; }
.tx-pcard img.big { width: 128px; height: 128px; border-radius: 50%; object-fit: cover; border: 4px solid var(--tx-gold); }
.tx-pcard h1 { margin: 12px 0 4px; font-size: 26px; } .tx-pcard .bio { max-width: 520px; margin: 14px auto; color: var(--tx-ink); white-space: pre-wrap; word-break: break-word; }
.tx-pcard .meta { color: var(--tx-muted); font-size: 14px; } .tx-pcard .row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.tx-msgs { display: grid; grid-template-columns: 300px 1fr; gap: 14px; height: calc(100vh - 250px); min-height: 460px; }
@media (max-width: 820px) { .tx-msgs { grid-template-columns: 1fr; height: auto; } .tx-msgs .tx-convs { max-height: 200px; } .tx-msgs .tx-chat-main { height: 62vh; } }
.tx-convs { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 22px; box-shadow: var(--tx-shadow); overflow-y: auto; padding: 8px; }
.tx-conv { display: flex; gap: 10px; align-items: center; padding: 9px; border-radius: 12px; text-decoration: none; color: inherit !important; cursor: pointer; }
.tx-conv:hover, .tx-conv.on { background: var(--tx-surface2); }
.tx-conv img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex: none; }
.tx-conv .t { min-width: 0; flex: 1; } .tx-conv b { display: block; font-size: 14px; } .tx-conv small { display: block; color: var(--tx-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-conv .badge { background: #e5484d; color: #fff; border-radius: 99px; font-size: 11px; padding: 1px 7px; }
.tx-thead { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--tx-line); }
.tx-thead img { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; } .tx-thead a { color: inherit !important; text-decoration: none; font-weight: 800; }
.tx-thead .sp { flex: 1; } .tx-thead button { background: none; border: 1px solid var(--tx-line); border-radius: 99px; padding: 4px 12px; cursor: pointer; font: inherit; font-size: 12.5px; color: var(--tx-ink); }
.tx-msg a.who { color: inherit !important; text-decoration: none; }

/* written guide under each utility tool */
.tx-info{padding:8px 0 26px}.tx-info .tx-wrap{max-width:860px}
.tx-info h2{font-size:22px;margin:26px 0 10px;font-weight:900}.tx-info h3{font-size:17px;margin:20px 0 6px;font-weight:800;color:var(--tx-purple)}
.tx-info p{font-size:16px;line-height:2;margin:0 0 10px}.tx-info ol,.tx-info ul{margin:0 0 10px;padding-inline-start:22px;line-height:1.95;font-size:15.5px}.tx-info li{margin:2px 0}
.tx-info details{background:var(--tx-surface);border:1px solid var(--tx-line);border-radius:12px;padding:10px 14px;margin:8px 0}.tx-info summary{cursor:pointer;font-weight:800;font-size:15.5px}.tx-info details p{margin:8px 0 2px;color:var(--tx-muted)}
.tx-info .tx-info-note{font-size:14px;color:var(--tx-muted);border-top:1px solid var(--tx-line);padding-top:12px;margin-top:20px}
.ai-intro{margin:10px 0 0;color:var(--tx-ink);font-size:16px;line-height:1.95;max-width:820px;background:var(--tx-surface);border:1px solid var(--tx-line);border-radius:14px;padding:12px 16px}

/* ===== questions & answers board ===== */
.tx-acct { display: flex; align-items: center; gap: 8px; }
.tx-bell { position: relative; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.tx-bell:hover { background: var(--tx-surface2); }
.tx-bell .nb { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #e5484d; color: #fff; font: 800 11px/18px inherit; text-align: center; display: none; }
.tx-notifs { position: absolute; inset-inline-end: 0; top: calc(100% + 10px); width: min(340px, 92vw); max-height: 70vh; overflow-y: auto; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; box-shadow: var(--tx-shadow-hover); display: none; z-index: 720; }
.tx-notifs.open { display: block; }
.tx-notifs h4 { margin: 0; padding: 12px 14px; font-size: 14px; border-bottom: 1px solid var(--tx-line); }
.tx-notifs a { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-bottom: 1px solid var(--tx-line); text-decoration: none; color: var(--tx-ink) !important; font-size: 13.5px; line-height: 1.5; }
.tx-notifs a:hover { background: var(--tx-surface2); }
.tx-notifs a.new { background: var(--tx-purple-soft); }
.tx-notifs a img { width: 34px; height: 34px; border-radius: 50%; flex: none; object-fit: cover; }
.tx-notifs a small { display: block; color: var(--tx-muted); font-size: 12px; }
.tx-notifs .none { padding: 22px 14px; text-align: center; color: var(--tx-muted); font-size: 13px; }
@media (max-width: 520px) { .tx-bell { width: 38px; height: 38px; } .tx-notifs { position: fixed; inset-inline: 8px; top: 64px; width: auto; } }

#qa { max-width: 860px; margin: 0 auto; }
.qa-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.qa-top .tx-input { flex: 1; min-width: 180px; }
.qa-tabs { display: inline-flex; background: var(--tx-surface2); border-radius: 12px; padding: 3px; }
.qa-tabs button { border: 0; background: none; color: var(--tx-muted); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 10px; cursor: pointer; }
.qa-tabs button.on { background: var(--tx-surface); color: var(--tx-purple); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.qa-ask, .qa-gate { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; padding: 12px; margin-bottom: 12px; }
.qa-ask-open { width: 100%; text-align: start; border: 1px dashed var(--tx-line); background: var(--tx-surface2); color: var(--tx-muted); font: inherit; font-size: 14px; padding: 12px 14px; border-radius: 12px; cursor: text; }
.qa-ask-open:hover { border-color: var(--tx-purple); }
.qa-ask form[hidden], .qa-ask-open[hidden] { display: none; }
.qa-ask form { display: grid; gap: 8px; }
.qa-gate { display: grid; gap: 6px; text-align: center; color: var(--tx-muted); font-size: 14px; } .qa-gate b { color: var(--tx-ink); font-size: 16px; } .qa-gate-btns { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.qa-row { display: flex; align-items: center; gap: 8px; } .qa-sp { flex: 1; }
.qa-board { height: min(70vh, 760px); overflow-y: auto; overscroll-behavior: contain; border: 1px solid var(--tx-line); border-radius: 18px; background: var(--tx-surface2); padding: 10px; scroll-behavior: smooth; }
.qa-card { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.qa-card:hover, .qa-card:focus { border-color: var(--tx-purple); box-shadow: var(--tx-shadow-hover); outline: 0; }
.qa-card h3 { margin: 8px 0 4px; font-size: 17px; line-height: 1.5; }
.qa-card p { margin: 0; color: var(--tx-muted); font-size: 14px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; }
.qa-meta { display: flex; align-items: center; gap: 10px; } .qa-meta > div { display: flex; flex-direction: column; line-height: 1.35; }
.qa-av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.qa-name { font-weight: 800; font-size: 14px; color: var(--tx-ink) !important; text-decoration: none; }
.qa-time { color: var(--tx-muted); font-size: 12px; }
.qa-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; }
.qa-count { font-size: 13px; font-weight: 700; color: var(--tx-muted); background: var(--tx-surface2); border-radius: 99px; padding: 3px 12px; } .qa-count.has { color: var(--tx-purple); background: var(--tx-purple-soft); }
.qa-more { text-align: center; color: var(--tx-muted); font-size: 13px; padding: 6px; min-height: 8px; }
.qa-thread { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 18px; padding: 16px; }
.qa-back { font-weight: 700; color: var(--tx-purple) !important; text-decoration: none; font-size: 14px; }
.qa-main h1 { font-size: clamp(20px, 3.4vw, 26px); line-height: 1.5; margin: 12px 0 8px; }
.qa-text { font-size: 15.5px; line-height: 1.85; white-space: pre-wrap; word-break: break-word; margin: 6px 0; }
.qa-acts { display: flex; gap: 14px; margin-top: 6px; } .qa-acts button { border: 0; background: none; color: var(--tx-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 0; } .qa-acts button:hover { color: var(--tx-purple); }
.qa-h2 { font-size: 16px; margin: 22px 0 10px; padding-top: 14px; border-top: 1px solid var(--tx-line); }
.qa-reply { padding: 12px 0; border-bottom: 1px solid var(--tx-line); border-radius: 8px; } .qa-reply:last-child { border-bottom: 0; }
.qa-reply.flash { animation: qaflash 2.4s ease; }
@keyframes qaflash { 0%, 60% { background: var(--tx-purple-soft); } 100% { background: transparent; } }
.qa-quote { margin: 8px 0 2px; padding: 6px 12px; border-inline-start: 3px solid var(--tx-purple); background: var(--tx-surface2); border-radius: 8px; font-size: 13px; color: var(--tx-muted); }
.qa-replyform { margin-top: 14px; display: grid; gap: 8px; }
.qa-to { display: flex; align-items: center; justify-content: space-between; background: var(--tx-purple-soft); border-radius: 10px; padding: 6px 12px; font-size: 13px; } .qa-to button { border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: var(--tx-muted); }
@media (max-width: 560px) { .qa-board { height: 68vh; padding: 8px; } .qa-card { padding: 12px; } .qa-thread { padding: 12px; } }
.qa-who { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

#qa *, .qa-thread, .qa-thread * { box-sizing: border-box; }
.qa-cats { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 10px; margin-bottom: 4px; scrollbar-width: thin; }
.qa-cats button { flex: none; border: 1px solid var(--tx-line); background: var(--tx-surface); color: var(--tx-ink); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 99px; cursor: pointer; white-space: nowrap; }
.qa-cats button:hover { border-color: var(--tx-purple); }
.qa-cats button.on { background: var(--tx-purple); border-color: var(--tx-purple); color: #fff; }
.qa-cat { display: inline-block; margin-top: 8px; font-size: 12px; font-weight: 800; color: var(--tx-purple); background: var(--tx-purple-soft); border-radius: 99px; padding: 3px 12px; }
.qa-ask select.tx-input { width: 100%; }
.qa-replyform textarea, .qa-ask textarea, .qa-ask input.tx-input { width: 100%; max-width: 100%; }
.qa-more { min-height: 24px; }
@media (max-width: 700px) { .qa-board { height: auto; max-height: none; overflow: visible; border: 0; background: none; padding: 0; } }
.tx-nav > a.tx-hot { background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); color: var(--tx-gold-ink); font-weight: 800; box-shadow: 0 2px 10px rgba(242,185,31,.4); padding: 8px 16px; }
.tx-nav > a.tx-hot:hover { background: linear-gradient(135deg, var(--tx-gold-2), var(--tx-gold)); transform: translateY(-1px); }
.tx-mobile a.tx-hot-m { background: linear-gradient(135deg, var(--tx-gold), var(--tx-gold-2)); color: var(--tx-gold-ink) !important; font-weight: 800; border-radius: 12px; }

/* ===== board: wider page, categories on the side, votes, tools ===== */
#qa.qa-two { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 18px; align-items: start; }
#qa.qa-one { max-width: 860px; margin: 0 auto; }
.qa-two .qa-cats { flex-direction: column; overflow-y: auto; overflow-x: hidden; gap: 4px; padding: 6px; margin: 0; position: sticky; top: 84px; max-height: calc(100vh - 110px); background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; }
.qa-two .qa-cats button { text-align: start; border: 0; border-radius: 10px; padding: 8px 12px; white-space: normal; }
.qa-two .qa-cats button:hover { background: var(--tx-surface2); }
.qa-two .qa-cats button.on { background: var(--tx-purple); color: #fff; }
.qa-two .qa-board { height: calc(100vh - 230px); min-height: 520px; }
.qa-card { padding: 12px 14px; margin-bottom: 8px; } .qa-card h3 { font-size: 16px; margin: 6px 0 2px; }
.qa-card p { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 13.5px; }
.qa-card .qa-foot { margin-top: 8px; gap: 8px; justify-content: flex-start; } .qa-card .qa-foot .qa-time { margin-inline-start: auto; }
.qa-likes { display: inline-flex; align-items: center; gap: 4px; color: var(--tx-muted); font-size: 13px; font-weight: 700; }
.qa-vote { display: inline-flex; gap: 6px; }
.qa-vote button { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--tx-line) !important; background: var(--tx-surface) !important; border-radius: 99px !important; padding: 3px 11px !important; color: var(--tx-muted) !important; }
.qa-vote button b { font-size: 12.5px; font-weight: 800; }
.qa-vote button:hover { border-color: var(--tx-purple) !important; color: var(--tx-purple) !important; }
.qa-vote button.on { background: var(--tx-purple-soft) !important; border-color: var(--tx-purple) !important; color: var(--tx-purple) !important; }
.qa-acts { align-items: center; flex-wrap: wrap; }
.qa-best { display: inline-block; margin-inline-start: 6px; font-size: 11px; font-weight: 800; background: var(--tx-gold); color: var(--tx-gold-ink); border-radius: 99px; padding: 1px 9px; }
.qa-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding: 10px 14px; background: var(--tx-surface2); border-radius: 12px; font-size: 13.5px; }
.qa-tools a { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 99px; padding: 4px 12px; text-decoration: none; color: var(--tx-purple) !important; font-weight: 700; }
.qa-tools a:hover { border-color: var(--tx-purple); }
@media (max-width: 860px) {
  #qa.qa-two { display: block; }
  .qa-two .qa-cats { position: static; flex-direction: row; overflow-x: auto; overflow-y: hidden; max-height: none; background: none; border: 0; padding: 2px 2px 10px; }
  .qa-two .qa-cats button { white-space: nowrap; border: 1px solid var(--tx-line); border-radius: 99px; }
  .qa-two .qa-board { height: auto; min-height: 0; }
}

/* small flags next to names (the chat list used to stretch them to avatar size) */
img.tx-fl { width: 18px !important; height: 12px !important; max-width: none; object-fit: cover; border-radius: 2px !important; vertical-align: -1px; margin-inline-start: 6px; display: inline-block; box-shadow: 0 0 0 1px rgba(0,0,0,.14); flex: none; }

/* ===== questions page: the whole page scrolls (no inner box) + pictures ===== */
.qa-two .qa-board { height: auto !important; min-height: 0 !important; max-height: none !important; overflow: visible !important; border: 0 !important; background: none !important; padding: 0 !important; }
.qa-attrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.qa-attach { border: 1px dashed var(--tx-line); background: var(--tx-surface2); color: var(--tx-purple); font: inherit; font-weight: 700; font-size: 13px; padding: 7px 14px; border-radius: 10px; cursor: pointer; }
.qa-attach:hover { border-color: var(--tx-purple); }
.qa-thumbs { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.qa-th { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--tx-line); display: inline-flex; align-items: center; justify-content: center; background: var(--tx-surface2); color: var(--tx-muted); }
.qa-th img { width: 100%; height: 100%; object-fit: cover; }
.qa-th button { position: absolute; top: 2px; inset-inline-end: 2px; width: 20px; height: 20px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; padding: 0; }
.qa-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.qa-imgs a { display: block; border-radius: 12px; overflow: hidden; border: 1px solid var(--tx-line); background: var(--tx-surface2); }
.qa-imgs img { display: block; max-width: min(100%, 320px); max-height: 240px; width: auto; height: auto; object-fit: contain; }
.qa-hasimg { font-size: 12px; font-weight: 700; color: var(--tx-muted); }

/* ===== questions in two columns ===== */
@media (min-width: 760px) {
  .qa-two #qaList { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: stretch; }
  .qa-two #qaList .qa-card { margin: 0; height: 100%; display: flex; flex-direction: column; border-width: 1px; }
  .qa-two #qaList .qa-card .qa-foot { margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--tx-line); }
  .qa-two #qaList .tx-empty { grid-column: 1 / -1; }
}
/* phone fixes for a few tool layouts (found by the full-site scan) */
.patterns-grid > * { min-width: 0; }
.pattern-card .pattern-regex { max-width: 100%; }
.mode-tabs { max-width: 100%; }
@media (max-width: 560px) {
  .patterns-grid { grid-template-columns: 1fr !important; }
  .mode-tabs { display: flex !important; flex-wrap: wrap !important; justify-content: center; }
  .mode-tab { flex: 1 1 auto; white-space: normal !important; }
  #main pre, #main table { max-width: 100%; }
  #main pre { overflow-x: auto; }
}
/* small phones (360px and less): compact header; the dark-mode button moves into the menu */
@media (hover: none), (max-width: 640px) { .tx-hero-search kbd, .tx-search kbd { display: none; } }
/* typing direction: Latin left, Arabic right (dir=auto); while empty, the Arabic placeholder stays on the right */
textarea[dir=auto], input[dir=auto] { text-align: start !important; }
html[dir=rtl] textarea[dir=auto]:placeholder-shown, html[dir=rtl] input[dir=auto]:placeholder-shown { direction: rtl; }
html[dir=ltr] textarea[dir=auto]:placeholder-shown, html[dir=ltr] input[dir=auto]:placeholder-shown { direction: ltr; }
.tw-txt, .qa-body, .qa-reply-body, .tx-bubble span, .tw-bub .tw-txt { unicode-bidi: plaintext; text-align: start; }
/* touch phones: text boxes at 16px so iPhone does not zoom the page when you tap them */
@media (hover: none) and (pointer: coarse) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), textarea, select { font-size: 16px !important; }
}
/* phone menu (☰): أدوات الربح on top, 5 main links, categories as small buttons, a short footer; scrolls inside itself */
.tx-mobile.open { max-height: calc(100vh - var(--tx-header-h)); max-height: calc(100dvh - var(--tx-header-h)); overflow-y: auto; overscroll-behavior: contain; padding: 12px 16px 20px; }
.tx-mobile a.tx-hot-m { flex-wrap: wrap; padding: 12px 14px; margin-bottom: 6px; border: 0; font-size: 16px; }
.tx-mobile a.tx-hot-m small { flex-basis: 100%; font-size: 12px; font-weight: 600; opacity: .8; margin-top: -4px; padding-inline-start: 30px; }
.tx-mob-main a { font-size: 15.5px; }
.tx-mob-main a:last-child { border-bottom: 0; }
.tx-mob-h { margin: 12px 0 8px; font-size: 12px; font-weight: 800; color: var(--tx-muted); }
.tx-mob-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tx-mobile .tx-mob-cats a { border: 1px solid var(--tx-line); border-radius: 12px; padding: 9px 10px; font-size: 13.5px; gap: 6px; background: var(--tx-surface2); min-width: 0; }
.tx-mobile .tx-mob-cats a:last-child { border-bottom: 1px solid var(--tx-line); }
.tx-mob-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--tx-line); }
.tx-mobile .tx-mob-foot a, .tx-mob-foot button { border: 0; padding: 4px 2px; font-size: 13px; font-weight: 600; color: var(--tx-muted); background: none; font-family: inherit; cursor: pointer; }
body.tx-menu-open .tw, body.tx-menu-open .gh, body.tx-modal-open .tw, body.tx-modal-open .gh { display: none !important; }      /* chat bubbles never cover the open menu */
body.tx-typing .tw:not(.open), body.tx-typing .gh { display: none !important; }  /* ...nor what you are typing (phone keyboard) */
@media (max-width: 640px) { body { padding-bottom: 58px; } }                         /* the end of every page stays visible above the chat bar */
@media (max-width: 400px) {
  .tx-header-in { gap: 4px; padding: 0 8px; }
  .tx-logo { font-size: 16px; gap: 5px; } .tx-logo img { width: 28px; height: 28px; }
  .tx-actions { gap: 4px; }
  .tx-iconbtn, .tx-avatar-btn { width: 34px; height: 34px; }
  .tx-quota { padding: 5px 8px; font-size: 11.5px; } .tx-quota b { font-size: 13px; }
  .tx-acct .tx-btn.sm { padding: 6px 10px; font-size: 13px; }
  .tx-actions > .tx-theme { display: none; }
}
@media (max-width: 340px) { .tx-logo span { display: none; } .regex-delimiter { display: none !important; } }
/* header never wraps: items stay on one line; on medium screens the least important links hide instead of squeezing the gold button */
.tx-header .tx-nav { flex-wrap: nowrap; min-width: 0; }
.tx-header .tx-nav > a, .tx-header .tx-dd > button, .tx-header .tx-quota, .tx-header .tx-actions > * { white-space: nowrap; flex-shrink: 0; }
.tx-header .tx-nav > a.tx-hot { line-height: 1.4; font-size: 14.5px; }
@media (max-width: 1220px) { .tx-header .tx-nav > a[href="/tools/"] { display: none; } }
@media (max-width: 1080px) { .tx-header .tx-nav > a[href="/ai/"] { display: none; } .tx-header .tx-quota .lbl { display: none; } }
@media (max-width: 980px) { .tx-header .tx-nav > a[href="/blog/"] { display: none; } }
/* ===== ideas pages ===== */
.idea-wrap { max-width: 860px; margin-inline: auto; }
.idea-article h1 { font-size: clamp(24px, 4vw, 34px); line-height: 1.5; margin: 8px 0 8px; }
.idea-lead { font-size: 17px; line-height: 1.9; color: var(--tx-muted); margin: 0 0 12px; }
.idea-article h2 { font-size: 21px; margin: 26px 0 8px; }
.idea-article p, .idea-article li { font-size: 16.5px; line-height: 1.95; }
.idea-article ul, .idea-article ol { padding-inline-start: 22px; margin: 8px 0; }
.idea-article li { margin: 4px 0; }
.idea-note { margin-top: 22px; padding: 12px 16px; background: var(--tx-surface2); border-inline-start: 4px solid var(--tx-gold); border-radius: 10px; font-size: 14.5px; color: var(--tx-muted); }
.idea-tools, .idea-talk, .idea-more { margin-top: 34px; }
.idea-tools h2, .idea-talk h2, .idea-more h2 { font-size: 21px; margin: 0 0 10px; }
.idea-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.idea-card { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 16px; text-decoration: none; color: var(--tx-ink) !important; transition: border-color .15s, box-shadow .15s; }
.idea-card:hover { border-color: var(--tx-purple); box-shadow: var(--tx-shadow-hover); }
.idea-card b { font-size: 17px; line-height: 1.6; } .idea-card span { color: var(--tx-muted); font-size: 14px; line-height: 1.8; } .idea-card i { font-style: normal; color: var(--tx-purple); font-weight: 800; font-size: 14px; margin-top: auto; }
.qa-idea .qa-thread { border: 0; padding: 0; background: none; }
.qa-ideavote { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 14px; font-weight: 700; }
.qa-owner { margin-inline-start: 6px; font-size: 11px; font-weight: 800; background: var(--tx-purple-soft); color: var(--tx-purple); border-radius: 99px; padding: 1px 9px; }

/* ===== studio tools: Upscale + Mockups ===== */
.st-page { max-width: 1100px; }
.st-h1 { font-size: clamp(24px, 4vw, 34px); margin: 4px 0 6px; line-height: 1.5; }
.st-lead { color: var(--tx-muted); font-size: 15.5px; margin: 0 0 16px; line-height: 1.8; }
.st-app { background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 18px; padding: 18px; }
.st-app *, .st-app *::before, .st-app *::after { box-sizing: border-box; }
.st-drop { display: flex; flex-direction: column; align-items: center; gap: 6px; border: 2px dashed var(--tx-line); border-radius: 16px; padding: 26px 14px; text-align: center; cursor: pointer; background: var(--tx-surface2); transition: border-color .15s; }
.st-drop:hover, .st-drop.on { border-color: var(--tx-purple); }
.st-drop b { font-size: 16px; } .st-drop span { color: var(--tx-muted); font-size: 13.5px; }
.st-list { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.st-item { position: relative; width: 86px; text-align: center; font-size: 12px; color: var(--tx-muted); }
.st-item img { width: 86px; height: 86px; object-fit: cover; border-radius: 10px; border: 1px solid var(--tx-line); display: block; background: #fff; }
.st-item button { position: absolute; top: 4px; inset-inline-end: 4px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; line-height: 1; padding: 0; }
.st-opts { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 12px 0; }
.st-opts label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 700; }
.st-opts select, .st-opts textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-bg); color: var(--tx-ink); width: 100%; }
.st-opts input[type=range] { width: 100%; }
.st-opts input[type=color] { width: 100%; height: 38px; border: 1px solid var(--tx-line); border-radius: 10px; background: none; padding: 2px; }
.st-opts output { color: var(--tx-purple); }
.st-opts .st-wide { grid-column: 1 / -1; }
.st-opts .st-check { flex-direction: row; align-items: center; gap: 8px; }
.st-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.st-hint { color: var(--tx-muted); font-size: 13px; font-weight: 400; }
.st-bar { height: 8px; background: var(--tx-surface2); border-radius: 99px; overflow: hidden; margin-top: 12px; }
.st-bar i { display: block; height: 100%; width: 0; background: var(--tx-purple); transition: width .2s; }
.st-results { margin-top: 18px; }
.st-res-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.st-sp { flex: 1; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.st-card { background: var(--tx-bg); border: 1px solid var(--tx-line); border-radius: 14px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.st-card .st-prev, .st-card .st-before { width: 100%; height: auto; border-radius: 8px; background: #fff; display: block; }
.st-cap { display: flex; justify-content: space-between; font-size: 13px; } .st-cap span { color: var(--tx-muted); }
.st-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.st-err { color: #c0392b; font-size: 13.5px; }
.st-step { margin-bottom: 18px; }
.st-step h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 0 0 10px; }
.st-step h3 i { font-style: normal; width: 26px; height: 26px; border-radius: 50%; background: var(--tx-purple); color: #fff; display: inline-grid; place-items: center; font-size: 13px; flex: none; }
details.st-text summary { list-style: none; cursor: pointer; } details.st-text summary::-webkit-details-marker { display: none; }
details.st-text summary h3 { display: inline-flex; } details.st-text summary h3::after { content: '▾'; color: var(--tx-muted); margin-inline-start: 6px; }
.st-seg { display: inline-flex; background: var(--tx-surface2); border-radius: 12px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.st-seg button { border: 0; background: none; padding: 9px 18px; border-radius: 9px; font: inherit; font-weight: 700; color: var(--tx-muted); cursor: pointer; }
.st-seg button.on { background: var(--tx-surface); color: var(--tx-purple); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.st-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.st-chips button { border: 1px solid var(--tx-line); background: var(--tx-surface); border-radius: 99px; padding: 7px 14px; font: inherit; font-weight: 700; font-size: 13.5px; cursor: pointer; color: var(--tx-ink); }
.st-chips button.on { background: var(--tx-purple); border-color: var(--tx-purple); color: #fff; } .st-chips small { opacity: .7; }
.st-scenes { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.st-scene { position: relative; border: 3px solid transparent; border-radius: 12px; padding: 0; overflow: hidden; cursor: pointer; background: var(--tx-surface2); }
.st-scene img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; }
.st-scene.on { border-color: var(--tx-purple); }
.st-scene i { position: absolute; top: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--tx-purple); color: #fff; font-style: normal; display: none; place-items: center; font-size: 14px; }
.st-scene.on i { display: grid; }
.st-scene em { position: absolute; bottom: 6px; inset-inline-start: 6px; background: rgba(0,0,0,.6); color: #fff; font-size: 11px; font-style: normal; padding: 2px 8px; border-radius: 99px; }
.st-gate { text-align: center; padding: 30px 14px; } .st-gate b { font-size: 19px; display: block; margin-bottom: 8px; } .st-gate p { color: var(--tx-muted); }
.st-gate-btns { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
/* upgrade button (header) + plans page */
.tx-upg { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; border-radius: 99px; background: linear-gradient(135deg, #6b54b5, #8b6fe0); color: #fff !important; font-weight: 800; font-size: 13px; text-decoration: none; white-space: nowrap; box-shadow: 0 2px 8px rgba(107,84,181,.35); }
.tx-upg:hover { filter: brightness(1.08); }
@media (max-width: 520px) { .tx-upg span { display: none; } .tx-upg { width: 34px; height: 34px; padding: 0; justify-content: center; } }
.tx-limits { padding: 0 0 6px; } .tx-limits p { margin: 18px auto 0; max-width: 980px; background: var(--tx-surface2); border: 1px solid var(--tx-line); border-radius: 14px; padding: 12px 16px; font-size: 14.5px; line-height: 1.9; }
.tx-diff { background: #eef6ff; border: 1px solid #cfe3fb; border-radius: 12px; padding: 10px 14px; line-height: 1.9; }
[data-theme="dark"] .tx-diff { background: #1f2a38; border-color: #2f4560; }
.tx-upd { display: inline-block; margin-inline-start: 6px; font-size: 12.5px; opacity: .85; }
.tx-noscript { background: #fff6e0; border-radius: 10px; padding: 10px 14px; }
.tx-about-home h2, .tx-about-home h3 { margin: 16px 0 6px; font-size: 19px; } .tx-about-home p, .tx-about-home li { color: var(--tx-ink); line-height: 2; font-size: 15.5px; max-width: 900px; }
.tx-how { max-width: 760px; margin: 18px auto 0; } .tx-how h2 { margin: 0 0 8px; font-size: 19px; } .tx-how ol { margin: 0; padding-inline-start: 22px; line-height: 2; }
.tx-refund { margin: 10px 0 0; padding: 9px 12px; border-radius: 10px; background: #fff6e0; border: 1px solid #f2d58a; color: #5c4300; font-size: 13.5px; line-height: 1.8; }
[data-theme="dark"] .tx-refund { background: #3a3220; border-color: #6b5a2a; color: #f2dca0; }
.tx-act-now { display: flex; flex-direction: column; gap: 3px; background: linear-gradient(135deg, var(--tx-purple-soft), transparent); border: 1px solid var(--tx-line); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; }
.tx-act-now b { font-size: 20px; color: var(--tx-purple); } .tx-act-now small { color: var(--tx-muted); font-weight: 700; }
.tx-act-form label { display: block; font-weight: 800; margin-bottom: 6px; } .tx-act-form > div { display: flex; gap: 8px; }
.tx-act-form input { flex: 1; min-width: 0; font: 600 15px/1.2 ui-monospace, Consolas, monospace; padding: 11px 12px; border: 1px solid var(--tx-line); border-radius: 12px; background: var(--tx-bg); color: var(--tx-ink); text-transform: uppercase; }
.tx-plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; max-width: 1100px; margin: 0 auto; }
.tx-plan { position: relative; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 18px; padding: 20px 16px; display: flex; flex-direction: column; gap: 8px; }
.tx-plan.hot { border: 2px solid var(--tx-purple); box-shadow: 0 8px 26px rgba(107,84,181,.18); }
.tx-plan em { position: absolute; top: -12px; inset-inline-start: 50%; transform: translateX(50%); background: var(--tx-purple); color: #fff; font-style: normal; font-size: 12px; font-weight: 800; padding: 3px 12px; border-radius: 99px; white-space: nowrap; }
.tx-plan h3 { margin: 0; font-size: 20px; } .tx-plan .pr b { font-size: 32px; color: var(--tx-purple); } .tx-plan .pr span { color: var(--tx-muted); font-size: 13px; }
.tx-plan ul { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 13.5px; flex: 1; }
.tx-plan .tx-btn { justify-content: center; }
@media (max-width: 900px) { .tx-plans { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .tx-plans { grid-template-columns: 1fr; } }
/* KDP Interior: setup + book view with page turn */
.kb-wrap { display: grid; grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); gap: 18px; align-items: start; }
.kb-side { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.kb-side .st-opts { grid-template-columns: 1fr 1fr; gap: 10px; } .kb-side .st-opts .st-check { grid-column: 1 / -1; }
.kb-side .kb-drop { margin: 0; } .kb-sec { margin: 0 !important; } .kb-sec summary small { font-weight: 600; opacity: .7; margin-inline-start: 6px; }
.kb-main { position: sticky; top: calc(var(--tx-header-h) + 10px); min-width: 0; }
.kb-main .kb-viewer { margin-top: 0; }
.kb-main .st-actions { justify-content: center; }
.kb-info { margin: 0 !important; }
@media (max-width: 999px) {
  .kb-wrap { display: flex; flex-direction: column; gap: 10px; } .kb-side { display: contents; }
  .kb-drop { order: 1; } .kb-main { order: 2; position: static; width: 100%; } .kb-sec { order: 3; } .kb-info { order: 4; }
  .kb-side .st-opts { grid-template-columns: 1fr; }
  .kb-drop { padding: 12px 14px !important; } .kb-drop span { display: none; }
}
.kb-badge { display: inline-block; background: var(--tx-purple-soft, #efeafd); color: var(--tx-purple); font-weight: 800; font-size: 13px; padding: 6px 12px; border-radius: 99px; margin-bottom: 6px; }
.kb-info { background: var(--tx-surface2); border-radius: 12px; padding: 10px 14px; font-size: 13.5px; line-height: 1.9; margin: 10px 0 0; }
.kb-viewer { margin-top: 16px; text-align: center; background: linear-gradient(180deg, var(--tx-surface2), transparent); border-radius: 18px; padding: 14px 8px 10px; }
.kb-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 12px; font-weight: 800; font-size: 14px; }
.kb-arrow { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tx-purple); color: #fff; font-size: 20px; cursor: pointer; box-shadow: 0 3px 10px rgba(107,84,181,.35); }
.kb-arrow:disabled { opacity: .35; cursor: default; box-shadow: none; }
.kb-book { position: relative; display: inline-flex; perspective: 2200px; max-width: 100%; }
.kb-page { position: relative; background: #fff; box-shadow: 0 6px 22px rgba(0,0,0,.18); line-height: 0; }
.kb-page.kb-l { border-radius: 6px 0 0 6px; } .kb-page.kb-r { border-radius: 0 6px 6px 0; }
.kb-page.kb-l::after { content: ''; position: absolute; inset: 0 0 0 auto; width: 26px; background: linear-gradient(90deg, transparent, rgba(0,0,0,.09)); pointer-events: none; }
.kb-page.kb-r::after { content: ''; position: absolute; inset: 0 auto 0 0; width: 26px; background: linear-gradient(270deg, transparent, rgba(0,0,0,.09)); pointer-events: none; }
.kb-page.empty { background: transparent; box-shadow: none; } .kb-page.empty::after { display: none; }
.kb-page canvas { display: block; height: var(--kbh, 440px); width: auto; touch-action: pan-y; }
.kb-leaf { position: absolute; top: 0; height: 100%; width: 50%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.45,.05,.35,1); z-index: 3; }
.kb-leaf canvas { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; -webkit-backface-visibility: hidden; box-shadow: 0 8px 26px rgba(0,0,0,.22); background: #fff; }
.kb-leaf canvas.b { transform: rotateY(180deg); }
.kb-leaf.to-left { left: 50%; transform-origin: left center; } .kb-leaf.to-left.go { transform: rotateY(-180deg); }
.kb-leaf.to-right { left: 0; transform-origin: right center; } .kb-leaf.to-right.go { transform: rotateY(180deg); }
.kb-book.single .kb-page.kb-r { border-radius: 6px; } .kb-book.single .kb-page.kb-r::after { display: none; }
.kb-book.single .kb-page canvas { height: auto; width: 100%; max-width: 100%; max-height: 62vh; }
.kb-book.single { width: min(100%, 420px); } .kb-book.single .kb-page.kb-r { width: 100%; }
.kb-book.slide-l .kb-r { animation: kbSlideL .35s ease; } .kb-book.slide-r .kb-r { animation: kbSlideR .35s ease; }
@keyframes kbSlideL { from { transform: translateX(40%) rotateY(-25deg); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes kbSlideR { from { transform: translateX(-40%) rotateY(25deg); opacity: .2; } to { transform: none; opacity: 1; } }
.kb-tip { margin: 10px 0 0; }
.kb-edit { text-align: start; margin: 12px auto 0; max-width: 640px; background: var(--tx-surface); border: 1px solid var(--tx-line); border-radius: 14px; padding: 12px 14px; }
.kb-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; } .kb-tools label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; } .kb-tools .st-btns { grid-column: 1 / -1; }
@media (max-width: 760px) { .kb-tools { grid-template-columns: 1fr; } .kb-page canvas { touch-action: pan-y; } }
/* settings grids never push the page sideways on phones */
.st-opts > label, .st-opts > * { min-width: 0; }
.st-opts input[type=text], .st-opts input[type=number], .st-opts input[type=range], .st-opts select { width: 100%; min-width: 0; box-sizing: border-box; }
.st-opts input[type=text] { font: inherit; padding: 8px 10px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-bg); color: var(--tx-ink); }
@media (max-width: 700px) { .st-opts { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-opts .st-check { grid-column: 1 / -1; } }
/* printable generators */
.gk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.gk-card { background: var(--tx-bg); border: 1px solid var(--tx-line); border-radius: 14px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.gk-card canvas { width: 100%; height: auto; display: block; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.08); background: #fff; }
.gk-cap { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; } .gk-cap b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gk-cap .st-btns { flex-wrap: nowrap; flex: none; gap: 4px; } .gk-cap .tx-btn.sm { padding: 5px 8px; }
.gk-fmt { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; } .gk-fmt select { font: inherit; padding: 7px 8px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-bg); color: var(--tx-ink); }
.gk-chips { display: flex; flex-wrap: wrap; gap: 6px; } .gk-chips label { flex-direction: row !important; align-items: center; gap: 5px !important; font-weight: 600 !important; border: 1px solid var(--tx-line); border-radius: 99px; padding: 5px 10px; cursor: pointer; }
.gk-samples { margin-top: 18px; } .gk-samples > b { display: block; margin-bottom: 8px; font-size: 15px; }
.gk-sam-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.gk-sam-row figure { margin: 0; text-align: center; } .gk-sam-row canvas { width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--tx-line); background: #fff; }
.gk-sam-row figcaption { font-size: 12.5px; font-weight: 700; color: var(--tx-muted); margin-top: 4px; }
@media (max-width: 700px) { .gk-sam-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gk-style { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
.gk-style-h { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 14px; } .gk-style-h span { color: var(--tx-muted); font-size: 13px; }
.gk-sw { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.gk-sw:has(> :nth-child(30)) { flex-wrap: wrap; overflow: visible; max-height: 360px; overflow-y: auto; }
.gk-th { flex: none; width: 64px; height: 83px; padding: 0; border: 2px solid var(--tx-line); border-radius: 9px; background: #fff; cursor: pointer; overflow: hidden; display: grid; place-items: center; scroll-snap-align: start; font: 800 15px/1 system-ui, sans-serif; color: #222; }
.gk-th canvas { width: 100%; height: 100%; display: block; } .gk-th.on { border-color: var(--tx-purple); box-shadow: 0 0 0 3px rgba(108,92,231,.3); }
.gk-style > .tx-btn { align-self: flex-start; }
@media (max-width: 560px) { .gk-th { width: 54px; height: 70px; } .gk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; } .st-res-head .gk-fmt { width: 100%; } .st-res-head .gk-fmt select { flex: 1; } }
/* Pinterest mockups: style gallery */
.pn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.pn-grid.big { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.pn-style { position: relative; border: 3px solid transparent; border-radius: 12px; padding: 0; overflow: hidden; cursor: pointer; background: var(--tx-surface2); }
.pn-style canvas { display: block; width: 100%; height: auto; }
.pn-style.on { border-color: var(--tx-purple); }
.pn-style i { position: absolute; top: 6px; inset-inline-end: 6px; width: 24px; height: 24px; border-radius: 50%; background: var(--tx-purple); color: #fff; font-style: normal; display: none; place-items: center; font-size: 14px; }
.pn-style.on i { display: grid; }
.pn-style em { position: absolute; bottom: 5px; inset-inline-start: 5px; background: rgba(0,0,0,.6); color: #fff; font-size: 10.5px; font-style: normal; padding: 2px 7px; border-radius: 99px; }
@media (max-width: 560px) { .pn-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; } .pn-grid.big { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* money calculators */
.st-opts input[type=number] { font: inherit; padding: 8px 10px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-bg); color: var(--tx-ink); width: 100%; }
.calc-out { margin-top: 6px; }
.calc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.calc-grid div { background: var(--tx-surface2); border-radius: 14px; padding: 12px; text-align: center; }
.calc-grid span { display: block; font-size: 12.5px; color: var(--tx-muted); font-weight: 700; } .calc-grid b { font-size: 22px; }
.calc-grid .pos b, .calc-t .pos { color: #15803d; } .calc-grid .neg b, .calc-grid b.neg { color: #c2410c; }
.calc-t { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 14px; }
.calc-t td { padding: 8px 10px; border-bottom: 1px solid var(--tx-line); } .calc-t td:last-child { text-align: end; font-weight: 700; }
.calc-t tr.sum td { font-weight: 800; border-bottom: 0; }
.calc-rev { margin-top: 14px; padding: 14px; border-radius: 14px; border: 1px dashed var(--tx-purple); display: flex; flex-direction: column; gap: 8px; }
.calc-rev label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; font-weight: 700; } .calc-rev input { font: inherit; padding: 8px 10px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-bg); color: var(--tx-ink); }
.calc-big { font-size: 16px; } .calc-big b { font-size: 22px; color: var(--tx-purple); }
@media (max-width: 560px) { .calc-grid { gap: 6px; } .calc-grid div { padding: 9px 4px; } .calc-grid b { font-size: 17px; } .calc-grid span { font-size: 11px; } }
/* "next step" card under the money tools */
.st-next { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; padding: 14px 18px; border-radius: 14px; background: linear-gradient(135deg, rgba(242,185,31,.16), rgba(107,84,181,.10)); border: 1px solid var(--tx-line); text-decoration: none; color: var(--tx-ink) !important; }
.st-next span { color: var(--tx-muted); font-size: 13px; font-weight: 700; } .st-next b { color: var(--tx-purple); font-size: 15.5px; }
.st-next:hover { border-color: var(--tx-purple); }
/* account: invite friends */
.tx-inv h2 { font-size: 18px; margin: 0 0 6px; }
.tx-inv-link { display: flex; gap: 8px; flex-wrap: wrap; }
.tx-inv-link input { flex: 1 1 220px; min-width: 0; font: inherit; font-size: 14px; padding: 9px 12px; border: 1px solid var(--tx-line); border-radius: 10px; background: var(--tx-bg); color: var(--tx-ink); }
.tx-inv-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.tx-inv-stats div { background: var(--tx-surface2); border-radius: 12px; padding: 10px; text-align: center; }
.tx-inv-stats b { display: block; font-size: 20px; color: var(--tx-purple); } .tx-inv-stats span { font-size: 12px; color: var(--tx-muted); line-height: 1.5; display: block; }
.tx-inv-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tx-inv-list li { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 8px 12px; border-radius: 10px; background: var(--tx-surface2); font-size: 13.5px; }
.tx-inv-list em { font-style: normal; font-weight: 700; } .tx-inv-list .ok em { color: #15803d; } .tx-inv-list .wait em { color: #b45309; } .tx-inv-list .same em { color: #b91c1c; }
@media (max-width: 560px) {
  .tx-inv h2 { font-size: 16px; }
  .tx-inv-stats { gap: 6px; } .tx-inv-stats div { padding: 8px 4px; } .tx-inv-stats b { font-size: 17px; } .tx-inv-stats span { font-size: 11px; }
  .tx-profile-head { flex-wrap: wrap; gap: 12px; }
  .tx-profile-head img { width: 64px; height: 64px; }
  .tx-profile-head > div:nth-child(2) { flex: 1; min-width: 0; } .tx-profile-head h1 { font-size: 20px; } .tx-profile-head p { overflow-wrap: anywhere; }
  .tx-profile-head > div:last-child { flex-basis: 100%; margin: 0 !important; display: flex; justify-content: space-between; align-items: baseline; text-align: start !important; }
}
/* daily limit bar of the free tools */
.tx-lim { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px; margin: 10px auto; max-width: 1100px; padding: 8px 14px; border-radius: 12px; background: var(--tx-purple-soft, #efeafd); color: var(--tx-ink); font-size: 13.5px; line-height: 1.6; text-align: center; }
.tx-lim b { color: var(--tx-purple); } .tx-lim a { color: var(--tx-purple); font-weight: 800; text-decoration: underline; } .tx-lim span { color: var(--tx-muted); }
.tx-lim.low { background: #fff1e6; } .tx-lim.low b { color: #c2410c; }
[data-limit-bar] .tx-lim { margin: 0 0 12px; }
/* per-mockup text */
.st-ctext { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.st-ctext .st-check { display: flex; align-items: center; gap: 7px; font-weight: 700; cursor: pointer; }
.st-cbox { display: flex; flex-direction: column; gap: 6px; } .st-cbox[hidden] { display: none; }
.st-cbox input[type=text], .st-crow select { font: inherit; font-size: 13px; padding: 7px 9px; border: 1px solid var(--tx-line); border-radius: 9px; background: var(--tx-surface); color: var(--tx-ink); width: 100%; min-width: 0; }
.st-csize { display: flex; align-items: center; gap: 8px; }
.st-csize input { flex: 1; min-width: 0; }
.st-csize button { flex: none; width: 40px; height: 34px; border: 1px solid var(--tx-line); border-radius: 9px; background: var(--tx-surface); color: var(--tx-ink); font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
.st-drag-tip { margin: 0; font-size: 12px; }
.st-crow { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.st-crow [data-font] { grid-column: 1 / -1; }
/* upscale settings drawer */
details.st-more { margin: 4px 0 8px; } details.st-more summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--tx-purple); padding: 6px 0; }
/* upscale board: thumbnails on the side + big before/after slider */
.st-board { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: start; }
.st-thumbs { display: flex; flex-direction: column; gap: 10px; max-height: 78vh; overflow-y: auto; padding: 2px; }
.st-thumb { border: 3px solid transparent; background: var(--tx-bg); border-radius: 12px; padding: 5px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; font: inherit; font-size: 12px; font-weight: 700; color: var(--tx-muted); flex: none; }
.st-thumb canvas { width: 100%; height: auto; display: block; border-radius: 7px; background: #fff; border: 1px solid var(--tx-line); }
.st-thumb.on { border-color: var(--tx-purple); color: var(--tx-purple); }
.st-thumb.st-err { cursor: default; padding: 10px; }
.st-stage { min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.st-cmp { background: var(--tx-surface2); border-radius: 14px; padding: 10px; display: flex; justify-content: center; }
.st-cmp-in { position: relative; direction: ltr; line-height: 0; touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; max-width: 100%; }
.st-cmp-in canvas { display: block; max-width: 100%; max-height: 74vh; width: auto; height: auto; background: #fff; border-radius: 6px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.st-cmp-in .st-cmp-before { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; box-shadow: none; }
.st-handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 0; border-left: 3px solid var(--tx-purple); transform: translateX(-1.5px); outline: none; }
.st-handle span { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: var(--tx-purple); color: #fff; font-size: 11px; line-height: 44px; text-align: center; box-shadow: 0 2px 10px rgba(0,0,0,.3); letter-spacing: 1px; }
.st-handle:focus-visible span { outline: 3px solid var(--tx-gold, #f2b91f); }
.st-lb { position: absolute; top: 10px; line-height: 1.6; background: rgba(0,0,0,.62); color: #fff; font-style: normal; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 99px; pointer-events: none; }
.st-lb-l { left: 10px; } .st-lb-r { right: 10px; background: var(--tx-purple); }
.st-stage-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.st-cmp-tip { margin: 0; text-align: center; }
/* phones */
@media (max-width: 700px) {
  .st-page { padding-left: 12px !important; padding-right: 12px !important; }
  .st-lead { font-size: 14px; margin-bottom: 12px; }
  .st-app { padding: 12px; border-radius: 14px; }
  .st-drop { padding: 18px 10px; } .st-drop b { font-size: 15px; } .st-drop span { font-size: 12.5px; }
  .st-item, .st-item img { width: 64px; } .st-item img { height: 64px; }
  .st-opts { grid-template-columns: 1fr 1fr; gap: 10px; }
  .st-opts label { font-size: 12.5px; }
  .st-opts select, .st-opts textarea { padding: 8px; font-size: 13px; }
  .st-opts-main label:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .st-actions .tx-btn, .st-go { width: 100%; justify-content: center; padding-top: 13px; padding-bottom: 13px; font-size: 16px; }
  .st-res-head .tx-btn { flex: 1; justify-content: center; white-space: nowrap; font-size: 14px; padding-left: 10px; padding-right: 10px; }
  .st-res-head b { width: 100%; }
  .st-board { grid-template-columns: 1fr; }
  .st-board .st-thumbs { order: 2; flex-direction: row; max-height: none; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scroll-snap-type: x mandatory; }
  .st-thumb { width: 82px; scroll-snap-align: start; }
  .st-cmp { padding: 6px; }
  .st-cmp-in canvas { max-height: 64vh; }
  .st-stage-bar .tx-btn { width: 100%; justify-content: center; }
  .st-step h3 { font-size: 15px; flex-wrap: wrap; }
  .st-seg { display: flex; } .st-seg button { flex: 1; padding: 10px 8px; }
  .st-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; } .st-chips button { flex: none; }
  .st-scenes { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .st-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .st-app { padding: 12px; } .st-scenes { grid-template-columns: repeat(3, 1fr); } .st-grid { grid-template-columns: 1fr; } }

/* ----- iPhone = Android: no zoom when a field is tapped (iOS zooms on text smaller than 16px), same field look ----- */
@media (max-width: 900px) {
  input:not([type=checkbox]):not([type=radio]):not([type=range]):not([type=color]):not([type=file]), select, textarea { font-size: 16px !important; }
}
input[type=text], input[type=number], input[type=search], input[type=email], input[type=password], input[type=tel], input[type=url], textarea { -webkit-appearance: none; appearance: none; border-radius: 10px; }
input[type=number]::-webkit-inner-spin-button, input[type=number]::-webkit-outer-spin-button { opacity: 1; }
input[data-dec] { direction: ltr; text-align: start; }
button, a, select, label { -webkit-tap-highlight-color: rgba(107, 84, 181, .15); touch-action: manipulation; }
img, canvas, video { max-width: 100%; }
html, body { overflow-x: clip; }

/* ----- cookie notice ----- */
.tx-cookie { position: fixed; z-index: 9600; left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom, 0px)); max-width: 560px; margin: 0 auto; display: flex; gap: 12px; align-items: center; background: var(--tx-surface); color: var(--tx-ink); border: 1px solid var(--tx-line); border-radius: 14px; box-shadow: var(--tx-shadow); padding: 10px 14px; }
.tx-cookie p { margin: 0; font-size: 13.5px; line-height: 1.7; flex: 1; } .tx-cookie .tx-btn { flex: none; }
.tx-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ----- legal pages ----- */
.tx-legal { max-width: 880px; padding-top: 20px; padding-bottom: 40px; line-height: 2; font-size: 15.5px; }
.tx-legal h1 { font-size: clamp(26px, 4vw, 34px); margin: 4px 0 2px; } .tx-legal h2 { font-size: 20px; margin: 26px 0 8px; } .tx-legal h3 { font-size: 16.5px; margin: 16px 0 6px; }
.tx-legal-upd { color: var(--tx-muted); font-size: 13.5px; margin: 0 0 10px; } .tx-legal-lead { font-size: 16px; }
.tx-legal ul { padding-inline-start: 22px; } .tx-legal li { margin: 4px 0; }
.tx-legal-box { background: var(--tx-surface2); border: 1px solid var(--tx-line); border-radius: 14px; padding: 8px 18px; margin: 14px 0; } .tx-legal-box h2 { margin-top: 8px; }
.tx-legal-t { width: 100%; border-collapse: collapse; font-size: 14px; margin: 8px 0; display: block; overflow-x: auto; }
.tx-legal-t th, .tx-legal-t td { border: 1px solid var(--tx-line); padding: 8px 10px; text-align: start; vertical-align: top; }
.tx-legal-t th { background: var(--tx-surface2); }
.tx-req { color: #c0392b; font-weight: 800; } .tx-form-note { font-size: 13px; color: var(--tx-muted); line-height: 1.8; margin: 10px 0 0; }
/* ----- phones: the cookie notice sits above the chat bubble; fingers get 40px+ targets ----- */
@media (max-width: 760px) {
  .tx-cookie { bottom: calc(74px + env(safe-area-inset-bottom, 0px)); padding: 8px 12px; }
  .tx-cookie p { font-size: 12.5px; }
  .st-app input:not([type=checkbox]):not([type=radio]):not([type=range]), .st-app select, .st-app button, .st-opts select, .st-opts input:not([type=checkbox]):not([type=radio]):not([type=range]) { min-height: 42px; }
  .st-app .tx-btn.sm, .gk-cap .tx-btn.sm { min-height: 38px; min-width: 38px; }
  .st-check { min-height: 40px; align-items: center; }
  .st-check input[type=checkbox], .st-check input[type=radio] { width: 22px; height: 22px; }
  .tx-crumbs a, .tx-footer li a, .tx-footer p a { display: inline-block; padding: 7px 0; }
  .tx-footer li { margin: 0; }
  .st-next, .tx-more { display: inline-block; padding: 8px 0; }
}
/* ----- planner colour picker ----- */
.pl-pals { display: flex; flex-direction: column; gap: 8px; grid-column: 1 / -1; }
.pl-sw { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-c { width: 38px; height: 38px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--tx-line); cursor: pointer; padding: 0; display: grid; place-items: center; background: var(--tx-surface2); font-size: 16px; }
.pl-c.on { box-shadow: 0 0 0 3px var(--tx-purple); transform: scale(1.08); }
.gk-partial { margin: 0 0 12px; padding: 10px 14px; border-radius: 12px; background: var(--tx-purple-soft); color: var(--tx-ink); font-weight: 700; line-height: 1.7; }
.gk-partial a { color: var(--tx-purple); text-decoration: underline; }
.pl-own-row { display: flex; flex-wrap: wrap; gap: 14px; } .pl-own-row[hidden], .tm-custom[hidden] { display: none; } .pl-own-row label { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; }
.pl-own-row input[type=color] { width: 46px; height: 34px; border: 1px solid var(--tx-line); border-radius: 8px; padding: 2px; background: #fff; }
.tx-or{display:flex;align-items:center;gap:10px;margin:18px 0 12px;color:var(--tx-muted);font-size:13px}.tx-or:before,.tx-or:after{content:'';flex:1;height:1px;background:var(--tx-line)}

.tx-gbtn{display:flex;align-items:center;justify-content:center;gap:10px;width:100%;max-width:340px;min-height:44px;padding:0 18px;border:1px solid #dadce0;border-radius:999px;background:#fff;color:#3c4043;font-size:14px;font-weight:600;font-family:inherit;cursor:pointer;transition:box-shadow .15s,background .15s}.tx-gbtn:hover{background:#f8f9fa;box-shadow:0 1px 4px rgba(60,64,67,.3)}.tx-gbtn:disabled{opacity:.6;cursor:wait}[data-theme=dark] .tx-gbtn,.dark .tx-gbtn{background:#131314;color:#e3e3e3;border-color:#8e918f}[data-theme=dark] .tx-gbtn:hover,.dark .tx-gbtn:hover{background:#1e1f20}
