/* Android phone + text-size fixes (Claude Code 2026-11-14, owner: "check test all UI on Android phone, and also text size";
   then "on Android phone, Good morning Sochearita cannot see full name — change size or style for phone").
   Found by testing every screen at 360×800 and 412×915 with text sizes 14 / 18 / 22 / 28. Loaded last (index.html).
   Delete a block to undo it. */

/* 1. Phone greeting with a name: "Good morning," on one line, the name on its own line underneath (larger, gold italic),
      so a long name like "Sochearita" shows in full. Phones and tablets only (computers do not show this heading). */
@media (max-width: 1099px) {
  html body #v-home#v-home section.card.myspace .ms-head .ms-greet:has(.ms-greet-name) {
    display: flex !important; flex-direction: column; align-items: flex-start;
    font-size: min(1.12rem, 21px) !important; line-height: 1.12 !important; white-space: normal !important;
    overflow: visible !important; text-overflow: clip !important;
  }
  html body #v-home#v-home section.card.myspace .ms-head .ms-greet:has(.ms-greet-name) .ms-greet-name {
    display: block; max-width: 100%; font-size: min(1.62rem, 9vw, 34px); line-height: 1.05;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 2px;
  }
  html body #v-home#v-home section.card.myspace:has(.ms-greet-name) .ms-banner { padding-top: 66px !important; }
  html body #v-home#v-home section.card.myspace .ms-head:has(.ms-greet-name) { align-items: center; }
  html body #v-home#v-home section.card.myspace .ms-head #msRowT:has(.ms-greet-name) { overflow: visible !important; white-space: normal !important; }
}

/* 2. Labels that were 11–11.9 px at the phone text size (rule: never under 12 px) */
html body #brandHeader #langPick .lp-now,
html body #v-home .myspace .wotd-k,
html body #v-dict #sec-register .reg-row span.k,
html body #v-writing .wr-mode-btn small,
html body #v-translator #vtApiBtnText { font-size: max(12px, .66rem) !important; }

/* 3. Word page: meanings were split in the middle of a word ("conse | nt") — words now move whole to the next line;
      a word longer than the whole line can still break */
html body #v-dict .mean-def { word-break: normal !important; overflow-wrap: break-word !important; }

/* 4. Settings: "Upgrade to Premium" was wider than its button at large text — text capped, and it may wrap */
html body #v-settings#v-settings .sg-profile .pc-big { height: auto !important; min-height: 52px; flex-wrap: wrap; font-size: min(1.08rem, 20px) !important; }
html body #v-settings#v-settings .sg-profile .pc-big > span { flex: 0 1 auto !important; white-space: normal !important; text-align: center; min-width: 0; }

/* 5. Chat: at large text the two-emoji icons of Add Friend / New Group / QR · Sound covered their labels and were cut */
@media (max-width: 820px) {
  .lx-side-btn span.ic { font-size: min(1.05rem, 19px) !important; line-height: 1.2; }
  .lx-side-btn { min-width: 0; overflow: hidden; }
}

/* 6. Translator: the title was cut to "Voice …" at large text */
html body #v-translator .vt-header-title { font-size: min(1.22rem, 21px) !important; }

/* 7. My Space key bar (Photo · Music · Themes · Stop): at large text the four keys crowded and icons ran into the words —
      the words stay 12–15 px (never under 12, never so big the bar breaks) */
html body #v-home .myspace .ms-chip { font-size: clamp(12px, .66rem, 15px) !important; white-space: nowrap; min-width: 0; }
html body #v-home .myspace .ms-chip .ic { flex: 0 0 auto; width: 1.1em !important; height: 1.1em !important; }
html:is([data-text-size="24"], [data-text-size="26"], [data-text-size="28"]) body #v-home .myspace .ms-chip {
  padding-left: 3px !important; padding-right: 3px !important; gap: 3px !important; font-size: clamp(12px, .66rem, 14px) !important;
}

/* 8. Word page › Structure (seen on 412 px phones): group titles, C1/C2, pattern types, Essential, Learn more and the
      count bubble were 10–11.9 px → at least 12 px */
html body #v-dict#v-dict :is(.st-ghead h3, .st-adv-lvl, .st-learn, .st-type, .lvl-badge, .rel-count) { font-size: max(12px, .66rem) !important; }
html body #v-dict#v-dict#v-dict span.lvl-badge.lvl-badge { font-size: max(12px, .66rem) !important; }   /* "Essential" — a stronger rule elsewhere */

/* 10. owner 2026-11-14 (photo of the Word of the Day block: "scale 0.9"): phones / tablets — the whole Word of the Day
       (label, word, IPA, sound key, translation, meaning) drawn at 90 %. */
@media (max-width: 1099px) {
  html body #v-home#v-home section.card.myspace .wotd { zoom: .9; }
}
@media (max-width: 1099px) {   /* the small "Word of the day" label stays ≥ 12 px after the 90 % scale (13.4 × .9 = 12) */
  html body #v-home#v-home section.card.myspace .wotd .wotd-k { font-size: max(13.4px, .74rem) !important; }
}

/* 11. owner 2026-11-14 (photo of the Word of the Day: "relocate or move down this to [the] narrow UI" — the Photo · Music ·
       Themes · Stop bar): the Word of the Day box stretched to fill the waterfall but kept its words at the top, leaving an
       empty gap above the bar → its words now sit at the bottom, just above the bar; the waterfall shows between the
       greeting and the word. Phones / tablets. */
@media (max-width: 1099px) {
  html body #v-home#v-home section.card.myspace .wotd { justify-content: flex-end !important; }
}
