.today-card {
  container-type: inline-size;
  width: min(504px, calc(100vw - 34px));
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  padding: 14px 29px 20px;
  color: #fff;
  background:
    radial-gradient(circle at 82% 12%, rgba(70, 77, 104, .09), transparent 34%),
    linear-gradient(145deg, rgba(23, 27, 43, .99), rgba(15, 18, 31, .99));
  border: 1px solid rgba(111, 122, 153, .19);
  border-radius: 13px;
  box-shadow: 0 22px 66px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .025);
}

.today-card.hide { display: none; }

.today-card__main {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
}

.today-card__eyebrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  margin-bottom: 11px;
  padding: 0 13px;
  border-radius: 999px;
  color: #11131a;
  background: linear-gradient(180deg, #ffd143 0%, #ffc71c 100%);
  box-shadow: 0 2px 8px rgba(255, 205, 48, .13), inset 0 1px 0 rgba(255, 255, 255, .32);
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .055em;
  line-height: 1;
  text-transform: uppercase;
}

.today-card__title {
  margin: 0 0 12px;
  font-size: clamp(23px, 6vw, 25px);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -.02em;
  text-align: center;
}

.today-card__streak {
  display: grid;
  container-type: inline-size;
  width: 100%;
  max-width: none;
  min-height: 180px;
  box-sizing: border-box;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto auto auto auto auto;
  justify-items: center;
  align-items: center;
  gap: 4px;
  margin: 0 0 11px;
  padding: 13px 17px;
  border-color: rgba(255, 255, 255, .035);
  border-radius: 12px;
  background:
    radial-gradient(circle at 86% 0%, rgba(73, 80, 106, .08), transparent 36%),
    linear-gradient(145deg, rgba(31, 35, 52, .84), rgba(25, 29, 45, .8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018), 0 7px 20px rgba(0, 0, 0, .08);
  text-align: center;
}

.today-card__streak .resume-fire-icon {
  grid-column: 1;
  grid-row: 2;
  width: 52px;
  height: 60px;
  margin: 3px 0 1px;
  filter: drop-shadow(0 0 16px rgba(255, 205, 48, .42));
}

.today-card__streak .resume-fire-icon::before {
  width: 43px;
  height: 43px;
}

.today-card__streak .resume-fire-icon::after {
  width: 31px;
  height: 31px;
}

.today-card__streak .resume-fire-icon i {
  width: 17px;
  height: 17px;
}

.today-card__streak .resume-streak-copy {
  display: contents;
}

.today-card__streak .resume-streak-copy strong {
  grid-column: 1;
  grid-row: 1;
  color: rgba(255, 255, 255, .88);
  font-size: 13px;
  letter-spacing: .025em;
  text-align: center;
}

.today-card__streak .resume-streak-copy small,
.today-card__streak .streak-recovery-copy,
.today-card__streak .streak-metrics {
  color: rgba(255, 255, 255, .58);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .01em;
  line-height: 1.35;
  text-transform: none;
}

.today-card__streak .resume-streak-copy small {
  grid-column: 1;
  grid-row: 3;
  min-height: 0;
  color: #ffcd30;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .015em;
}

.today-card__streak .streak-recovery-copy:not(:empty) {
  grid-column: 1;
  grid-row: 4;
  margin-top: 3px;
  text-align: center;
}

.today-card__streak .streak-metrics {
  display: flex;
  grid-column: 1;
  grid-row: 5;
  width: 100%;
  max-width: none;
  flex-wrap: wrap;
  align-items: stretch;
  justify-content: center;
  gap: 6px;
  margin-top: 9px;
}

.today-card__streak .streak-metrics:empty {
  display: none;
  margin-top: 0;
}

.today-card__streak .streak-metric {
  display: flex;
  flex: 0 1 calc((100% - 12px) / 3);
  min-width: 0;
  min-height: 42px;
  box-sizing: border-box;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 6px 7px;
  border: 1px solid rgba(255, 255, 255, .045);
  border-radius: 7px;
  background: rgba(255, 255, 255, .025);
  text-align: center;
}

.today-card__streak .streak-metric__label {
  color: rgba(255, 255, 255, .43);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .07em;
  line-height: 1.15;
  text-transform: uppercase;
}

.today-card__streak .streak-metric__value {
  color: rgba(255, 255, 255, .94);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .01em;
  line-height: 1.1;
}

.today-card__streak .streak-metric__value.is-long {
  font-size: 10px;
  line-height: 1.15;
}

.today-card__streak .streak-metric__note {
  color: rgba(255, 255, 255, .53);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0;
  line-height: 1.25;
}

.today-card__streak .streak-metric__value.is-compact,
.today-card__streak .streak-metric__note.is-compact {
  font-size: 0;
}

.today-card__streak .streak-metric__value.is-compact::after {
  content: attr(data-compact);
  font-size: 14px;
}

.today-card__streak .streak-metric__note.is-compact::after {
  content: attr(data-compact);
  font-size: 8px;
}

.today-card__streak .streak-metric.is-note {
  flex-basis: calc((100% - 6px) * 2 / 3);
}

.today-card__streak .streak-metric-separator {
  display: none;
}

.today-card__streak.is-off .resume-streak-copy strong { color: rgba(255, 255, 255, .86); }

.today-card__summary {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  margin: 0 0 12px;
}

.today-card__chip {
  display: inline-flex;
  min-width: 0;
  min-height: 36px;
  box-sizing: border-box;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .055);
  border-radius: 10px;
  color: rgba(255, 255, 255, .88);
  background: linear-gradient(145deg, rgba(30, 34, 51, .78), rgba(23, 27, 43, .75));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .015em;
  line-height: 1;
  white-space: nowrap;
}

