/* Home 10/10 — Claude Code 2026-11-10 (owner: "redesign homepage with all themes to be 10/10"). Loaded last; all 11 themes.
   Remove the <link> in index.html to undo (backup work/backups/index.2026-11-10-before-home-lux.html). */

/* 1. empty search: no ✕ (it only appears once there is text) */
#v-home form.search[data-has-text="false"] .s-clear { display: none !important; }

/* 2. personal greeting in the My Space heading: small gold label + serif greeting with the first name in gold */
#v-home .myspace .ms-head #msRowT { display: grid !important; gap: 1px; line-height: 1.05; }
#v-home .myspace .ms-kicker { font: 700 .56rem/1 "Manrope", var(--sans); letter-spacing: .2em; text-transform: uppercase; color: #E2BE72; }
#v-home .myspace .ms-greet { font: 600 1.32rem/1.12 "Cormorant Garamond", Georgia, serif; color: var(--sig-text, #FFFDF7); letter-spacing: -.005em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#v-home .myspace .ms-greet-name { color: #F3D58A; font-style: italic; }
#v-home .myspace .ms-head { align-items: center !important; }
/* light themes: the heading sits on their pale card */
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .myspace .ms-greet { color: var(--lt-ink, #1E2C4A); }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .myspace .ms-greet-name { color: var(--lt-acc, #7A5A1C); }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .myspace .ms-kicker { color: var(--lt-acc, #7A5A1C); }

/* 3. the six cards: icon in a fine gold ring (as on the computer) — phones and tablets */
@media not ((min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape))) {
  #v-home .shortcuts .shortcut > .ic {
    width: 1.62rem !important; height: 1.62rem !important; padding: .3rem; box-sizing: border-box; border-radius: 50%; flex: none;
    color: #F3D58A !important; background: rgba(243, 213, 138, .1); border: 1px solid rgba(243, 213, 138, .5);
  }
  html:is([data-theme="silver-platinum"]) #v-home .shortcuts .shortcut > .ic { color: #7A5A1C !important; background: rgba(255, 255, 255, .55); border-color: rgba(122, 90, 28, .45); }
  html:is([data-theme="lavender-platinum"]) #v-home .shortcuts .shortcut > .ic { color: #FFF0C4 !important; background: rgba(255, 255, 255, .14); border-color: rgba(255, 240, 196, .6); }
}
@media (max-width: 599px) {
  #v-home .shortcuts .shortcut { column-gap: 8px !important; padding-left: 9px !important; padding-right: 7px !important; }
}

/* 4. Home fits one screen again: book-page.css adds 96 px of body padding on every page, on top of the app's own room for
   the bottom bar (.app padding-bottom) — on Home that made the page scroll ~100 px of empty space */
body[data-route="home"] { padding-bottom: 0 !important; padding-top: 0 !important; }   /* 2026-11-10: top 0 — .app already pads the safe area / Telegram row; a second env() pad left a ~60 px gap under Telegram's Close row on iPhone */

