:root {
  --primary: #1677ff;
  --primary-dark: #0866e8;
  --primary-light: #eaf3ff;
  --purple: #7c3aed;
  --purple-light: #f1eaff;
  --success: #16a34a;
  --success-light: #eaf8ef;
  --danger: #ef4444;
  --warning: #f59e0b;
  --text-primary: #10213f;
  --text-secondary: #60708d;
  --text-muted: #8a98ad;
  --background: #ffffff;
  --background-soft: #f7faff;
  --background-blue: #f1f7ff;
  --border: #dce8f5;
  --border-light: #e8f0f8;
  --card: #ffffff;
  --footer: #061b38;
  --footer-secondary: #092747;
  --white: #ffffff;
  --blue: var(--primary);
  --blue-600: var(--primary-dark);
  --blue-50: var(--primary-light);
  --ink: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border);
  --bg: var(--background-soft);
  --radius: 10px;
  --shadow: 0 2px 10px rgba(20, 70, 120, 0.03);
  --sidebar: 300px;
  --header: 68px;
  --sticky-offset: 68px;
}
[data-theme="dark"] {
  --ink: #eef6ff;
  --muted: #9db0c5;
  --line: #1c3854;
  --bg: #071525;
  --card: #0d2138;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  --blue-50: #0d2138;
  --primary-light: #163a66;
  --background: #071525;
  --background-soft: #071525;
  --background-blue: #0d2138;
  --border: #1c3854;
  --text-primary: #eef6ff;
  --text-secondary: #9db0c5;
  --white: #0d2138;
}
* { box-sizing: border-box; }
html {
  overflow-anchor: none;
  max-width: 100%;
}
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text-primary);
  background: var(--background-soft);
  line-height: 1.5;
  font-size: 15px;
  max-width: 100%;
}
.wrap {
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }
.site-top {
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--white);
}
[data-theme="dark"] .site-top { background: var(--card); }
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .site-header { background: var(--card); }
.header-ad {
  background: var(--white);
  padding-top: 8px;
  padding-bottom: 8px;
}
[data-theme="dark"] .header-ad { background: var(--card); }
.header-ad .mt-promo { margin: 0 auto; }
.header-inner {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: var(--header);
  padding: 0 32px;
  min-width: 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
}
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
}
.brand-mark svg { width: 22px; height: 22px; }
.brand-mark.has-logo { background: transparent; padding: 0; overflow: hidden; }
.brand-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-mark.mini { width: 28px; height: 28px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; }
.brand-text small { color: var(--muted); font-size: 11px; }
.main-nav {
  display: flex;
  gap: 26px;
  margin: 0 auto;
  font-weight: 600;
  color: var(--muted);
  height: 100%;
  align-items: center;
}
.main-nav a {
  height: 100%;
  display: inline-flex;
  align-items: center;
  border-bottom: 2px solid transparent;
}
.main-nav a.is-active { color: var(--blue); border-bottom-color: var(--blue); }
.main-nav .nav-ai { color: #7c3aed; font-weight: 700; }
.main-nav .nav-ai:hover { color: #6d28d9; }
[data-theme="dark"] .main-nav .nav-ai { color: #c084fc; }
[data-theme="dark"] .main-nav .nav-ai:hover { color: #d8b4fe; }
.header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.suggest-btn { border-radius: 12px; padding: 10px 18px; white-space: nowrap; }
.icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }
.icon-btn {
  width: 40px;
  height: 40px;
  border: 0;
  background: transparent;
  color: var(--ink);
  border-radius: 10px;
  cursor: pointer;
}
.icon-btn:hover { background: var(--primary-light); color: var(--primary); }
[data-theme="dark"] .icon-btn:hover { background: #163a66; color: #fff; }
.icon-btn svg { width: 20px; height: 20px; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 14px;
  min-height: 44px;
  cursor: pointer;
  transition: 160ms ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: var(--primary-light); color: var(--primary); }
.btn-secondary {
  background: var(--card);
  color: var(--primary);
  border: 1px solid var(--primary);
}
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}
.nav-toggle span { display: block; height: 2px; background: var(--ink); }
.header-search {
  display: none;
  gap: 8px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 24px 14px;
}
.header-search.is-open { display: flex; }
input[type="text"], input[type="email"], input[type="url"], input[type="number"], input[type="password"], input[type="search"], input[type="date"], textarea, select {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
}
textarea {
  resize: vertical;
}
.header-search input { width: 100%; min-width: 0; }
.filter-row input, .filter-row select { flex: 1 1 auto; min-width: 0; width: auto; }
.filter-row .btn { flex: 0 0 auto; }
.footer-news input { flex: 1 1 auto; min-width: 0; width: auto; }
.footer-news .btn { flex: 0 0 auto; }
.news-band .news-field input[type="email"] { flex: 1 1 auto; min-width: 0; width: auto; }
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar) minmax(0, 1fr);
  align-items: stretch;
  min-height: calc(100vh - var(--header));
  gap: 16px;
  padding: 0;
}
.sidebar {
  width: var(--sidebar);
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  background: transparent;
  border-right: 0;
  padding: 18px 0 24px;
  box-sizing: border-box;
  overflow: visible;
}
.sidebar-inner {
  padding: 0;
  box-sizing: border-box;
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
}
.sidebar-ad {
  margin-top: 16px;
  padding: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: -webkit-sticky;
  position: sticky;
  top: var(--sticky-offset);
  z-index: 1;
  flex: 0 0 auto;
  align-self: stretch;
}
.sidebar-ad .mt-promo-wrap,
.sidebar-ad .mt-promo,
.sidebar-ad .mt-promo-inner,
.sidebar-ad .mt-promo-sidebar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
}
.sidebar-ad .mt-promo {
  padding: 4px;
  border-width: 1px;
}
.mt-promo-sidebar {
  width: 100%;
  max-width: 100%;
  min-height: 0;
  margin: 0;
  padding: 4px;
  background: transparent;
}
.mt-promo-sidebar .mt-promo-inner img,
.mt-promo-sidebar .mt-promo-inner iframe,
.mt-promo-sidebar .mt-promo-inner ins {
  width: 100%;
  max-width: 100%;
  height: auto;
  max-height: 250px;
  object-fit: contain;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}
