/* ===== หน้าแรก AI Care: ไม้วัดระดับน้ำที่ตอม่อสะพาน =====
   สีหลักมาจากโลโก้ (กรมท่า + เขียว) สีสถานะ (เขียว/เหลือง/แดง) ใช้กับคำตอบเรื่องน้ำเท่านั้น
   สีน้ำตาลคือน้ำแม่น้ำกกที่มีตะกอน */
.home {
    --g-enamel: #f5f4ef;
    --g-paper: #ffffff;
    --g-ink: #14181f;
    --g-ink-2: #464c55;
    --g-navy: #163a6b;
    --g-navy-deep: #0f2a4f;
    --g-go: #23763a;
    --g-go-deep: #1a5c2c;
    --g-lime: #8cc63f;
    --g-silt: #6b4f30;
    --g-silt-hi: #a8865a;
    --g-on-dark-2: #e6dccd;
    --g-ok: #2e8b3e;
    --g-warn: #f2c200;
    --g-bad: #c8102e;
    --g-display: 'Chakra Petch', 'Sarabun', sans-serif;
    --g-body: 'Sarabun', system-ui, sans-serif;
    --g-rail: 128px;
    --g-ease: cubic-bezier(.16, 1, .3, 1);

    font-family: var(--g-body);
    font-size: 17px;
    line-height: 1.75;
    color: var(--g-ink);
    background: var(--g-enamel);
}
.home ::selection { background: var(--g-lime); color: var(--g-ink); }
.home :focus-visible { outline: 3px solid var(--g-lime); outline-offset: 3px; }
.home h1, .home h2, .home h3 { font-family: var(--g-display); letter-spacing: 0; }
.home .nw { white-space: nowrap; }
.home [id^="step-"], .home #join { scroll-margin-top: 72px; }
.home a:not(.g-btn) { color: var(--g-navy); text-underline-offset: .2em; }

