.daily-loop-panel {
  position: relative;
  min-height: 238px;
  background:
    linear-gradient(145deg, rgba(11, 29, 49, .94), rgba(47, 23, 42, .88) 58%, rgba(13, 50, 52, .9));
}

.daily-loop-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .2;
  background:
    repeating-linear-gradient(115deg, transparent 0 17px, rgba(255, 255, 255, .28) 18px, transparent 19px),
    linear-gradient(90deg, transparent, rgba(255, 176, 95, .18), transparent);
}

.daily-loop-panel .section-title,
.loop-ribbon,
.loop-steps,
.loop-next {
  position: relative;
  z-index: 1;
}

.loop-ribbon {
  height: 13px;
  padding: 3px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 999px;
  background: rgba(3, 9, 19, .38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.loop-ribbon i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--mint), #ffe17a 48%, var(--pink));
  box-shadow: 0 0 20px rgba(255, 78, 120, .42);
  transition: width .35s cubic-bezier(.22, 1, .36, 1);
}

.loop-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 13px;
}

.loop-steps section {
  min-height: 72px;
  display: grid;
  grid-template-columns: 28px 1fr;
  align-content: center;
  gap: 4px 9px;
  padding: 10px;
  border: 1px dashed rgba(255, 255, 255, .17);
  border-radius: 8px;
  background: rgba(255, 255, 255, .055);
  transform: translateY(0);
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.loop-steps section::before {
  content: "";
  width: 24px;
  height: 24px;
  grid-row: span 2;
  align-self: center;
  border: 2px solid rgba(255, 255, 255, .25);
  border-radius: 50%;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 0 0 5px rgba(3, 9, 19, .55);
}

.loop-steps b {
  color: #fff;
  font-family: var(--font-cute);
  font-size: 15px;
  font-weight: 400;
  line-height: 1.15;
}

.loop-steps span {
  color: #c9d8e8;
  font-family: var(--font-soft);
  font-size: 11px;
  line-height: 1.45;
}

.loop-steps section.is-current {
  border-color: rgba(255, 225, 122, .72);
  background: rgba(255, 225, 122, .1);
  transform: translateY(-2px);
}

.loop-steps section.is-current::before {
  border-color: #ffe17a;
  background: #ffe17a;
  animation: loopPop 1.35s ease-in-out infinite;
}

.loop-steps section.is-done {
  border-style: solid;
  border-color: rgba(99, 230, 184, .56);
  background: rgba(99, 230, 184, .11);
}

.loop-steps section.is-done::before {
  content: "✓";
  display: grid;
  place-items: center;
  color: #082033;
  border-color: transparent;
  background: linear-gradient(180deg, #d9fff0, var(--mint));
  box-shadow: 0 0 18px rgba(99, 230, 184, .26);
  font-family: var(--font-number);
  font-size: 17px;
  font-weight: 800;
}

.loop-next {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  margin-top: 13px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 8px;
  background: rgba(3, 9, 19, .38);
}

.loop-next p {
  color: #ecf7ff !important;
  font-size: 13px !important;
  line-height: 1.55 !important;
}

.loop-next button {
  min-width: 104px;
  white-space: nowrap;
}

.daily-loop-panel.is-complete .loop-next {
  background: linear-gradient(135deg, rgba(99, 230, 184, .14), rgba(255, 78, 120, .12));
}

@keyframes loopPop {
  0%, 100% { transform: scale(.92); box-shadow: 0 0 0 rgba(255, 225, 122, .2); }
  50% { transform: scale(1); box-shadow: 0 0 20px rgba(255, 225, 122, .38); }
}

@media (max-width: 390px) {
  .loop-steps {
    grid-template-columns: 1fr;
  }

  .loop-next {
    grid-template-columns: 1fr;
  }

  .loop-next button {
    width: 100%;
  }
}
