/**
 * Self-hosted web fonts, shared across the site.
 *
 * ONE FACE: Poppins 500, latin subset only - a single 7.7 KB file.
 *
 * v3 replaced Marcellus 400 + Roboto 500 (four files, ~61 KB). Marcellus is the original SonicMaps
 * Player's face and this white-label should read as its own product; Roboto only ever styled three
 * buttons. One geometric sans now covers menu, headings, titles and buttons, and it also sits better
 * next to the Hangul, which renders in the device's Korean Gothic (a sans) - see below.
 *
 * WHY SELF-HOSTED at all rather than a Google Fonts <link>: sw-400.js can precache a Google
 * STYLESHEET but never the fonts.gstatic.com woff2 files it points at, because those URLs are only
 * discoverable by parsing the stylesheet. An installed Player that went offline therefore had the
 * @font-face rules and no font data. Same-origin files are ordinary assets the worker can list.
 *
 * WHY LATIN ONLY. Google also serves latin-ext and devanagari subsets for Poppins; neither is
 * shipped. The latin range (U+0000-00FF + typographic punctuation) already covers English, Spanish,
 * French, German and Italian (é, ñ, ü, à, ç...). latin-ext is for Polish, Czech, Vietnamese etc.;
 * a character from it would simply render in the fallback sans-serif. Devanagari is never needed.
 *
 * font-display: swap so text paints in the fallback immediately rather than staying invisible.
 *
 * Source (pinned by the version in the filename - re-download from here if ever updating):
 *   Poppins 500 v24  https://fonts.googleapis.com/css2?family=Poppins:wght@500  (the "latin" block)
 * unicode-range is copied verbatim from the Google stylesheet.
 */

/* Poppins 500 - the only face: menu, headings, project titles, buttons. */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: url(poppins-v24-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;
}


/* ---------------------------------------------------------------------------
   KOREAN, AND DELIBERATELY WITHOUT DOWNLOADING A KOREAN FONT.

   This instance defaults to Korean, so most of what a visitor reads is Hangul. The face above
   cannot render any of it - its unicode-range stops at Latin-1 - so without this rule every
   Korean string falls past 'Poppins' to whatever `sans-serif` resolves to on that device.

   WHY NOT SELF-HOST NOTO SANS KR. Google serves it as 124 woff2 subsets of 9-13 KB, about 1.3 MB
   in total, and subsetting to known strings is not possible because the project's own titles and
   zone cards are Korean too and change. Precaching 1.3 MB to replace a font every Korean phone
   already ships is not worth it.

   WHAT THIS DOES INSTEAD. It maps the SAME family name to the device's own Korean fonts, for
   Hangul codepoints only, so every `font-family: Poppins, sans-serif` picks it up with no change.
   The ranges do not overlap, so Poppins still renders the Latin in a mixed line.

   IT DEGRADES GRACEFULLY. If none of the named fonts exist on the device, the rule contributes
   nothing and the cascade falls through to `sans-serif`.

   local() here is the @font-face descriptor, not the Local Font Access API.

   The ranges are Hangul only: Jamo, Compatibility Jamo, Syllables and the two extended blocks.
   Punctuation is deliberately left out so Poppins keeps rendering the ASCII full stops and
   question marks inside Korean sentences.
   --------------------------------------------------------------------------- */

@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 500;
    font-display: swap;
    src: local('Apple SD Gothic Neo Medium'), local('AppleSDGothicNeo-Medium'),
         local('Noto Sans KR Medium'), local('NotoSansKR-Medium'), local('Noto Sans CJK KR Medium'),
         local('Apple SD Gothic Neo'), local('AppleSDGothicNeo-Regular'),
         local('Noto Sans KR'), local('NotoSansKR-Regular'), local('Noto Sans CJK KR'),
         local('Malgun Gothic'), local('MalgunGothic'), local('Nanum Gothic');
    unicode-range: U+1100-11FF, U+3130-318F, U+A960-A97F, U+AC00-D7A3, U+D7B0-D7FF;
}