/* ----- หัวเว็บและท้ายเว็บในโลกนี้ ----- */
.home .site-header { position: relative; background: var(--g-enamel); border-bottom: 3px solid var(--g-navy); }
.home .brand { font-family: var(--g-display); color: var(--g-navy); letter-spacing: .02em; }
.home .brand-mark { border-radius: 0; background: var(--g-navy); font-style: normal; }
.home .site-nav a { border-radius: 0; font-family: var(--g-display); font-weight: 500; }
.home .site-nav a:hover { background: transparent; color: var(--g-navy); text-decoration: underline; text-decoration-thickness: 2px; }
.home .site-nav a[aria-current="page"] { background: var(--g-navy); color: #fff; }
.home .nav-toggle { border-radius: 0; border: 2px solid var(--g-navy); color: var(--g-navy); font-family: var(--g-display); background: transparent; }
.home .site-nav.open { background: var(--g-enamel); border-bottom: 3px solid var(--g-navy); }
.home .site-footer { background: var(--g-navy-deep); margin-top: 0; }
.home .site-footer a { color: #dfe7f1; }
.home .site-footer a:hover { color: #fff; text-decoration: underline; }
.home .footer-bottom { border-top-color: rgba(255, 255, 255, .18); }

/* ----- โครงหน้า: ไม้วัด + เนื้อหา ----- */
.gauge-page { display: grid; grid-template-columns: var(--g-rail) minmax(0, 1fr); --level: 0; }

.gauge-rail {
    position: sticky; top: 0; align-self: start;
    height: var(--rail-h, calc(100vh - 67px));
    padding: 16px 0 0 18px;
    border-right: 3px solid var(--g-navy);
    background: var(--g-enamel);
    z-index: 5;
}
.gauge-plate {
    position: relative; height: 100%;
    background: var(--g-paper);
    border: 2px solid var(--g-ink);
    border-right: 0;
    overflow: hidden;
}
/* ขีด E ของไม้วัด: แท่งตั้ง + ขีดสั้นทุก 1 ใน 30 */
.gauge-plate::before {
    content: ""; position: absolute; inset: 0 auto 0 10px; width: 26px;
    background:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='26' height='60'%3E%3Cg fill='%23163a6b'%3E%3Crect x='0' y='0' width='6' height='30'/%3E%3Crect x='0' y='0' width='26' height='6'/%3E%3Crect x='0' y='12' width='26' height='6'/%3E%3Crect x='0' y='24' width='26' height='6'/%3E%3Crect x='20' y='30' width='6' height='30'/%3E%3Crect x='0' y='30' width='26' height='6'/%3E%3Crect x='0' y='42' width='26' height='6'/%3E%3Crect x='0' y='54' width='26' height='6'/%3E%3C/g%3E%3C/svg%3E") left bottom / 26px 60px repeat-y;
    z-index: 1;
}
.gauge-water {
    position: absolute; left: 0; right: 0; bottom: 0;
    height: calc(var(--level) * 100%);
    background: var(--g-silt);
    box-shadow: inset 0 3px 0 var(--g-silt-hi);
    transition: height .9s var(--g-ease);
    z-index: 2;
}
.gauge-water::after { /* แท่งตั้งของไม้ยังเห็นใต้น้ำ */
    content: ""; position: absolute; inset: 0 auto 0 10px; width: 6px; background: rgba(255, 255, 255, .28);
}
.gauge-marks {
    position: relative; z-index: 3; list-style: none; margin: 0; padding: 0; height: 100%;
    display: flex; flex-direction: column-reverse;
}
.gauge-marks li { flex: 1; display: flex; align-items: center; border-bottom: 1px solid rgba(20, 24, 31, .14); }
.gauge-marks li:last-child { border-bottom: 0; }
/* แบ่งสามช่วง: รู้จัก 1–3 · ร่วมมือ 4–6 · เป็นของเรา 7–9 */
.gauge-marks li:nth-child(3), .gauge-marks li:nth-child(6) { border-top: 3px solid var(--g-navy); }
.gauge-marks a {
    position: relative; display: flex; align-items: center; height: 100%; width: 100%;
    padding-left: 46px; text-decoration: none; color: var(--g-navy);
}
.mark-num {
    font-family: var(--g-display); font-weight: 700; font-size: 1.9rem; line-height: 1;
    min-width: 1.5em; text-align: center; padding: 4px 0;
    transition: color .3s, background-color .3s;
}
.gauge-marks a.is-under .mark-num { color: var(--g-paper); }
.gauge-marks a.is-active .mark-num { background: var(--g-navy); color: var(--g-paper); }
.gauge-marks a.is-under.is-active .mark-num { background: var(--g-paper); color: var(--g-silt); }
.mark-label {
    position: absolute; left: calc(100% + 3px); top: 50%; transform: translate(-6px, -50%);
    white-space: nowrap; padding: 6px 14px;
    background: var(--g-navy); color: var(--g-paper);
    font-family: var(--g-display); font-weight: 600; font-size: .95rem;
    opacity: 0; pointer-events: none; transition: opacity .2s, transform .3s var(--g-ease);
}
.gauge-plate { overflow: visible; }
.gauge-marks a:hover .mark-label, .gauge-marks a:focus-visible .mark-label { opacity: 1; transform: translate(0, -50%); }
.gauge-water { overflow: hidden; }

/* ----- ส่วนกลาง ----- */
.gauge-body { min-width: 0; }
.g-wrap { width: 100%; max-width: 1120px; padding-inline: clamp(16px, 4.5vw, 64px); }
.g-step { padding-block: clamp(64px, 9vw, 128px); border-bottom: 1px solid rgba(20, 24, 31, .16); }
.g-lede { font-size: 1.15rem; max-width: 62ch; color: var(--g-ink-2); }
.g-link { font-family: var(--g-display); font-weight: 600; text-decoration-thickness: 2px; }

.step-head { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 0 clamp(16px, 2.5vw, 32px); align-items: start; margin-bottom: clamp(28px, 4vw, 48px); }
.step-num {
    position: relative;
    font-family: var(--g-display); font-weight: 700; color: var(--g-navy);
    font-size: clamp(3.5rem, 7vw, 5.5rem); line-height: .9;
    padding-left: 22px;
}
.step-num::before { /* ขีดเมตรบนไม้วัด */
    content: ""; position: absolute; left: 0; top: .08em; bottom: .08em; width: 10px;
    background: repeating-linear-gradient(to bottom, currentColor 0 6px, transparent 6px 12px);
}
.step-head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); line-height: 1.3; margin: .1em 0 0; max-width: 22ch; color: var(--g-ink); }

/* ----- ปุ่ม ----- */
.g-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.g-btn {
    display: inline-flex; align-items: center; justify-content: center; min-height: 52px;
    padding: 12px 24px; border: 2px solid transparent; border-radius: 0;
    font-family: var(--g-display); font-weight: 600; font-size: 1.08rem; line-height: 1.2;
    text-decoration: none; cursor: pointer;
    transition: background-color .2s, color .2s, border-color .2s;
}
.g-btn-go { background: var(--g-go); color: #fff; border-color: var(--g-go); }
.g-btn-go:hover { background: var(--g-go-deep); border-color: var(--g-go-deep); }
.g-btn-line { background: transparent; color: var(--g-navy); border-color: var(--g-navy); }
.g-btn-line:hover { background: var(--g-navy); color: #fff; }
.g-btn-ghost { background: transparent; color: #fff; border-color: #fff; }
.g-btn-ghost:hover { background: #fff; color: var(--g-navy); }
.g-btn-paper { background: var(--g-paper); color: var(--g-ink); border-color: var(--g-paper); }
.g-btn-paper:hover { background: transparent; color: #fff; }

/* ----- หัวหน้า ----- */
.g-hero {
    position: relative;
    min-height: calc(100vh - 115px); min-height: calc(100dvh - 115px);
    display: flex; flex-direction: column; justify-content: center;
    padding-block: clamp(40px, 6vw, 80px) clamp(48px, 6vw, 80px);
    border-bottom: 4px solid var(--g-silt-hi);
}
.g-hero h1 {
    font-size: clamp(3rem, 7.4vw, 6rem); font-weight: 700; line-height: 1.3;
    color: var(--g-navy); margin: 0 0 .3em;
}
.g-hero .g-lede { color: var(--g-ink); font-size: clamp(1.1rem, 1.6vw, 1.3rem); }

.plates { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: clamp(24px, 3vw, 40px); border: 3px solid var(--g-ink); background: var(--g-paper); max-width: 880px; }
.plate { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 26px 20px 18px; }
.plate + .plate { border-left: 3px solid var(--g-ink); }
.plate::before { /* แถบสีที่ทาบนตอม่อ */
    content: ""; position: absolute; left: 0; right: 0; top: 0; height: 12px;
    background: repeating-linear-gradient(90deg, #d8d6cf 0 12px, transparent 12px 24px);
    transition: background-color .4s;
}
.plate[data-level="ok"]::before { background: var(--g-ok); }
.plate[data-level="warn"]::before { background: var(--g-warn); }
.plate[data-level="bad"]::before { background: var(--g-bad); }
.plate-q { font-family: var(--g-display); font-weight: 600; font-size: 1rem; color: var(--g-ink-2); }
.plate-a { font-family: var(--g-display); font-weight: 700; font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1.25; color: var(--g-ink); }
.plate[data-level="ok"] .plate-a { color: #1f6b2c; }
.plate[data-level="warn"] .plate-a { color: #7a5b00; }
.plate[data-level="bad"] .plate-a { color: var(--g-bad); }
.plate[data-level="wait"] .plate-a { color: var(--g-ink-2); font-size: 1.3rem; }
.plate-v { font-size: .9rem; color: var(--g-ink-2); font-variant-numeric: tabular-nums; }
.plates-note { margin: 12px 0 0; font-size: .92rem; color: var(--g-ink-2); max-width: 880px; }
.plates-note b { color: var(--g-ink); }

/* ----- ช่วงน้ำ (น้ำตาลตะกอน) ----- */
.g-water { background: var(--g-silt); color: var(--g-paper); border-bottom: 0; }
.g-water .step-num, .g-water .step-head h2 { color: var(--g-paper); }
.g-water .step-num::before { color: var(--g-silt-hi); }
.g-water a:not(.g-btn) { color: var(--g-paper); }

.askers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.askers figure { margin: 0; padding: 0 clamp(16px, 2.5vw, 32px); border-left: 2px solid rgba(255, 255, 255, .35); }
.askers figure:first-child { padding-left: 0; border-left: 0; }
.askers .ask { margin: 0 0 14px; font-family: var(--g-display); font-weight: 600; font-size: clamp(1.3rem, 2vw, 1.6rem); line-height: 1.45; color: var(--g-paper); }
.askers figcaption { color: var(--g-on-dark-2); }
.askers figcaption b { display: block; font-family: var(--g-display); color: var(--g-paper); }

/* ----- ขั้น 2 แปลตัวเลขเป็นคำตอบ / ขั้น 6 เส้นทาง ----- */
.translate, .path { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.translate li {
    position: relative; display: flex; flex-direction: column; gap: 6px;
    padding: 30px clamp(12px, 1.8vw, 24px) 0 0;
    border-top: 4px solid var(--g-navy);
}
.translate li::before {
    content: ""; position: absolute; left: 0; top: -12px; width: 20px; height: 20px; background: var(--g-navy);
}
.tr-tag { position: absolute; top: -15px; left: 28px; padding: 0 8px; background: var(--g-enamel); font-family: var(--g-display); font-weight: 600; font-size: .92rem; line-height: 26px; color: var(--g-navy); }
.tr-big { font-family: var(--g-display); font-weight: 700; font-size: clamp(1.3rem, 2.2vw, 1.75rem); line-height: 1.3; font-variant-numeric: tabular-nums; }
.tr-sub { color: var(--g-ink-2); font-size: .98rem; }
.translate .tr-out { border-top-color: var(--g-go); }
.translate .tr-out::before { background: var(--g-go); }
.translate .tr-out .tr-tag { color: var(--g-go); }
.translate .tr-out .tr-big { color: var(--g-go); }

.path { align-items: end; border-bottom: 3px solid var(--g-ink); }
.path li { display: flex; flex-direction: column; justify-content: flex-end; gap: 4px; min-height: 200px; padding: 0 16px 18px; border-left: 2px solid var(--g-navy); }
.path li:nth-child(2) { min-height: 230px; }
.path li:nth-child(3) { min-height: 260px; }
.path li:nth-child(4) { min-height: 290px; border-right: 2px solid var(--g-navy); }
.path b { font-family: var(--g-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; color: var(--g-navy); }
.path li:last-child b { color: var(--g-go); }
.path span { color: var(--g-ink-2); }

/* ----- ขั้น 2 สิ่งที่ข้อมูลตอบได้แล้ว ----- */
.findings { margin-top: clamp(48px, 6vw, 80px); max-width: 920px; }
.findings h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: 14px; }
.findings tbody th { width: 34%; color: var(--g-ink); font-weight: 600; }
.chip { display: inline-block; margin-right: 8px; padding: 1px 10px; font-family: var(--g-display); font-weight: 700; font-size: .95rem; white-space: nowrap; }
.chip[data-level="ok"] { background: var(--g-ok); color: #fff; }
.chip[data-level="warn"] { background: var(--g-warn); color: var(--g-ink); }
.chip[data-level="bad"] { background: var(--g-bad); color: #fff; }
.findings-src { margin: 12px 0 0; font-size: .9rem; color: var(--g-ink-2); }

/* ----- ขั้น 8 ตัวเลขที่อ่านได้จากไม้วัด ----- */
.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(16px, 3vw, 40px); margin: 0; }
.tally > div { display: flex; flex-direction: column-reverse; justify-content: flex-end; padding: 14px 0 18px; border-top: 3px solid var(--g-ink); }
.tally dd { margin: 0; font-family: var(--g-display); font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 3.4rem); line-height: 1.1; color: var(--g-navy); font-variant-numeric: tabular-nums; }
.tally dt { color: var(--g-ink-2); font-size: .98rem; }
.tally-src { margin: 4px 0 clamp(40px, 5vw, 64px); font-size: .9rem; color: var(--g-ink-2); }

/* ----- ตารางเส้นบรรทัด ----- */
.ruled { width: 100%; border-collapse: collapse; font-size: 1.02rem; }
.ruled caption { text-align: left; font-family: var(--g-display); font-weight: 600; font-size: 1.1rem; padding-bottom: 10px; }
.ruled th, .ruled td { text-align: left; vertical-align: top; padding: 14px 16px 14px 0; border-bottom: 1px solid rgba(20, 24, 31, .2); }
.ruled thead th { font-family: var(--g-display); font-weight: 600; font-size: .92rem; color: var(--g-ink-2); border-bottom: 3px solid var(--g-ink); padding-block: 8px; }
.ruled tbody th { font-family: var(--g-display); font-weight: 700; color: var(--g-navy); width: 30%; }
.ruled-water { margin-top: 40px; color: var(--g-paper); font-variant-numeric: tabular-nums; }
.ruled-water th, .ruled-water td { border-bottom-color: rgba(255, 255, 255, .28); }
.ruled-water thead th { color: var(--g-on-dark-2); border-bottom-color: var(--g-paper); }
.ruled-water tbody th { color: var(--g-paper); }
.ruled-water .target td, .ruled-water .target th { color: var(--g-lime); font-weight: 700; }

/* ----- ขั้น 4 สามประตู (พื้นกรมท่า) ----- */
.g-navy { background: var(--g-navy); color: var(--g-paper); border-bottom: 0; }
.g-navy .step-num, .g-navy .step-head h2 { color: var(--g-paper); }
.g-navy .step-num::before { color: var(--g-lime); }
.doors { display: grid; grid-template-columns: 1fr 1.35fr 1fr; gap: 0; align-items: start; }
.door { padding: 0 clamp(16px, 2.5vw, 32px); border-left: 2px solid rgba(255, 255, 255, .3); }
.door:first-child { padding-left: 0; border-left: 0; }
.door h3 { font-size: 1.4rem; margin-bottom: .4em; }
.door p { color: #d7e0ec; }
.soon { display: inline-block; margin-left: 6px; padding: 0 6px; font-size: .78rem; font-weight: 600; color: var(--g-navy); border: 1px solid var(--g-navy); vertical-align: middle; }
.door-soon { font-size: .95rem; padding-top: 10px; border-top: 1px dashed rgba(255, 255, 255, .4); }
.door-form { background: var(--g-paper); color: var(--g-ink); padding: 28px clamp(18px, 2.4vw, 32px); border-left: 0; margin-top: -8px; }
.door-form h3 { color: var(--g-navy); }
.g-form { display: grid; gap: 14px; }
.g-form label { display: grid; gap: 4px; font-family: var(--g-display); font-weight: 600; font-size: .98rem; }
.g-form small { font-weight: 400; color: var(--g-ink-2); }
.g-form input, .g-form select {
    width: 100%; min-height: 48px; padding: 10px 12px; font: 400 1rem/1.4 var(--g-body);
    color: var(--g-ink); background: var(--g-paper);
    border: 2px solid var(--g-ink); border-radius: 0;
}
.g-form input:focus-visible, .g-form select:focus-visible { outline: 3px solid var(--g-lime); outline-offset: 0; border-color: var(--g-navy); }
.g-form .g-btn { width: 100%; margin-top: 4px; }
.g-choice { margin: 0; padding: 0; border: 0; display: grid; gap: 6px; }
.g-choice legend { padding: 0 0 4px; font-family: var(--g-display); font-weight: 600; font-size: .98rem; }
.g-choice label { display: flex; align-items: center; gap: 10px; font-family: var(--g-body); font-weight: 500; min-height: 36px; }
.g-choice input { width: 20px; min-height: 0; height: 20px; accent-color: var(--g-go); margin: 0; }
.form-fine { margin: 0; font-size: .85rem; color: var(--g-ink-2) !important; }
.form-err { padding: 12px 14px; margin-bottom: 14px; background: #fbe6e9; color: #8c0b20; border: 2px solid var(--g-bad); font-size: .95rem; }
.form-ok { padding: 16px; background: #e5f2e7; color: #164f22 !important; border: 2px solid var(--g-ok); font-weight: 600; }

/* ----- ขั้น 5 บทเรียน ----- */
.lessons { list-style: none; padding: 0; margin: 28px 0 24px; border-top: 3px solid var(--g-ink); }
.lessons li { display: grid; grid-template-columns: 7rem minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid rgba(20, 24, 31, .2); align-items: baseline; }
.ls-n { font-family: var(--g-display); font-weight: 700; color: var(--g-navy); }
.lessons b { font-family: var(--g-display); font-size: 1.2rem; }
.lessons span:last-child { color: var(--g-ink-2); }

/* ----- ขั้น 7 กราฟตลอดลำน้ำ ----- */
.profile { margin: 0; }
.profile svg { display: block; width: 100%; height: auto; }
.profile figcaption { margin-top: 10px; font-size: .95rem; color: var(--g-on-dark-2); }
.profile figcaption b { color: var(--g-paper); }
.profile .p-base { stroke: rgba(255, 255, 255, .5); stroke-width: 1; }
.profile .p-line { fill: none; stroke: var(--g-paper); stroke-width: 3; stroke-linejoin: round; }
.profile .p-area { fill: rgba(255, 255, 255, .12); }
.profile .p-weir { stroke: var(--g-lime); stroke-width: 2; stroke-dasharray: 6 6; }
.profile .p-sensor { fill: var(--g-lime); }
.profile text { fill: var(--g-on-dark-2); font: 600 13px var(--g-display); }

/* ----- ขั้น 8 บันได ----- */
.grow { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.ladder { list-style: none; margin: 0; padding: 0 0 0 34px; position: relative; }
.ladder::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8px;
    background: var(--g-navy);
}
.ladder li { position: relative; display: flex; flex-direction: column; padding: 12px 0; border-bottom: 1px solid rgba(20, 24, 31, .16); }
.ladder li::before { content: ""; position: absolute; left: -34px; top: 26px; width: 22px; height: 4px; background: var(--g-navy); }
.ladder li:first-child b { color: var(--g-go); }
.ladder b { font-family: var(--g-display); font-size: 1.3rem; color: var(--g-navy); }
.ladder span { color: var(--g-ink-2); }
.contests h3 { font-size: 1.35rem; }
.contests ul { list-style: none; margin: 0 0 16px; padding: 0; border-top: 3px solid var(--g-ink); }
.contests li { display: flex; flex-direction: column; padding: 14px 0; border-bottom: 1px solid rgba(20, 24, 31, .2); }
.contests li span { color: var(--g-ink-2); font-size: .95rem; }

/* ----- ขั้น 9 ส่งต่อ (พื้นเขียวโลโก้) ----- */
.g-green { background: var(--g-go); color: var(--g-paper); border-bottom: 0; }
.g-green .step-num, .g-green .step-head h2 { color: var(--g-paper); }
.g-green .step-num::before { color: var(--g-lime); }
.g-green a:not(.g-btn) { color: var(--g-paper); }
.share-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 72px); }
.share-grid h3 { font-size: 1.35rem; }
.works { list-style: none; margin: 0 0 16px; padding: 0; border-top: 3px solid var(--g-paper); }
.works li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid rgba(255, 255, 255, .35); }
.works b { font-family: var(--g-display); font-size: 1.15rem; }
.works span { color: #d9ecd9; white-space: nowrap; }
.invite p { color: #e3f1e3; }
.invite-sub { margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(255, 255, 255, .35); }
.share-done { display: block; min-height: 1.6em; margin-top: 8px; font-weight: 600; }
.g-green .g-btn-paper { color: var(--g-go-deep); }
.g-green .g-btn-paper:hover { color: #fff; border-color: #fff; }

/* ----- ปิดท้าย ----- */
.g-close { padding-block: clamp(72px, 10vw, 140px); border-top: 4px solid var(--g-navy); }
.g-close h2 { font-size: clamp(2.2rem, 5.2vw, 4.2rem); line-height: 1.2; color: var(--g-navy); max-width: 16ch; margin: 0; }
.g-partner { margin: 40px 0 0; font-family: var(--g-display); font-weight: 600; color: var(--g-ink-2); }

/* ----- จอแคบ: ไม้วัดนอนเป็นแถบบนสุด ----- */
@media (max-width: 1100px) {
    .askers, .translate { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 0; }
    .askers figure:nth-child(3) { padding-left: 0; border-left: 0; grid-column: 1 / -1; }
    .path li { min-height: 150px; }
    .path li:nth-child(2) { min-height: 175px; }
    .path li:nth-child(3) { min-height: 200px; }
    .path li:nth-child(4) { min-height: 225px; }
    .doors { grid-template-columns: 1fr 1fr; gap: 40px 0; }
    .door-form { grid-column: 1 / -1; grid-row: 1; margin: 0; }
    .door:nth-child(1) { padding-left: 0; border-left: 0; }
}
@media (max-width: 900px) {
    .home { --g-rail: 0px; font-size: 16.5px; }
    .gauge-page { grid-template-columns: minmax(0, 1fr); }
    .gauge-rail {
        top: 0; height: 56px; width: 100%; padding: 0; border-right: 0; border-bottom: 3px solid var(--g-navy);
    }
    .gauge-plate { border: 0; overflow: hidden; }
    .gauge-plate::before {
        inset: auto 0 0 0; width: auto; height: 12px;
        background:
            linear-gradient(var(--g-navy), var(--g-navy)) bottom / 100% 4px no-repeat,
            repeating-linear-gradient(to right, var(--g-navy) 0 calc(100% / 54), transparent calc(100% / 54) calc(100% / 27));
    }
    .gauge-water { top: 0; bottom: 0; right: auto; height: auto; width: calc(var(--level) * 100%); box-shadow: inset -3px 0 0 var(--g-silt-hi); transition: width .9s var(--g-ease); }
    .gauge-water::after { display: none; }
    .gauge-marks { flex-direction: row; }
    .gauge-marks li { border-bottom: 0; border-right: 1px solid rgba(20, 24, 31, .14); }
    .gauge-marks li:nth-child(3), .gauge-marks li:nth-child(6) { border-top: 0; border-right: 3px solid var(--g-navy); }
    .gauge-marks a { padding: 0 0 10px; justify-content: center; }
    .mark-num { font-size: 1.2rem; min-width: 1.7em; }
    .mark-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .g-hero { min-height: 0; }
    .grow, .share-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 640px) {
    .plates { grid-template-columns: minmax(0, 1fr); }
    .plate { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 12px; padding: 22px 16px 14px; }
    .plate + .plate { border-left: 0; border-top: 3px solid var(--g-ink); }
    .askers, .translate, .doors { grid-template-columns: minmax(0, 1fr); }
    .path { grid-template-columns: minmax(0, 1fr); border-bottom: 0; }
    .path li, .path li:nth-child(n) { min-height: 0; padding: 14px 0 14px 16px; border-right: 0; border-bottom: 3px solid var(--g-ink); }
    .path li:nth-child(2) { margin-left: 22px; }
    .path li:nth-child(3) { margin-left: 44px; }
    .path li:nth-child(4) { margin-left: 66px; }
    .askers figure, .door { padding-left: 0; border-left: 0; }
    .askers figure + figure { padding-top: 28px; border-top: 2px solid rgba(255, 255, 255, .35); }
    .doors .door-form { padding: 24px 18px; }
    .g-hero { padding-block: 28px 36px; }
    .g-hero h1 { font-size: 2.5rem; margin-bottom: .2em; }
    .g-hero .g-lede { font-size: 1.02rem; line-height: 1.6; margin-bottom: 0; }
    .plates { margin-top: 18px; }
    .plate { padding: 18px 14px 10px; }
    .plate-a { font-size: 1.45rem; }
    .plate-q { min-width: 6.5em; }
    .plate-v { flex-basis: 100%; }
    .plates-note { font-size: .84rem; line-height: 1.5; }
    .g-hero .g-actions { margin-top: 18px; }
    .door + .door { padding-top: 28px; border-top: 2px solid rgba(255, 255, 255, .3); }
    .lessons li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
    .ruled th, .ruled td { padding-right: 10px; font-size: .95rem; }
    .ruled tbody th { width: auto; }
    .g-actions .g-btn { flex: 1 1 100%; }
    .works li { flex-direction: column; gap: 0; }
    .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .findings tbody th { width: auto; }
}

@media (prefers-reduced-motion: reduce) {
    .gauge-water, .mark-num, .mark-label, .plate::before { transition: none; }
}
