/* Home living moment — one calm, useful invitation before the dashboard shelves. */

html body .app-shell #homeMemoryOfDay.is-living-home {
  width: min(100%, 1040px) !important;
  max-width: 1040px !important;
  padding: 0 !important;
  margin-inline: auto !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  overflow: visible !important;
}

html body .app-shell #homeMemoryOfDay .home-living-card {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(220px, 0.72fr) minmax(0, 1.28fr);
  min-height: 300px;
  overflow: hidden;
  border: 1px solid rgba(11, 82, 92, 0.14);
  border-radius: 30px;
  background:
    radial-gradient(circle at 12% 8%, color-mix(in srgb, var(--living-accent, #18a978) 18%, transparent), transparent 38%),
    linear-gradient(145deg, rgba(249, 253, 252, 0.98), rgba(236, 247, 244, 0.96));
  box-shadow:
    0 24px 58px rgba(3, 44, 57, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

html body .app-shell #homeMemoryOfDay .home-living-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -84px;
  bottom: -116px;
  width: 330px;
  height: 220px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--living-accent, #18a978) 10%, transparent);
  filter: blur(2px);
  pointer-events: none;
}

html body .app-shell #homeMemoryOfDay .home-living-visual {
  position: relative;
  display: grid;
  min-width: 0;
  overflow: hidden;
  place-items: center;
  background: var(--mymappi-action-navy, #00243f);
}

html body .app-shell #homeMemoryOfDay .home-living-visual.has-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 54%, rgba(2, 32, 43, 0.28));
  pointer-events: none;
}

html body .app-shell #homeMemoryOfDay .home-living-visual.has-photo > img {
  /* The card, not the source photo's intrinsic ratio, owns the preview size. */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  object-fit: cover;
  object-position: var(--home-photo-position, center 44%);
}

html body .app-shell #homeMemoryOfDay .home-living-visual.has-atmosphere > img {
  position: relative;
  z-index: 2;
  width: clamp(118px, 14vw, 164px);
  max-width: calc(100% - 16px);
  max-height: 184px;
  object-fit: contain;
  filter: drop-shadow(0 14px 20px rgba(1, 28, 39, 0.26));
}

html body .app-shell #homeMemoryOfDay .home-living-orbit {
  position: absolute;
  width: min(78%, 190px);
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 48% 52% 55% 45% / 46% 45% 55% 54%;
  background:
    radial-gradient(circle at 34% 30%, rgba(255, 255, 255, 0.26), transparent 34%),
    rgba(74, 205, 180, 0.12);
  transform: rotate(-9deg);
}

html body .app-shell #homeMemoryOfDay .home-living-icon {
  position: absolute;
  z-index: 3;
  right: 22px;
  bottom: 20px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  color: #073f4d;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 24px rgba(2, 33, 43, 0.2);
  backdrop-filter: blur(14px);
}

html body .app-shell #homeMemoryOfDay .home-living-icon svg {
  width: 19px;
  height: 19px;
}

html body .app-shell #homeMemoryOfDay .home-living-copy {
  align-content: center;
  display: grid;
  justify-items: start;
  min-width: 0;
  padding: clamp(28px, 4vw, 48px);
}

html body .app-shell #homeMemoryOfDay .home-living-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 13px;
  color: #17656b;
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.095em;
  line-height: 1.2;
  text-transform: uppercase;
}

html body .app-shell #homeMemoryOfDay .home-living-kicker-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--living-accent, #18a978);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--living-accent, #18a978) 14%, transparent);
}

html body .app-shell #homeMemoryOfDay .home-living-copy h2 {
  max-width: 20ch;
  margin: 0;
  color: #062f3d;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 3.2vw, 2.65rem);
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.04;
  text-wrap: balance;
}

html body .app-shell #homeMemoryOfDay .home-living-copy > p {
  max-width: 52ch;
  margin: 14px 0 0;
  color: #41626a;
  font-size: 0.94rem;
  line-height: 1.58;
}

html body .app-shell #homeMemoryOfDay .home-living-meta {
  display: block;
  max-width: 100%;
  margin: 11px 0 0;
  overflow: hidden;
  color: #5d777d;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html body .app-shell #homeMemoryOfDay .home-living-action {
  min-height: 48px;
  margin: 22px 0 0;
  padding: 0 18px 0 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  color: #fff;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(116deg, #063847, #0a716c 74%, #10947c);
  box-shadow: 0 12px 24px rgba(4, 67, 74, 0.2);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 850;
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}

html body .app-shell #homeMemoryOfDay .home-living-action svg {
  width: 17px;
  height: 17px;
}

