/* Home — gold-framed cards and search (Claude Code 2026-11-11, owner mockup: "design 100% the same … colour consider all our
   themes"). Gold frame, gold glow and the pictures (home-art.js) are the brand's fixed gold; the inside of every card is made
   from the active theme's own colours (--btn-a, --vt-base), so navy, emerald, burgundy, rose, stone … each get their card. */

/* ------------------------------------------------------------------ the six cards */
html body #v-home#v-home .shortcuts .shortcut {
  position: relative !important; overflow: hidden !important;
  display: grid !important; grid-template-columns: auto minmax(0, 1fr) !important; grid-template-rows: 1fr auto auto 1fr !important;
  grid-template-areas: "art ." "art t" "art s" "art ." !important;
  align-items: center !important; justify-items: start !important; column-gap: clamp(8px, 2.4vw, 14px) !important; row-gap: 1px !important;
  text-align: left !important; padding: 10px 12px 10px 10px !important; border-radius: 18px !important;
  border: 2px solid transparent !important;
  background:
    radial-gradient(120% 95% at 14% 0%, color-mix(in srgb, var(--btn-a) 55%, #ffffff 18%) 0%, transparent 62%) padding-box,
    radial-gradient(90% 80% at 100% 110%, color-mix(in srgb, var(--btn-a) 70%, transparent) 0%, transparent 70%) padding-box,
    linear-gradient(165deg, color-mix(in srgb, var(--btn-a) 82%, #000) 0%, color-mix(in srgb, var(--vt-base, #071226) 90%, #000) 100%) padding-box,
    linear-gradient(135deg, #FFF3BE 0%, #E9B949 22%, #9A6814 46%, #F7DC82 70%, #B8841F 100%) border-box !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 0 16px rgba(255, 196, 77, .32), 0 10px 22px rgba(0, 0, 0, .45),
              inset 0 1px 0 rgba(255, 255, 255, .14), inset 0 0 18px color-mix(in srgb, var(--btn-a) 45%, transparent) !important;
  backdrop-filter: none !important; -webkit-backdrop-filter: none !important;
  transition: transform .18s ease, box-shadow .18s ease !important;
}
html body #v-home#v-home .shortcuts .shortcut::before {      /* fine inner gold hairline, like the mockup's double frame */
  content: ""; position: absolute; inset: 3px; border-radius: 14px; pointer-events: none;
  border: 1px solid rgba(255, 226, 150, .28);
}
html body #v-home#v-home .shortcuts .shortcut:hover { transform: translateY(-2px); box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 0 22px rgba(255, 204, 92, .5), 0 14px 26px rgba(0, 0, 0, .5) !important; }
html body #v-home#v-home .shortcuts .shortcut:active { transform: translateY(1px); }
html body #v-home#v-home .shortcuts .shortcut .btn-sheen,
html body #v-home#v-home .shortcuts .shortcut > .ic { display: none !important; }

html body #v-home#v-home .shortcuts .shortcut .sc-art {
  grid-area: art; display: block; width: clamp(46px, 13.5vw, 60px); aspect-ratio: 1; flex: none;
  filter: drop-shadow(0 0 6px rgba(255, 205, 90, .28));
}
html body #v-home#v-home .shortcuts .shortcut .sc-art svg { display: block; width: 100%; height: 100%; }

html body #v-home#v-home .shortcuts .shortcut .t {
  grid-area: t; display: block !important; min-width: 0; margin: 0 !important; white-space: nowrap;
  font-family: "Cormorant Garamond", Georgia, serif !important; font-style: italic !important; font-weight: 700 !important;
  color: #FFFFFF !important; letter-spacing: .005em; line-height: 1.02 !important;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .55), 0 0 1px rgba(0, 0, 0, .6);
}
html body #v-home#v-home .shortcuts .shortcut .s {
  grid-area: s; display: block !important; min-width: 0; margin: 0 !important; white-space: nowrap;
  font-family: Manrope, var(--sans) !important; font-weight: 600 !important; color: rgba(255, 255, 255, .9) !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .5);
}
html body #v-home#v-home .shortcuts .shortcut .t .ic { display: none !important; }

