.home-page {
  --home-blue: #078bd2;
  --home-blue-deep: #087ebc;
  --home-blue-soft: #eaf7ff;
  --home-text: #222222;
  --home-muted: #777c82;
  --home-line: #e9edf0;
  --home-card-radius: 22px;

  min-height: 100vh;
  min-height: 100dvh;
  margin: 0;
  padding: 22px 18px calc(126px + env(safe-area-inset-bottom));
  box-sizing: border-box;
  overflow-x: hidden;
  background: #ffffff;
  color: var(--home-text);
  font-family: Roboto, "Noto Sans TC", "Microsoft JhengHei", sans-serif;
}

.home-page *,
.home-page *::before,
.home-page *::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

.home-shell {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.home-hero {
  overflow: hidden;
  border: 1px solid rgba(64, 64, 64, 0.09);
  border-radius: 24px;
  background: #f4f4f4;
  box-shadow: 0 12px 34px rgba(31, 41, 55, 0.08);
}

.home-hero img {
  width: 100%;
  height: clamp(205px, 38vw, 300px);
  display: block;
  padding: clamp(18px, 4vw, 34px);
  object-fit: contain;
}

.home-welcome-card {
  margin-top: 20px;
  padding: clamp(22px, 4vw, 30px);
  border: 1px solid var(--home-line);
  border-radius: var(--home-card-radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.08);
}

.home-welcome-head {
  display: flex;
  gap: 14px;
  justify-content: space-between;
  align-items: flex-start;
}

.home-welcome-copy {
  min-width: 0;
}

.home-welcome-title {
  margin: 0;
  color: var(--home-text);
  font-size: clamp(1.28rem, 4.4vw, 1.72rem);
  font-weight: 900;
  line-height: 1.35;
}

.home-welcome-subtitle {
  margin: 8px 0 0;
  color: #555b60;
  font-size: clamp(0.94rem, 3.2vw, 1.08rem);
  line-height: 1.55;
}

.home-auth-badge {
  flex: 0 0 auto;
  max-width: 42%;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--home-blue-soft);
  color: var(--home-blue);
  font-size: clamp(0.78rem, 2.8vw, 0.95rem);
  font-weight: 900;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

.home-member-number {
  display: flex;
  gap: 11px;
  align-items: center;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--home-line);
  color: #44494e;
  font-size: clamp(0.96rem, 3.2vw, 1.08rem);
  font-weight: 700;
}

.home-member-number-icon {
  width: 30px;
  height: 30px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 30px;
  border: 2px solid var(--home-blue);
  border-radius: 8px;
  color: var(--home-blue);
  font-size: 0.72rem;
  font-weight: 900;
}

.hearter-merit-alert { display:flex; flex-wrap:wrap; align-items:center; gap:8px 12px; margin-bottom:18px; padding:13px 15px; border:2px solid #c63b37; border-radius:13px; background:#fff2f1; color:#8f2421; line-height:1.6; }
.hearter-merit-alert[hidden] { display:none !important; }
.hearter-merit-alert strong { font-weight:900; }
.hearter-merit-alert > span { flex:1 1 250px; font-size:.9rem; }
.hearter-merit-alert button { border:1px solid #c63b37; border-radius:9px; background:#fff; color:#9a2522; padding:7px 11px; font-weight:800; cursor:pointer; min-height:44px; }
.hearter-merit-alert button:hover { background:#ffe4e2; }
/* 首頁與心之使者共用提醒框外觀，但首頁採直向文案，不能繼承 span 的 250px flex-basis。 */
.home-merit-alert { margin:18px 0 0; }
.home-merit-alert-copy > span { flex:none; font-size:.9rem; }
.home-merit-alert-copy { display:flex; flex:1 1 260px; flex-direction:column; gap:2px; }
.home-calendar-card {
  margin-top: 18px;
  padding: clamp(18px, 3.6vw, 24px);
  border: 1px solid var(--home-line);
  border-radius: var(--home-card-radius);
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.07);
}

.home-calendar-head {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
}

.home-calendar-kicker {
  margin: 0 0 4px;
  color: var(--home-blue);
  font-size: .75rem;
  font-weight: 900;
  letter-spacing: .12em;
}

.home-calendar-head h2 {
  margin: 0;
  color: var(--home-text);
  font-size: clamp(1.15rem, 3.8vw, 1.48rem);
  line-height: 1.3;
}

.home-calendar-head p:not(.home-calendar-kicker) {
  margin: 6px 0 0;
  color: #6b7075;
  font-size: .9rem;
  line-height: 1.45;
}

.home-calendar-today {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid #cfeaf8;
  border-radius: 999px;
  background: var(--home-blue-soft);
  color: var(--home-blue-deep);
  font: inherit;
  font-size: .84rem;
  font-weight: 900;
  cursor: pointer;
}

.home-calendar-toolbar {
  display: grid;
  grid-template-columns: 42px minmax(0,1fr) 42px;
  gap: 10px;
  align-items: center;
  margin-top: 18px;
}

.home-calendar-toolbar button {
  width: 42px;
  height: 42px;
  border: 1px solid #e0e5e9;
  border-radius: 12px;
  background: #fff;
  color: #4b535b;
  font: inherit;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
}

.home-calendar-toolbar strong {
  text-align: center;
  font-size: 1.05rem;
  font-weight: 900;
}

.home-calendar-weekdays,
.home-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0,1fr));
}

