/* Home in the folio (the Home board, group six, 2026-10-03).
   ⚠️ THE GLOBE IS THE OLD CODE'S (owner, 2026-10-03: 3d 地球 按照旧代码 保持和现在版本一样). The cover keeps the plate it was
   tuned to (#0B1220) and the sheet the mechanics the live app has (sticky cover, the sheet's negative top margin set by
   setHomeSheet, its 44px grip): those rules are carried over from the old 11-home.css as they were. What stands on the
   sheet is the board's. */

/* ---- the cover and the sheet, as the live app has them ---------------------------------------------- */
#mainPage { position: relative; padding-top: 0.05px; background: var(--fo-paper); }
#mainPage .home-hero { position: sticky; top: 0; height: var(--hero-full, 86vh); min-height: 260px; overflow: hidden; z-index: 0; background: #0B1220; border-bottom: 1px solid #0B1220; }
#homeHeroMap { position: absolute; inset: 0; }
.home-hero-scrim { position: absolute; inset: 0; pointer-events: none; }
#mainPage .home-sheet { position: relative; z-index: 1; margin-top: calc(-1 * var(--sheet-cover, 220px)); min-height: 70vh; padding-bottom: calc(110px + env(safe-area-inset-bottom, 0px)); background: var(--fo-paper); border-radius: 20px 20px 0 0; transition: margin-top 0.32s cubic-bezier(.22,.61,.36,1); }
#mainPage .home-sheet.is-dragging { transition: none; }
@media (prefers-reduced-motion: reduce) { #mainPage .home-sheet { transition: none; } }
#mainPage .home-sheet-grip { display: block; position: relative; width: 100%; min-height: 24px; height: 24px; padding: 0; border: none; background: transparent; cursor: grab; touch-action: none; }
#mainPage .home-sheet-grip::after { content: ''; position: absolute; left: 0; right: 0; top: -10px; bottom: -10px; }   /* 44px to take hold of; the grip is already the full width */
#mainPage .home-sheet-grip::before { content: ''; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 36px; height: 4px; border-radius: 9999px; background: var(--fo-rule); }
#mainPage .home-sheet-grip:active { cursor: grabbing; }

/* The name, shown only when the sheet is pushed down (the board's Boswell Journal over the globe). */
#mainPage .home-hero-title { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 18px); left: 0; right: 0; text-align: center; font-family: var(--fo-serif); font-size: 16px; color: #FDFCFA; opacity: 0; transition: opacity 0.28s ease; pointer-events: none; }
#mainPage .home-hero-title i { color: var(--fo-pale); }
#mainPage.sheet-open .home-hero-title { opacity: 0.9; }

/* The menu and the bell over the globe, white; the bell's red dot while anything is unread. */
.hero-corner-btn { position: absolute; top: calc(env(safe-area-inset-top, 0px) + 8px); z-index: 2; width: 44px; height: 44px; padding: 0; border: none; background: transparent; color: #FDFCFA; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.hero-corner-btn svg { width: 20px; height: 20px; }
.hero-corner-left { left: 12px; }
.hero-corner-right { right: 12px; }
.hero-corner-right.has-notices::after { content: ''; position: absolute; top: 11px; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--fo-red); }
#mainPage :focus-visible { outline: 2px solid var(--fo-ink); outline-offset: 2px; }
#mainPage .hero-corner-btn:focus-visible { outline-color: #FDFCFA; }

/* ---- who, how far, and the four ways on (the board) ------------------------------------------------- */
#mainPage .home-profile-card { padding: 0; background: transparent; border: none; font-family: var(--fo-sans); color: var(--fo-ink); }
#mainPage .home-profile-row { display: flex; align-items: center; gap: 14px; padding: 4px var(--fo-gutter) 14px; }
#mainPage .home-profile-avatar { width: 40px; height: 40px; flex-shrink: 0; box-sizing: border-box; border: 1px solid var(--fo-rule); background: var(--fo-band); display: flex; align-items: center; justify-content: center; overflow: hidden; font-family: var(--fo-mono); font-size: 12px; color: var(--fo-graphite); }
#mainPage .home-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
#mainPage .home-profile-avatar svg { width: 20px; height: 20px; }
#mainPage .home-profile-name { margin: 0; font-family: var(--fo-serif); font-size: 16px; font-weight: 400; letter-spacing: -0.025em; line-height: 1; }
#mainPage .home-stats-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px dashed var(--fo-hair-firm); border-bottom: 1px dashed var(--fo-hair-firm); }
#mainPage .home-stat { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 12px 4px; }
#mainPage .home-stat + .home-stat { border-left: 1px dashed var(--fo-hair-firm); }
#mainPage .home-stat-num { font-family: var(--fo-serif); font-size: 24px; letter-spacing: -0.02em; line-height: 1; }
#mainPage .home-stat-label { font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#mainPage .home-actions-row { display: flex; gap: 8px; padding: 16px var(--fo-gutter) 18px; border-bottom: 1px dashed var(--fo-hair-firm); }
#mainPage .home-btn { height: 44px; padding: 0 14px; box-sizing: border-box; font-family: var(--fo-sans); font-size: 14px; font-weight: 500; cursor: pointer; }
#mainPage .home-btn-primary { flex-grow: 1; border: none; background: var(--fo-ink); color: var(--fo-card); }
#mainPage .home-btn-secondary { flex-grow: 1; border: 1px solid var(--fo-ink); background: transparent; color: var(--fo-ink); }
#mainPage .home-btn-icon { width: 44px; flex-shrink: 0; padding: 0; border: 1px solid var(--fo-ink); background: transparent; color: var(--fo-ink); display: flex; align-items: center; justify-content: center; }
#mainPage .home-btn-icon svg { width: 16px; height: 16px; }

/* ---- the list: Under way, Ahead, Kept (the board) --------------------------------------------------- */
#tripsList { font-family: var(--fo-sans); color: var(--fo-ink); }
#tripsList .hm-section { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 20px var(--fo-gutter) 10px; }
#tripsList .hm-section__title { font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#tripsList .hm-section__acts { display: flex; gap: 16px; align-items: baseline; }
#tripsList .hm-link { min-height: 44px; margin: -14px 0; padding: 0; border: none; background: none; font: inherit; font-size: 12px; color: var(--fo-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; cursor: pointer; }
#tripsList .hm-card { display: flex; flex-direction: column; width: calc(100% - 2 * var(--fo-gutter)); margin: 0 var(--fo-gutter); padding: 0; border: 1px solid var(--fo-rule); background: var(--fo-card); color: var(--fo-ink); text-align: left; overflow: hidden; cursor: pointer; }
#tripsList .hm-card + .hm-card { margin-top: 12px; }
#tripsList .hm-card__pic, #tripsList .hm-mini__pic { position: relative; display: block; background-color: var(--fo-rule); background-image: repeating-linear-gradient(135deg, rgba(26,22,20,.05) 0 1px, transparent 1px 7px); background-size: cover; background-position: center; }
#tripsList .hm-card__pic { height: 168px; }
#tripsList .hm-mini__pic { height: 96px; }
#tripsList .hm-card__tag { position: absolute; left: 12px; top: 12px; height: 22px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; background: var(--fo-card); font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#tripsList .hm-mini .hm-card__tag { left: 8px; top: 8px; height: 20px; padding: 0 6px; }
#tripsList .hm-card__tag.is-now { color: var(--fo-red); }
#tripsList .hm-card__dot { width: 5px; height: 5px; border-radius: 50%; background: var(--fo-red); }
#tripsList .hm-card__credit { position: absolute; left: 12px; bottom: 10px; padding: 2px 4px; background: rgba(253,252,250,0.85); font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#tripsList .hm-card__body { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; }
#tripsList .hm-card__name { font-family: var(--fo-serif); font-size: 24px; letter-spacing: -0.02em; line-height: 1.05; }
#tripsList .hm-card__meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#tripsList .hm-card__meta .is-ink { color: var(--fo-ink); }
#tripsList .hm-strip { position: relative; padding-bottom: 7px; }
#tripsList .hm-strip__cells { display: grid; gap: 2px; }
#tripsList .hm-night { height: 6px; box-sizing: border-box; }
#tripsList .hm-night.is-bed { background: var(--fo-ink); }
#tripsList .hm-night.is-travel { background: var(--fo-pale); }
#tripsList .hm-night.is-open { border: 1px dashed var(--fo-red); background: rgba(196,17,31,0.08); }
#tripsList .hm-strip__now { position: absolute; bottom: 0; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-bottom: 5px solid var(--fo-red); }
#tripsList .hm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 12px var(--fo-gutter) 0; }
#tripsList .hm-section + .hm-grid { padding-top: 0; }
#tripsList .hm-mini { display: flex; flex-direction: column; min-width: 0; padding: 0; border: 1px solid var(--fo-rule); background: var(--fo-card); color: var(--fo-ink); text-align: left; overflow: hidden; cursor: pointer; }
#tripsList .hm-mini[hidden] { display: none; }
#tripsList .hm-mini__body { flex-grow: 1; display: flex; flex-direction: column; gap: 10px; padding: 10px 12px 12px; }
#tripsList .hm-mini__name { font-family: var(--fo-serif); font-size: 16px; letter-spacing: -0.01em; line-height: 1.1; overflow-wrap: anywhere; }
#tripsList .hm-mini__meta { margin-top: auto; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#tripsList .hm-search { display: flex; align-items: center; gap: 16px; padding: 0 var(--fo-gutter) 6px; }
#tripsList .hm-search[hidden], #tripsList .hm-found[hidden], #tripsList .hm-quiet[hidden] { display: none; }
#tripsList .hm-search__input { flex-grow: 1; min-width: 0; height: 40px; padding: 0; border: none; border-bottom: 1px solid var(--fo-ink); border-radius: 0; background: transparent; outline: none; font-family: var(--fo-sans); font-size: 14px; color: var(--fo-ink); }
#tripsList .hm-search .hm-link { margin: 0; font-size: 14px; text-decoration: none; }
#tripsList .hm-found { padding: 4px var(--fo-gutter) 12px; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-graphite); }
#tripsList .hm-quiet { margin: 0; padding: 4px var(--fo-gutter) 0; font-family: var(--fo-serif); font-style: italic; font-size: 16px; color: var(--fo-graphite); }
#tripsList .hm-empty { margin: 18px var(--fo-gutter) 0; display: flex; flex-direction: column; gap: 12px; }
#tripsList .hm-empty__card { height: 168px; padding: 12px; box-sizing: border-box; border: 1px dashed var(--fo-hair-open); display: flex; align-items: flex-end; font-family: var(--fo-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fo-pale); }
#tripsList .hm-empty__say { margin: 4px 0 0; font-family: var(--fo-serif); font-style: italic; font-size: 16px; line-height: 1.35; }
#tripsList .hm-empty__line { margin: 0; font-size: 12px; line-height: 1.5; color: var(--fo-graphite); }
#tripsList .hm-empty__acts { display: flex; gap: 8px; align-items: center; }
#tripsList .log-cachet.is-marked { border-color: var(--fo-ink); box-shadow: 0 0 0 1px var(--fo-ink); }   /* a pin tapped on the globe marks its card */

/* The bar under Home, Saved, Boswell and one's own Profile (the Home board): a pill floating over the page, four words, the
   current one in a full ink pill. Its old dress went with the deleted sheets on 2026-10-01. It leaves, down and out, while
   Home's globe is out, and is back as the sheet comes up. The icons stay in the markup for nobody; the board has words. */
.bottom-nav { position: fixed; left: 20px; right: 20px; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); z-index: 30; height: 58px; padding: 6px; box-sizing: border-box; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; border-radius: 82px; background: rgba(215,215,208,0.5); -webkit-backdrop-filter: blur(16px) saturate(1.8); backdrop-filter: blur(16px) saturate(1.8); box-shadow: inset 0 0 10px rgba(0,0,0,0.08); border: 1px solid rgba(253,252,250,0.6); transition: transform .55s cubic-bezier(.22,1,.36,1), opacity .45s ease; }
.bottom-nav .bottom-nav-item { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0; border: none; border-radius: 9999px; background: none; font-family: var(--fo-sans); font-size: 12px; font-weight: 500; color: var(--fo-ink); cursor: pointer; }
.bottom-nav .bottom-nav-item svg { display: none; }
.bottom-nav .bottom-nav-item.is-current { background: var(--fo-ink); color: #FDFCFA; }
body:has(#mainPage.active.sheet-open) .bottom-nav { transform: translateY(110px); opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .bottom-nav { transition: none; } }

/* With a journey under way Home is Today (#homeUnderway, 29i-underway.js): the cover and the sheet are not laid out under
   it, or the globe is started in a box it cannot see. The rule went with the deleted sheets on 2026-10-01. */
#mainPage.is-underway .home-hero, #mainPage.is-underway .home-sheet { display: none; }
#mainPage.is-underway #homeUnderway { display: flex; flex-direction: column; min-height: 100dvh; }
