/* Phone compact spacing (Claude Code 2026-11-13, owner Android photo: "all on phone keep all space very narrow, avoid only
   overlaid — phone small screen, if you keep many space user feel bored, then need to scroll all search words").
   Phones only (html.is-phone = shorter screen side < 600 px, set by store/prefs.js); tablets and computers unchanged.
   Loaded last. Every gap is cut to the smallest that still keeps things from touching. */

/* ---- app header (logo row) ---- */
html.is-phone body #brandHeader { padding-top: 6px !important; margin-bottom: 6px !important; }

/* ---- word page: search → headword → level / pronunciation → tabs → meanings ---- */
html.is-phone body #v-dict { padding-top: 0 !important; }
html.is-phone body #v-dict > .search-wrap form.search { margin-bottom: 2px !important; }
html.is-phone body #v-dict .word-head { margin-bottom: 6px !important; row-gap: 4px !important; gap: 4px !important; }
html.is-phone body #v-dict .word-meta { row-gap: 4px !important; }
html.is-phone body #v-dict .word-meta .pron-row { margin-top: 0 !important; }
html.is-phone body #v-dict .section-nav { padding-top: 2px !important; padding-bottom: 6px !important; margin-bottom: 2px !important; }
html.is-phone body #v-dict :is(#sec-definition, #sec-register, #sec-structure) { padding-top: 6px !important; }
html.is-phone body #v-dict .ecard-head { margin-bottom: 2px !important; padding-bottom: 4px !important; }
html.is-phone body #v-dict #defFull li.mean { padding-bottom: 6px !important; }

/* ---- word page: no vertical gold lines on phones; that text moves to the left edge (owner 2026-11-13: "all this erase then
   relocate all text to left hand side in order to minimize space") ---- */
/* examples under each meaning: no line, no deep indent (a little room stays for the gold • that starts each sentence) */
html.is-phone body #v-dict #sec-definition .mean-ex { border-left: 0 !important; margin-left: 0 !important; padding-left: 1em !important; }
/* Word forms / family / related / origin blocks */
html.is-phone body #v-dict .ws-block::before { display: none !important; }
html.is-phone body #v-dict .ws-block { padding-left: 0 !important; }
html.is-phone body #v-dict .ws-path > li::after { display: none !important; }
/* Examples tab: the level rows */
html.is-phone body #v-dict #sec-register .reg-row { border-left: 0 !important; margin-left: 0 !important; padding-left: 0 !important; }
/* Grammar tab: no timeline line; C1 / C2 stays beside the title, the sentence + pattern use the full width */
html.is-phone body #v-dict #sec-structure :is(.st-rows, .st-adv-row)::before,
html.is-phone body #v-dict #sec-structure .st-adv-lvl::after { display: none !important; }
html.is-phone body #v-dict #sec-structure .st-adv-row :is(.st-adv-ex, .st-adv-formula) { grid-column: 1 / 3 !important; }

/* ---- other screens: the big gaps found on a 360 px phone (16–28 px) cut to 6–8 px ---- */
html.is-phone body #v-saved .sv-bar { margin-top: 2px !important; margin-bottom: 2px !important; }
html.is-phone body #v-settings .settings-head { margin-top: 2px !important; margin-bottom: 6px !important; }
html.is-phone body #v-settings .set-exit { margin-top: 6px !important; }
html.is-phone body #v-writing .writing-card { row-gap: 6px !important; gap: 6px !important; }
html.is-phone body #v-writing .wr-mode { margin-bottom: 2px !important; }
html.is-phone body #v-writing .wr-under { margin-top: 0 !important; }
html.is-phone body #v-writing #writingResultsCard { row-gap: 6px !important; gap: 6px !important; }
html.is-phone body #v-writing :is(.wr-taskcheck, .wr-fixchips) { margin-top: 2px !important; margin-bottom: 2px !important; }
html.is-phone body #v-writing .wr-levels3 { margin-top: 0 !important; margin-bottom: 4px !important; }

