/* Shared public shell: header, language switch and footer. */
.site-header,
.site-footer {
  width: min(100% - 40px, 760px);
  margin: 0 auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans TC", sans-serif;
  color: #3d2b1f;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 0;
  background: rgba(255, 248, 239, .92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(61, 43, 31, .08);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #3d2b1f;
  text-decoration: none;
  font-weight: 900;
  white-space: nowrap;
}

.site-brand-mark {
  font-family: "Noto Serif TC", "Noto Sans TC", serif;
  font-size: 23px;
  line-height: 1;
  color: #ff6b4a;
}

.site-brand-name {
  font-size: 22px;
  line-height: 1;
  letter-spacing: 0;
}

.site-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
  font-weight: 800;
}

.site-actions a,
.site-lang span,
.site-lang a,
.site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid rgba(61, 43, 31, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .72);
  color: #3d2b1f;
  text-decoration: none;
  font-size: 14px;
  line-height: 1;
  white-space: nowrap;
}

.site-actions a:hover,
.site-lang a:hover {
  background: #fff;
}

.site-actions .site-main-link {
  background: transparent;
  border-color: transparent;
  padding-inline: 7px;
}

.site-lang {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(61, 43, 31, .12);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
}

.site-lang span,
.site-lang a {
  min-height: 30px;
  padding: 6px 9px;
  border: 0;
  background: transparent;
  color: #7a6355;
}

.site-lang span[aria-current="true"] {
  background: #fff;
  color: #3d2b1f;
  box-shadow: 0 1px 4px rgba(61, 43, 31, .08);
}

.site-cta,
.site-actions .site-cta {
  background: #ff6b4a;
  border-color: #ff6b4a;
  color: #fff;
  box-shadow: 0 6px 16px rgba(255, 107, 74, .2);
}

.site-cta:hover,
.site-actions .site-cta:hover {
  background: #e85538;
  color: #fff;
}

.site-footer {
  border-top: 1px solid rgba(61, 43, 31, .1);
  padding: 24px 0 34px;
  text-align: center;
  color: #7a6355;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 9px 14px;
  margin-bottom: 12px;
}

.site-footer a {
  color: #3d7250;
  text-decoration: none;
  font-weight: 750;
}

.site-footer a:hover {
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
  font-size: 14px;
}

@media (max-width: 620px) {
  .site-header,
  .site-footer {
    width: min(100% - 28px, 760px);
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .site-actions {
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .site-actions::-webkit-scrollbar {
    display: none;
  }

  .site-actions a,
  .site-lang span,
  .site-lang a,
  .site-cta {
    font-size: 13px;
  }
}
