.ts-hero {
  --ts-frame-x: 3.25%;
  --ts-frame-y: 12.1%;
  --ts-frame-w: 59.6%;
  --ts-frame-h: 72.3%;
  --ts-frame-pad-x: 2.65%;
  --ts-frame-pad-y: 5.8%;
  position: relative;
  display: block;
  width: 100%;
  max-width: 100%;
  margin-bottom: 20px;
  border-radius: var(--t-radius-row, 16px);
  container-type: inline-size;
  overflow: hidden;
  color: rgb(255 255 255);
  text-decoration: none;
  box-shadow: var(--t-hero-glow);
  -webkit-tap-highlight-color: transparent;
}

.ts-hero,
.ts-hero * {
  box-sizing: border-box;
}

.ts-hero:active {
  transform: translateY(1px);
  box-shadow: var(--t-hero-glow-hover);
}

.ts-hero__image {
  display: block;
  width: 100%;
  height: auto;
}

.ts-hero__panel {
  position: absolute;
  left: calc(var(--ts-frame-x) + var(--ts-frame-pad-x));
  top: calc(var(--ts-frame-y) + var(--ts-frame-pad-y));
  right: calc(100% - var(--ts-frame-x) - var(--ts-frame-w) + var(--ts-frame-pad-x));
  bottom: calc(100% - var(--ts-frame-y) - var(--ts-frame-h) + var(--ts-frame-pad-y));
  display: grid;
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: clamp(4px, 0.95vw, 8px);
  color: rgb(255 255 255);
  pointer-events: none;
  overflow: hidden;
}

.ts-hero__title {
  margin: 0;
  max-width: 100%;
  font-family: var(--t-font-display);
  font-size: clamp(0.95rem, 1.85vw, 1.32rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: 0;
  white-space: nowrap;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}

.ts-hero__timer-wrap {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 0;
}

.ts-hero__timer {
  font-family: var(--t-font-display);
  font-size: clamp(1.28rem, 2.9vw, 2.05rem);
  font-weight: 800;
  line-height: 0.95;
  color: var(--t-hero-stripe);
  text-shadow: 0 0 16px rgba(245, 200, 0, 0.28);
}

.ts-hero__stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(5px, 1vw, 8px);
  margin-top: 0;
  width: min(100%, 260px);
  max-width: 100%;
}

