/* =========================================================
   入口页 · 设备选择
   基础变量与外壳（.scan-shell/.scan-header/.scan-card/.content-slot/
   .contact-modal/.notice-modal/.toast）来自 scan.css。
   ========================================================= */

.entry-card {
  padding-bottom: clamp(20px, 2.4vw, 28px);
}

.entry-sub {
  margin: -8px 0 20px;
  font-size: 12.5px;
  line-height: 1.8;
  color: var(--muted);
}

.entry-sub:empty {
  display: none;
}

.device-list {
  display: grid;
  gap: 10px;
}

.device-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 13px 15px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  transition: border-color 0.18s ease, background 0.18s ease,
    box-shadow 0.18s ease, transform 0.18s ease;
}

.device-item:hover {
  background: #ffffff;
  border-color: var(--teal-bright);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}

.device-item:focus-visible {
  outline: 2px solid rgba(23, 163, 148, 0.45);
  outline-offset: 2px;
}

.device-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--teal);
  background: var(--mint-soft);
  border-radius: 12px;
}

.device-icon svg {
  width: 22px;
  height: 22px;
}

.device-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.device-copy strong {
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.01em;
}

.device-copy span {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.5;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-arrow {
  display: grid;
  place-items: center;
  color: var(--muted-light);
  transition: color 0.18s ease, transform 0.18s ease;
}

.device-arrow svg {
  width: 18px;
  height: 18px;
}

.device-item:hover .device-arrow {
  color: var(--teal);
  transform: translateX(3px);
}

/* 左栏图片位与右侧设备卡上下齐平：
   两列同高，图片框撑满整列高度，图片按 contain 居中，说明文字固定在框内底部。 */
@media (min-width: 1021px) {
  .entry-main {
    align-items: stretch;
  }

  .entry-main .scan-hero {
    display: flex;
    flex-direction: column;
    max-width: none;
    padding-top: 0;
  }

  .entry-main .scan-hero-media {
    flex: 1 1 auto;
    align-items: stretch;
    max-width: none;
    margin-bottom: 0;
  }

  .entry-main .content-slot--pair {
    position: relative;
    display: flex;
    height: 100%;
    min-height: 0;
  }

  .entry-main .content-slot--pair > .slot-image,
  .entry-main .content-slot--pair > .slot-placeholder {
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    aspect-ratio: auto;
    padding-bottom: 30px;
    object-fit: contain;
    background-color: var(--paper);
  }

  .entry-main .slot-caption {
    position: absolute;
    right: 0;
    bottom: 9px;
    left: 0;
    margin: 0;
    padding: 0 8px;
    overflow: hidden;
    background-color: var(--paper);
    border-bottom-right-radius: var(--radius-lg);
    border-bottom-left-radius: var(--radius-lg);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .entry-sub {
    margin: -4px 0 16px;
    font-size: 11.5px;
  }

  .device-item {
    grid-template-columns: 42px minmax(0, 1fr) 18px;
    gap: 12px;
    padding: 12px 13px;
  }

  .device-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
  }

  .device-icon svg {
    width: 20px;
    height: 20px;
  }

  .device-copy strong {
    font-size: 14.5px;
  }

  .device-copy span {
    font-size: 11.5px;
  }
}
