* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --orange: #e85b0c; --orange-dark: #c94608; --orange-soft: #fff3e9;
  --ink: #111827; --muted: #64748b; --line: #e2e8f0; --surface: #f7f8fa;
  --green: #0f9f6e; --purple: #7557d9; --blue: #1479c9;
}
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body { font-family: 'Noto Sans Thai', -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: #fff; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
.wrap { width: min(1060px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; }
header { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,.95); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 62px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 1.1rem; text-decoration: none; white-space: nowrap; }
.brand img { width: 30px; height: 30px; }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-link { text-decoration: none; font-weight: 700; font-size: .95rem; color: #334155; padding: 10px 12px; border-radius: 8px; white-space: nowrap; }
.nav-link:hover, .nav-link.active { color: var(--orange); background: var(--orange-soft); }
.btn { display: inline-block; padding: 10px 20px; border-radius: 9px; font-weight: 700; text-decoration: none; font-size: .95rem; white-space: nowrap; }
.btn-primary { background: var(--orange); color: #fff; }
.hero { padding: 64px 0 54px; text-align: center; background: radial-gradient(circle at 50% -15%, #ffe4cd 0, #fff8f2 34%, #fff 72%); border-bottom: 1px solid #f1f5f9; }
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.eyebrow { display: inline-flex; padding: 7px 14px; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark); font-size: .84rem; font-weight: 800; }
.hero h1 { margin-top: 14px; font-size: clamp(2.1rem, 5vw, 3.45rem); line-height: 1.15; letter-spacing: -.5px; }
.hero p { max-width: 700px; margin: 13px auto 0; color: #475569; font-size: 1.06rem; }
.manual-search { display: flex; align-items: center; width: min(680px, 100%); margin-top: 27px; border: 1px solid #fed7aa; border-radius: 15px; background: #fff; box-shadow: 0 16px 36px rgba(154,52,18,.09); }
.manual-search span { padding-left: 18px; color: var(--orange); font-size: 1.6rem; line-height: 1; }
.manual-search input { min-width: 0; width: 100%; padding: 16px 17px 15px 12px; border: 0; outline: none; border-radius: inherit; background: transparent; color: var(--ink); font: inherit; }
.hero-stats { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.hero-stats span { padding: 5px 10px; color: var(--muted); font-size: .82rem; }
.hero-stats strong { color: var(--ink); }
.manual-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 44px; padding-top: 50px; padding-bottom: 84px; }
.manual-nav { position: sticky; top: 84px; align-self: start; max-height: calc(100vh - 106px); overflow: auto; border: 1px solid var(--line); border-radius: 16px; padding: 12px; background: #fff; }
.manual-nav-title { color: var(--muted); font-size: .77rem; font-weight: 800; letter-spacing: .04em; padding: 7px 10px 10px; }
.manual-nav-link { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 10px; text-decoration: none; color: #475569; font-size: .9rem; font-weight: 700; }
.manual-nav-link:hover, .manual-nav-link.active { background: var(--orange-soft); color: var(--orange-dark); }
.manual-nav-link span { display: grid; place-items: center; min-width: 29px; height: 29px; border: 1px solid #fed7aa; border-radius: 8px; background: #fff; font-size: .72rem; }
.manual-content { min-width: 0; }
.manual-section { padding-bottom: 66px; }
.manual-section + .manual-section { padding-top: 8px; border-top: 1px solid #edf0f3; }
.section-heading { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 24px; padding-top: 12px; }
.section-icon { display: grid; place-items: center; flex: 0 0 48px; height: 48px; border-radius: 14px; background: var(--orange); color: #fff; font-size: .83rem; font-weight: 800; box-shadow: 0 10px 24px rgba(232,91,12,.2); }
.section-icon.bridge { background: var(--green); box-shadow: 0 10px 24px rgba(15,159,110,.18); }
.section-icon.owner { background: var(--purple); box-shadow: 0 10px 24px rgba(117,87,217,.18); }
.section-icon.kds { background: #db3445; box-shadow: 0 10px 24px rgba(219,52,69,.18); }
.section-icon.web { background: var(--blue); box-shadow: 0 10px 24px rgba(20,121,201,.18); }
.section-icon.faq { background: #475569; box-shadow: 0 10px 24px rgba(71,85,105,.18); }
.article-kicker { color: var(--orange-dark); font-size: .8rem; font-weight: 800; }
.section-heading h2 { margin-top: 1px; font-size: clamp(1.65rem, 4vw, 2.25rem); line-height: 1.25; }
.section-heading p { margin-top: 4px; color: var(--muted); font-size: .95rem; }
.featured-guide { display: grid; grid-template-columns: 1fr; margin-bottom: 18px; overflow: hidden; border: 1px solid #f3d4bd; border-radius: 20px; background: #fffaf6; }
.guide-copy { padding: 28px; }
.guide-copy h3 { margin-top: 10px; font-size: 1.35rem; }
.guide-copy p { margin-top: 7px; color: #475569; }
.guide-copy ul { margin: 14px 0 0 20px; color: #475569; font-size: .92rem; }
.featured-guide figure { display: flex; flex-direction: column; min-width: 0; border-top: 1px solid #f3d4bd; background: #f9e9dc; }
.featured-guide img { width: 100%; height: auto; object-fit: contain; display: block; }
.featured-guide figcaption, .topic-media figcaption { padding: 8px 12px; color: var(--muted); background: #fff; border-top: 1px solid var(--line); font-size: .75rem; text-align: center; }
.topic-grid { display: grid; grid-template-columns: 1fr; gap: 7px; align-items: start; }
.topic-card { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; transition: border-color .18s, box-shadow .18s; }
.topic-card:hover { border-color: #fdba74; box-shadow: 0 9px 26px rgba(15,23,42,.055); }
.topic-card[open] { border-color: #fb923c; box-shadow: 0 14px 36px rgba(15,23,42,.07); }
.topic-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 78px; padding: 12px 16px; cursor: pointer; list-style: none; }
.topic-card summary::-webkit-details-marker, .faq-item summary::-webkit-details-marker { display: none; }
.summary-copy { display: flex; flex-direction: column; align-items: flex-start; }
.summary-copy strong { margin-top: 0; font-size: .98rem; line-height: 1.3; }
.topic-badge + strong { margin-top: 10px; }
.summary-copy small { margin-top: 2px; color: var(--muted); font-size: .8rem; font-weight: 400; line-height: 1.4; }
.topic-badge { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: #f1f5f9; color: #475569; font-size: .68rem; font-weight: 800; }
.topic-badge.ready { background: #e9f9f2; color: #087554; }
.chevron { flex: 0 0 10px; width: 10px; height: 10px; border-right: 2px solid #94a3b8; border-bottom: 2px solid #94a3b8; transform: rotate(45deg); transition: transform .18s; }
details[open] > summary .chevron { transform: rotate(225deg); }
.topic-body { display: grid; grid-template-columns: minmax(240px, .8fr) 1.2fr; gap: 22px; padding: 0 20px 22px; border-top: 1px solid #f1f5f9; }
.topic-body:not(:has(.topic-media)) { grid-template-columns: 1fr; }
.topic-media { overflow: hidden; margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; align-self: start; }
.topic-media-stack { min-width: 0; }
.topic-media-stack .topic-media + .topic-media { margin-top: 12px; }
.topic-media img { display: block; width: 100%; max-height: 430px; object-fit: contain; background: var(--surface); }
.topic-media img, .featured-guide img { cursor: zoom-in; }
.topic-media img:focus-visible, .featured-guide img:focus-visible { outline: 3px solid #60a5fa; outline-offset: -3px; }
.topic-body ol { margin: 20px 0 0 22px; color: #334155; }
.topic-body li { padding-left: 5px; margin-bottom: 8px; }
.web-group { margin-top: 28px; }
.web-group:first-child { margin-top: 0; }
.web-group > h3 { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 1.07rem; }
.web-group > h3 span { color: var(--muted); font-size: .75rem; font-weight: 700; }
.faq-list { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.faq-item summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 17px 19px; cursor: pointer; list-style: none; font-weight: 700; }
.faq-item p { padding: 0 19px 18px; color: #475569; }
.no-results { padding: 40px 20px; border: 1px dashed #cbd5e1; border-radius: 16px; background: var(--surface); color: var(--muted); text-align: center; }
[hidden] { display: none !important; }
.lightbox-open { overflow: hidden; }
.image-lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 34px; background: rgba(15,23,42,.86); cursor: zoom-out; }
.image-lightbox[hidden] { display: none; }
.lightbox-image { display: block; max-width: min(96vw, 1500px); max-height: 92vh; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 70px rgba(0,0,0,.4); cursor: default; }
.lightbox-close { position: absolute; top: 14px; right: 18px; width: 44px; height: 44px; border: 0; border-radius: 999px; background: rgba(255,255,255,.16); color: #fff; font-size: 2rem; line-height: 1; cursor: pointer; }
.lightbox-close:hover { background: rgba(255,255,255,.28); }
footer { background: var(--ink); color: #94a3b8; padding: 32px 0; font-size: .88rem; }
.foot { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 17px; flex-wrap: wrap; }
.foot a { color: #e2e8f0; text-decoration: none; font-weight: 600; }
@media (max-width: 900px) {
  .manual-layout { grid-template-columns: 1fr; gap: 25px; padding-top: 30px; }
  .manual-nav { position: static; display: flex; gap: 7px; overflow-x: auto; max-height: none; padding: 9px; }
  .manual-nav-title { display: none; }
  .manual-nav-link { flex: 0 0 auto; }
  .manual-nav-link span { display: none; }
}
@media (max-width: 700px) {
  .wrap { width: min(100% - 40px, 1060px); }
  .nav-link { display: none; }
  .hero { padding: 46px 0 40px; }
  .hero-stats { gap: 0; }
  .featured-guide { grid-template-columns: 1fr; }
  .guide-copy { padding: 22px; }
  .featured-guide figure { order: -1; }
  .featured-guide img { min-height: 0; }
  .topic-grid { grid-template-columns: 1fr; }
  .topic-card[open] { grid-column: auto; }
  .topic-card summary { min-height: 72px; padding: 11px 14px; }
  .topic-body { grid-template-columns: 1fr; padding: 0 18px 20px; }
  .section-heading { gap: 12px; }
  .section-icon { flex-basis: 42px; height: 42px; border-radius: 12px; }
  .image-lightbox { padding: 18px; }
  .lightbox-image { max-width: 96vw; max-height: 88vh; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
