/* Circular v2 manual - layout of the KSKL manuals (manual.css), system blue (macOS theme 2026-10-20), Google Sans, no coloured edge stripes (owner rule). */
/* Google Sans (OFL, Thai glyphs included) + Noto Sans Thai fallback, self-hosted with the app (assets/vendor/fonts).
   First URL = the published copy (assets/manual), second = this source folder (tools/manual) for the PDF render. */
@font-face { font-family: "Google Sans"; font-weight: 400 700; font-display: swap; src: url("../vendor/fonts/GoogleSans-thai.woff2") format("woff2"), url("../../assets/vendor/fonts/GoogleSans-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }
@font-face { font-family: "Google Sans"; font-weight: 400 700; font-display: swap; src: url("../vendor/fonts/GoogleSans-latin-ext.woff2") format("woff2"), url("../../assets/vendor/fonts/GoogleSans-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Google Sans"; font-weight: 400 700; font-display: swap; src: url("../vendor/fonts/GoogleSans-latin.woff2") format("woff2"), url("../../assets/vendor/fonts/GoogleSans-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-weight: 400 700; font-display: swap; src: local("Noto Sans Thai"), url("../vendor/fonts/NotoSansThai-thai.woff2") format("woff2"), url("../../assets/vendor/fonts/NotoSansThai-thai.woff2") format("woff2"); unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC; }@page { size: A4; margin: 14mm 14mm 16mm; }
:root { --g: #007aff; --g2: #e6f1ff; --ink: #1d1d1f; --mut: #6e6e73; --line: #dbe4ef; --warn: #8a4b00; --warnbg: #fff6e5; }
* { box-sizing: border-box; }
html { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
body { margin: 0; font-family: 'Google Sans', 'Noto Sans Thai', 'Leelawadee UI', Tahoma, sans-serif; color: var(--ink); font-size: 10.5pt; line-height: 1.6; background: #fff; }
@media screen { body { max-width: 210mm; margin: 0 auto; padding: 8mm 6mm 16mm; } }
h1, h2, h3 { line-height: 1.3; margin: 0; }
b, strong { font-weight: 700; }
img { max-width: 100%; }

.cover { min-height: 265mm; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 8mm; page-break-after: always;
  background: linear-gradient(160deg, #fff 55%, var(--g2) 55%); }
.cover .logo { width: 22mm; height: 22mm; border-radius: 7mm; background: linear-gradient(155deg, #0b2a55, #0a4d9c 55%, #0a74e8); color: #fff; font-size: 14mm; font-weight: 700; display: grid; place-items: center; margin-bottom: 12mm; }
.cover .kicker { color: var(--g); font-weight: 700; letter-spacing: .04em; font-size: 12pt; }
.cover h1 { font-size: 30pt; margin: 3mm 0 2mm; }
.cover .role { display: inline-block; background: var(--g); color: #fff; font-size: 15pt; font-weight: 700; padding: 2mm 7mm; border-radius: 30mm; margin: 4mm 0 10mm; }
.cover .meta { color: var(--mut); font-size: 10.5pt; }
.cover .note { margin-top: 14mm; font-size: 9.5pt; color: var(--mut); border: 1px solid var(--line); background: #fff; border-radius: 3mm; padding: 3mm 4mm; max-width: 150mm; }

.toc { page-break-after: always; }
.toc h2 { font-size: 18pt; color: var(--g); margin-bottom: 6mm; }
.toc ol { padding-left: 0; list-style: none; counter-reset: t; margin: 0; }
.toc li { counter-increment: t; display: flex; gap: 4mm; padding: 2.4mm 0; border-bottom: 1px dashed var(--line); font-size: 11.5pt; }
.toc li::before { content: counter(t); width: 8mm; height: 8mm; border-radius: 50%; background: var(--g2); color: var(--g); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 10pt; flex: none; }
.toc li span { color: var(--mut); font-size: 9.5pt; display: block; }
.toc a { color: inherit; text-decoration: none; }

.chap { page-break-before: always; }
.chap > h2 { font-size: 17pt; color: #fff; background: var(--g); padding: 3mm 5mm; border-radius: 3mm; margin-bottom: 4mm; }
.chap > h2 small { display: block; font-size: 10pt; font-weight: 400; opacity: .9; }
.lead { font-size: 11pt; margin: 0 0 4mm; }
h3 { font-size: 12.5pt; margin: 5mm 0 2mm; color: var(--g); display: flex; align-items: center; gap: 2.5mm; }
h3 .n { flex: none; width: 7mm; height: 7mm; border-radius: 50%; background: var(--g); color: #fff; font-size: 10pt; display: inline-flex; align-items: center; justify-content: center; }
p { margin: 1.5mm 0; }
ol.steps, ul.pts { margin: 1mm 0 2mm; padding-left: 6mm; }
ol.steps li, ul.pts li { margin: .8mm 0; }
.block { page-break-inside: avoid; break-inside: avoid; }

.shots { display: flex; gap: 5mm; justify-content: center; margin: 3mm 0 4mm; page-break-inside: avoid; break-inside: avoid; flex-wrap: wrap; }
.shot { width: 47mm; text-align: center; }
.shot img { width: 100%; border-radius: 5mm; border: 1.6mm solid #1d1d1f; box-shadow: 0 1mm 3mm rgba(0,0,0,.18); display: block; }
.shot.desk { width: 120mm; }
.shot.desk img { border-radius: 2mm; border: 1px solid #c9d4e2; box-shadow: 0 .6mm 2mm rgba(0,0,0,.12); }
.shot.full { width: 100%; }
.shot.full img { border-radius: 2mm; border: 1px solid #c9d4e2; box-shadow: 0 .6mm 2mm rgba(0,0,0,.12); }
.cap { font-size: 8.8pt; color: var(--mut); margin-top: 1.8mm; line-height: 1.4; }
.cap b { color: var(--ink); display: block; font-size: 9.4pt; }

/* callouts: full ring + tint (no edge stripe) */
.tip, .warn, .note { border-radius: 2.5mm; padding: 2.5mm 4mm; margin: 3mm 0; font-size: 9.8pt; page-break-inside: avoid; border: 1px solid; }
.tip { background: var(--g2); border-color: #b9d3f2; }
.warn { background: var(--warnbg); border-color: #f1cf8f; }
.note { background: #f4f6f9; border-color: var(--line); }
.tip::before { content: '💡 เคล็ดลับ  '; font-weight: 700; color: var(--g); }
.warn::before { content: '⚠️ ข้อควรรู้  '; font-weight: 700; color: var(--warn); }

table { border-collapse: collapse; width: 100%; margin: 2mm 0 4mm; font-size: 9.8pt; page-break-inside: avoid; }
th, td { border: 1px solid var(--line); padding: 1.8mm 2.5mm; text-align: left; vertical-align: top; }
th { background: var(--g2); color: var(--g); font-weight: 700; }
.chip { display: inline-block; background: var(--g2); color: var(--g); border-radius: 10mm; padding: 0 2.5mm; font-weight: 700; font-size: 9.2pt; white-space: nowrap; }
.foot { margin-top: 8mm; font-size: 8.5pt; color: var(--mut); text-align: center; }
.dl { display: inline-block; margin: 2mm 0 6mm; padding: 2mm 5mm; background: var(--g); color: #fff; border-radius: 3mm; text-decoration: none; font-weight: 700; }
@media print { .dl { display: none; } }

/* owner 2026-10-21: the manual opened from the app / admin always has a way back (screen only, never in the PDF) */
.backbar { display: none; }
@media screen {
  .backbar { display: flex; align-items: center; gap: 8px; position: sticky; top: 0; z-index: 10; margin: -8mm -6mm 6mm; padding: 10px 12px;
    padding-top: max(10px, env(safe-area-inset-top)); background: rgba(255, 255, 255, .92); -webkit-backdrop-filter: saturate(180%) blur(16px);
    backdrop-filter: saturate(180%) blur(16px); border-bottom: 1px solid var(--line); }
  .backbar button { display: inline-flex; align-items: center; gap: 6px; font: inherit; font-size: 16px; font-weight: 700; color: var(--g); background: var(--g2);
    border: 0; border-radius: 10px; padding: 9px 14px; cursor: pointer; }
  .backbar span { color: var(--mut); font-size: 14px; margin-left: auto; }
}
