:root {
  --cream: #f6efe7;
  --mocha: #a87452;
  --leaf: #8cae8a;
  --warm-gray: #6c6763;
  --peach: #efbc8a;
  --mist-blue: #aabfca;
  --ink: #2f2c2a;
  --card: #fffaf5;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --shadow: 0 14px 34px rgba(72, 45, 27, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: "Noto Sans SC", "PingFang SC", sans-serif;
  color: var(--ink);
  background: linear-gradient(160deg, #fff8ef 0%, #ecf2eb 45%, #fef4e8 100%);
}

h1,
h2,
h3,
.brand,
.nav-item,
.side-nav h1 {
  font-family: "Baloo 2", "Noto Sans SC", cursive;
  letter-spacing: 0.02em;
}

.bg-layer {
  position: fixed;
  inset: 0;
  background-image: radial-gradient(circle at 15% 10%, rgba(255, 212, 168, 0.26) 0 120px, transparent 121px),
    radial-gradient(circle at 90% 25%, rgba(149, 189, 155, 0.24) 0 130px, transparent 131px),
    radial-gradient(circle at 30% 85%, rgba(166, 192, 206, 0.24) 0 140px, transparent 141px);
  pointer-events: none;
  z-index: -1;
}

.top-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: rgba(255, 251, 245, 0.86);
  border-bottom: 1px solid rgba(168, 116, 82, 0.18);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 0.8rem 1.25rem;
}

.nav-toggle {
  display: none;
  border: none;
  background: #f4e4d6;
  border-radius: 10px;
  width: 40px;
  height: 40px;
  font-size: 1.05rem;
  color: #4e3f34;
  cursor: pointer;
}

.brand {
  font-size: 1.4rem;
  color: var(--mocha);
  font-weight: 700;
}

