
:root {
  --blue: #667fd0;
  --purple: #9281c9;
  --rose: #bd6f9d;
  --pink: #df6f86;
  --cream: #f3ead7;
  --ink: #111118;
  --muted: #5d6070;
  --card: rgba(255,255,255,0.92);
  --border: rgba(17,17,24,0.13);
  --shadow: 0 28px 80px rgba(80, 70, 140, 0.24);
  --radius: 24px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.6;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(243,234,215,.34), transparent 28rem),
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.18), transparent 34rem),
    radial-gradient(circle at 70% 95%, rgba(223,111,134,.35), transparent 40rem),
    linear-gradient(150deg, #667fd0 0%, #9281c9 46%, #bd6f9d 72%, #df6f86 100%);
  background-attachment: fixed;
}
a { color: inherit; }
.wrap { width: min(1120px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.narrow { width: min(920px, calc(100% - 32px)); margin-left: auto; margin-right: auto; }
.site-header {
  position: sticky; top: 0; z-index: 20; padding: 16px 0;
  background: rgba(255,255,255,.16); border-bottom: 1px solid rgba(255,255,255,.24); backdrop-filter: blur(16px);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); font-size: 20px; font-weight: 950; letter-spacing: -0.04em; text-decoration: none; white-space: nowrap; }
.nav-logo-img { width: 44px; height: 44px; border-radius: 14px; object-fit: cover; box-shadow: 0 12px 30px rgba(0,0,0,.18); border: 1px solid rgba(255,255,255,.42); background: rgba(255,255,255,.22); }
.nav-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
.nav-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
.nav-links a, .lang-btn { color: var(--ink); text-decoration: none; font-weight: 900; border: 1px solid rgba(15,15,20,.22); background: rgba(255,255,255,.30); padding: 10px 15px; border-radius: 999px; backdrop-filter: blur(10px); }
.lang-switch { display: flex; gap: 6px; padding: 5px; border-radius: 999px; background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.28); }
.lang-btn { border: 0; padding: 7px 10px; cursor: pointer; font-size: 13px; }
.lang-btn.active { background: var(--ink); color: #fff; }
.hero { padding: 44px 0 14px; text-align: center; }
.eyebrow { display: inline-flex; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.28); border: 1px solid rgba(255,255,255,.46); color: var(--ink); font-size: 14px; font-weight: 900; margin-bottom: 18px; backdrop-filter: blur(10px); }
h1, .hero-title { margin: 0 auto 20px; max-width: 980px; font-size: clamp(3.4rem, 8.8vw, 7.2rem); line-height: .92; letter-spacing: -0.075em; color: var(--ink); }
.hero p { max-width: 760px; margin: 0 auto 20px; color: var(--ink); font-size: 20px; font-weight: 650; }
.cta-row { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.btn { border: 0; border-radius: 999px; padding: 14px 20px; font-weight: 900; cursor: pointer; background: var(--ink); color: white; box-shadow: 0 14px 30px rgba(15,15,20,.24); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn.secondary { background: white; color: var(--ink); }
.tool-card { width: min(1040px, calc(100% - 32px)); margin: .2rem auto 34px; background: var(--card); border: 1px solid rgba(255,255,255,.46); box-shadow: var(--shadow); border-radius: var(--radius); padding: clamp(20px,4vw,34px); backdrop-filter: blur(14px); }
#tool { scroll-margin-top: 95px; }
.tool-layout { display: grid; grid-template-columns: .94fr 1.06fr; gap: 24px; align-items: start; }
.panel { border: 1px solid var(--border); border-radius: 18px; padding: 20px; background: white; }
label { display: block; margin-bottom: 8px; color: var(--muted); font-weight: 850; font-size: 14px; }
input { width: 100%; border: 1px solid var(--border); border-radius: 14px; padding: 14px 15px; font: inherit; margin-bottom: 14px; background: white; }
.control-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 12px 0 18px; }
.preset-btn { border: 1px solid var(--border); border-radius: 14px; padding: 12px; background: #f7f4fb; font-weight: 900; cursor: pointer; color: var(--ink); }
.preview-wrap { border-radius: 20px; border: 1px solid var(--border); background: rgba(255,255,255,0.56); padding: 28px; min-height: 360px; display: grid; place-items: center; }
.ratio-box { width: min(100%, 520px); aspect-ratio: 16 / 9; border-radius: 18px; background: radial-gradient(circle at 20% 20%, rgba(255,255,255,.22), transparent 42%), radial-gradient(circle at 85% 80%, rgba(255,255,255,.16), transparent 42%), linear-gradient(135deg, #667fd0 0%, #9281c9 50%, #df6f86 100%); border: 3px solid rgba(15,15,20,.72); display: grid; place-items: center; color: var(--ink); font-weight: 950; font-size: clamp(26px, 4vw, 52px); letter-spacing: -0.05em; text-align: center; box-shadow: 0 22px 44px rgba(80,70,140,.24); }
.result-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; margin-top: 16px; }
.result-box { background: #f7f4fb; border: 1px solid var(--border); border-radius: 16px; padding: 14px; }
.result-box span { display: block; color: var(--muted); font-size: 13px; font-weight: 850; }
.result-box strong { font-size: 20px; letter-spacing: -0.04em; }
.code-box { margin-top: 16px; border: 1px solid var(--border); border-radius: 16px; background: var(--ink); color: white; padding: 16px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; font-size: 13px; word-break: break-word; white-space: pre-wrap; }
.copy-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.content-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 24px; margin: 34px auto; }
.card, .seo-content, .faq, .sidebox { background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.46); border-radius: var(--radius); padding: clamp(20px,3vw,30px); box-shadow: 0 16px 44px rgba(80,70,140,.12); backdrop-filter: blur(12px); }
.card h2, .seo-content h2, .faq h2 { margin-top: 0; letter-spacing: -.04em; line-height: 1.05; }
.card p, .seo-content p, .faq p, .sidebox p, .card li { color: var(--muted); }
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 30px auto; }
.details-list details { border-top: 1px solid var(--border); padding: 16px 0; }
.details-list details:first-of-type { border-top: 0; }
summary { cursor: pointer; font-weight: 900; }
.article-wrap { max-width: 920px; margin: 32px auto; }
.article-wrap .card { margin-bottom: 18px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; background: rgba(255,255,255,.72); border-radius: 16px; overflow: hidden; }
th, td { padding: 13px 15px; text-align: left; border-bottom: 1px solid var(--border); }
th { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; }
.site-footer { position: relative; overflow: hidden; margin-top: 4rem; padding: 5.8rem 1.5rem 3rem; color: #fff7ec; background: radial-gradient(circle at 14% 18%, rgba(255,255,255,.16), transparent 28rem), radial-gradient(circle at 82% 10%, rgba(223,111,134,.22), transparent 24rem), linear-gradient(135deg, rgba(29,35,45,.98), rgba(62,55,91,.98) 52%, rgba(105,54,83,.98)); }
.site-footer::before { content: ""; position: absolute; inset: auto -10% -42% -10%; height: 70%; background: radial-gradient(circle at 50% 0%, rgba(255,255,255,.20), transparent 64%); pointer-events: none; }
.footer-inner { position: relative; max-width: 1120px; margin: 0 auto; }
.footer-hero { display: grid; grid-template-columns: 190px 1fr; gap: 2.2rem; align-items: center; margin-bottom: 3rem; }
.footer-logo-large { width: 190px; height: 190px; border-radius: 42px; object-fit: cover; box-shadow: 0 32px 95px rgba(0,0,0,.34); border: 1px solid rgba(255,255,255,.30); background: rgba(255,255,255,.12); }
.footer-kicker { display: inline-flex; margin-bottom: .9rem; padding: .42rem .85rem; border-radius: 999px; background: rgba(255,255,255,.13); border: 1px solid rgba(255,255,255,.21); font-size: .78rem; font-weight: 800; letter-spacing: .02em; }
.site-footer h2 { max-width: 820px; font-size: clamp(2.1rem, 5vw, 5rem); line-height: .9; letter-spacing: -0.075em; margin: 0 0 1rem; color: #fff; }
.site-footer p { max-width: 760px; color: rgba(255,247,236,.80); font-size: 1rem; line-height: 1.75; margin: 0 0 .75rem; }
.site-footer a { color: inherit; }
.footer-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-top: 2rem; }
.footer-panel { padding: 1.25rem; border-radius: 22px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.15); backdrop-filter: blur(14px); }
.footer-panel h3 { margin: 0 0 .85rem; color: #fff; font-size: .95rem; }
.footer-panel a { display: block; color: rgba(255,247,236,.84); text-decoration: none; font-size: .88rem; line-height: 1.45; padding: .35rem 0; }
.footer-panel a:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }
.footer-bottom { position: relative; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(255,255,255,.16); color: rgba(255,247,236,.70); font-size: .82rem; }
.footer-bottom a { color: rgba(255,247,236,.82); text-decoration: underline; text-underline-offset: 3px; }
.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: white; padding: 12px 16px; border-radius: 999px; box-shadow: var(--shadow); font-weight: 900; display: none; z-index: 50; }
@media (max-width: 900px) { .tool-layout, .content-grid, .control-grid, .result-grid, .card-grid { grid-template-columns: 1fr; } .footer-hero { grid-template-columns: 1fr; } .footer-logo-large { width: 136px; height: 136px; border-radius: 32px; } .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .nav { align-items: flex-start; flex-direction: column; } .nav-right, .nav-links { justify-content: flex-start; } .preset-grid { grid-template-columns: 1fr 1fr; } h1, .hero-title { font-size: clamp(3rem, 15vw, 4.6rem); letter-spacing: -.06em; } .site-footer { padding: 4rem 1rem 2.4rem; } .footer-grid { grid-template-columns: 1fr; } }