/* tablets and computers: bigger pictures, same left-picture layout as the mockup */
@media (min-width: 600px) {
  html body #v-home#v-home .shortcuts .shortcut { padding: 14px 18px 14px 14px !important; border-radius: 20px !important; column-gap: 16px !important; }
  html body #v-home#v-home .shortcuts .shortcut .sc-art { width: clamp(60px, 8vw, 84px); }
}

/* ------------------------------------------------------------------ search bar: gold frame + glow */
html body #v-home#v-home .home-search form.search input,
html body #v-home#v-home .home-search .search input[type="search"] {
  border: 1.5px solid #D9B45A !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 14px rgba(255, 196, 77, .28), inset 0 1px 0 rgba(255, 255, 255, .08) !important;
  background: linear-gradient(180deg, color-mix(in srgb, var(--btn-a) 70%, #000), color-mix(in srgb, var(--vt-base, #071226) 92%, #000)) !important;
}
html body #v-home#v-home .home-search form.search input::placeholder { color: rgba(255, 255, 255, .78) !important; }

@media (prefers-reduced-motion: reduce) { html body #v-home#v-home .shortcuts .shortcut { transition: none !important; } }
/* computers (3 cards per row, often beside the dictionary panel): smaller pictures so every title fits */
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  html body #v-home#v-home .shortcuts .shortcut { padding: 10px 12px 10px 10px !important; column-gap: 10px !important; }
  html body #v-home#v-home .shortcuts .shortcut .sc-art { width: clamp(44px, 3.2vw, 60px); }
}
/* the text boxes are as wide as their text, so fit-cards.js measures the real text width and shrinks only when needed */
html body #v-home#v-home .shortcuts .shortcut .t, html body #v-home#v-home .shortcuts .shortcut .s { width: max-content !important; max-width: none !important; justify-self: start !important; }
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  html body #v-home#v-home .shortcuts .shortcut .sc-art { width: clamp(52px, 4.2vw, 68px); }
}
@media (min-width: 1100px) and (((hover: hover) and (pointer: fine)) or (orientation: landscape)) {
  html body #v-home#v-home .shortcuts .shortcut .sc-art { width: clamp(58px, 5vw, 72px); }
}

/* ------------------------------------------------------------------ My Space: the same gold frame + glow as the six cards
   (owner 2026-11-11: "add gold line around My Space, the same as the 6 cards"). Drawn as an overlay ring (mask), so the photo,
   Word of the Day and the Photo / Music / Themes bar inside keep their own look. */