/* the one ⌃ key on meaning 1 (DefinitionPanel.js, owner 2026-11-13) ended 7 px into the speaker under it — a little smaller on
   phones so the two never touch */
html.is-phone body #v-dict #sec-definition .mean-row > .mean-acts .mean-toggle { width: 28px !important; height: 28px !important; min-width: 28px !important; min-height: 28px !important; margin-top: -2px !important; }
html.is-phone body #v-dict .mean-toggle .ic { width: 15px !important; height: 15px !important; }

/* ---- "narrow enter for all on phone" (owner 2026-11-14): less space between lines / items ---- */
/* word page: meanings and their examples */
html.is-phone body #v-dict #defFull ol.mean-list { row-gap: 3px !important; gap: 3px !important; }
html.is-phone body #v-dict #defFull li.mean { padding-top: 1px !important; padding-bottom: 3px !important; }
html.is-phone body #v-dict #defFull .mean-ex { row-gap: 1px !important; gap: 1px !important; margin-top: 2px !important; }
html.is-phone body #v-dict #defFull .mean-ex > li { padding-top: 0 !important; padding-bottom: 0 !important; }
html.is-phone body #v-dict :is(#sec-structure p.st-adv-ex, .ws-block p) { margin-top: 2px !important; }
html.is-phone body #v-dict #sec-register .reg-row p.v { padding-top: 1px !important; }
html.is-phone body #v-dict #sec-structure .st-adv-row { padding-top: 5px !important; padding-bottom: 5px !important; }
/* Settings: rows (label above its control on phones) */
html.is-phone body #v-settings :is(.gx-row, .row-btn) { min-height: 44px !important; padding-top: 4px !important; padding-bottom: 4px !important; row-gap: 3px !important; }

/* ---- full-width sentences on phones (owner 2026-11-14: "extend writing to the right-hand side, keep the same left-hand
   side … use the full phone space"): the 42 px speaker column is given to the text ---- */
/* Definitions examples: the 🔈 follows the last word (like the meaning lines) */
html.is-phone body #v-dict #defFull li.ex-row { display: block !important; text-align: justify; text-align-last: start; }
html.is-phone body #v-dict #defFull li.ex-row > p { display: inline !important; }
html.is-phone body #v-dict #defFull li.ex-row > .say-pair { display: inline-flex !important; vertical-align: -.2em; margin-left: 4px !important; }
html.is-phone body #v-dict #defFull li.ex-row > .tr-line:not([hidden]) { display: block !important; }
/* Grammar: the sentence spans the full width; its 🔈 sits at the right of the "AI-generated · checked …" line below */
html.is-phone body #v-dict #sec-structure .st-adv-row .st-adv-ex { grid-column: 1 / -1 !important; }
html.is-phone body #v-dict #sec-structure .st-adv-row > .say-pair { grid-column: -2 / -1 !important; grid-row: 3 !important; align-self: start !important; justify-self: end !important; }
html.is-phone body #v-dict #sec-structure .st-adv-row .st-adv-formula { grid-column: 1 / -2 !important; grid-row: 3 !important; }
/* meaning lines: the 42 px kept for the ⌃ key only where the key still is (meaning 1, 32 px for the 28 px key) */
html.is-phone body #v-dict #defFull .mean-row:not(:has(.mean-toggle)) > .mean-def { padding-right: 0 !important; }
html.is-phone body #v-dict #defFull .mean-row:has(.mean-toggle) > .mean-def { padding-right: 32px !important; }
html.is-phone body #v-dict #defFull .mean-row:not(:has(.mean-toggle)) > .mean-acts { display: none !important; }
/* meaning lines now use the full width, so their 🔈 follows the last word (it was pinned to the right edge and the longer
   lines ran under it) */
html.is-phone body #v-dict #defFull .mean-def .say-pair { position: static !important; display: inline-flex !important; vertical-align: -.2em; margin-left: 4px !important; inset: auto !important; }