.main-nav {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.nav-item {
  border: none;
  background: transparent;
  color: #4f453d;
  font-size: 1rem;
  padding: 0.7rem 0.95rem;
  position: relative;
  cursor: pointer;
  transition: color 0.25s ease;
}

.nav-item::after {
  content: '';
  position: absolute;
  bottom: 0.35rem;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background-color: var(--mocha);
  transition: width 0.3s ease;
  border-radius: 2px;
}

.nav-item:hover,
.nav-item.active {
  background: transparent;
  color: #2f2620;
}

.nav-item:hover::after,
.nav-item.active::after {
  width: calc(100% - 1.9rem);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.lang-switch {
  color: #6b5a4d;
  font-size: 0.9rem;
}

.lang-select {
  border: 1px solid #dfccb9;
  background: #fffdf8;
  color: #4f453d;
  border-radius: 10px;
  padding: 0.38rem 0.55rem;
}

.drawer-close {
  display: none;
  border: none;
  background: #f3e2d2;
  color: #4e3f34;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  font-size: 1.2rem;
  line-height: 1;
  justify-self: end;
}

.nav-overlay {
  display: none;
}

.zh-site .top-nav {
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  gap: 0.7rem;
}

.zh-site .main-nav {
  grid-column: 3;
  justify-content: flex-start;
  flex-wrap: nowrap;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.zh-site .main-nav::-webkit-scrollbar {
  display: none;
}

.zh-site .nav-item {
  white-space: nowrap;
}

.zh-site .nav-actions,
.zh-site .logo-wrap {
  white-space: nowrap;
}

.cat-logo {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #f9e5d1;
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  opacity: 0;
  pointer-events: none;
  background: #fffdf9;
  border: 1px solid rgba(168, 116, 82, 0.2);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 0.55rem 0.8rem;
  display: flex;
  gap: 0.75rem;
  transition: all 0.22s ease;
}

.nav-dropdown.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.nav-dropdown span {
  font-size: 0.88rem;
  color: #5c554f;
  white-space: nowrap;
}

.nav-dropdown span::before {
  content: "▌";
  color: var(--leaf);
  margin-right: 0.3rem;
}

.app-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 1.2rem auto 3rem;
}

.page {
  display: none;
  opacity: 0;
  transform: translateY(22px) scale(0.99);
}

.page.active {
  display: block;
  animation: pageEnter 0.55s ease forwards;
}

@keyframes pageEnter {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.module {
  background: var(--card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: clamp(1rem, 2vw, 2rem);
  margin-bottom: 1.2rem;
  position: relative;
  overflow: hidden;
}

.offset-left {
  margin-right: 4%;
}

.tag-left {
  border-top-left-radius: 0;
  margin-right: 12%;
}

.tag-right {
  border-top-right-radius: 0;
  margin-left: 12%;
}

.bottom-touch {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  margin-bottom: 0;
}

.module-grid.two-col {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 1.2rem;
  align-items: center;
}

.hero-visual .img-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.hero-visual h1 {
  margin: 0.8rem 0 0;
}

.hero-text p,
.module p {
  line-height: 1.7;
}

.pill-btn {
  border: none;
  border-radius: 999px;
  background: linear-gradient(120deg, #b57e59, #cf9b71);
  color: white;
  padding: 0.7rem 1.2rem;
  font-size: 0.96rem;
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.pill-btn:hover {
  transform: scale(1.03);
  filter: brightness(1.06);
}

.cat-deco {
  position: absolute;
  right: 1rem;
  bottom: 0.8rem;
  color: rgba(168, 116, 82, 0.5);
}

.center {
  text-align: center;
}

.mission-block {
  background: #fffbf7;
  border: 1px dashed rgba(168, 116, 82, 0.35);
  border-radius: var(--radius-lg);
  padding: 1rem 1.2rem;
}

.team-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 1rem;
}

.team-card {
  background: linear-gradient(150deg, #fff7ef, #f0f5ec);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1rem;
  box-shadow: var(--shadow);
}

.team-card h3 {
  margin-bottom: 0.25rem;
}

.team-card strong {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.team-card p {
  color: var(--text-light);
  line-height: 1.5;
  font-size: 0.95rem;
}

.story-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 0.8rem 0 1rem;
}

.story-grid article {
  background: #fffcf8;
  border: 1px solid #f0dfcf;
  border-radius: var(--radius-md);
  padding: 0.8rem;
}

.partner-wall {
  display: grid;
  gap: 0.8rem;
}

.line-mark {
  display: inline-block;
  width: 10px;
  height: 2px;
  background: var(--leaf);
  margin-right: 0.45rem;
  vertical-align: middle;
}

.split-layout {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 1rem;
}

.side-nav {
  background: #fffaf4;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1rem;
  position: sticky;
  top: 90px;
  height: fit-content;
}

.side-link {
  width: 100%;
  text-align: left;
  border: none;
  margin: 0.25rem 0;
  border-radius: 12px;
  padding: 0.7rem;
  background: transparent;
  cursor: pointer;
  color: #5f5247;
}

.side-link.active,
.side-link:hover {
  background: #efe4d6;
}

.content-pane {
  min-height: 400px;
}

.news-card {
  background: #fffaf4;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 0.9rem;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.news-card:hover {
  transform: translateY(-2px);
}

.news-card img {
  width: 100%;
  height: 130px;
  border-radius: 14px;
  object-fit: cover;
}

.finance-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 1rem;
}

.soft-box {
  background: #fffefb;
  border: 1px solid #ead8c6;
  border-radius: var(--radius-lg);
  padding: 1rem;
}

.soft-box small {
  color: var(--warm-gray);
}

.metric-stack {
  display: grid;
  gap: 0.7rem;
}

.metric-card {
  border-radius: var(--radius-md);
  padding: 0.9rem;
  display: grid;
  gap: 0.25rem;
}

.metric-card strong {
  font-size: 1.45rem;
  text-align: center;
}

.metric-card em {
  color: #6e6660;
  font-style: normal;
  font-size: 0.82rem;
  justify-self: end;
}

.m1 {
  background: #edf4ec;
}

.m2 {
  background: #fdeedf;
}

.m3 {
  background: #ecf2f6;
}

.chart-wrap {
  background: #fffdf9;
  border-radius: var(--radius-lg);
  border: 1px solid #ecdccf;
  padding: 0.8rem;
}

.chart-legend {
  list-style: none;
  margin: 0.6rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.35rem;
}

.chart-legend li {
  font-size: 0.9rem;
}

.chart-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.35rem;
}

.timeline-day {
  border-left: 3px solid #d9b89c;
  margin-left: 0.65rem;
  padding-left: 1rem;
  margin-bottom: 0.95rem;
}

.timeline-day h3 {
  margin: 0.2rem 0 0.55rem;
}

.entry-card {
  background: #fffefb;
  border: 1px solid #eadacb;
  border-radius: 14px;
  padding: 0.7rem;
  margin-bottom: 0.45rem;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: center;
}

.entry-amount.income {
  color: #318056;
}

.entry-amount.expense {
  color: #bc5b3c;
}

.expand-btn {
  border: none;
  background: transparent;
  color: #5f5954;
  cursor: pointer;
  padding: 0;
}

.entry-detail {
  margin-top: 0.45rem;
  border-top: 1px dashed #deccbd;
  padding-top: 0.45rem;
  display: none;
}

.entry-card.open .entry-detail {
  display: block;
}

.privacy-mark {
  color: #7a726c;
  font-size: 0.8rem;
}

.cats-filter {
  margin-bottom: 0.8rem;
}

.search-row {
  display: flex;
  gap: 0.5rem;
}

.search-row input {
  flex: 1;
  border: 1px solid #d8c9bb;
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
}

.search-row button {
  width: 46px;
  border-radius: 50%;
  border: none;
  background: #ecd6c2;
  cursor: pointer;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.7rem;
}

.breed-tag {
  border: none;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  background: #f2e7da;
  cursor: pointer;
}

.breed-tag.active {
  background: #8cae8a;
  color: white;
}

.empty-tip {
  min-height: 1.2rem;
  color: #9e5c4b;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 0.8rem;
}

.cat-card {
  background: #fffaf5;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.cat-card:hover {
  transform: translateY(-2px);
}

.cat-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.cat-meta {
  padding: 0.8rem;
}

.badges {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.badge {
  border: 1px solid #8cae8a;
  border-radius: 999px;
  padding: 0.12rem 0.5rem;
  font-size: 0.82rem;
}

.badge.warn {
  border-color: #cc9d57;
}

.cat-detail {
  margin-top: 1rem;
  background: #fffaf4;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 1rem;
}

.hidden {
  display: none;
}

.detail-gallery {
  display: grid;
  grid-template-columns: 46px 1fr 46px;
  gap: 0.5rem;
  align-items: center;
}

.detail-gallery img {
  width: 40%;
  margin: 0 auto;
  max-height: 420px;
  border-radius: var(--radius-lg);
  object-fit: cover;
}

.gal-btn {
  border: none;
  height: 46px;
  border-radius: 12px;
  background: #f0dfcf;
  cursor: pointer;
}

.detail-meta {
  margin-top: 0.7rem;
  display: grid;
  gap: 0.25rem;
}

.comment-box {
  margin-top: 0.8rem;
  border-top: 1px dashed #d8c4b2;
  padding-top: 0.7rem;
}

.comment-input-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
}

.comment-input-row input {
  border: 1px solid #d8c9bb;
  border-radius: 12px;
  padding: 0.58rem;
}

.comment-input-row button {
  border: none;
  border-radius: 12px;
  background: #b57e59;
  color: white;
  padding: 0 1rem;
}

.comment-item {
  background: #fff;
  border: 1px solid #eddccf;
  border-radius: 12px;
  padding: 0.6rem;
  margin-top: 0.5rem;
}

.comment-head {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.comment-head img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-actions {
  margin-top: 0.35rem;
  display: flex;
  gap: 0.7rem;
}

.comment-actions button {
  border: none;
  background: transparent;
  color: #5c544d;
  cursor: pointer;
  padding: 0.2rem 0.1rem;
}

.recruit {
  text-align: center;
  background: linear-gradient(160deg, #f6e8db, #e9f2e7);
}

.small-kicker {
  color: #7d5c44;
}

.qa-list details {
  background: #fffefb;
  border: 1px solid #e9d7c8;
  border-radius: 12px;
  padding: 0.6rem 0.75rem;
  margin-bottom: 0.5rem;
}

.contact {
  margin-left: 9%;
}

.contact-row {
  display: grid;
  grid-template-columns: 130px 1fr 90px;
  gap: 0.55rem;
  align-items: center;
  margin-bottom: 0.45rem;
}

.qr {
  border: 1px dashed #c5b29f;
  border-radius: 10px;
  padding: 0.4rem;
  text-align: center;
  color: #7a6a5c;
}

.fade-in {
  animation: fadeIn 0.35s ease forwards;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.swipe-hint {
  display: none;
}

.site-footer {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
  color: var(--warm-gray);
  font-size: 0.9rem;
}

.footer-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.footer-link {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--mocha);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: #8a5738;
}

.footer-divider {
  color: #d8c9bb;
  font-size: 0.9rem;
}

@media (max-width: 960px) {
  .module-grid.two-col,
  .team-cards,
  .story-grid,
  .finance-grid,
  .split-layout,
  .catalog-grid {
    grid-template-columns: 1fr;
  }

  .top-nav {
    grid-template-columns: auto auto 1fr;
    justify-items: stretch;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.75rem;
  }

  .brand {
    font-size: 1.1rem;
  }

  .nav-toggle {
    display: inline-grid;
    place-items: center;
  }

  .main-nav {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.3rem;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-4px);
    transition: max-height 0.3s ease, opacity 0.25s ease, transform 0.25s ease;
  }

  .main-nav.open {
    max-height: 340px;
    opacity: 1;
    transform: translateY(0);
    margin-top: 0.45rem;
  }

  .nav-item {
    width: 100%;
    text-align: left;
    padding: 0.72rem 0.82rem;
    border-radius: 12px;
  }

  .nav-item::after {
    left: 0.82rem;
    transform: none;
    bottom: 0.4rem;
  }

  .nav-item:hover::after,
  .nav-item.active::after {
    width: auto;
    width: calc(100% - 1.64rem);
  }

  .nav-actions {
    justify-content: end;
  }

  .logo-wrap {
    grid-column: 1 / -1;
    justify-self: center;
    margin-top: 0.2rem;
    padding: 0.32rem 0.6rem;
  }

  .lang-switch {
    display: none;
  }

  .lang-select {
    min-height: 36px;
  }

  .nav-dropdown {
    display: none;
  }

  .side-nav {
    position: static;
    display: block;
    padding: 0.8rem;
    width: 100%;
    min-width: 0;
  }

  .side-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.6rem;
  }

  .side-nav-header h1 {
    margin: 0;
  }

  .swipe-hint {
    display: inline-block;
    font-size: 0.85rem;
    color: #a39486;
  }

  .side-tabs {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 0.45rem;
    scrollbar-width: none; /* Firefox */
  }

  .side-tabs::-webkit-scrollbar {
    display: none; /* Safari/Chrome */
  }

  .side-link {
    width: auto;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
    padding: 0.5rem 0.8rem;
  }

  .offset-left,
  .tag-left,
  .tag-right,
  .contact {
    margin: 0;
    border-radius: var(--radius-xl);
  }

  .news-card {
    grid-template-columns: 1fr;
    padding: 0.75rem;
  }

  .app-shell {
    width: calc(100% - 1rem);
    margin: 0.8rem auto 2rem;
  }

  .module {
    padding: 0.9rem;
    margin-bottom: 0.85rem;
  }

  .entry-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }

  .chart-wrap {
    padding: 0.55rem;
  }

  #expenseChart {
    width: 100%;
    height: auto;
  }

  .detail-gallery {
    grid-template-columns: 40px 1fr 40px;
  }

  .detail-gallery img {
    width: 100%;
  }

  .comment-input-row {
    grid-template-columns: 1fr;
  }

  .comment-input-row button {
    min-height: 40px;
  }

  .contact-row {
    grid-template-columns: 1fr;
    padding: 0.55rem;
    border: 1px dashed #e2cebb;
    border-radius: 12px;
  }

  .zh-site .top-nav {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.6rem 0.7rem;
  }

  .zh-site .brand {
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    white-space: nowrap;
  }

  .zh-site .nav-toggle {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    order: -1;
  }

  .zh-site .nav-actions {
    order: 3;
    flex: 0 0 auto;
    justify-content: flex-end;
  }

  .zh-site .lang-select {
    min-height: 34px;
    padding: 0.3rem 0.45rem;
  }

  .zh-site .logo-wrap {
    order: 4;
    grid-column: auto;
    margin-top: 0;
    justify-self: auto;
    padding: 0.22rem 0.45rem;
    flex: 0 0 auto;
  }

  .zh-site .logo-wrap span {
    display: inline;
  }

  .zh-site .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: min(82vw, 290px);
    height: 100dvh;
    z-index: 42;
    display: grid;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 0.38rem;
    padding: 0.85rem;
    margin: 0;
    background: #fffaf4;
    border-right: 1px solid #ead6c3;
    box-shadow: 10px 0 26px rgba(55, 39, 26, 0.18);
    transform: translateX(-105%);
    opacity: 1;
    max-height: none;
    overflow-y: auto;
    transition: transform 0.28s ease;
  }

  .zh-site .main-nav.open {
    transform: translateX(0);
    margin-top: 0;
  }

  .zh-site .drawer-close {
    display: inline-block;
  }

  .zh-site .nav-item {
    width: 100%;
    text-align: left;
    padding: 0.7rem 0.82rem;
    border-radius: 12px;
    white-space: nowrap;
  }

  .zh-site .nav-item::after {
    left: 0.82rem;
    transform: none;
    bottom: 0.35rem;
  }

  .zh-site .nav-item:hover::after,
  .zh-site .nav-item.active::after {
    width: calc(100% - 1.64rem);
  }

  .zh-site .nav-dropdown {
    display: none;
  }

  .zh-site .nav-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: transparent;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
    z-index: 19;
  }

  .zh-site .nav-overlay.show {
    opacity: 1;
    pointer-events: auto;
  }

  .zh-site.drawer-open {
    overflow: hidden;
  }

  .footer-content {
    flex-direction: column;
    gap: 0.6rem;
  }
  
  .footer-divider {
    display: none;
  }
}