html body #v-home#v-home section.card.myspace {
  position: relative !important; border-color: transparent !important; border-radius: 18px !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45), 0 0 16px rgba(255, 196, 77, .32), 0 10px 22px rgba(0, 0, 0, .45) !important;
}
html body #v-home#v-home section.card.myspace::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 2px; pointer-events: none; z-index: 5;
  background: linear-gradient(135deg, #FFF3BE 0%, #E9B949 22%, #9A6814 46%, #F7DC82 70%, #B8841F 100%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
@media (min-width: 600px) { html body #v-home#v-home section.card.myspace { border-radius: 20px !important; } }

/* Equal spacing on phones / tablets (owner 2026-11-11: "space between search bar and 6 cards, and 6 cards and My Space —
   4 empty spaces must be equal"): search → row 1, row 1 → row 2, row 2 → row 3, row 3 → My Space all = --home-gap. */
@media (max-width: 1099px) {
  html body #v-home#v-home { --home-gap: 12px; row-gap: 0 !important; gap: 0 !important; }
  html body #v-home#v-home > .home-search { margin-top: 0 !important; margin-bottom: var(--home-gap) !important; padding-bottom: 0 !important; }
  html body #v-home#v-home > .home-search form.search { margin-bottom: 0 !important; }
  html body #v-home#v-home > .shortcuts { margin-top: 0 !important; margin-bottom: var(--home-gap) !important; row-gap: var(--home-gap) !important; padding-top: 0 !important; padding-bottom: 0 !important; }
  html body #v-home#v-home > .ms-slot, html body #v-home#v-home > .ms-slot > section.card.myspace { margin-top: 0 !important; }
}
@media (max-width: 599px) { html body #v-home#v-home > .shortcuts { min-height: calc(3 * 3.9rem + 2 * var(--home-gap)) !important; } }
@media (max-width: 599px) and (max-height: 740px) { html body #v-home#v-home > .shortcuts { min-height: calc(3 * 3.4rem + 2 * var(--home-gap)) !important; } }

/* owner 2026-11-11 "homepage also the same" (as Settings): one flat theme colour per card (no light patch / fade),
   calm champagne gold edge, soft glow. Card pictures, fonts, sizes and layout unchanged. */
html body #v-home#v-home { --one: color-mix(in srgb, var(--btn-a) 80%, #000);
  --calm-gold: linear-gradient(135deg, #EFE3C2 0%, #CDB077 28%, #8F7038 52%, #DCC593 76%, #A98A4B 100%); }
html body #v-home#v-home .shortcuts .shortcut {
  background: linear-gradient(var(--one), var(--one)) padding-box, var(--calm-gold) border-box !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 7px rgba(214, 184, 120, .12), 0 6px 14px rgba(0, 0, 0, .35) !important;
}
html body #v-home#v-home .shortcuts .shortcut::before { border-color: rgba(214, 184, 120, .22) !important; }
html body #v-home#v-home .shortcuts .shortcut:hover { box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 12px rgba(214, 184, 120, .25), 0 10px 20px rgba(0, 0, 0, .4) !important; }
html body #v-home#v-home .shortcuts .shortcut .t { color: #F4EEDF !important; }
html body #v-home#v-home .shortcuts .shortcut .s { color: rgba(240, 233, 216, .76) !important; }
html body #v-home#v-home .home-search form.search input,
html body #v-home#v-home .home-search .search input[type="search"] {
  background: var(--one) !important; border-color: #C9AE76 !important;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .3), 0 0 6px rgba(214, 184, 120, .12) !important;
}
html body #v-home#v-home section.card.myspace { box-shadow: 0 0 0 1px rgba(0, 0, 0, .35), 0 0 7px rgba(214, 184, 120, .12), 0 6px 14px rgba(0, 0, 0, .35) !important; }
html body #v-home#v-home section.card.myspace::after { background: var(--calm-gold) !important; }

/* owner 2026-11-11 "gold line like our previous layout, lighter, calm": one thin light champagne hairline per card */
html body #v-home#v-home { --hair: rgba(234, 218, 178, .55); }
html body #v-home#v-home .shortcuts .shortcut {
  border: 1px solid var(--hair) !important; background: var(--one) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .28) !important;
}
html body #v-home#v-home .shortcuts .shortcut::before { display: none !important; }
html body #v-home#v-home .shortcuts .shortcut:hover { box-shadow: 0 6px 16px rgba(0, 0, 0, .34) !important; border-color: rgba(234, 218, 178, .8) !important; }
html body #v-home#v-home .home-search form.search input,
html body #v-home#v-home .home-search .search input[type="search"] { border: 1px solid var(--hair) !important; box-shadow: none !important; }
html body #v-home#v-home section.card.myspace { box-shadow: 0 4px 12px rgba(0, 0, 0, .28) !important; }
html body #v-home#v-home section.card.myspace::after { padding: 1px !important; inset: 0 !important; background: var(--hair) !important; }
/* owner 2026-11-11 "like search bar and My Space": every card uses the search bar's line — 1.5px solid champagne gold */
html body #v-home#v-home { --hair: #C9AE76; }
html body #v-home#v-home .shortcuts .shortcut { border: 1.5px solid var(--hair) !important; }
html body #v-home#v-home .home-search form.search input,
html body #v-home#v-home .home-search .search input[type="search"] { border: 1.5px solid var(--hair) !important; }
html body #v-home#v-home section.card.myspace::after { padding: 1.5px !important; background: var(--hair) !important; }
/* owner 2026-11-11 "gold line around UI must all be like the line around My Space": the same 1.5 px champagne ring
   (drawn as an inset ring, which keeps its 1.5 px — a 1.5 px border is rounded down to 1 px) */
html body #v-home#v-home .shortcuts .shortcut,
html body #v-home#v-home .home-search form.search input,
html body #v-home#v-home .home-search .search input[type="search"] {
  border: 0 !important; box-shadow: inset 0 0 0 1.5px #C9AE76, 0 4px 12px rgba(0, 0, 0, .28) !important;
}

