  :root {
    --paper:#fbf7f0; --card:#ffffff; --ink:#1f2a44; --muted:#6b7389; --line:#e8e1d5;
    --coral:#f0643c; --coral-dk:#d84f2a; --blue:#3a5bd9; --blue-bg:#eef2ff; --yellow:#ffd65a; --green:#2fa36b;
    --shadow:0 1px 2px rgba(31,42,68,.06), 0 8px 24px rgba(31,42,68,.08);
  }
  * { box-sizing:border-box; }
  html { -webkit-text-size-adjust:100%; }
  body { margin:0; font:16px/1.55 Nunito,system-ui,-apple-system,Segoe UI,Roboto,sans-serif; color:var(--ink); background:var(--paper); }
  a { color:var(--blue); }
  .wrap { max-width:1180px; margin:0 auto; padding:0 20px; }

  /* Nav */
  nav { display:flex; align-items:center; justify-content:space-between; padding:18px 0; }
  .logo { display:flex; align-items:center; gap:10px; font:600 20px Fredoka,Nunito,sans-serif; color:var(--ink); text-decoration:none; }
  .logo b { color:var(--coral); font-weight:600; }
  nav .links a { color:var(--muted); text-decoration:none; font-weight:700; margin-left:22px; font-size:15px; }
  nav .links a:hover { color:var(--ink); }

  /* Hero */
  .hero { text-align:center; padding:28px 0 30px; }
  .pill { display:inline-flex; gap:14px; flex-wrap:wrap; justify-content:center; font-size:14px; font-weight:700; color:var(--muted); margin-bottom:14px; }
  .pill span::before { content:"✓"; color:var(--green); margin-right:6px; }
  h1 { font:600 clamp(32px,5vw,50px)/1.1 Fredoka,Nunito,sans-serif; margin:0 0 12px; letter-spacing:-.5px; }
  h1 .hl { background:linear-gradient(transparent 62%, var(--yellow) 62%); padding:0 4px; }
  .hero p { font-size:19px; color:var(--muted); max-width:620px; margin:0 auto; }

  /* Tool */
  .tool { display:grid; grid-template-columns:minmax(0,430px) minmax(0,1fr); gap:24px; align-items:start; padding-bottom:56px; }
  .panel { background:var(--card); border:1px solid var(--line); border-radius:20px; box-shadow:var(--shadow); padding:22px; }
  .step + .step { border-top:1px dashed var(--line); margin-top:20px; padding-top:20px; }
  .step-h { display:flex; align-items:center; gap:10px; margin:0 0 12px; font:600 18px Fredoka,Nunito,sans-serif; }
  .num { width:28px; height:28px; border-radius:50%; background:var(--ink); color:#fff; display:grid; place-items:center; font-size:15px; flex:none; }
  textarea { width:100%; height:170px; padding:12px 14px; font:17px/1.5 Nunito,system-ui,sans-serif; color:var(--ink);
    border:2px solid var(--line); border-radius:14px; background:#fffdf9; resize:vertical; outline:none;
    background-image:repeating-linear-gradient(transparent 0 24.5px, #efe8dc 24.5px 25.5px); background-position:0 11px; line-height:25.5px; }
  textarea:focus, input[type=text]:focus { border-color:var(--blue); }
  .hint { display:flex; justify-content:space-between; gap:10px; font-size:13.5px; color:var(--muted); margin:6px 2px 0; }
  .hint b { color:var(--ink); white-space:nowrap; }

  .tiles { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
  .tile { position:relative; display:flex; gap:10px; align-items:center; padding:10px; border:2px solid var(--line); border-radius:14px; cursor:pointer; background:#fff; transition:border-color .15s, background .15s; }
  .tile:hover { border-color:#cfd6ea; }
  .tile input { position:absolute; opacity:0; pointer-events:none; }
  .tile svg { flex:none; width:40px; height:50px; }
  .tile .t { font-weight:800; font-size:14.5px; line-height:1.25; }
  .tile small { display:block; font-weight:600; color:var(--muted); font-size:12.5px; }
  .tile .tick { position:absolute; top:8px; right:8px; width:20px; height:20px; border-radius:6px; border:2px solid #cfd6ea; background:#fff; display:grid; place-items:center; color:#fff; font-size:13px; font-weight:800; }
  .tile:has(input:checked) { border-color:var(--blue); background:var(--blue-bg); }
  .tile:has(input:checked) .tick { background:var(--blue); border-color:var(--blue); }
  .tile:has(input:checked) .tick::after { content:"✓"; }
  .tile:has(input:focus-visible) { outline:3px solid #b9c6f5; }
  .tile.wide { grid-column:1 / -1; }

  .opts { display:grid; gap:14px; }
  .opt-label { font-size:13px; font-weight:800; color:var(--muted); text-transform:uppercase; letter-spacing:.6px; margin-bottom:6px; display:block; }
  input[type=text] { width:100%; padding:10px 14px; font:inherit; font-size:16px; color:var(--ink); border:2px solid var(--line); border-radius:12px; outline:none; }
  .seg { display:flex; background:#f3eee5; border-radius:12px; padding:4px; gap:4px; border:0; margin:0; }
  .seg label { flex:1; text-align:center; cursor:pointer; }
  .seg input { position:absolute; opacity:0; }
  .seg span { display:block; padding:8px 6px; border-radius:9px; font-weight:700; font-size:14px; color:var(--muted); line-height:1.2; }
  .seg span small { display:block; font-weight:600; font-size:11.5px; }
  .seg input:checked + span { background:#fff; color:var(--ink); box-shadow:0 1px 3px rgba(31,42,68,.15); }
  .seg input:focus-visible + span { outline:3px solid #b9c6f5; }

  button { font:inherit; border:0; cursor:pointer; }
  #download { width:100%; display:flex; align-items:center; justify-content:center; gap:10px; padding:16px; border-radius:14px;
    background:var(--coral); color:#fff; font:600 20px Fredoka,Nunito,sans-serif; box-shadow:0 4px 0 var(--coral-dk); transition:transform .08s, box-shadow .08s; }
  #download:hover { background:#f2724d; }
  #download:active { transform:translateY(3px); box-shadow:0 1px 0 var(--coral-dk); }
  .sub-actions { display:flex; justify-content:space-between; align-items:center; margin-top:12px; font-size:14px; }
  #shuffle { background:none; color:var(--blue); font-weight:800; padding:4px 0; }
  #status { color:var(--muted); font-weight:700; }

  .preview { position:sticky; top:16px; background:#e9e4da; border-radius:20px; padding:14px; box-shadow:inset 0 0 0 1px var(--line); }
  .preview-h { display:flex; justify-content:space-between; align-items:center; padding:2px 6px 12px; font-weight:800; font-size:14px; color:var(--muted); }
  .preview-h .dot { display:inline-block; width:8px; height:8px; background:var(--green); border-radius:50%; margin-right:8px; }
  #preview { display:block; width:100%; height:calc(100vh - 110px); min-height:560px; max-height:900px; border:0; border-radius:12px; background:#fff; }

  /* Info */
  .info { padding:8px 0 64px; }
  h2 { font:600 30px/1.2 Fredoka,Nunito,sans-serif; text-align:center; margin:0 0 26px; }
  .how { display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-bottom:64px; }
  .how div { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:22px; }
  .how .num { width:34px; height:34px; font-size:17px; background:var(--coral); margin-bottom:12px; }
  .how h3, .kinds h3 { margin:0 0 6px; font-size:18px; }
  .how p, .kinds p { margin:0; color:var(--muted); }
  .kinds { display:grid; grid-template-columns:repeat(auto-fit,minmax(200px,1fr)); gap:16px; margin-bottom:64px; }
  .kinds div { background:var(--card); border:1px solid var(--line); border-radius:18px; padding:20px; }
  .kinds svg { width:44px; height:55px; margin-bottom:10px; }
  .faq { max-width:760px; margin:0 auto; }
  details { background:var(--card); border:1px solid var(--line); border-radius:14px; padding:16px 20px; margin-bottom:10px; }
  summary { font-weight:800; cursor:pointer; font-size:17px; }
  details p { margin:10px 0 0; color:var(--muted); }
  footer { border-top:1px solid var(--line); padding:24px 0 36px; color:var(--muted); font-size:14px; text-align:center; }

  @media (max-width:900px) {
    .tool { grid-template-columns:1fr; }
    .preview { position:static; }
    #preview { height:75vh; min-height:440px; }
    .how { grid-template-columns:1fr; }
  }
  @media (max-width:420px) {
    .wrap { padding:0 16px; }
    .tiles { grid-template-columns:1fr; }
    nav .links { display:none; }
    .panel { padding:18px; }
  }

  /* Cross links */
  .more { padding:0 0 56px; }
  .more-links { display:grid; grid-template-columns:repeat(auto-fit,minmax(300px,1fr)); gap:16px; max-width:820px; margin:0 auto; }
  .more-links a { display:flex; gap:14px; align-items:center; background:var(--card); border:1px solid var(--line); border-radius:18px; padding:16px 18px; text-decoration:none; color:var(--muted); font-size:14.5px; }
  .more-links a:hover { border-color:var(--blue); }
  .more-links svg { width:40px; height:50px; flex:none; }
  .more-links b { display:block; color:var(--ink); font-size:16.5px; }
  @media (max-width:900px) { nav .links { display:none; } }