/* v3 layout refinements: centered stacked tool + larger pill language switch */
.site-header {
  padding: 18px 0;
}

.nav {
  justify-content: center;
  align-items: center;
  gap: 20px;
}

.logo {
  font-size: 18px;
}

.nav-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
}

.nav-right {
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.nav-links {
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.nav-links a {
  min-height: 48px;
  padding: 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(255,255,255,.34);
  border: 1px solid rgba(255,255,255,.45);
  box-shadow: 0 12px 30px rgba(65,70,130,.10);
  font-size: 15px;
  letter-spacing: .01em;
}

.lang-switch {
  min-height: 58px;
  padding: 7px;
  gap: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.28);
  border: 1px solid rgba(255,255,255,.46);
  box-shadow: 0 14px 34px rgba(65,70,130,.12);
}

.lang-btn {
  min-width: 74px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: .06em;
  background: transparent;
}

.lang-btn.active {
  background: rgba(255,255,255,.92);
  color: var(--ink);
  box-shadow: 0 10px 24px rgba(15,15,20,.10);
}

.hero {
  max-width: 900px;
  padding-top: 34px;
  padding-bottom: 18px;
}

.tool-card,
.card-grid,
.content-grid,
.faq {
  width: min(920px, calc(100% - 32px));
  margin-left: auto;
  margin-right: auto;
}

.tool-card {
  margin-top: 1rem;
}

.tool-layout {
  grid-template-columns: 1fr;
  gap: 22px;
}

.panel {
  width: 100%;
}

.preview-wrap {
  min-height: 300px;
}

.ratio-box {
  width: min(560px, 100%);
}

.card-grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.content-grid {
  grid-template-columns: 1fr;
  gap: 18px;
}

.faq {
  display: block;
}

.sidebox .btn {
  margin-top: .25rem;
}

@media (max-width: 1050px) {
  .nav {
    flex-direction: column;
  }
  .nav-right {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .nav-links a {
    min-height: 42px;
    padding: 0 14px;
    font-size: 13px;
  }
  .lang-switch {
    min-height: 48px;
  }
  .lang-btn {
    min-width: 54px;
    min-height: 34px;
    padding: 0 12px;
    font-size: 14px;
  }
  .control-grid,
  .result-grid {
    grid-template-columns: 1fr;
  }
}
