* {
  box-sizing: border-box;
}

html {
  font-size: 40px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  margin: 0;
  padding: 0;
  color: #3e2f1f;
  background: #d8c5a8;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

body {
  min-height: 100vh;
  font-size: 0.4rem;
  /* Reserve the fixed ticker and the phone's home indicator. */
  padding-bottom: 1.12rem;
  padding-bottom: calc(1.12rem + env(safe-area-inset-bottom, 0px));
}

.app-container {
  width: 100%;
  min-width: 0;
}

.header {
  background: #ddc9a9;
  border-bottom: 1px solid rgba(96, 74, 43, 0.15);
}

.header-content {
  padding: 0.22rem 0.3rem;
  display: flex;
  justify-content: center;
  align-items: center;
}

.header-logo {
  min-width: 0;
  max-width: 100%;
}

.logo-text {
  display: block;
  font-size: 0.56rem;
  font-weight: 600;
  color: #4a3724;
  text-align: center;
  word-wrap: break-word;
  line-height: 1.3;
}

.time-bar {
  min-height: 0.66rem;
  padding: 0.1rem 0.22rem;
  background: #e7d6bd;
  border-bottom: 1px solid rgba(96, 74, 43, 0.2);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  color: #7d6543;
  font-size: 0.3rem;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.status-online {
  margin-left: 0.18rem;
  color: #33b24a;
  font-weight: 600;
  white-space: nowrap;
}

.quote-wrapper {
  padding-bottom: 0.12rem;
}

.data-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.quote-table {
  width: 100%;
  min-width: 0;
  margin-bottom: 0.16rem;
}

.section-title {
  padding: 0.12rem 0.2rem;
  text-align: center;
  font-size: 0.42rem;
  line-height: 1.3;
  word-wrap: break-word;
  color: #4a3724;
  background: #ddc9a9;
  border-top: 1px solid rgba(96, 74, 43, 0.25);
  border-bottom: 1px solid rgba(96, 74, 43, 0.25);
}

/* Percentage flex columns also support TV browsers without CSS Grid. */
.row {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 0 0.08rem;
}

.header-row {
  min-height: 0.88rem;
  background: #ddc9a9;
  color: #4a3724;
  font-size: 0.4rem;
  border-bottom: 1px solid rgba(96, 74, 43, 0.2);
}

.data-row {
  min-height: 1.26rem;
  background: #f2f2f2;
  font-size: 0.46rem;
  line-height: 1.25;
  color: #3d2f1f;
  border-bottom: 1px solid rgba(96, 74, 43, 0.12);
  font-variant-numeric: tabular-nums;
}

.data-row:nth-child(even) {
  background: #e8d8bf;
}

.col {
  flex: 0 0 24%;
  width: 24%;
  min-width: 0;
  padding: 0.12rem 0.06rem;
  text-align: center;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.col:first-child {
  flex-basis: 28%;
  width: 28%;
}

.col-name {
  font-size: 0.4rem;
  font-weight: 400;
  color: #382a1e;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.col-dual {
  font-size: 0.35rem;
  line-height: 1.3;
}

.col-dual > div + div {
  margin-top: 0.08rem;
}

.c-red {
  color: #e3342f;
}

.c-green {
  color: #66bf69;
}

.text-center {
  text-align: center;
}

.loading-text,
.empty-text {
  width: 100%;
  padding: 0.9rem 0.2rem;
  font-size: 0.36rem;
  color: rgba(76, 57, 34, 0.75);
}

.disclaimer {
  padding: 0.16rem 0.26rem 0.24rem;
  color: rgba(76, 57, 34, 0.8);
  font-size: 0.3rem;
  line-height: 1.6;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.disclaimer p {
  margin: 0.08rem 0;
}

.disclaimer img,
.disclaimer video {
  max-width: 100%;
  height: auto;
}

.marquee-container {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0.88rem;
  height: calc(0.88rem + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  overflow: hidden;
  background: linear-gradient(90deg, #2f2d2b, #1f1d1c);
  color: #fff;
  z-index: 99;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.marquee-track {
  height: 100%;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding-left: 100%;
  animation: ticker 20s linear infinite;
  font-size: 0.36rem;
}

.marquee-track span {
  margin-right: 1.3rem;
}

/* Keep one product per full-width row on TV, with larger text for viewing at
   a distance. flexible.js scales against both axes, including 4K / 8K. */
@media (min-width: 900px) and (orientation: landscape) {
  body {
    padding-bottom: 1.4rem;
    padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  }

  /* The statement follows this region, below the first TV viewport. Longer
     quote lists expand naturally; no content is clipped or hidden. */
  .app-container {
    min-height: 100vh;
  }

  .header-content {
    padding: 0.14rem 0.4rem;
  }

  .logo-text {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .time-bar {
    padding: 0.08rem 0.3rem;
    font-size: 0.42rem;
    min-height: 0.76rem;
  }

  .marquee-container {
    height: 1.16rem;
    height: calc(1.16rem + env(safe-area-inset-bottom, 0px));
  }

  .marquee-track {
    font-size: 0.5rem;
    font-weight: 500;
  }

  .quote-wrapper {
    padding: 0;
  }

  .quote-table {
    margin-bottom: 0.1rem;
  }

  .section-title {
    padding: 0.1rem 0.2rem;
    font-size: 0.66rem;
    line-height: 1.2;
    font-weight: 700;
  }

  .header-row {
    min-height: 1rem;
    font-size: 0.64rem;
    line-height: 1.2;
  }

  .data-row {
    min-height: 1.6rem;
    font-size: 0.94rem;
  }

  .col {
    padding: 0.06rem 0.08rem;
  }

  .col-name {
    font-size: 0.84rem;
    font-weight: 500;
  }

  .col-dual {
    font-size: 0.6rem;
    line-height: 1.16;
  }

  .col-dual > div + div {
    margin-top: 0.04rem;
  }

}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}
