/* Home — first class (Claude Code 2026-11-09; owner: "TRY FOR ALL THEME": Word of the Day, equal cards, one border, gold coin,
   softer search, small motion). Loaded last; remove the <link> in index.html to undo (backups work/backups/*2026-11-09-before-*). */

/* ------------------------------------------------ background photo: darker, so it stays behind (all themes show it like royal-navy) */
body[data-route="home"] .home-bg::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none;
  background: rgba(5, 14, 32, .42);
}

/* ------------------------------------------------ header: the 65+ line moves into the search placeholder */
#brandHeader #langsBtn { display: none !important; }
#brandHeader { row-gap: 0 !important; }

/* ------------------------------------------------ search: calmer text */
#v-home .home-search .search input {
  font-weight: 400 !important; letter-spacing: .005em;
}
#v-home .home-search .search input::placeholder {
  font-weight: 400; opacity: .72;
}
@media (max-width: 599px) {
  #v-home .home-search .search input { font-size: 1rem !important; }
}

/* ------------------------------------------------ 6 cards: equal height, one-line subtitles, lift on touch */
#v-home .shortcuts { grid-auto-rows: 1fr; }
#v-home .shortcuts .shortcut { height: 100%; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
#v-home .shortcuts .shortcut .s {
  display: block !important; -webkit-line-clamp: unset !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (hover: hover) {
  #v-home .shortcuts .shortcut:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .22), 0 0 0 1px color-mix(in srgb, var(--sig-gold, #C9A055) 45%, transparent); }
}
#v-home .shortcuts .shortcut:active { transform: translateY(-2px) scale(.985); box-shadow: 0 10px 22px rgba(0, 0, 0, .24); }

/* ------------------------------------------------ My Space: one border, gold coin, no Open pill */
#v-home .myspace .ms-badge, #v-home .myspace .ms-head .end { display: none !important; }
#v-home .myspace .ms-head { grid-template-columns: auto minmax(0, 1fr) !important; }
#v-home .myspace .avatar-ic.ms-coin {
  width: 34px !important; height: 34px !important; border-radius: 50%;
  display: grid; place-items: center;
  font: 700 1.05rem/1 "Cormorant Garamond", Georgia, serif; color: #2A1C05 !important;
  background: radial-gradient(circle at 35% 30%, #FFF6D8 0%, #EBC673 48%, #A97A2A 100%) !important;
  border: 1px solid #F3D896; box-shadow: inset 0 -2px 0 rgba(110, 74, 14, .35), 0 3px 8px rgba(0, 0, 0, .25);
}
#v-home .myspace .ms-banner { border: 0 !important; box-shadow: none !important; margin: 0 8px 8px !important; border-radius: 16px !important; }

/* ------------------------------------------------ Real 10s Silent Waterfall Video (owner 2026-11-09) */
.ms-banner-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  pointer-events: none;
  z-index: 1;
}
#v-home .myspace .ms-banner-overlay {
  z-index: 2;
}
#v-home .myspace .ms-banner-content {
  position: relative;
  z-index: 3;
}

