.queue-card {
  position: relative;
  margin: calc(5.7 * var(--px)) var(--gutter) 0;
  padding: 0 var(--card-pad) calc(8.9 * var(--px));
  border-radius: var(--radius-card);
  background: var(--surface);
}

/* 顶部悬挂的时间标签 */
.queue-card__tab {
  width: calc(160 * var(--px));
  height: calc(29 * var(--px));
  margin: 0 auto;
  border-radius: 0 0 calc(12 * var(--px)) calc(12 * var(--px));
  background: linear-gradient(180deg, var(--tab-from), var(--tab-to));
  color: var(--accent);
  font-size: calc(16 * var(--px));
  font-weight: 500;
  line-height: calc(29 * var(--px));
  text-align: center;
  white-space: nowrap;
}

.queue-card__headline {
  display: flex;
  align-items: baseline;
  justify-content: center;
  margin: calc(15 * var(--px)) 0 0;
  color: var(--accent);
  font-size: calc(24 * var(--px));
  font-weight: 700;
  line-height: 1.3;
}

.queue-card__table {
  letter-spacing: calc(0.5 * var(--px));
}

.queue-card__no {
  margin-left: calc(7 * var(--px));
  font-size: calc(25 * var(--px));
  letter-spacing: calc(0.3 * var(--px));
}

.queue-card__wait {
  margin: calc(1 * var(--px)) 0 0;
  color: var(--text-body);
  font-size: calc(14 * var(--px));
  line-height: 1.5;
  text-align: center;
  white-space: nowrap;
}

.queue-card__ahead {
  color: var(--accent);
  font-size: calc(13.4 * var(--px));
  font-style: normal;
  font-weight: 600;
}

/* 桌，与"预计"之间的额外留白 */
.queue-card__break {
  display: inline-block;
  width: calc(7 * var(--px));
}

/* 三段进度 */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: calc(10.8 * var(--px)) 0 0;
  padding: 0;
  list-style: none;
}

.steps__item {
  display: flex;
  flex-direction: column;
}

.steps__item--active {
  align-items: center;
}

.steps__item--todo {
  align-items: flex-end;
}

.steps__mark {
  position: relative;
  display: flex;
  align-items: center;
  height: calc(22.5 * var(--px));
}

/* 连接线：绝对定位在圆点下方，不参与网格 */
.steps::before,
.steps::after {
  content: "";
  position: absolute;
  top: calc(9.25 * var(--px));
  height: calc(4 * var(--px));
  border-radius: calc(2 * var(--px));
}

.steps::before {
  left: calc(26.5 * var(--px));
  right: calc(185.6 * var(--px));
  background: linear-gradient(90deg, var(--accent-orange), var(--accent));
}

.steps::after {
  left: calc(178.6 * var(--px));
  right: calc(16.8 * var(--px));
  background: var(--line-track);
}

.steps__marker {
  flex: none;
  border-radius: 50%;
}

.steps__marker--done {
  display: grid;
  place-items: center;
  width: calc(15 * var(--px));
  height: calc(15 * var(--px));
  background: var(--accent-orange);
}

.steps__marker--done svg {
  width: calc(11 * var(--px));
  height: calc(11 * var(--px));
  fill: none;
  stroke: #fff;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.steps__marker--active {
  width: calc(14.5 * var(--px));
  height: calc(14.5 * var(--px));
  background: var(--accent);
  box-shadow:
    0 0 0 calc(1.5 * var(--px)) var(--surface),
    0 0 0 calc(3.3 * var(--px)) var(--accent-ring);
}

.steps__marker--todo {
  width: calc(15 * var(--px));
  height: calc(15 * var(--px));
  background: var(--dot-idle);
}

.steps__label {
  margin-top: calc(9.8 * var(--px));
  color: var(--text-muted);
  font-size: calc(12 * var(--px));
  line-height: 1.2;
  white-space: nowrap;
}

.steps__item--active .steps__label {
  color: var(--accent);
  font-weight: 500;
}

.steps__item--todo .steps__label {
  color: #a9a9a9;
}

/* 打孔虚线 + 两侧半圆缺口 */
.queue-card__perforation {
  position: relative;
  height: calc(1.5 * var(--px));
  margin: calc(16.45 * var(--px)) calc(-1 * var(--card-pad)) 0;
  background: repeating-linear-gradient(
    90deg,
    var(--line-dash) 0 calc(5 * var(--px)),
    transparent calc(5 * var(--px)) calc(8 * var(--px))
  );
}

.queue-card__perforation::before,
.queue-card__perforation::after {
  content: "";
  position: absolute;
  top: 50%;
  width: calc(11 * var(--px));
  height: calc(11 * var(--px));
  border-radius: 50%;
  background: var(--bg);
  transform: translateY(-50%);
}

.queue-card__perforation::before {
  left: calc(-5.5 * var(--px));
}

.queue-card__perforation::after {
  right: calc(-5.5 * var(--px));
}

/* 门店行 */
.queue-card__store {
  display: flex;
  align-items: center;
  margin-top: calc(20.1 * var(--px));
  line-height: 1.2;
}

.queue-card__store-name {
  display: flex;
  align-items: center;
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: calc(14 * var(--px));
  font-weight: 600;
  white-space: nowrap;
}

/* 门店名可在编辑面板里改；过长时省略，不挤压右侧「进度通知」 */
.queue-card__store-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-card__store-arrow {
  flex: none;
  width: calc(7 * var(--px));
  height: calc(12 * var(--px));
  margin-left: calc(4 * var(--px));
  fill: none;
  stroke: #a5a5a5;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.queue-card__notify {
  position: relative;
  flex: none;
  margin-left: auto;
  color: var(--text-muted);
  font-size: calc(12 * var(--px));
  line-height: 1;
  cursor: pointer;
}

/* 文字只有 12px 高，靠透明伪元素把「进度通知 + 开关」的可点击区域放大 */
.queue-card__notify::after {
  content: "";
  position: absolute;
  inset: calc(-10 * var(--px)) calc(-32 * var(--px)) calc(-10 * var(--px))
    calc(-8 * var(--px));
}

.switch {
  flex: none;
  width: calc(26 * var(--px));
  height: calc(17 * var(--px));
  margin: 0 0 0 calc(4 * var(--px));
  appearance: none;
  -webkit-appearance: none;
  border-radius: calc(8.5 * var(--px));
  background: #dcdcdc;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out);
}

.switch::after {
  content: "";
  display: block;
  width: calc(13 * var(--px));
  height: calc(13 * var(--px));
  margin: calc(2 * var(--px));
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 calc(1 * var(--px)) calc(2 * var(--px)) rgba(0, 0, 0, 0.16);
  transform: translateX(0);
  transition: transform var(--dur-fast) var(--ease-out);
}

.switch:checked {
  background: var(--accent);
}

.switch:checked::after {
  transform: translateX(calc(9 * var(--px)));
}

/* 取号信息 */
.queue-card__info {
  margin: calc(6 * var(--px)) 0 0;
  color: var(--text-body);
  font-size: calc(12 * var(--px));
  line-height: calc(21.2 * var(--px));
}

.queue-card__row {
  display: flex;
  align-items: baseline;
}

.queue-card__row dt {
  flex: none;
  width: calc(62 * var(--px));
  color: var(--text-muted);
}

.queue-card__row dd {
  margin: 0;
}

.queue-card__note {
  margin-left: calc(7 * var(--px));
}