/* 5. balance (owner: "My Space is bigger than the 6 cards — users can't concentrate on the cards"): phones */
@media (max-width: 599px) {
  /* the six cards share the free height with My Space and become the clear main menu */
  #v-home .shortcuts { flex: 1 1 0 !important; min-height: calc(3 * 3.9rem + 2 * .55rem) !important;
    grid-template-rows: repeat(3, minmax(3.9rem, 1fr)) !important; grid-auto-rows: minmax(3.9rem, 1fr) !important; gap: .55rem !important; }
  #v-home .shortcuts .shortcut { height: auto !important; min-height: 3.9rem !important; align-content: center !important; }
  #v-home .shortcuts .shortcut > .ic { width: 1.9rem !important; height: 1.9rem !important; padding: .38rem !important; }
  #v-home .shortcuts .shortcut .t { letter-spacing: -.012em !important; }
  #v-home .shortcuts .shortcut .t { font-size: .79rem !important; }
  #v-home .shortcuts .shortcut .s { font-size: .6rem !important; line-height: 1.3 !important; letter-spacing: -.01em !important; }
  /* My Space: as tall as its content needs, sharing the rest — no empty photo above the word */
  #v-home section.card.myspace { flex: 1.1 1 0 !important; min-height: 15.5rem !important; }
  #v-home section.card.myspace .ms-banner { min-height: 0 !important; }
}
@media (max-width: 360px) {
  #v-home .shortcuts .shortcut .t { font-size: .78rem !important; }
  #v-home .shortcuts .shortcut > .ic { width: 1.8rem !important; height: 1.8rem !important; padding: .36rem !important; }
}
@media (max-width: 599px) {
  html:is([data-text-size="20"], [data-text-size="22"], [data-text-size="24"], [data-text-size="26"], [data-text-size="28"]) #v-home .shortcuts .shortcut .t { white-space: normal !important; overflow: visible !important; line-height: 1.12 !important; }
  #v-home section.card.myspace { min-height: 14rem !important; }
}
/* narrow phones (≤ 370 px): titles may wrap; short phones (≤ 700 px tall, e.g. iPhone SE): smaller minimums so Home still fits */
@media (max-width: 370px) {
  #v-home .shortcuts .shortcut .t { font-size: .71rem !important; white-space: nowrap !important; }
  #v-home .shortcuts .shortcut .s { font-size: .56rem !important; }
}
@media (max-width: 599px) and (max-height: 700px) {
  #v-home .shortcuts { min-height: calc(3 * 3.4rem + 2 * .45rem) !important; gap: .45rem !important;
    grid-template-rows: repeat(3, minmax(3.4rem, 1fr)) !important; grid-auto-rows: minmax(3.4rem, 1fr) !important; }
  #v-home .shortcuts .shortcut { min-height: 3.4rem !important; }
}

/* 6. light themes on Home = Royal Navy's rule in a light material (owner: "I feel not 10/10" on Silver Platinum):
   one material — pearl glass (frosted white, soft blur), a fine gold hairline, soft shadow, no bevel — for the search bar,
   the six cards and My Space; Lavender the same with a lavender tint. Logo ivory + gold on the photo. */
