:root {
  color-scheme: light;
  --page-bg: #f4f5f6;
  --surface: #ffffff;
  --text: #30343b;
  --muted: #8e96a1;
  --line: #eceff2;
  --teal: #4ba59c;
  --teal-deep: #368d86;
  --danger: #ef5c67;
  --link: #3f8fe8;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: #dfe3e8;
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", Arial,
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

time {
  font: inherit;
}

.phone-page {
  width: min(100vw, 430px);
  min-height: 100svh;
  margin: 0 auto;
  background: var(--page-bg);
  overflow: hidden;
}

.error-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.error-card {
  width: min(100%, 360px);
  padding: 28px 24px;
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
  box-shadow: 0 18px 50px rgba(18, 30, 45, 0.12);
}

.error-card h1 {
  margin: 0;
  color: var(--danger);
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
}

.error-card p {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--surface);
}

.tab-bar {
  height: 54px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
}

.tab-bar span {
  font-size: 18px;
  font-weight: 600;
}

main {
  background: var(--page-bg);
}

.qr-panel {
  position: relative;
  padding: 9px 0 13px;
  text-align: center;
  background: var(--surface);
}

.qr-time {
  display: block;
  color: #2d3139;
  font-size: clamp(27px, 7.2vw, 32px);
  font-weight: 400;
  line-height: 1.18;
  letter-spacing: 0;
}

.qr-frame {
  position: relative;
  width: min(73vw, 318px);
  aspect-ratio: 1;
  margin: 9px auto 0px;
}

.qr-link {
  width: 100%;
  height: 100%;
  display: block;
  background: #ffffff;
}

.qr-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
}

.qr-tip {
  margin: 0;
  color: #232a31;
  font-size: 18px;
  line-height: 1.25;
}

.info-section {
  padding: 17px 16px 4px;
  border-top: 10px solid var(--page-bg);
  background: var(--surface);
}

.visitor-section {
  padding-bottom: 24px;
  border-top-width: 0;
}

.info-section h2 {
  margin: 0 0 17px;
  color: #323943;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}

.info-list {
  margin: 0;
}

.info-row {
  display: grid;
  grid-template-columns: 121px minmax(0, 1fr);
  align-items: center;
  min-height: 31px;
}

.info-row dt {
  color: var(--muted);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.35;
}

.info-row dd {
  min-width: 0;
  margin: 0;
  color: #383e47;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.info-row .muted {
  color: rgba(142, 150, 161, 0.28);
}

.info-row .danger {
  color: var(--danger);
  font-size: 18px;
  font-weight: 700;
}

.entry-time {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.entry-time span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.entry-time i {
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: #ffffff;
  background: #58c9c4;
  font-size: 13px;
  font-style: normal;
  font-weight: 800;
  line-height: 1;
}

@media (min-width: 431px) {
  .phone-page {
    min-height: 100vh;
    box-shadow: 0 18px 50px rgba(18, 30, 45, 0.18);
  }
}

@media (max-width: 360px) {
  .info-row {
    grid-template-columns: 106px minmax(0, 1fr);
  }

  .info-row dt {
    font-size: 15px;
  }

  .info-row dd {
    font-size: 16px;
  }
}