.home-calendar-weekdays {
  margin-top: 14px;
  color: #7b8289;
  font-size: .76rem;
  font-weight: 900;
  text-align: center;
}

.home-calendar-weekdays span {
  padding: 7px 2px;
}

.home-calendar-grid {
  overflow: hidden;
  border: 1px solid #e5e9ed;
  border-radius: 15px;
  background: #e5e9ed;
  gap: 1px;
}

.home-calendar-day {
  min-width: 0;
  min-height: 92px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border: 0;
  background: #fff;
  color: #2f3439;
  font: inherit;
  text-align: left;
  cursor: pointer;
  overflow: hidden;
}

.home-calendar-day.is-outside {
  background: #fafbfc;
  color: #a3a8ad;
}

.home-calendar-day.is-selected {
  box-shadow: inset 0 0 0 2px var(--home-blue);
  position: relative;
  z-index: 1;
}

.home-calendar-day-number {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .8rem;
  font-weight: 900;
}

.home-calendar-day.is-today .home-calendar-day-number {
  background: var(--home-blue);
  color: #fff;
}

.home-calendar-day-events {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.home-calendar-event-chip {
  min-width: 0;
  display: block;
  padding: 4px 6px;
  border-radius: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .68rem;
  font-weight: 800;
  line-height: 1.25;
}

.home-calendar-event-chip.is-manual {
  background: #d6eef9;
  color: #045b8d;
}

.home-calendar-event-chip.is-activity {
  background: #e5d8fa;
  color: #5b32b4;
}

.home-calendar-more {
  color: #6f7780;
  font-size: .68rem;
  font-weight: 900;
}

.home-calendar-status {
  margin-top: 10px;
  color: #747a80;
  font-size: .8rem;
  line-height: 1.4;
}

.home-calendar-day-panel {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #e3e8ec;
  border-radius: 15px;
  background: #f8fafc;
}

.home-calendar-day-panel-head {
  display: flex;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 10px;
}

.home-calendar-day-panel-head strong {
  font-size: .96rem;
}

.home-calendar-day-panel-head span {
  color: #7a8086;
  font-size: .78rem;
}

.home-calendar-day-events {
  display: grid;
  gap: 8px;
}

.home-calendar-day-event {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border: 1px solid #e4e8ec;
  border-left-width: 4px;
  border-radius: 12px;
  background: #fff;
}

.home-calendar-day-event.is-manual {
  border-left-color: var(--home-blue);
}

.home-calendar-day-event.is-activity {
  border-left-color: #7c3aed;
}

.home-calendar-day-event > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.home-calendar-event-type {
  width: max-content;
  padding: 3px 7px;
  border-radius: 999px;
  background: #edf1f4;
  color: #66707a;
  font-size: .68rem;
  font-weight: 900;
}

.home-calendar-day-event.is-activity .home-calendar-event-type {
  background: #e5d8fa;
  color: #5b32b4;
}

.home-calendar-day-event strong {
  color: #2d3237;
  font-size: .9rem;
}

.home-calendar-day-event p {
  margin: 0;
  color: #747b82;
  font-size: .78rem;
  line-height: 1.45;
}

.home-calendar-day-event button {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 11px;
  border: 0;
  border-radius: 10px;
  background: #7c3aed;
  color: #fff;
  font: inherit;
  font-size: .78rem;
  font-weight: 900;
  cursor: pointer;
}

.home-push-card {
  width: 100%;
  min-height: 82px;
  display: flex;
  gap: 13px;
  align-items: center;
  margin: 17px 0 0;
  padding: 14px 16px;
  border: 1px solid #cfeaf8;
  border-radius: 18px;
  background: linear-gradient(135deg, #f4fbff, #eaf7ff);
  box-shadow: 0 9px 22px rgba(7, 139, 210, .09);
  color: #222222;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.home-push-card:active {
  transform: scale(.99);
}

.home-push-card:disabled {
  opacity: .58;
  cursor: default;
}

.home-push-card-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  flex: 0 0 48px;
  border-radius: 15px;
  background: var(--home-blue);
  box-shadow: 0 7px 16px rgba(7, 139, 210, .18);
  color: #ffffff;
  font-size: 25px;
  line-height: 1;
}

.home-push-card-copy {
  min-width: 0;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
}

.home-push-card-title {
  color: var(--home-blue-deep);
  font-size: clamp(1rem, 3.4vw, 1.16rem);
  font-weight: 900;
  line-height: 1.3;
}

.home-push-card-detail {
  color: #60666b;
  font-size: clamp(.82rem, 2.7vw, .95rem);
  font-weight: 600;
  line-height: 1.42;
}

.common-function-cards,
.common-function-cards * {
  box-sizing: border-box;
}

.common-function-cards {
  width: 100%;
  max-width: 800px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 26px auto 24px;
}

.common-function-card {
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 214px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin: 0;
  padding: 24px 20px 22px;
  border: 1px solid #eef1f3;
  border-radius: 22px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(31, 41, 55, 0.07);
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.common-function-card:hover {
  border-color: #cfeaf8;
  box-shadow: 0 15px 32px rgba(31, 41, 55, 0.10);
}

.common-function-card:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 7px 18px rgba(31, 41, 55, 0.07);
}

.common-function-card:focus-visible {
  outline: 3px solid rgba(7, 139, 210, 0.30);
  outline-offset: 3px;
}

.common-function-card.is-active {
  border-color: #a9ddf7;
  background: #f4fbff;
  box-shadow: 0 14px 31px rgba(7, 139, 210, 0.12);
}

.common-function-card-icon {
  width: 66px;
  height: 66px;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
  border-radius: 50%;
  background: #eaf7ff;
}

.common-function-card.is-active .common-function-card-icon {
  background: #dff3ff;
}

.common-function-card-icon img {
  width: 40px;
  height: 40px;
  display: block;
  object-fit: contain;
}

.common-function-card-title {
  display: block;
  color: #087ebc;
  font-size: clamp(1.14rem, 3.8vw, 1.38rem);
  font-weight: 700;
  line-height: 1.35;
}

.common-function-card-description {
  display: block;
  margin-top: 8px;
  color: #777c82;
  font-size: clamp(0.82rem, 2.9vw, 0.97rem);
  line-height: 1.55;
}

.home-system-push-feature-icon {
  display: inline-flex !important;
  justify-content: center;
  align-items: center;
  color: #ffffff;
  background: var(--home-blue);
  font-size: 29px;
  line-height: 1;
}

.home-brand-footer {
  width: min(230px, 60%);
  height: auto;
  display: block;
  margin: 38px auto 0;
  opacity: 0.74;
}

.common-bottom-nav,
.common-bottom-nav *,
.common-bottom-nav *::before,
.common-bottom-nav *::after {
  box-sizing: border-box;
}

.common-bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 8000;
  padding: 8px 14px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(222, 227, 231, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -7px 22px rgba(31, 41, 55, 0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.common-bottom-nav-inner {
  width: 100%;
  max-width: 800px;
  display: grid;
  grid-template-columns: repeat(var(--common-bottom-count), minmax(0, 1fr));
  gap: 6px;
  margin: 0 auto;
}

.common-bottom-nav-inner.is-single {
  grid-template-columns: minmax(120px, 176px);
  justify-content: center;
}

.common-bottom-nav-item {
  min-width: 0;
  min-height: 56px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  margin: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  color: #3c4145;
  font: inherit;
  text-align: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.common-bottom-nav-item:active {
  transform: scale(0.98);
}

.common-bottom-nav-item.is-active {
  background: #eaf7ff;
  color: #078bd2;
}

.common-bottom-nav-item:focus-visible {
  outline: 3px solid rgba(7, 139, 210, 0.30);
  outline-offset: 3px;
}

.common-bottom-nav-icon {
  width: 27px;
  height: 27px;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: visible;
}

.common-bottom-nav-icon img {
  width: 23px;
  height: 23px;
  max-width: none;
  display: block;
  object-fit: contain;
}

.common-bottom-refresh-symbol {
  width: 41px;
  height: 41px;
  display: grid;
  place-items: center;
  color: currentColor;
  font-size: 41px;
  font-weight: 900;
  line-height: 1;
  transform: translateY(-1px);
  overflow: visible;
}

.common-bottom-nav-label {
  max-width: 100%;
  overflow: hidden;
  color: currentColor;
  font-size: clamp(0.58rem, 2vw, 0.70rem);
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.processing-overlay {
  position: fixed;
  inset: 0;
  z-index: 30000;
  display: none;
  justify-content: center;
  align-items: center;
  padding: 20px;
  background: rgba(17, 24, 39, .50);
}

.processing-overlay.show {
  display: flex;
}

.processing-content {
  width: min(90vw, 430px);
  display: flex;
  gap: 15px;
  align-items: center;
  padding: 20px 22px;
  border: 1px solid rgba(32, 33, 36, .12);
  border-radius: 19px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(17, 24, 39, .30);
}

.spinner {
  width: 35px;
  height: 35px;
  flex: 0 0 35px;
  border: 4px solid #e5e7eb;
  border-top-color: #078bd2;
  border-radius: 50%;
  animation: homeSpin .75s linear infinite;
}

.processing-text {
  color: #202124;
  font-size: 1.06rem;
  font-weight: 900;
  line-height: 1.45;
}

@keyframes homeSpin {
  to { transform: rotate(360deg); }
}

.home-access-message {
  padding-top: 1px;
}

.home-page.is-phone-device {
  padding-bottom: calc(86px + env(safe-area-inset-bottom));
}

.home-page.is-phone-device .home-push-card {
  min-height: 68px;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 15px;
}

.home-page.is-phone-device .home-push-card-icon {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 12px;
  font-size: 21px;
}

.home-page.is-phone-device .common-function-cards {
  gap: 9px !important;
  margin-top: 18px !important;
  margin-bottom: 17px !important;
}

.home-page.is-phone-device .common-function-card {
  min-height: 133px !important;
  padding: 14px 11px 13px !important;
  border-radius: 13px !important;
}

.home-page.is-phone-device .common-function-card-icon {
  width: 41px !important;
  height: 41px !important;
  margin-bottom: 13px !important;
}

.home-page.is-phone-device .common-function-card-icon img {
  width: 25px !important;
  height: 25px !important;
}

.home-page.is-phone-device .common-function-card-title {
  font-size: clamp(0.90rem, 2.6vw, 1.05rem) !important;
}

.home-page.is-phone-device .common-function-card-description {
  margin-top: 6px !important;
  font-size: clamp(0.66rem, 2vw, 0.78rem) !important;
  line-height: 1.45 !important;
}

html.is-phone-device .common-bottom-nav,
body.is-phone-device .common-bottom-nav {
  padding: 4px 6px calc(4px + env(safe-area-inset-bottom));
}

html.is-phone-device .common-bottom-nav-item,
body.is-phone-device .common-bottom-nav-item {
  min-height: 60px;
  gap: 4px;
  padding: 4px 6px;
  border-radius: 18px;
}

html.is-phone-device .common-bottom-nav-icon,
body.is-phone-device .common-bottom-nav-icon {
  width: 30px;
  height: 30px;
}

html.is-phone-device .common-bottom-nav-icon img,
body.is-phone-device .common-bottom-nav-icon img {
  width: 27px !important;
  height: 27px !important;
  max-width: none !important;
}

html.is-phone-device .common-bottom-refresh-symbol,
body.is-phone-device .common-bottom-refresh-symbol {
  width: 47px;
  height: 47px;
  font-size: 47px;
}

html.is-phone-device .common-bottom-nav-label,
body.is-phone-device .common-bottom-nav-label {
  font-size: clamp(0.85rem, 2.4vw, 0.95rem) !important;
}

html.is-phone-device .common-bottom-nav-inner.is-single,
body.is-phone-device .common-bottom-nav-inner.is-single {
  grid-template-columns: minmax(0, 134px);
}

@media (max-width: 560px) {
  .home-page {
    padding-top: 14px;
    padding-right: 14px;
    padding-left: 14px;
  }

  .home-welcome-head {
    gap: 10px;
  }

  .home-auth-badge {
    padding: 7px 11px;
  }

  .home-calendar-card {
    padding: 15px 12px;
    border-radius: 19px;
  }

  .home-calendar-head {
    gap: 8px;
  }

  .home-calendar-head p:not(.home-calendar-kicker) {
    font-size: .8rem;
  }

  .home-calendar-today {
    min-height: 34px;
    padding: 0 11px;
  }

  .home-calendar-day {
    min-height: 62px;
    gap: 4px;
    padding: 5px 4px;
  }

  .home-calendar-day-number {
    width: 23px;
    height: 23px;
    font-size: .72rem;
  }

  .home-calendar-event-chip {
    height: 5px;
    padding: 0;
    border-radius: 999px;
    font-size: 0;
  }

  .home-calendar-event-chip.is-manual {
    background: #078bd2;
  }

  .home-calendar-event-chip.is-activity {
    background: #7c3aed;
  }

  .home-calendar-more {
    font-size: .6rem;
  }

  .home-calendar-day-event {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-calendar-day-event button {
    width: 100%;
  }

  .common-function-cards {
    gap: 13px;
  }

  .common-function-card {
    min-height: 190px;
    padding: 20px 16px 18px;
    border-radius: 19px;
  }

  .common-function-card-icon {
    width: 58px;
    height: 58px;
    margin-bottom: 18px;
  }

  .common-function-card-icon img {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 370px) {
  .home-page {
    padding-right: 10px;
    padding-left: 10px;
  }

  .common-function-cards {
    gap: 9px;
  }

  .common-function-card {
    min-height: 182px;
    padding-right: 13px;
    padding-left: 13px;
  }

  .common-function-card-description {
    font-size: 0.78rem;
  }
}


/* 直接開啟官網時的會員帳密登入。首次開通仍必須由 LINE 驗證完成。 */
.home-login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--home-line);
}
.home-login-form label {
  color: #3e4449;
  font-size: .94rem;
  font-weight: 900;
}
.home-login-form input {
  width: 100%;
  height: 54px;
  padding: 0 15px;
  border: 1px solid #cfd8de;
  border-radius: 14px;
  outline: 0;
  background: #ffffff;
  color: #202124;
  font: inherit;
  font-size: 1.05rem;
}
.home-login-form input:focus {
  border-color: var(--home-blue);
  box-shadow: 0 0 0 4px rgba(7, 139, 210, .12);
}
#memberLoginButton {
  width: 100%;
  min-height: 54px;
  margin-top: 8px;
  padding: 13px 18px;
  border: 0;
  border-radius: 14px;
  background: var(--home-blue);
  box-shadow: 0 9px 20px rgba(7, 139, 210, .20);
  color: #ffffff;
  font: inherit;
  font-size: 1.03rem;
  font-weight: 900;
  cursor: pointer;
}
#memberLoginButton:disabled {
  opacity: .6;
  cursor: default;
}
.home-login-message {
  min-height: 1.4em;
  margin: 4px 0 0;
  color: #c1352b;
  font-size: .92rem;
  font-weight: 700;
  line-height: 1.5;
}
.home-login-help {
  margin: 2px 0 0;
  color: #666d73;
  font-size: .88rem;
  line-height: 1.55;
}


/* 公開品牌介紹：提供搜尋引擎與首次訪客清楚辨識大超越官方網站。 */
.home-brand-intro {
  margin-top: 18px;
  padding: 18px 20px;
  border: 1px solid var(--home-line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .86);
  text-align: left;
}
.home-brand-intro h2 {
  margin: 0 0 7px;
  color: #202124;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.4;
}
.home-brand-intro p {
  margin: 0;
  color: #666d73;
  font-size: .88rem;
  line-height: 1.65;
}


/* 首頁「定課連結」：沿用官網卡片、品牌藍色、圓角及固定底部導航安全區。
   視窗僅含靜態外連，無資料庫、API、額外字型或圖像請求。 */
.home-page.study-links-dialog-open {
  overflow: hidden;
}
.home-study-links-overlay,
.home-study-links-overlay * {
  box-sizing: border-box;
}
.home-study-links-overlay[hidden] {
  display: none !important;
}
.home-study-links-overlay {
  position: fixed;
  inset: 0;
  z-index: 9600; /* 高於底部導覽列(8000)，但低於處理中遮罩(30000)。 */
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px 16px calc(20px + var(--app-bottom-nav-height, 0px));
  background: rgba(18, 33, 48, .56);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.home-study-links-panel {
  display: flex;
  flex-direction: column;
  width: min(100%, 492px);
  max-height: calc(100dvh - var(--app-bottom-nav-height, 0px) - 40px);
  min-height: 0;
  overflow: hidden;
  border: 1px solid #e6eff5;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(9, 47, 74, .24);
}
.home-study-links-head {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 22px 22px 20px;
  border-bottom: 1px solid #eaf0f4;
  background: linear-gradient(115deg, #f0faff 0%, #fff 88%);
}
.home-study-links-heading {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}
.home-study-links-heading-icon {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: #dff3ff;
  font-size: 27px;
}
.home-study-links-eyebrow {
  margin: 0 0 3px;
  color: var(--home-blue);
  font-size: .67rem;
  font-weight: 900;
  letter-spacing: .14em;
}
.home-study-links-heading h2 {
  margin: 0;
  color: #183649;
  font-size: clamp(1.24rem, 4.2vw, 1.5rem);
  font-weight: 900;
  line-height: 1.3;
}
.home-study-links-close {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 1px solid #ddeaf1;
  border-radius: 14px;
  background: #fff;
  color: #3f5969;
  font: inherit;
  font-size: 29px;
  font-weight: 400;
  cursor: pointer;
}
.home-study-links-close:hover,
.home-study-links-close:focus-visible {
  border-color: #9bd6f5;
  background: #eef9ff;
  color: var(--home-blue-deep);
}
.home-study-links-body {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 21px 22px 23px;
}
.home-study-links-description {
  margin: 0 0 19px;
  color: #657780;
  font-size: .93rem;
  line-height: 1.7;
}
.home-study-links-list {
  display: grid;
  gap: 12px; /* 後續可直接加入其它定課群入口。 */
}
.home-study-links-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 98px;
  padding: 17px 16px;
  border: 1.5px solid #cce7f7;
  border-radius: 18px;
  background: #f5fbff;
  color: #184158;
  text-align: left;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.home-study-links-item:hover {
  border-color: #79c5ee;
  box-shadow: 0 9px 25px rgba(7, 139, 210, .12);
}
.home-study-links-item:active {
  transform: translateY(1px);
}
.home-study-links-item-icon {
  display: grid;
  place-items: center;
  flex: 0 0 53px;
  width: 53px;
  height: 53px;
  border-radius: 15px;
  background: #dcefff;
  font-size: 27px;
}
.home-study-links-item-copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.home-study-links-item-copy strong {
  color: #096eab;
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.3;
}
.home-study-links-item-copy > span {
  color: #667b8b;
  font-size: .84rem;
  line-height: 1.4;
}
.home-study-links-item-arrow {
  display: grid;
  place-items: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #fff;
  color: #078bd2;
  font-size: 21px;
  font-weight: 800;
}
.home-study-links-note {
  margin: 17px 2px 0;
  color: #7a8993;
  font-size: .79rem;
  line-height: 1.5;
}
.home-study-links-overlay :is(a, button):focus-visible {
  outline: 3px solid rgba(7, 139, 210, .4);
  outline-offset: 3px;
}
@media (max-width: 520px) {
  .home-study-links-overlay {
    padding: 12px 12px calc(12px + var(--app-bottom-nav-height, 0px));
  }
  .home-study-links-panel {
    max-height: calc(100dvh - var(--app-bottom-nav-height, 0px) - 24px);
    border-radius: 21px;
  }
  .home-study-links-head {
    padding: 18px 17px;
  }
  .home-study-links-body {
    padding: 18px 17px 20px;
  }
  .home-study-links-heading-icon {
    flex-basis: 45px;
    width: 45px;
    height: 45px;
    border-radius: 13px;
    font-size: 24px;
  }
  .home-study-links-item {
    min-height: 88px;
    padding: 14px 13px;
    gap: 11px;
  }
  .home-study-links-item-icon {
    flex-basis: 46px;
    width: 46px;
    height: 46px;
    font-size: 23px;
  }
}

/* 2026-10-11 全站彈窗與固定底部導航的共用安全距離。
   高度由 nav-modal-offset.js 量測實際顯示的導航列；沒有導航列時為 0。
   不移動正常頁面、不改變導航列高度；只限制浮動視窗的可用範圍。 */
:root { --app-bottom-nav-height: 0px; }

/* 浮動視窗從導航列頂端截止，避免彈窗的確認／上傳按鍵被導航列遮住。 */
.hearteat-dialog,
.byactivity-modal,
.byactivity-bank-picker-overlay,
.admin-modal,
.hearter-global-message,
.home-system-push-modal,
.home-system-push-confirm-modal {
  bottom: var(--app-bottom-nav-height, 0px) !important;
}

/* A2 原視窗層級 80 低於導航列 8000；提高視窗層級，不讓內容被蓋住。 */
.hearteat-dialog { z-index: 9000 !important; }

/* 所有視窗內部自行捲動，頂部標題與底部按鍵保持能到達。 */
.hearteat-dialog-card,
.byactivity-modal-card,
.byactivity-bank-picker-box,
.admin-modal-dialog,
.hearter-global-message-box,
.home-system-push-dialog,
.home-system-push-confirm-dialog {
  max-height: calc(100dvh - var(--app-bottom-nav-height, 0px) - 48px) !important;
}
.hearter-global-message-box { overflow-y: auto; }

/* 推播確認流程的遮罩保留頂部／底部 padding，且不將對話框推入導航列。 */
@media (max-width: 760px) {
  .hearteat-dialog-card,
  .byactivity-modal-card,
  .byactivity-bank-picker-box,
  .admin-modal-dialog,
  .hearter-global-message-box,
  .home-system-push-dialog,
  .home-system-push-confirm-dialog {
    max-height: calc(100dvh - var(--app-bottom-nav-height, 0px) - 20px) !important;
  }
  .home-system-push-modal,
  .home-system-push-confirm-modal {
    padding-bottom: 10px !important;
  }
}

/* 上傳中的全畫面 busy 是操作防護，不是可互動彈窗；應封住導航列。 */
.hearteat-busy { z-index: 30000 !important; }