/* ------------------------------------------------ Word of the Day over the soft photo */
#v-home .myspace.has-wotd .ms-banner-bg { filter: saturate(.9) brightness(.92); }
#v-home .myspace.has-wotd .ms-banner-overlay {
  background: linear-gradient(180deg, rgba(5, 14, 32, .10) 0%, rgba(5, 14, 32, .45) 38%, rgba(5, 14, 32, .86) 100%) !important;
}
#v-home .myspace .ms-banner-content { gap: 10px !important; }
#v-home .myspace .wotd {
  display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 0 8px; cursor: default;
  color: #FFFDF7; text-shadow: 0 1px 3px rgba(0, 0, 0, .45);
}
#v-home .myspace .wotd[hidden] { display: none; }
#v-home .myspace .wotd-k {
  font: 700 .62rem/1 "Manrope", sans-serif; letter-spacing: .18em; text-transform: uppercase; color: #F3D58A;
}
#v-home .myspace .wotd-w {
  font: 700 2.3rem/1.02 "Cormorant Garamond", Georgia, serif; letter-spacing: .005em; text-decoration: none;
  background: linear-gradient(100deg, #FFF6DA 0%, #F3D58A 45%, #FFF1C9 70%, #E3BB64 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .45));
}
#v-home .myspace .wotd-meta { display: inline-flex; align-items: center; gap: 7px; font: 500 .82rem/1.2 "Manrope", sans-serif; color: rgba(255, 253, 247, .86); }
#v-home .myspace .wotd-ipa { font-family: "Charis SIL", "Doulos SIL", "Segoe UI", system-ui, sans-serif; }
#v-home .myspace .wotd-pos { font-style: italic; color: #F3D58A; }
#v-home .myspace .wotd-dot { opacity: .6; }
#v-home .myspace .wotd-play {
  width: 32px; height: 32px; margin-left: 4px; padding: 0; border-radius: 50%; cursor: pointer;
  display: inline-grid; place-items: center; color: #F3D58A;
  background: rgba(10, 22, 48, .55); border: 1px solid rgba(243, 213, 138, .7);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: transform .12s ease;
}
#v-home .myspace .wotd-play .ic { width: 16px; height: 16px; }
#v-home .myspace .wotd-play:active { transform: scale(.92); }
#v-home .myspace .wotd-play.is-playing { color: #2A1C05; background: linear-gradient(180deg, #FFF0C4, #D7A649); }
#v-home .myspace .wotd-tr { font: 600 1.05rem/1.5 "Kantumruy Pro", "Manrope", sans-serif; color: #FFFDF7; }
#v-home .myspace .wotd-tr[hidden] { display: none; }
#v-home .myspace .wotd-def {
  font: 400 .8rem/1.4 "Manrope", sans-serif; color: rgba(255, 253, 247, .78);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 34em;
}
@media (min-width: 600px) {
  #v-home .myspace .wotd-w { font-size: 3rem; }
  #v-home .myspace .wotd-tr { font-size: 1.2rem; }
  #v-home .myspace .wotd-def { font-size: .9rem; }
}

/* ------------------------------------------------ logo: one gold shimmer when the app opens */
#brandHeader .wm-name { position: relative; }
#brandHeader .wm-global {
  background: linear-gradient(100deg, currentColor 0%, currentColor 40%, #FFF6DA 50%, currentColor 60%, currentColor 100%);
  background-size: 300% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: hfShimmer 1.6s ease-out .4s 1 both;
}
@keyframes hfShimmer { from { background-position: 100% 0; } to { background-position: 0 0; } }
@media (prefers-reduced-motion: reduce) {
  #brandHeader .wm-global { animation: none; }
  #v-home .shortcuts .shortcut { transition: none; }
}