.today-card__chip::before {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  content: '';
  background: currentColor;
  opacity: .9;
  -webkit-mask-position: center;
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: contain;
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.today-card__chip:nth-child(1)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Crect x='3' y='3' width='7' height='7' rx='1'/%3E%3Crect x='14' y='3' width='7' height='7' rx='1'/%3E%3Crect x='3' y='14' width='7' height='7' rx='1'/%3E%3Crect x='14' y='14' width='7' height='7' rx='1'/%3E%3C/svg%3E");
}

.today-card__chip:nth-child(2)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h5M15 6h5M12 4v4M4 12h10M18 12h2M16 10v4M4 18h2M10 18h10M8 16v4'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M4 6h5M15 6h5M12 4v4M4 12h10M18 12h2M16 10v4M4 18h2M10 18h10M8 16v4'/%3E%3C/svg%3E");
}

.today-card__chip:nth-child(3)::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E");
}

.today-card__reason,
.today-card__progress {
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  color: rgba(255, 255, 255, .47);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.today-card__reason {
  min-height: 24px;
  margin-bottom: 12px;
  padding: 0 7px;
}

.today-card__progress {
  min-height: 76px;
  margin-top: 0;
  padding: 10px 14px 24px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 11px;
  color: rgba(255, 255, 255, .89);
  background: linear-gradient(145deg, rgba(29, 33, 50, .78), rgba(23, 27, 43, .72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .018);
  line-height: 1;
}

.today-card__progress-label,
.today-card__progress-value {
  display: block;
}

.today-card__progress-label {
  color: rgba(255, 255, 255, .48);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

.today-card__progress-value {
  margin-top: 5px;
  color: rgba(255, 255, 255, .89);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .02em;
}

.today-card__progress::after {
  position: absolute;
  right: 13px;
  bottom: 11px;
  left: 13px;
  height: 8px;
  border-radius: 999px;
  content: '';
  background: linear-gradient(90deg,
    #ffca24 0%,
    #ffca24 var(--today-progress-percent, 0%),
    rgba(86, 96, 126, .46) var(--today-progress-percent, 0%),
    rgba(86, 96, 126, .46) 100%);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .22), 0 0 8px rgba(255, 202, 36, .08);
}

.today-card__actions {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.today-card__primary,
.today-card__manual {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  font-family: inherit;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: .045em;
  cursor: pointer;
}

.today-card__primary {
  border: 1px solid #ffca21;
  color: #11131a;
  background: linear-gradient(180deg, #ffd43e 0%, #ffc821 100%);
  box-shadow: 0 7px 18px rgba(255, 202, 33, .1), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.today-card__manual {
  border: 1px solid rgba(118, 130, 163, .34);
  color: rgba(255, 255, 255, .84);
  background: rgba(9, 12, 23, .1);
}

.today-card button:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.today-card__primary:hover { filter: brightness(1.05); transform: translateY(-1px); }
.today-card__manual:hover { color: #fff; border-color: rgba(255, 255, 255, .38); }

@media (max-width: 480px) {
  .today-card {
    width: calc(100% - 18px);
    padding: 14px 17px 18px;
  }

  .today-card__summary { gap: 6px; }
  .today-card__chip { gap: 6px; padding: 0 8px; font-size: 9px; }
  .today-card__streak .streak-metric { flex-basis: calc((100% - 6px) / 2); }
  .today-card__streak .streak-metric.is-note { flex-basis: 100%; }
}

@media (max-width: 354px) {
  .today-card__summary { grid-template-columns: auto minmax(0, 1fr); }
  .today-card__chip:nth-child(2) { min-width: 0; }
  .today-card__chip:nth-child(3) { grid-column: 1 / -1; }
}

@container (max-width: 340px) {
  .today-card__summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  .today-card__chip {
    width: 100%;
    min-height: 38px;
    padding-inline: 10px;
  }

  .today-card__chip:nth-child(2) {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .today-card__chip:nth-child(3) {
    grid-column: 2;
    grid-row: 1;
  }

  .today-card__streak .streak-metric {
    flex-basis: calc((100% - 6px) / 2);
    min-height: 54px;
    padding: 8px 10px;
  }

  .today-card__streak .streak-metric.is-note { flex-basis: 100%; }
}

@container (max-width: 245px) {
  .today-card__summary { grid-template-columns: minmax(0, 1fr); }

  .today-card__chip,
  .today-card__chip:nth-child(2),
  .today-card__chip:nth-child(3) {
    grid-column: 1;
    grid-row: auto;
  }

  .today-card__chip:nth-child(2) {
    min-height: 44px;
    padding-block: 7px;
    line-height: 1.2;
    white-space: normal;
  }

  .today-card__streak .streak-metric,
  .today-card__streak .streak-metric.is-note {
    flex-basis: 100%;
    min-height: 50px;
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .today-card *, .today-card *::before, .today-card *::after { transition: none !important; animation: none !important; }
  .today-card__primary:hover { transform: none; }
}
