/* ==========================================================================
   fonts.css — ฟอนต์ + ไอคอนแบบฝังในเครื่อง (offline/iOS-safe · D5)
   เดิม index.html โหลด Google Fonts (Prompt) + Phosphor Icons จาก CDN ภายนอก
   → เน็ต iPhone ไม่นิ่ง/ออฟไลน์ = ไอคอนไมค์/ลำโพงหายเป็นกล่องเปล่า
   แก้: ดาวน์โหลด woff2 จริงมาไว้ใน ./fonts/ แล้วประกาศ @font-face ชี้ในเครื่อง
   ไฟล์ทั้งหมด cache ผ่าน sw.js (urlsToCache) → ใช้งานได้ 100% แม้ไม่มีเน็ต
   ========================================================================== */

/* ---------- Google "Prompt" (ไทย + latin · น้ำหนัก 400/500/600/700) ---------- */
/* unicode-range คัดจาก Google Fonts จริง — ตัด vietnamese/latin-ext ที่แอปไม่ใช้ */

/* 400 */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/prompt-thai-400.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('./fonts/prompt-latin-400.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;
}
/* 500 */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/prompt-thai-500.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('./fonts/prompt-latin-500.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;
}
/* 600 */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/prompt-thai-600.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('./fonts/prompt-latin-600.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;
}
/* 700 */
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/prompt-thai-700.woff2') format('woff2');
  unicode-range: U+02D7, U+0303, U+0331, U+0E01-0E5B, U+200C-200D, U+25CC;
}
@font-face {
  font-family: 'Prompt';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('./fonts/prompt-latin-700.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;
}

/* ---------- Phosphor Icons (เฉพาะ weight ที่แอปใช้: Fill + Bold) ---------- */
@font-face {
  font-family: "Phosphor-Fill";
  src: url("./fonts/Phosphor-Fill.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: "Phosphor-Bold";
  src: url("./fonts/Phosphor-Bold.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: block;
}

.ph-fill {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: "Phosphor-Fill" !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Enable Ligatures ================ */
  letter-spacing: 0;
  -webkit-font-feature-settings: "liga";
  -moz-font-feature-settings: "liga=1";
  -moz-font-feature-settings: "liga";
  -ms-font-feature-settings: "liga" 1;
  font-feature-settings: "liga";
  -webkit-font-variant-ligatures: discretionary-ligatures;
  font-variant-ligatures: discretionary-ligatures;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.ph-bold {
  /* use !important to prevent issues with browser extensions that change fonts */
  font-family: "Phosphor-Bold" !important;
  speak: never;
  font-style: normal;
  font-weight: normal;
  font-variant: normal;
  text-transform: none;
  line-height: 1;

  /* Enable Ligatures ================ */
  letter-spacing: 0;
  -webkit-font-feature-settings: "liga";
  -moz-font-feature-settings: "liga=1";
  -moz-font-feature-settings: "liga";
  -ms-font-feature-settings: "liga" 1;
  font-feature-settings: "liga";
  -webkit-font-variant-ligatures: discretionary-ligatures;
  font-variant-ligatures: discretionary-ligatures;

  /* Better Font Rendering =========== */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ไอคอนที่แอปใช้จริง (codepoint คัดจาก Phosphor CSS v2.1.2) */
.ph-fill.ph-barbell:before        { content: "\e0b6"; }
.ph-fill.ph-chats-circle:before   { content: "\e17e"; }
.ph-fill.ph-fire:before           { content: "\e242"; }
.ph-fill.ph-gift:before           { content: "\e276"; }
.ph-fill.ph-heart:before          { content: "\e2a8"; }
.ph-fill.ph-lightning:before      { content: "\e2de"; }
.ph-fill.ph-lock-key:before       { content: "\e2fe"; }
.ph-fill.ph-map-trifold:before    { content: "\e31a"; }
.ph-fill.ph-microphone:before     { content: "\e326"; }
.ph-fill.ph-skull:before          { content: "\e916"; }
.ph-fill.ph-speaker-high:before   { content: "\e44a"; }
.ph-fill.ph-speaker-low:before    { content: "\e44c"; }
.ph-fill.ph-treasure-chest:before { content: "\ede2"; }
.ph-fill.ph-user-circle:before    { content: "\e4c4"; }
.ph-bold.ph-arrow-left:before     { content: "\e058"; }
