:root {
  --top: #8da3ae;
  --top-dark: #7f97a3;
  --green: #08b80f;
  --line: #edf0f2;
  --text: #101820;
  --muted: #7c858c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: #eef1f3;
  color: var(--text);
}

a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.08);
}

.page {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: #fff;
}

.entry-panel {
  --entry-width: 100%;
  --lottery-crop-x: 8px;
  --lottery-crop-top: 8px;
  padding: 0 0 8px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  justify-items: center;
  background: #fff;
  border-bottom: 10px solid #f3f6f8;
}

.entry-logo {
  width: var(--entry-width);
  height: auto;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.lottery-box {
  width: var(--entry-width);
  overflow: hidden;
  padding: 0 1px;
}

.lottery-frame {
  width: calc(100% + var(--lottery-crop-x) * 2);
  height: calc(100% + var(--lottery-crop-top));
  display: block;
  border: 0;
  margin: calc(var(--lottery-crop-top) * -1) 0 0 calc(var(--lottery-crop-x) * -1);
}

.entry-link {
  width: var(--entry-width);
  min-height: clamp(56px, 7vw, 72px);
  display: grid;
  place-items: center;
  border: 1px solid #cbdde8;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f3f8fb 100%);
  color: #101820;
  box-shadow: 0 5px 14px rgba(24, 56, 78, 0.08);
  font-size: clamp(22px, 4.2vw, 30px);
  font-weight: 600;
  line-height: 1.2;
}

.entry-link:active {
  background: #edf3f6;
  transform: translateY(1px);
}

.top {
  background: var(--top);
  color: #fff;
}

.masthead {
  min-height: 104px;
  padding: 28px 26px 10px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 18px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: clamp(36px, 8.3vw, 50px);
  line-height: 1;
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0;
  color: #fff;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.22);
  white-space: nowrap;
}

.logo-mark {
  width: 28px;
  height: 18px;
  margin-left: -8px;
  margin-right: -5px;
  transform: translateY(-17px) rotate(-18deg);
  border-radius: 50% 50% 0 50%;
  background: #fff;
  clip-path: polygon(14% 64%, 41% 46%, 61% 8%, 86% 4%, 69% 38%, 41% 70%, 17% 87%);
  flex: 0 0 auto;
}

.location {
  min-width: 66px;
  text-align: center;
  font-size: 16px;
  line-height: 1.12;
  color: #fff;
}

.location small {
  display: block;
  margin-top: 5px;
  font-size: 13px;
  opacity: 0.95;
}

.weather {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 12px;
}

.rain-icon {
  width: 55px;
  height: 55px;
}

.temp {
  font-size: clamp(46px, 10vw, 60px);
  line-height: 1;
  font-weight: 300;
  white-space: nowrap;
}

.menu-dots {
  width: 12px;
  height: 50px;
  display: grid;
  place-items: center;
  gap: 6px;
}

.menu-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #fff;
  display: block;
}

.search-area {
  padding: 0 26px 12px;
}

.search-form {
  height: 66px;
  display: grid;
  grid-template-columns: 1fr 56px 120px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.25);
}

.search-form input {
  width: 100%;
  min-width: 0;
  border: 0;
  padding: 0 18px;
  font-size: 25px;
  color: #777;
  outline: 0;
  font-family: inherit;
}

.camera-link,
.search-form button {
  border: 0;
  border-left: 1px solid #eef0f1;
  background: #fff;
  display: grid;
  place-items: center;
  font-family: inherit;
}

.camera-link svg {
  width: 27px;
  height: 27px;
  color: #c7cdd1;
}

.search-form button {
  cursor: pointer;
  color: #000;
  font-size: 25px;
}

.ticker {
  height: 45px;
  padding: 0 26px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: center;
  gap: 20px;
  overflow: hidden;
  background: var(--top-dark);
  font-size: 19px;
  line-height: 45px;
}

.ticker a {
  min-width: 0;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-grid {
  padding: 28px 26px 20px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  row-gap: 22px;
  column-gap: 12px;
  border-bottom: 16px solid #f3f3f3;
}

.site {
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 8px;
  font-size: 20px;
  line-height: 1.15;
  text-align: center;
}

.site img {
  width: 46px;
  height: 46px;
  border-radius: 9px;
  object-fit: contain;
  background: #fff;
}

.channels {
  padding: 27px 24px 28px;
  background: #fff;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr) auto;
  align-items: center;
  column-gap: 18px;
  margin-bottom: 23px;
  font-size: 25px;
  line-height: 1;
}

.tabs a {
  text-align: left;
  white-space: nowrap;
}

.tabs .active {
  color: var(--green);
  position: relative;
}

.tabs .active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -13px;
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: var(--green);
}

.more-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  justify-self: end;
  font-size: 19px;
}

.more-link svg {
  width: 16px;
  height: 16px;
  color: #60696f;
}

.quick-links {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 21px;
}

.pill {
  min-height: 45px;
  padding: 0 10px;
  display: grid;
  place-items: center;
  border: 1px solid #edf0f2;
  border-radius: 999px;
  box-shadow: 0 1px 3px rgba(16, 24, 32, 0.05);
  font-size: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.channel-list {
  display: grid;
  row-gap: 24px;
}

.channel-row {
  display: grid;
  grid-template-columns: 74px repeat(4, minmax(0, 1fr)) 22px;
  align-items: center;
  column-gap: 12px;
  min-height: 36px;
  font-size: 20px;
}

.channel-row .label {
  color: var(--green);
  padding-left: 9px;
  border-right: 1px solid var(--line);
}

.channel-row a:not(.label) {
  min-width: 0;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.down {
  width: 18px;
  height: 18px;
  color: #9aa2a8;
  justify-self: end;
}

@media (max-width: 560px) {
  .masthead {
    padding: 22px 18px 10px;
    grid-template-columns: 1fr auto;
    gap: 10px;
  }

  .location {
    display: none;
  }

  .weather {
    gap: 8px;
  }

  .rain-icon {
    width: 42px;
    height: 42px;
  }

  .search-area,
  .ticker,
  .site-grid {
    padding-left: 18px;
    padding-right: 18px;
  }

  .search-form {
    height: 58px;
    grid-template-columns: 1fr 46px 96px;
  }

  .search-form input,
  .search-form button {
    font-size: 21px;
  }

  .ticker {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    font-size: 16px;
  }

  .ticker a:nth-child(3) {
    display: none;
  }

  .channels {
    padding-left: 18px;
    padding-right: 18px;
  }

  .tabs {
    grid-template-columns: repeat(4, 1fr);
    font-size: 22px;
  }

  .more-link {
    display: none;
  }

  .quick-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .channel-row {
    grid-template-columns: 58px repeat(3, minmax(0, 1fr)) 20px;
    font-size: 18px;
  }

  .channel-row a:nth-of-type(5) {
    display: none;
  }
}
