/* self-hosted จาก Google Fonts (OFL) · thai + latin */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(/assets/fonts/JetBrainsMono-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/NotoSansThai-400-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 400;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/NotoSansThai-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/NotoSansThai-400-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 600;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/NotoSansThai-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/NotoSansThai-400-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Noto Sans Thai';
  font-style: normal;
  font-weight: 700;
  font-stretch: 100%;
  font-display: swap;
  src: url(/assets/fonts/NotoSansThai-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/Prompt-600-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(/assets/fonts/Prompt-600-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/Prompt-700-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url(/assets/fonts/Prompt-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/Prompt-800-thai.woff2) format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url(/assets/fonts/Prompt-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* AIDailyTH web · design system
   ลายเส้นเดียวกับปก: blueprint grid + ฟ้าไล่เฉด + amber เน้นคำ + การ์ดขาวเงานุ่ม + สติกเกอร์ขอบดำ */

:root {
  --paper: #e9edf2;
  --grid: rgba(40, 70, 120, .07);
  --ink: #0f1c33;
  --ink-2: #3b4a63;
  --ink-3: #56647c;
  --line: #d3dbe6;
  --card: #ffffff;
  --sky: #9cc8ff;
  --blue: #3b7bf0;
  --blue-deep: #2156d6;
  --navy: #10204a;
  --amber: #ffd24a;
  --amber-deep: #f2b100;
  --red: #d0281c;
  --green: #19b36b;
  --claude: #d97757;
  --radius: 22px;
  --shadow: 0 18px 40px -18px rgba(16, 32, 74, .35), 0 2px 6px rgba(16, 32, 74, .06);
  --shadow-sm: 0 6px 16px -8px rgba(16, 32, 74, .3);
  --sticker: 3px solid var(--ink);
  --sticker-shadow: 4px 4px 0 var(--ink);
  --font-head: "Prompt", "Noto Sans Thai", system-ui, sans-serif;
  --font-body: "Noto Sans Thai", "Prompt", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --max: 1160px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-deep); }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.25; margin: 0; letter-spacing: -.01em; }
.hl { color: var(--amber); }
.hl-blue { color: var(--blue); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- header ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(233, 237, 242, .82);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(16, 32, 74, .08);
}
.site-head .wrap { display: flex; align-items: center; gap: 20px; height: 68px; }
.brand {
  font-family: var(--font-head); font-weight: 800; font-size: 18px;
  text-decoration: none; color: var(--ink);
  background: #fff; border: var(--sticker); border-radius: 999px;
  padding: 4px 16px; box-shadow: 3px 3px 0 var(--ink);
}
.brand span { color: var(--red); }
.nav { display: flex; gap: 6px; margin-left: auto; }
.nav a {
  font-family: var(--font-head); font-weight: 600; font-size: 15px;
  color: var(--ink-2); text-decoration: none; padding: 8px 14px; border-radius: 999px;
}
.nav a:hover, .nav a[aria-current] { background: #fff; color: var(--ink); }
.nav .fb { background: var(--blue-deep); color: #fff; }
.nav .fb:hover { background: var(--navy); color: #fff; }
@media (max-width: 720px) { .nav a:not(.fb) { display: none; } }

/* ---------- chips / pills / stickers ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-head); font-weight: 600; font-size: 14px;
  background: #fff; color: var(--ink-2);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  white-space: nowrap;
}
.chip img { width: 16px; height: 16px; }
.chip.amber { background: var(--amber); border-color: var(--amber-deep); color: var(--ink); }
.chip.green { background: #dcf7ea; border-color: #9fe2c2; color: #0b6b40; }
.chip.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.eyebrow {
  font-family: var(--font-head); font-weight: 700; font-size: 14px;
  letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.sticker {
  display: inline-block; font-family: var(--font-head); font-weight: 800;
  background: var(--amber); color: var(--ink);
  border: var(--sticker); border-radius: 14px; box-shadow: var(--sticker-shadow);
  padding: 6px 14px; transform: rotate(-3deg);
}
.sticker.red { background: var(--red); color: #fff; }
.sticker.white { background: #fff; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  border: var(--sticker); border-radius: 14px; box-shadow: var(--sticker-shadow);
  padding: 12px 22px; cursor: pointer; text-decoration: none;
  background: var(--amber); color: var(--ink);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(3px, 3px); box-shadow: 1px 1px 0 var(--ink); }
.btn.ghost { background: #fff; }
.btn.blue { background: var(--blue-deep); color: #fff; }
.btn.sm { font-size: 14px; padding: 7px 14px; border-width: 2px; box-shadow: 3px 3px 0 var(--ink); border-radius: 10px; }
.btn:focus-visible, .copy:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

/* ---------- hero (หน้าแรก) ---------- */
.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.hero h1 { font-size: clamp(40px, 6.4vw, 76px); font-weight: 800; margin: 18px 0 14px; }
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero p.lead { font-size: 19px; color: var(--ink-2); max-width: 620px; margin: 0 0 26px; }
.hero .ghost-word {
  position: absolute; right: -20px; top: 20px; z-index: -1;
  font-family: var(--font-head); font-weight: 800; font-size: clamp(120px, 20vw, 260px);
  color: rgba(59, 123, 240, .07); line-height: 1; pointer-events: none;
}
.how-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 36px; max-width: 860px; }
.how-strip div {
  background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm);
  font-size: 15px; color: var(--ink-2); line-height: 1.5;
}
.how-strip b { display: block; font-family: var(--font-head); color: var(--ink); font-size: 16px; }
.how-strip i { font-style: normal; color: var(--blue); font-family: var(--font-head); font-weight: 800; margin-right: 4px; }
@media (max-width: 720px) { .how-strip { grid-template-columns: 1fr; } }

/* ---------- tool list ---------- */
.list-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 26px 0 18px; }
.list-head h2 { font-size: 30px; font-weight: 800; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  font-family: var(--font-head); font-weight: 600; font-size: 14px; cursor: pointer;
  background: #fff; color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.search {
  width: 100%; max-width: 360px; font: inherit; font-size: 16px;
  padding: 11px 16px 11px 42px; border-radius: 14px; border: 2px solid var(--line); background: #fff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%236a7890' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='6'/%3E%3Cpath d='m14 14 4 4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 14px center;
}
.search:focus { outline: none; border-color: var(--blue); }

.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; padding-bottom: 60px; }
.tool-card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; text-decoration: none; color: inherit; display: flex; flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.tool-card:hover { transform: translateY(-4px); box-shadow: 0 26px 50px -20px rgba(16, 32, 74, .45); }
.tool-card .thumb { aspect-ratio: 4 / 3; overflow: hidden; background: var(--sky); position: relative; }
.tool-card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.tool-card .thumb .sticker { position: absolute; bottom: 14px; right: 14px; font-size: 14px; }
.tool-card .body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tool-card h3 { font-size: 21px; font-weight: 700; }
.tool-card p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.6; }
.tool-card .meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; padding-top: 6px; }
.tool-card.soon { background: rgba(255, 255, 255, .55); box-shadow: none; border: 2px dashed var(--line); pointer-events: none; }
.tool-card.soon .body { display: none; }
.tool-card.soon .thumb { aspect-ratio: auto; height: 100%; min-height: 220px; background: repeating-linear-gradient(45deg, #dde5f0 0 12px, #e7edf5 12px 24px); display: grid; place-items: center; }
.tool-card.soon .thumb span { font-family: var(--font-head); font-weight: 700; color: var(--ink-3); }
.empty { display: none; text-align: center; color: var(--ink-3); padding: 40px 0 80px; }

/* ---------- guide hero (หน้าเครื่องมือ) ---------- */
.g-hero { padding: 40px 0 0; }
.crumbs { font-size: 14px; color: var(--ink-3); font-family: var(--font-head); }
.crumbs a { color: var(--ink-3); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.g-hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: center; margin-top: 18px; }
.g-hero h1 { font-size: clamp(34px, 5vw, 58px); font-weight: 800; margin: 14px 0; }
.g-hero .lead { font-size: 18px; color: var(--ink-2); margin: 0 0 20px; }
.g-hero .chips { display: flex; gap: 8px; flex-wrap: wrap; }
.g-hero .visual { position: relative; }
.g-hero .visual img { border-radius: var(--radius); box-shadow: var(--shadow); border: 8px solid #fff; transform: rotate(2deg); }
.g-hero .visual .sticker { position: absolute; right: -14px; bottom: -22px; font-size: 17px; transform: rotate(-4deg); }
@media (max-width: 860px) {
  .g-hero-grid { grid-template-columns: 1fr; }
  .g-hero .visual { max-width: 300px; margin: 0 auto; }
}

/* แถบฟ้าไล่เฉด (ไม่มีขอบแข็ง) */
.blue-band {
  margin-top: 46px; padding: 60px 0 70px;
  background: linear-gradient(180deg, rgba(120, 175, 255, 0) 0%, rgba(120, 175, 255, .55) 14%, #6aa2ff 42%, #3b7bf0 100%);
}

/* ---------- warning + route choice ---------- */
.warn {
  background: #fff8e0; border: var(--sticker); border-radius: var(--radius); box-shadow: 6px 6px 0 var(--ink);
  padding: 26px 28px; position: relative; max-width: 860px; margin: 0 auto;
}
.warn .sticker { position: absolute; top: -20px; left: 22px; font-size: 16px; }
.warn h2 { font-size: 24px; font-weight: 800; margin: 8px 0 8px; }
.warn p { margin: 0 0 10px; color: var(--ink-2); }
.warn ul { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); }
.ack { display: flex; gap: 12px; align-items: center; font-family: var(--font-head); font-weight: 600; cursor: pointer; user-select: none; }
.ack input { width: 24px; height: 24px; accent-color: var(--ink); cursor: pointer; }

.routes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 860px; margin: 34px auto 0; }
.route {
  text-align: left; font: inherit; color: inherit; cursor: pointer;
  background: #fff; border: 3px solid transparent; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 22px 22px 20px; display: flex; flex-direction: column; gap: 8px; position: relative;
  transition: transform .15s, border-color .15s;
}
.route:hover:not([aria-disabled="true"]) { transform: translateY(-3px); }
.route[aria-pressed="true"] { border-color: var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.route[aria-disabled="true"] { opacity: .62; cursor: not-allowed; }
.route[aria-disabled="true"]:hover { transform: none; }
.route .tag { font-family: var(--font-head); font-weight: 700; font-size: 13px; color: var(--ink-3); letter-spacing: .08em; }
.route h3 { font-size: 22px; font-weight: 800; }
.route p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.6; }
.route .check {
  position: absolute; top: 16px; right: 16px; width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid var(--line); display: grid; place-items: center; color: transparent; font-weight: 800;
}
.route[aria-pressed="true"] .check { background: var(--ink); border-color: var(--ink); color: var(--amber); }
.route .lock { font-size: 13px; color: #b3261e; font-family: var(--font-head); font-weight: 600; }
.route:not([aria-disabled="true"]) .lock { display: none; }
.band-note { text-align: center; color: #fff; font-family: var(--font-head); font-weight: 600; margin: 26px 0 0; opacity: .95; }
@media (max-width: 720px) { .routes { grid-template-columns: 1fr; } .warn { padding: 24px 20px; } }

/* ---------- layout: sidebar + steps ---------- */
.guide { display: grid; grid-template-columns: 260px 1fr; gap: 44px; padding: 56px 0 40px; align-items: start; }
.toc {
  position: sticky; top: 92px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
  padding: 20px 18px;
}
.toc .toc-title { font-size: 14px; letter-spacing: .1em; color: var(--ink-3); font-weight: 700; margin-bottom: 10px; }
.progress { height: 10px; border-radius: 99px; background: #e5ebf3; overflow: hidden; margin-bottom: 6px; }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue), var(--amber)); border-radius: 99px; transition: width .4s; }
.progress-txt { font-family: var(--font-head); font-size: 13px; color: var(--ink-3); margin-bottom: 14px; }
.toc ol { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc a {
  display: flex; gap: 10px; align-items: center; text-decoration: none; color: var(--ink-2);
  font-size: 14.5px; line-height: 1.35; padding: 7px 8px; border-radius: 10px;
}
.toc a:hover { background: var(--paper); }
.toc a.active { background: #eaf2ff; color: var(--ink); font-weight: 600; }
.toc a .n {
  flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 700; font-size: 12px; background: var(--paper); color: var(--ink-2);
}
.toc a.done .n { background: var(--green); color: #fff; }
.toc a.done .n::after { content: "✓"; }
.toc a.done .n b { display: none; }
.toc .part { font-family: var(--font-head); font-size: 12px; font-weight: 700; color: var(--ink-3); letter-spacing: .08em; margin: 12px 8px 4px; }
.toc a.hidden, .toc .part.hidden { display: none; }

.part-head { margin: 10px 0 22px; }
.part-head .eyebrow { margin-bottom: 8px; }
.part-head h2 { font-size: clamp(28px, 3.4vw, 38px); font-weight: 800; }
.part-head p { color: var(--ink-2); margin: 8px 0 0; max-width: 680px; }
.part { margin-bottom: 64px; }
.part.skipped, [data-only].skipped { display: none; }

/* ---------- step card ---------- */
.step {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px; margin-bottom: 20px; position: relative;
  border: 3px solid transparent; transition: border-color .2s, opacity .2s;
}
.step.current { border-color: var(--blue); }
.step-top { display: flex; gap: 16px; align-items: flex-start; }
.step-num {
  flex: none; width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center;
  font-family: var(--font-head); font-weight: 800; font-size: 22px;
  background: var(--amber); border: var(--sticker); box-shadow: 3px 3px 0 var(--ink);
}
.step h3 { font-size: 22px; font-weight: 700; padding-top: 8px; }
.step .step-body { margin-top: 14px; color: var(--ink-2); }
.step .step-body p { margin: 0 0 12px; }
.step .step-body ul, .step .step-body ol { margin: 0 0 12px; padding-left: 22px; }
.step .step-body li { margin-bottom: 4px; }
.step .step-body b { color: var(--ink); }
.step-foot { display: flex; justify-content: flex-end; margin-top: 18px; }
.done-btn {
  font-family: var(--font-head); font-weight: 700; font-size: 15px; cursor: pointer;
  background: #fff; color: var(--ink); border: 2px solid var(--line); border-radius: 12px; padding: 9px 16px;
  display: inline-flex; align-items: center; gap: 8px;
}
.done-btn:hover { border-color: var(--ink); }
.done-btn .box { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--ink-3); display: grid; place-items: center; font-size: 13px; color: transparent; }
.step.done { opacity: .72; }
.step.done .step-num { background: var(--green); color: #fff; }
.step.done .done-btn { background: #dcf7ea; border-color: var(--green); color: #0b6b40; }
.step.done .done-btn .box { background: var(--green); border-color: var(--green); color: #fff; }
@media (max-width: 720px) { .step { padding: 22px 18px; } .step-num { width: 42px; height: 42px; font-size: 19px; } .step h3 { font-size: 19px; padding-top: 5px; } }

/* callouts */
.note { border-radius: 14px; padding: 12px 16px; margin: 12px 0; font-size: 15.5px; line-height: 1.6; background: #eef4ff; color: var(--ink-2); border-left: 5px solid var(--blue); }
.note.warn-s { background: #fff6dc; border-left-color: var(--amber-deep); }
.note.bad { background: #ffeceb; border-left-color: var(--red); }
.note b { color: var(--ink); }

/* ---------- code block + copy ---------- */
.code {
  position: relative; margin: 14px 0; border-radius: 16px; overflow: hidden;
  background: #0f1c33; color: #dfe8ff; box-shadow: var(--shadow-sm);
}
.code-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px 10px 8px 16px; background: #182a4d; font-family: var(--font-head); font-size: 13px; color: #9fb3d9;
}
.code-bar .dots { display: flex; gap: 6px; margin-right: 8px; }
.code-bar .dots i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.code-bar .dots i:nth-child(2) { background: #febc2e; }
.code-bar .dots i:nth-child(3) { background: #28c840; }
.code-bar .label { display: flex; align-items: center; margin-right: auto; }
.code pre {
  margin: 0; padding: 16px 18px; font-family: var(--font-mono); font-size: 14px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}
.code.clamp pre { max-height: 230px; overflow: hidden; }
.code.clamp::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, rgba(15, 28, 51, 0), #0f1c33 80%); pointer-events: none;
}
.code .expand {
  position: absolute; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 2;
  font-family: var(--font-head); font-weight: 600; font-size: 14px; cursor: pointer;
  background: #fff; color: var(--ink); border: 0; border-radius: 999px; padding: 6px 16px;
}
.code:not(.clamp) .expand { display: none; }
.copy {
  font-family: var(--font-head); font-weight: 700; font-size: 14px; cursor: pointer;
  background: var(--amber); color: var(--ink); border: 0; border-radius: 10px; padding: 6px 14px;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s;
}
.copy:hover { background: #ffe07a; }
.copy.ok { background: var(--green); color: #fff; }
.code.light { background: #f3f6fb; color: var(--ink); box-shadow: none; border: 1px solid var(--line); }
.code.light .code-bar { background: transparent; padding: 0; position: absolute; top: 8px; right: 8px; }
.code.light pre { padding-right: 96px; font-size: 14.5px; }
code.inline { font-family: var(--font-mono); font-size: .88em; background: #eef2f8; padding: 2px 7px; border-radius: 6px; color: var(--ink); }

/* ---------- prompt gallery ---------- */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 22px; }
.p-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.p-card .img { position: relative; aspect-ratio: 4 / 5; background: #dfe7f2; cursor: zoom-in; overflow: hidden; }
.p-card .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.p-card .img:hover img { transform: scale(1.03); }
.p-card .img .num {
  position: absolute; top: 12px; left: 12px; width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; font-family: var(--font-head); font-weight: 800;
  background: var(--amber); border: 2px solid var(--ink); box-shadow: 2px 2px 0 var(--ink);
}
.p-card .img .tested { position: absolute; bottom: 12px; left: 12px; }
.p-card .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.p-card h3 { font-size: 18px; font-weight: 700; }
.p-card .use { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; margin: 0; }
.p-card .code { margin: 2px 0; }
.p-card .code pre { font-size: 13px; padding: 12px 14px; }
.p-card .edit { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--ink-3); font-family: var(--font-head); }
.p-card .edit .chip { font-size: 12.5px; padding: 2px 10px; }
.p-card .note { font-size: 13.5px; margin: 0; padding: 8px 12px; }
.p-card .spec { font-size: 12.5px; color: var(--ink-3); font-family: var(--font-head); margin-top: auto; }

/* video prompt rows */
.v-list { display: grid; gap: 12px; }
.v-row { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; background: #fff; border-radius: 16px; padding: 14px 16px; box-shadow: var(--shadow-sm); }
.v-row .n { width: 44px; height: 44px; border-radius: 12px; background: var(--paper); display: grid; place-items: center; font-family: var(--font-head); font-weight: 800; color: var(--blue-deep); }
.v-row h3 { font-size: 16px; font-weight: 700; margin-bottom: 2px; }
.v-row p { margin: 0 0 6px; font-size: 14px; color: var(--ink-3); line-height: 1.5; }
.v-row .code { margin: 4px 0 0; }

.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 16px; }
.flow span { font-family: var(--font-head); font-weight: 700; font-size: 14px; background: #fff; border: 2px solid var(--ink); border-radius: 10px; padding: 5px 12px; }
.flow i { font-style: normal; color: var(--ink-3); font-weight: 800; }

/* tips */
.tips { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tip { background: #fff; border-radius: 18px; padding: 20px; box-shadow: var(--shadow-sm); }
.tip .n { font-family: var(--font-head); font-weight: 800; font-size: 34px; color: var(--blue-deep); line-height: 1; }
.tip h3 { font-size: 17px; font-weight: 700; margin: 8px 0 6px; }
.tip p { margin: 0; font-size: 15px; color: var(--ink-2); line-height: 1.6; }

/* troubleshoot */
details.faq { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); margin-bottom: 10px; }
details.faq summary {
  cursor: pointer; list-style: none; padding: 16px 20px; font-family: var(--font-head); font-weight: 600;
  display: flex; justify-content: space-between; gap: 12px;
}
details.faq summary::-webkit-details-marker { display: none; }
details.faq summary::after { content: "+"; font-size: 22px; line-height: 1; color: var(--blue); }
details.faq[open] summary::after { content: "−"; }
details.faq .a { padding: 0 20px 18px; color: var(--ink-2); font-size: 15.5px; }

/* finish */
.finish {
  text-align: center; border-radius: 28px; padding: 50px 24px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(160deg, #6aa2ff, #2156d6);
  box-shadow: var(--shadow);
}
.finish h2 { font-size: clamp(30px, 4vw, 44px); font-weight: 800; }
.finish p { max-width: 540px; margin: 10px auto 22px; opacity: .95; }
.finish .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.finish .ghost-word {
  position: absolute; inset: auto 0 -40px 0; font-family: var(--font-head); font-weight: 800;
  font-size: 180px; color: rgba(255, 255, 255, .08); line-height: 1; pointer-events: none;
}

/* ---------- mobile bottom bar ---------- */
.mbar { display: none; }
@media (max-width: 960px) {
  .guide { grid-template-columns: 1fr; padding-top: 40px; }
  .toc { display: none; }
  .mbar {
    display: flex; position: fixed; left: 12px; right: 12px; bottom: 12px; z-index: 60;
    background: var(--ink); color: #fff; border-radius: 18px; padding: 10px 10px 10px 16px;
    align-items: center; gap: 12px; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5);
  }
  .mbar .t { flex: 1; min-width: 0; }
  .mbar .t small { display: block; font-family: var(--font-head); font-size: 12px; color: #9fb3d9; }
  .mbar .t b { display: block; font-family: var(--font-head); font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar .progress { height: 5px; background: rgba(255, 255, 255, .15); margin: 4px 0 0; }
  .mbar .btn { padding: 9px 14px; font-size: 14px; border-width: 2px; box-shadow: none; border-color: var(--amber); }
  body.has-mbar { padding-bottom: 90px; }
}

/* lightbox */
.lb { position: fixed; inset: 0; z-index: 100; background: rgba(10, 18, 35, .88); display: none; place-items: center; padding: 24px; cursor: zoom-out; }
.lb.open { display: grid; }
.lb img { max-height: 90vh; width: auto; border-radius: 16px; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); }

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 110px; transform: translate(-50%, 20px); z-index: 120;
  background: var(--ink); color: #fff; font-family: var(--font-head); font-weight: 600; font-size: 15px;
  padding: 10px 18px; border-radius: 999px; opacity: 0; transition: opacity .2s, transform .2s; pointer-events: none;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
@media (min-width: 961px) { .toast { bottom: 32px; } }

/* footer */
.site-foot { border-top: 1px solid rgba(16, 32, 74, .1); padding: 34px 0 44px; color: var(--ink-3); font-size: 14px; }
.site-foot .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.site-foot a { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}

/* ปากกาไฮไลต์ amber (ใช้บนพื้นสว่าง แทนตัวอักษรสีเหลือง) */
.mark { background: linear-gradient(transparent 58%, var(--amber) 58%, var(--amber) 92%, transparent 92%); padding: 0 .08em; }
.cmd-table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 12px; }
.cmd-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.cmd-table td:first-child { white-space: nowrap; }
@media (max-width: 600px) { .cmd-table td:first-child { white-space: normal; } }

/* หน้าแรก: กองภาพผลงานจริงด้านขวา (สไตล์สติกเกอร์) */
.hero .wrap { position: relative; }
.hero-stack { position: absolute; right: 20px; top: 10px; width: 420px; height: 440px; }
.hero-stack img {
  position: absolute; width: 200px; border-radius: 16px; border: 6px solid #fff; box-shadow: var(--shadow);
}
.hero-stack img:nth-child(1) { left: 0; top: 60px; transform: rotate(-7deg); }
.hero-stack img:nth-child(2) { left: 120px; top: 0; transform: rotate(3deg); z-index: 2; }
.hero-stack img:nth-child(3) { left: 220px; top: 120px; transform: rotate(9deg); }
.hero-stack .sticker { position: absolute; left: 10px; bottom: 60px; z-index: 3; font-size: 16px; }
@media (max-width: 1080px) { .hero-stack { display: none; } }

/* ---------- a11y / ส่วนเสริม ---------- */
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-family: var(--font-head); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.warn.shake { animation: shake .45s; }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.chip img.wide { width: 22px; }
.soon-sub { color: var(--ink-3); }
.filters.mb { margin-bottom: 22px; }
.p-card .img .link {
  position: absolute; top: 10px; right: 10px; width: 44px; height: 44px; border-radius: 12px; border: 0; cursor: pointer;
  background: rgba(255, 255, 255, .92); display: grid; place-items: center; font-size: 16px; color: var(--ink);
}
.p-card:target { outline: 4px solid var(--amber); outline-offset: 4px; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.step-body .spaced { margin-top: 16px; }
.fix-wrap { margin: 44px 0 0; }
.fix-wrap h2 { font-size: 28px; }
.finish .sticker { font-size: 15px; }
.finish h2 { margin-top: 16px; }
.site-foot nav { display: flex; gap: 18px; flex-wrap: wrap; }

/* แถบยินยอมคุกกี้ */
.consent {
  position: fixed; left: 16px; right: 16px; bottom: 16px; z-index: 110; max-width: 520px; margin: 0 auto;
  background: #fff; border: var(--sticker); border-radius: 18px; box-shadow: 6px 6px 0 var(--ink);
  padding: 16px 18px; font-size: 15px; line-height: 1.55;
}
.consent p { margin: 0 0 12px; color: var(--ink-2); }
.consent-row { display: flex; gap: 10px; justify-content: flex-end; }
body.has-mbar .consent { bottom: 96px; }
@media (min-width: 961px) { body.has-mbar .consent { bottom: 16px; } }

/* หน้าเนื้อหาทั่วไป (privacy) */
.prose { max-width: 760px; margin: 0 auto; padding: 48px 20px 80px; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); font-weight: 800; margin-bottom: 8px; }
.prose h2 { font-size: 22px; font-weight: 700; margin: 34px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.prose .card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 8px 26px 20px; }
.nf { min-height: 72vh; display: grid; place-items: center; text-align: center; }
.nf h1 { font-size: 44px; margin: 20px 0 10px; }
.nf p { color: var(--ink-2); }
