
    /* ==========================================
       ACCOUNT SETTINGS (account.html)
    ========================================== */
    /* 🌟 ใช้ฟอนต์ระบบของอุปกรณ์เอง (ไม่ใช่ฟอนต์เว็บที่โหลดมา) ตามที่แจ้ง 🌟 */
    #view-account { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
    .acc-container { max-width: 600px; margin: 0 auto; padding-bottom: 120px; }
    
    .acc-header {
        position: sticky; top: 0; left: 0; width: 100%; z-index: 100;
        padding: max(16px, env(safe-area-inset-top)) 16px 16px;
        background: rgba(0,0,0,0.85); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
        display: flex; align-items: center; justify-content: space-between;
    }
    .acc-header-left { display: flex; align-items: center; gap: 12px; }
    .acc-back-btn {
        width: 40px; height: 40px; border-radius: 50%; background: transparent;
        display: flex; align-items: center; justify-content: center; font-size: 22px; cursor: pointer;
        transition: transform 0.2s cubic-bezier(0.19, 1, 0.22, 1), background 0.2s;
    }
    .acc-back-btn:active { transform: scale(0.88); background: rgba(255,255,255,0.08); }
    .acc-title { font-size: 21px; font-weight: 800; letter-spacing: -0.03em; }

    .acc-section { margin-top: 32px; padding: 0 16px; }
    .acc-section-title { font-size: 12px; font-weight: 800; color: rgba(255,255,255,0.32); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 12px; padding-left: 14px;}

    .acc-card { background: #111; border-radius: 24px; overflow: hidden; border: 1px solid #1e1e1e; }
    .acc-row {
        display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 14px; gap: 12px;
        border-bottom: 1px solid #1e1e1e; position: relative; cursor: pointer;
        transition: background 0.15s ease;
    }
    .acc-row:last-child { border-bottom: none; }
    .acc-row:active { background: #1a1a1a; }
    .acc-row-static { cursor: default; }
    .acc-row-static:active { background: none; }
    .acc-val-static { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; user-select: text; -webkit-user-select: text; }

    /* ── ไอคอนนำหน้าเมนู — ไม่มีพื้นรอง/ชิปสีตามที่แจ้ง เหลือแค่ไอคอนเปล่าๆ (warn/danger ยังคง
       สีตัวไอคอนไว้ให้พอสื่อความหมายได้ ไม่ใช้เป็นพื้นหลังอีกต่อไป) ── */
    .acc-row-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
    .acc-icon-chip {
        width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
        display: flex; align-items: center; justify-content: center;
        font-size: 19px; color: rgba(255,255,255,0.55);
    }
    .acc-icon-chip.warn { color: #f5a623; }
    .acc-icon-chip.danger { color: #ed4956; }

    /* ── สวิตช์เปิด/ปิด สไตล์ iOS ── */
    .acc-switch {
        position: relative; width: 48px; height: 28px; background-color: rgba(255,255,255,0.16);
        border-radius: 28px; cursor: pointer; transition: background-color 0.25s ease; flex-shrink: 0;
    }
    .acc-switch::after {
        content: ''; position: absolute; top: 2px; left: 2px; width: 24px; height: 24px;
        background-color: #fff; border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.3);
        transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    }
    .acc-switch.active { background-color: #F2F2F7; }
    .acc-switch.active::after { transform: translateX(20px); background-color: #1c1c1e; }
    .acc-switch.disabled { opacity: 0.5; pointer-events: none; }

    /* ── บัญชีที่ถูกบล็อก ── */
    .acc-blocked-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid #1e1e1e; }
    .acc-blocked-item:last-child { border-bottom: none; }
    .acc-blocked-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: #1c1c1c; flex-shrink: 0; }
    .acc-blocked-info { flex: 1; min-width: 0; }
    .acc-blocked-name { font-weight: 700; color: #fff; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .acc-blocked-handle { font-size: 12px; color: #888; }
    .acc-blocked-btn { background: rgba(255,255,255,0.08); color: #fff; border: none; padding: 7px 14px; border-radius: 16px; font-size: 12.5px; font-weight: 700; cursor: pointer; transition: 0.2s; font-family: inherit; flex-shrink: 0; }
    .acc-blocked-btn:active { transform: scale(0.92); background: rgba(255,255,255,0.16); }
    .acc-blocked-empty { padding: 22px 16px; text-align: center; color: #555; font-size: 13.5px; }

    .acc-policy-note { font-size: 12px; color: rgba(255,255,255,0.32); line-height: 1.7; text-align: center; padding: 0 10px; }

    .acc-label { font-size: 15px; font-weight: 600; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .acc-val-wrap { display: flex; align-items: center; gap: 6px; color: #888; font-size: 15px; font-weight: 500; text-align: right; flex: 1; min-width: 0; justify-content: flex-end;}
    .acc-val-wrap i { font-size: 19px; color: rgba(255,255,255,0.25); }
    
    .acc-input-inline {
        background: none; border: none; color: #fff; font-size: 15px; font-weight: 500;
        text-align: right; outline: none; width: 100%;
    }
    .acc-input-inline::placeholder { color: #444; }
    /* 🌟 input[type=date] มีตัวเลขวัน/เดือน/ปีอยู่ใน shadow DOM ของเบราว์เซอร์เอง
       text-align:right บน input ตรงๆ ไม่มีผลกับมัน ต้องเจาะ pseudo-element นี้แทน 🌟 */
    .acc-input-inline[type="date"]::-webkit-date-and-time-value { text-align: right; }

    .acc-danger-btn, .acc-warn-btn {
        width: 100%; padding: 14px 16px; border-radius: 20px; font-family: inherit;
        font-size: 15px; font-weight: 700; display: flex; align-items: center; justify-content: space-between;
        cursor: pointer; transition: transform 0.2s cubic-bezier(0.19, 1, 0.22, 1), background 0.2s;
    }
    .acc-danger-btn > i, .acc-warn-btn > i { font-size: 19px; opacity: 0.4; }

    .acc-danger-btn {
        background: #111; border: 1px solid #1e1e1e; border-radius: 24px; color: #ed4956;
        margin-top: 10px;
    }
    .acc-danger-btn:active { transform: scale(0.98); background: #1a1a1a; }

    .acc-warn-btn {
        background: #111; border: 1px solid #1e1e1e; border-radius: 24px; color: #f5a623;
    }
    .acc-warn-btn:active { transform: scale(0.98); background: #1a1a1a; }

    .acc-export-row { padding: 14px 16px; }
    .acc-export-btn {
        background: #fff; color: #000; border: none; padding: 10px 18px; border-radius: 50px;
        font-size: 13.5px; font-weight: 800; cursor: pointer; transition: 0.2s; font-family: inherit;
        white-space: nowrap; flex-shrink: 0;
    }
    .acc-export-btn:active { transform: scale(0.95); opacity: 0.9; }
    .acc-export-btn:disabled { opacity: 0.5; pointer-events: none; }

    /* ── 💬 ตอบกลับแชท (ข้อความอัตโนมัติ / AI ตอบแทน) — หน้าเต็มจอสไลด์เข้าจากขวา ── */
    #acc-cr { position: fixed; inset: 0; z-index: 1000020; background: #000; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
        display: none; transform: translateX(100%); transition: transform 0.34s cubic-bezier(0.2, 0.9, 0.3, 1);
        font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; color: #fff; }
    #acc-cr.show { display: block; }
    #acc-cr.open { transform: none; }
    .cr-wrap { max-width: 600px; margin: 0 auto; padding-bottom: calc(env(safe-area-inset-bottom) + 60px); }
    .cr-intro { padding: 4px 30px 0; font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.55; }
    .cr-seg { display: flex; gap: 6px; padding: 12px; flex-wrap: wrap; }
    .cr-seg button { flex: 1 1 auto; border: 1px solid #262626; background: transparent; color: #ccc; border-radius: 14px; padding: 10px 12px;
        font: 600 13.5px/1.2 inherit; cursor: pointer; transition: background 0.2s, color 0.2s, transform 0.15s; }
    .cr-seg button.on { background: #fff; color: #000; border-color: #fff; }
    .cr-seg button:active { transform: scale(0.96); }
    .cr-pad { padding: 4px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
    .cr-times { display: flex; align-items: center; gap: 10px; }
    .cr-times input { flex: 1; min-width: 0; background: #1a1a1a; border: 1px solid #262626; color: #fff; border-radius: 12px; padding: 10px 12px; font: 600 15px inherit; color-scheme: dark; }
    .cr-days { display: flex; gap: 6px; }
    .cr-days button { flex: 1; aspect-ratio: 1; max-width: 46px; border-radius: 50%; border: 1px solid #262626; background: transparent; color: #aaa; font: 700 13px inherit; cursor: pointer; }
    .cr-days button.on { background: #fff; color: #000; border-color: #fff; }
    .cr-ta { width: 100%; box-sizing: border-box; min-height: 84px; resize: vertical; background: #1a1a1a; border: 1px solid #262626; color: #fff; border-radius: 14px;
        padding: 12px 14px; font: 500 14.5px/1.5 inherit; outline: none; }
    .cr-ta:focus { border-color: #444; }
    .cr-sub { font-size: 12.5px; color: rgba(255,255,255,0.42); line-height: 1.5; }
    .cr-off { opacity: 0.4; pointer-events: none; }
    .cr-up { display: flex; align-items: center; justify-content: center; gap: 8px; border: 1px dashed #333; border-radius: 16px; padding: 14px; cursor: pointer;
        color: #ddd; font-weight: 700; font-size: 14px; }
    .cr-up:active { background: #141414; }
    .cr-pick { display: flex; flex-wrap: wrap; gap: 6px; }
    .cr-pick button { border: 1px solid #333; background: #161616; color: #fff; border-radius: 12px; padding: 8px 12px; font: 600 13px inherit; cursor: pointer; }
    .cr-pick button small { color: #888; margin-left: 4px; font-weight: 500; }
    .cr-style { background: #161616; border-radius: 14px; padding: 12px 14px; font-size: 13.5px; line-height: 1.55; color: #ddd; }
    .cr-style b { display: block; font-size: 12px; color: #888; margin-bottom: 4px; font-weight: 700; }
    .cr-link { background: none; border: none; color: #ed4956; font: 700 13px inherit; cursor: pointer; padding: 4px 0; align-self: flex-start; }
    .cr-select { background: #1a1a1a; border: 1px solid #262626; color: #fff; border-radius: 12px; padding: 9px 12px; font: 600 14px inherit; color-scheme: dark; }
