:root {
  color-scheme: light;
  --paper: #f5f0e6;
  --paper-deep: #e8dfd0;
  --ink: #19231e;
  --ink-soft: #647068;
  --green: #164a39;
  --green-light: #d9e7dd;
  --red: #c83e32;
  --gold: #caa153;
  --white: #fffdf8;
  --line: rgba(25, 35, 30, 0.13);
  --shadow: 0 22px 60px rgba(35, 42, 37, 0.1);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 4%, rgba(202, 161, 83, 0.17), transparent 26rem),
    linear-gradient(180deg, #faf7f0 0%, var(--paper) 48%, #eee7da 100%);
}

button,
select {
  font: inherit;
}

.page-shell {
  width: min(1180px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border-radius: 50% 50% 46% 54%;
  box-shadow: inset -5px -5px 0 rgba(88, 10, 6, 0.08);
  font-family: "Songti SC", "STSong", serif;
  font-size: 23px;
  font-weight: 700;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  letter-spacing: 0.08em;
}

.brand small {
  margin-top: 2px;
  color: var(--ink-soft);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.live-indicator {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--ink-soft);
  font-size: 13px;
}

.live-dot {
  width: 8px;
  height: 8px;
  background: var(--gold);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(202, 161, 83, 0.15);
}

.live-indicator.online .live-dot {
  background: #27835f;
  box-shadow: 0 0 0 4px rgba(39, 131, 95, 0.15);
}

.live-indicator.error .live-dot {
  background: var(--red);
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.6fr);
  gap: 72px;
  align-items: end;
  padding: 86px 0 72px;
}

.eyebrow,
.section-kicker {
  margin: 0;
  color: var(--red);
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 720px;
  margin: 18px 0 24px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(54px, 7.2vw, 92px);
  font-weight: 700;
  letter-spacing: -0.08em;
  line-height: 0.99;
}

.hero-description {
  max-width: 570px;
  margin: 0;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.8;
}

.selector-panel {
  position: relative;
  padding: 30px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 4px 30px 4px 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.selector-panel::before {
  position: absolute;
  top: -44px;
  right: -44px;
  width: 100px;
  height: 100px;
  content: "";
  background: var(--red);
  border-radius: 50%;
  opacity: 0.95;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.select-wrap {
  position: relative;
  margin-bottom: 21px;
}

.select-wrap::after {
  position: absolute;
  top: 50%;
  right: 17px;
  width: 8px;
  height: 8px;
  pointer-events: none;
  content: "";
  border-right: 2px solid var(--ink);
  border-bottom: 2px solid var(--ink);
  transform: translateY(-70%) rotate(45deg);
}

select {
  width: 100%;
  padding: 15px 44px 15px 15px;
  color: var(--ink);
  appearance: none;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 3px;
  outline: none;
}

select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(22, 74, 57, 0.1);
}

select:disabled {
  cursor: wait;
  opacity: 0.62;
}

.selection-hint {
  margin: 3px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.6;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.summary-strip > div {
  display: flex;
  gap: 10px;
  align-items: baseline;
  justify-content: center;
  padding: 4px 24px;
  border-right: 1px solid var(--line);
}

.summary-strip > div:last-child {
  border-right: 0;
}

.summary-value {
  font-family: "Songti SC", "STSong", serif;
  font-size: 30px;
  font-weight: 700;
}

.summary-value.summary-time {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 19px;
}

.summary-label {
  color: var(--ink-soft);
  font-size: 12px;
}

.store-stage {
  min-height: 500px;
  padding: 62px 0 76px;
}

.hidden {
  display: none !important;
}

.empty-state,
.error-state {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  color: var(--ink-soft);
  text-align: center;
}

.loading-ring {
  width: 30px;
  height: 30px;
  border: 2px solid var(--paper-deep);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.store-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 4px 40px 4px 40px;
  box-shadow: var(--shadow);
}

.store-card-header {
  display: flex;
  gap: 40px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 42px 46px;
  color: var(--white);
  background:
    linear-gradient(110deg, rgba(255, 255, 255, 0.04), transparent 36%),
    var(--green);
}

.store-meta-line {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
}

.status-pill,
.soft-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: var(--green);
  background: var(--green-light);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.status-pill.closed {
  color: #7a3029;
  background: #f3d9d5;
}

.store-card h2 {
  margin: 0 0 10px;
  font-family: "Songti SC", "STSong", serif;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.04em;
}

.store-card-header p {
  max-width: 700px;
  margin: 0;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.65;
}

.queue-number-block {
  display: grid;
  min-width: 132px;
  justify-items: center;
  padding: 15px 20px 13px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 50% 50% 48% 52%;
}

.queue-number-block span,
.queue-number-block small {
  color: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.queue-number-block strong {
  margin: -2px 0 -5px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 58px;
  font-weight: 700;
  line-height: 1.1;
}

.store-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
}

.detail-panel {
  min-height: 270px;
  padding: 38px 44px 42px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-panel:last-child {
  border-right: 0;
}

.section-heading {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 26px;
}

.section-heading h3 {
  margin: 5px 0 0;
  font-size: 20px;
}

.soft-badge {
  color: var(--ink-soft);
  background: var(--paper);
}

.queue-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.pressure-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 9px;
  color: #256449;
  background: #dcece2;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.pressure-badge.light {
  color: #6d5a20;
  background: #f3e9c4;
}

.pressure-badge.moderate {
  color: #86511e;
  background: #f6ddbf;
}

.pressure-badge.heavy {
  color: #8a382f;
  background: #f5d3ce;
}

.pressure-badge.extreme {
  color: var(--white);
  background: var(--red);
}

.queue-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.queue-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px;
  background: var(--paper);
  border-left: 3px solid var(--gold);
}

.queue-type span {
  color: var(--ink-soft);
  font-size: 13px;
}

.queue-type strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
}