html[data-theme="silver-platinum"] { --pg-glass: rgba(246, 248, 251, .80); --pg-glass-2: rgba(236, 240, 246, .72); --pg-line: rgba(176, 138, 58, .55); --pg-ink: #1E2C4A; --pg-ink-2: #46536B; --pg-ic: #8A6420; }
html[data-theme="lavender-platinum"] { --pg-glass: rgba(239, 231, 253, .84); --pg-glass-2: rgba(218, 204, 246, .80); --pg-line: rgba(176, 138, 58, .55); --pg-ink: #2E2758; --pg-ink-2: #564F75; --pg-ic: #6A4E9A; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-lexi { color: #FFF6DA !important; -webkit-text-fill-color: #FFF6DA !important; }

html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .shortcuts .shortcut,
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home section.card.myspace {
  background: linear-gradient(180deg, var(--pg-glass), var(--pg-glass-2)) !important; background-image: linear-gradient(180deg, var(--pg-glass), var(--pg-glass-2)) !important;
  border: 1px solid var(--pg-line) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 22px rgba(4, 12, 28, .26) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
  transform: none;
}
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .shortcuts .shortcut .btn-sheen { display: none !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .shortcuts .shortcut .t { color: var(--pg-ink) !important; text-shadow: none !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .shortcuts .shortcut .s { color: var(--pg-ink-2) !important; opacity: 1 !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .shortcuts .shortcut > .ic {
  color: var(--pg-ic) !important; background: rgba(255, 255, 255, .7) !important; border: 1px solid var(--pg-line) !important; filter: none !important;
}
/* search bar: pearl glass, ink placeholder + icons; the gold search key stays */
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .home-search .search input { color: var(--pg-ink) !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .home-search .search input::placeholder { color: var(--pg-ink-2) !important; opacity: .85; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .home-search .search :is(.s-mic, .s-clear, .s-icon, svg.ic:not(.s-go svg)) { color: var(--pg-ink-2) !important; }
/* My Space: greeting in ink, frame in the same pearl glass (the Word of the Day keeps its photo) */
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .myspace .ms-greet { color: var(--pg-ink) !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .myspace .ms-greet-name,
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .myspace .ms-kicker { color: #8A6420 !important; }

html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .home-search .search input {
  background: linear-gradient(180deg, var(--pg-glass), var(--pg-glass-2)) !important; border: 1px solid var(--pg-line) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 8px 22px rgba(4, 12, 28, .26) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.15); backdrop-filter: blur(14px) saturate(1.15);
}

/* 7. language pill in the light themes = the same pearl glass as the search bar (owner screenshot: navy pill next to pearl search) */
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #brandHeader #langPick {
  background: linear-gradient(180deg, var(--pg-glass), var(--pg-glass-2)) !important; color: var(--pg-ink) !important;
  border: 1px solid var(--pg-line) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 6px 16px rgba(4, 12, 28, .24) !important;
  -webkit-backdrop-filter: blur(14px) saturate(1.15) !important; backdrop-filter: blur(14px) saturate(1.15) !important;
}
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #brandHeader #langPick .ic { color: var(--pg-ic) !important; }

/* 8. short card names (owner chose "Short": Academic · Dictionary · Writing · Videos · Translator · Live Class) → larger type */
@media (max-width: 599px) {
  #v-home .shortcuts .shortcut .t { font-size: .98rem !important; letter-spacing: -.005em !important; white-space: nowrap !important; }
  #v-home .shortcuts .shortcut .s { font-size: .66rem !important; letter-spacing: 0 !important; white-space: nowrap !important; overflow: hidden !important; text-overflow: ellipsis !important; display: block !important; }
  #v-home .shortcuts .shortcut { row-gap: .15rem !important; }
}
@media (max-width: 370px) {
  #v-home .shortcuts .shortcut .t { font-size: .9rem !important; }
  #v-home .shortcuts .shortcut .s { font-size: .6rem !important; }
}
/* calm cards (no moving shine), larger text sizes wrap subtitles instead of cutting them, no duplicate "Add your name" */
#v-home .shortcuts .shortcut .btn-sheen { display: none !important; animation: none !important; }
#v-home .myspace #msRowS { display: none !important; }
@media (max-width: 599px) {
  html:is([data-text-size="20"], [data-text-size="22"], [data-text-size="24"], [data-text-size="26"], [data-text-size="28"]) #v-home .shortcuts .shortcut .s { white-space: normal !important; text-overflow: clip !important; }
}
html body #v-home .myspace .ms-head #msRowS.ms-addname:not([hidden]), html body #v-home .myspace .ms-head #msRowS { display: none !important; }
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  html body #v-home .shortcuts .shortcut .t { font-size: 24px !important; white-space: nowrap !important; }
  html body #v-home .shortcuts .shortcut .s { font-size: 15px !important; }
}

/* 9. last polish (owner "try it" on the 9.5 review) */
/* the Word of the Day listen key in the theme's own dark colour (was always navy) */
#v-home .myspace .wotd-play { background: color-mix(in srgb, var(--vt-base, #070F24) 62%, transparent) !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .myspace .wotd-play { background: rgba(14, 12, 24, .5) !important; }
@media (max-width: 599px) {
  /* My Space reaches down to the name ribbon (was a ~32 px empty band) */
  html.has-name-ribbon body[data-route="home"] .app { padding-bottom: calc(var(--nav-h, 60px) + var(--nav-float, 0px) + var(--safe-b, 0px) + 22px) !important; }
  #v-home section.card.myspace { margin-bottom: 0 !important; }
  /* icon rings ~10 % larger to match the bigger titles */
  #v-home .shortcuts .shortcut > .ic { width: 2.1rem !important; height: 2.1rem !important; padding: .44rem !important; }
}
@media (max-width: 370px) {
  #v-home .shortcuts .shortcut > .ic { width: 1.9rem !important; height: 1.9rem !important; padding: .38rem !important; }
}
@media (max-width: 370px) { #v-home .shortcuts .shortcut { column-gap: 7px !important; padding-left: 8px !important; padding-right: 5px !important; } }

/* 10. light themes = a LIGHT page (owner: "I don't feel comfortable we can get 10/10" on Lavender): light cards on a dark photo
   looked like a harsh checkerboard. The Home photo gets a soft pearl / lavender veil, so the glass cards sit on light; the only
   dark element is the Word of the Day picture. Logo back to dark ink + gold. */
html[data-theme="silver-platinum"] { --pg-veil: linear-gradient(180deg, rgba(244, 247, 251, .80) 0%, rgba(232, 238, 246, .74) 60%, rgba(220, 228, 239, .80) 100%); }
html[data-theme="lavender-platinum"] { --pg-veil: linear-gradient(180deg, rgba(246, 241, 254, .80) 0%, rgba(234, 225, 251, .74) 60%, rgba(222, 210, 247, .82) 100%); }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] .home-bg::after { background: var(--pg-veil) !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-lexi,
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-name { color: var(--pg-ink) !important; -webkit-text-fill-color: var(--pg-ink) !important; text-shadow: none !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-global { color: #9A6E22 !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-tag { color: #8A6420 !important; text-shadow: none !important; }
/* on a light page: softer shadows, a warmer gold hairline that now shows, white glass a touch more opaque */
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home :is(.shortcuts .shortcut, section.card.myspace, .home-search .search input),
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #brandHeader #langPick {
  border-color: rgba(176, 138, 58, .6) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95), 0 6px 18px rgba(46, 39, 88, .10), 0 1px 2px rgba(46, 39, 88, .06) !important;
}
/* the glass a little whiter than the light page, so the cards lift off it */
html[data-theme="lavender-platinum"] { --pg-glass: rgba(255, 255, 255, .90); --pg-glass-2: rgba(244, 238, 254, .88); }
html[data-theme="silver-platinum"] { --pg-glass: rgba(255, 255, 255, .92); --pg-glass-2: rgba(242, 245, 250, .90); }

/* 11. light themes WITH the photo (owner on Silver / Lavender: "add background, then consider colour — more dark is ok"):
   the photo shows through a lighter, theme-tinted veil (stronger at the top for the logo), and the glass is a deeper
   silver / lavender (no longer near-white), so the cards still read as one material on the photo. Dark ink text stays. */
html[data-theme="silver-platinum"] {
  --pg-veil: linear-gradient(180deg, rgba(226, 232, 240, .70) 0%, rgba(214, 222, 233, .46) 30%, rgba(206, 215, 228, .40) 70%, rgba(214, 222, 233, .52) 100%);
  --pg-glass: rgba(228, 233, 240, .88); --pg-glass-2: rgba(204, 213, 226, .88);
}
html[data-theme="lavender-platinum"] {
  --pg-veil: linear-gradient(180deg, rgba(232, 224, 250, .70) 0%, rgba(218, 206, 246, .46) 30%, rgba(208, 194, 242, .40) 70%, rgba(218, 206, 246, .52) 100%);
  --pg-glass: rgba(226, 217, 247, .88); --pg-glass-2: rgba(200, 186, 238, .88);
}
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home :is(.shortcuts .shortcut, section.card.myspace, .home-search .search input),
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #brandHeader #langPick {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 8px 22px rgba(18, 14, 40, .24), 0 1px 2px rgba(18, 14, 40, .10) !important;
}
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) #v-home .shortcuts .shortcut > .ic { background: rgba(255, 255, 255, .55) !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-tag { color: #6E4E14 !important; }
/* 2026-11-11 (owner: one touch play / stop): the MP3 Music key shows when the music plays */
#v-home .ms-chip-music { cursor: pointer; }
#v-home .ms-chip-music.is-playing { color: #F3D58A !important; }
#v-home .ms-chip-music.is-playing .ic { color: #F3D58A !important; filter: drop-shadow(0 0 6px rgba(243, 213, 138, .45)); }
/* 2026-11-11 (owner: "auto text size when 6 cards not full text"): titles and subtitles on one line; src/core/fit-cards.js shrinks
   a text that does not fit (never cut with "…", never wrapped) */
html body #v-home#v-home .shortcuts .shortcut :is(.t, .s) {
  white-space: nowrap !important; overflow: hidden !important; text-overflow: clip !important;
  -webkit-line-clamp: unset !important; display: block !important; min-width: 0 !important; max-width: 100% !important;
}
html body #v-home#v-home .shortcuts .shortcut .t { display: flex !important; align-items: center; }
/* 2026-11-11: at text sizes 22–28 an older rule made the ring 20 px while its padding grew with the text (12 px) — the icon was
   squeezed to ~1 px (empty rings). Phones: the ring is a fixed 38 px with a 20 px icon at every text size */
@media (max-width: 599px) {
  html body #v-home#v-home .shortcuts .shortcut > .ic { width: 38px !important; height: 38px !important; padding: 9px !important; box-sizing: border-box !important; flex: none; }
}
@media (max-width: 370px) {
  html body #v-home#v-home .shortcuts .shortcut > .ic { width: 34px !important; height: 34px !important; padding: 8px !important; }
}
/* 2026-11-11 (owner: "add button play stop"): 4th key in the My Space bar = waterfall Play / Stop */
#v-home .myspace .ms-banner.has-wf-key .ms-banner-chips { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
#v-home .ms-chip-wf { cursor: pointer; }
#v-home .ms-chip-wf[hidden] { display: none !important; }
#v-home .ms-chip-wf.is-playing .ic { color: #F3D58A !important; }
/* 2026-11-11: short phones (≤ 740 px tall): Word of the Day a step more compact so the Photo / Music / Themes / Stop bar
   always fits inside the photo (at 360 × 686 the text pushed the bar out) */
@media (max-width: 599px) and (max-height: 740px) {
  #v-home .wotd { gap: 2px !important; }
  #v-home .wotd .wotd-w { font-size: 1.8rem !important; line-height: 1.05 !important; }
  #v-home .wotd .wotd-meta { margin-top: 0 !important; }
  #v-home .wotd .wotd-play { width: 1.6rem !important; height: 1.6rem !important; }
  #v-home .wotd .wotd-tr { font-size: 1rem !important; line-height: 1.3 !important; }
  #v-home .wotd .wotd-def { font-size: .74rem !important; line-height: 1.3 !important; }
}
/* 2026-11-12 (owner iPhone photo: "on phone the 4 buttons on My Space disappear"): a long meaning pushed the Photo / Music /
   Themes / Stop bar out of the card. The bar now always keeps its place at the bottom; the Word of the Day shrinks instead
   (meaning max 2 lines, Khmer 1 line, a smaller word on short screens). */
@media (max-width: 599px) {
  #v-home#v-home .myspace .ms-banner-content { display: flex !important; flex-direction: column !important; min-height: 0; }
  #v-home#v-home .myspace .wotd { flex: 1 1 auto; min-height: 0; overflow: hidden; }
  #v-home#v-home .myspace .ms-banner-chips { flex: none !important; position: relative; z-index: 2; margin-top: auto; }
  #v-home#v-home .myspace .wotd-def { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  #v-home#v-home .myspace .wotd-tr { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
}
@media (max-width: 599px) and (max-height: 900px) {
  #v-home#v-home .myspace .wotd-def { -webkit-line-clamp: 1; }
}
/* short phones (Telegram bars take height): no half-cut lines — the English meaning is left out, word + Khmer stay */
@media (max-width: 599px) and (max-height: 820px) {
  #v-home#v-home .myspace .wotd-def { display: none !important; }
  #v-home#v-home .myspace .wotd-w { font-size: 2.3rem !important; line-height: 1.05 !important; }
}
