﻿/*
 * Home refinements and responsive tweaks
 */

/* 首页导航栏及网格优化 */
.memorial-header .user-area { gap: 0.6rem; }
#dataSourceBadge, #projectGuideBtn { display: none !important; }



.memorial-grid { display: grid !important; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important; gap: 2.1rem !important; align-items: stretch; justify-items: stretch; margin: 3rem 0 !important; }
.tombstone { max-width: none !important; min-height: 320px !important; }
.tomb-scene { border: none !important; background: linear-gradient(145deg, rgba(255, 252, 248, 0.95), rgba(245, 248, 250, 0.8)) !important; box-shadow: 0 8px 24px rgba(120, 100, 90, 0.05), inset 0 2px 4px rgba(255, 255, 255, 1) !important; border-radius: 24px !important; padding: 1.35rem 1.3rem 1.2rem !important; }
.memorial-grid .tombstone:hover,
.memorial-grid .tombstone:focus-visible { transform: none !important; background: linear-gradient(135deg, rgba(255, 252, 246, 0.72), rgba(247, 242, 236, 0.56)) !important; border-color: rgba(228, 189, 201, 0.96) !important; box-shadow: 0 16px 40px rgba(132, 112, 104, 0.12), 0 0 0 1px rgba(236, 205, 214, 0.38) !important; }
.memorial-grid .tombstone:hover .tomb-scene,
.memorial-grid .tombstone:focus-visible .tomb-scene { background: linear-gradient(145deg, rgba(255, 252, 248, 0.95), rgba(245, 248, 250, 0.8)) !important; border-color: rgba(255, 240, 230, 0.8) !important; box-shadow: 0 8px 24px rgba(120, 100, 90, 0.05), inset 0 2px 4px rgba(255, 255, 255, 1) !important; }
.tomb-name { font-size: 1.52rem !important; color: #3f3734 !important; font-family: 'Georgia', 'Times New Roman', serif !important; margin-top: 0 !important; }
.tomb-photo { border-color: rgba(214, 192, 198, 0.9) !important; box-shadow: 0 10px 22px rgba(109, 90, 84, 0.12) !important; }
.tomb-photo img { border: none !important; box-shadow: none !important; border-radius: 50% !important; }
.tomb-years { color: #9b8d86 !important; font-size: 0.82rem !important; letter-spacing: 0.04em !important; font-family: 'Nunito', 'Noto Sans SC', sans-serif !important; }
.tomb-summary { color: #756a66 !important; font-style: normal !important; font-size: 0.97rem !important; }
.tomb-summary span { max-width: none !important; }
.tomb-worship { background: rgba(255, 251, 248, 0.94) !important; color: #876e70 !important; padding: 0.42rem 0.84rem !important; border-radius: 8px !important; font-weight: 500 !important; margin-top: auto; min-width: 7.9rem !important; min-height: 2.45rem !important; max-width: 100% !important; border: 1px solid rgba(188, 171, 164, 0.96) !important; box-shadow: none !important; }
.tomb-worship--button { appearance: none !important; -webkit-appearance: none !important; -webkit-tap-highlight-color: transparent !important; border: 1px solid rgba(188, 171, 164, 0.96) !important; box-shadow: none !important; }
.tomb-worship--button.is-busy { pointer-events: none !important; }
.tomb-worship--button:hover { background: rgba(255, 249, 247, 0.98) !important; color: #7a5d65 !important; border-color: rgba(204, 169, 180, 0.98) !important; box-shadow: 0 0 0 1px rgba(235, 205, 216, 0.24) !important; }
.tomb-worship--button.is-lit { background: rgba(254, 245, 247, 0.98) !important; color: #744654 !important; border-color: rgba(188, 138, 152, 0.98) !important; box-shadow: 0 0 0 1px rgba(232, 195, 208, 0.22) !important; }
.tomb-worship--button[disabled], .tomb-worship--button[aria-disabled="true"] { opacity: 0.52 !important; box-shadow: none !important; }
.tomb-worship--button.is-lit[disabled], .tomb-worship--button.is-lit[aria-disabled="true"] { opacity: 1 !important; box-shadow: none !important; }
.tomb-worship__count { color: #9a7d80 !important; border-left: 1px solid rgba(207, 190, 183, 0.9) !important; padding-left: 0.5rem !important; min-width: 3.4ch !important; position: relative !important; overflow: visible !important; }
.tomb-worship__count-value { position: relative !important; display: inline-flex !important; align-items: center !important; justify-content: flex-end !important; min-width: 100% !important; }
.tomb-worship__count-burst { position: absolute !important; left: 50% !important; top: 0 !important; font-family: 'Nunito', 'Noto Sans SC', sans-serif !important; font-size: 0.84rem !important; font-weight: 800 !important; line-height: 1 !important; color: #b67a87 !important; white-space: nowrap !important; pointer-events: none !important; animation: tomb-worship-count-burst 0.46s ease-out forwards !important; }
.tomb-worship--button.is-lit .tomb-worship__count { color: #7a4b59 !important; border-left-color: rgba(197, 156, 169, 0.92) !important; }
.tomb-worship--button.is-lit .tomb-worship__count-burst { color: #ab6b7c !important; }
.tomb-worship i { color: #ab8689 !important; }
.tomb-worship--button.is-lit i { color: #9d6473 !important; }

.home-hub {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.home-gateway {
  position: relative;
  isolation: isolate;
  padding: 0.8rem;
  border-radius: 34px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0.16));
  border: 1px solid rgba(255, 255, 255, 0.62);
  box-shadow: 0 14px 34px rgba(132, 112, 104, 0.08);
  overflow: hidden;
}

.home-gateway::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 236, 243, 0.5), transparent 26%),
    radial-gradient(circle at 80% 70%, rgba(224, 241, 233, 0.46), transparent 28%),
    radial-gradient(circle at 52% 82%, rgba(248, 235, 210, 0.32), transparent 32%);
  opacity: 0.88;
  pointer-events: none;
  z-index: -1;
}

.home-gateway__surface {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.92fr);
  gap: 2rem;
  padding: 2.45rem 2.5rem;
  background: linear-gradient(145deg, rgba(255, 252, 248, 0.94), rgba(247, 244, 247, 0.86));
  border: 1px solid rgba(232, 220, 214, 0.8);
  border-radius: 28px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 24px rgba(132, 112, 104, 0.06);
  overflow: hidden;
}

.home-gateway__surface::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(255, 245, 248, 0.72), transparent 22%),
    radial-gradient(circle at 84% 72%, rgba(234, 245, 240, 0.54), transparent 26%);
  pointer-events: none;
  opacity: 0.76;
}

.home-gateway__surface.is-guest {
  background: linear-gradient(145deg, rgba(255, 252, 248, 0.95), rgba(247, 243, 247, 0.88));
  gap: 1.55rem;
  padding: 2rem 2.1rem;
}

.home-gateway__surface.is-empty {
  background: linear-gradient(145deg, rgba(255, 252, 248, 0.95), rgba(255, 246, 248, 0.9));
}

.home-gateway__surface.is-guest .home-gateway__intro {
  gap: 0.8rem;
}

.home-gateway__surface.is-guest .home-gateway__title {
  font-size: 2.25rem;
}

.home-gateway__surface.is-guest .home-gateway__body {
  max-width: 33rem;
  line-height: 1.65;
}

.home-gateway__surface.is-guest .home-gateway__actions {
  margin-top: 0.15rem;
}

.home-gateway__surface.is-guest .home-gateway__panel {
  gap: 0.85rem;
  padding-left: 1.65rem;
}

.home-gateway__surface.is-guest .home-step {
  gap: 0.72rem;
  padding: 0.72rem 0.1rem;
}

.home-gateway__surface.is-guest .home-step__index {
  flex: 0 0 1.7rem;
  font-size: 0.76rem;
}

.home-gateway__surface.is-guest .home-step__body strong {
  font-size: 0.94rem;
}

.home-gateway__surface.is-guest .home-step__body small {
  font-size: 0.84rem;
  line-height: 1.42;
}

.home-gateway__surface.is-guest .home-support-strip {
  margin-top: 0.15rem;
  padding-top: 0.8rem;
}

.home-gateway__intro {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  min-width: 0;
}

.home-gateway__surface.is-guest .home-gateway__intro,
.home-gateway__surface.is-empty .home-gateway__intro {
  justify-content: center;
}

.home-gateway__eyebrow,
.home-public-kicker,
.home-gateway__panel-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #b46f88;
  text-transform: none;
}

.home-gateway__title,
.home-public-title {
  margin: 0;
  color: #5a4c42;
}

.home-gateway__title {
  font-size: 2.6rem;
  line-height: 1.12;
}

.home-public-title {
  font-size: 2rem;
  line-height: 1.2;
}

.home-gateway__body,
.home-public-hint,
.home-gateway__panel-head p {
  margin: 0;
  color: #7c6961;
  font-size: 1rem;
  line-height: 1.75;
}

.home-gateway__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 0.35rem;
}

.home-cta,
.home-step,
.home-pet-quick,
.home-link-btn {
  border-radius: 8px;
  transition: transform 0.18s ease, border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.home-cta {
  border: 1px solid transparent;
  min-height: 46px;
  padding: 0.75rem 1.2rem;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 700;
  cursor: pointer;
}

.home-cta--primary {
  background: linear-gradient(135deg, #ff92c7, #ff69b4);
  color: #fff;
  box-shadow: 0 10px 24px rgba(255, 105, 180, 0.22);
}

.home-cta--secondary {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(230, 207, 201, 0.82);
  color: #6b5750;
}

.home-cta--ghost {
  background: transparent;
  border-color: rgba(230, 207, 201, 0.62);
  color: #8f6b73;
}

.home-cta:hover,
.home-step:hover,
.home-pet-quick:hover,
.home-link-btn:hover {
  transform: translateY(-1px);
}

.home-gateway__stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.4rem;
}

.home-gateway__stat {
  min-width: 0;
  padding-top: 0.9rem;
  border-top: 1px solid rgba(226, 203, 197, 0.72);
}

.home-gateway__stat span {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
  color: #9a827b;
}

.home-gateway__stat strong {
  display: block;
  color: #5a4c42;
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.home-gateway__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.1rem;
  min-width: 0;
  padding-left: 2rem;
}

.home-gateway__panel::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: linear-gradient(180deg, rgba(226, 203, 197, 0), rgba(226, 203, 197, 0.82) 18%, rgba(226, 203, 197, 0.82) 82%, rgba(226, 203, 197, 0));
}

.home-gateway__panel-head {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.home-support-strip {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.4rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(226, 203, 197, 0.72);
}

.home-support-strip__copy {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}

.home-support-strip__label {
  display: block;
  color: #6e5b54;
  font-size: 0.9rem;
  font-weight: 600;
}

.home-support-strip__copy p {
  margin: 0;
  color: #8f7c74;
  font-size: 0.88rem;
  line-height: 1.6;
}

.home-support-strip__button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 0.62rem 0.95rem;
  border-radius: 8px;
  border: 1px solid rgba(214, 195, 188, 0.9);
  background: rgba(255, 255, 255, 0.82);
  color: #7c5d66;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.home-support-strip__button:hover {
  background: rgba(255, 249, 247, 0.96);
  border-color: rgba(201, 172, 181, 0.98);
  color: #6f505b;
  transform: translateY(-1px);
}

.home-step-list,
.home-pet-shortcuts {
  display: flex;
  flex-direction: column;
}

.home-step,
.home-pet-quick {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  padding: 1rem 0.15rem;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(226, 203, 197, 0.72);
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.home-step:last-child,
.home-pet-quick:last-child {
  border-bottom: none;
}

.home-step:not(.home-step--static):hover,
.home-pet-quick:hover {
  transform: none;
  background: rgba(255, 255, 255, 0.42);
  box-shadow: inset 0 0 0 1px rgba(235, 221, 214, 0.42);
}

.home-step--static {
  cursor: default;
}

.home-step--static:hover {
  transform: none;
}

.home-step__index {
  flex: 0 0 2rem;
  color: #c792a7;
  font-size: 0.82rem;
  font-weight: 700;
}

.home-step__body,
.home-pet-quick__body {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-step__body strong,
.home-pet-quick__name {
  color: #5a4c42;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.35;
}

.home-step__body small,
.home-pet-quick__meta {
  color: #8d776f;
  font-size: 0.88rem;
  line-height: 1.5;
}

.home-pet-quick__media {
  flex: 0 0 3.25rem;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 8px;
  overflow: hidden;
  background: rgba(247, 236, 239, 0.92);
}

.home-pet-quick__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.home-pet-quick__body {
  flex: 1;
}

.home-link-btn {
  align-self: flex-start;
  margin-top: 0.3rem;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: #b46f88;
  font-size: 0.94rem;
  font-weight: 700;
  cursor: pointer;
}

.home-public-shell {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.home-public-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 1rem 2rem;
}

.home-public-copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.home-public-hint {
  max-width: 34rem;
  text-align: right;
}

.home-public-grid.memorial-grid {
  display: block !important;
  column-width: 320px;
  column-gap: 1.5rem;
  margin: 0 !important;
}

.home-public-grid .tombstone {
  display: inline-block;
  width: 100%;
  margin: 0 0 1.5rem;
  min-height: 0 !important;
  break-inside: avoid;
}

.home-public-grid .tomb-scene {
  min-height: 0;
}

.home-pagination-shell {
  margin-top: 0.25rem;
}

.dashboard-shell {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.dashboard-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem 1.4rem;
  align-items: end;
  margin-bottom: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.dashboard-header__copy {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  min-width: 0;
}

.dashboard-header__copy h2 {
  margin: 0;
  color: #996d69;
  font-size: 2rem;
  line-height: 1.14;
  font-weight: 700;
}

.dashboard-header__copy p {
  margin: 0;
  max-width: 38rem;
  color: #b18680;
  font-size: 0.98rem;
  line-height: 1.75;
}

#dashboardView .memorial-grid {
  margin: 0 0 1.4rem !important;
}

#dashboardView .pagination-container {
  margin-top: 0;
}

.create-pet-btn {
  min-height: 44px;
  padding: 0.78rem 1.2rem;
  border-radius: 8px;
  border: 1px solid rgba(229, 206, 200, 0.92);
  background: rgba(255, 255, 255, 0.92);
  color: #6b5750;
  font-size: 0.98rem;
  font-weight: 600;
  box-shadow: 0 10px 22px rgba(133, 111, 103, 0.08);
  backdrop-filter: blur(10px);
}

.create-pet-btn:hover {
  background: rgba(255, 247, 249, 0.98);
  border-color: rgba(228, 189, 201, 0.96);
  color: #5f4e47;
  transform: translateY(-1px);
}

@media (max-width: 980px) {
  .home-gateway {
    padding: 0.62rem;
    border-radius: 28px;
  }

  .home-gateway__surface {
    grid-template-columns: 1fr;
    padding: 1.55rem;
    border-radius: 22px;
  }

  .home-gateway__panel {
    padding-left: 0;
    padding-top: 1rem;
  }

  .home-gateway__panel::before {
    left: 0;
    right: 0;
    top: 0;
    bottom: auto;
    width: auto;
    height: 1px;
    background: linear-gradient(90deg, rgba(226, 203, 197, 0), rgba(226, 203, 197, 0.82) 18%, rgba(226, 203, 197, 0.82) 82%, rgba(226, 203, 197, 0));
  }

  .home-public-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .home-public-hint {
    max-width: none;
    text-align: left;
  }

  .home-support-strip {
    align-items: stretch;
  }

  .dashboard-header {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 720px) {
  .home-hub {
    gap: 2.25rem;
  }

  .home-gateway {
    padding: 0.48rem;
    border-radius: 24px;
  }

  .home-gateway__title {
    font-size: 2rem;
  }

  .home-public-title {
    font-size: 1.6rem;
  }

  .home-gateway__stats {
    grid-template-columns: 1fr;
  }

  .home-gateway__actions {
    flex-direction: column;
  }

  .home-cta {
    width: 100%;
  }

  .dashboard-header__copy h2 {
    font-size: 1.75rem;
  }

  .create-pet-btn {
    width: 100%;
    justify-content: center;
  }

  .home-support-strip {
    flex-direction: column;
  }

  .home-support-strip__button {
    width: 100%;
  }
}
