/* ---- Rainbow-cliff home page (Codex cliff-home-integration-v1, chosen by the owner 2026-10-24): a 1864x843 stage, contained (never cropped); every layer placed in percent of the stage ---- */
#screen-landing.is-active { background: #62c8fb; display: grid; grid-template-columns: 100% !important; grid-template-rows: 100% !important; place-items: end center; padding: 0; gap: 0; }
/* owner 2026-10-29: on a squarer desktop window (aspect below 3:2) the home picture is centred vertically instead of sitting at the bottom with only its lower half visible; phones (wider than 3:2) keep the picture flush with the bottom edge */
@media (max-aspect-ratio: 3/2) { #screen-landing.is-active { place-items: center; } }
/* owner 2026-10-31 (msg 15386): on iPhone the home picture did not fill the screen (blue bars at the sides, cream strip at the bottom) because the stage was sized from 100dvh, which can be shorter than the real screen. The landing is now fixed to the whole screen and the stage is sized from that box (container units), the old dvh size stays as the fallback. */
#screen-landing.is-active { position: fixed; inset: 0; container-type: size; }
#screen-landing .cliff-stage { position: relative; width: min(100vw, 100dvh * 1864 / 843); width: min(100cqw, 100cqh * 1864 / 843); aspect-ratio: 1864 / 843; background: url("art/home/cliff-scene.webp") center / 100% 100% no-repeat; overflow: hidden; }
#screen-landing .land-title { left: 2%; top: 3%; width: 19.8%; height: 34%; font-size: 0; background: url("art/home/logo-cuddle-sums.webp") left top / contain no-repeat; /* owner logo "Cuddle Sums" 10-25 */ text-shadow: none; }
#screen-landing .land-hi, #screen-landing .land-tap { display: none !important; }
#screen-landing .land-pet { left: 24.4%; top: 58.5%; width: 14.7%; height: 32.5%; transform: none; }
/* enter: the whole frame is the button; the lettering floats (frame and hit area stay still) */
#screen-landing .land-enter { animation: none;  left: 34.87%; top: 65.24%; width: 33.26%; height: 24.67%; min-width: 48px; min-height: 48px; transform: none; padding: 0; border: 0; border-radius: 32px; background: url("art/home/cliff-enter-frame.webp") center / 100% 100% no-repeat; box-shadow: none; font-size: 0; }
#screen-landing .land-enter::after { content: ""; position: absolute; left: 28.2%; top: 38.5%; width: 51.6%; height: 45.7%; background: url("art/home/cliff-enter-lettering.webp") center / contain no-repeat; animation: cliff-float 2.4s ease-in-out infinite; pointer-events: none; }
@keyframes cliff-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10%); } }
body.reduced #screen-landing .land-enter::after { animation: none; }
@media (prefers-reduced-motion: reduce) { #screen-landing .land-enter::after { animation: none; } }
/* toolbar picture with three invisible real buttons over it */
#screen-landing .cliff-stage::before { content: ""; position: absolute; left: 72.96%; top: 3.56%; width: 25.75%; height: 11.86%; background: url("art/home/cliff-toolbar.webp") center / 100% 100% no-repeat; pointer-events: none; z-index: 1; }
#screen-landing .land-bottom { left: 72.96%; top: 3.56%; bottom: auto; width: 14.1%; height: 11.86%; transform: none; gap: 0; z-index: 3; }
#screen-landing .land-bottom .land-btn { position: absolute; top: 0; height: 100%; min-height: 44px; min-width: 44px; padding: 0; border: 0; border-radius: 12px; background: transparent; box-shadow: none; font-size: 0; }
#screen-landing .land-bottom #land-checkin { left: 0; width: 100%; }
#screen-landing .land-bottom #land-who { left: 100%; width: 42.8%; min-width: 44px; margin-left: -4px; } /* only the middle slot of the toolbar picture: it used to cover the gear slot (Codex QA-0600-01) */
#screen-landing .land-gear { right: auto; left: 93.1%; top: 3.56%; margin-top: 0; width: 5.58%; height: 11.86%; min-width: 44px; min-height: 44px; border: 0; background: transparent; z-index: 3; }
#screen-landing .land-gear img { opacity: 0; }
#screen-landing .land-parent { right: 2%; top: auto; bottom: 3%; z-index: 3; }

/* trial: days-left chip on the home page, lock screen above everything */
#screen-landing .land-trial { position: absolute; left: 2.68%; top: 38%; padding: 4px 12px; border: 2px solid #1b1d4d; border-radius: 999px; background: rgba(255, 253, 245, .94); color: #1b1d4d; font-size: 13px; font-weight: 800; z-index: 3; }
.trial-lock { z-index: 90; background: rgba(27, 29, 77, .72); }
.trial-card { text-align: center; }
.trial-body { margin: 0; font-size: 16px; line-height: 1.5; color: #1b1d4d; }
.trial-msg { min-height: 1.2em; margin: 0; font-size: 14px; font-weight: 800; color: #b2432b; }
.trial-row { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.trial-card .ui-input { width: 100%; text-align: center; font-size: 22px; }
.trial-card label { font-size: 20px; font-weight: 900; color: #1b1d4d; }
.trial-card .big-btn { min-width: 140px; height: 48px; font-size: 18px; }
.trial-card .sub-btn { min-height: 44px; }
.trial-row[hidden], .trial-gate[hidden] { display: none !important; }

/* HOME-LETTERING-2026-10-28 (owner photo 14644 "Bug"): the home page enter button and toolbar are Codex pictures with the Traditional-Chinese lettering baked in, so ?lang=en / zh-Hans still showed 入屋 / 每日簽到 / 換人玩. For en and zh-Hans: the toolbar picture without its two words (art/home/cliff-toolbar-notext.webp) + the labels as live text (data-label, set in i18n.js applyStatic), and the enter lettering picture replaced by live text; zh-Hant keeps the pictures unchanged. */
html[lang="en"] #screen-landing .cliff-stage::before, html[lang="zh-Hans"] #screen-landing .cliff-stage::before { background-image: url("art/home/cliff-toolbar-notext.webp"); }
html[lang="en"] #screen-landing .land-bottom .land-btn::after, html[lang="zh-Hans"] #screen-landing .land-bottom .land-btn::after { content: attr(data-label); position: absolute; top: 50%; transform: translate(-50%, -50%); width: 49%; text-align: center; white-space: normal; font-size: calc(min(100vw, 100dvh * 1864 / 843) * 0.0125); line-height: 1.08; font-weight: 900; color: #243a66; pointer-events: none; }
html[lang="en"] #screen-landing #land-checkin::after, html[lang="zh-Hans"] #screen-landing #land-checkin::after { left: 51%; }
html[lang="en"] #screen-landing #land-who::after, html[lang="zh-Hans"] #screen-landing #land-who::after { left: 52%; width: 88%; }
html[lang="en"] #screen-landing .land-enter::after { background: none; content: attr(data-label); display: flex; align-items: center; justify-content: center; font-size: calc(min(100vw, 100dvh * 1864 / 843) * 0.034); font-weight: 900; color: #2b2f6b; text-shadow: 0 2px 0 rgba(255, 255, 255, .85); white-space: nowrap; letter-spacing: .01em; }
