:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f6f1e8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 241, 232, 0.5) 34%, #f6f1e8),
    #f6f1e8;
  color: #1c1917;
  -webkit-tap-highlight-color: transparent;
}

button,
a {
  touch-action: manipulation;
}

.guide-card {
  border: 1px solid rgba(23, 20, 18, 0.1);
  border-radius: 20px;
  background: #fff;
  padding: 16px;
  box-shadow: 0 16px 38px rgba(41, 37, 36, 0.08);
}

.guide-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.guide-card__eyebrow {
  margin: 0 0 7px;
  color: #a16207;
  font-size: 12px;
  font-weight: 900;
}

.guide-card h2 {
  margin: 0;
  color: #1c1917;
  font-size: 20px;
  font-weight: 950;
  line-height: 1.25;
}

.guide-card__head span {
  display: inline-flex;
  min-width: max-content;
  align-items: center;
  border-radius: 999px;
  background: #171412;
  padding: 6px 10px;
  color: #fff;
  font-size: 11px;
  font-weight: 900;
}

.guide-card__text {
  margin: 11px 0 0;
  color: #57534e;
  font-size: 13px;
  line-height: 1.75;
}

.guide-card__tips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.guide-card__tips strong {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: #f6f1e8;
  padding: 8px 10px;
  color: #1c1917;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.35;
  text-align: center;
}

.product-card {
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.12);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 40px rgba(41, 37, 36, 0.08);
}

.product-image {
  width: 100%;
  aspect-ratio: 1.45 / 1;
  object-fit: cover;
  background: #e7e0d6;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.overview-card {
  display: grid;
  min-height: 72px;
  align-content: center;
  gap: 6px;
  border: 1px solid rgba(68, 64, 60, 0.12);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
  color: #57534e;
  text-align: left;
  box-shadow: 0 10px 28px rgba(41, 37, 36, 0.06);
}

.overview-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  font-weight: 900;
}

.overview-card strong {
  color: #1c1917;
  font-size: 22px;
  line-height: 1;
}

.overview-card.is-active {
  border-color: #171412;
  background: #171412;
  color: #fff;
}

.overview-card.is-active strong {
  color: #fff;
}

.search-input {
  width: 100%;
  height: 46px;
  border: 1px solid rgba(68, 64, 60, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  padding: 0 16px;
  color: #1c1917;
  font-size: 14px;
  font-weight: 800;
  outline: none;
  box-shadow: 0 10px 28px rgba(41, 37, 36, 0.06);
}

.search-input::placeholder {
  color: #a8a29e;
}

.category-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.category-scroll::-webkit-scrollbar {
  display: none;
}

.category-chip {
  display: inline-flex;
  min-width: max-content;
  height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 64, 60, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  padding: 0 15px;
  color: #57534e;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.category-chip.is-active {
  border-color: #171412;
  background: #171412;
  color: #fff;
}

.empty-state {
  display: flex;
  min-height: 120px;
  align-items: center;
  justify-content: center;
  border: 1px dashed rgba(68, 64, 60, 0.18);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.7);
  color: #78716c;
  font-size: 14px;
  font-weight: 800;
}

.primary-button {
  display: flex;
  width: 100%;
  height: 50px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  background: #171412;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  cursor: pointer;
}

.primary-button.compact {
  height: 42px;
  font-size: 13px;
}

.resource-row {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 12px;
  overflow: hidden;
  border: 1px solid rgba(68, 64, 60, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.92);
  padding: 10px;
  box-shadow: 0 12px 32px rgba(41, 37, 36, 0.07);
}

.resource-thumb {
  width: 82px;
  height: 82px;
  border-radius: 14px;
  object-fit: cover;
  background: #e7e0d6;
}

.resource-body {
  min-width: 0;
}

.resource-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.resource-meta {
  margin: 0 0 4px;
  color: #a8a29e;
  font-size: 11px;
  font-weight: 900;
}

.resource-title {
  margin: 0;
  overflow: hidden;
  color: #1c1917;
  display: -webkit-box;
  font-size: 15px;
  font-weight: 950;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.resource-desc {
  margin: 7px 0 10px;
  overflow: hidden;
  color: #625a50;
  display: -webkit-box;
  font-size: 12px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.load-more {
  display: flex;
  width: 100%;
  height: 46px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 64, 60, 0.14);
  border-radius: 999px;
  background: #fff;
  margin-top: 14px;
  color: #1c1917;
  font-size: 14px;
  font-weight: 900;
}

.member-pill {
  display: inline-flex;
  width: 54px;
  height: 50px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #f1ede5;
  color: #57534e;
  font-size: 12px;
  font-weight: 900;
}

.favorite-button {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 64, 60, 0.14);
  border-radius: 999px;
  background: #fff;
  color: #a8a29e;
  font-size: 17px;
  line-height: 1;
  cursor: pointer;
}

.favorite-button.is-active {
  border-color: #f1c453;
  background: #fff7d6;
  color: #9a6700;
}

.favorite-button:active {
  transform: scale(0.95);
}

.secondary-button {
  display: flex;
  width: 100%;
  min-height: 58px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid rgba(68, 64, 60, 0.14);
  border-radius: 18px;
  background: #fff;
  padding: 14px;
  color: #1c1917;
  text-align: left;
  cursor: pointer;
}

.secondary-button:active,
.primary-button:active,
.icon-button:active {
  transform: scale(0.985);
}

.bottom-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 28px 28px 0 0;
  background: #fbfaf7;
  padding: 14px 20px calc(22px + env(safe-area-inset-bottom));
  box-shadow: 0 -24px 60px rgba(28, 25, 23, 0.22);
}

.icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(68, 64, 60, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #44403c;
  font-size: 23px;
  line-height: 1;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 80;
  width: max-content;
  max-width: calc(100vw - 40px);
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(28, 25, 23, 0.92);
  padding: 11px 16px;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(28, 25, 23, 0.22);
}

.hidden {
  display: none !important;
}

@media (min-width: 640px) {
  .bottom-sheet {
    left: 50%;
    right: auto;
    width: min(440px, calc(100vw - 32px));
    transform: translateX(-50%);
    border-radius: 28px;
    bottom: 24px;
    padding-bottom: 22px;
  }
}

@media (max-width: 380px) {
  .guide-card__head {
    display: block;
  }

  .guide-card__head span {
    margin-top: 10px;
  }

  .guide-card__tips {
    grid-template-columns: 1fr;
  }
}