.side-link:hover { background: var(--primary-light); color: var(--primary); }
.side-link.is-active,
.side-link.is-active:hover { background: var(--primary); color: #fff; }
[data-theme="dark"] .side-link:hover { background: #163a66; color: #fff; }
[data-theme="dark"] .side-link.is-active,
[data-theme="dark"] .side-link.is-active:hover { background: var(--primary); color: #fff; }
.side-ico { width: 22px; height: 22px; display: grid; place-items: center; color: inherit; }
.side-ico svg { width: 18px; height: 18px; }
.main-content { flex: 1; min-width: 0; width: 100%; padding: 22px 16px 64px 16px; }
.hero {
  display: grid;
  grid-template-columns: 1.12fr 0.88fr;
  gap: 18px;
  align-items: center;
  padding: 8px 0 6px;
}
.hero-copy {
  min-width: 0;
  max-width: 100%;
  container-type: inline-size;
  container-name: hero-copy;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #16a34a;
  font-weight: 700;
  font-size: 14px;
}
.pill i {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
}
.hero h1 { font-size: 44px; line-height: 1.12; margin: 10px 0 12px; letter-spacing: -0.03em; font-weight: 800; color: var(--text-primary); }
.hero h1 span { color: var(--blue); }
.hero p { color: var(--muted); font-size: 16px; margin: 0 0 18px; }
.hero-search {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  background: var(--card);
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 6px 6px 6px 14px;
  box-shadow: 0 10px 30px rgba(37, 99, 235, 0.08);
  max-width: 640px;
}
.hero-search > svg { width: 18px; color: var(--muted); flex: 0 0 auto; }
.hero-search input {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: 0;
  box-shadow: none;
  background: transparent;
  padding: 10px 8px;
}
.hero-search .btn { border-radius: 10px; padding: 10px 16px; flex: 0 0 auto; }
.hero-search .btn svg { width: 16px; height: 16px; color: #fff; }
.trust-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.4em 0.75em;
  padding: 14px 0 0;
  list-style: none;
  color: #16a34a;
  font-weight: 600;
  font-size: 13px;
  font-size: clamp(6px, 1.85vw, 13px);
  font-size: clamp(6px, 2.05cqi, 13px);
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  letter-spacing: -0.01em;
}
.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  flex: 0 0 auto;
  white-space: nowrap;
}
.trust-row svg {
  width: 1.15em;
  height: 1.15em;
  flex: 0 0 auto;
}
.hero-art { position: relative; min-height: 340px; }
.hero-glow {
  position: absolute;
  inset: 20px 10px 40px;
  background: radial-gradient(circle at 50% 45%, #dbeafe 0%, transparent 68%);
  border-radius: 50%;
}
.laptop { width: 62%; margin: 54px auto 0; position: relative; z-index: 1; }
.laptop-lid {
  background: #0f172a;
  border-radius: 16px 16px 8px 8px;
  padding: 8px;
}
.laptop-screen {
  background: #071525;
  border-radius: 8px;
  height: 168px;
  overflow: hidden;
}
.laptop-shot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border-radius: 8px;
}
.laptop-base {
  height: 10px;
  background: #1e293b;
  border-radius: 0 0 18px 18px;
  margin: 0 -18px;
}
.float-icon {
  position: absolute;
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
  z-index: 2;
}
.float-icon svg { width: 26px; height: 26px; }
.fi-1 { background: #22c55e; top: 28px; left: 28px; }
.fi-2 { background: #6366f1; top: 0; right: 92px; }
.fi-3 { background: #f97316; top: 78px; right: 10px; }
.fi-4 { background: #8b5cf6; bottom: 78px; left: 8px; }
.fi-5 { background: #14b8a6; bottom: 36px; right: 42px; }
.fi-6 { background: #3b82f6; bottom: 8px; left: 92px; }
.mt-promo-wrap {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.mt-promo {
  margin: 18px auto 22px;
  text-align: center;
  background: var(--background-blue);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 0;
  max-width: 100%;
}
.mt-promo-inner {
  width: auto;
  min-width: 0;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.mt-promo-inner > * {
  margin-left: auto;
  margin-right: auto;
}
.mt-ad-link { display: block; max-width: 100%; }
.mt-ad-link img { cursor: pointer; }
.mt-promo-inner img,
.mt-promo-inner iframe,
.mt-promo-inner ins {
  display: block;
  margin-left: auto;
  margin-right: auto;
  max-width: 100%;
  height: auto;
}
.mt-kicker { display: block; color: var(--text-muted); font-size: 12px; margin-bottom: 8px; }
.mt-box {
  min-height: 90px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  background: var(--white);
  margin: 0 auto;
}
[data-theme="dark"] .mt-promo { background: var(--card); }
[data-theme="dark"] .mt-box { background: var(--card); }
.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin: 6px 0 28px;
}
.stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 12px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.stat-ico {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: #eff6ff;
  color: var(--blue);
  display: grid;
  place-items: center;
}
.stat-ico svg { width: 18px; height: 18px; }
.stat strong { display: block; font-size: 18px; line-height: 1.2; }
.stat div span { color: var(--muted); font-size: 12px; }
.section { margin: 28px 0 36px; }
.section-head, .section-head.tight {
  display: flex;
  justify-content: space-between;
  align-items: end;
  margin-bottom: 16px;
}
.section-head h2, .section-head h3 { margin: 0; font-size: 26px; display: flex; align-items: center; gap: 8px; }
.section-head p { margin: 4px 0 0 36px; color: var(--muted); }
.sec-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.sec-ico svg { width: 16px; height: 16px; }
.sec-ico.flame { color: #f97316; }
.sec-ico.puzzle { color: #8b5cf6; background: #f5f3ff; }
.sec-ico.star { color: #22c55e; }
.sec-ico.news { color: #2563eb; }
.sec-ico.mail { color: #2563eb; }
.text-link { color: var(--blue); font-weight: 700; font-size: 14px; }
.tool-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.tool-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-grid-ad {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 4px 0;
}
.tool-grid-ad .mt-promo-wrap,
.tool-grid-ad .mt-promo,
.tool-grid-ad .mt-promo-inner {
  width: 728px;
  max-width: 100%;
  margin: 0 auto;
}
.mt-promo-tool,
.mt-promo-post_top,
.mt-promo-post_middle,
.mt-promo-post_end,
.mt-promo-header,
.mt-promo-hero,
.mt-promo-footer,
.mt-promo-home_categories,
.mt-promo-all_tools,
[class*="mt-promo-all_tools_"],
[class*="mt-promo-blog_"] {
  width: 728px;
  max-width: 100%;
  min-height: 90px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
}
.mt-promo-tool_side_top,
.mt-promo-tool_side_bottom {
  width: 300px;
  max-width: 100%;
  min-height: 250px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
}
.tool-side-ad .mt-promo-wrap,
.tool-side-ad .mt-promo,
.tool-side-ad .mt-promo-inner {
  width: 300px;
  max-width: 100%;
  margin: 0 auto;
}
.tool-side-ad .mt-promo-inner img,
.tool-side-ad .mt-promo-inner iframe,
.tool-side-ad .mt-promo-inner ins {
  width: 300px;
  max-width: 100%;
  height: 250px;
  object-fit: contain;
}
.tool-side { display: flex; flex-direction: column; gap: 18px; }
.tool-side-ad { width: 100%; display: flex; justify-content: center; }
.tool-side-sticky { width: 100%; }
@media (min-width: 981px) {
  .tool-side-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: var(--sticky-offset);
    align-self: stretch;
  }
}
.post-ad { display: flex; justify-content: center; align-items: center; width: 100%; margin: 18px 0; }
.post-ad .mt-promo-wrap { width: 100%; }
.mt-promo-in_content {
  width: 336px;
  max-width: 100%;
  min-height: 280px;
  margin: 0 auto;
}
.mt-promo-tool .mt-promo-inner img,
.mt-promo-tool .mt-promo-inner iframe,
.mt-promo-tool .mt-promo-inner ins,
.mt-promo-post_top .mt-promo-inner img,
.mt-promo-post_top .mt-promo-inner iframe,
.mt-promo-post_top .mt-promo-inner ins,
.mt-promo-post_middle .mt-promo-inner img,
.mt-promo-post_middle .mt-promo-inner iframe,
.mt-promo-post_middle .mt-promo-inner ins,
.mt-promo-post_end .mt-promo-inner img,
.mt-promo-post_end .mt-promo-inner iframe,
.mt-promo-post_end .mt-promo-inner ins,
.mt-promo-header .mt-promo-inner img,
.mt-promo-header .mt-promo-inner iframe,
.mt-promo-header .mt-promo-inner ins,
.mt-promo-hero .mt-promo-inner img,
.mt-promo-hero .mt-promo-inner iframe,
.mt-promo-hero .mt-promo-inner ins,
.mt-promo-footer .mt-promo-inner img,
.mt-promo-footer .mt-promo-inner iframe,
.mt-promo-footer .mt-promo-inner ins,
.mt-promo-home_categories .mt-promo-inner img,
.mt-promo-home_categories .mt-promo-inner iframe,
.mt-promo-home_categories .mt-promo-inner ins,
.mt-promo-all_tools .mt-promo-inner img,
.mt-promo-all_tools .mt-promo-inner iframe,
.mt-promo-all_tools .mt-promo-inner ins,
[class*="mt-promo-all_tools_"] .mt-promo-inner img,
[class*="mt-promo-all_tools_"] .mt-promo-inner iframe,
[class*="mt-promo-all_tools_"] .mt-promo-inner ins,
[class*="mt-promo-blog_"] .mt-promo-inner img,
[class*="mt-promo-blog_"] .mt-promo-inner iframe,
[class*="mt-promo-blog_"] .mt-promo-inner ins {
  width: 728px;
  max-width: 100%;
  height: 90px;
  object-fit: contain;
}
/*
 * Fixed-size ad slots (leaderboards 728x90, sidebars 300x250) are often filled
 * with ad code that hardcodes its own pixel width. Contain the creative inside
 * its card so custom code can never stretch the page on small screens; creatives
 * wider than the slot scroll within it instead of breaking the layout.
 */
.mt-promo-tool .mt-promo-inner,
.mt-promo-post_top .mt-promo-inner,
.mt-promo-post_middle .mt-promo-inner,
.mt-promo-post_end .mt-promo-inner,
.mt-promo-header .mt-promo-inner,
.mt-promo-hero .mt-promo-inner,
.mt-promo-footer .mt-promo-inner,
.mt-promo-home_categories .mt-promo-inner,
.mt-promo-all_tools .mt-promo-inner,
[class*="mt-promo-all_tools_"] .mt-promo-inner,
[class*="mt-promo-blog_"] .mt-promo-inner,
.mt-promo-tool_side_top .mt-promo-inner,
.mt-promo-tool_side_bottom .mt-promo-inner {
  position: relative;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}
.tool-card, .cat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-height: 148px;
  position: relative;
  transition: 160ms ease;
}
.tool-card:hover, .cat-card:hover {
  transform: translateY(-2px);
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(20, 70, 120, 0.06);
}
[data-theme="dark"] .tool-card:hover,
[data-theme="dark"] .cat-card:hover {
  border-color: var(--primary);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
}
.cat-card { flex-direction: row; align-items: center; min-height: 82px; gap: 12px; }
.cat-card span:nth-child(2) { display: flex; flex-direction: column; }
.cat-card small { color: var(--muted); font-size: 12px; }
.tool-name, .cat-card strong { font-weight: 800; font-size: 15px; }
.tool-name { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ai-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1;
  vertical-align: middle;
}
.page-hero h1 .ai-badge { margin-left: 8px; height: 22px; padding: 0 8px; font-size: 12px; }
.tool-desc { color: var(--muted); font-size: 13px; line-height: 1.4; }
.tool-go { margin-top: auto; color: var(--blue); font-weight: 800; align-self: flex-end; }
.cat-card .tool-go { margin: 0 0 0 auto; align-self: center; }
.tool-ico {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}
.tool-ico svg { width: 22px; height: 22px; }
.ic-blue { background: #eaf3ff; color: #1677ff; }
.ic-pink { background: #fde8f3; color: #db2777; }
.ic-red { background: #fee2e2; color: #ef4444; }
.ic-green { background: #eaf8ef; color: #16a34a; }
.ic-purple { background: #f1eaff; color: #7c3aed; }
.ic-orange { background: #fff1e6; color: #ea580c; }
.ic-teal { background: #e6faf6; color: #0d9488; }
.ic-violet { background: #eee7ff; color: #6d28d9; }
.ic-gold { background: #fff7e0; color: #d97706; }
.ic-rose { background: #ffe4ea; color: #e11d48; }
.ic-slate { background: #eef2f6; color: #475569; }
.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.cta-banner {
  background: var(--background-blue);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1.2fr 0.9fr auto 140px;
  align-items: center;
  gap: 16px;
  margin: 8px 0 28px;
}
[data-theme="dark"] .cta-banner { background: var(--card); border-color: var(--border); }
.cta-copy { display: flex; gap: 14px; align-items: flex-start; }
.cta-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--blue);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.cta-avatar svg { width: 24px; height: 24px; }
.cta-banner h2 { margin: 0 0 6px; font-size: 26px; line-height: 1.15; }
.cta-banner p { margin: 0 0 10px; color: var(--muted); }
.btn-light { background: var(--card); color: var(--primary); border: 1px solid var(--primary); }
.check-inline { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 14px; list-style: none; padding: 0; margin: 0; font-weight: 600; font-size: 13px; }
.check-inline li, .checks li { display: flex; align-items: center; gap: 6px; }
.check-inline svg, .checks svg { width: 16px; height: 16px; color: #16a34a; flex: 0 0 auto; }
.cta-art { position: relative; height: 92px; width: 140px; }
.device {
  position: absolute;
  background: #071525;
  border: 5px solid #0f172a;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.device img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
}
.device.monitor { width: 120px; height: 78px; right: 28px; top: 0; border-radius: 8px; }
.device.monitor:after { content: ""; position: absolute; left: 50%; bottom: -16px; width: 36px; height: 10px; background: #0f172a; transform: translateX(-50%); border-radius: 2px; }
.device.tablet { width: 46px; height: 62px; right: 8px; top: 18px; border-radius: 8px; }
.device.phone { width: 22px; height: 42px; right: 0; top: 36px; border-radius: 6px; border-width: 4px; }
.split-section {
  display: grid;
  grid-template-columns: 0.85fr 1.5fr;
  gap: 14px;
  margin-bottom: 24px;
  align-items: stretch;
}
.why-card, .news-card, .blog-card, .panel, .prose {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.why-card { background: var(--success-light); border-color: #cfeedd; }
.why-card h3, .news-card h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 18px; }
[data-theme="dark"] .why-card { background: #052e1c; }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { margin: 8px 0; font-weight: 600; font-size: 14px; }
.blog-col .section-head { margin-bottom: 12px; }
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.blog-thumb { height: 92px; border-radius: 12px; margin-bottom: 10px; background-size: cover; background-position: center; }
.t-blog-1 { background-image: linear-gradient(180deg, rgba(15,23,42,.08), rgba(15,23,42,.28)), url("https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=600&q=60"); }
.t-blog-2 { background-image: linear-gradient(180deg, rgba(15,23,42,.08), rgba(15,23,42,.28)), url("https://images.unsplash.com/photo-1511707171634-5f897ff02aa9?auto=format&fit=crop&w=600&q=60"); }
.t-blog-3 { background-image: linear-gradient(180deg, rgba(15,23,42,.08), rgba(15,23,42,.28)), url("https://images.unsplash.com/photo-1516321318423-f06f85e504b3?auto=format&fit=crop&w=600&q=60"); }
.blog-card { padding: 10px; display: flex; flex-direction: column; gap: 6px; min-height: auto; }
.blog-card strong { font-size: 13px; line-height: 1.35; }
.blog-card span { color: var(--muted); font-size: 12px; }
.news-band {
  background: var(--background-blue);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 28px 32px;
  margin: 8px 0 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
}
.news-copy { max-width: 640px; }
.news-band h3 { margin: 0 0 8px; display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 22px; }
.news-band p { margin: 0; color: var(--text-secondary); }
.news-band form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  min-width: 0;
}
.news-field {
  display: flex;
  align-items: stretch;
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  overflow: hidden;
}
.news-field input[type="email"] {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 0;
  background: transparent;
  padding: 12px 14px;
  outline: none;
}
.news-field .btn {
  flex: 0 0 auto;
  border-radius: 0;
  min-height: 44px;
}
.news-terms {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  font-weight: 500;
  margin: 0;
  text-align: left;
}
.news-terms input { margin-top: 3px; flex: 0 0 auto; }
.news-terms a { color: #1677ff; text-decoration: underline; font-weight: 600; }
.site-footer {
  background: var(--footer);
  color: #9db0c5;
  padding: 40px 0 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 0.8fr 0.9fr 0.9fr;
  gap: 20px;
}
.site-footer h4 { color: #fff; margin: 0 0 12px; }
.site-footer a { display: block; margin: 6px 0; color: #9db0c5; }
.site-footer a.footer-link-ai { color: #c084fc; font-weight: 700; }
.site-footer a.footer-link-ai:hover { color: #d8b4fe; }
.site-footer .footer-logo,
.site-footer .footer-brand-title {
  display: grid;
  margin: 0;
  color: #fff;
}
.site-footer .footer-brand-title { display: flex; }
.footer-brand {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  column-gap: 14px;
  row-gap: 12px;
  align-items: start;
}
.footer-logo {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin: 0;
  color: #fff;
}
.footer-logo img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
}
.footer-logo .brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 12px;
}
.footer-logo .brand-mark svg { width: 26px; height: 26px; }
.footer-brand-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.footer-brand-title {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 0;
  line-height: 1.2;
  color: #fff;
}
.footer-brand-title strong {
  color: #fff;
  font-size: 18px;
  font-weight: 800;
}
.footer-brand-title small {
  color: #9db0c5;
  font-size: 12px;
  font-weight: 500;
}
.footer-brand-title:hover strong { color: var(--primary); }
.footer-brand p {
  color: #9db0c5;
  max-width: 320px;
  font-size: 14px;
  line-height: 1.55;
  margin: 0;
}
.footer-brand .socials {
  grid-column: 2;
  margin-top: 2px;
}
.socials { display: flex; gap: 8px; margin-top: 12px; }
.socials a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--footer-secondary);
  display: grid;
  place-items: center;
  color: #fff;
}
.socials svg { width: 14px; height: 14px; }
.footer-connect p { color: #9db0c5; font-size: 14px; }
.footer-news { display: flex; gap: 8px; }
.footer-news input {
  background: var(--footer-secondary);
  border-color: #1c3854;
  color: #fff;
}
.footer-bottom {
  margin-top: 24px;
  border-top: 1px solid #1c3854;
  padding-top: 14px;
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 13px;
  color: #8aa0b8;
}
.footer-bottom a { color: #8aa0b8; display: inline; }
.footer-brand-link { color: #fff; font-weight: 700; }
.footer-brand-link:hover { color: var(--primary); }
.nf-code { font-size: 72px; font-weight: 800; color: var(--primary); margin: 0; }
.page-hero h1 { margin: 0 0 8px; font-size: 36px; }
.page-hero p { color: var(--muted); }
.filter-row { display: flex; gap: 10px; margin: 16px 0 20px; }
.az-index {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 22px;
  position: -webkit-sticky;
  position: sticky;
  top: var(--sticky-offset);
  z-index: 40;
  background: var(--background-soft);
  padding: 10px 0 12px;
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .az-index { background: var(--background-soft); }
.az-card {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-primary);
  display: grid;
  place-items: center;
  font-weight: 800;
  box-shadow: var(--shadow);
}
a.az-card:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }
[data-theme="dark"] a.az-card:hover { background: #163a66; color: #7db3ff; }
.az-card.is-empty { opacity: .38; cursor: default; }
.az-heading {
  grid-column: 1 / -1;
  margin: 8px 0 0;
  font-size: 22px;
  scroll-margin-top: calc(var(--sticky-offset) + 72px);
}
.crumbs { color: var(--muted); font-size: 14px; margin-bottom: 10px; }
.crumbs a { color: var(--blue); }
.tool-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; }
.tool-layout > * { min-width: 0; }
.dropzone {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 2px dashed #93c5fd;
  background: var(--blue-50);
  border-radius: 16px;
  padding: 28px 20px;
  text-align: center;
  cursor: pointer;
  margin: 12px 0;
}
.dropzone strong { display: block; font-size: 16px; margin-bottom: 6px; }
.dropzone > div { display: block; color: var(--muted); font-size: 14px; }
.dropzone.is-drag { border-color: var(--primary); background: var(--primary-light); }
#fileList { display: flex; flex-wrap: wrap; margin-top: 2px; }
.tool-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.result-box, textarea.full {
  width: 100%;
  max-width: 100%;
  min-height: 180px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: var(--card);
  color: var(--ink);
  white-space: pre-wrap;
  resize: vertical;
  box-sizing: border-box;
}
.stats-mini { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.stats-mini span {
  background: var(--blue-50);
  color: var(--blue);
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 700;
  font-size: 13px;
}
.msg { padding: 10px 12px; border-radius: 10px; margin: 8px 0; }
.msg.err { background: #fef2f2; color: #b91c1c; }
.msg.ok { background: #ecfdf5; color: #047857; }
[data-theme="dark"] .msg.err { background: #3b1515; color: #fca5a5; }
[data-theme="dark"] .msg.ok { background: #052e1c; color: #86efac; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.preview-color { height: 48px; border-radius: 10px; border: 1px solid var(--line); }
.related { display: grid; gap: 8px; }
.related a { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); }
.related a:hover { border-color: var(--primary); color: var(--primary); }
[data-theme="dark"] .related a:hover { background: #163a66; color: #fff; }
.howto { margin-top: 24px; }
.howto ol { color: var(--muted); }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 8px 0; overflow-anchor: none; }
.faq { overflow-anchor: none; }
.calc-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.calc-pad button { padding: 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); cursor: pointer; }
.seo-block { margin-top: 28px; }
.seo-block h2 { font-size: 22px; }
@media (max-width: 1280px) {
  .tool-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1200px) {
  .tool-grid, .cat-grid, .tool-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cta-banner { grid-template-columns: 1fr auto; }
  .cta-art { display: none; }
  .news-band { padding: 28px 18px; }
  .header-inner { gap: 12px; }
  .main-nav { gap: 16px; }
}
@media (max-width: 980px) {
  .app-shell { display: block; }
  .sidebar { display: none; }
  .sidebar.is-open {
    display: block;
    position: fixed;
    inset: var(--sticky-offset) auto 0 0;
    z-index: 50;
    height: auto;
    overflow: auto;
    background: var(--card);
    padding: 16px;
    width: 300px;
    box-shadow: 8px 0 24px rgba(6, 27, 56, 0.18);
  }
  .sidebar.is-open .sidebar-inner { padding: 0; }
  .sidebar.is-open .sidebar-ad { position: static; top: auto; padding-right: 0; }
  .nav-toggle { display: flex; }
  .main-nav { display: none; }
  .hero { grid-template-columns: 1fr; }
  .hero h1 { font-size: 34px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split-section, .footer-grid, .tool-layout, .cta-banner, .sitemap-top { grid-template-columns: minmax(0, 1fr); }
  .sitemap-tool-list { grid-template-columns: 1fr 1fr; }
  .blog-grid { grid-template-columns: 1fr; }
  .section-head p { margin-left: 0; }
  .main-content { padding: 18px 16px 48px; }
}
@media (max-width: 700px) {
  .tool-grid, .cat-grid, .stats, .tool-grid-3 { grid-template-columns: 1fr 1fr; }
  .suggest-btn { display: none; }
  .wrap { padding: 0 16px; }
  .header-inner { padding: 0 20px; }
  .hero-art { display: none; }
  .site-header .brand-text small { display: none; }
  .header-actions { gap: 4px; }
}
@media (max-width: 480px) {
  .sitemap-tool-list { grid-template-columns: 1fr; }
  .tool-grid, .cat-grid, .stats, .tool-grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .filter-row { flex-direction: column; }
}

.field { margin: 10px 0; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
.field.inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.option-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0; }
.option-row label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.preview-img, #toolResult canvas, #toolResult img { max-width: 100%; border-radius: 12px; }
#toolResult pre { overflow: auto; background: var(--bg); padding: 12px; border-radius: 12px; }
.unit-grid { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: end; }
.color-row { display: grid; grid-template-columns: 80px 1fr; gap: 10px;   align-items: start;
}
.file-chip { display: inline-block; max-width: 100%; background: var(--blue-50); color: var(--blue); padding: 6px 10px; border-radius: 999px; margin: 4px; font-size: 13px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.prose label { display: block; margin: 8px 0; font-weight: 700; }
.req { color: #ef4444; font-weight: 800; margin-left: 2px; }
.author-box {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 22px 0 8px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--background-blue);
}
.author-mark {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  overflow: hidden;
}
.author-mark svg { width: 26px; height: 26px; }
.author-mark.has-logo { background: var(--card); border: 1px solid var(--border); padding: 6px; }
.author-mark.has-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.author-box strong { display: block; margin-bottom: 6px; }
.author-box p { margin: 0 0 8px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.author-box p:last-child { margin-bottom: 0; }
.author-blurb { color: var(--text-primary) !important; }
.content-link,
.prose a,
.author-box a,
.page-links a,
.seo-block a,
.sitemap-grid a,
.sitemap-tools a,
.crumbs a {
  color: #1677ff;
  text-decoration: underline;
  font-weight: 600;
}
.content-link:hover,
.prose a:hover,
.author-box a:hover,
.page-links a:hover,
.seo-block a:hover,
.sitemap-grid a:hover,
.sitemap-tools a:hover,
.crumbs a:hover {
  color: #0866e8;
}
.sitemap-top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 24px;
  align-items: stretch;
}
.sitemap-top .panel h3,
.sitemap-tools h3 {
  margin: 0 0 12px;
  font-size: 18px;
}
.sitemap-top .panel p { margin: 6px 0; }
.sitemap-tools { margin-bottom: 24px; }
.sitemap-tools h4 { margin: 18px 0 8px; font-size: 16px; }
.sitemap-tools h4:first-of-type { margin-top: 4px; }
.sitemap-tool-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px 16px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sitemap-tool-list li { margin: 0; min-width: 0; }
.sitemap-tool-list a { font-weight: 600; font-size: 14px; }
@media (max-width: 980px) {
  .sitemap-top { grid-template-columns: minmax(0, 1fr); }
  .sitemap-tool-list { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .sitemap-tool-list { grid-template-columns: minmax(0, 1fr); }
}
.prose a.btn,
.seo-block a.btn,
.prose a.share-btn,
.seo-block a.share-btn,
.share-btn {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
}
.prose a.btn-secondary,
.seo-block a.btn-secondary {
  color: var(--primary);
}
.prose a.share-btn:hover,
.seo-block a.share-btn:hover,
.share-btn:hover {
  color: #fff;
}
.site-footer .socials a,
.site-footer .socials a:hover {
  color: #fff;
  text-decoration: none;
  display: grid;
  margin: 0;
}
.page-links { margin: 16px 0; color: var(--muted); font-size: 14px; }
.prose .panel p { margin: 8px 0; }
.prose img { max-width: 100%; height: auto; border-radius: 12px; }
.prose > form.panel {
  width: 95%;
  max-width: 95%;
  box-sizing: border-box;
  margin: 16px auto 8px;
}
.calc-display { font-size: 28px; font-weight: 800; padding: 12px; border: 1px solid var(--line); border-radius: 12px; text-align: right; margin-bottom: 10px; min-height: 52px; }
.invoice-preview { border: 1px solid var(--line); padding: 20px; border-radius: 12px; background: var(--card); }
.inv-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 22px; }
.inv-table { width: 100%; border-collapse: collapse; margin: 12px 0; }
.inv-table th, .inv-table td { border-bottom: 1px solid var(--line); text-align: left; padding: 8px; }
.inv-totals { text-align: right; }
.pick-canvas { max-width: 100%; display: block; margin: 10px 0; cursor: crosshair; border: 1px dashed var(--line); border-radius: 12px; }
.pdf-page-export { margin: 12px 0; display: grid; gap: 8px; }
.hint { color: var(--muted); font-size: 13px; }
.seo-score-hero { display: flex; gap: 18px; align-items: center; padding: 18px; border-radius: 16px; margin: 12px 0; border: 1px solid var(--line); background: var(--card); }
.seo-score-num { font-size: 42px; font-weight: 800; line-height: 1; min-width: 110px; }
.seo-score-num small { font-size: 16px; font-weight: 700; color: var(--muted); }
.seo-score-hero p { margin: 4px 0 0; color: var(--muted); word-break: break-all; }
.seo-score-hero.seo-good { background: var(--success-light); border-color: #bbf7d0; }
.seo-score-hero.seo-mid { background: #fff7ed; border-color: #fed7aa; }
.seo-score-hero.seo-bad { background: #fef2f2; border-color: #fecaca; }
.seo-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; margin: 12px 0 18px; }
.seo-sum-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: grid; gap: 4px; }
.seo-sum-card em { font-style: normal; font-size: 22px; font-weight: 800; }
.seo-sum-card span { color: var(--muted); font-size: 13px; }
.seo-sum-card.seo-good em { color: var(--success); }
.seo-sum-card.seo-mid em { color: #c2410c; }
.seo-sum-card.seo-bad em { color: var(--danger); }
.seo-group { margin: 16px 0; }
.seo-group h3 { margin: 0 0 10px; font-size: 16px; }
.seo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.seo-check { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: grid; gap: 4px; }
.seo-check strong { font-size: 14px; }
.seo-check span { color: var(--muted); font-size: 13px; word-break: break-word; }
.seo-flag { display: inline-block; width: fit-content; font-size: 11px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; }
.seo-check.is-ok { border-color: #bbf7d0; background: var(--success-light); }
.seo-check.is-ok .seo-flag { background: #16a34a; color: #fff; }
.seo-check.is-bad { border-color: #fecaca; background: #fef2f2; }
.seo-check.is-bad .seo-flag { background: #ef4444; color: #fff; }
.json-tree { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; background: var(--bg); padding: 12px; border-radius: 12px; overflow: auto; }
.json-tree details { margin-left: 12px; }
.json-tree summary { cursor: pointer; font-weight: 700; }
.json-k { color: var(--blue); }
.json-str { color: #047857; }
.json-prim { color: #b45309; }
.json-null { color: var(--muted); }
.html-preview { width: 100%; min-height: 420px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.sim-frame { max-width: 100%; margin: 12px auto; border: 10px solid #0f172a; border-radius: 18px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.sim-frame iframe { width: 100%; height: 100%; border: 0; display: block; background: #fff; }
.calc-pad.sci { grid-template-columns: repeat(4, 1fr); }
.share-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 16px 0; }
.share-label { font-weight: 700; font-size: 13px; color: var(--muted); margin-right: 4px; }
.share-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 0;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  background: var(--primary);
  cursor: pointer;
  text-decoration: none;
  position: relative;
  overflow: visible;
}
.share-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translate(-50%, 6px);
  white-space: nowrap;
  background: #10213f;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 10px;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 2;
}
.share-tip:after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #10213f;
}
.share-btn:hover .share-tip,
.share-btn.copied .share-tip {
  opacity: 1;
  transform: translate(-50%, 0);
}
.share-copy.copied .share-tip {
  background: #16a34a;
}
.share-copy.copied .share-tip:after {
  border-top-color: #16a34a;
}
.share-btn svg { width: 16px; height: 16px; }
.share-fb { background: #1877f2; }
.share-x { background: #111; }
.share-in { background: #0a66c2; }
.share-pin { background: #e60023; }
.share-wa { background: #25d366; }
.share-tg { background: #229ed9; }
.share-mail { background: #64748b; }
.share-copy { background: var(--primary); }
.share-btn.copied { background: var(--success); }
.share-float {
  --share-size: clamp(20px, 1.15vw + 16px, 28px);
  position: fixed;
  right: clamp(4px, 0.9vw, 12px);
  top: 50%;
  transform: translateY(-50%);
  z-index: 45;
  display: flex;
  flex-direction: column;
  flex-wrap: nowrap;
  margin: 0;
  gap: clamp(3px, 0.45vw, 6px);
}
.share-float .share-label { display: none; }
.share-float .share-btn {
  width: var(--share-size);
  height: var(--share-size);
}
.share-float .share-btn svg {
  width: calc(var(--share-size) * 0.46);
  height: calc(var(--share-size) * 0.46);
}
.share-float .share-tip {
  font-size: clamp(10px, 0.85vw, 12px);
  padding: 6px 8px;
}
.share-float .share-tip {
  left: auto;
  right: calc(100% + 10px);
  bottom: auto;
  top: 50%;
  transform: translate(8px, -50%);
}
.share-float .share-tip:after {
  left: auto;
  right: -5px;
  top: 50%;
  margin-left: 0;
  margin-top: -5px;
  border-color: transparent;
  border-left-color: #10213f;
  border-top-color: transparent;
}
.share-float .share-btn:hover .share-tip,
.share-float .share-btn.copied .share-tip {
  transform: translate(0, -50%);
}
.share-float .share-copy.copied .share-tip:after {
  border-left-color: #16a34a;
  border-top-color: transparent;
}
.float-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 46;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(22,119,255,.28);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity .2s, transform .2s;
}
.float-top.is-on { opacity: 1; pointer-events: auto; transform: none; }
.push-banner {
  position: fixed;
  right: 72px;
  bottom: 18px;
  z-index: 55;
  width: min(340px, calc(100vw - 110px));
  background: var(--card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(6,27,56,.22);
  padding: 16px 18px 16px 16px;
  animation: pushIn .35s ease;
}
.push-banner[hidden] { display: none !important; }
.push-inner { display: grid; gap: 8px; }
.push-inner img { width: 100%; height: auto; border-radius: 10px; display: block; }
.push-banner.size-small { width: min(240px, calc(100vw - 110px)); }
.push-banner.size-small img { max-height: 90px; object-fit: cover; }
.push-banner.size-medium img { max-height: 140px; object-fit: cover; }
.push-banner.size-large { width: min(380px, calc(100vw - 110px)); }
.push-banner.size-large img { max-height: 200px; object-fit: cover; }
.push-inner strong { font-size: 16px; }
.push-inner p { margin: 0; color: var(--muted); font-size: 14px; }
.push-close {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: var(--background-blue);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
#mtGate {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(6, 27, 56, .55);
  padding: 24px;
}
#mtGate[hidden] { display: none !important; }
html.mt-gate-on, html.mt-gate-on body { overflow: hidden; }
.mt-gate-card {
  width: min(420px, 100%);
  background: var(--card);
  color: var(--text-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 24px;
  text-align: center;
  box-shadow: 0 20px 50px rgba(6, 27, 56, .28);
}
.mt-gate-card strong { display: block; font-size: 20px; margin-bottom: 8px; }
.mt-gate-card p { margin: 0 0 16px; color: var(--muted); }
.mt-gate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  background: #1677ff;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}
.mt-gate-btn:hover { background: #0866e8; }
.mt-gate-msg { display: block; margin-top: 10px; color: #b91c1c; font-size: 13px; font-weight: 600; }
.mt-gate-msg[hidden] { display: none !important; }
@keyframes pushIn { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (max-width: 720px) {
  .share-float {
    --share-size: clamp(18px, 4.2vw, 24px);
    right: 4px;
  }
  .float-top { right: 8px; bottom: 12px; }
  .push-banner { right: 8px; left: 8px; width: auto; bottom: 70px; }
}
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.range-field input[type="range"] { width: 100%; accent-color: var(--primary); }
.range-field .range-val { float: right; color: var(--muted); font-weight: 600; font-size: 13px; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 36px); gap: 6px; }
.pos-grid button {
  width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--card); cursor: pointer; padding: 0;
}
.pos-grid button.is-on { background: var(--primary); border-color: var(--primary); }
.pos-grid button.is-on span { background: #fff; }
.pos-grid button span { display: block; width: 8px; height: 8px; margin: 0 auto; border-radius: 50%; background: var(--muted); }
.check-grid { display: flex; flex-wrap: wrap; gap: 10px 16px; margin: 8px 0 12px; }
.check-grid label { display: flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.tool-live { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.tool-live span {
  background: var(--background-blue); border: 1px solid var(--border); border-radius: 999px;
  padding: 6px 10px; font-size: 13px; font-weight: 700;
}
.tool-preview-wrap {
  margin: 12px 0; padding: 12px; border: 1px dashed var(--border); border-radius: 12px;
  background: var(--background-blue); overflow: auto; text-align: center;
}
.tool-preview-wrap canvas, .tool-preview-wrap img { max-width: 100%; height: auto; }
.fmt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.fmt-row label {
  border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-weight: 700; font-size: 13px; cursor: pointer;
}
.fmt-row input { display: none; }
.fmt-row input:checked + span, .fmt-row label:has(input:checked) { background: var(--primary); color: #fff; border-color: var(--primary); }
.hint { color: var(--muted); font-size: 13px; margin: 4px 0 10px; }
@media (max-width: 720px) {
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  .unit-grid { grid-template-columns: 1fr; }
}
@media print { .site-header, .sidebar, .site-footer, .tool-actions, .tool-options, .mt-promo, .seo-block, .crumbs, .page-hero, textarea, .dropzone, .share-bar, .float-top, .push-banner, #mtGate { display: none !important; } }
