/* Settings › Profile & Membership — four separate cards (Claude Code 2026-11-16).
   Owner (photo of the card): "look so heavy — splitting to 4 cards, and on phone use only symbol; other devices keep".
   The big gold "Upgrade to Premium" bar is gone; Upgrade is the first of four equal cards in one row (a gold-accented card, not a
   gold slab), then Manage Plan & Billing · Restore Purchases · Update Version. Each card is its own tile with a thin gold edge.
   Phones (< 600 px): symbols only — the names stay for screen readers (visually hidden). Tablets / PC keep the labels.
   Markup: SettingsScreen.js (.pc-keys.pc-keys4, .pc-key-up). Loaded last; the triple id outranks the older profile-card rules. */

html body #v-settings#v-settings#v-settings .pc-keys.pc-keys4 {
  display: grid !important; grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 10px !important;
  margin-top: 4px !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; background: none !important; box-shadow: none !important; overflow: visible !important;
}
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key,
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key + .pc-key {
  position: relative; min-width: 0; min-height: 84px !important; margin: 0 !important; padding: 12px 6px !important;
  display: grid !important; justify-items: center !important; align-content: center !important; gap: 7px !important;
  border: 1px solid rgba(214, 184, 120, .45) !important; border-radius: 16px !important;
  background: var(--one-tile, rgba(20, 34, 52, .85)) !important; box-shadow: inset 0 1px 0 rgba(255, 240, 200, .07) !important;
  font: 600 13px/1.25 Manrope, var(--sans, system-ui), sans-serif !important; letter-spacing: .01em; color: rgba(244, 238, 223, .94) !important; text-align: center;
  transition: border-color .18s ease, background .18s ease, transform .15s ease;
}
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key .ic { width: 22px !important; height: 22px !important; color: #E0C68C !important; margin: 0 !important; }
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key span { white-space: normal !important; }
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key:hover { border-color: rgba(226, 203, 148, .9) !important; }
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key:active { transform: scale(.97); }
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key:focus-visible { outline: 2px solid #F4DFA6; outline-offset: 2px; }
/* Upgrade: the same card, marked in gold (a finer accent than the old full gold bar) */
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key-up {
  border-color: #E0C68C !important;
  background: linear-gradient(180deg, color-mix(in srgb, #E0C68C 22%, var(--one-tile, #14223A)), color-mix(in srgb, #E0C68C 8%, var(--one-tile, #14223A))) !important;
  box-shadow: inset 0 1px 0 rgba(255, 240, 200, .18), 0 0 10px rgba(224, 198, 140, .22) !important; color: #F6E7C1 !important;
}
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key-up .ic { width: 24px !important; height: 24px !important; color: #F2D88E !important; }
/* the old big gold bar is no longer placed; if an older copy of the page still has it, hide it */
html body #v-settings#v-settings#v-settings .profile-card > .pc-big { display: none !important; }

/* phones: symbols only (names kept for screen readers) */
@media (max-width: 599px) {
  html body #v-settings#v-settings#v-settings .pc-keys.pc-keys4 { gap: 8px !important; }
  html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key,
  html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key + .pc-key { min-height: 56px !important; padding: 0 !important; gap: 0 !important; border-radius: 14px !important; }
  html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key span {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important;
    clip: rect(0 0 0 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important;
  }
  html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key .ic { width: 24px !important; height: 24px !important; }
  html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key-up .ic { width: 26px !important; height: 26px !important; }
}
@media (prefers-reduced-motion: reduce) { html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key { transition: none; } }

/* 2026-11-16 owner (crop): "splitting to 4 cards" — the row now stands outside the profile card's frame, as four free cards
   under it, with the same left / right edges as the profile card */
html body #v-settings#v-settings#v-settings .pc-keys.pc-keys4.pc-keys4 { margin: 10px 0 0 !important; width: 100% !important; box-sizing: border-box; }
html body #v-settings#v-settings#v-settings .pc-upd-note { margin: 8px 6px 0 !important; }

/* the profile frame + four cards: one wrapper, one even gap (12 px) — the same rhythm as between Settings sections */
html body #v-settings#v-settings#v-settings .sg-profile-wrap { display: grid; align-content: start; gap: 12px; min-width: 0; }
html body #v-settings#v-settings#v-settings .sg-profile-wrap > .sgroup { margin: 0 !important; }
html body #v-settings#v-settings#v-settings .sg-profile-wrap > .pc-keys.pc-keys4 { margin: 0 !important; }
html body #v-settings#v-settings#v-settings .sg-profile-wrap > .pc-upd-note { margin: -4px 6px 0 !important; }
/* one rhythm: the same gap between the profile frame and its cards as between Settings sections (18 px two-column, measured) */
html body #v-settings#v-settings#v-settings.st-split .sg-profile-wrap { gap: 18px; }
/* phones (one column): sections sit 10 px apart (measured) — the profile frame → cards → next section follow the same 10 px */
html body #v-settings#v-settings#v-settings:not(.st-split) .sg-profile-wrap { gap: 10px; margin-bottom: 4px; }
/* the phone profile card kept two empty rows ("big", "keys") from the old layout — now it is just the name row */
html body #v-settings#v-settings#v-settings .sg-profile .profile-card { grid-template-areas: "who who" !important; grid-template-rows: auto !important; }

/* 2026-11-16 owner: "ui profile name must fit with text" — the stand-alone profile frame hugs its text: the octagon medallion is as
   tall as the name + "Free member" block, and the frame keeps a calm 10 px above and below */
html body #v-settings#v-settings#v-settings .sg-profile .profile { padding-top: 10px !important; padding-bottom: 10px !important; min-height: 0 !important; align-items: center !important; }
html body #v-settings#v-settings#v-settings .sg-profile .profile .avatar.avatar {
  width: var(--pf-h, 46px) !important; height: var(--pf-h, 46px) !important; min-width: 0 !important; flex: none !important;
  font-size: calc(var(--pf-h, 46px) * .42) !important;
}
html body #v-settings#v-settings#v-settings .sg-profile .profile .av-wreath { display: none !important; }
html body #v-settings#v-settings#v-settings .sg-profile .profile-card { padding-top: 0 !important; padding-bottom: 0 !important; }
html body #v-settings#v-settings#v-settings .sg-profile { --pf-h: 48px; }

/* 2026-11-16 owner: "whole setting ui must align row or column" — two-column Settings (tablet / PC): the left menu starts on the
   same line as the profile frame next to it (it sat 12 px lower) and ends level with the content column; the title bar already
   spans exactly from the menu's left edge to the content's right edge */
html body #v-settings#v-settings#v-settings.st-split > .st-side { margin-top: 0 !important; }
/* the section card fills its row, so the menu and the content end on the same line in every section */
html body #v-settings#v-settings#v-settings.st-split > .sgroup:not(.st-hide) { align-self: stretch !important; }
/* wide screens: the title bar spans the menu + content columns exactly (it had its own max width) */
html body #v-settings#v-settings#v-settings.st-split > .settings-head { max-width: none !important; width: auto !important; justify-self: stretch !important; margin-left: 0 !important; margin-right: 0 !important; }

/* 2026-11-16 owner: "setting ui not fit with text" — the left menu frame was stretched ~270 px past its last item, and its labels
   broke onto two lines in a 200 px column. Now: a 240 px column (the longest label, "Installation & Updates", fits on one line),
   one-line items, and the frame ends right after "Privacy & Legal" (it still starts level with the profile frame). */
html body #v-settings#v-settings#v-settings.st-split { grid-template-columns: 240px minmax(0, 1fr) !important; }
html body #v-settings#v-settings#v-settings.st-split > .st-side { align-self: start !important; height: auto !important; }
html body #v-settings#v-settings#v-settings.st-split .st-tab { white-space: nowrap; min-height: 54px !important; }
html body #v-settings#v-settings#v-settings.st-split .st-tab br { display: none; }
/* section cards: the space under the last row matches the space above the header (the body's own 8 px came on top of the row's) */
html body #v-settings#v-settings#v-settings .sgroup:not(.sg-profile) > .group-body { padding-bottom: 0 !important; }
/* all themes check 2026-11-16: "Free member" measured 4.48 on Calm Teal (needs 4.5) — a touch brighter */
html body #v-settings#v-settings#v-settings .sg-profile .tag { color: rgba(244, 238, 223, .86) !important; }
/* phone check 2026-11-17 (360 px): the section name "Installation & Updates" was cut to "Installation & Upd…" (224 px of text in a
   213 px slot). Small phones: the names step down to fit one line; with a large reading size they wrap instead of being cut. */
@media (max-width: 380px) {
  html body #v-settings#v-settings#v-settings .group-head .h-card { font-size: min(24.84px, 6.1vw) !important; white-space: normal !important; text-overflow: clip !important; overflow-wrap: break-word; }
}

/* 2026-11-17 owner (photo of the Update Version card): "mention version or current version to let user understand".
   Under the four cards: one calm line — "LexiGlobal 2.3.1 · updated 17 Nov 2026, 09:12 · Up to date ✓" (gold when a newer version
   is ready). On the Update card (tablet / PC — phone cards are symbols only): the short version, e.g. "v2.3.1 ✓". */
html body #v-settings#v-settings#v-settings .sg-profile-wrap > .pc-ver-line {
  margin: -4px 8px 0 !important; text-align: center; font: 500 13px/1.4 Manrope, var(--sans, system-ui), sans-serif;
  color: rgba(244, 238, 223, .82); letter-spacing: .01em;
}
html body #v-settings#v-settings#v-settings .sg-profile-wrap > .pc-ver-line.is-new { color: #F2D88E; font-weight: 600; }
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key .pc-ver {
  display: block; margin-top: -2px; font: 600 11.5px/1.2 Manrope, var(--sans, system-ui), sans-serif; color: #E0C68C; opacity: .95; white-space: nowrap;
}
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key .pc-ver:empty { display: none; }
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key.has-new .pc-ver { color: #F6E7C1; }
@media (max-width: 599px) {
  html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key .pc-ver { display: none !important; }
  html body #v-settings#v-settings#v-settings .sg-profile-wrap > .pc-ver-line { font-size: 12px; margin-top: -2px !important; }
}
html body #v-settings#v-settings#v-settings .sg-profile-wrap > .pc-ver-line .nb { white-space: nowrap; }
/* 2026-11-21 owner ("Yes, add to Settings"): Install App = a fifth card while it is shown (hidden once installed) */
html body #v-settings#v-settings#v-settings .pc-keys.pc-keys4:has(.pc-key-inst:not([hidden])) { grid-template-columns: repeat(5, minmax(0, 1fr)) !important; }
html body #v-settings#v-settings#v-settings .pc-keys4 .pc-key.pc-key-inst[hidden] { display: none !important; }
