:root {
  --ink: #18211d;
  --muted: #65706a;
  --cream: #fff8ea;
  --paper: #fffdf8;
  --pink: #ff6f91;
  --pink-dark: #d83e67;
  --mint: #96e6c5;
  --mint-dark: #25795d;
  --yellow: #ffd764;
  --lavender: #cab9ff;
  --blue: #99d7ff;
  --line: #26332c;
  --shadow: 5px 6px 0 rgba(38, 51, 44, .16);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--cream);
  font-family: ui-rounded, "Arial Rounded MT Bold", "Trebuchet MS", Arial, sans-serif;
  line-height: 1.65;
  overflow-x: hidden;
}
button, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; padding: .65rem 1rem; background: var(--ink); color: white; border-radius: 99px; }
.skip-link:focus { top: 1rem; }

.site-header {
  width: min(1160px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; font-weight: 900; letter-spacing: -.02em; }
.brand-mark { display: inline-grid; place-items: center; width: 42px; height: 42px; color: var(--ink); background: var(--yellow); border: 2px solid var(--line); border-radius: 12px 16px 11px 15px; box-shadow: 3px 3px 0 var(--ink); transform: rotate(-2deg); font-weight: 900; }
nav { display: flex; gap: 1.4rem; font-size: .9rem; font-weight: 800; }
nav a { text-decoration: none; border-bottom: 2px solid transparent; }
nav a:hover, nav a:focus-visible { border-color: var(--pink); }

main { width: min(1160px, calc(100% - 2rem)); margin: 0 auto; }
.hero { position: relative; display: grid; grid-template-columns: 1.3fr .7fr; align-items: center; gap: 3rem; padding: 5.3rem 0 4.4rem; }
.hero::before { content: ""; position: absolute; width: 180px; height: 180px; right: 30%; top: 16%; background: var(--mint); border-radius: 49% 51% 63% 37% / 54% 32% 68% 46%; opacity: .55; z-index: -1; }
.eyebrow, .section-kicker { margin: 0 0 .65rem; color: var(--pink-dark); font-size: .78rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 { max-width: 760px; margin: 0; font-size: clamp(3.15rem, 8vw, 6.8rem); line-height: .92; letter-spacing: -.075em; }
.hero-lead { max-width: 660px; margin: 1.35rem 0 1.5rem; font-size: clamp(1.05rem, 2vw, 1.3rem); color: #3f4b45; }
.hero-notes { display: flex; flex-wrap: wrap; gap: .55rem; }
.hero-notes span { padding: .38rem .8rem; border: 1.5px solid var(--line); border-radius: 99px; background: var(--paper); font-size: .78rem; font-weight: 800; }
.name-tag { position: relative; min-height: 230px; padding: 3.2rem 1.5rem 2rem; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--pink); border: 3px solid var(--line); border-radius: 30px 23px 32px 27px; box-shadow: 9px 11px 0 var(--ink); transform: rotate(4deg); text-align: center; }
.tag-hole { position: absolute; top: 15px; width: 54px; height: 17px; background: var(--cream); border: 2px solid var(--line); border-radius: 99px; }
.tag-kicker { color: white; font-size: .76rem; font-weight: 900; letter-spacing: .14em; }
.name-tag strong { width: 100%; margin: .6rem 0; padding: .65rem .4rem; background: white; border: 2px solid var(--line); border-radius: 13px; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1.1; }
.tag-spark { font-size: 1.1rem; font-weight: 900; }

.generator-shell { position: relative; padding: clamp(1.2rem, 4vw, 2.4rem); background: var(--paper); border: 2px solid var(--line); border-radius: 30px; box-shadow: 9px 10px 0 var(--ink); }
.tool-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: 1.2rem; }
h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.05; letter-spacing: -.045em; }
h3 { line-height: 1.2; }
.clear-button, .show-more { min-height: 44px; padding: .6rem 1rem; border: 2px solid var(--line); border-radius: 12px; background: var(--yellow); box-shadow: 3px 3px 0 var(--ink); font-weight: 900; cursor: pointer; }
.clear-button:active, .show-more:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.input-label { display: block; margin-bottom: .45rem; font-size: .85rem; font-weight: 900; }
.input-wrap { position: relative; }
textarea { display: block; width: 100%; min-height: 112px; resize: vertical; padding: 1.15rem 1.2rem 2rem; color: var(--ink); background: #fff; border: 2px solid var(--line); border-radius: 17px; outline: 0; font-size: clamp(1.15rem, 3vw, 1.55rem); box-shadow: inset 0 -4px 0 #f3e9d5; }
textarea:focus { border-color: var(--pink-dark); box-shadow: 0 0 0 4px rgba(255,111,145,.18); }
#charCount { position: absolute; right: .85rem; bottom: .55rem; color: var(--muted); font-size: .73rem; font-weight: 800; }
.paste-tip { margin: .7rem 0 1.35rem; color: var(--muted); font-size: .86rem; }
.paste-tip span { color: var(--pink-dark); font-weight: 900; }
.tabs { display: flex; gap: .55rem; padding-bottom: .6rem; overflow-x: auto; scrollbar-width: thin; }
.tabs button { flex: 0 0 auto; min-height: 42px; padding: .55rem .9rem; border: 1.5px solid var(--line); border-radius: 99px; background: transparent; font-weight: 900; cursor: pointer; }
.tabs button span { margin-left: .25rem; color: var(--muted); font-size: .72rem; }
.tabs button[aria-selected="true"] { background: var(--ink); color: white; }
.tabs button[aria-selected="true"] span { color: var(--yellow); }
.example-note { margin: .25rem 0 1rem; color: var(--muted); font-size: .8rem; }
.style-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; }
.style-card { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label button" "text button"; align-items: center; gap: .25rem 1rem; min-height: 104px; padding: 1rem; border: 1.5px solid #b8bdb9; border-radius: 17px; background: white; transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.style-card:hover { transform: translateY(-2px); border-color: var(--line); box-shadow: 3px 4px 0 rgba(38,51,44,.12); }
.style-name { grid-area: label; color: var(--muted); font-size: .72rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.style-result { grid-area: text; margin: 0; min-width: 0; overflow-wrap: anywhere; font-family: Arial, sans-serif; font-size: clamp(1.03rem, 2.4vw, 1.35rem); line-height: 1.35; }
.copy-button { grid-area: button; min-width: 74px; min-height: 42px; padding: .5rem .75rem; border: 1.5px solid var(--line); border-radius: 10px; background: var(--mint); font-size: .8rem; font-weight: 900; cursor: pointer; }
.copy-button:hover:not(:disabled) { background: var(--yellow); }
.copy-button:disabled { opacity: .48; cursor: not-allowed; }
.copy-button.copied { background: var(--ink); color: white; }
.show-more { display: block; margin: 1.25rem auto 0; }
.show-more[hidden] { display: none; }

.content-section { margin: 7rem auto; }
.section-intro { max-width: 780px; margin-bottom: 2rem; }
.section-intro > p:last-child, .reading > p { color: #46524c; }
.compatibility-grid { display: grid; grid-template-columns: 1.35fr 1fr .8fr; gap: 1rem; align-items: start; }
.compat-card { padding: 1.4rem; border: 2px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.compat-card.works { background: #dff8ed; }
.compat-card.maybe { background: #fff0b8; }
.compat-card.blocked { background: #ffdce5; }
.compat-card h3 { margin: 0 0 .1rem; font-size: 1.18rem; }
.compat-card h3 span { display: inline-grid; place-items: center; width: 28px; height: 28px; margin-right: .35rem; border: 1.5px solid var(--line); border-radius: 50%; background: white; }
.confidence { margin: 0 0 1rem; color: var(--muted); font-size: .76rem; font-weight: 800; }
.compat-card ul { display: flex; flex-wrap: wrap; gap: .42rem; margin: 0; padding: 0; list-style: none; }
.compat-card li { padding: .25rem .55rem; background: rgba(255,255,255,.75); border: 1px solid rgba(38,51,44,.4); border-radius: 7px; font-size: .73rem; font-weight: 800; }
.honest-note { margin: 1.4rem 0 0; padding: 1rem 1.15rem; border-left: 5px solid var(--pink); background: rgba(255,255,255,.55); border-radius: 0 12px 12px 0; font-size: .9rem; }
.honest-note [lang="zh"] { display: block; color: var(--muted); }
.reading { max-width: 840px; }
.reading h2 { margin-bottom: 1.4rem; }
.reading p { font-family: Arial, sans-serif; font-size: 1.04rem; }
.how-to ol { counter-reset: steps; display: grid; grid-template-columns: repeat(3, 1fr); gap: .8rem; padding: 0; list-style: none; }
.how-to li { counter-increment: steps; min-height: 170px; padding: 1.2rem; border: 1.5px solid var(--line); border-radius: 18px; background: white; }
.how-to li::before { content: counter(steps, decimal-leading-zero); display: block; margin-bottom: 1rem; color: var(--pink-dark); font-size: 1.65rem; font-weight: 900; line-height: 1; }
.how-to li strong, .how-to li span { display: block; }
.how-to li span { margin-top: .35rem; color: var(--muted); font-family: Arial, sans-serif; font-size: .92rem; }
.guide-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.guide-grid article { padding: 1.35rem; border-top: 5px solid var(--pink); background: white; border-radius: 0 0 18px 18px; }
.guide-grid article:nth-child(2) { border-color: #e9af18; }
.guide-grid article:nth-child(3) { border-color: var(--mint-dark); }
.guide-grid article:nth-child(4) { border-color: #7760c6; }
.guide-icon { display: grid; place-items: center; width: 44px; height: 44px; margin-bottom: 1rem; border: 1.5px solid var(--line); border-radius: 13px; background: var(--cream); font-weight: 900; }
.guide-grid h3 { margin: 0 0 .5rem; }
.guide-grid p { margin: 0; color: var(--muted); font-family: Arial, sans-serif; font-size: .9rem; }
.tips { max-width: 900px; padding: clamp(1.4rem, 4vw, 2.5rem); background: var(--lavender); border: 2px solid var(--line); border-radius: 28px; box-shadow: 8px 9px 0 var(--ink); }
.tips ul { margin: 1.5rem 0 0; padding-left: 1.35rem; }
.tips li { margin: .75rem 0; padding-left: .4rem; font-family: Arial, sans-serif; }
.faq-list { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
details { border: 1.5px solid var(--line); border-radius: 15px; background: white; overflow: hidden; }
summary { position: relative; padding: 1rem 3rem 1rem 1rem; font-weight: 900; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 1rem; top: .78rem; font-size: 1.4rem; }
details[open] summary::after { content: "−"; }
details p { margin: 0; padding: 0 1rem 1.15rem; color: var(--muted); font-family: Arial, sans-serif; font-size: .92rem; }

footer { width: min(1160px, calc(100% - 2rem)); margin: 7rem auto 2rem; padding: 2rem 0 0; display: grid; grid-template-columns: 1.1fr 2fr auto; gap: 2rem; align-items: start; border-top: 2px solid var(--line); color: var(--muted); font-family: Arial, sans-serif; font-size: .78rem; }
.footer-brand { display: flex; align-items: center; gap: .75rem; color: var(--ink); }
.footer-brand p { margin: 0; }
.toast { position: fixed; left: 50%; bottom: 1.5rem; z-index: 50; padding: .75rem 1rem; color: white; background: var(--ink); border: 2px solid white; border-radius: 12px; box-shadow: 4px 5px 0 var(--pink); font-weight: 900; opacity: 0; transform: translate(-50%, 30px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; padding-top: 3.5rem; }
  .name-tag { width: min(420px, 88%); justify-self: center; min-height: 200px; transform: rotate(2deg); }
  .compatibility-grid { grid-template-columns: 1fr; }
  .how-to ol { grid-template-columns: repeat(2, 1fr); }
  .guide-grid { grid-template-columns: repeat(2, 1fr); }
  footer { grid-template-columns: 1fr; gap: 1rem; }
}

@media (max-width: 640px) {
  .site-header { min-height: 66px; }
  .brand > span:last-child { display: none; }
  nav { gap: .8rem; font-size: .75rem; }
  nav a:nth-child(3) { display: none; }
  main { width: min(100% - 1.1rem, 1160px); }
  .hero { gap: 2.2rem; padding: 2.7rem .35rem 3.2rem; }
  h1 { font-size: clamp(3.2rem, 17vw, 5rem); }
  .hero-lead { font-size: 1rem; }
  .name-tag { width: 86%; min-height: 170px; }
  .generator-shell { padding: 1rem; border-radius: 22px; box-shadow: 5px 6px 0 var(--ink); }
  .tool-heading { align-items: flex-start; }
  .tool-heading h2 { font-size: 1.75rem; }
  .style-grid { grid-template-columns: 1fr; }
  .style-card { min-height: 96px; }
  .style-card:nth-child(n+13) { display: none; }
  .style-grid.expanded .style-card { display: grid; }
  .content-section { margin: 5rem auto; }
  .how-to ol, .guide-grid, .faq-list { grid-template-columns: 1fr; }
  .how-to li { min-height: auto; }
  .toast { width: max-content; max-width: calc(100% - 2rem); text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