/* owner 2026-11-13 (phone photo: "6 cards words below … too small not professional"): subtitles may use two balanced lines
   (fit-cards.js adds .s2 and sets the width + size), so they stay readable (≥ 12 px) instead of shrinking to one ~9 px line;
   brighter champagne for contrast on every theme. */
html body #v-home#v-home .shortcuts .shortcut .s.s2 {
  white-space: normal !important; text-wrap: balance; overflow-wrap: normal; word-break: normal; hyphens: none;
  line-height: 1.22 !important; letter-spacing: .005em !important; opacity: 1 !important;
  color: rgba(244, 238, 223, .9) !important; font-weight: 600 !important;
}
/* phones: pictures a little smaller (51 → 46 px at 375 px) so short subtitles keep one line beside them */
@media (max-width: 599px) {
  html body #v-home#v-home .shortcuts .shortcut .sc-art { width: clamp(40px, 12.2vw, 52px); }
  html body #v-home#v-home .shortcuts .shortcut { column-gap: 7px !important; }
}

/* owner 2026-11-13 (Android photo: "my space overlaid other 2 cards"): on 700–740 px tall phones the box of the six cards was
   allowed to shrink to 3 × 3.4rem while each row kept a 3.9rem minimum (two rules disagreeing), so the third row spilled
   ~10–30 px out of its box under My Space. Now a row is never shorter than its card's content and the box never shorter than
   its rows: when space is short, My Space (or the page) gives way instead of covering the cards. */
@media (max-width: 599px) {
  html body #v-home#v-home > .shortcuts {
    grid-template-rows: repeat(3, minmax(max-content, 1fr)) !important; grid-auto-rows: minmax(max-content, 1fr) !important;
    min-height: min-content !important; flex-shrink: 0 !important;
  }
}
/* short phones (≤ 740 px tall, e.g. Android with its bars): Home still fits one screen without cutting My Space's content —
   My Space shrinks only to its content, the cards and gaps are a little tighter */
@media (max-width: 599px) and (max-height: 740px) {
  html body #v-home#v-home { --home-gap: 10px; }
  html body #v-home#v-home section.card.myspace { min-height: min-content !important; }
  html body #v-home#v-home .shortcuts .shortcut { padding-top: 7px !important; padding-bottom: 7px !important; }
}

/* owner 2026-11-14 (photo of My Space's edge: a wide navy band + the thin gold line): "these 2 colours the same size around
   My Space, so My Space · Good morning appears on the background waterfall". Phones / tablets: the frame is the theme-colour band
   + gold line of the photo, the same 8 px band on all four sides (the top was a tall navy strip) — and the My Space · Good morning heading sits on the waterfall
   (a soft shade at the top keeps it readable). Computers already show the waterfall edge to edge (desktop.css). */
@media (max-width: 1099px) {
  html body #v-home#v-home section.card.myspace .ms-banner {
    margin: 8px !important; border-radius: 16px !important; padding-top: 50px !important;   /* owner photo: theme-colour band (8 px) + gold line, the same width on all four sides */
  }
  html body #v-home#v-home section.card.myspace .ms-head {
    position: absolute !important; top: 8px; left: 8px; right: 8px; z-index: 4; background: transparent !important;
  }
  html body #v-home#v-home section.card.myspace .ms-head .ms-greet,
  html body #v-home#v-home section.card.myspace .ms-head .ms-kicker { text-shadow: 0 1px 3px rgba(0, 0, 0, .75), 0 0 12px rgba(0, 0, 0, .45); }
  html body #v-home#v-home section.card.myspace .ms-banner-overlay {
    background: linear-gradient(180deg, rgba(5, 14, 32, .62) 0%, rgba(5, 14, 32, .18) 26%, rgba(5, 14, 32, .45) 50%, rgba(5, 14, 32, .86) 100%) !important;
  }
}
/* owner 2026-11-14: "change thick of gold line to 0.1" (My Space). 0.1 px cannot be painted, so the line is drawn as a
   border of 0.1 px, which browsers paint as ONE screen pixel — the thinnest line a screen can show (≈0.3–0.5 px on phones,
   1 px on ordinary computer screens). Was a 1.5 px masked ring. Same gold (#C9AE76). Six cards / search bar unchanged. */