.ts-hero__stat {
  min-width: 0;
  min-height: clamp(31px, 5vw, 41px);
  padding: clamp(4px, 0.85vw, 7px) clamp(7px, 1.2vw, 10px);
  border-radius: clamp(9px, 1.8vw, 14px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 6, 24, 0.58);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ts-hero__stat-num {
  display: block;
  font-size: clamp(0.72rem, 1.34vw, 0.95rem);
  font-weight: 800;
  color: rgb(255 255 255);
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-hero .ts-hero__stat-num-accent {
  color: var(--t-hero-stripe, rgb(245 200 0));
}

.ts-hero .ts-hero__stat-num-sep {
  color: rgb(255 255 255);
}

.ts-hero__stat-label {
  display: block;
  margin-top: 2px;
  font-size: clamp(0.52rem, 1.05vw, 0.68rem);
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.12;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ts-hero__meta {
  margin-top: clamp(5px, 1vw, 8px);
  max-width: 100%;
  font-size: clamp(0.6rem, 1.18vw, 0.78rem);
  line-height: 1.24;
  color: rgba(255, 255, 255, 0.82);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.28);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 720px) {
  .ts-hero__panel {
    --ts-frame-pad-x: 2.8%;
    --ts-frame-pad-y: 6.2%;
  }
}

@media (max-width: 560px) {
  .ts-hero__panel {
    --ts-frame-pad-x: 2.8%;
    --ts-frame-pad-y: 5.5%;
    gap: 5px;
  }

  .ts-hero__title {
    font-size: clamp(0.82rem, 3.1vw, 0.98rem);
  }

  .ts-hero__timer-wrap {
    margin-top: 0;
  }

  .ts-hero__timer {
    font-size: clamp(1.32rem, 5.55vw, 1.66rem);
  }

  .ts-hero__stats {
    gap: 5px;
    margin-top: 0;
    width: 100%;
    max-width: 100%;
  }

  .ts-hero__stat {
    min-height: 32px;
    padding: 4px 6px;
    border-radius: 9px;
  }

  .ts-hero__stat-num {
    font-size: clamp(0.66rem, 2.8vw, 0.82rem);
  }

  .ts-hero__stat-label {
    font-size: clamp(0.44rem, 1.9vw, 0.54rem);
  }

  .ts-hero__meta {
    display: none;
  }
}

@media (min-width: 390px) and (max-width: 560px) {
  .ts-hero__title {
    font-size: clamp(0.9rem, 3.35vw, 1.04rem);
  }

  .ts-hero__timer {
    font-size: clamp(1.46rem, 5.7vw, 1.75rem);
  }

  .ts-hero__stat {
    min-height: 34px;
    padding: 5px 7px;
  }

  .ts-hero__stat-num {
    font-size: clamp(0.76rem, 2.85vw, 0.88rem);
  }
}

@media (max-width: 380px) {
  .ts-hero__panel {
    gap: 4px;
  }

  .ts-hero__title {
    font-size: clamp(0.76rem, 3vw, 0.84rem);
  }

  .ts-hero__timer {
    font-size: clamp(1.18rem, 5.25vw, 1.36rem);
  }

  .ts-hero__stat {
    min-height: 28px;
    padding: 3px 5px;
    border-radius: 8px;
  }

  .ts-hero__stat-num {
    font-size: clamp(0.58rem, 2.65vw, 0.7rem);
  }

  .ts-hero__stat-label {
    margin-top: 1px;
    font-size: clamp(0.38rem, 1.75vw, 0.48rem);
  }
}

.ts-hero--done {
  /* 1200x430 source: right inner frame measured at x=544 y=60 w=611 h=310. */
  --ts-frame-x: 45.35%;
  --ts-frame-y: 13.95%;
  --ts-frame-w: 50.9%;
  --ts-frame-h: 72.1%;
  --ts-frame-pad-x: 2.65%;
  --ts-frame-pad-y: 5.8%;
}

.ts-hero__panel--done {
  grid-template-rows: auto auto auto;
  align-content: center;
  gap: clamp(4px, 1.45cqw, 8px);
}

.ts-hero__title--done {
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  font-size: clamp(0.72rem, 2.55cqw, 1.08rem);
  line-height: 1.02;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-hero__done-card {
  display: grid;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
  grid-template-columns: minmax(76px, 0.68fr) minmax(0, 1.32fr);
  gap: clamp(4px, 1.35cqw, 8px);
  height: clamp(52px, 13.45cqw, 76px);
  min-height: 0;
}

.ts-hero__done-main,
.ts-hero__done-facts > span {
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 6, 24, 0.58);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.ts-hero__done-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(4px, 1.45cqw, 9px) clamp(6px, 1.75cqw, 10px);
  border-radius: clamp(8px, 2.4cqw, 14px);
  text-align: center;
}

.ts-hero__done-num {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: var(--t-hero-stripe);
  font-family: var(--t-font-display);
  font-size: clamp(0.86rem, 2.6cqw, 1.18rem);
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-hero__done-label {
  margin-top: clamp(2px, 0.75cqw, 5px);
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.44rem, 1.22cqw, 0.58rem);
  line-height: 1.12;
  white-space: nowrap;
}

.ts-hero__done-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(3px, 0.95cqw, 6px);
  min-height: 0;
}

.ts-hero__done-facts > span {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(3px, 1.05cqw, 5px) clamp(4px, 1.35cqw, 7px);
  border-radius: clamp(7px, 2cqw, 11px);
  color: rgba(255, 255, 255, 0.72);
  font-size: clamp(0.4rem, 1.1cqw, 0.52rem);
  line-height: 1.05;
  text-align: center;
  white-space: nowrap;
}

.ts-hero__done-facts b {
  display: block;
  margin-bottom: 1px;
  overflow: hidden;
  color: var(--t-hero-stripe);
  font-size: clamp(0.68rem, 1.95cqw, 0.9rem);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-hero__week-line {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: clamp(2px, 0.55cqw, 4px);
  max-width: 100%;
}

.ts-hero__week-line small {
  color: rgba(255, 255, 255, 0.58);
  font-size: clamp(0.34rem, 0.95cqw, 0.46rem);
  font-weight: 700;
  line-height: 1;
}

.ts-hero__done-facts .ts-hero__done-week b {
  display: inline-block;
  margin-bottom: 0;
}

.ts-hero__done-facts em {
  display: block;
  max-width: 100%;
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ts-hero__meta--done {
  margin-top: 0;
  font-size: clamp(0.48rem, 1.45cqw, 0.72rem);
  line-height: 1.14;
  -webkit-line-clamp: 1;
}

@media (min-width: 720px) {
  .ts-hero--done .ts-hero__panel {
    --ts-frame-pad-x: 2.8%;
    --ts-frame-pad-y: 6.1%;
  }
}

@media (min-width: 381px) and (max-width: 560px) {
  .ts-hero__done-card {
    grid-template-columns: minmax(64px, 0.56fr) minmax(0, 1.44fr);
  }
}

@media (max-width: 380px) {
  .ts-hero--done .ts-hero__panel {
    --ts-frame-pad-x: 2.55%;
    --ts-frame-pad-y: 5.6%;
    gap: 3px;
  }

  .ts-hero__done-card {
    height: 45px;
    grid-template-columns: minmax(52px, 0.58fr) minmax(0, 1.42fr);
    gap: 3px;
  }

  .ts-hero__title--done {
    display: -webkit-box;
    font-size: 0.68rem;
    line-height: 1.02;
    white-space: normal;
    text-overflow: clip;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  .ts-hero__meta--done {
    display: none;
  }

  .ts-hero__done-main {
    padding: 3px 5px;
  }

  .ts-hero__done-num {
    font-size: 0.62rem;
  }

  .ts-hero__done-label {
    font-size: 0.38rem;
  }

  .ts-hero__done-facts {
    gap: 2px;
  }

  .ts-hero__done-facts > span {
    padding: 2px 3px;
    font-size: 0.27rem;
  }

  .ts-hero__done-facts b {
    font-size: 0.44rem;
  }

  .ts-hero__week-line {
    gap: 2px;
  }

  .ts-hero__week-line small {
    font-size: 0.24rem;
  }
}