/* Grammar › Word patterns examples (li.lvl-ex — the darker gold line; owner: "this one too for phone" / "erase this"): no line,
   no 42 px indent (the box .pb keeps 1em for the gold •), full width, the 🔈 follows the last word */
html.is-phone body #v-dict #sec-structure .pb { padding-left: 0 !important; }   /* like the C1 / C2 rows (owner: "relocate like c1 c2") */
html.is-phone body #v-dict #sec-structure ul.lvl-list { margin-left: 0 !important; padding-left: 0 !important; border-left: 0 !important; }
html.is-phone body #v-dict #sec-structure ul.lvl-list::before, html.is-phone body #v-dict #sec-structure li.lvl-ex::before,
html.is-phone body #v-dict #sec-structure li.lvl-ex > .lvl::before, html.is-phone body #v-dict #sec-structure li.lvl-ex > .lvl::after { display: none !important; }
html.is-phone body #v-dict #sec-structure li.lvl-ex { display: block !important; border-left: 0 !important; margin-left: 0 !important; padding-left: 0 !important; text-align: justify; text-align-last: start; }
/* .lvl ("Ex1") is screen-reader text only — it takes no space */
html.is-phone body #v-dict #sec-structure li.lvl-ex > p { display: inline !important; }
html.is-phone body #v-dict #sec-structure li.lvl-ex > .say-pair { display: inline-flex !important; vertical-align: -.2em; margin-left: 4px !important; }

/* owner 2026-11-14 ("add . dot before example"): every Grammar example (Word patterns + C1 / C2) starts with the gold •, written
   inline so the sentence still starts at the left edge (the Definitions examples already have theirs) */
html.is-phone body #v-dict #sec-structure :is(li.lvl-ex > p, p.st-adv-ex)::before {
  content: "•" !important; display: inline !important; position: static !important; inset: auto !important;
  margin: 0 .35em 0 0 !important; color: var(--reading-accent, #B08A3E) !important; font-weight: 700 !important;
}

/* owner 2026-11-14 ("Yes, fix it"): a short sentence that filled its line pushed its 🔈 onto a line of its own and the
   justified line spread its words. On phones the inline 🔈 takes NO line width (it hangs after the last word); the text
   gives 10 px back at the right so the key stays inside the card; a wider invisible tap area keeps it easy to hit */
html.is-phone body #v-dict :is(#defFull li.ex-row, #defFull .mean-row:not(:has(.mean-toggle)) > .mean-def, #sec-structure li.lvl-ex) { padding-right: 10px !important; }
html.is-phone body #v-dict :is(#defFull li.ex-row > .say-pair, #defFull .mean-def .say-pair, #sec-structure li.lvl-ex > .say-pair) {
  width: 22px !important; min-width: 0 !important; margin-left: 2px !important; margin-right: -24px !important; overflow: visible !important;
}
html.is-phone body #v-dict :is(#defFull li.ex-row > .say-pair, #defFull .mean-def .say-pair, #sec-structure li.lvl-ex > .say-pair) > .say {
  width: 22px !important; min-width: 22px !important; height: 24px !important; min-height: 0 !important; padding: 0 !important; position: relative;
}
html.is-phone body #v-dict :is(#defFull li.ex-row > .say-pair, #defFull .mean-def .say-pair, #sec-structure li.lvl-ex > .say-pair) > .say > .say-ic::after {
  content: ""; position: absolute; inset: -10px -8px; }
/* 320 px phones: the Definitions card is a grid whose column grew to the meaning lines' one-line width (297 px > 276 px inside
   the card), so the list ran 8 px past the card — the column now never grows past the card */
html.is-phone body #v-dict .card.entry-card { grid-template-columns: minmax(0, 1fr) !important; }
html.is-phone body #v-dict .card.entry-card > * { min-width: 0 !important; max-width: 100% !important; }