/* layout fix: the banner content spans the whole photo; word at the top-left, glass bar at the bottom */
#v-home .myspace.has-wotd .ms-banner { display: flex !important; align-items: stretch !important; }
#v-home .myspace.has-wotd .ms-banner-content {
  display: flex !important; flex-direction: column !important; justify-content: flex-end !important; align-items: stretch !important;
  width: 100% !important; max-width: none !important; flex: 1 1 auto !important; padding: 14px 8px 8px !important; box-sizing: border-box;
}
#v-home .myspace.has-wotd .ms-banner-chips { width: 100% !important; align-self: stretch !important; }
#v-home .home-search .search input { font-size: .86rem !important; }
@media (min-width: 600px) { #v-home .home-search .search input { font-size: 1rem !important; } }

/* 2026-11-09 owner tablet photo: "search bar and OPEN A WIDER WORLD is very narrow" — breathing room under the logo */
#brandHeader.brand-header[data-variant="full"] { margin-bottom: .7rem !important; }
@media (min-width: 600px) { #brandHeader.brand-header[data-variant="full"] { margin-bottom: 1.1rem !important; } }
#v-home .home-search { margin-top: .15rem; }

/* ============ 2026-11-09 phones: every word visible at every text size + review fixes (owner photo at 24px) ============ */
@media (max-width: 599px) {
  /* cards: text may never push past the gold border — it wraps instead (the cut-off "topic[s]" / "edito[r]") */
  #v-home .shortcuts .shortcut { column-gap: 10px !important; padding-left: 12px !important; padding-right: 10px !important; }
  #v-home .shortcuts .shortcut .t, #v-home .shortcuts .shortcut .s { min-width: 0 !important; max-width: 100% !important; }
  #v-home .shortcuts .shortcut .s {
    white-space: normal !important; text-overflow: clip !important; letter-spacing: -.01em;
    display: -webkit-box !important; -webkit-box-orient: vertical; -webkit-line-clamp: 2 !important; overflow: hidden;
  }
  /* large text (22–26px): titles wrap too, the icon stays small, header and search stop growing past their 20px size */
  html:is([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; line-height: 1.12; }
  html:is([data-text-size="22"], [data-text-size="24"], [data-text-size="26"], [data-text-size="28"]) #v-home .shortcuts .shortcut .s { -webkit-line-clamp: 3 !important; }
  html:is([data-text-size="22"], [data-text-size="24"], [data-text-size="26"], [data-text-size="28"]) #v-home .shortcuts .shortcut > .ic { width: 20px !important; height: 20px !important; }
  html:is([data-text-size="22"], [data-text-size="24"], [data-text-size="26"], [data-text-size="28"]) #v-home .shortcuts .shortcut { padding-left: 10px !important; padding-right: 8px !important; column-gap: 8px !important; }
  #brandHeader .brand img { width: min(3.1rem, 62px) !important; }
  #brandHeader .brand .wm-name { font-size: min(1.9rem, 8.4vw, 38px) !important; }
  #brandHeader .brand .wm-tag { font-size: min(.62rem, 2.75vw, 12.4px) !important; }
  html #brandHeader #langPick { font-size: min(.66rem, 13.2px) !important; padding: 7px 14px 7px 16px !important; }
  html #brandHeader #langPick .ic { width: 14px !important; height: 14px !important; }
  #v-home .home-search .search input { font-size: min(.86rem, 17.2px) !important; }
  /* a clean gap between My Space and the name crest */
  #v-home section.card.myspace { margin-bottom: 12px !important; }
}

/* Word of the Day: luminous champagne word + shadows so it reads over white water and dark moss */
#v-home .myspace .wotd-w {
  background: none !important; -webkit-background-clip: border-box !important; background-clip: border-box !important;
  color: #FFE8A3 !important; filter: none !important;
  text-shadow: 0 2px 10px rgba(0, 0, 0, .75), 0 1px 2px rgba(0, 0, 0, .55);
}
#v-home .myspace .wotd-k { text-shadow: 0 1px 6px rgba(0, 0, 0, .85), 0 0 2px rgba(0, 0, 0, .6); }
#v-home .myspace .wotd-meta, #v-home .myspace .wotd-tr, #v-home .myspace .wotd-def { text-shadow: 0 1px 6px rgba(0, 0, 0, .8); }
#v-home .myspace.has-wotd .ms-banner-overlay {
  background:
    linear-gradient(90deg, rgba(5, 14, 32, .55) 0%, rgba(5, 14, 32, .25) 55%, rgba(5, 14, 32, 0) 85%),
    linear-gradient(180deg, rgba(5, 14, 32, .12) 0%, rgba(5, 14, 32, .48) 38%, rgba(5, 14, 32, .88) 100%) !important;
}

/* the photo behind the cards a little darker (the Word of the Day photo is its own picture and is not affected) */
body[data-route="home"] .home-bg::after { background: rgba(5, 14, 32, .52); }

/* dark themes: brighter search mic and brighter Saved / Settings keys */
html:is([data-theme="royal-navy"], [data-theme="emerald-gold"], [data-theme="burgundy-rose"], [data-theme="graphite-copper"]) #v-home .home-search .s-mic { color: #E8EDF5 !important; }
html:is([data-theme="royal-navy"], [data-theme="emerald-gold"], [data-theme="burgundy-rose"], [data-theme="graphite-copper"]) #bottomNav a:not([aria-current="page"]),
html:is([data-theme="royal-navy"], [data-theme="emerald-gold"], [data-theme="burgundy-rose"], [data-theme="graphite-copper"]) #bottomNav a:not([aria-current="page"]) .ic,
html:is([data-theme="royal-navy"], [data-theme="emerald-gold"], [data-theme="burgundy-rose"], [data-theme="graphite-copper"]) #bottomNav a:not([aria-current="page"]) span { color: rgba(245, 238, 220, .92) !important; }

/* 2026-11-10 the two light themes (Silver Platinum, Lavender Platinum) are back: on Home the logo sits on the dark photo,
   so it uses Royal Navy's ivory + gold there */
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-name { color: #FFF6DA !important; text-shadow: 0 2px 8px rgba(0, 0, 0, .55); }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-global { color: #E9C77A !important; }
html:is([data-theme="silver-platinum"], [data-theme="lavender-platinum"]) body[data-route="home"] #brandHeader .wm-tag { color: #E9C77A !important; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