html body #v-home#v-home section.card.myspace::after {
  padding: 0 !important; inset: 0 !important; background: none !important;
  border: 0.1px solid var(--hair, #C9AE76) !important;
  -webkit-mask: none !important; mask: none !important;
}
/* owner 2026-11-14: "change gold line to other calm colour" (My Space hairline): a soft light tint of the theme's own colour
   (misty blue-grey in Platinum Slate, sage in Sage Mist, pale rose in Dusty Rose …) instead of gold. Still one screen pixel. */
html body #v-home#v-home section.card.myspace::after {
  border-color: color-mix(in srgb, var(--btn-a, #37627B) 35%, #EEF2F5) !important;
}
/* owner 2026-11-14: "not only My Space but also 6 cards" — the six Home cards get the same calm line as My Space: one screen
   pixel, a soft light tint of the theme's own colour (was 1.5 px gold). Search bar unchanged. */
html body #v-home#v-home .shortcuts .shortcut {
  border: 0.1px solid color-mix(in srgb, var(--btn-a, #37627B) 35%, #EEF2F5) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .28) !important;   /* the 1.5 px gold inset ring (2026-11-11 rule above) removed */
}
html body #v-home#v-home .shortcuts .shortcut:hover { border-color: color-mix(in srgb, var(--btn-a, #37627B) 20%, #F6F8FA) !important; }
/* owner 2026-11-14 (photos of the search bar and the crown: "change also"): the Home search bar and the crown / Upgrade
   button get the same calm line as the six cards and My Space — one screen pixel, soft tint of the theme colour (was gold). */
html body #v-home#v-home .home-search form.search input,
html body #v-home#v-home .home-search .search input[type="search"] {
  border: 0.1px solid color-mix(in srgb, var(--btn-a, #37627B) 35%, #EEF2F5) !important; box-shadow: none !important;
}
html body[data-route="home"] #brandHeader#brandHeader .home-up {
  border: 0.1px solid color-mix(in srgb, var(--btn-a, #37627B) 35%, #EEF2F5) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .28) !important;
}
html body[data-route="home"] #brandHeader#brandHeader .home-up:hover { border-color: color-mix(in srgb, var(--btn-a, #37627B) 20%, #F6F8FA) !important; }
/* owner 2026-11-14 ("Yes, change it"): the header language button (#langPick, e.g. "Khmer") on Home — same calm line as the
   cards, search bar and crown: one screen pixel in the theme tint; its gold border + faint gold glow removed. */
html body[data-route="home"] #brandHeader#brandHeader #langPick.lang-pick {
  border: 0.1px solid color-mix(in srgb, var(--btn-a, #37627B) 35%, #EEF2F5) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .25) !important;
}
html body[data-route="home"] #brandHeader#brandHeader #langPick.lang-pick:hover { border-color: color-mix(in srgb, var(--btn-a, #37627B) 20%, #F6F8FA) !important; }
/* owner 2026-11-14 (photo of the "MY SPACE" label: "hide it, keep Good morning free, more attractive"): the small gold
   "MY SPACE" label is hidden (screen readers still hear "My Space — Good morning"); "Good morning" stands alone, larger,
   soft ivory with a gentle glow, the name in gold italic. */
html body #v-home#v-home section.card.myspace .ms-head .ms-kicker { display: none !important; }
html body #v-home#v-home section.card.myspace .ms-head .ms-greet {
  font: 600 1.62rem/1.1 "Cormorant Garamond", Georgia, serif !important; letter-spacing: .012em !important;
  color: #FFF8E7 !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8), 0 0 14px rgba(0, 0, 0, .55), 0 0 22px rgba(243, 213, 138, .18) !important;
}
html body #v-home#v-home section.card.myspace .ms-head .ms-greet-name { color: #F3D58A !important; font-style: italic; }
/* with a name ("Good afternoon, Sophal") the larger greeting was cut to "Good afternoon, …" on a 320 px phone → with a name
   it scales with the screen (22 px at 320, 25 px at 360, full 1.62 rem from ~400 px); very long names still end in "…" */
html body #v-home#v-home section.card.myspace .ms-head .ms-greet:has(.ms-greet-name) { font-size: min(1.62rem, 7vw) !important; }
