:root {
  --ink: #25212e;
  --muted: #726b79;
  --line: #e8e1e6;
  --paper: #fffdfc;
  --surface: #ffffff;
  --rose: #e94f87;
  --rose-dark: #c9346d;
  --rose-soft: #fff0f5;
  --mint: #168d78;
  --mint-soft: #eaf8f4;
  --focus: #3659c9;
  --shadow: 0 14px 36px rgba(42, 30, 48, 0.09);
  --radius: 8px;
  --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Nunito", "Zen Maru Gothic", system-ui, sans-serif;
  letter-spacing: 0;
}

a { color: inherit; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(54, 89, 201, 0.36);
  outline-offset: 3px;
}

.shell-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
  padding: 10px max(20px, calc((100vw - var(--max)) / 2));
  border-bottom: 1px solid rgba(232, 225, 230, 0.9);
  background: rgba(255, 253, 252, 0.94);
  backdrop-filter: blur(12px);
}

.shell-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
}

.shell-brand img {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.shell-brand strong,
.shell-brand small { display: block; }
.shell-brand strong { font: 700 16px/1.2 "Zen Maru Gothic", sans-serif; }
.shell-brand small { margin-top: 2px; color: var(--muted); font-size: 10px; text-transform: uppercase; }

.shell-nav { display: flex; align-items: center; gap: 24px; }
.shell-nav a { color: var(--muted); font-size: 12px; font-weight: 700; text-decoration: none; }
.shell-nav a:hover { color: var(--rose-dark); }

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  height: min(600px, calc(100vh - 68px));
  min-height: 540px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.home-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 48px max(28px, calc((100vw - var(--max)) / 2));
  padding-right: clamp(36px, 6vw, 96px);
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--rose-dark);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.home-copy h1 {
  max-width: 700px;
  margin: 0;
  font: 700 52px/1.22 "Zen Maru Gothic", sans-serif;
}