.queue-empty {
  grid-column: 1 / -1;
  padding: 30px 18px;
  color: var(--ink-soft);
  background: var(--paper);
  text-align: center;
}

.store-facts {
  margin: 0;
}

.store-facts > div {
  display: grid;
  grid-template-columns: 94px 1fr;
  gap: 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.store-facts > div:last-child {
  border-bottom: 0;
}

.store-facts dt {
  color: var(--ink-soft);
  font-size: 12px;
}

.store-facts dd {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.history-panel {
  padding: 38px 44px 44px;
}

.history-note {
  color: var(--ink-soft);
  font-size: 11px;
}

.chart-wrap {
  min-height: 180px;
}

.chart-wrap svg {
  display: block;
  width: 100%;
  height: 200px;
  overflow: visible;
}

.chart-empty {
  display: grid;
  min-height: 160px;
  place-items: center;
  color: var(--ink-soft);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 8px,
    rgba(25, 35, 30, 0.025) 8px,
    rgba(25, 35, 30, 0.025) 9px
  );
  border: 1px dashed var(--line);
}

.error-state strong {
  color: var(--ink);
  font-family: "Songti SC", "STSong", serif;
  font-size: 24px;
}

.error-state p {
  margin: 10px 0 20px;
}

.error-state button {
  padding: 10px 18px;
  color: var(--white);
  cursor: pointer;
  background: var(--green);
  border: 0;
  border-radius: 3px;
}

footer {
  display: flex;
  justify-content: space-between;
  padding: 28px 0 36px;
  color: var(--ink-soft);
  border-top: 1px solid var(--line);
  font-size: 11px;
}

footer p {
  margin: 0;
}

@media (max-width: 780px) {
  .page-shell {
    width: min(100% - 28px, 680px);
  }

  .site-header {
    padding: 18px 0;
  }

  .brand small {
    display: none;
  }

  .live-indicator {
    font-size: 11px;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 38px;
    padding: 56px 0 44px;
  }

  .hero h1 {
    margin-top: 14px;
    font-size: clamp(48px, 16vw, 70px);
  }

  .selector-panel {
    padding: 24px;
    border-radius: 4px 24px 4px 24px;
  }

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

  .summary-strip > div {
    justify-content: space-between;
    padding: 15px 4px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip > div:last-child {
    border-bottom: 0;
  }

  .summary-value {
    font-size: 25px;
  }

  .store-stage {
    padding-top: 36px;
  }

  .store-card {
    border-radius: 3px 28px 3px 28px;
  }

  .store-card-header {
    display: grid;
    padding: 30px 24px;
  }

  .queue-number-block {
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 8px;
    align-items: baseline;
    justify-content: flex-start;
    justify-items: initial;
    padding: 15px 0 0;
    border: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 0;
  }

  .queue-number-block strong {
    font-size: 45px;
  }

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

  .detail-panel {
    min-height: 0;
    padding: 30px 24px;
    border-right: 0;
  }

  .queue-types {
    grid-template-columns: 1fr;
  }

  .section-heading {
    align-items: flex-start;
  }

  .queue-badges {
    max-width: 140px;
  }

  .history-panel {
    padding: 30px 24px 36px;
  }

  footer {
    display: grid;
    gap: 8px;
    line-height: 1.55;
  }
}
