:root {
  --ink: #172a2d;
  --ink-soft: #4e6263;
  --teal: #0b6865;
  --teal-dark: #0d3c3c;
  --mint: #d9eee7;
  --paper: #f7f8f5;
  --white: #fff;
  --line: #d9e2df;
  --shadow: 0 12px 32px rgba(19, 54, 52, .055);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Sarabun, Thonburi, Tahoma, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.62;
  overflow-wrap: break-word;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: var(--teal); }
a:hover { color: var(--teal-dark); }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, .table-scroll:focus-visible {
  outline: 3px solid #d99342;
  outline-offset: 3px;
}
.skip-link { position: absolute; left: 12px; top: -90px; z-index: 30; padding: 10px 14px; background: #fff; border-radius: 8px; }
.skip-link:focus { top: 12px; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 245, .94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.site-header__inner {
  max-width: 1180px;
  min-height: 62px;
  margin: auto;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--teal-dark); text-decoration: none; font-size: 14px; font-weight: 800; letter-spacing: .02em; }
.brand__mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--teal-dark); color: white; font-size: 19px; font-weight: 900; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.header-capture { display: inline-flex; align-items: center; min-height: 40px; padding: 7px 13px; border-radius: 999px; color: white; background: var(--teal); text-decoration: none; font-size: 13px; font-weight: 800; white-space: nowrap; }
.header-capture:hover { color: white; background: var(--teal-dark); }
.header-download { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--teal-dark); background: #fff; text-decoration: none; font-size: 13px; font-weight: 700; white-space: nowrap; }
.header-download:hover { border-color: var(--teal); background: #eef7f3; }

.page-shell { max-width: 1180px; padding: 0 24px 72px; margin: 0 auto; }
.intro { max-width: 850px; padding: 42px 0 34px; }
.eyebrow { display: flex; align-items: center; gap: 8px; color: var(--teal); font-size: 13px; font-weight: 800; }
.eyebrow__dot { width: 8px; height: 8px; border-radius: 50%; background: #58a484; box-shadow: 0 0 0 4px #dcefe4; }
.intro h1 { max-width: 780px; margin: 14px 0 12px; font-size: clamp(31px, 4.3vw, 53px); letter-spacing: -.035em; line-height: 1.2; color: #123535; }
.intro p { max-width: 680px; margin: 0; color: var(--ink-soft); font-size: 17px; }
.intro__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.intro__meta span { border: 1px solid #cfe1d8; background: #edf6ef; padding: 5px 10px; border-radius: 999px; color: #255d4f; font-size: 12px; font-weight: 800; }

.content-layout { display: grid; grid-template-columns: 236px minmax(0, 1fr); align-items: start; gap: 34px; }
.sidebar { align-self: stretch; }
.sidebar__inner { position: sticky; top: 84px; padding: 16px 0; }
.sidebar__label { margin: 0 0 12px 12px; color: #77908a; font-size: 12px; font-weight: 800; letter-spacing: .12em; }
.sidebar__nav { display: grid; gap: 3px; }
.sidebar__nav a { padding: 9px 12px; border-left: 3px solid transparent; border-radius: 0 8px 8px 0; color: #55706c; text-decoration: none; font-size: 13px; line-height: 1.35; }
.sidebar__nav a:hover, .sidebar__nav a.is-active { color: var(--teal-dark); background: #e6f0e9; border-left-color: var(--teal); }
.sidebar__note { margin: 22px 12px 0; padding-top: 16px; border-top: 1px solid var(--line); color: #758583; font-size: 12px; line-height: 1.5; }
.mobile-toc { display: none; }

.article { min-width: 0; }
.guide-section { scroll-margin-top: 84px; padding: 28px 32px 30px; margin-bottom: 18px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.guide-section > h2 { margin: 0 0 15px; color: #123535; font-size: 26px; line-height: 1.25; letter-spacing: -.02em; }
.guide-section h3 { margin: 22px 0 9px; color: #194e4a; font-size: 18px; line-height: 1.3; }
.guide-section p { margin: 0 0 12px; }
.guide-section p:last-child { margin-bottom: 0; }
.guide-section ol:not(.check-list):not(.source-list) { padding-left: 26px; margin: 11px 0 17px; }
.guide-section li { padding-left: 2px; margin-bottom: 7px; }
.guide-section li p { margin: 0; }
.guide-section strong { color: #153f3b; }

#quick-start { border-color: #b9ddd0; background: linear-gradient(145deg, #fff 72%, #f1f8f2); }
.check-list { padding: 0; margin: 16px 0 20px; list-style: none; display: grid; gap: 9px; }
.check-list li { padding: 0; margin: 0; }
.check-row { display: flex; align-items: flex-start; gap: 12px; padding: 11px 12px; border: 1px solid #d8e9df; border-radius: 10px; background: white; cursor: pointer; }
.check-row:hover { border-color: #8dc9ad; }
.check-row input { flex: 0 0 auto; width: 19px; height: 19px; margin: 3px 0 0; accent-color: var(--teal); }
.check-row span { flex: 1; line-height: 1.45; }
.check-row:has(input:checked) { background: #f0f7f1; }
.check-row input:checked + span { color: #6b8178; text-decoration: line-through; }

.prompt-card { margin: 18px 0; border: 1px solid #cbded8; border-radius: 12px; overflow: hidden; background: #f4f9f7; }
.prompt-card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid #d8e8e2; }
.prompt-card__label { color: #2a7064; font-size: 12px; font-weight: 800; letter-spacing: .015em; }
.copy-button { min-width: 76px; min-height: 39px; padding: 6px 12px; border: 1px solid #bad5cb; border-radius: 8px; color: #165950; background: white; font-size: 13px; font-weight: 800; }
.copy-button:hover { background: #e2f2eb; }
.copy-button.copied { border-color: var(--teal); background: var(--teal); color: white; }
.prompt-text { padding: 14px 16px 16px; margin: 0 !important; white-space: normal; color: #284340; line-height: 1.58; }

.table-scroll { max-width: 100%; overflow-x: auto; margin: 18px 0 20px; border: 1px solid var(--line); border-radius: 10px; }
table { width: 100%; border-collapse: collapse; min-width: 560px; font-size: 14px; line-height: 1.42; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
th:last-child, td:last-child { border-right: 0; }
tr:last-child td { border-bottom: 0; }
th { background: #ecf4f1; color: #225750; font-weight: 800; }
tbody tr:nth-child(even) { background: #fafcfb; }

.infographic { margin: 23px 0; padding: 19px; border: 1px solid #cde2d8; border-radius: 14px; background: linear-gradient(155deg, #f2f9f5, #f8fbf8); }
.infographic figcaption { display: flex; align-items: baseline; flex-wrap: wrap; gap: 9px; margin-bottom: 17px; }
.figure-kicker { color: #3f8f74; font-size: 11px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
.infographic figcaption strong { font-size: 17px; color: #17413d; }
.workflow-grid { display: grid; grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr) 20px minmax(0, 1fr); align-items: center; gap: 7px; }
.workflow-card { min-height: 129px; display: flex; flex-direction: column; gap: 4px; padding: 13px; border: 1px solid #d5e5dc; border-radius: 11px; background: white; }
.workflow-card__icon { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 8px; color: #0b6963; background: #daf1e5; font-size: 18px; line-height: 1; }
.workflow-card b { color: #164944; font-size: 15px; }
.workflow-card small, .schedule-card small { color: #667d76; font-size: 12px; line-height: 1.35; }
.flow-arrow { text-align: center; color: #65aa88; font-size: 21px; font-weight: 900; }
.workflow-return { margin: 12px 0 0 !important; text-align: center; color: #307861; font-size: 13px; font-weight: 700; }
.workflow-return span { font-size: 19px; vertical-align: -1px; }

.score-bars { display: grid; gap: 8px; }
.score-row { display: grid; grid-template-columns: 170px minmax(40px, 1fr) 28px; align-items: center; gap: 10px; font-size: 13px; }
.score-row > span { color: #3d655b; }
.score-row > b { color: #1a6355; text-align: right; }
.score-track { height: 12px; border-radius: 999px; background: #e0ebe5; overflow: hidden; }
.score-track i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #81c79c, #0c766c); }
.figure-note { margin: 13px 0 0 !important; color: #618177; font-size: 12px; }
.discovery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.discovery-card { display: flex; flex-direction: column; gap: 5px; min-height: 122px; padding: 13px; border: 1px solid #d6e7dc; border-radius: 10px; background: #fff; }
.discovery-card__step { color: #2c8d72; font-size: 12px; font-weight: 900; }
.discovery-card b { color: #164944; font-size: 15px; }
.discovery-card small { color: #667d76; font-size: 12px; line-height: 1.4; }
.diagnosis-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
.diagnosis-card { display: flex; flex-direction: column; gap: 5px; min-height: 115px; padding: 13px; border: 1px solid #d6e7dc; border-radius: 10px; background: #fff; }
.diagnosis-card span { color: #2c8d72; font-size: 12px; font-weight: 900; }
.diagnosis-card b { color: #164944; font-size: 15px; }
.diagnosis-card small { color: #667d76; font-size: 12px; line-height: 1.4; }
.result-timeline { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin: 15px 0; }
.result-timeline > div { display: flex; flex-direction: column; gap: 5px; padding: 14px; border-radius: 10px; background: #eaf5ef; }
.result-timeline span { color: #2c8d72; font-size: 12px; font-weight: 900; }
.result-timeline b { color: #164944; font-size: 15px; }
.result-timeline small { color: #546f67; font-size: 12px; line-height: 1.4; }
.primary-link { display: inline-flex; min-height: 42px; align-items: center; padding: 8px 14px; border-radius: 9px; color: white; background: var(--teal); text-decoration: none; font-weight: 800; }
.primary-link:hover { color: white; background: var(--teal-dark); }

.capture-shell { max-width: 900px; margin: 0 auto; padding: 0 24px 72px; }
.capture-intro { padding: 38px 0 24px; }
.capture-intro h1 { margin: 10px 0; color: #123535; font-size: clamp(30px, 4.3vw, 45px); line-height: 1.2; }
.capture-intro p { max-width: 670px; margin: 0; color: var(--ink-soft); }
.capture-notice { display: flex; flex-direction: column; gap: 5px; margin-bottom: 18px; padding: 14px 16px; border: 1px solid #cde2d8; border-radius: 11px; background: #eaf5ef; font-size: 14px; }
.capture-notice strong { color: #17413d; }
.capture-notice span { color: #526e65; }
.capture-panel { margin-bottom: 16px; }
.capture-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.capture-fields label { display: flex; flex-direction: column; gap: 5px; color: #24554f; font-size: 14px; font-weight: 800; }
.capture-fields__wide { grid-column: 1 / -1; }
.capture-fields input, .capture-fields select, .capture-fields textarea { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #cbded8; border-radius: 8px; outline-offset: 2px; color: #172a2d; background: #fff; font-weight: 400; }
.capture-fields textarea { resize: vertical; min-height: 85px; }
.capture-fields input:focus, .capture-fields select:focus, .capture-fields textarea:focus { border-color: var(--teal); outline: 2px solid #b9ddd0; }
.capture-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.capture-actions span { color: #2c7362; font-size: 13px; }
.capture-primary, .capture-secondary { min-height: 42px; border-radius: 8px; padding: 8px 13px; font-size: 14px; font-weight: 800; }
.capture-primary { border: 1px solid var(--teal); color: #fff; background: var(--teal); }
.capture-primary:hover { background: var(--teal-dark); }
.capture-secondary { border: 1px solid #bad5cb; color: #165950; background: #fff; }
.capture-secondary:hover:not(:disabled) { background: #e2f2eb; }
.capture-secondary:disabled { opacity: .5; cursor: not-allowed; }
.capture-list-head { display: flex; align-items: start; justify-content: space-between; gap: 15px; }
.capture-list-head h2 { margin: 0 0 2px; color: #123535; font-size: 24px; }
.capture-list-head p { margin: 0; color: #667d76; font-size: 13px; }
.capture-export-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.capture-tip { margin: 12px 0 !important; padding: 10px 12px; border-radius: 8px; background: #f2f9f5; color: #3d655b; font-size: 13px; }
.saved-records { display: grid; gap: 8px; }
.saved-card { display: grid; gap: 6px; padding: 13px 15px; border: 1px solid #d8e9df; border-radius: 9px; background: #fff; }
.saved-card__head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 3px 12px; }
.saved-card__head strong { color: #164944; }
.saved-card__head span, .saved-card small { color: #688078; font-size: 12px; }
.saved-card p { margin: 0; color: #415f56; font-size: 14px; }
.saved-card__remove { justify-self: start; border: 0; padding: 3px 0; color: #9b443c; background: none; font-size: 12px; text-decoration: underline; }
.empty-state { margin: 0; padding: 15px; border: 1px dashed #d8e9df; border-radius: 9px; color: #688078; text-align: center; }

.schedule-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.schedule-card { display: flex; flex-direction: column; min-height: 125px; gap: 5px; padding: 14px; background: #fff; border: 1px solid #d6e7dc; border-radius: 10px; }
.schedule-day { color: #2c8d72; font-size: 12px; font-weight: 900; }
.schedule-card b { color: #164944; font-size: 15px; }

.tool-stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
.tool-stack__step { display: flex; flex-direction: column; gap: 7px; min-height: 153px; padding: 14px; border: 1px solid #d6e7dc; border-radius: 10px; background: #fff; }
.tool-stack__step span { color: #2c8d72; font-size: 12px; font-weight: 900; }
.tool-stack__step b { color: #164944; font-size: 14px; line-height: 1.35; }
.tool-stack__step small { color: #667d76; font-size: 12px; line-height: 1.4; }

.source-list { margin: 8px 0 0; padding-left: 24px; columns: 2; column-gap: 36px; font-size: 14px; }
.source-list li { break-inside: avoid; margin: 0 0 9px; }
.source-list a { text-decoration-thickness: 1px; text-underline-offset: 2px; }
.source-list u { text-decoration: none; }
.page-footer { display: flex; justify-content: space-between; gap: 18px; padding: 20px 2px 0; color: #879390; font-size: 12px; }
.page-footer a { font-weight: 800; text-decoration: none; }
.toast { position: fixed; z-index: 40; left: 50%; bottom: 20px; transform: translate(-50%, 18px); padding: 10px 15px; border-radius: 999px; background: #123f3b; color: white; font-size: 13px; font-weight: 800; box-shadow: 0 8px 24px #123f3b33; opacity: 0; pointer-events: none; transition: opacity .18s, transform .18s; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 900px) {
  .content-layout { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .sidebar { display: none; }
  .mobile-toc { display: block; margin-bottom: 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
  .mobile-toc summary { display: flex; justify-content: space-between; align-items: center; min-height: 46px; padding: 9px 14px; font-size: 14px; color: #1b5751; font-weight: 800; cursor: pointer; list-style: none; }
  .mobile-toc summary::-webkit-details-marker { display: none; }
  .mobile-toc[open] summary span { transform: rotate(180deg); }
  .mobile-toc nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; padding: 4px 10px 12px; }
  .mobile-toc nav a { padding: 8px; border-radius: 6px; color: #426960; font-size: 13px; line-height: 1.3; text-decoration: none; }
  .mobile-toc nav a:hover { background: #edf6ef; }
}
@media (max-width: 600px) {
  body { font-size: 15px; }
  .site-header__inner { min-height: 58px; padding: 8px 15px; }
  .brand { font-size: 12px; gap: 7px; }
  .brand__mark { width: 31px; height: 31px; font-size: 17px; }
  .header-download { min-height: 38px; padding: 6px 9px; font-size: 11px; }
  .header-capture { min-height: 38px; padding: 6px 9px; font-size: 11px; }
  .page-shell { padding: 0 13px 50px; }
  .intro { padding: 28px 3px 24px; }
  .intro h1 { font-size: 31px; }
  .intro p { font-size: 15px; }
  .intro__meta { gap: 6px; margin-top: 17px; }
  .intro__meta span { font-size: 11px; padding: 4px 8px; }
  .mobile-toc nav { grid-template-columns: 1fr; }
  .guide-section { border-radius: 13px; padding: 22px 18px 24px; margin-bottom: 11px; }
  .guide-section > h2 { font-size: 22px; }
  .guide-section h3 { font-size: 17px; }
  .prompt-card__head { padding: 9px 10px; }
  .prompt-card__label { font-size: 11px; }
  .prompt-text { padding: 12px; }
  .infographic { margin: 17px 0; padding: 15px; }
  .workflow-grid { grid-template-columns: 1fr; gap: 4px; }
  .workflow-card { min-height: 0; padding: 10px 12px; display: grid; grid-template-columns: 27px minmax(0, 1fr); align-items: center; column-gap: 10px; }
  .workflow-card__icon { grid-row: span 2; }
  .workflow-card small { grid-column: 2; }
  .flow-arrow { transform: rotate(90deg); line-height: 1; }
  .workflow-return { text-align: left; }
  .score-row { grid-template-columns: 120px minmax(20px, 1fr) 23px; gap: 7px; font-size: 12px; }
  .discovery-grid, .diagnosis-grid, .result-timeline { grid-template-columns: 1fr; }
  .discovery-card, .diagnosis-card { min-height: 0; padding: 10px 12px; }
  .schedule-grid { grid-template-columns: 1fr; }
  .schedule-card { min-height: 0; padding: 10px 12px; }
  .tool-stack { grid-template-columns: 1fr; }
  .tool-stack__step { min-height: 0; padding: 11px 12px; }
  .source-list { columns: 1; }
  .capture-shell { padding: 0 13px 50px; }
  .capture-intro { padding: 28px 3px 22px; }
  .capture-intro h1 { font-size: 31px; }
  .capture-fields { grid-template-columns: 1fr; }
  .capture-list-head { flex-direction: column; }
  .capture-export-actions { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@page { size: A4; margin: 13mm; }
@media print {
  html { scroll-behavior: auto; }
  body { background: white; color: #172a2d; font-size: 10pt; line-height: 1.45; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .site-header, .skip-link, .mobile-toc, .sidebar, .toast, .copy-button, .page-footer { display: none !important; }
  .page-shell { max-width: none; padding: 0; }
  .intro { padding: 0 0 11mm; }
  .intro h1 { font-size: 24pt; }
  .intro p { font-size: 11pt; }
  .content-layout { display: block; }
  .guide-section, #quick-start { padding: 0; margin: 0 0 9mm; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .guide-section > h2 { font-size: 16pt; break-after: avoid; }
  .guide-section h3 { font-size: 12pt; break-after: avoid; }
  #automation, #tools, #sources { break-before: page; }
  .guide-section p, .guide-section li { orphans: 2; widows: 2; }
  .infographic, .prompt-card, .table-scroll, .result-timeline { break-inside: avoid; }
  .infographic { margin: 5mm 0; padding: 4mm; }
  .table-scroll { overflow: visible; }
  table { min-width: 0; font-size: 8.5pt; }
  .prompt-card__head { padding: 2mm 3mm; }
  .prompt-text { padding: 3mm; }
  .primary-link { display: none; }
}
