/* Layout help for the translated copies of the shop page (/ru/ /de/ /ja/ /zh/).
   Only those pages load this file, after style.css and checkout.css; the English page never does.
   Written by hand. tools/i18n/build_i18n.py copies it to assets/i18n/i18n.css and stamps its address with the file's
   own fingerprint, so a changed file is never met by a cached old copy.
   Rule for this file: change how much room a text gets, never the look of the page. */

/* ---------- Japanese and Chinese: letters the page's fonts do not have ----------
   Manrope and Inter stay first for Latin letters, prices and product names; the system's own font of the language comes
   right after them. Naming it (and the page's lang) keeps a browser from picking a font of the other language. */
html[lang="ja"]{
  --head:"Manrope","Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Yu Gothic","Meiryo","Noto Sans JP",sans-serif;
  --sans:"Inter","Hiragino Sans","Hiragino Kaku Gothic ProN","Yu Gothic UI","Yu Gothic","Meiryo","Noto Sans JP",sans-serif;
}
html[lang="zh-Hans"]{
  --head:"Manrope","PingFang SC","Microsoft YaHei UI","Microsoft YaHei","Noto Sans SC","Source Han Sans SC",sans-serif;
  --sans:"Inter","PingFang SC","Microsoft YaHei UI","Microsoft YaHei","Noto Sans SC","Source Han Sans SC",sans-serif;
}
/* the tight letter spacing of the Latin headings squeezes these letters, and the wide spacing of the small capital
   labels pulls them apart: both go back to normal */
html:is([lang="ja"],[lang="zh-Hans"]) :is(h1,h2,h3,.motto,.p-name,.p-total,.picker-l,.p-label,.req-t,.p-kick,.tl-tag,.ct-tag,.tag,.badge,.sp-tbl th){letter-spacing:0}
/* these languages break a line between any two letters, so a line of running text may not end on a lone mark */
html:is([lang="ja"],[lang="zh-Hans"]) :is(p,li,summary,h1,h2,h3){line-break:strict;word-break:normal;overflow-wrap:anywhere}

/* ---------- Russian and German: long words in narrow columns ----------
   The feature lists stand in two narrow columns; a long word (гражданских, преступников, Spielerliste) would take a line
   of its own. The browser hyphenates them by the page's language instead. Running text is left as it is. */
html:is([lang="ru"],[lang="de"]) :is(.flist li,.req-list li,.ct-tag,.opt-name,.how-steps li,.sp-tbl td){hyphens:auto;-webkit-hyphens:auto}
/* two narrow list columns: a little less gap between them and before the bullet (20 -> 12 px, 14 -> 12 px), so a
   long Russian or German item ("Игнор гражданских,") keeps its line instead of breaking into four */
html:is([lang="ru"],[lang="de"]) .flist{column-gap:12px}
html:is([lang="ru"],[lang="de"]) .flist li{padding-left:12px}

/* ---------- from the native review of the built pages (28 Nov 2026) ----------
   The feature words of the title are inline-blocks in style.css, and a browser may break a line right after an
   inline-block, even before "、" or ",". Here they are inline and kept whole, so the mark stays with its word. */
.hero h1 .kw{display:inline;white-space:nowrap}
/* Russian: "Выгоднее всех" does not fit next to KEYCARD, so that one tag dropped under its name. Every tab now puts its
   tag above the name, the layout the phones already use, and the four tabs look alike. */
html[lang="ru"] .ct-top{flex-direction:column-reverse;gap:6px}
/* Japanese: break the title and the short texts of the buy box between phrases, not inside a katakana word
   (keep-all for every browser, auto-phrase where the browser has it) */
html[lang="ja"] .hero h1{word-break:keep-all;word-break:auto-phrase}
html[lang="ja"] :is(.addon-sum,.addon-main small){word-break:keep-all}
html[lang="ja"] #buy{word-break:auto-phrase}
html[lang="ja"] #buy :is(.addon-sum,.addon-main small){word-break:keep-all}
/* the small caption on a preview picture: a long Russian or German word ("предупреждения") stays inside the picture */
html:is([lang="ru"],[lang="de"]) .thumb span{max-width:calc(100% - 12px);hyphens:auto;-webkit-hyphens:auto;overflow-wrap:break-word}
/* Chinese and Japanese: the tags on the product tabs are set for Latin capitals (about 10 px); many-stroke characters
   blur at that size, so they get 12 px here (the words are already the shortest forms) */
html:is([lang="zh-Hans"],[lang="ja"]) .ct-tag{font-size:12px;letter-spacing:0}
