:root {
  --brand-red: #a31f1f;
  --brand-red-dark: #8f1b1b;
  --accent-gold: #c8a24a;
  --bg-light: #f4efe4;
  --line: rgba(176, 152, 122, 0.28);
  --page-bg-image: url("../../小图/微信图片_20260414214619_122_535.jpg");
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: #e8e2d5;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #2f2520;
}

input,
textarea,
button,
select {
  font: inherit;
}

.page {
  max-width: 375px;
  min-height: 100vh;
  margin: 0 auto;
  background:
    linear-gradient(rgba(244, 239, 228, 0.76), rgba(244, 239, 228, 0.76)),
    var(--page-bg-image) center top / cover no-repeat;
  position: relative;
  overflow-x: hidden;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--brand-red);
  color: #fff;
}

.topbar-main {
  height: calc(66px + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.back-btn {
  color: #fff;
  text-decoration: none;
  font-size: 34px;
  line-height: 1;
  width: 28px;
}

.topbar h1 {
  margin: 0;
  font-size: 18px;
  line-height: 1;
  font-weight: 700;
}

.topbar-spacer {
  width: 86px;
  height: 1px;
}

.content {
  padding: 12px 10px 96px;
}

.weather-card {
  background: rgba(245, 239, 228, 0.95);
  border: 1px solid #d9c89c;
  border-radius: 18px;
  padding: 10px 12px;
}

.weather-main {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.weather-main strong {
  color: #8e0f0f;
  font-size: 50px;
  line-height: 1;
  letter-spacing: 0.2px;
}

.weather-main span {
  font-size: 15px;
  line-height: 1.1;
  white-space: nowrap;
}

.weather-sub {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 11px;
  color: #5f5449;
  letter-spacing: 0.2px;
}

.weather-sub span {
  white-space: nowrap;
}

.weather-sub .status {
  padding: 1px 4px;
  border: 1px solid #9cc08f;
  color: #649156;
}

.tabs {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.tab {
  height: 44px;
  border: 1px solid #d9d4ca;
  border-radius: 10px;
  background: #f8f5ef;
  color: #6e3b3b;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  white-space: nowrap;
  cursor: pointer;
}

.tab.active {
  background: var(--brand-red);
  color: #fff;
  border-color: var(--brand-red);
}

/* 酒选择器样式 */
.wine-selector {
  margin-top: 12px;
}

.wine-empty {
  background: rgba(245, 239, 228, 0.95);
  border: 1px dashed #d9c89c;
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.wine-empty-icon {
  font-size: 40px;
  display: block;
  margin-bottom: 8px;
}

.wine-empty p {
  margin: 0 0 12px;
  color: #6b5f53;
  font-size: 14px;
}

.wine-adopt-btn {
  display: inline-block;
  background: var(--brand-red);
  color: #fff;
  padding: 10px 24px;
  border-radius: 20px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
}

.wine-selected {
  display: flex;
  align-items: center;
  background: rgba(245, 239, 228, 0.95);
  border: 1px solid #d9c89c;
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}

.wine-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  margin-right: 10px;
}

.wine-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wine-name {
  font-size: 15px;
  font-weight: 600;
  color: #3a2e26;
}

.wine-hint {
  font-size: 11px;
  color: #9b8f82;
}

.wine-arrow {
  font-size: 12px;
  color: #9b8f82;
  transition: transform 0.2s;
}

.wine-list {
  margin-top: 8px;
  background: rgba(245, 239, 228, 0.95);
  border: 1px solid #d9c89c;
  border-radius: 12px;
  overflow: hidden;
}

.wine-item {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  cursor: pointer;
  border-bottom: 1px solid #ede8df;
}

.wine-item:last-child {
  border-bottom: none;
}

.wine-item:hover {
  background: rgba(163, 31, 31, 0.08);
}

.wine-item.active {
  background: rgba(163, 31, 31, 0.12);
}

.wine-item.active .wine-name {
  color: var(--brand-red);
}

.wine-item .wine-thumb {
  width: 36px;
  height: 36px;
  margin-right: 10px;
}

.wine-item .wine-name {
  font-size: 14px;
}

.timeline {
  margin-top: 12px;
}

.timeline-item {
  display: flex;
  margin-bottom: 16px;
  align-items: flex-start;
}

.timeline-left {
  flex-shrink: 0;
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-right: 10px;
}

.timeline-left .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #a31f1f;
  margin-bottom: 4px;
}

.timeline-left .date {
  font-size: 12px;
  color: #6b5f53;
  text-align: center;
}

.timeline-right {
  flex: 1;
}

.timeline-right .desc {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.5;
  color: #3a2e26;
}

.timeline-right img {
  width: 100%;
  height: 160px;
  border-radius: 12px;
  object-fit: cover;
  /* Hide bottom-right watermark by cropping bottom area */
  object-position: center top;
}

@supports (clip-path: inset(10px)) {
  .timeline-right img {
    clip-path: inset(0 0 26px 0);
  }
}

.empty {
  margin: 0;
  color: #6b5f53;
  font-size: 14px;
  padding: 6px 0 10px;
}

.bottom-tab {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(375px, 100vw);
  height: calc(70px + env(safe-area-inset-bottom));
  background: #f1ebdf;
  border-top: 1px solid #ded5c3;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 6px 2px env(safe-area-inset-bottom);
}

.tab-item {
  text-decoration: none;
  color: #9fa3a9;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
}

.tab-item .icon {
  font-size: 18px;
  line-height: 1;
}

.tab-item.active {
  color: var(--accent-gold);
  font-weight: 600;
}
