/* tos-ux.css — ชั้นหน้าตาของหน้า ToS/ดาวน์โหลด (โหลดหลัง <style> ใน index.html ที่ build_web.py สร้าง)
   ธีม LŪMEN: ฟ้าน้ำแข็งสีเดียว · ไม่มีมุมโค้ง · ไม่มีเงาฟุ้ง · ไม่มีแอนิเมชันวนตอนอยู่เฉย
   จุดเด่นจุดเดียวของหน้า = ปุ่มดาวน์โหลด · ที่เหลือช่วยให้อ่านง่ายและรู้ว่าอยู่ขั้นไหน */

/* ---------- พื้นหลัง: กริดเส้นบาง + มุมกรอบ แบบโชว์รูม ---------- */
body { position: relative; }
body::before {
    content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
    background-image:
        linear-gradient(rgba(175, 221, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(175, 221, 255, .045) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: linear-gradient(#000 0, rgba(0, 0, 0, .35) 420px, transparent 900px);
    mask-image: linear-gradient(#000 0, rgba(0, 0, 0, .35) 420px, transparent 900px);
}
.top { background: rgba(7, 9, 12, .97); }
.top-dl { box-shadow: none; }

/* ---------- หัวหน้า ---------- */
.hero { position: relative; padding: 64px 0 36px; }
.hero::after { content: ''; display: block; width: 64px; height: 3px; margin-top: 22px; background: var(--acc); }
.hero h1 { font-size: 48px; letter-spacing: -.01em; }
.hero .meta span + span::before { content: ''; display: inline-block; width: 4px; height: 4px; margin: 0 14px 0 -4px; vertical-align: middle; background: var(--line); }

/* ---------- 4 ขั้นตอน: แถวยาวเต็มกว้าง อยู่บนสุด (สิ่งแรกที่ต้องรู้) ---------- */
.notice { grid-template-columns: minmax(0, 1fr); border: 0; gap: 18px; margin-bottom: 56px; }
.notice .steps { order: -1; position: relative; padding: 24px 26px 26px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.notice .steps > .label { color: var(--acc); }
.notice .steps ol { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin-top: 26px; counter-reset: none; }
.notice .steps li.st { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 0 22px 0 0; }
.notice .steps li.st + li.st { padding-left: 22px; border-left: 1px solid var(--line-soft); }
.st-n { width: 40px; height: 40px; font-size: 16px; }
.st b { font-size: 16.5px; line-height: 1.45; }
.st small { font-size: 14px; }
.st.now::after { content: ''; position: absolute; left: 0; right: 22px; top: -12px; height: 3px; background: var(--acc); }
.st + .st.now::after { left: 22px; }
.st a.st-a { display: inline-block; margin-top: 6px; }
.notice .age { border: 1px solid rgba(255, 210, 122, .28); padding: 18px 24px 18px 28px; }
.notice .age h2 { font-size: 17px; margin-bottom: 4px; }
.notice .age p { font-size: 15px; color: rgba(255, 255, 255, .78); }
.notice .mob { border: 1px solid var(--acc); order: -2; }

/* ---------- เนื้อหาข้อตกลง: หัวข้ออ่านง่าย มีเลขกล่อง + ✓ เมื่ออ่านแล้ว ---------- */
.doc { max-width: 800px; }
.doc section { padding: 40px 0 34px; }
.doc h2 { grid-template-columns: 44px minmax(0, 1fr); column-gap: 18px; align-items: start; font-size: 23px; font-weight: 500; margin-bottom: 20px; }
.doc h2 .num { grid-row: span 2; display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-top: -4px; border: 1px solid var(--acc); color: var(--acc); font-size: 15px; letter-spacing: 0; line-height: 1; background: rgba(175, 221, 255, .05); transition: background .25s, color .25s; }
.doc h2 em { display: block; margin-top: 2px; font-size: 13.5px; }
.doc section.seen h2 .num { background: var(--acc); color: #000; }
.doc ul { gap: 16px; padding-left: 62px; }
.doc li { line-height: 1.85; color: rgba(255, 255, 255, .86); }
.doc li::before { top: .92em; width: 10px; height: 2px; }
.doc li b { color: #fff; }
.doc section > p { padding-left: 62px; }

/* สารบัญ: เห็นชัดว่าข้อไหนอ่านแล้ว */
.toc > .label { color: var(--acc); }
.toc ol { border-left-color: var(--line); }
.toc a.done { color: var(--text); }

/* ---------- กล่องดาวน์โหลด: จุดเด่นหลักของหน้า ---------- */
.gate { max-width: none; margin: 72px 0 0; padding: 36px 40px 34px; border: 1px solid var(--acc); background: rgba(175, 221, 255, .035); }
.gate .c { width: 22px; height: 22px; border-width: 0; }
.gate .c.tl, .gate .c.tr, .gate .c.bl, .gate .c.br { border-color: var(--acc); }
.gate .c.tl { left: -6px; top: -6px; border-left-width: 3px; border-top-width: 3px; }
.gate .c.tr { right: -6px; top: -6px; border-right-width: 3px; border-top-width: 3px; }
.gate .c.bl { left: -6px; bottom: -6px; border-left-width: 3px; border-bottom-width: 3px; }
.gate .c.br { right: -6px; bottom: -6px; border-right-width: 3px; border-bottom-width: 3px; }
.gate > .label { color: var(--acc); }
.gate h2 { font-size: 34px; margin: 10px 0 24px; }
.btn-big { min-height: 96px; padding: 18px 28px; gap: 22px; }
.btn-big .bi { width: 60px; height: 60px; font-size: 30px; }
.btn-big .bt b { font-size: 26px; }
.btn-big .bt small { font-size: 15px; }
.btn-big.on, .bar .btn-dl.on { animation: dlOn .6s cubic-bezier(.16, 1, .3, 1); }
.btn-big.on .bi { background: #000; color: var(--acc); border-color: #000; }
@keyframes dlOn { 0% { transform: scale(.97); background: #fff; } 100% { transform: none; } }
.gate-one { font-size: 16px; }
.gate-sha { margin-top: 20px; }

/* ---------- วิธีติดตั้ง ---------- */
.inst { margin-top: 88px; }
.inst > .label { color: var(--acc); }
.inst h2 { font-size: 34px; }
.inst-fix:not(.inst-tool) { display: flex; align-items: center; gap: 12px; max-width: 780px; margin: 0 0 12px; padding: 14px 18px; border: 1px solid rgba(255, 210, 122, .4); background: var(--warn-soft); color: var(--warn); font-size: 15px; line-height: 1.6; }
.inst-fix:not(.inst-tool)::before { content: '!'; display: flex; align-items: center; justify-content: center; flex-shrink: 0; width: 26px; height: 26px; border: 1px solid var(--warn); font-size: 15px; font-weight: 700; line-height: 1; }
.inst-fix:not(.inst-tool):hover { background: var(--warn); color: #000; }
.inst-fix:not(.inst-tool):hover::before { border-color: #000; }
.inst-tool { margin: 0 0 30px; }
.step { transition: border-color .2s; }
.step:hover { border-color: rgba(175, 221, 255, .45); }
.step-n { background: rgba(175, 221, 255, .06); }

/* ---------- แถบล่าง: ความคืบหน้าอ่านชัด ---------- */
.bar { background: rgba(8, 11, 15, .98); border-top: 1px solid var(--line); }
.bar::before { content: ''; position: absolute; left: 0; right: 0; top: -1px; height: 1px; background: transparent; }
.bar-line { height: 3px; background: rgba(255, 255, 255, .1); }
.bar-line i { height: 3px; }
.bar-txt b { font-size: 16px; font-weight: 700; }
.bar:not(.locked) { background: #0b1118; }
.bar:not(.locked) .bar-read { color: var(--acc); }

/* ---------- ท้ายหน้า ---------- */
.foot { border-top-color: var(--line-soft); }

/* ---------- จอกลาง/เล็ก ---------- */
@media (max-width: 960px) {
    .notice .steps ol { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 22px; }
    .notice .steps li.st:nth-child(3) { padding-left: 0; border-left: 0; }
    .st.now::after { display: none; }
}
@media (max-width: 640px) {
    .top .chip { display: none; }   /* จอเล็ก: ให้ที่กับปุ่มดาวน์โหลด (ชื่อเซิร์ฟมีในหัวหน้าอยู่แล้ว) */
    .top-in { gap: 8px; }
    .top-dl { height: 32px; padding: 0 10px; font-size: 12.5px; white-space: nowrap; }
    .lang button { padding: 0 9px; }
    .hero { padding: 36px 0 24px; }
    .hero h1 { font-size: 30px; }
    .hero::after { margin-top: 16px; }
    .notice .steps { padding: 18px 16px 20px; }
    .notice .steps ol { grid-template-columns: minmax(0, 1fr); row-gap: 14px; }
    .notice .steps li.st, .notice .steps li.st + li.st { flex-direction: row; gap: 12px; padding: 0; border-left: 0; }
    .st-n { width: 32px; height: 32px; flex-shrink: 0; font-size: 14px; }
    .st b { font-size: 15.5px; }
    .notice .age { padding: 16px 16px 16px 20px; }
    .doc h2 { grid-template-columns: 36px minmax(0, 1fr); column-gap: 12px; font-size: 19px; }
    .doc h2 .num { width: 36px; height: 36px; font-size: 13px; margin-top: -2px; }
    .doc ul, .doc section > p { padding-left: 0; }
    .gate { padding: 24px 16px 22px; margin-top: 48px; }
    .gate h2 { font-size: 24px; }
    .btn-big { min-height: 76px; padding: 12px 14px; gap: 12px; }
    .btn-big .bi { width: 42px; height: 42px; font-size: 22px; }
    .btn-big .bt b { font-size: 18px; }
    .btn-big .bt small { font-size: 13px; }
    .inst { margin-top: 56px; }
    .inst h2 { font-size: 24px; }
    .inst-fix:not(.inst-tool) { font-size: 14px; padding: 12px 14px; }
}
@media (prefers-reduced-motion: reduce) { .btn-big.on, .bar .btn-dl.on { animation: none; } }
