html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  width: 300px;
  display: grid;
  gap: 8px;
}

.row {
  border-radius: 16px;
  background: rgba(255, 247, 230, 0.06);
  overflow: hidden;
}

.rowBtn {
  appearance: none;
  border: none;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.rowBtn:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: -2px;
}

.badge {
  flex: 0 0 auto;
  min-width: 34px;
  padding: 4px 8px;
  border-radius: 999px;
  background: #0a4fe8;
  color: #fff7e6;
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  transform-origin: center;
  transition: transform 220ms ease-out;
}

.title {
  flex: 1 1 auto;
  color: #fff7e6;
  font-size: 14px;
  font-weight: 600;
}

.caret {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: rgba(255, 247, 230, 0.7);
  transition: transform 300ms ease-out;
}

.subWrap {
  overflow: hidden;
  max-height: var(--h, 0px);
  transition: max-height 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.subWrap.open {
  max-height: var(--h, 240px);
}

.subList {
  list-style: none;
  margin: 0;
  padding: 0 16px 12px;
  display: grid;
  gap: 4px;
}

.subList li {
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 247, 230, 0.05);
  color: rgba(255, 247, 230, 0.85);
  font-size: 12px;
}
.subList li.done {
  color: rgba(255, 247, 230, 0.45);
  text-decoration: line-through;
}

@media (max-width: 340px) {
  .list {
    width: 240px;
    gap: 4px;
  }
  .title {
    font-size: 13px;
  }
  .rowBtn {
    padding: 4px 12px;
  }
  .subWrap.open {
    max-height: 40px;
    overflow-y: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  .badge, .caret, .subWrap {
    transition: none;
  }
}
