:root {
  --sc-yellow: #FFFC00;
  --sc-yellow-deep: #F0E800;
  --sc-black: #0B0B0F;
  --sc-pink: #FF4D8D;
  --sc-muted: #5C5C6A;
  --sc-line: rgba(11, 11, 15, 0.1);
  --sc-white: #FFFFFF;
  --sc-cream: #FFFEF5;
  --sc-radius: 20px;
  --sc-shadow: 0 18px 50px rgba(11, 11, 15, 0.08);
  --font-display: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --tb-blue: var(--sc-yellow);
  --tb-blue-deep: var(--sc-yellow-deep);
  --tb-blue-soft: #FFF9C4;
  --tb-sky: #FFE566;
  --tb-ink: #12121A;
  --tb-muted: var(--sc-muted);
  --tb-line: var(--sc-line);
  --tb-white: #FFFFFF;
  --tb-bg: #FFFFFF;
  --tb-radius: var(--sc-radius);
  --tb-shadow: var(--sc-shadow);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.sc-font-normal .tb-brand,
body.sc-font-normal .tb-hero h1,
body.sc-font-normal .yt-hero h1,
body.sc-font-normal .tb-section h2,
body.sc-font-normal .yt-how h2 {
  letter-spacing: normal;
  font-weight: 700;
}
body.sc-font-normal .tb-brand-text { font-weight: 700; }

body, .sc-body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--tb-ink);
  background:
    radial-gradient(1000px 520px at 8% -5%, rgba(255, 252, 0, 0.45), transparent 55%),
    radial-gradient(800px 420px at 95% 5%, rgba(255, 77, 141, 0.12), transparent 50%),
    linear-gradient(180deg, #FFFEF8 0%, #FFFFFF 40%, #FFFDF2 100%);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
}
body.is-rtl { direction: rtl; }
img { max-width: 100%; display: block; }
a { color: #111; text-decoration: none; font-weight: 650; }
a:hover { color: #000; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--sc-yellow); }

.tb-brand-logo {
  width: 36px; height: 36px; object-fit: contain; border-radius: 10px;
  background: var(--sc-yellow);
}
.tb-text-sm { font-size: 0.88em; }
.tb-text-lg { font-size: 1.2em; font-weight: 600; }
.tb-prose .art-mini-card, .tb-page-card .art-mini-card {
  background: #fff; border: 1px solid var(--sc-line);
  border-radius: 14px; padding: 0.9rem; margin: 0.75rem 0;
  box-shadow: var(--sc-shadow);
}
.tb-prose .art-img-center, .tb-page-card .art-img-center { text-align: center; }
.tb-prose .art-img-left, .tb-page-card .art-img-left { text-align: left; }
.tb-prose .art-img-right, .tb-page-card .art-img-right { text-align: right; }
.tb-prose img, .tb-page-card img, .tb-article-card img { max-width: 100%; height: auto; border-radius: 12px; }
.tb-prose blockquote, .tb-page-card blockquote {
  margin: 1rem 0; padding: 0.75rem 1rem; border-left: 4px solid var(--sc-yellow);
  background: #FFFCE0; color: #333;
}
.tb-skip {
  position: absolute; left: -999px; top: 0; background: #000; color: #fff; padding: 8px 12px; z-index: 100;
}
.tb-skip:focus { left: 8px; }
.tb-wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.tb-muted { color: var(--tb-muted); }

.sc-shell {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 160px;
  gap: 1rem;
  width: min(1280px, calc(100% - 1rem));
  margin: 0 auto;
}
.sc-side { padding-top: 1rem; }
.sc-side .tb-ad {
  position: sticky;
  top: 88px;
  max-width: 160px;
  margin-left: auto;
  margin-right: auto;
}
@media (max-width: 1100px) {
  .sc-shell { grid-template-columns: 1fr; }
  .sc-side { display: none; }
}

/* Nav — white + yellow */
.tb-nav {
  position: sticky; top: 0; z-index: 50;
  padding-top: env(safe-area-inset-top, 0);
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--sc-line);
  box-shadow: 0 1px 0 rgba(255,252,0,0.35);
}
.tb-nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}
.tb-brand {
  display: inline-flex; align-items: center; gap: 0.65rem;
  color: var(--sc-black); font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
}
.tb-brand:hover { text-decoration: none; }
.tb-brand-mark {
  width: 36px; height: 36px; border-radius: 12px;
  background: linear-gradient(145deg, var(--sc-yellow), #fff76a);
  box-shadow: 0 0 0 3px rgba(255,252,0,0.35), 0 8px 20px rgba(0,0,0,0.08);
  position: relative;
  animation: scPulse 2.8s ease-in-out infinite;
}
.tb-brand-mark::after {
  content: ""; position: absolute; inset: 10px 11px 8px;
  background: #0B0B0F;
  clip-path: polygon(20% 10%, 80% 10%, 100% 45%, 50% 100%, 0 45%);
}
@keyframes scPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.06); }
}
.tb-menu { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.tb-menu a { color: #222; font-weight: 700; font-size: 0.92rem; position: relative; }
.tb-menu a::after {
  content: ""; position: absolute; left: 0; bottom: -4px; width: 0; height: 3px;
  background: var(--sc-yellow); transition: width .25s ease; border-radius: 2px;
}
.tb-menu a:hover { text-decoration: none; }
.tb-menu a:hover::after { width: 100%; }
.tb-nav-toggle {
  display: none; background: none; border: 0; width: 42px; height: 42px;
  cursor: pointer; position: relative; -webkit-tap-highlight-color: transparent;
}
.tb-nav-toggle span {
  display: block; width: 22px; height: 2px; background: #111; margin: 0 auto; position: relative;
  transition: transform 0.25s ease, background 0.2s;
}
.tb-nav-toggle span::before, .tb-nav-toggle span::after {
  content: ""; position: absolute; left: 0; width: 22px; height: 2px; background: #111;
  transition: transform 0.25s ease, top 0.25s ease, opacity 0.2s;
}
.tb-nav-toggle span::before { top: -7px; }
.tb-nav-toggle span::after { top: 7px; }
.tb-nav-toggle.is-open span { background: transparent; }
.tb-nav-toggle.is-open span::before { top: 0; transform: rotate(45deg); }
.tb-nav-toggle.is-open span::after { top: 0; transform: rotate(-45deg); }

.sc-lang { position: relative; }
.sc-lang-btn {
  border: 1px solid var(--sc-line);
  background: var(--sc-yellow);
  color: #111;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font-body);
}
.sc-lang-list {
  position: absolute; right: 0; top: calc(100% + 8px);
  min-width: 220px; max-height: 320px; overflow: auto;
  background: #fff; border: 1px solid var(--sc-line);
  border-radius: 14px; padding: 0.4rem; list-style: none; margin: 0;
  box-shadow: var(--sc-shadow); z-index: 60;
}
.is-rtl .sc-lang-list { right: auto; left: 0; }
.sc-lang-list a {
  display: flex; justify-content: space-between; gap: 0.5rem;
  padding: 0.55rem 0.7rem; border-radius: 10px; color: #111 !important;
}
.sc-lang-list a::after { display: none !important; }
.sc-lang-list a:hover, .sc-lang-list a[aria-current="true"] { background: #FFF9C4; text-decoration: none; }
.sc-lang-list small { color: var(--sc-muted); }

/* Hero */
.tb-hero { position: relative; padding: clamp(2.5rem, 6vw, 4.2rem) 0 2rem; }
.tb-hero-grid {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 2rem; align-items: center;
}
.tb-kicker {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  font-size: 0.78rem; color: #111;
  background: var(--sc-yellow); padding: 0.35rem 0.7rem; border-radius: 999px;
  margin: 0 0 0.85rem;
}
.tb-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  line-height: 1.05; letter-spacing: -0.04em; margin: 0 0 1rem; color: #0B0B0F;
}
.tb-hero h1 span {
  background: linear-gradient(90deg, #111, #333);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  box-shadow: none;
  position: relative;
}
.tb-hero h1 span::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0.08em; height: 0.28em;
  background: var(--sc-yellow); z-index: -1; border-radius: 4px;
}
.tb-hero-lead { color: var(--sc-muted); font-size: 1.08rem; max-width: 36rem; margin: 0 0 1.4rem; }

.tb-tool {
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: var(--sc-shadow);
}
.tb-tool-row {
  display: grid; grid-template-columns: 1fr auto; gap: 0.55rem; align-items: stretch;
}
.tb-btn-paste {
  min-width: 92px; border-radius: 14px; font-weight: 800;
  background: var(--sc-yellow); color: #111; border: 1px solid rgba(0,0,0,0.08);
  font-family: var(--font-body); cursor: pointer; padding: 0 1rem;
}
.tb-btn-paste:hover { filter: brightness(0.97); }
.tb-tool label { display: block; font-weight: 800; margin-bottom: 0.45rem; color: #111; }
.tb-tool input[type="url"] {
  width: 100%; border: 1px solid var(--sc-line);
  background: #FFFEF8; color: #111;
  border-radius: 14px; padding: 0.95rem 1rem; font-size: 1rem;
  outline: none; transition: border .2s, box-shadow .2s;
}
.tb-tool input:focus {
  border-color: #111;
  box-shadow: 0 0 0 4px rgba(255,252,0,0.55);
}
.tb-tool-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.9rem; }
.tb-btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; padding: 0.85rem 1.35rem; font-weight: 800;
  border: 0; cursor: pointer; font-family: var(--font-body); font-size: 0.95rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.tb-btn:active { transform: scale(0.98); }
.tb-btn-primary {
  background: linear-gradient(135deg, var(--sc-yellow), #FFF36A);
  color: #0B0B0F;
  box-shadow: 0 10px 28px rgba(255, 200, 0, 0.45);
  border: 1px solid rgba(0,0,0,0.06);
}
.tb-btn-primary:hover { box-shadow: 0 14px 36px rgba(255, 200, 0, 0.55); }
.tb-btn-ghost {
  background: #fff; color: #111;
  border: 1px solid var(--sc-line);
}
.tb-hint { color: var(--sc-muted); font-size: 0.86rem; margin: 0.85rem 0 0; }
.tb-status { min-height: 1.3em; margin: 0.55rem 0 0; font-weight: 700; }
.tb-status.ok { color: #0B7A45; }
.tb-status.err { color: #C01545; }

.tb-visual { position: relative; min-height: 320px; }
.tb-orb { position: absolute; border-radius: 50%; filter: blur(2px); animation: scFloat 7s ease-in-out infinite; }
.tb-orb-1 {
  width: 180px; height: 180px; left: 10%; top: 8%;
  background: radial-gradient(circle, rgba(255,252,0,0.7), transparent 70%);
}
.tb-orb-2 {
  width: 140px; height: 140px; right: 8%; bottom: 12%;
  background: radial-gradient(circle, rgba(255,77,141,0.35), transparent 70%);
  animation-delay: -2.5s;
}
@keyframes scFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
.tb-visual-panel {
  position: relative; z-index: 1;
  background: #fff;
  border: 1px solid var(--sc-line);
  border-radius: 28px; padding: 1.5rem;
  box-shadow: var(--sc-shadow);
}
.tb-visual-panel h2 {
  font-family: var(--font-display); margin: 0 0 0.5rem; color: #0B0B0F; font-size: 1.45rem;
}
.tb-chip-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1rem; }
.tb-chip {
  border-radius: 999px; padding: 0.35rem 0.75rem;
  background: var(--sc-yellow); border: 1px solid rgba(0,0,0,0.06);
  font-size: 0.8rem; font-weight: 800; color: #111;
}

.tb-results { padding: 0 0 2rem; }
.tb-results-box {
  display: none; background: #fff;
  border: 1px solid var(--sc-line); border-radius: 22px; padding: 1.2rem;
  box-shadow: var(--sc-shadow);
}
.tb-results-box.is-on { display: block; animation: scFade .35s ease; }
.tb-results-box h2 { color: #0B0B0F !important; }
@keyframes scFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tb-file {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.85rem 0; border-bottom: 1px solid var(--sc-line);
}
.tb-file:last-child { border-bottom: 0; }
.tb-file-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 12px; }
.tb-file-left { flex: 1; min-width: 0; }
.tb-file-name { font-weight: 800; color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-file-meta { color: var(--sc-muted); font-size: 0.85rem; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.tb-kind {
  display: inline-flex; padding: 0.12rem 0.45rem; border-radius: 999px;
  background: var(--sc-yellow); color: #111; font-size: 0.72rem; font-weight: 800; text-transform: uppercase;
}

.tb-section { padding: 2.5rem 0; }
.tb-section h2 {
  font-family: var(--font-display); color: #0B0B0F; font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem; letter-spacing: -0.02em;
}
.tb-grid-4, .tb-grid-3 { display: grid; gap: 1rem; margin-top: 1.25rem; }
.tb-grid-4 { grid-template-columns: repeat(4, 1fr); }
.tb-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tb-card {
  background: #fff; border: 1px solid var(--sc-line);
  border-radius: 18px; padding: 1.15rem;
  box-shadow: var(--sc-shadow);
  transition: transform .2s, border-color .2s;
}
.tb-card:hover { transform: translateY(-4px); border-color: rgba(255,252,0,0.8); }
.tb-card h3 { margin: 0 0 0.4rem; color: #0B0B0F; font-family: var(--font-display); font-size: 1.05rem; }
.tb-card p { margin: 0; color: var(--sc-muted); font-size: 0.92rem; }

.tb-page { padding: 2.5rem 0 3rem; }
.tb-page-card, .tb-article-card {
  background: #fff; border: 1px solid var(--sc-line);
  border-radius: 22px; padding: clamp(1.2rem, 3vw, 2rem);
  color: #222; box-shadow: var(--sc-shadow);
}
.tb-page-card h1, .tb-article-card h1 {
  font-family: var(--font-display); color: #0B0B0F; letter-spacing: -0.03em;
}
.tb-article { display: block; padding: 1rem 0; border-bottom: 1px solid var(--sc-line); color: inherit; }
.tb-article:hover { color: #111; text-decoration: none; background: #FFFCE8; margin: 0 -0.5rem; padding-left: 0.5rem; padding-right: 0.5rem; border-radius: 12px; }
.tb-article h2, .tb-article h3 { margin: 0 0 0.35rem; font-size: 1.15rem; color: #0B0B0F; font-family: var(--font-display); }
.tb-prose h2, .tb-prose h3 { color: #0B0B0F; font-family: var(--font-display); }
.tb-prose p, .tb-prose li { color: #333; }
.tb-prose a { text-decoration: underline; text-decoration-color: var(--sc-yellow); text-underline-offset: 3px; }

.tb-foot {
  margin-top: 2rem; padding: 2.5rem 0 1.5rem;
  border-top: 1px solid var(--sc-line);
  background: linear-gradient(180deg, #FFFDF5, #FFF9C4);
}
.tb-foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 1.5rem; }
.tb-foot a { display: block; color: #222; margin: 0.25rem 0; }
.tb-foot-brand { font-family: var(--font-display); font-weight: 800; color: #0B0B0F; margin: 0 0 0.35rem; }
.tb-foot-h { font-weight: 800; color: #0B0B0F; margin: 0 0 0.5rem; }
.tb-foot-copy { margin-top: 1.5rem; color: var(--sc-muted); font-size: 0.85rem; padding-bottom: 1rem; }

.tb-ad {
  margin: 1rem 0;
  padding: 0.75rem;
  border: 1px dashed rgba(0, 0, 0, 0.1);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffef8 0%, #fff 100%);
  text-align: center;
  overflow: hidden;
  min-height: 50px;
}
.tb-ad-label {
  font-size: 0.68rem;
  color: var(--sc-muted);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}
.tb-ad-header,
.tb-ad-footer { margin: 0.5rem 0; }
.tb-ad-tool_under .tb-ad,
.yt-tool-ad-slot .tb-ad {
  border-radius: 14px;
  border-style: solid;
  border-color: color-mix(in srgb, var(--sc-yellow) 35%, var(--sc-line));
  box-shadow: 0 8px 28px rgba(15, 15, 15, 0.05);
}
.tb-prose .tb-ad-article-card,
.tb-home-article .tb-ad-article-card {
  margin: 1.75rem auto;
  max-width: min(640px, 100%);
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--sc-yellow) 40%, #e8e8e8);
  background: linear-gradient(165deg, #fff 0%, #fffef5 48%, #fff 100%);
  box-shadow: 0 12px 36px rgba(15, 15, 15, 0.06);
  overflow: hidden;
}
.tb-ad-article-card-head {
  padding: 0.45rem 1rem;
  background: linear-gradient(90deg, color-mix(in srgb, var(--sc-yellow) 35%, #fff), #fff);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.tb-ad-article-kicker {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #111;
}
.tb-ad-article-card-body { padding: 0.85rem 1rem 1rem; }
.tb-ad-article-card-body .tb-ad {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  min-height: 0;
}
.tb-loader-ads .tb-ad {
  margin: 0;
  border: 0;
  background: transparent;
  padding: 0.25rem 0;
}
@media (max-width: 900px) {
  .tb-ad iframe,
  .tb-ad ins,
  .tb-ad > div {
    max-width: 100% !important;
  }
  .sc-side .tb-ad { position: static; max-width: 100%; }
}

.tb-click-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(255,255,255,0.72); backdrop-filter: blur(8px);
  display: none; align-items: center; justify-content: center; padding: 1rem;
}
.tb-click-overlay.is-on { display: flex; }
.tb-click-card {
  width: min(420px, 100%); background: #fff; border: 1px solid var(--sc-line);
  border-radius: 22px; padding: 1.5rem; text-align: center; color: #111;
  box-shadow: var(--sc-shadow);
}
.tb-click-card h3 { font-family: var(--font-display); margin: 0 0 0.5rem; }
.tb-spinner {
  width: 42px; height: 42px; margin: 0 auto 1rem;
  border-radius: 50%; border: 3px solid rgba(0,0,0,0.08);
  border-top-color: var(--sc-yellow); animation: scSpin .8s linear infinite;
}
@keyframes scSpin { to { transform: rotate(360deg); } }

/* Mobile */
@media (max-width: 900px) {
  .tb-hero-grid, .tb-grid-4, .tb-grid-3, .tb-foot-grid { grid-template-columns: 1fr; }
  .tb-wrap { width: min(1120px, calc(100% - 1.25rem)); }
  .tb-nav { position: sticky; }
  .tb-nav-inner { min-height: 60px; position: relative; }
  .tb-nav-toggle {
    display: grid; place-items: center;
    width: 48px; height: 48px; min-width: 48px;
    border-radius: 14px; border: 1px solid var(--sc-line);
    background: var(--sc-yellow);
  }
  .tb-menu {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: #fff; border-bottom: 1px solid var(--sc-line);
    padding: 0.75rem 1rem max(1.1rem, env(safe-area-inset-bottom)); flex-direction: column; align-items: stretch;
    gap: 0.35rem; max-height: min(70vh, calc(100dvh - 60px)); overflow: auto;
    box-shadow: var(--sc-shadow);
    animation: scMenuIn 0.28s ease both;
  }
  @keyframes scMenuIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: none; }
  }
  .tb-menu.is-open { display: flex; }
  .tb-menu a {
    padding: 0.85rem 0.9rem; border-radius: 14px;
    font-size: 1rem; min-height: 48px; display: flex; align-items: center;
    background: #FFFEF5;
  }
  .tb-menu a::after { display: none; }
  .sc-lang { width: 100%; }
  .sc-lang-btn { width: 100%; min-height: 48px; justify-content: center; display: inline-flex; align-items: center; }
  .sc-lang-list { position: static; width: 100%; max-height: 240px; margin-top: 0.4rem; }
  .tb-hero { padding: 1.35rem 0 1rem; }
  .tb-hero h1 { font-size: clamp(1.85rem, 8.5vw, 2.45rem); }
  .tb-visual { display: none; }
  .tb-tool { padding: 1rem; border-radius: 20px; }
  .tb-tool input[type="url"] { font-size: 16px; min-height: 52px; }
  .tb-tool-actions { display: grid; grid-template-columns: 1fr; gap: 0.65rem; }
  .tb-btn { min-height: 52px; width: 100%; font-size: 1.02rem; }
  .tb-file { flex-wrap: wrap; }
  .tb-file .tb-btn { width: 100%; order: 3; }
  .sc-shell { width: 100%; gap: 0; }
}
@media (max-width: 480px) {
  .tb-brand-text { font-size: 0.95rem; }
}
@supports (padding: max(0px)) {
  .tb-nav { padding-left: env(safe-area-inset-left); padding-right: env(safe-area-inset-right); }
  .tb-foot-copy { padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
}
@media (hover: none) {
  .tb-card:hover { transform: none; }
}
