/* BUFF OS v152 — unified activity timeline + adaptive web coach */
.v49-card {
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--line2);
  border-radius: var(--r);
  background: var(--elev1);
}

.v49-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.v49-kicker {
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.11em;
}

.v49-head h2 {
  margin: 5px 0 0;
  font-size: 21px;
  line-height: 1.15;
}

.v49-head > span {
  flex: 0 0 auto;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(var(--accent-rgb), 0.09);
  color: var(--gold);
  font-size: 9px;
  font-weight: 900;
}

.v49-intro {
  margin: -3px 0 14px;
  color: var(--txt2);
  font-size: 11px;
  line-height: 1.45;
}

.v49-timeline {
  display: grid;
}

.v49-day {
  width: 100%;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 10px 0;
  border: 0;
  border-top: 1px solid var(--line2);
  background: transparent;
  color: var(--txt);
  text-align: left;
}

.v49-day:first-child {
  border-top: 0;
}

.v49-date {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-radius: 13px;
  background: var(--elev2);
}

.v49-date b,
.v49-date span {
  display: block;
}

.v49-date b {
  font-size: 16px;
}

.v49-date span {
  color: var(--txt3);
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
}

.v49-day-main {
  min-width: 0;
}

.v49-day-main b {
  display: block;
  overflow: hidden;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v49-day-main span {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: var(--txt2);
  font-size: 10px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v49-day-icons {
  display: flex;
  gap: 4px;
  font-size: 13px;
}

.v49-empty {
  padding: 18px 6px 4px;
  color: var(--txt2);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.v49-prescription {
  padding: 15px;
  border: 1px solid rgba(var(--accent-rgb), 0.17);
  border-radius: 17px;
  background: rgba(var(--accent-rgb), 0.065);
}

.v49-prescription small {
  color: var(--gold);
  font-size: 8px;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.v49-prescription h3 {
  margin: 6px 0;
  font-size: 17px;
}

.v49-prescription p {
  margin: 0;
  color: var(--txt2);
  font-size: 11px;
  line-height: 1.45;
}

.v49-plan {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 5px;
  margin-top: 13px;
}

.v49-plan-day {
  min-width: 0;
  padding: 9px 2px;
  border: 1px solid var(--line2);
  border-radius: 12px;
  background: var(--elev2);
  text-align: center;
}

.v49-plan-day.today {
  border-color: rgba(var(--accent-rgb), 0.42);
  background: rgba(var(--accent-rgb), 0.1);
}

.v49-plan-day.done {
  border-color: rgba(91, 185, 140, 0.25);
  background: rgba(91, 185, 140, 0.07);
}

.v49-plan-day b,
.v49-plan-day span,
.v49-plan-day small {
  display: block;
}

.v49-plan-day b {
  color: var(--txt2);
  font-size: 8px;
}

.v49-plan-day span {
  margin: 5px 0;
  font-size: 15px;
}

.v49-plan-day small {
  overflow: hidden;
  color: var(--txt3);
  font-size: 7px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v49-basis {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 12px;
}

.v49-basis div {
  padding: 9px 5px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.16);
  text-align: center;
}

.v49-basis b,
.v49-basis span {
  display: block;
}

.v49-basis b {
  font-size: 14px;
}

.v49-basis span {
  margin-top: 2px;
  color: var(--txt3);
  font-size: 8px;
}

@media (max-width: 370px) {
  .v49-plan {
    gap: 3px;
  }

  .v49-plan-day {
    padding-inline: 0;
  }
}

/* Calendar day sheet: one shared grid for every section and state. */
#sheet-day #dayBody {
  --v49-day-icon: 22px;
  --v49-day-gap: 10px;
}

#sheet-day .dv-section-title,
#sheet-day .dv-row {
  display: grid;
  grid-template-columns: var(--v49-day-icon) minmax(0, 1fr) minmax(88px, auto);
  column-gap: var(--v49-day-gap);
  align-items: center;
}

#sheet-day .dv-section-title {
  margin-top: 22px;
}

#sheet-day .sheet-title + .dv-section-title {
  margin-top: 0;
}

#sheet-day .dv-section-icon,
#sheet-day .dv-row-icon {
  width: var(--v49-day-icon);
  text-align: center;
  line-height: 1;
}

#sheet-day .dv-section-label,
#sheet-day .dv-row-label {
  grid-column: 2;
  min-width: 0;
}

#sheet-day .dv-row-value {
  grid-column: 3;
  min-width: 0;
  text-align: right;
  color: var(--txt2);
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

#sheet-day .dv-empty,
#sheet-day .dv-pills {
  margin-left: calc(var(--v49-day-icon) + var(--v49-day-gap));
}

#sheet-day .dv-tot {
  padding-right: 0;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 390px) {
  #sheet-day .dv-row {
    grid-template-columns: var(--v49-day-icon) minmax(0, 1fr) minmax(76px, auto);
  }

  #sheet-day .dv-row-value {
    white-space: normal;
  }
}
