/* Home: topbar matches other tabs; main content uses 40px side gutters */
body[data-page="home"] .site-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding-inline: 0;
  box-sizing: border-box;
}
body[data-page="home"] .topbar {
  height: 76px;
  min-height: 76px;
  padding: 5px 40px;
  box-sizing: border-box;
}
body[data-page="home"] .topbar .site-title {
  margin-left: 0;
  padding-left: 0;
}
body[data-page="home"] main#top {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: calc(100svh - 152px);
  min-height: 560px;
  margin: 14px 0 0;
  padding-inline: 40px;
  box-sizing: border-box;
}
body[data-page="home"] .home-workspace.front-hero {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: clamp(24px, 2vw, 32px);
  width: 100%;
  max-width: none;
  height: auto;
  min-height: 0;
  flex: 1 1 auto;
  margin: 0;
  padding: 0;
  align-items: stretch;
  overflow: clip;
}
body[data-page="home"] .home-dash {
  min-width: 0;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
body[data-page="home"] .home-dash > :not(.home-diary) {
  flex: 0 0 auto;
}
body[data-page="home"] :is(.home-dash, .schedule-agenda)::-webkit-scrollbar { width: 6px; }
body[data-page="home"] :is(.home-dash, .schedule-agenda)::-webkit-scrollbar-track { background: transparent; }
body[data-page="home"] :is(.home-dash, .schedule-agenda)::-webkit-scrollbar-thumb { background: transparent; border-radius: 6px; }
body[data-page="home"] :is(.home-dash, .schedule-agenda):hover::-webkit-scrollbar-thumb { background: color-mix(in srgb, var(--front-red) 24%, #b9c1bb); }
body[data-page="home"] .home-dash-greet h2 {
  margin: 0;
  color: var(--front-red, #8c0000);
  font-family: "Noto Serif SC", "Songti SC", STSong, Georgia, serif;
  font-size: clamp(1.85rem, 2.2vw, 2.125rem);
  font-weight: 700;
  line-height: 1.35;
}
body[data-page="home"] .home-dash-sub {
  margin: 6px 0 0;
  color: #68736f;
  font-size: 0.95rem;
  line-height: 1.55;
}
body[data-page="home"] .home-dash-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(168px, 220px);
  align-items: start;
  gap: 10px 20px;
  min-width: 0;
}
body[data-page="home"] .home-dash-lead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}
body[data-page="home"] .home-dash-greet {
  min-width: 0;
}
body[data-page="home"] .home-dash-time-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 0;
}
body[data-page="home"] .home-local-chip,
body[data-page="home"] .home-tz-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--front-red, #8c0000) 8%, #fff);
  color: var(--front-red, #8c0000);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}
body[data-page="home"] .home-tz-link {
  background: transparent;
  color: #7a837e;
  padding: 0;
}
body[data-page="home"] .home-local-chip i,
body[data-page="home"] .home-tz-link i {
  width: 14px;
  height: 14px;
}
body[data-page="home"] .home-dash-clock-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  align-content: flex-start;
  gap: 8px 16px;
  min-width: 0;
}
body[data-page="home"] #schedule-clock {
  color: var(--front-red-deep, #5c0000);
  font-size: clamp(3rem, 3.8vw, 3.5rem);
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: 0;
}
body[data-page="home"] #schedule-full-date {
  color: #5f6964;
  font-size: 1rem;
  font-weight: 550;
}
body[data-page="home"] .home-world-clocks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 0;
}
body[data-page="home"] .home-world-clocks[hidden] { display: none; }
body[data-page="home"] .home-world-item {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 8px;
  min-width: 0;
  padding: 6px 8px;
  border: 1px solid var(--theme-line, #e8eae6);
  border-radius: 8px;
  background: color-mix(in srgb, var(--theme-surface, #fff) 94%, var(--front-soft));
}
body[data-page="home"] .home-world-icon {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  filter: drop-shadow(0 7px 5px rgba(41, 49, 44, .2));
}
body[data-page="home"] .home-world-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}
body[data-page="home"] .home-world-item strong {
  color: #6d766f;
  font-size: 0.78rem;
  font-weight: 650;
}
body[data-page="home"] .home-world-time {
  color: #24302b;
  font-size: 1.45rem;
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}
body[data-page="home"] .home-world-meta {
  color: #8a918c;
  font-size: 0.74rem;
}
body[data-page="home"] .home-world-weather {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-width: 52px;
}
body[data-page="home"] .home-world-wx-today {
  width: 38px;
  height: 38px;
  object-fit: contain;
}
body[data-page="home"] .home-world-wx-days {
  display: flex;
  align-items: center;
  gap: 2px;
}
body[data-page="home"] .home-world-wx-day {
  width: 22px;
  height: 22px;
  object-fit: contain;
  opacity: 0.92;
}
body[data-page="home"] .home-weather {
  display: grid;
  gap: 6px;
  min-width: 0;
  align-self: start;
}
body[data-page="home"] .home-mobile-weather-settings { display: none; }
body[data-page="home"] .home-weather[hidden] { display: none; }
body[data-page="home"] .home-weather-panel {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
body[data-page="home"] .home-weather-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin: 0;
  color: #6d766f;
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.02em;
}
body[data-page="home"] .home-weather-head small {
  color: #9aa39d;
  font-size: 0.66rem;
  font-weight: 500;
}
body[data-page="home"] .home-weather-today-body {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 6px 8px;
  align-items: center;
}
body[data-page="home"] .home-weather-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
}
body[data-page="home"] .home-weather-copy { min-width: 0; }
body[data-page="home"] .home-weather-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 8px;
}
body[data-page="home"] .home-weather-line strong {
  color: #2f3a35;
  font-size: 0.82rem;
}
body[data-page="home"] .home-weather-line span {
  color: #5f6964;
  font-size: 0.78rem;
}
body[data-page="home"] .home-weather-dress {
  margin: 3px 0 0;
  color: #68736f;
  font-size: 0.72rem;
  line-height: 1.4;
}
body[data-page="home"] .home-weather-dress em {
  margin-right: 4px;
  color: var(--front-red, #8c0000);
  font-style: normal;
  font-weight: 650;
}
body[data-page="home"] .home-weather-forecast {
  display: grid;
  gap: 4px;
  padding-top: 2px;
  border-top: 1px solid color-mix(in srgb, var(--theme-line, #e8eae6) 70%, transparent);
}
body[data-page="home"] .home-weather-days {
  display: flex;
  align-items: center;
  gap: 14px;
}
body[data-page="home"] .home-weather-day {
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #7a837e;
  font-size: 0.68rem;
}
body[data-page="home"] .home-weather-day img {
  width: 34px;
  height: 34px;
  object-fit: contain;
}
body[data-page="home"] .home-weather-empty {
  color: #9aa39d;
  font-size: 0.7rem;
}
body[data-page="home"] .home-weather-extras {
  display: grid;
  gap: 2px;
  padding-top: 2px;
  border-top: 1px dashed color-mix(in srgb, var(--theme-line, #e8eae6) 80%, transparent);
}
body[data-page="home"] .home-weather-extra {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: #7a837e;
  font-size: 0.7rem;
}
body[data-page="home"] .home-weather-retry {
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--front-red, #8c0000);
  font: inherit;
  font-size: 0.74rem;
  text-align: left;
  cursor: pointer;
}
body[data-page="home"] .home-weather-loading {
  margin: 0;
  color: #8a918c;
  font-size: 0.78rem;
}
body[data-page="home"] .home-life-dock {
  display: block;
  margin: 0;
  flex: none;
}
body[data-page="home"] .home-life-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
}
body[data-page="home"] .home-life-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}
body[data-page="home"] .home-life-heading .button {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body[data-page="home"] .home-life-dock {
  display: block;
  margin: 0;
  flex: 0 0 auto;
}
body[data-page="home"] .home-life-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 0 10px;
}
body[data-page="home"] .home-life-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}
body[data-page="home"] .home-life-heading .button {
  width: 30px;
  min-height: 30px;
  padding: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
body[data-page="home"] .home-life-dock .schedule-life-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: none;
}
body[data-page="home"] .home-life-dock .life-chip {
  flex: 0 0 4.75rem;
  width: 4.75rem;
  min-width: 4.75rem;
  max-width: 4.75rem;
  margin: 0;
  min-height: 6.4rem;
  aspect-ratio: auto;
  padding: 14px 6px 10px;
  transform: none;
  box-shadow: 0 4px 12px rgba(46, 40, 30, 0.08);
}
body[data-page="home"] .home-life-dock .life-chip:nth-child(n) {
  transform: none;
}
body[data-page="home"] .home-life-dock .life-chip-label {
  display: block;
  overflow: hidden;
  width: 4em;
  max-width: 4em;
  margin-inline: auto;
  line-height: 1.35;
  font-size: 0.72rem;
  word-break: break-all;
  overflow-wrap: anywhere;
}
body[data-page="home"] .home-life-dock .schedule-life-empty {
  width: 100%;
  min-height: 56px;
  margin: 0;
  border-radius: 10px;
}

/* Diary fills remaining left column; text scrolls inside */
body[data-page="home"] .home-diary.diary-sticky {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  max-width: none !important;
  height: auto !important;
  min-height: 0 !important;
  margin: 0 !important;
  transform: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 1 !important;
  flex: 1 1 auto;
  display: flex !important;
  flex-direction: column;
}
body[data-page="home"] .home-diary .diary-sticky-sheet {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  width: 100%;
  height: 100%;
  padding: 14px 14px 10px;
  border: 1px solid color-mix(in srgb, var(--theme-line, #ebe6d9) 88%, transparent);
  border-radius: 10px;
  background: var(--theme-surface, #fffefa);
  box-shadow:
    0 1px 2px rgba(48, 40, 28, 0.03),
    0 6px 18px rgba(48, 40, 28, 0.045),
    0 18px 40px rgba(48, 40, 28, 0.035);
  transform: none;
}
body[data-page="home"] .home-diary .diary-sticky-sheet::before { content: none !important; display: none !important; }
body[data-page="home"] .home-diary .diary-sticky-sheet::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: 8px;
  width: 130px;
  height: 72px;
  background: url("./assets/cloud-gray-top.png") center / contain no-repeat;
  opacity: .08;
  pointer-events: none;
}
body[data-page="home"] .home-diary .diary-sticky-handle,
body[data-page="home"] .home-diary #schedule-diary-pin {
  display: none !important;
}
body[data-page="home"] .home-diary .schedule-diary-head {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 8px;
}
body[data-page="home"] .home-diary .schedule-diary-head > strong {
  margin-right: auto;
  font-size: 1.05rem;
  white-space: nowrap;
}
body[data-page="home"] .home-diary .schedule-diary-tools { flex: none; }
body[data-page="home"] .home-diary #schedule-diary-archive {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  color: var(--front-red, #8c0000);
  text-decoration: none;
  border-radius: 8px;
}
body[data-page="home"] .home-diary #schedule-diary-archive:hover {
  background: color-mix(in srgb, var(--front-red, #8c0000) 10%, transparent);
}
body[data-page="home"] .home-diary #schedule-diary-archive svg {
  width: 16px;
  height: 16px;
}
body[data-page="home"] .home-diary .schedule-diary-editor {
  display: flex !important;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
}
body[data-page="home"] .home-diary .schedule-diary-view {
  display: none !important;
}
body[data-page="home"] .home-diary #schedule-diary-text {
  width: 100%;
  flex: 1 1 auto;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  padding: 8px 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent;
  font-size: 0.88rem;
  line-height: 1.5;
  resize: none !important;
  outline: none;
  overflow-y: auto;
}
body[data-page="home"] .home-diary-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
  color: #9a9189;
  font-size: 0.72rem;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
}
body[data-page="home"] .home-diary-save-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
body[data-page="home"] .home-diary-save-state small { color: #34835a; font: inherit; }
body[data-page="home"] .home-diary-save-state small[data-state="error"] { color: #ae422d; }
body[data-page="home"] .home-diary-save-state small[data-state="saving"] { color: var(--theme-muted, #767e77); }
body[data-page="home"] #home-diary-retry {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--front-red);
  font: inherit;
  cursor: pointer;
}
body[data-page="home"] .home-diary-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3f9a68;
  box-shadow: 0 0 0 3px rgba(63, 154, 104, 0.15);
}

/* Right schedule column */
body[data-page="home"] .home-schedule {
  min-width: 0;
  width: 100%;
  max-width: none;
  justify-self: stretch;
  height: 100%;
  overflow: clip;
  margin: 0;
  padding: 20px 24px;
  border: 1px solid var(--theme-line, #e8eae6);
  border-radius: 8px;
  background: var(--theme-surface, #fff);
  box-shadow: 0 8px 26px rgba(32, 40, 34, 0.045);
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
body[data-page="home"] .home-schedule:has(.schedule-cal.is-open) { overflow: visible; z-index: 2200; }
body[data-page="home"] .schedule-head {
  padding: 0 0 14px;
  margin: 0;
  align-items: center;
}
body[data-page="home"] .schedule-panel-title > span {
  display: block;
  color: #8a918c;
  font-size: 0.72rem;
}
body[data-page="home"] .schedule-panel-title > strong {
  font-size: 1.35rem;
}
body[data-page="home"] .schedule-actions {
  gap: 6px;
  flex-wrap: wrap;
}
body[data-page="home"] .schedule-action-btn {
  min-height: 34px;
  padding: 5px 9px;
  font-size: 0.76rem;
  border-radius: 8px;
}
body[data-page="home"] .schedule-date-nav {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  gap: 8px;
  padding: 0;
}
body[data-page="home"] .schedule-date-nav > button {
  width: 28px;
  min-width: 0;
  height: 36px;
  min-height: 36px;
  align-self: center;
  padding: 0;
  border: 1px solid #e4e8e5;
  box-shadow: none;
  background: #fff;
  border-radius: 8px;
}
body[data-page="home"] .schedule-days {
  gap: 8px;
  padding: 4px 0 12px;
  perspective: 800px;
}
body[data-page="home"] .schedule-days button[data-schedule-date] {
  min-height: 108px;
  border-radius: 12px;
  padding: 10px 4px 14px;
  transform: rotateY(-5deg) rotateX(3deg);
  background: linear-gradient(145deg, #fff 0%, #f7f7f4 72%, #eeeae3 100%);
  border: 1px solid #e1e5e2;
  color: #47574f;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .86),
    3px 5px 0 rgba(62, 57, 48, .12),
    5px 10px 16px rgba(37, 54, 44, .1);
}
body[data-page="home"] .schedule-days button[data-schedule-date]:hover {
  transform: rotateY(-3deg) rotateX(2deg) translateY(-2px);
}
body[data-page="home"] .schedule-days button[data-schedule-date].active,
body[data-page="home"] .schedule-days button[data-schedule-date][aria-current="date"].active {
  color: var(--front-on-accent, #fff);
  background: linear-gradient(145deg, color-mix(in srgb, var(--front-red) 83%, white), var(--front-red));
  border-color: var(--front-red, #8c0000);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 3px 5px 0 color-mix(in srgb, var(--front-red) 73%, black), 5px 10px 16px color-mix(in srgb, var(--front-red) 20%, transparent);
}
body[data-page="home"] .schedule-days button[data-schedule-date][aria-current="date"]:not(.active) {
  border-color: var(--front-red);
}
body[data-page="home"] .schedule-days span { font-size: 0.78rem; }
body[data-page="home"] .schedule-days strong { font-size: 1.55rem; }
body[data-page="home"] .schedule-days em { font-size: 0.7rem; }
body[data-page="home"] .schedule-day-body { margin-top: 10px; min-height: 0; flex: 1 1 auto; overflow: hidden; }
body[data-page="home"] .schedule-agenda {
  min-height: 0;
  max-height: none;
  flex: 1 1 auto;
  grid-auto-rows: max-content;
  overflow-y: auto;
  padding-right: 7px;
}
body[data-page="home"] .schedule-entry {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 12px;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e5eae6;
  margin: 0;
  padding: 14px 0;
  min-height: 88px;
  transform: none;
}
body[data-page="home"] .schedule-entry::before { display: none; }
body[data-page="home"] .schedule-entry > time { width: auto; font-size: 0.86rem; line-height: 1.45; }
body[data-page="home"] .schedule-entry strong { font-size: 0.98rem; line-height: 1.45; }
body[data-page="home"] .schedule-entry > div:nth-child(2) { overflow-wrap: anywhere; }

body[data-page="home"] .home-utility-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px 20px;
  flex: none;
  margin: 8px 0 6px;
}
body[data-page="home"] .home-utility-links a {
  color: #8a918c;
  font-size: 0.74rem;
  text-decoration: none;
}
body[data-page="home"] .home-utility-links a:hover {
  color: var(--front-red, #8c0000);
}

.home-tz-dialog .home-tz-lead {
  margin: 0 0 12px;
  color: #6f7671;
  font-size: 0.84rem;
  line-height: 1.6;
}
.home-tz-dialog label {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: #5f6964;
  font-size: 0.8rem;
}
.home-tz-dialog select,
.home-tz-dialog input {
  min-height: 38px;
  padding: 0 10px;
  border: 1px solid #e4e8e5;
  border-radius: 10px;
  font: inherit;
}
.home-tz-dialog input[hidden] { display: none; }
.home-tz-dialog .home-weather-place {
  margin: 0 0 14px;
  padding: 12px 12px 4px;
  border: 1px solid #e4e8e5;
  border-radius: 12px;
  background: #fbfcfb;
}
.home-tz-dialog .home-weather-place legend {
  padding: 0 6px;
  color: #5f6964;
  font-size: 0.8rem;
  font-weight: 650;
}
.home-tz-dialog .home-weather-place-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.home-tz-dialog .home-weather-place-grid label {
  margin-bottom: 10px;
}
@media (max-width: 560px) {
  .home-tz-dialog .home-weather-place-grid {
    grid-template-columns: 1fr;
  }
}
.home-tz-error { min-height: 1.4em; color: #ad442e; font-size: .82rem; }

@media (max-width: 980px) {
  body[data-page="home"] .topbar {
    padding-inline: 16px;
  }
  body[data-page="home"] main#top {
    width: 100%;
    height: auto;
    min-height: 0;
    margin: 12px 0 24px;
    padding-inline: 16px;
  }
  body[data-page="home"] .home-workspace.front-hero {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    overflow: visible;
  }
  body[data-page="home"] .home-dash,
  body[data-page="home"] .home-schedule {
    height: auto;
    overflow: visible;
  }
  body[data-page="home"] .home-schedule { order: -1; min-height: 500px; }
  body[data-page="home"] .schedule-day-body { min-height: 260px; max-height: 62svh; }
  body[data-page="home"] .schedule-agenda { overflow-y: auto; }
  body[data-page="home"] .home-dash-top {
    grid-template-columns: 1fr;
  }
  body[data-page="home"] .home-life-dock .schedule-life-chips {
    display: flex;
    flex-wrap: wrap;
  }
}
@media (max-width: 560px) {
  body[data-page="home"] .home-life-dock .schedule-life-chips {
    display: flex;
    flex-wrap: wrap;
  }
  body[data-page="home"] #schedule-clock {
    font-size: 2.8rem;
  }
  body[data-page="home"] .home-dash { padding: 18px 14px; }
  body[data-page="home"] .home-schedule { padding: 16px 12px; }
  body[data-page="home"] .home-world-item { grid-template-columns: 56px minmax(0,1fr) auto; gap: 5px; padding: 5px; }
  body[data-page="home"] .home-world-icon { width: 56px; height: 56px; }
  body[data-page="home"] .home-world-time { font-size: 1.2rem; }
  body[data-page="home"] .home-world-wx-today { width: 32px; height: 32px; }
  body[data-page="home"] .home-world-wx-day { width: 18px; height: 18px; }
  body[data-page="home"] .home-weather-icon { width: 40px; height: 40px; }
  body[data-page="home"] .schedule-date-nav { grid-template-columns: 24px minmax(0,1fr) 24px; gap: 3px; }
  body[data-page="home"] .schedule-days { gap: 3px; }
  body[data-page="home"] .schedule-days button[data-schedule-date] { min-height: 78px; padding: 6px 1px 8px; border-radius: 7px; transform: none; }
  body[data-page="home"] .schedule-days strong { font-size: 1.1rem; }
  body[data-page="home"] .schedule-days span, body[data-page="home"] .schedule-days em { font-size: .58rem; }
  body[data-page="home"] .schedule-entry {
    grid-template-columns: 46px minmax(0, 1fr) 68px;
    gap: 6px;
    padding: 10px 4px;
  }
  body[data-page="home"] .schedule-entry > time {
    padding-right: 4px;
    font-size: .78rem;
  }
  body[data-page="home"] .schedule-entry-actions {
    gap: 0;
    width: 68px;
  }
  body[data-page="home"] .schedule-entry-actions button {
    width: 22px;
    min-width: 22px;
    height: 26px;
    padding: 3px;
  }
  body[data-page="home"] .schedule-entry-actions .schedule-entry-tool {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 760px) {
  body[data-page="home"] .home-workspace.front-hero { gap: 16px; }
  body[data-page="home"] .home-dash { display: contents; }
  body[data-page="home"] .home-dash-top { order: 0; display: block; position: relative; width: 100%; }
  body[data-page="home"] .home-dash-lead,
  body[data-page="home"] .home-dash-time,
  body[data-page="home"] .home-utility-links { display: none; }
  body[data-page="home"] .home-weather { width: 100%; }
  body[data-page="home"] .home-weather-panel { padding: 15px 48px 14px 15px; border: 1px solid var(--theme-line, #e8eae6); border-radius: 8px; background: var(--theme-surface, #fff); }
  body[data-page="home"] .home-weather-icon { width: 48px; height: 48px; }
  body[data-page="home"] .home-weather-today-body { grid-template-columns: 48px minmax(0, 1fr); }
  body[data-page="home"] .home-weather-line strong { font-size: 1rem; }
  body[data-page="home"] .home-weather-line span { font-size: .88rem; }
  body[data-page="home"] .home-weather-dress { font-size: .8rem; }
  body[data-page="home"] .home-mobile-weather-settings { display: grid; place-items: center; position: absolute; top: 11px; right: 11px; width: 32px; height: 32px; padding: 0; border: 1px solid var(--theme-line, #e8eae6); border-radius: 6px; background: var(--theme-surface, #fff); color: var(--theme-muted, #74736f); cursor: pointer; }
  body[data-page="home"] .home-mobile-weather-settings svg { width: 16px; height: 16px; }
  body[data-page="home"] .home-life-dock { order: 1; width: 100%; margin: 2px 0 0; }
  body[data-page="home"] .home-schedule { order: 2; min-height: 0; }
  body[data-page="home"] .home-diary { order: 3; width: 100%; }
  body[data-page="home"] .schedule-day-body { min-height: 0; max-height: none; }
  body[data-page="home"] .schedule-agenda { overflow: visible; }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .schedule-life-chips {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
    margin: 0;
  }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 126px;
    height: auto;
    margin: 0;
    padding: 17px 7px 10px;
    gap: 5px;
    border-radius: 5px;
    background: linear-gradient(180deg, color-mix(in srgb, var(--sticky-paper) 92%, white), var(--sticky-paper-deep));
    box-shadow: 0 5px 12px rgba(40, 42, 40, .08);
    text-align: center;
  }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip::before {
    top: -7px;
    left: 50%;
    width: 14px;
    height: 14px;
    transform: translateX(-50%);
  }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip::after { display: block; }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip svg { width: 17px; height: 17px; }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip-days {
    display: flex;
    justify-content: center;
    min-width: 0;
    max-width: 100%;
    margin: 0;
  }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip-num { font-size: 1.55rem; }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip-label {
    display: block;
    flex: none;
    width: auto;
    max-width: 100%;
    margin: 0;
    overflow: visible;
    white-space: normal;
    text-align: center;
    text-overflow: clip;
    word-break: normal;
    overflow-wrap: anywhere;
    line-height: 1.3;
  }
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .life-chip-label br { display: revert; }
}

@media (max-width: 390px) {
  body.has-mobile-tabbar[data-page="home"] .home-life-dock .schedule-life-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

html[data-theme="dark"] body[data-page="home"] .home-world-item,
html[data-theme="dark"] body[data-page="home"] .home-diary .diary-sticky-sheet,
html[data-theme="dark"] body[data-page="home"] .schedule-days button[data-schedule-date]:not(.active) {
  background: #202521;
  color: #e6ede8;
  border-color: #39423b;
}
html[data-theme="dark"] body[data-page="home"] .home-world-time,
html[data-theme="dark"] body[data-page="home"] #schedule-clock {
  color: var(--front-red);
}
html[data-theme="dark"] body[data-page="home"] .home-local-chip {
  background: var(--front-tint);
}
html[data-theme="dark"] body[data-page="home"] :is(.home-dash, .home-schedule) {
  border-color: var(--theme-line);
  background: var(--theme-surface);
}
html[data-theme="dark"] body[data-page="home"] .home-dash {
  border: 0;
  background: transparent;
}
html[data-theme="dark"] body[data-page="home"] .home-weather-dress,
html[data-theme="dark"] body[data-page="home"] .home-world-item strong {
  color: var(--theme-muted);
}

/* Beat older home shell padding from community/frontend */
@media (min-width: 981px) {
  body[data-page="home"] .site-shell {
    padding-inline: 0;
  }
  body[data-page="home"] .topbar {
    padding-inline: 40px;
  }
  body[data-page="home"] main#top {
    padding-inline: 40px;
  }
  body[data-page="home"] .home-dash {
    height: 100%;
    overflow: hidden;
    padding: 12px 0;
  }
  body[data-page="home"] .home-diary.diary-sticky {
    flex: 1 1 auto;
    min-height: 0;
  }
}