.home-copy .lead {
  max-width: 610px;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: clamp(15px, 1.6vw, 18px);
  line-height: 1.9;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.primary-link,
.secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.primary-link { background: var(--rose); color: #fff; box-shadow: 0 10px 22px rgba(233,79,135,.24); }
.primary-link:hover { background: var(--rose-dark); }
.secondary-link { border: 1px solid var(--line); background: #fff; color: var(--ink); }

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
  margin-top: 38px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.trust-row span::before { content: "✓"; margin-right: 7px; color: var(--mint); }

.home-visual { position: relative; min-height: 500px; background: #f8dbe6; overflow: hidden; }
.home-visual img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; display: block; }
.home-visual::after { content: ""; position: absolute; inset: 0; box-shadow: inset 18px 0 40px rgba(60, 33, 49, .1); pointer-events: none; }
.visual-caption { position: absolute; right: 24px; bottom: 20px; padding: 7px 10px; background: rgba(255,255,255,.88); color: var(--muted); font-size: 11px; }

.home-section { max-width: var(--max); margin: 0 auto; padding: 84px 28px; }
.home-section h2 { margin: 0; font: 700 clamp(28px, 4vw, 44px)/1.25 "Zen Maru Gothic", sans-serif; }
.home-section > p { max-width: 690px; color: var(--muted); line-height: 1.8; }

.tool-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .8fr);
  gap: 56px;
  align-items: center;
}

.tool-demo {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  padding: 28px;
  border: 1px solid var(--line);
  background: #f7f4f6;
}

.tool-demo-frame {
  width: 78%;
  aspect-ratio: 4 / 3;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
}

.tool-demo-frame img { width: 100%; height: 100%; object-fit: cover; }
.demo-mark { position: absolute; right: 8%; bottom: 8%; padding: 7px 11px; background: rgba(255,255,255,.85); border: 1px solid rgba(255,255,255,.95); font-size: 13px; font-weight: 800; }

.benefit-list { display: grid; gap: 1px; margin-top: 30px; border: 1px solid var(--line); background: var(--line); }
.benefit-list div { padding: 18px; background: #fff; }
.benefit-list strong { display: block; margin-bottom: 5px; }
.benefit-list span { color: var(--muted); font-size: 13px; line-height: 1.65; }

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 28px max(20px, calc((100vw - var(--max)) / 2));
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}
.footer-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-links a { text-decoration: none; }

/* Watermark tool overrides */
body.tool-page { background: #f7f5f6; }
body.tool-page .ad-wrap,
body.tool-page .guide-visual { display: none; }
body.tool-page .site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 62px;
  padding: 10px max(18px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
}
body.tool-page .site-header a { color: var(--ink); font-weight: 800; }
body.tool-page .header-title { font-size: 14px; }

.tool-heading {
  max-width: 1120px;
  margin: 0 auto;
  padding: 34px 20px 20px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
}
.tool-heading h1 { margin: 0; font: 700 clamp(26px, 4vw, 40px)/1.2 "Zen Maru Gothic",sans-serif; }
.tool-heading p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.privacy-pill { flex: 0 0 auto; padding: 8px 12px; border-radius: 999px; background: var(--mint-soft); color: #116e5e; font-size: 11px; font-weight: 800; }

body.tool-page .main {
  max-width: 1120px;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 18px;
  padding: 0 20px 48px;
}
body.tool-page .main > div:first-child { order: 2; }
body.tool-page .preview-col { order: 1; }
body.tool-page .panel { border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 7px 22px rgba(35,29,40,.06); }
body.tool-page .panel-head { min-height: 54px; padding: 12px 16px; border-color: var(--line); }
body.tool-page .panel-head h2 { color: var(--ink); font-size: 14px; }
body.tool-page .panel-body { padding: 16px; }
body.tool-page .main > div:first-child .panel:last-child { position: sticky; top: 80px; }

body.tool-page .drop-zone {
  min-height: 430px;
  border: 1.5px dashed #c9bdc7;
  border-radius: 6px;
  background: #fbfafb;
}
body.tool-page .drop-zone:hover { border-color: var(--rose); background: var(--rose-soft); }
body.tool-page .drop-icon { font-size: 30px; }
body.tool-page .drop-text { color: var(--ink); font-size: 14px; }
body.tool-page .drop-text small { color: var(--muted); }

body.tool-page #preview-canvas { max-height: 620px; border-radius: 4px; }
body.tool-page .canvas-wrap { min-height: 420px; align-items: center; background: #eee9ec; border-radius: 5px; }

body.tool-page .btn { min-height: 40px; border-radius: 5px; transition: background .15s ease, border-color .15s ease; }
body.tool-page .btn:hover { transform: none; }
body.tool-page .btn-primary { background: var(--rose); box-shadow: none; }
body.tool-page .btn-primary:hover { background: var(--rose-dark); }
body.tool-page .btn-mint { background: var(--mint); box-shadow: none; }
body.tool-page .btn-ghost { border-color: var(--line); background: #fff; }
body.tool-page .btn:disabled { background: #e6e0e4; color: #999198; opacity: 1; }

body.tool-page .wm-item { border-color: var(--line); border-radius: 5px; background: #fff; }
body.tool-page .wm-item.active { border-color: var(--rose); background: var(--rose-soft); box-shadow: none; }
body.tool-page .wm-empty { border-color: #d6cbd3; border-radius: 5px; background: #faf8f9; }
body.tool-page .grid9 { max-width: 148px; }
body.tool-page .grid9-btn { border-radius: 4px; background: #fff; border-color: #c9c1c7; }
body.tool-page .grid9-btn.active { background: var(--rose); border-color: var(--rose); box-shadow: none; }
body.tool-page input[type=range] { accent-color: var(--rose); }
body.tool-page .expert-toggle { border-radius: 5px; background: #fff; border-color: var(--line); }
body.tool-page .expert-toggle.active { border-color: var(--rose); background: var(--rose-soft); }

.quick-guide {
  max-width: 1120px;
  margin: 0 auto 18px;
  padding: 0 20px;
}
.quick-guide details { border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.quick-guide summary { cursor: pointer; padding: 13px 16px; color: var(--muted); font-size: 12px; font-weight: 800; }
.quick-guide img { display: block; width: 100%; height: auto; border-top: 1px solid var(--line); }

.support-grid {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px 20px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.support-grid article { padding: 18px; border: 1px solid var(--line); background: #fff; }
.support-grid h3 { margin: 0 0 8px; font-size: 13px; }
.support-grid p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; }

body.tool-page .legacy-guide { max-width: 1120px !important; }
body.tool-page .legacy-guide > * { display: none; }
body.tool-page .legacy-guide #faq { display: block; border: 1px solid var(--line) !important; border-radius: 6px !important; box-shadow: none !important; }
body.tool-page .legacy-guide #faq * { display: revert; }
body.tool-page .legacy-disclaimer { display: none; }
body.tool-page footer { border-color: var(--line) !important; background: #fff; }

/* Supporting pages */
body.info-page { background: #f7f5f6; }
body.info-page .site-header {
  min-height: 62px;
  padding: 10px max(18px, calc((100vw - 1120px) / 2));
  border-bottom: 1px solid var(--line);
  background: #fff;
}
body.info-page .site-header a { color: var(--ink); font-weight: 800; }
body.info-page .content { max-width: 760px; margin: 42px auto; padding: 0 18px 60px; }
body.info-page .panel { border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
body.info-page h1,
body.info-page h2 { color: var(--ink); }
body.info-page p,
body.info-page li { color: var(--muted); }
body.info-page .twitter-btn { border-radius: 6px; }
body.info-page .note,
body.info-page .category-tag { border-radius: 5px; }
body.info-page footer { border-top: 1px solid var(--line); background: #fff; }

@media (max-width: 760px) {
  .shell-header { min-height: 58px; }
  .shell-nav a:not(:last-child) { display: none; }
  .home-hero { display: flex; height: auto; min-height: auto; flex-direction: column; }
  .home-copy { padding: 54px 22px 44px; }
  .home-copy h1 { font-size: 38px; }
  .hero-actions { display: grid; grid-template-columns: 1fr; width: 100%; }
  .hero-actions a { width: 100%; }
  .home-visual { min-height: 410px; }
  .tool-intro { grid-template-columns: 1fr; gap: 32px; }
  .tool-demo { order: 2; padding: 18px; }
  .home-section { padding: 62px 22px; }
  .site-footer { align-items: flex-start; flex-direction: column; }

  .tool-heading { align-items: flex-start; flex-direction: column; padding-top: 24px; }
  body.tool-page .main { grid-template-columns: 1fr; padding-inline: 12px; }
  body.tool-page .main > *,
  body.tool-page .preview-col,
  body.tool-page .panel { min-width: 0; max-width: 100%; }
  body.tool-page .panel-head { flex-wrap: wrap; gap: 10px; }
  body.tool-page .panel-actions { max-width: 100%; }
  body.tool-page .expert-toggle { white-space: normal; }
  body.tool-page .error-msg { overflow-wrap: anywhere; }
  body.tool-page .preview-col { order: 1; }
  body.tool-page .main > div:first-child { order: 2; }
  body.tool-page .main > div:first-child .panel:last-child { position: static; }
  body.tool-page .drop-zone { min-height: 310px; }
  body.tool-page .canvas-wrap { min-height: 300px; }
  .quick-guide { padding-inline: 12px; }
  .quick-guide img { min-width: 720px; }
  .quick-guide details > div { overflow-x: auto; }
  .support-grid { grid-template-columns: 1fr; padding-inline: 12px; }
  body.tool-page .legacy-guide { padding-inline: 12px !important; }
  body.info-page .content { margin-top: 24px; }
}

@media (max-width: 390px) {
  .home-copy h1 { font-size: 34px; }
  .home-copy { padding-inline: 18px; }
  .trust-row { gap: 10px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
