:root {
  --bg: #f5f5f5;
  --panel: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d1d5db;
  --text: #111827;
  --muted: #6b7280;
  --accent: #111827;
  --accent-soft: #f3f4f6;
  --danger-bg: #fef2f2;
  --danger-text: #991b1b;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 "PingFang SC", "Microsoft YaHei", sans-serif;
}

button,
a {
  font: inherit;
}

.page {
  width: min(960px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero,
.board,
.status-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero {
  padding: 16px 20px;
  display: grid;
  gap: 12px;
}

.hero__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 10px;
}

.hero__content {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.1;
  white-space: nowrap;
}

.intro {
  margin: 0;
  max-width: 42rem;
  color: var(--muted);
}

.meta-card {
  width: 184px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fafafa;
  justify-self: end;
}

.hero__notice {
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.meta-card__label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 11px;
}

.meta-card strong {
  display: block;
  font-size: 15px;
}

.status-panel {
  margin-top: 14px;
  padding: 14px 16px;
}

.status-panel--error {
  border-color: #fecaca;
  background: var(--danger-bg);
  color: var(--danger-text);
}

.notice-list {
  display: grid;
  gap: 8px;
}

.notice {
  margin: 0;
  position: relative;
  padding-left: 12px;
  color: var(--muted);
  font-size: 13px;
}

.notice::before {
  content: "";
  position: absolute;
  top: 10px;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--line-strong);
}

.board {
  margin-top: 16px;
  padding: 20px;
}

.board__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.board__head h2 {
  margin: 0;
  font-size: 20px;
}

.board__subhead {
  margin: 4px 0 0;
  color: var(--muted);
}

.shop-list {
  display: grid;
  gap: 8px;
}

.shop-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fcfcfc;
}

.shop-card__main {
  min-width: 0;
}

.shop-card__title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.shop-card__name {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.latency-badge {
  flex-shrink: 0;
  min-width: 58px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}

.latency-badge--pending {
  background: #f3f4f6;
  color: var(--muted);
}

.latency-badge--fast {
  background: #ecfdf5;
  color: #047857;
}

.latency-badge--normal {
  background: #eff6ff;
  color: #1d4ed8;
}

.latency-badge--slow {
  background: #fff7ed;
  color: #c2410c;
}

.latency-badge--error {
  background: #fef2f2;
  color: #b91c1c;
}

.price-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(120px, 1fr));
  gap: 8px;
}

.price-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.price-item__label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12px;
}

.price-item__value {
  flex-shrink: 0;
  font-size: 15px;
  font-weight: 600;
}

.price-item__value::before {
  content: "¥";
  margin-right: 2px;
}

.shop-card__actions {
  display: flex;
  justify-content: flex-end;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: var(--accent);
  color: #ffffff;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover {
  opacity: 0.92;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.button--secondary {
  background: var(--accent-soft);
  border-color: var(--line-strong);
  color: var(--text);
}

.button--compact {
  min-width: 88px;
  padding: 0 12px;
}

.empty-state {
  padding: 24px 12px 8px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 760px) {
  .page {
    width: min(100% - 20px, 100%);
    padding: 16px 0 28px;
  }

  .hero {
    padding: 16px;
  }

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

  .meta-card {
    width: 100%;
    justify-self: stretch;
  }

  .board {
    padding: 16px;
  }

  .shop-card {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shop-card__name {
    white-space: normal;
  }

  .shop-card__title-row {
    align-items: flex-start;
  }

  .price-list {
    grid-template-columns: 1fr;
  }

  .shop-card__actions {
    justify-content: stretch;
  }

  .shop-card__actions .button {
    width: 100%;
  }
}