html body .app-shell #homeMemoryOfDay .home-living-action:is(:hover, :focus-visible) {
  transform: translateY(-2px);
  box-shadow: 0 16px 28px rgba(4, 67, 74, 0.24);
  filter: saturate(1.06);
}

html body .app-shell #homeMemoryOfDay .home-living-action:focus-visible {
  outline: 3px solid rgba(34, 167, 145, 0.3);
  outline-offset: 3px;
}

html body .app-shell #homeMemoryOfDay .home-living-private {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 12px 0 0;
  color: #698087;
  font-size: 0.69rem;
  font-weight: 700;
}

html body .app-shell #homeMemoryOfDay .home-living-private svg {
  width: 13px;
  height: 13px;
}

/* Drafts and saved places are both calm invitations to return. Give these
   saved states one centered reading rhythm while trips, Echoes, and daily
   prompts keep their faster left-aligned treatment. */
html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-copy {
  justify-items: center;
  text-align: center;
}

/* Treat the bookmark like a quiet saved-state badge. In the lower corner it
   competed with the card's action; this corner anchors the visual immediately
   without covering Mappi. */
html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-icon {
  top: 20px;
  right: auto;
  bottom: auto;
  left: 22px;
}

html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-kicker {
  justify-content: center;
  margin-inline: auto;
}

html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-copy h2,
html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-copy > p {
  margin-inline: auto;
}

html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-meta {
  max-width: min(100%, 44ch);
  margin: 12px auto 0;
  padding: 7px 11px;
  border: 1px solid rgba(20, 104, 101, 0.11);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.56);
  line-height: 1.35;
  text-align: center;
  text-overflow: initial;
  white-space: normal;
}

html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-action {
  min-width: min(100%, 248px);
  justify-self: center;
}

html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-private {
  justify-content: center;
  margin-inline: auto;
}

@media (max-width: 760px) {
  html body .app-shell #homeMemoryOfDay.is-living-home {
    width: calc(100% - 24px) !important;
  }

  html body .app-shell #homeMemoryOfDay .home-living-card {
    grid-template-columns: 112px minmax(0, 1fr);
    min-height: 224px;
    border-radius: 24px;
  }

  html body .app-shell #homeMemoryOfDay .home-living-visual.has-photo > img {
    min-height: 224px;
  }

  html body .app-shell #homeMemoryOfDay .home-living-visual.has-atmosphere > img {
    width: 94px;
    transform: translateX(-2px);
  }

  html body .app-shell #homeMemoryOfDay .home-living-icon {
    right: 10px;
    bottom: 12px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  html body .app-shell #homeMemoryOfDay .home-living-copy {
    align-content: center;
    padding: 22px 18px;
  }

  html body .app-shell #homeMemoryOfDay .home-living-kicker {
    margin-bottom: 9px;
    font-size: 0.61rem;
    letter-spacing: 0.07em;
  }

  html body .app-shell #homeMemoryOfDay .home-living-copy h2 {
    font-size: clamp(1.28rem, 5.7vw, 1.58rem);
    line-height: 1.06;
  }

  html body .app-shell #homeMemoryOfDay .home-living-copy > p {
    display: -webkit-box;
    margin-top: 9px;
    overflow: hidden;
    font-size: 0.77rem;
    line-height: 1.42;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  html body .app-shell #homeMemoryOfDay .home-living-meta {
    margin-top: 7px;
    font-size: 0.64rem;
  }

  html body .app-shell #homeMemoryOfDay .home-living-action {
    width: 100%;
    min-height: 42px;
    margin-top: 14px;
    padding-inline: 13px;
    gap: 9px;
    border-radius: 14px;
    font-size: 0.73rem;
  }

  html body .app-shell #homeMemoryOfDay .home-living-private {
    margin-top: 8px;
    font-size: 0.58rem;
  }

  html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-meta {
    margin-top: 8px;
    padding: 5px 8px;
  }

  html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-icon {
    top: 12px;
    right: auto;
    bottom: auto;
    left: 10px;
  }

  html body .app-shell #homeMemoryOfDay .home-living-card:is(.is-saved-place, .is-draft) .home-living-action {
    width: 100%;
    min-width: 0;
    min-height: 44px;
  }
}

@media (max-width: 390px) {
  html body .app-shell #homeMemoryOfDay .home-living-card {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  html body .app-shell #homeMemoryOfDay .home-living-copy {
    padding-inline: 14px;
  }

  html body .app-shell #homeMemoryOfDay .home-living-private {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  html body .app-shell #homeMemoryOfDay .home-living-action {
    transition: none;
  }
}
