/* 布局：顶部栏、两栏、吸底操作条、响应式 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  max-width: var(--max-width);
  height: 100%;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand .mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.brand-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}

.brand-sub {
  font-size: 9.5px;
  color: var(--faint);
  margin-left: 10px;
  padding-left: 10px;
  border-left: 1px solid var(--line);
  white-space: nowrap;
}

.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.top-tag {
  font-size: 9px;
  color: var(--faint);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 3px 8px;
  white-space: nowrap;
}

.top-link {
  font-size: 10px;
  color: var(--ink);
  background: var(--bg);
  border-radius: var(--r-sm);
  padding: 5px 10px;
  text-decoration: none;
  white-space: nowrap;
}

.page {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 18px 24px 48px;
}

.layout {
  display: grid;
  grid-template-columns: 404px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.history-section {
  margin-top: 16px;
}

/* 手机吸底条 */
.dock {
  display: none;
}

@media (max-width: 1023px) {
  .layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .page {
    padding: 12px 12px 96px;
  }

  .topbar {
    height: 54px;
  }

  .topbar-inner {
    padding: 0 14px;
  }

  .brand-sub {
    display: none;
  }

  .top-link {
    display: none;
  }

  .dock {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255, 255, 255, 0.97);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(12px);
  }

  .dock-price {
    min-width: 76px;
  }

  .dock-price span {
    display: block;
    font-size: 8.5px;
    color: var(--faint);
    letter-spacing: 0.06em;
  }

  .dock-price b {
    display: block;
    font-size: 16px;
    font-weight: 500;
    margin-top: 1px;
  }

  .dock .btn-primary {
    flex: 1;
  }
}

@media (min-width: 1024px) {
  .desktop-only {
    display: flex;
  }
}

@media (max-width: 1023px) {
  .desktop-only {
    display: none;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 10px 10px 92px;
  }

  .summary {
    grid-template-columns: 1fr 1fr;
  }
}
